@songsid/agend 2.2.0-alpha.9 → 2.2.0-beta.10
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 +1 -1
- package/README.zh-TW.md +1 -1
- package/dist/agent-cli-instructions.md +16 -9
- package/dist/agent-cli.js +15 -7
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +21 -9
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-whats-new.d.ts +47 -0
- package/dist/agent-whats-new.js +147 -0
- package/dist/agent-whats-new.js.map +1 -0
- package/dist/auth-api.d.ts +2 -2
- package/dist/auth-api.js +4 -2
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/antigravity.d.ts +3 -0
- package/dist/backend/antigravity.js +9 -0
- 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 +1 -1
- package/dist/backend/effort-metadata.js +3 -2
- 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-engine-ledger.d.ts +5 -0
- package/dist/backend/kiro-engine-ledger.js +20 -0
- package/dist/backend/kiro-engine-ledger.js.map +1 -1
- package/dist/backend/kiro-identity.d.ts +6 -0
- package/dist/backend/kiro-identity.js +19 -5
- package/dist/backend/kiro-identity.js.map +1 -1
- package/dist/backend/kiro.d.ts +39 -3
- package/dist/backend/kiro.js +143 -19
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/launch-effort.d.ts +33 -0
- package/dist/backend/launch-effort.js +123 -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 +33 -4
- package/dist/backend/types.js +2 -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 +98 -3
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +26 -2
- package/dist/channel/adapters/telegram.js +123 -19
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-server.js +9 -1
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.d.ts +11 -0
- package/dist/channel/mcp-tools.js +24 -13
- 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.js +9 -3
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +41 -3
- package/dist/cli.js +133 -28
- package/dist/cli.js.map +1 -1
- package/dist/command-table.d.ts +2 -2
- package/dist/command-table.js +6 -3
- package/dist/command-table.js.map +1 -1
- package/dist/config-validator.js +59 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/cross-instance-envelope.d.ts +15 -2
- package/dist/cross-instance-envelope.js +29 -5
- package/dist/cross-instance-envelope.js.map +1 -1
- package/dist/daemon.d.ts +156 -1
- package/dist/daemon.js +764 -89
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +62 -7
- package/dist/delivery-outbox.js +309 -22
- 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/fleet-context.d.ts +10 -1
- package/dist/fleet-manager.d.ts +352 -10
- package/dist/fleet-manager.js +1925 -175
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/backend-providers/SKILL.md +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +92 -21
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +27 -3
- package/dist/general-knowledge/skills/delegation-playbook/SKILL.md +8 -8
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +5 -5
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +4 -4
- package/dist/general-knowledge/skills/fleet-restart/SKILL.md +13 -13
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +3 -2
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +6 -0
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +9 -9
- package/dist/general-knowledge/skills/multi-channel/SKILL.md +8 -2
- package/dist/general-knowledge/skills/scheduling/SKILL.md +5 -3
- package/dist/general-knowledge/skills/session-management/SKILL.md +6 -5
- package/dist/general-knowledge/skills/tui-effort/SKILL.md +2 -2
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +8 -3
- package/dist/general-knowledge/steering/core-rules.md +8 -7
- 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/instance-avatar.d.ts +36 -0
- package/dist/instance-avatar.js +57 -0
- package/dist/instance-avatar.js.map +1 -0
- package/dist/instance-config-impact.js +6 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +29 -6
- package/dist/instance-lifecycle.js +79 -28
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +3 -1
- package/dist/instructions.js +11 -8
- package/dist/instructions.js.map +1 -1
- 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/locale.js +204 -44
- 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/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/next-steps.js +1 -1
- package/dist/next-steps.js.map +1 -1
- package/dist/outbound-handlers.d.ts +100 -0
- package/dist/outbound-handlers.js +263 -96
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +26 -15
- package/dist/outbound-schemas.js +24 -7
- package/dist/outbound-schemas.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.js +11 -4
- 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/reply-buttons-controller.d.ts +3 -0
- package/dist/reply-buttons-controller.js +3 -2
- package/dist/reply-buttons-controller.js.map +1 -1
- 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 -0
- package/dist/restart-progress.js +30 -0
- package/dist/restart-progress.js.map +1 -1
- package/dist/service-activation.d.ts +15 -7
- package/dist/service-activation.js +46 -29
- package/dist/service-activation.js.map +1 -1
- package/dist/service-installer.d.ts +31 -0
- package/dist/service-installer.js +41 -2
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.js +85 -25
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +72 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +28 -4
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.js +7 -0
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +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/status-emojis.d.ts +10 -3
- package/dist/status-emojis.js +11 -2
- package/dist/status-emojis.js.map +1 -1
- 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 +4 -4
- package/dist/tips.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 +42 -2
- package/dist/topic-commands.js +92 -7
- 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 +80 -3
- package/dist/transcript-jsonl.js +147 -10
- package/dist/transcript-jsonl.js.map +1 -1
- package/dist/transcript-monitor.d.ts +19 -0
- package/dist/transcript-monitor.js +87 -15
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-sources.d.ts +78 -0
- package/dist/transcript-sources.js +375 -64
- package/dist/transcript-sources.js.map +1 -1
- package/dist/transcript-turns.d.ts +15 -2
- package/dist/transcript-turns.js +15 -2
- package/dist/transcript-turns.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 +25 -0
- package/dist/ui/chat-commands.js +1 -0
- package/dist/ui/chat-emojis.js +33 -0
- package/dist/ui/chat-mentions.js +63 -0
- package/dist/ui/chat-render.js +42 -2
- package/dist/ui/chat-store.js +2 -2
- package/dist/ui/chat-strings.js +38 -20
- package/dist/ui/chat-thread.js +69 -12
- package/dist/ui/chat-time.js +80 -0
- package/dist/ui/panel-chat.js +39 -10
- package/dist/ui/panel-details.js +2 -0
- package/dist/ui/panel-fleet.js +199 -57
- package/dist/ui/panel-log.js +428 -0
- package/dist/ui/panel-needs.js +6 -2
- package/dist/ui/panel-settings.js +137 -32
- 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 +7 -2
- package/dist/ui/settings-model.js +2 -1
- package/dist/ui/settings-strings.js +46 -4
- package/dist/ui/settings-token.js +1 -1
- package/dist/ui/shared/app-i18n.js +43 -17
- package/dist/ui/shared/app-prefs.js +250 -0
- package/dist/ui/shared/app-route.js +7 -2
- 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 +23 -5
- package/dist/ui/shared/app.css +159 -23
- package/dist/ui/shared/app.js +11 -1
- package/dist/ui/shared/fonts/README.md +1 -1
- package/dist/ui/shared/header-tools.js +55 -5
- package/dist/ui/shared/instance-nav.js +241 -45
- package/dist/ui/shared/instance-switch.js +4 -4
- package/dist/ui/shared/panel-view.js +6 -0
- package/dist/ui/shared/signin.js +7 -7
- package/dist/ui/shared/theme.js +39 -7
- package/dist/ui/shared/tokens.css +10 -1
- package/dist/ui/shared/ui-icons.js +1 -0
- package/dist/ui/shared/usage-dialog.js +23 -5
- package/dist/ui/shared/view-strings.js +32 -4
- package/dist/ui/signin.html +1 -1
- 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-install.d.ts +28 -2
- package/dist/update-install.js +22 -4
- package/dist/update-install.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/update-preflight.d.ts +100 -0
- package/dist/update-preflight.js +264 -0
- package/dist/update-preflight.js.map +1 -0
- package/dist/updater-caller.d.ts +31 -0
- package/dist/updater-caller.js +109 -0
- package/dist/updater-caller.js.map +1 -0
- 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 +34 -5
- package/dist/usage/providers.js +160 -27
- 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.d.ts +1 -1
- package/dist/view-api.js +38 -8
- package/dist/view-api.js.map +1 -1
- package/dist/wake-coordinator.d.ts +11 -0
- package/dist/wake-coordinator.js +38 -4
- package/dist/wake-coordinator.js.map +1 -1
- package/dist/web-api.d.ts +49 -2
- package/dist/web-api.js +421 -31
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.d.ts +2 -2
- package/dist/web-auth.js +9 -4
- package/dist/web-auth.js.map +1 -1
- package/dist/web-commands.d.ts +27 -4
- package/dist/web-commands.js +19 -4
- package/dist/web-commands.js.map +1 -1
- package/dist/web-host-guard.d.ts +3 -11
- package/dist/web-host-guard.js +3 -12
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-images.d.ts +47 -0
- package/dist/web-images.js +169 -0
- package/dist/web-images.js.map +1 -0
- 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 +63 -0
- package/dist/web-prefs.js +265 -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-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 +36 -1
- package/dist/web-session.js +53 -6
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +23 -0
- package/dist/web-settings-patch.js +77 -0
- package/dist/web-settings-patch.js.map +1 -0
- package/dist/web-shell-routes.d.ts +5 -1
- package/dist/web-shell-routes.js +10 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-upload.d.ts +17 -4
- package/dist/web-upload.js +64 -13
- package/dist/web-upload.js.map +1 -1
- package/dist/workflow-templates/default.md +1 -1
- package/package.json +1 -1
- package/templates/launchd.plist.ejs +3 -1
- package/templates/systemd.service.ejs +2 -1
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type HumanOrigin } from "./human-delivery-receipts.js";
|
|
1
2
|
import { SettingsExecution } from "./settings-transaction.js";
|
|
2
3
|
import type { LoginCodeOwner } from "./web-login.js";
|
|
3
4
|
import { type ProfileTicket } from "./runtime-cpu-profile.js";
|
|
@@ -51,14 +52,20 @@ export declare function applyTaskListCap<T extends {
|
|
|
51
52
|
omitted: number;
|
|
52
53
|
hint: string;
|
|
53
54
|
} | T[];
|
|
55
|
+
import { type PublicPreviewForUi } from "./web-api.js";
|
|
56
|
+
import { type LogAnswer, type LogQuery } from "./log-service.js";
|
|
54
57
|
import { WebChatHistory } from "./web-chat-history.js";
|
|
58
|
+
import { SeenUsers, type MentionNames, type MentionQuery } from "./web-mentions.js";
|
|
59
|
+
import { WebPrefsStore } from "./web-prefs.js";
|
|
55
60
|
import { ReplyButtonsController } from "./reply-buttons-controller.js";
|
|
56
61
|
import { WebFileLedger } from "./web-upload.js";
|
|
62
|
+
import { type CachedImage } from "./web-images.js";
|
|
57
63
|
import { type RawConfigPatch } from "./settings-api.js";
|
|
58
64
|
import { type AgentEndpointContext } from "./agent-endpoint.js";
|
|
59
65
|
import { ClassicChannelManager } from "./classic-channel-manager.js";
|
|
60
66
|
import { type ExplicitInstanceRemoval } from "./instance-removal.js";
|
|
61
67
|
import type { InstanceState, InteractionSnapshot } from "./backend/types.js";
|
|
68
|
+
import { type Daemon } from "./daemon.js";
|
|
62
69
|
import { WakeCoordinator } from "./wake-coordinator.js";
|
|
63
70
|
import { TargetQueueWorker } from "./target-queue-worker.js";
|
|
64
71
|
import { resolveDeliveryWorkerMode } from "./types.js";
|
|
@@ -71,6 +78,7 @@ import { type PreviewAvailability } from "./web-preview.js";
|
|
|
71
78
|
import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
|
|
72
79
|
import { type ProviderSecretStatus } from "./provider-secret-registry.js";
|
|
73
80
|
import { ApplyJobStore, type ApplyJob, type ApplyTargetKind, type SelfRestartResult } from "./apply-job.js";
|
|
81
|
+
import { type CarryResult } from "./backend/claude-carry.js";
|
|
74
82
|
import { StormWindow } from "./storm-window.js";
|
|
75
83
|
import { SpawnGate } from "./spawn-gate.js";
|
|
76
84
|
import { BackendOutageTracker } from "./backend-outage.js";
|
|
@@ -98,6 +106,17 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
|
|
|
98
106
|
* must match here, or a deleted instance's CLI is left running (#1305 P2-3).
|
|
99
107
|
*/
|
|
100
108
|
export declare function isOrphanInstanceWindowName(name: string): boolean;
|
|
109
|
+
/** restartSingleInstance's options. `carry` (#1753): a credential-profile switch; its outcome is written into `result`. */
|
|
110
|
+
export interface RestartOpts {
|
|
111
|
+
freshStart?: boolean;
|
|
112
|
+
explicit?: boolean;
|
|
113
|
+
carry?: {
|
|
114
|
+
backend: string;
|
|
115
|
+
from: string | null;
|
|
116
|
+
to: string | null;
|
|
117
|
+
result?: CarryResult | null;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
101
120
|
/**
|
|
102
121
|
* Answer shape for `list_models`. `scope` reports where the LIST came from —
|
|
103
122
|
* "instance" only when it was read through that instance's own backend config,
|
|
@@ -158,6 +177,8 @@ export declare const LOGIN_CALLBACK_PREFIX = "login:";
|
|
|
158
177
|
* and hides exactly the newly released model the user opened `/model` to find.
|
|
159
178
|
* The wait is announced before it starts, so it reads as progress, not a stall.
|
|
160
179
|
*/
|
|
180
|
+
/** #1690: how long `/model` waits for the daemon's word on our own runtime switch (its dialog wait plus settling). */
|
|
181
|
+
export declare const RUNTIME_SWITCH_RESULT_MS = 12000;
|
|
161
182
|
export declare const CLI_ENV_PROBE_DEADLINE_MS = 16000;
|
|
162
183
|
/**
|
|
163
184
|
* How many CLIs may cold-start at once, from BOTH memory and cores.
|
|
@@ -200,7 +221,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
200
221
|
private replyObligationTimer;
|
|
201
222
|
private readonly activeDurableTargets;
|
|
202
223
|
/** Live view of lifecycle.daemons — used throughout; not deprecated. */
|
|
203
|
-
get daemons(): Map<string,
|
|
224
|
+
get daemons(): Map<string, Daemon>;
|
|
204
225
|
fleetConfig: FleetConfig | null;
|
|
205
226
|
private rawFleetConfig;
|
|
206
227
|
private rawFleetDocument;
|
|
@@ -299,6 +320,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
299
320
|
private webChannelEchoGuards;
|
|
300
321
|
/** instanceName → restart currently executing; concurrent callers join it. */
|
|
301
322
|
private restartsInFlight;
|
|
323
|
+
/**
|
|
324
|
+
* #1753: each in-flight restart's stop → start gap — the conversation carry it will run there (its own, or one a later
|
|
325
|
+
* caller joined with before the gap), and whether the gap has been reached.
|
|
326
|
+
*/
|
|
327
|
+
private readonly restartGaps;
|
|
302
328
|
/**
|
|
303
329
|
* Delayed automatic retries for instances whose startup failed. Before this a
|
|
304
330
|
* failed start was logged once and the instance stayed `stopped` until an
|
|
@@ -333,6 +359,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
333
359
|
/** In-flight /effort selections, same coordinator shape as pendingModelSelects. */
|
|
334
360
|
private pendingEffortSelects;
|
|
335
361
|
private pendingModelSelects;
|
|
362
|
+
/** #1806: in-flight /backend steps, keyed by nonce (see handleBackendSelection). */
|
|
363
|
+
private pendingBackendSelects;
|
|
336
364
|
/** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
|
|
337
365
|
private pendingNonceButtons;
|
|
338
366
|
/** #1386 "Needs you": the list, its live chat messages and Acknowledge. Started with the fleet (finishStartup). */
|
|
@@ -397,6 +425,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
397
425
|
private connectionBindingInFlight;
|
|
398
426
|
private collabInstances;
|
|
399
427
|
private healthServer;
|
|
428
|
+
private healthServerDrain;
|
|
400
429
|
/** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
|
|
401
430
|
private previewListener;
|
|
402
431
|
private previewListening;
|
|
@@ -409,6 +438,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
409
438
|
private updateProgressEditRunning;
|
|
410
439
|
private lastUpdateProgressText;
|
|
411
440
|
private updateCompletionTipText;
|
|
441
|
+
/**
|
|
442
|
+
* #1660: an adopted update whose retire outcome is still owed. The
|
|
443
|
+
* completion summary was (or will be) posted; this watch appends the
|
|
444
|
+
* cleanup outcome to the same receipt instead of letting stage edits
|
|
445
|
+
* clobber it — and refuses a receipt that no longer matches (checklist 3/5).
|
|
446
|
+
*/
|
|
447
|
+
private updateCleanupWatch;
|
|
412
448
|
/** Injectable only to keep the chat→CLI reload hand-off deterministic in tests. */
|
|
413
449
|
private fullRestartLauncher;
|
|
414
450
|
private eventLogPruneTimer;
|
|
@@ -428,8 +464,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
428
464
|
private memoryLogAt;
|
|
429
465
|
private memoryDebugAt;
|
|
430
466
|
private memoryLogLevel;
|
|
431
|
-
|
|
432
|
-
private
|
|
467
|
+
/** #1685: the host_memory value the last status frame carried, so a change re-sends the frame. */
|
|
468
|
+
private memoryIndicatorShown;
|
|
433
469
|
private mirrorBuffer;
|
|
434
470
|
private mirrorTimer;
|
|
435
471
|
private sseClients;
|
|
@@ -439,6 +475,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
439
475
|
private webChatStore;
|
|
440
476
|
/** Uploaded files and the files the dashboard may fetch back (uploads, reply attachments). */
|
|
441
477
|
readonly webFiles: WebFileLedger;
|
|
478
|
+
/** #1770: per instance, its last web reply still copying its files — the next one is shown after it, in order. */
|
|
479
|
+
private readonly webReplyOrder;
|
|
480
|
+
/** #1770: an instance's web-files byte cap (a field, so a test can make it small). */
|
|
481
|
+
private webReplyMaxBytes;
|
|
482
|
+
/** #1682: the people seen on inbound messages (id → name), for the web chat's mention pills; bounded, in memory. */
|
|
483
|
+
readonly seenUsers: SeenUsers;
|
|
484
|
+
private webPrefsStore?;
|
|
485
|
+
/** #1665: the web preferences kept on the host (<home>/web-prefs.json), read on first use. */
|
|
486
|
+
get webPrefs(): WebPrefsStore;
|
|
442
487
|
/**
|
|
443
488
|
* Read from disk on every access rather than cached at startup: `agend
|
|
444
489
|
* web-token rotate` runs in a separate process, and a cached copy would keep
|
|
@@ -519,12 +564,17 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
519
564
|
kind: string;
|
|
520
565
|
correlationId: string;
|
|
521
566
|
payload: Record<string, unknown>;
|
|
567
|
+
forwards?: readonly string[];
|
|
568
|
+
requestedKind?: string;
|
|
522
569
|
}): {
|
|
523
570
|
deliveryId: string;
|
|
524
571
|
state: string;
|
|
525
572
|
duplicate: boolean;
|
|
573
|
+
kind: string;
|
|
526
574
|
};
|
|
527
575
|
queryDurableDeliveryStatus(callerInstance: string, selector: DeliveryStatusSelector): DeliveryStatusPage;
|
|
576
|
+
/** #1641: why a target is not taking queued work right now, or null when nothing known holds it. */
|
|
577
|
+
private deliveryWaitingReason;
|
|
528
578
|
getDaemonBootId(instanceName: string): string | undefined;
|
|
529
579
|
markDurableResponseDelivered(sourceInstance: string, operationId: string): void;
|
|
530
580
|
/** Called after a replacement Daemon object is installed in lifecycle.daemons. */
|
|
@@ -535,6 +585,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
535
585
|
* notice when the owner is not working and nothing came back in time.
|
|
536
586
|
*/
|
|
537
587
|
sweepReplyObligations(now?: Date): void;
|
|
588
|
+
private expireReplyObligations;
|
|
538
589
|
private scheduleDeliveryOutboxPump;
|
|
539
590
|
private runDeliveryOutboxPump;
|
|
540
591
|
/**
|
|
@@ -551,6 +602,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
551
602
|
private dispatchDurableDelivery;
|
|
552
603
|
private waitForDurableLaneRelease;
|
|
553
604
|
private spawnConcurrency;
|
|
605
|
+
/** #1685: "elevated" or "critical" while host memory pressure slows or holds new agents; otherwise null (an
|
|
606
|
+
* unknown macOS reading — the advisory case — is unknown, so null too). */
|
|
607
|
+
private hostMemoryIndicator;
|
|
554
608
|
/** Separate cooldown: changing measurements must not create new text-throttle keys. */
|
|
555
609
|
private reportMemoryPressure;
|
|
556
610
|
/** Wire the one fleet-wide storm into notification and recovery surfaces. */
|
|
@@ -586,6 +640,18 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
586
640
|
*/
|
|
587
641
|
isPlannedRestart(): boolean;
|
|
588
642
|
private finishStartup;
|
|
643
|
+
/**
|
|
644
|
+
* We are the post-update fleet: the update is over by definition. Clearing it here (rather than in the update
|
|
645
|
+
* command, which exits before the new fleet is up) is what keeps the quiet window from outliving the restart.
|
|
646
|
+
* #1660 exception: an update still owing its retire outcome keeps its receipt until the cleanup watch resolves it —
|
|
647
|
+
* deleting it here is what lost the warning. Terminal stages are still cleared unconditionally.
|
|
648
|
+
* #1735: and while the watch is armed it owns the marker — even if the outcome landed after the completion posted
|
|
649
|
+
* (a launchd kickstart or a detached restart returns at once, so it can land at any point of the boot): the watch
|
|
650
|
+
* appends it, then clears.
|
|
651
|
+
* #1737 review: and only the marker this boot adopted. One written since — a `/restart full` or a new `/update`
|
|
652
|
+
* landing while this boot's completion was still being edited — belongs to its writer and is left alone.
|
|
653
|
+
*/
|
|
654
|
+
private clearSettledUpdateMarker;
|
|
589
655
|
lastActivityMs(name: string): number;
|
|
590
656
|
/** Capture the current daemon and delivery owner for a background context read. */
|
|
591
657
|
getPaneContextSource(name: string): import("./pane-context-cache.js").PaneContextSource | null;
|
|
@@ -751,6 +817,18 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
751
817
|
getActiveBackendIds(): ReadonlySet<string>;
|
|
752
818
|
isClassicInstance(name: string): boolean;
|
|
753
819
|
/** #1523 N2: a ClassicBot room's own summary for its Details page (classicBot.yaml), or null. */
|
|
820
|
+
/** #1218: the Log tab's on-demand service — made on first use; with `web.log_tab` off it answers off and does nothing. */
|
|
821
|
+
private logService;
|
|
822
|
+
private get log();
|
|
823
|
+
/** #1218: GET /ui/steps — an instance's steps, read on demand (null: no such instance). */
|
|
824
|
+
logSteps(name: string, q: LogQuery): Promise<LogAnswer | null>;
|
|
825
|
+
/**
|
|
826
|
+
* #1218: where an instance's steps are read from, resolved only when its Log asks: the transcript its daemon follows
|
|
827
|
+
* now; for claude-code, also the path its statusline last named (so a stopped instance's Log still shows its last
|
|
828
|
+
* work). kiro: fleet events with the reason its history is not read (kiro-log-gate.ts); other backends have no
|
|
829
|
+
* transcript AgEnD can read.
|
|
830
|
+
*/
|
|
831
|
+
private logSource;
|
|
754
832
|
classicRoomFor(name: string): {
|
|
755
833
|
name: string;
|
|
756
834
|
channel_id: string;
|
|
@@ -826,11 +904,39 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
826
904
|
* already in flight may still land late — the contract permits that.
|
|
827
905
|
*/
|
|
828
906
|
sendClassicWebEcho(instance: string, text: string): Promise<number>;
|
|
829
|
-
|
|
907
|
+
/**
|
|
908
|
+
* #1666: a delivered web chat message starts the same cancel/progress lifecycle in the instance's topic as a platform
|
|
909
|
+
* inbound (afterUserInboundDelivered): the same bubble, ticker and retire rules. Not its ✅ tracking — the web message
|
|
910
|
+
* id is no platform message, and the echo is the fleet's own post. The web send calls this on the echo's lane.
|
|
911
|
+
*/
|
|
912
|
+
startWebChatProgress(instanceName: string): Promise<void>;
|
|
913
|
+
/**
|
|
914
|
+
* `copy: false` (#1666/#1668): an entry that is not a copy of a message — the web send's Cancel/progress bubble. It
|
|
915
|
+
* keeps its place in the order, but the lane's copy rules do not apply to it: its 5 s budget starts when its turn
|
|
916
|
+
* starts (waiting behind a slow echo is not its delay), its own timeout only releases the lane (the copies queued
|
|
917
|
+
* behind it are not "behind an ambiguous copy"), and another entry's timeout never drops it. A copy reserved while
|
|
918
|
+
* any non-copy is still open starts its own budget when the last of them finishes: a slow bubble is no copy's delay,
|
|
919
|
+
* however far back the copy is. And a timeout only ever drops copies reserved AFTER the entry that timed out — with
|
|
920
|
+
* deferred budgets, deadlines no longer grow with the order, so that rule is stated, not implied (#1668 r3).
|
|
921
|
+
*/
|
|
922
|
+
reserveWebChannelEcho(instanceName: string, sendEcho: () => Promise<unknown>, opts?: {
|
|
923
|
+
copy?: boolean;
|
|
924
|
+
}): (accepted: boolean) => void;
|
|
830
925
|
/** Whether this target already has an ordinary non-user delivery in its FIFO. */
|
|
831
926
|
hasPendingIdleGatedDelivery(instanceName: string): boolean;
|
|
832
927
|
/** The running launch's own steer capability (#1405); undefined for a backend without one, or no running Daemon. */
|
|
833
928
|
instanceLaunchSupportsSteer(instanceName: string): boolean | undefined;
|
|
929
|
+
private humanReceiptDaemons;
|
|
930
|
+
/** Cached FM + lifecycle + Daemon + tmux owner; unknown ownership grants nothing. */
|
|
931
|
+
private humanReceiptOwner;
|
|
932
|
+
private listenForHumanReceipt;
|
|
933
|
+
/** Evidence-only admission. Bots/system/agent payloads have no trusted origin. */
|
|
934
|
+
private humanReceiptPayload;
|
|
935
|
+
/** Bind at the actual IPC send, after all wake/reconnect waits. No human retry lane. */
|
|
936
|
+
private bindHumanReceiptPayload;
|
|
937
|
+
deliverHumanToInstance(instanceName: string, payload: Record<string, unknown>, origin: HumanOrigin | undefined, originalBody: string, options?: DeliveryOptions): Promise<boolean | void>;
|
|
938
|
+
/** Synchronous steer/btw handoff, using the same evidence and owner binding. */
|
|
939
|
+
sendHumanControl(instanceName: string, payload: Record<string, unknown>, origin: HumanOrigin | undefined, originalBody: string): boolean;
|
|
834
940
|
/** Single delivery facade: wake paused CLIs and serialize non-user work behind idle. */
|
|
835
941
|
deliverToInstance(instanceName: string, payload: Record<string, unknown>, options?: DeliveryOptions): Promise<boolean | void>;
|
|
836
942
|
/**
|
|
@@ -877,6 +983,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
877
983
|
* the check and the act, so the channel's instance cannot be rebound to another bot in between.
|
|
878
984
|
*/
|
|
879
985
|
private dispatchSlash;
|
|
986
|
+
private dispatchSlashCore;
|
|
880
987
|
/**
|
|
881
988
|
* The door every Discord slash command goes through (src/slash-authz.ts has the rule and the reasoning): the scope
|
|
882
989
|
* it lets the command into, or the reply that refuses it. Synchronous, so the dispatch acts on what it judged.
|
|
@@ -1006,6 +1113,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1006
1113
|
* from restarting the same process twice; backendNameOf defines ownership.
|
|
1007
1114
|
*/
|
|
1008
1115
|
private configuredBackendInstanceNames;
|
|
1116
|
+
/** #1624: migration cannot infer ownership from the running daemon roster.
|
|
1117
|
+
* Stopped/paused ClassicBot entries count too; their workspace is exactly
|
|
1118
|
+
* the one startClassicInstance builds, not this FleetManager's dataDir.
|
|
1119
|
+
*/
|
|
1120
|
+
kiroPeerWorkingDirectories(name: string): string[];
|
|
1009
1121
|
/**
|
|
1010
1122
|
* Probe the same executable set exposed by the web backend catalog.
|
|
1011
1123
|
*
|
|
@@ -1058,12 +1170,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1058
1170
|
/** Last-resort completion after RestartProgress could not deliver to its
|
|
1059
1171
|
* adopted target. It stays bounded and never wakes a not-ready gateway. */
|
|
1060
1172
|
private sendFleetStartCompletionFallback;
|
|
1061
|
-
stopInstance(name: string, transition?: TransitionHandle): Promise<
|
|
1173
|
+
stopInstance(name: string, transition?: TransitionHandle): Promise<{
|
|
1174
|
+
backgroundWorkEnded: boolean;
|
|
1175
|
+
}>;
|
|
1062
1176
|
/** Restart a single instance, reloading fleet.yaml first to pick up config changes. */
|
|
1063
|
-
restartSingleInstance(name: string, opts?:
|
|
1064
|
-
freshStart?: boolean;
|
|
1065
|
-
explicit?: boolean;
|
|
1066
|
-
}): Promise<void>;
|
|
1177
|
+
restartSingleInstance(name: string, opts?: RestartOpts): Promise<void>;
|
|
1067
1178
|
isInstanceRestarting(name: string): boolean;
|
|
1068
1179
|
/** InstanceLifecycleContext: an explicit wake joins the restart in flight. */
|
|
1069
1180
|
restartInFlight(name: string): Promise<void> | undefined;
|
|
@@ -1084,6 +1195,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1084
1195
|
* One-shot: the daemon deletes it on startup.
|
|
1085
1196
|
*/
|
|
1086
1197
|
private writeFreshStartMarker;
|
|
1198
|
+
/**
|
|
1199
|
+
* #1753: a credential-profile switch, between the old CLI's stop and the new one's start. Where the backend can take
|
|
1200
|
+
* the conversation along (claude-code), copy it into the new profile and make it the one `--continue` picks; when that
|
|
1201
|
+
* cannot be done, or the backend cannot, start fresh as before. Null when nothing was tried.
|
|
1202
|
+
*/
|
|
1203
|
+
private switchConversation;
|
|
1087
1204
|
/** Load .env file from data dir into process.env */
|
|
1088
1205
|
private loadEnvFile;
|
|
1089
1206
|
/** Initialize auth before any adapter can answer /dashboard. */
|
|
@@ -1099,11 +1216,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1099
1216
|
ttlMinutes: number;
|
|
1100
1217
|
} | null;
|
|
1101
1218
|
private tunnelPurposeLane;
|
|
1219
|
+
private previewTunnel;
|
|
1102
1220
|
private publicWebLink;
|
|
1221
|
+
/** #1723: the public link's preview tunnel — a manager and lease of its own, never the fleet's one tunnel lane. */
|
|
1222
|
+
private getPreviewTunnel;
|
|
1103
1223
|
private getTunnelLane;
|
|
1104
1224
|
private publicOwnerCurrent;
|
|
1105
1225
|
/** Exact owning General. No primary-adapter or name fallback participates in authorization. */
|
|
1106
1226
|
private dashboardOwner;
|
|
1227
|
+
/**
|
|
1228
|
+
* #1742: the General a fleet admin's DM speaks for (`/start web`): the same owner `/web` in that General would make
|
|
1229
|
+
* — this bot's configured group and its one General topic. No address to match in a DM, so it must be unambiguous:
|
|
1230
|
+
* no General, or more than one on this bot and group, and there is no owner (nothing is guessed).
|
|
1231
|
+
*/
|
|
1232
|
+
private dmDashboardOwner;
|
|
1233
|
+
/**
|
|
1234
|
+
* #1742: a fleet admin whose Telegram `/web` could not reach them privately may next open the bot's DM and press
|
|
1235
|
+
* Telegram's START, which sends a bare `/start` — read as `/start web` (the DM menu) for 10 minutes, once, for that
|
|
1236
|
+
* admin on that bot. Monotonic: a wall-clock jump neither opens nor shuts it.
|
|
1237
|
+
*/
|
|
1238
|
+
private readonly tgWebStartWindows;
|
|
1239
|
+
private openTgWebStartWindow;
|
|
1240
|
+
/** Uses the window up: true when it was open. */
|
|
1241
|
+
private takeTgWebStartWindow;
|
|
1242
|
+
/** #1742: `/start web` from a fleet admin: the /web menu right here in the DM, for the General this bot serves. */
|
|
1243
|
+
private startWebInDm;
|
|
1107
1244
|
private getPublicWebLink;
|
|
1108
1245
|
getPublicWebStatus(): {
|
|
1109
1246
|
state: string;
|
|
@@ -1117,6 +1254,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1117
1254
|
}, current: () => boolean): Promise<void>;
|
|
1118
1255
|
/** Telegram's typed command enters through the same strict owner and nonce path as Discord. */
|
|
1119
1256
|
dashboardMenu(msg: InboundMessage): Promise<void>;
|
|
1257
|
+
/**
|
|
1258
|
+
* #1686: build the Telegram deep-link that opens a DM with this bot pre-seeded with `/start web`.
|
|
1259
|
+
* Returns null when no botUsername is known or the username fails Telegram's format validation.
|
|
1260
|
+
*/
|
|
1261
|
+
private tgStartWebUrl;
|
|
1120
1262
|
private sendLocalDashboard;
|
|
1121
1263
|
/**
|
|
1122
1264
|
* #1586: the sign-in code once more, as a message of its own, so a phone can copy it by itself: Telegram's monospace
|
|
@@ -1126,9 +1268,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1126
1268
|
* A convenience: that message already holds the code, so a follow-up that fails changes nothing about the delivery.
|
|
1127
1269
|
*/
|
|
1128
1270
|
private sendCodeAlone;
|
|
1271
|
+
/**
|
|
1272
|
+
* #1610: re-arm the public link's close prompt on the SAME message — as its confirm step (確定關閉 / 取消) or back as
|
|
1273
|
+
* the close button — with a fresh nonce carrying the same owner gate (owner, requester, exposure, message, adapter),
|
|
1274
|
+
* and swap the message's buttons keyboard-only: its text is the sign-in message, which must stay. A swap that fails
|
|
1275
|
+
* disarms the new nonce and leaves the link open (the General menu and /dashboard revoke still close it).
|
|
1276
|
+
*/
|
|
1277
|
+
private armDashboardCloseStep;
|
|
1129
1278
|
/** Why the DM did not go, for the log only (Discord 50007 = the user does not accept DMs from this server's members). */
|
|
1130
1279
|
private logDashboardDmFailure;
|
|
1131
1280
|
/** False when the menu was not shown (the caller still owes the user an answer). */
|
|
1281
|
+
/**
|
|
1282
|
+
* `dmChatId` (#1742): show it in the owner's own private chat with the bot instead of the General — the owner, its
|
|
1283
|
+
* gates and the code's route are the same; only where the menu sits (and its clicks are good) changes.
|
|
1284
|
+
*/
|
|
1132
1285
|
private showDashboardMenu;
|
|
1133
1286
|
private handleDashboardCallback;
|
|
1134
1287
|
/** `/dashboard revoke`: sign out every browser and withdraw any unused code. */
|
|
@@ -1181,6 +1334,36 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1181
1334
|
private reportFullRestartFailure;
|
|
1182
1335
|
failUpdateProgress(message: string): void;
|
|
1183
1336
|
/** The old fleet edits CLI install stages; the new fleet adopts the same message below. */
|
|
1337
|
+
/**
|
|
1338
|
+
* #1660: arm the post-completion cleanup watch and make sure its monitor
|
|
1339
|
+
* actually runs. The new fleet adopts the receipt at boot but nothing else
|
|
1340
|
+
* starts this timer on that path (Prism a) — without this, the owed
|
|
1341
|
+
* outcome would sit in the marker unwatched. READY never waits for it.
|
|
1342
|
+
*/
|
|
1343
|
+
/**
|
|
1344
|
+
* #1735: what the completion of an adopted update does about its retire outcome, read from the marker as it is now.
|
|
1345
|
+
* Already landed with a warning (a detached restart returns before this fleet boots, so the updater retires first)
|
|
1346
|
+
* → render it in the completion. Still owed (`cleanup: "pending"` — a service restart waits for READY, which comes
|
|
1347
|
+
* after the completion) → watch for it. Anything else (no retire on this update, done silently, another receipt)
|
|
1348
|
+
* → nothing.
|
|
1349
|
+
*/
|
|
1350
|
+
/**
|
|
1351
|
+
* #1716: background work this restart/update ended, scoped to the operation
|
|
1352
|
+
* so an older stop never reports (`sinceAt` null = plain boot, report
|
|
1353
|
+
* nothing). A method — not a module function — because the #1737
|
|
1354
|
+
* extracted-completion harness runs this region verbatim with only
|
|
1355
|
+
* `this`-methods plus a fixed context.
|
|
1356
|
+
*/
|
|
1357
|
+
private collectBackgroundWorkEndedNames;
|
|
1358
|
+
private updateCleanupAtCompletion;
|
|
1359
|
+
private armCleanupWatch;
|
|
1360
|
+
/**
|
|
1361
|
+
* #1660: append a recorded cleanup outcome to the adopted update message,
|
|
1362
|
+
* then release the receipt — but only if this receipt still owns the
|
|
1363
|
+
* marker. The await yields, so a newer receipt (e.g. a full-restart that
|
|
1364
|
+
* landed mid-edit) must not be cleared or disturbed (Prism b).
|
|
1365
|
+
*/
|
|
1366
|
+
private appendCleanupWarning;
|
|
1184
1367
|
private startUpdateProgressMonitor;
|
|
1185
1368
|
/** Start all instances from fleet config */
|
|
1186
1369
|
startAll(configPath: string): Promise<void>;
|
|
@@ -1385,6 +1568,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1385
1568
|
*/
|
|
1386
1569
|
private resolveInboundTarget;
|
|
1387
1570
|
private handleInboundMessage;
|
|
1571
|
+
/**
|
|
1572
|
+
* #1752: the bot that speaks back about an inbound message — in a fleet topic the owning instance's adapter, never
|
|
1573
|
+
* the sibling that happened to win the dedup race; elsewhere (ClassicBot rooms, no routed instance) the receiver.
|
|
1574
|
+
*/
|
|
1575
|
+
private inboundNoticeAdapter;
|
|
1576
|
+
private handleInboundMessageCore;
|
|
1388
1577
|
/** Handle outbound tool calls from a daemon instance */
|
|
1389
1578
|
/** Warn (but don't block) when rate limits are high. 30-min debounce per instance. */
|
|
1390
1579
|
private rateLimitWarnedAt;
|
|
@@ -1426,7 +1615,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1426
1615
|
private isWebOnlyFleet;
|
|
1427
1616
|
/** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
|
|
1428
1617
|
private webOnlyPromptPlace;
|
|
1618
|
+
/** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
|
|
1429
1619
|
private afterReplyRouted;
|
|
1620
|
+
/**
|
|
1621
|
+
* #1770: a reply's files as the web chat shows them. Each is copied into the instance's web-files/ and served from
|
|
1622
|
+
* the copy. One the copy refuses (a symlink, not a regular file, over 50 MB, a state file, missing) is not shown;
|
|
1623
|
+
* one that could not be copied (I/O) is served from the agent's own path, as before — until the fleet restarts.
|
|
1624
|
+
*/
|
|
1625
|
+
private webReplyAttachments;
|
|
1430
1626
|
private handleScheduleTrigger;
|
|
1431
1627
|
/**
|
|
1432
1628
|
* The adapter that can actually post into a chat, found by its group.
|
|
@@ -1668,6 +1864,46 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1668
1864
|
/** Keyed `<connection>\0<server id>`. */
|
|
1669
1865
|
private guildEmojiCache;
|
|
1670
1866
|
private guildEmojiFetches;
|
|
1867
|
+
private webImageCaches;
|
|
1868
|
+
private webImageCache;
|
|
1869
|
+
/**
|
|
1870
|
+
* instance → the connection that is its own bot: configured now (a connection removed from fleet.yaml is nobody's,
|
|
1871
|
+
* whatever an instance still names — #1635 review), not the primary, and answering for it alone.
|
|
1872
|
+
*/
|
|
1873
|
+
private ownBots;
|
|
1874
|
+
/**
|
|
1875
|
+
* The bot a connection is now: its running adapter and that bot's own user id. Everything cached for an own bot is
|
|
1876
|
+
* keyed by both, so a bot put in its place (a token replaced under the same connection id) never shows the old one's
|
|
1877
|
+
* face or colour, and the old one's late answers land under the old key (#1635 review). null while it has no id.
|
|
1878
|
+
*/
|
|
1879
|
+
private botOwner;
|
|
1880
|
+
/** Still the same bot behind `connection` (after an await): the same adapter object and the same bot id. */
|
|
1881
|
+
private botStillOwns;
|
|
1882
|
+
/** keyed `<connection>\0<bot id>\0<channel>`: the bot's colour there, refreshed at most daily (monotonic), one read at a time. */
|
|
1883
|
+
private webAccents;
|
|
1884
|
+
private webAccentReads;
|
|
1885
|
+
private webAccent;
|
|
1886
|
+
/** The cache key of an own bot's avatar, and its loader (which refuses an answer from a bot no longer there). */
|
|
1887
|
+
private botAvatarSource;
|
|
1888
|
+
/** One instance's avatar and ring for the status frame. Synchronous: what is cached now; fetches run behind. */
|
|
1889
|
+
private webIdentityImage;
|
|
1890
|
+
/** GET /ui/img/bot|avatar/<key>: what is cached, never a fetch. Only an own-bot connection, or a known instance's upload. */
|
|
1891
|
+
webImage(kind: "bot" | "avatar", key: string): CachedImage | null;
|
|
1892
|
+
/**
|
|
1893
|
+
* #1682 GET /ui/mentions: names for the mention ids a page found in what it rendered — never a Discord request; in order:
|
|
1894
|
+
* the fleet's bots (an instance's own bot is that instance's label: fleet.yaml, and the View profiles read from
|
|
1895
|
+
* profiles.db, as the status frame does), the people seen on inbound messages, and the Discord adapters' caches
|
|
1896
|
+
* (members, users, roles, channels).
|
|
1897
|
+
*/
|
|
1898
|
+
webMentionNames(query: MentionQuery): MentionNames;
|
|
1899
|
+
/** GET /ui/emojis: the custom emoji of every server the fleet's Discord bots are in (the Settings picker's cache). */
|
|
1900
|
+
webEmojiList(): Promise<Array<{
|
|
1901
|
+
id: string;
|
|
1902
|
+
name: string;
|
|
1903
|
+
animated: boolean;
|
|
1904
|
+
}>>;
|
|
1905
|
+
/** GET /ui/img/emoji/<id>: only an emoji of those servers; fetched once from Discord's CDN, then from the host cache. */
|
|
1906
|
+
webEmoji(id: string): Promise<CachedImage | null>;
|
|
1671
1907
|
/**
|
|
1672
1908
|
* What `instanceName` may pick as its persona emoji (the `list_emojis`
|
|
1673
1909
|
* tool): its current status set with where each value comes from, the
|
|
@@ -1970,6 +2206,19 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1970
2206
|
*/
|
|
1971
2207
|
orgChart(): OrgChart;
|
|
1972
2208
|
private cacheService;
|
|
2209
|
+
/**
|
|
2210
|
+
* #1699: the credential profile an instance's CLI signs in with on `backend` — fleet.yaml's (with its defaults), or a
|
|
2211
|
+
* ClassicBot room's launched or would-be login when the room runs that backend. Null: the backend's default login
|
|
2212
|
+
* (also for a backend that has no profiles, where the option is ignored).
|
|
2213
|
+
*/
|
|
2214
|
+
credentialProfileOf(name: string, backend: string): string | null;
|
|
2215
|
+
/**
|
|
2216
|
+
* #1699: the claude config dir an instance's CLI uses — its credential profile's, else exactly as before
|
|
2217
|
+
* (CLAUDE_CONFIG_DIR or ~/.claude).
|
|
2218
|
+
*/
|
|
2219
|
+
claudeConfigDirOf(name: string): string;
|
|
2220
|
+
/** The instances the cache analysis reads: fleet.yaml's, then the ClassicBot rooms (their workspace under the AgEnD home, their own backend). */
|
|
2221
|
+
private cacheInstances;
|
|
1973
2222
|
/**
|
|
1974
2223
|
* #1468: the prompt-cache expiry analysis for the web, per instance, over `window`. Read from each instance's
|
|
1975
2224
|
* ledger as it is now; the first request starts the bounded, persisted catch-up over the transcripts
|
|
@@ -2042,6 +2291,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2042
2291
|
* synchronous; they never probe the pane.
|
|
2043
2292
|
*/
|
|
2044
2293
|
private clearTargetFence;
|
|
2294
|
+
/** #1806: the web's /backend confirmations — one per question, used once, for the arguments and backend asked about. */
|
|
2295
|
+
private readonly webBackendTokens;
|
|
2045
2296
|
/** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
|
|
2046
2297
|
private readonly webClearTokens;
|
|
2047
2298
|
/** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
|
|
@@ -2105,7 +2356,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2105
2356
|
* Backends with no remote login flow (opencode logs in from a terminal) get
|
|
2106
2357
|
* no button — the alert's own wording already tells them what to run.
|
|
2107
2358
|
*/
|
|
2108
|
-
offerBackendLogin(targetInstance: string, backend: string): Promise<void>;
|
|
2359
|
+
offerBackendLogin(targetInstance: string, backend: string, profile?: string): Promise<void>;
|
|
2109
2360
|
/** Consume a General assist button exactly once. */
|
|
2110
2361
|
private handleInteractivePromptAssist;
|
|
2111
2362
|
/** Send a "🛑 Cancel" button to the instance's topic/channel after delivery. */
|
|
@@ -2338,6 +2589,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2338
2589
|
skipAuthCheck?: boolean;
|
|
2339
2590
|
tokenPresent?: boolean;
|
|
2340
2591
|
tunnel?: boolean;
|
|
2592
|
+
profile?: string;
|
|
2341
2593
|
}): Promise<string | null>;
|
|
2342
2594
|
/** Which way a `/login` went (#1131) — so the event log shows what users actually need. */
|
|
2343
2595
|
private recordLoginFlow;
|
|
@@ -2381,6 +2633,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2381
2633
|
chatId: string;
|
|
2382
2634
|
threadId?: string;
|
|
2383
2635
|
userId?: string;
|
|
2636
|
+
}, signIn?: {
|
|
2637
|
+
profile?: string;
|
|
2384
2638
|
}): Promise<string>;
|
|
2385
2639
|
/** Whether this backend's CLI is on the fleet's PATH (what `/login` installs when it is not). */
|
|
2386
2640
|
isCliInstalled(backend: string): boolean;
|
|
@@ -2497,6 +2751,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2497
2751
|
/** Forward a message to a classic channel instance with chat log context */
|
|
2498
2752
|
private forwardToClassicInstance;
|
|
2499
2753
|
/** Paste raw text directly to a classic instance's CLI (no [user:] wrapping) */
|
|
2754
|
+
/** #1690: our own runtime switches awaiting the daemon's outcome, by id. */
|
|
2755
|
+
private readonly runtimeSwitchWaiters;
|
|
2756
|
+
/**
|
|
2757
|
+
* #1690: type `/model <model>` and wait for what it came to: the daemon answers claude's "Switch model?" for us (Yes
|
|
2758
|
+
* when it names this model, No otherwise) or sees claude's own result. Null when it could not be sent; a timeout is
|
|
2759
|
+
* "not confirmed".
|
|
2760
|
+
*/
|
|
2761
|
+
private runRuntimeModelSwitch;
|
|
2762
|
+
/**
|
|
2763
|
+
* #1690: the names claude-code is known to accept, for checking `/model <name>` BEFORE it is typed — claude itself
|
|
2764
|
+
* accepts any string ("Set model to opsu"), and its "Switch model?" then names the typo. Static aliases (with [1m]),
|
|
2765
|
+
* the cached account catalog, the configured model; without a cached catalog, any `claude-…` id too (cannot check).
|
|
2766
|
+
*/
|
|
2767
|
+
private claudeModelKnown;
|
|
2500
2768
|
private pasteRawToClassicInstance;
|
|
2501
2769
|
/** Resolve the backend name configured for an instance (fleet or classic). */
|
|
2502
2770
|
private backendNameForInstance;
|
|
@@ -2662,6 +2930,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2662
2930
|
*/
|
|
2663
2931
|
applyEffort(instanceName: string, requested: string): Promise<string>;
|
|
2664
2932
|
applyModel(instanceName: string, model: string): Promise<string>;
|
|
2933
|
+
/** Save an instance's model (fleet.yaml, or its ClassicBot channel). False when neither holds it. */
|
|
2934
|
+
private persistInstanceModel;
|
|
2665
2935
|
/**
|
|
2666
2936
|
* The trailing "Current effort: …" line for a /model reply.
|
|
2667
2937
|
*
|
|
@@ -2670,6 +2940,72 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2670
2940
|
* a switch saves the round trip of asking. Empty when the backend has none.
|
|
2671
2941
|
*/
|
|
2672
2942
|
private effortSuffix;
|
|
2943
|
+
/** The steps' view of this fleet (backend-command.ts). `live`: a missing or stale model list may be probed (not on the web). */
|
|
2944
|
+
private backendCommandDeps;
|
|
2945
|
+
/**
|
|
2946
|
+
* `/effort`'s levels for a backend this instance may move to, for the model that will run there (codex's levels are
|
|
2947
|
+
* per model; null: its configured default). Empty: it has no effort setting. A file read, never a CLI.
|
|
2948
|
+
*/
|
|
2949
|
+
backendEffortLevels(instanceName: string, backend: string, model?: string | null): string[];
|
|
2950
|
+
/**
|
|
2951
|
+
* #1808: whether a backend takes this model name — the one rule for /backend and update_instance_config's switch.
|
|
2952
|
+
* The name must be one its launch line can carry (modelNameCarried); then its offered list (the cached CLI env), and
|
|
2953
|
+
* claude-code's known names (without this instance's configured model, which belongs to the backend being left).
|
|
2954
|
+
* With no list known, the backend's usual name pattern decides.
|
|
2955
|
+
*/
|
|
2956
|
+
backendModelVerdict(instanceName: string, backend: string, model: string,
|
|
2957
|
+
/** The provider the backend will run on (default: this instance's own, else the fleet's). */
|
|
2958
|
+
opts?: {
|
|
2959
|
+
provider: string | null;
|
|
2960
|
+
}): {
|
|
2961
|
+
ok: true;
|
|
2962
|
+
} | {
|
|
2963
|
+
ok: false;
|
|
2964
|
+
choices: string[];
|
|
2965
|
+
};
|
|
2966
|
+
/**
|
|
2967
|
+
* #1807 review r2: the model codex's next launch of this instance runs. Every launch's writeConfig copies the SHARED
|
|
2968
|
+
* config.toml into the instance's codex home first, so that source decides — not the home's copy from an earlier
|
|
2969
|
+
* launch. Read-only; a model chosen here (`-c model=…`) outranks it; a project file that could change it, unproven.
|
|
2970
|
+
*/
|
|
2971
|
+
private prospectiveCodexModel;
|
|
2972
|
+
/** #1811: whether a launch of `backend` here would pass a level: the same gate its builder applies. */
|
|
2973
|
+
private launchEffortGate;
|
|
2974
|
+
/** Installed the way the launch finds a CLI (resolveBinary): on PATH or in a known install directory. */
|
|
2975
|
+
private backendInstalledHere;
|
|
2976
|
+
/** The models `/model` would offer on a backend: the cached CLI env, else (live) a bounded probe. Never throws. */
|
|
2977
|
+
private backendModelOptions;
|
|
2978
|
+
/**
|
|
2979
|
+
* #1806 review: the instance a `/backend` was asked about is still this config entry — not one deleted and created
|
|
2980
|
+
* again under the same name, or replaced by a Settings edit (both put a new object there), stopped or not.
|
|
2981
|
+
*/
|
|
2982
|
+
private backendTargetIs;
|
|
2983
|
+
/** `/backend` is for fleet.yaml instances: update_instance_config does not manage a ClassicBot agent. */
|
|
2984
|
+
private backendCommandRefusal;
|
|
2985
|
+
/**
|
|
2986
|
+
* Apply a confirmed `/backend`: judged again first (a menu lives a minute — the backend may have moved, a CLI been
|
|
2987
|
+
* removed), then update_instance_config's write: backend, model and effort at once, refused and rolled back whole
|
|
2988
|
+
* (its credential-profile login gate included), then one fresh relaunch of a running instance.
|
|
2989
|
+
*/
|
|
2990
|
+
applyBackendSwitch(instanceName: string, args: readonly string[], from: string, stillCurrent: () => boolean): Promise<string>;
|
|
2991
|
+
/** A step's buttons: index callbacks (a model id can be longer than Telegram's 64-byte callback data allows). */
|
|
2992
|
+
private backendStepButtons;
|
|
2993
|
+
/**
|
|
2994
|
+
* Show a `/backend` step (a choice, or the confirmation) where the command was given: Discord edits its interaction
|
|
2995
|
+
* reply; Telegram retires the previous step's keyboard and posts the next. One pending entry per step, under a fresh
|
|
2996
|
+
* nonce: a click on an older step finds nothing.
|
|
2997
|
+
*/
|
|
2998
|
+
private presentBackendStep;
|
|
2999
|
+
/** Close a `/backend` menu with a last word: its buttons go (Telegram edits them away), the text stays. Returns where it was said. */
|
|
3000
|
+
private endBackendMenu;
|
|
3001
|
+
/** Start `/backend` for a fleet instance from Discord or Telegram; the caller has checked the channel admin. */
|
|
3002
|
+
private beginBackendCommand;
|
|
3003
|
+
/** `/backend` slash handler: channel admin, as `/model`. Options or typed text give the direct form. */
|
|
3004
|
+
private handleBackendSlash;
|
|
3005
|
+
/** Telegram `/backend` in a fleet topic (topic-commands) or a ClassicBot chat; the caller has checked the admin. */
|
|
3006
|
+
runBackendCommand(instanceName: string, text: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string, adapterId?: string): Promise<void>;
|
|
3007
|
+
/** Consume a `/backend` click: the next step, or on the confirmation the switch itself. True for every backend-select id. */
|
|
3008
|
+
private handleBackendSelection;
|
|
2673
3009
|
/** Read recent chat log for agent context */
|
|
2674
3010
|
private getRecentChatLog;
|
|
2675
3011
|
/**
|
|
@@ -2685,6 +3021,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2685
3021
|
private getMissingBackendWarning;
|
|
2686
3022
|
/** Handle Discord's required static slash choice, warning before a likely startup failure. */
|
|
2687
3023
|
private handleClassicStartSlash;
|
|
3024
|
+
private handleClassicStartSlashCore;
|
|
2688
3025
|
/** Present platform-native backend choices, then start on selection or timeout. */
|
|
2689
3026
|
private beginClassicBackendSelection;
|
|
2690
3027
|
/** Consume a selection callback. Returns true for all ClassicBot callback IDs, including stale ones. */
|
|
@@ -2996,6 +3333,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2996
3333
|
previewForUi(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
|
|
2997
3334
|
boot: string | null;
|
|
2998
3335
|
};
|
|
3336
|
+
/**
|
|
3337
|
+
* #1723: for one page of the public link (exposure `exposureId`, at `dashboardOrigin`): its own preview tunnel's
|
|
3338
|
+
* origin once up, "starting" until then, why it failed if it did — or a configured web.preview_origin, used instead.
|
|
3339
|
+
*/
|
|
3340
|
+
publicPreviewForUi(exposureId: string, dashboardOrigin: string): PublicPreviewForUi;
|
|
2999
3341
|
getUiStatus(): unknown;
|
|
3000
3342
|
private getUiStatusSync;
|
|
3001
3343
|
}
|