@mars-sea/dsh-commandcode-provider 0.14.0 → 0.14.2
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/CHANGELOG.md +39 -0
- package/README.md +19 -17
- package/README.zh-CN.md +7 -7
- package/lib/client.js +187 -111
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +21 -5
- package/lib/index.js +103 -27
- package/lib/index.js.map +1 -1
- package/package.json +42 -41
package/lib/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ type CommandCodeProtocol = 'cli' | 'openai' | 'messages';
|
|
|
61
61
|
declare const DEFAULT_MAX_OUTPUT_TOKENS = 131072;
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/adapter.d.ts
|
|
64
|
-
declare const COMMAND_CODE_CLI_VERSION = "1.
|
|
64
|
+
declare const COMMAND_CODE_CLI_VERSION = "1.84.0";
|
|
65
65
|
declare const DEFAULT_API_BASE = "https://api.commandcode.ai";
|
|
66
66
|
/**
|
|
67
67
|
* The output budget this bundle asks for, and the ceiling it will never exceed.
|
|
@@ -1073,9 +1073,13 @@ declare const KNOWN_IMAGE_MODELS: ReadonlySet<string>;
|
|
|
1073
1073
|
* what the current CLI says.
|
|
1074
1074
|
*
|
|
1075
1075
|
* 1.82.4 then reversed 1.74.1's removal of `meituan/LongCat-2.0:free` and added
|
|
1076
|
-
* the `stealth/cat-jam:free` preview, taking this set to 24 members
|
|
1077
|
-
*
|
|
1078
|
-
*
|
|
1076
|
+
* the `stealth/cat-jam:free` preview, taking this set to 24 members. The 1.84.0
|
|
1077
|
+
* sync (2026-10-16) moves it to 25 with no verdict flip: LongCat's exclusion
|
|
1078
|
+
* followed its rename to the paid id, and the free `reflection/beam:free`
|
|
1079
|
+
* preview joined on catalog evidence alone. The authoritative membership is the
|
|
1080
|
+
* UNION of the artifact's exclusion set and the catalog's `zdr:false` list —
|
|
1081
|
+
* neither source alone is complete, which is why this set is not simply "what
|
|
1082
|
+
* the CLI says".
|
|
1079
1083
|
*/
|
|
1080
1084
|
declare const KNOWN_NON_ZDR_MODELS: ReadonlySet<string>;
|
|
1081
1085
|
/**
|
|
@@ -2003,7 +2007,7 @@ interface CommandCodeSearchSelection {
|
|
|
2003
2007
|
declare function commandCodeSearchSelection(): CommandCodeSearchSelection;
|
|
2004
2008
|
/** Dependencies {@link createCommandCodeSearchSelection} resolves per call. */
|
|
2005
2009
|
interface WebSearchSelectionDeps {
|
|
2006
|
-
/** The running `web` service whose
|
|
2010
|
+
/** The running `web` service whose selection field backs the degraded write. */
|
|
2007
2011
|
web: WebRuntime;
|
|
2008
2012
|
/** Host settings service, resolved per use because it may activate after `web`. */
|
|
2009
2013
|
settings: () => WebSelectionSettings | undefined;
|
|
@@ -2037,6 +2041,18 @@ interface WebSearchSelectionHandle {
|
|
|
2037
2041
|
* it first and falls back to the reference only when settings is unavailable or
|
|
2038
2042
|
* refuses (see `volatileWrite`).
|
|
2039
2043
|
*
|
|
2044
|
+
* ## Two engine shapes
|
|
2045
|
+
*
|
|
2046
|
+
* Everything above describes an rc.2+ runtime, where the selection is a
|
|
2047
|
+
* reference. PRE-rc.2 engines (0.2.0-rc.2 and the 0.2.1 alphas) have neither
|
|
2048
|
+
* that reference nor a settings row for `web`: there the selection is the
|
|
2049
|
+
* private instance field `searchProviderId`, memory-only by nature. Those
|
|
2050
|
+
* engines therefore run the degraded path BY CONSTRUCTION — no profile write
|
|
2051
|
+
* exists for it and the user layer is unreadable, so a foreign pin cannot be
|
|
2052
|
+
* seen and the takeover/restore semantics are the ones this plugin shipped
|
|
2053
|
+
* before rc.2: remember the displaced backend, hand back only what we took. The
|
|
2054
|
+
* shape is resolved per observation, so one build serves both.
|
|
2055
|
+
*
|
|
2040
2056
|
* ## Two writers, one field
|
|
2041
2057
|
*
|
|
2042
2058
|
* The shipped web-search settings page writes `web.searchProvider` too
|
package/lib/index.js
CHANGED
|
@@ -103,7 +103,7 @@ const PLAN_ORDER = Object.fromEntries(PLAN_TIER_ORDER.map((tier, index) => [tier
|
|
|
103
103
|
* subscription-plan labels, deals, and hourly (peak/off-peak) pricing.
|
|
104
104
|
*
|
|
105
105
|
* Everything here is synced from official sources — the command-code CLI
|
|
106
|
-
* bundle's model table (`dist/cli.mjs`, re-verified at command-code@1.
|
|
106
|
+
* bundle's model table (`dist/cli.mjs`, re-verified at command-code@1.84.0) and
|
|
107
107
|
* the official plan/pricing/model docs; see the dsh-commandcode-upstream skill
|
|
108
108
|
* for the extraction procedures. Keeping the snapshot in its own module
|
|
109
109
|
* confines those frequent sync diffs here: src/adapter.ts holds only the stable
|
|
@@ -315,6 +315,13 @@ const KNOWN_EFFORTS = {
|
|
|
315
315
|
"medium",
|
|
316
316
|
"high"
|
|
317
317
|
],
|
|
318
|
+
"reflection/beam:free": [
|
|
319
|
+
"low",
|
|
320
|
+
"medium",
|
|
321
|
+
"high",
|
|
322
|
+
"xhigh",
|
|
323
|
+
"max"
|
|
324
|
+
],
|
|
318
325
|
"sakana/fugu-ultra": ["high", "xhigh"],
|
|
319
326
|
"stepfun/Step-5-Preview": [
|
|
320
327
|
"low",
|
|
@@ -622,9 +629,13 @@ const KNOWN_IMAGE_MODELS = /* @__PURE__ */ new Set([
|
|
|
622
629
|
* what the current CLI says.
|
|
623
630
|
*
|
|
624
631
|
* 1.82.4 then reversed 1.74.1's removal of `meituan/LongCat-2.0:free` and added
|
|
625
|
-
* the `stealth/cat-jam:free` preview, taking this set to 24 members
|
|
626
|
-
*
|
|
627
|
-
*
|
|
632
|
+
* the `stealth/cat-jam:free` preview, taking this set to 24 members. The 1.84.0
|
|
633
|
+
* sync (2026-10-16) moves it to 25 with no verdict flip: LongCat's exclusion
|
|
634
|
+
* followed its rename to the paid id, and the free `reflection/beam:free`
|
|
635
|
+
* preview joined on catalog evidence alone. The authoritative membership is the
|
|
636
|
+
* UNION of the artifact's exclusion set and the catalog's `zdr:false` list —
|
|
637
|
+
* neither source alone is complete, which is why this set is not simply "what
|
|
638
|
+
* the CLI says".
|
|
628
639
|
*/
|
|
629
640
|
const KNOWN_NON_ZDR_MODELS = /* @__PURE__ */ new Set([
|
|
630
641
|
"MiniMaxAI/MiniMax-M3",
|
|
@@ -636,9 +647,10 @@ const KNOWN_NON_ZDR_MODELS = /* @__PURE__ */ new Set([
|
|
|
636
647
|
"meta/muse-spark-1.3",
|
|
637
648
|
"meta/muse-spark-1.3-contributor",
|
|
638
649
|
"meta/muse-wonder-1.0",
|
|
639
|
-
"meituan/LongCat-2.0
|
|
650
|
+
"meituan/LongCat-2.0",
|
|
640
651
|
"minimax/minimax-m3-free",
|
|
641
652
|
"poolside/laguna-s-2.1-free",
|
|
653
|
+
"reflection/beam:free",
|
|
642
654
|
"sakana/fugu-ultra",
|
|
643
655
|
"stealth/glyph-cluster:free",
|
|
644
656
|
"stealth/cat-jam:free",
|
|
@@ -792,6 +804,7 @@ const MODEL_OUTPUT_TOKEN_LIMITS = /* @__PURE__ */ new Map([
|
|
|
792
804
|
["claude-sonnet-5", 128e3],
|
|
793
805
|
["claude-sonnet-5-5", 128e3],
|
|
794
806
|
["deepseek/deepseek-v4-flash", 393216],
|
|
807
|
+
["deepseek/deepseek-v4-flash-fast", 384e3],
|
|
795
808
|
["deepseek/deepseek-v4-flash-vision-exp", 393216],
|
|
796
809
|
["deepseek/deepseek-v4-pro", 393216],
|
|
797
810
|
["google/gemini-3.1-flash-lite", 65536],
|
|
@@ -835,11 +848,13 @@ const MODEL_OUTPUT_TOKEN_LIMITS = /* @__PURE__ */ new Map([
|
|
|
835
848
|
["Qwen/Qwen3.7-Plus", 131072],
|
|
836
849
|
["Qwen/Qwen3.8-Flash", 131072],
|
|
837
850
|
["Qwen/Qwen3.8-Max", 131072],
|
|
851
|
+
["Qwen/Qwen3.8-Max-0902", 131072],
|
|
838
852
|
["Qwen/Qwen3.8-Omni-Flash", 131072],
|
|
839
853
|
["sakana/fugu-ultra", 1e6],
|
|
840
854
|
["stepfun/Step-3.5-Flash", 256e3],
|
|
841
855
|
["stepfun/Step-3.7-Flash", 256e3],
|
|
842
856
|
["stepfun/Step-5-Preview", 65536],
|
|
857
|
+
["tencent/hy3-paid", 128e3],
|
|
843
858
|
["thinkingmachines/inkling", 65536],
|
|
844
859
|
["xai/grok-4.5", 5e5],
|
|
845
860
|
["xai/grok-4.6", 5e5],
|
|
@@ -923,6 +938,7 @@ const KNOWN_PLANS = {
|
|
|
923
938
|
"nvidia/nemotron-3-ultra-550b-a55b": "go",
|
|
924
939
|
"nvidia/nemotron-3.5-super-vl": "go",
|
|
925
940
|
"poolside/laguna-s-2.1-free": "go",
|
|
941
|
+
"reflection/beam:free": "go",
|
|
926
942
|
"stepfun/Step-3.5-Flash": "go",
|
|
927
943
|
"stepfun/Step-3.7-Flash": "go",
|
|
928
944
|
"stepfun/Step-5-Preview": "go",
|
|
@@ -1119,6 +1135,10 @@ const KNOWN_DEALS = {
|
|
|
1119
1135
|
label: "FREE",
|
|
1120
1136
|
free: true
|
|
1121
1137
|
},
|
|
1138
|
+
"reflection/beam:free": {
|
|
1139
|
+
label: "FREE",
|
|
1140
|
+
free: true
|
|
1141
|
+
},
|
|
1122
1142
|
"stealth/cat-jam:free": {
|
|
1123
1143
|
label: "FREE",
|
|
1124
1144
|
free: true
|
|
@@ -1563,8 +1583,8 @@ const MODEL_PRICE_ROWS = [
|
|
|
1563
1583
|
],
|
|
1564
1584
|
allowance: {
|
|
1565
1585
|
go: 10,
|
|
1566
|
-
goat:
|
|
1567
|
-
pro:
|
|
1586
|
+
goat: 80,
|
|
1587
|
+
pro: 90
|
|
1568
1588
|
}
|
|
1569
1589
|
},
|
|
1570
1590
|
{
|
|
@@ -1764,8 +1784,8 @@ const MODEL_PRICE_ROWS = [
|
|
|
1764
1784
|
],
|
|
1765
1785
|
allowance: {
|
|
1766
1786
|
go: 10,
|
|
1767
|
-
goat:
|
|
1768
|
-
pro:
|
|
1787
|
+
goat: 80,
|
|
1788
|
+
pro: 90
|
|
1769
1789
|
}
|
|
1770
1790
|
},
|
|
1771
1791
|
{
|
|
@@ -6278,7 +6298,7 @@ var GatewayFacts = class {
|
|
|
6278
6298
|
* per-request options thunk and an API-key resolver from the plugin entry
|
|
6279
6299
|
* (src/index.ts), so a settings change reaches the very next request.
|
|
6280
6300
|
*/
|
|
6281
|
-
const COMMAND_CODE_CLI_VERSION = "1.
|
|
6301
|
+
const COMMAND_CODE_CLI_VERSION = "1.84.0";
|
|
6282
6302
|
const DEFAULT_API_BASE = "https://api.commandcode.ai";
|
|
6283
6303
|
/**
|
|
6284
6304
|
* The output budget this bundle asks for, and the ceiling it will never exceed.
|
|
@@ -10464,10 +10484,13 @@ function unwrapVolatileConfig(config) {
|
|
|
10464
10484
|
* the model-facing `web_search` tool needs no separate configuration.
|
|
10465
10485
|
*
|
|
10466
10486
|
* The second half of this module is the SELECTION seam: which registered search
|
|
10467
|
-
* backend `ctx.web` actually runs.
|
|
10468
|
-
*
|
|
10469
|
-
*
|
|
10470
|
-
*
|
|
10487
|
+
* backend `ctx.web` actually runs. That seam has TWO engine shapes, and both are
|
|
10488
|
+
* supported. dsh 0.2.1-rc.2 turned the choice into a per-call `Volatile` field of
|
|
10489
|
+
* the `web` profile entry, so it is changed through the host settings service
|
|
10490
|
+
* rather than by assigning a runtime field. Engines up to and including
|
|
10491
|
+
* 0.2.1-alpha.4 kept it in the private instance field `searchProviderId`, which
|
|
10492
|
+
* has no settings surface and can only be assigned in memory — see
|
|
10493
|
+
* {@link createCommandCodeSearchSelection}.
|
|
10471
10494
|
*
|
|
10472
10495
|
* @module dsh-commandcode-provider/web-search
|
|
10473
10496
|
*/
|
|
@@ -10530,6 +10553,29 @@ function selectionRow(settings) {
|
|
|
10530
10553
|
function searchProviderRef(web) {
|
|
10531
10554
|
return member(member(web, "config"), "searchProvider");
|
|
10532
10555
|
}
|
|
10556
|
+
/**
|
|
10557
|
+
* The pre-rc.2 instance field, or `undefined` when this runtime does not carry
|
|
10558
|
+
* it.
|
|
10559
|
+
*
|
|
10560
|
+
* An OWN property is the discriminator, not a value test: a runtime of the
|
|
10561
|
+
* reference shape never has `searchProviderId` at all, so the two shapes cannot
|
|
10562
|
+
* both answer and neither needs to be preferred over the other.
|
|
10563
|
+
*/
|
|
10564
|
+
function legacySearchField(web) {
|
|
10565
|
+
if (!Object.prototype.hasOwnProperty.call(web, "searchProviderId")) return void 0;
|
|
10566
|
+
const shaped = web;
|
|
10567
|
+
return {
|
|
10568
|
+
read: () => text(shaped.searchProviderId),
|
|
10569
|
+
write: (value) => {
|
|
10570
|
+
try {
|
|
10571
|
+
shaped.searchProviderId = value;
|
|
10572
|
+
return true;
|
|
10573
|
+
} catch {
|
|
10574
|
+
return false;
|
|
10575
|
+
}
|
|
10576
|
+
}
|
|
10577
|
+
};
|
|
10578
|
+
}
|
|
10533
10579
|
/** Observe the live selection; `undefined` when nothing can be observed. */
|
|
10534
10580
|
function readView(deps) {
|
|
10535
10581
|
const settings = deps.settings();
|
|
@@ -10547,16 +10593,26 @@ function readView(deps) {
|
|
|
10547
10593
|
}
|
|
10548
10594
|
}
|
|
10549
10595
|
const ref = searchProviderRef(deps.web);
|
|
10550
|
-
if (
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10596
|
+
if (isVolatileRef(ref)) {
|
|
10597
|
+
let current;
|
|
10598
|
+
try {
|
|
10599
|
+
current = ref.get();
|
|
10600
|
+
} catch {
|
|
10601
|
+
return;
|
|
10602
|
+
}
|
|
10603
|
+
if (current !== void 0 && typeof current !== "string") return void 0;
|
|
10604
|
+
return {
|
|
10605
|
+
configured: current,
|
|
10606
|
+
pinned: void 0,
|
|
10607
|
+
base: void 0,
|
|
10608
|
+
user: {},
|
|
10609
|
+
persistent: false
|
|
10610
|
+
};
|
|
10556
10611
|
}
|
|
10557
|
-
|
|
10612
|
+
const legacy = legacySearchField(deps.web);
|
|
10613
|
+
if (legacy === void 0) return void 0;
|
|
10558
10614
|
return {
|
|
10559
|
-
configured:
|
|
10615
|
+
configured: legacy.read(),
|
|
10560
10616
|
pinned: void 0,
|
|
10561
10617
|
base: void 0,
|
|
10562
10618
|
user: {},
|
|
@@ -10579,6 +10635,18 @@ function readView(deps) {
|
|
|
10579
10635
|
* it first and falls back to the reference only when settings is unavailable or
|
|
10580
10636
|
* refuses (see `volatileWrite`).
|
|
10581
10637
|
*
|
|
10638
|
+
* ## Two engine shapes
|
|
10639
|
+
*
|
|
10640
|
+
* Everything above describes an rc.2+ runtime, where the selection is a
|
|
10641
|
+
* reference. PRE-rc.2 engines (0.2.0-rc.2 and the 0.2.1 alphas) have neither
|
|
10642
|
+
* that reference nor a settings row for `web`: there the selection is the
|
|
10643
|
+
* private instance field `searchProviderId`, memory-only by nature. Those
|
|
10644
|
+
* engines therefore run the degraded path BY CONSTRUCTION — no profile write
|
|
10645
|
+
* exists for it and the user layer is unreadable, so a foreign pin cannot be
|
|
10646
|
+
* seen and the takeover/restore semantics are the ones this plugin shipped
|
|
10647
|
+
* before rc.2: remember the displaced backend, hand back only what we took. The
|
|
10648
|
+
* shape is resolved per observation, so one build serves both.
|
|
10649
|
+
*
|
|
10582
10650
|
* ## Two writers, one field
|
|
10583
10651
|
*
|
|
10584
10652
|
* The shipped web-search settings page writes `web.searchProvider` too
|
|
@@ -10612,11 +10680,19 @@ function createCommandCodeSearchSelection(deps) {
|
|
|
10612
10680
|
deps.logger.info(message);
|
|
10613
10681
|
} catch {}
|
|
10614
10682
|
};
|
|
10615
|
-
/**
|
|
10683
|
+
/**
|
|
10684
|
+
* Commit the selection in memory; the last resort before giving up.
|
|
10685
|
+
*
|
|
10686
|
+
* The volatile reference is tried first because on an rc.2+ runtime that is
|
|
10687
|
+
* what `search()` reads. A PRE-rc.2 runtime carries no reference at all, and
|
|
10688
|
+
* there the private instance field IS the seam — the fallback is a different
|
|
10689
|
+
* engine shape, not a second-best copy of the same write.
|
|
10690
|
+
*/
|
|
10616
10691
|
const memoryWrite = (value) => {
|
|
10617
|
-
|
|
10618
|
-
if (
|
|
10619
|
-
|
|
10692
|
+
if (volatileWrite(searchProviderRef(deps.web), value)) return true;
|
|
10693
|
+
if (legacySearchField(deps.web)?.write(value) === true) return true;
|
|
10694
|
+
warn("llm-commandcode: web search selection could not be applied (settings refused the write and the running web runtime is not writable); the provider stays registered but unselected");
|
|
10695
|
+
return false;
|
|
10620
10696
|
};
|
|
10621
10697
|
/** Run one intent against a FRESH observation; never throws. */
|
|
10622
10698
|
const perform = async (intent) => {
|
|
@@ -10716,7 +10792,7 @@ function createCommandCodeSearchSelection(deps) {
|
|
|
10716
10792
|
}
|
|
10717
10793
|
state.foreign = void 0;
|
|
10718
10794
|
if (view.configured === "commandcode") {
|
|
10719
|
-
state.owner = view.pinned ===
|
|
10795
|
+
state.owner = view.pinned === "commandcode" || !view.persistent && state.owner;
|
|
10720
10796
|
state.preexisting = !state.owner;
|
|
10721
10797
|
if (state.owner && state.displaced === void 0) state.displaced = view.base;
|
|
10722
10798
|
return;
|