@wrongstack/cli 0.308.7 → 0.309.0

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.
@@ -2203,7 +2203,15 @@ function applyChimeraReviewerReadOnlyPolicy(config) {
2203
2203
  // mutation tools/capabilities so Chimera reviewers cannot repair files.
2204
2204
  tools: [...CHIMERA_REVIEW_READ_ONLY_TOOLS],
2205
2205
  allowedCapabilities: ["fs.read"],
2206
- worktree: "off"
2206
+ worktree: "off",
2207
+ // Mandatory model-driven completion: a reviewer must never be killed by
2208
+ // the wall-clock watchdog. At its deadline (or when the leader's session
2209
+ // ends and `Director.requestFinish()` fires) it receives an in-band
2210
+ // `subagent.finish_requested` notification between tool batches and
2211
+ // finishes its report in its own turn within the granted grace window.
2212
+ // Only if that window also elapses does the terminal stop apply — the
2213
+ // reviewer's bounded maximum lifetime.
2214
+ gracefulFinish: true
2207
2215
  };
2208
2216
  }
2209
2217
 
@@ -2284,10 +2292,30 @@ async function finalizeExecutionCleanup(input) {
2284
2292
  sessionEndProducers.add(tracked);
2285
2293
  }
2286
2294
  });
2295
+ if (director) {
2296
+ try {
2297
+ director.requestFinish("leader session ended \u2014 finish your review now");
2298
+ } catch (finishErr) {
2299
+ console.warn(
2300
+ JSON.stringify({
2301
+ level: "warn",
2302
+ event: "shutdown.subagent_finish_notify_failed",
2303
+ message: finishErr instanceof Error ? finishErr.message : String(finishErr),
2304
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
2305
+ })
2306
+ );
2307
+ }
2308
+ }
2287
2309
  try {
2288
2310
  while (sessionEndProducers.size > 0) {
2289
2311
  await Promise.allSettled([...sessionEndProducers]);
2290
2312
  }
2313
+ if (director) {
2314
+ try {
2315
+ director.requestFinish("leader session ended \u2014 finish your review now");
2316
+ } catch {
2317
+ }
2318
+ }
2291
2319
  await chimeraWork?.drainAndClose();
2292
2320
  } catch (err) {
2293
2321
  console.warn(
@@ -2300,6 +2328,18 @@ async function finalizeExecutionCleanup(input) {
2300
2328
  );
2301
2329
  }
2302
2330
  if (director) {
2331
+ try {
2332
+ director.requestFinish("leader session ended \u2014 finish your review now");
2333
+ } catch (finishErr) {
2334
+ console.warn(
2335
+ JSON.stringify({
2336
+ level: "warn",
2337
+ event: "shutdown.subagent_finish_notify_failed",
2338
+ message: finishErr instanceof Error ? finishErr.message : String(finishErr),
2339
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
2340
+ })
2341
+ );
2342
+ }
2303
2343
  try {
2304
2344
  await director.terminateAll();
2305
2345
  } catch (termErr) {
@@ -3212,6 +3252,15 @@ function installChimeraCascadeHandler({
3212
3252
  // Cascade agents are ephemeral infrastructure: like reviewers,
3213
3253
  // they must not consume the leader's lifetime maxSpawns budget.
3214
3254
  spawnBudgetExempt: true,
3255
+ // Model-driven completion (see core coordination/subagent-finish.ts):
3256
+ // a rung crossing its wall-clock budget is notified in-band
3257
+ // between tool batches and finishes its own turn within the
3258
+ // grace window instead of being killed. Ladder-retry semantics
3259
+ // are intact: a rung that still exhausts the grace window lands
3260
+ // as a `timeout` task result, which advances the ladder, and
3261
+ // `buildRetryPreamble` below already warns the successor that
3262
+ // the tree may hold the dead rung's partial edits.
3263
+ gracefulFinish: true,
3215
3264
  // Rung 0 stays unpinned so the role model matrix still decides;
3216
3265
  // later rungs pin a model precisely because it just failed.
3217
3266
  ...attempt.tier === "inherit" ? {} : {
@@ -6045,4 +6094,4 @@ export {
6045
6094
  execute,
6046
6095
  resolveReviewerFallbackModels
6047
6096
  };
6048
- //# sourceMappingURL=execution-6HIKTAUB.js.map
6097
+ //# sourceMappingURL=execution-TYUXABWI.js.map
package/dist/index.js CHANGED
@@ -1860,8 +1860,8 @@ var loaders = {
1860
1860
  audit: async () => (await import("./audit-BBR22QH3.js")).auditCmd,
1861
1861
  tools: async () => (await import("./tools-skills-UNKLOB7M.js")).toolsCmd,
1862
1862
  skills: async () => (await import("./tools-skills-UNKLOB7M.js")).skillsCmd,
1863
- providers: async () => (await import("./providers-models-4FAKM2WO.js")).providersCmd,
1864
- models: async () => (await import("./providers-models-4FAKM2WO.js")).modelsCmd,
1863
+ providers: async () => (await import("./providers-models-D23WUD74.js")).providersCmd,
1864
+ models: async () => (await import("./providers-models-D23WUD74.js")).modelsCmd,
1865
1865
  mcp: async () => (await import("./mcp-CMLFHRG2.js")).mcpCmd,
1866
1866
  plugin: async () => (await import("./plugin-usage-26LIIW3P.js")).pluginCmd,
1867
1867
  plugins: async () => (await import("./plugin-usage-26LIIW3P.js")).pluginCmd,
@@ -4466,7 +4466,7 @@ async function initializeCli(argv) {
4466
4466
  async function main(argv) {
4467
4467
  const cliCtx = await initializeCli(argv);
4468
4468
  if (typeof cliCtx === "number") return cliCtx;
4469
- const { runInteractive } = await import("./cli-main-L3T4KJKU.js");
4469
+ const { runInteractive } = await import("./cli-main-RG2PTQ6S.js");
4470
4470
  return runInteractive(cliCtx);
4471
4471
  }
4472
4472
 
@@ -496,7 +496,7 @@ async function modelsCaps(args, deps) {
496
496
  " disable: " + (rc.disableSupported ? "supported" : "unsupported") + "\n"
497
497
  );
498
498
  deps.renderer.write(
499
- " effort: " + (rc.effortSupported ? rc.effortLevels.join(", ") : "unsupported") + "\n"
499
+ " effort: " + (rc.effortSupported === void 0 ? "not enumerated (model reasons; any level forwarded)" : rc.effortSupported ? rc.effortLevels.join(", ") : "unsupported") + "\n"
500
500
  );
501
501
  deps.renderer.write(" preserve: " + rc.preserveThinking + "\n");
502
502
  } else if (caps.reasoning) {
@@ -661,4 +661,4 @@ export {
661
661
  modelsCmd,
662
662
  providersCmd
663
663
  };
664
- //# sourceMappingURL=providers-models-4FAKM2WO.js.map
664
+ //# sourceMappingURL=providers-models-D23WUD74.js.map
@@ -0,0 +1,33 @@
1
+ import { type ReasoningEffort, type SlashCommand } from '@wrongstack/core/types';
2
+ import type { SlashCommandContext } from './command-context.js';
3
+ import type { WstackPaths } from '@wrongstack/core/utils';
4
+ /**
5
+ * `/effort` — view or set the SESSION-WIDE reasoning effort applied to the
6
+ * active leader model. This is the quick, discoverable front-end for
7
+ * `Config.modelRuntime.reasoning.effort` — the same field `/settings
8
+ * reasoning-effort` writes and the WebUI "Reasoning effort" dropdown edits.
9
+ *
10
+ * Distinct from `/setmodel reasoning-effort <key>`, which pins effort onto a
11
+ * model-matrix entry (role/phase/*) for spawned subagents.
12
+ *
13
+ * Model-aware: when the active model's catalog entry advertises
14
+ * `effortLevels`, only those values are accepted and the view highlights the
15
+ * supported set. When capabilities are unknown, any canonical value is
16
+ * accepted (the runtime resolver drops unsupported values with a warning
17
+ * instead of erroring), and the view says so.
18
+ *
19
+ * Subcommands:
20
+ * (none) Show current effort, model-supported levels, and usage.
21
+ * <level> Set the session effort.
22
+ * clear Remove the setting (provider default applies).
23
+ * matrix Show per-key (role/phase/*) effort overrides, if any.
24
+ */
25
+ export declare function buildEffortCommand(opts: SlashCommandContext): SlashCommand;
26
+ /**
27
+ * Persist `Config.modelRuntime.reasoning.effort` to the active profile config.
28
+ * `undefined` removes the key entirely (JSON has no undefined). Uses the same
29
+ * read → decrypt → mutate → encrypt → atomicWrite cycle as `/setmodel` and
30
+ * `persistConfigSetting` so encrypted secrets round-trip byte-for-byte.
31
+ */
32
+ export declare function patchSessionEffort(effort: ReasoningEffort | undefined, paths: WstackPaths, activeProfile: string): Promise<void>;
33
+ //# sourceMappingURL=effort.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "0.308.7",
3
+ "version": "0.309.0",
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/kanban": "0.308.7",
46
- "@wrongstack/mcp": "0.308.7",
47
- "@wrongstack/acp": "0.308.7",
48
- "@wrongstack/bench": "0.308.7",
49
- "@wrongstack/core": "0.308.7",
50
- "@wrongstack/plug-lsp": "0.308.7",
51
- "@wrongstack/sage": "0.308.7",
52
- "@wrongstack/providers": "0.308.7",
53
- "@wrongstack/persistence": "0.308.7",
54
- "@wrongstack/runtime": "0.308.7",
55
- "@wrongstack/plugins": "0.308.7",
56
- "@wrongstack/requirement-intake": "0.308.7",
57
- "@wrongstack/security-scanner": "0.308.7",
58
- "@wrongstack/sdd": "0.308.7",
59
- "@wrongstack/tools": "0.308.7",
60
- "@wrongstack/techstack": "0.308.7",
61
- "@wrongstack/simpleui": "0.308.7",
62
- "@wrongstack/vector-memory": "0.308.7",
63
- "@wrongstack/telegram": "0.308.7",
64
- "@wrongstack/tui": "0.308.7",
65
- "@wrongstack/webui-hq": "0.308.7",
66
- "@wrongstack/webui": "0.308.7",
67
- "@wrongstack/webui-server": "0.308.7"
45
+ "@wrongstack/acp": "0.309.0",
46
+ "@wrongstack/core": "0.309.0",
47
+ "@wrongstack/kanban": "0.309.0",
48
+ "@wrongstack/bench": "0.309.0",
49
+ "@wrongstack/mcp": "0.309.0",
50
+ "@wrongstack/providers": "0.309.0",
51
+ "@wrongstack/requirement-intake": "0.309.0",
52
+ "@wrongstack/persistence": "0.309.0",
53
+ "@wrongstack/plug-lsp": "0.309.0",
54
+ "@wrongstack/sage": "0.309.0",
55
+ "@wrongstack/runtime": "0.309.0",
56
+ "@wrongstack/plugins": "0.309.0",
57
+ "@wrongstack/security-scanner": "0.309.0",
58
+ "@wrongstack/simpleui": "0.309.0",
59
+ "@wrongstack/sdd": "0.309.0",
60
+ "@wrongstack/telegram": "0.309.0",
61
+ "@wrongstack/techstack": "0.309.0",
62
+ "@wrongstack/tui": "0.309.0",
63
+ "@wrongstack/tools": "0.309.0",
64
+ "@wrongstack/vector-memory": "0.309.0",
65
+ "@wrongstack/webui": "0.309.0",
66
+ "@wrongstack/webui-hq": "0.309.0",
67
+ "@wrongstack/webui-server": "0.309.0"
68
68
  },
69
69
  "optionalDependencies": {
70
- "@wrongstack/desktop": "0.308.7"
70
+ "@wrongstack/desktop": "0.309.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/node": "^26.2.0",