ceulen 0.28.2 → 0.29.1

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.
@@ -0,0 +1,402 @@
1
+ // Persistent bash wrapper: real-process tests (the shells module's pattern) so
2
+ // persistence, reset, and serialization are proven against an actual shell
3
+ // rather than a mock of it.
4
+ //
5
+ // PI_SESSION_ID travels through `options.env` exactly as pi's bash tool passes
6
+ // it (resolveSpawnContext, exposeSessionEnvironment), so per-session scoping is
7
+ // exercised on the real transport.
8
+
9
+ import assert from "node:assert/strict";
10
+ import { afterEach, beforeEach, describe, it, mock } from "node:test";
11
+ import { setPlanActive } from "../../../lib/plan-bridge.ts";
12
+ import {
13
+ DEFAULT_COMMAND_TIMEOUT_SECS,
14
+ installPersistentExitSweepForTests,
15
+ killPersistentShells,
16
+ persistentBashClause,
17
+ quoteForEval,
18
+ wrapCommand,
19
+ wrapWithPersistentShell,
20
+ } from "../lib/persistent-bash.js";
21
+
22
+ /** Fresh one-shot operations for the plan-mode / fallback path. */
23
+ async function localOps() {
24
+ const { createLocalBashOperations } = await import("@earendil-works/pi-coding-agent");
25
+ return createLocalBashOperations();
26
+ }
27
+
28
+ interface RunResult {
29
+ text: string;
30
+ exitCode: number | null;
31
+ }
32
+
33
+ /** Run one command through the wrapper for a given session id. */
34
+ function run(
35
+ ops: ReturnType<typeof wrapWithPersistentShell>,
36
+ command: string,
37
+ opts: { sessionId?: string; timeout?: number; signal?: AbortSignal; cwd?: string } = {},
38
+ ): Promise<RunResult> {
39
+ let text = "";
40
+ const env: Record<string, string> = { ...(process.env as Record<string, string>) };
41
+ if (opts.sessionId !== undefined) env.PI_SESSION_ID = opts.sessionId;
42
+ return ops
43
+ .exec(command, opts.cwd ?? process.cwd(), {
44
+ onData: (data: Buffer) => {
45
+ text += data.toString("utf8");
46
+ },
47
+ signal: opts.signal,
48
+ timeout: opts.timeout,
49
+ env,
50
+ })
51
+ .then((r) => ({ text, exitCode: r.exitCode }));
52
+ }
53
+
54
+ const sid = (tag: string) => `ceulen-ps-test-${tag}-${process.pid}-${Date.now()}`;
55
+
56
+ let ops: ReturnType<typeof wrapWithPersistentShell>;
57
+ const sessions: string[] = [];
58
+
59
+ beforeEach(async () => {
60
+ ops = wrapWithPersistentShell(await localOps());
61
+ });
62
+
63
+ afterEach(() => {
64
+ for (const id of sessions.splice(0)) killPersistentShells(id);
65
+ killPersistentShells();
66
+ setPlanActive(false);
67
+ });
68
+
69
+ function track(tag: string): string {
70
+ const id = sid(tag);
71
+ sessions.push(id);
72
+ return id;
73
+ }
74
+
75
+ describe("persistent bash: state survives across calls", () => {
76
+ it("keeps exported variables", async () => {
77
+ const id = track("export");
78
+ await run(ops, "export CEULEN_PROBE=42", { sessionId: id });
79
+ const r = await run(ops, "echo CEULEN_PROBE=$CEULEN_PROBE", { sessionId: id });
80
+ assert.equal(r.text.trim(), "CEULEN_PROBE=42");
81
+ assert.equal(r.exitCode, 0);
82
+ });
83
+
84
+ it("keeps the working directory", async () => {
85
+ const id = track("cwd");
86
+ const target = process.platform === "win32" ? process.cwd() : "/tmp";
87
+ await run(ops, `cd ${target}`, { sessionId: id });
88
+ const r = await run(ops, "pwd", { sessionId: id });
89
+ assert.equal(r.text.trim(), target);
90
+ });
91
+
92
+ it("keeps shell functions", async () => {
93
+ const id = track("func");
94
+ await run(ops, "ceulen_fn() { echo yes-$1; }", { sessionId: id });
95
+ const r = await run(ops, "ceulen_fn a", { sessionId: id });
96
+ assert.equal(r.text.trim(), "yes-a");
97
+ });
98
+
99
+ it("hands background-job output to a later call", async () => {
100
+ const id = track("bg");
101
+ await run(ops, "(sleep 0.2; echo LATE_MARKER) &", { sessionId: id });
102
+ // The job's output arrives after its own call already settled. It may land
103
+ // inside ANY later call's window (whichever is open when the pipe flushes),
104
+ // so accumulate across follow-up calls instead of pinning one.
105
+ let seen = "";
106
+ for (let i = 0; i < 10 && !seen.includes("LATE_MARKER"); i++) {
107
+ await new Promise((r) => setTimeout(r, 60));
108
+ seen += (await run(ops, "true", { sessionId: id })).text;
109
+ }
110
+ assert.match(seen, /LATE_MARKER/, "background output is delivered to a later call, never dropped");
111
+ });
112
+ });
113
+
114
+ describe("persistent bash: exit codes and reset", () => {
115
+ it("propagates a failing exit code without resetting the shell", async () => {
116
+ const id = track("fail");
117
+ const r = await run(ops, "false", { sessionId: id });
118
+ assert.equal(r.exitCode, 1);
119
+ await run(ops, "export CEULEN_STILL=here", { sessionId: id });
120
+ assert.equal((await run(ops, "echo $CEULEN_STILL", { sessionId: id })).text.trim(), "here");
121
+ });
122
+
123
+ it("resets after an explicit exit and reports the real code", async () => {
124
+ const id = track("exit");
125
+ await run(ops, "export CEULEN_GONE=1", { sessionId: id });
126
+ const died = await run(ops, "exit 7", { sessionId: id });
127
+ assert.equal(died.exitCode, 7);
128
+ assert.match(died.text, /persistent shell exited/);
129
+ // Fresh shell: the variable is gone.
130
+ const r = await run(ops, "echo CEULEN_GONE=[$CEULEN_GONE]", { sessionId: id });
131
+ assert.equal(r.text.trim(), "CEULEN_GONE=[]");
132
+ });
133
+
134
+ it("resets on timeout and rejects with pi's timeout prefix", async () => {
135
+ const id = track("timeout");
136
+ await assert.rejects(
137
+ () => run(ops, "sleep 5", { sessionId: id, timeout: 1 }),
138
+ /timeout:1/,
139
+ );
140
+ const after = await run(ops, "echo alive", { sessionId: id });
141
+ assert.equal(after.text.trim(), "alive");
142
+ });
143
+
144
+ it("resets on abort and rejects with 'aborted'", async () => {
145
+ const id = track("abort");
146
+ const controller = new AbortController();
147
+ const pending = run(ops, "sleep 5", { sessionId: id, signal: controller.signal });
148
+ setTimeout(() => controller.abort(), 100);
149
+ await assert.rejects(() => pending, /aborted/);
150
+ const after = await run(ops, "echo alive", { sessionId: id });
151
+ assert.equal(after.text.trim(), "alive");
152
+ });
153
+ });
154
+
155
+ describe("persistent bash: framing", () => {
156
+ it("runs multiline and heredoc commands through the eval wrap", async () => {
157
+ const id = track("multi");
158
+ const r = await run(
159
+ ops,
160
+ "for i in 1 2 3; do echo line-$i; done\ncat <<'EOF'\nheredoc-body\nEOF",
161
+ { sessionId: id },
162
+ );
163
+ assert.match(r.text, /line-1/);
164
+ assert.match(r.text, /line-3/);
165
+ assert.match(r.text, /heredoc-body/);
166
+ });
167
+
168
+ it("asks for a fresh marker on every command", async () => {
169
+ // The nonce is generated per command AFTER the command text exists, so a
170
+ // model can never echo a marker it has not seen. Pin the generator contract:
171
+ // one call per exec, unique values.
172
+ const issued: string[] = [];
173
+ const markerOps = wrapWithPersistentShell(await localOps(), {
174
+ newMarker: () => {
175
+ const marker = `__CEULEN_PS_${(issued.length + 1).toString(16).padStart(16, "0")}__`;
176
+ issued.push(marker);
177
+ return marker;
178
+ },
179
+ });
180
+ const id = track("markers");
181
+ await run(markerOps, "true", { sessionId: id });
182
+ await run(markerOps, "echo one", { sessionId: id });
183
+ assert.equal(issued.length, 2, "one marker per command");
184
+ assert.equal(new Set(issued).size, 2, "markers are never reused");
185
+ for (const marker of issued) assert.match(marker, /^__CEULEN_PS_[0-9a-f]{16}__$/, "reserved prefix preserved");
186
+ });
187
+
188
+ it("escapes quotes and control characters via ANSI-C quoting", () => {
189
+ assert.equal(quoteForEval("it's"), "$'it\\'s'");
190
+ assert.equal(quoteForEval("a\nb"), "$'a\\nb'");
191
+ assert.equal(quoteForEval("back\\slash"), "$'back\\\\slash'");
192
+ assert.equal(
193
+ wrapCommand("echo hi", "__CEULEN_PS_x__"),
194
+ "command builtin eval $'echo hi'; command builtin printf '__CEULEN_PS_x__%s\\n' \"$?\"\n",
195
+ );
196
+ });
197
+
198
+ // The shell is persistent BY DESIGN, so a function the model defined in an
199
+ // earlier call is still live when the framing runs. Bare `printf`/`eval` in
200
+ // the framing would be shadowed by it, the marker would never print, and a
201
+ // SUCCESSFUL command would hang until the timeout. `builtin` bypasses
202
+ // functions and aliases; pin it so a refactor cannot regress this.
203
+ // `builtin` is itself resolved by NAME, so `builtin() { :; }` suppressed the
204
+ // marker in the first cut of the fix. Both halves now go through
205
+ // `command builtin`, which survives a shadowed `builtin`.
206
+ it("framing survives a retained printf function (marker still prints)", async () => {
207
+ const id = track("shadow-printf");
208
+ await run(ops, "printf() { :; }", { sessionId: id });
209
+ const r = await run(ops, "echo BODY-OK", { sessionId: id, timeout: 10 });
210
+ assert.equal(r.text.trim(), "BODY-OK", "the body still runs and its output is not swallowed");
211
+ assert.equal(r.exitCode, 0);
212
+ });
213
+
214
+ it("framing survives a retained eval function", async () => {
215
+ const id = track("shadow-eval");
216
+ await run(ops, "eval() { :; }", { sessionId: id });
217
+ const r = await run(ops, "echo BODY-OK", { sessionId: id, timeout: 10 });
218
+ assert.equal(r.text.trim(), "BODY-OK");
219
+ assert.equal(r.exitCode, 0);
220
+ });
221
+
222
+ it("framing survives a retained builtin function", async () => {
223
+ // THE FOLLOW-UP DEFECT: `builtin` is resolved by name, so shadowing IT broke
224
+ // the marker through `builtin printf`.
225
+ const id = track("shadow-builtin");
226
+ await run(ops, "builtin() { :; }", { sessionId: id });
227
+ const r = await run(ops, "echo BODY-OK", { sessionId: id, timeout: 10 });
228
+ assert.equal(r.text.trim(), "BODY-OK");
229
+ assert.equal(r.exitCode, 0);
230
+ });
231
+
232
+ it("framing survives printf + eval + builtin all shadowed, with a failing command", async () => {
233
+ // Every framing primitive that `command` can rescue is shadowed, plus a
234
+ // non-zero status, so a suppressed marker would report the wrong code as
235
+ // well as hang.
236
+ const id = track("shadow-all");
237
+ await run(ops, "printf() { :; }; eval() { :; }; builtin() { :; }", { sessionId: id });
238
+ const r = await run(ops, "echo VISIBLE; exit 3", { sessionId: id, timeout: 10 });
239
+ assert.match(r.text, /VISIBLE/);
240
+ assert.equal(r.exitCode, 3, "the real exit status still reaches the caller");
241
+ });
242
+
243
+ // THE REMAINING CEILING, pinned as BEHAVIOR rather than left to chance:
244
+ // shadowing `command` ALONE (no help from `builtin`) skips the body and
245
+ // suppresses the marker, so that call times out. What must hold is that the
246
+ // failure is BOUNDED and SELF-HEALING — the timeout resets the shell
247
+ // (reset-never-repair) and the next call runs normally.
248
+ it("shadowing command alone times out and then resets the shell", async () => {
249
+ const id = track("shadow-command");
250
+ await assert.rejects(
251
+ () => run(ops, "command() { :; }", { sessionId: id, timeout: 2 }),
252
+ /timeout:2/,
253
+ "the documented ceiling: `command` is resolved first and is itself shadowable",
254
+ );
255
+ // The reset killed the shell, so the shadow is gone and the body runs again.
256
+ const after = await run(ops, "echo RECOVERED", { sessionId: id, timeout: 10 });
257
+ assert.equal(after.text.trim(), "RECOVERED", "the timeout reset the shell — the shadow did not survive");
258
+ assert.equal(after.exitCode, 0);
259
+ const kind = await run(ops, "type command", { sessionId: id, timeout: 10 });
260
+ assert.match(kind.text, /shell builtin/, "`command` is the builtin again in the fresh shell");
261
+ });
262
+
263
+ // pi's bash `timeout` is OPTIONAL (undefined = no timer on the one-shot path).
264
+ // For a persistent shell that would let one never-settling command wedge the
265
+ // shell AND every queued call behind it forever. The wrapper therefore applies
266
+ // DEFAULT_COMMAND_TIMEOUT_SECS as a FLOOR; a low injected floor keeps this
267
+ // fast while exercising the real recovery path.
268
+ it("applies a default deadline when the caller passes no timeout", async () => {
269
+ const floorOps = wrapWithPersistentShell(await localOps(), { defaultTimeoutSecs: 2 });
270
+ const id = track("default-deadline");
271
+ await assert.rejects(
272
+ () => run(floorOps, "command() { :; }", { sessionId: id }),
273
+ /timeout:2/,
274
+ "no caller timeout ⇒ the default floor still fires and reports itself",
275
+ );
276
+ const after = await run(floorOps, "echo RECOVERED", { sessionId: id, timeout: 10 });
277
+ assert.equal(after.text.trim(), "RECOVERED", "the default-deadline reset healed the shell");
278
+ });
279
+
280
+ it("an explicit caller timeout overrides the default floor", async () => {
281
+ // Floor of 60 s, caller asks for 2: the CALLER's budget must win, otherwise
282
+ // a deliberately short timeout would silently become a long hang.
283
+ const floorOps = wrapWithPersistentShell(await localOps(), { defaultTimeoutSecs: 60 });
284
+ const id = track("explicit-wins");
285
+ const started = Date.now();
286
+ await assert.rejects(() => run(floorOps, "sleep 30", { sessionId: id, timeout: 2 }), /timeout:2/);
287
+ assert.ok(Date.now() - started < 15_000, "the caller's 2 s budget fired, not the 60 s floor");
288
+ });
289
+
290
+ it("does not wedge queued calls when a command never settles", async () => {
291
+ // The real hazard the floor exists for: a hung command must not park the
292
+ // queue behind it forever.
293
+ const floorOps = wrapWithPersistentShell(await localOps(), { defaultTimeoutSecs: 3 });
294
+ const id = track("queue-wedge");
295
+ const hung = run(floorOps, "command() { :; }", { sessionId: id });
296
+ const queued = run(floorOps, "echo QUEUED-RAN", { sessionId: id });
297
+ await assert.rejects(() => hung, /timeout:3/, "the hung head times out");
298
+ const r = await queued;
299
+ assert.equal(r.text.trim(), "QUEUED-RAN", "the queued call still runs after the reset");
300
+ });
301
+
302
+ // The injected-floor tests above prove the MECHANISM but substitute the
303
+ // number. These two prove the SHIPPED constant itself: the real 300 s floor
304
+ // fires at 300 s and not at 299 s, verified on a fake clock so the suite does
305
+ // not wait five minutes.
306
+ it("the shipped 300 s floor fires at 300 s and not before (fake clock)", async () => {
307
+ assert.equal(DEFAULT_COMMAND_TIMEOUT_SECS, 300, "the shipped constant");
308
+ const id = track("fake-clock");
309
+ const call = run(ops, "command() { :; }", { sessionId: id }); // NO caller timeout
310
+ let outcome: string | undefined;
311
+ call.then(
312
+ () => { outcome = "settled"; },
313
+ (e: Error) => { outcome = e.message; },
314
+ );
315
+
316
+ mock.timers.enable({ apis: ["setTimeout"] });
317
+ try {
318
+ await new Promise((r) => setImmediate(r)); // let the exec register its timer
319
+ mock.timers.tick((DEFAULT_COMMAND_TIMEOUT_SECS - 1) * 1000);
320
+ await new Promise((r) => setImmediate(r));
321
+ assert.equal(outcome, undefined, "299 s must NOT fire the floor");
322
+ mock.timers.tick(1000);
323
+ await new Promise((r) => setImmediate(r));
324
+ await call.catch(() => {});
325
+ assert.match(String(outcome), new RegExp(`timeout:${DEFAULT_COMMAND_TIMEOUT_SECS}`));
326
+ } finally {
327
+ mock.timers.reset();
328
+ }
329
+ });
330
+ });
331
+
332
+ describe("persistent bash: isolation and serialization", () => {
333
+ it("keeps separate shells per PI_SESSION_ID", async () => {
334
+ const a = track("iso-a");
335
+ const b = track("iso-b");
336
+ await run(ops, "export CEULEN_SIDE=a", { sessionId: a });
337
+ await run(ops, "export CEULEN_SIDE=b", { sessionId: b });
338
+ assert.equal((await run(ops, "echo $CEULEN_SIDE", { sessionId: a })).text.trim(), "a");
339
+ assert.equal((await run(ops, "echo $CEULEN_SIDE", { sessionId: b })).text.trim(), "b");
340
+ });
341
+
342
+ it("serializes concurrent calls instead of interleaving their streams", async () => {
343
+ const id = track("serial");
344
+ const first = run(ops, "echo FIRST; sleep 0.15; echo FIRST-END", { sessionId: id });
345
+ const second = run(ops, "echo SECOND", { sessionId: id });
346
+ const [r1, r2] = await Promise.all([first, second]);
347
+ assert.match(r1.text, /FIRST/);
348
+ assert.match(r1.text, /FIRST-END/);
349
+ assert.doesNotMatch(r1.text, /SECOND/, "the queued command must not interleave");
350
+ assert.equal(r2.text.trim(), "SECOND");
351
+ });
352
+
353
+ it("kills only the targeted session's shell", async () => {
354
+ const a = track("kill-a");
355
+ const b = track("kill-b");
356
+ await run(ops, "export CEULEN_KEEP=1", { sessionId: a });
357
+ await run(ops, "export CEULEN_KEEP=2", { sessionId: b });
358
+ killPersistentShells(a);
359
+ assert.equal((await run(ops, "echo [$CEULEN_KEEP]", { sessionId: a })).text.trim(), "[]", "killed shell respawns empty");
360
+ assert.equal((await run(ops, "echo [$CEULEN_KEEP]", { sessionId: b })).text.trim(), "[2]", "sibling untouched");
361
+ });
362
+ });
363
+
364
+ describe("persistent bash: plan mode runs one-shot", () => {
365
+ it("is stateless inside plan mode and resumes pre-plan state after exit", async () => {
366
+ const id = track("plan");
367
+ // Pre-plan state that must survive plan mode untouched.
368
+ await run(ops, "export CEULEN_PLAN_PROBE=1", { sessionId: id });
369
+ assert.equal((await run(ops, "echo $CEULEN_PLAN_PROBE", { sessionId: id })).text.trim(), "1");
370
+
371
+ setPlanActive(true);
372
+ // One-shot: neither the export nor the cd may reach the persistent shell.
373
+ await run(ops, "export CEULEN_PLAN_PROBE=2", { sessionId: id });
374
+ const inPlan = await run(ops, "echo [$CEULEN_PLAN_PROBE]", { sessionId: id });
375
+ assert.equal(inPlan.text.trim(), "[]", "plan mode must be stateless — no retention from the previous call");
376
+ await run(ops, "cd /tmp", { sessionId: id });
377
+
378
+ setPlanActive(false);
379
+ // Both plan-mode mutations are gone; the pre-plan variable is back.
380
+ const afterPlan = await run(ops, "echo [$CEULEN_PLAN_PROBE]", { sessionId: id });
381
+ assert.equal(afterPlan.text.trim(), "[1]", "pre-plan state resumes; plan-mode mutations were discarded");
382
+ const cwdAfterPlan = await run(ops, "pwd", { sessionId: id });
383
+ assert.notEqual(cwdAfterPlan.text.trim(), "/tmp", "the plan-mode cd was discarded");
384
+ });
385
+ });
386
+
387
+ describe("persistent bash: description clause", () => {
388
+ it("states persistence, backgrounding, reset, and the plan-mode exception", () => {
389
+ const clause = persistentBashClause();
390
+ assert.match(clause, /ONE persistent bash session/);
391
+ assert.match(clause, /persist across calls/);
392
+ assert.match(clause, /background/);
393
+ assert.match(clause, /resets the shell/);
394
+ assert.match(clause, /plan mode each call runs as a one-shot shell/);
395
+ });
396
+
397
+ it("installs the exit sweeper idempotently", () => {
398
+ installPersistentExitSweepForTests();
399
+ installPersistentExitSweepForTests();
400
+ assert.ok(true, "no duplicate listeners / no throw");
401
+ });
402
+ });
@@ -57,16 +57,18 @@ async function writeProject(cwdPath: string, repair: unknown): Promise<void> {
57
57
  }
