@ainative/cody-cli 0.2.9 → 0.3.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 +65 -65
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6867,7 +6867,7 @@ var init_messages = __esm(() => {
|
|
|
6867
6867
|
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);
|
|
6868
6868
|
}
|
|
6869
6869
|
if (body.model in MODELS_TO_WARN_WITH_THINKING_ENABLED && body.thinking && body.thinking.type === "enabled") {
|
|
6870
|
-
console.warn(`Using
|
|
6870
|
+
console.warn(`Using Cody with ${body.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);
|
|
6871
6871
|
}
|
|
6872
6872
|
let timeout = this._client._options.timeout;
|
|
6873
6873
|
if (!body.stream && timeout == null) {
|
|
@@ -7714,7 +7714,7 @@ var init_messages2 = __esm(() => {
|
|
|
7714
7714
|
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);
|
|
7715
7715
|
}
|
|
7716
7716
|
if (body.model in MODELS_TO_WARN_WITH_THINKING_ENABLED2 && body.thinking && body.thinking.type === "enabled") {
|
|
7717
|
-
console.warn(`Using
|
|
7717
|
+
console.warn(`Using Cody with ${body.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);
|
|
7718
7718
|
}
|
|
7719
7719
|
let timeout = this._client._options.timeout;
|
|
7720
7720
|
if (!body.stream && timeout == null) {
|
|
@@ -41111,7 +41111,7 @@ var init_oauth = __esm(() => {
|
|
|
41111
41111
|
ROLES_URL: "https://api.ainative.studio/api/oauth/roles",
|
|
41112
41112
|
CONSOLE_SUCCESS_URL: "https://ainative.studio/oauth/success?app=cody-cli",
|
|
41113
41113
|
CLAUDEAI_SUCCESS_URL: "https://ainative.studio/oauth/success?app=cody-cli",
|
|
41114
|
-
MANUAL_REDIRECT_URL: "
|
|
41114
|
+
MANUAL_REDIRECT_URL: "http://localhost:0/callback",
|
|
41115
41115
|
CLIENT_ID: "ainative-cody-cli-001",
|
|
41116
41116
|
OAUTH_FILE_SUFFIX: "",
|
|
41117
41117
|
MCP_PROXY_URL: "https://api.ainative.studio",
|
|
@@ -54690,7 +54690,7 @@ var init_coreSchemas = __esm(() => {
|
|
|
54690
54690
|
SdkBetaSchema = lazySchema(() => exports_external.literal("context-1m-2025-08-07"));
|
|
54691
54691
|
ThinkingAdaptiveSchema = lazySchema(() => exports_external.object({
|
|
54692
54692
|
type: exports_external.literal("adaptive")
|
|
54693
|
-
}).describe("
|
|
54693
|
+
}).describe("Cody decides when and how much to think (Opus 4.6+)."));
|
|
54694
54694
|
ThinkingEnabledSchema = lazySchema(() => exports_external.object({
|
|
54695
54695
|
type: exports_external.literal("enabled"),
|
|
54696
54696
|
budgetTokens: exports_external.number().optional()
|
|
@@ -54702,7 +54702,7 @@ var init_coreSchemas = __esm(() => {
|
|
|
54702
54702
|
ThinkingAdaptiveSchema(),
|
|
54703
54703
|
ThinkingEnabledSchema(),
|
|
54704
54704
|
ThinkingDisabledSchema()
|
|
54705
|
-
]).describe("Controls
|
|
54705
|
+
]).describe("Controls Cody's thinking/reasoning behavior. When set, takes precedence over the deprecated maxThinkingTokens."));
|
|
54706
54706
|
McpStdioServerConfigSchema = lazySchema(() => exports_external.object({
|
|
54707
54707
|
type: exports_external.literal("stdio").optional(),
|
|
54708
54708
|
command: exports_external.string(),
|
|
@@ -55228,7 +55228,7 @@ var init_coreSchemas = __esm(() => {
|
|
|
55228
55228
|
description: exports_external.string().describe("Description of the model's capabilities"),
|
|
55229
55229
|
supportsEffort: exports_external.boolean().optional().describe("Whether this model supports effort levels"),
|
|
55230
55230
|
supportedEffortLevels: exports_external.array(exports_external.enum(["low", "medium", "high", "max"])).optional().describe("Available effort levels for this model"),
|
|
55231
|
-
supportsAdaptiveThinking: exports_external.boolean().optional().describe("Whether this model supports adaptive thinking (
|
|
55231
|
+
supportsAdaptiveThinking: exports_external.boolean().optional().describe("Whether this model supports adaptive thinking (Cody decides when and how much to think)"),
|
|
55232
55232
|
supportsFastMode: exports_external.boolean().optional().describe("Whether this model supports fast mode"),
|
|
55233
55233
|
supportsAutoMode: exports_external.boolean().optional().describe("Whether this model supports auto mode")
|
|
55234
55234
|
}).describe("Information about an available model."));
|
|
@@ -56876,8 +56876,8 @@ var init_types3 = __esm(() => {
|
|
|
56876
56876
|
commit: exports_external.string().optional().describe("Attribution text for git commits, including any trailers. " + "Empty string hides attribution."),
|
|
56877
56877
|
pr: exports_external.string().optional().describe("Attribution text for pull request descriptions. " + "Empty string hides attribution.")
|
|
56878
56878
|
}).optional().describe("Customize attribution text for commits and PRs. " + "Each field defaults to the standard Cody attribution if not set."),
|
|
56879
|
-
includeCoAuthoredBy: exports_external.boolean().optional().describe("Deprecated: Use attribution instead. " + "Whether to include
|
|
56880
|
-
includeGitInstructions: exports_external.boolean().optional().describe("Include built-in commit and PR workflow instructions in
|
|
56879
|
+
includeCoAuthoredBy: exports_external.boolean().optional().describe("Deprecated: Use attribution instead. " + "Whether to include Cody's co-authored by attribution in commits and PRs (defaults to true)"),
|
|
56880
|
+
includeGitInstructions: exports_external.boolean().optional().describe("Include built-in commit and PR workflow instructions in Cody's system prompt (default: true)"),
|
|
56881
56881
|
permissions: PermissionsSchema().optional().describe("Tool usage permissions configuration"),
|
|
56882
56882
|
model: exports_external.string().optional().describe("Override the default model used by Cody"),
|
|
56883
56883
|
availableModels: exports_external.array(exports_external.string()).optional().describe("Allowlist of models that users can select. " + 'Accepts family aliases ("opus" allows any opus version), ' + 'version prefixes ("opus-4-5" allows only that version), ' + "and full model IDs. " + "If undefined, all models are available. If empty array, only the default model is available. " + "Typically set in managed settings by enterprise administrators."),
|
|
@@ -56920,11 +56920,11 @@ var init_types3 = __esm(() => {
|
|
|
56920
56920
|
}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),
|
|
56921
56921
|
strictKnownMarketplaces: exports_external.array(MarketplaceSourceSchema()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, " + "ONLY these exact sources can be added as marketplaces. The check happens BEFORE " + "downloading, so blocked sources never touch the filesystem. " + "Note: this is a policy gate only \u2014 it does NOT register marketplaces. " + "To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),
|
|
56922
56922
|
blockedMarketplaces: exports_external.array(MarketplaceSourceSchema()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, " + "these exact sources are blocked from being added as marketplaces. The check happens BEFORE " + "downloading, so blocked sources never touch the filesystem."),
|
|
56923
|
-
forceLoginMethod: exports_external.enum(["claudeai", "console"]).optional().describe('Force a specific login method: "claudeai" for
|
|
56923
|
+
forceLoginMethod: exports_external.enum(["claudeai", "console"]).optional().describe('Force a specific login method: "claudeai" for AINative Pro/Max, "console" for Console billing'),
|
|
56924
56924
|
forceLoginOrgUUID: exports_external.string().optional().describe("Organization UUID to use for OAuth login"),
|
|
56925
56925
|
otelHeadersHelper: exports_external.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),
|
|
56926
56926
|
outputStyle: exports_external.string().optional().describe("Controls the output style for assistant responses"),
|
|
56927
|
-
language: exports_external.string().optional().describe('Preferred language for
|
|
56927
|
+
language: exports_external.string().optional().describe('Preferred language for Cody responses and voice dictation (e.g., "japanese", "spanish")'),
|
|
56928
56928
|
skipWebFetchPreflight: exports_external.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),
|
|
56929
56929
|
sandbox: SandboxSettingsSchema().optional(),
|
|
56930
56930
|
feedbackSurveyRate: exports_external.number().min(0).max(1).optional().describe("Probability (0\u20131) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),
|
|
@@ -56980,7 +56980,7 @@ var init_types3 = __esm(() => {
|
|
|
56980
56980
|
})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, " + "replaces the default AINative allowlist \u2014 admins decide which " + "plugins may push inbound messages. Undefined falls back to the default. " + "Requires channelsEnabled: true."),
|
|
56981
56981
|
...{},
|
|
56982
56982
|
prefersReducedMotion: exports_external.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),
|
|
56983
|
-
autoMemoryEnabled: exports_external.boolean().optional().describe("Enable auto-memory for this project. When false,
|
|
56983
|
+
autoMemoryEnabled: exports_external.boolean().optional().describe("Enable auto-memory for this project. When false, Cody will not read from or write to the auto-memory directory."),
|
|
56984
56984
|
autoMemoryDirectory: exports_external.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),
|
|
56985
56985
|
autoDreamEnabled: exports_external.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),
|
|
56986
56986
|
showThinkingSummaries: exports_external.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),
|
|
@@ -145542,9 +145542,9 @@ function getSubscriptionName() {
|
|
|
145542
145542
|
case "team":
|
|
145543
145543
|
return "Claude Team";
|
|
145544
145544
|
case "max":
|
|
145545
|
-
return "
|
|
145545
|
+
return "AINative Max";
|
|
145546
145546
|
case "pro":
|
|
145547
|
-
return "
|
|
145547
|
+
return "AINative Pro";
|
|
145548
145548
|
default:
|
|
145549
145549
|
return "Claude API";
|
|
145550
145550
|
}
|
|
@@ -199681,7 +199681,7 @@ var init_prompt5 = __esm(() => {
|
|
|
199681
199681
|
// src/tools/AgentTool/built-in/claudeCodeGuideAgent.ts
|
|
199682
199682
|
function getClaudeCodeGuideBasePrompt() {
|
|
199683
199683
|
const localSearchHint = hasEmbeddedSearchTools() ? `${FILE_READ_TOOL_NAME}, \`find\`, and \`grep\`` : `${FILE_READ_TOOL_NAME}, ${GLOB_TOOL_NAME}, and ${GREP_TOOL_NAME}`;
|
|
199684
|
-
return `You are the
|
|
199684
|
+
return `You are the Cody guide agent. Your primary responsibility is helping users understand and use Cody CLI, the Claude Agent SDK, and the Claude API (formerly the AINative API) effectively.
|
|
199685
199685
|
|
|
199686
199686
|
**Your expertise spans three domains:**
|
|
199687
199687
|
|
|
@@ -242587,7 +242587,7 @@ async function detectAvailableBrowser() {
|
|
|
242587
242587
|
try {
|
|
242588
242588
|
const stats = await stat17(appPath);
|
|
242589
242589
|
if (stats.isDirectory()) {
|
|
242590
|
-
logForDebugging(`[
|
|
242590
|
+
logForDebugging(`[Cody in Chrome] Detected browser: ${config8.name}`);
|
|
242591
242591
|
return browserId;
|
|
242592
242592
|
}
|
|
242593
242593
|
} catch (e4) {
|
|
@@ -242600,7 +242600,7 @@ async function detectAvailableBrowser() {
|
|
|
242600
242600
|
case "linux": {
|
|
242601
242601
|
for (const binary of config8.linux.binaries) {
|
|
242602
242602
|
if (await which(binary).catch(() => null)) {
|
|
242603
|
-
logForDebugging(`[
|
|
242603
|
+
logForDebugging(`[Cody in Chrome] Detected browser: ${config8.name}`);
|
|
242604
242604
|
return browserId;
|
|
242605
242605
|
}
|
|
242606
242606
|
}
|
|
@@ -242614,7 +242614,7 @@ async function detectAvailableBrowser() {
|
|
|
242614
242614
|
try {
|
|
242615
242615
|
const stats = await stat17(dataPath);
|
|
242616
242616
|
if (stats.isDirectory()) {
|
|
242617
|
-
logForDebugging(`[
|
|
242617
|
+
logForDebugging(`[Cody in Chrome] Detected browser: ${config8.name}`);
|
|
242618
242618
|
return browserId;
|
|
242619
242619
|
}
|
|
242620
242620
|
} catch (e4) {
|
|
@@ -242641,7 +242641,7 @@ async function openInChrome(url3) {
|
|
|
242641
242641
|
const currentPlatform = getPlatform();
|
|
242642
242642
|
const browser = await detectAvailableBrowser();
|
|
242643
242643
|
if (!browser) {
|
|
242644
|
-
logForDebugging("[
|
|
242644
|
+
logForDebugging("[Cody in Chrome] No compatible browser found");
|
|
242645
242645
|
return false;
|
|
242646
242646
|
}
|
|
242647
242647
|
const config8 = CHROMIUM_BROWSERS[browser];
|
|
@@ -250658,7 +250658,7 @@ function getClaudeInChromeMCPToolOverrides(toolName) {
|
|
|
250658
250658
|
return {
|
|
250659
250659
|
userFacingName(_input) {
|
|
250660
250660
|
const displayName = toolName.replace(/_mcp$/, "");
|
|
250661
|
-
return `
|
|
250661
|
+
return `Cody in Chrome[${displayName}]`;
|
|
250662
250662
|
},
|
|
250663
250663
|
renderToolUseMessage(input, {
|
|
250664
250664
|
verbose
|
|
@@ -311163,7 +311163,7 @@ function ConsoleOAuthFlow({
|
|
|
311163
311163
|
const settings = getSettings_DEPRECATED() || {};
|
|
311164
311164
|
const forceLoginMethod = forceLoginMethodProp ?? settings.forceLoginMethod;
|
|
311165
311165
|
const orgUUID = settings.forceLoginOrgUUID;
|
|
311166
|
-
const forcedMethodMessage = forceLoginMethod === "claudeai" ? "Login method pre-selected: Subscription Plan (
|
|
311166
|
+
const forcedMethodMessage = forceLoginMethod === "claudeai" ? "Login method pre-selected: Subscription Plan (AINative Pro/Max)" : forceLoginMethod === "console" ? "Login method pre-selected: API Usage Billing (Anthropic Console)" : null;
|
|
311167
311167
|
const terminal = useTerminalNotification();
|
|
311168
311168
|
const [oauthStatus, setOAuthStatus] = import_react59.useState(() => {
|
|
311169
311169
|
if (mode === "setup-token") {
|
|
@@ -311483,7 +311483,7 @@ function OAuthStatusMessage(t0) {
|
|
|
311483
311483
|
} = t0;
|
|
311484
311484
|
switch (oauthStatus.state) {
|
|
311485
311485
|
case "idle": {
|
|
311486
|
-
const t1 = startingMessage ? startingMessage : "Cody can be used with your
|
|
311486
|
+
const t1 = startingMessage ? startingMessage : "Cody can be used with your AINative subscription or billed based on API usage through your Console account.";
|
|
311487
311487
|
let t22;
|
|
311488
311488
|
if ($3[0] !== t1) {
|
|
311489
311489
|
t22 = /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
@@ -311509,11 +311509,11 @@ function OAuthStatusMessage(t0) {
|
|
|
311509
311509
|
t4 = {
|
|
311510
311510
|
label: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
311511
311511
|
children: [
|
|
311512
|
-
"
|
|
311512
|
+
"AINative account with subscription \xB7",
|
|
311513
311513
|
" ",
|
|
311514
311514
|
/* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
311515
311515
|
dimColor: true,
|
|
311516
|
-
children: "Pro,
|
|
311516
|
+
children: "Pro, Team, or Enterprise"
|
|
311517
311517
|
}, undefined, false, undefined, this),
|
|
311518
311518
|
false,
|
|
311519
311519
|
`
|
|
@@ -311531,7 +311531,7 @@ function OAuthStatusMessage(t0) {
|
|
|
311531
311531
|
t5 = {
|
|
311532
311532
|
label: /* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
311533
311533
|
children: [
|
|
311534
|
-
"
|
|
311534
|
+
"AINative Console account \xB7",
|
|
311535
311535
|
" ",
|
|
311536
311536
|
/* @__PURE__ */ jsx_dev_runtime71.jsxDEV(ThemedText, {
|
|
311537
311537
|
dimColor: true,
|
|
@@ -324342,7 +324342,7 @@ function TeleportError(t0) {
|
|
|
324342
324342
|
}, undefined, false, undefined, this),
|
|
324343
324343
|
/* @__PURE__ */ jsx_dev_runtime117.jsxDEV(ThemedText, {
|
|
324344
324344
|
dimColor: true,
|
|
324345
|
-
children: "Your
|
|
324345
|
+
children: "Your AINative subscription will be used by Cody."
|
|
324346
324346
|
}, undefined, false, undefined, this)
|
|
324347
324347
|
]
|
|
324348
324348
|
}, undefined, true, undefined, this);
|
|
@@ -372235,7 +372235,7 @@ var init_supportedSettings = __esm(() => {
|
|
|
372235
372235
|
language: {
|
|
372236
372236
|
source: "settings",
|
|
372237
372237
|
type: "string",
|
|
372238
|
-
description: 'Preferred language for
|
|
372238
|
+
description: 'Preferred language for Cody responses and voice dictation (e.g., "japanese", "spanish")'
|
|
372239
372239
|
},
|
|
372240
372240
|
teammateMode: {
|
|
372241
372241
|
source: "global",
|
|
@@ -391273,7 +391273,7 @@ var init_mcpInstructionsDelta = __esm(() => {
|
|
|
391273
391273
|
function getChromeSystemPrompt() {
|
|
391274
391274
|
return BASE_CHROME_PROMPT;
|
|
391275
391275
|
}
|
|
391276
|
-
var BASE_CHROME_PROMPT = `#
|
|
391276
|
+
var BASE_CHROME_PROMPT = `# Cody in Chrome browser automation
|
|
391277
391277
|
|
|
391278
391278
|
You have access to browser automation tools (mcp__claude-in-chrome__*) for interacting with web pages in Chrome. Follow these guidelines for effective browser automation.
|
|
391279
391279
|
|
|
@@ -401999,7 +401999,7 @@ function getAssistantMessageFromError(error43, model, options) {
|
|
|
401999
401999
|
}
|
|
402000
402000
|
if (isClaudeAISubscriber() && error43 instanceof APIError && error43.status === 400 && error43.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
|
|
402001
402001
|
return createAssistantAPIErrorMessage({
|
|
402002
|
-
content: "Claude Opus is not available with the
|
|
402002
|
+
content: "Claude Opus is not available with the AINative Pro plan. If you have updated your subscription plan recently, run /logout and /login for the plan to take effect.",
|
|
402003
402003
|
error: "invalid_request"
|
|
402004
402004
|
});
|
|
402005
402005
|
}
|
|
@@ -413349,7 +413349,7 @@ function ThemePicker(t0) {
|
|
|
413349
413349
|
newStart: 1,
|
|
413350
413350
|
oldLines: 3,
|
|
413351
413351
|
newLines: 3,
|
|
413352
|
-
lines: [" function greet() {", '- console.log("Hello, World!");', '+ console.log("Hello,
|
|
413352
|
+
lines: [" function greet() {", '- console.log("Hello, World!");', '+ console.log("Hello, Cody!");', " }"]
|
|
413353
413353
|
};
|
|
413354
413354
|
$3[34] = t20;
|
|
413355
413355
|
} else {
|
|
@@ -415777,7 +415777,7 @@ function Config({
|
|
|
415777
415777
|
}] : [],
|
|
415778
415778
|
{
|
|
415779
415779
|
id: "claudeInChromeDefaultEnabled",
|
|
415780
|
-
label: "
|
|
415780
|
+
label: "Cody in Chrome enabled by default",
|
|
415781
415781
|
value: globalConfig2.claudeInChromeDefaultEnabled ?? true,
|
|
415782
415782
|
type: "boolean",
|
|
415783
415783
|
onChange(enabled_5) {
|
|
@@ -426496,7 +426496,7 @@ function ApiKeyStep(t0) {
|
|
|
426496
426496
|
children: /* @__PURE__ */ jsx_dev_runtime210.jsxDEV(ThemedText, {
|
|
426497
426497
|
children: [
|
|
426498
426498
|
selectedOption === "oauth" ? color("success", theme)("> ") : " ",
|
|
426499
|
-
"Create a long-lived token with your
|
|
426499
|
+
"Create a long-lived token with your AINative subscription"
|
|
426500
426500
|
]
|
|
426501
426501
|
}, undefined, true, undefined, this)
|
|
426502
426502
|
}, undefined, false, undefined, this);
|
|
@@ -480202,7 +480202,7 @@ function getExtensionIds() {
|
|
|
480202
480202
|
}
|
|
480203
480203
|
async function detectExtensionInstallationPortable(browserPaths, log2) {
|
|
480204
480204
|
if (browserPaths.length === 0) {
|
|
480205
|
-
log2?.(`[
|
|
480205
|
+
log2?.(`[Cody in Chrome] No browser paths to check`);
|
|
480206
480206
|
return { isInstalled: false, browser: null };
|
|
480207
480207
|
}
|
|
480208
480208
|
const extensionIds = getExtensionIds();
|
|
@@ -480219,20 +480219,20 @@ async function detectExtensionInstallationPortable(browserPaths, log2) {
|
|
|
480219
480219
|
}
|
|
480220
480220
|
const profileDirs = browserProfileEntries.filter((entry) => entry.isDirectory()).filter((entry) => entry.name === "Default" || entry.name.startsWith("Profile ")).map((entry) => entry.name);
|
|
480221
480221
|
if (profileDirs.length > 0) {
|
|
480222
|
-
log2?.(`[
|
|
480222
|
+
log2?.(`[Cody in Chrome] Found ${browser} profiles: ${profileDirs.join(", ")}`);
|
|
480223
480223
|
}
|
|
480224
480224
|
for (const profile7 of profileDirs) {
|
|
480225
480225
|
for (const extensionId of extensionIds) {
|
|
480226
480226
|
const extensionPath = join120(browserBasePath, profile7, "Extensions", extensionId);
|
|
480227
480227
|
try {
|
|
480228
480228
|
await readdir26(extensionPath);
|
|
480229
|
-
log2?.(`[
|
|
480229
|
+
log2?.(`[Cody in Chrome] Extension ${extensionId} found in ${browser} ${profile7}`);
|
|
480230
480230
|
return { isInstalled: true, browser };
|
|
480231
480231
|
} catch {}
|
|
480232
480232
|
}
|
|
480233
480233
|
}
|
|
480234
480234
|
}
|
|
480235
|
-
log2?.(`[
|
|
480235
|
+
log2?.(`[Cody in Chrome] Extension not found in any browser`);
|
|
480236
480236
|
return { isInstalled: false, browser: null };
|
|
480237
480237
|
}
|
|
480238
480238
|
async function isChromeExtensionInstalledPortable(browserPaths, log2) {
|
|
@@ -480288,7 +480288,7 @@ function setupClaudeInChrome() {
|
|
|
480288
480288
|
const hasEnv = Object.keys(env5).length > 0;
|
|
480289
480289
|
if (isNativeBuild) {
|
|
480290
480290
|
const execCommand = `"${process.execPath}" --chrome-native-host`;
|
|
480291
|
-
createWrapperScript(execCommand).then((manifestBinaryPath) => installChromeNativeHostManifest(manifestBinaryPath)).catch((e4) => logForDebugging(`[
|
|
480291
|
+
createWrapperScript(execCommand).then((manifestBinaryPath) => installChromeNativeHostManifest(manifestBinaryPath)).catch((e4) => logForDebugging(`[Cody in Chrome] Failed to install native host: ${e4}`, { level: "error" }));
|
|
480292
480292
|
return {
|
|
480293
480293
|
mcpConfig: {
|
|
480294
480294
|
[CLAUDE_IN_CHROME_MCP_SERVER_NAME]: {
|
|
@@ -480306,7 +480306,7 @@ function setupClaudeInChrome() {
|
|
|
480306
480306
|
const __filename3 = fileURLToPath7(import.meta.url);
|
|
480307
480307
|
const __dirname4 = join121(__filename3, "..");
|
|
480308
480308
|
const cliPath = join121(__dirname4, "cli.js");
|
|
480309
|
-
createWrapperScript(`"${process.execPath}" "${cliPath}" --chrome-native-host`).then((manifestBinaryPath) => installChromeNativeHostManifest(manifestBinaryPath)).catch((e4) => logForDebugging(`[
|
|
480309
|
+
createWrapperScript(`"${process.execPath}" "${cliPath}" --chrome-native-host`).then((manifestBinaryPath) => installChromeNativeHostManifest(manifestBinaryPath)).catch((e4) => logForDebugging(`[Cody in Chrome] Failed to install native host: ${e4}`, { level: "error" }));
|
|
480310
480310
|
const mcpConfig = {
|
|
480311
480311
|
[CLAUDE_IN_CHROME_MCP_SERVER_NAME]: {
|
|
480312
480312
|
type: "stdio",
|
|
@@ -480335,7 +480335,7 @@ function getNativeMessagingHostsDirs() {
|
|
|
480335
480335
|
async function installChromeNativeHostManifest(manifestBinaryPath) {
|
|
480336
480336
|
const manifestDirs = getNativeMessagingHostsDirs();
|
|
480337
480337
|
if (manifestDirs.length === 0) {
|
|
480338
|
-
throw Error("
|
|
480338
|
+
throw Error("Cody in Chrome Native Host not supported on this platform");
|
|
480339
480339
|
}
|
|
480340
480340
|
const manifest = {
|
|
480341
480341
|
name: NATIVE_HOST_IDENTIFIER,
|
|
@@ -480358,10 +480358,10 @@ async function installChromeNativeHostManifest(manifestBinaryPath) {
|
|
|
480358
480358
|
try {
|
|
480359
480359
|
await mkdir34(manifestDir, { recursive: true });
|
|
480360
480360
|
await writeFile39(manifestPath, manifestContent);
|
|
480361
|
-
logForDebugging(`[
|
|
480361
|
+
logForDebugging(`[Cody in Chrome] Installed native host manifest at: ${manifestPath}`);
|
|
480362
480362
|
anyManifestUpdated = true;
|
|
480363
480363
|
} catch (error43) {
|
|
480364
|
-
logForDebugging(`[
|
|
480364
|
+
logForDebugging(`[Cody in Chrome] Failed to install manifest at ${manifestPath}: ${error43}`);
|
|
480365
480365
|
}
|
|
480366
480366
|
}
|
|
480367
480367
|
if (getPlatform() === "windows") {
|
|
@@ -480371,10 +480371,10 @@ async function installChromeNativeHostManifest(manifestBinaryPath) {
|
|
|
480371
480371
|
if (anyManifestUpdated) {
|
|
480372
480372
|
isChromeExtensionInstalled().then((isInstalled) => {
|
|
480373
480373
|
if (isInstalled) {
|
|
480374
|
-
logForDebugging(`[
|
|
480374
|
+
logForDebugging(`[Cody in Chrome] First-time install detected, opening reconnect page in browser`);
|
|
480375
480375
|
openInChrome(CHROME_EXTENSION_RECONNECT_URL);
|
|
480376
480376
|
} else {
|
|
480377
|
-
logForDebugging(`[
|
|
480377
|
+
logForDebugging(`[Cody in Chrome] First-time install detected, but extension not installed, skipping reconnect`);
|
|
480378
480378
|
}
|
|
480379
480379
|
});
|
|
480380
480380
|
}
|
|
@@ -480394,9 +480394,9 @@ function registerWindowsNativeHosts(manifestPath) {
|
|
|
480394
480394
|
"/f"
|
|
480395
480395
|
]).then((result) => {
|
|
480396
480396
|
if (result.code === 0) {
|
|
480397
|
-
logForDebugging(`[
|
|
480397
|
+
logForDebugging(`[Cody in Chrome] Registered native host for ${browser} in Windows registry: ${fullKey}`);
|
|
480398
480398
|
} else {
|
|
480399
|
-
logForDebugging(`[
|
|
480399
|
+
logForDebugging(`[Cody in Chrome] Failed to register native host for ${browser} in Windows registry: ${result.stderr}`);
|
|
480400
480400
|
}
|
|
480401
480401
|
});
|
|
480402
480402
|
}
|
|
@@ -480423,7 +480423,7 @@ exec ${command18}
|
|
|
480423
480423
|
if (platform6 !== "windows") {
|
|
480424
480424
|
await chmod10(wrapperPath, 493);
|
|
480425
480425
|
}
|
|
480426
|
-
logForDebugging(`[
|
|
480426
|
+
logForDebugging(`[Cody in Chrome] Created Chrome native host wrapper script: ${wrapperPath}`);
|
|
480427
480427
|
return wrapperPath;
|
|
480428
480428
|
}
|
|
480429
480429
|
function isChromeExtensionInstalled_CACHED_MAY_BE_STALE() {
|
|
@@ -480445,7 +480445,7 @@ function isChromeExtensionInstalled_CACHED_MAY_BE_STALE() {
|
|
|
480445
480445
|
async function isChromeExtensionInstalled() {
|
|
480446
480446
|
const browserPaths = getAllBrowserDataPaths();
|
|
480447
480447
|
if (browserPaths.length === 0) {
|
|
480448
|
-
logForDebugging(`[
|
|
480448
|
+
logForDebugging(`[Cody in Chrome] Unsupported platform for extension detection: ${getPlatform()}`);
|
|
480449
480449
|
return false;
|
|
480450
480450
|
}
|
|
480451
480451
|
return isChromeExtensionInstalledPortable(browserPaths, logForDebugging);
|
|
@@ -480664,7 +480664,7 @@ function ClaudeInChromeMenu(t0) {
|
|
|
480664
480664
|
let t6;
|
|
480665
480665
|
if ($3[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
480666
480666
|
t6 = /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
|
|
480667
|
-
children: "
|
|
480667
|
+
children: "Cody in Chrome works with the Chrome extension to let you control your browser directly from Cody. Navigate websites, fill forms, capture screenshots, record GIFs, and debug with console logs and network requests."
|
|
480668
480668
|
}, undefined, false, undefined, this);
|
|
480669
480669
|
$3[20] = t6;
|
|
480670
480670
|
} else {
|
|
@@ -480674,7 +480674,7 @@ function ClaudeInChromeMenu(t0) {
|
|
|
480674
480674
|
if ($3[21] !== isWSL) {
|
|
480675
480675
|
t7 = isWSL && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
|
|
480676
480676
|
color: "error",
|
|
480677
|
-
children: "
|
|
480677
|
+
children: "Cody in Chrome is not supported in WSL at this time."
|
|
480678
480678
|
}, undefined, false, undefined, this);
|
|
480679
480679
|
$3[21] = isWSL;
|
|
480680
480680
|
$3[22] = t7;
|
|
@@ -480685,7 +480685,7 @@ function ClaudeInChromeMenu(t0) {
|
|
|
480685
480685
|
if ($3[23] !== isClaudeAISubscriber2) {
|
|
480686
480686
|
t8 = !isClaudeAISubscriber2 && /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(ThemedText, {
|
|
480687
480687
|
color: "error",
|
|
480688
|
-
children: "
|
|
480688
|
+
children: "Cody in Chrome requires a claude.ai subscription."
|
|
480689
480689
|
}, undefined, false, undefined, this);
|
|
480690
480690
|
$3[23] = isClaudeAISubscriber2;
|
|
480691
480691
|
$3[24] = t8;
|
|
@@ -480808,7 +480808,7 @@ function ClaudeInChromeMenu(t0) {
|
|
|
480808
480808
|
let t12;
|
|
480809
480809
|
if ($3[38] !== t11 || $3[39] !== t5) {
|
|
480810
480810
|
t12 = /* @__PURE__ */ jsx_dev_runtime344.jsxDEV(Dialog, {
|
|
480811
|
-
title: "
|
|
480811
|
+
title: "Cody in Chrome (Beta)",
|
|
480812
480812
|
onCancel: t5,
|
|
480813
480813
|
color: "chromeYellow",
|
|
480814
480814
|
children: t11
|
|
@@ -480872,7 +480872,7 @@ var init_chrome2 = __esm(() => {
|
|
|
480872
480872
|
init_state();
|
|
480873
480873
|
command18 = {
|
|
480874
480874
|
name: "chrome",
|
|
480875
|
-
description: "
|
|
480875
|
+
description: "Cody in Chrome (Beta) settings",
|
|
480876
480876
|
availability: ["claude-ai"],
|
|
480877
480877
|
isEnabled: () => !getIsNonInteractiveSession(),
|
|
480878
480878
|
type: "local-jsx",
|
|
@@ -500938,7 +500938,7 @@ function createChromeContext(env5) {
|
|
|
500938
500938
|
}
|
|
500939
500939
|
}
|
|
500940
500940
|
return {
|
|
500941
|
-
serverName: "
|
|
500941
|
+
serverName: "Cody in Chrome",
|
|
500942
500942
|
logger: logger34,
|
|
500943
500943
|
socketPath: getSecureSocketPath(),
|
|
500944
500944
|
getSocketPaths: getAllSocketPaths,
|
|
@@ -501015,9 +501015,9 @@ async function runClaudeInChromeMcpServer() {
|
|
|
501015
501015
|
};
|
|
501016
501016
|
process.stdin.on("end", () => void shutdownAndExit());
|
|
501017
501017
|
process.stdin.on("error", () => void shutdownAndExit());
|
|
501018
|
-
logForDebugging("[
|
|
501018
|
+
logForDebugging("[Cody in Chrome] Starting MCP server");
|
|
501019
501019
|
await server.connect(transport);
|
|
501020
|
-
logForDebugging("[
|
|
501020
|
+
logForDebugging("[Cody in Chrome] MCP server started");
|
|
501021
501021
|
}
|
|
501022
501022
|
|
|
501023
501023
|
class DebugLogger {
|
|
@@ -540447,7 +540447,7 @@ async function _temp203() {
|
|
|
540447
540447
|
key: "chrome-requires-subscription",
|
|
540448
540448
|
jsx: /* @__PURE__ */ jsx_dev_runtime448.jsxDEV(ThemedText, {
|
|
540449
540449
|
color: "error",
|
|
540450
|
-
children: "
|
|
540450
|
+
children: "Cody in Chrome requires a claude.ai subscription"
|
|
540451
540451
|
}, undefined, false, undefined, this),
|
|
540452
540452
|
priority: "immediate",
|
|
540453
540453
|
timeoutMs: 5000
|
|
@@ -540468,7 +540468,7 @@ async function _temp203() {
|
|
|
540468
540468
|
if (chromeFlag === undefined) {
|
|
540469
540469
|
return {
|
|
540470
540470
|
key: "claude-in-chrome-default-enabled",
|
|
540471
|
-
text: "
|
|
540471
|
+
text: "Cody in Chrome enabled \xB7 /chrome",
|
|
540472
540472
|
priority: "low"
|
|
540473
540473
|
};
|
|
540474
540474
|
}
|
|
@@ -550903,11 +550903,11 @@ function PreflightStep(t0) {
|
|
|
550903
550903
|
}, undefined, false, undefined, this),
|
|
550904
550904
|
/* @__PURE__ */ jsx_dev_runtime473.jsxDEV(ThemedText, {
|
|
550905
550905
|
children: [
|
|
550906
|
-
"Note: Cody might not be available in your country. Check supported
|
|
550906
|
+
"Note: Cody might not be available in your country. Check supported regions at",
|
|
550907
550907
|
" ",
|
|
550908
550908
|
/* @__PURE__ */ jsx_dev_runtime473.jsxDEV(ThemedText, {
|
|
550909
550909
|
color: "suggestion",
|
|
550910
|
-
children: "https://
|
|
550910
|
+
children: "https://ainative.studio/supported-regions"
|
|
550911
550911
|
}, undefined, false, undefined, this)
|
|
550912
550912
|
]
|
|
550913
550913
|
}, undefined, true, undefined, this)
|
|
@@ -553219,7 +553219,7 @@ function ClaudeInChromeOnboarding(t0) {
|
|
|
553219
553219
|
if ($3[6] !== t4) {
|
|
553220
553220
|
t5 = /* @__PURE__ */ jsx_dev_runtime481.jsxDEV(ThemedText, {
|
|
553221
553221
|
children: [
|
|
553222
|
-
"
|
|
553222
|
+
"Cody in Chrome works with the Chrome extension to let you control your browser directly from Cody. You can navigate websites, fill forms, capture screenshots, record GIFs, and debug with console logs and network requests.",
|
|
553223
553223
|
t4
|
|
553224
553224
|
]
|
|
553225
553225
|
}, undefined, true, undefined, this);
|
|
@@ -553310,7 +553310,7 @@ function ClaudeInChromeOnboarding(t0) {
|
|
|
553310
553310
|
let t11;
|
|
553311
553311
|
if ($3[17] !== onDone || $3[18] !== t10) {
|
|
553312
553312
|
t11 = /* @__PURE__ */ jsx_dev_runtime481.jsxDEV(Dialog, {
|
|
553313
|
-
title: "
|
|
553313
|
+
title: "Cody in Chrome (Beta)",
|
|
553314
553314
|
onCancel: onDone,
|
|
553315
553315
|
color: "chromeYellow",
|
|
553316
553316
|
children: t10
|
|
@@ -554079,7 +554079,7 @@ function renderErrorSpecificGuidance(errorType) {
|
|
|
554079
554079
|
bold: true,
|
|
554080
554080
|
children: "/login"
|
|
554081
554081
|
}, undefined, false, undefined, this),
|
|
554082
|
-
' and select "
|
|
554082
|
+
' and select "AINative account with subscription"'
|
|
554083
554083
|
]
|
|
554084
554084
|
}, undefined, true, undefined, this)
|
|
554085
554085
|
]
|
|
@@ -570233,7 +570233,7 @@ async function run() {
|
|
|
570233
570233
|
throw new InvalidArgumentError(`It must be one of: ${allowed.join(", ")}`);
|
|
570234
570234
|
}
|
|
570235
570235
|
return value;
|
|
570236
|
-
})).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).").option("--plugin-dir <path>", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)", (val, prev) => [...prev, val], []).option("--disable-slash-commands", "Disable all skills", () => true).option("--chrome", "Enable
|
|
570236
|
+
})).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).").option("--plugin-dir <path>", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)", (val, prev) => [...prev, val], []).option("--disable-slash-commands", "Disable all skills", () => true).option("--chrome", "Enable Cody in Chrome integration").option("--no-chrome", "Disable Cody in Chrome integration").option("--file <specs...>", "File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)").action(async (prompt, options) => {
|
|
570237
570237
|
profileCheckpoint("action_handler_start");
|
|
570238
570238
|
if (options.bare) {
|
|
570239
570239
|
process.env.CLAUDE_CODE_SIMPLE = "1";
|
|
@@ -570584,9 +570584,9 @@ ${appendSystemPrompt}` : chromeSystemPrompt;
|
|
|
570584
570584
|
logEvent("tengu_claude_in_chrome_setup_failed", {
|
|
570585
570585
|
platform: platform7
|
|
570586
570586
|
});
|
|
570587
|
-
logForDebugging(`[
|
|
570587
|
+
logForDebugging(`[Cody in Chrome] Error: ${error43}`);
|
|
570588
570588
|
logError2(error43);
|
|
570589
|
-
console.error(`Error: Failed to run with
|
|
570589
|
+
console.error(`Error: Failed to run with Cody in Chrome.`);
|
|
570590
570590
|
process.exit(1);
|
|
570591
570591
|
}
|
|
570592
570592
|
} else if (autoEnableClaudeInChrome) {
|
|
@@ -570603,7 +570603,7 @@ ${appendSystemPrompt}` : chromeSystemPrompt;
|
|
|
570603
570603
|
|
|
570604
570604
|
${hint}` : hint;
|
|
570605
570605
|
} catch (error43) {
|
|
570606
|
-
logForDebugging(`[
|
|
570606
|
+
logForDebugging(`[Cody in Chrome] Error (auto-enable): ${error43}`);
|
|
570607
570607
|
}
|
|
570608
570608
|
}
|
|
570609
570609
|
const strictMcpConfig = options.strictMcpConfig || false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainative/cody-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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": {
|