@songsid/agend 2.1.12 → 2.2.0-alpha.1
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 +2 -2
- package/README.zh-TW.md +2 -2
- package/dist/auth/one-time-code.d.ts +19 -0
- package/dist/auth/one-time-code.js +49 -0
- package/dist/auth/one-time-code.js.map +1 -0
- package/dist/auth-api.d.ts +52 -0
- package/dist/auth-api.js +346 -0
- package/dist/auth-api.js.map +1 -0
- package/dist/backend/claude-code.d.ts +4 -0
- package/dist/backend/claude-code.js +97 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.js +59 -30
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro-agent.d.ts +66 -0
- package/dist/backend/kiro-agent.js +302 -0
- package/dist/backend/kiro-agent.js.map +1 -0
- package/dist/backend/kiro-identity.d.ts +80 -0
- package/dist/backend/kiro-identity.js +537 -0
- package/dist/backend/kiro-identity.js.map +1 -0
- package/dist/backend/kiro-v2-store-worker.d.ts +1 -0
- package/dist/backend/kiro-v2-store-worker.js +87 -0
- package/dist/backend/kiro-v2-store-worker.js.map +1 -0
- package/dist/backend/kiro-v2-store.d.ts +54 -0
- package/dist/backend/kiro-v2-store.js +131 -0
- package/dist/backend/kiro-v2-store.js.map +1 -0
- package/dist/backend/kiro-v3-identity.d.ts +5 -0
- package/dist/backend/kiro-v3-identity.js +22 -0
- package/dist/backend/kiro-v3-identity.js.map +1 -1
- package/dist/backend/kiro.d.ts +83 -7
- package/dist/backend/kiro.js +418 -91
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +45 -3
- package/dist/backend/types.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +1 -0
- package/dist/channel/adapters/discord.js +29 -10
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +1 -0
- package/dist/channel/adapters/telegram.js +13 -1
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/types.d.ts +9 -1
- package/dist/classic-channel-manager.d.ts +18 -10
- package/dist/classic-channel-manager.js +45 -18
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +225 -127
- package/dist/cli.js.map +1 -1
- package/dist/command-table.d.ts +5 -3
- package/dist/command-table.js +29 -27
- package/dist/command-table.js.map +1 -1
- package/dist/config-validator.js +46 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -1
- package/dist/connection-secrets.d.ts +6 -0
- package/dist/connection-secrets.js +4 -0
- package/dist/connection-secrets.js.map +1 -1
- package/dist/daemon.d.ts +89 -4
- package/dist/daemon.js +661 -77
- package/dist/daemon.js.map +1 -1
- package/dist/darwin-memory.d.ts +6 -1
- package/dist/darwin-memory.js +17 -6
- package/dist/darwin-memory.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +85 -0
- package/dist/delivery-consumed-watch.js +244 -0
- package/dist/delivery-consumed-watch.js.map +1 -0
- package/dist/delivery-outbox.d.ts +61 -0
- package/dist/delivery-outbox.js +120 -2
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +14 -5
- package/dist/delivery-reconciliation.js +27 -4
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/delivery-reconciliation.test.js +35 -1
- package/dist/delivery-reconciliation.test.js.map +1 -1
- package/dist/event-loop-watch.d.ts +28 -0
- package/dist/event-loop-watch.js +75 -3
- package/dist/event-loop-watch.js.map +1 -1
- package/dist/fleet-context.d.ts +22 -2
- package/dist/fleet-level-config.d.ts +2 -2
- package/dist/fleet-level-config.js +6 -1
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +293 -12
- package/dist/fleet-manager.js +2364 -449
- package/dist/fleet-manager.js.map +1 -1
- package/dist/host-memory.d.ts +4 -0
- package/dist/host-memory.js.map +1 -1
- package/dist/instance-config-impact.js +5 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +10 -5
- package/dist/instance-lifecycle.js +162 -53
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +150 -16
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +2 -0
- package/dist/login-controller.js +17 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/memory-pressure.d.ts +7 -8
- package/dist/memory-pressure.js +76 -15
- package/dist/memory-pressure.js.map +1 -1
- package/dist/monotonic-budget.d.ts +2 -0
- package/dist/monotonic-budget.js +28 -0
- package/dist/monotonic-budget.js.map +1 -0
- package/dist/needs-you-hub.d.ts +114 -0
- package/dist/needs-you-hub.js +370 -0
- package/dist/needs-you-hub.js.map +1 -0
- package/dist/needs-you-live.d.ts +116 -0
- package/dist/needs-you-live.js +228 -0
- package/dist/needs-you-live.js.map +1 -0
- package/dist/needs-you.d.ts +132 -0
- package/dist/needs-you.js +164 -0
- package/dist/needs-you.js.map +1 -0
- package/dist/node-version-guard.d.ts +30 -0
- package/dist/node-version-guard.js +50 -0
- package/dist/node-version-guard.js.map +1 -0
- package/dist/operator-control-paths.d.ts +4 -0
- package/dist/operator-control-paths.js +24 -0
- package/dist/operator-control-paths.js.map +1 -0
- package/dist/outbound-handlers.d.ts +2 -0
- package/dist/outbound-handlers.js +9 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +5 -5
- package/dist/profile-control.js +4 -20
- package/dist/profile-control.js.map +1 -1
- package/dist/public-web-gateway.d.ts +18 -0
- package/dist/public-web-gateway.js +141 -0
- package/dist/public-web-gateway.js.map +1 -0
- package/dist/public-web-link.d.ts +53 -0
- package/dist/public-web-link.js +175 -0
- package/dist/public-web-link.js.map +1 -0
- package/dist/quickstart-api.d.ts +8 -1
- package/dist/quickstart-api.js +86 -48
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +1 -0
- package/dist/quickstart.js +6 -2
- package/dist/quickstart.js.map +1 -1
- package/dist/scheduler/db.d.ts +7 -1
- package/dist/scheduler/db.js +38 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/index.d.ts +1 -1
- package/dist/scheduler/retry-label.d.ts +11 -0
- package/dist/scheduler/retry-label.js +24 -0
- package/dist/scheduler/retry-label.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +55 -2
- package/dist/scheduler/scheduler.js +220 -8
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/scheduler/types.d.ts +22 -0
- package/dist/scheduler/types.js.map +1 -1
- package/dist/secret-store.d.ts +5 -0
- package/dist/secret-store.js +20 -0
- package/dist/secret-store.js.map +1 -1
- package/dist/service-activation.d.ts +110 -0
- package/dist/service-activation.js +302 -0
- package/dist/service-activation.js.map +1 -0
- package/dist/service-installer.d.ts +7 -0
- package/dist/service-installer.js +7 -4
- package/dist/service-installer.js.map +1 -1
- package/dist/service-restart-selection.d.ts +6 -5
- package/dist/service-restart-selection.js +6 -5
- package/dist/service-restart-selection.js.map +1 -1
- package/dist/settings-api.d.ts +10 -2
- package/dist/settings-api.js +175 -72
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +20 -0
- package/dist/settings-baseline.js +104 -0
- package/dist/settings-baseline.js.map +1 -0
- package/dist/settings-change.d.ts +21 -0
- package/dist/settings-change.js +133 -0
- package/dist/settings-change.js.map +1 -0
- package/dist/settings-confirmation.d.ts +105 -0
- package/dist/settings-confirmation.js +232 -0
- package/dist/settings-confirmation.js.map +1 -0
- package/dist/settings-control.d.ts +41 -0
- package/dist/settings-control.js +294 -0
- package/dist/settings-control.js.map +1 -0
- package/dist/settings-effect.d.ts +24 -0
- package/dist/settings-effect.js +169 -0
- package/dist/settings-effect.js.map +1 -0
- package/dist/settings-http-confirmation.d.ts +29 -0
- package/dist/settings-http-confirmation.js +123 -0
- package/dist/settings-http-confirmation.js.map +1 -0
- package/dist/settings-instance-patch.d.ts +4 -0
- package/dist/settings-instance-patch.js +26 -0
- package/dist/settings-instance-patch.js.map +1 -0
- package/dist/settings-request-capability.d.ts +16 -0
- package/dist/settings-request-capability.js +32 -0
- package/dist/settings-request-capability.js.map +1 -0
- package/dist/settings-transaction.d.ts +65 -0
- package/dist/settings-transaction.js +223 -0
- package/dist/settings-transaction.js.map +1 -0
- package/dist/setup-auth.d.ts +10 -18
- package/dist/setup-auth.js +14 -38
- package/dist/setup-auth.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +75 -18
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-guide.d.ts +13 -0
- package/dist/setup-guide.js +25 -0
- package/dist/setup-guide.js.map +1 -0
- package/dist/setup-host.d.ts +16 -0
- package/dist/setup-host.js +197 -32
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-wizard.js +3 -0
- package/dist/setup-wizard.js.map +1 -1
- package/dist/slash-authz.d.ts +17 -3
- package/dist/slash-authz.js +5 -0
- package/dist/slash-authz.js.map +1 -1
- package/dist/spawn-gate.js +3 -3
- package/dist/spawn-gate.js.map +1 -1
- package/dist/statusline-watcher.d.ts +5 -0
- package/dist/statusline-watcher.js +2 -0
- package/dist/statusline-watcher.js.map +1 -1
- package/dist/steer-capability.d.ts +6 -0
- package/dist/steer-capability.js +8 -0
- package/dist/steer-capability.js.map +1 -1
- package/dist/sync-work-attribution.d.ts +14 -0
- package/dist/sync-work-attribution.js +43 -8
- package/dist/sync-work-attribution.js.map +1 -1
- package/dist/tips.js +10 -5
- package/dist/tips.js.map +1 -1
- package/dist/tmux-control.d.ts +35 -5
- package/dist/tmux-control.js +291 -57
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-manager.d.ts +20 -6
- package/dist/tmux-manager.js +90 -47
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-read.d.ts +59 -0
- package/dist/tmux-read.js +213 -0
- package/dist/tmux-read.js.map +1 -0
- package/dist/topic-commands.d.ts +21 -10
- package/dist/topic-commands.js +191 -58
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.js +2 -1
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/tunnel/cloudflared-install.d.ts +2 -0
- package/dist/tunnel/cloudflared-install.js +1 -1
- package/dist/tunnel/cloudflared-install.js.map +1 -1
- package/dist/tunnel/purpose-lane.d.ts +14 -0
- package/dist/tunnel/purpose-lane.js +43 -0
- package/dist/tunnel/purpose-lane.js.map +1 -0
- package/dist/turn-reply-guard.d.ts +2 -0
- package/dist/turn-reply-guard.js +10 -1
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +33 -0
- package/dist/ui/app.html +18 -0
- package/dist/ui/chat-render.js +478 -0
- package/dist/ui/chat-store.js +289 -0
- package/dist/ui/chat-strings.js +69 -0
- package/dist/ui/chat-thread.js +209 -0
- package/dist/ui/chat-tour.js +116 -0
- package/dist/ui/fleet-org.js +142 -0
- package/dist/ui/panel-chat.js +418 -0
- package/dist/ui/panel-fleet.js +413 -0
- package/dist/ui/panel-needs.js +202 -0
- package/dist/ui/panel-settings.js +750 -0
- package/dist/ui/preview.js +266 -0
- package/dist/ui/settings-apply.js +239 -0
- package/dist/ui/settings-confirm.js +186 -0
- package/dist/ui/settings-dialogs.js +546 -0
- package/dist/ui/settings-model.js +277 -0
- package/dist/ui/settings-strings.js +652 -0
- package/dist/ui/settings-wizard.js +140 -0
- package/dist/ui/shared/agend-auth.js +93 -0
- package/dist/ui/shared/app-ctx.js +80 -0
- package/dist/ui/shared/app-html.js +9 -0
- package/dist/ui/shared/app-i18n.js +95 -0
- package/dist/ui/shared/app-nav.js +73 -0
- package/dist/ui/shared/app-needs.js +114 -0
- package/dist/ui/shared/app-route.js +73 -0
- package/dist/ui/shared/app-session.js +66 -0
- package/dist/ui/shared/app-shell.js +344 -0
- package/dist/ui/shared/app-store.js +51 -0
- package/dist/ui/shared/app-stream.js +201 -0
- package/dist/ui/shared/app.css +676 -0
- package/dist/ui/shared/app.js +88 -0
- package/dist/ui/shared/fonts/OFL.txt +92 -0
- package/dist/ui/shared/fonts/README.md +21 -0
- package/dist/ui/shared/fonts/inter.woff2 +0 -0
- package/dist/ui/shared/htm.module.js +1 -0
- package/dist/ui/shared/panel-view.js +655 -0
- package/dist/ui/shared/preact-hooks.module.js +2 -0
- package/dist/ui/shared/preact.module.js +2 -0
- package/dist/ui/shared/signin.js +130 -0
- package/dist/ui/shared/theme.js +29 -0
- package/dist/ui/shared/tokens.css +153 -0
- package/dist/ui/shared/ui-confirm.js +43 -0
- package/dist/ui/shared/ui-dialog.js +45 -0
- package/dist/ui/shared/ui-icons.js +61 -0
- package/dist/ui/shared/ui-menu.js +39 -0
- package/dist/ui/shared/ui-states.js +20 -0
- package/dist/ui/shared/ui-toast.js +18 -0
- package/dist/ui/shared/vendor/htm.LICENSE +202 -0
- package/dist/ui/shared/vendor/preact.LICENSE +21 -0
- package/dist/ui/shared/vendor/vendor.json +39 -0
- package/dist/ui/shared/view-strings.js +309 -0
- package/dist/ui/signin.html +51 -0
- package/dist/update-check.d.ts +6 -2
- package/dist/update-check.js +12 -3
- package/dist/update-check.js.map +1 -1
- package/dist/update-install.d.ts +71 -0
- package/dist/update-install.js +162 -0
- package/dist/update-install.js.map +1 -0
- package/dist/upgrade-notices.d.ts +17 -0
- package/dist/upgrade-notices.js +93 -0
- package/dist/upgrade-notices.js.map +1 -0
- package/dist/usage/statusline-usage.d.ts +2 -0
- package/dist/usage/statusline-usage.js +14 -10
- package/dist/usage/statusline-usage.js.map +1 -1
- package/dist/view-api.d.ts +6 -1
- package/dist/view-api.js +62 -51
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +71 -14
- package/dist/web-api.js +492 -77
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.d.ts +71 -27
- package/dist/web-auth.js +169 -69
- package/dist/web-auth.js.map +1 -1
- package/dist/web-body.d.ts +3 -0
- package/dist/web-body.js +55 -0
- package/dist/web-body.js.map +1 -0
- package/dist/web-channel-echo.d.ts +9 -0
- package/dist/web-channel-echo.js +55 -0
- package/dist/web-channel-echo.js.map +1 -0
- package/dist/web-chat-history.d.ts +125 -0
- package/dist/web-chat-history.js +184 -0
- package/dist/web-chat-history.js.map +1 -0
- package/dist/web-continuation.d.ts +7 -0
- package/dist/web-continuation.js +22 -0
- package/dist/web-continuation.js.map +1 -0
- package/dist/web-host-guard.d.ts +34 -0
- package/dist/web-host-guard.js +57 -1
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-login.d.ts +72 -0
- package/dist/web-login.js +132 -0
- package/dist/web-login.js.map +1 -0
- package/dist/web-org.d.ts +55 -0
- package/dist/web-org.js +67 -0
- package/dist/web-org.js.map +1 -0
- package/dist/web-preview.d.ts +77 -0
- package/dist/web-preview.js +240 -0
- package/dist/web-preview.js.map +1 -0
- package/dist/web-request-context.d.ts +10 -0
- package/dist/web-request-context.js +13 -0
- package/dist/web-request-context.js.map +1 -0
- package/dist/web-session.d.ts +167 -0
- package/dist/web-session.js +389 -0
- package/dist/web-session.js.map +1 -0
- package/dist/web-shell-routes.d.ts +59 -0
- package/dist/web-shell-routes.js +96 -0
- package/dist/web-shell-routes.js.map +1 -0
- package/dist/web-upload.d.ts +183 -0
- package/dist/web-upload.js +468 -0
- package/dist/web-upload.js.map +1 -0
- package/dist/website-tips-renderer.d.ts +2 -2
- package/dist/website-tips-renderer.js +3 -3
- package/dist/website-tips-renderer.js.map +1 -1
- package/package.json +8 -5
- package/scripts/preinstall-guard.cjs +36 -0
- package/dist/ui/dashboard.html +0 -774
- package/dist/ui/settings.html +0 -2165
- package/dist/ui/view.html +0 -1139
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SettingsExecution } from "./settings-transaction.js";
|
|
2
|
+
import type { LoginCodeOwner } from "./web-login.js";
|
|
1
3
|
import { type ProfileTicket } from "./runtime-cpu-profile.js";
|
|
2
4
|
import type { CpuProfile } from "./cpu-profile.js";
|
|
3
5
|
import { type FleetMemory } from "./process-memory.js";
|
|
@@ -49,6 +51,8 @@ export declare function applyTaskListCap<T extends {
|
|
|
49
51
|
omitted: number;
|
|
50
52
|
hint: string;
|
|
51
53
|
} | T[];
|
|
54
|
+
import { WebChatHistory } from "./web-chat-history.js";
|
|
55
|
+
import { WebFileLedger } from "./web-upload.js";
|
|
52
56
|
import { type RawConfigPatch } from "./settings-api.js";
|
|
53
57
|
import { type AgentEndpointContext } from "./agent-endpoint.js";
|
|
54
58
|
import { ClassicChannelManager } from "./classic-channel-manager.js";
|
|
@@ -57,6 +61,9 @@ import type { InstanceState, InteractionSnapshot } from "./backend/types.js";
|
|
|
57
61
|
import { WakeCoordinator } from "./wake-coordinator.js";
|
|
58
62
|
import { TargetQueueWorker } from "./target-queue-worker.js";
|
|
59
63
|
import { resolveDeliveryWorkerMode } from "./types.js";
|
|
64
|
+
import { type WebNeedsItem } from "./needs-you-hub.js";
|
|
65
|
+
import { type OrgChart } from "./web-org.js";
|
|
66
|
+
import { type PreviewAvailability } from "./web-preview.js";
|
|
60
67
|
import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
|
|
61
68
|
import { type ProviderSecretStatus } from "./provider-secret-registry.js";
|
|
62
69
|
import { ApplyJobStore, type ApplyJob, type ApplyTargetKind, type SelfRestartResult } from "./apply-job.js";
|
|
@@ -119,6 +126,11 @@ export interface DeliveryOptions {
|
|
|
119
126
|
* paused after its row was claimed is handed back instead of woken here.
|
|
120
127
|
*/
|
|
121
128
|
noInlineWake?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* #1426: the caller's own fence, asked wherever the delivery epoch is — through the wake, the idle wait and up to the
|
|
131
|
+
* IPC hand-off itself. False drops the delivery unsent (a schedule retry past its deadline).
|
|
132
|
+
*/
|
|
133
|
+
stillCurrent?: () => boolean;
|
|
122
134
|
}
|
|
123
135
|
export declare const LOGIN_CALLBACK_PREFIX = "login:";
|
|
124
136
|
/**
|
|
@@ -271,6 +283,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
271
283
|
private instanceProgress;
|
|
272
284
|
/** instanceName → tail of deliveries waiting for its IPC to come back. */
|
|
273
285
|
private ipcWaitTails;
|
|
286
|
+
private webChannelEchoTails;
|
|
287
|
+
/**
|
|
288
|
+
* instanceName → the reservation whose echo callback is currently running.
|
|
289
|
+
* sendClassicWebEcho fences every per-entry copy against it: no new copy
|
|
290
|
+
* starts after the ordering budget is gone or the delivery epoch is revoked.
|
|
291
|
+
* Serialized per instance by the echo tail, so one slot is enough.
|
|
292
|
+
*/
|
|
293
|
+
private webChannelEchoGuards;
|
|
274
294
|
/** instanceName → restart currently executing; concurrent callers join it. */
|
|
275
295
|
private restartsInFlight;
|
|
276
296
|
/**
|
|
@@ -309,6 +329,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
309
329
|
private pendingModelSelects;
|
|
310
330
|
/** nonce → pending button prompt (hang restart, interactive assist, clean-exit restart). */
|
|
311
331
|
private pendingNonceButtons;
|
|
332
|
+
/** #1386 "Needs you": the list, its live chat messages and Acknowledge. Started with the fleet (finishStartup). */
|
|
333
|
+
private needsYou;
|
|
334
|
+
/** When the fleet first saw an instance crashed, for its "Needs you" age; cleared when it is not. */
|
|
335
|
+
private readonly needsCrashedAt;
|
|
336
|
+
/** Pause reason/time read from the marker, per paused instance; dropped on any attention change of it, and at most
|
|
337
|
+
* NEEDS_PAUSE_TTL_MS old — so a recompute does not re-read the file every time (#1386 §4.3). */
|
|
338
|
+
private readonly needsPauseCache;
|
|
339
|
+
/**
|
|
340
|
+
* Clicks that came from the web dashboard (clickWebPrompt). Only that method adds to it, so nothing an
|
|
341
|
+
* adapter emits — whatever fields its payload carries — can claim a dashboard click's authority.
|
|
342
|
+
*/
|
|
343
|
+
private readonly webPromptClicks;
|
|
344
|
+
/** The web clicks consumeNonceCallback actually claimed (the others were refused or lost a race). */
|
|
345
|
+
private readonly webPromptClaims;
|
|
312
346
|
private failoverActive;
|
|
313
347
|
/** instance → when a click with no live button entry last fired a cancel. */
|
|
314
348
|
private staleCancelClickAt;
|
|
@@ -357,6 +391,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
357
391
|
private connectionBindingInFlight;
|
|
358
392
|
private collabInstances;
|
|
359
393
|
private healthServer;
|
|
394
|
+
/** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
|
|
395
|
+
private previewListener;
|
|
396
|
+
private previewListening;
|
|
397
|
+
/** The ports the preview listener was started for, and the inputs it was built from (a reload compares them). */
|
|
398
|
+
private previewPorts;
|
|
399
|
+
private previewInputs;
|
|
360
400
|
private healthPortRetried;
|
|
361
401
|
private updateCheckTimer;
|
|
362
402
|
private updateProgressTimer;
|
|
@@ -387,12 +427,36 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
387
427
|
private mirrorBuffer;
|
|
388
428
|
private mirrorTimer;
|
|
389
429
|
private sseClients;
|
|
430
|
+
/** The web chat's recent messages: what `/ui/history` serves and what a reconnecting SSE stream is sent. */
|
|
431
|
+
readonly webChatHistory: WebChatHistory;
|
|
432
|
+
/** Uploaded files and the files the dashboard may fetch back (uploads, reply attachments). */
|
|
433
|
+
readonly webFiles: WebFileLedger;
|
|
390
434
|
/**
|
|
391
435
|
* Read from disk on every access rather than cached at startup: `agend
|
|
392
436
|
* web-token rotate` runs in a separate process, and a cached copy would keep
|
|
393
437
|
* authorizing revoked links and cookies until the fleet restarted.
|
|
394
438
|
*/
|
|
439
|
+
private settingsGeneration;
|
|
440
|
+
private settingsRuntimeRevision;
|
|
441
|
+
private settingsConfirmation;
|
|
442
|
+
private settingsControl;
|
|
443
|
+
private settingsJobSettlements;
|
|
444
|
+
private classicSettingsOwners;
|
|
445
|
+
private queueSettingsOperation;
|
|
446
|
+
private settingsGate;
|
|
447
|
+
private promptSettingsChange;
|
|
448
|
+
private handleSettingsChangeCallback;
|
|
449
|
+
startSettingsConfirmationControl(): Promise<void>;
|
|
395
450
|
private get webToken();
|
|
451
|
+
/**
|
|
452
|
+
* Server-side web sessions (see web-session.ts). Created with the token, not per
|
|
453
|
+
* request: they are persisted, and a restart must find them again.
|
|
454
|
+
*/
|
|
455
|
+
private webSessions;
|
|
456
|
+
/** Heartbeat of the dashboard's SSE stream; public so a test can shorten it. */
|
|
457
|
+
sseHeartbeatMs: number;
|
|
458
|
+
/** The dashboard's login codes. Memory only: a code that outlives the process is a code nobody can prove was not copied. */
|
|
459
|
+
private webLoginCodes;
|
|
396
460
|
/**
|
|
397
461
|
* Set while a Settings apply job is driving the reconcile. The reconcile
|
|
398
462
|
* stays the single doer; it just says out loud what it is doing to whom, so
|
|
@@ -410,7 +474,6 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
410
474
|
/** Set when the file on disk and the in-memory config disagree on a
|
|
411
475
|
* startup-only key at startup. See checkStartupSignatureConsistency(). */
|
|
412
476
|
private fleetSignatureMismatch;
|
|
413
|
-
private viewToken;
|
|
414
477
|
private healthServerListening;
|
|
415
478
|
constructor(dataDir: string);
|
|
416
479
|
private ensureDeliveryOutbox;
|
|
@@ -694,11 +757,51 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
694
757
|
private sendWhenConnected;
|
|
695
758
|
/** Poll for the instance's IPC to come back, then send. Throws if it does not. */
|
|
696
759
|
private sendAfterIpcReturns;
|
|
760
|
+
/**
|
|
761
|
+
* Reserve the display echo before IPC handoff: a fast reply cannot overtake
|
|
762
|
+
* it. The web request settles admission without awaiting the platform POST.
|
|
763
|
+
* Only accepted messages send an echo; failures release replies normally.
|
|
764
|
+
* Each reservation has a 5s total monotonic ordering budget (queue/admission
|
|
765
|
+
* included). Expiry drops unstarted copies and releases replies. An adapter
|
|
766
|
+
* request already in flight may land late, but cannot retain the ordering lane.
|
|
767
|
+
*/
|
|
768
|
+
/**
|
|
769
|
+
* Post an owner web-chat echo to every ClassicBot channel entry opted in
|
|
770
|
+
* for `instance` (#1320 part B). Per entry: the channel's own adapter, no
|
|
771
|
+
* thread, mention suppression on. Returns the number of channels posted
|
|
772
|
+
* to. Failures are per-entry warn-and-continue — a failed echo never fails
|
|
773
|
+
* the web send. Entries without `web_echo: true` are never touched.
|
|
774
|
+
*
|
|
775
|
+
* Every copy is fenced at start time: an entry whose explicit world is
|
|
776
|
+
* gone is skipped (only legacy adapterId-less entries fall back to the
|
|
777
|
+
* primary adapter); when running under a reservation, an exhausted
|
|
778
|
+
* ordering budget or a revoked delivery epoch stops the loop, and each
|
|
779
|
+
* entry is re-resolved against current registration so a removed opt-in
|
|
780
|
+
* or a rebound adapter is never posted through a stale route. A copy
|
|
781
|
+
* already in flight may still land late — the contract permits that.
|
|
782
|
+
*/
|
|
783
|
+
sendClassicWebEcho(instance: string, text: string): Promise<number>;
|
|
784
|
+
reserveWebChannelEcho(instanceName: string, sendEcho: () => Promise<unknown>): (accepted: boolean) => void;
|
|
697
785
|
/** Whether this target already has an ordinary non-user delivery in its FIFO. */
|
|
698
786
|
hasPendingIdleGatedDelivery(instanceName: string): boolean;
|
|
787
|
+
/** The running launch's own steer capability (#1405); undefined for a backend without one, or no running Daemon. */
|
|
788
|
+
instanceLaunchSupportsSteer(instanceName: string): boolean | undefined;
|
|
699
789
|
/** Single delivery facade: wake paused CLIs and serialize non-user work behind idle. */
|
|
700
790
|
deliverToInstance(instanceName: string, payload: Record<string, unknown>, options?: DeliveryOptions): Promise<boolean | void>;
|
|
701
|
-
/**
|
|
791
|
+
/**
|
|
792
|
+
* The fleet-admin list of exactly this adapter (#754): its `access.allowed_users`, read from fleet.yaml. An adapter
|
|
793
|
+
* id that matches no configured channel and no running adapter has NO list — it is never answered with the primary
|
|
794
|
+
* channel's, as `getChannelConfig` would. No id at all means the primary adapter, a single-adapter fleet's only one.
|
|
795
|
+
*/
|
|
796
|
+
private adminListOf;
|
|
797
|
+
/**
|
|
798
|
+
* The one fleet-admin gate (#754): is this user an admin of the adapter that OWNS what they are acting on — the
|
|
799
|
+
* target instance's or General's adapter, never merely the one the request arrived on. An empty list means nobody
|
|
800
|
+
* (`disabled`, so the reply can say admin commands are off); an unknown adapter means nobody either (`denied`).
|
|
801
|
+
* Fleet admin is an explicit config entry: a paired or open-mode user is not one.
|
|
802
|
+
*/
|
|
803
|
+
adminGate(userId: string, ownerAdapterId?: string): "ok" | "disabled" | "denied";
|
|
804
|
+
/** Fleet admin is an explicit config allowlist entry, not merely an open/paired user. See adminGate. */
|
|
702
805
|
isFleetAdmin(userId: string, adapterId?: string): boolean;
|
|
703
806
|
/** Whether this adapter has any fleet admin at all (an empty allowlist means the admin commands are off). */
|
|
704
807
|
hasFleetAdmins(adapterId?: string): boolean;
|
|
@@ -724,13 +827,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
724
827
|
* this caller speak here at all) and then the COMMAND TABLE (src/command-table.ts — does this command apply
|
|
725
828
|
* in this kind of channel, and which kind of admin does it need). The table can only narrow what the door
|
|
726
829
|
* let through. A command nobody registered is answered, not left to time out.
|
|
830
|
+
*
|
|
831
|
+
* The door, the table and the start of the command run in one synchronous stretch (#1399 review): no await between
|
|
832
|
+
* the check and the act, so the channel's instance cannot be rebound to another bot in between.
|
|
727
833
|
*/
|
|
728
834
|
private dispatchSlash;
|
|
729
835
|
/**
|
|
730
|
-
* The door every Discord slash command goes through (src/slash-authz.ts has the rule and the reasoning)
|
|
731
|
-
*
|
|
836
|
+
* The door every Discord slash command goes through (src/slash-authz.ts has the rule and the reasoning): the scope
|
|
837
|
+
* it lets the command into, or the reply that refuses it. Synchronous, so the dispatch acts on what it judged.
|
|
732
838
|
*/
|
|
733
|
-
private
|
|
839
|
+
private slashDoor;
|
|
734
840
|
/** Phase 2: delivery_worker for a target (instance override → fleet default → wake_only). */
|
|
735
841
|
deliveryWorkerMode(target: string): ReturnType<typeof resolveDeliveryWorkerMode>;
|
|
736
842
|
/** Active instances mid-restart: they keep their warm slot through the stop → replacement gap. */
|
|
@@ -769,8 +875,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
769
875
|
/** Deliver an already-resolved hot snapshot without depending on IPC timing. */
|
|
770
876
|
private applyHotConfigUpdate;
|
|
771
877
|
private classicBehaviorUpdate;
|
|
878
|
+
/** Compensation retains this transaction's exact instance owner across its own transitions. */
|
|
879
|
+
captureClassicSettingsRestoration(instanceName: string, changedFields: string[], execution?: SettingsExecution): () => Promise<void>;
|
|
772
880
|
/** Apply a Settings edit to a ClassicBot channel without waiting for the poller. */
|
|
773
|
-
restartClassicInstanceFromSettings(instanceName: string, changedFields?: string[]): Promise<void>;
|
|
881
|
+
restartClassicInstanceFromSettings(instanceName: string, changedFields?: string[], execution?: SettingsExecution): Promise<void>;
|
|
882
|
+
private restartClassicSettingsOwned;
|
|
774
883
|
/** Reload classicBot.yaml once. Kept callable so the periodic production
|
|
775
884
|
* path is covered without relying on fake timers around startAll(). */
|
|
776
885
|
private reloadClassicConfigFromDisk;
|
|
@@ -782,7 +891,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
782
891
|
*/
|
|
783
892
|
resumePaused?: boolean,
|
|
784
893
|
/** Phase 2a: the caller's transition, for a start made from inside a restart or wake. */
|
|
785
|
-
transition?: TransitionHandle): Promise<void>;
|
|
894
|
+
transition?: TransitionHandle, execution?: SettingsExecution): Promise<void>;
|
|
786
895
|
/** Recreate a daemon for a marker-only paused instance after an explicit wake/delivery. */
|
|
787
896
|
startPersistedPausedInstance(name: string, transition?: TransitionHandle): Promise<void>;
|
|
788
897
|
/**
|
|
@@ -932,6 +1041,50 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
932
1041
|
private loadEnvFile;
|
|
933
1042
|
/** Initialize auth before any adapter can answer /dashboard. */
|
|
934
1043
|
private initializeWebAuthTokens;
|
|
1044
|
+
private initializeWebSessions;
|
|
1045
|
+
/**
|
|
1046
|
+
* A single-use login code for the dashboard, for a channel only the operator
|
|
1047
|
+
* can read (`/dashboard`). Null while the panel is closed (no web.token).
|
|
1048
|
+
*/
|
|
1049
|
+
issueDashboardLogin(): {
|
|
1050
|
+
display: string;
|
|
1051
|
+
expiresAt: number;
|
|
1052
|
+
ttlMinutes: number;
|
|
1053
|
+
} | null;
|
|
1054
|
+
private tunnelPurposeLane;
|
|
1055
|
+
private publicWebLink;
|
|
1056
|
+
private getTunnelLane;
|
|
1057
|
+
private publicOwnerCurrent;
|
|
1058
|
+
/** Exact owning General. No primary-adapter or name fallback participates in authorization. */
|
|
1059
|
+
private dashboardOwner;
|
|
1060
|
+
private getPublicWebLink;
|
|
1061
|
+
getPublicWebStatus(): {
|
|
1062
|
+
state: string;
|
|
1063
|
+
expiresAt?: number;
|
|
1064
|
+
remainingSeconds?: number;
|
|
1065
|
+
};
|
|
1066
|
+
confirmPublicWebLogin(info: {
|
|
1067
|
+
label: string;
|
|
1068
|
+
handle: string;
|
|
1069
|
+
owner: LoginCodeOwner;
|
|
1070
|
+
}, current: () => boolean): Promise<void>;
|
|
1071
|
+
/** Telegram's typed command enters through the same strict owner and nonce path as Discord. */
|
|
1072
|
+
dashboardMenu(msg: InboundMessage): Promise<void>;
|
|
1073
|
+
private sendLocalDashboard;
|
|
1074
|
+
private showDashboardMenu;
|
|
1075
|
+
private handleDashboardCallback;
|
|
1076
|
+
/** `/dashboard revoke`: sign out every browser and withdraw any unused code. */
|
|
1077
|
+
revokeWebSessions(): {
|
|
1078
|
+
count: number;
|
|
1079
|
+
durable: boolean;
|
|
1080
|
+
};
|
|
1081
|
+
/** Called by the sign-in endpoint: a login the operator did not make should be visible to them. */
|
|
1082
|
+
onWebLogin(info: {
|
|
1083
|
+
label: string;
|
|
1084
|
+
surface: "local" | "gateway";
|
|
1085
|
+
tier: string;
|
|
1086
|
+
handle: string;
|
|
1087
|
+
}): void;
|
|
935
1088
|
getDashboardAccess(): {
|
|
936
1089
|
ready: boolean;
|
|
937
1090
|
token: string | null;
|
|
@@ -964,6 +1117,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
964
1117
|
* mirroring classic chat-log rotation (same 7-day retention).
|
|
965
1118
|
*/
|
|
966
1119
|
private rotateInboxes;
|
|
1120
|
+
/**
|
|
1121
|
+
* Web uploads no message took before a restart (#1273): removed once older than the upload window. Younger ones
|
|
1122
|
+
* are looked at again when the first comes due (an unref'd timer, so it never holds the process).
|
|
1123
|
+
*/
|
|
1124
|
+
private sweepOrphanedWebUploads;
|
|
967
1125
|
/** Start the shared channel adapter(s) for topic mode */
|
|
968
1126
|
private startSharedAdapter;
|
|
969
1127
|
/** Exponential backoff retry for a single failed adapter (background, non-blocking). */
|
|
@@ -1019,6 +1177,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1019
1177
|
};
|
|
1020
1178
|
/** Start the primary adapter (backward-compatible, sets this.adapter) */
|
|
1021
1179
|
private startSingleAdapter;
|
|
1180
|
+
private startSingleAdapterOwned;
|
|
1022
1181
|
/**
|
|
1023
1182
|
* Register a Telegram connection's command menus; any other kind of channel has none to register. Started, not
|
|
1024
1183
|
* awaited: a slow api.telegram.org must never hold up the adapter's login (each call has its own timeout). Never fatal.
|
|
@@ -1026,12 +1185,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1026
1185
|
private registerTelegramCommandsFor;
|
|
1027
1186
|
/** Start an additional (non-primary) adapter */
|
|
1028
1187
|
private startAdditionalAdapter;
|
|
1188
|
+
private startAdditionalAdapterOwned;
|
|
1029
1189
|
/** Connect IPC to a single instance with all handlers */
|
|
1030
1190
|
connectIpcToInstance(name: string): Promise<void>;
|
|
1031
1191
|
private connectIpcToInstanceInternal;
|
|
1032
1192
|
/** Attempt IPC reconnection with exponential backoff */
|
|
1033
1193
|
private ipcReconnect;
|
|
1034
1194
|
private runIpcReconnect;
|
|
1195
|
+
private disposeSettingsAdapter;
|
|
1035
1196
|
/** Restart a channel adapter after fatal error with infinite retry + 60s cap */
|
|
1036
1197
|
private restartAdapter;
|
|
1037
1198
|
/** Handle inbound message — transcribe voice if present, then route */
|
|
@@ -1126,8 +1287,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1126
1287
|
/**
|
|
1127
1288
|
* #1346: whether this copy may claim the shared dedup key for
|
|
1128
1289
|
* command-like text. Fleet topics resolve an owning adapter and only its
|
|
1129
|
-
* copy proceeds
|
|
1130
|
-
*
|
|
1290
|
+
* copy proceeds. Classic targets and unknown routing keep their existing
|
|
1291
|
+
* handling. At the receiving Telegram world's own forum root, an explicit
|
|
1292
|
+
* suffix requires a known matching username before dedup; present-thread
|
|
1293
|
+
* copies retain their permissive handling when that identity is unknown.
|
|
1131
1294
|
*/
|
|
1132
1295
|
private isOwnerCommandCopy;
|
|
1133
1296
|
private resolveInboundTarget;
|
|
@@ -1158,10 +1321,21 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1158
1321
|
* their fleet is organised. Both stay theirs — this only makes sure they are
|
|
1159
1322
|
* not discovered by an agent failing at three in the morning.
|
|
1160
1323
|
*/
|
|
1324
|
+
/**
|
|
1325
|
+
* #1366: the first time a fleet runs 2.2 or later, tell each chat platform's General — once — that its agents can
|
|
1326
|
+
* now be talked to from a browser. Claimed in upgrade-notices.json before the send, released if the send fails.
|
|
1327
|
+
* Platforms with nowhere to post fleet notices (no group, or a Discord fleet with no General channel) are skipped
|
|
1328
|
+
* and not recorded, so they are told once they have one.
|
|
1329
|
+
*/
|
|
1330
|
+
announceWebChatOnce(version: string): Promise<void>;
|
|
1161
1331
|
private announceToolPermissionsChange;
|
|
1162
1332
|
private checkToolPermission;
|
|
1163
1333
|
private handleOutboundFromInstance;
|
|
1164
1334
|
/** Side effects of a routed reply: cancel-button lifecycle, logs, SSE, chat log. */
|
|
1335
|
+
/** No chat platform is configured at all: the web dashboard is the fleet's only surface. */
|
|
1336
|
+
private isWebOnlyFleet;
|
|
1337
|
+
/** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
|
|
1338
|
+
private webOnlyPromptPlace;
|
|
1165
1339
|
private afterReplyRouted;
|
|
1166
1340
|
private handleScheduleTrigger;
|
|
1167
1341
|
/**
|
|
@@ -1195,6 +1369,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1195
1369
|
private scheduleSourceAdapter;
|
|
1196
1370
|
private notifySourceTopic;
|
|
1197
1371
|
private notifyScheduleFailure;
|
|
1372
|
+
/**
|
|
1373
|
+
* #1426: a deferred occurrence's retry will not run — superseded by the next occurrence, deferred again, or its wait
|
|
1374
|
+
* capped. Recorded as `deferred → skipped (…)`, and said in the schedule's own chat with its admins @mentioned:
|
|
1375
|
+
* this is the case that used to be a silently lost day.
|
|
1376
|
+
*/
|
|
1377
|
+
private scheduleRetryDropped;
|
|
1198
1378
|
/**
|
|
1199
1379
|
* The typed IPC messages, all through one door.
|
|
1200
1380
|
*
|
|
@@ -1320,7 +1500,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1320
1500
|
private slimFleetConfigAtStartup;
|
|
1321
1501
|
private writeFleetConfigBackup;
|
|
1322
1502
|
private patchFleetDocument;
|
|
1323
|
-
|
|
1503
|
+
getSettingsConfigPath(): string;
|
|
1504
|
+
removeInstance(name: string, authorization: ExplicitInstanceRemoval, execution?: SettingsExecution): Promise<void>;
|
|
1505
|
+
private removeInstanceOwned;
|
|
1324
1506
|
startStatuslineWatcher(name: string): void;
|
|
1325
1507
|
stopStatuslineWatcher(name: string): void;
|
|
1326
1508
|
/**
|
|
@@ -1480,6 +1662,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1480
1662
|
*/
|
|
1481
1663
|
private savedAttachmentReactionFor;
|
|
1482
1664
|
reactMessageStatus(instanceName: string, chatId: string, messageId: string, status: DeliveryStatus, threadId?: string, receivedAt?: number): void;
|
|
1665
|
+
/** One delivery report for a web user's message: recorded with it, and sent to the pages when it moved. */
|
|
1666
|
+
private reportWebDelivery;
|
|
1483
1667
|
/**
|
|
1484
1668
|
* Apply a terminal delivery verdict. On Telegram the built-in delivered is
|
|
1485
1669
|
* 👀 and failed is 👎; Discord shows ✅/❌ — both configurable (#1005).
|
|
@@ -1660,6 +1844,60 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1660
1844
|
private handleRetiredPromptButton;
|
|
1661
1845
|
/** Routes a click to the handler that owns its prefix; false when none does. */
|
|
1662
1846
|
private dispatchAdapterCallback;
|
|
1847
|
+
/**
|
|
1848
|
+
* A prompt the dashboard was offered is no longer open (answered on either surface, expired, or its
|
|
1849
|
+
* instance stopped): every page drops its buttons, and shows `outcome` when there is one.
|
|
1850
|
+
*/
|
|
1851
|
+
private webPromptGone;
|
|
1852
|
+
/** The interaction wait an instance is in now, as a comparable key: which daemon/spawn owns it, and its episode. */
|
|
1853
|
+
private interactionWaitKey;
|
|
1854
|
+
/** An instance's interaction observation, pause or wake changed (relayed by the lifecycle): recompute now, not at the tick. */
|
|
1855
|
+
onAttentionChanged(name: string): void;
|
|
1856
|
+
/** The list for the web: every world's items, and those of instances with no world (#1386 §5.0). */
|
|
1857
|
+
needsYouItems(): WebNeedsItem[];
|
|
1858
|
+
/**
|
|
1859
|
+
* #1389: the org chart's structure for the web — the instances the dashboard lists (getUiStatus's names), General,
|
|
1860
|
+
* fleet.yaml's teams, each instance's description and thread link. Read on demand; the live state rides the stream.
|
|
1861
|
+
*/
|
|
1862
|
+
orgChart(): OrgChart;
|
|
1863
|
+
/** The web's Acknowledge (any item; a signed-in session is fleet-admin level). */
|
|
1864
|
+
acknowledgeNeedsItem(id: string, principal: string): {
|
|
1865
|
+
status: 200 | 400 | 404 | 409 | 500;
|
|
1866
|
+
message: string;
|
|
1867
|
+
};
|
|
1868
|
+
private needsYouInstances;
|
|
1869
|
+
private needsYouPrompts;
|
|
1870
|
+
/**
|
|
1871
|
+
* Shutdown: detach the hub first — nothing reaches it from here on, and the next startAll (finishStartup) builds a
|
|
1872
|
+
* fresh one; the old one's late ACKs are fenced by its own stop (#1398 review) — then let it retire its live
|
|
1873
|
+
* messages, bounded so a platform that does not answer cannot hold the shutdown.
|
|
1874
|
+
*/
|
|
1875
|
+
private stopNeedsYou;
|
|
1876
|
+
private startNeedsYou;
|
|
1877
|
+
/** The prompts open on the dashboard right now (a page that loads after one was posted asks for them). */
|
|
1878
|
+
listWebPrompts(): Array<{
|
|
1879
|
+
instance: string;
|
|
1880
|
+
nonce: string;
|
|
1881
|
+
text: string;
|
|
1882
|
+
actions: Array<{
|
|
1883
|
+
id: string;
|
|
1884
|
+
label: string;
|
|
1885
|
+
}>;
|
|
1886
|
+
expiresAt: number;
|
|
1887
|
+
}>;
|
|
1888
|
+
/**
|
|
1889
|
+
* A click on a prompt in the web dashboard (web track C4). It is the platform click, made by the
|
|
1890
|
+
* dashboard: the same handler, the same single claim (whoever answers first — here or on Telegram —
|
|
1891
|
+
* wins), and the platform's buttons collapse to the outcome exactly as for a click there.
|
|
1892
|
+
*
|
|
1893
|
+
* The caller has passed the /ui gate (session, same origin, CSRF). Here: the prompt must be one offered
|
|
1894
|
+
* on the dashboard, about the instance the page named, and the action one of its own buttons.
|
|
1895
|
+
*/
|
|
1896
|
+
clickWebPrompt(instance: string, nonce: string, action: string): Promise<{
|
|
1897
|
+
status: 200 | 400 | 403 | 409;
|
|
1898
|
+
error?: string;
|
|
1899
|
+
outcome?: string;
|
|
1900
|
+
}>;
|
|
1663
1901
|
private retireNonceButtons;
|
|
1664
1902
|
private tipsEnabled;
|
|
1665
1903
|
private readTipState;
|
|
@@ -1753,6 +1991,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1753
1991
|
* instance that has already started a new turn.
|
|
1754
1992
|
*/
|
|
1755
1993
|
private handleCancelClick;
|
|
1994
|
+
/** Where an instance's cancel button is posted — and so the only place a click on it can come from. */
|
|
1995
|
+
private cancelButtonDestination;
|
|
1996
|
+
/**
|
|
1997
|
+
* A click came from this destination. A Discord click names the guild as its chat and the channel as its thread; a
|
|
1998
|
+
* Telegram click names the chat and topic, with the General topic as thread 1 or none at all.
|
|
1999
|
+
*/
|
|
2000
|
+
private clickAtDestination;
|
|
1756
2001
|
private hasCancelButton;
|
|
1757
2002
|
private beginCancelButtonPublication;
|
|
1758
2003
|
/** Remember a clear/cancel/idle decision that arrived before notifyAlert
|
|
@@ -1877,6 +2122,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1877
2122
|
cancelInstance(instanceName: string): boolean;
|
|
1878
2123
|
getDeliveryEpoch(instanceName: string): number;
|
|
1879
2124
|
private isDeliveryEpochCurrent;
|
|
2125
|
+
/** The delivery epoch, and the caller's own fence when it gave one (DeliveryOptions.stillCurrent, #1426). */
|
|
2126
|
+
private deliveryCurrent;
|
|
1880
2127
|
/** Invalidate work queued before a user cancel and wake idle-gate waiters. */
|
|
1881
2128
|
private cancelPendingDeliveries;
|
|
1882
2129
|
/** Web-terminal login: the only sign-in path (the chat-relay mode was removed, #1139). */
|
|
@@ -1927,6 +2174,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1927
2174
|
* happened to be paused. General is still told the outcome.
|
|
1928
2175
|
*/
|
|
1929
2176
|
private applyClassicApproval;
|
|
2177
|
+
private notifyClassicRequester;
|
|
1930
2178
|
/** Consume a ClassicBot approval button. */
|
|
1931
2179
|
private handleClassicApproval;
|
|
1932
2180
|
/**
|
|
@@ -2195,7 +2443,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2195
2443
|
/** `/effort` — DC Select Menu, or apply directly when a level is given. */
|
|
2196
2444
|
private handleEffortSlash;
|
|
2197
2445
|
/** TG inline-keyboard effort menu. Returns null on success, else a fallback string. */
|
|
2198
|
-
promptEffortMenu(instanceName: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string): Promise<string | null>;
|
|
2446
|
+
promptEffortMenu(instanceName: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string, adapterId?: string): Promise<string | null>;
|
|
2199
2447
|
/** Consume an `/effort` selection callback. Mirrors handleModelSelection. */
|
|
2200
2448
|
private handleEffortSelection;
|
|
2201
2449
|
private handleModelSlash;
|
|
@@ -2204,7 +2452,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2204
2452
|
* pendingModelSelects coordinator as the DC Select Menu path.
|
|
2205
2453
|
* Returns null on success (menu shown), or a fallback string to send.
|
|
2206
2454
|
*/
|
|
2207
|
-
promptModelMenu(instanceName: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string): Promise<string | null>;
|
|
2455
|
+
promptModelMenu(instanceName: string, userId: string, channelId: string, adapter: ChannelAdapter, chatId: string, threadId?: string, adapterId?: string): Promise<string | null>;
|
|
2208
2456
|
/** Cached-or-live account catalog behind "/model → more models" (claude). */
|
|
2209
2457
|
private claudeApiModelOptions;
|
|
2210
2458
|
/** Replace a consumed "/model" menu with the full account catalog tier. */
|
|
@@ -2221,6 +2469,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2221
2469
|
* menu, because a picker with no rows cannot even offer another refresh.
|
|
2222
2470
|
*/
|
|
2223
2471
|
private refreshModelMenu;
|
|
2472
|
+
/**
|
|
2473
|
+
* A /model or /effort menu click may still act (#1396 review): the instance is still owned by the adapter the click
|
|
2474
|
+
* came through (it may have been rebound since the menu opened) and the clicker is still that channel's admin. Asked
|
|
2475
|
+
* when the click is claimed and again right before the change is applied.
|
|
2476
|
+
*/
|
|
2477
|
+
private menuClickStillCurrent;
|
|
2478
|
+
/** Current source-to-target mapping, including same-adapter topic moves. */
|
|
2479
|
+
private commandChannelStillTargets;
|
|
2224
2480
|
/** Consume a `/model` selection callback. Returns true for all model-select ids (incl. stale). */
|
|
2225
2481
|
private handleModelSelection;
|
|
2226
2482
|
/** Apply a model to an instance: runtime paste (claude-code) or persist + restart (others). */
|
|
@@ -2268,6 +2524,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2268
2524
|
* you @mention the bot; on Discord, @mention or `/chat`. The chat's platform is the adapter it came through.
|
|
2269
2525
|
*/
|
|
2270
2526
|
private classicStartKey;
|
|
2527
|
+
/** Approval is a system notification: General's agent need not be running. */
|
|
2528
|
+
private findClassicApprovalGeneral;
|
|
2271
2529
|
/** Return a user-facing blocker without mutating ClassicBot state. */
|
|
2272
2530
|
private validateClassicStart;
|
|
2273
2531
|
private isBackendInstalled;
|
|
@@ -2407,6 +2665,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2407
2665
|
verificationId: string;
|
|
2408
2666
|
sessionBinding: string;
|
|
2409
2667
|
idempotencyKey: string;
|
|
2668
|
+
execution?: SettingsExecution;
|
|
2410
2669
|
}): {
|
|
2411
2670
|
job: ProviderSecretApplyJob;
|
|
2412
2671
|
reused: boolean;
|
|
@@ -2450,6 +2709,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2450
2709
|
verificationId: string;
|
|
2451
2710
|
sessionBinding: string;
|
|
2452
2711
|
idempotencyKey: string;
|
|
2712
|
+
execution?: SettingsExecution;
|
|
2453
2713
|
}): {
|
|
2454
2714
|
job: SecretApplyJob;
|
|
2455
2715
|
reused: boolean;
|
|
@@ -2484,6 +2744,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2484
2744
|
verificationId: string;
|
|
2485
2745
|
sessionBinding: string;
|
|
2486
2746
|
idempotencyKey: string;
|
|
2747
|
+
execution?: SettingsExecution;
|
|
2487
2748
|
}): {
|
|
2488
2749
|
job: SecretApplyJob;
|
|
2489
2750
|
reused: boolean;
|
|
@@ -2539,7 +2800,27 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2539
2800
|
* Only the parsed host name is logged, never the raw header.
|
|
2540
2801
|
*/
|
|
2541
2802
|
private noteRejectedHost;
|
|
2803
|
+
/** Shared handler dispatcher; gateway admission is enforced by its separate listener. */
|
|
2804
|
+
private dispatchWebHttp;
|
|
2542
2805
|
private startHealthServer;
|
|
2806
|
+
/**
|
|
2807
|
+
* #1306: the preview listener, beside the web listener and closed with it. When it cannot listen (the port is
|
|
2808
|
+
* taken, web.preview: false), cards show Source and Download only; nothing else changes.
|
|
2809
|
+
*/
|
|
2810
|
+
private startPreviewListener;
|
|
2811
|
+
/** What a reload may change hot: web.preview, and the dashboard names (the shim's allow-list and frame-ancestors). */
|
|
2812
|
+
private previewInputsSignature;
|
|
2813
|
+
/**
|
|
2814
|
+
* After a config reload: web.preview true→false stops the listener at once (/ui then offers no origin, boot or
|
|
2815
|
+
* frame-src), false→true starts it, and a change of dashboard names rebuilds it (a new boot id). preview_port and
|
|
2816
|
+
* preview_origin are not adopted here: they are startup-only, and the reload reports "restart required".
|
|
2817
|
+
*/
|
|
2818
|
+
private reconcilePreviewListener;
|
|
2819
|
+
private stopPreviewListener;
|
|
2820
|
+
/** For one /ui load: the preview origin it may frame, and the listener's boot id (see web-preview.ts). */
|
|
2821
|
+
previewForUi(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
|
|
2822
|
+
boot: string | null;
|
|
2823
|
+
};
|
|
2543
2824
|
getUiStatus(): unknown;
|
|
2544
2825
|
private getUiStatusSync;
|
|
2545
2826
|
}
|