aui-agent-builder 0.3.160 → 0.3.162

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 (63) hide show
  1. package/README.md +10 -17
  2. package/dist/api-client/apollo-client.d.ts.map +1 -1
  3. package/dist/api-client/apollo-client.js +2 -2
  4. package/dist/api-client/apollo-client.js.map +1 -1
  5. package/dist/commands/account.d.ts +11 -4
  6. package/dist/commands/account.d.ts.map +1 -1
  7. package/dist/commands/account.js +76 -59
  8. package/dist/commands/account.js.map +1 -1
  9. package/dist/commands/agents.d.ts +0 -1
  10. package/dist/commands/agents.d.ts.map +1 -1
  11. package/dist/commands/agents.js +80 -15
  12. package/dist/commands/agents.js.map +1 -1
  13. package/dist/commands/apollo.d.ts +5 -27
  14. package/dist/commands/apollo.d.ts.map +1 -1
  15. package/dist/commands/apollo.js +24 -36
  16. package/dist/commands/apollo.js.map +1 -1
  17. package/dist/commands/import-agent.d.ts +7 -0
  18. package/dist/commands/import-agent.d.ts.map +1 -1
  19. package/dist/commands/import-agent.js +27 -14
  20. package/dist/commands/import-agent.js.map +1 -1
  21. package/dist/commands/init.d.ts.map +1 -1
  22. package/dist/commands/init.js +76 -26
  23. package/dist/commands/init.js.map +1 -1
  24. package/dist/commands/integration-mcp-test.d.ts +13 -7
  25. package/dist/commands/integration-mcp-test.d.ts.map +1 -1
  26. package/dist/commands/integration-mcp-test.js +35 -51
  27. package/dist/commands/integration-mcp-test.js.map +1 -1
  28. package/dist/commands/integration-mcp-url.d.ts +40 -0
  29. package/dist/commands/integration-mcp-url.d.ts.map +1 -0
  30. package/dist/commands/integration-mcp-url.js +162 -0
  31. package/dist/commands/integration-mcp-url.js.map +1 -0
  32. package/dist/commands/integration.d.ts +51 -9
  33. package/dist/commands/integration.d.ts.map +1 -1
  34. package/dist/commands/integration.js +231 -66
  35. package/dist/commands/integration.js.map +1 -1
  36. package/dist/commands/util/apollo-agent.d.ts.map +1 -1
  37. package/dist/commands/util/apollo-agent.js +3 -1
  38. package/dist/commands/util/apollo-agent.js.map +1 -1
  39. package/dist/commands/version.d.ts.map +1 -1
  40. package/dist/commands/version.js +6 -1
  41. package/dist/commands/version.js.map +1 -1
  42. package/dist/config/index.d.ts +8 -0
  43. package/dist/config/index.d.ts.map +1 -1
  44. package/dist/config/index.js +9 -0
  45. package/dist/config/index.js.map +1 -1
  46. package/dist/errors/index.d.ts.map +1 -1
  47. package/dist/errors/index.js +10 -3
  48. package/dist/errors/index.js.map +1 -1
  49. package/dist/index.js +158 -74
  50. package/dist/index.js.map +1 -1
  51. package/dist/services/agents.service.d.ts.map +1 -1
  52. package/dist/services/agents.service.js +5 -2
  53. package/dist/services/agents.service.js.map +1 -1
  54. package/dist/services/integration.service.d.ts +282 -7
  55. package/dist/services/integration.service.d.ts.map +1 -1
  56. package/dist/services/integration.service.js +366 -29
  57. package/dist/services/integration.service.js.map +1 -1
  58. package/dist/services/pull-schema.service.js +4 -4
  59. package/dist/ui/views/IntegrationView.d.ts +3 -1
  60. package/dist/ui/views/IntegrationView.d.ts.map +1 -1
  61. package/dist/ui/views/IntegrationView.js +2 -2
  62. package/dist/ui/views/IntegrationView.js.map +1 -1
  63. package/package.json +1 -1
@@ -88,7 +88,7 @@ function classifyAPIError(err) {
88
88
  return new AuthenticationError(`${verb} failed (${status}).`, {
89
89
  suggestion: status === 401
90
90
  ? "Your session may have expired. Run `aui login --environment <custom|production>` to re-authenticate (choose the environment you were already using so you don't switch to production by mistake)."
91
- : "You don't have permission for this operation. Check your account role or switch accounts with `aui account --switch`.",
91
+ : "You don't have permission for this operation. Check your account role, or target a different account with `--account-id` (list them via `aui account --list`).",
92
92
  cause: err,
93
93
  });
94
94
  }
@@ -100,9 +100,16 @@ function classifyAPIError(err) {
100
100
  });
101
101
  }
