@songsid/agend 2.2.0-beta.2 → 2.2.0-beta.20
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 +40 -24
- package/README.zh-TW.md +40 -24
- package/dist/agent-cli-instructions.md +6 -2
- package/dist/agent-cli.js +15 -7
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +3 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-whats-new.js +16 -4
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +3 -1
- package/dist/auth-api.js +17 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/antigravity.d.ts +33 -0
- package/dist/backend/antigravity.js +126 -18
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-carry.d.ts +22 -0
- package/dist/backend/claude-carry.js +170 -0
- package/dist/backend/claude-carry.js.map +1 -0
- package/dist/backend/claude-code.d.ts +65 -2
- package/dist/backend/claude-code.js +226 -33
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-metadata.d.ts +33 -0
- package/dist/backend/codex-metadata.js +122 -18
- package/dist/backend/codex-metadata.js.map +1 -1
- package/dist/backend/codex.d.ts +3 -0
- package/dist/backend/codex.js +17 -1
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +40 -3
- package/dist/backend/credential-profile.js +113 -5
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/effort-metadata.d.ts +37 -1
- package/dist/backend/effort-metadata.js +86 -15
- package/dist/backend/effort-metadata.js.map +1 -1
- package/dist/backend/grok.d.ts +4 -0
- package/dist/backend/grok.js +14 -0
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +27 -1
- package/dist/backend/kiro.js +63 -10
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/launch-effort.d.ts +61 -0
- package/dist/backend/launch-effort.js +170 -0
- package/dist/backend/launch-effort.js.map +1 -0
- package/dist/backend/muse.d.ts +84 -0
- package/dist/backend/muse.js +449 -53
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +48 -2
- package/dist/backend/types.js +12 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-command.d.ts +91 -0
- package/dist/backend-command.js +122 -0
- package/dist/backend-command.js.map +1 -0
- package/dist/background-work-ended.d.ts +18 -0
- package/dist/background-work-ended.js +30 -0
- package/dist/background-work-ended.js.map +1 -0
- package/dist/cache-service.d.ts +2 -0
- package/dist/cache-service.js +2 -1
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +26 -1
- package/dist/channel/adapters/discord.js +103 -3
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +35 -3
- package/dist/channel/adapters/telegram.js +122 -23
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +5 -3
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/message-edit-errors.d.ts +5 -0
- package/dist/channel/message-edit-errors.js +24 -0
- package/dist/channel/message-edit-errors.js.map +1 -0
- package/dist/channel/telegram-markdown.d.ts +6 -0
- package/dist/channel/telegram-markdown.js +104 -0
- package/dist/channel/telegram-markdown.js.map +1 -0
- package/dist/channel/tool-router.d.ts +2 -0
- package/dist/channel/tool-router.js +6 -5
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +46 -4
- package/dist/cli.js +184 -34
- package/dist/cli.js.map +1 -1
- package/dist/command-table.d.ts +2 -2
- package/dist/command-table.js +5 -2
- package/dist/command-table.js.map +1 -1
- package/dist/compact-watch.d.ts +86 -0
- package/dist/compact-watch.js +288 -0
- package/dist/compact-watch.js.map +1 -0
- package/dist/config-validator.js +55 -5
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/cross-instance-envelope.js +2 -0
- package/dist/cross-instance-envelope.js.map +1 -1
- package/dist/daemon.d.ts +129 -1
- package/dist/daemon.js +754 -94
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +64 -8
- package/dist/delivery-outbox.js +315 -24
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +18 -1
- package/dist/delivery-reconciliation.js +67 -2
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/doctor.js +7 -0
- package/dist/doctor.js.map +1 -1
- package/dist/fleet-context.d.ts +12 -1
- package/dist/fleet-manager.d.ts +392 -19
- package/dist/fleet-manager.js +2030 -275
- package/dist/fleet-manager.js.map +1 -1
- package/dist/forged-envelope-scan.d.ts +4 -3
- package/dist/forged-envelope-scan.js +4 -3
- package/dist/forged-envelope-scan.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +84 -16
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +16 -1
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -1
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +4 -0
- package/dist/host-memory.d.ts +10 -0
- package/dist/host-memory.js +33 -1
- package/dist/host-memory.js.map +1 -1
- package/dist/human-delivery-receipts.d.ts +83 -0
- package/dist/human-delivery-receipts.js +194 -0
- package/dist/human-delivery-receipts.js.map +1 -0
- package/dist/install-lock.d.ts +18 -1
- package/dist/install-lock.js +30 -3
- package/dist/install-lock.js.map +1 -1
- package/dist/instance-avatar.d.ts +5 -4
- package/dist/instance-avatar.js +12 -8
- package/dist/instance-avatar.js.map +1 -1
- package/dist/instance-config-impact.js +1 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +25 -6
- package/dist/instance-lifecycle.js +76 -27
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +3 -3
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-compact-pane.d.ts +38 -0
- package/dist/kiro-compact-pane.js +57 -0
- package/dist/kiro-compact-pane.js.map +1 -0
- package/dist/kiro-log-gate.d.ts +42 -0
- package/dist/kiro-log-gate.js +39 -0
- package/dist/kiro-log-gate.js.map +1 -0
- package/dist/launchd-handoff.d.ts +43 -0
- package/dist/launchd-handoff.js +56 -0
- package/dist/launchd-handoff.js.map +1 -0
- package/dist/locale.js +268 -42
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +99 -0
- package/dist/log-service.js +243 -0
- package/dist/log-service.js.map +1 -0
- package/dist/log-steps.d.ts +169 -0
- package/dist/log-steps.js +858 -0
- package/dist/log-steps.js.map +1 -0
- package/dist/login-controller.d.ts +20 -3
- package/dist/login-controller.js +71 -19
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.d.ts +5 -2
- package/dist/login-flows.js +5 -4
- package/dist/login-flows.js.map +1 -1
- package/dist/login-shell.d.ts +21 -0
- package/dist/login-shell.js +98 -0
- package/dist/login-shell.js.map +1 -0
- package/dist/memory-pressure.d.ts +13 -1
- package/dist/memory-pressure.js +50 -10
- package/dist/memory-pressure.js.map +1 -1
- package/dist/needs-you-hub.js +2 -0
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you-live.d.ts +6 -0
- package/dist/needs-you-live.js +23 -3
- package/dist/needs-you-live.js.map +1 -1
- package/dist/outbound-handlers.d.ts +100 -0
- package/dist/outbound-handlers.js +277 -93
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +30 -15
- package/dist/outbound-schemas.js +23 -5
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/provider-probe.d.ts +29 -0
- package/dist/provider-probe.js +198 -2
- package/dist/provider-probe.js.map +1 -1
- package/dist/public-link-progress.d.ts +1 -1
- package/dist/public-link-progress.js +8 -2
- package/dist/public-link-progress.js.map +1 -1
- package/dist/public-preview.d.ts +101 -0
- package/dist/public-preview.js +236 -0
- package/dist/public-preview.js.map +1 -0
- package/dist/public-web-gateway.d.ts +2 -0
- package/dist/public-web-gateway.js +20 -6
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +24 -1
- package/dist/public-web-link.js +63 -9
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.d.ts +1 -1
- package/dist/quickstart-api.js +8 -6
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +12 -0
- package/dist/quickstart.js +36 -6
- package/dist/quickstart.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +89 -5
- package/dist/reply-buttons-controller.js +273 -8
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-buttons.d.ts +48 -3
- package/dist/reply-buttons.js +105 -10
- package/dist/reply-buttons.js.map +1 -1
- package/dist/reply-polls.d.ts +85 -0
- package/dist/reply-polls.js +154 -0
- package/dist/reply-polls.js.map +1 -0
- package/dist/restart-guard.d.ts +6 -3
- package/dist/restart-guard.js +6 -3
- package/dist/restart-guard.js.map +1 -1
- package/dist/restart-progress.d.ts +33 -2
- package/dist/restart-progress.js +30 -2
- package/dist/restart-progress.js.map +1 -1
- package/dist/sd-notify.d.ts +22 -1
- package/dist/sd-notify.js +63 -10
- package/dist/sd-notify.js.map +1 -1
- package/dist/service-activation.d.ts +15 -7
- package/dist/service-activation.js +42 -26
- package/dist/service-activation.js.map +1 -1
- package/dist/service-installer.d.ts +55 -0
- package/dist/service-installer.js +90 -3
- package/dist/service-installer.js.map +1 -1
- package/dist/service-plan.d.ts +11 -0
- package/dist/service-plan.js +23 -0
- package/dist/service-plan.js.map +1 -1
- package/dist/settings-api.js +14 -4
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +4 -2
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +2 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/spawn-gate.js +5 -1
- package/dist/spawn-gate.js.map +1 -1
- package/dist/spawn-hold-reply.d.ts +12 -0
- package/dist/spawn-hold-reply.js +39 -0
- package/dist/spawn-hold-reply.js.map +1 -0
- package/dist/systemd-peer-bus.d.ts +95 -0
- package/dist/systemd-peer-bus.js +430 -0
- package/dist/systemd-peer-bus.js.map +1 -0
- package/dist/systemd-runtime.d.ts +27 -1
- package/dist/systemd-runtime.js +69 -7
- package/dist/systemd-runtime.js.map +1 -1
- package/dist/tips.js +1 -1
- package/dist/tips.js.map +1 -1
- package/dist/tool-permissions.js +3 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.js +3 -2
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.d.ts +71 -4
- package/dist/topic-commands.js +167 -34
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.d.ts +3 -3
- package/dist/transcript-delta-reader.js +8 -8
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/transcript-jsonl.d.ts +85 -3
- package/dist/transcript-jsonl.js +156 -13
- package/dist/transcript-jsonl.js.map +1 -1
- package/dist/transcript-monitor.d.ts +11 -0
- package/dist/transcript-monitor.js +61 -13
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-sources.d.ts +24 -0
- package/dist/transcript-sources.js +211 -56
- package/dist/transcript-sources.js.map +1 -1
- package/dist/tunnel/cloudflared.d.ts +7 -15
- package/dist/tunnel/cloudflared.js +36 -1
- package/dist/tunnel/cloudflared.js.map +1 -1
- package/dist/tunnel/purpose-lane.d.ts +5 -1
- package/dist/tunnel/purpose-lane.js +14 -7
- package/dist/tunnel/purpose-lane.js.map +1 -1
- package/dist/tunnel/types.d.ts +5 -1
- package/dist/tunnel/types.js.map +1 -1
- package/dist/turn-resume.d.ts +2 -0
- package/dist/turn-resume.js +1 -1
- package/dist/turn-resume.js.map +1 -1
- package/dist/types.d.ts +22 -0
- package/dist/ui/chat-commands.js +1 -0
- package/dist/ui/chat-mentions.js +63 -0
- package/dist/ui/chat-render.js +80 -10
- package/dist/ui/chat-store.js +70 -6
- package/dist/ui/chat-strings.js +62 -32
- package/dist/ui/chat-thread.js +199 -24
- package/dist/ui/chat-time.js +80 -0
- package/dist/ui/chat-tour.js +17 -14
- package/dist/ui/panel-chat.js +45 -21
- package/dist/ui/panel-details.js +2 -0
- package/dist/ui/panel-fleet.js +213 -58
- package/dist/ui/panel-log.js +428 -0
- package/dist/ui/panel-needs.js +14 -10
- package/dist/ui/panel-settings.js +82 -17
- package/dist/ui/preview-panel.js +55 -15
- package/dist/ui/preview-status.js +28 -0
- package/dist/ui/preview.js +44 -3
- package/dist/ui/settings-dialogs.js +11 -6
- package/dist/ui/settings-model.js +3 -1
- package/dist/ui/settings-strings.js +32 -12
- package/dist/ui/settings-token.js +8 -1
- package/dist/ui/settings-wizard.js +5 -3
- package/dist/ui/shared/app-i18n.js +41 -15
- package/dist/ui/shared/app-prefs.js +250 -0
- package/dist/ui/shared/app-route.js +6 -1
- package/dist/ui/shared/app-shell.js +165 -8
- package/dist/ui/shared/app-store.js +5 -1
- package/dist/ui/shared/app-stream.js +26 -5
- package/dist/ui/shared/app.css +170 -30
- package/dist/ui/shared/app.js +11 -1
- package/dist/ui/shared/fonts/README.md +1 -1
- package/dist/ui/shared/header-tools.js +83 -13
- package/dist/ui/shared/instance-nav.js +178 -51
- package/dist/ui/shared/instance-switch.js +8 -5
- package/dist/ui/shared/panel-view.js +21 -4
- package/dist/ui/shared/signin.js +15 -9
- package/dist/ui/shared/theme.js +39 -7
- package/dist/ui/shared/tokens.css +1 -1
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/usage-dialog.js +23 -5
- package/dist/ui/shared/view-strings.js +40 -4
- package/dist/ui/signin.html +8 -3
- package/dist/unrecognised-prompt.d.ts +23 -0
- package/dist/unrecognised-prompt.js +74 -0
- package/dist/unrecognised-prompt.js.map +1 -0
- package/dist/update-check.d.ts +31 -0
- package/dist/update-check.js +47 -0
- package/dist/update-check.js.map +1 -1
- package/dist/update-install.d.ts +13 -1
- package/dist/update-install.js +16 -4
- package/dist/update-install.js.map +1 -1
- package/dist/update-launch.d.ts +48 -1
- package/dist/update-launch.js +159 -5
- package/dist/update-launch.js.map +1 -1
- package/dist/update-marker.d.ts +51 -0
- package/dist/update-marker.js +61 -0
- package/dist/update-marker.js.map +1 -1
- 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 +62 -13
- package/dist/usage/providers.js +256 -68
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/statusline-usage.d.ts +6 -2
- package/dist/usage/statusline-usage.js +10 -4
- package/dist/usage/statusline-usage.js.map +1 -1
- package/dist/view-api.js +31 -9
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +82 -4
- package/dist/web-api.js +632 -88
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +5 -2
- package/dist/web-auth.js.map +1 -1
- package/dist/web-chat-history.d.ts +26 -1
- package/dist/web-chat-history.js +47 -8
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +41 -5
- package/dist/web-commands.js +25 -7
- package/dist/web-commands.js.map +1 -1
- package/dist/web-login.d.ts +14 -0
- package/dist/web-login.js +4 -2
- package/dist/web-login.js.map +1 -1
- package/dist/web-mentions.d.ts +44 -0
- package/dist/web-mentions.js +75 -0
- package/dist/web-mentions.js.map +1 -0
- package/dist/web-prefs.d.ts +81 -0
- package/dist/web-prefs.js +297 -0
- package/dist/web-prefs.js.map +1 -0
- package/dist/web-preview.d.ts +14 -1
- package/dist/web-preview.js +35 -13
- package/dist/web-preview.js.map +1 -1
- package/dist/web-profile.d.ts +32 -0
- package/dist/web-profile.js +132 -0
- package/dist/web-profile.js.map +1 -0
- package/dist/web-reply-files.d.ts +45 -0
- package/dist/web-reply-files.js +223 -0
- package/dist/web-reply-files.js.map +1 -0
- package/dist/web-schedules.d.ts +12 -0
- package/dist/web-schedules.js +34 -0
- package/dist/web-schedules.js.map +1 -0
- package/dist/web-server-drain.d.ts +10 -0
- package/dist/web-server-drain.js +50 -0
- package/dist/web-server-drain.js.map +1 -0
- package/dist/web-session.d.ts +14 -0
- package/dist/web-session.js +11 -1
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +3 -1
- package/dist/web-settings-patch.js +4 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +4 -0
- package/dist/web-shell-routes.js +9 -0
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-upload.d.ts +135 -7
- package/dist/web-upload.js +315 -51
- package/dist/web-upload.js.map +1 -1
- package/launcher/install-admission.cjs +61 -6
- package/package.json +3 -3
- package/templates/launchd.plist.ejs +3 -1
- package/templates/systemd.service.ejs +2 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
2
|
import type { QueueResumePolicy } from "./delivery-queue-evidence.js";
|
|
3
|
+
import { type HumanOrigin, type HumanReceiptRow, type HumanReceiptProof } from "./human-delivery-receipts.js";
|
|
3
4
|
export declare const DURABLE_DELIVERY_MAX_ATTEMPTS = 8;
|
|
4
5
|
export declare const DURABLE_DELIVERY_MAX_AGE_MS: number;
|
|
5
6
|
export declare const DURABLE_DELIVERY_ABORT_BACKOFF_MS = 5000;
|
|
7
|
+
export declare const DEFAULT_REPLY_OBLIGATION_TTL_MS: number;
|
|
6
8
|
export interface DaemonDeliveryPort {
|
|
7
9
|
begin(deliveryId: string, targetBootId: string, attemptNo: number, evidence?: DeliveryAttemptEvidence): "begun" | "duplicate" | "stale";
|
|
8
10
|
markEnterStarted(deliveryId: string, targetBootId: string, attemptNo: number): boolean;
|
|
@@ -39,6 +41,10 @@ export interface NewOutboxDelivery {
|
|
|
39
41
|
kind: string;
|
|
40
42
|
correlationId?: string;
|
|
41
43
|
payload: Record<string, unknown>;
|
|
44
|
+
/** Validated again at the atomic admission boundary using sourceInstance. */
|
|
45
|
+
forwards?: readonly string[];
|
|
46
|
+
/** Requested mode before transient predecessor/capability fallback; pins forwarded retries. */
|
|
47
|
+
requestedKind?: string;
|
|
42
48
|
}
|
|
43
49
|
export interface OutboxDelivery {
|
|
44
50
|
deliveryId: string;
|
|
@@ -145,6 +151,17 @@ export interface DeliveryStatusItem {
|
|
|
145
151
|
* other query, and operator reads, stay redacted as before (#982).
|
|
146
152
|
*/
|
|
147
153
|
content?: string | null;
|
|
154
|
+
/** Recorded explicit disclosures; never inferred from the message text. */
|
|
155
|
+
forwarded_by?: Array<{
|
|
156
|
+
source_instance: string;
|
|
157
|
+
message_id: string;
|
|
158
|
+
forwarded_at: string;
|
|
159
|
+
}>;
|
|
160
|
+
/** Only trusted human evidence rows carry origin. Agent relays never inherit it. */
|
|
161
|
+
origin?: HumanOrigin;
|
|
162
|
+
wire_content_sha256?: string | null;
|
|
163
|
+
delivered_at?: string | null;
|
|
164
|
+
proof_kind?: HumanReceiptProof["tag"] | null;
|
|
148
165
|
/**
|
|
149
166
|
* How the message was routed, in send_to_instance's own words: `steer` (into the live turn) or `idle_queue` (as the
|
|
150
167
|
* next message). The fleet decided this at admission; it is the row's kind.
|
|
@@ -158,12 +175,13 @@ export interface DeliveryStatusItem {
|
|
|
158
175
|
consumed_via: ConsumedVia | null;
|
|
159
176
|
/** #926: the reply this request is owed, when it asked for one. */
|
|
160
177
|
reply_obligation?: {
|
|
161
|
-
state: "open" | "answered";
|
|
178
|
+
state: "open" | "answered" | "expired";
|
|
162
179
|
opened_at: string;
|
|
163
180
|
last_asked_at: string;
|
|
164
181
|
nudged_at: string | null;
|
|
165
182
|
overdue_notified_at: string | null;
|
|
166
183
|
answered_at: string | null;
|
|
184
|
+
expired_at?: string | null;
|
|
167
185
|
} | null;
|
|
168
186
|
/**
|
|
169
187
|
* #1641: while `queued` / `retry_wait`, why the target is not taking it, in words (`The CLI appears stuck.`, paused, a
|
|
@@ -175,7 +193,8 @@ export interface DeliveryStatusItem {
|
|
|
175
193
|
/**
|
|
176
194
|
* #926: a peer asked with `requires_reply` and the owner has not answered it
|
|
177
195
|
* through the fleet yet. Terminal text is not an answer: only a message the
|
|
178
|
-
* owner sends back to the requester with the same correlation_id
|
|
196
|
+
* owner sends back to the requester with the same correlation_id answers it.
|
|
197
|
+
* #1694 can separately expire its automatic tracking without recording an answer.
|
|
179
198
|
*/
|
|
180
199
|
export interface ReplyObligation {
|
|
181
200
|
correlationId: string;
|
|
@@ -184,11 +203,12 @@ export interface ReplyObligation {
|
|
|
184
203
|
requestDeliveryId: string;
|
|
185
204
|
openedAt: string;
|
|
186
205
|
lastAskedAt: string;
|
|
187
|
-
state: "open" | "answered";
|
|
206
|
+
state: "open" | "answered" | "expired";
|
|
188
207
|
nudgedAt: string | null;
|
|
189
208
|
overdueNotifiedAt: string | null;
|
|
190
209
|
answeredAt: string | null;
|
|
191
210
|
answeredDeliveryId: string | null;
|
|
211
|
+
expiredAt: string | null;
|
|
192
212
|
}
|
|
193
213
|
export interface DeliveryStatusPage {
|
|
194
214
|
items: DeliveryStatusItem[];
|
|
@@ -225,8 +245,17 @@ export interface DeliveryReconciliationCandidate extends OutboxDelivery {
|
|
|
225
245
|
enterStartedAt: string | null;
|
|
226
246
|
};
|
|
227
247
|
}
|
|
228
|
-
/**
|
|
229
|
-
|
|
248
|
+
/**
|
|
249
|
+
* The exact statement `needsAttention` runs; exported so the plan test checks this text and no copy of it. A silent
|
|
250
|
+
* schedule's raw paste is never an item (#1647): nobody can act on it, the next run goes ahead anyway, and the fleet's
|
|
251
|
+
* notice to the leader (with the cause) is its whole report. Every human-originated row stays.
|
|
252
|
+
*/
|
|
253
|
+
export declare const NEEDS_ATTENTION_SQL = "\n SELECT delivery_id, state, source_instance, target_instance, kind, finished_at, last_error\n FROM deliveries INDEXED BY idx_delivery_attention\n WHERE state IN ('uncertain','failed') AND acknowledged_at IS NULL AND finished_at >= ?\n AND NOT (kind = 'raw_paste' AND source_key LIKE 'schedule:%')\n ORDER BY finished_at DESC LIMIT ?";
|
|
254
|
+
/** A silent schedule's raw paste (fleet-manager admits it as `raw_paste` under a `schedule:` source key). */
|
|
255
|
+
export declare function isSilentScheduleDelivery(row: {
|
|
256
|
+
kind: string;
|
|
257
|
+
sourceKey: string | null;
|
|
258
|
+
}): boolean;
|
|
230
259
|
export interface NeedsAttentionDelivery {
|
|
231
260
|
deliveryId: string;
|
|
232
261
|
state: "uncertain" | "failed";
|
|
@@ -245,6 +274,8 @@ export declare class DeliveryOutbox extends EventEmitter {
|
|
|
245
274
|
readonly managerBootId: string;
|
|
246
275
|
constructor(dbPath: string, managerBootId?: string);
|
|
247
276
|
private initialize;
|
|
277
|
+
/** SQLite cannot widen a CHECK with ADD COLUMN; preserve all old rows in one transaction. */
|
|
278
|
+
private migrateReplyObligationExpiry;
|
|
248
279
|
/**
|
|
249
280
|
* #926: a delivered `requires_reply` request opens (or, asked again,
|
|
250
281
|
* re-opens) the owner's obligation. Runs inside the delivered transition.
|
|
@@ -257,15 +288,22 @@ export declare class DeliveryOutbox extends EventEmitter {
|
|
|
257
288
|
/**
|
|
258
289
|
* #926 safety net 1: remind an owner that has not answered. `turn-ended`
|
|
259
290
|
* reminds once per ask, after the grace (a reply seconds after the ask is
|
|
260
|
-
* normal); `restart`
|
|
261
|
-
* does not resume on its own. Marked in the same transaction as the notice.
|
|
291
|
+
* normal); `restart` batches once per daemon boot, because the interrupted
|
|
292
|
+
* turn does not resume on its own. Marked in the same transaction as the notice.
|
|
262
293
|
*/
|
|
263
294
|
remindReplyObligations(ownerInstance: string, opts: {
|
|
264
295
|
now?: Date;
|
|
265
296
|
graceMs: number;
|
|
266
297
|
reason: "turn-ended" | "restart";
|
|
267
298
|
since?: Date;
|
|
299
|
+
restartId?: string;
|
|
268
300
|
}): number;
|
|
301
|
+
private recordReplyRestart;
|
|
302
|
+
/** Expiry is terminal for this ask; a later delivered re-ask can reopen the same tuple. */
|
|
303
|
+
expireReplyObligations(opts?: {
|
|
304
|
+
now?: Date;
|
|
305
|
+
ttlMs?: number;
|
|
306
|
+
}): ReplyObligation[];
|
|
269
307
|
/**
|
|
270
308
|
* #926 safety net 2 (poll-on-timeout, in code): tell the requester once when
|
|
271
309
|
* the owner is not working and nothing has come back for `overdueMs` since
|
|
@@ -283,8 +321,15 @@ export declare class DeliveryOutbox extends EventEmitter {
|
|
|
283
321
|
* so it still arrives when the target is down right now (a General that the
|
|
284
322
|
* same broken CLI stopped). `sourceKey` makes it idempotent: the same key is
|
|
285
323
|
* admitted once. Returns whether it was newly admitted.
|
|
324
|
+
*
|
|
325
|
+
* `place` (#1823) addresses it to a chat: the notice is about something there (a poll's results), so the instance's
|
|
326
|
+
* answer goes there too. Without it the notice belongs to no chat.
|
|
286
327
|
*/
|
|
287
|
-
admitSystemNotice(target: string, sourceKey: string, content: string, now?: Date
|
|
328
|
+
admitSystemNotice(target: string, sourceKey: string, content: string, now?: Date, place?: {
|
|
329
|
+
chatId: string;
|
|
330
|
+
threadId?: string;
|
|
331
|
+
adapterId?: string;
|
|
332
|
+
}): boolean;
|
|
288
333
|
/** The owner's open obligations, oldest first (#926). */
|
|
289
334
|
openReplyObligations(ownerInstance: string): ReplyObligation[];
|
|
290
335
|
getReplyObligation(correlationId: string, requesterInstance: string, ownerInstance: string): ReplyObligation | undefined;
|
|
@@ -297,6 +342,17 @@ export declare class DeliveryOutbox extends EventEmitter {
|
|
|
297
342
|
inserted: boolean;
|
|
298
343
|
};
|
|
299
344
|
get(deliveryId: string): OutboxDelivery | undefined;
|
|
345
|
+
createHumanReceipt(input: {
|
|
346
|
+
targetInstance: string;
|
|
347
|
+
originalBody: string;
|
|
348
|
+
origin: HumanOrigin;
|
|
349
|
+
inputKind: string;
|
|
350
|
+
managerBootId: string;
|
|
351
|
+
}): HumanReceiptRow;
|
|
352
|
+
markHumanReceiptUncertain(id: string, target: string): void;
|
|
353
|
+
getHumanReceipt(id: string): HumanReceiptRow | undefined;
|
|
354
|
+
bindHumanReceipt(id: string, target: string, ownerKey: string, wire: string, managerBootId: string): HumanReceiptRow;
|
|
355
|
+
settleHumanReceipt(id: string, target: string, ownerKey: string, proof: unknown, currentOwnerKey: string | null): boolean;
|
|
300
356
|
getByOperation(sourceInstance: string, operationId: string): OutboxDelivery[];
|
|
301
357
|
/**
|
|
302
358
|
* Query only rows owned by the authenticated instance as source or target.
|