@songsid/agend 2.1.6-beta.8 → 2.1.6
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/backend/codex.d.ts +52 -0
- package/dist/backend/codex.js +618 -35
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro.d.ts +9 -0
- package/dist/backend/kiro.js +129 -0
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.d.ts +37 -4
- package/dist/backend/muse.js +150 -61
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +25 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/daemon.d.ts +98 -10
- package/dist/daemon.js +836 -94
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-manager.d.ts +68 -2
- package/dist/fleet-manager.js +290 -81
- package/dist/fleet-manager.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +17 -0
- package/dist/instance-lifecycle.js +118 -5
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +22 -0
- package/dist/locale.js.map +1 -1
- package/dist/muse-usage-relay.d.ts +72 -0
- package/dist/muse-usage-relay.js +431 -0
- package/dist/muse-usage-relay.js.map +1 -0
- package/dist/tmux-manager.d.ts +2 -0
- package/dist/tmux-manager.js +20 -0
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +27 -0
- package/dist/tool-permissions.js +64 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.d.ts +9 -0
- package/dist/topic-commands.js +36 -2
- package/dist/topic-commands.js.map +1 -1
- package/dist/ui/view.html +2 -2
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +1 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +4 -0
- package/dist/usage/providers.js +86 -9
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +0 -11
- package/dist/usage/usage-api.js +50 -8
- package/dist/usage/usage-api.js.map +1 -1
- package/package.json +2 -1
package/dist/backend/muse.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync, chmodSync } from "node:fs";
|
|
1
|
+
import { join, resolve } from "node:path";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync, chmodSync, lstatSync, readlinkSync, symlinkSync, renameSync, unlinkSync } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
|
-
import { createHash } from "node:crypto";
|
|
4
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
5
5
|
import { resolveBinary, shellQuote, validateModel, warnIfModelMismatch } from "./types.js";
|
|
6
6
|
import { appendWithMarker, removeMarker } from "./marker-utils.js";
|
|
7
7
|
/** Session ids are UUIDs (e.g. "01a0c784-fb91-…"); guard before shell interpolation. */
|
|
@@ -36,12 +36,14 @@ export class MuseBackend {
|
|
|
36
36
|
instanceDir;
|
|
37
37
|
binaryName = "muse";
|
|
38
38
|
binaryPath;
|
|
39
|
+
sharedXdgConfigHome;
|
|
39
40
|
// Cached from buildCommand/writeConfig so getSessionId() (which takes no
|
|
40
41
|
// args) can match sessions against this instance's workspace.
|
|
41
42
|
workingDirectory;
|
|
42
43
|
constructor(instanceDir) {
|
|
43
44
|
this.instanceDir = instanceDir;
|
|
44
45
|
this.binaryPath = resolveBinary("muse");
|
|
46
|
+
this.sharedXdgConfigHome = resolve(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"));
|
|
45
47
|
}
|
|
46
48
|
buildCommand(config) {
|
|
47
49
|
this.workingDirectory = config.workingDirectory;
|
|
@@ -51,7 +53,15 @@ export class MuseBackend {
|
|
|
51
53
|
// mid-run would repaint the pane and swap the CLI. One year in seconds
|
|
52
54
|
// keeps the check quiet while staying inside the launcher's own numeric
|
|
53
55
|
// guard (a non-numeric value also disables it, but undocumented).
|
|
54
|
-
|
|
56
|
+
// Muse has one user-level settings.json and loads every MCP server in it.
|
|
57
|
+
// Point only this Muse process at its instance-scoped copy; otherwise two
|
|
58
|
+
// fleet instances both see both socket-bearing MCP tools.
|
|
59
|
+
let cmd = `XDG_CONFIG_HOME=${shellQuote(this.isolatedXdgConfigHome())} MUSE_UPDATE_INTERVAL_SECONDS=31536000 ${this.binaryPath}`;
|
|
60
|
+
// The daemon may prepare a localhost-only usage relay before spawning Muse.
|
|
61
|
+
// If relay preparation fails this remains unset and Muse connects directly;
|
|
62
|
+
// usage must never become a prerequisite for a working conversation.
|
|
63
|
+
if (config.museBaseUrl)
|
|
64
|
+
cmd += ` --base-url ${shellQuote(config.museBaseUrl)}`;
|
|
55
65
|
// Verified: `--disable-approval` on its own leaves the session parked on
|
|
56
66
|
// "Do you trust this workspace?" forever. Trust is a separate axis, so both
|
|
57
67
|
// flags are needed to reach the prompt unattended.
|
|
@@ -96,9 +106,8 @@ export class MuseBackend {
|
|
|
96
106
|
}
|
|
97
107
|
}
|
|
98
108
|
/**
|
|
99
|
-
* Per-instance MCP key.
|
|
100
|
-
*
|
|
101
|
-
* non-ASCII name becomes an ASCII slug plus a hash of the original.
|
|
109
|
+
* Per-instance MCP key. Keep tool names stable across the shared-settings
|
|
110
|
+
* migration; a non-ASCII instance name becomes an ASCII slug plus a hash.
|
|
102
111
|
*/
|
|
103
112
|
mcpKey(mcpName, instanceName) {
|
|
104
113
|
const ascii = instanceName.replace(/[^\x20-\x7E]/g, "");
|
|
@@ -108,39 +117,82 @@ export class MuseBackend {
|
|
|
108
117
|
const hash = createHash("md5").update(instanceName).digest("hex").slice(0, 8);
|
|
109
118
|
return slug ? `agend-${mcpName}-${slug}-${hash}` : `agend-${mcpName}-${hash}`;
|
|
110
119
|
}
|
|
111
|
-
|
|
120
|
+
isolatedXdgConfigHome() {
|
|
121
|
+
return join(this.instanceDir, "muse-xdg");
|
|
122
|
+
}
|
|
123
|
+
/** Muse's per-process settings location after buildCommand sets XDG_CONFIG_HOME. */
|
|
112
124
|
settingsPath() {
|
|
113
|
-
|
|
114
|
-
|
|
125
|
+
return join(this.isolatedXdgConfigHome(), "muse", "settings.json");
|
|
126
|
+
}
|
|
127
|
+
sharedSettingsPath() {
|
|
128
|
+
return join(this.sharedXdgConfigHome, "muse", "settings.json");
|
|
129
|
+
}
|
|
130
|
+
mirrorSharedConfigEntries(sourceDir, isolatedDir, excluded) {
|
|
131
|
+
for (const name of readdirSync(sourceDir)) {
|
|
132
|
+
if (excluded.has(name))
|
|
133
|
+
continue;
|
|
134
|
+
const link = join(isolatedDir, name);
|
|
135
|
+
try {
|
|
136
|
+
lstatSync(link);
|
|
137
|
+
continue; // Keep any per-instance file Muse already created.
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
if (err.code !== "ENOENT")
|
|
141
|
+
throw err;
|
|
142
|
+
}
|
|
143
|
+
symlinkSync(join(sourceDir, name), link);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/** Preserve the user's login while keeping Muse's MCP settings per instance. */
|
|
147
|
+
linkSharedAuth() {
|
|
148
|
+
const sharedMuseDir = join(this.sharedXdgConfigHome, "muse");
|
|
149
|
+
const isolatedXdgHome = this.isolatedXdgConfigHome();
|
|
150
|
+
const isolatedMuseDir = join(isolatedXdgHome, "muse");
|
|
151
|
+
mkdirSync(sharedMuseDir, { recursive: true, mode: 0o700 });
|
|
152
|
+
mkdirSync(isolatedXdgHome, { recursive: true, mode: 0o700 });
|
|
153
|
+
mkdirSync(isolatedMuseDir, { recursive: true, mode: 0o700 });
|
|
154
|
+
chmodSync(isolatedXdgHome, 0o700);
|
|
155
|
+
chmodSync(isolatedMuseDir, 0o700);
|
|
156
|
+
// XDG_CONFIG_HOME also affects tools run by Muse. Mirror unrelated XDG and
|
|
157
|
+
// Muse config entries, while owning only settings.json in this instance.
|
|
158
|
+
this.mirrorSharedConfigEntries(this.sharedXdgConfigHome, isolatedXdgHome, new Set(["muse"]));
|
|
159
|
+
this.mirrorSharedConfigEntries(sharedMuseDir, isolatedMuseDir, new Set(["settings.json", "auth.json", ".auth.json.lock"]));
|
|
160
|
+
// Muse uses a lock beside auth.json. Both symlinks must point at the same
|
|
161
|
+
// shared files so login/refresh from two instances remains serialized.
|
|
162
|
+
for (const name of ["auth.json", ".auth.json.lock"]) {
|
|
163
|
+
const target = join(sharedMuseDir, name);
|
|
164
|
+
const link = join(isolatedMuseDir, name);
|
|
165
|
+
try {
|
|
166
|
+
const st = lstatSync(link);
|
|
167
|
+
if (st.isSymbolicLink() && readlinkSync(link) === target)
|
|
168
|
+
continue;
|
|
169
|
+
throw new Error(`Muse auth path is already occupied: ${link}`);
|
|
170
|
+
}
|
|
171
|
+
catch (err) {
|
|
172
|
+
if (err.code !== "ENOENT")
|
|
173
|
+
throw err;
|
|
174
|
+
}
|
|
175
|
+
symlinkSync(target, link);
|
|
176
|
+
}
|
|
115
177
|
}
|
|
116
178
|
writeConfig(config) {
|
|
117
179
|
this.workingDirectory = config.workingDirectory;
|
|
118
|
-
// Muse reads MCP
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
// instance so instances sharing a machine cannot overwrite each other.
|
|
124
|
-
//
|
|
125
|
-
// Isolating this per instance would mean relocating XDG_CONFIG_HOME, which
|
|
126
|
-
// also moves auth.json — the user's login. Not worth doing blind; left as a
|
|
127
|
-
// follow-up for whoever needs per-instance muse credentials.
|
|
180
|
+
// Muse reads every MCP entry in its single XDG settings.json; namespacing
|
|
181
|
+
// keys inside a shared file still exposes all sibling instances' tools to
|
|
182
|
+
// every Muse process. Copy the user's ordinary settings into this instance's
|
|
183
|
+
// XDG home, excluding all AgEnD MCP entries, then add only this socket.
|
|
184
|
+
this.linkSharedAuth();
|
|
128
185
|
const settingsPath = this.settingsPath();
|
|
129
186
|
let root = {};
|
|
130
187
|
try {
|
|
131
|
-
root = JSON.parse(readFileSync(
|
|
188
|
+
root = JSON.parse(readFileSync(this.sharedSettingsPath(), "utf-8"));
|
|
132
189
|
}
|
|
133
190
|
catch { /* new file */ }
|
|
134
191
|
if (typeof root.schema_version !== "number")
|
|
135
192
|
root.schema_version = 1;
|
|
136
|
-
const servers = (root.mcpServers ?? {});
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
for (const [key, val] of Object.entries(servers)) {
|
|
140
|
-
if (!key.startsWith("agend-"))
|
|
141
|
-
continue;
|
|
142
|
-
const cmd = val?.command;
|
|
143
|
-
if (typeof cmd === "string" && !existsSync(cmd))
|
|
193
|
+
const servers = { ...(root.mcpServers ?? {}) };
|
|
194
|
+
for (const key of Object.keys(servers)) {
|
|
195
|
+
if (key === "agend" || key.startsWith("agend-"))
|
|
144
196
|
delete servers[key];
|
|
145
197
|
}
|
|
146
198
|
for (const [name, entry] of Object.entries(config.mcpServers)) {
|
|
@@ -167,11 +219,18 @@ export class MuseBackend {
|
|
|
167
219
|
};
|
|
168
220
|
}
|
|
169
221
|
root.mcpServers = servers;
|
|
222
|
+
const temporaryPath = `${settingsPath}.${process.pid}.${randomBytes(6).toString("hex")}.tmp`;
|
|
170
223
|
try {
|
|
171
|
-
|
|
172
|
-
|
|
224
|
+
writeFileSync(temporaryPath, JSON.stringify(root, null, 2), { mode: 0o600, flag: "wx" });
|
|
225
|
+
renameSync(temporaryPath, settingsPath);
|
|
226
|
+
chmodSync(settingsPath, 0o600);
|
|
227
|
+
}
|
|
228
|
+
finally {
|
|
229
|
+
try {
|
|
230
|
+
unlinkSync(temporaryPath);
|
|
231
|
+
}
|
|
232
|
+
catch { /* renamed or write failed */ }
|
|
173
233
|
}
|
|
174
|
-
catch { /* best effort — a muse without MCP still starts */ }
|
|
175
234
|
// `muse init` scaffolds AGENTS.md and the binary reads it as project rules,
|
|
176
235
|
// the same convention as codex and grok. Additive + idempotent via marker.
|
|
177
236
|
if (config.instructions) {
|
|
@@ -230,6 +289,58 @@ export class MuseBackend {
|
|
|
230
289
|
getBusyPattern() {
|
|
231
290
|
return /\(\s*\d+(?:\.\d+)?s\s*·\s*esc to interrupt\s*\)/;
|
|
232
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Structural proof that muse's TUI is parked at its idle input prompt.
|
|
294
|
+
*
|
|
295
|
+
* Muse's status bar (`model · effort · cwd · ...`) redraws periodically even
|
|
296
|
+
* when the session is fully idle. Without this method `canProvePeriodicIdle`
|
|
297
|
+
* stays false in the daemon, so every status-bar repaint triggers a plain
|
|
298
|
+
* `recordOutput()` call, resetting the silence debounce and leaving the
|
|
299
|
+
* instance stuck in `working` forever (no auto-pause, cancel never retires,
|
|
300
|
+
* delegate_task times out on the readiness gate).
|
|
301
|
+
*
|
|
302
|
+
* The idle layout, last four visible rows:
|
|
303
|
+
* ───────────────────────────── (separator)
|
|
304
|
+
* ❯ (empty input box — no user text after it)
|
|
305
|
+
* ───────────────────────────── (separator)
|
|
306
|
+
* model · effort · cwd (status bar)
|
|
307
|
+
*
|
|
308
|
+
* Per the CliBackend contract, this method must be a strong structural proof:
|
|
309
|
+
* false positives can retire Cancel and admit a new delivery into a busy CLI.
|
|
310
|
+
* A working pane shows `◇ Thinking (2s · esc to interrupt)` in the rows
|
|
311
|
+
* immediately above the top separator; checking those rows with getBusyPattern()
|
|
312
|
+
* returns false for working panes, matching the codex implementation's approach.
|
|
313
|
+
*
|
|
314
|
+
* Note: `canProvePeriodicIdle` in the daemon is set by the *presence* of this
|
|
315
|
+
* method (`!!this.backend?.isPeriodicRedrawIdlePane`), not its return value —
|
|
316
|
+
* so returning false for working panes only resets the confirmation count and
|
|
317
|
+
* keeps it working; it does not disable the periodic-idle path.
|
|
318
|
+
*/
|
|
319
|
+
isPeriodicRedrawIdlePane(pane) {
|
|
320
|
+
const rows = pane.replace(/\r/g, "").split("\n");
|
|
321
|
+
// Search the bottom 8 visible rows for an EMPTY ❯ line. Lines with user
|
|
322
|
+
// text (`❯ Write a haiku…`) are the input box with content — they sit in
|
|
323
|
+
// the conversation transcript and are not the live idle prompt.
|
|
324
|
+
let promptRow = -1;
|
|
325
|
+
for (let i = rows.length - 1; i >= Math.max(0, rows.length - 8); i--) {
|
|
326
|
+
if (/^❯\s*$/.test(rows[i])) {
|
|
327
|
+
promptRow = i;
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
if (promptRow < 0)
|
|
332
|
+
return false;
|
|
333
|
+
// The line immediately after the empty ❯ must be the separator (─ × N).
|
|
334
|
+
// Without it we may be looking at the prompt in the transcript, not the
|
|
335
|
+
// live input box.
|
|
336
|
+
if (!/^─{10,}/.test(rows[promptRow + 1] ?? ""))
|
|
337
|
+
return false;
|
|
338
|
+
// No busy indicator in the active region above the prompt. The working
|
|
339
|
+
// indicator (`◇ Thinking (2s · esc to interrupt)`) sits just above the
|
|
340
|
+
// top separator (~3 rows above promptRow). Check 6 rows up to be safe.
|
|
341
|
+
const busyPattern = this.getBusyPattern();
|
|
342
|
+
return !rows.slice(Math.max(0, promptRow - 6), promptRow).some(r => busyPattern.test(r));
|
|
343
|
+
}
|
|
233
344
|
getErrorPatterns() {
|
|
234
345
|
// NOTE: an Escape-interrupted run prints "interrupting run" in the status
|
|
235
346
|
// bar. That is normal user-initiated behaviour, not an error — nothing here
|
|
@@ -282,33 +393,10 @@ export class MuseBackend {
|
|
|
282
393
|
// be worse than none.
|
|
283
394
|
return null;
|
|
284
395
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
* `/usage` (alias `/cost`) does exist, and it is real: inside the TUI it
|
|
290
|
-
* prints "Subscription · Muse Code Everyday Usage" with "Current 0% used ·
|
|
291
|
-
* Resets at 2:37 AM" and a weekly line beside it. Every route to that number
|
|
292
|
-
* from outside the TUI was checked on 2026-09-22 against muse 1.3.0:
|
|
293
|
-
*
|
|
294
|
-
* - No subcommand. `muse --help` lists resume, exec, config, export, trace,
|
|
295
|
-
* skills, plugins, sandbox, schema, serve, session-message, mcp, auth,
|
|
296
|
-
* login, logout, init — and nothing for usage, quota or cost.
|
|
297
|
-
* - Nothing on disk. Every other provider in src/usage/providers.ts reads a
|
|
298
|
-
* store its vendor writes; muse writes none. ~/.local/share/muse and
|
|
299
|
-
* ~/.config/muse hold sessions, skills, plugins and credentials, and the
|
|
300
|
-
* only files mentioning a quota are prompts that happen to use the word.
|
|
301
|
-
* - Fetched on demand. The panel is empty until the session has been to
|
|
302
|
-
* Meta at least once, so the number lives in the running process, not in
|
|
303
|
-
* anything a second process could read.
|
|
304
|
-
* - The endpoint is not ours to guess. The recorded trace carries no
|
|
305
|
-
* request URL, and an invented one would break silently the day Meta
|
|
306
|
-
* moved it — a usage row that is quietly wrong is worse than no row.
|
|
307
|
-
*
|
|
308
|
-
* So muse is absent from the usage list on purpose, tracked in #851. If Meta
|
|
309
|
-
* ships a non-interactive surface, a `fetchMuseUsage` slots into
|
|
310
|
-
* DEFAULT_PROVIDERS beside the others and nothing here has to change.
|
|
311
|
-
*/
|
|
396
|
+
// Muse usage is collected by the daemon-owned localhost relay in
|
|
397
|
+
// muse-usage-relay.ts. Keeping this backend free of direct Meta requests is
|
|
398
|
+
// deliberate: the relay observes only response.subscription_usage frames and
|
|
399
|
+
// the model conversation remains byte-for-byte transparent.
|
|
312
400
|
getSessionId() {
|
|
313
401
|
// Sessions live at ~/.local/share/muse/sessions/<YYYY>/<MM>/<DD>/<uuid>/,
|
|
314
402
|
// filed by date rather than by workspace, so the workspace has to be read
|
|
@@ -403,7 +491,7 @@ export class MuseBackend {
|
|
|
403
491
|
// The selected model is the one thing muse persists where we can read it.
|
|
404
492
|
let currentModel;
|
|
405
493
|
try {
|
|
406
|
-
const settings = JSON.parse(readFileSync(this.settingsPath(), "utf-8"));
|
|
494
|
+
const settings = JSON.parse(readFileSync(existsSync(this.settingsPath()) ? this.settingsPath() : this.sharedSettingsPath(), "utf-8"));
|
|
407
495
|
if (typeof settings.model === "string")
|
|
408
496
|
currentModel = settings.model;
|
|
409
497
|
}
|
|
@@ -418,7 +506,8 @@ export class MuseBackend {
|
|
|
418
506
|
for (const name of Object.keys(config.mcpServers)) {
|
|
419
507
|
delete root.mcpServers[this.mcpKey(name, config.instanceName)];
|
|
420
508
|
}
|
|
421
|
-
writeFileSync(settingsPath, JSON.stringify(root, null, 2));
|
|
509
|
+
writeFileSync(settingsPath, JSON.stringify(root, null, 2), { mode: 0o600 });
|
|
510
|
+
chmodSync(settingsPath, 0o600);
|
|
422
511
|
}
|
|
423
512
|
}
|
|
424
513
|
catch { /* best effort */ }
|
package/dist/backend/muse.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"muse.js","sourceRoot":"","sources":["../../src/backend/muse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/G,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAuH,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChN,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,wFAAwF;AACxF,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,kFAAkF;AAClF,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,KAAK,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;AACvF,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,WAAW;IAOF;IANX,UAAU,GAAG,MAAM,CAAC;IACrB,UAAU,CA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IAC/B,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAY,EAAE;QACzC,IAAI,CAAC;YAAC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,EAAE,CAAC;QAAC,CAAC;IACvD,CAAC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QACpC,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;YAC/C,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;gBACpD,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;oBAC7D,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;gBAClD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/backend/types.d.ts
CHANGED
|
@@ -36,9 +36,11 @@ export interface CliBackendConfig {
|
|
|
36
36
|
agentPort?: number;
|
|
37
37
|
/** Per-backend options merged from fleet defaults + instance config (e.g. { provider: "glm" }). */
|
|
38
38
|
backendOptions?: Record<string, unknown>;
|
|
39
|
+
/** Daemon-owned localhost Muse usage relay, prepared before spawn. */
|
|
40
|
+
museBaseUrl?: string;
|
|
39
41
|
}
|
|
40
42
|
/** Action to take when an error pattern is detected in PTY output. */
|
|
41
|
-
export type ErrorActionType = "notify" | "failover" | "restart" | "pause";
|
|
43
|
+
export type ErrorActionType = "notify" | "failover" | "restart" | "pause" | "backoff_restart";
|
|
42
44
|
/** Categorizes detected errors for logging and response. */
|
|
43
45
|
export type ErrorType = "rate_limit" | "auth_error" | "crash" | "network" | "quota" | "timeout" | "model_error" | "config_error";
|
|
44
46
|
export interface ErrorPattern {
|
|
@@ -266,6 +268,12 @@ export interface CliBackend {
|
|
|
266
268
|
* higher up is history). Required for `dropsEnterWhileBusy()` backends.
|
|
267
269
|
*/
|
|
268
270
|
getBottomReadyPattern?(): RegExp | null;
|
|
271
|
+
/**
|
|
272
|
+
* Positive current-screen input evidence for backends whose prompt is above
|
|
273
|
+
* a footer (Codex). A header, percentage or historical prompt alone is not
|
|
274
|
+
* enough to write into a pane that may still be changing terminal modes.
|
|
275
|
+
*/
|
|
276
|
+
isDeliveryInputReadyPane?(pane: string): boolean;
|
|
269
277
|
/**
|
|
270
278
|
* Marker the CLI paints when it has accepted input into its own pending
|
|
271
279
|
* queue rather than starting a turn (codex: the `↳` row under "Messages to
|
|
@@ -336,6 +344,12 @@ export interface CliBackend {
|
|
|
336
344
|
getSessionId(): string | null;
|
|
337
345
|
/** Regex to detect when the CLI is ready to accept input. */
|
|
338
346
|
getReadyPattern(): RegExp;
|
|
347
|
+
/**
|
|
348
|
+
* Optional per-line UI chrome filter for emergency pane-text proxy replies.
|
|
349
|
+
* Keep this distinct from whole-pane readiness: a structural ready regex
|
|
350
|
+
* may require adjacent lines and can never match one isolated line.
|
|
351
|
+
*/
|
|
352
|
+
isProxyReplyChromeLine?(line: string): boolean;
|
|
339
353
|
/**
|
|
340
354
|
* Regex matching a marker that means "generating right now", if the TUI has one.
|
|
341
355
|
*
|
|
@@ -474,6 +488,16 @@ export interface CliBackend {
|
|
|
474
488
|
currentModel?: string;
|
|
475
489
|
models: ModelOption[];
|
|
476
490
|
}>;
|
|
491
|
+
/**
|
|
492
|
+
* Ask the CLI to refresh its OWN model catalog before the next probe reads it.
|
|
493
|
+
*
|
|
494
|
+
* For a backend whose probe only reads a file the CLI maintains (codex's
|
|
495
|
+
* models_cache.json), re-reading that file is not a refresh: the list is as
|
|
496
|
+
* old as the last time the CLI itself fetched it. This makes the CLI fetch.
|
|
497
|
+
* Called only by an explicit refresh — never by the startup or /model probe —
|
|
498
|
+
* and it may throw; the caller reports a failed refresh and keeps the old list.
|
|
499
|
+
*/
|
|
500
|
+
refreshModelCatalog?(): Promise<void>;
|
|
477
501
|
}
|
|
478
502
|
export declare function resolveBinary(name: string, fallbackDirs?: readonly string[]): string;
|
|
479
503
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/backend/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/backend/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA0G1C,mEAAmE;AACnE,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,CAAC;AAElD;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAE/C;;;;;;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ClE,MAAM,UAAU,iBAAiB,CAAC,WAAmB,EAAE,KAAa;IAClE,MAAM,OAAO,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC,CAAC,iCAAiC;IAC5D,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,WAAmB,EAAE,KAAa;IACpE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,kBAAkB,KAAK,uCAAuC,WAAW,0BAA0B,CAAC,CAAC;IACpH,CAAC;AACH,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AACzC,CAAC"}
|
package/dist/daemon.d.ts
CHANGED
|
@@ -217,9 +217,13 @@ export declare class BackendUnreachableStartupError extends Error {
|
|
|
217
217
|
* prompt. A TUI that is still completing its first redraw can swallow Enter.
|
|
218
218
|
*
|
|
219
219
|
* Since the adaptive settle (see {@link waitForPasteSettle}) this value is the
|
|
220
|
-
* *
|
|
221
|
-
*
|
|
222
|
-
*
|
|
220
|
+
* *minimum* settle window for the first delivery — it prevents Enter from firing
|
|
221
|
+
* before the minimum elapses even when the paste's own render goes quiet early.
|
|
222
|
+
* For observed deliveries the quiet-exit path in waitForPasteSettle now checks
|
|
223
|
+
* `now >= fallbackDeadline`, so 1750ms governs every first delivery regardless
|
|
224
|
+
* of whether output is observed. For unobserved deliveries (no control mode,
|
|
225
|
+
* native-queue handoff, mid-wait reconnect, or a paste that never visibly
|
|
226
|
+
* renders) it is the flat fallback delay, same as before.
|
|
223
227
|
*/
|
|
224
228
|
export declare class FirstDeliveryDelay {
|
|
225
229
|
private readyAt;
|
|
@@ -256,9 +260,15 @@ export interface PasteSettleResult {
|
|
|
256
260
|
* So: watch `lastOutputAt` and send Enter only once the paste's own render has
|
|
257
261
|
* been quiet for {@link PASTE_QUIET_MS}. Bounded both ways —
|
|
258
262
|
*
|
|
259
|
-
* - never earlier than
|
|
260
|
-
*
|
|
261
|
-
*
|
|
263
|
+
* - never earlier than `fallbackMs` from settle start: `fallbackMs` is a
|
|
264
|
+
* **minimum** settle window, not merely a fallback. For first deliveries
|
|
265
|
+
* (fallbackMs = 1750ms) the compositor may render quickly then go quiet at
|
|
266
|
+
* ~550ms while still initialising — the minimum ensures Enter is held until
|
|
267
|
+
* 1750ms regardless of observed output. This applies to every backend's first
|
|
268
|
+
* delivery after ready, not only codex/Luna Reserve. For normal deliveries
|
|
269
|
+
* (fallbackMs = 500ms ≈ PASTE_QUIET_MS) the minimum adds at most a few ms
|
|
270
|
+
* and is effectively unchanged. When the paste produces no observable output
|
|
271
|
+
* at all (`usedFallback`), the same `fallbackMs` deadline governs;
|
|
262
272
|
* - never later than {@link PASTE_SETTLE_CAP_MS} after the paste (`capHit`),
|
|
263
273
|
* so a chatty pane cannot stall delivery.
|
|
264
274
|
*
|
|
@@ -268,7 +278,7 @@ export interface PasteSettleResult {
|
|
|
268
278
|
*/
|
|
269
279
|
export declare function waitForPasteSettle(client: PasteSettleObservation, windowId: string, pasteStartedAt: number, fallbackMs: number): Promise<PasteSettleResult>;
|
|
270
280
|
/** Redact likely credentials and control sequences before pane text reaches logs. */
|
|
271
|
-
export declare function sanitizePaneTail(pane: string, lineCount?: number): string[];
|
|
281
|
+
export declare function sanitizePaneTail(pane: string, lineCount?: number, excludeLine?: (line: string) => boolean): string[];
|
|
272
282
|
/**
|
|
273
283
|
* Distill a pane capture into text worth relaying as a proxy reply.
|
|
274
284
|
*
|
|
@@ -276,13 +286,16 @@ export declare function sanitizePaneTail(pane: string, lineCount?: number): stri
|
|
|
276
286
|
* final answer exists only on screen. Everything up to and including the last
|
|
277
287
|
* line of the inbound message we pasted is cut (the reply starts after it),
|
|
278
288
|
* lines with no letters or digits are dropped (borders, separators, spinners,
|
|
279
|
-
* bare prompts), and
|
|
280
|
-
* when
|
|
281
|
-
*
|
|
289
|
+
* bare prompts), and UI chrome is dropped by a backend-specific per-line
|
|
290
|
+
* filter when available (or a legacy single-line ready pattern). Whole-pane
|
|
291
|
+
* readiness regexes cannot identify individual prompt/footer lines. Returns
|
|
292
|
+
* null when what remains is trivial — a proxy message must carry an answer,
|
|
293
|
+
* not chrome. Secrets are redacted by sanitizePaneTail, same as stuck diagnostics.
|
|
282
294
|
*/
|
|
283
295
|
export declare function extractProxyReplyText(pane: string, opts?: {
|
|
284
296
|
inboundMarker?: string;
|
|
285
297
|
readyPattern?: RegExp | null;
|
|
298
|
+
isChromeLine?: (line: string) => boolean;
|
|
286
299
|
maxLines?: number;
|
|
287
300
|
maxChars?: number;
|
|
288
301
|
}): string | null;
|
|
@@ -494,6 +507,11 @@ export declare class Daemon extends EventEmitter {
|
|
|
494
507
|
private fatalStartupBlocked;
|
|
495
508
|
/** model_error seen mid-turn: notify only if it survives to the idle screen. */
|
|
496
509
|
private pendingModelErrorKey;
|
|
510
|
+
/** Optional per-instance localhost relay used to observe Muse usage events. */
|
|
511
|
+
private museUsageRelay;
|
|
512
|
+
/** Set after an in-run relay failure so subsequent Muse respawns go direct. */
|
|
513
|
+
private museRelayFallback;
|
|
514
|
+
private museRelayFallbackInFlight;
|
|
497
515
|
/**
|
|
498
516
|
* Let the next pause() proceed from a stuck pane. Set only for the auth-deferred
|
|
499
517
|
* pause — see the pausePending consumption site for why waiting for idle there
|
|
@@ -602,6 +620,14 @@ export declare class Daemon extends EventEmitter {
|
|
|
602
620
|
getProcessStatus(): "running" | "crashed" | "stopped";
|
|
603
621
|
get lastPausedAt(): number | null;
|
|
604
622
|
private getPauseWakeState;
|
|
623
|
+
/**
|
|
624
|
+
* Codex can show an exhausted-account notice while the user is switching to
|
|
625
|
+
* a reserve account. Once the live composer and Context footer are back, the
|
|
626
|
+
* notice is scrollback, not a reason to pause and send /quit.
|
|
627
|
+
*/
|
|
628
|
+
private isCodexLivePaneSnapshot;
|
|
629
|
+
/** Re-check the current pane after an async quota probe before pausing it. */
|
|
630
|
+
isCodexLivePane(): Promise<boolean>;
|
|
605
631
|
/** Whether this instance is in a crash loop (3+ consecutive crashes). */
|
|
606
632
|
get isCrashLoop(): boolean;
|
|
607
633
|
/** The most recent error type detected by the error monitor (e.g. "rate_limit", "auth_error"). */
|
|
@@ -803,8 +829,33 @@ export declare class Daemon extends EventEmitter {
|
|
|
803
829
|
* `y` as a brand-new user message.
|
|
804
830
|
*/
|
|
805
831
|
private confirmBackendClearDialog;
|
|
832
|
+
/**
|
|
833
|
+
* The last time AgEnD itself asked the CLI to go away, and why (#927). Read
|
|
834
|
+
* when a pane dies, to tell "AgEnD stopped it" from "the CLI exited on its
|
|
835
|
+
* own" — a codex that exits 0 on its own and one AgEnD sent /quit look the
|
|
836
|
+
* same from the pane.
|
|
837
|
+
*/
|
|
838
|
+
private lastStopRequest;
|
|
839
|
+
/** Record, and log, that AgEnD is about to stop the CLI. */
|
|
840
|
+
private noteStopRequest;
|
|
841
|
+
/** Capture the pane's recent output with escape codes stripped. Never throws. */
|
|
842
|
+
private capturePaneOutput;
|
|
843
|
+
/**
|
|
844
|
+
* One record per pane death: exit status, when, who, and what the CLI printed
|
|
845
|
+
* last — the line that was missing when a codex on Luna Reserve died with
|
|
846
|
+
* status 0 and daemon.log said only "exited normally" (#927). Logging only;
|
|
847
|
+
* the caller decides what happens next.
|
|
848
|
+
*/
|
|
849
|
+
private logPaneDeath;
|
|
806
850
|
/** Send the backend-specific graceful quit command/key sequence. */
|
|
807
851
|
private sendQuitSequence;
|
|
852
|
+
/**
|
|
853
|
+
* Kiro drops `/quit` while a turn is running. Stop that turn first, then use
|
|
854
|
+
* the same delivery readiness gate that protects Enter from the busy pane.
|
|
855
|
+
* Returning false is fail-closed: the caller skips `/quit` and enters the
|
|
856
|
+
* bounded SIGTERM -> SIGKILL fallback instead of typing into an unknown pane.
|
|
857
|
+
*/
|
|
858
|
+
private drainBusyKiroForStop;
|
|
808
859
|
stop(): Promise<void>;
|
|
809
860
|
getHangDetector(): HangDetector | null;
|
|
810
861
|
getInstanceState(): InstanceState | "paused";
|
|
@@ -1081,6 +1132,9 @@ export declare class Daemon extends EventEmitter {
|
|
|
1081
1132
|
* Other backends keep the silence-based gate byte-for-byte.
|
|
1082
1133
|
*/
|
|
1083
1134
|
private isPaneReadyForDelivery;
|
|
1135
|
+
private needsStartupInputProof;
|
|
1136
|
+
/** Codex can paint a prompt before the TTY enters raw mode. Both are required. */
|
|
1137
|
+
private hasPositiveDeliveryInput;
|
|
1084
1138
|
/**
|
|
1085
1139
|
* Why a pane is not deliverable matters. "busy" may be handed to a native
|
|
1086
1140
|
* input queue or steered (after its own dialog probe); "dialog", "transient"
|
|
@@ -1132,6 +1186,10 @@ export declare class Daemon extends EventEmitter {
|
|
|
1132
1186
|
* (dropped) Enter — and an unreadable pane is not a verified absence either.
|
|
1133
1187
|
*/
|
|
1134
1188
|
private confirmSubmittedAfterEnter;
|
|
1189
|
+
/** Once Kiro returns to its prompt, its unique envelope id in history proves submission. */
|
|
1190
|
+
private kiroSubmissionEvidence;
|
|
1191
|
+
/** Observe the Kiro paste outside paneWriteLock; a long agent turn must not block dialog handling. */
|
|
1192
|
+
private observeKiroSubmission;
|
|
1135
1193
|
/**
|
|
1136
1194
|
* While the CLI is parked on a fatal startup screen (see fatalStartupBlocked),
|
|
1137
1195
|
* no pane write may happen: paste+Enter into the corrupt-config modal would
|
|
@@ -1208,6 +1266,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
1208
1266
|
*/
|
|
1209
1267
|
private confirmAfterEnter;
|
|
1210
1268
|
private confirmSubmitted;
|
|
1269
|
+
/** Only positive echo/queue evidence may turn an ambiguous Codex write into ✅. */
|
|
1270
|
+
private lateCodexSubmissionProof;
|
|
1211
1271
|
/**
|
|
1212
1272
|
* What the pane currently shows of a given message. Taken once before the
|
|
1213
1273
|
* paste and once after, so confirmSubmitted can require a NEW marker or a NEW
|
|
@@ -1293,6 +1353,12 @@ export declare class Daemon extends EventEmitter {
|
|
|
1293
1353
|
* Bounded, and called BEFORE the pane lock is taken — waiting on the spawn while
|
|
1294
1354
|
* holding the lock the spawn itself needs would deadlock.
|
|
1295
1355
|
*/
|
|
1356
|
+
/**
|
|
1357
|
+
* Wait for an in-flight spawn to finish, up to the cap. Returns true when no
|
|
1358
|
+
* spawn is in flight afterwards; false when the cap expired with one still
|
|
1359
|
+
* running. A false return is NOT settled evidence — the caller must not
|
|
1360
|
+
* treat the current generation as a completed spawn.
|
|
1361
|
+
*/
|
|
1296
1362
|
private waitForSpawnToSettle;
|
|
1297
1363
|
/** Spawn a CLI window. Returns true if --resume was used successfully. */
|
|
1298
1364
|
/**
|
|
@@ -1374,6 +1440,28 @@ export declare class Daemon extends EventEmitter {
|
|
|
1374
1440
|
* Returns true if CLI is ready, false if it failed or got stuck.
|
|
1375
1441
|
*/
|
|
1376
1442
|
private trySpawn;
|
|
1443
|
+
/**
|
|
1444
|
+
* One fresh pane capture judged as ready && !busy && !dialog. Transcript
|
|
1445
|
+
* silence is deliberately NOT the gate: its monitor is inert for muse, so a
|
|
1446
|
+
* quiet-but-working pane would read as idle and the respawn below would kill
|
|
1447
|
+
* a live turn. Fail closed: an unreadable pane is never idle.
|
|
1448
|
+
*/
|
|
1449
|
+
private isPaneAuthoritativelyIdle;
|
|
1450
|
+
/**
|
|
1451
|
+
* Poll the authoritative pane check until it reports idle or the budget runs
|
|
1452
|
+
* out. Each poll is a fresh capture, so a turn that ends mid-wait is seen.
|
|
1453
|
+
*/
|
|
1454
|
+
private waitForAuthoritativePaneIdle;
|
|
1455
|
+
/**
|
|
1456
|
+
* A relay crash must not make the daemon kill a live Muse process. The
|
|
1457
|
+
* supervisor normally reclaims the same port; when that bounded recovery
|
|
1458
|
+
* fails, move Muse back to a direct connection once it is authoritatively
|
|
1459
|
+
* idle (session preserved via the existing resume path) and mark usage
|
|
1460
|
+
* unavailable. The fallback flag also covers every later natural spawn.
|
|
1461
|
+
* Never throws: the floor is the old behavior (flag set, relay stopped,
|
|
1462
|
+
* next restart direct).
|
|
1463
|
+
*/
|
|
1464
|
+
private switchMuseToDirect;
|
|
1377
1465
|
/**
|
|
1378
1466
|
* Tell the agent its instructions moved, once the CLI is idle.
|
|
1379
1467
|
*
|