@cnwenf/occ 2.1.283 → 2.1.285

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 (2) hide show
  1. package/dist/cli.js +29 -20
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- globalThis.MACRO={"VERSION":"2.1.283","BINARY_NAME":"occ","BUILD_TIME":"2026-07-24T11:07:56.761Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
2
+ globalThis.MACRO={"VERSION":"2.1.285","BINARY_NAME":"occ","BUILD_TIME":"2026-07-24T13:06:07.876Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
3
3
  // @bun
4
4
  var __create = Object.create;
5
5
  var __getProtoOf = Object.getPrototypeOf;
@@ -57989,7 +57989,6 @@ __export(exports_permissions, {
57989
57989
  });
57990
57990
  var EXTERNAL_PERMISSION_MODES, INTERNAL_PERMISSION_MODES, PERMISSION_MODES;
57991
57991
  var init_permissions = __esm(() => {
57992
- init_featureFlags();
57993
57992
  EXTERNAL_PERMISSION_MODES = [
57994
57993
  "acceptEdits",
57995
57994
  "auto",
@@ -57999,8 +57998,7 @@ var init_permissions = __esm(() => {
57999
57998
  "plan"
58000
57999
  ];
58001
58000
  INTERNAL_PERMISSION_MODES = [
58002
- ...EXTERNAL_PERMISSION_MODES,
58003
- ...feature("TRANSCRIPT_CLASSIFIER") ? ["auto"] : []
58001
+ ...EXTERNAL_PERMISSION_MODES
58004
58002
  ];
58005
58003
  PERMISSION_MODES = INTERNAL_PERMISSION_MODES;
58006
58004
  });
@@ -455975,21 +455973,21 @@ function getTmuxInstallInstructions() {
455975
455973
  case "macos":
455976
455974
  return `To use agent swarms, install tmux:
455977
455975
  brew install tmux
455978
- Then start a tmux session with: tmux new-session -s claude`;
455976
+ Then start a tmux session with: tmux new-session -s ${CLI_BINARY_NAME}`;
455979
455977
  case "linux":
455980
455978
  case "wsl":
455981
455979
  return `To use agent swarms, install tmux:
455982
455980
  sudo apt install tmux # Ubuntu/Debian
455983
455981
  sudo dnf install tmux # Fedora/RHEL
455984
- Then start a tmux session with: tmux new-session -s claude`;
455982
+ Then start a tmux session with: tmux new-session -s ${CLI_BINARY_NAME}`;
455985
455983
  case "windows":
455986
455984
  return `To use agent swarms, you need tmux which requires WSL (Windows Subsystem for Linux).
455987
455985
  Install WSL first, then inside WSL run:
455988
455986
  sudo apt install tmux
455989
- Then start a tmux session with: tmux new-session -s claude`;
455987
+ Then start a tmux session with: tmux new-session -s ${CLI_BINARY_NAME}`;
455990
455988
  default:
455991
455989
  return `To use agent swarms, install tmux using your system's package manager.
455992
- Then start a tmux session with: tmux new-session -s claude`;
455990
+ Then start a tmux session with: tmux new-session -s ${CLI_BINARY_NAME}`;
455993
455991
  }
455994
455992
  }
455995
455993
  function getBackendByType(type) {
@@ -456074,6 +456072,7 @@ var init_registry = __esm(() => {
456074
456072
  init_state();
456075
456073
  init_debug();
456076
456074
  init_platform2();
456075
+ init_cli();
456077
456076
  init_detection();
456078
456077
  init_InProcessBackend();
456079
456078
  init_it2Setup();
@@ -686965,6 +686964,7 @@ function getActiveNotices(context8) {
686965
686964
  var jsx_runtime274, largeMemoryFilesNotice, claudeAiSubscriberExternalTokenNotice, apiKeyConflictNotice, bothAuthMethodsNotice, largeAgentDescriptionsNotice, jetbrainsPluginNotice, statusNoticeDefinitions;
686966
686965
  var init_statusNoticeDefinitions = __esm(() => {
686967
686966
  init_ink2();
686967
+ init_cli();
686968
686968
  init_claudemd();
686969
686969
  init_figures();
686970
686970
  init_context();
@@ -687043,7 +687043,8 @@ var init_statusNoticeDefinitions = __esm(() => {
687043
687043
  authTokenInfo.source,
687044
687044
  " instead of Claude account subscription token. Either unset ",
687045
687045
  authTokenInfo.source,
687046
- ", or run `claude /logout`."
687046
+ ", or run",
687047
+ `\`${CLI_BINARY_NAME} /logout\`.`
687047
687048
  ]
687048
687049
  })
687049
687050
  ]
@@ -687082,7 +687083,9 @@ var init_statusNoticeDefinitions = __esm(() => {
687082
687083
  apiKeySource,
687083
687084
  " instead of Anthropic Console key. Either unset ",
687084
687085
  apiKeySource,
687085
- ", or run `occ /logout`."
687086
+ ", or run ",
687087
+ `\`${CLI_BINARY_NAME} /logout\`.`,
687088
+ "."
687086
687089
  ]
687087
687090
  })
687088
687091
  ]
@@ -687143,7 +687146,7 @@ var init_statusNoticeDefinitions = __esm(() => {
687143
687146
  authTokenInfo.source === "claude.ai" ? "claude.ai" : authTokenInfo.source,
687144
687147
  "?",
687145
687148
  " ",
687146
- apiKeySource === "ANTHROPIC_API_KEY" ? 'Unset the ANTHROPIC_API_KEY environment variable, or claude /logout then say "No" to the API key approval before login.' : apiKeySource === "apiKeyHelper" ? "Unset the apiKeyHelper setting." : "claude /logout"
687149
+ apiKeySource === "ANTHROPIC_API_KEY" ? `Unset the ANTHROPIC_API_KEY environment variable, or ${CLI_BINARY_NAME} /logout then say "No" to the API key approval before login.` : apiKeySource === "apiKeyHelper" ? "Unset the apiKeyHelper setting." : `${CLI_BINARY_NAME} /logout`
687147
687150
  ]
687148
687151
  }),
687149
687152
  /* @__PURE__ */ jsx_runtime274.jsxs(ThemedText, {
@@ -687153,7 +687156,7 @@ var init_statusNoticeDefinitions = __esm(() => {
687153
687156
  apiKeySource,
687154
687157
  "?",
687155
687158
  " ",
687156
- authTokenInfo.source === "claude.ai" ? "claude /logout to sign out of claude.ai." : `Unset the ${authTokenInfo.source} environment variable.`
687159
+ authTokenInfo.source === "claude.ai" ? `${CLI_BINARY_NAME} /logout to sign out of claude.ai.` : `Unset the ${authTokenInfo.source} environment variable.`
687157
687160
  ]
687158
687161
  })
687159
687162
  ]
@@ -823120,7 +823123,7 @@ async function run() {
823120
823123
  await init2();
823121
823124
  profileCheckpoint("preAction_after_init");
823122
823125
  if (!isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_TERMINAL_TITLE)) {
823123
- process.title = "claude";
823126
+ process.title = CLI_BINARY_NAME;
823124
823127
  }
823125
823128
  const {
823126
823129
  initSinks: initSinks2
@@ -823168,7 +823171,7 @@ async function run() {
823168
823171
  }
823169
823172
  profileCheckpoint("preAction_after_settings_sync");
823170
823173
  });
823171
- program3.name("claude").description(`Claude Code - starts an interactive session by default, use -p/--print for non-interactive output`).argument("[prompt]", "Your prompt", String).helpOption("-h, --help", "Display help for command").option("-d, --debug [filter]", 'Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file")', (_value) => {
823174
+ program3.name(CLI_BINARY_NAME).description(`Claude Code - starts an interactive session by default, use -p/--print for non-interactive output`).argument("[prompt]", "Your prompt", String).helpOption("-h, --help", "Display help for command").option("-d, --debug [filter]", 'Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file")', (_value) => {
823172
823175
  return true;
823173
823176
  }).addOption(new Option("--debug-to-stderr", "Enable debug mode (to stderr)").argParser(Boolean).hideHelp()).option("--debug-file <path>", "Write debug logs to a specific file path (implicitly enables debug mode)", () => true).option("--verbose", "Override verbose mode setting from config", () => true).option("-p, --print", "Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when Claude is run with the -p mode. Only use this flag in directories you trust.", () => true).option("--bare", "Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CLAUDE.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials. Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file], --append-system-prompt[-file], --add-dir (CLAUDE.md dirs), --mcp-config, --settings, --agents, --plugin-dir.", () => true).option("--safe-mode", 'Start in safe mode: disable all plugins, bundled skills, and hooks. Used for troubleshooting ("is a plugin/hook causing my problem?").', () => true).option("--ax-screen-reader", "Render screen-reader friendly output (flat text, no decorative borders or animations). Overridden by the CLAUDE_AX_SCREEN_READER env var and the axScreenReader setting.", () => true).addOption(new Option("--init", "Run Setup hooks with init trigger, then continue").hideHelp()).addOption(new Option("--init-only", "Run Setup and SessionStart:startup hooks, then exit").hideHelp()).addOption(new Option("--maintenance", "Run Setup hooks with maintenance trigger, then continue").hideHelp()).addOption(new Option("--output-format <format>", 'Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming)').choices(["text", "json", "stream-json"])).addOption(new Option("--json-schema <schema>", 'JSON Schema for structured output validation. Example: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}').argParser(String)).option("--include-hook-events", "Include all hook lifecycle events in the output stream (only works with --output-format=stream-json)", () => true).option("--include-partial-messages", "Include partial message chunks as they arrive (only works with --print and --output-format=stream-json)", () => true).option("--forward-subagent-text", "Forward subagent text and thinking blocks as assistant/user messages with parent_tool_use_id set (only works with --print and --output-format=stream-json)", () => true).addOption(new Option("--input-format <format>", 'Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input)').choices(["text", "stream-json"])).option("--mcp-debug", "[DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors)", () => true).option("--dangerously-skip-permissions", "Bypass all permission checks. Recommended only for sandboxes with no internet access.", () => true).option("--allow-dangerously-skip-permissions", "Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for sandboxes with no internet access.", () => true).option("--dangerously-skip-protected-paths", "Skip permission prompts for writes to protected paths (.claude/, .git/, .vscode/, shell configs). These paths are protected because editing them can execute code or alter tool behavior. Use with caution.", () => true).addOption(new Option("--thinking <mode>", "Thinking mode: enabled (equivalent to adaptive), disabled").choices(["enabled", "adaptive", "disabled"]).hideHelp()).addOption(new Option("--max-thinking-tokens <tokens>", "[DEPRECATED. Use --thinking instead for newer models] Maximum number of thinking tokens (only works with --print)").argParser(Number).hideHelp()).addOption(new Option("--max-turns <turns>", "Maximum number of agentic turns in non-interactive mode. This will early exit the conversation after the specified number of turns. (only works with --print)").argParser(Number).hideHelp()).addOption(new Option("--max-budget-usd <amount>", "Maximum dollar amount to spend on API calls (only works with --print)").argParser((value) => {
823174
823177
  const amount = Number(value);
@@ -823182,17 +823185,22 @@ async function run() {
823182
823185
  throw new Error("--task-budget must be a positive integer");
823183
823186
  }
823184
823187
  return tokens;
823185
- }).hideHelp()).option("--replay-user-messages", "Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and --output-format=stream-json)", () => true).addOption(new Option("--enable-auth-status", "Enable auth status messages in SDK mode").default(false).hideHelp()).option("--allowedTools, --allowed-tools <tools...>", 'Comma or space-separated list of tool names to allow (e.g. "Bash(git:*) Edit")').option("--tools <tools...>", 'Specify the list of available tools from the built-in set. Use "" to disable all tools, "default" to use all tools, or specify tool names (e.g. "Bash,Edit,Read").').option("--disallowedTools, --disallowed-tools <tools...>", 'Comma or space-separated list of tool names to deny (e.g. "Bash(git:*) Edit")').option("--mcp-config <configs...>", "Load MCP servers from JSON files or strings (space-separated)").addOption(new Option("--permission-prompt-tool <tool>", "MCP tool to use for permission prompts (only works with --print)").argParser(String).hideHelp()).addOption(new Option("--system-prompt <prompt>", "System prompt to use for the session").argParser(String)).addOption(new Option("--system-prompt-file <file>", "Read system prompt from a file").argParser(String).hideHelp()).addOption(new Option("--append-system-prompt <prompt>", "Append a system prompt to the default system prompt").argParser(String)).addOption(new Option("--append-system-prompt-file <file>", "Read system prompt from a file and append to the default system prompt").argParser(String).hideHelp()).addOption(new Option("--permission-mode <mode>", "Permission mode to use for the session").argParser(String).choices(PERMISSION_MODES)).option("-c, --continue", "Continue the most recent conversation in the current directory", () => true).option("-r, --resume [value]", "Resume a conversation by session ID, or open interactive picker with optional search term", (value) => value || true).option("--fork-session", "When resuming, create a new session ID instead of reusing the original (use with --resume or --continue)", () => true).addOption(new Option("--prefill <text>", "Pre-fill the prompt input with text without submitting it").hideHelp()).addOption(new Option("--deep-link-origin", "Signal that this session was launched from a deep link").hideHelp()).addOption(new Option("--deep-link-repo <slug>", "Repo slug the deep link ?repo= parameter resolved to the current cwd").hideHelp()).addOption(new Option("--deep-link-last-fetch <ms>", "FETCH_HEAD mtime in epoch ms, precomputed by the deep link trampoline").argParser((v6) => {
823188
+ }).hideHelp()).option("--replay-user-messages", "Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and --output-format=stream-json)", () => true).addOption(new Option("--enable-auth-status", "Enable auth status messages in SDK mode").default(false).hideHelp()).option("--allowedTools, --allowed-tools <tools...>", 'Comma or space-separated list of tool names to allow (e.g. "Bash(git:*) Edit")').option("--tools <tools...>", 'Specify the list of available tools from the built-in set. Use "" to disable all tools, "default" to use all tools, or specify tool names (e.g. "Bash,Edit,Read").').option("--disallowedTools, --disallowed-tools <tools...>", 'Comma or space-separated list of tool names to deny (e.g. "Bash(git:*) Edit")').option("--mcp-config <configs...>", "Load MCP servers from JSON files or strings (space-separated)").addOption(new Option("--permission-prompt-tool <tool>", "MCP tool to use for permission prompts (only works with --print)").argParser(String).hideHelp()).addOption(new Option("--system-prompt <prompt>", "System prompt to use for the session").argParser(String)).addOption(new Option("--system-prompt-file <file>", "Read system prompt from a file").argParser(String).hideHelp()).addOption(new Option("--append-system-prompt <prompt>", "Append a system prompt to the default system prompt").argParser(String)).addOption(new Option("--append-system-prompt-file <file>", "Read system prompt from a file and append to the default system prompt").argParser(String).hideHelp()).addOption(new Option("--permission-mode <mode>", "Permission mode to use for the session").choices(PERMISSION_MODES).argParser((raw) => {
823189
+ const normalized = normalizePermissionModeInput(raw);
823190
+ if (!PERMISSION_MODES.includes(normalized)) {
823191
+ throw new InvalidArgumentError(`Allowed choices are ${PERMISSION_MODES.join(", ")}.`);
823192
+ }
823193
+ return normalized;
823194
+ })).option("-c, --continue", "Continue the most recent conversation in the current directory", () => true).option("-r, --resume [value]", "Resume a conversation by session ID, or open interactive picker with optional search term", (value) => value || true).option("--fork-session", "When resuming, create a new session ID instead of reusing the original (use with --resume or --continue)", () => true).addOption(new Option("--prefill <text>", "Pre-fill the prompt input with text without submitting it").hideHelp()).addOption(new Option("--deep-link-origin", "Signal that this session was launched from a deep link").hideHelp()).addOption(new Option("--deep-link-repo <slug>", "Repo slug the deep link ?repo= parameter resolved to the current cwd").hideHelp()).addOption(new Option("--deep-link-last-fetch <ms>", "FETCH_HEAD mtime in epoch ms, precomputed by the deep link trampoline").argParser((v6) => {
823186
823195
  const n6 = Number(v6);
823187
823196
  return Number.isFinite(n6) ? n6 : undefined;
823188
- }).hideHelp()).option("--from-pr [value]", "Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term", (value) => value || true).option("--no-session-persistence", "Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print)").addOption(new Option("--resume-session-at <message id>", "When resuming, only messages up to and including the assistant message with <message.id> (use with --resume in print mode)").argParser(String).hideHelp()).addOption(new Option("--rewind-files <user-message-id>", "Restore files to state at the specified user message and exit (requires --resume)").hideHelp()).option("--model <model>", `Model for the current session. Provide an alias for the latest model (e.g. 'sonnet' or 'opus') or a model's full name (e.g. 'claude-sonnet-4-6').`).addOption(new Option("--effort <level>", `Effort level for the current session (low, medium, high, max)`).argParser((rawValue) => {
823197
+ }).hideHelp()).option("--from-pr [value]", "Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term", (value) => value || true).option("--no-session-persistence", "Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print)").addOption(new Option("--resume-session-at <message id>", "When resuming, only messages up to and including the assistant message with <message.id> (use with --resume in print mode)").argParser(String).hideHelp()).addOption(new Option("--rewind-files <user-message-id>", "Restore files to state at the specified user message and exit (requires --resume)").hideHelp()).option("--model <model>", `Model for the current session. Provide an alias for the latest model (e.g. 'sonnet' or 'opus') or a model's full name (e.g. 'claude-sonnet-4-6').`).addOption(new Option("--effort <level>", `Effort level for the current session (${EFFORT_LEVELS.join(", ")})`).argParser((rawValue) => {
823189
823198
  const value = rawValue.toLowerCase();
823190
- const allowed = ["low", "medium", "high", "max"];
823191
- if (!allowed.includes(value)) {
823192
- throw new InvalidArgumentError(`It must be one of: ${allowed.join(", ")}`);
823199
+ if (!EFFORT_LEVELS.includes(value)) {
823200
+ throw new InvalidArgumentError(`It must be one of: ${EFFORT_LEVELS.join(", ")}`);
823193
823201
  }
823194
823202
  return value;
823195
- })).option("--agent <agent>", `Agent for the current session. Overrides the 'agent' setting.`).option("--betas <betas...>", "Beta headers to include in API requests (API key users only)").option("--fallback-model <model>", "Enable automatic fallback to specified model when default model is overloaded (only works with --print)").addOption(new Option("--workload <tag>", "Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)").hideHelp()).option("--settings <file-or-json>", "Path to a settings JSON file or a JSON string to load additional settings from").option("--add-dir <directories...>", "Additional directories to allow tool access to").option("--ide", "Automatically connect to IDE on startup if exactly one valid IDE is available", () => true).option("--strict-mcp-config", "Only use MCP servers from --mcp-config, ignoring all other MCP configurations", () => true).option("--session-id <uuid>", "Use a specific session ID for the conversation (must be a valid UUID)").option("-n, --name <name>", "Set a display name for this session (shown in /resume and terminal title)").option("--agents <json>", `JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option("--setting-sources <sources>", "Comma-separated list of setting sources to load (user, project, local).").addOption(new Option("--prompt-suggestions [value]", "Enable prompt suggestions. In print/SDK mode, emits a prompt_suggestion message after each turn with a predicted next user prompt").choices(["true", "false", "1", "0", "yes", "no", "on", "off"]).preset("true").argParser((raw) => {
823203
+ })).option("--agent <agent>", `Agent for the current session. Overrides the 'agent' setting.`).option("--betas <betas...>", "Beta headers to include in API requests (API key users only)").option("--fallback-model <model>", "Enable automatic fallback to specified model(s) when the default model is overloaded or not available. Accepts a comma-separated list to try each in order. Re-tries the primary at the start of each user turn. (only works with --print)").addOption(new Option("--workload <tag>", "Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)").hideHelp()).option("--settings <file-or-json>", "Path to a settings JSON file or a JSON string to load additional settings from").option("--add-dir <directories...>", "Additional directories to allow tool access to").option("--ide", "Automatically connect to IDE on startup if exactly one valid IDE is available", () => true).option("--strict-mcp-config", "Only use MCP servers from --mcp-config, ignoring all other MCP configurations", () => true).option("--session-id <uuid>", "Use a specific session ID for the conversation (must be a valid UUID)").option("-n, --name <name>", "Set a display name for this session (shown in /resume and terminal title)").option("--agents <json>", `JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option("--setting-sources <sources>", "Comma-separated list of setting sources to load (user, project, local).").addOption(new Option("--prompt-suggestions [value]", "Enable prompt suggestions. In print/SDK mode, emits a prompt_suggestion message after each turn with a predicted next user prompt").choices(["true", "false", "1", "0", "yes", "no", "on", "off"]).preset("true").argParser((raw) => {
823196
823204
  const allowed = ["true", "false", "1", "0", "yes", "no", "on", "off"];
823197
823205
  if (!allowed.includes(raw)) {
823198
823206
  throw new InvalidArgumentError("Allowed choices are true, false, 1, 0, yes, no, on, off.");
@@ -825908,6 +825916,7 @@ var init_main7 = __esm(() => {
825908
825916
  init_mapValues();
825909
825917
  init_pickBy();
825910
825918
  init_uniqBy();
825919
+ init_cli();
825911
825920
  init_oauth();
825912
825921
  init_context2();
825913
825922
  init_init3();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnwenf/occ",
3
- "version": "2.1.283",
3
+ "version": "2.1.285",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {