@cnwenf/occ 2.1.303 → 2.1.304
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 +63 -38
- 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.304","BINARY_NAME":"occ","BUILD_TIME":"2026-08-17T18:57:33.931Z","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;
|
|
@@ -59632,7 +59632,7 @@ var init_types2 = __esm(() => {
|
|
|
59632
59632
|
externalEditorContext: exports_external.boolean().optional().describe("Show the last assistant response as commented context above the prompt when opening the external editor (Ctrl+G)."),
|
|
59633
59633
|
prUrlTemplate: exports_external.string().optional().describe('URL template for the footer PR badge (e.g. "https://internal-review.example.com/pr/{number}"). Uses {number} as the PR number placeholder. Defaults to github.com.'),
|
|
59634
59634
|
alwaysThinkingEnabled: exports_external.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is " + "enabled automatically for supported models."),
|
|
59635
|
-
effortLevel: exports_external.enum(
|
|
59635
|
+
effortLevel: exports_external.enum(["low", "medium", "high", "xhigh"]).optional().catch(undefined).describe("Persisted effort level for supported models."),
|
|
59636
59636
|
dynamicWorkflowSize: exports_external.enum(["small", "medium", "large"]).optional().catch(undefined).describe("Advisory guideline for how large Claude makes dynamic workflows (small/medium/large agent counts). Not an enforced cap."),
|
|
59637
59637
|
advisorModel: exports_external.string().optional().describe("Advisor model for the server-side advisor tool."),
|
|
59638
59638
|
fastMode: exports_external.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),
|
|
@@ -140004,6 +140004,9 @@ function getModelMaxOutputTokens(model) {
|
|
|
140004
140004
|
if (m4.includes("opus-4-6")) {
|
|
140005
140005
|
defaultTokens = 64000;
|
|
140006
140006
|
upperLimit = 128000;
|
|
140007
|
+
} else if (m4.includes("opus-4-7") || m4.includes("opus-4-8") || m4.includes("opus-5") || m4.includes("sonnet-5") || m4.includes("fable-5")) {
|
|
140008
|
+
defaultTokens = 64000;
|
|
140009
|
+
upperLimit = 128000;
|
|
140007
140010
|
} else if (m4.includes("sonnet-4-6")) {
|
|
140008
140011
|
defaultTokens = 32000;
|
|
140009
140012
|
upperLimit = 128000;
|
|
@@ -203622,7 +203625,7 @@ function modelSupportsAdaptiveThinking(model) {
|
|
|
203622
203625
|
return supported3P;
|
|
203623
203626
|
}
|
|
203624
203627
|
const canonical = getCanonicalName(model);
|
|
203625
|
-
if (canonical.includes("opus-4-6") || canonical.includes("sonnet-4-6") || canonical.includes("
|
|
203628
|
+
if (canonical.includes("opus-4-6") || canonical.includes("opus-4-7") || canonical.includes("opus-4-8") || canonical.includes("opus-5") || canonical.includes("sonnet-4-6") || canonical.includes("sonnet-5")) {
|
|
203626
203629
|
return true;
|
|
203627
203630
|
}
|
|
203628
203631
|
if (canonical.includes("opus") || canonical.includes("sonnet") || canonical.includes("haiku")) {
|
|
@@ -203680,7 +203683,7 @@ function modelSupportsEffort(model) {
|
|
|
203680
203683
|
if (supported3P !== undefined) {
|
|
203681
203684
|
return supported3P;
|
|
203682
203685
|
}
|
|
203683
|
-
if (m5.includes("opus-4-6") || m5.includes("sonnet-4-6") || m5.includes("
|
|
203686
|
+
if (m5.includes("opus-4-6") || m5.includes("opus-4-7") || m5.includes("opus-4-8") || m5.includes("opus-5") || m5.includes("sonnet-4-6") || m5.includes("sonnet-5") || m5.includes("fable-5")) {
|
|
203684
203687
|
return true;
|
|
203685
203688
|
}
|
|
203686
203689
|
if (m5.includes("haiku") || m5.includes("sonnet") || m5.includes("opus")) {
|
|
@@ -203693,7 +203696,8 @@ function modelSupportsMaxEffort(model) {
|
|
|
203693
203696
|
if (supported3P !== undefined) {
|
|
203694
203697
|
return supported3P;
|
|
203695
203698
|
}
|
|
203696
|
-
|
|
203699
|
+
const m5 = model.toLowerCase();
|
|
203700
|
+
if (m5.includes("opus-4-6") || m5.includes("opus-4-7") || m5.includes("opus-4-8") || m5.includes("opus-5") || m5.includes("sonnet-4-6") || m5.includes("sonnet-5") || m5.includes("fable-5")) {
|
|
203697
203701
|
return true;
|
|
203698
203702
|
}
|
|
203699
203703
|
if (process.env.USER_TYPE === "ant" && resolveAntModel(model)) {
|
|
@@ -203707,7 +203711,7 @@ function modelSupportsXhighEffort(model) {
|
|
|
203707
203711
|
return supported3P;
|
|
203708
203712
|
}
|
|
203709
203713
|
const lower = model.toLowerCase();
|
|
203710
|
-
if (lower.includes("opus-4-7") || lower.includes("opus-4-8") || lower.includes("opus-5")) {
|
|
203714
|
+
if (lower.includes("opus-4-7") || lower.includes("opus-4-8") || lower.includes("opus-5") || lower.includes("sonnet-5") || lower.includes("fable-5")) {
|
|
203711
203715
|
return true;
|
|
203712
203716
|
}
|
|
203713
203717
|
if (process.env.USER_TYPE === "ant" && resolveAntModel(model)) {
|
|
@@ -203736,7 +203740,7 @@ function parseEffortValue(value) {
|
|
|
203736
203740
|
return;
|
|
203737
203741
|
}
|
|
203738
203742
|
function toPersistableEffort(value) {
|
|
203739
|
-
if (value === "low" || value === "medium" || value === "high") {
|
|
203743
|
+
if (value === "low" || value === "medium" || value === "high" || value === "xhigh") {
|
|
203740
203744
|
return value;
|
|
203741
203745
|
}
|
|
203742
203746
|
if (value === "max" && process.env.USER_TYPE === "ant") {
|
|
@@ -203769,17 +203773,24 @@ function resolveAppliedEffort(model, appStateEffortValue) {
|
|
|
203769
203773
|
}
|
|
203770
203774
|
return resolved;
|
|
203771
203775
|
}
|
|
203776
|
+
function resolveConfiguredEffort(model, appStateEffortValue) {
|
|
203777
|
+
const envOverride = getEffortEnvOverride();
|
|
203778
|
+
if (envOverride === null) {
|
|
203779
|
+
return;
|
|
203780
|
+
}
|
|
203781
|
+
return envOverride ?? appStateEffortValue ?? getDefaultEffortForModel(model);
|
|
203782
|
+
}
|
|
203772
203783
|
function getDisplayedEffortLevel(model, appStateEffort) {
|
|
203773
|
-
const
|
|
203774
|
-
return convertEffortValueToLevel(
|
|
203784
|
+
const configured = resolveConfiguredEffort(model, appStateEffort) ?? "high";
|
|
203785
|
+
return convertEffortValueToLevel(configured);
|
|
203775
203786
|
}
|
|
203776
203787
|
function getEffortSuffix(model, effortValue) {
|
|
203777
203788
|
if (effortValue === undefined)
|
|
203778
203789
|
return "";
|
|
203779
|
-
const
|
|
203780
|
-
if (
|
|
203790
|
+
const configured = resolveConfiguredEffort(model, effortValue);
|
|
203791
|
+
if (configured === undefined)
|
|
203781
203792
|
return "";
|
|
203782
|
-
return ` with ${convertEffortValueToLevel(
|
|
203793
|
+
return ` with ${convertEffortValueToLevel(configured)} effort`;
|
|
203783
203794
|
}
|
|
203784
203795
|
function isValidNumericEffort(value) {
|
|
203785
203796
|
return Number.isInteger(value);
|
|
@@ -203807,8 +203818,10 @@ function getEffortLevelDescription(level) {
|
|
|
203807
203818
|
return "Balanced approach with standard implementation and testing";
|
|
203808
203819
|
case "high":
|
|
203809
203820
|
return "Comprehensive implementation with extensive testing and documentation";
|
|
203821
|
+
case "xhigh":
|
|
203822
|
+
return "Deeper reasoning than high, just below maximum (Fable 5, Opus 4.7+, Sonnet 5)";
|
|
203810
203823
|
case "max":
|
|
203811
|
-
return "Maximum capability with deepest reasoning
|
|
203824
|
+
return "Maximum capability with deepest reasoning. May use excessive tokens resulting in long response times or overthinking. Use sparingly for the hardest tasks.";
|
|
203812
203825
|
}
|
|
203813
203826
|
}
|
|
203814
203827
|
function getEffortValueDescription(value) {
|
|
@@ -203853,6 +203866,9 @@ function getDefaultEffortForModel(model) {
|
|
|
203853
203866
|
return "medium";
|
|
203854
203867
|
}
|
|
203855
203868
|
}
|
|
203869
|
+
if (model.toLowerCase().includes("opus-4-7")) {
|
|
203870
|
+
return "xhigh";
|
|
203871
|
+
}
|
|
203856
203872
|
if (isUltrathinkEnabled() && modelSupportsEffort(model)) {
|
|
203857
203873
|
return "medium";
|
|
203858
203874
|
}
|
|
@@ -453612,7 +453628,7 @@ var init_coreSchemas = __esm(() => {
|
|
|
453612
453628
|
displayName: exports_external.string().describe("Human-readable display name"),
|
|
453613
453629
|
description: exports_external.string().describe("Description of the model's capabilities"),
|
|
453614
453630
|
supportsEffort: exports_external.boolean().optional().describe("Whether this model supports effort levels"),
|
|
453615
|
-
supportedEffortLevels: exports_external.array(exports_external.enum(["low", "medium", "high", "max"])).optional().describe("Available effort levels for this model"),
|
|
453631
|
+
supportedEffortLevels: exports_external.array(exports_external.enum(["low", "medium", "high", "xhigh", "max"])).optional().describe("Available effort levels for this model"),
|
|
453616
453632
|
supportsAdaptiveThinking: exports_external.boolean().optional().describe("Whether this model supports adaptive thinking (Claude decides when and how much to think)"),
|
|
453617
453633
|
supportsFastMode: exports_external.boolean().optional().describe("Whether this model supports fast mode"),
|
|
453618
453634
|
supportsAutoMode: exports_external.boolean().optional().describe("Whether this model supports auto mode")
|
|
@@ -453642,7 +453658,10 @@ var init_coreSchemas = __esm(() => {
|
|
|
453642
453658
|
maxTurns: exports_external.number().int().positive().optional().describe("Maximum number of agentic turns (API round-trips) before stopping"),
|
|
453643
453659
|
background: exports_external.boolean().optional().describe("Run this agent as a background task (non-blocking, fire-and-forget) when invoked"),
|
|
453644
453660
|
memory: exports_external.enum(["user", "project", "local"]).optional().describe("Scope for auto-loading agent memory files. 'user' - ~/.claude/agent-memory/<agentType>/, 'project' - .claude/agent-memory/<agentType>/, 'local' - .claude/agent-memory-local/<agentType>/"),
|
|
453645
|
-
effort: exports_external.union([
|
|
453661
|
+
effort: exports_external.union([
|
|
453662
|
+
exports_external.enum(["low", "medium", "high", "xhigh", "max"]),
|
|
453663
|
+
exports_external.number().int()
|
|
453664
|
+
]).optional().describe("Reasoning effort level for this agent. Either a named level or an integer"),
|
|
453646
453665
|
permissionMode: PermissionModeSchema().optional().describe("Permission mode controlling how tool executions are handled")
|
|
453647
453666
|
}).describe("Definition for a custom subagent that can be invoked via the Agent tool."));
|
|
453648
453667
|
SettingSourceSchema = lazySchema(() => exports_external.enum(["user", "project", "local"]).describe("Source for loading filesystem-based settings. " + "'user' - Global user settings (~/.claude/settings.json). " + "'project' - Project settings (.claude/settings.json). " + "'local' - Local settings (.claude/settings.local.json)."));
|
|
@@ -647772,7 +647791,7 @@ var init_EffortIndicator = __esm(() => {
|
|
|
647772
647791
|
|
|
647773
647792
|
// src/components/ModelPicker.tsx
|
|
647774
647793
|
function ModelPicker(t0) {
|
|
647775
|
-
const $4 = import_compiler_runtime134.c(
|
|
647794
|
+
const $4 = import_compiler_runtime134.c(84);
|
|
647776
647795
|
const {
|
|
647777
647796
|
initial,
|
|
647778
647797
|
sessionModel,
|
|
@@ -647881,16 +647900,20 @@ function ModelPicker(t0) {
|
|
|
647881
647900
|
}
|
|
647882
647901
|
const focusedModelName = t7;
|
|
647883
647902
|
let focusedSupportsEffort;
|
|
647903
|
+
let focusedSupportsXhigh;
|
|
647884
647904
|
let t8;
|
|
647885
647905
|
if ($4[20] !== focusedValue) {
|
|
647886
647906
|
const focusedModel = resolveOptionModel(focusedValue);
|
|
647887
647907
|
focusedSupportsEffort = focusedModel ? modelSupportsEffort(focusedModel) : false;
|
|
647908
|
+
focusedSupportsXhigh = focusedModel ? modelSupportsXhighEffort(focusedModel) : false;
|
|
647888
647909
|
t8 = focusedModel ? modelSupportsMaxEffort(focusedModel) : false;
|
|
647889
647910
|
$4[20] = focusedValue;
|
|
647890
647911
|
$4[21] = focusedSupportsEffort;
|
|
647891
647912
|
$4[22] = t8;
|
|
647913
|
+
$4[82] = focusedSupportsXhigh;
|
|
647892
647914
|
} else {
|
|
647893
647915
|
focusedSupportsEffort = $4[21];
|
|
647916
|
+
focusedSupportsXhigh = $4[82];
|
|
647894
647917
|
t8 = $4[22];
|
|
647895
647918
|
}
|
|
647896
647919
|
const focusedSupportsMax = t8;
|
|
@@ -647903,7 +647926,7 @@ function ModelPicker(t0) {
|
|
|
647903
647926
|
t9 = $4[24];
|
|
647904
647927
|
}
|
|
647905
647928
|
const focusedDefaultEffort = t9;
|
|
647906
|
-
const displayEffort = effort === "max" && !focusedSupportsMax ? "high" : effort;
|
|
647929
|
+
const displayEffort = effort === "max" && !focusedSupportsMax || effort === "xhigh" && !focusedSupportsXhigh ? "high" : effort;
|
|
647907
647930
|
let t10;
|
|
647908
647931
|
if ($4[25] !== effortValue || $4[26] !== hasToggledEffort) {
|
|
647909
647932
|
t10 = (value) => {
|
|
@@ -647920,18 +647943,19 @@ function ModelPicker(t0) {
|
|
|
647920
647943
|
}
|
|
647921
647944
|
const handleFocus = t10;
|
|
647922
647945
|
let t11;
|
|
647923
|
-
if ($4[28] !== focusedDefaultEffort || $4[29] !== focusedSupportsEffort || $4[30] !== focusedSupportsMax) {
|
|
647946
|
+
if ($4[28] !== focusedDefaultEffort || $4[29] !== focusedSupportsEffort || $4[30] !== focusedSupportsMax || $4[83] !== focusedSupportsXhigh) {
|
|
647924
647947
|
t11 = (direction) => {
|
|
647925
647948
|
if (!focusedSupportsEffort) {
|
|
647926
647949
|
return;
|
|
647927
647950
|
}
|
|
647928
|
-
setEffort((prev) => cycleEffortLevel(prev ?? focusedDefaultEffort, direction, focusedSupportsMax));
|
|
647951
|
+
setEffort((prev) => cycleEffortLevel(prev ?? focusedDefaultEffort, direction, focusedSupportsMax, focusedSupportsXhigh));
|
|
647929
647952
|
setHasToggledEffort(true);
|
|
647930
647953
|
};
|
|
647931
647954
|
$4[28] = focusedDefaultEffort;
|
|
647932
647955
|
$4[29] = focusedSupportsEffort;
|
|
647933
647956
|
$4[30] = focusedSupportsMax;
|
|
647934
647957
|
$4[31] = t11;
|
|
647958
|
+
$4[83] = focusedSupportsXhigh;
|
|
647935
647959
|
} else {
|
|
647936
647960
|
t11 = $4[31];
|
|
647937
647961
|
}
|
|
@@ -648341,10 +648365,11 @@ function EffortLevelIndicator(t0) {
|
|
|
648341
648365
|
}
|
|
648342
648366
|
return t4;
|
|
648343
648367
|
}
|
|
648344
|
-
function cycleEffortLevel(current, direction, includeMax) {
|
|
648345
|
-
const levels =
|
|
648346
|
-
const
|
|
648347
|
-
const
|
|
648368
|
+
function cycleEffortLevel(current, direction, includeMax, includeXhigh) {
|
|
648369
|
+
const levels = ["low", "medium", "high", "xhigh", "max"].filter((level) => (level !== "max" || includeMax) && (level !== "xhigh" || includeXhigh));
|
|
648370
|
+
const clamped = current === "max" && !includeMax || current === "xhigh" && !includeXhigh ? "high" : current;
|
|
648371
|
+
const idx = levels.indexOf(clamped);
|
|
648372
|
+
const currentIndex = idx !== -1 ? idx : levels.length - 1;
|
|
648348
648373
|
if (direction === "right") {
|
|
648349
648374
|
return levels[(currentIndex + 1) % levels.length];
|
|
648350
648375
|
} else {
|
|
@@ -714730,7 +714755,7 @@ function setEffortValue(effortValue) {
|
|
|
714730
714755
|
};
|
|
714731
714756
|
}
|
|
714732
714757
|
const description = getEffortValueDescription(effortValue);
|
|
714733
|
-
const suffix2 = persistable !== undefined ? "" : " (this session only)";
|
|
714758
|
+
const suffix2 = persistable !== undefined ? " (saved as your default for new sessions)" : " (this session only)";
|
|
714734
714759
|
return {
|
|
714735
714760
|
message: `Set effort level to ${effortValue}${suffix2}: ${description}`,
|
|
714736
714761
|
effortUpdate: {
|
|
@@ -714794,7 +714819,8 @@ function enableUltracode() {
|
|
|
714794
714819
|
};
|
|
714795
714820
|
}
|
|
714796
714821
|
function executeEffort(args) {
|
|
714797
|
-
const
|
|
714822
|
+
const normalizedAlias = { med: "medium" };
|
|
714823
|
+
const normalized = normalizedAlias[args.trim().toLowerCase()] ?? args.trim().toLowerCase();
|
|
714798
714824
|
if (normalized === "auto" || normalized === "unset") {
|
|
714799
714825
|
if (isUltracodeEnabled()) {
|
|
714800
714826
|
disableUltracodeForSession();
|
|
@@ -714806,7 +714832,7 @@ function executeEffort(args) {
|
|
|
714806
714832
|
}
|
|
714807
714833
|
if (!isEffortLevel(normalized)) {
|
|
714808
714834
|
return {
|
|
714809
|
-
message: `Invalid argument: ${args}. Valid options are: low, medium, high, max, ultracode, auto`
|
|
714835
|
+
message: `Invalid argument: ${args}. Valid options are: low, medium, high, xhigh, max, ultracode, auto`
|
|
714810
714836
|
};
|
|
714811
714837
|
}
|
|
714812
714838
|
if (isUltracodeEnabled()) {
|
|
@@ -714869,15 +714895,14 @@ function ApplyEffortAndClose(t0) {
|
|
|
714869
714895
|
async function call82(onDone, _context, args) {
|
|
714870
714896
|
args = args?.trim() || "";
|
|
714871
714897
|
if (COMMON_HELP_ARGS2.includes(args)) {
|
|
714872
|
-
onDone(`Usage: /effort [low|medium|high|max|ultracode|auto]
|
|
714873
|
-
|
|
714874
|
-
|
|
714875
|
-
|
|
714876
|
-
|
|
714877
|
-
|
|
714878
|
-
|
|
714879
|
-
-
|
|
714880
|
-
- auto: Use the default effort level for your model`);
|
|
714898
|
+
onDone(`Usage: /effort [low|medium|high|xhigh|max|ultracode|auto]
|
|
714899
|
+
` + `- low: Quick, straightforward implementation
|
|
714900
|
+
` + `- medium: Balanced approach with standard testing
|
|
714901
|
+
` + `- high: Comprehensive implementation with extensive testing
|
|
714902
|
+
` + `- xhigh: Extended reasoning with thorough analysis (Fable 5, Opus 4.7+, Sonnet 5)
|
|
714903
|
+
` + `- max: Maximum capability with deepest reasoning (Fable 5, Opus 4.6+, Sonnet 4.6+)
|
|
714904
|
+
` + `- ultracode: xhigh + dynamic workflow orchestration (this session only)
|
|
714905
|
+
` + "- auto: Use the default effort level for your model");
|
|
714881
714906
|
return;
|
|
714882
714907
|
}
|
|
714883
714908
|
if (!args || args === "current" || args === "status") {
|
|
@@ -714913,7 +714938,7 @@ var init_effort3 = __esm(() => {
|
|
|
714913
714938
|
type: "local-jsx",
|
|
714914
714939
|
name: "effort",
|
|
714915
714940
|
description: "Set effort level for model usage",
|
|
714916
|
-
argumentHint: "[low|medium|high|max|ultracode|auto]",
|
|
714941
|
+
argumentHint: "[low|medium|high|xhigh|max|ultracode|auto]",
|
|
714917
714942
|
get immediate() {
|
|
714918
714943
|
return shouldInferenceConfigCommandBeImmediate();
|
|
714919
714944
|
},
|
|
@@ -794716,7 +794741,7 @@ var init_controlSchemas = __esm(() => {
|
|
|
794716
794741
|
})).describe("Ordered low-to-high priority \u2014 later entries override earlier ones."),
|
|
794717
794742
|
applied: exports_external.object({
|
|
794718
794743
|
model: exports_external.string(),
|
|
794719
|
-
effort: exports_external.enum(["low", "medium", "high", "max"]).nullable()
|
|
794744
|
+
effort: exports_external.enum(["low", "medium", "high", "xhigh", "max"]).nullable()
|
|
794720
794745
|
}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")
|
|
794721
794746
|
}).describe("Effective merged settings plus raw per-source settings in merge order."));
|
|
794722
794747
|
SDKControlElicitationRequestSchema = lazySchema(() => exports_external.object({
|
|
@@ -827462,7 +827487,7 @@ Omit sessionId to discover and pick from available sessions.
|
|
|
827462
827487
|
process.exit(1);
|
|
827463
827488
|
});
|
|
827464
827489
|
}
|
|
827465
|
-
program3.command("doctor").description("Check the health of your Claude Code
|
|
827490
|
+
program3.command("doctor").description("Check the health of your Claude Code installation. Reads settings files in the current directory without a trust prompt. For a full checkup that can also fix issues, run /doctor in a session.").action(async () => {
|
|
827466
827491
|
const [{
|
|
827467
827492
|
doctorHandler: doctorHandler2
|
|
827468
827493
|
}, {
|