@ekanos/cli 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/apps-api.js +1 -1
  2. package/dist/apps-api.js.map +1 -1
  3. package/dist/commands/names.js +2 -2
  4. package/dist/commands/names.js.map +1 -1
  5. package/dist/commands/publish.js +1 -1
  6. package/dist/commands/publish.js.map +1 -1
  7. package/dist/commands/sources.js +2 -2
  8. package/dist/commands/sources.js.map +1 -1
  9. package/dist/commands/team-agent-readiness.js +1 -1
  10. package/dist/commands/team-agent-readiness.js.map +1 -1
  11. package/dist/commands/teams-channel-install.js +1 -1
  12. package/dist/commands/teams-channel-install.js.map +1 -1
  13. package/dist/commands/teams-connect.js +2 -2
  14. package/dist/commands/teams-connect.js.map +1 -1
  15. package/dist/commands/teams.js +2 -2
  16. package/dist/commands/teams.js.map +1 -1
  17. package/dist/commands/use.js +1 -1
  18. package/dist/commands/use.js.map +1 -1
  19. package/dist/connections-api.js +1 -1
  20. package/dist/connections-api.js.map +1 -1
  21. package/dist/experience/definition-checks.js +1 -1
  22. package/dist/experience/definition-checks.js.map +1 -1
  23. package/dist/experience/definition-shape.d.ts +4 -1
  24. package/dist/experience/definition-shape.js.map +1 -1
  25. package/dist/generated/fa-free-names.d.ts +2 -2
  26. package/dist/generated/fa-free-names.js +5 -5
  27. package/dist/generated/fa-free-names.js.map +1 -1
  28. package/dist/index.js +2 -2
  29. package/dist/index.js.map +1 -1
  30. package/dist/publish-api.js +1 -2
  31. package/dist/publish-api.js.map +1 -1
  32. package/dist/runs-api.js +1 -1
  33. package/dist/runs-api.js.map +1 -1
  34. package/dist/schema-skew.js.map +1 -1
  35. package/dist/secret-form.js +1 -1
  36. package/dist/secret-form.js.map +1 -1
  37. package/dist/source-products-api.js +1 -1
  38. package/dist/source-products-api.js.map +1 -1
  39. package/dist/teams-api.js +2 -2
  40. package/dist/teams-api.js.map +1 -1
  41. package/dist/workflows-api.js +1 -1
  42. package/dist/workflows-api.js.map +1 -1
  43. package/package.json +2 -2
  44. package/templates/AGENTS.md.tmpl +24 -8
  45. package/templates/experience/AGENTS.md.tmpl +3 -1
  46. package/templates/experience/package.json.tmpl +4 -4
  47. package/templates/experience/src/widgets/hello-widget.tsx.tmpl +3 -1
  48. package/templates/package.json.tmpl +4 -4
  49. package/templates/skills/build-integration/SKILL.md +2 -1
  50. package/templates/skills/build-integration/references/api-wiring.md +4 -2
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE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AAF;YAAO,OAAA,MAAM,CAAA;QAAA,CAAC,AAAD,CAAC;QAC9D,IAAI;KACL,EACD,KAAK,CACN,CAAC;AACJ,CAAC","sourcesContent":["import { isRepoRoot } from '@ekanos/integration-schema/repo';\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\n\nimport { runAgents } from './commands/agents';\nimport { TEMPLATE_EDIT_HELP } from './commands/agents-edit';\nimport { runApps } from './commands/apps';\nimport { runAudiences } from './commands/audiences';\nimport { runCatalog } from './commands/catalog';\nimport { runDev } from './commands/dev';\nimport { EXPERIENCE_COMMANDS } from './commands/index-experience';\nimport { runInit } from './commands/init';\nimport { runKnowledge } from './commands/knowledge';\nimport { runLogin } from './commands/login';\nimport { runLogout } from './commands/logout';\nimport { runNames } from './commands/names';\nimport { runPublish } from './commands/publish';\nimport { runReviewers } from './commands/reviewers';\nimport { runRoutes } from './commands/routes';\nimport { runApprovals, runRuns } from './commands/runs';\nimport { runSkills } from './commands/skills';\nimport { runSources } from './commands/sources';\nimport { runStatus } from './commands/status';\nimport { TEAM_AGENT_AREAS, usageFor } from './commands/team-agents';\nimport { runTeams } from './commands/teams';\nimport { runTest } from './commands/test';\nimport { runUpgrade } from './commands/upgrade';\nimport { runUse } from './commands/use';\nimport { runValidate } from './commands/validate';\nimport { runWhoami } from './commands/whoami';\nimport { runWorkflows } from './commands/workflows';\nimport { CliContext, type WriteStream } from './context';\nimport { SDK_DOCS_URL, docsPage } from './docs-links';\nimport { preconditionError, toCliError, usageError } from './errors';\nimport { type Invocation, detectInvocation, setInvocation } from './invocation';\nimport { type FlagSpec, type FlagSpecs, parseArgv } from './parse-argv';\nimport { unknownCommand } from './unknown-command';\n\nexport { CliContext } from './context';\nexport { EXIT_CODES, ERROR_CODES } from './exit-codes';\nexport type { ExitCode, ErrorCode } from './exit-codes';\n\nconst GLOBAL_SPECS: FlagSpecs = {\n json: {\n type: 'boolean',\n description:\n 'One JSON envelope on stdout (on by default when piped or under Claude Code; --no-json forces text)',\n },\n help: { type: 'boolean', description: 'Show help for the command' },\n version: { type: 'boolean', description: 'Print the CLI version' },\n};\n\n/** The flags most commands share, described once. */\nconst HOST: FlagSpec = {\n type: 'string',\n description:\n 'Ekanos host URL (else EKANOS_HOST, the \"host\" in ekanos.json, or the only stored login)',\n};\nconst SOURCE: FlagSpec = {\n type: 'string',\n description:\n 'The Source to act on (else the \"source\" in ekanos.json, or your only seat)',\n};\nconst DIR: FlagSpec = {\n type: 'string',\n description:\n 'Project directory, where ekanos.json and relative paths are read (default: the current one)',\n};\n\n/**\n * Where a secret comes from without a terminal (`secret-input.ts`), for every\n * command that takes one. Never a value: a secret in argv lands in shell\n * history and the process list.\n */\nconst SECRET_INPUT: FlagSpecs = {\n 'secret-env': {\n type: 'string',\n description:\n 'The secret, from this environment variable (its NAME, never the value)',\n },\n 'secret-file': {\n type: 'string',\n description: 'The secret, from this file: yours, mode 600, not a symlink',\n },\n 'secret-stdin': {\n type: 'boolean',\n description: 'The secret, piped in on stdin',\n },\n 'set-secret': {\n type: 'string',\n repeatable: true,\n description:\n 'One field of a form: <field>=env:<NAME> | file:<path> | stdin',\n },\n browser: {\n type: 'boolean',\n description:\n 'Type the secret into a one-time form in your browser on this computer (never shown to the run that asked)',\n },\n};\n\nconst COMMAND_SPECS: Record<string, FlagSpecs> = {\n init: {\n slug: {\n type: 'string',\n description: 'Kebab-case id of the integration, e.g. acme-crm',\n },\n kind: {\n type: 'string',\n description:\n 'What to scaffold: integration (default), experience (widgets and workflows that depend on integrations) or repo (one repo holding many of both)',\n },\n dir: {\n type: 'string',\n description:\n 'Target directory (default ./<slug>; --dir . scaffolds in place)',\n },\n force: {\n type: 'boolean',\n description: 'Overwrite files that already exist',\n },\n yes: {\n type: 'boolean',\n description: 'Accepted for scripts; init never prompts',\n },\n // Repeatable: each occurrence appends one docs entry (URL or relative\n // path) to the scaffolded ekanos.json.\n docs: {\n type: 'string',\n repeatable: true,\n description:\n \"An http(s) URL or project-relative path to the API's docs, written to ekanos.json\",\n },\n },\n validate: {\n dir: DIR,\n },\n dev: {\n dir: DIR,\n port: { type: 'string', description: 'Dev server port (default 3100)' },\n host: {\n type: 'string',\n description:\n 'Interface to bind (default 127.0.0.1; anything else is exposed, with a warning)',\n },\n force: {\n type: 'boolean',\n description: 'Rewrite every generated file even when unchanged',\n },\n start: {\n type: 'boolean',\n description:\n 'Start the server even in JSON mode or under an agent (non-interactive runs only scaffold and print the command); --no-start only scaffolds',\n },\n 'contracts-dir': {\n type: 'string',\n description:\n 'Experiences: a directory of <integration>.contract.json files to resolve integrations from (offline registry)',\n },\n },\n test: {\n dir: DIR,\n // Skips the vitest JSON-reporter injection and the curated failures\n // appendix, reproducing the pre-appendix raw-passthrough behavior —\n // also the escape hatch if the vitest-detection heuristic ever guesses\n // wrong for a project. See `test-report.ts`.\n raw: {\n type: 'boolean',\n description:\n 'Run the test script as is, without the failures appendix and its reporter',\n },\n },\n login: {\n host: {\n type: 'string',\n description:\n 'Ekanos host URL (else EKANOS_HOST, or the only stored login; never ekanos.json)',\n },\n force: {\n type: 'boolean',\n description: 'Sign in again even when the stored session is valid',\n },\n 'trust-host': {\n type: 'boolean',\n description:\n 'Sign in to a host you have never logged in to without being asked',\n },\n claude: {\n type: 'boolean',\n description:\n 'Add the Ekanos docs to Claude Code without asking; --no-claude skips it',\n },\n },\n logout: {\n host: HOST,\n all: { type: 'boolean', description: 'Log out of every stored host' },\n },\n whoami: {\n host: HOST,\n },\n status: {\n host: HOST,\n dir: DIR,\n findings: {\n type: 'boolean',\n description: 'Every finding of each version, not just the counts',\n },\n all: {\n type: 'boolean',\n description:\n \"Expand the Source's other integrations into full version tables\",\n },\n watch: {\n type: 'boolean',\n description:\n \"Wait until this project's current version reaches a gate verdict\",\n },\n },\n sources: {\n host: HOST,\n dir: DIR,\n // `sources products [enable|disable <product>]`.\n source: SOURCE,\n yes: {\n type: 'boolean',\n description: 'Confirm products disable, scopes remove, roles delete',\n },\n // `sources roles create|update`.\n 'display-name': {\n type: 'string',\n description: \"roles create|update: the role's display name\",\n },\n description: {\n type: 'string',\n description: \"roles create|update: the role's description\",\n },\n level: {\n type: 'string',\n description:\n 'roles create|update: its level, 1 to 1000; lower ranks higher (default 100)',\n },\n permission: {\n type: 'string',\n repeatable: true,\n description:\n 'roles create|update: a permission it holds (update: replaces them all)',\n },\n grant: {\n type: 'string',\n repeatable: true,\n description: 'roles update: add this permission',\n },\n revoke: {\n type: 'string',\n repeatable: true,\n description: 'roles update: take this permission away',\n },\n // `sources people`.\n search: {\n type: 'string',\n description: 'people: only those whose name or email matches',\n },\n page: { type: 'string', description: 'people: which page, from 1' },\n },\n audiences: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n yes: {\n type: 'boolean',\n description: 'set: confirm dropping a product people then stop seeing',\n },\n name: { type: 'string', description: 'set: rename the audience' },\n description: {\n type: 'string',\n description: 'create|set: what the audience is for',\n },\n products: {\n type: 'string',\n description:\n 'create|set: the products it shows, as a,b (set: replaces them; none empties it)',\n },\n widgets: {\n type: 'string',\n repeatable: true,\n description:\n 'create|set: <product>=<id>,<id> shows only those widgets of the product (<product>= lifts the rule)',\n },\n tools: {\n type: 'string',\n repeatable: true,\n description:\n 'create|set: <product>=<name>,<name> allows only those tools of the product (<product>= lifts the rule)',\n },\n default: {\n type: 'boolean',\n description: 'create|set: new teams of the Source start on it',\n },\n 'all-entitled': {\n type: 'boolean',\n description:\n 'create|set: show every product the Source has, now and later (--no-all-entitled turns it off)',\n },\n },\n catalog: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n },\n apps: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n 'no-wait': {\n type: 'boolean',\n description: 'connect: print the links and return without waiting',\n },\n yes: {\n type: 'boolean',\n description:\n 'disconnect: confirm without the question (needed in a script or agent run)',\n },\n set: {\n type: 'string',\n repeatable: true,\n description:\n 'set, connect: <name>=<value> for a field that is not a secret (set: clientId)',\n },\n ...SECRET_INPUT,\n },\n teams: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n connection: {\n type: 'string',\n description:\n 'connect, app set: which of the integration\\'s connections (e.g. \"agent\" for Linear\\'s agent)',\n },\n // `teams app set`: which fields to enter, non-secret values, removals.\n field: {\n type: 'string',\n repeatable: true,\n description: 'app set: enter just this field at your terminal',\n },\n set: {\n type: 'string',\n repeatable: true,\n description:\n 'app set, connect: <name>=<value> for a field that is not a secret (a list as a,b)',\n },\n self: {\n type: 'boolean',\n description:\n 'members add: you join the team now, with no invitation email',\n },\n // `teams audience`.\n member: {\n type: 'string',\n description:\n \"audience: one member's audience, by email (setting it is deprecated)\",\n },\n inherit: {\n type: 'boolean',\n description:\n \"audience --member: clear their own audience so the team's applies (deprecated)\",\n },\n // `app set`, `connect`, `mcp token|add`, `llm-key set`.\n ...SECRET_INPUT,\n clear: {\n type: 'string',\n repeatable: true,\n description: \"app set: remove this field's saved value\",\n },\n slug: {\n type: 'string',\n description: \"create: the team's slug (default: from its name)\",\n },\n owner: {\n type: 'string',\n description: 'create: invite this email as the owner instead of you',\n },\n role: {\n type: 'string',\n description:\n 'members add, members invite: the role to give (default member)',\n },\n yes: {\n type: 'boolean',\n description:\n 'Confirm a change that removes, pauses, revokes or opens something up (members remove, leave, groups delete, groups members remove, webhook, disconnect, agents disable|archive, mcp detach, triggers add slack|disable, triggers edit of a slack audience, triggers remove|rotate, links remove, mcp remove, scope set that drops a scope)',\n },\n // `teams agents|triggers|links|mcp` (team-agents.ts).\n as: {\n type: 'string',\n description:\n 'connect: the member who signs in; agents enable: the member the agent runs as (chosen once, when it is turned on)',\n },\n // `teams agents enable|pin … --draft`: test the unpublished draft there.\n draft: {\n type: 'boolean',\n description:\n \"agents enable|pin: put this team alone on the template's unpublished draft\",\n },\n // `teams agents enable|policy|create|apply`: also confirm, as yourself,\n // what the agent may use (whoever sets it up confirms it, plan 247.2).\n 'confirm-access': {\n type: 'boolean',\n description:\n 'agents enable|policy|create|apply: also confirm, as yourself, what it may use',\n },\n // `teams agents create|apply`: the agent.json, read as `agents apply`\n // reads it (team-agents-define.ts).\n from: {\n type: 'string',\n description: 'agents create: the agent directory or agent.json',\n },\n personal: {\n type: 'boolean',\n description:\n 'agents create|apply: your own agent, which acts for you and only you change',\n },\n 'base-version': {\n type: 'string',\n description:\n 'agents apply: the agent version your edit starts from (\"teams agents show\")',\n },\n overwrite: {\n type: 'boolean',\n description: 'agents apply: replace a newer version on the host anyway',\n },\n skills: {\n type: 'boolean',\n description:\n 'agents create|apply: --no-skills skips pushing <dir>/skills/<slug>/ as team skills',\n },\n reads: {\n type: 'string',\n description: 'agents policy: auto|approve for every read tool',\n },\n writes: {\n type: 'string',\n description: 'agents policy: auto|approve for every write tool',\n },\n effect: {\n type: 'string',\n description:\n 'Not read: \"teams mcp effect\" takes the effect as an argument',\n },\n agent: {\n type: 'string',\n description:\n 'mcp refresh: list again the tools of every server this agent has',\n },\n kind: { type: 'string', description: 'links add: talk|delegate' },\n mode: {\n type: 'string',\n description: 'links add: await|handoff, for a delegate link',\n },\n url: { type: 'string', description: \"mcp add: the server's URL\" },\n auth: {\n type: 'string',\n description: 'mcp add: none|token|oauth (default oauth)',\n },\n name: {\n type: 'string',\n description:\n \"mcp add: the server's display name; groups update: the group's new name\",\n },\n // `teams groups create|update`.\n description: {\n type: 'string',\n description: \"groups create|update: the group's description\",\n },\n products: {\n type: 'string',\n description:\n 'groups create|update: the products it narrows to, comma-separated (none: no narrowing)',\n },\n // `teams disconnect|health <team> <product> --mine`: the caller's own.\n mine: {\n type: 'boolean',\n description:\n \"disconnect, health <product>: your own personal connection, never another member's\",\n },\n // `teams health <team> <product> --run`.\n run: {\n type: 'boolean',\n description: \"health: run the integration's health check now\",\n },\n cron: {\n type: 'string',\n description: 'triggers add|edit schedule: a cron expression',\n },\n timezone: {\n type: 'string',\n description:\n 'triggers add|edit schedule: an IANA time zone (default UTC)',\n },\n prompt: {\n type: 'string',\n description: 'triggers add|edit: what the agent is told when it fires',\n },\n // Repeatable `field=value`, or one JSON object — as at the template level.\n filter: {\n type: 'string',\n repeatable: true,\n description:\n 'triggers add|edit event: field=a,b (repeatable) or one JSON object',\n },\n // `teams <area> … --team <slug>`: the team, in place of the positional.\n team: {\n type: 'string',\n description:\n 'The team, in place of the <team> argument (teams <area> … --team <slug>)',\n },\n // `teams triggers add … slack|linear`: where it answers. `--no-mention`\n // is the negation of `mention`.\n channel: {\n type: 'string',\n repeatable: true,\n description:\n 'triggers add|edit slack: a channel it answers in (#name or id); edit replaces the list',\n },\n dms: {\n type: 'boolean',\n description:\n 'triggers add|edit slack: also answer direct messages (edit: --no-dms stops)',\n },\n label: {\n type: 'string',\n repeatable: true,\n description:\n 'triggers add|edit linear: a label that hands an issue to it; edit replaces the list',\n },\n mention: {\n type: 'boolean',\n description:\n 'triggers add|edit linear: --no-mention ignores @mentions (edit: --mention answers them)',\n },\n // `teams connect`: `--no-wait`, `--no-open` (the negation of `open`),\n // `--link-only`.\n 'no-wait': {\n type: 'boolean',\n description: 'connect: print the sign-in link and return at once',\n },\n open: {\n type: 'boolean',\n description:\n 'connect: --no-open prints the link without opening a browser',\n },\n 'link-only': {\n type: 'boolean',\n description: \"connect: print the team's page instead of connecting\",\n },\n // `teams events <team> [--product] [--since] [--limit]`.\n product: {\n type: 'string',\n description: 'events: only this product (or name it after the team)',\n },\n since: {\n type: 'string',\n description: 'events: since 30m, 24h, 7d or a date',\n },\n limit: { type: 'string', description: 'events: how many, 1 to 100' },\n // `teams connect --reconnect`.\n reconnect: {\n type: 'boolean',\n description:\n 'connect: connect again though it reads as connected (revoked or expired)',\n },\n },\n names: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n reason: {\n type: 'string',\n description: 'claim: why the name should be yours',\n },\n },\n reviewers: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n reach: {\n type: 'string',\n description: \"add: source (every team's drafts) or team (one team's)\",\n },\n team: {\n type: 'string',\n description: \"add --reach team, remove: the team's slug\",\n },\n yes: { type: 'boolean', description: 'remove: confirm' },\n },\n routes: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n label: { type: 'string', description: 'set: a name for the value' },\n webhook: {\n type: 'string',\n description: 'webhook: which webhook, when the integration has several',\n },\n yes: {\n type: 'boolean',\n description:\n 'remove: confirm; webhook: replace the live URL, revoking it',\n },\n },\n agents: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n // Not `--version`: that is global, and prints the CLI's own version.\n to: {\n type: 'string',\n description: 'publish, rollback: the version teams run',\n },\n 'base-version': {\n type: 'string',\n description:\n 'apply: the version your edit starts from (refused when the host has moved on)',\n },\n overwrite: {\n type: 'boolean',\n description: 'apply: replace a newer version on the host anyway',\n },\n out: {\n type: 'string',\n description: 'pull: where to write the template (default agents/<key>)',\n },\n yes: {\n type: 'boolean',\n description:\n 'publish, rollback, archive, --publish: confirm (needed in a script or agent run)',\n },\n all: {\n type: 'boolean',\n description: 'list: include archived agents',\n },\n force: {\n type: 'boolean',\n description:\n 'init: replace the skills and CLAUDE.md that exist; pull: overwrite local files that differ',\n },\n claude: {\n type: 'boolean',\n description:\n 'init: add the docs to Claude Code without asking; --no-claude skips it',\n },\n // `agents test <key> --team <slug> --prompt|--input [--follow]`.\n team: { type: 'string', description: 'test: the team to run the draft on' },\n prompt: {\n type: 'string',\n description: 'test: the message; triggers add: what the agent is told',\n },\n input: { type: 'string', description: 'test: a JSON file to run with' },\n follow: {\n type: 'boolean',\n description: 'test: wait for the run and print its result',\n },\n // `apply`: `--no-skills` skips pushing the skill folders beside the agent.\n skills: {\n type: 'boolean',\n description: 'apply: --no-skills skips pushing <dir>/skills/<slug>/',\n },\n // policy | triggers | links | overrides\n event: {\n type: 'string',\n description: 'triggers add event: <product>.<event>',\n },\n filter: {\n type: 'string',\n repeatable: true,\n description: 'triggers add event: field=a,b (repeat for more fields)',\n },\n disabled: {\n type: 'boolean',\n description: 'triggers add: store the trigger turned off',\n },\n cron: {\n type: 'string',\n description: 'triggers add schedule: a cron expression',\n },\n timezone: {\n type: 'string',\n description: 'triggers add schedule: an IANA time zone',\n },\n kind: { type: 'string', description: 'links: talk|delegate' },\n mode: {\n type: 'string',\n description: 'links add: await|handoff, for a delegate link',\n },\n reads: {\n type: 'string',\n description: 'policy: auto|approve for every read tool',\n },\n writes: {\n type: 'string',\n description: 'policy: auto|approve for every write tool',\n },\n publish: {\n type: 'boolean',\n description:\n 'policy, triggers, links, overrides: publish the new version too (with --yes)',\n },\n // `publish | rollback` (and `--publish`): also confirm, as yourself, on\n // every team running the version with no confirmation.\n 'confirm-access': {\n type: 'boolean',\n description:\n 'publish, rollback, --publish: also confirm, as yourself, on every team on that version not yet confirmed',\n },\n },\n skills: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: {\n type: 'string',\n description: \"That team's own skills instead of the Source's\",\n },\n out: {\n type: 'string',\n description: 'pull: where to write the skill folder',\n },\n force: {\n type: 'boolean',\n description: 'pull: overwrite local files that differ from the host',\n },\n yes: {\n type: 'boolean',\n description: 'archive: confirm (needed in a script or agent run)',\n },\n },\n knowledge: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: {\n type: 'string',\n description: \"That team's collection instead of General\",\n },\n out: { type: 'string', description: 'pull: where to write the articles' },\n force: {\n type: 'boolean',\n description: 'pull: overwrite local files that differ from the host',\n },\n prune: {\n type: 'boolean',\n description:\n 'push: also delete the articles an earlier push of this folder made whose files are gone (never ones written or edited in the app)',\n },\n yes: {\n type: 'boolean',\n description:\n 'push --prune: delete without asking (needed in a script or agent run)',\n },\n },\n runs: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: { type: 'string', description: 'The team whose runs these are' },\n agent: { type: 'string', description: \"list: only this agent's runs\" },\n status: {\n type: 'string',\n description:\n 'list: only runs in this status (running, awaiting_approval, completed, failed, cancelled)',\n },\n since: {\n type: 'string',\n description: 'list: only runs started since 30m, 24h, 7d or a date',\n },\n prompt: { type: 'string', description: 'start: the message' },\n input: { type: 'string', description: 'start: a JSON file to run with' },\n follow: {\n type: 'boolean',\n description: 'start: wait for the run and print its result',\n },\n // `runs cancel <run-id> --yes`.\n yes: { type: 'boolean', description: 'cancel: confirm' },\n },\n approvals: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: { type: 'string', description: 'The team whose runs wait on these' },\n reason: { type: 'string', description: 'approve, reject: why' },\n body: {\n type: 'string',\n description: 'edit: a file with the reply to send instead',\n },\n },\n workflows: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: { type: 'string', description: 'The team whose workflows these are' },\n all: { type: 'boolean', description: 'list: include archived workflows' },\n out: {\n type: 'string',\n description:\n 'pull: where to write workflow.json (default workflows/<name>)',\n },\n force: {\n type: 'boolean',\n description: 'pull: overwrite a local workflow.json that differs',\n },\n update: {\n type: 'string',\n description:\n 'apply: the workflow (id or name) to replace; without it apply creates a draft',\n },\n 'confirm-access': {\n type: 'boolean',\n description:\n 'enable: approve, as yourself, what its Custom Code reaches (hosts, writes)',\n },\n 'dry-run': {\n type: 'boolean',\n description:\n 'run: rehearse it (writes recorded, not sent; gates pass); a draft may run so',\n },\n input: {\n type: 'string',\n description: 'run --dry-run: a JSON file read as the sample trigger.*',\n },\n follow: {\n type: 'boolean',\n description:\n 'run: wait, printing each step, until it ends or waits on a gate',\n },\n workflow: {\n type: 'string',\n description: \"runs list: only this workflow's runs (id or name)\",\n },\n status: {\n type: 'string',\n description:\n 'runs list: only runs in this status (running, waiting_approval, completed, rejected, failed, canceled)',\n },\n reason: { type: 'string', description: 'approvals reject: why' },\n yes: { type: 'boolean', description: 'runs cancel: confirm' },\n },\n use: {\n host: HOST,\n dir: DIR,\n },\n publish: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n yes: {\n type: 'boolean',\n description:\n 'Publish to the ekanos.json source without asking (needed in a script with several seats)',\n },\n 'dry-run': {\n type: 'boolean',\n description:\n 'Experiences and repos: gate, build and pack every package under .ekanos/publish/, publish nothing (a real publish needs a host that admits experiences)',\n },\n all: {\n type: 'boolean',\n description: 'In a repo: publish every package',\n },\n },\n upgrade: {\n dir: DIR,\n host: HOST,\n check: {\n type: 'boolean',\n description: 'Report current and target versions; change nothing',\n },\n yes: {\n type: 'boolean',\n description: 'Upgrade without asking (needed outside a terminal)',\n },\n // `--no-verify` is the negation of this — parse-argv's `--no-<bool>`\n // convention (same as `--no-json`/`--no-start`), not a flag of its own.\n verify: {\n type: 'boolean',\n description:\n '--no-verify skips the validate and test run after installing',\n },\n },\n};\n\n/** Commands that take positional arguments, and what each means, in order. Every other command is positional-free. */\nconst POSITIONAL_COMMANDS: Record<string, readonly string[]> = {\n use: ['source-slug'],\n // In a repo: `publish <package>...` (repeatable, see VARIADIC_COMMANDS).\n publish: ['package'],\n // `sources scopes add <scope> <product>` is the longest form.\n sources: ['subcommand', 'verb', 'product-or-scope', 'product-slug'],\n catalog: ['product-slug'],\n audiences: ['subcommand', 'audience'],\n apps: ['subcommand', 'product-slug'],\n // `teams agents policy <team> <key> set <tool> auto` is the longest form.\n teams: [\n 'subcommand',\n 'team-slug',\n 'product-slug',\n 'webhook-id',\n 'role',\n 'arg-6',\n 'arg-7',\n ],\n names: ['subcommand', 'slug'],\n reviewers: ['subcommand', 'email'],\n routes: ['subcommand', 'product-or-event-id', 'value', 'team-slug'],\n skills: ['subcommand', 'slug-or-path'],\n knowledge: ['subcommand', 'path-or-query'],\n runs: ['subcommand', 'agent-key-or-run-id'],\n approvals: ['subcommand', 'approval-id'],\n // `workflows runs show <run-id>` is the longest form.\n workflows: ['subcommand', 'workflow-or-verb', 'id'],\n // `triggers <key> add event <trigger-key>` is the longest form: five tokens.\n agents: ['subcommand', 'key-or-path', 'action', 'arg', 'value'],\n};\n\nfor (const command of EXPERIENCE_COMMANDS) {\n COMMAND_SPECS[command.name] = command.specs;\n if (command.positionals)\n POSITIONAL_COMMANDS[command.name] = command.positionals;\n}\n\n/** Commands that act on one package: refused at a repo root, with the way in. */\nconst REPO_ROOT_REFUSED: ReadonlySet<string> = new Set([\n 'validate',\n 'test',\n 'check',\n 'build',\n 'sync',\n 'add',\n 'codegen',\n 'contract',\n]);\n\n/** Commands whose last positional repeats. */\nconst VARIADIC_COMMANDS: ReadonlySet<string> = new Set(['publish']);\n\nconst COMMANDS = Object.keys(COMMAND_SPECS);\n\nconst USAGE = [\n 'Usage: ekanos <command> [options]',\n '',\n 'Commands:',\n ' init Scaffold a new integration project into ./<slug> (--slug <slug> --yes);',\n ' --kind experience for an experience, --kind repo for a repo of many',\n ...EXPERIENCE_COMMANDS.flatMap((command) => command.usage),\n ' validate Validate ekanos.json + the integration definition (--json)',\n ' dev Scaffold .ekanos/harness and run it with your own Next',\n ' test Run the project test script via its package manager (--json).',\n ' For a vitest test script, also renders a curated failures',\n ' appendix from a JSON reporter report; --raw skips that and',\n ' the reporter injection entirely.',\n ' login Authenticate against an Ekanos host in a browser (--host <url>;',\n ' offers to add the Ekanos docs to Claude Code: --claude|--no-claude;',\n ' a host you have never used asks first, or needs --trust-host)',\n ' logout Revoke and delete the stored session (--host <url> | --all)',\n ' whoami Print the identity the stored session authenticates as, plus',\n ' a compact list of the sources you hold a seat on',\n \" status Show login state and this project's submissions on the host\",\n ' (--findings for full gate findings, --all to expand other',\n ' integrations in the source, --watch to block until this',\n \" project's current version reaches a gate verdict)\",\n ' sources List every source you hold a developer/source-admin seat on |',\n ' products [--source <slug>] (each product, Experience or',\n ' Integration, and whether it is enabled for the Source) |',\n ' products enable <product> | products disable <product> --yes',\n ' (a super-admin grant: an \"ekanos login\" session is refused',\n ' and pointed at /admin) | scopes (each product scope: its',\n ' products and how many teams hold it; a team sees in the app',\n \" only its scopes' products) | scopes add <scope> <product> |\",\n ' scopes remove <scope> <product> --yes | roles [list] (the roles',\n ' every team of the Source hands out, each with its level and',\n ' permissions) | roles create <name> [--display-name <text>]',\n ' [--description <text>] [--level <n>] [--permission <p>]… |',\n ' roles update <role> [--display-name] [--description] [--level]',\n ' [--permission <p>]… (replaces) [--grant <p>]… [--revoke <p>]… |',\n ' roles delete <role> [--yes] (owner, admin and member are system',\n \" roles: never changed or deleted; a held role isn't deleted) |\",\n ' people [--search <text>] [--page <n>] (everyone with access, one',\n ' row per person, with their teams and role on each)',\n \" audiences A source's audiences, for its Source admin (they replace product\",\n ' scopes): list | show <audience> | create <name> [--products a,b |',\n ' --all-entitled] [--description <text>] [--default] [--widgets',\n ' <product>=<id>,…]… [--tools <product>=<name>,…]… | set <audience>',\n ' [--name] [--description] [--default] [--all-entitled] [--products',\n ' a,b|none] [--widgets …]… [--tools …]… [--yes] (--products replaces;',\n ' dropping a product needs --yes). A team is put on one (its',\n ' business type) with \"teams audience <team> [<audience>]\"; its',\n ' groups narrow it per person (\"teams groups\")',\n ' catalog What a source can already use, and how to set it up:',\n ' Experiences, then Integrations; one product shows its tools',\n ' with their inputs and whose connection agent runs use',\n ' (\"ekanos catalog [<product-slug>] --source <slug>\", --json)',\n \" apps The Source's app for an integration teams sign in through:\",\n ' show <product> | set <product> (Source admin; takes the secret',\n ' at your terminal, Enter keeps a saved value; without one,',\n ' --set clientId=<id> and --secret-env <NAME> | --secret-file',\n ' <path> | --secret-stdin | --browser) | connect',\n ' <product> [--no-wait] [--set <field>=<value>]… [--set-secret',\n ' <field>=env:<NAME>|file:<path>|stdin]… [--browser] (one',\n \" connection for the whole Source, used by the Source's provided\",\n ' agents in every team) | disconnect <product> [--yes] (a',\n ' script or agent run needs --yes) | list',\n \" teams A Source's teams, for the Source admin:\",\n ' create <name> [--slug <slug>] [--owner <email>] (you own it',\n ' unless --owner, who is invited as owner) |',\n ' rename <team> <name> (the slug follows the name, as in the app) |',\n ' members list <team> | members add <team> --self | <email>',\n ' [--role <role>] (a member now, no email: you, or someone with',\n ' an Ekanos account on the Source) | members invite <team> <email>',\n ' [--role <role>] (default member; sends the invitation email) |',\n ' members role <team> <email> <role> | members remove <team>',\n ' <email> --yes | members resend <team> <email> (a live',\n ' invitation is resent, an expired one renewed) |',\n \" roles list <team> (each role's permissions) |\",\n ' leave <team> [--yes] (you leave it; never the primary owner) |',\n \" groups list <team> (the team's own groups, the predefined groups of\",\n \" its business type and Everyone, each picking within the team's\",\n ' audience) | groups create <team> <name> [--description',\n ' <text>] [--products <slug,slug>] | groups update <team> <group>',\n ' [--name <name>] [--description <text>] [--products <slug,…>|none]',\n ' | groups delete <team> <group> [--yes] | groups members',\n ' add|remove <team> <group> <email> (leave, groups delete and',\n ' remove ask first; a script or agent run needs --yes) |',\n ' health <team> [<product>] [--run] (each connected integration',\n ' and its health; --run checks one now; <product> --mine: your own',\n ' personal connection, any seat, as a member) | workspace list <team> |',\n ' workspace default <team> <workspace> (where the team lands) |',\n ' connect <team> <product> [--connection <id>] [--as',\n ' <member-email>] [--set <field>=<value>]… [--no-wait] [--no-open]',\n ' [--link-only] [--reconnect] (connects',\n \" it: asks the form's fields at your terminal or takes them from\",\n ' --set (a list as a,b; secrets and JSON only at a prompt; an optional',\n ' one can be skipped), then opens the sign-in for you — your own',\n ' connection, for a personal product — or the member --as names, and waits;',\n \" --connection agent installs the team's Linear agent (its own\",\n ' Linear app, as a member), which @mention and assign triggers',\n \" need; --link-only prints the team's page; --reconnect connects\",\n ' it again when it reads as connected but is broken: a revoked or',\n ' expired sign-in) |',\n ' connect <team> slack|linear-app [--as <member-email>] (installs',\n ' Slack, or the Ekanos Agents app for Linear, which slack and',\n ' linear triggers answer through; same link-and-wait) |',\n \" disconnect <team> <product> --yes (takes the team's connection\",\n \" and its tokens down; its own app's saved fields stay; --mine:\",\n \" your own personal connection, never another member's) |\",\n ' list | show <team> (one screen: members, each integration and',\n ' whose connection it is, each agent live or the next step) |',\n ' show <team> <product> (a checklist: fields, callback',\n ' URLs, webhooks, connect link) | app set <team> <product>',\n ' [--connection <id>] [--field <name>]… [--set <name>=<value>]…',\n ' [--clear <name>]… [--set-secret <name>=env:<NAME>|file:<path>|stdin]…',\n ' [--browser] (any one field at a time; a field you skip keeps',\n ' its saved value; a secret at your terminal, from the',\n ' environment, a private file, stdin or a browser form, never',\n ' as an argument) |',\n ' llm-key show <team> | llm-key set <team> [--secret-env <NAME> |',\n ' --secret-file <path> | --secret-stdin | --browser] | llm-key',\n \" remove <team> --yes (the team's own Anthropic key, as its\",\n ' settings page sets it; show gives only its last four characters) |',\n ' webhook <team> <product> [<webhook-id>] [--yes] (URL saved to a 0600 file under ~/.ekanos/secrets, never printed) |',\n ' events <team> [<product>] [--product <slug>] [--since 24h|7d|<date>]',\n ' [--limit <n>] (the integration events recorded for the team, each',\n ' with its status, last error and the runs it started, or why none did)',\n ' | audience <team> [<audience>] [--member <email>] [--yes]',\n \" (the team's audience, its business type, which every member is on;\",\n ' their groups narrow it; moving people to an audience that shows',\n \" less needs --yes; --member reads one person's, and setting it\",\n ' (or --inherit) is deprecated: hosts on audiences refuse it)',\n ' | scope show <team> (DEPRECATED, use audience: the product scopes it holds and the products',\n ' it sees in the app) | scope set <team> <scope> [<scope>…] [--yes]',\n ' (replaces them; dropping one needs --yes)',\n \" A team's agents, for the Source admin (teams <area> <verb> <team> …):\",\n ' agents list <team> | agents show <team> <key> (is it live, and if',\n ' not, why: each connection and whose it is, each trigger and how its',\n ' events arrive, last event and run, one Next command)',\n ' | agents create <team> --from <dir|agent.json> [--personal]',\n \" [--confirm-access] [--no-skills] (the team's own agent, or with\",\n ' --personal your own, from the agent.json \"agents apply\" reads;',\n ' you become its creator, so you must be an active member of the',\n ' team; it starts as a draft) | agents apply <team> <dir|agent.json>',\n ' [--personal] [--base-version <n>] [--overwrite] [--confirm-access]',\n ' (creates it, or changes it from the same file; a personal agent',\n \" is its creator's alone to change)\",\n ' | agents enable <team> <key> [--as <member-email>]',\n ' [--draft] [--confirm-access] (--confirm-access: you also confirm',\n ' what it may use) | agents confirm <team> <key> (you confirm what',\n ' it may use, as yourself: whoever sets an agent up confirms it, never',\n ' a team member) | agents disable <team> <key> --yes | agents',\n ' archive <team> <key> [--yes] (off the list; runs and setup kept) |',\n ' agents unarchive <team> <key> (back, paused) | agents',\n ' unpin <team> <key> | agents pin <team> <key> <version> | agents pin',\n ' <team> <key> --draft (this team only runs the unpublished draft, by',\n ' hand, every write waiting; the next publish puts it back to',\n ' following)',\n ' | agents policy <team> <key> [set <tool> auto|approve | unset <tool>]',\n ' [--reads auto|approve] [--writes auto|approve] [--confirm-access]',\n ' | agents skills <team> <key> [add|remove <skill>] (where the',\n ' template allows team skills; its own skills stay)',\n ' | agents tags <team> <key> [add|remove <tag>] (labels that grant',\n ' nothing; a tag the team lacks is made)',\n ' triggers list|add|remove <team> <key> … (add … schedule --cron',\n ' <expr> [--timezone <zone>] --prompt <text> | add … webhook --prompt',\n ' <text> (its token saved to a 0600 file, never printed; a personal',\n \" agent's webhook acts as its creator) | add … event <id>\",\n \" [--filter field=a,b]… or --filter '<json>'; remove <trigger-id|key> --yes;\",\n ' add … slack --channel',\n ' <#name|id>… [--dms] --yes | add … linear [--label <name>]…',\n ' [--no-mention], once installed with teams connect) | triggers',\n \" rotate <team> <key> <trigger-key|id> [--yes] (a webhook trigger's\",\n ' new token, the old one revoked; saved to a 0600 file, never printed)',\n ' | triggers enable|disable <team> <key> <trigger-id|key> (disable',\n ' asks first, --yes in a script) | triggers edit <team> <key>',\n ' <trigger-id|key> [--prompt …] [--cron … --timezone …] [--filter …]',\n ' [--channel …] [--dms|--no-dms] [--label …] [--mention|--no-mention]',\n ' (in place: a webhook keeps its URL and token) | links list|add|remove',\n ' <team> <from-key> [<to-key> --kind talk|delegate --mode await|handoff]',\n ' (remove <link-id|to-key> [--kind <kind>] --yes)',\n ' | mcp list|add|status|token|effect|refresh|remove <team> [<server-key> …]',\n ' (remove needs --yes; refresh <team> --agent <key>: every server it',\n ' has) | mcp attach|detach <team> <server-key> <agent-key> (detach',\n ' asks first, --yes in a script; where the template allows)',\n ' Every area also takes the team as --team <slug>.',\n ' (\"ekanos teams --help\" spells out each area)',\n ' names Global package names (a restricted package is named under your',\n ' Source namespace, e.g. acme/google-drive):',\n ' claim <slug> [--reason <text>] | status <slug>',\n ' reviewers Who decides agent reply drafts, for the Source admin:',\n ' list | add <email> --reach source|team [--team <slug>] |',\n ' remove <email> [--team <slug>] --yes',\n \" routes Route a Source connection's events to teams, for the Source admin:\",\n ' list [<product>] | options <product> | set <product> <value> <team>',\n ' [--label <name>] | remove <product> <value> --yes | webhook',\n ' <product> [--webhook <id>] [--yes] (URL saved to a 0600 file, never printed; --yes',\n ' replaces a live one, revoking it) | unrouted [<product>] |',\n ' replay <event-id>',\n \" agents The source's agent templates, held by Ekanos:\",\n ' init [<dir>] [--claude|--no-claude] (skills + docs MCP for designing',\n ' agents with Claude; offers to add the docs to Claude Code)',\n ' list [--all] (--all: archived agents too) | show <key> |',\n ' pull <key> [--out <dir>] [--force] (--force: overwrite local',\n ' files that differ; without it the pull refuses and writes nothing)',\n ' apply <dir|file> [--base-version <n>] [--overwrite]',\n ' archive <key> --yes (refused while any team has it on; lists',\n ' each team and the command to turn it off) | unarchive <key>',\n ' publish <key> [--to <n>] [--confirm-access] --yes | rollback <key>',\n ' --to <n> [--confirm-access] --yes (every following team moves; one',\n ' that had confirmed stays confirmed, in your name: your publish is the',\n ' confirmation; --confirm-access: you also confirm every team on that',\n ' version not yet confirmed; the output lists teams pinned elsewhere)',\n ' test <key> --team <slug> (--prompt \"…\" | --input <file.json>)',\n ' [--follow] (runs the latest, unpublished version on one team;',\n ' same grant, policy, approvals and audit; marked as a test; to',\n ' test a tool the draft adds, first \"teams agents pin <team> <key>',\n ' --draft\", which also works before anything is published)',\n ' apply also pushes <dir>/skills/<slug>/ folders first and names',\n ' them in the agent (--no-skills skips that)',\n ' Edit one template in place (stores a draft version; --publish',\n ' also rolls it out, with --yes):',\n ' policy <key> [set <tool> auto|approve | unset <tool>]',\n ' [--reads auto|approve] [--writes auto|approve]',\n ' triggers <key> [list | add event <k> --event <slug.event>',\n \" [--filter field=a,b]... (or one --filter '<json>') | add\",\n ' schedule <k> --cron \"<expr>\"',\n ' [--timezone <tz>] --prompt <text> | add webhook <k> --prompt',\n ' <text> | remove <k>] [--prompt <text>] [--disabled]',\n ' links <key> [list | add <to-key> --kind talk|delegate',\n ' [--mode await|handoff] | remove <to-key> [--kind <kind>]]',\n ' overrides <key> [enable|disable policy|triggers|links]',\n ' (off: teams follow the template exactly; on: teams keep',\n ' their own differences)',\n \" skills The source's skills (SKILL.md folders), held by Ekanos:\",\n ' list [--team <t>] | show <slug> [--team <t>] |',\n ' push <dir> [--team <t>] (a new version, live at once; created',\n ' on first push, \"unchanged\" when identical; --team: that team\\'s',\n ' own skill, no other team sees it) | pull <slug> [--out <dir>]',\n ' [--force] (refuses to overwrite a local file that differs)',\n ' | archive <slug> [--team <t>] --yes (refused while an agent',\n ' names it or a team agent has it attached; lists each and the',\n ' command that stops it) | unarchive <slug> [--team <t>]',\n \" knowledge The Source's Knowledge base (markdown articles), for the Source admin:\",\n ' list [--team <t>] | push <dir> [--team <t>] (each .md file an',\n ' article: title from frontmatter or the first heading, tags from',\n ' frontmatter; upserts by path, \"unchanged\" when identical;',\n ' --prune [--yes] also deletes the articles an earlier push of',\n ' this folder made whose files are gone, never ones written or',\n ' edited in the app) |',\n \" search <query> --team <t> (as that team's agents search: its\",\n ' articles plus General) | pull [--team <t>] [--out <dir>]',\n ' [--force] (refuses to overwrite a local file that differs)',\n \" Without --team: General, which every team's agents granted\",\n ' search_knowledge read.',\n \" runs Run and inspect a team's agents, as the Source admin:\",\n ' start <agent-key> --team <slug> (--prompt \"…\" | --input',\n ' <file.json>) [--follow] | list --team <slug> [--agent <key>]',\n ' [--status <status>] [--since 24h|7d|<date>] |',\n ' show <run-id> --team <slug> (--json: transcript, tool calls,',\n ' how each was authorized, approvals) | cancel <run-id> --team',\n ' <slug> [--yes] (stops a live run; asks first, --yes in a script)',\n \" approvals What a team's agent runs wait on: list --team <slug> |\",\n ' approve|reject <id> --team <slug> [--reason \"…\"] |',\n ' edit <id> --team <slug> --body <file> (edit & send a reply draft)',\n ' The Source admin sees all; any other seat holder only what they',\n \" may decide (managing or reviewing the team's agents, a named\",\n \" reviewer, a personal agent's creator). The first decision wins.\",\n \" workflows A team's workflows, for the Source admin (each takes --team <slug>;\",\n ' a workflow is named by its id or its name):',\n ' list [--all] | show <workflow> (status, trigger, Custom Code review',\n ' state, recent runs; --json: the definition) | pull <workflow>',\n ' [--out <dir>] [--force] (writes workflow.json, the JSON the editor',\n ' saves) | apply <file|dir> [--update <workflow>] (a new draft, or',\n \" that workflow's definition replaced; the editor's checks: shape,\",\n ' tool effects, Custom Code security review, approval gates before',\n ' writes) | enable <workflow> [--confirm-access] (activation re-checks',\n ' it; Custom Code that writes or reaches a host needs your approval,',\n ' asked at a terminal) | disable <workflow> | run <workflow>',\n ' [--dry-run [--input <file.json>]] [--follow] (a live run needs it',\n ' on; --dry-run records writes instead of sending them) |',\n ' runs list [--workflow <workflow>] [--status <status>] | runs show',\n ' <run-id> | runs cancel <run-id> [--yes] | approvals list |',\n ' approvals approve|reject <id> [--reason \"…\"]',\n ' use Set this project\\'s publish target (\"ekanos use <source-slug>\")',\n ' publish Validate, pack and submit the integration to an Ekanos host.',\n ' In a repo: publish [<package>...] | --all [--dry-run] (integrations',\n ' first, each package gated, artifacts under .ekanos/publish/)',\n ' upgrade Move this toolchain to a coherent target version, with',\n ' verify-and-rollback (--check --yes --no-verify --host <url>)',\n '',\n 'Keeping the toolchain current:',\n ' validate, dev and publish all check for a newer @ekanos/cli in the',\n ' background (never blocking, silenced by EKANOS_NO_UPDATE_CHECK) and warn',\n ' on stderr when one exists. Run \"ekanos upgrade --check\" any time a',\n ' validate finding smells like version skew (an unrecognized-key error you',\n ' are confident is correct) — it is read-only and safe to run freely. A',\n ' bare \"ekanos upgrade\" MUTATES the project (installs the target versions,',\n ' verifies with validate + the test script, rolls back on any failure).',\n '',\n 'Host resolution (logout, whoami, status, sources, catalog, apps, teams, names, reviewers, routes, agents, skills, knowledge, runs, approvals, workflows, use, publish, upgrade):',\n ' --host, else EKANOS_HOST, else the \"host\" field in ekanos.json, else the',\n ' sole stored login. \"ekanos publish\" saves host and source to ekanos.json.',\n ' \"ekanos login\" never reads ekanos.json for a host (--host, else',\n ' EKANOS_HOST, else the sole stored login) — it is the verb that creates',\n ' credentials, so a committed file must never choose where they go. A',\n ' host you have never logged in to is shown with its sign-in domain and',\n ' asked about first (--trust-host when nobody can be asked). A remote',\n ' http:// host is refused by every verb that sends credentials.',\n '',\n 'Publish targeting (see \"ekanos sources\" / \"ekanos use\"):',\n ' publish refuses (FORBIDDEN) a source you hold no seat on. With multiple',\n ' seats and an implicit (ekanos.json) source, a human run asks to confirm',\n ' the target; a scripted/JSON run needs --source or --yes to proceed —',\n ' it never prompts and never guesses.',\n '',\n 'Global options:',\n ' --json Emit a single JSON envelope on stdout (auto-on when piped);',\n ' --no-json forces the human-readable form',\n ' --version Print the CLI version',\n ' --help Show this help',\n].join('\\n');\n\nexport interface RunOptions {\n stdout?: WriteStream;\n stderr?: WriteStream;\n env?: Record<string, string | undefined>;\n cwd?: string;\n /**\n * How this run was invoked, for the commands hints name (`invocation.ts`).\n * Detected from `env` and the script path when absent.\n */\n invocation?: Invocation;\n /**\n * Test-only override for `publish`'s interactive-confirm gate and `init`\n * / `login`'s clack wizard gate (`canWizard` in `wizard.ts`) — see\n * `PublishArgs` in `commands/publish.ts`. Never set this from real CLI\n * wiring; it exists so a test can exercise the human y/N confirm branch or\n * the wizard flow without a real terminal.\n */\n stdinIsTTY?: boolean;\n confirm?: (question: string) => Promise<boolean>;\n /** Test-only answers for `apps set` / `teams app set` questions — never set from real CLI wiring. */\n ask?: (question: string) => Promise<string>;\n askSecret?: (question: string) => Promise<string>;\n /**\n * Test-only seams for `teams connect`: the browser opener and the wait\n * between its polls. Never set from real CLI wiring.\n */\n openUrl?: (url: string) => void;\n pollDelayMs?: number;\n /**\n * Test-only seams for the secret-input flags (`secret-input.ts`): what\n * `--secret-stdin` reads, and how long a `--browser` form waits. The\n * opener above also opens the form. Never set from real CLI wiring.\n */\n readStdin?: () => Promise<string>;\n secretFormTimeoutMs?: number;\n /**\n * Test-only override for `status --watch`'s poll delay — see `StatusArgs`\n * in `commands/status.ts`. Never set this from real CLI wiring; it exists\n * so a test can exercise the poll loop without waiting 30s per iteration.\n */\n sleep?: (ms: number) => Promise<void>;\n /**\n * Test-only override for `status`'s AGE column (\"now\") — see `StatusArgs`\n * in `commands/status.ts`. Never set this from real CLI wiring; it exists\n * so a test can assert an exact `relativeTime` string deterministically.\n */\n now?: Date;\n}\n\n/**\n * The single entry point. Resolves the agent-native envelope once, dispatches\n * to a verb, and guarantees exactly one terminal emission (success or error).\n * Returns the process exit code — `bin.ts` is the only place that calls\n * `process.exit`, so this stays fully testable.\n */\nexport async function run(\n argv: readonly string[],\n options: RunOptions = {},\n): Promise<number> {\n const jsonFlag = scanJsonFlag(argv);\n setInvocation(\n options.invocation ?? detectInvocation(options.env ?? process.env),\n COMMANDS,\n );\n const ctx = new CliContext({\n jsonFlag,\n stdout: options.stdout,\n stderr: options.stderr,\n env: options.env,\n });\n const cwd = options.cwd ?? process.cwd();\n const env = options.env ?? process.env;\n\n try {\n // `--version` is global and verb-independent, so it is answered before the\n // command is even resolved: `ekanos --version` and `ekanos validate\n // --version` both report the tool's version and exit 0.\n if (scanFlagPresence(argv, 'version')) {\n return emitVersion(ctx);\n }\n\n const { command, rest } = splitCommand(argv);\n\n // Top-level help / no command.\n if (!command) {\n if (scanFlagPresence(rest, 'help') || argv.length === 0) {\n return emitHelp(ctx);\n }\n // A leading token that is not a command (e.g. `--nonsense`).\n ctx.emitClaudeCodeHint({\n tool: 'ekanos',\n error: 'unknown-command',\n commands: COMMANDS,\n help: 'ekanos --help',\n });\n throw usageError(\n `Unknown command or flag \"${argv[0]}\".`,\n `Run one of: ${COMMANDS.join(', ')}. See \"ekanos --help\".`,\n );\n }\n\n if (!COMMANDS.includes(command)) {\n const unknown = unknownCommand(command, rest, COMMANDS);\n ctx.emitClaudeCodeHint({\n tool: 'ekanos',\n error: 'unknown-command',\n given: command,\n ...(unknown.suggestion ? { suggestion: unknown.suggestion } : {}),\n commands: COMMANDS,\n help: 'ekanos --help',\n });\n throw unknown.error;\n }\n\n const specs: FlagSpecs = { ...GLOBAL_SPECS, ...COMMAND_SPECS[command] };\n const parsed = parseArgv(rest, specs);\n\n if (parsed.flags.help === true) {\n return emitCommandHelp(ctx, command);\n }\n\n const positionalNames = POSITIONAL_COMMANDS[command] ?? [];\n\n if (positionalNames.length === 0 && parsed.positionals.length > 0) {\n throw usageError(\n `\"${command}\" takes no positional arguments (got \"${parsed.positionals[0]}\").`,\n `Pass options as flags, e.g. \"--dir <path>\". See \"ekanos ${command} --help\".`,\n );\n }\n\n if (\n parsed.positionals.length > positionalNames.length &&\n !VARIADIC_COMMANDS.has(command)\n ) {\n const usage = positionalNames.map((name) => `<${name}>`).join(' ');\n throw usageError(\n `\"${command}\" takes at most ${positionalNames.length} positional ` +\n `argument${positionalNames.length === 1 ? '' : 's'} (${usage}), ` +\n `got ${parsed.positionals.length}.`,\n `e.g. \"ekanos ${command} ${usage}\". See \"ekanos ${command} --help\".`,\n );\n }\n\n const dir = (parsed.flags.dir as string | undefined) ?? cwd;\n\n if (REPO_ROOT_REFUSED.has(command) && isRepoRoot(path.resolve(dir))) {\n throw preconditionError(\n `\"${command}\" works on one package, and ${dir} is a repo root.`,\n `Run it inside a package (cd integrations/<slug> or cd experiences/<slug>), or use \"ekanos publish --all\" for the whole repo.`,\n );\n }\n\n switch (command) {\n case 'init':\n return await runInit(ctx, {\n slug: parsed.flags.slug as string | undefined,\n dir: parsed.flags.dir as string | undefined,\n cwd,\n force: parsed.flags.force === true,\n yes: parsed.flags.yes === true,\n docs: parsed.flags.docs as string[] | undefined,\n kind: parsed.flags.kind as string | undefined,\n stdinIsTTY: options.stdinIsTTY,\n });\n case 'validate':\n return await runValidate(ctx, { dir, env });\n case 'dev':\n return await runDev(ctx, {\n dir,\n port: parsed.flags.port as string | undefined,\n host: parsed.flags.host as string | undefined,\n force: parsed.flags.force === true,\n start: parsed.flags.start as boolean | undefined,\n contractsDir: parsed.flags['contracts-dir'] as string | undefined,\n env,\n });\n case 'test':\n return await runTest(ctx, {\n dir,\n passthrough: parsed.passthrough,\n raw: parsed.flags.raw === true,\n });\n case 'login':\n return await runLogin(ctx, {\n host: parsed.flags.host as string | undefined,\n force: parsed.flags.force === true,\n claude: parsed.flags.claude as boolean | undefined,\n trustHost: parsed.flags['trust-host'] === true,\n confirmHost: options.confirm,\n cwd,\n env,\n stdinIsTTY: options.stdinIsTTY,\n });\n case 'logout':\n return await runLogout(ctx, {\n host: parsed.flags.host as string | undefined,\n all: parsed.flags.all === true,\n cwd,\n env,\n });\n case 'whoami':\n return await runWhoami(ctx, {\n host: parsed.flags.host as string | undefined,\n cwd,\n env,\n });\n case 'status':\n return await runStatus(ctx, {\n host: parsed.flags.host as string | undefined,\n dir,\n env,\n findings: parsed.flags.findings === true,\n all: parsed.flags.all === true,\n watch: parsed.flags.watch === true,\n sleep: options.sleep,\n now: options.now,\n });\n case 'sources':\n return await runSources(ctx, {\n host: parsed.flags.host as string | undefined,\n positionals: parsed.positionals,\n source: parsed.flags.source as string | undefined,\n yes: parsed.flags.yes === true,\n flags: parsed.flags,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n ask: options.ask,\n });\n case 'audiences':\n return await runAudiences(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n yes: parsed.flags.yes === true,\n flags: parsed.flags,\n dir,\n env,\n });\n case 'catalog':\n return await runCatalog(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n product: parsed.positionals[0],\n dir,\n env,\n });\n case 'apps':\n return await runApps(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n product: parsed.positionals[1],\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n ask: options.ask,\n askSecret: options.askSecret,\n confirm: options.confirm,\n noWait: parsed.flags['no-wait'] === true,\n yes: parsed.flags.yes === true,\n flags: parsed.flags,\n readStdin: options.readStdin,\n openUrl: options.openUrl,\n secretFormTimeoutMs: options.secretFormTimeoutMs,\n });\n case 'teams':\n return await runTeams(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n connection: parsed.flags.connection as string | undefined,\n slug: parsed.flags.slug as string | undefined,\n owner: parsed.flags.owner as string | undefined,\n role: parsed.flags.role as string | undefined,\n yes: parsed.flags.yes === true,\n noWait: parsed.flags['no-wait'] === true,\n noOpen: parsed.flags.open === false,\n linkOnly: parsed.flags['link-only'] === true,\n reconnect: parsed.flags.reconnect === true,\n flags: parsed.flags,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n ask: options.ask,\n askSecret: options.askSecret,\n openUrl: options.openUrl,\n pollDelayMs: options.pollDelayMs,\n readStdin: options.readStdin,\n secretFormTimeoutMs: options.secretFormTimeoutMs,\n });\n case 'names':\n return await runNames(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n reason: parsed.flags.reason as string | undefined,\n dir,\n env,\n });\n case 'reviewers':\n return await runReviewers(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n reach: parsed.flags.reach as string | undefined,\n team: parsed.flags.team as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n });\n case 'routes':\n return await runRoutes(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n label: parsed.flags.label as string | undefined,\n webhook: parsed.flags.webhook as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n });\n case 'agents':\n return await runAgents(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n target: parsed.positionals[1],\n to: parsed.flags.to as string | undefined,\n baseVersion: parsed.flags['base-version'] as string | undefined,\n overwrite: parsed.flags.overwrite === true,\n out: parsed.flags.out as string | undefined,\n yes: parsed.flags.yes === true,\n all: parsed.flags.all === true,\n force: parsed.flags.force === true,\n claude: parsed.flags.claude as boolean | undefined,\n skills: parsed.flags.skills as boolean | undefined,\n rest: parsed.positionals.slice(2),\n event: parsed.flags.event as string | undefined,\n filter: parsed.flags.filter as string[] | undefined,\n disabled: parsed.flags.disabled === true,\n cron: parsed.flags.cron as string | undefined,\n timezone: parsed.flags.timezone as string | undefined,\n kind: parsed.flags.kind as string | undefined,\n mode: parsed.flags.mode as string | undefined,\n reads: parsed.flags.reads as string | undefined,\n writes: parsed.flags.writes as string | undefined,\n publish: parsed.flags.publish === true,\n confirmAccess: parsed.flags['confirm-access'] === true,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n team: parsed.flags.team as string | undefined,\n prompt: parsed.flags.prompt as string | undefined,\n input: parsed.flags.input as string | undefined,\n follow: parsed.flags.follow === true,\n });\n case 'runs':\n case 'approvals':\n return await (command === 'runs' ? runRuns : runApprovals)(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n team: parsed.flags.team as string | undefined,\n agent: parsed.flags.agent as string | undefined,\n status: parsed.flags.status as string | undefined,\n since: parsed.flags.since as string | undefined,\n prompt: parsed.flags.prompt as string | undefined,\n input: parsed.flags.input as string | undefined,\n follow: parsed.flags.follow === true,\n reason: parsed.flags.reason as string | undefined,\n body: parsed.flags.body as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n sleep: options.sleep,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'skills':\n return await runSkills(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n target: parsed.positionals[1],\n team: parsed.flags.team as string | undefined,\n out: parsed.flags.out as string | undefined,\n force: parsed.flags.force === true,\n yes: parsed.flags.yes === true,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'knowledge':\n return await runKnowledge(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n target: parsed.positionals[1],\n team: parsed.flags.team as string | undefined,\n out: parsed.flags.out as string | undefined,\n force: parsed.flags.force === true,\n prune: parsed.flags.prune === true,\n yes: parsed.flags.yes === true,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'workflows':\n return await runWorkflows(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n team: parsed.flags.team as string | undefined,\n all: parsed.flags.all === true,\n out: parsed.flags.out as string | undefined,\n force: parsed.flags.force === true,\n update: parsed.flags.update as string | undefined,\n confirmAccess: parsed.flags['confirm-access'] === true,\n dryRun: parsed.flags['dry-run'] === true,\n input: parsed.flags.input as string | undefined,\n follow: parsed.flags.follow === true,\n workflow: parsed.flags.workflow as string | undefined,\n status: parsed.flags.status as string | undefined,\n reason: parsed.flags.reason as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n sleep: options.sleep,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'use':\n return await runUse(ctx, {\n host: parsed.flags.host as string | undefined,\n dir,\n slug: parsed.positionals[0],\n env,\n });\n case 'publish':\n return await runPublish(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n dir,\n yes: parsed.flags.yes === true,\n dryRun: parsed.flags['dry-run'] === true,\n packages: parsed.positionals,\n all: parsed.flags.all === true,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'upgrade':\n return await runUpgrade(ctx, {\n dir,\n host: parsed.flags.host as string | undefined,\n env,\n check: parsed.flags.check === true,\n yes: parsed.flags.yes === true,\n noVerify: parsed.flags.verify === false,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n default: {\n const experienceCommand = EXPERIENCE_COMMANDS.find(\n (candidate) => candidate.name === command,\n );\n if (experienceCommand) {\n return await experienceCommand.run(ctx, {\n flags: parsed.flags,\n positionals: parsed.positionals,\n passthrough: parsed.passthrough,\n dir,\n cwd,\n env,\n });\n }\n // Unreachable — COMMANDS gate above — but keeps the switch total.\n throw usageError(\n `Unknown command \"${command}\".`,\n `Run one of: ${COMMANDS.join(', ')}.`,\n );\n }\n }\n } catch (error) {\n return ctx.fail(toCliError(error));\n }\n}\n\n/**\n * Presence of `--json` (or `--no-json`) BEFORE the first `--` passthrough.\n *\n * Tri-state on purpose. `undefined` means \"the user expressed no preference\",\n * which is what lets the context fall back to inferring the mode from a\n * non-TTY stdout or CLAUDECODE. Collapsing `--no-json` to `false` here would\n * make it indistinguishable from absence, and the flag could then never turn\n * JSON mode OFF in exactly the cases it exists for.\n */\nfunction scanJsonFlag(argv: readonly string[]): boolean | undefined {\n for (const token of argv) {\n if (token === '--') break;\n if (token === '--json') return true;\n if (token === '--no-json') return false;\n }\n return undefined;\n}\n\nfunction scanFlagPresence(argv: readonly string[], name: string): boolean {\n for (const token of argv) {\n if (token === '--') break;\n if (token === `--${name}`) return true;\n }\n return false;\n}\n\n/**\n * Split argv into the command (first bare token before `--`) and the rest\n * (everything else, order preserved, including global flags and the `--`\n * passthrough). Global flags are all booleans, so any bare token is the\n * command — no value-consumption ambiguity.\n */\nfunction splitCommand(argv: readonly string[]): {\n command: string | null;\n rest: string[];\n} {\n for (let i = 0; i < argv.length; i++) {\n const token = argv[i]!;\n if (token === '--') break;\n if (!token.startsWith('-')) {\n return {\n command: token,\n rest: [...argv.slice(0, i), ...argv.slice(i + 1)],\n };\n }\n }\n return { command: null, rest: [...argv] };\n}\n\n/**\n * The CLI's own version, read from the package manifest at runtime rather than\n * baked in by the build — one source of truth, so a release bump cannot leave\n * `--version` reporting a stale number. The path resolves identically from\n * `src/index.ts` and from the emitted `dist/index.js`, both of which sit one\n * directory below the package root.\n */\nfunction readVersion(): string {\n const manifest = new URL('../package.json', import.meta.url);\n const parsed: unknown = JSON.parse(fs.readFileSync(manifest, 'utf8'));\n\n return typeof parsed === 'object' &&\n parsed !== null &&\n 'version' in parsed &&\n typeof parsed.version === 'string'\n ? parsed.version\n : '0.0.0';\n}\n\nfunction emitVersion(ctx: CliContext): number {\n const version = readVersion();\n\n return ctx.succeed({ name: 'ekanos', version }, version);\n}\n\nconst DOCS_FOOTER = `\\nDocs: ${SDK_DOCS_URL} (commands: ${docsPage('cli/commands')})`;\n\nfunction emitHelp(ctx: CliContext): number {\n // Short on purpose: the command list and where each command's usage is.\n // The full usage is already the result, and a hint line is not a manual.\n ctx.emitClaudeCodeHint({\n tool: 'ekanos',\n commands: COMMANDS,\n help: 'ekanos <command> --help',\n });\n return ctx.succeed(\n { usage: USAGE, commands: COMMANDS, docs: SDK_DOCS_URL },\n `${USAGE}${DOCS_FOOTER}`,\n );\n}\n\n/** The per-area usage a command's own parser already gives, shown in its help too. */\nconst COMMAND_DETAILS: Record<string, () => string[]> = {\n teams: () => TEAM_AGENT_AREAS.map(usageFor),\n agents: () =>\n Object.entries(TEMPLATE_EDIT_HELP).map(\n ([area, examples]) => `${area}: ${examples}`,\n ),\n};\n\n/** A command's block of the top-level usage: its line and the indented ones under it. */\nfunction commandUsage(command: string): string {\n const lines = USAGE.split('\\n');\n const start = lines.findIndex((line) => line.startsWith(` ${command} `));\n if (start === -1) return '';\n const end = lines.findIndex(\n (line, index) => index > start && !line.startsWith(' '),\n );\n return lines.slice(start, end === -1 ? undefined : end).join('\\n');\n}\n\nfunction optionLabel(name: string, spec: FlagSpec): string {\n if (spec.type === 'boolean') return `--${name}`;\n return `--${name} <value>${spec.repeatable ? '…' : ''}`;\n}\n\n/**\n * `ekanos <command> --help`: the command's block of the usage (its\n * subcommands, each described), the per-area usage its parser gives, and\n * every flag with its description. The JSON envelope carries the same, so an\n * agent reading it is not left with flag names only.\n */\nfunction emitCommandHelp(ctx: CliContext, command: string): number {\n const specs = COMMAND_SPECS[command] ?? {};\n const flags = Object.keys(specs).map((name) => `--${name}`);\n const usage = commandUsage(command);\n const details = COMMAND_DETAILS[command]?.() ?? [];\n const options = [\n ...Object.entries(specs),\n ...Object.entries(GLOBAL_SPECS),\n ].map(([name, spec]) => ({\n flag: `--${name}`,\n label: optionLabel(name, spec),\n takesValue: spec.type === 'string',\n repeatable: spec.repeatable === true,\n description: spec.description ?? '',\n }));\n const positionals = POSITIONAL_COMMANDS[command] ?? [];\n const synopsis = [\n `ekanos ${command}`,\n positionals.length === 0\n ? ''\n : positionals.length === 1\n ? ` <${positionals[0]}>`\n : ` <${positionals[0]}> …`,\n ' [options]',\n ].join('');\n const docs = docsPage('cli/commands', command);\n const width = Math.min(\n 26,\n Math.max(...options.map((option) => option.label.length)),\n );\n const human = [\n `Usage: ${synopsis}`,\n ...(usage ? ['', usage] : []),\n ...(details.length > 0 ? ['', ...details] : []),\n '',\n 'Options:',\n ...options.map((option) =>\n option.label.length > width\n ? ` ${option.label}\\n ${' '.repeat(width)} ${option.description}`\n : ` ${option.label.padEnd(width)} ${option.description}`,\n ),\n '',\n `Docs: ${docs}`,\n ].join('\\n');\n ctx.emitClaudeCodeHint({ tool: 'ekanos', command, flags, usage });\n return ctx.succeed(\n {\n command,\n flags,\n usage,\n details,\n options: options.map(({ label: _label, ...option }) => option),\n docs,\n },\n human,\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EA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M,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,WAAW,EAAE,CAC7D;QACD,EAAE;QACF,SAAS,IAAI,EAAE;KAChB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,GAAG,CAAC,kBAAkB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,OAAO,GAAG,CAAC,OAAO,CAChB;QACE,OAAO;QACP,KAAK;QACL,KAAK;QACL,OAAO;QACP,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,EAA4B,EAAE,EAAE;gBAAhC,EAAE,KAAK,EAAE,MAAM,OAAa,EAAR,MAAM,cAA1B,SAA4B,CAAF;YAAO,OAAA,MAAM,CAAA;QAAA,CAAC,AAAD,CAAC;QAC9D,IAAI;KACL,EACD,KAAK,CACN,CAAC;AACJ,CAAC","sourcesContent":["import { isRepoRoot } from '@ekanos/integration-schema/repo';\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\n\nimport { runAgents } from './commands/agents';\nimport { TEMPLATE_EDIT_HELP } from './commands/agents-edit';\nimport { runApps } from './commands/apps';\nimport { runAudiences } from './commands/audiences';\nimport { runCatalog } from './commands/catalog';\nimport { runDev } from './commands/dev';\nimport { EXPERIENCE_COMMANDS } from './commands/index-experience';\nimport { runInit } from './commands/init';\nimport { runKnowledge } from './commands/knowledge';\nimport { runLogin } from './commands/login';\nimport { runLogout } from './commands/logout';\nimport { runNames } from './commands/names';\nimport { runPublish } from './commands/publish';\nimport { runReviewers } from './commands/reviewers';\nimport { runRoutes } from './commands/routes';\nimport { runApprovals, runRuns } from './commands/runs';\nimport { runSkills } from './commands/skills';\nimport { runSources } from './commands/sources';\nimport { runStatus } from './commands/status';\nimport { TEAM_AGENT_AREAS, usageFor } from './commands/team-agents';\nimport { runTeams } from './commands/teams';\nimport { runTest } from './commands/test';\nimport { runUpgrade } from './commands/upgrade';\nimport { runUse } from './commands/use';\nimport { runValidate } from './commands/validate';\nimport { runWhoami } from './commands/whoami';\nimport { runWorkflows } from './commands/workflows';\nimport { CliContext, type WriteStream } from './context';\nimport { SDK_DOCS_URL, docsPage } from './docs-links';\nimport { preconditionError, toCliError, usageError } from './errors';\nimport { type Invocation, detectInvocation, setInvocation } from './invocation';\nimport { type FlagSpec, type FlagSpecs, parseArgv } from './parse-argv';\nimport { unknownCommand } from './unknown-command';\n\nexport { CliContext } from './context';\nexport { EXIT_CODES, ERROR_CODES } from './exit-codes';\nexport type { ExitCode, ErrorCode } from './exit-codes';\n\nconst GLOBAL_SPECS: FlagSpecs = {\n json: {\n type: 'boolean',\n description:\n 'One JSON envelope on stdout (on by default when piped or under Claude Code; --no-json forces text)',\n },\n help: { type: 'boolean', description: 'Show help for the command' },\n version: { type: 'boolean', description: 'Print the CLI version' },\n};\n\n/** The flags most commands share, described once. */\nconst HOST: FlagSpec = {\n type: 'string',\n description:\n 'Ekanos host URL (else EKANOS_HOST, the \"host\" in ekanos.json, or the only stored login)',\n};\nconst SOURCE: FlagSpec = {\n type: 'string',\n description:\n 'The Source to act on (else the \"source\" in ekanos.json, or your only seat)',\n};\nconst DIR: FlagSpec = {\n type: 'string',\n description:\n 'Project directory, where ekanos.json and relative paths are read (default: the current one)',\n};\n\n/**\n * Where a secret comes from without a terminal (`secret-input.ts`), for every\n * command that takes one. Never a value: a secret in argv lands in shell\n * history and the process list.\n */\nconst SECRET_INPUT: FlagSpecs = {\n 'secret-env': {\n type: 'string',\n description:\n 'The secret, from this environment variable (its NAME, never the value)',\n },\n 'secret-file': {\n type: 'string',\n description: 'The secret, from this file: yours, mode 600, not a symlink',\n },\n 'secret-stdin': {\n type: 'boolean',\n description: 'The secret, piped in on stdin',\n },\n 'set-secret': {\n type: 'string',\n repeatable: true,\n description:\n 'One field of a form: <field>=env:<NAME> | file:<path> | stdin',\n },\n browser: {\n type: 'boolean',\n description:\n 'Type the secret into a one-time form in your browser on this computer (never shown to the run that asked)',\n },\n};\n\nconst COMMAND_SPECS: Record<string, FlagSpecs> = {\n init: {\n slug: {\n type: 'string',\n description: 'Kebab-case id of the integration, e.g. acme-crm',\n },\n kind: {\n type: 'string',\n description:\n 'What to scaffold: integration (default), experience (widgets and workflows that depend on integrations) or repo (one repo holding many of both)',\n },\n dir: {\n type: 'string',\n description:\n 'Target directory (default ./<slug>; --dir . scaffolds in place)',\n },\n force: {\n type: 'boolean',\n description: 'Overwrite files that already exist',\n },\n yes: {\n type: 'boolean',\n description: 'Accepted for scripts; init never prompts',\n },\n // Repeatable: each occurrence appends one docs entry (URL or relative\n // path) to the scaffolded ekanos.json.\n docs: {\n type: 'string',\n repeatable: true,\n description:\n \"An http(s) URL or project-relative path to the API's docs, written to ekanos.json\",\n },\n },\n validate: {\n dir: DIR,\n },\n dev: {\n dir: DIR,\n port: { type: 'string', description: 'Dev server port (default 3100)' },\n host: {\n type: 'string',\n description:\n 'Interface to bind (default 127.0.0.1; anything else is exposed, with a warning)',\n },\n force: {\n type: 'boolean',\n description: 'Rewrite every generated file even when unchanged',\n },\n start: {\n type: 'boolean',\n description:\n 'Start the server even in JSON mode or under an agent (non-interactive runs only scaffold and print the command); --no-start only scaffolds',\n },\n 'contracts-dir': {\n type: 'string',\n description:\n 'Experiences: a directory of <integration>.contract.json files to resolve integrations from (offline registry)',\n },\n },\n test: {\n dir: DIR,\n // Skips the vitest JSON-reporter injection and the curated failures\n // appendix, reproducing the pre-appendix raw-passthrough behavior —\n // also the escape hatch if the vitest-detection heuristic ever guesses\n // wrong for a project. See `test-report.ts`.\n raw: {\n type: 'boolean',\n description:\n 'Run the test script as is, without the failures appendix and its reporter',\n },\n },\n login: {\n host: {\n type: 'string',\n description:\n 'Ekanos host URL (else EKANOS_HOST, or the only stored login; never ekanos.json)',\n },\n force: {\n type: 'boolean',\n description: 'Sign in again even when the stored session is valid',\n },\n 'trust-host': {\n type: 'boolean',\n description:\n 'Sign in to a host you have never logged in to without being asked',\n },\n claude: {\n type: 'boolean',\n description:\n 'Add the Ekanos docs to Claude Code without asking; --no-claude skips it',\n },\n },\n logout: {\n host: HOST,\n all: { type: 'boolean', description: 'Log out of every stored host' },\n },\n whoami: {\n host: HOST,\n },\n status: {\n host: HOST,\n dir: DIR,\n findings: {\n type: 'boolean',\n description: 'Every finding of each version, not just the counts',\n },\n all: {\n type: 'boolean',\n description:\n \"Expand the Source's other integrations into full version tables\",\n },\n watch: {\n type: 'boolean',\n description:\n \"Wait until this project's current version reaches a gate verdict\",\n },\n },\n sources: {\n host: HOST,\n dir: DIR,\n // `sources products [enable|disable <product>]`.\n source: SOURCE,\n yes: {\n type: 'boolean',\n description: 'Confirm products disable, scopes remove, roles delete',\n },\n // `sources roles create|update`.\n 'display-name': {\n type: 'string',\n description: \"roles create|update: the role's display name\",\n },\n description: {\n type: 'string',\n description: \"roles create|update: the role's description\",\n },\n level: {\n type: 'string',\n description:\n 'roles create|update: its level, 1 to 1000; lower ranks higher (default 100)',\n },\n permission: {\n type: 'string',\n repeatable: true,\n description:\n 'roles create|update: a permission it holds (update: replaces them all)',\n },\n grant: {\n type: 'string',\n repeatable: true,\n description: 'roles update: add this permission',\n },\n revoke: {\n type: 'string',\n repeatable: true,\n description: 'roles update: take this permission away',\n },\n // `sources people`.\n search: {\n type: 'string',\n description: 'people: only those whose name or email matches',\n },\n page: { type: 'string', description: 'people: which page, from 1' },\n },\n audiences: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n yes: {\n type: 'boolean',\n description: 'set: confirm dropping a product people then stop seeing',\n },\n name: { type: 'string', description: 'set: rename the audience' },\n description: {\n type: 'string',\n description: 'create|set: what the audience is for',\n },\n products: {\n type: 'string',\n description:\n 'create|set: the products it shows, as a,b (set: replaces them; none empties it)',\n },\n widgets: {\n type: 'string',\n repeatable: true,\n description:\n 'create|set: <product>=<id>,<id> shows only those widgets of the product (<product>= lifts the rule)',\n },\n tools: {\n type: 'string',\n repeatable: true,\n description:\n 'create|set: <product>=<name>,<name> allows only those tools of the product (<product>= lifts the rule)',\n },\n default: {\n type: 'boolean',\n description: 'create|set: new teams of the Source start on it',\n },\n 'all-entitled': {\n type: 'boolean',\n description:\n 'create|set: show every product the Source has, now and later (--no-all-entitled turns it off)',\n },\n },\n catalog: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n },\n apps: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n 'no-wait': {\n type: 'boolean',\n description: 'connect: print the links and return without waiting',\n },\n yes: {\n type: 'boolean',\n description:\n 'disconnect: confirm without the question (needed in a script or agent run)',\n },\n set: {\n type: 'string',\n repeatable: true,\n description:\n 'set, connect: <name>=<value> for a field that is not a secret (set: clientId)',\n },\n ...SECRET_INPUT,\n },\n teams: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n connection: {\n type: 'string',\n description:\n 'connect, app set: which of the integration\\'s connections (e.g. \"agent\" for Linear\\'s agent)',\n },\n // `teams app set`: which fields to enter, non-secret values, removals.\n field: {\n type: 'string',\n repeatable: true,\n description: 'app set: enter just this field at your terminal',\n },\n set: {\n type: 'string',\n repeatable: true,\n description:\n 'app set, connect: <name>=<value> for a field that is not a secret (a list as a,b)',\n },\n self: {\n type: 'boolean',\n description:\n 'members add: you join the team now, with no invitation email',\n },\n // `teams audience`.\n member: {\n type: 'string',\n description:\n \"audience: one member's audience, by email (setting it is deprecated)\",\n },\n inherit: {\n type: 'boolean',\n description:\n \"audience --member: clear their own audience so the team's applies (deprecated)\",\n },\n // `app set`, `connect`, `mcp token|add`, `llm-key set`.\n ...SECRET_INPUT,\n clear: {\n type: 'string',\n repeatable: true,\n description: \"app set: remove this field's saved value\",\n },\n slug: {\n type: 'string',\n description: \"create: the team's slug (default: from its name)\",\n },\n owner: {\n type: 'string',\n description: 'create: invite this email as the owner instead of you',\n },\n role: {\n type: 'string',\n description:\n 'members add, members invite: the role to give (default member)',\n },\n yes: {\n type: 'boolean',\n description:\n 'Confirm a change that removes, pauses, revokes or opens something up (members remove, leave, groups delete, groups members remove, webhook, disconnect, agents disable|archive, mcp detach, triggers add slack|disable, triggers edit of a slack audience, triggers remove|rotate, links remove, mcp remove, scope set that drops a scope)',\n },\n // `teams agents|triggers|links|mcp` (team-agents.ts).\n as: {\n type: 'string',\n description:\n 'connect: the member who signs in; agents enable: the member the agent runs as (chosen once, when it is turned on)',\n },\n // `teams agents enable|pin … --draft`: test the unpublished draft there.\n draft: {\n type: 'boolean',\n description:\n \"agents enable|pin: put this team alone on the template's unpublished draft\",\n },\n // `teams agents enable|policy|create|apply`: also confirm, as yourself,\n // what the agent may use (whoever sets it up confirms it, plan 247.2).\n 'confirm-access': {\n type: 'boolean',\n description:\n 'agents enable|policy|create|apply: also confirm, as yourself, what it may use',\n },\n // `teams agents create|apply`: the agent.json, read as `agents apply`\n // reads it (team-agents-define.ts).\n from: {\n type: 'string',\n description: 'agents create: the agent directory or agent.json',\n },\n personal: {\n type: 'boolean',\n description:\n 'agents create|apply: your own agent, which acts for you and only you change',\n },\n 'base-version': {\n type: 'string',\n description:\n 'agents apply: the agent version your edit starts from (\"teams agents show\")',\n },\n overwrite: {\n type: 'boolean',\n description: 'agents apply: replace a newer version on the host anyway',\n },\n skills: {\n type: 'boolean',\n description:\n 'agents create|apply: --no-skills skips pushing <dir>/skills/<slug>/ as team skills',\n },\n reads: {\n type: 'string',\n description: 'agents policy: auto|approve for every read tool',\n },\n writes: {\n type: 'string',\n description: 'agents policy: auto|approve for every write tool',\n },\n effect: {\n type: 'string',\n description:\n 'Not read: \"teams mcp effect\" takes the effect as an argument',\n },\n agent: {\n type: 'string',\n description:\n 'mcp refresh: list again the tools of every server this agent has',\n },\n kind: { type: 'string', description: 'links add: talk|delegate' },\n mode: {\n type: 'string',\n description: 'links add: await|handoff, for a delegate link',\n },\n url: { type: 'string', description: \"mcp add: the server's URL\" },\n auth: {\n type: 'string',\n description: 'mcp add: none|token|oauth (default oauth)',\n },\n name: {\n type: 'string',\n description:\n \"mcp add: the server's display name; groups update: the group's new name\",\n },\n // `teams groups create|update`.\n description: {\n type: 'string',\n description: \"groups create|update: the group's description\",\n },\n products: {\n type: 'string',\n description:\n 'groups create|update: the products it narrows to, comma-separated (none: no narrowing)',\n },\n // `teams disconnect|health <team> <product> --mine`: the caller's own.\n mine: {\n type: 'boolean',\n description:\n \"disconnect, health <product>: your own personal connection, never another member's\",\n },\n // `teams health <team> <product> --run`.\n run: {\n type: 'boolean',\n description: \"health: run the integration's health check now\",\n },\n cron: {\n type: 'string',\n description: 'triggers add|edit schedule: a cron expression',\n },\n timezone: {\n type: 'string',\n description:\n 'triggers add|edit schedule: an IANA time zone (default UTC)',\n },\n prompt: {\n type: 'string',\n description: 'triggers add|edit: what the agent is told when it fires',\n },\n // Repeatable `field=value`, or one JSON object — as at the template level.\n filter: {\n type: 'string',\n repeatable: true,\n description:\n 'triggers add|edit event: field=a,b (repeatable) or one JSON object',\n },\n // `teams <area> … --team <slug>`: the team, in place of the positional.\n team: {\n type: 'string',\n description:\n 'The team, in place of the <team> argument (teams <area> … --team <slug>)',\n },\n // `teams triggers add … slack|linear`: where it answers. `--no-mention`\n // is the negation of `mention`.\n channel: {\n type: 'string',\n repeatable: true,\n description:\n 'triggers add|edit slack: a channel it answers in (#name or id); edit replaces the list',\n },\n dms: {\n type: 'boolean',\n description:\n 'triggers add|edit slack: also answer direct messages (edit: --no-dms stops)',\n },\n label: {\n type: 'string',\n repeatable: true,\n description:\n 'triggers add|edit linear: a label that hands an issue to it; edit replaces the list',\n },\n mention: {\n type: 'boolean',\n description:\n 'triggers add|edit linear: --no-mention ignores @mentions (edit: --mention answers them)',\n },\n // `teams connect`: `--no-wait`, `--no-open` (the negation of `open`),\n // `--link-only`.\n 'no-wait': {\n type: 'boolean',\n description: 'connect: print the sign-in link and return at once',\n },\n open: {\n type: 'boolean',\n description:\n 'connect: --no-open prints the link without opening a browser',\n },\n 'link-only': {\n type: 'boolean',\n description: \"connect: print the team's page instead of connecting\",\n },\n // `teams events <team> [--product] [--since] [--limit]`.\n product: {\n type: 'string',\n description: 'events: only this product (or name it after the team)',\n },\n since: {\n type: 'string',\n description: 'events: since 30m, 24h, 7d or a date',\n },\n limit: { type: 'string', description: 'events: how many, 1 to 100' },\n // `teams connect --reconnect`.\n reconnect: {\n type: 'boolean',\n description:\n 'connect: connect again though it reads as connected (revoked or expired)',\n },\n },\n names: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n reason: {\n type: 'string',\n description: 'claim: why the name should be yours',\n },\n },\n reviewers: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n reach: {\n type: 'string',\n description: \"add: source (every team's drafts) or team (one team's)\",\n },\n team: {\n type: 'string',\n description: \"add --reach team, remove: the team's slug\",\n },\n yes: { type: 'boolean', description: 'remove: confirm' },\n },\n routes: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n label: { type: 'string', description: 'set: a name for the value' },\n webhook: {\n type: 'string',\n description: 'webhook: which webhook, when the integration has several',\n },\n yes: {\n type: 'boolean',\n description:\n 'remove: confirm; webhook: replace the live URL, revoking it',\n },\n },\n agents: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n // Not `--version`: that is global, and prints the CLI's own version.\n to: {\n type: 'string',\n description: 'publish, rollback: the version teams run',\n },\n 'base-version': {\n type: 'string',\n description:\n 'apply: the version your edit starts from (refused when the host has moved on)',\n },\n overwrite: {\n type: 'boolean',\n description: 'apply: replace a newer version on the host anyway',\n },\n out: {\n type: 'string',\n description: 'pull: where to write the template (default agents/<key>)',\n },\n yes: {\n type: 'boolean',\n description:\n 'publish, rollback, archive, --publish: confirm (needed in a script or agent run)',\n },\n all: {\n type: 'boolean',\n description: 'list: include archived agents',\n },\n force: {\n type: 'boolean',\n description:\n 'init: replace the skills and CLAUDE.md that exist; pull: overwrite local files that differ',\n },\n claude: {\n type: 'boolean',\n description:\n 'init: add the docs to Claude Code without asking; --no-claude skips it',\n },\n // `agents test <key> --team <slug> --prompt|--input [--follow]`.\n team: { type: 'string', description: 'test: the team to run the draft on' },\n prompt: {\n type: 'string',\n description: 'test: the message; triggers add: what the agent is told',\n },\n input: { type: 'string', description: 'test: a JSON file to run with' },\n follow: {\n type: 'boolean',\n description: 'test: wait for the run and print its result',\n },\n // `apply`: `--no-skills` skips pushing the skill folders beside the agent.\n skills: {\n type: 'boolean',\n description: 'apply: --no-skills skips pushing <dir>/skills/<slug>/',\n },\n // policy | triggers | links | overrides\n event: {\n type: 'string',\n description: 'triggers add event: <product>.<event>',\n },\n filter: {\n type: 'string',\n repeatable: true,\n description: 'triggers add event: field=a,b (repeat for more fields)',\n },\n disabled: {\n type: 'boolean',\n description: 'triggers add: store the trigger turned off',\n },\n cron: {\n type: 'string',\n description: 'triggers add schedule: a cron expression',\n },\n timezone: {\n type: 'string',\n description: 'triggers add schedule: an IANA time zone',\n },\n kind: { type: 'string', description: 'links: talk|delegate' },\n mode: {\n type: 'string',\n description: 'links add: await|handoff, for a delegate link',\n },\n reads: {\n type: 'string',\n description: 'policy: auto|approve for every read tool',\n },\n writes: {\n type: 'string',\n description: 'policy: auto|approve for every write tool',\n },\n publish: {\n type: 'boolean',\n description:\n 'policy, triggers, links, overrides: publish the new version too (with --yes)',\n },\n // `publish | rollback` (and `--publish`): also confirm, as yourself, on\n // every team running the version with no confirmation.\n 'confirm-access': {\n type: 'boolean',\n description:\n 'publish, rollback, --publish: also confirm, as yourself, on every team on that version not yet confirmed',\n },\n },\n skills: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: {\n type: 'string',\n description: \"That team's own skills instead of the Source's\",\n },\n out: {\n type: 'string',\n description: 'pull: where to write the skill folder',\n },\n force: {\n type: 'boolean',\n description: 'pull: overwrite local files that differ from the host',\n },\n yes: {\n type: 'boolean',\n description: 'archive: confirm (needed in a script or agent run)',\n },\n },\n knowledge: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: {\n type: 'string',\n description: \"That team's collection instead of General\",\n },\n out: { type: 'string', description: 'pull: where to write the articles' },\n force: {\n type: 'boolean',\n description: 'pull: overwrite local files that differ from the host',\n },\n prune: {\n type: 'boolean',\n description:\n 'push: also delete the articles an earlier push of this folder made whose files are gone (never ones written or edited in the app)',\n },\n yes: {\n type: 'boolean',\n description:\n 'push --prune: delete without asking (needed in a script or agent run)',\n },\n },\n runs: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: { type: 'string', description: 'The team whose runs these are' },\n agent: { type: 'string', description: \"list: only this agent's runs\" },\n status: {\n type: 'string',\n description:\n 'list: only runs in this status (running, awaiting_approval, completed, failed, cancelled)',\n },\n since: {\n type: 'string',\n description: 'list: only runs started since 30m, 24h, 7d or a date',\n },\n prompt: { type: 'string', description: 'start: the message' },\n input: { type: 'string', description: 'start: a JSON file to run with' },\n follow: {\n type: 'boolean',\n description: 'start: wait for the run and print its result',\n },\n // `runs cancel <run-id> --yes`.\n yes: { type: 'boolean', description: 'cancel: confirm' },\n },\n approvals: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: { type: 'string', description: 'The team whose runs wait on these' },\n reason: { type: 'string', description: 'approve, reject: why' },\n body: {\n type: 'string',\n description: 'edit: a file with the reply to send instead',\n },\n },\n workflows: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n team: { type: 'string', description: 'The team whose workflows these are' },\n all: { type: 'boolean', description: 'list: include archived workflows' },\n out: {\n type: 'string',\n description:\n 'pull: where to write workflow.json (default workflows/<name>)',\n },\n force: {\n type: 'boolean',\n description: 'pull: overwrite a local workflow.json that differs',\n },\n update: {\n type: 'string',\n description:\n 'apply: the workflow (id or name) to replace; without it apply creates a draft',\n },\n 'confirm-access': {\n type: 'boolean',\n description:\n 'enable: approve, as yourself, what its Custom Code reaches (hosts, writes)',\n },\n 'dry-run': {\n type: 'boolean',\n description:\n 'run: rehearse it (writes recorded, not sent; gates pass); a draft may run so',\n },\n input: {\n type: 'string',\n description: 'run --dry-run: a JSON file read as the sample trigger.*',\n },\n follow: {\n type: 'boolean',\n description:\n 'run: wait, printing each step, until it ends or waits on a gate',\n },\n workflow: {\n type: 'string',\n description: \"runs list: only this workflow's runs (id or name)\",\n },\n status: {\n type: 'string',\n description:\n 'runs list: only runs in this status (running, waiting_approval, completed, rejected, failed, canceled)',\n },\n reason: { type: 'string', description: 'approvals reject: why' },\n yes: { type: 'boolean', description: 'runs cancel: confirm' },\n },\n use: {\n host: HOST,\n dir: DIR,\n },\n publish: {\n host: HOST,\n source: SOURCE,\n dir: DIR,\n yes: {\n type: 'boolean',\n description:\n 'Publish to the ekanos.json source without asking (needed in a script with several seats)',\n },\n 'dry-run': {\n type: 'boolean',\n description:\n 'Experiences and repos: gate, build and pack every package under .ekanos/publish/, publish nothing (a real publish needs a host that admits experiences)',\n },\n all: {\n type: 'boolean',\n description: 'In a repo: publish every package',\n },\n },\n upgrade: {\n dir: DIR,\n host: HOST,\n check: {\n type: 'boolean',\n description: 'Report current and target versions; change nothing',\n },\n yes: {\n type: 'boolean',\n description: 'Upgrade without asking (needed outside a terminal)',\n },\n // `--no-verify` is the negation of this — parse-argv's `--no-<bool>`\n // convention (same as `--no-json`/`--no-start`), not a flag of its own.\n verify: {\n type: 'boolean',\n description:\n '--no-verify skips the validate and test run after installing',\n },\n },\n};\n\n/** Commands that take positional arguments, and what each means, in order. Every other command is positional-free. */\nconst POSITIONAL_COMMANDS: Record<string, readonly string[]> = {\n use: ['source-slug'],\n // In a repo: `publish <package>...` (repeatable, see VARIADIC_COMMANDS).\n publish: ['package'],\n // `sources scopes add <scope> <product>` is the longest form.\n sources: ['subcommand', 'verb', 'product-or-scope', 'product-slug'],\n catalog: ['product-slug'],\n audiences: ['subcommand', 'audience'],\n apps: ['subcommand', 'product-slug'],\n // `teams agents policy <team> <key> set <tool> auto` is the longest form.\n teams: [\n 'subcommand',\n 'team-slug',\n 'product-slug',\n 'webhook-id',\n 'role',\n 'arg-6',\n 'arg-7',\n ],\n names: ['subcommand', 'slug'],\n reviewers: ['subcommand', 'email'],\n routes: ['subcommand', 'product-or-event-id', 'value', 'team-slug'],\n skills: ['subcommand', 'slug-or-path'],\n knowledge: ['subcommand', 'path-or-query'],\n runs: ['subcommand', 'agent-key-or-run-id'],\n approvals: ['subcommand', 'approval-id'],\n // `workflows runs show <run-id>` is the longest form.\n workflows: ['subcommand', 'workflow-or-verb', 'id'],\n // `triggers <key> add event <trigger-key>` is the longest form: five tokens.\n agents: ['subcommand', 'key-or-path', 'action', 'arg', 'value'],\n};\n\nfor (const command of EXPERIENCE_COMMANDS) {\n COMMAND_SPECS[command.name] = command.specs;\n if (command.positionals)\n POSITIONAL_COMMANDS[command.name] = command.positionals;\n}\n\n/** Commands that act on one package: refused at a repo root, with the way in. */\nconst REPO_ROOT_REFUSED: ReadonlySet<string> = new Set([\n 'validate',\n 'test',\n 'check',\n 'build',\n 'sync',\n 'add',\n 'codegen',\n 'contract',\n]);\n\n/** Commands whose last positional repeats. */\nconst VARIADIC_COMMANDS: ReadonlySet<string> = new Set(['publish']);\n\nconst COMMANDS = Object.keys(COMMAND_SPECS);\n\nconst USAGE = [\n 'Usage: ekanos <command> [options]',\n '',\n 'Commands:',\n ' init Scaffold a new integration project into ./<slug> (--slug <slug> --yes);',\n ' --kind experience for an experience, --kind repo for a repo of many',\n ...EXPERIENCE_COMMANDS.flatMap((command) => command.usage),\n ' validate Validate ekanos.json + the integration definition (--json)',\n ' dev Scaffold .ekanos/harness and run it with your own Next',\n ' test Run the project test script via its package manager (--json).',\n ' For a vitest test script, also renders a curated failures',\n ' appendix from a JSON reporter report; --raw skips that and',\n ' the reporter injection entirely.',\n ' login Authenticate against an Ekanos host in a browser (--host <url>;',\n ' offers to add the Ekanos docs to Claude Code: --claude|--no-claude;',\n ' a host you have never used asks first, or needs --trust-host)',\n ' logout Revoke and delete the stored session (--host <url> | --all)',\n ' whoami Print the identity the stored session authenticates as, plus',\n ' a compact list of the sources you hold a seat on',\n \" status Show login state and this project's submissions on the host\",\n ' (--findings for full gate findings, --all to expand other',\n ' integrations in the source, --watch to block until this',\n \" project's current version reaches a gate verdict)\",\n ' sources List every source you hold a developer/source-admin seat on |',\n ' products [--source <slug>] (each product, Experience or',\n ' Integration, and whether it is enabled for the Source) |',\n ' products enable <product> | products disable <product> --yes',\n ' (an Ekanos grant: an \"ekanos login\" session is refused',\n ' unless the Source built it) | scopes (each product scope: its',\n ' products and how many teams hold it; a team sees in the app',\n \" only its scopes' products) | scopes add <scope> <product> |\",\n ' scopes remove <scope> <product> --yes | roles [list] (the roles',\n ' every team of the Source hands out, each with its level and',\n ' permissions) | roles create <name> [--display-name <text>]',\n ' [--description <text>] [--level <n>] [--permission <p>]… |',\n ' roles update <role> [--display-name] [--description] [--level]',\n ' [--permission <p>]… (replaces) [--grant <p>]… [--revoke <p>]… |',\n ' roles delete <role> [--yes] (owner, admin and member are system',\n \" roles: never changed or deleted; a held role isn't deleted) |\",\n ' people [--search <text>] [--page <n>] (everyone with access, one',\n ' row per person, with their teams and role on each)',\n \" audiences A source's audiences, for its Source admin (they replace product\",\n ' scopes): list | show <audience> | create <name> [--products a,b |',\n ' --all-entitled] [--description <text>] [--default] [--widgets',\n ' <product>=<id>,…]… [--tools <product>=<name>,…]… | set <audience>',\n ' [--name] [--description] [--default] [--all-entitled] [--products',\n ' a,b|none] [--widgets …]… [--tools …]… [--yes] (--products replaces;',\n ' dropping a product needs --yes). A team is put on one (its',\n ' business type) with \"teams audience <team> [<audience>]\"; its',\n ' groups narrow it per person (\"teams groups\")',\n ' catalog What a source can already use, and how to set it up:',\n ' Experiences, then Integrations; one product shows its tools',\n ' with their inputs and whose connection agent runs use',\n ' (\"ekanos catalog [<product-slug>] --source <slug>\", --json)',\n \" apps The Source's app for an integration teams sign in through:\",\n ' show <product> | set <product> (Source admin; takes the secret',\n ' at your terminal, Enter keeps a saved value; without one,',\n ' --set clientId=<id> and --secret-env <NAME> | --secret-file',\n ' <path> | --secret-stdin | --browser) | connect',\n ' <product> [--no-wait] [--set <field>=<value>]… [--set-secret',\n ' <field>=env:<NAME>|file:<path>|stdin]… [--browser] (one',\n \" connection for the whole Source, used by the Source's provided\",\n ' agents in every team) | disconnect <product> [--yes] (a',\n ' script or agent run needs --yes) | list',\n \" teams A Source's teams, for the Source admin:\",\n ' create <name> [--slug <slug>] [--owner <email>] (you own it',\n ' unless --owner, who is invited as owner) |',\n ' rename <team> <name> (the slug follows the name, as in the app) |',\n ' members list <team> | members add <team> --self | <email>',\n ' [--role <role>] (a member now, no email: you, or someone with',\n ' an Ekanos account on the Source) | members invite <team> <email>',\n ' [--role <role>] (default member; sends the invitation email) |',\n ' members role <team> <email> <role> | members remove <team>',\n ' <email> --yes | members resend <team> <email> (a live',\n ' invitation is resent, an expired one renewed) |',\n \" roles list <team> (each role's permissions) |\",\n ' leave <team> [--yes] (you leave it; never the primary owner) |',\n \" groups list <team> (the team's own groups, the predefined groups of\",\n \" its business type and Everyone, each picking within the team's\",\n ' audience) | groups create <team> <name> [--description',\n ' <text>] [--products <slug,slug>] | groups update <team> <group>',\n ' [--name <name>] [--description <text>] [--products <slug,…>|none]',\n ' | groups delete <team> <group> [--yes] | groups members',\n ' add|remove <team> <group> <email> (leave, groups delete and',\n ' remove ask first; a script or agent run needs --yes) |',\n ' health <team> [<product>] [--run] (each connected integration',\n ' and its health; --run checks one now; <product> --mine: your own',\n ' personal connection, any seat, as a member) | workspace list <team> |',\n ' workspace default <team> <workspace> (where the team lands) |',\n ' connect <team> <product> [--connection <id>] [--as',\n ' <member-email>] [--set <field>=<value>]… [--no-wait] [--no-open]',\n ' [--link-only] [--reconnect] (connects',\n \" it: asks the form's fields at your terminal or takes them from\",\n ' --set (a list as a,b; secrets and JSON only at a prompt; an optional',\n ' one can be skipped), then opens the sign-in for you — your own',\n ' connection, for a personal product — or the member --as names, and waits;',\n \" --connection agent installs the team's Linear agent (its own\",\n ' Linear app, as a member), which @mention and assign triggers',\n \" need; --link-only prints the team's page; --reconnect connects\",\n ' it again when it reads as connected but is broken: a revoked or',\n ' expired sign-in) |',\n ' connect <team> slack|linear-app [--as <member-email>] (installs',\n ' Slack, or the Ekanos Agents app for Linear, which slack and',\n ' linear triggers answer through; same link-and-wait) |',\n \" disconnect <team> <product> --yes (takes the team's connection\",\n \" and its tokens down; its own app's saved fields stay; --mine:\",\n \" your own personal connection, never another member's) |\",\n ' list | show <team> (one screen: members, each integration and',\n ' whose connection it is, each agent live or the next step) |',\n ' show <team> <product> (a checklist: fields, callback',\n ' URLs, webhooks, connect link) | app set <team> <product>',\n ' [--connection <id>] [--field <name>]… [--set <name>=<value>]…',\n ' [--clear <name>]… [--set-secret <name>=env:<NAME>|file:<path>|stdin]…',\n ' [--browser] (any one field at a time; a field you skip keeps',\n ' its saved value; a secret at your terminal, from the',\n ' environment, a private file, stdin or a browser form, never',\n ' as an argument) |',\n ' llm-key show <team> | llm-key set <team> [--secret-env <NAME> |',\n ' --secret-file <path> | --secret-stdin | --browser] | llm-key',\n \" remove <team> --yes (the team's own Anthropic key, as its\",\n ' settings page sets it; show gives only its last four characters) |',\n ' webhook <team> <product> [<webhook-id>] [--yes] (URL saved to a 0600 file under ~/.ekanos/secrets, never printed) |',\n ' events <team> [<product>] [--product <slug>] [--since 24h|7d|<date>]',\n ' [--limit <n>] (the integration events recorded for the team, each',\n ' with its status, last error and the runs it started, or why none did)',\n ' | audience <team> [<audience>] [--member <email>] [--yes]',\n \" (the team's audience, its business type, which every member is on;\",\n ' their groups narrow it; moving people to an audience that shows',\n \" less needs --yes; --member reads one person's, and setting it\",\n ' (or --inherit) is deprecated: hosts on audiences refuse it)',\n ' | scope show <team> (DEPRECATED, use audience: the product scopes it holds and the products',\n ' it sees in the app) | scope set <team> <scope> [<scope>…] [--yes]',\n ' (replaces them; dropping one needs --yes)',\n \" A team's agents, for the Source admin (teams <area> <verb> <team> …):\",\n ' agents list <team> | agents show <team> <key> (is it live, and if',\n ' not, why: each connection and whose it is, each trigger and how its',\n ' events arrive, last event and run, one Next command)',\n ' | agents create <team> --from <dir|agent.json> [--personal]',\n \" [--confirm-access] [--no-skills] (the team's own agent, or with\",\n ' --personal your own, from the agent.json \"agents apply\" reads;',\n ' you become its creator, so you must be an active member of the',\n ' team; it starts as a draft) | agents apply <team> <dir|agent.json>',\n ' [--personal] [--base-version <n>] [--overwrite] [--confirm-access]',\n ' (creates it, or changes it from the same file; a personal agent',\n \" is its creator's alone to change)\",\n ' | agents enable <team> <key> [--as <member-email>]',\n ' [--draft] [--confirm-access] (--confirm-access: you also confirm',\n ' what it may use) | agents confirm <team> <key> (you confirm what',\n ' it may use, as yourself: whoever sets an agent up confirms it, never',\n ' a team member) | agents disable <team> <key> --yes | agents',\n ' archive <team> <key> [--yes] (off the list; runs and setup kept) |',\n ' agents unarchive <team> <key> (back, paused) | agents',\n ' unpin <team> <key> | agents pin <team> <key> <version> | agents pin',\n ' <team> <key> --draft (this team only runs the unpublished draft, by',\n ' hand, every write waiting; the next publish puts it back to',\n ' following)',\n ' | agents policy <team> <key> [set <tool> auto|approve | unset <tool>]',\n ' [--reads auto|approve] [--writes auto|approve] [--confirm-access]',\n ' | agents skills <team> <key> [add|remove <skill>] (where the',\n ' template allows team skills; its own skills stay)',\n ' | agents tags <team> <key> [add|remove <tag>] (labels that grant',\n ' nothing; a tag the team lacks is made)',\n ' triggers list|add|remove <team> <key> … (add … schedule --cron',\n ' <expr> [--timezone <zone>] --prompt <text> | add … webhook --prompt',\n ' <text> (its token saved to a 0600 file, never printed; a personal',\n \" agent's webhook acts as its creator) | add … event <id>\",\n \" [--filter field=a,b]… or --filter '<json>'; remove <trigger-id|key> --yes;\",\n ' add … slack --channel',\n ' <#name|id>… [--dms] --yes | add … linear [--label <name>]…',\n ' [--no-mention], once installed with teams connect) | triggers',\n \" rotate <team> <key> <trigger-key|id> [--yes] (a webhook trigger's\",\n ' new token, the old one revoked; saved to a 0600 file, never printed)',\n ' | triggers enable|disable <team> <key> <trigger-id|key> (disable',\n ' asks first, --yes in a script) | triggers edit <team> <key>',\n ' <trigger-id|key> [--prompt …] [--cron … --timezone …] [--filter …]',\n ' [--channel …] [--dms|--no-dms] [--label …] [--mention|--no-mention]',\n ' (in place: a webhook keeps its URL and token) | links list|add|remove',\n ' <team> <from-key> [<to-key> --kind talk|delegate --mode await|handoff]',\n ' (remove <link-id|to-key> [--kind <kind>] --yes)',\n ' | mcp list|add|status|token|effect|refresh|remove <team> [<server-key> …]',\n ' (remove needs --yes; refresh <team> --agent <key>: every server it',\n ' has) | mcp attach|detach <team> <server-key> <agent-key> (detach',\n ' asks first, --yes in a script; where the template allows)',\n ' Every area also takes the team as --team <slug>.',\n ' (\"ekanos teams --help\" spells out each area)',\n ' names Global package names (a restricted package is named under your',\n ' Source namespace, e.g. acme/google-drive):',\n ' claim <slug> [--reason <text>] | status <slug>',\n ' reviewers Who decides agent reply drafts, for the Source admin:',\n ' list | add <email> --reach source|team [--team <slug>] |',\n ' remove <email> [--team <slug>] --yes',\n \" routes Route a Source connection's events to teams, for the Source admin:\",\n ' list [<product>] | options <product> | set <product> <value> <team>',\n ' [--label <name>] | remove <product> <value> --yes | webhook',\n ' <product> [--webhook <id>] [--yes] (URL saved to a 0600 file, never printed; --yes',\n ' replaces a live one, revoking it) | unrouted [<product>] |',\n ' replay <event-id>',\n \" agents The source's agent templates, held by Ekanos:\",\n ' init [<dir>] [--claude|--no-claude] (skills + docs MCP for designing',\n ' agents with Claude; offers to add the docs to Claude Code)',\n ' list [--all] (--all: archived agents too) | show <key> |',\n ' pull <key> [--out <dir>] [--force] (--force: overwrite local',\n ' files that differ; without it the pull refuses and writes nothing)',\n ' apply <dir|file> [--base-version <n>] [--overwrite]',\n ' archive <key> --yes (refused while any team has it on; lists',\n ' each team and the command to turn it off) | unarchive <key>',\n ' publish <key> [--to <n>] [--confirm-access] --yes | rollback <key>',\n ' --to <n> [--confirm-access] --yes (every following team moves; one',\n ' that had confirmed stays confirmed, in your name: your publish is the',\n ' confirmation; --confirm-access: you also confirm every team on that',\n ' version not yet confirmed; the output lists teams pinned elsewhere)',\n ' test <key> --team <slug> (--prompt \"…\" | --input <file.json>)',\n ' [--follow] (runs the latest, unpublished version on one team;',\n ' same grant, policy, approvals and audit; marked as a test; to',\n ' test a tool the draft adds, first \"teams agents pin <team> <key>',\n ' --draft\", which also works before anything is published)',\n ' apply also pushes <dir>/skills/<slug>/ folders first and names',\n ' them in the agent (--no-skills skips that)',\n ' Edit one template in place (stores a draft version; --publish',\n ' also rolls it out, with --yes):',\n ' policy <key> [set <tool> auto|approve | unset <tool>]',\n ' [--reads auto|approve] [--writes auto|approve]',\n ' triggers <key> [list | add event <k> --event <slug.event>',\n \" [--filter field=a,b]... (or one --filter '<json>') | add\",\n ' schedule <k> --cron \"<expr>\"',\n ' [--timezone <tz>] --prompt <text> | add webhook <k> --prompt',\n ' <text> | remove <k>] [--prompt <text>] [--disabled]',\n ' links <key> [list | add <to-key> --kind talk|delegate',\n ' [--mode await|handoff] | remove <to-key> [--kind <kind>]]',\n ' overrides <key> [enable|disable policy|triggers|links]',\n ' (off: teams follow the template exactly; on: teams keep',\n ' their own differences)',\n \" skills The source's skills (SKILL.md folders), held by Ekanos:\",\n ' list [--team <t>] | show <slug> [--team <t>] |',\n ' push <dir> [--team <t>] (a new version, live at once; created',\n ' on first push, \"unchanged\" when identical; --team: that team\\'s',\n ' own skill, no other team sees it) | pull <slug> [--out <dir>]',\n ' [--force] (refuses to overwrite a local file that differs)',\n ' | archive <slug> [--team <t>] --yes (refused while an agent',\n ' names it or a team agent has it attached; lists each and the',\n ' command that stops it) | unarchive <slug> [--team <t>]',\n \" knowledge The Source's Knowledge base (markdown articles), for the Source admin:\",\n ' list [--team <t>] | push <dir> [--team <t>] (each .md file an',\n ' article: title from frontmatter or the first heading, tags from',\n ' frontmatter; upserts by path, \"unchanged\" when identical;',\n ' --prune [--yes] also deletes the articles an earlier push of',\n ' this folder made whose files are gone, never ones written or',\n ' edited in the app) |',\n \" search <query> --team <t> (as that team's agents search: its\",\n ' articles plus General) | pull [--team <t>] [--out <dir>]',\n ' [--force] (refuses to overwrite a local file that differs)',\n \" Without --team: General, which every team's agents granted\",\n ' search_knowledge read.',\n \" runs Run and inspect a team's agents, as the Source admin:\",\n ' start <agent-key> --team <slug> (--prompt \"…\" | --input',\n ' <file.json>) [--follow] | list --team <slug> [--agent <key>]',\n ' [--status <status>] [--since 24h|7d|<date>] |',\n ' show <run-id> --team <slug> (--json: transcript, tool calls,',\n ' how each was authorized, approvals) | cancel <run-id> --team',\n ' <slug> [--yes] (stops a live run; asks first, --yes in a script)',\n \" approvals What a team's agent runs wait on: list --team <slug> |\",\n ' approve|reject <id> --team <slug> [--reason \"…\"] |',\n ' edit <id> --team <slug> --body <file> (edit & send a reply draft)',\n ' The Source admin sees all; any other seat holder only what they',\n \" may decide (managing or reviewing the team's agents, a named\",\n \" reviewer, a personal agent's creator). The first decision wins.\",\n \" workflows A team's workflows, for the Source admin (each takes --team <slug>;\",\n ' a workflow is named by its id or its name):',\n ' list [--all] | show <workflow> (status, trigger, Custom Code review',\n ' state, recent runs; --json: the definition) | pull <workflow>',\n ' [--out <dir>] [--force] (writes workflow.json, the JSON the editor',\n ' saves) | apply <file|dir> [--update <workflow>] (a new draft, or',\n \" that workflow's definition replaced; the editor's checks: shape,\",\n ' tool effects, Custom Code security review, approval gates before',\n ' writes) | enable <workflow> [--confirm-access] (activation re-checks',\n ' it; Custom Code that writes or reaches a host needs your approval,',\n ' asked at a terminal) | disable <workflow> | run <workflow>',\n ' [--dry-run [--input <file.json>]] [--follow] (a live run needs it',\n ' on; --dry-run records writes instead of sending them) |',\n ' runs list [--workflow <workflow>] [--status <status>] | runs show',\n ' <run-id> | runs cancel <run-id> [--yes] | approvals list |',\n ' approvals approve|reject <id> [--reason \"…\"]',\n ' use Set this project\\'s publish target (\"ekanos use <source-slug>\")',\n ' publish Validate, pack and submit the integration to an Ekanos host.',\n ' In a repo: publish [<package>...] | --all [--dry-run] (integrations',\n ' first, each package gated, artifacts under .ekanos/publish/)',\n ' upgrade Move this toolchain to a coherent target version, with',\n ' verify-and-rollback (--check --yes --no-verify --host <url>)',\n '',\n 'Keeping the toolchain current:',\n ' validate, dev and publish all check for a newer @ekanos/cli in the',\n ' background (never blocking, silenced by EKANOS_NO_UPDATE_CHECK) and warn',\n ' on stderr when one exists. Run \"ekanos upgrade --check\" any time a',\n ' validate finding smells like version skew (an unrecognized-key error you',\n ' are confident is correct) — it is read-only and safe to run freely. A',\n ' bare \"ekanos upgrade\" MUTATES the project (installs the target versions,',\n ' verifies with validate + the test script, rolls back on any failure).',\n '',\n 'Host resolution (logout, whoami, status, sources, catalog, apps, teams, names, reviewers, routes, agents, skills, knowledge, runs, approvals, workflows, use, publish, upgrade):',\n ' --host, else EKANOS_HOST, else the \"host\" field in ekanos.json, else the',\n ' sole stored login. \"ekanos publish\" saves host and source to ekanos.json.',\n ' \"ekanos login\" never reads ekanos.json for a host (--host, else',\n ' EKANOS_HOST, else the sole stored login) — it is the verb that creates',\n ' credentials, so a committed file must never choose where they go. A',\n ' host you have never logged in to is shown with its sign-in domain and',\n ' asked about first (--trust-host when nobody can be asked). A remote',\n ' http:// host is refused by every verb that sends credentials.',\n '',\n 'Publish targeting (see \"ekanos sources\" / \"ekanos use\"):',\n ' publish refuses (FORBIDDEN) a source you hold no seat on. With multiple',\n ' seats and an implicit (ekanos.json) source, a human run asks to confirm',\n ' the target; a scripted/JSON run needs --source or --yes to proceed —',\n ' it never prompts and never guesses.',\n '',\n 'Global options:',\n ' --json Emit a single JSON envelope on stdout (auto-on when piped);',\n ' --no-json forces the human-readable form',\n ' --version Print the CLI version',\n ' --help Show this help',\n].join('\\n');\n\nexport interface RunOptions {\n stdout?: WriteStream;\n stderr?: WriteStream;\n env?: Record<string, string | undefined>;\n cwd?: string;\n /**\n * How this run was invoked, for the commands hints name (`invocation.ts`).\n * Detected from `env` and the script path when absent.\n */\n invocation?: Invocation;\n /**\n * Test-only override for `publish`'s interactive-confirm gate and `init`\n * / `login`'s clack wizard gate (`canWizard` in `wizard.ts`) — see\n * `PublishArgs` in `commands/publish.ts`. Never set this from real CLI\n * wiring; it exists so a test can exercise the human y/N confirm branch or\n * the wizard flow without a real terminal.\n */\n stdinIsTTY?: boolean;\n confirm?: (question: string) => Promise<boolean>;\n /** Test-only answers for `apps set` / `teams app set` questions — never set from real CLI wiring. */\n ask?: (question: string) => Promise<string>;\n askSecret?: (question: string) => Promise<string>;\n /**\n * Test-only seams for `teams connect`: the browser opener and the wait\n * between its polls. Never set from real CLI wiring.\n */\n openUrl?: (url: string) => void;\n pollDelayMs?: number;\n /**\n * Test-only seams for the secret-input flags (`secret-input.ts`): what\n * `--secret-stdin` reads, and how long a `--browser` form waits. The\n * opener above also opens the form. Never set from real CLI wiring.\n */\n readStdin?: () => Promise<string>;\n secretFormTimeoutMs?: number;\n /**\n * Test-only override for `status --watch`'s poll delay — see `StatusArgs`\n * in `commands/status.ts`. Never set this from real CLI wiring; it exists\n * so a test can exercise the poll loop without waiting 30s per iteration.\n */\n sleep?: (ms: number) => Promise<void>;\n /**\n * Test-only override for `status`'s AGE column (\"now\") — see `StatusArgs`\n * in `commands/status.ts`. Never set this from real CLI wiring; it exists\n * so a test can assert an exact `relativeTime` string deterministically.\n */\n now?: Date;\n}\n\n/**\n * The single entry point. Resolves the agent-native envelope once, dispatches\n * to a verb, and guarantees exactly one terminal emission (success or error).\n * Returns the process exit code — `bin.ts` is the only place that calls\n * `process.exit`, so this stays fully testable.\n */\nexport async function run(\n argv: readonly string[],\n options: RunOptions = {},\n): Promise<number> {\n const jsonFlag = scanJsonFlag(argv);\n setInvocation(\n options.invocation ?? detectInvocation(options.env ?? process.env),\n COMMANDS,\n );\n const ctx = new CliContext({\n jsonFlag,\n stdout: options.stdout,\n stderr: options.stderr,\n env: options.env,\n });\n const cwd = options.cwd ?? process.cwd();\n const env = options.env ?? process.env;\n\n try {\n // `--version` is global and verb-independent, so it is answered before the\n // command is even resolved: `ekanos --version` and `ekanos validate\n // --version` both report the tool's version and exit 0.\n if (scanFlagPresence(argv, 'version')) {\n return emitVersion(ctx);\n }\n\n const { command, rest } = splitCommand(argv);\n\n // Top-level help / no command.\n if (!command) {\n if (scanFlagPresence(rest, 'help') || argv.length === 0) {\n return emitHelp(ctx);\n }\n // A leading token that is not a command (e.g. `--nonsense`).\n ctx.emitClaudeCodeHint({\n tool: 'ekanos',\n error: 'unknown-command',\n commands: COMMANDS,\n help: 'ekanos --help',\n });\n throw usageError(\n `Unknown command or flag \"${argv[0]}\".`,\n `Run one of: ${COMMANDS.join(', ')}. See \"ekanos --help\".`,\n );\n }\n\n if (!COMMANDS.includes(command)) {\n const unknown = unknownCommand(command, rest, COMMANDS);\n ctx.emitClaudeCodeHint({\n tool: 'ekanos',\n error: 'unknown-command',\n given: command,\n ...(unknown.suggestion ? { suggestion: unknown.suggestion } : {}),\n commands: COMMANDS,\n help: 'ekanos --help',\n });\n throw unknown.error;\n }\n\n const specs: FlagSpecs = { ...GLOBAL_SPECS, ...COMMAND_SPECS[command] };\n const parsed = parseArgv(rest, specs);\n\n if (parsed.flags.help === true) {\n return emitCommandHelp(ctx, command);\n }\n\n const positionalNames = POSITIONAL_COMMANDS[command] ?? [];\n\n if (positionalNames.length === 0 && parsed.positionals.length > 0) {\n throw usageError(\n `\"${command}\" takes no positional arguments (got \"${parsed.positionals[0]}\").`,\n `Pass options as flags, e.g. \"--dir <path>\". See \"ekanos ${command} --help\".`,\n );\n }\n\n if (\n parsed.positionals.length > positionalNames.length &&\n !VARIADIC_COMMANDS.has(command)\n ) {\n const usage = positionalNames.map((name) => `<${name}>`).join(' ');\n throw usageError(\n `\"${command}\" takes at most ${positionalNames.length} positional ` +\n `argument${positionalNames.length === 1 ? '' : 's'} (${usage}), ` +\n `got ${parsed.positionals.length}.`,\n `e.g. \"ekanos ${command} ${usage}\". See \"ekanos ${command} --help\".`,\n );\n }\n\n const dir = (parsed.flags.dir as string | undefined) ?? cwd;\n\n if (REPO_ROOT_REFUSED.has(command) && isRepoRoot(path.resolve(dir))) {\n throw preconditionError(\n `\"${command}\" works on one package, and ${dir} is a repo root.`,\n `Run it inside a package (cd integrations/<slug> or cd experiences/<slug>), or use \"ekanos publish --all\" for the whole repo.`,\n );\n }\n\n switch (command) {\n case 'init':\n return await runInit(ctx, {\n slug: parsed.flags.slug as string | undefined,\n dir: parsed.flags.dir as string | undefined,\n cwd,\n force: parsed.flags.force === true,\n yes: parsed.flags.yes === true,\n docs: parsed.flags.docs as string[] | undefined,\n kind: parsed.flags.kind as string | undefined,\n stdinIsTTY: options.stdinIsTTY,\n });\n case 'validate':\n return await runValidate(ctx, { dir, env });\n case 'dev':\n return await runDev(ctx, {\n dir,\n port: parsed.flags.port as string | undefined,\n host: parsed.flags.host as string | undefined,\n force: parsed.flags.force === true,\n start: parsed.flags.start as boolean | undefined,\n contractsDir: parsed.flags['contracts-dir'] as string | undefined,\n env,\n });\n case 'test':\n return await runTest(ctx, {\n dir,\n passthrough: parsed.passthrough,\n raw: parsed.flags.raw === true,\n });\n case 'login':\n return await runLogin(ctx, {\n host: parsed.flags.host as string | undefined,\n force: parsed.flags.force === true,\n claude: parsed.flags.claude as boolean | undefined,\n trustHost: parsed.flags['trust-host'] === true,\n confirmHost: options.confirm,\n cwd,\n env,\n stdinIsTTY: options.stdinIsTTY,\n });\n case 'logout':\n return await runLogout(ctx, {\n host: parsed.flags.host as string | undefined,\n all: parsed.flags.all === true,\n cwd,\n env,\n });\n case 'whoami':\n return await runWhoami(ctx, {\n host: parsed.flags.host as string | undefined,\n cwd,\n env,\n });\n case 'status':\n return await runStatus(ctx, {\n host: parsed.flags.host as string | undefined,\n dir,\n env,\n findings: parsed.flags.findings === true,\n all: parsed.flags.all === true,\n watch: parsed.flags.watch === true,\n sleep: options.sleep,\n now: options.now,\n });\n case 'sources':\n return await runSources(ctx, {\n host: parsed.flags.host as string | undefined,\n positionals: parsed.positionals,\n source: parsed.flags.source as string | undefined,\n yes: parsed.flags.yes === true,\n flags: parsed.flags,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n ask: options.ask,\n });\n case 'audiences':\n return await runAudiences(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n yes: parsed.flags.yes === true,\n flags: parsed.flags,\n dir,\n env,\n });\n case 'catalog':\n return await runCatalog(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n product: parsed.positionals[0],\n dir,\n env,\n });\n case 'apps':\n return await runApps(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n product: parsed.positionals[1],\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n ask: options.ask,\n askSecret: options.askSecret,\n confirm: options.confirm,\n noWait: parsed.flags['no-wait'] === true,\n yes: parsed.flags.yes === true,\n flags: parsed.flags,\n readStdin: options.readStdin,\n openUrl: options.openUrl,\n secretFormTimeoutMs: options.secretFormTimeoutMs,\n });\n case 'teams':\n return await runTeams(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n connection: parsed.flags.connection as string | undefined,\n slug: parsed.flags.slug as string | undefined,\n owner: parsed.flags.owner as string | undefined,\n role: parsed.flags.role as string | undefined,\n yes: parsed.flags.yes === true,\n noWait: parsed.flags['no-wait'] === true,\n noOpen: parsed.flags.open === false,\n linkOnly: parsed.flags['link-only'] === true,\n reconnect: parsed.flags.reconnect === true,\n flags: parsed.flags,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n ask: options.ask,\n askSecret: options.askSecret,\n openUrl: options.openUrl,\n pollDelayMs: options.pollDelayMs,\n readStdin: options.readStdin,\n secretFormTimeoutMs: options.secretFormTimeoutMs,\n });\n case 'names':\n return await runNames(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n reason: parsed.flags.reason as string | undefined,\n dir,\n env,\n });\n case 'reviewers':\n return await runReviewers(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n reach: parsed.flags.reach as string | undefined,\n team: parsed.flags.team as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n });\n case 'routes':\n return await runRoutes(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n label: parsed.flags.label as string | undefined,\n webhook: parsed.flags.webhook as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n });\n case 'agents':\n return await runAgents(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n target: parsed.positionals[1],\n to: parsed.flags.to as string | undefined,\n baseVersion: parsed.flags['base-version'] as string | undefined,\n overwrite: parsed.flags.overwrite === true,\n out: parsed.flags.out as string | undefined,\n yes: parsed.flags.yes === true,\n all: parsed.flags.all === true,\n force: parsed.flags.force === true,\n claude: parsed.flags.claude as boolean | undefined,\n skills: parsed.flags.skills as boolean | undefined,\n rest: parsed.positionals.slice(2),\n event: parsed.flags.event as string | undefined,\n filter: parsed.flags.filter as string[] | undefined,\n disabled: parsed.flags.disabled === true,\n cron: parsed.flags.cron as string | undefined,\n timezone: parsed.flags.timezone as string | undefined,\n kind: parsed.flags.kind as string | undefined,\n mode: parsed.flags.mode as string | undefined,\n reads: parsed.flags.reads as string | undefined,\n writes: parsed.flags.writes as string | undefined,\n publish: parsed.flags.publish === true,\n confirmAccess: parsed.flags['confirm-access'] === true,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n team: parsed.flags.team as string | undefined,\n prompt: parsed.flags.prompt as string | undefined,\n input: parsed.flags.input as string | undefined,\n follow: parsed.flags.follow === true,\n });\n case 'runs':\n case 'approvals':\n return await (command === 'runs' ? runRuns : runApprovals)(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n team: parsed.flags.team as string | undefined,\n agent: parsed.flags.agent as string | undefined,\n status: parsed.flags.status as string | undefined,\n since: parsed.flags.since as string | undefined,\n prompt: parsed.flags.prompt as string | undefined,\n input: parsed.flags.input as string | undefined,\n follow: parsed.flags.follow === true,\n reason: parsed.flags.reason as string | undefined,\n body: parsed.flags.body as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n sleep: options.sleep,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'skills':\n return await runSkills(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n target: parsed.positionals[1],\n team: parsed.flags.team as string | undefined,\n out: parsed.flags.out as string | undefined,\n force: parsed.flags.force === true,\n yes: parsed.flags.yes === true,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'knowledge':\n return await runKnowledge(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n subcommand: parsed.positionals[0],\n target: parsed.positionals[1],\n team: parsed.flags.team as string | undefined,\n out: parsed.flags.out as string | undefined,\n force: parsed.flags.force === true,\n prune: parsed.flags.prune === true,\n yes: parsed.flags.yes === true,\n dir,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'workflows':\n return await runWorkflows(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n positionals: parsed.positionals,\n team: parsed.flags.team as string | undefined,\n all: parsed.flags.all === true,\n out: parsed.flags.out as string | undefined,\n force: parsed.flags.force === true,\n update: parsed.flags.update as string | undefined,\n confirmAccess: parsed.flags['confirm-access'] === true,\n dryRun: parsed.flags['dry-run'] === true,\n input: parsed.flags.input as string | undefined,\n follow: parsed.flags.follow === true,\n workflow: parsed.flags.workflow as string | undefined,\n status: parsed.flags.status as string | undefined,\n reason: parsed.flags.reason as string | undefined,\n yes: parsed.flags.yes === true,\n dir,\n env,\n sleep: options.sleep,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'use':\n return await runUse(ctx, {\n host: parsed.flags.host as string | undefined,\n dir,\n slug: parsed.positionals[0],\n env,\n });\n case 'publish':\n return await runPublish(ctx, {\n host: parsed.flags.host as string | undefined,\n source: parsed.flags.source as string | undefined,\n dir,\n yes: parsed.flags.yes === true,\n dryRun: parsed.flags['dry-run'] === true,\n packages: parsed.positionals,\n all: parsed.flags.all === true,\n env,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n case 'upgrade':\n return await runUpgrade(ctx, {\n dir,\n host: parsed.flags.host as string | undefined,\n env,\n check: parsed.flags.check === true,\n yes: parsed.flags.yes === true,\n noVerify: parsed.flags.verify === false,\n stdinIsTTY: options.stdinIsTTY,\n confirm: options.confirm,\n });\n default: {\n const experienceCommand = EXPERIENCE_COMMANDS.find(\n (candidate) => candidate.name === command,\n );\n if (experienceCommand) {\n return await experienceCommand.run(ctx, {\n flags: parsed.flags,\n positionals: parsed.positionals,\n passthrough: parsed.passthrough,\n dir,\n cwd,\n env,\n });\n }\n // Unreachable — COMMANDS gate above — but keeps the switch total.\n throw usageError(\n `Unknown command \"${command}\".`,\n `Run one of: ${COMMANDS.join(', ')}.`,\n );\n }\n }\n } catch (error) {\n return ctx.fail(toCliError(error));\n }\n}\n\n/**\n * Presence of `--json` (or `--no-json`) BEFORE the first `--` passthrough.\n *\n * Tri-state on purpose. `undefined` means \"the user expressed no preference\",\n * which is what lets the context fall back to inferring the mode from a\n * non-TTY stdout or CLAUDECODE. Collapsing `--no-json` to `false` here would\n * make it indistinguishable from absence, and the flag could then never turn\n * JSON mode OFF in exactly the cases it exists for.\n */\nfunction scanJsonFlag(argv: readonly string[]): boolean | undefined {\n for (const token of argv) {\n if (token === '--') break;\n if (token === '--json') return true;\n if (token === '--no-json') return false;\n }\n return undefined;\n}\n\nfunction scanFlagPresence(argv: readonly string[], name: string): boolean {\n for (const token of argv) {\n if (token === '--') break;\n if (token === `--${name}`) return true;\n }\n return false;\n}\n\n/**\n * Split argv into the command (first bare token before `--`) and the rest\n * (everything else, order preserved, including global flags and the `--`\n * passthrough). Global flags are all booleans, so any bare token is the\n * command — no value-consumption ambiguity.\n */\nfunction splitCommand(argv: readonly string[]): {\n command: string | null;\n rest: string[];\n} {\n for (let i = 0; i < argv.length; i++) {\n const token = argv[i]!;\n if (token === '--') break;\n if (!token.startsWith('-')) {\n return {\n command: token,\n rest: [...argv.slice(0, i), ...argv.slice(i + 1)],\n };\n }\n }\n return { command: null, rest: [...argv] };\n}\n\n/**\n * The CLI's own version, read from the package manifest at runtime rather than\n * baked in by the build — one source of truth, so a release bump cannot leave\n * `--version` reporting a stale number. The path resolves identically from\n * `src/index.ts` and from the emitted `dist/index.js`, both of which sit one\n * directory below the package root.\n */\nfunction readVersion(): string {\n const manifest = new URL('../package.json', import.meta.url);\n const parsed: unknown = JSON.parse(fs.readFileSync(manifest, 'utf8'));\n\n return typeof parsed === 'object' &&\n parsed !== null &&\n 'version' in parsed &&\n typeof parsed.version === 'string'\n ? parsed.version\n : '0.0.0';\n}\n\nfunction emitVersion(ctx: CliContext): number {\n const version = readVersion();\n\n return ctx.succeed({ name: 'ekanos', version }, version);\n}\n\nconst DOCS_FOOTER = `\\nDocs: ${SDK_DOCS_URL} (commands: ${docsPage('cli/commands')})`;\n\nfunction emitHelp(ctx: CliContext): number {\n // Short on purpose: the command list and where each command's usage is.\n // The full usage is already the result, and a hint line is not a manual.\n ctx.emitClaudeCodeHint({\n tool: 'ekanos',\n commands: COMMANDS,\n help: 'ekanos <command> --help',\n });\n return ctx.succeed(\n { usage: USAGE, commands: COMMANDS, docs: SDK_DOCS_URL },\n `${USAGE}${DOCS_FOOTER}`,\n );\n}\n\n/** The per-area usage a command's own parser already gives, shown in its help too. */\nconst COMMAND_DETAILS: Record<string, () => string[]> = {\n teams: () => TEAM_AGENT_AREAS.map(usageFor),\n agents: () =>\n Object.entries(TEMPLATE_EDIT_HELP).map(\n ([area, examples]) => `${area}: ${examples}`,\n ),\n};\n\n/** A command's block of the top-level usage: its line and the indented ones under it. */\nfunction commandUsage(command: string): string {\n const lines = USAGE.split('\\n');\n const start = lines.findIndex((line) => line.startsWith(` ${command} `));\n if (start === -1) return '';\n const end = lines.findIndex(\n (line, index) => index > start && !line.startsWith(' '),\n );\n return lines.slice(start, end === -1 ? undefined : end).join('\\n');\n}\n\nfunction optionLabel(name: string, spec: FlagSpec): string {\n if (spec.type === 'boolean') return `--${name}`;\n return `--${name} <value>${spec.repeatable ? '…' : ''}`;\n}\n\n/**\n * `ekanos <command> --help`: the command's block of the usage (its\n * subcommands, each described), the per-area usage its parser gives, and\n * every flag with its description. The JSON envelope carries the same, so an\n * agent reading it is not left with flag names only.\n */\nfunction emitCommandHelp(ctx: CliContext, command: string): number {\n const specs = COMMAND_SPECS[command] ?? {};\n const flags = Object.keys(specs).map((name) => `--${name}`);\n const usage = commandUsage(command);\n const details = COMMAND_DETAILS[command]?.() ?? [];\n const options = [\n ...Object.entries(specs),\n ...Object.entries(GLOBAL_SPECS),\n ].map(([name, spec]) => ({\n flag: `--${name}`,\n label: optionLabel(name, spec),\n takesValue: spec.type === 'string',\n repeatable: spec.repeatable === true,\n description: spec.description ?? '',\n }));\n const positionals = POSITIONAL_COMMANDS[command] ?? [];\n const synopsis = [\n `ekanos ${command}`,\n positionals.length === 0\n ? ''\n : positionals.length === 1\n ? ` <${positionals[0]}>`\n : ` <${positionals[0]}> …`,\n ' [options]',\n ].join('');\n const docs = docsPage('cli/commands', command);\n const width = Math.min(\n 26,\n Math.max(...options.map((option) => option.label.length)),\n );\n const human = [\n `Usage: ${synopsis}`,\n ...(usage ? ['', usage] : []),\n ...(details.length > 0 ? ['', ...details] : []),\n '',\n 'Options:',\n ...options.map((option) =>\n option.label.length > width\n ? ` ${option.label}\\n ${' '.repeat(width)} ${option.description}`\n : ` ${option.label.padEnd(width)} ${option.description}`,\n ),\n '',\n `Docs: ${docs}`,\n ].join('\\n');\n ctx.emitClaudeCodeHint({ tool: 'ekanos', command, flags, usage });\n return ctx.succeed(\n {\n command,\n flags,\n usage,\n details,\n options: options.map(({ label: _label, ...option }) => option),\n docs,\n },\n human,\n );\n}\n"]}