lsd-pi 1.1.8 → 1.1.9
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/headless.d.ts +1 -0
- package/dist/headless.js +11 -3
- package/dist/help-text.js +1 -0
- package/dist/remote-questions-config.js +10 -4
- package/dist/resources/agents/scout.md +1 -0
- package/dist/resources/extensions/ask-user-questions.js +3 -1
- package/dist/resources/extensions/bg-shell/bg-shell-command.js +27 -3
- package/dist/resources/extensions/get-secrets-from-user.js +24 -4
- package/dist/resources/extensions/memory/auto-extract.js +11 -3
- package/dist/resources/extensions/memory/dream.js +381 -13
- package/dist/resources/extensions/remote-questions/index.js +56 -0
- package/dist/resources/extensions/remote-questions/remote-command.js +10 -2
- package/dist/resources/extensions/remote-questions/telegram-live-relay.js +273 -11
- package/dist/resources/extensions/shared/confirm-ui.js +8 -3
- package/dist/resources/extensions/shared/interview-ui.js +41 -2
- package/dist/resources/extensions/shared/remote-questions-config.js +10 -4
- package/dist/resources/extensions/slash-commands/context.js +198 -0
- package/dist/resources/extensions/slash-commands/extension-manifest.json +3 -2
- package/dist/resources/extensions/slash-commands/index.js +4 -0
- package/dist/resources/extensions/slash-commands/plan.js +60 -14
- package/dist/resources/extensions/slash-commands/tools.js +183 -0
- package/dist/resources/extensions/subagent/approval-proxy.js +57 -12
- package/dist/resources/extensions/subagent/index.js +2 -5
- package/dist/resources/extensions/usage/index.js +82 -2
- package/dist/shared-preferences.d.ts +1 -0
- package/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +40 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lsp.md +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +29 -18
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js +73 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +9 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +34 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +20 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tool-approval.d.ts +4 -0
- package/packages/pi-coding-agent/dist/core/tool-approval.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tool-approval.js +30 -0
- package/packages/pi-coding-agent/dist/core/tool-approval.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.js +32 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/extension-selector.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.d.ts +6 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +36 -5
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +8 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +32 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +208 -37
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/print-mode.js +6 -2
- package/packages/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
- package/packages/pi-coding-agent/src/core/extensions/types.ts +46 -0
- package/packages/pi-coding-agent/src/core/lsp/lsp.md +1 -1
- package/packages/pi-coding-agent/src/core/sdk.test.ts +82 -0
- package/packages/pi-coding-agent/src/core/sdk.ts +378 -368
- package/packages/pi-coding-agent/src/core/settings-manager.ts +46 -0
- package/packages/pi-coding-agent/src/core/system-prompt.ts +29 -1
- package/packages/pi-coding-agent/src/core/tool-approval.ts +37 -0
- package/packages/pi-coding-agent/src/index.ts +7 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/extension-selector.test.ts +50 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/extension-selector.ts +38 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +41 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +262 -39
- package/packages/pi-coding-agent/src/modes/print-mode.ts +8 -1
- package/src/resources/agents/scout.md +1 -0
- package/src/resources/extensions/ask-user-questions.ts +3 -1
- package/src/resources/extensions/bg-shell/bg-shell-command.ts +26 -3
- package/src/resources/extensions/get-secrets-from-user.ts +24 -4
- package/src/resources/extensions/memory/auto-extract.ts +11 -3
- package/src/resources/extensions/memory/dream.ts +408 -15
- package/src/resources/extensions/memory/tests/auto-extract.test.ts +9 -1
- package/src/resources/extensions/memory/tests/dream.test.ts +69 -5
- package/src/resources/extensions/remote-questions/index.ts +68 -2
- package/src/resources/extensions/remote-questions/remote-command.ts +12 -2
- package/src/resources/extensions/remote-questions/telegram-live-relay.ts +309 -12
- package/src/resources/extensions/shared/confirm-ui.ts +11 -4
- package/src/resources/extensions/shared/interview-ui.ts +61 -2
- package/src/resources/extensions/shared/preferences.ts +1 -0
- package/src/resources/extensions/shared/remote-questions-config.ts +13 -4
- package/src/resources/extensions/shared/tests/custom-ui-fallbacks.test.ts +147 -0
- package/src/resources/extensions/slash-commands/context.ts +245 -0
- package/src/resources/extensions/slash-commands/extension-manifest.json +3 -2
- package/src/resources/extensions/slash-commands/index.ts +7 -3
- package/src/resources/extensions/slash-commands/plan.ts +73 -18
- package/src/resources/extensions/slash-commands/tools.ts +198 -0
- package/src/resources/extensions/subagent/approval-proxy.ts +71 -23
- package/src/resources/extensions/subagent/index.ts +1 -6
- package/src/resources/extensions/usage/index.ts +92 -2
- package/dist/resources/skills/teams-debug/SKILL.md +0 -129
- package/dist/resources/skills/teams-document/SKILL.md +0 -122
- package/dist/resources/skills/teams-plan/SKILL.md +0 -305
- package/dist/resources/skills/teams-run/SKILL.md +0 -230
- package/dist/resources/skills/teams-verify/SKILL.md +0 -122
- package/src/resources/skills/teams-debug/SKILL.md +0 -129
- package/src/resources/skills/teams-document/SKILL.md +0 -122
- package/src/resources/skills/teams-plan/SKILL.md +0 -305
- package/src/resources/skills/teams-run/SKILL.md +0 -230
- package/src/resources/skills/teams-verify/SKILL.md +0 -122
package/dist/headless.d.ts
CHANGED
package/dist/headless.js
CHANGED
|
@@ -145,6 +145,9 @@ export function parseHeadlessArgs(argv) {
|
|
|
145
145
|
else if (arg === '--bare') {
|
|
146
146
|
options.bare = true;
|
|
147
147
|
}
|
|
148
|
+
else if (arg === '--no-session') {
|
|
149
|
+
options.noSession = true;
|
|
150
|
+
}
|
|
148
151
|
}
|
|
149
152
|
else if (options.command === 'auto') {
|
|
150
153
|
options.command = arg;
|
|
@@ -297,9 +300,14 @@ async function runHeadlessOnce(options, restartCount) {
|
|
|
297
300
|
}
|
|
298
301
|
// Signal headless mode to the GSD extension (skips UAT human pause, etc.)
|
|
299
302
|
clientOptions.env = { ...(clientOptions.env || {}), GSD_HEADLESS: '1' };
|
|
300
|
-
// Propagate
|
|
301
|
-
|
|
302
|
-
|
|
303
|
+
// Propagate headless session/context flags to the RPC child process.
|
|
304
|
+
const childArgs = [];
|
|
305
|
+
if (options.bare)
|
|
306
|
+
childArgs.push('--bare');
|
|
307
|
+
if (options.noSession)
|
|
308
|
+
childArgs.push('--no-session');
|
|
309
|
+
if (childArgs.length > 0) {
|
|
310
|
+
clientOptions.args = [...(clientOptions.args || []), ...childArgs];
|
|
303
311
|
}
|
|
304
312
|
const client = new RpcClient(clientOptions);
|
|
305
313
|
// Event tracking
|
package/dist/help-text.js
CHANGED
|
@@ -91,6 +91,7 @@ const SUBCOMMAND_HELP = {
|
|
|
91
91
|
' --json JSONL event stream to stdout (alias for --output-format stream-json)',
|
|
92
92
|
' --output-format <fmt> Output format: text (default), json (structured result), stream-json (JSONL events)',
|
|
93
93
|
' --bare Minimal context: skip lsd.md, CLAUDE.md, AGENTS.md, user settings, user skills',
|
|
94
|
+
' --no-session Disable session persistence for this headless run',
|
|
94
95
|
' --resume <id> Resume a prior headless session by ID',
|
|
95
96
|
' --model ID Override model',
|
|
96
97
|
' --supervised Forward interactive UI requests to orchestrator via stdout/stdin',
|
|
@@ -17,15 +17,21 @@ import { appRoot } from "./app-paths.js";
|
|
|
17
17
|
const GLOBAL_PREFERENCES_PATH = join(appRoot, "PREFERENCES.md");
|
|
18
18
|
export function saveRemoteQuestionsConfig(channel, channelId) {
|
|
19
19
|
const prefsPath = GLOBAL_PREFERENCES_PATH;
|
|
20
|
-
const
|
|
20
|
+
const content = existsSync(prefsPath) ? readFileSync(prefsPath, "utf-8") : "";
|
|
21
|
+
const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
22
|
+
const existingRemoteBlock = fmMatch?.[1].match(/remote_questions:[\s\S]*?(?=\n[a-zA-Z_]|\n---|$)/)?.[0] ?? "";
|
|
23
|
+
const existingAutoConnect = existingRemoteBlock.match(/\n\s*telegram_live_relay_auto_connect:\s*(true|false)\s*$/m)?.[1];
|
|
24
|
+
const blockLines = [
|
|
21
25
|
"remote_questions:",
|
|
22
26
|
` channel: ${channel}`,
|
|
23
27
|
` channel_id: "${channelId}"`,
|
|
24
28
|
" timeout_minutes: 5",
|
|
25
29
|
" poll_interval_seconds: 5",
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
];
|
|
31
|
+
if (existingAutoConnect) {
|
|
32
|
+
blockLines.push(` telegram_live_relay_auto_connect: ${existingAutoConnect}`);
|
|
33
|
+
}
|
|
34
|
+
const block = blockLines.join("\n");
|
|
29
35
|
let next = content;
|
|
30
36
|
if (fmMatch) {
|
|
31
37
|
let frontmatter = fmMatch[1];
|
|
@@ -21,6 +21,7 @@ Strategy:
|
|
|
21
21
|
2. Read key sections (not entire files) — use lsp to pinpoint exact locations first
|
|
22
22
|
3. Identify types, interfaces, key functions
|
|
23
23
|
4. Note dependencies between files
|
|
24
|
+
5. Optimize for useful handoff quality, not brevity alone — be as detailed as needed for the next agent to work without re-discovering the same context
|
|
24
25
|
|
|
25
26
|
Output format:
|
|
26
27
|
|
|
@@ -12,6 +12,7 @@ import { sanitizeError } from "./shared/sanitize.js";
|
|
|
12
12
|
import { Text } from "@gsd/pi-tui";
|
|
13
13
|
import { Type } from "@sinclair/typebox";
|
|
14
14
|
import { showInterviewRound, } from "./shared/tui.js";
|
|
15
|
+
import { isTelegramLiveRelayConnected } from "./remote-questions/telegram-live-relay.js";
|
|
15
16
|
// ─── Schema ───────────────────────────────────────────────────────────────────
|
|
16
17
|
const OptionSchema = Type.Object({
|
|
17
18
|
label: Type.String({ description: "User-facing label (1-5 words)" }),
|
|
@@ -86,7 +87,8 @@ export default function AskUserQuestions(pi) {
|
|
|
86
87
|
return errorResult("Error: UI not available (non-interactive mode)", params.questions);
|
|
87
88
|
}
|
|
88
89
|
// Delegate to shared interview UI
|
|
89
|
-
const
|
|
90
|
+
const preferSequentialPrompts = isTelegramLiveRelayConnected();
|
|
91
|
+
const result = preferSequentialPrompts ? undefined : await showInterviewRound(params.questions, {}, ctx);
|
|
90
92
|
// RPC mode fallback: custom() returns undefined, so showInterviewRound
|
|
91
93
|
// may return undefined. Fall back to sequential ctx.ui.select() calls.
|
|
92
94
|
if (!result) {
|
|
@@ -49,7 +49,7 @@ export function registerBgShellCommand(pi, state) {
|
|
|
49
49
|
ctx.ui.notify(lines.join("\n"), "info");
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
52
|
+
const overlayResult = await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
53
53
|
return new BgManagerOverlay(tui, theme, () => {
|
|
54
54
|
done();
|
|
55
55
|
state.refreshWidget();
|
|
@@ -63,6 +63,17 @@ export function registerBgShellCommand(pi, state) {
|
|
|
63
63
|
anchor: "center",
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
|
+
if (overlayResult === undefined || overlayResult === null) {
|
|
67
|
+
const lines = Array.from(processes.values()).map(p => {
|
|
68
|
+
const statusIcon = p.alive
|
|
69
|
+
? (p.status === "ready" ? "✓" : p.status === "error" ? "✗" : "⋯")
|
|
70
|
+
: "○";
|
|
71
|
+
const uptime = formatUptime(Date.now() - p.startedAt);
|
|
72
|
+
const portInfo = p.ports.length > 0 ? ` :${p.ports.join(",")}` : "";
|
|
73
|
+
return `${p.id} ${statusIcon} ${p.status} ${uptime} ${p.label} [${p.processType}]${portInfo}`;
|
|
74
|
+
});
|
|
75
|
+
ctx.ui.notify(lines.join("\n"), "info");
|
|
76
|
+
}
|
|
66
77
|
return;
|
|
67
78
|
}
|
|
68
79
|
if (sub === "output" || sub === "digest") {
|
|
@@ -87,7 +98,7 @@ export function registerBgShellCommand(pi, state) {
|
|
|
87
98
|
}
|
|
88
99
|
return;
|
|
89
100
|
}
|
|
90
|
-
await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
101
|
+
const overlayResult = await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
91
102
|
const overlay = new BgManagerOverlay(tui, theme, () => {
|
|
92
103
|
done();
|
|
93
104
|
state.refreshWidget();
|
|
@@ -106,6 +117,16 @@ export function registerBgShellCommand(pi, state) {
|
|
|
106
117
|
anchor: "center",
|
|
107
118
|
},
|
|
108
119
|
});
|
|
120
|
+
if (overlayResult === undefined || overlayResult === null) {
|
|
121
|
+
if (sub === "digest") {
|
|
122
|
+
const digest = generateDigest(bg);
|
|
123
|
+
ctx.ui.notify(formatDigestText(bg, digest), "info");
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
const output = getOutput(bg, { stream: "both", tail: 50 });
|
|
127
|
+
ctx.ui.notify(output || "(no output)", "info");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
109
130
|
return;
|
|
110
131
|
}
|
|
111
132
|
if (sub === "kill") {
|
|
@@ -163,7 +184,7 @@ export function registerBgShellCommand(pi, state) {
|
|
|
163
184
|
description: shortcutDesc("Open background process manager", "/bg"),
|
|
164
185
|
handler: async (ctx) => {
|
|
165
186
|
state.latestCtx = ctx;
|
|
166
|
-
await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
187
|
+
const overlayResult = await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
167
188
|
return new BgManagerOverlay(tui, theme, () => {
|
|
168
189
|
done();
|
|
169
190
|
state.refreshWidget();
|
|
@@ -177,6 +198,9 @@ export function registerBgShellCommand(pi, state) {
|
|
|
177
198
|
anchor: "center",
|
|
178
199
|
},
|
|
179
200
|
});
|
|
201
|
+
if (overlayResult === undefined || overlayResult === null) {
|
|
202
|
+
ctx.ui.notify("Background manager overlay is unavailable in this UI. Use /bg list or /bg output <id>.", "info");
|
|
203
|
+
}
|
|
180
204
|
},
|
|
181
205
|
});
|
|
182
206
|
}
|
|
@@ -86,7 +86,7 @@ export function detectDestination(basePath) {
|
|
|
86
86
|
async function collectOneSecret(ctx, pageIndex, totalPages, keyName, hint, guidance) {
|
|
87
87
|
if (!ctx.hasUI)
|
|
88
88
|
return null;
|
|
89
|
-
|
|
89
|
+
const result = await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
90
90
|
let value = "";
|
|
91
91
|
let cachedLines;
|
|
92
92
|
const editorTheme = {
|
|
@@ -171,6 +171,11 @@ async function collectOneSecret(ctx, pageIndex, totalPages, keyName, hint, guida
|
|
|
171
171
|
handleInput,
|
|
172
172
|
};
|
|
173
173
|
});
|
|
174
|
+
if (result !== undefined) {
|
|
175
|
+
return result;
|
|
176
|
+
}
|
|
177
|
+
ctx.ui.notify(`Secure input UI unavailable for ${keyName}; skipping to avoid plaintext secret entry.`, "warning");
|
|
178
|
+
return null;
|
|
174
179
|
}
|
|
175
180
|
/**
|
|
176
181
|
* Exported wrapper around collectOneSecret for testing.
|
|
@@ -192,11 +197,11 @@ export async function showSecretsSummary(ctx, entries, existingKeys) {
|
|
|
192
197
|
if (!ctx.hasUI)
|
|
193
198
|
return;
|
|
194
199
|
const existingSet = new Set(existingKeys);
|
|
195
|
-
await ctx.ui.custom((_tui, theme, _kb, done) => {
|
|
200
|
+
const result = await ctx.ui.custom((_tui, theme, _kb, done) => {
|
|
196
201
|
let cachedLines;
|
|
197
202
|
function handleInput(_data) {
|
|
198
|
-
// Any key dismisses
|
|
199
|
-
done(
|
|
203
|
+
// Any key dismisses. Return true to mark the custom UI as handled.
|
|
204
|
+
done(true);
|
|
200
205
|
}
|
|
201
206
|
function render(width) {
|
|
202
207
|
if (cachedLines)
|
|
@@ -239,6 +244,21 @@ export async function showSecretsSummary(ctx, entries, existingKeys) {
|
|
|
239
244
|
handleInput,
|
|
240
245
|
};
|
|
241
246
|
});
|
|
247
|
+
if (result === true) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const lines = ["Secrets Summary"];
|
|
251
|
+
for (const entry of entries) {
|
|
252
|
+
if (existingSet.has(entry.key))
|
|
253
|
+
lines.push(`✓ ${entry.key} (already set)`);
|
|
254
|
+
else if (entry.status === "collected")
|
|
255
|
+
lines.push(`✓ ${entry.key}`);
|
|
256
|
+
else if (entry.status === "skipped")
|
|
257
|
+
lines.push(`• ${entry.key} (skipped)`);
|
|
258
|
+
else
|
|
259
|
+
lines.push(`○ ${entry.key} (pending)`);
|
|
260
|
+
}
|
|
261
|
+
ctx.ui.notify(lines.join("\n"), "info");
|
|
242
262
|
}
|
|
243
263
|
// ─── Destination Write Helper ─────────────────────────────────────────────────
|
|
244
264
|
/**
|
|
@@ -127,6 +127,8 @@ This directory already exists — write files directly.
|
|
|
127
127
|
Rules:
|
|
128
128
|
- Save ONLY: user preferences/role, feedback/corrections, project context (deadlines, decisions), external references
|
|
129
129
|
- Do NOT save: raw code snippets, low-level implementation details, file paths, git history, one-off debugging steps, ephemeral task details
|
|
130
|
+
- This is extraction, not planning: do NOT create plans, TODO lists, or strategy docs
|
|
131
|
+
- Never write under .lsd/plan/ or .gsd/plan/
|
|
130
132
|
- Check existing memories below — update existing files rather than creating duplicates
|
|
131
133
|
- Use frontmatter: ---\\nname: ...\\ndescription: ...\\ntype: user|feedback|project|reference\\n---
|
|
132
134
|
- After writing topic files, update MEMORY.md with one-line index entries
|
|
@@ -321,12 +323,18 @@ const bundledPaths = Array.from(
|
|
|
321
323
|
.flatMap((value) => String(value).split(delimiter).map((entry) => entry.trim()).filter(Boolean))
|
|
322
324
|
// Explicitly disable cache-timer extension for auto-memory workers.
|
|
323
325
|
// It is noisy in headless logs and provides no value for maintenance runs.
|
|
324
|
-
.filter((entry) => !/[\\/]cache-timer[\\/]/i.test(entry))
|
|
326
|
+
.filter((entry) => !/[\\/]cache-timer[\\/]/i.test(entry))
|
|
327
|
+
// Also disable slash-commands: memory extraction workers should never
|
|
328
|
+
// enter /plan workflows or run approval orchestration.
|
|
329
|
+
.filter((entry) => !/[\\/]slash-commands[\\/]/i.test(entry)),
|
|
325
330
|
),
|
|
326
331
|
);
|
|
327
332
|
for (const extensionPath of bundledPaths) childArgs.push('--extension', extensionPath);
|
|
328
333
|
if (model) childArgs.push('--model', model);
|
|
329
|
-
|
|
334
|
+
// Auto-memory workers should never create normal session files.
|
|
335
|
+
// Otherwise they pollute recents/session history for the project and can make
|
|
336
|
+
// it look like new sessions started on the budget memory model.
|
|
337
|
+
childArgs.push('--no-session', '--bare', '--context', tmpPromptPath, '--context-text', instruction);
|
|
330
338
|
|
|
331
339
|
const child = spawn(
|
|
332
340
|
process.execPath,
|
|
@@ -438,7 +446,7 @@ export function extractMemories(ctx, cwd) {
|
|
|
438
446
|
`budgetModel: ${budgetModel ?? 'default'}`,
|
|
439
447
|
`logPath: ${logPath}`,
|
|
440
448
|
].join('\n') + '\n', 'utf-8');
|
|
441
|
-
const instruction = 'Extract memories from the transcript above.
|
|
449
|
+
const instruction = 'Extract memories from the transcript above. Save only durable memories into the memory directory and update MEMORY.md. Do not create plan artifacts.';
|
|
442
450
|
const helperScript = buildAutoExtractHelperScript();
|
|
443
451
|
const proc = spawn(process.execPath, [
|
|
444
452
|
'-e',
|