@wrongstack/cli 0.308.1 → 0.308.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/data/providers.json +3 -3
- package/dist/{cli-main-5JPPEJ6N.js → cli-main-WWZJF33V.js} +40 -5
- package/dist/context-limit.d.ts +7 -4
- package/dist/{execution-PHX3NFEK.js → execution-6HIKTAUB.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{webui-server-CKIKAM2P.js → webui-server-JXJ4CGIX.js} +11 -2
- package/package.json +25 -25
package/data/providers.json
CHANGED
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"output": ["text"]
|
|
112
112
|
},
|
|
113
113
|
"limit": {
|
|
114
|
-
"context":
|
|
114
|
+
"context": 1050000,
|
|
115
115
|
"output": 128000
|
|
116
116
|
}
|
|
117
117
|
},
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
"output": ["text"]
|
|
127
127
|
},
|
|
128
128
|
"limit": {
|
|
129
|
-
"context":
|
|
130
|
-
"output":
|
|
129
|
+
"context": 1050000,
|
|
130
|
+
"output": 128000
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -850,9 +850,21 @@ async function resolveRuntimeMaxContextDetailed(input) {
|
|
|
850
850
|
const providerConfig = input.runtimeProviderConfig ?? input.config.providers?.[input.providerId];
|
|
851
851
|
const providerOverride = positiveNumber(readConfiguredMaxContext(providerConfig));
|
|
852
852
|
if (providerOverride) return { maxContext: providerOverride, branch: "provider-override" };
|
|
853
|
+
const catalogId = providerConfig?.type && providerConfig.type !== input.providerId ? providerConfig.type : input.providerId;
|
|
853
854
|
const sibling = providerConfig?.family ? SIBLING_CATALOG[providerConfig.family] : void 0;
|
|
854
855
|
if (sibling && input.modelsRegistry) {
|
|
855
856
|
const mergedModels = mergeCustomModelDefs2(providerConfig?.customModels, input.config.models);
|
|
857
|
+
const ownModel = await input.modelsRegistry.getModel(catalogId, input.modelId).catch(() => void 0);
|
|
858
|
+
if (ownModel) {
|
|
859
|
+
const ownCaps = await capabilitiesFor2(
|
|
860
|
+
input.modelsRegistry,
|
|
861
|
+
catalogId,
|
|
862
|
+
input.modelId,
|
|
863
|
+
mergedModels
|
|
864
|
+
).catch(() => void 0);
|
|
865
|
+
const ownMax = positiveNumber(ownCaps?.maxContext) ?? positiveNumber(ownModel.capabilities.maxContext);
|
|
866
|
+
if (ownMax) return { maxContext: ownMax, branch: "catalog-capabilities" };
|
|
867
|
+
}
|
|
856
868
|
const caps = await capabilitiesFor2(
|
|
857
869
|
input.modelsRegistry,
|
|
858
870
|
sibling,
|
|
@@ -865,7 +877,6 @@ async function resolveRuntimeMaxContextDetailed(input) {
|
|
|
865
877
|
const directMax = positiveNumber(directModel?.capabilities.maxContext);
|
|
866
878
|
if (directMax) return { maxContext: directMax, branch: "sibling-direct-model" };
|
|
867
879
|
}
|
|
868
|
-
const catalogId = providerConfig?.type && providerConfig.type !== input.providerId ? providerConfig.type : input.providerId;
|
|
869
880
|
let divergedFromCatalog = false;
|
|
870
881
|
if (input.modelsRegistry) {
|
|
871
882
|
const topLevelBaseUrlApplies = input.providerId === input.config.provider;
|
|
@@ -5501,6 +5512,8 @@ async function runCliExecution(params) {
|
|
|
5501
5512
|
sessResult,
|
|
5502
5513
|
sessionStore,
|
|
5503
5514
|
memoryStore,
|
|
5515
|
+
vectorMemoryStore,
|
|
5516
|
+
vectorMemoryModelCacheDir,
|
|
5504
5517
|
modeStore,
|
|
5505
5518
|
needsSetup,
|
|
5506
5519
|
statusTracker,
|
|
@@ -5563,7 +5576,7 @@ async function runCliExecution(params) {
|
|
|
5563
5576
|
governanceHandle,
|
|
5564
5577
|
setConfig
|
|
5565
5578
|
} = params;
|
|
5566
|
-
const { execute } = await import("./execution-
|
|
5579
|
+
const { execute } = await import("./execution-6HIKTAUB.js");
|
|
5567
5580
|
return execute(
|
|
5568
5581
|
toExecuteDeps({
|
|
5569
5582
|
core: {
|
|
@@ -5593,6 +5606,8 @@ async function runCliExecution(params) {
|
|
|
5593
5606
|
rebindTodosCheckpoint: sessResult.rebindTodosCheckpoint,
|
|
5594
5607
|
sessionStore,
|
|
5595
5608
|
memoryStore,
|
|
5609
|
+
vectorMemoryStore,
|
|
5610
|
+
vectorMemoryModelCacheDir,
|
|
5596
5611
|
modeStore,
|
|
5597
5612
|
restoredMessages: sessResult.restoredMessages,
|
|
5598
5613
|
restoredToolCalls: sessResult.restoredToolCalls,
|
|
@@ -10274,6 +10289,7 @@ function buildCompactCommand(opts) {
|
|
|
10274
10289
|
// src/slash-commands/context.ts
|
|
10275
10290
|
import * as fs4 from "node:fs/promises";
|
|
10276
10291
|
import {
|
|
10292
|
+
CONTEXT_WINDOW_MODE_PINNED_META_KEY,
|
|
10277
10293
|
formatContextWindowModeList,
|
|
10278
10294
|
getContextWindowMode,
|
|
10279
10295
|
resolveContextWindowPolicy
|
|
@@ -10398,6 +10414,7 @@ ${formatContextWindowModeList(active2)}`;
|
|
|
10398
10414
|
const policy2 = { ...base, thresholds: { warn, soft, hard } };
|
|
10399
10415
|
ctx.meta["contextWindowMode"] = policy2.id;
|
|
10400
10416
|
ctx.meta["contextWindowPolicy"] = policy2;
|
|
10417
|
+
ctx.meta[CONTEXT_WINDOW_MODE_PINNED_META_KEY] = true;
|
|
10401
10418
|
if (persist) {
|
|
10402
10419
|
const error = await persistContextConfig(opts, {
|
|
10403
10420
|
warnThreshold: warn,
|
|
@@ -10424,9 +10441,10 @@ ${formatContextWindowModeList(active2)}`;
|
|
|
10424
10441
|
`);
|
|
10425
10442
|
return { message: msg3 };
|
|
10426
10443
|
}
|
|
10427
|
-
const policy2 = resolveContextWindowPolicy({}, mode.id);
|
|
10444
|
+
const policy2 = resolveContextWindowPolicy({}, mode.id, readEffectiveLimit(ctx, opts));
|
|
10428
10445
|
ctx.meta["contextWindowMode"] = policy2.id;
|
|
10429
10446
|
ctx.meta["contextWindowPolicy"] = policy2;
|
|
10447
|
+
ctx.meta[CONTEXT_WINDOW_MODE_PINNED_META_KEY] = true;
|
|
10430
10448
|
const msg2 = [
|
|
10431
10449
|
`${color20.green("Context mode set:")} ${policy2.id} (${policy2.name})`,
|
|
10432
10450
|
` thresholds: warn ${pct(policy2.thresholds.warn)}, soft ${pct(policy2.thresholds.soft)}, hard ${pct(policy2.thresholds.hard)}`,
|
|
@@ -30699,6 +30717,10 @@ import {
|
|
|
30699
30717
|
SlashCommandRegistry
|
|
30700
30718
|
} from "@wrongstack/core/registry";
|
|
30701
30719
|
import { normalizeTokenSavingTier as normalizeTokenSavingTier3 } from "@wrongstack/core/types";
|
|
30720
|
+
import {
|
|
30721
|
+
CONTEXT_WINDOW_MODE_PINNED_META_KEY as CONTEXT_WINDOW_MODE_PINNED_META_KEY2,
|
|
30722
|
+
resolveContextWindowPolicy as resolveContextWindowPolicy3
|
|
30723
|
+
} from "@wrongstack/core/types";
|
|
30702
30724
|
import {
|
|
30703
30725
|
createVaultBackedMcpAuthorizationProviderFactory,
|
|
30704
30726
|
MCPAuthorizationManager,
|
|
@@ -31209,7 +31231,11 @@ async function setupCompaction(params) {
|
|
|
31209
31231
|
providerId: config.provider ?? provider.id,
|
|
31210
31232
|
modelId: config.model ?? context.model
|
|
31211
31233
|
});
|
|
31212
|
-
const initialPolicy = resolveContextWindowPolicy2(
|
|
31234
|
+
const initialPolicy = resolveContextWindowPolicy2(
|
|
31235
|
+
config.context,
|
|
31236
|
+
void 0,
|
|
31237
|
+
effectiveMaxContext
|
|
31238
|
+
);
|
|
31213
31239
|
context.meta ??= {};
|
|
31214
31240
|
context.meta["contextWindowMode"] = initialPolicy.id;
|
|
31215
31241
|
context.meta["contextWindowPolicy"] = initialPolicy;
|
|
@@ -31646,6 +31672,15 @@ async function setupLifecycleAndPlugins(deps) {
|
|
|
31646
31672
|
context.meta["effectiveMaxContext"] = effectiveMaxContextRef.current;
|
|
31647
31673
|
autoCompactor?.setMaxContext(effectiveMaxContextRef.current);
|
|
31648
31674
|
autoCompactor?.setEnabled(config.context.autoCompact !== false);
|
|
31675
|
+
if (context.meta[CONTEXT_WINDOW_MODE_PINNED_META_KEY2] !== true) {
|
|
31676
|
+
const policy = resolveContextWindowPolicy3(
|
|
31677
|
+
config.context,
|
|
31678
|
+
void 0,
|
|
31679
|
+
effectiveMaxContextRef.current
|
|
31680
|
+
);
|
|
31681
|
+
context.meta["contextWindowMode"] = policy.id;
|
|
31682
|
+
context.meta["contextWindowPolicy"] = policy;
|
|
31683
|
+
}
|
|
31649
31684
|
} else {
|
|
31650
31685
|
delete context.meta["effectiveMaxContext"];
|
|
31651
31686
|
autoCompactor?.setEnabled(false);
|
|
@@ -33716,4 +33751,4 @@ export {
|
|
|
33716
33751
|
CLI_VERSION,
|
|
33717
33752
|
runInteractive
|
|
33718
33753
|
};
|
|
33719
|
-
//# sourceMappingURL=cli-main-
|
|
33754
|
+
//# sourceMappingURL=cli-main-WWZJF33V.js.map
|
package/dist/context-limit.d.ts
CHANGED
|
@@ -23,10 +23,13 @@ export interface ResolveMaxContextInput {
|
|
|
23
23
|
* Priority chain (first hit wins):
|
|
24
24
|
* 1. providers.<id>.capabilities.maxContext — explicit per-provider override.
|
|
25
25
|
* Provider-SCOPED, so it can't silently pin unrelated providers.
|
|
26
|
-
* 2.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* 2. own catalog entry, else sibling, for OAuth families — when the family is
|
|
27
|
+
* itself published under its own id (openai-codex ships via the curated
|
|
28
|
+
* overlay), that entry is authoritative. Otherwise
|
|
29
|
+
* anthropic-oauth/openai-codex/github-copilot share their models with a
|
|
30
|
+
* canonical models.dev provider (anthropic/openai) but aren't themselves
|
|
31
|
+
* listed, so resolve the real per-model window there
|
|
32
|
+
* (e.g. Opus 4.8 → 1M, gpt-5.5 → 1.05M)
|
|
30
33
|
* 3. models.dev catalog (capabilitiesFor → getModel) — the published per-model
|
|
31
34
|
* window, keyed by provider (e.g. 1M for an OpenRouter model)
|
|
32
35
|
* 4. config.context.effectiveMaxContext — global FALLBACK for models whose
|
|
@@ -207,7 +207,7 @@ async function runWebUIDispatch(ctx) {
|
|
|
207
207
|
const isSimpleUi = !isSessionChild && flags["simpleui"] === true;
|
|
208
208
|
agent.disableInteractiveConfirmation();
|
|
209
209
|
renderer.setSilent(true);
|
|
210
|
-
const { runWebUI } = await import("./webui-server-
|
|
210
|
+
const { runWebUI } = await import("./webui-server-JXJ4CGIX.js");
|
|
211
211
|
const flagValue = (names) => {
|
|
212
212
|
for (const name of names) {
|
|
213
213
|
if (!Object.hasOwn(flags, name)) continue;
|
|
@@ -6045,4 +6045,4 @@ export {
|
|
|
6045
6045
|
execute,
|
|
6046
6046
|
resolveReviewerFallbackModels
|
|
6047
6047
|
};
|
|
6048
|
-
//# sourceMappingURL=execution-
|
|
6048
|
+
//# sourceMappingURL=execution-6HIKTAUB.js.map
|
package/dist/index.js
CHANGED
|
@@ -4447,7 +4447,7 @@ async function initializeCli(argv) {
|
|
|
4447
4447
|
async function main(argv) {
|
|
4448
4448
|
const cliCtx = await initializeCli(argv);
|
|
4449
4449
|
if (typeof cliCtx === "number") return cliCtx;
|
|
4450
|
-
const { runInteractive } = await import("./cli-main-
|
|
4450
|
+
const { runInteractive } = await import("./cli-main-WWZJF33V.js");
|
|
4451
4451
|
return runInteractive(cliCtx);
|
|
4452
4452
|
}
|
|
4453
4453
|
|
|
@@ -1497,6 +1497,7 @@ async function runWebUI(opts) {
|
|
|
1497
1497
|
});
|
|
1498
1498
|
let signalShutdown;
|
|
1499
1499
|
const shutdown = () => signalShutdown?.();
|
|
1500
|
+
let embeddedAutoHealDispose = null;
|
|
1500
1501
|
const handleMessage = createEmbeddedMessageRouter({
|
|
1501
1502
|
trustBoundary,
|
|
1502
1503
|
opts,
|
|
@@ -1506,6 +1507,11 @@ async function runWebUI(opts) {
|
|
|
1506
1507
|
sessionPayload,
|
|
1507
1508
|
currentSessionId,
|
|
1508
1509
|
shutdown,
|
|
1510
|
+
// Auto-heal watchdog disposer — `disposeResources` awaits it (bounded) so
|
|
1511
|
+
// an in-flight daemon restart drains before the host exits.
|
|
1512
|
+
onDispose: (dispose) => {
|
|
1513
|
+
embeddedAutoHealDispose = dispose;
|
|
1514
|
+
},
|
|
1509
1515
|
providerCtx: wsHandlerCtx,
|
|
1510
1516
|
brainCtx: routeContexts.brainCtx,
|
|
1511
1517
|
introspectionCtx: routeContexts.introspectionCtx,
|
|
@@ -1598,6 +1604,7 @@ async function runWebUI(opts) {
|
|
|
1598
1604
|
});
|
|
1599
1605
|
signalShutdown = createWebuiShutdown({
|
|
1600
1606
|
abortInFlight: () => {
|
|
1607
|
+
void embeddedAutoHealDispose?.();
|
|
1601
1608
|
if (abortController) {
|
|
1602
1609
|
abortController.abort();
|
|
1603
1610
|
abortController = null;
|
|
@@ -1628,7 +1635,7 @@ async function runWebUI(opts) {
|
|
|
1628
1635
|
}
|
|
1629
1636
|
}
|
|
1630
1637
|
},
|
|
1631
|
-
disposeResources: () => {
|
|
1638
|
+
disposeResources: async () => {
|
|
1632
1639
|
credentialWatcherClose?.();
|
|
1633
1640
|
credentialWatcherClose = void 0;
|
|
1634
1641
|
goalHandler.dispose();
|
|
@@ -1638,6 +1645,8 @@ async function runWebUI(opts) {
|
|
|
1638
1645
|
kanbanRunMirror?.dispose();
|
|
1639
1646
|
kanbanSupervisor?.dispose();
|
|
1640
1647
|
void stopKanbanSupervisorMemoryStats?.();
|
|
1648
|
+
await embeddedAutoHealDispose?.();
|
|
1649
|
+
embeddedAutoHealDispose = null;
|
|
1641
1650
|
unregisterWebuiClient();
|
|
1642
1651
|
},
|
|
1643
1652
|
closeClients: () => {
|
|
@@ -1680,4 +1689,4 @@ async function runWebUI(opts) {
|
|
|
1680
1689
|
export {
|
|
1681
1690
|
runWebUI
|
|
1682
1691
|
};
|
|
1683
|
-
//# sourceMappingURL=webui-server-
|
|
1692
|
+
//# sourceMappingURL=webui-server-JXJ4CGIX.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/cli",
|
|
3
|
-
"version": "0.308.
|
|
3
|
+
"version": "0.308.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -42,32 +42,32 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ws": "^8.21.3",
|
|
45
|
-
"@wrongstack/bench": "0.308.
|
|
46
|
-
"@wrongstack/core": "0.308.
|
|
47
|
-
"@wrongstack/
|
|
48
|
-
"@wrongstack/
|
|
49
|
-
"@wrongstack/
|
|
50
|
-
"@wrongstack/
|
|
51
|
-
"@wrongstack/
|
|
52
|
-
"@wrongstack/
|
|
53
|
-
"@wrongstack/
|
|
54
|
-
"@wrongstack/
|
|
55
|
-
"@wrongstack/runtime": "0.308.
|
|
56
|
-
"@wrongstack/
|
|
57
|
-
"@wrongstack/
|
|
58
|
-
"@wrongstack/
|
|
59
|
-
"@wrongstack/
|
|
60
|
-
"@wrongstack/tools": "0.308.
|
|
61
|
-
"@wrongstack/
|
|
62
|
-
"@wrongstack/
|
|
63
|
-
"@wrongstack/
|
|
64
|
-
"@wrongstack/
|
|
65
|
-
"@wrongstack/webui": "0.308.
|
|
66
|
-
"@wrongstack/
|
|
67
|
-
"@wrongstack/webui-server": "0.308.
|
|
45
|
+
"@wrongstack/bench": "0.308.2",
|
|
46
|
+
"@wrongstack/core": "0.308.2",
|
|
47
|
+
"@wrongstack/kanban": "0.308.2",
|
|
48
|
+
"@wrongstack/mcp": "0.308.2",
|
|
49
|
+
"@wrongstack/providers": "0.308.2",
|
|
50
|
+
"@wrongstack/persistence": "0.308.2",
|
|
51
|
+
"@wrongstack/requirement-intake": "0.308.2",
|
|
52
|
+
"@wrongstack/plug-lsp": "0.308.2",
|
|
53
|
+
"@wrongstack/plugins": "0.308.2",
|
|
54
|
+
"@wrongstack/acp": "0.308.2",
|
|
55
|
+
"@wrongstack/runtime": "0.308.2",
|
|
56
|
+
"@wrongstack/sage": "0.308.2",
|
|
57
|
+
"@wrongstack/simpleui": "0.308.2",
|
|
58
|
+
"@wrongstack/techstack": "0.308.2",
|
|
59
|
+
"@wrongstack/sdd": "0.308.2",
|
|
60
|
+
"@wrongstack/tools": "0.308.2",
|
|
61
|
+
"@wrongstack/security-scanner": "0.308.2",
|
|
62
|
+
"@wrongstack/tui": "0.308.2",
|
|
63
|
+
"@wrongstack/telegram": "0.308.2",
|
|
64
|
+
"@wrongstack/vector-memory": "0.308.2",
|
|
65
|
+
"@wrongstack/webui": "0.308.2",
|
|
66
|
+
"@wrongstack/webui-hq": "0.308.2",
|
|
67
|
+
"@wrongstack/webui-server": "0.308.2"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
|
-
"@wrongstack/desktop": "0.308.
|
|
70
|
+
"@wrongstack/desktop": "0.308.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/node": "^26.2.0",
|