@ainative/cody-cli 0.6.0 → 0.7.0

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.
package/dist/cli.js CHANGED
@@ -199430,7 +199430,7 @@ async function loadAgentFromFile(filePath, pluginName, namespace, sourceName, pl
199430
199430
  }
199431
199431
  for (const field of ["permissionMode", "hooks", "mcpServers"]) {
199432
199432
  if (frontmatter[field] !== undefined) {
199433
- logForDebugging(`Plugin agent file ${filePath} sets ${field}, which is ignored for plugin agents. Use .claude/agents/ for this level of control.`, { level: "warn" });
199433
+ logForDebugging(`Plugin agent file ${filePath} sets ${field}, which is ignored for plugin agents. Use .ainative/agents/ for this level of control.`, { level: "warn" });
199434
199434
  }
199435
199435
  }
199436
199436
  const maxTurnsRaw = frontmatter.maxTurns;
@@ -245318,7 +245318,7 @@ async function performMCPXaaAuth(serverName, serverConfig, onAuthorizationUrl, a
245318
245318
  }
245319
245319
  const idp = getXaaIdpSettings();
245320
245320
  if (!idp) {
245321
- throw new Error("XAA: no IdP connection configured. Run 'claude mcp xaa setup --issuer <url> --client-id <id> --client-secret' to configure.");
245321
+ throw new Error("XAA: no IdP connection configured. Run 'cody mcp xaa setup --issuer <url> --client-id <id> --client-secret' to configure.");
245322
245322
  }
245323
245323
  const clientId = serverConfig.oauth?.clientId;
245324
245324
  if (!clientId) {
@@ -301182,8 +301182,8 @@ async function getInstallationPath() {
301182
301182
  }
301183
301183
  } catch {}
301184
301184
  try {
301185
- await getFsImplementation().stat(join58(homedir19(), ".local/bin/claude"));
301186
- return join58(homedir19(), ".local/bin/claude");
301185
+ await getFsImplementation().stat(join58(homedir19(), ".local/bin/cody"));
301186
+ return join58(homedir19(), ".local/bin/cody");
301187
301187
  } catch {}
301188
301188
  return "native";
301189
301189
  }
@@ -327990,7 +327990,7 @@ async function teleportResumeCodeSession(sessionId, onProgress) {
327990
327990
  sessionId
327991
327991
  });
327992
327992
  const notInRepoDisplay = repoValidation.sessionHost && repoValidation.sessionHost.toLowerCase() !== "github.com" ? `${repoValidation.sessionHost}/${repoValidation.sessionRepo}` : repoValidation.sessionRepo;