58
58
 
59
59
  describe("readRepairSettings", () => {
60
- it("defaults: repair on, guards on, autoBg off @120s", () => {
60
+ it("defaults: repair on, guards on, autoBg off @120s, persistent bash off", () => {
61
61
  assert.deepEqual(readRepairSettings(cwd), DEFAULT_REPAIR_SETTINGS);
62
+ assert.equal(DEFAULT_REPAIR_SETTINGS.persistentBash, false, "opt-in: binds at load, so it stays off until asked for");
62
63
  });
63
64
 
64
65
  it("reads the global agent-dir `repair` section", async () => {
65
- await writeGlobal({ arguments: false, autoBg: true, autoBgSecs: 30 });
66
+ await writeGlobal({ arguments: false, autoBg: true, autoBgSecs: 30, persistentBash: true });
66
67
  const s = readRepairSettings(cwd);
67
68
  assert.equal(s.arguments, false);
68
69
  assert.equal(s.autoBg, true);
69
70
  assert.equal(s.autoBgSecs, 30);
71
+ assert.equal(s.persistentBash, true);
70
72
  assert.equal(s.guards, true, "untouched keys keep the default");
71
73
  });
72
74
 
@@ -173,7 +175,7 @@ describe("tool_call honors the trusted-project layer (A5 e2e)", () => {
173
175
  });
174
176
 
175
177
  describe("buildRepairGroups (panel contract)", () => {
176
- it("renders the six repair.* rows on the Tools tab with the documented defaults", () => {
178
+ it("renders the seven repair.* rows on the Tools tab with the documented defaults", () => {
177
179
  const cfg: RepairSettings = { ...DEFAULT_REPAIR_SETTINGS };
178
180
  const groups = buildRepairGroups(cfg);
179
181
  assert.equal(groups.length, 1);
@@ -187,6 +189,7 @@ describe("buildRepairGroups (panel contract)", () => {
187
189
  "repair.autoGenGuard",
188
190
  "repair.autoBg",
189
191
  "repair.autoBgSecs",
192
+ "repair.persistentBash",
190
193
  ]);
191
194
  assert.ok(keys.every((k) => k.startsWith("repair.")), "row keys route back to this module");
192
195
  const byKey = new Map(groups[0].rows.map((r) => [r.key, r]));
@@ -63,19 +63,6 @@ export function buildSteeringGroups(cfg: SteeringSettings): PanelGroup[] {
63
63
  defaultValue: true,
64
64
  description: "Strip accumulated reasoning_content from prior turns (prefix-cache stability; prevents provider 400s).",
65
65
  }),
66
- row("steering.dsAnchor", "DS minimal-mode anchor", "toggle", cfg.dsAnchor, (v) => {
67
- cfg.dsAnchor = Boolean(v);
68
- }, {
69
- defaultValue: true,
70
- warning: "V4 Pro and V4.1 Flash: request #1 uses only bash and str_replace_editor when both are declared. The full prompt and catalog return after the first reply.",
71
- description: "DeepSeek Harness minimal-mode bootstrap. Skipped in plan mode and restricted tool loadouts without the tool pair.",
72
- }),
73
- row("steering.weNeed", "We-need directive", "toggle", cfg.weNeed, (v) => {
74
- cfg.weNeed = Boolean(v);
75
- }, {
76
- defaultValue: false,
77
- description: "A/B knob: prepend the 'We need…' thinking directive to the bootstrap prompt.",
78
- }),
79
66
  row("steering.thinkTool", "Think scratchpad tool", "toggle", cfg.thinkTool, (v) => {
80
67
  cfg.thinkTool = Boolean(v);
81
68
  }, {
@@ -95,8 +82,6 @@ const OWNED_KEYS = [
95
82
  "steering.superpowerPrompt",
96
83
  "steering.strictSerena",
97
84
  "steering.stripReasoning",
98
- "steering.dsAnchor",
99
- "steering.weNeed",
100
85
  "steering.thinkTool",
101
86
  ];
102
87