102
102
  if (status >= 500) {
103
- return new CLIError(`The AUI server returned an error (${status}).`, {
103
+ // Surface any upstream detail the server returned (e.g. an integration's
104
+ // real status/body wrapped in an Apollo 500). Without this the caller only
105
+ // sees "The AUI server returned an error (500)" and has to dig through
106
+ // `apollo trace` to find the actual upstream failure.
107
+ const detail = extractApiErrorDetail(err.body);
108
+ return new CLIError(`The AUI server returned an error (${status})${detail ? `: ${detail}` : ""}.`, {
104
109
  code: "API_SERVER_ERROR",
105
- suggestion: "This is a server-side issue. Please try again in a few moments. If it persists, contact support.",
110
+ suggestion: detail
111
+ ? "The detail above is the upstream response. If it points at a config/auth issue (e.g. a 401 or bad key), fix that; otherwise retry shortly or contact support."
112
+ : "This is a server-side issue. Please try again in a few moments. If it persists, contact support.",
106
113
  cause: err,
107
114
  });
108
115
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,qBAAqB;AAErB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO,EAAE,CAAC;IACV,aAAa,EAAE,CAAC;IAChB,gBAAgB,EAAE,CAAC;CACX,CAAC;AA4BX,MAAM,OAAO,QAAS,SAAQ,KAAK;IACxB,UAAU,CAAU;IACpB,OAAO,CAAU;IACjB,QAAQ,CAAW;IACnB,IAAI,CAAe;IAE5B,YAAY,OAAe,EAAE,UAA2B,EAAE;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC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QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ;gBACrC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI;gBACrB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CACjD,CACF,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAElB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC"}
package/dist/index.js CHANGED
@@ -27,6 +27,7 @@ import { integrationTools } from "./commands/integration-tools.js";
27
27
  import { integrationToolkits } from "./commands/integration-toolkits.js";
28
28
  import { integrationTest } from "./commands/integration-test.js";
29
29
  import { integrationMCPTest } from "./commands/integration-mcp-test.js";
30
+ import { integrationMcpUrl } from "./commands/integration-mcp-url.js";
30
31
  import { curl } from "./commands/curl.js";
31
32
  import { versionMenu, versionList, versionCreate, versionGet, versionPublish, versionActivate, versionArchive, versionUpdate, } from "./commands/version.js";
32
33
  import { versionSnapshotMenu, versionSnapshotList, versionSnapshotGet, versionSnapshotDiff, } from "./commands/version-snapshot.js";
@@ -101,7 +102,10 @@ const program = new Command();
101
102
  program
102
103
  .name("aui")
103
104
  .description("◆ AUI Agent Builder — Build, version, and deploy AI agents from your terminal")
104
- .version(pkg.version, "-v, -V, --version")
105
+ // Only `-v` / `-V` are wired as version flags. `--version` is intentionally
106
+ // omitted because it collides with subcommand options like
107
+ // `agents --version <id>` and `version` is also a subcommand name.
108
+ .version(pkg.version, "-v, -V")
105
109
  .option("--json", "Output structured JSON to stdout (for scripting/piping)")
106
110
  .action(() => {
107
111
  const { unmount } = render(createElement(Banner, { version: pkg.version }));
@@ -140,8 +144,10 @@ program
140
144
  subshell — run 'exit' to return.
141
145
  agents --create --dir <path>
142
146
  Same, but import the new agent into <path> instead
143
- agents --list List all agents in your account
144
- agents --switch Switch active agent
147
+ agents --list List agents for an account (scope: --account-id, else the
148
+ project's .auirc; errors outside a folder with no --account-id)
149
+ agents --switch Set the SESSION's current agent (the fallback used when you're
150
+ not inside an agent folder; .auirc wins inside one)
145
151
  agents --delete Delete an agent or a version (org → account → agent picker)
146
152
  agents --delete --network-id <id> [--yes]
147
153
  Delete an entire agent (single API call, all versions)
@@ -180,9 +186,9 @@ program
180
186
  apollo Overview of the runtime messaging commands
181
187
  apollo create-thread Start a conversation thread (POST /v1/messaging/tasks)
182
188
  apollo send-message --task-id <id> --text <msg>
183
- Send a message; forwards your local files + includes the trace by default (--no-bundle / --no-include-trace to skip)
189
+ Send a message; forwards your local files + includes the trace
184
190
  apollo rerun --task-id <id> --interaction-id <id> --text <msg>
185
- Regenerate from an interaction and replay (--no-bundle, --no-include-trace, --version-id)
191
+ Regenerate from an interaction and replay (--version-id)
186
192
  apollo trace --task-id <id> [--interaction-id <id>]
187
193
  Fetch all interaction traces (or one interaction's trace)
188
194
 
@@ -195,7 +201,17 @@ program
195
201
  integration tools --slugs <A,B> Fetch Composio tool descriptors by slug
196
202
  [--toolkit-versions <v>] [--limit <n>] [--cursor <c>] [--json]
197
203
  integration discover --url <url> Discover tools from a manual MCP server
198
- [--auth-type token --auth-token <tok>] [--json]
204
+ [--transport-type STREAMABLE_HTTP|SSE]
205
+ Canonical auth (same surface as create / mcp-test):
206
+ [--auth-type none|token|bearer_token|api_key|oauth_client_credentials]
207
+ [--auth-token <value>]
208
+ [--auth-header-name <Header>] ← required for api_key
209
+ [--oauth-url <token-endpoint> --oauth-client-id <id> --oauth-client-secret <secret>]
210
+ [--json]
211
+ integration mcp-url --toolkit <slug>
212
+ Provision (or reuse) a Composio MCP server (returns { server_id, server_url })
213
+ (--tools a,b | --all-tools) [--server-id <id>]
214
+ [--composio-user-id <id>] [--composio-api-key <key>] [--json]
199
215
 
200
216
  \x1b[1mCreate (fully non-interactive with --full)\x1b[0m
201
217
  integration create --full --name <n> --url <mcp-url> --all-tools
@@ -203,7 +219,7 @@ program
203
219
  [--auth-type token --auth-token <tok>] [--tools a,b]
204
220
  integration create --full --name <n> --toolkit <slug> --all-tools
205
221
  Native Composio integration (toolkit from the directory)
206
- [--composio-api-key <key>] [--tools a,b]
222
+ [--composio-api-key <key>] [--tools a,b] [--server-id <id>]
207
223
  (scope: [--organization-id] [--account-id] [--network-id] [--version-id])
208
224
 
209
225
  \x1b[1mTest (always JSON, non-interactive)\x1b[0m
@@ -331,9 +347,9 @@ program
331
347
  .command("account")
332
348
  .alias("accounts")
333
349
  .description("Manage accounts (projects) — list, create, switch")
334
- .option("--list", "List all accounts")
350
+ .option("--list", "List all accounts in your org (use the id with `--account-id` on agent commands)")
335
351
  .option("--create <name>", "Create a new account")
336
- .option("--switch", "Switch active account")
352
+ .option("--switch [accountId]", "Switch the SESSION's current account (the fallback used by push/pull/rag when not inside an agent folder). Pass an account id to switch non-interactively (works with --json); omit it for an interactive picker (TTY only)")
337
353
  .action(async (options) => {
338
354
  try {
339
355
  await account(options);
@@ -347,15 +363,14 @@ program
347
363
  .command("agent")
348
364
  .alias("agents")
349
365
  .description("Manage agents and versions — list, create, switch, import, delete")
350
- .option("--list", "List all agents")
366
+ .option("--list", "List agents for an account. Scope resolves from --account-id, else the current project's .auirc account; outside a folder with no --account-id it errors (it does NOT use the session's current account)")
351
367
  .option("--create", "Create a new agent")
352
368
  .option("--full", "Create + version + publish + activate in one step")
353
- .option("--draft", "Create + version draft (v1.0) without publishing (this is the default — kept for explicitness)")
354
369
  .option("--name <name>", "Agent name (skips name prompt)")
355
370
  .option("--category <id>", "Category ID or key (default: General)")
356
- .option("-d, --dir <path>", "After --create, auto-import the new agent into this directory (defaults to a new ./<agent-name> folder)")
371
+ .option("-d, --dir <path>", "After --create, import the new agent into this directory (defaults to a new ./<agent-name> folder). Passing --dir forces the local import even non-interactively (no TTY needed), so scripts and sandboxes get the project on disk.")
357
372
  .option("--network-id <networkId>", "Network ID (used by --create or to target --delete)")
358
- .option("--account-id <id>", "Account ID (skips org/account selection)")
373
+ .option("--account-id <id>", "Account ID. Scopes --list (and skips org/account selection on --create). Get ids from `aui account --list`")
359
374
  // Creation mode is resolved automatically from the active environment
360
375
  // (see commands/util/agent-mode.ts). These explicit overrides are kept
361
376
  // functional for automation/back-compat but hidden from help so the
@@ -364,9 +379,9 @@ program
364
379
  .addOption(new Option("--bundle-mode", "Create a bundle-mode agent (bundle_mode=true) via the Apollo provisioning endpoint. One call provisions everything server-side: network → agent → first version (import from template) → publish → activate. Not the default; incompatible with --network-id (it creates its own network) and needs a category.").hideHelp())
365
380
  .addOption(new Option("--records-mode", "Create with bundle_mode=false (records mode). This is the default for regular agents and is what lets --create auto-create the v1.0 draft.").hideHelp())
366
381
  .option("--template", "Create a template (kind=template) at NETWORK_CATEGORY scope. Templates are clone sources other agents bootstrap from via `aui version create --source template`. Requires --category. Cannot be combined with --network-id.")
367
- .option("--switch", "Switch active agent (interactive: agent version)")
382
+ .option("--switch", "Set the SESSION's current agent + version (interactive picker). This is the fallback used when you're not inside an agent folder; .auirc takes priority inside one")
368
383
  .option("--import", "Import an agent from backend")
369
- .option("--versions [agentId]", "List versions for an agent (defaults to current)")
384
+ .option("--versions [agentId]", "List versions for an agent (defaults to current). Accepts an agent-management id OR a network id (the `id` shown by --list) — it auto-resolves to the management id the versions API needs, so it no longer 404s on a network id")
370
385
  .option("--use <agentId>", "Select an agent directly by ID")
371
386
  .option("--version <versionId>", "Select / target a specific version (used with --use or --delete)")
372
387
  .option("--delete", "Delete an agent or version. Interactive: org → account → agent picker. Non-interactive: pair with --network-id, --version, or --agent-id (+ --all-versions)")
@@ -397,6 +412,7 @@ program
397
412
  .option("--no-skills", "Skip skill generation entirely")
398
413
  .option("--skip-kb-files", "Skip knowledge-base-files schema fetch")
399
414
  .option("--with-kb-files", "Also download original binaries (PDF, CSV, …) into each KB folder")
415
+ .option("--reset-git", "On re-import into an existing dir, wipe local git history and start a fresh baseline commit (default: preserve existing .git and commit on top)")
400
416
  .option("--exclude-skills", "Write coding agent configs (.claude/, .cursor/, .opencode/) to current directory instead of --dir")
401
417
  .option("--include-evaluate", "Include the evaluate (test_questions) schema")
402
418
  .option("--skills-env <env>", "Override environment for Notion skill/doc pages (staging|production|preview|custom)")
@@ -619,16 +635,35 @@ integrationCmd.addHelpText("after", `
619
635
  discover Discover tools exposed by a manual MCP server
620
636
  --url <mcp-url> [--auth-type none|token] [--auth-token <tok>]
621
637
  [--organization-id <id>] [--account-id <id>] [--network-id <id>] [--json]
638
+ mcp-url Provision (or reuse) a Composio MCP server; prints { server_id, server_url }
639
+ --toolkit <slug> (--tools a,b | --all-tools)
640
+ [--server-id <id>] [--composio-user-id <id>] [--composio-api-key <key>]
641
+ [--organization-id <id>] [--account-id <id>] [--network-id <id>] [--json]
622
642
 
623
643
  \x1b[1mCreate (fully non-interactive with --full)\x1b[0m
624
644
  create Create an MCP integration. Manual (your own MCP server) or native (Composio toolkit).
625
645
  Manual: --name <n> --url <mcp-url> (--tools a,b | --all-tools) --full
626
- [--auth-type token --auth-token <tok>] [--description <d>]
646
+ [--description <d>] [--transport-type STREAMABLE_HTTP|SSE]
647
+ Auth (canonical MCPAuthentication):
648
+ --auth-type none|token|bearer_token|api_key|oauth_client_credentials
649
+ [--auth-token <value>] ← settings.authentication.value
650
+ [--auth-header-name <Header>] ← required for api_key (e.g. X-API-Key)
651
+ [--oauth-url <token-endpoint> --oauth-client-id <id> --oauth-client-secret <secret>]
652
+ [--oauth-method GET|POST] ← oauth_client_credentials, default POST
653
+ [--oauth-grant-type <grant>] ← oauth_client_credentials, default client_credentials
654
+ The CLI-only alias --auth-type token is collapsed to bearer_token
655
+ inside buildAuthFromFlags and never leaks to the wire.
627
656
  Native: --name <n> --toolkit <slug> (--tools a,b | --all-tools) --full
628
657
  [--composio-api-key <key>] [--composio-auth-scheme <scheme>]
629
658
  [--composio-credentials-file <path>]
630
659
  [--composio-client-id <id> --composio-client-secret <secret>]
631
660
  [--composio-client-bearer-token <token>]
661
+ [--transport-type STREAMABLE_HTTP|SSE]
662
+ [--server-id <id>] reuse an existing Composio MCP server name;
663
+ a 30-char UUID-prefix is minted when omitted.
664
+ Persisted on the integration as
665
+ settings.composio.server_id. The provisioned
666
+ MCP URL is persisted at settings.server_url.
632
667
  Scope: [--organization-id <id>] [--account-id <id>] [--network-id <id>]
633
668
  [--network-category-id <id>] [--version-id <id>]
634
669
  --full makes it skip every prompt (org/account/agent + confirm); missing
@@ -657,9 +692,11 @@ integrationCmd.addHelpText("after", `
657
692
  Composio: --type composio --toolkit <slug> --tool <name> [--arguments '<json>']
658
693
  Direct: --type direct --url <mcp-url> --tool <name> [--arguments '<json>']
659
694
  [--transport-type STREAMABLE_HTTP|SSE]
660
- [--auth-type bearer_token|api_key|none]
661
- [--auth-token <value>]
662
- [--auth-header-name <Header>] ← required for api_key
695
+ Canonical auth (same surface as create / discover):
696
+ [--auth-type none|token|bearer_token|api_key|oauth_client_credentials]
697
+ [--auth-token <value>]
698
+ [--auth-header-name <Header>] ← required for api_key (e.g. X-API-Key)
699
+ [--oauth-url <token-endpoint> --oauth-client-id <id> --oauth-client-secret <secret>]
663
700
  \x1b[90mRun aui integration mcp-test --help for auth examples + output shape.\x1b[0m
664
701
 
665
702
  \x1b[90m Run aui integration <command> --help for the full options of each command.\x1b[0m
@@ -669,10 +706,12 @@ integrationCmd
669
706
  .description("Create a new MCP integration (interactive or non-interactive)")
670
707
  .option("--name <name>", "Integration name")
671
708
  .option("--description <description>", "Integration description")
672
- .option("--url <url>", "MCP server URL")
709
+ .option("--url <url>", "MCP server URL (DIRECT integrations only)")
673
710
  .option("--config-method <method>", "Config method: manual or native (default: manual)")
674
- .option("--auth-type <type>", "Authentication method: none or token")
675
- .option("--auth-token <token>", "Authentication token (when --auth-type token)")
711
+ .option("--transport-type <type>", "MCP transport: STREAMABLE_HTTP (default) or SSE. Maps to settings.transport_type.")
712
+ .option("--auth-type <type>", "MCPAuthType: none | bearer_token | api_key | oauth_client_credentials. The CLI-only alias 'token' is mapped to 'bearer_token' before any wire emission.")
713
+ .option("--auth-token <token>", "Credential value for the authentication block. Lands at settings.authentication.value (bearer_token / api_key).")
714
+ .option("--auth-header-name <name>", "HTTP header carrying the credential. Required when --auth-type api_key.")
676
715
  .option("--tools <tools>", "Comma-separated list of tool names to include")
677
716
  .option("--all-tools", "Include all discovered tools")
678
717
  .option("--organization-id <id>", "Organization ID (skip selection)")
@@ -687,6 +726,7 @@ integrationCmd
687
726
  .option("--composio-client-id <id>", "BYO OAuth client ID")
688
727
  .option("--composio-client-secret <secret>", "BYO OAuth client secret")
689
728
  .option("--composio-client-bearer-token <token>", "BYO OAuth bearer token (optional)")
729
+ .option("--server-id <id>", "Reuse an existing Composio MCP server name for native integrations. When omitted a 30-char UUID-prefix is minted. Persisted on the integration as composio.server_id.")
690
730
  .option("--full", "Fully non-interactive: skip selection prompts (use session defaults) and the final confirmation. Missing required flags fail instead of prompting.")
691
731
  .action(async (options) => {
692
732
  try {
@@ -700,8 +740,15 @@ integrationCmd
700
740
  .command("discover")
701
741
  .description("Discover available tools from an MCP server")
702
742
  .option("--url <url>", "MCP server URL")
703
- .option("--auth-type <type>", "Authentication method: none or token")
704
- .option("--auth-token <token>", "Authentication token (when --auth-type token)")
743
+ .option("--transport-type <type>", "MCP transport: STREAMABLE_HTTP (default) or SSE")
744
+ .option("--auth-type <type>", "MCPAuthType: none | bearer_token | api_key | oauth_client_credentials. The CLI-only alias 'token' is mapped to 'bearer_token' before any wire emission.")
745
+ .option("--auth-token <token>", "Credential value — lands at authentication.value (bearer_token / api_key).")
746
+ .option("--auth-header-name <name>", "HTTP header carrying the credential (required for api_key).")
747
+ .option("--oauth-url <url>", "oauth_client_credentials: token-endpoint URL.")
748
+ .option("--oauth-method <method>", "oauth_client_credentials: HTTP method — GET or POST. Backend default: POST.")
749
+ .option("--oauth-client-id <id>", "oauth_client_credentials: OAuth client id.")
750
+ .option("--oauth-client-secret <secret>", "oauth_client_credentials: OAuth client secret.")
751
+ .option("--oauth-grant-type <grant>", "oauth_client_credentials: OAuth grant type. Backend default: client_credentials.")
705
752
  .option("--organization-id <id>", "Organization ID")
706
753
  .option("--account-id <id>", "Account ID")
707
754
  .option("--network-id <id>", "Agent/Network ID")
@@ -750,6 +797,29 @@ integrationCmd
750
797
  await handleError(e);
751
798
  }
752
799
  });
800
+ integrationCmd
801
+ .command("mcp-url")
802
+ .description("Provision (or reuse) a Composio MCP server; prints { server_id, server_url } (non-interactive; supports --json)")
803
+ // Validated inside the command so missing flags surface through the JSON
804
+ // error envelope rather than Commander's pre-action exit (same rationale
805
+ // as `integration tools` / `apollo send-message`).
806
+ .option("--toolkit <slug>", "Composio toolkit slug (e.g. gmail, notion)")
807
+ .option("--tools <names>", "Comma-separated allowed tool names")
808
+ .option("--all-tools", "Include every tool the toolkit exposes (discovered via Composio)")
809
+ .option("--server-id <id>", "Reuse an existing MCP server name (a 30-char UUID-prefix is minted when omitted)")
810
+ .option("--composio-user-id <id>", "Composio user id (defaults to the current agent's network-id)")
811
+ .option("--composio-api-key <key>", "Override Composio API key (otherwise: COMPOSIO_API_KEY env var or backend-issued key)")
812
+ .option("--organization-id <id>", "Organization ID")
813
+ .option("--account-id <id>", "Account ID")
814
+ .option("--network-id <id>", "Agent/Network ID")
815
+ .action(async (options) => {
816
+ try {
817
+ await integrationMcpUrl(options);
818
+ }
819
+ catch (e) {
820
+ await handleError(e);
821
+ }
822
+ });
753
823
  integrationCmd
754
824
  .command("test")
755
825
  .description("Live-call an integration endpoint: returns test_data (raw), parsed_test_response (after response_parser), and — without --raw — mapped_entities from bundle_mapping (always JSON; fully non-interactive)")
@@ -848,9 +918,15 @@ integrationCmd
848
918
  // Direct
849
919
  .option("--url <url>", "MCP server URL")
850
920
  .option("--transport-type <type>", "Transport: STREAMABLE_HTTP (default) or SSE")
851
- .option("--auth-type <type>", "Auth scheme: bearer_token, api_key, oauth_client_credentials, none (case-insensitive)")
852
- .option("--auth-token <token>", "Auth token/key value (used with --auth-type)")
853
- .option("--auth-header-name <name>", "Header name for api_key auth (e.g. X-API-Key)")
921
+ .option("--auth-type <type>", "MCPAuthType: none | bearer_token | api_key | oauth_client_credentials (case-insensitive). CLI-only alias 'token' → 'bearer_token'.")
922
+ .option("--auth-token <token>", "Credential value — lands at authentication.value (bearer_token / api_key).")
923
+ .option("--auth-header-name <name>", "HTTP header carrying the credential (required for api_key).")
924
+ // oauth_client_credentials
925
+ .option("--oauth-url <url>", "oauth_client_credentials: token-endpoint URL.")
926
+ .option("--oauth-method <method>", "oauth_client_credentials: HTTP method — GET or POST. Backend default: POST.")
927
+ .option("--oauth-client-id <id>", "oauth_client_credentials: OAuth client id.")
928
+ .option("--oauth-client-secret <secret>", "oauth_client_credentials: OAuth client secret.")
929
+ .option("--oauth-grant-type <grant>", "oauth_client_credentials: OAuth grant type. Backend default: client_credentials.")
854
930
  // Bundle mapping
855
931
  .option("--bundle-mapping <json>", "Full bundle_mapping object {response_mapping, parameters, scope_entities}")
856
932
  .option("--response-mapping <json>", "→ bundle_mapping.response_mapping")
@@ -859,15 +935,24 @@ integrationCmd
859
935
  .option("--raw", "Skip bundle_mapping — return raw tool response only")
860
936
  .addHelpText("after", `
861
937
  \x1b[1mAuthentication (DIRECT type)\x1b[0m
862
- Auth type is case-insensitive. Accepted values:
938
+ Auth type is case-insensitive. Accepted values mirror the backend
939
+ MCPAuthType enum — the same surface accepted by 'integration create'
940
+ and 'integration discover'.
863
941
 
864
- none No authentication (default when --auth-type is omitted)
865
- bearer_token Sends \`Authorization: Bearer <value>\`
866
- --auth-type bearer_token --auth-token <token>
867
- api_key Sends a custom header carrying the key
868
- --auth-type api_key --auth-token <key> --auth-header-name <Header-Name>
869
- oauth_client_credentials Client-credentials flow (credentials exchanged server-side)
870
- --auth-type oauth_client_credentials
942
+ none No authentication (default when --auth-type is omitted)
943
+ token CLI-only alias → mapped to bearer_token before any wire emission
944
+ --auth-type token --auth-token <tok>
945
+ bearer_token Sends \`Authorization: Bearer <value>\`
946
+ --auth-type bearer_token --auth-token <tok>
947
+ api_key Sends the key in a custom header
948
+ --auth-type api_key --auth-token <key> --auth-header-name <Header-Name>
949
+ oauth_client_credentials IA exchanges client credentials for a bearer token per session
950
+ --auth-type oauth_client_credentials
951
+ --oauth-url <token-endpoint>
952
+ --oauth-client-id <id>
953
+ --oauth-client-secret <secret>
954
+ [--oauth-method GET|POST] (default: POST)
955
+ [--oauth-grant-type <grant>] (default: client_credentials)
871
956
 
872
957
  \x1b[1mExamples\x1b[0m
873
958
  # Composio — send an email
@@ -885,6 +970,13 @@ integrationCmd
885
970
  --auth-type api_key --auth-token <key> --auth-header-name X-API-Key \\
886
971
  --tool <tool-name> --arguments '{}' --raw
887
972
 
973
+ # Direct — OAuth client credentials (raw)
974
+ aui integration mcp-test --type direct --url https://my-mcp.example.com/mcp \\
975
+ --auth-type oauth_client_credentials \\
976
+ --oauth-url https://auth.example.com/oauth/token \\
977
+ --oauth-client-id <client-id> --oauth-client-secret <client-secret> \\
978
+ --tool <tool-name> --arguments '{}' --raw
979
+
888
980
  # Direct — with bundle_mapping (returns mapped_entities)
889
981
  aui integration mcp-test --type direct --url https://my-mcp.example.com/mcp \\
890
982
  --auth-type bearer_token --auth-token <token> \\
@@ -938,20 +1030,19 @@ apolloCmd.addHelpText("after", `
938
1030
  [--version-id <id>] [--version-tag <tag>] [--json]
939
1031
  send-message Send a message and get the agent reply (POST /v1/messaging/messages)
940
1032
  --task-id <id> --text <msg>
941
- [--no-bundle] [--no-include-trace] [--agent-id <id>] [--path <dir>] [--json]
1033
+ [--agent-id <id>] [--path <dir>] [--json]
942
1034
  rerun Regenerate a thread from an interaction, then replay (POST /v1/messaging/messages/rerun)
943
1035
  --task-id <id> --interaction-id <id> --text <msg>
944
- [--no-bundle] [--no-include-trace] [--version-id <id>] [--version-tag <tag>] [--agent-id <id>] [--path <dir>] [--json]
1036
+ [--version-id <id>] [--version-tag <tag>] [--agent-id <id>] [--path <dir>] [--json]
945
1037
  trace Fetch interaction traces for a thread
946
1038
  --task-id <id> [--interaction-id <id>] [--agent-id <id>] [--json]
947
1039
  (with --interaction-id: that single interaction's trace)
948
1040
 
949
1041
  \x1b[1mNotes\x1b[0m
950
1042
  • Works for any agent (bundle-mode or records-mode).
951
- • send-message & rerun validate + forward your local .aui.json files by default, so the
952
- reply reflects your local edits. Pass --no-bundle to use the agent's stored/active config.
953
- • send-message & rerun include the trace by default (trace_info on the reply). Pass
954
- --no-include-trace to skip it and avoid the extra IA call.
1043
+ • send-message & rerun validate + forward your local .aui.json files, so the
1044
+ reply reflects your local edits.
1045
+ • send-message & rerun always include the trace (trace_info on the reply).
955
1046
  • create-thread returns a thread id — pass it to the other commands as --task-id.
956
1047
  • The id returned by send-message is the interaction id for rerun / trace --interaction-id.
957
1048
 
@@ -978,7 +1069,7 @@ apolloCmd
978
1069
  });
979
1070
  apolloCmd
980
1071
  .command("send-message")
981
- .description("Send a user message and get the agent reply (POST /v1/messaging/messages). By default it assembles + validates the local .aui.json files and forwards them as the agent settings bundle, so the reply reflects your local edits. Pass --no-bundle to use the agent's stored/active config instead")
1072
+ .description("Send a user message and get the agent reply (POST /v1/messaging/messages). It assembles + validates the local .aui.json files and forwards them as the agent settings bundle, so the reply reflects your local edits")
982
1073
  // NOT `requiredOption`: Commander's built-in required check exits
983
1074
  // before our action runs, bypassing the `--json` error envelope (a
984
1075
  // production contract consumed by agent-builder-bff). The action
@@ -988,18 +1079,9 @@ apolloCmd
988
1079
  .option("--task-id <id>", "Thread to send the message to (the id from `create-thread`)")
989
1080
  .option("--text <text>", "Message text to send")
990
1081
  .option("--agent-id <id>", "Agent-management ID for the bundle-mode check (defaults to .auirc agent_management_id)")
991
- // Trace is ON by default: the response trace_info is populated via a second
992
- // IA call (include_trace=true). `--no-include-trace` opts out (Commander
993
- // sets options.includeTrace=false). `--include-trace` is kept as a hidden
994
- // no-op alias for backward-compat with callers from the pre-default-on era.
995
- .option("--no-include-trace", "Skip the trace: do not populate the response trace_info (avoids the second IA call)")
996
- .addOption(new Option("--include-trace", "(deprecated; the trace is now included by default)").hideHelp().default(true))
997
- // Bundle is ON by default. `--no-bundle` opts out (Commander sets
998
- // options.bundle=false). `--with-bundle` is kept as a hidden no-op alias
999
- // for backward-compat with callers from the pre-default-on era.
1000
- .option("--no-bundle", "Skip the local bundle: send the message against the agent's stored/active config instead of your local .aui.json files")
1001
- .addOption(new Option("--with-bundle", "(deprecated; the bundle is now sent by default)").hideHelp())
1002
- .option("--path <dir>", "Agent project directory to read files from (defaults to the current project)")
1082
+ // The local bundle is always assembled + validated and sent, and the trace
1083
+ // is always requested (include_trace=true). There is no opt-out.
1084
+ .option("--path <dir>", "Imported agent project directory — must contain .auirc and .aui.json files, not a pre-built bundle (defaults to the current project)")
1003
1085
  .action(async (options) => {
1004
1086
  try {
1005
1087
  await apolloSendMessage(options);
@@ -1010,7 +1092,7 @@ apolloCmd
1010
1092
  });
1011
1093
  apolloCmd
1012
1094
  .command("rerun")
1013
- .description("Regenerate a thread from an interaction, then replay a message onto the cloned thread (POST /v1/messaging/messages/rerun). By default it forwards your validated local .aui.json bundle; pass --no-bundle to use the agent's stored/active config")
1095
+ .description("Regenerate a thread from an interaction, then replay a message onto the cloned thread (POST /v1/messaging/messages/rerun). It forwards your validated local .aui.json bundle so the reply reflects your local edits")
1014
1096
  // Plain `--option` (not requiredOption) so missing values surface
1015
1097
  // through our ValidationError → JSON error envelope, not Commander's
1016
1098
  // pre-action exit. See the note on `send-message`.
@@ -1020,15 +1102,10 @@ apolloCmd
1020
1102
  .option("--agent-id <id>", "Agent-management ID for the bundle-mode check + agent metadata (defaults to .auirc)")
1021
1103
  .option("--version-id <id>", "Agent version ID to attach as agent metadata (defaults to .auirc version_id)")
1022
1104
  .option("--version-tag <tag>", "Pin the rerun to a specific revision tag, e.g. v8.14 (defaults to .auirc version_tag)")
1023
- // Bundle is ON by default; `--no-bundle` opts out. `--with-bundle` kept as a
1024
- // hidden no-op alias for backward-compat. See the note on `send-message`.
1025
- .option("--no-bundle", "Skip the local bundle: rerun against the agent's stored/active config instead of your local .aui.json files")
1026
- .addOption(new Option("--with-bundle", "(deprecated; the bundle is now sent by default)").hideHelp())
1027
- // Trace is ON by default; `--no-include-trace` opts out. `--include-trace`
1028
- // kept as a hidden no-op alias for backward-compat. See `send-message`.
1029
- .option("--no-include-trace", "Skip the trace: do not populate trace_info on the replayed message (avoids the second IA call)")
1030
- .addOption(new Option("--include-trace", "(deprecated; the trace is now included by default)").hideHelp().default(true))
1031
- .option("--path <dir>", "Agent project directory to read files from (defaults to the current project)")
1105
+ // The local bundle is always assembled + validated and sent, and the trace
1106
+ // is always requested (include_trace=true). There is no opt-out. See the
1107
+ // note on `send-message`.
1108
+ .option("--path <dir>", "Imported agent project directory — must contain .auirc and .aui.json files, not a pre-built bundle (defaults to the current project)")
1032
1109
  .action(async (options) => {
1033
1110
  try {
1034
1111
  await apolloRerun(options);
@@ -1183,19 +1260,26 @@ versionCmd
1183
1260
  });
1184
1261
  versionCmd
1185
1262
  .command("create")
1186
- .description("Create a new draft version")
1187
- // No default here the command auto-picks per agent mode:
1188
- // bundle-modedefaults to `version` (clones the active
1189
- // version, since `agent-scope` is records-only).
1190
- // records-mode defaults to `agent-scope` (historical default).
1191
- .option("--source <type>", "Source: agent-scope | version | template (auto by agent mode if omitted)")
1192
- .option("--from <versionId>", "Clone from this version ID (when --source=version)")
1263
+ .description("Create a new draft version (single step, no prompts). Auto-detects the agent's storage mode and seeds the draft accordingly:\n" +
1264
+ " • bundle agent forks the agent's ACTIVE version (source=version)\n" +
1265
+ " • records agent snapshots the agent's current live scope (source=agent-scope)\n" +
1266
+ "Targets this project's agent from .auirc unless --agent-id is given. To fork from a SPECIFIC version, pass --source version --from <id>.")
1267
+ // The command auto-picks the source per agent mode when --source is omitted:
1268
+ // bundle-mode → `version` (clones the ACTIVE version; `agent-scope`
1269
+ // would 422 for blob-mode agents).
1270
+ // records-mode → `agent-scope` (snapshots the live scope).
1271
+ // To fork from a specific version on a records agent you must pass BOTH
1272
+ // `--source version --from <id>` (a bare `--from` defaults to agent-scope
1273
+ // and is ignored). On a bundle agent `--from <id>` works on its own since
1274
+ // the source already defaults to `version`.
1275
+ .option("--source <type>", "agent-scope | version | template. Omit to auto-pick by agent mode (bundle→version, records→agent-scope).")
1276
+ .option("--from <versionId>", "Fork the new draft from this specific version ID. Bundle agents: works on its own. Records agents: pair with `--source version`. Omit to fork from the agent's ACTIVE version (bundle) / snapshot the live scope (records).")
1193
1277
  .option("--from-template <templateAgentId>", "Clone from this template agent's bundle (when --source=template; requires kind=template, bundle-mode)")
1194
1278
  .option("--use", "Update .auirc to point at the new draft (so `aui push` targets it)")
1195
1279
  .option("--label <label>", "Version label")
1196
- .option("--tags <tags>", "Comma-separated tags")
1197
- .option("--notes <notes>", "Version notes")
1198
- .option("--agent-id <id>", "Agent ID (defaults to current)")
1280
+ .option("--tags <tags>", "Comma-separated tags (e.g. prod,stable)")
1281
+ .option("--notes <notes>", "Version notes / changelog for this draft")
1282
+ .option("--agent-id <id>", "Target a specific agent by agent-management ID (defaults to the project's .auirc agent)")
1199
1283
  .action(async (options) => {
1200
1284
  try {
1201
1285
  await versionCreate(options);