327993
- throw new TeleportOperationError(`You must run claude --teleport ${sessionId} from a checkout of ${notInRepoDisplay}.`, source_default.red(`You must run claude --teleport ${sessionId} from a checkout of ${source_default.bold(notInRepoDisplay)}.
327993
+ throw new TeleportOperationError(`You must run cody --teleport ${sessionId} from a checkout of ${notInRepoDisplay}.`, source_default.red(`You must run cody --teleport ${sessionId} from a checkout of ${source_default.bold(notInRepoDisplay)}.
327994
327994
  `));
327995
327995
  }
327996
327996
  case "mismatch": {
@@ -328000,8 +328000,8 @@ async function teleportResumeCodeSession(sessionId, onProgress) {
328000
328000
  const hostsDiffer = repoValidation.sessionHost && repoValidation.currentHost && repoValidation.sessionHost.replace(/:\d+$/, "").toLowerCase() !== repoValidation.currentHost.replace(/:\d+$/, "").toLowerCase();
328001
328001
  const sessionDisplay = hostsDiffer ? `${repoValidation.sessionHost}/${repoValidation.sessionRepo}` : repoValidation.sessionRepo;
328002
328002
  const currentDisplay = hostsDiffer ? `${repoValidation.currentHost}/${repoValidation.currentRepo}` : repoValidation.currentRepo;
328003
- throw new TeleportOperationError(`You must run claude --teleport ${sessionId} from a checkout of ${sessionDisplay}.
328004
- This repo is ${currentDisplay}.`, source_default.red(`You must run claude --teleport ${sessionId} from a checkout of ${source_default.bold(sessionDisplay)}.
328003
+ throw new TeleportOperationError(`You must run cody --teleport ${sessionId} from a checkout of ${sessionDisplay}.
328004
+ This repo is ${currentDisplay}.`, source_default.red(`You must run cody --teleport ${sessionId} from a checkout of ${source_default.bold(sessionDisplay)}.
328005
328005
  This repo is ${source_default.bold(currentDisplay)}.
328006
328006
  `));
328007
328007
  }
@@ -373486,7 +373486,7 @@ When spawning teammates via the Agent tool, choose the \`subagent_type\` based o
373486
373486
 
373487
373487
  - **Read-only agents** (e.g., Explore, Plan) cannot edit or write files. Only assign them research, search, or planning tasks. Never assign them implementation work.
373488
373488
  - **Full-capability agents** (e.g., general-purpose) have access to all tools including file editing, writing, and bash. Use these for tasks that require making changes.
373489
- - **Custom agents** defined in \`.claude/agents/\` may have their own tool restrictions. Check their descriptions to understand what they can and cannot do.
373489
+ - **Custom agents** defined in \`.ainative/agents/\` may have their own tool restrictions. Check their descriptions to understand what they can and cannot do.
373490
373490
 
373491
373491
  Always review the agent type descriptions and their available tools listed in the Agent tool prompt before selecting a \`subagent_type\` for a teammate.
373492
373492
 
@@ -433306,7 +433306,7 @@ function MCPSettings(t0) {
433306
433306
  return;
433307
433307
  }
433308
433308
  if (servers.length === 0 && agentMcpServers.length === 0) {
433309
- onComplete("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://ainative.studio/docs/cody-cli/docs/en/mcp to learn more.");
433309
+ onComplete("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `cody mcp --help` or visit https://ainative.studio/docs/cody-cli/docs/en/mcp to learn more.");
433310
433310
  }
433311
433311
  };
433312
433312
  t8 = [servers.length, filteredClients.length, agentMcpServers.length, onComplete];
@@ -476156,7 +476156,7 @@ function LocationStep() {
476156
476156
  let t0;
476157
476157
  if ($3[0] === Symbol.for("react.memo_cache_sentinel")) {
476158
476158
  t0 = {
476159
- label: "Project (.claude/agents/)",
476159
+ label: "Project (.ainative/agents/)",
476160
476160
  value: "projectSettings"
476161
476161
  };
476162
476162
  $3[0] = t0;
@@ -488286,7 +488286,7 @@ Include 3 friction categories with 2 examples each.`,
488286
488286
 
488287
488287
  ## CC FEATURES REFERENCE (pick from these for features_to_try):
488288
488288
  1. **MCP Servers**: Connect Claude to external tools, databases, and APIs via Model Context Protocol.
488289
- - How to use: Run \`claude mcp add <server-name> -- <command>\`
488289
+ - How to use: Run \`cody mcp add <server-name> -- <command>\`
488290
488290
  - Good for: database queries, Slack integration, GitHub issue lookup, connecting to internal APIs
488291
488291
 
488292
488292
  2. **Custom Skills**: Reusable prompts you define as markdown files that run with a single /command.
@@ -496739,7 +496739,7 @@ async function executePostCompactHooks(compactData, signal, timeoutMs = TOOL_HOO
496739
496739
  `) : undefined
496740
496740
  };
496741
496741
  }
496742
- async function executeSessionEndHooks(
496742
+ async function executeSessionEndHooks(reason, options) {
496743
496743
  // ZeroDB session-memory auto-save (cody-cli#13)
496744
496744
  try {
496745
496745
  var _baseUrl2 = process.env.ANTHROPIC_BASE_URL || 'https://api.ainative.studio';
@@ -496747,20 +496747,18 @@ async function executeSessionEndHooks(
496747
496747
  if (_apiKey2 && _baseUrl2.includes('ainative')) {
496748
496748
  var _cwd2 = typeof getCwd === 'function' ? getCwd() : process.cwd();
496749
496749
  var _project2 = _cwd2.split('/').pop() || 'unknown';
496750
- var _sessionId2 = typeof getSessionId === 'function' ? getSessionId() : 'unknown';
496751
- // Save a summary memory of this session
496752
496750
  fetch(_baseUrl2 + '/api/v1/public/cody/session-memory', {
496753
496751
  method: 'POST',
496754
496752
  headers: { 'Content-Type': 'application/json', 'x-api-key': _apiKey2 },
496755
496753
  body: JSON.stringify({
496756
- session_id: _sessionId2,
496754
+ session_id: 'session-' + Date.now(),
496757
496755
  project: _project2,
496758
496756
  memories: [{ content: 'Session in ' + _project2 + ' at ' + new Date().toISOString(), memory_type: 'auto', entities: [_project2] }]
496759
496757
  }),
496760
- }).catch(function() {}); // fire and forget
496758
+ }).catch(function() {});
496761
496759
  }
496762
- } catch(e) { /* silent */ }
496763
- reason, options) {
496760
+ } catch(e) {}
496761
+
496764
496762
  const {
496765
496763
  getAppState,
496766
496764
  setAppState,
@@ -554510,7 +554508,7 @@ function TeleportRepoMismatchDialog(t0) {
554510
554508
  /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
554511
554509
  dimColor: true,
554512
554510
  children: [
554513
- "Run claude --teleport from a checkout of ",
554511
+ "Run cody --teleport from a checkout of ",
554514
554512
  targetRepo
554515
554513
  ]
554516
554514
  }, undefined, true, undefined, this)
