@songsid/agend 2.1.6-beta.11 → 2.1.6-beta.13
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/README.md +22 -0
- package/dist/backend/codex-session.d.ts +45 -0
- package/dist/backend/codex-session.js +202 -0
- package/dist/backend/codex-session.js.map +1 -0
- package/dist/backend/codex.d.ts +48 -12
- package/dist/backend/codex.js +700 -65
- 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 +9 -4
- package/dist/backend/muse.js +89 -34
- 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/cli.js +23 -1
- package/dist/cli.js.map +1 -1
- package/dist/daemon.d.ts +41 -7
- package/dist/daemon.js +546 -91
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-manager.d.ts +11 -1
- package/dist/fleet-manager.js +57 -3
- package/dist/fleet-manager.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +7 -0
- package/dist/instance-lifecycle.js +126 -2
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +6 -0
- package/dist/locale.js.map +1 -1
- package/dist/muse-usage-relay.js +14 -2
- package/dist/muse-usage-relay.js.map +1 -1
- 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/usage/providers.js +10 -2
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +0 -12
- package/dist/usage/usage-api.js +24 -3
- package/dist/usage/usage-api.js.map +1 -1
- package/package.json +2 -1
package/dist/daemon.d.ts
CHANGED
|
@@ -268,7 +268,7 @@ export interface PasteSettleResult {
|
|
|
268
268
|
*/
|
|
269
269
|
export declare function waitForPasteSettle(client: PasteSettleObservation, windowId: string, pasteStartedAt: number, fallbackMs: number): Promise<PasteSettleResult>;
|
|
270
270
|
/** Redact likely credentials and control sequences before pane text reaches logs. */
|
|
271
|
-
export declare function sanitizePaneTail(pane: string, lineCount?: number): string[];
|
|
271
|
+
export declare function sanitizePaneTail(pane: string, lineCount?: number, excludeLine?: (line: string) => boolean): string[];
|
|
272
272
|
/**
|
|
273
273
|
* Distill a pane capture into text worth relaying as a proxy reply.
|
|
274
274
|
*
|
|
@@ -276,13 +276,16 @@ export declare function sanitizePaneTail(pane: string, lineCount?: number): stri
|
|
|
276
276
|
* final answer exists only on screen. Everything up to and including the last
|
|
277
277
|
* line of the inbound message we pasted is cut (the reply starts after it),
|
|
278
278
|
* lines with no letters or digits are dropped (borders, separators, spinners,
|
|
279
|
-
* bare prompts), and
|
|
280
|
-
* when
|
|
281
|
-
*
|
|
279
|
+
* bare prompts), and UI chrome is dropped by a backend-specific per-line
|
|
280
|
+
* filter when available (or a legacy single-line ready pattern). Whole-pane
|
|
281
|
+
* readiness regexes cannot identify individual prompt/footer lines. Returns
|
|
282
|
+
* null when what remains is trivial — a proxy message must carry an answer,
|
|
283
|
+
* not chrome. Secrets are redacted by sanitizePaneTail, same as stuck diagnostics.
|
|
282
284
|
*/
|
|
283
285
|
export declare function extractProxyReplyText(pane: string, opts?: {
|
|
284
286
|
inboundMarker?: string;
|
|
285
287
|
readyPattern?: RegExp | null;
|
|
288
|
+
isChromeLine?: (line: string) => boolean;
|
|
286
289
|
maxLines?: number;
|
|
287
290
|
maxChars?: number;
|
|
288
291
|
}): string | null;
|
|
@@ -456,6 +459,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
456
459
|
private instanceStateBusyPattern;
|
|
457
460
|
private instanceStateMonitorActive;
|
|
458
461
|
private sessionCheckpointWarningEmitted;
|
|
462
|
+
private codexSessionIdentityHoldNotified;
|
|
463
|
+
private recoveredLegacyCodexSessionId;
|
|
459
464
|
private statePollInFlight;
|
|
460
465
|
private turnReplyGuard;
|
|
461
466
|
/** Prevent a visible stale XML fragment from being recovered on later turns. */
|
|
@@ -1086,6 +1091,9 @@ export declare class Daemon extends EventEmitter {
|
|
|
1086
1091
|
* Other backends keep the silence-based gate byte-for-byte.
|
|
1087
1092
|
*/
|
|
1088
1093
|
private isPaneReadyForDelivery;
|
|
1094
|
+
private needsStartupInputProof;
|
|
1095
|
+
/** Codex can paint a prompt before the TTY enters raw mode. Both are required. */
|
|
1096
|
+
private hasPositiveDeliveryInput;
|
|
1089
1097
|
/**
|
|
1090
1098
|
* Why a pane is not deliverable matters. "busy" may be handed to a native
|
|
1091
1099
|
* input queue or steered (after its own dialog probe); "dialog", "transient"
|
|
@@ -1213,6 +1221,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
1213
1221
|
*/
|
|
1214
1222
|
private confirmAfterEnter;
|
|
1215
1223
|
private confirmSubmitted;
|
|
1224
|
+
/** Only positive echo/queue evidence may turn an ambiguous Codex write into ✅. */
|
|
1225
|
+
private lateCodexSubmissionProof;
|
|
1216
1226
|
/**
|
|
1217
1227
|
* What the pane currently shows of a given message. Taken once before the
|
|
1218
1228
|
* paste and once after, so confirmSubmitted can require a NEW marker or a NEW
|
|
@@ -1298,6 +1308,12 @@ export declare class Daemon extends EventEmitter {
|
|
|
1298
1308
|
* Bounded, and called BEFORE the pane lock is taken — waiting on the spawn while
|
|
1299
1309
|
* holding the lock the spawn itself needs would deadlock.
|
|
1300
1310
|
*/
|
|
1311
|
+
/**
|
|
1312
|
+
* Wait for an in-flight spawn to finish, up to the cap. Returns true when no
|
|
1313
|
+
* spawn is in flight afterwards; false when the cap expired with one still
|
|
1314
|
+
* running. A false return is NOT settled evidence — the caller must not
|
|
1315
|
+
* treat the current generation as a completed spawn.
|
|
1316
|
+
*/
|
|
1301
1317
|
private waitForSpawnToSettle;
|
|
1302
1318
|
/** Spawn a CLI window. Returns true if --resume was used successfully. */
|
|
1303
1319
|
/**
|
|
@@ -1379,12 +1395,26 @@ export declare class Daemon extends EventEmitter {
|
|
|
1379
1395
|
* Returns true if CLI is ready, false if it failed or got stuck.
|
|
1380
1396
|
*/
|
|
1381
1397
|
private trySpawn;
|
|
1398
|
+
/**
|
|
1399
|
+
* One fresh pane capture judged as ready && !busy && !dialog. Transcript
|
|
1400
|
+
* silence is deliberately NOT the gate: its monitor is inert for muse, so a
|
|
1401
|
+
* quiet-but-working pane would read as idle and the respawn below would kill
|
|
1402
|
+
* a live turn. Fail closed: an unreadable pane is never idle.
|
|
1403
|
+
*/
|
|
1404
|
+
private isPaneAuthoritativelyIdle;
|
|
1405
|
+
/**
|
|
1406
|
+
* Poll the authoritative pane check until it reports idle or the budget runs
|
|
1407
|
+
* out. Each poll is a fresh capture, so a turn that ends mid-wait is seen.
|
|
1408
|
+
*/
|
|
1409
|
+
private waitForAuthoritativePaneIdle;
|
|
1382
1410
|
/**
|
|
1383
1411
|
* A relay crash must not make the daemon kill a live Muse process. The
|
|
1384
1412
|
* supervisor normally reclaims the same port; when that bounded recovery
|
|
1385
|
-
* fails,
|
|
1386
|
-
*
|
|
1387
|
-
*
|
|
1413
|
+
* fails, move Muse back to a direct connection once it is authoritatively
|
|
1414
|
+
* idle (session preserved via the existing resume path) and mark usage
|
|
1415
|
+
* unavailable. The fallback flag also covers every later natural spawn.
|
|
1416
|
+
* Never throws: the floor is the old behavior (flag set, relay stopped,
|
|
1417
|
+
* next restart direct).
|
|
1388
1418
|
*/
|
|
1389
1419
|
private switchMuseToDirect;
|
|
1390
1420
|
/**
|
|
@@ -1434,7 +1464,11 @@ export declare class Daemon extends EventEmitter {
|
|
|
1434
1464
|
* last-chat.json so the reply target survives a restart (see start()).
|
|
1435
1465
|
*/
|
|
1436
1466
|
private updateLastChat;
|
|
1467
|
+
/** The returned ID was durably checkpointed or already matched on disk. */
|
|
1437
1468
|
private saveSessionId;
|
|
1469
|
+
private checkpointLivePaneBeforeReplacement;
|
|
1470
|
+
/** Only a live pre-upgrade pane can provide this positive migration proof. */
|
|
1471
|
+
getRecoveredLegacyCodexSessionId(): string | null;
|
|
1438
1472
|
private readContextPercentage;
|
|
1439
1473
|
/** Set a model override for next spawn (used by failover logic) */
|
|
1440
1474
|
setModelOverride(model: string | undefined): void;
|