{"record":{"id":"4ba91a9ff8cd4dc7","repo":"affaan-m/ECC","slug":"unsupported-it-command-command-missing","errorCode":null,"errorMessage":"Unsupported Itô command \"${command || \"(missing)\"}\"; ECC permits only login, logout, auth, find, status, and evals.","messagePattern":"Unsupported Itô command \"(.+?)\"; ECC permits only login, logout, auth, find, status, and evals\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/ito.js","lineNumber":166,"sourceCode":"    return Object.freeze({ help: true, invocationArgs: [] });\n  }\n\n  if (environment.ECC_DRY_RUN === \"1\" || args.includes(\"--dry-run\")) {\n    throw new Error(\n      \"Itô compute has no paper or dry-run success mode. No CLI operation was invoked.\"\n    );\n  }\n\n  const jsonIndexes = args\n    .map((value, index) => (value === \"--json\" ? index : -1))\n    .filter((index) => index >= 0);\n  if (jsonIndexes.length > 1) {\n    throw new Error(\"--json may only be provided once\");\n  }\n  const withoutJson = args.filter((value) => value !== \"--json\");\n  const command = withoutJson.shift();\n  if (!SUPPORTED_COMMANDS.includes(command)) {\n    throw new Error(\n      `Unsupported Itô command \"${command || \"(missing)\"}\"; ECC permits only login, logout, auth, find, status, and evals.`\n    );\n  }\n  if (command === \"auth\" && withoutJson.includes(\"--no-browser\")) {\n    throw new Error(\"--no-browser is valid only for ecc ito login; auth is validation-only.\");\n  }\n  if (command === \"evals\") {\n    validateNodeQualificationArgs(withoutJson, environment);\n  }\n\n  return Object.freeze({\n    help: false,\n    invocationArgs: Object.freeze([\n      ...(jsonIndexes.length === 1 ? [\"--json\"] : []),\n      command,\n      ...withoutJson,\n    ]),\n  });","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/ito.js#L148-L184","documentation":"Thrown by parseArgs at scripts/ito.js:165-168 when the first non---json argument is not one of the SUPPORTED_COMMANDS (login, logout, auth, find, status, evals). The bridge only forwards a fixed command allowlist to the canonical Itô CLI; anything else is rejected before any subprocess is started. If no command is present at all (argv empty after --json stripping), command is undefined and the message interpolates '(missing)'. Note: --help/-h/empty argv returns help at ito.js:143-148 and never reaches this check.","triggerScenarios":"`ecc ito foobar`; `ecc ito` (no command, no --help); `ecc ito --json` (only the flag); `ecc ito LIST` (case-sensitive — uppercase is rejected). The first token after stripping all --json occurrences is shifted out at ito.js:164 and tested.","commonSituations":"Typo in the subcommand (e.g. `ecc ito auths` instead of `auth`); copy/paste from docs that list a command not yet supported by the installed ECC version; CI job parameterized with an empty command variable that interpolates to nothing.","solutions":["Use one of the supported commands: login, logout, auth, find, status, evals (lowercase).","Run `ecc ito --help` to see the canonical list for your installed version.","If a flag was mistaken for the command (e.g. `ecc ito --no-browser`), put a supported command first: `ecc ito login --no-browser`."],"exampleFix":"// before\n$ ecc ito Authenticate\n// after\n$ ecc ito auth","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['login', 'logout', 'auth', 'find', 'status', 'evals']);\nfunction assertSupportedCommand(cmd) {\n  if (!SUPPORTED.has(cmd)) {\n    throw new Error(`Unsupported ito command '${cmd}'. Supported: ${[...SUPPORTED].join(', ')}`);\n  }\n  return cmd;\n}","typeGuard":"function isItoCommand(value) {\n  return typeof value === 'string'\n    && ['login', 'logout', 'auth', 'find', 'status', 'evals'].includes(value);\n}","tryCatchPattern":null,"preventionTips":["Pull the supported-command list from the binary itself (`ecc ito --help`) when scripting.","Lowercase the command in wrappers before passing it through.","Pin ECC versions in CI to avoid surprise command-set changes."],"tags":["cli","validation","ito","command-routing"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}