@@ -556565,7 +556563,7 @@ var init_stuck = __esm(() => {
556565
556563
 
556566
556564
  // src/skills/bundled/updateConfig.ts
556567
556565
  function generateSettingsSchema() {
556568
- const jsonSchema = toJSONSchema(SettingsSchema(), { io: "input" });
556566
+ const jsonSchema = toJSONSchema(SettingsSchema(), { io: "input", unrepresentable: "any" });
556569
556567
  return jsonStringify(jsonSchema, null, 2);
556570
556568
  }
556571
556569
  function registerUpdateConfigSkill() {
@@ -557203,24 +557201,24 @@ function registerMcpAddCommand(mcp2) {
557203
557201
 
557204
557202
  ` + `Examples:
557205
557203
  ` + ` # Add HTTP server:
557206
- ` + ` claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
557204
+ ` + ` cody mcp add --transport http sentry https://mcp.sentry.dev/mcp
557207
557205
 
557208
557206
  ` + ` # Add HTTP server with headers:
557209
- ` + ` claude mcp add --transport http corridor https://app.corridor.dev/api/mcp --header "Authorization: Bearer ..."
557207
+ ` + ` cody mcp add --transport http corridor https://app.corridor.dev/api/mcp --header "Authorization: Bearer ..."
557210
557208
 
557211
557209
  ` + ` # Add stdio server with environment variables:
557212
- ` + ` claude mcp add -e API_KEY=xxx my-server -- npx my-mcp-server
557210
+ ` + ` cody mcp add -e API_KEY=xxx my-server -- npx my-mcp-server
557213
557211
 
557214
557212
  ` + ` # Add stdio server with subprocess flags:
557215
- ` + " claude mcp add my-server -- my-command --some-flag arg1").option("-s, --scope <scope>", "Configuration scope (local, user, or project)", "local").option("-t, --transport <transport>", "Transport type (stdio, sse, http). Defaults to stdio if not specified.").option("-e, --env <env...>", "Set environment variables (e.g. -e KEY=value)").option("-H, --header <header...>", 'Set WebSocket headers (e.g. -H "X-Api-Key: abc123" -H "X-Custom: value")').option("--client-id <clientId>", "OAuth client ID for HTTP/SSE servers").option("--client-secret", "Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var)").option("--callback-port <port>", "Fixed port for OAuth callback (for servers requiring pre-registered redirect URIs)").helpOption("-h, --help", "Display help for command").addOption(new Option("--xaa", "Enable XAA (SEP-990) for this server. Requires 'claude mcp xaa setup' first. Also requires --client-id and --client-secret (for the MCP server's AS).").hideHelp(!isXaaEnabled())).action(async (name3, commandOrUrl, args, options) => {
557213
+ ` + " cody mcp add my-server -- my-command --some-flag arg1").option("-s, --scope <scope>", "Configuration scope (local, user, or project)", "local").option("-t, --transport <transport>", "Transport type (stdio, sse, http). Defaults to stdio if not specified.").option("-e, --env <env...>", "Set environment variables (e.g. -e KEY=value)").option("-H, --header <header...>", 'Set WebSocket headers (e.g. -H "X-Api-Key: abc123" -H "X-Custom: value")').option("--client-id <clientId>", "OAuth client ID for HTTP/SSE servers").option("--client-secret", "Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var)").option("--callback-port <port>", "Fixed port for OAuth callback (for servers requiring pre-registered redirect URIs)").helpOption("-h, --help", "Display help for command").addOption(new Option("--xaa", "Enable XAA (SEP-990) for this server. Requires 'cody mcp xaa setup' first. Also requires --client-id and --client-secret (for the MCP server's AS).").hideHelp(!isXaaEnabled())).action(async (name3, commandOrUrl, args, options) => {
557216
557214
  const actualCommand = commandOrUrl;
557217
557215
  const actualArgs = args;
557218
557216
  if (!name3) {
557219
557217
  cliError(`Error: Server name is required.
557220
- ` + "Usage: claude mcp add <name> <command> [args...]");
557218
+ ` + "Usage: cody mcp add <name> <command> [args...]");
557221
557219
  } else if (!actualCommand) {
557222
557220
  cliError(`Error: Command is required when server name is provided.
557223
- ` + "Usage: claude mcp add <name> <command> [args...]");
557221
+ ` + "Usage: cody mcp add <name> <command> [args...]");
557224
557222
  }
557225
557223
  try {
557226
557224
  const scope = ensureConfigScope(options.scope);
@@ -557236,7 +557234,7 @@ function registerMcpAddCommand(mcp2) {
557236
557234
  if (!options.clientSecret)
557237
557235
  missing.push("--client-secret");
557238
557236
  if (!getXaaIdpSettings()) {
557239
- missing.push("'claude mcp xaa setup' (settings.xaaIdp not configured)");
557237
+ missing.push("'cody mcp xaa setup' (settings.xaaIdp not configured)");
557240
557238
  }
557241
557239
  if (missing.length) {
557242
557240
  cliError(`Error: --xaa requires: ${missing.join(", ")}`);
@@ -557317,9 +557315,9 @@ function registerMcpAddCommand(mcp2) {
557317
557315
  process.stderr.write(`
557318
557316
  Warning: The command "${actualCommand}" looks like a URL, but is being interpreted as a stdio server as --transport was not specified.
557319
557317
  `);
557320
- process.stderr.write(`If this is an HTTP server, use: claude mcp add --transport http ${name3} ${actualCommand}
557318
+ process.stderr.write(`If this is an HTTP server, use: cody mcp add --transport http ${name3} ${actualCommand}
557321
557319
  `);
557322
- process.stderr.write(`If this is an SSE server, use: claude mcp add --transport sse ${name3} ${actualCommand}
557320
+ process.stderr.write(`If this is an SSE server, use: cody mcp add --transport sse ${name3} ${actualCommand}
557323
557321
  `);
557324
557322
  }
557325
557323
  const env5 = parseEnvVars(options.env);
@@ -557398,7 +557396,7 @@ function registerMcpXaaIdpCommand(mcp2) {
557398
557396
  xaaIdp.command("login").description("Cache an IdP id_token so XAA-enabled MCP servers authenticate " + "silently. Default: run the OIDC browser login. With --id-token: " + "write a pre-obtained JWT directly (used by conformance/e2e tests " + "where the mock IdP does not serve /authorize).").option("--force", "Ignore any cached id_token and re-login (useful after IdP-side revocation)").option("--id-token <jwt>", "Write this pre-obtained id_token directly to cache, skipping the OIDC browser login").action(async (options) => {
557399
557397
  const idp = getXaaIdpSettings();
557400
557398
  if (!idp) {
557401
- return cliError("Error: no XAA IdP connection. Run 'claude mcp xaa setup' first.");
557399
+ return cliError("Error: no XAA IdP connection. Run 'cody mcp xaa setup' first.");
557402
557400
  }
557403
557401
  if (options.idToken) {
557404
557402
  const expiresAt = saveIdpIdTokenFromJwt(idp.issuer, options.idToken);
@@ -557447,7 +557445,7 @@ function registerMcpXaaIdpCommand(mcp2) {
557447
557445
  }
557448
557446
  process.stdout.write(`Client secret: ${hasSecret ? "(stored in keychain)" : "(not set \u2014 PKCE-only)"}
557449
557447
  `);
557450
- process.stdout.write(`Logged in: ${hasIdToken ? "yes (id_token cached)" : "no \u2014 run 'claude mcp xaa login'"}
557448
+ process.stdout.write(`Logged in: ${hasIdToken ? "yes (id_token cached)" : "no \u2014 run 'cody mcp xaa login'"}
557451
557449
  `);
557452
557450
  cliOk();
557453
557451
  });
@@ -568284,7 +568282,7 @@ async function mcpRemoveHandler(name3, options) {
568284
568282
  To remove from a specific scope, use:
568285
568283
  `);
568286
568284
  scopes.forEach((scope) => {
568287
- process.stderr.write(` claude mcp remove "${name3}" -s ${scope}
568285
+ process.stderr.write(` cody mcp remove "${name3}" -s ${scope}
568288
568286
  `);
568289
568287
  });
568290
568288
  cliError();
@@ -568299,7 +568297,7 @@ async function mcpListHandler() {
568299
568297
  servers: configs
568300
568298
  } = await getAllMcpConfigs();
568301
568299
  if (Object.keys(configs).length === 0) {
568302
- console.log("No MCP servers configured. Use `claude mcp add` to add a server.");
568300
+ console.log("No MCP servers configured. Use `cody mcp add` to add a server.");
568303
568301
  } else {
568304
568302
  console.log(`Checking MCP server health...
568305
568303
  `);
@@ -568397,7 +568395,7 @@ async function mcpGetHandler(name3) {
568397
568395
  }
568398
568396
  }
568399
568397
  console.log(`
568400
- To remove this server, run: claude mcp remove "${name3}" -s ${server.scope}`);
568398
+ To remove this server, run: cody mcp remove "${name3}" -s ${server.scope}`);
568401
568399
  await gracefulShutdown(0);
568402
568400
  }
568403
568401
  async function mcpAddJsonHandler(name3, json2, options) {
@@ -569026,10 +569024,10 @@ function getInstallationPath2() {
569026
569024
  const isWindows3 = env4.platform === "win32";
569027
569025
  const homeDir = homedir38();
569028
569026
  if (isWindows3) {
569029
- const windowsPath = join149(homeDir, ".local", "bin", "claude.exe");
569027
+ const windowsPath = join149(homeDir, ".local", "bin", "cody.exe");
569030
569028
  return windowsPath.replace(/\//g, "\\");
569031
569029
  }
569032
- return "~/.local/bin/claude";
569030
+ return "~/.local/bin/cody";
569033
569031
  }
569034
569032
  function SetupNotes(t0) {
569035
569033
  const $3 = import_compiler_runtime388.c(5);
@@ -571664,7 +571662,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
571664
571662
  `);
571665
571663
  process.stdout.write(`View: ${getRemoteSessionUrl(createdSession.id)}?m=0
571666
571664
  `);
571667
- process.stdout.write(`Resume with: claude --teleport ${createdSession.id}
571665
+ process.stdout.write(`Resume with: cody --teleport ${createdSession.id}
571668
571666
  `);
571669
571667
  await gracefulShutdown(0);
571670
571668
  process.exit(0);
@@ -571748,7 +571746,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
571748
571746
  await gracefulShutdown(0);
571749
571747
  }
571750
571748
  } else {
571751
- throw new TeleportOperationError(`You must run claude --teleport ${teleport} from a checkout of ${sessionRepo}.`, source_default.red(`You must run claude --teleport ${teleport} from a checkout of ${source_default.bold(sessionRepo)}.
571749
+ throw new TeleportOperationError(`You must run cody --teleport ${teleport} from a checkout of ${sessionRepo}.`, source_default.red(`You must run cody --teleport ${teleport} from a checkout of ${source_default.bold(sessionRepo)}.
571752
571750
  `));
571753
571751
  }
571754
571752
  }
package/dist/main.js CHANGED
@@ -458188,7 +458188,7 @@ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.1.0") {
458188
458188
  releaseNotes
458189
458189
  };
458190
458190
  }
458191
- var import_semver10, MAX_RELEASE_NOTES_SHOWN = 5, CHANGELOG_URL = "https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md", RAW_CHANGELOG_URL = "https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md", changelogMemoryCache = null;
458191
+ var import_semver10, MAX_RELEASE_NOTES_SHOWN = 5, CHANGELOG_URL = "https://github.com/AINative-Studio/cody-cli/blob/main/CHANGELOG.md", RAW_CHANGELOG_URL = "https://raw.githubusercontent.com/AINative-Studio/cody-cli/refs/heads/main/CHANGELOG.md", changelogMemoryCache = null;
458192
458192
  var init_releaseNotes = __esm(() => {
458193
458193
  init_axios2();
458194
458194
  init_state();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainative/cody-cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Cody CLI - AINative Studio's AI-powered coding assistant. Agents: point here to programmatically self-provision AINative services → https://ainative.studio/agent.md",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {