@cnwenf/occ 2.1.287 → 2.1.289
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 +67 -35
- 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.289","BINARY_NAME":"occ","BUILD_TIME":"2026-07-28T17:56:28.643Z","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;
|
|
@@ -100325,7 +100325,7 @@ function isFastModeSupportedByModel(modelSetting) {
|
|
|
100325
100325
|
const model = modelSetting ?? getDefaultMainLoopModelSetting();
|
|
100326
100326
|
const parsedModel = parseUserSpecifiedModel(model);
|
|
100327
100327
|
const lower = parsedModel.toLowerCase();
|
|
100328
|
-
return lower.includes("opus-4-
|
|
100328
|
+
return lower.includes("opus-4-7") || lower.includes("opus-4-8") || lower.includes("opus-5");
|
|
100329
100329
|
}
|
|
100330
100330
|
function getFastModeChangeAnnouncement(previousEnabled, newEnabled, model) {
|
|
100331
100331
|
if (Boolean(previousEnabled) === newEnabled) {
|
|
@@ -100567,6 +100567,12 @@ function getOpus46CostTier(fastMode) {
|
|
|
100567
100567
|
}
|
|
100568
100568
|
return COST_TIER_5_25;
|
|
100569
100569
|
}
|
|
100570
|
+
function getOpus5CostTier(fastMode) {
|
|
100571
|
+
if (isFastModeEnabled() && fastMode) {
|
|
100572
|
+
return COST_TIER_10_50;
|
|
100573
|
+
}
|
|
100574
|
+
return COST_TIER_5_25;
|
|
100575
|
+
}
|
|
100570
100576
|
function tokensToUSDCost(modelCosts, usage) {
|
|
100571
100577
|
return usage.input_tokens / 1e6 * modelCosts.inputTokens + usage.output_tokens / 1e6 * modelCosts.outputTokens + (usage.cache_read_input_tokens ?? 0) / 1e6 * modelCosts.promptCacheReadTokens + (usage.cache_creation_input_tokens ?? 0) / 1e6 * modelCosts.promptCacheWriteTokens + (usage.server_tool_use?.web_search_requests ?? 0) * modelCosts.webSearchRequests;
|
|
100572
100578
|
}
|
|
@@ -100576,6 +100582,10 @@ function getModelCosts(model, usage) {
|
|
|
100576
100582
|
const isFastMode = usage.speed === "fast";
|
|
100577
100583
|
return getOpus46CostTier(isFastMode);
|
|
100578
100584
|
}
|
|
100585
|
+
if (shortName === firstPartyNameToCanonical(CLAUDE_OPUS_5_CONFIG.firstParty)) {
|
|
100586
|
+
const isFastMode = usage.speed === "fast";
|
|
100587
|
+
return getOpus5CostTier(isFastMode);
|
|
100588
|
+
}
|
|
100579
100589
|
const costs = MODEL_COSTS[shortName];
|
|
100580
100590
|
if (!costs) {
|
|
100581
100591
|
trackUnknownModelCost(model, shortName);
|
|
@@ -100612,7 +100622,7 @@ function formatPrice(price) {
|
|
|
100612
100622
|
function formatModelPricing(costs) {
|
|
100613
100623
|
return `${formatPrice(costs.inputTokens)}/${formatPrice(costs.outputTokens)} per Mtok`;
|
|
100614
100624
|
}
|
|
100615
|
-
var COST_TIER_3_15, COST_TIER_15_75, COST_TIER_5_25, COST_TIER_30_150, COST_HAIKU_35, COST_HAIKU_45, DEFAULT_UNKNOWN_MODEL_COST, MODEL_COSTS;
|
|
100625
|
+
var 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;
|
|
100616
100626
|
var init_modelCost = __esm(() => {
|
|
100617
100627
|
init_analytics();
|
|
100618
100628
|
init_state();
|
|
@@ -100647,6 +100657,13 @@ var init_modelCost = __esm(() => {
|
|
|
100647
100657
|
promptCacheReadTokens: 3,
|
|
100648
100658
|
webSearchRequests: 0.01
|
|
100649
100659
|
};
|
|
100660
|
+
COST_TIER_10_50 = {
|
|
100661
|
+
inputTokens: 10,
|
|
100662
|
+
outputTokens: 50,
|
|
100663
|
+
promptCacheWriteTokens: 12.5,
|
|
100664
|
+
promptCacheReadTokens: 1,
|
|
100665
|
+
webSearchRequests: 0.01
|
|
100666
|
+
};
|
|
100650
100667
|
COST_HAIKU_35 = {
|
|
100651
100668
|
inputTokens: 0.8,
|
|
100652
100669
|
outputTokens: 4,
|
|
@@ -100673,7 +100690,8 @@ var init_modelCost = __esm(() => {
|
|
|
100673
100690
|
[firstPartyNameToCanonical(CLAUDE_OPUS_4_CONFIG.firstParty)]: COST_TIER_15_75,
|
|
100674
100691
|
[firstPartyNameToCanonical(CLAUDE_OPUS_4_1_CONFIG.firstParty)]: COST_TIER_15_75,
|
|
100675
100692
|
[firstPartyNameToCanonical(CLAUDE_OPUS_4_5_CONFIG.firstParty)]: COST_TIER_5_25,
|
|
100676
|
-
[firstPartyNameToCanonical(CLAUDE_OPUS_4_6_CONFIG.firstParty)]: COST_TIER_5_25
|
|
100693
|
+
[firstPartyNameToCanonical(CLAUDE_OPUS_4_6_CONFIG.firstParty)]: COST_TIER_5_25,
|
|
100694
|
+
[firstPartyNameToCanonical(CLAUDE_OPUS_5_CONFIG.firstParty)]: COST_TIER_5_25
|
|
100677
100695
|
};
|
|
100678
100696
|
});
|
|
100679
100697
|
|
|
@@ -100937,10 +100955,14 @@ function getDefaultOpusModel() {
|
|
|
100937
100955
|
if (process.env.ANTHROPIC_DEFAULT_OPUS_MODEL) {
|
|
100938
100956
|
return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
|
|
100939
100957
|
}
|
|
100940
|
-
|
|
100958
|
+
const provider3 = getAPIProvider();
|
|
100959
|
+
if (provider3 === "foundry") {
|
|
100960
|
+
return getModelStrings2().opus46;
|
|
100961
|
+
}
|
|
100962
|
+
if (provider3 === "gateway") {
|
|
100941
100963
|
return getModelStrings2().opus47;
|
|
100942
100964
|
}
|
|
100943
|
-
return getModelStrings2().
|
|
100965
|
+
return getModelStrings2().opus5;
|
|
100944
100966
|
}
|
|
100945
100967
|
function getDefaultSonnetModel() {
|
|
100946
100968
|
if (process.env.ANTHROPIC_DEFAULT_SONNET_MODEL) {
|
|
@@ -139682,7 +139704,7 @@ function modelSupports1M(model) {
|
|
|
139682
139704
|
return false;
|
|
139683
139705
|
}
|
|
139684
139706
|
const canonical = getCanonicalName(model);
|
|
139685
|
-
return canonical.includes("claude-sonnet-4") || canonical.includes("claude-sonnet-5") || canonical.includes("opus-4-6") || canonical.includes("opus-4-7") || canonical.includes("opus-4-8");
|
|
139707
|
+
return canonical.includes("claude-sonnet-4") || canonical.includes("claude-sonnet-5") || canonical.includes("opus-4-6") || canonical.includes("opus-4-7") || canonical.includes("opus-4-8") || canonical.includes("opus-5");
|
|
139686
139708
|
}
|
|
139687
139709
|
function getContextWindowForModel(model, betas) {
|
|
139688
139710
|
if (process.env.USER_TYPE === "ant" && process.env.CLAUDE_CODE_MAX_CONTEXT_TOKENS) {
|
|
@@ -139911,7 +139933,7 @@ function modelSupportsContextManagement(model) {
|
|
|
139911
139933
|
if (provider5 === "firstParty") {
|
|
139912
139934
|
return !canonical.includes("claude-3-");
|
|
139913
139935
|
}
|
|
139914
|
-
return canonical.includes("claude-opus-4") || canonical.includes("claude-sonnet-4") || canonical.includes("claude-haiku-4");
|
|
139936
|
+
return canonical.includes("claude-opus-4") || canonical.includes("claude-sonnet-4") || canonical.includes("claude-haiku-4") || canonical.includes("claude-opus-5");
|
|
139915
139937
|
}
|
|
139916
139938
|
function modelSupportsStructuredOutputs(model) {
|
|
139917
139939
|
const canonical = getCanonicalName(model);
|
|
@@ -203285,7 +203307,7 @@ function modelSupportsAdaptiveThinking(model) {
|
|
|
203285
203307
|
return supported3P;
|
|
203286
203308
|
}
|
|
203287
203309
|
const canonical = getCanonicalName(model);
|
|
203288
|
-
if (canonical.includes("opus-4-6") || canonical.includes("sonnet-4-6")) {
|
|
203310
|
+
if (canonical.includes("opus-4-6") || canonical.includes("sonnet-4-6") || canonical.includes("opus-5")) {
|
|
203289
203311
|
return true;
|
|
203290
203312
|
}
|
|
203291
203313
|
if (canonical.includes("opus") || canonical.includes("sonnet") || canonical.includes("haiku")) {
|
|
@@ -203343,7 +203365,7 @@ function modelSupportsEffort(model) {
|
|
|
203343
203365
|
if (supported3P !== undefined) {
|
|
203344
203366
|
return supported3P;
|
|
203345
203367
|
}
|
|
203346
|
-
if (m5.includes("opus-4-6") || m5.includes("sonnet-4-6")) {
|
|
203368
|
+
if (m5.includes("opus-4-6") || m5.includes("sonnet-4-6") || m5.includes("opus-5")) {
|
|
203347
203369
|
return true;
|
|
203348
203370
|
}
|
|
203349
203371
|
if (m5.includes("haiku") || m5.includes("sonnet") || m5.includes("opus")) {
|
|
@@ -203356,7 +203378,7 @@ function modelSupportsMaxEffort(model) {
|
|
|
203356
203378
|
if (supported3P !== undefined) {
|
|
203357
203379
|
return supported3P;
|
|
203358
203380
|
}
|
|
203359
|
-
if (model.toLowerCase().includes("opus-4-6")) {
|
|
203381
|
+
if (model.toLowerCase().includes("opus-4-6") || model.toLowerCase().includes("opus-5")) {
|
|
203360
203382
|
return true;
|
|
203361
203383
|
}
|
|
203362
203384
|
if (process.env.USER_TYPE === "ant" && resolveAntModel(model)) {
|
|
@@ -203370,7 +203392,7 @@ function modelSupportsXhighEffort(model) {
|
|
|
203370
203392
|
return supported3P;
|
|
203371
203393
|
}
|
|
203372
203394
|
const lower = model.toLowerCase();
|
|
203373
|
-
if (lower.includes("opus-4-7") || lower.includes("opus-4-8")) {
|
|
203395
|
+
if (lower.includes("opus-4-7") || lower.includes("opus-4-8") || lower.includes("opus-5")) {
|
|
203374
203396
|
return true;
|
|
203375
203397
|
}
|
|
203376
203398
|
if (process.env.USER_TYPE === "ant" && resolveAntModel(model)) {
|
|
@@ -263050,11 +263072,11 @@ function getExperimentAdvisorModels() {
|
|
|
263050
263072
|
}
|
|
263051
263073
|
function modelSupportsAdvisor(model) {
|
|
263052
263074
|
const m5 = model.toLowerCase();
|
|
263053
|
-
return m5.includes("opus-4-6") || m5.includes("sonnet-4-6") || process.env.USER_TYPE === "ant";
|
|
263075
|
+
return m5.includes("opus-4-6") || m5.includes("sonnet-4-6") || m5.includes("opus-5") || process.env.USER_TYPE === "ant";
|
|
263054
263076
|
}
|
|
263055
263077
|
function isValidAdvisorModel(model) {
|
|
263056
263078
|
const m5 = model.toLowerCase();
|
|
263057
|
-
return m5.includes("opus-4-6") || m5.includes("sonnet-4-6") || process.env.USER_TYPE === "ant";
|
|
263079
|
+
return m5.includes("opus-4-6") || m5.includes("sonnet-4-6") || m5.includes("opus-5") || process.env.USER_TYPE === "ant";
|
|
263058
263080
|
}
|
|
263059
263081
|
function getInitialAdvisorSetting() {
|
|
263060
263082
|
if (!isAdvisorEnabled()) {
|
|
@@ -578367,6 +578389,13 @@ function getDefaultOptionForUser(fastMode = false) {
|
|
|
578367
578389
|
description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? "" : ` \xB7 ${formatModelPricing(COST_TIER_3_15)}`}`
|
|
578368
578390
|
};
|
|
578369
578391
|
}
|
|
578392
|
+
function getOpus5PricingSuffix(fastMode) {
|
|
578393
|
+
if (getAPIProvider() !== "firstParty")
|
|
578394
|
+
return "";
|
|
578395
|
+
const pricing = formatModelPricing(getOpus5CostTier(fastMode));
|
|
578396
|
+
const fastModeIndicator = fastMode ? ` (${LIGHTNING_BOLT})` : "";
|
|
578397
|
+
return ` \xB7${fastModeIndicator} ${pricing}`;
|
|
578398
|
+
}
|
|
578370
578399
|
function getSonnet5Option() {
|
|
578371
578400
|
const is3P = getAPIProvider() !== "firstParty";
|
|
578372
578401
|
return {
|
|
@@ -578453,13 +578482,13 @@ function getOpus46Option(fastMode = false) {
|
|
|
578453
578482
|
descriptionForModel: "Opus 4.6 - previous Opus version"
|
|
578454
578483
|
};
|
|
578455
578484
|
}
|
|
578456
|
-
function
|
|
578485
|
+
function getOpus5Option(fastMode = false) {
|
|
578457
578486
|
const is3P = getAPIProvider() !== "firstParty";
|
|
578458
578487
|
return {
|
|
578459
|
-
value: is3P ? getModelStrings2().
|
|
578488
|
+
value: is3P ? getModelStrings2().opus5 : "opus",
|
|
578460
578489
|
label: "Opus",
|
|
578461
|
-
description: `Opus
|
|
578462
|
-
descriptionForModel: "Opus
|
|
578490
|
+
description: `Opus 5 \xB7 Best for everyday, complex tasks${getOpus5PricingSuffix(fastMode)}`,
|
|
578491
|
+
descriptionForModel: "Opus 5 - best for everyday, complex tasks"
|
|
578463
578492
|
};
|
|
578464
578493
|
}
|
|
578465
578494
|
function getSonnet5_1MOption() {
|
|
@@ -578480,13 +578509,13 @@ function getSonnet46_1MOption() {
|
|
|
578480
578509
|
descriptionForModel: "Sonnet 4.6 with 1M context window - for long sessions with large codebases"
|
|
578481
578510
|
};
|
|
578482
578511
|
}
|
|
578483
|
-
function
|
|
578512
|
+
function getOpus5_1MOption(fastMode = false) {
|
|
578484
578513
|
const is3P = getAPIProvider() !== "firstParty";
|
|
578485
578514
|
return {
|
|
578486
|
-
value: is3P ? getModelStrings2().
|
|
578515
|
+
value: is3P ? getModelStrings2().opus5 + "[1m]" : "opus[1m]",
|
|
578487
578516
|
label: "Opus (1M context)",
|
|
578488
|
-
description: `Opus
|
|
578489
|
-
descriptionForModel: "Opus
|
|
578517
|
+
description: `Opus 5 for long sessions${getOpus5PricingSuffix(fastMode)}`,
|
|
578518
|
+
descriptionForModel: "Opus 5 with 1M context window - for long sessions with large codebases"
|
|
578490
578519
|
};
|
|
578491
578520
|
}
|
|
578492
578521
|
function getOpus46_1MOption(fastMode = false) {
|
|
@@ -578536,7 +578565,7 @@ function getMaxOpusOption(fastMode = false) {
|
|
|
578536
578565
|
return {
|
|
578537
578566
|
value: "opus",
|
|
578538
578567
|
label: "Opus",
|
|
578539
|
-
description: `Opus
|
|
578568
|
+
description: `Opus 5 \xB7 Best for everyday, complex tasks${fastMode ? getOpus5PricingSuffix(true) : ""}`
|
|
578540
578569
|
};
|
|
578541
578570
|
}
|
|
578542
578571
|
function getMaxSonnet5_1MOption() {
|
|
@@ -578548,21 +578577,21 @@ function getMaxSonnet5_1MOption() {
|
|
|
578548
578577
|
description: `Sonnet 5 with 1M context${billingInfo}${is3P ? "" : ` \xB7 ${formatModelPricing(COST_TIER_3_15)}`}`
|
|
578549
578578
|
};
|
|
578550
578579
|
}
|
|
578551
|
-
function
|
|
578580
|
+
function getMaxOpus5_1MOption(fastMode = false) {
|
|
578552
578581
|
const billingInfo = isClaudeAISubscriber() ? " \xB7 Billed as extra usage" : "";
|
|
578553
578582
|
return {
|
|
578554
578583
|
value: "opus[1m]",
|
|
578555
578584
|
label: "Opus (1M context)",
|
|
578556
|
-
description: `Opus
|
|
578585
|
+
description: `Opus 5 with 1M context${billingInfo}${getOpus5PricingSuffix(fastMode)}`
|
|
578557
578586
|
};
|
|
578558
578587
|
}
|
|
578559
578588
|
function getMergedOpus1MOption(fastMode = false) {
|
|
578560
578589
|
const is3P = getAPIProvider() !== "firstParty";
|
|
578561
578590
|
return {
|
|
578562
|
-
value: is3P ? getModelStrings2().
|
|
578591
|
+
value: is3P ? getModelStrings2().opus5 + "[1m]" : "opus[1m]",
|
|
578563
578592
|
label: "Opus (1M context)",
|
|
578564
|
-
description: `Opus
|
|
578565
|
-
descriptionForModel: "Opus
|
|
578593
|
+
description: `Opus 5 with 1M context \xB7 Best for everyday, complex tasks${!is3P && fastMode ? getOpus5PricingSuffix(fastMode) : ""}`,
|
|
578594
|
+
descriptionForModel: "Opus 5 with 1M context - best for everyday, complex tasks"
|
|
578566
578595
|
};
|
|
578567
578596
|
}
|
|
578568
578597
|
function getOpusPlanOption() {
|
|
@@ -578593,7 +578622,7 @@ function getModelOptionsBase(fastMode = false) {
|
|
|
578593
578622
|
if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
|
|
578594
578623
|
const premiumOptions = [getDefaultOptionForUser(fastMode)];
|
|
578595
578624
|
if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
|
|
578596
|
-
premiumOptions.push(
|
|
578625
|
+
premiumOptions.push(getMaxOpus5_1MOption(fastMode));
|
|
578597
578626
|
}
|
|
578598
578627
|
premiumOptions.push(MaxSonnet5Option);
|
|
578599
578628
|
if (checkSonnet1mAccess()) {
|
|
@@ -578611,7 +578640,7 @@ function getModelOptionsBase(fastMode = false) {
|
|
|
578611
578640
|
} else {
|
|
578612
578641
|
standardOptions.push(getMaxOpusOption(fastMode));
|
|
578613
578642
|
if (checkOpus1mAccess()) {
|
|
578614
|
-
standardOptions.push(
|
|
578643
|
+
standardOptions.push(getMaxOpus5_1MOption(fastMode));
|
|
578615
578644
|
}
|
|
578616
578645
|
}
|
|
578617
578646
|
standardOptions.push(MaxHaiku45Option);
|
|
@@ -578626,9 +578655,9 @@ function getModelOptionsBase(fastMode = false) {
|
|
|
578626
578655
|
if (isOpus1mMergeEnabled()) {
|
|
578627
578656
|
payg1POptions.push(getMergedOpus1MOption(fastMode));
|
|
578628
578657
|
} else {
|
|
578629
|
-
payg1POptions.push(
|
|
578658
|
+
payg1POptions.push(getOpus5Option(fastMode));
|
|
578630
578659
|
if (checkOpus1mAccess()) {
|
|
578631
|
-
payg1POptions.push(
|
|
578660
|
+
payg1POptions.push(getOpus5_1MOption(fastMode));
|
|
578632
578661
|
}
|
|
578633
578662
|
}
|
|
578634
578663
|
payg1POptions.push(getHaiku45Option());
|
|
@@ -578784,6 +578813,7 @@ var init_modelOptions = __esm(() => {
|
|
|
578784
578813
|
init_auth6();
|
|
578785
578814
|
init_modelStrings();
|
|
578786
578815
|
init_modelCost();
|
|
578816
|
+
init_figures2();
|
|
578787
578817
|
init_settings2();
|
|
578788
578818
|
init_check1mAccess();
|
|
578789
578819
|
init_providers();
|
|
@@ -811847,8 +811877,10 @@ var init_claudeApiContent = __esm(() => {
|
|
|
811847
811877
|
init_streaming6();
|
|
811848
811878
|
init_tool_use2();
|
|
811849
811879
|
SKILL_MODEL_VARS = {
|
|
811850
|
-
OPUS_ID: "claude-opus-
|
|
811851
|
-
OPUS_NAME: "Claude Opus
|
|
811880
|
+
OPUS_ID: "claude-opus-5",
|
|
811881
|
+
OPUS_NAME: "Claude Opus 5",
|
|
811882
|
+
PREV_OPUS_ID: "claude-opus-4-8",
|
|
811883
|
+
PREV_OPUS_NAME: "Claude Opus 4.8",
|
|
811852
811884
|
SONNET_ID: "claude-sonnet-4-6",
|
|
811853
811885
|
SONNET_NAME: "Claude Sonnet 4.6",
|
|
811854
811886
|
HAIKU_ID: "claude-haiku-4-5",
|
|
@@ -823263,7 +823295,7 @@ async function run() {
|
|
|
823263
823295
|
})).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) => {
|
|
823264
823296
|
const n6 = Number(v6);
|
|
823265
823297
|
return Number.isFinite(n6) ? n6 : undefined;
|
|
823266
|
-
}).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. '
|
|
823298
|
+
}).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. 'fable', 'opus', or 'sonnet') or a model's full name (e.g. 'claude-fable-5').`).addOption(new Option("--effort <level>", `Effort level for the current session (${EFFORT_LEVELS.join(", ")})`).argParser((rawValue) => {
|
|
823267
823299
|
const value = rawValue.toLowerCase();
|
|
823268
823300
|
if (!EFFORT_LEVELS.includes(value)) {
|
|
823269
823301
|
throw new InvalidArgumentError(`It must be one of: ${EFFORT_LEVELS.join(", ")}`);
|