@cnwenf/occ 2.1.311 → 2.1.312
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 +87 -33
- 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.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.312","BINARY_NAME":"occ","BUILD_TIME":"2026-08-25T20:28:13.846Z","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;
|
|
@@ -2010,7 +2010,6 @@ __export(exports_state, {
|
|
|
2010
2010
|
setScheduledTasksEnabled: () => setScheduledTasksEnabled,
|
|
2011
2011
|
setQuestionPreviewFormat: () => setQuestionPreviewFormat,
|
|
2012
2012
|
setPromptId: () => setPromptId,
|
|
2013
|
-
setPromptCache1hEligible: () => setPromptCache1hEligible,
|
|
2014
2013
|
setPromptCache1hAllowlist: () => setPromptCache1hAllowlist,
|
|
2015
2014
|
setProjectRoot: () => setProjectRoot,
|
|
2016
2015
|
setOriginalCwd: () => setOriginalCwd,
|
|
@@ -2131,7 +2130,6 @@ __export(exports_state, {
|
|
|
2131
2130
|
getRegisteredHooks: () => getRegisteredHooks,
|
|
2132
2131
|
getQuestionPreviewFormat: () => getQuestionPreviewFormat,
|
|
2133
2132
|
getPromptId: () => getPromptId,
|
|
2134
|
-
getPromptCache1hEligible: () => getPromptCache1hEligible,
|
|
2135
2133
|
getPromptCache1hAllowlist: () => getPromptCache1hAllowlist,
|
|
2136
2134
|
getProjectRoot: () => getProjectRoot,
|
|
2137
2135
|
getPrCounter: () => getPrCounter,
|
|
@@ -2320,7 +2318,6 @@ function getInitialState() {
|
|
|
2320
2318
|
hasDevChannels: false,
|
|
2321
2319
|
sessionProjectDir: null,
|
|
2322
2320
|
promptCache1hAllowlist: null,
|
|
2323
|
-
promptCache1hEligible: null,
|
|
2324
2321
|
afkModeHeaderLatched: null,
|
|
2325
2322
|
fastModeHeaderLatched: null,
|
|
2326
2323
|
cacheEditingHeaderLatched: null,
|
|
@@ -3143,12 +3140,6 @@ function getPromptCache1hAllowlist() {
|
|
|
3143
3140
|
function setPromptCache1hAllowlist(allowlist) {
|
|
3144
3141
|
STATE.promptCache1hAllowlist = allowlist;
|
|
3145
3142
|
}
|
|
3146
|
-
function getPromptCache1hEligible() {
|
|
3147
|
-
return STATE.promptCache1hEligible;
|
|
3148
|
-
}
|
|
3149
|
-
function setPromptCache1hEligible(eligible) {
|
|
3150
|
-
STATE.promptCache1hEligible = eligible;
|
|
3151
|
-
}
|
|
3152
3143
|
function getAfkModeHeaderLatched() {
|
|
3153
3144
|
return STATE.afkModeHeaderLatched;
|
|
3154
3145
|
}
|
|
@@ -59647,6 +59638,8 @@ var init_types2 = __esm(() => {
|
|
|
59647
59638
|
}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),
|
|
59648
59639
|
syntaxHighlightingDisabled: exports_external.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),
|
|
59649
59640
|
terminalTitleFromRename: exports_external.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),
|
|
59641
|
+
promptCacheTtl: exports_external.enum(["5m", "1h"]).optional().catch(undefined).describe('Prompt cache TTL for the main conversation (interactive, -p and SDK turns, plus the helpers that run inline with it): "5m" or "1h". Unset = automatic: 1 hour on a Claude subscription within its usage limits, 5 minutes on an API key, Bedrock, Vertex or Foundry. 1-hour cache writes are billed at a higher rate; the cache stays warm across longer breaks. The CLAUDE_CODE_PROMPT_CACHE_TTL environment variable takes precedence.'),
|
|
59642
|
+
subagentPromptCacheTtl: exports_external.enum(["5m", "1h"]).optional().catch(undefined).describe('Prompt cache TTL for everything outside the main conversation \u2014 subagents, workflows, background and helper requests: "5m" or "1h". Unset = automatic (5 minutes unless ENABLE_PROMPT_CACHING_1H=1). The CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL environment variable takes precedence.'),
|
|
59650
59643
|
autoScrollEnabled: exports_external.boolean().optional().describe("Whether the conversation auto-scrolls to the bottom on new output in fullscreen mode (defaults to true). Set to false to keep the scroll position stable."),
|
|
59651
59644
|
tui: exports_external.enum(["default", "fullscreen"]).optional().describe('Terminal UI renderer. "fullscreen" uses the flicker-free alt-screen renderer with virtualized scrollback (equivalent to CLAUDE_CODE_NO_FLICKER=1). "default" uses the classic main-screen renderer.'),
|
|
59652
59645
|
axScreenReader: exports_external.boolean().optional().describe("Render screen-reader friendly output (flat text, no decorative borders or animations). Overridden by the CLAUDE_AX_SCREEN_READER env var and the --ax-screen-reader CLI flag."),
|
|
@@ -100362,6 +100355,7 @@ __export(exports_betas, {
|
|
|
100362
100355
|
PROMPT_CACHING_SCOPE_BETA_HEADER: () => PROMPT_CACHING_SCOPE_BETA_HEADER,
|
|
100363
100356
|
INTERLEAVED_THINKING_BETA_HEADER: () => INTERLEAVED_THINKING_BETA_HEADER,
|
|
100364
100357
|
FAST_MODE_BETA_HEADER: () => FAST_MODE_BETA_HEADER,
|
|
100358
|
+
EXTENDED_CACHE_TTL_BETA_HEADER: () => EXTENDED_CACHE_TTL_BETA_HEADER,
|
|
100365
100359
|
EFFORT_BETA_HEADER: () => EFFORT_BETA_HEADER,
|
|
100366
100360
|
CONTEXT_MANAGEMENT_BETA_HEADER: () => CONTEXT_MANAGEMENT_BETA_HEADER,
|
|
100367
100361
|
CONTEXT_1M_BETA_HEADER: () => CONTEXT_1M_BETA_HEADER,
|
|
@@ -100372,7 +100366,7 @@ __export(exports_betas, {
|
|
|
100372
100366
|
AFK_MODE_BETA_HEADER: () => AFK_MODE_BETA_HEADER,
|
|
100373
100367
|
ADVISOR_BETA_HEADER: () => ADVISOR_BETA_HEADER
|
|
100374
100368
|
});
|
|
100375
|
-
var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER, AFK_MODE_BETA_HEADER, CLI_INTERNAL_BETA_HEADER, ADVISOR_BETA_HEADER = "advisor-tool-2026-03-01", BEDROCK_EXTRA_PARAMS_HEADERS, VERTEX_COUNT_TOKENS_ALLOWED_BETAS, CACHE_EDITING_BETA_HEADER = "";
|
|
100369
|
+
var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", EXTENDED_CACHE_TTL_BETA_HEADER = "extended-cache-ttl-2025-04-11", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER, AFK_MODE_BETA_HEADER, CLI_INTERNAL_BETA_HEADER, ADVISOR_BETA_HEADER = "advisor-tool-2026-03-01", BEDROCK_EXTRA_PARAMS_HEADERS, VERTEX_COUNT_TOKENS_ALLOWED_BETAS, CACHE_EDITING_BETA_HEADER = "";
|
|
100376
100370
|
var init_betas = __esm(() => {
|
|
100377
100371
|
init_featureFlags();
|
|
100378
100372
|
SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER = feature("CONNECTOR_TEXT") ? "summarize-connector-text-2026-03-13" : "";
|
|
@@ -100850,13 +100844,28 @@ function formatPrice(price) {
|
|
|
100850
100844
|
function formatModelPricing(costs) {
|
|
100851
100845
|
return `${formatPrice(costs.inputTokens)}/${formatPrice(costs.outputTokens)} per Mtok`;
|
|
100852
100846
|
}
|
|
100853
|
-
|
|
100847
|
+
function getModelPricingString(model) {
|
|
100848
|
+
const shortName = getCanonicalName(model);
|
|
100849
|
+
const costs = MODEL_COSTS[shortName];
|
|
100850
|
+
if (!costs)
|
|
100851
|
+
return;
|
|
100852
|
+
return formatModelPricing(costs);
|
|
100853
|
+
}
|
|
100854
|
+
var COST_TIER_2_10, COST_TIER_3_15, COST_TIER_15_75, COST_TIER_5_25, COST_TIER_30_150, COST_TIER_10_50, COST_HAIKU_35, COST_HAIKU_45, DEFAULT_UNKNOWN_MODEL_COST, MODEL_COSTS;
|
|
100854
100855
|
var init_modelCost = __esm(() => {
|
|
100855
100856
|
init_analytics();
|
|
100856
100857
|
init_state();
|
|
100857
100858
|
init_fastMode();
|
|
100858
100859
|
init_configs();
|
|
100859
100860
|
init_model();
|
|
100861
|
+
COST_TIER_2_10 = {
|
|
100862
|
+
inputTokens: 2,
|
|
100863
|
+
outputTokens: 10,
|
|
100864
|
+
promptCacheWriteTokens: 2.5,
|
|
100865
|
+
promptCacheWrite1hTokens: 4,
|
|
100866
|
+
promptCacheReadTokens: 0.2,
|
|
100867
|
+
webSearchRequests: 0.01
|
|
100868
|
+
};
|
|
100860
100869
|
COST_TIER_3_15 = {
|
|
100861
100870
|
inputTokens: 3,
|
|
100862
100871
|
outputTokens: 15,
|
|
@@ -100922,6 +100931,7 @@ var init_modelCost = __esm(() => {
|
|
|
100922
100931
|
[firstPartyNameToCanonical(CLAUDE_SONNET_4_CONFIG.firstParty)]: COST_TIER_3_15,
|
|
100923
100932
|
[firstPartyNameToCanonical(CLAUDE_SONNET_4_5_CONFIG.firstParty)]: COST_TIER_3_15,
|
|
100924
100933
|
[firstPartyNameToCanonical(CLAUDE_SONNET_4_6_CONFIG.firstParty)]: COST_TIER_3_15,
|
|
100934
|
+
[firstPartyNameToCanonical(CLAUDE_SONNET_5_CONFIG.firstParty)]: COST_TIER_2_10,
|
|
100925
100935
|
[firstPartyNameToCanonical(CLAUDE_OPUS_4_CONFIG.firstParty)]: COST_TIER_15_75,
|
|
100926
100936
|
[firstPartyNameToCanonical(CLAUDE_OPUS_4_1_CONFIG.firstParty)]: COST_TIER_15_75,
|
|
100927
100937
|
[firstPartyNameToCanonical(CLAUDE_OPUS_4_5_CONFIG.firstParty)]: COST_TIER_5_25,
|
|
@@ -140249,6 +140259,10 @@ function shouldIncludeFirstPartyOnlyBetas() {
|
|
|
140249
140259
|
function shouldUseGlobalCacheScope() {
|
|
140250
140260
|
return getAPIProvider() === "firstParty" && !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS);
|
|
140251
140261
|
}
|
|
140262
|
+
function shouldSendExtendedCacheTtlBeta() {
|
|
140263
|
+
const provider5 = getAPIProvider();
|
|
140264
|
+
return (provider5 === "firstParty" || provider5 === "bedrock" || provider5 === "vertex" || provider5 === "foundry") && !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS);
|
|
140265
|
+
}
|
|
140252
140266
|
function getMergedBetas(model, options) {
|
|
140253
140267
|
const baseBetas = [...getModelBetas(model)];
|
|
140254
140268
|
if (options?.isAgenticQuery) {
|
|
@@ -579646,13 +579660,22 @@ function getDefaultOptionForUser(fastMode = false) {
|
|
|
579646
579660
|
description: getClaudeAiUserDefaultModelDescription(fastMode)
|
|
579647
579661
|
};
|
|
579648
579662
|
}
|
|
579649
|
-
const
|
|
579663
|
+
const defaultSetting = getDefaultMainLoopModelSetting();
|
|
579650
579664
|
return {
|
|
579651
579665
|
value: null,
|
|
579652
579666
|
label: "Default (recommended)",
|
|
579653
|
-
description: `Use the default model (currently ${renderDefaultModelSetting(
|
|
579667
|
+
description: `Use the default model (currently ${renderDefaultModelSetting(defaultSetting)})${getDefaultOptionSuffix(defaultSetting)}`
|
|
579654
579668
|
};
|
|
579655
579669
|
}
|
|
579670
|
+
function getDefaultOptionSuffix(setting) {
|
|
579671
|
+
if (resolveAnthropicDefaultModel() !== undefined) {
|
|
579672
|
+
return " \xB7 Set by ANTHROPIC_DEFAULT_MODEL";
|
|
579673
|
+
}
|
|
579674
|
+
if (getAPIProvider() !== "firstParty")
|
|
579675
|
+
return "";
|
|
579676
|
+
const pricing = getModelPricingString(parseUserSpecifiedModel(setting));
|
|
579677
|
+
return pricing === undefined ? "" : ` \xB7 ${pricing}`;
|
|
579678
|
+
}
|
|
579656
579679
|
function getOpus5PricingSuffix(fastMode) {
|
|
579657
579680
|
if (getAPIProvider() !== "firstParty")
|
|
579658
579681
|
return "";
|
|
@@ -579665,7 +579688,7 @@ function getSonnet5Option() {
|
|
|
579665
579688
|
return {
|
|
579666
579689
|
value: is3P ? getModelStrings2().sonnet5 : "sonnet",
|
|
579667
579690
|
label: "Sonnet",
|
|
579668
|
-
description: `Sonnet 5 \xB7 Efficient for routine tasks${is3P ? "" : ` \xB7 ${formatModelPricing(
|
|
579691
|
+
description: `Sonnet 5 \xB7 Efficient for routine tasks${is3P ? "" : ` \xB7 ${formatModelPricing(COST_TIER_2_10)}`}`,
|
|
579669
579692
|
descriptionForModel: "Sonnet 5 - efficient for routine tasks. Generally recommended for most coding tasks"
|
|
579670
579693
|
};
|
|
579671
579694
|
}
|
|
@@ -579763,7 +579786,7 @@ function getSonnet5_1MOption() {
|
|
|
579763
579786
|
return {
|
|
579764
579787
|
value: is3P ? getModelStrings2().sonnet5 + "[1m]" : "sonnet[1m]",
|
|
579765
579788
|
label: "Sonnet (1M context)",
|
|
579766
|
-
description: `Sonnet 5 for long sessions${is3P ? "" : ` \xB7 ${formatModelPricing(
|
|
579789
|
+
description: `Sonnet 5 for long sessions${is3P ? "" : ` \xB7 ${formatModelPricing(COST_TIER_2_10)}`}`,
|
|
579767
579790
|
descriptionForModel: "Sonnet 5 with 1M context window - for long sessions with large codebases"
|
|
579768
579791
|
};
|
|
579769
579792
|
}
|
|
@@ -579840,7 +579863,7 @@ function getMaxSonnet5_1MOption() {
|
|
|
579840
579863
|
return {
|
|
579841
579864
|
value: "sonnet[1m]",
|
|
579842
579865
|
label: "Sonnet (1M context)",
|
|
579843
|
-
description: `Sonnet 5 with 1M context${billingInfo}${is3P ? "" : ` \xB7 ${formatModelPricing(
|
|
579866
|
+
description: `Sonnet 5 with 1M context${billingInfo}${is3P ? "" : ` \xB7 ${formatModelPricing(COST_TIER_2_10)}`}`
|
|
579844
579867
|
};
|
|
579845
579868
|
}
|
|
579846
579869
|
function getMaxOpus5_1MOption(fastMode = false) {
|
|
@@ -631206,30 +631229,51 @@ function getCacheControl({
|
|
|
631206
631229
|
...scope === "global" && { scope }
|
|
631207
631230
|
};
|
|
631208
631231
|
}
|
|
631209
|
-
function
|
|
631232
|
+
function querySourceMatchesPatterns(querySource, patterns) {
|
|
631233
|
+
return querySource !== undefined && patterns.some((pattern) => pattern.endsWith("*") ? querySource.startsWith(pattern.slice(0, -1)) : querySource === pattern);
|
|
631234
|
+
}
|
|
631235
|
+
function isMainThreadQuerySource(querySource) {
|
|
631236
|
+
return querySourceMatchesPatterns(querySource, MAIN_THREAD_QUERY_SOURCES);
|
|
631237
|
+
}
|
|
631238
|
+
function parsePromptCacheTtlEnv(value) {
|
|
631239
|
+
return value === "5m" || value === "1h" ? value : undefined;
|
|
631240
|
+
}
|
|
631241
|
+
function resolvePromptCacheTtlOverride(querySource) {
|
|
631210
631242
|
if (isEnvTruthy(process.env.FORCE_PROMPT_CACHING_5M)) {
|
|
631211
|
-
return
|
|
631243
|
+
return { ttl: "5m", reason: "force_5m_env" };
|
|
631212
631244
|
}
|
|
631213
|
-
|
|
631214
|
-
|
|
631215
|
-
|
|
631216
|
-
|
|
631217
|
-
|
|
631245
|
+
const isMainThread = isMainThreadQuerySource(querySource);
|
|
631246
|
+
const envTtl = parsePromptCacheTtlEnv(isMainThread ? process.env.CLAUDE_CODE_PROMPT_CACHE_TTL : process.env.CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL);
|
|
631247
|
+
if (envTtl !== undefined)
|
|
631248
|
+
return { ttl: envTtl, reason: "env" };
|
|
631249
|
+
const settings = getInitialSettings();
|
|
631250
|
+
const settingTtl = isMainThread ? settings.promptCacheTtl : settings.subagentPromptCacheTtl;
|
|
631251
|
+
if (settingTtl !== undefined)
|
|
631252
|
+
return { ttl: settingTtl, reason: "setting" };
|
|
631253
|
+
if (isEnvTruthy(process.env.ENABLE_PROMPT_CACHING_1H) || getAPIProvider() === "bedrock" && isEnvTruthy(process.env.ENABLE_PROMPT_CACHING_1H_BEDROCK)) {
|
|
631254
|
+
return { ttl: "1h", reason: "enable_1h_env" };
|
|
631218
631255
|
}
|
|
631219
|
-
|
|
631220
|
-
|
|
631221
|
-
|
|
631222
|
-
|
|
631256
|
+
return;
|
|
631257
|
+
}
|
|
631258
|
+
function resolvePromptCacheTtl(querySource) {
|
|
631259
|
+
const override = resolvePromptCacheTtlOverride(querySource);
|
|
631260
|
+
if (override !== undefined)
|
|
631261
|
+
return override;
|
|
631262
|
+
if (!isClaudeAISubscriber() || currentLimits.isUsingOverage) {
|
|
631263
|
+
return { ttl: "5m", reason: "default" };
|
|
631223
631264
|
}
|
|
631224
|
-
if (!userEligible)
|
|
631225
|
-
return false;
|
|
631226
631265
|
let allowlist = getPromptCache1hAllowlist();
|
|
631227
631266
|
if (allowlist === null) {
|
|
631228
|
-
const config7 = getFeatureValue_CACHED_MAY_BE_STALE("tengu_prompt_cache_1h_config", {
|
|
631267
|
+
const config7 = getFeatureValue_CACHED_MAY_BE_STALE("tengu_prompt_cache_1h_config", {
|
|
631268
|
+
allowlist: [...MAIN_THREAD_QUERY_SOURCES]
|
|
631269
|
+
});
|
|
631229
631270
|
allowlist = config7.allowlist ?? [];
|
|
631230
631271
|
setPromptCache1hAllowlist(allowlist);
|
|
631231
631272
|
}
|
|
631232
|
-
return querySource
|
|
631273
|
+
return querySourceMatchesPatterns(querySource, allowlist) ? { ttl: "1h", reason: "subscriber" } : { ttl: "5m", reason: "default" };
|
|
631274
|
+
}
|
|
631275
|
+
function should1hCacheTTL(querySource) {
|
|
631276
|
+
return resolvePromptCacheTtl(querySource).ttl === "1h";
|
|
631233
631277
|
}
|
|
631234
631278
|
function configureEffortParams(effortValue, outputConfig, extraBodyParams, betas, model) {
|
|
631235
631279
|
if (!modelSupportsEffort(model) || "effort" in outputConfig) {
|
|
@@ -631592,6 +631636,9 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
|
|
|
631592
631636
|
queryCheckpoint("query_tool_schema_build_start");
|
|
631593
631637
|
const isAgenticQuery = options.querySource.startsWith("repl_main_thread") || options.querySource.startsWith("agent:") || options.querySource === "sdk" || options.querySource === "hook_agent" || options.querySource === "verification_agent";
|
|
631594
631638
|
const betas = getMergedBetas(options.model, { isAgenticQuery });
|
|
631639
|
+
if (should1hCacheTTL(options.querySource) && shouldSendExtendedCacheTtlBeta() && !betas.includes(EXTENDED_CACHE_TTL_BETA_HEADER)) {
|
|
631640
|
+
betas.push(EXTENDED_CACHE_TTL_BETA_HEADER);
|
|
631641
|
+
}
|
|
631595
631642
|
if (isAdvisorEnabled()) {
|
|
631596
631643
|
betas.push(ADVISOR_BETA_HEADER);
|
|
631597
631644
|
}
|
|
@@ -632961,7 +633008,7 @@ function getMaxOutputTokensForModel(model) {
|
|
|
632961
633008
|
const result = validateBoundedIntEnvVar("CLAUDE_CODE_MAX_OUTPUT_TOKENS", process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS, defaultTokens, maxOutputTokens.upperLimit);
|
|
632962
633009
|
return result.effective;
|
|
632963
633010
|
}
|
|
632964
|
-
var autoModeStateModule3, MAX_NON_STREAMING_TOKENS = 64000;
|
|
633011
|
+
var autoModeStateModule3, MAIN_THREAD_QUERY_SOURCES, MAX_NON_STREAMING_TOKENS = 64000;
|
|
632965
633012
|
var init_claude = __esm(() => {
|
|
632966
633013
|
init_providers();
|
|
632967
633014
|
init_system();
|
|
@@ -633004,6 +633051,7 @@ var init_claude = __esm(() => {
|
|
|
633004
633051
|
init_mcpInstructionsDelta();
|
|
633005
633052
|
init_modelCost();
|
|
633006
633053
|
init_queryProfiler();
|
|
633054
|
+
init_settings2();
|
|
633007
633055
|
init_thinking();
|
|
633008
633056
|
init_toolSearch();
|
|
633009
633057
|
init_apiLimits();
|
|
@@ -633030,6 +633078,12 @@ var init_claude = __esm(() => {
|
|
|
633030
633078
|
init_promptCacheBreakDetection();
|
|
633031
633079
|
init_withRetry();
|
|
633032
633080
|
autoModeStateModule3 = feature("TRANSCRIPT_CLASSIFIER") ? __toCommonJS(exports_autoModeState) : null;
|
|
633081
|
+
MAIN_THREAD_QUERY_SOURCES = [
|
|
633082
|
+
"repl_main_thread*",
|
|
633083
|
+
"sdk",
|
|
633084
|
+
"auto_mode",
|
|
633085
|
+
"memdir_relevance"
|
|
633086
|
+
];
|
|
633033
633087
|
});
|
|
633034
633088
|
|
|
633035
633089
|
// src/utils/shell/prefix.ts
|