@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
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,7 +52,13 @@ 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";
|
|
60
|
+
import { type WebAccount } from "./web-profile.js";
|
|
61
|
+
import type { WebPerson as WebPersonView } from "./web-api.js";
|
|
55
62
|
import { ReplyButtonsController } from "./reply-buttons-controller.js";
|
|
56
63
|
import { WebFileLedger } from "./web-upload.js";
|
|
57
64
|
import { type CachedImage } from "./web-images.js";
|
|
@@ -60,6 +67,7 @@ import { type AgentEndpointContext } from "./agent-endpoint.js";
|
|
|
60
67
|
import { ClassicChannelManager } from "./classic-channel-manager.js";
|
|
61
68
|
import { type ExplicitInstanceRemoval } from "./instance-removal.js";
|
|
62
69
|
import type { InstanceState, InteractionSnapshot } from "./backend/types.js";
|
|
70
|
+
import { type Daemon } from "./daemon.js";
|
|
63
71
|
import { WakeCoordinator } from "./wake-coordinator.js";
|
|
64
72
|
import { TargetQueueWorker } from "./target-queue-worker.js";
|
|
65
73
|
import { resolveDeliveryWorkerMode } from "./types.js";
|
|
@@ -72,6 +80,7 @@ import { type PreviewAvailability } from "./web-preview.js";
|
|
|
72
80
|
import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
|
|
73
81
|
import { type ProviderSecretStatus } from "./provider-secret-registry.js";
|
|
74
82
|
import { ApplyJobStore, type ApplyJob, type ApplyTargetKind, type SelfRestartResult } from "./apply-job.js";
|
|
83
|
+
import { type CarryResult } from "./backend/claude-carry.js";
|
|
75
84
|
import { StormWindow } from "./storm-window.js";
|
|
76
85
|
import { SpawnGate } from "./spawn-gate.js";
|
|
77
86
|
import { BackendOutageTracker } from "./backend-outage.js";
|
|
@@ -99,6 +108,17 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
|
|
|
99
108
|
* must match here, or a deleted instance's CLI is left running (#1305 P2-3).
|
|
100
109
|
*/
|
|
101
110
|
export declare function isOrphanInstanceWindowName(name: string): boolean;
|
|
111
|
+
/** restartSingleInstance's options. `carry` (#1753): a credential-profile switch; its outcome is written into `result`. */
|
|
112
|
+
export interface RestartOpts {
|
|
113
|
+
freshStart?: boolean;
|
|
114
|
+
explicit?: boolean;
|
|
115
|
+
carry?: {
|
|
116
|
+
backend: string;
|
|
117
|
+
from: string | null;
|
|
118
|
+
to: string | null;
|
|
119
|
+
result?: CarryResult | null;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
102
122
|
/**
|
|
103
123
|
* Answer shape for `list_models`. `scope` reports where the LIST came from —
|
|
104
124
|
* "instance" only when it was read through that instance's own backend config,
|
|
@@ -159,6 +179,8 @@ export declare const LOGIN_CALLBACK_PREFIX = "login:";
|
|
|
159
179
|
* and hides exactly the newly released model the user opened `/model` to find.
|
|
160
180
|
* The wait is announced before it starts, so it reads as progress, not a stall.
|
|
161
181
|
*/
|
|
182
|
+
/** #1690: how long `/model` waits for the daemon's word on our own runtime switch (its dialog wait plus settling). */
|
|
183
|
+
export declare const RUNTIME_SWITCH_RESULT_MS = 12000;
|
|
162
184
|
export declare const CLI_ENV_PROBE_DEADLINE_MS = 16000;
|
|
163
185
|
/**
|
|
164
186
|
* How many CLIs may cold-start at once, from BOTH memory and cores.
|
|
@@ -201,7 +223,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
201
223
|
private replyObligationTimer;
|
|
202
224
|
private readonly activeDurableTargets;
|
|
203
225
|
/** Live view of lifecycle.daemons — used throughout; not deprecated. */
|
|
204
|
-
get daemons(): Map<string,
|
|
226
|
+
get daemons(): Map<string, Daemon>;
|
|
205
227
|
fleetConfig: FleetConfig | null;
|
|
206
228
|
private rawFleetConfig;
|
|
207
229
|
private rawFleetDocument;
|
|
@@ -300,6 +322,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
300
322
|
private webChannelEchoGuards;
|
|
301
323
|
/** instanceName → restart currently executing; concurrent callers join it. */
|
|
302
324
|
private restartsInFlight;
|
|
325
|
+
/**
|
|
326
|
+
* #1753: each in-flight restart's stop → start gap — the conversation carry it will run there (its own, or one a later
|
|
327
|
+
* caller joined with before the gap), and whether the gap has been reached.
|
|
328
|
+
*/
|
|
329
|
+
private readonly restartGaps;
|
|
303
330
|
/**
|
|
304
331
|
* Delayed automatic retries for instances whose startup failed. Before this a
|
|
305
332
|
* failed start was logged once and the instance stayed `stopped` until an
|
|
@@ -334,6 +361,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
334
361
|
/** In-flight /effort selections, same coordinator shape as pendingModelSelects. */
|
|
335
362
|
private pendingEffortSelects;
|
|
336
363
|
private pendingModelSelects;
|
|
364
|
+
/** #1806: in-flight /backend steps, keyed by nonce (see handleBackendSelection). */
|
|
365
|
+
private pendingBackendSelects;
|
|
337
366
|
/** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
|
|
338
367
|
private pendingNonceButtons;
|
|
339
368
|
/** #1386 "Needs you": the list, its live chat messages and Acknowledge. Started with the fleet (finishStartup). */
|
|
@@ -398,6 +427,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
398
427
|
private connectionBindingInFlight;
|
|
399
428
|
private collabInstances;
|
|
400
429
|
private healthServer;
|
|
430
|
+
private healthServerDrain;
|
|
401
431
|
/** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
|
|
402
432
|
private previewListener;
|
|
403
433
|
private previewListening;
|
|
@@ -409,7 +439,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
409
439
|
private updateProgressTimer;
|
|
410
440
|
private updateProgressEditRunning;
|
|
411
441
|
private lastUpdateProgressText;
|
|
412
|
-
|
|
442
|
+
/**
|
|
443
|
+
* #1660: an adopted update whose retire outcome is still owed. The
|
|
444
|
+
* completion summary was (or will be) posted; this watch appends the
|
|
445
|
+
* cleanup outcome to the same receipt instead of letting stage edits
|
|
446
|
+
* clobber it — and refuses a receipt that no longer matches (checklist 3/5).
|
|
447
|
+
*/
|
|
448
|
+
private updateCleanupWatch;
|
|
413
449
|
/** Injectable only to keep the chat→CLI reload hand-off deterministic in tests. */
|
|
414
450
|
private fullRestartLauncher;
|
|
415
451
|
private eventLogPruneTimer;
|
|
@@ -429,8 +465,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
429
465
|
private memoryLogAt;
|
|
430
466
|
private memoryDebugAt;
|
|
431
467
|
private memoryLogLevel;
|
|
432
|
-
|
|
433
|
-
private
|
|
468
|
+
/** #1685: the host_memory value the last status frame carried, so a change re-sends the frame. */
|
|
469
|
+
private memoryIndicatorShown;
|
|
434
470
|
private mirrorBuffer;
|
|
435
471
|
private mirrorTimer;
|
|
436
472
|
private sseClients;
|
|
@@ -440,6 +476,43 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
440
476
|
private webChatStore;
|
|
441
477
|
/** Uploaded files and the files the dashboard may fetch back (uploads, reply attachments). */
|
|
442
478
|
readonly webFiles: WebFileLedger;
|
|
479
|
+
/** #1770: per instance, its last web reply still copying its files — the next one is shown after it, in order. */
|
|
480
|
+
private readonly webReplyOrder;
|
|
481
|
+
/** #1770: an instance's web-files byte cap (a field, so a test can make it small). */
|
|
482
|
+
private webReplyMaxBytes;
|
|
483
|
+
/** #1682: the people seen on inbound messages (id → name), for the web chat's mention pills; bounded, in memory. */
|
|
484
|
+
readonly seenUsers: SeenUsers;
|
|
485
|
+
private webPrefsStore?;
|
|
486
|
+
/** #1665: the web preferences kept on the host (<home>/web-prefs.json), read on first use. */
|
|
487
|
+
/**
|
|
488
|
+
* #1827: a web person as agents and chats see them. Signed in as an account (a sign-in code DMed to it): that
|
|
489
|
+
* account's user id — still `via web`, and only for recognition — and the name they chose, else their account's name
|
|
490
|
+
* at sign-in (made safe). Otherwise (an `agend web` session): "web-user", as before, under a name the operator may set.
|
|
491
|
+
* Names are checked again now: one an instance or bot has taken since reads as the next choice down.
|
|
492
|
+
*/
|
|
493
|
+
webPerson(owner?: WebAccount): WebPersonView;
|
|
494
|
+
/** #1827: set (null: clear — back to their account's name) a web person's own name; validated in full. */
|
|
495
|
+
setWebPersonName(owner: WebAccount | undefined, raw: unknown): {
|
|
496
|
+
ok: true;
|
|
497
|
+
person: WebPersonView;
|
|
498
|
+
} | {
|
|
499
|
+
ok: false;
|
|
500
|
+
status: number;
|
|
501
|
+
error: string;
|
|
502
|
+
};
|
|
503
|
+
/** #1827 (auth-api): a sign-in as this account — its display name then is the web name it starts with. */
|
|
504
|
+
noteWebSignIn(account: {
|
|
505
|
+
adapterId: string;
|
|
506
|
+
userId: string;
|
|
507
|
+
username?: string;
|
|
508
|
+
}): void;
|
|
509
|
+
/**
|
|
510
|
+
* #1827: a name that belongs to something here — an instance (or ClassicBot room), its display name, a bot. On the web
|
|
511
|
+
* send path: it never throws (a lookup that fails reserves nothing; the name was checked in full when it was set).
|
|
512
|
+
*/
|
|
513
|
+
private webNameReserved;
|
|
514
|
+
private webNameTaken;
|
|
515
|
+
get webPrefs(): WebPrefsStore;
|
|
443
516
|
/**
|
|
444
517
|
* Read from disk on every access rather than cached at startup: `agend
|
|
445
518
|
* web-token rotate` runs in a separate process, and a cached copy would keep
|
|
@@ -501,6 +574,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
501
574
|
*/
|
|
502
575
|
replyButtons(): ReplyButtonsController | null;
|
|
503
576
|
private replyButtonsStore;
|
|
577
|
+
/**
|
|
578
|
+
* #1823: a closed poll's results go to its instance through the delivery outbox, as a system notice keyed by the
|
|
579
|
+
* poll: durable (held until the instance can take it) and admitted once, however often this is asked. Addressed to
|
|
580
|
+
* the poll's chat, so the instance's answer (the right option, the scores) goes there.
|
|
581
|
+
*/
|
|
582
|
+
private admitPollResults;
|
|
504
583
|
/**
|
|
505
584
|
* #1266: who may answer a reply's buttons on a platform — whoever may message that instance there: in a ClassicBot
|
|
506
585
|
* room anyone there (as a typed message), elsewhere someone the sending connection lets speak (#754/#1148), never a
|
|
@@ -520,10 +599,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
520
599
|
kind: string;
|
|
521
600
|
correlationId: string;
|
|
522
601
|
payload: Record<string, unknown>;
|
|
602
|
+
forwards?: readonly string[];
|
|
603
|
+
requestedKind?: string;
|
|
523
604
|
}): {
|
|
524
605
|
deliveryId: string;
|
|
525
606
|
state: string;
|
|
526
607
|
duplicate: boolean;
|
|
608
|
+
kind: string;
|
|
527
609
|
};
|
|
528
610
|
queryDurableDeliveryStatus(callerInstance: string, selector: DeliveryStatusSelector): DeliveryStatusPage;
|
|
529
611
|
/** #1641: why a target is not taking queued work right now, or null when nothing known holds it. */
|
|
@@ -538,6 +620,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
538
620
|
* notice when the owner is not working and nothing came back in time.
|
|
539
621
|
*/
|
|
540
622
|
sweepReplyObligations(now?: Date): void;
|
|
623
|
+
private expireReplyObligations;
|
|
541
624
|
private scheduleDeliveryOutboxPump;
|
|
542
625
|
private runDeliveryOutboxPump;
|
|
543
626
|
/**
|
|
@@ -554,6 +637,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
554
637
|
private dispatchDurableDelivery;
|
|
555
638
|
private waitForDurableLaneRelease;
|
|
556
639
|
private spawnConcurrency;
|
|
640
|
+
/** #1685: "elevated" or "critical" while host memory pressure slows or holds new agents; otherwise null (an
|
|
641
|
+
* unknown macOS reading — the advisory case — is unknown, so null too). */
|
|
642
|
+
private hostMemoryIndicator;
|
|
557
643
|
/** Separate cooldown: changing measurements must not create new text-throttle keys. */
|
|
558
644
|
private reportMemoryPressure;
|
|
559
645
|
/** Wire the one fleet-wide storm into notification and recovery surfaces. */
|
|
@@ -589,6 +675,18 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
589
675
|
*/
|
|
590
676
|
isPlannedRestart(): boolean;
|
|
591
677
|
private finishStartup;
|
|
678
|
+
/**
|
|
679
|
+
* We are the post-update fleet: the update is over by definition. Clearing it here (rather than in the update
|
|
680
|
+
* command, which exits before the new fleet is up) is what keeps the quiet window from outliving the restart.
|
|
681
|
+
* #1660 exception: an update still owing its retire outcome keeps its receipt until the cleanup watch resolves it —
|
|
682
|
+
* deleting it here is what lost the warning. Terminal stages are still cleared unconditionally.
|
|
683
|
+
* #1735: and while the watch is armed it owns the marker — even if the outcome landed after the completion posted
|
|
684
|
+
* (a launchd kickstart or a detached restart returns at once, so it can land at any point of the boot): the watch
|
|
685
|
+
* appends it, then clears.
|
|
686
|
+
* #1737 review: and only the marker this boot adopted. One written since — a `/restart full` or a new `/update`
|
|
687
|
+
* landing while this boot's completion was still being edited — belongs to its writer and is left alone.
|
|
688
|
+
*/
|
|
689
|
+
private clearSettledUpdateMarker;
|
|
592
690
|
lastActivityMs(name: string): number;
|
|
593
691
|
/** Capture the current daemon and delivery owner for a background context read. */
|
|
594
692
|
getPaneContextSource(name: string): import("./pane-context-cache.js").PaneContextSource | null;
|
|
@@ -754,6 +852,21 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
754
852
|
getActiveBackendIds(): ReadonlySet<string>;
|
|
755
853
|
isClassicInstance(name: string): boolean;
|
|
756
854
|
/** #1523 N2: a ClassicBot room's own summary for its Details page (classicBot.yaml), or null. */
|
|
855
|
+
/** #1218: the Log tab's on-demand service — made on first use; with `web.log_tab` off it answers off and does nothing. */
|
|
856
|
+
private logService;
|
|
857
|
+
private get log();
|
|
858
|
+
/** Board 003648ac: a web /compact followed to its end, from the transcript the Log reads (none: nothing to follow). */
|
|
859
|
+
private compactWatchService;
|
|
860
|
+
private get compactWatch();
|
|
861
|
+
/** #1218: GET /ui/steps — an instance's steps, read on demand (null: no such instance). */
|
|
862
|
+
logSteps(name: string, q: LogQuery): Promise<LogAnswer | null>;
|
|
863
|
+
/**
|
|
864
|
+
* #1218: where an instance's steps are read from, resolved only when its Log asks: the transcript its daemon follows
|
|
865
|
+
* now; for claude-code, also the path its statusline last named (so a stopped instance's Log still shows its last
|
|
866
|
+
* work). kiro: fleet events with the reason its history is not read (kiro-log-gate.ts); other backends have no
|
|
867
|
+
* transcript AgEnD can read.
|
|
868
|
+
*/
|
|
869
|
+
private logSource;
|
|
757
870
|
classicRoomFor(name: string): {
|
|
758
871
|
name: string;
|
|
759
872
|
channel_id: string;
|
|
@@ -828,12 +941,41 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
828
941
|
* or a rebound adapter is never posted through a stale route. A copy
|
|
829
942
|
* already in flight may still land late — the contract permits that.
|
|
830
943
|
*/
|
|
831
|
-
|
|
832
|
-
|
|
944
|
+
/** `sender` (#1827): the web person's name, as the room log records them ("web-user" when none). */
|
|
945
|
+
sendClassicWebEcho(instance: string, text: string, sender?: string): Promise<number>;
|
|
946
|
+
/**
|
|
947
|
+
* #1666: a delivered web chat message starts the same cancel/progress lifecycle in the instance's topic as a platform
|
|
948
|
+
* inbound (afterUserInboundDelivered): the same bubble, ticker and retire rules. Not its ✅ tracking — the web message
|
|
949
|
+
* id is no platform message, and the echo is the fleet's own post. The web send calls this on the echo's lane.
|
|
950
|
+
*/
|
|
951
|
+
startWebChatProgress(instanceName: string): Promise<void>;
|
|
952
|
+
/**
|
|
953
|
+
* `copy: false` (#1666/#1668): an entry that is not a copy of a message — the web send's Cancel/progress bubble. It
|
|
954
|
+
* 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
|
|
955
|
+
* starts (waiting behind a slow echo is not its delay), its own timeout only releases the lane (the copies queued
|
|
956
|
+
* behind it are not "behind an ambiguous copy"), and another entry's timeout never drops it. A copy reserved while
|
|
957
|
+
* any non-copy is still open starts its own budget when the last of them finishes: a slow bubble is no copy's delay,
|
|
958
|
+
* however far back the copy is. And a timeout only ever drops copies reserved AFTER the entry that timed out — with
|
|
959
|
+
* deferred budgets, deadlines no longer grow with the order, so that rule is stated, not implied (#1668 r3).
|
|
960
|
+
*/
|
|
961
|
+
reserveWebChannelEcho(instanceName: string, sendEcho: () => Promise<unknown>, opts?: {
|
|
962
|
+
copy?: boolean;
|
|
963
|
+
}): (accepted: boolean) => void;
|
|
833
964
|
/** Whether this target already has an ordinary non-user delivery in its FIFO. */
|
|
834
965
|
hasPendingIdleGatedDelivery(instanceName: string): boolean;
|
|
835
966
|
/** The running launch's own steer capability (#1405); undefined for a backend without one, or no running Daemon. */
|
|
836
967
|
instanceLaunchSupportsSteer(instanceName: string): boolean | undefined;
|
|
968
|
+
private humanReceiptDaemons;
|
|
969
|
+
/** Cached FM + lifecycle + Daemon + tmux owner; unknown ownership grants nothing. */
|
|
970
|
+
private humanReceiptOwner;
|
|
971
|
+
private listenForHumanReceipt;
|
|
972
|
+
/** Evidence-only admission. Bots/system/agent payloads have no trusted origin. */
|
|
973
|
+
private humanReceiptPayload;
|
|
974
|
+
/** Bind at the actual IPC send, after all wake/reconnect waits. No human retry lane. */
|
|
975
|
+
private bindHumanReceiptPayload;
|
|
976
|
+
deliverHumanToInstance(instanceName: string, payload: Record<string, unknown>, origin: HumanOrigin | undefined, originalBody: string, options?: DeliveryOptions): Promise<boolean | void>;
|
|
977
|
+
/** Synchronous steer/btw handoff, using the same evidence and owner binding. */
|
|
978
|
+
sendHumanControl(instanceName: string, payload: Record<string, unknown>, origin: HumanOrigin | undefined, originalBody: string): boolean;
|
|
837
979
|
/** Single delivery facade: wake paused CLIs and serialize non-user work behind idle. */
|
|
838
980
|
deliverToInstance(instanceName: string, payload: Record<string, unknown>, options?: DeliveryOptions): Promise<boolean | void>;
|
|
839
981
|
/**
|
|
@@ -853,6 +995,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
853
995
|
isFleetAdmin(userId: string, adapterId?: string): boolean;
|
|
854
996
|
/** Whether this adapter has any fleet admin at all (an empty allowlist means the admin commands are off). */
|
|
855
997
|
hasFleetAdmins(adapterId?: string): boolean;
|
|
998
|
+
/**
|
|
999
|
+
* Where this adapter's fleet-admin list is in fleet.yaml, as the operator wrote it, for the "disabled" replies:
|
|
1000
|
+
* `channel.access.allowed_users` (the single-channel form), else the `channels:` entry — by its `id:`, or its
|
|
1001
|
+
* `type:` when it has none. Read from the raw file: loading turns `channel:` into `channels` and fills in ids.
|
|
1002
|
+
*/
|
|
1003
|
+
adminListKey(adapterId?: string): string;
|
|
856
1004
|
/**
|
|
857
1005
|
* The one question the privileged commands (/update, /doctor, /dashboard, /collab) ask: may THIS caller,
|
|
858
1006
|
* through THIS adapter, run it. `disabled` is "nobody can" — an empty list — and is told apart from
|
|
@@ -880,6 +1028,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
880
1028
|
* the check and the act, so the channel's instance cannot be rebound to another bot in between.
|
|
881
1029
|
*/
|
|
882
1030
|
private dispatchSlash;
|
|
1031
|
+
private dispatchSlashCore;
|
|
883
1032
|
/**
|
|
884
1033
|
* The door every Discord slash command goes through (src/slash-authz.ts has the rule and the reasoning): the scope
|
|
885
1034
|
* it lets the command into, or the reply that refuses it. Synchronous, so the dispatch acts on what it judged.
|
|
@@ -1066,12 +1215,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1066
1215
|
/** Last-resort completion after RestartProgress could not deliver to its
|
|
1067
1216
|
* adopted target. It stays bounded and never wakes a not-ready gateway. */
|
|
1068
1217
|
private sendFleetStartCompletionFallback;
|
|
1069
|
-
stopInstance(name: string, transition?: TransitionHandle): Promise<
|
|
1218
|
+
stopInstance(name: string, transition?: TransitionHandle): Promise<{
|
|
1219
|
+
backgroundWorkEnded: boolean;
|
|
1220
|
+
}>;
|
|
1070
1221
|
/** Restart a single instance, reloading fleet.yaml first to pick up config changes. */
|
|
1071
|
-
restartSingleInstance(name: string, opts?:
|
|
1072
|
-
freshStart?: boolean;
|
|
1073
|
-
explicit?: boolean;
|
|
1074
|
-
}): Promise<void>;
|
|
1222
|
+
restartSingleInstance(name: string, opts?: RestartOpts): Promise<void>;
|
|
1075
1223
|
isInstanceRestarting(name: string): boolean;
|
|
1076
1224
|
/** InstanceLifecycleContext: an explicit wake joins the restart in flight. */
|
|
1077
1225
|
restartInFlight(name: string): Promise<void> | undefined;
|
|
@@ -1092,6 +1240,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1092
1240
|
* One-shot: the daemon deletes it on startup.
|
|
1093
1241
|
*/
|
|
1094
1242
|
private writeFreshStartMarker;
|
|
1243
|
+
/**
|
|
1244
|
+
* #1753: a credential-profile switch, between the old CLI's stop and the new one's start. Where the backend can take
|
|
1245
|
+
* the conversation along (claude-code), copy it into the new profile and make it the one `--continue` picks; when that
|
|
1246
|
+
* cannot be done, or the backend cannot, start fresh as before. Null when nothing was tried.
|
|
1247
|
+
*/
|
|
1248
|
+
private switchConversation;
|
|
1095
1249
|
/** Load .env file from data dir into process.env */
|
|
1096
1250
|
private loadEnvFile;
|
|
1097
1251
|
/** Initialize auth before any adapter can answer /dashboard. */
|
|
@@ -1107,11 +1261,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1107
1261
|
ttlMinutes: number;
|
|
1108
1262
|
} | null;
|
|
1109
1263
|
private tunnelPurposeLane;
|
|
1264
|
+
private previewTunnel;
|
|
1110
1265
|
private publicWebLink;
|
|
1266
|
+
/** #1723: the public link's preview tunnel — a manager and lease of its own, never the fleet's one tunnel lane. */
|
|
1267
|
+
private getPreviewTunnel;
|
|
1111
1268
|
private getTunnelLane;
|
|
1112
1269
|
private publicOwnerCurrent;
|
|
1113
1270
|
/** Exact owning General. No primary-adapter or name fallback participates in authorization. */
|
|
1114
1271
|
private dashboardOwner;
|
|
1272
|
+
/**
|
|
1273
|
+
* #1742: the General a fleet admin's DM speaks for (`/start web`): the same owner `/web` in that General would make
|
|
1274
|
+
* — this bot's configured group and its one General topic. No address to match in a DM, so it must be unambiguous:
|
|
1275
|
+
* no General, or more than one on this bot and group, and there is no owner (nothing is guessed).
|
|
1276
|
+
*/
|
|
1277
|
+
private dmDashboardOwner;
|
|
1278
|
+
/**
|
|
1279
|
+
* #1742: a fleet admin whose Telegram `/web` could not reach them privately may next open the bot's DM and press
|
|
1280
|
+
* Telegram's START, which sends a bare `/start` — read as `/start web` (the DM menu) for 10 minutes, once, for that
|
|
1281
|
+
* admin on that bot. Monotonic: a wall-clock jump neither opens nor shuts it.
|
|
1282
|
+
*/
|
|
1283
|
+
private readonly tgWebStartWindows;
|
|
1284
|
+
private openTgWebStartWindow;
|
|
1285
|
+
/** Uses the window up: true when it was open. */
|
|
1286
|
+
private takeTgWebStartWindow;
|
|
1287
|
+
/** #1742: `/start web` from a fleet admin: the /web menu right here in the DM, for the General this bot serves. */
|
|
1288
|
+
private startWebInDm;
|
|
1115
1289
|
private getPublicWebLink;
|
|
1116
1290
|
getPublicWebStatus(): {
|
|
1117
1291
|
state: string;
|
|
@@ -1125,6 +1299,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1125
1299
|
}, current: () => boolean): Promise<void>;
|
|
1126
1300
|
/** Telegram's typed command enters through the same strict owner and nonce path as Discord. */
|
|
1127
1301
|
dashboardMenu(msg: InboundMessage): Promise<void>;
|
|
1302
|
+
/**
|
|
1303
|
+
* #1686: build the Telegram deep-link that opens a DM with this bot pre-seeded with `/start web`.
|
|
1304
|
+
* Returns null when no botUsername is known or the username fails Telegram's format validation.
|
|
1305
|
+
*/
|
|
1306
|
+
private tgStartWebUrl;
|
|
1128
1307
|
private sendLocalDashboard;
|
|
1129
1308
|
/**
|
|
1130
1309
|
* #1586: the sign-in code once more, as a message of its own, so a phone can copy it by itself: Telegram's monospace
|
|
@@ -1144,6 +1323,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1144
1323
|
/** Why the DM did not go, for the log only (Discord 50007 = the user does not accept DMs from this server's members). */
|
|
1145
1324
|
private logDashboardDmFailure;
|
|
1146
1325
|
/** False when the menu was not shown (the caller still owes the user an answer). */
|
|
1326
|
+
/**
|
|
1327
|
+
* `dmChatId` (#1742): show it in the owner's own private chat with the bot instead of the General — the owner, its
|
|
1328
|
+
* gates and the code's route are the same; only where the menu sits (and its clicks are good) changes.
|
|
1329
|
+
*/
|
|
1147
1330
|
private showDashboardMenu;
|
|
1148
1331
|
private handleDashboardCallback;
|
|
1149
1332
|
/** `/dashboard revoke`: sign out every browser and withdraw any unused code. */
|
|
@@ -1196,6 +1379,36 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1196
1379
|
private reportFullRestartFailure;
|
|
1197
1380
|
failUpdateProgress(message: string): void;
|
|
1198
1381
|
/** The old fleet edits CLI install stages; the new fleet adopts the same message below. */
|
|
1382
|
+
/**
|
|
1383
|
+
* #1660: arm the post-completion cleanup watch and make sure its monitor
|
|
1384
|
+
* actually runs. The new fleet adopts the receipt at boot but nothing else
|
|
1385
|
+
* starts this timer on that path (Prism a) — without this, the owed
|
|
1386
|
+
* outcome would sit in the marker unwatched. READY never waits for it.
|
|
1387
|
+
*/
|
|
1388
|
+
/**
|
|
1389
|
+
* #1735: what the completion of an adopted update does about its retire outcome, read from the marker as it is now.
|
|
1390
|
+
* Already landed with a warning (a detached restart returns before this fleet boots, so the updater retires first)
|
|
1391
|
+
* → render it in the completion. Still owed (`cleanup: "pending"` — a service restart waits for READY, which comes
|
|
1392
|
+
* after the completion) → watch for it. Anything else (no retire on this update, done silently, another receipt)
|
|
1393
|
+
* → nothing.
|
|
1394
|
+
*/
|
|
1395
|
+
/**
|
|
1396
|
+
* #1716: background work this restart/update ended, scoped to the operation
|
|
1397
|
+
* so an older stop never reports (`sinceAt` null = plain boot, report
|
|
1398
|
+
* nothing). A method — not a module function — because the #1737
|
|
1399
|
+
* extracted-completion harness runs this region verbatim with only
|
|
1400
|
+
* `this`-methods plus a fixed context.
|
|
1401
|
+
*/
|
|
1402
|
+
private collectBackgroundWorkEndedNames;
|
|
1403
|
+
private updateCleanupAtCompletion;
|
|
1404
|
+
private armCleanupWatch;
|
|
1405
|
+
/**
|
|
1406
|
+
* #1660: append a recorded cleanup outcome to the adopted update message,
|
|
1407
|
+
* then release the receipt — but only if this receipt still owns the
|
|
1408
|
+
* marker. The await yields, so a newer receipt (e.g. a full-restart that
|
|
1409
|
+
* landed mid-edit) must not be cleared or disturbed (Prism b).
|
|
1410
|
+
*/
|
|
1411
|
+
private appendCleanupWarning;
|
|
1199
1412
|
private startUpdateProgressMonitor;
|
|
1200
1413
|
/** Start all instances from fleet config */
|
|
1201
1414
|
startAll(configPath: string): Promise<void>;
|
|
@@ -1400,6 +1613,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1400
1613
|
*/
|
|
1401
1614
|
private resolveInboundTarget;
|
|
1402
1615
|
private handleInboundMessage;
|
|
1616
|
+
/**
|
|
1617
|
+
* #1752: the bot that speaks back about an inbound message — in a fleet topic the owning instance's adapter, never
|
|
1618
|
+
* the sibling that happened to win the dedup race; elsewhere (ClassicBot rooms, no routed instance) the receiver.
|
|
1619
|
+
*/
|
|
1620
|
+
private inboundNoticeAdapter;
|
|
1621
|
+
private handleInboundMessageCore;
|
|
1403
1622
|
/** Handle outbound tool calls from a daemon instance */
|
|
1404
1623
|
/** Warn (but don't block) when rate limits are high. 30-min debounce per instance. */
|
|
1405
1624
|
private rateLimitWarnedAt;
|
|
@@ -1441,7 +1660,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1441
1660
|
private isWebOnlyFleet;
|
|
1442
1661
|
/** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
|
|
1443
1662
|
private webOnlyPromptPlace;
|
|
1663
|
+
/** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
|
|
1444
1664
|
private afterReplyRouted;
|
|
1665
|
+
/**
|
|
1666
|
+
* #1770: a reply's files as the web chat shows them. Each is copied into the instance's web-files/ and served from
|
|
1667
|
+
* the copy. One the copy refuses (a symlink, not a regular file, over 50 MB, a state file, missing) is not shown;
|
|
1668
|
+
* one that could not be copied (I/O) is served from the agent's own path, as before — until the fleet restarts.
|
|
1669
|
+
*/
|
|
1670
|
+
private webReplyAttachments;
|
|
1445
1671
|
private handleScheduleTrigger;
|
|
1446
1672
|
/**
|
|
1447
1673
|
* The adapter that can actually post into a chat, found by its group.
|
|
@@ -1603,6 +1829,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1603
1829
|
saveFleetConfig(explicitPatches?: RawConfigPatch[]): void;
|
|
1604
1830
|
/** Why the config written to `candidate` must not replace fleet.yaml, or null: it does not load, or it adds errors. */
|
|
1605
1831
|
private savedFleetConfigProblem;
|
|
1832
|
+
/**
|
|
1833
|
+
* #1874 follow-up: the validator's warnings, once per start, in daemon.log — a setting fleet.yaml has that AgEnD
|
|
1834
|
+
* ignores (e.g. `web.access`) is otherwise silent unless someone runs `agend validate`.
|
|
1835
|
+
*/
|
|
1836
|
+
private logConfigWarningsAtStartup;
|
|
1606
1837
|
/** One-time upgrade migration; invalid YAML is never rewritten. */
|
|
1607
1838
|
private slimFleetConfigAtStartup;
|
|
1608
1839
|
private writeFleetConfigBackup;
|
|
@@ -1686,9 +1917,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1686
1917
|
private webImageCaches;
|
|
1687
1918
|
private webImageCache;
|
|
1688
1919
|
/**
|
|
1689
|
-
*
|
|
1690
|
-
* whatever an instance still names — #1635 review)
|
|
1920
|
+
* The bots instances and ClassicBot rooms speak through, by connections configured now (a connection removed from
|
|
1921
|
+
* fleet.yaml is nobody's, whatever an instance still names — #1635 review). `own`: instance → its own bot (answering
|
|
1922
|
+
* for it alone; the primary too, when it serves one instance only). `speaking` (#1867): instance → the bot it speaks through — its own, a shared one,
|
|
1923
|
+
* or, with none configured for it, the primary.
|
|
1691
1924
|
*/
|
|
1925
|
+
private webBots;
|
|
1926
|
+
/** instance → the connection that is its own bot (see webBots). */
|
|
1692
1927
|
private ownBots;
|
|
1693
1928
|
/**
|
|
1694
1929
|
* The bot a connection is now: its running adapter and that bot's own user id. Everything cached for an own bot is
|
|
@@ -1704,10 +1939,23 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1704
1939
|
private webAccent;
|
|
1705
1940
|
/** The cache key of an own bot's avatar, and its loader (which refuses an answer from a bot no longer there). */
|
|
1706
1941
|
private botAvatarSource;
|
|
1707
|
-
/**
|
|
1942
|
+
/**
|
|
1943
|
+
* One instance's avatar and ring for the status frame. Synchronous: what is cached now; fetches run behind. The bot
|
|
1944
|
+
* is its own, else the one it speaks through (#1867) — one cache entry per bot, so a shared bot is fetched once.
|
|
1945
|
+
*/
|
|
1708
1946
|
private webIdentityImage;
|
|
1709
|
-
/**
|
|
1947
|
+
/**
|
|
1948
|
+
* GET /ui/img/bot|avatar/<key>: what is cached, never a fetch. Only a connection some instance or room speaks
|
|
1949
|
+
* through (#1867), or a known instance's upload.
|
|
1950
|
+
*/
|
|
1710
1951
|
webImage(kind: "bot" | "avatar", key: string): CachedImage | null;
|
|
1952
|
+
/**
|
|
1953
|
+
* #1682 GET /ui/mentions: names for the mention ids a page found in what it rendered — never a Discord request; in order:
|
|
1954
|
+
* the fleet's bots (an instance's own bot is that instance's label: fleet.yaml, and the View profiles read from
|
|
1955
|
+
* profiles.db, as the status frame does), the people seen on inbound messages, and the Discord adapters' caches
|
|
1956
|
+
* (members, users, roles, channels).
|
|
1957
|
+
*/
|
|
1958
|
+
webMentionNames(query: MentionQuery): MentionNames;
|
|
1711
1959
|
/** GET /ui/emojis: the custom emoji of every server the fleet's Discord bots are in (the Settings picker's cache). */
|
|
1712
1960
|
webEmojiList(): Promise<Array<{
|
|
1713
1961
|
id: string;
|
|
@@ -2018,6 +2266,19 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2018
2266
|
*/
|
|
2019
2267
|
orgChart(): OrgChart;
|
|
2020
2268
|
private cacheService;
|
|
2269
|
+
/**
|
|
2270
|
+
* #1699: the credential profile an instance's CLI signs in with on `backend` — fleet.yaml's (with its defaults), or a
|
|
2271
|
+
* ClassicBot room's launched or would-be login when the room runs that backend. Null: the backend's default login
|
|
2272
|
+
* (also for a backend that has no profiles, where the option is ignored).
|
|
2273
|
+
*/
|
|
2274
|
+
credentialProfileOf(name: string, backend: string): string | null;
|
|
2275
|
+
/**
|
|
2276
|
+
* #1699: the claude config dir an instance's CLI uses — its credential profile's, else exactly as before
|
|
2277
|
+
* (CLAUDE_CONFIG_DIR or ~/.claude).
|
|
2278
|
+
*/
|
|
2279
|
+
claudeConfigDirOf(name: string): string;
|
|
2280
|
+
/** The instances the cache analysis reads: fleet.yaml's, then the ClassicBot rooms (their workspace under the AgEnD home, their own backend). */
|
|
2281
|
+
private cacheInstances;
|
|
2021
2282
|
/**
|
|
2022
2283
|
* #1468: the prompt-cache expiry analysis for the web, per instance, over `window`. Read from each instance's
|
|
2023
2284
|
* ledger as it is now; the first request starts the bounded, persisted catch-up over the transcripts
|
|
@@ -2057,10 +2318,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2057
2318
|
* The caller has passed the /ui gate (session, same origin, CSRF). Here: the prompt must be one offered
|
|
2058
2319
|
* on the dashboard, about the instance the page named, and the action one of its own buttons.
|
|
2059
2320
|
*/
|
|
2060
|
-
/** #
|
|
2061
|
-
|
|
2321
|
+
/** #1823: close_poll — `instance` closes one of its own polls before the deadline. */
|
|
2322
|
+
closePollEarly(instance: string, id: string): Promise<{
|
|
2323
|
+
ok: true;
|
|
2324
|
+
voted: number;
|
|
2325
|
+
} | {
|
|
2326
|
+
ok: false;
|
|
2327
|
+
error: string;
|
|
2328
|
+
}>;
|
|
2329
|
+
/**
|
|
2330
|
+
* #1266: a click on a reply's button in the web chat (the /ui gate is passed: a session, or the public link). On a
|
|
2331
|
+
* poll (#1823) it is `voter`'s vote: the page's session.
|
|
2332
|
+
*/
|
|
2333
|
+
clickWebReplyButton(instance: string, id: string, index: number, voter?: {
|
|
2334
|
+
key: string;
|
|
2335
|
+
userId: string;
|
|
2336
|
+
name: string;
|
|
2337
|
+
}): Promise<{
|
|
2062
2338
|
status: 200 | 400 | 403 | 409;
|
|
2063
2339
|
error?: string;
|
|
2340
|
+
options?: number[];
|
|
2064
2341
|
}>;
|
|
2065
2342
|
clickWebPrompt(instance: string, nonce: string, action: string): Promise<{
|
|
2066
2343
|
status: 200 | 400 | 403 | 409;
|
|
@@ -2090,6 +2367,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2090
2367
|
* synchronous; they never probe the pane.
|
|
2091
2368
|
*/
|
|
2092
2369
|
private clearTargetFence;
|
|
2370
|
+
/** #1806: the web's /backend confirmations — one per question, used once, for the arguments and backend asked about. */
|
|
2371
|
+
private readonly webBackendTokens;
|
|
2093
2372
|
/** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
|
|
2094
2373
|
private readonly webClearTokens;
|
|
2095
2374
|
/** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
|
|
@@ -2100,6 +2379,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2100
2379
|
confirm?: string;
|
|
2101
2380
|
}, opts: {
|
|
2102
2381
|
publicLink: boolean;
|
|
2382
|
+
person?: Pick<WebPersonView, "userId" | "name">;
|
|
2103
2383
|
}): Promise<WebCommandResult>;
|
|
2104
2384
|
/** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
|
|
2105
2385
|
private handleClearConfirmation;
|
|
@@ -2153,7 +2433,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2153
2433
|
* Backends with no remote login flow (opencode logs in from a terminal) get
|
|
2154
2434
|
* no button — the alert's own wording already tells them what to run.
|
|
2155
2435
|
*/
|
|
2156
|
-
offerBackendLogin(targetInstance: string, backend: string): Promise<void>;
|
|
2436
|
+
offerBackendLogin(targetInstance: string, backend: string, profile?: string): Promise<void>;
|
|
2157
2437
|
/** Consume a General assist button exactly once. */
|
|
2158
2438
|
private handleInteractivePromptAssist;
|
|
2159
2439
|
/** Send a "🛑 Cancel" button to the instance's topic/channel after delivery. */
|
|
@@ -2386,6 +2666,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2386
2666
|
skipAuthCheck?: boolean;
|
|
2387
2667
|
tokenPresent?: boolean;
|
|
2388
2668
|
tunnel?: boolean;
|
|
2669
|
+
profile?: string;
|
|
2389
2670
|
}): Promise<string | null>;
|
|
2390
2671
|
/** Which way a `/login` went (#1131) — so the event log shows what users actually need. */
|
|
2391
2672
|
private recordLoginFlow;
|
|
@@ -2429,6 +2710,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2429
2710
|
chatId: string;
|
|
2430
2711
|
threadId?: string;
|
|
2431
2712
|
userId?: string;
|
|
2713
|
+
}, signIn?: {
|
|
2714
|
+
profile?: string;
|
|
2432
2715
|
}): Promise<string>;
|
|
2433
2716
|
/** Whether this backend's CLI is on the fleet's PATH (what `/login` installs when it is not). */
|
|
2434
2717
|
isCliInstalled(backend: string): boolean;
|
|
@@ -2439,9 +2722,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2439
2722
|
* The absolute path a fresh login shell resolves `binary` to, or null. Only
|
|
2440
2723
|
* a real executable file counts: `command -v` also answers with an alias
|
|
2441
2724
|
* definition or a function name, neither of which a spawn could run.
|
|
2725
|
+
* Async (runOnLoginShell): a login file that backgrounds a process holding the shell's output once froze the fleet loop here.
|
|
2442
2726
|
*/
|
|
2443
2727
|
private locateBinaryOnLoginShell;
|
|
2444
|
-
private locateBinaryOnLoginShellSync;
|
|
2445
2728
|
/**
|
|
2446
2729
|
* #1092: the binary in one of the directories its own installer installs to,
|
|
2447
2730
|
* when no login shell can see it (the installer recorded its PATH in an
|
|
@@ -2545,6 +2828,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2545
2828
|
/** Forward a message to a classic channel instance with chat log context */
|
|
2546
2829
|
private forwardToClassicInstance;
|
|
2547
2830
|
/** Paste raw text directly to a classic instance's CLI (no [user:] wrapping) */
|
|
2831
|
+
/** #1690: our own runtime switches awaiting the daemon's outcome, by id. */
|
|
2832
|
+
private readonly runtimeSwitchWaiters;
|
|
2833
|
+
/**
|
|
2834
|
+
* #1690: type `/model <model>` and wait for what it came to: the daemon answers claude's "Switch model?" for us (Yes
|
|
2835
|
+
* when it names this model, No otherwise) or sees claude's own result. Null when it could not be sent; a timeout is
|
|
2836
|
+
* "not confirmed".
|
|
2837
|
+
*/
|
|
2838
|
+
private runRuntimeModelSwitch;
|
|
2839
|
+
/**
|
|
2840
|
+
* #1690: the names claude-code is known to accept, for checking `/model <name>` BEFORE it is typed — claude itself
|
|
2841
|
+
* accepts any string ("Set model to opsu"), and its "Switch model?" then names the typo. Static aliases (with [1m]),
|
|
2842
|
+
* the cached account catalog, the configured model; without a cached catalog, any `claude-…` id too (cannot check).
|
|
2843
|
+
*/
|
|
2844
|
+
private claudeModelKnown;
|
|
2548
2845
|
private pasteRawToClassicInstance;
|
|
2549
2846
|
/** Resolve the backend name configured for an instance (fleet or classic). */
|
|
2550
2847
|
private backendNameForInstance;
|
|
@@ -2687,6 +2984,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2687
2984
|
effortStrategyFor(instanceName: string): "runtime" | "restart" | "unsupported";
|
|
2688
2985
|
/** Effort levels this instance's backend actually accepts (empty = unsupported). */
|
|
2689
2986
|
effortLevelsFor(instanceName: string): string[];
|
|
2987
|
+
/** The instance's backend's effort metadata; agy's levels are its model's (#1825), the one the instance runs. */
|
|
2988
|
+
private instanceEffortMetadata;
|
|
2690
2989
|
/** Configured effort for an instance: per-instance, else fleet default, else none. */
|
|
2691
2990
|
resolveInstanceEffort(instanceName: string): {
|
|
2692
2991
|
effort: string | null;
|
|
@@ -2710,6 +3009,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2710
3009
|
*/
|
|
2711
3010
|
applyEffort(instanceName: string, requested: string): Promise<string>;
|
|
2712
3011
|
applyModel(instanceName: string, model: string): Promise<string>;
|
|
3012
|
+
/** Save an instance's model (fleet.yaml, or its ClassicBot channel). False when neither holds it. */
|
|
3013
|
+
private persistInstanceModel;
|
|
2713
3014
|
/**
|
|
2714
3015
|
* The trailing "Current effort: …" line for a /model reply.
|
|
2715
3016
|
*
|
|
@@ -2718,6 +3019,72 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2718
3019
|
* a switch saves the round trip of asking. Empty when the backend has none.
|
|
2719
3020
|
*/
|
|
2720
3021
|
private effortSuffix;
|
|
3022
|
+
/** The steps' view of this fleet (backend-command.ts). `live`: a missing or stale model list may be probed (not on the web). */
|
|
3023
|
+
private backendCommandDeps;
|
|
3024
|
+
/**
|
|
3025
|
+
* `/effort`'s levels for a backend this instance may move to, for the model that will run there (codex's levels are
|
|
3026
|
+
* per model; null: its configured default). Empty: it has no effort setting. A file read, never a CLI.
|
|
3027
|
+
*/
|
|
3028
|
+
backendEffortLevels(instanceName: string, backend: string, model?: string | null): string[];
|
|
3029
|
+
/**
|
|
3030
|
+
* #1808: whether a backend takes this model name — the one rule for /backend and update_instance_config's switch.
|
|
3031
|
+
* The name must be one its launch line can carry (modelNameCarried); then its offered list (the cached CLI env), and
|
|
3032
|
+
* claude-code's known names (without this instance's configured model, which belongs to the backend being left).
|
|
3033
|
+
* With no list known, the backend's usual name pattern decides.
|
|
3034
|
+
*/
|
|
3035
|
+
backendModelVerdict(instanceName: string, backend: string, model: string,
|
|
3036
|
+
/** The provider the backend will run on (default: this instance's own, else the fleet's). */
|
|
3037
|
+
opts?: {
|
|
3038
|
+
provider: string | null;
|
|
3039
|
+
}): {
|
|
3040
|
+
ok: true;
|
|
3041
|
+
} | {
|
|
3042
|
+
ok: false;
|
|
3043
|
+
choices: string[];
|
|
3044
|
+
};
|
|
3045
|
+
/**
|
|
3046
|
+
* #1807 review r2: the model codex's next launch of this instance runs. Every launch's writeConfig copies the SHARED
|
|
3047
|
+
* config.toml into the instance's codex home first, so that source decides — not the home's copy from an earlier
|
|
3048
|
+
* launch. Read-only; a model chosen here (`-c model=…`) outranks it; a project file that could change it, unproven.
|
|
3049
|
+
*/
|
|
3050
|
+
private prospectiveCodexModel;
|
|
3051
|
+
/** #1811: whether a launch of `backend` here would pass a level: the same gate its builder applies. */
|
|
3052
|
+
private launchEffortGate;
|
|
3053
|
+
/** Installed the way the launch finds a CLI (resolveBinary): on PATH or in a known install directory. */
|
|
3054
|
+
private backendInstalledHere;
|
|
3055
|
+
/** The models `/model` would offer on a backend: the cached CLI env, else (live) a bounded probe. Never throws. */
|
|
3056
|
+
private backendModelOptions;
|
|
3057
|
+
/**
|
|
3058
|
+
* #1806 review: the instance a `/backend` was asked about is still this config entry — not one deleted and created
|
|
3059
|
+
* again under the same name, or replaced by a Settings edit (both put a new object there), stopped or not.
|
|
3060
|
+
*/
|
|
3061
|
+
private backendTargetIs;
|
|
3062
|
+
/** `/backend` is for fleet.yaml instances: update_instance_config does not manage a ClassicBot agent. */
|
|
3063
|
+
private backendCommandRefusal;
|
|
3064
|
+
/**
|
|
3065
|
+
* Apply a confirmed `/backend`: judged again first (a menu lives a minute — the backend may have moved, a CLI been
|
|
3066
|
+
* removed), then update_instance_config's write: backend, model and effort at once, refused and rolled back whole
|
|
3067
|
+
* (its credential-profile login gate included), then one fresh relaunch of a running instance.
|
|
3068
|
+
*/
|
|
3069
|
+
applyBackendSwitch(instanceName: string, args: readonly string[], from: string, stillCurrent: () => boolean): Promise<string>;
|
|
3070
|
+
/** A step's buttons: index callbacks (a model id can be longer than Telegram's 64-byte callback data allows). */
|
|
3071
|
+
private backendStepButtons;
|
|
3072
|
+
/**
|
|
3073
|
+
* Show a `/backend` step (a choice, or the confirmation) where the command was given: Discord edits its interaction
|
|
3074
|
+
* reply; Telegram retires the previous step's keyboard and posts the next. One pending entry per step, under a fresh
|
|
3075
|
+
* nonce: a click on an older step finds nothing.
|
|
3076
|
+
*/
|
|
3077
|
+
private presentBackendStep;
|
|
3078
|
+
/** Close a `/backend` menu with a last word: its buttons go (Telegram edits them away), the text stays. Returns where it was said. */
|
|
3079
|
+
private endBackendMenu;
|
|
3080
|
+
/** Start `/backend` for a fleet instance from Discord or Telegram; the caller has checked the channel admin. */
|
|
3081
|
+
private beginBackendCommand;
|
|
3082
|
+
/** `/backend` slash handler: channel admin, as `/model`. Options or typed text give the direct form. */
|
|
3083
|
+
private handleBackendSlash;
|
|
3084
|
+
/** Telegram `/backend` in a fleet topic (topic-commands) or a ClassicBot chat; the caller has checked the admin. */
|
|
3085
|
+
runBackendCommand(instanceName: string, text: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string, adapterId?: string): Promise<void>;
|
|
3086
|
+
/** Consume a `/backend` click: the next step, or on the confirmation the switch itself. True for every backend-select id. */
|
|
3087
|
+
private handleBackendSelection;
|
|
2721
3088
|
/** Read recent chat log for agent context */
|
|
2722
3089
|
private getRecentChatLog;
|
|
2723
3090
|
/**
|
|
@@ -2733,6 +3100,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2733
3100
|
private getMissingBackendWarning;
|
|
2734
3101
|
/** Handle Discord's required static slash choice, warning before a likely startup failure. */
|
|
2735
3102
|
private handleClassicStartSlash;
|
|
3103
|
+
private handleClassicStartSlashCore;
|
|
2736
3104
|
/** Present platform-native backend choices, then start on selection or timeout. */
|
|
2737
3105
|
private beginClassicBackendSelection;
|
|
2738
3106
|
/** Consume a selection callback. Returns true for all ClassicBot callback IDs, including stale ones. */
|
|
@@ -3044,6 +3412,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3044
3412
|
previewForUi(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
|
|
3045
3413
|
boot: string | null;
|
|
3046
3414
|
};
|
|
3415
|
+
/**
|
|
3416
|
+
* #1723: for one page of the public link (exposure `exposureId`, at `dashboardOrigin`): its own preview tunnel's
|
|
3417
|
+
* origin once up, "starting" until then, why it failed if it did — or a configured web.preview_origin, used instead.
|
|
3418
|
+
*/
|
|
3419
|
+
publicPreviewForUi(exposureId: string, dashboardOrigin: string): PublicPreviewForUi;
|
|
3047
3420
|
getUiStatus(): unknown;
|
|
3048
3421
|
private getUiStatusSync;
|
|
3049
3422
|
}
|