@songsid/agend 2.1.11 → 2.1.12-beta.2
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 +23 -15
- package/README.zh-TW.md +50 -11
- package/dist/agent-cli.js +36 -4
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +3 -1
- package/dist/agent-endpoint.js +7 -1
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/backend/claude-code.d.ts +4 -0
- package/dist/backend/claude-code.js +65 -2
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/session-signals.d.ts +154 -0
- package/dist/backend/session-signals.js +430 -0
- package/dist/backend/session-signals.js.map +1 -0
- package/dist/backend/types.d.ts +25 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +38 -1
- package/dist/channel/adapters/discord.js +131 -8
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +19 -1
- package/dist/channel/adapters/telegram.js +55 -0
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +5 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/message-queue.d.ts +6 -0
- package/dist/channel/message-queue.js +21 -0
- package/dist/channel/message-queue.js.map +1 -1
- package/dist/channel/sticker-download.d.ts +14 -0
- package/dist/channel/sticker-download.js +42 -0
- package/dist/channel/sticker-download.js.map +1 -0
- package/dist/channel/tool-router.js +12 -5
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +52 -0
- package/dist/classic-bindings.d.ts +48 -0
- package/dist/classic-bindings.js +128 -0
- package/dist/classic-bindings.js.map +1 -0
- package/dist/classic-channel-manager.d.ts +21 -0
- package/dist/classic-channel-manager.js +31 -0
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli-flags.d.ts +8 -0
- package/dist/cli-flags.js +22 -0
- package/dist/cli-flags.js.map +1 -0
- package/dist/config-validator.js +25 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.d.ts +61 -0
- package/dist/daemon.js +454 -19
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +8 -0
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +13 -0
- package/dist/delivery-reconciliation.js +71 -7
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/delivery-reconciliation.test.js +115 -2
- package/dist/delivery-reconciliation.test.js.map +1 -1
- package/dist/event-loop-watch.d.ts +25 -0
- package/dist/event-loop-watch.js +40 -0
- package/dist/event-loop-watch.js.map +1 -0
- package/dist/fleet-manager.d.ts +52 -4
- package/dist/fleet-manager.js +323 -20
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +4 -2
- package/dist/instance-lifecycle.js +4 -2
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/interaction-observation.d.ts +32 -0
- package/dist/interaction-observation.js +118 -0
- package/dist/interaction-observation.js.map +1 -0
- package/dist/kiro-engine-status.d.ts +2 -0
- package/dist/kiro-engine-status.js +3 -1
- package/dist/kiro-engine-status.js.map +1 -1
- package/dist/locale.js +26 -0
- package/dist/locale.js.map +1 -1
- package/dist/outbound-handlers.d.ts +2 -0
- package/dist/outbound-handlers.js +28 -11
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +15 -1
- package/dist/outbound-schemas.js +20 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/output-log-tail.d.ts +21 -0
- package/dist/output-log-tail.js +89 -0
- package/dist/output-log-tail.js.map +1 -0
- package/dist/tool-permissions.js +8 -1
- package/dist/tool-permissions.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +7 -0
- package/dist/turn-reply-guard.js +11 -0
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/turn-resume.d.ts +80 -0
- package/dist/turn-resume.js +217 -0
- package/dist/turn-resume.js.map +1 -0
- package/dist/ui/view.html +8 -2
- package/dist/usage/format-rich.js +6 -1
- package/dist/usage/format-rich.js.map +1 -1
- package/dist/usage/i18n.d.ts +2 -0
- package/dist/usage/i18n.js +14 -1
- package/dist/usage/i18n.js.map +1 -1
- package/dist/usage/providers.d.ts +21 -0
- package/dist/usage/providers.js +36 -7
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +9 -0
- package/dist/usage/usage-api.js +31 -2
- package/dist/usage/usage-api.js.map +1 -1
- package/package.json +1 -1
package/dist/daemon.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { SpawnGate } from "./spawn-gate.js";
|
|
|
11
11
|
import type { StormWindow } from "./storm-window.js";
|
|
12
12
|
import type { BackendOutageView } from "./backend-outage.js";
|
|
13
13
|
import { type DaemonDeliveryPort } from "./delivery-outbox.js";
|
|
14
|
+
import type { InteractionSnapshot } from "./backend/types.js";
|
|
14
15
|
/** Point a resumed CLI at its one backend-native instruction source. */
|
|
15
16
|
export declare function buildInstructionReloadNotice(binaryName: string, instanceName: string, instanceDir: string): string;
|
|
16
17
|
/**
|
|
@@ -354,6 +355,8 @@ export declare class InteractivePromptDetector {
|
|
|
354
355
|
private lastOutputAt;
|
|
355
356
|
private notifiedSignature;
|
|
356
357
|
constructor(stableMs?: number);
|
|
358
|
+
/** Recognition is persistent; observe() separately deduplicates notifications. */
|
|
359
|
+
match(pane: string): InteractivePromptDetection | null;
|
|
357
360
|
observe(pane: string, now?: number, outputAt?: number): InteractivePromptDetection | null;
|
|
358
361
|
reset(): void;
|
|
359
362
|
}
|
|
@@ -470,11 +473,18 @@ export declare class Daemon extends EventEmitter {
|
|
|
470
473
|
*/
|
|
471
474
|
private launchAttempt;
|
|
472
475
|
private skipResume;
|
|
476
|
+
/**
|
|
477
|
+
* #1209: whether THIS boot was asked to skip resume by a crash-loop
|
|
478
|
+
* (crash-state.json). Captured at boot before spawnClaudeWindow resets
|
|
479
|
+
* skipResume — the #1209 gate reads this, never the resettable flag.
|
|
480
|
+
*/
|
|
481
|
+
private bootSkippedResume;
|
|
473
482
|
private startupAborted;
|
|
474
483
|
/** First time the current on-screen blocking dialog was seen (0 = none); drives the parked report. */
|
|
475
484
|
private dialogParkedSince;
|
|
476
485
|
/** Identity of that dialog: its pattern, not its description (two tables may describe one screen differently). */
|
|
477
486
|
private dialogParkedKey;
|
|
487
|
+
private dialogParkedInteractionEpisode;
|
|
478
488
|
private dialogParkedReported;
|
|
479
489
|
/**
|
|
480
490
|
* The runtime dialog the monitor is answering, and how many of its answers in a row did nothing (the dialog was
|
|
@@ -500,6 +510,13 @@ export declare class Daemon extends EventEmitter {
|
|
|
500
510
|
private capacityNudge;
|
|
501
511
|
/** Current stdin-owning runtime dialog, independent from execution state. */
|
|
502
512
|
private inputBlockedDialogKey;
|
|
513
|
+
private readonly interactionObservation;
|
|
514
|
+
private interactionConfirmationTimer;
|
|
515
|
+
private interactionOutputRevision;
|
|
516
|
+
private interactionObservedOutputRevision;
|
|
517
|
+
private interactionCaptureSerial;
|
|
518
|
+
private interactionDialogKey;
|
|
519
|
+
private acceptedInstanceSnapshot;
|
|
503
520
|
/** Generation/signature fence for safety dialogs while their screen is still visible. */
|
|
504
521
|
private autoResolvedDialogKey;
|
|
505
522
|
private autoResolvedDialogGeneration;
|
|
@@ -821,6 +838,21 @@ export declare class Daemon extends EventEmitter {
|
|
|
821
838
|
private retryDurableDeliveryBeforeBegin;
|
|
822
839
|
private finishDurableDelivery;
|
|
823
840
|
private finishDurableSubmission;
|
|
841
|
+
/**
|
|
842
|
+
* Finish a delivery that only the output edge vouched for, by the delivery's own marker in the CLI's transcript (#758).
|
|
843
|
+
*
|
|
844
|
+
* - marker found → delivered (`transcript-marker`; `transcript-marker-queued` when the CLI has it queued, not yet read);
|
|
845
|
+
* - delta read, no marker for the whole window → uncertain (`unverifiable-no-transcript-marker`) — the pane printed
|
|
846
|
+
* something, yet the CLI never took the message in. Never a re-paste: the message may still land;
|
|
847
|
+
* - transcript unreadable on the last look → today's outcome, labelled — there is nothing to hold against it.
|
|
848
|
+
*
|
|
849
|
+
* It runs after the paste lock is released, but the fleet lane and the shared pump budget stay held until the
|
|
850
|
+
* verdict settles the row (Phase 2c "lane held until verdict", Option A #1207): a success settles in about a
|
|
851
|
+
* second, a delivery whose marker never arrives holds them for the bounded proof window (see
|
|
852
|
+
* TRANSCRIPT_PROOF_WINDOW_MS). It never finishes a row that stop has handed to reconciliation; a pause or respawn
|
|
853
|
+
* only ends the wait, falling back to today's outcome.
|
|
854
|
+
*/
|
|
855
|
+
private proveDeliveryFromTranscript;
|
|
824
856
|
private deferDurableDelivery;
|
|
825
857
|
/** Restart the idle clock for work that reached the CLI, and persist it like a user inbound. */
|
|
826
858
|
private noteWorkActivity;
|
|
@@ -842,6 +874,13 @@ export declare class Daemon extends EventEmitter {
|
|
|
842
874
|
/** Lifecycle-provided: whether the fleet holds a work lease on this instance. */
|
|
843
875
|
setWorkLeaseCheck(check: (() => boolean) | undefined): void;
|
|
844
876
|
private workLeaseActive;
|
|
877
|
+
/**
|
|
878
|
+
* #1206: rotate + attach the pipe-pane log feed. An attach failure warns
|
|
879
|
+
* (like the wake path) instead of vanishing silently and leaving the
|
|
880
|
+
* instance with no log feed. Extracted so the failure path is unit-testable
|
|
881
|
+
* without driving the real lifecycle.
|
|
882
|
+
*/
|
|
883
|
+
private attachPipePaneLog;
|
|
845
884
|
start(): Promise<void>;
|
|
846
885
|
/**
|
|
847
886
|
* Detect a CRASHED MCP server and report it once.
|
|
@@ -1087,6 +1126,14 @@ export declare class Daemon extends EventEmitter {
|
|
|
1087
1126
|
getHangDetector(): HangDetector | null;
|
|
1088
1127
|
getInstanceState(): InstanceState | "paused";
|
|
1089
1128
|
getInstanceStateSnapshot(): InstanceStateSnapshot;
|
|
1129
|
+
private interactionOwner;
|
|
1130
|
+
/** Cached, pure observation read; it never captures, constructs a backend or writes stdin. */
|
|
1131
|
+
getInteractionSnapshot(): InteractionSnapshot;
|
|
1132
|
+
private publishInteraction;
|
|
1133
|
+
private clearInteractionConfirmation;
|
|
1134
|
+
private unverifyInteraction;
|
|
1135
|
+
private interactionEvidence;
|
|
1136
|
+
private observeInteractionPane;
|
|
1090
1137
|
/**
|
|
1091
1138
|
* Answer a FleetManager state query. Most callers only need the cached state,
|
|
1092
1139
|
* but lifecycle decisions such as post-reply Cancel retirement need an
|
|
@@ -1129,6 +1176,20 @@ export declare class Daemon extends EventEmitter {
|
|
|
1129
1176
|
* the PREVIOUS turn's idle edge consume (and reset) the new turn's state.
|
|
1130
1177
|
*/
|
|
1131
1178
|
private markTurnStarted;
|
|
1179
|
+
/** #1209: which seam reader serves this instance (live config preferred). */
|
|
1180
|
+
private resolveResumeBackend;
|
|
1181
|
+
/** #1209: whether the marker's delivery is still owned by the durable path. */
|
|
1182
|
+
private isMarkerDeliveryPending;
|
|
1183
|
+
/**
|
|
1184
|
+
* #1209 ACP-resume-like gate: one bounded continuation for the turn that
|
|
1185
|
+
* was in flight when the process died. The one-shot marker is consumed
|
|
1186
|
+
* FIRST (episode-once: at most one continuation per interrupted turn, even
|
|
1187
|
+
* if the inject below throws or the process dies holding the grace wait),
|
|
1188
|
+
* then the pure gate in turn-resume.ts decides. A hold inside the flush
|
|
1189
|
+
* grace sleeps once and re-gates with a fresh read; a second hold denies
|
|
1190
|
+
* rather than waiting forever. Returns a short outcome for logs/tests.
|
|
1191
|
+
*/
|
|
1192
|
+
private maybeResumeInterruptedTurn;
|
|
1132
1193
|
/**
|
|
1133
1194
|
* Turn ended (busy→idle edge): if the MCP server is dead and none of the
|
|
1134
1195
|
* channel tools verifiably delivered anything this turn, the agent's answer is
|