@songsid/agend 2.3.5-alpha.10 → 2.3.5-alpha.12
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/dist/accounts-view.d.ts +17 -0
- package/dist/accounts-view.js +24 -8
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +2 -2
- package/dist/auth-api.d.ts +48 -16
- package/dist/auth-api.js +83 -32
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/settings-role.d.ts +56 -0
- package/dist/authority/settings-role.js +48 -0
- package/dist/authority/settings-role.js.map +1 -0
- package/dist/backend/claude-code.d.ts +2 -0
- package/dist/backend/claude-code.js +32 -6
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/cli-env-probe.js +6 -2
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/codex.d.ts +5 -3
- package/dist/backend/codex.js +31 -13
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +18 -0
- package/dist/backend/credential-profile.js +46 -0
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.d.ts +3 -1
- package/dist/backend/muse.js +31 -1
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +17 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +15 -0
- package/dist/backend-availability.js +37 -1
- package/dist/backend-availability.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/bundled-tmux-guard.d.ts +4 -0
- package/dist/bundled-tmux-guard.js +7 -0
- package/dist/bundled-tmux-guard.js.map +1 -1
- package/dist/claude-auth-status.d.ts +20 -8
- package/dist/claude-auth-status.js +38 -22
- package/dist/claude-auth-status.js.map +1 -1
- package/dist/cli-audited.d.ts +60 -0
- package/dist/cli-audited.js +84 -0
- package/dist/cli-audited.js.map +1 -0
- package/dist/cli-capability.d.ts +36 -5
- package/dist/cli-capability.js +2 -2
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-caps-module.d.ts +5 -1
- package/dist/cli-caps-module.js +4 -2
- package/dist/cli-caps-module.js.map +1 -1
- package/dist/cli-registry-check.js +16 -2
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +56 -4
- package/dist/cli-registry.js +1 -1
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli-spec-antigravity.d.ts +12 -1
- package/dist/cli-spec-antigravity.js +13 -1
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli-spec-claude-code.d.ts +9 -0
- package/dist/cli-spec-claude-code.js +4 -2
- package/dist/cli-spec-claude-code.js.map +1 -1
- package/dist/cli-spec-codex.d.ts +10 -1
- package/dist/cli-spec-codex.js +5 -3
- package/dist/cli-spec-codex.js.map +1 -1
- package/dist/cli-spec-grok.d.ts +5 -0
- package/dist/cli-spec-grok.js +6 -1
- package/dist/cli-spec-grok.js.map +1 -1
- package/dist/cli-spec-kiro-cli.d.ts +7 -1
- package/dist/cli-spec-kiro-cli.js +7 -3
- package/dist/cli-spec-kiro-cli.js.map +1 -1
- package/dist/cli-spec-muse.d.ts +2 -0
- package/dist/cli-spec-muse.js +3 -1
- package/dist/cli-spec-muse.js.map +1 -1
- package/dist/cli-spec-opencode.d.ts +11 -1
- package/dist/cli-spec-opencode.js +7 -2
- package/dist/cli-spec-opencode.js.map +1 -1
- package/dist/cli.js +28 -1
- package/dist/cli.js.map +1 -1
- package/dist/create-host-account.d.ts +17 -0
- package/dist/create-host-account.js +47 -0
- package/dist/create-host-account.js.map +1 -0
- package/dist/daemon.d.ts +26 -0
- package/dist/daemon.js +131 -10
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.js +7 -0
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-context.d.ts +5 -1
- package/dist/fleet-manager.d.ts +363 -71
- package/dist/fleet-manager.js +1374 -367
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +1 -1
- package/dist/fleet-process-handlers.js +3 -2
- package/dist/fleet-process-handlers.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +21 -14
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +9 -8
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +27 -20
- package/dist/instance-lifecycle.js +33 -3
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.js +29 -6
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +125 -81
- package/dist/locale.js.map +1 -1
- package/dist/login-manager.d.ts +2 -2
- package/dist/login-manager.js +3 -2
- package/dist/login-manager.js.map +1 -1
- package/dist/native-model-catalog.d.ts +20 -0
- package/dist/native-model-catalog.js +107 -2
- package/dist/native-model-catalog.js.map +1 -1
- package/dist/public-web-gateway.js +1 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +5 -0
- package/dist/public-web-link.js +8 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/runtime-api.d.ts +1 -1
- package/dist/runtime-api.js +104 -12
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-autostart.d.ts +61 -0
- package/dist/runtime-autostart.js +161 -0
- package/dist/runtime-autostart.js.map +1 -0
- package/dist/runtime-background.d.ts +200 -0
- package/dist/runtime-background.js +480 -0
- package/dist/runtime-background.js.map +1 -0
- package/dist/runtime-build-info.js +5 -5
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-background.d.ts +92 -0
- package/dist/runtime-cli-background.js +336 -0
- package/dist/runtime-cli-background.js.map +1 -0
- package/dist/runtime-cli-install.d.ts +148 -8
- package/dist/runtime-cli-install.js +253 -59
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-cli.d.ts +8 -1
- package/dist/runtime-cli.js +206 -44
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +11 -0
- package/dist/runtime-client-store.js +20 -5
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +23 -1
- package/dist/runtime-client.js +92 -6
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-connection.d.ts +1 -1
- package/dist/runtime-connection.js +1 -1
- package/dist/runtime-connection.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +95 -1
- package/dist/runtime-coordinator.js +344 -10
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-enroll-notice.d.ts +4 -0
- package/dist/runtime-enroll-notice.js +21 -0
- package/dist/runtime-enroll-notice.js.map +1 -0
- package/dist/runtime-enrollment.d.ts +21 -0
- package/dist/runtime-enrollment.js +52 -0
- package/dist/runtime-enrollment.js.map +1 -0
- package/dist/runtime-pane-native.js +4 -4
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-protocol.d.ts +78 -1
- package/dist/runtime-protocol.js +95 -5
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +12 -0
- package/dist/runtime-remote-accounts.js +56 -5
- package/dist/runtime-remote-accounts.js.map +1 -1
- package/dist/runtime-remote-setup.d.ts +4 -1
- package/dist/runtime-remote-setup.js +4 -1
- package/dist/runtime-remote-setup.js.map +1 -1
- package/dist/runtime-update-controller.d.ts +11 -0
- package/dist/runtime-update-controller.js +56 -4
- package/dist/runtime-update-controller.js.map +1 -1
- package/dist/settings-api.d.ts +13 -1
- package/dist/settings-api.js +44 -20
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.d.ts +5 -13
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +11 -13
- package/dist/settings-confirmation.js +2 -6
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +5 -0
- package/dist/settings-effect.js +76 -10
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +8 -1
- package/dist/settings-http-confirmation.js +39 -13
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-request-capability.d.ts +7 -0
- package/dist/settings-request-capability.js +3 -1
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/setup-i18n.js +4 -4
- package/dist/setup-i18n.js.map +1 -1
- package/dist/signin-keepalive.d.ts +25 -1
- package/dist/signin-keepalive.js +44 -1
- package/dist/signin-keepalive.js.map +1 -1
- package/dist/subagent-records.d.ts +45 -0
- package/dist/subagent-records.js +214 -0
- package/dist/subagent-records.js.map +1 -0
- package/dist/subagent-service.d.ts +27 -0
- package/dist/subagent-service.js +199 -0
- package/dist/subagent-service.js.map +1 -0
- package/dist/tmux-manager.d.ts +2 -2
- package/dist/tmux-manager.js +5 -3
- package/dist/tmux-manager.js.map +1 -1
- package/dist/ui/account-identity.js +7 -5
- package/dist/ui/accounts-keepalive.js +17 -17
- package/dist/ui/accounts-manage.js +34 -34
- package/dist/ui/accounts-view.js +68 -24
- package/dist/ui/agent-runtime-settings.js +1 -1
- package/dist/ui/backend-signin.js +67 -67
- package/dist/ui/chat-msg-actions.js +50 -4
- package/dist/ui/chat-quote.js +256 -0
- package/dist/ui/chat-store.js +9 -4
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +4 -4
- package/dist/ui/general-location.js +1 -1
- package/dist/ui/host-install.js +290 -0
- package/dist/ui/hub-company-join-strings.js +3 -0
- package/dist/ui/hub-company-join.js +20 -2
- package/dist/ui/hub-owner-strings.js +5 -4
- package/dist/ui/hub-pairing-progress-strings.js +1 -1
- package/dist/ui/hub-quick-strings.js +4 -4
- package/dist/ui/hub-strings.js +6 -6
- package/dist/ui/machine-signin.js +4 -4
- package/dist/ui/model-picker.js +68 -0
- package/dist/ui/panel-chat.js +74 -13
- package/dist/ui/panel-fleet.js +8 -2
- package/dist/ui/panel-hub.js +8 -4
- package/dist/ui/panel-needs.js +2 -2
- package/dist/ui/panel-runtimes.js +232 -33
- package/dist/ui/panel-settings.js +7 -1
- package/dist/ui/panel-windows-cli.js +1 -1
- package/dist/ui/runtime-cli-install.js +99 -20
- package/dist/ui/runtime-commands.d.ts +2 -0
- package/dist/ui/runtime-commands.js +34 -1
- package/dist/ui/runtime-update-status.js +2 -2
- package/dist/ui/search-dialog.js +1 -0
- package/dist/ui/settings-access-overview.js +167 -0
- package/dist/ui/settings-access-strings.js +1 -1
- package/dist/ui/settings-catalog.js +19 -3
- package/dist/ui/settings-confirm.js +2 -2
- package/dist/ui/settings-devices.js +59 -25
- package/dist/ui/settings-dialogs.js +12 -13
- package/dist/ui/settings-guests.js +1 -1
- package/dist/ui/settings-hub-company-join.js +10 -7
- package/dist/ui/settings-hub-connection.js +121 -0
- package/dist/ui/settings-hub-membership.js +1 -1
- package/dist/ui/settings-hub-run.js +5 -6
- package/dist/ui/settings-hub-section.js +3 -6
- package/dist/ui/settings-hub.js +12 -7
- package/dist/ui/settings-layout.js +9 -7
- package/dist/ui/settings-outside.js +87 -19
- package/dist/ui/settings-registry.js +2 -1
- package/dist/ui/settings-revoke-strings.js +28 -0
- package/dist/ui/settings-strings.js +25 -25
- package/dist/ui/settings-web-authority.js +11 -4
- package/dist/ui/shared/accounts.css +11 -1
- package/dist/ui/shared/agend-auth.js +8 -1
- package/dist/ui/shared/app-i18n.js +10 -12
- package/dist/ui/shared/app-session.js +13 -16
- package/dist/ui/shared/app-shell.js +37 -37
- package/dist/ui/shared/app-store.js +2 -0
- package/dist/ui/shared/app.css +85 -14
- package/dist/ui/shared/chat-render.js +17 -5
- package/dist/ui/shared/chat-strings.js +4 -4
- package/dist/ui/shared/device-roles.js +27 -0
- package/dist/ui/shared/host-install.css +10 -0
- package/dist/ui/shared/hub-owner.css +6 -0
- package/dist/ui/shared/model-picker.css +21 -0
- package/dist/ui/shared/runtime-install.css +26 -1
- package/dist/ui/shared/setup-host-text.js +4 -4
- package/dist/ui/shared/signin.js +171 -64
- package/dist/ui/shared/subagent-row.css +15 -0
- package/dist/ui/shared/usage-dialog.js +28 -16
- package/dist/ui/shared/view-strings.js +7 -7
- package/dist/ui/shared/web-authorize.js +54 -4
- package/dist/ui/signin.html +19 -8
- package/dist/ui/structured-signin.js +30 -30
- package/dist/ui/subagent-row.js +72 -0
- package/dist/ui/web-terminal/terminal.js +9 -9
- package/dist/update-launch.js +4 -1
- package/dist/update-launch.js.map +1 -1
- package/dist/update-npm-env.d.ts +70 -0
- package/dist/update-npm-env.js +128 -0
- package/dist/update-npm-env.js.map +1 -0
- package/dist/usage/format-rich.js +1 -1
- package/dist/usage/format-rich.js.map +1 -1
- package/dist/usage/providers.js +2 -2
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +8 -2
- package/dist/usage/usage-api.js +12 -5
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +38 -4
- package/dist/web-api.js +370 -18
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +1 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-backend-login.d.ts +2 -0
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-channel-echo.js +3 -1
- package/dist/web-channel-echo.js.map +1 -1
- package/dist/web-commands.d.ts +9 -1
- package/dist/web-commands.js +7 -1
- package/dist/web-commands.js.map +1 -1
- package/dist/web-host-install.d.ts +127 -0
- package/dist/web-host-install.js +165 -0
- package/dist/web-host-install.js.map +1 -0
- package/dist/web-remote-access.d.ts +194 -11
- package/dist/web-remote-access.js +458 -34
- package/dist/web-remote-access.js.map +1 -1
- package/dist/web-session.d.ts +11 -3
- package/dist/web-session.js.map +1 -1
- package/dist/web-signin-device.d.ts +16 -0
- package/dist/web-signin-device.js +81 -0
- package/dist/web-signin-device.js.map +1 -0
- package/dist/web-update.js +3 -1
- package/dist/web-update.js.map +1 -1
- package/dist/windows-cli-api.js +2 -1
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +14 -0
- package/dist/windows-cli-worker.js +145 -1
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +4 -0
- package/dist/windows-cli.js +9 -1
- package/dist/windows-cli.js.map +1 -1
- package/launcher/agend-install.cjs +16 -3
- package/package.json +1 -1
- package/templates/runtime-install/install.ps1 +219 -12
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ import { WebSettingsTools } from "./web-settings-tools.js";
|
|
|
103
103
|
import { type Delegation, type TrafficItem } from "./fleet-traffic.js";
|
|
104
104
|
import { type WebUpdateHost } from "./web-update.js";
|
|
105
105
|
import { WebBackendLogins, type SignInTarget } from "./web-backend-login.js";
|
|
106
|
+
import { WebHostInstalls, type HostInstallMode, type HostInstallReporter, type HostInstallStart } from "./web-host-install.js";
|
|
106
107
|
import { BrowserBackendSignIns } from "./browser-backend-signins.js";
|
|
107
108
|
import { type RawConfigPatch } from "./settings-api.js";
|
|
108
109
|
import { type AgentEndpointContext } from "./agent-endpoint.js";
|
|
@@ -121,6 +122,7 @@ import { type OrgChart } from "./web-org.js";
|
|
|
121
122
|
import { type MemoryHog } from "./memory-hogs.js";
|
|
122
123
|
import { type CacheReport } from "./cache-service.js";
|
|
123
124
|
import { type WebCommandResult } from "./web-commands.js";
|
|
125
|
+
import { type TotpSignInResult } from "./auth-api.js";
|
|
124
126
|
import { type SessionRecord, type WebDeviceRow } from "./web-session.js";
|
|
125
127
|
import { WebNotices } from "./web-notices.js";
|
|
126
128
|
import { WebRemoteAccess } from "./web-remote-access.js";
|
|
@@ -367,6 +369,30 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
367
369
|
private localPaneRelay;
|
|
368
370
|
private openingLocalPane;
|
|
369
371
|
private runtimeHub;
|
|
372
|
+
/**
|
|
373
|
+
* A message the owner must get (a computer joined with an install-command token, so nobody approved it). It is written to `pending-owner-notices.json` FIRST and removed only
|
|
374
|
+
* when a delivery is acknowledged: the platform took the message (the send's promise resolved) or the dashboard's Notices recorded it. So none of these loses it: no place to
|
|
375
|
+
* send it yet (a chat-connected fleet with no General and no primary notice target, adapters not up), a send the platform refuses after it was dispatched, a retry that is
|
|
376
|
+
* refused again, a restart. Each kept notice is tried again every minute until it is acknowledged. The file is private. Capacity is explicit, never silent: past
|
|
377
|
+
* OWNER_NOTICE_CAP undelivered notices the oldest are folded into ONE notice that says how many computers joined without a delivered notice and tells the owner to review
|
|
378
|
+
* Settings → Runtime, so the fact is never dropped. Delivery is at least once: a crash between the send and its acknowledgement can send a notice twice.
|
|
379
|
+
*/
|
|
380
|
+
private ownerNoticeTimer;
|
|
381
|
+
/** One physical send per kept notice at a time: the claim is held until THAT attempt settles (never aged out) and each attempt's callbacks only act on its own claim. */
|
|
382
|
+
private readonly ownerNoticeLive;
|
|
383
|
+
private readonly ownerNoticeInFlight;
|
|
384
|
+
private pendingOwnerNoticesFile;
|
|
385
|
+
private readPendingOwnerNotices;
|
|
386
|
+
private writePendingOwnerNotices;
|
|
387
|
+
static readonly OWNER_NOTICE_CAP = 100;
|
|
388
|
+
/** Past the cap, the oldest are folded into one notice (a count, and where to look); it never silently disappears. */
|
|
389
|
+
private foldOwnerNotices;
|
|
390
|
+
/** Keeps the notice, then tries to deliver it; it stays on disk until a delivery is acknowledged. */
|
|
391
|
+
deliverOwnerNotice(text: string): void;
|
|
392
|
+
private attemptOwnerNotice;
|
|
393
|
+
/** Tries every kept notice that has no attempt in flight (oldest first); returns how many are kept. */
|
|
394
|
+
flushOwnerNotices(): number;
|
|
395
|
+
private scheduleOwnerNoticeFlush;
|
|
370
396
|
private runtimeInstall;
|
|
371
397
|
/** One service for the public installer routes and the administrator API: the hash the dashboard shows is the hash of what is sent. */
|
|
372
398
|
runtimeInstaller(): RuntimeInstallService;
|
|
@@ -427,6 +453,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
427
453
|
private hubMemberPairingApi;
|
|
428
454
|
private hubPairingNotices;
|
|
429
455
|
hubMemberPairing(): ReturnType<typeof import("./hub/member/pairing-api.js").createHubMemberPairingApi> | null;
|
|
456
|
+
/** Explicit owner Settings read only. A paused binding is not permission to mount or connect a member. */
|
|
457
|
+
hubMemberPairingView(): Promise<import("./hub-pairing-summary.js").HubPairingView>;
|
|
430
458
|
attachHubMemberPairing(api: ReturnType<typeof import("./hub/member/pairing-api.js").createHubMemberPairingApi> | null): void;
|
|
431
459
|
private readonly generalLocationFlights;
|
|
432
460
|
private readonly generalAttentionEpisodes;
|
|
@@ -1086,33 +1114,88 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1086
1114
|
private queueSettingsOperation;
|
|
1087
1115
|
private settingsGate;
|
|
1088
1116
|
/**
|
|
1089
|
-
* #
|
|
1090
|
-
*
|
|
1091
|
-
*
|
|
1092
|
-
*
|
|
1093
|
-
*
|
|
1094
|
-
* -
|
|
1095
|
-
*
|
|
1096
|
-
* -
|
|
1097
|
-
*
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
* in, its cookie) confirms the same way. A public link never qualifies (evaluateWebAuthority refuses it). General
|
|
1102
|
-
* still hears it: a notice, not a step.
|
|
1117
|
+
* AGEND-122 (upstream #3486, R1): a held change confirmed by the request itself — by the role of whoever asks, not by a
|
|
1118
|
+
* proof given once per browser. A signed-in human fleet admin on a web cookie session may press Apply now from wherever
|
|
1119
|
+
* the dashboard is reached (this computer, a LAN or tailnet name, a link), for every kind of change, on a chat fleet and
|
|
1120
|
+
* on a web-only one alike. settings-role.ts has the checks, asked of the live session now and again at execution:
|
|
1121
|
+
* - a cookie session of an admin (a guest, a read-only session, a header token, the CLI and an agent's request never);
|
|
1122
|
+
* - the owner's own knobs: the web authorization switch, "Only this computer can authorize", and the link option of a
|
|
1123
|
+
* link the session arrived over;
|
|
1124
|
+
* - a chat account is still an admin of its connection, and of every connection the change touches (the scope the
|
|
1125
|
+
* store holds; when that is not known, its own connection's admin list is all there is to ask).
|
|
1126
|
+
* It no longer asks that a chat card could have been posted, that the account confirmed this browser in a DM (#1939),
|
|
1127
|
+
* or that the host's own session confirms: those were what sent a remote admin to the AgEnD computer. The chat card
|
|
1128
|
+
* stays another way to confirm; General is told of a change a chat account confirmed here, when one can be.
|
|
1103
1129
|
*/
|
|
1104
1130
|
private settingsSelfConfirmation;
|
|
1105
1131
|
/**
|
|
1106
|
-
*
|
|
1107
|
-
*
|
|
1108
|
-
*
|
|
1109
|
-
*
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1132
|
+
* AGEND-122 (Prism P2): whether the ordinary New Agent shortcut — created at once, web-confirmed, with no held change — is open to
|
|
1133
|
+
* this request. It is the same policy as Apply now: refused where "Only this computer can authorize" is on and this is not the
|
|
1134
|
+
* AgEnD computer, and off the computer for an admin whose own "ask for my code" switch is on (the creation then waits as a held
|
|
1135
|
+
* change and takes their code). Everything else is as before the role existed.
|
|
1136
|
+
*/
|
|
1137
|
+
private settingsDirectCreationAllowed;
|
|
1138
|
+
/** AGEND-122: this request's role over a held change — its cookie session asked afresh each time (settings-role.ts). */
|
|
1139
|
+
private settingsRole;
|
|
1140
|
+
/**
|
|
1141
|
+
* AGEND-122 (upstream R1): a change that opens a link, or one that changes a secret, confirmed from another device always
|
|
1142
|
+
* posts a Notice — the audit trail alone is not what the owner sees. Null: not one of those, or confirmed on this computer.
|
|
1143
|
+
*/
|
|
1144
|
+
private settingsRemoteNoticeKind;
|
|
1145
|
+
/**
|
|
1146
|
+
* Where that Notice goes: a web-only fleet's dashboard Notices; a chat fleet's General, else its primary connection's notice
|
|
1147
|
+
* target (notifyFleetError) — and when nothing could be posted there, the web Notices, which a chat fleet's dashboard then
|
|
1148
|
+
* shows. Never throttled, and never silent. It names the change as the card showed it (redacted), who confirmed and how.
|
|
1149
|
+
*/
|
|
1150
|
+
private postSettingsRemoteNotice;
|
|
1151
|
+
/**
|
|
1152
|
+
* A security Notice that must not be silent: where a fleet notice goes (General, else the primary connection's notice target,
|
|
1153
|
+
* else a web-only fleet's dashboard Notices) and, when nothing could be posted there, the web Notices store directly — which a
|
|
1154
|
+
* chat fleet's dashboard then shows (recordWebNotice itself refuses a chat fleet). Never throttled; redacted like any Notice.
|
|
1155
|
+
*/
|
|
1156
|
+
private postFleetSecurityNotice;
|
|
1157
|
+
/** Who an authenticator action is named after in its Notice. */
|
|
1158
|
+
private adminName;
|
|
1159
|
+
/**
|
|
1160
|
+
* AGEND-122: a chat account confirms a change only as an admin of every connection it touches — settingsChatAuthority's own
|
|
1161
|
+
* rule, without needing a General to post to: the scope the store holds (a scope not known: none, fail closed), and, for a
|
|
1162
|
+
* change with `primaryGeneral` (the Hub, the connection list and order, whole-fleet sensitive settings), the connection that owns
|
|
1163
|
+
* the primary General too. Every connection involved, the account's own included, is configured exactly once and on one platform
|
|
1164
|
+
* (user ids are per platform). Asked at entry and again by `current()`.
|
|
1165
|
+
*/
|
|
1166
|
+
private settingsAccountMayConfirm;
|
|
1167
|
+
/**
|
|
1168
|
+
* AGEND-122 (upstream #3486, per admin): each admin's own stricter switch — off by default, kept with their own authenticator
|
|
1169
|
+
* (web-remote-access.ts) and never in fleet.yaml. While it is on, THEIR confirmations from a page that is not the browser on the
|
|
1170
|
+
* AgEnD computer itself do not press Apply now: each takes the code of their own app, bound to that one change
|
|
1171
|
+
* (settingsTotpConfirm). Another admin is never asked, and cannot turn it on or off for them. The computer's own browser is not
|
|
1172
|
+
* asked. The switch lives in the app's record, so it can only be on while the app is set up.
|
|
1173
|
+
*/
|
|
1174
|
+
private strictFor;
|
|
1175
|
+
/**
|
|
1176
|
+
* Who is asked for the code: a session with a role over a held change (settings-role.ts) that is not on this computer,
|
|
1177
|
+
* while the option is on. The role carries every check Apply now has — the web authorization switch, "Only this computer
|
|
1178
|
+
* can authorize" (Q6), the link options, a chat account still an admin of the connections the change touches — asked at
|
|
1179
|
+
* entry and again by `current()` at execution, so a demoted admin's pending change never runs. One refusal on top: a change
|
|
1180
|
+
* that opens a link is never confirmed over a link (the public gateway, bound by the gateway itself, never by a header), the
|
|
1181
|
+
* code or not. The code is the authority; the session only carries it.
|
|
1182
|
+
*/
|
|
1183
|
+
private settingsCodeSession;
|
|
1184
|
+
/** One look at a code, for every place that asks for one: the fleet-wide wrong-code limit and a clock that looks off, logged and noticed the same way. */
|
|
1185
|
+
private checkAuthenticatorCode;
|
|
1186
|
+
/**
|
|
1187
|
+
* AGEND-122: a page that is not the browser on the AgEnD computer itself — a LAN or tailnet connection (a Host that is
|
|
1188
|
+
* not loopback, a forwarding header, a peer that is not this machine) or a link. Said to the card so it names no host
|
|
1189
|
+
* command and no "go to that computer" step the reader cannot take; asked per request and never a check: what a page may
|
|
1190
|
+
* confirm is still settingsSelfConfirmation / settingsCodeSession, and the card's wording is all this changes.
|
|
1191
|
+
*/
|
|
1192
|
+
settingsPageIsRemote(req: IncomingMessage): boolean;
|
|
1193
|
+
settingsTotpState(store: SettingsConfirmationStore, req: IncomingMessage, id: string): "ready" | "not_set_up" | "on_host" | "host_only" | null;
|
|
1194
|
+
/**
|
|
1195
|
+
* The code, checked: the change's digest first (a stale page never burns a code), then one use per time step and the
|
|
1196
|
+
* fleet-wide wrong-code limit (web-remote-access.ts), then a confirmation asked again at execution (`current`) — the same
|
|
1197
|
+
* session and role, the same enrolment (an app replaced, or removed and set up again, while the change waits ends it for good).
|
|
1113
1198
|
*/
|
|
1114
|
-
private settingsTotpSession;
|
|
1115
|
-
settingsTotpState(store: SettingsConfirmationStore, req: IncomingMessage, id: string): "ready" | "not_set_up" | "on_host" | "host_browser" | null;
|
|
1116
1199
|
settingsTotpConfirm(store: SettingsConfirmationStore, req: IncomingMessage, id: string, code: string, digest: string): {
|
|
1117
1200
|
label: string;
|
|
1118
1201
|
current(): boolean;
|
|
@@ -1156,41 +1239,68 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1156
1239
|
/** Refs #3061 (P2b): `web.login_qr` (default off), read per page served — the sign-in page then draws the approve link's QR code. */
|
|
1157
1240
|
loginQrEnabled(): boolean;
|
|
1158
1241
|
/**
|
|
1159
|
-
* GET /ui/devices: is this a web-only fleet, may THIS session
|
|
1160
|
-
*
|
|
1161
|
-
*
|
|
1162
|
-
*
|
|
1163
|
-
*
|
|
1242
|
+
* GET /ui/devices — the one device list, for every fleet (AGEND-138, #3486): is this a web-only fleet, may THIS session
|
|
1243
|
+
* approve a new device (web-only: the verified owner) and end the others' (`canEndOthers`), and — to an admin session,
|
|
1244
|
+
* never to a guest or the CLI's header token — every signed-in session of any tier, one row each (webDeviceRows).
|
|
1245
|
+
* `owner`: the verified owner (web-only: this computer's admin here or from outside; a chat fleet: an admin whose chat
|
|
1246
|
+
* account confirmed this session). `authority`: web authorization is on; with it off nobody is an owner, so on a web-only
|
|
1247
|
+
* fleet nobody may add a device or sign another out and the page says so.
|
|
1164
1248
|
*/
|
|
1165
1249
|
webDevicesStatus(req: IncomingMessage): {
|
|
1166
1250
|
webOnly: boolean;
|
|
1167
1251
|
owner: boolean;
|
|
1168
1252
|
authority: boolean;
|
|
1253
|
+
canEndOthers: boolean;
|
|
1169
1254
|
devices: WebDeviceRow[];
|
|
1170
1255
|
};
|
|
1171
1256
|
/**
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1174
|
-
*
|
|
1257
|
+
* AGEND-138 (#3486): which sessions may this ADMIN request sign out — one rule for every way in (POST /ui/devices/signout,
|
|
1258
|
+
* DELETE /auth/sessions[/<handle>]) and for the list's `canSignOut`; asked of the live session each time. Null: not an
|
|
1259
|
+
* admin session (a guest or read-only one ends only its own account's, auth-api; the header token none).
|
|
1260
|
+
* - a web-only fleet: the verified owner ends any; every other admin only itself (`any: false`);
|
|
1261
|
+
* - a fleet with a chat connection: an admin ends their OWN other devices (the same chat account) and any guest's or
|
|
1262
|
+
* read-only one; ANOTHER admin's devices only that admin. Every admin sign-in there records its account (`owner`: /web,
|
|
1263
|
+
* /dashboard and the per-admin authenticator); only a session with NO chat account (the host's own `agend web --code`,
|
|
1264
|
+
* or one persisted before accounts were recorded) counts as the host's — one principal that only another such session
|
|
1265
|
+
* may end, and that ends no chat admin's. It does not re-check that the account is still an admin (an existing
|
|
1266
|
+
* limitation of every admin API; follow-up).
|
|
1267
|
+
* Revoke-all (`revokeWebSessions`, /dashboard revoke) is the host's emergency button and is not this rule.
|
|
1268
|
+
*/
|
|
1269
|
+
private sessionEndRule;
|
|
1270
|
+
/**
|
|
1271
|
+
* AGEND-138: auth-api's narrowing of `DELETE /auth/sessions[/<handle>]` for an admin. Three answers, never confused:
|
|
1272
|
+
* a predicate (what this caller may end), `undefined` (a web-only fleet: no narrowing here, its own owner check stands) and
|
|
1273
|
+
* `null` — the caller could not be authenticated AGAIN just now (expired or signed out since auth-api's first check): a denial,
|
|
1274
|
+
* which must never be read as "no restriction" (PR #3553 review).
|
|
1275
|
+
*/
|
|
1276
|
+
endableSessions(req: IncomingMessage): ((r: SessionRecord) => boolean) | undefined | null;
|
|
1277
|
+
/**
|
|
1278
|
+
* Refs #3061 (P2b), AGEND-138: the device list — every signed-in session of any tier, newest activity first: its tier,
|
|
1279
|
+
* how it was approved, whether it carries owner authority, whether it is the reader's own, and whether the reader may sign
|
|
1280
|
+
* it out (and if not, why). Only an admin session reads it: a guest, a read-only session and the header token get none,
|
|
1281
|
+
* so no one sees another person's devices unless they are an admin.
|
|
1175
1282
|
*
|
|
1176
|
-
* `
|
|
1177
|
-
*
|
|
1178
|
-
* not an owner until the authenticator vouches for it. Display only — the checks that act
|
|
1283
|
+
* `verified` is the §3 verdict for an admin session as it would be used from where it signs in (a host session from this
|
|
1284
|
+
* computer, a session from outside over the link, a chat account's confirmed one): one that signed in with a one-time
|
|
1285
|
+
* code or a device approval is not an owner until the authenticator vouches for it. Display only — the checks that act
|
|
1286
|
+
* on it run again at each use.
|
|
1179
1287
|
*/
|
|
1180
1288
|
private webDeviceRows;
|
|
1181
1289
|
/**
|
|
1182
1290
|
* Refs #3061 (P2b): may this request's session end ANOTHER session — one signed in elsewhere, or all of them (auth-api
|
|
1183
1291
|
* `DELETE /auth/sessions…`, which an admin session could always do). On a web-only fleet that is the verified owner's:
|
|
1184
1292
|
* a session a code or a device approval made is signed in but not an owner, and could otherwise sign out the owner's
|
|
1185
|
-
* own. A fleet with a chat connection
|
|
1293
|
+
* own. A fleet with a chat connection: yes for an admin, within endableSessions' rule (AGEND-138). Ending one's OWN
|
|
1294
|
+
* session is never this.
|
|
1186
1295
|
*/
|
|
1187
1296
|
mayEndOtherSessions(req: IncomingMessage): boolean;
|
|
1188
1297
|
/**
|
|
1189
|
-
* Refs #3061 (P2b): POST /ui/devices/signout {handle} —
|
|
1190
|
-
*
|
|
1191
|
-
* 403
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1298
|
+
* Refs #3061 (P2b), AGEND-138: POST /ui/devices/signout {handle} — an admin ends another signed-in session, by the one
|
|
1299
|
+
* rule (sessionEndRule), asked of the live session each time. A web-only fleet: only the verified owner, and a non-owner
|
|
1300
|
+
* is refused (403 `owner_required`) BEFORE any handle is looked up, so it learns nothing about which handles exist. A chat
|
|
1301
|
+
* fleet: any admin for their own devices and any guest's or read-only one; another admin's device is refused (403
|
|
1302
|
+
* `other_admin`). Never the reader's own session here (Sign out is /auth/logout). The device's authorization goes with
|
|
1303
|
+
* it, so a copy of its cookie is nobody's.
|
|
1194
1304
|
*/
|
|
1195
1305
|
webDeviceSignOut(req: IncomingMessage, handle: string): {
|
|
1196
1306
|
status: number;
|
|
@@ -1229,6 +1339,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1229
1339
|
* in, plain text, no mentions. Information only: nothing waits on it.
|
|
1230
1340
|
*/
|
|
1231
1341
|
private settingsWebConfirmedNotice;
|
|
1342
|
+
/** The primary General: the General on the primary connection, else the first one — and the connection that owns it. */
|
|
1343
|
+
private settingsPrimaryGeneral;
|
|
1232
1344
|
/** Exact configured effect owners; this does not depend on prompt location. */
|
|
1233
1345
|
private settingsChatAuthority;
|
|
1234
1346
|
/**
|
|
@@ -1679,6 +1791,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1679
1791
|
viewHistory(name: string, q: ViewHistoryQuery): Promise<ViewHistoryAnswer | null>;
|
|
1680
1792
|
/** #1218: GET /ui/steps — an instance's steps, read on demand (null: no such instance). */
|
|
1681
1793
|
logSteps(name: string, q: LogQuery): Promise<LogAnswer | null>;
|
|
1794
|
+
private subagentReader;
|
|
1795
|
+
subagentRuns(name: string): Promise<import("./subagent-service.js").SubagentAnswer>;
|
|
1682
1796
|
/**
|
|
1683
1797
|
* #1218: where an instance's steps are read from, resolved only when its Log asks: the transcript its daemon follows
|
|
1684
1798
|
* now; for claude-code, also the path its statusline last named (so a stopped instance's Log still shows its last
|
|
@@ -2135,7 +2249,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2135
2249
|
* A single-use login code for the dashboard, for a channel only the operator
|
|
2136
2250
|
* can read (`/dashboard`). Null while the panel is closed (no web.token).
|
|
2137
2251
|
*/
|
|
2138
|
-
issueDashboardLogin(
|
|
2252
|
+
issueDashboardLogin(recipient?: {
|
|
2253
|
+
adapterId: string;
|
|
2254
|
+
userId: string;
|
|
2255
|
+
username?: string;
|
|
2256
|
+
}): {
|
|
2139
2257
|
display: string;
|
|
2140
2258
|
expiresAt: number;
|
|
2141
2259
|
ttlMinutes: number;
|
|
@@ -2257,6 +2375,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2257
2375
|
*/
|
|
2258
2376
|
private showDashboardMenu;
|
|
2259
2377
|
private handleDashboardCallback;
|
|
2378
|
+
/**
|
|
2379
|
+
* S-120 (D2a): POST /ui/public-link/close (web-api.ts checks who asks). Closes the open public link — this exposure only,
|
|
2380
|
+
* so a link opened since is left alone — and forgets its remembered owner, as the chat menu's 確定關閉 does. It only closes.
|
|
2381
|
+
* The outside link (#3008) is the owner's switch on this computer: refused (409 outside_link), left open.
|
|
2382
|
+
*/
|
|
2383
|
+
closePublicLinkFromWeb(): Promise<{
|
|
2384
|
+
status: number;
|
|
2385
|
+
body: Record<string, unknown>;
|
|
2386
|
+
}>;
|
|
2260
2387
|
/** `/dashboard revoke`: sign out every browser and withdraw any unused code. */
|
|
2261
2388
|
revokeWebSessions(): {
|
|
2262
2389
|
count: number;
|
|
@@ -2845,6 +2972,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2845
2972
|
/** No chat platform is configured at all: the web dashboard is the fleet's only surface. */
|
|
2846
2973
|
/** #2910: no Discord or Telegram connection at all (src/web-only-fleet.ts). */
|
|
2847
2974
|
isWebOnlyFleet(): boolean;
|
|
2975
|
+
/**
|
|
2976
|
+
* S-117 story 1: the sign-in page's "no chat" words (no /web to send) — a web-only fleet, or one whose chat is not
|
|
2977
|
+
* connected yet (a fresh install whose bot is still being set up, or is down): /web cannot answer there.
|
|
2978
|
+
*/
|
|
2979
|
+
signinWithoutChat(): boolean;
|
|
2848
2980
|
/** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
|
|
2849
2981
|
private webOnlyPromptPlace;
|
|
2850
2982
|
/** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
|
|
@@ -3508,10 +3640,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3508
3640
|
*/
|
|
3509
3641
|
notifyFleetError(text: string, opts?: {
|
|
3510
3642
|
throttle?: boolean;
|
|
3643
|
+
ack?: (delivered: boolean) => void;
|
|
3511
3644
|
}): boolean;
|
|
3512
3645
|
private webNotices;
|
|
3513
3646
|
/** #2910 D2 (web-api): the Notices on a web-only fleet; null on any other (its General says them). */
|
|
3514
3647
|
webNoticesFeed(): WebNotices | null;
|
|
3648
|
+
/** A web-only fleet always has its Notices; a chat fleet only once something was put there (AGEND-122: a confirmation that nothing else could carry). */
|
|
3649
|
+
private hasWebNotices;
|
|
3515
3650
|
/** #2910 D2: the web-only fleet's Notices (web-notices.json), read on first use. */
|
|
3516
3651
|
webNoticeStore(): WebNotices | null;
|
|
3517
3652
|
/**
|
|
@@ -3533,7 +3668,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3533
3668
|
* rejection surfaces only as a warn in its .catch. True delivery confirmation
|
|
3534
3669
|
* would have to make this async and change every caller.
|
|
3535
3670
|
*/
|
|
3536
|
-
notifyInstanceTopic(instanceName: string, text: string, extraOpts?: import("./channel/types.js").SendOpts): boolean;
|
|
3671
|
+
notifyInstanceTopic(instanceName: string, text: string, extraOpts?: import("./channel/types.js").SendOpts, ack?: (delivered: boolean) => void): boolean;
|
|
3537
3672
|
/**
|
|
3538
3673
|
* notifyInstanceTopic's routing, handing back the send itself — and which world sent it — for a caller that must
|
|
3539
3674
|
* edit or delete the message later (#2897). Null when there is no adapter or no postable target (already logged).
|
|
@@ -3798,6 +3933,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3798
3933
|
gateway: boolean;
|
|
3799
3934
|
peer: WebPeer;
|
|
3800
3935
|
instance?: string;
|
|
3936
|
+
authorization?: SessionAuthorization | null;
|
|
3801
3937
|
}): WebAuthorityResult;
|
|
3802
3938
|
private sessionAuthorizations;
|
|
3803
3939
|
private sessionAuthorizationStore;
|
|
@@ -3844,10 +3980,17 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3844
3980
|
receiptAuthorityNow(stored: HumanAuthority, state?: AuthorityState): HumanAuthority;
|
|
3845
3981
|
/** #3008 (the sign-in page): this exposure is the outside link, open now. */
|
|
3846
3982
|
isOutsideLink(exposureId: string): boolean;
|
|
3847
|
-
/**
|
|
3983
|
+
/**
|
|
3984
|
+
* What Settings shows: THIS admin's own authenticator (set up or not, when, their own "ask for my code" switch), whether they
|
|
3985
|
+
* may set it up or change it here and whether that asks their current code; and, for the host operator on a web-only fleet,
|
|
3986
|
+
* the outside switch, a wait in force and the link — its address only to this computer.
|
|
3987
|
+
*/
|
|
3848
3988
|
webOutsideStatus(req: IncomingMessage): {
|
|
3849
3989
|
webOnly: boolean;
|
|
3850
3990
|
here: boolean;
|
|
3991
|
+
manage: boolean;
|
|
3992
|
+
codeNeeded: boolean;
|
|
3993
|
+
strict: boolean;
|
|
3851
3994
|
enrolled: boolean;
|
|
3852
3995
|
enrolledAt: number | null;
|
|
3853
3996
|
outside: boolean;
|
|
@@ -3860,16 +4003,58 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3860
4003
|
quick: boolean;
|
|
3861
4004
|
} | null;
|
|
3862
4005
|
};
|
|
3863
|
-
/**
|
|
3864
|
-
|
|
4006
|
+
/**
|
|
4007
|
+
* AGEND-122 (per admin): who may set up, replace or remove an authenticator, and turn its switch on or off — an admin with a
|
|
4008
|
+
* role over held changes (settings-role.ts) on a direct connection (never a link), on a chat fleet and a web-only one alike, and
|
|
4009
|
+
* only THEIR OWN (`who`: their connection and account; a web-only fleet's one admin and a chat fleet's host session are the host
|
|
4010
|
+
* operator's). Another admin's is never reachable from here: a stolen session can lock out at most the admin it belongs to, and
|
|
4011
|
+
* every such change posts a Notice to the fleet. On the AgEnD computer's own browser no code is asked. Connections from outside
|
|
4012
|
+
* and their switch are another thing and stay a web-only fleet's, on its own computer (liveOwner).
|
|
4013
|
+
*/
|
|
4014
|
+
private authenticatorOwner;
|
|
4015
|
+
/**
|
|
4016
|
+
* Changing an app that exists — replacing it, removing it, turning its switch off — is the OWNER'S, proven by its current code off
|
|
4017
|
+
* the AgEnD computer, whatever the "ask for my code on confirmations" switch says (that switch is about ordinary Settings
|
|
4018
|
+
* confirmations; this is lifecycle ownership). With no app there is no old code to ask: a first set-up asks nothing, and the AgEnD
|
|
4019
|
+
* computer's own browser is never asked — the recovery controls.
|
|
4020
|
+
*/
|
|
4021
|
+
private authenticatorCodeAsked;
|
|
4022
|
+
/** What changing the app asks of this session: nothing, or the current code (of its own app). */
|
|
4023
|
+
private authenticatorStep;
|
|
4024
|
+
/**
|
|
4025
|
+
* An app being set up, per session handle: whether that start was on this computer or passed the code. A set-up begun while the
|
|
4026
|
+
* code was not asked (the secret lives ten minutes) must not be finished by a session whose switch is on by then, and one begun
|
|
4027
|
+
* on this computer is not finished from another device: it never passed the code, so the finish is refused. A "code" start also
|
|
4028
|
+
* records WHICH app the code proved (`enrollment`, the opaque id of the owner's app at that moment, null when there was none): a
|
|
4029
|
+
* code is a proof about that app and about nothing that replaces it — the finish is refused once the owner's app has been
|
|
4030
|
+
* replaced or removed since (say, a recovery on the computer), so an earlier remote set-up can never overwrite the newer app.
|
|
4031
|
+
*/
|
|
4032
|
+
private authenticatorStarts;
|
|
4033
|
+
/** Set up (or set up again) your own: a new secret, shown once. Null: not you. A code is asked first when your switch needs one. */
|
|
4034
|
+
webOutsideBeginEnrollment(req: IncomingMessage, code?: string): {
|
|
3865
4035
|
secret: string;
|
|
3866
4036
|
uri: string;
|
|
3867
4037
|
expiresInMs: number;
|
|
4038
|
+
} | {
|
|
4039
|
+
error: "code_required" | "wrong" | "paused" | "unavailable" | "not_here";
|
|
4040
|
+
retryAfterMs?: number;
|
|
3868
4041
|
} | null;
|
|
3869
|
-
/** The new app's first code: on "ok" it replaces the old one,
|
|
3870
|
-
webOutsideConfirmEnrollment(req: IncomingMessage, code: string): "ok" | "wrong" | "expired" | "unsaved" | "not_here";
|
|
3871
|
-
/** Forget
|
|
3872
|
-
webOutsideRemove(req: IncomingMessage): "ok" | "unsaved" | "not_here"
|
|
4042
|
+
/** The new app's first code: on "ok" it is now yours (the host operator's replaces the old one, ending the sessions from outside). */
|
|
4043
|
+
webOutsideConfirmEnrollment(req: IncomingMessage, code: string): "ok" | "wrong" | "expired" | "unsaved" | "not_here" | "full";
|
|
4044
|
+
/** Forget your own app (your switch with it). A code is asked first when your switch needs one. Nothing set up: nothing happens. */
|
|
4045
|
+
webOutsideRemove(req: IncomingMessage, code?: string): "ok" | "unsaved" | "not_here" | {
|
|
4046
|
+
error: "code_required" | "wrong" | "paused" | "unavailable";
|
|
4047
|
+
retryAfterMs?: number;
|
|
4048
|
+
};
|
|
4049
|
+
/**
|
|
4050
|
+
* Turn your own "ask for my code to confirm from other devices" switch on or off. On needs your app set up and asks nothing (it
|
|
4051
|
+
* only tightens); off asks your current code off the AgEnD computer — so a session it restricts cannot lift the restriction for
|
|
4052
|
+
* you without it. Never anyone else's. Either way a Notice goes to the fleet's admins.
|
|
4053
|
+
*/
|
|
4054
|
+
webOutsideStrict(req: IncomingMessage, on: boolean, code?: string): "ok" | "not_enrolled" | "not_here" | "unsaved" | {
|
|
4055
|
+
error: "code_required" | "wrong" | "paused" | "unavailable";
|
|
4056
|
+
retryAfterMs?: number;
|
|
4057
|
+
};
|
|
3873
4058
|
/** The switch. On: needs an app set up; the link opens. Off: it closes and every session from outside ends. */
|
|
3874
4059
|
webOutsideSwitch(req: IncomingMessage, on: boolean): "ok" | "not_enrolled" | "not_here" | "not_allowed" | "unsaved";
|
|
3875
4060
|
private outsideAttempt;
|
|
@@ -3884,24 +4069,50 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3884
4069
|
/** PublicWebLink.onClose for the outside link: what closed it decides what happens next (#3008 B). */
|
|
3885
4070
|
private outsideLinkClosed;
|
|
3886
4071
|
/**
|
|
3887
|
-
* #
|
|
3888
|
-
*
|
|
3889
|
-
*
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
4072
|
+
* #3486 (per admin; auth-api POST /auth/totp): a browser that is not signed in yet signs in as ONE admin, with the code of THAT
|
|
4073
|
+
* admin's own authenticator — the same per-admin app their confirmations use.
|
|
4074
|
+
*
|
|
4075
|
+
* **Code only (AGEND-155, the product owner's decision on #3486).** The browser types the 6-digit code and nothing else: the code is
|
|
4076
|
+
* compared with the app of every admin who has one and is still an admin of their connection (WebRemoteAccess.signInByCode — each,
|
|
4077
|
+
* every time, no early stop), and exactly one match signs that admin in. No match, or more than one (nobody is signed in and nothing
|
|
4078
|
+
* is spent), is the one 401 `wrong_code`. The page lists nobody, and nothing in an answer says which admins exist or have an app.
|
|
4079
|
+
* A request that still carries a name (`account`, accepted for compatibility; the UI no longer sends it) is resolved to at most
|
|
4080
|
+
* one admin by that name as before (resolveSignInAdmin) and is held by the per-name and per-admin counts too.
|
|
4081
|
+
* A web-only fleet has one admin (the host operator): its one app, no name needed either way.
|
|
4082
|
+
*
|
|
4083
|
+
* Where it works: a direct connection (LAN, tailnet, the owner's own proxy — and this computer's own browser) on any fleet; on a
|
|
4084
|
+
* chat fleet also a public link (TOTP_SIGNIN_OVER_PUBLIC_LINK, the one switch that takes that back); on a web-only fleet a link
|
|
4085
|
+
* only as before (#3008): the one "Allow connections from outside" opened. "Only this computer can authorize" closes all of it.
|
|
4086
|
+
* What it makes: a chat admin's session is that account's own (owner), exactly as a sign-in code from the chat makes it; a web-only
|
|
4087
|
+
* fleet's is that fleet's admin session (and over the outside link the #3008 `remote` one, authorized as before). No authority beyond
|
|
4088
|
+
* that: no "Authorize this browser", nothing an agent would take as a go-ahead. Every success tells every admin (a Notice).
|
|
4089
|
+
*/
|
|
4090
|
+
totpSignIn(input: {
|
|
4091
|
+
exposureId: string | undefined;
|
|
4092
|
+
peer: WebPeer;
|
|
4093
|
+
account: string | undefined;
|
|
4094
|
+
code: string;
|
|
4095
|
+
browser: {
|
|
4096
|
+
id: string;
|
|
4097
|
+
address: string | undefined;
|
|
4098
|
+
};
|
|
4099
|
+
knownCookie: string | undefined;
|
|
4100
|
+
}): TotpSignInResult;
|
|
4101
|
+
/** Whether the request names an admin (`account`, legacy). Blank or missing: the code stands alone. */
|
|
4102
|
+
private signInNameTyped;
|
|
4103
|
+
/** The platform handle (Discord / Telegram user name) an account last signed in to the web with, exactly as the platform gave it; undefined when none is known. */
|
|
4104
|
+
private signinHandleOf;
|
|
4105
|
+
/** Where the new-device authenticator sign-in is open: the owner's knobs and the link rules in one place (asked again as the session is made). */
|
|
4106
|
+
private totpSignInOpen;
|
|
4107
|
+
/**
|
|
4108
|
+
* The admin a typed name stands for, among the chat admins that have an authenticator AND are still admins of their connection: by
|
|
4109
|
+
* the platform user name they sign in with (Discord / Telegram handle, no "@", any case), their user id, or `connection:id`. Exactly
|
|
4110
|
+
* one: a name two of them answer to is nobody's here (they use `connection:id`). The loop never stops early, so it takes as long
|
|
4111
|
+
* for a name that is nobody's. `ident` is the normalized text, for the limiter.
|
|
4112
|
+
*/
|
|
4113
|
+
private resolveSignInAdmin;
|
|
4114
|
+
/**
|
|
4115
|
+
* #3008: a session just made by totpSignIn's "ok" over the outside link is this computer's admin for its authorization's life. False: it
|
|
3905
4116
|
* could not be admitted (its handle not saved, #3015 review r3) — the caller ends it.
|
|
3906
4117
|
*/
|
|
3907
4118
|
authorizeOutsideSession(session: SessionRecord, peer: WebPeer, label: string): boolean;
|
|
@@ -3922,7 +4133,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3922
4133
|
* written), what fleet.yaml says, the hosts that make the dashboard reachable from elsewhere (the warning while
|
|
3923
4134
|
* loopback_only is off), and the sessions authorized now (§0): each one's device, account, and when it runs out.
|
|
3924
4135
|
*/
|
|
3925
|
-
webAuthorityOverview(): {
|
|
4136
|
+
webAuthorityOverview(req?: IncomingMessage): {
|
|
4137
|
+
/** AGEND-138: this browser's own session, and whether it may revoke the others' authorization (the verified owner only). */
|
|
4138
|
+
you: {
|
|
4139
|
+
handle: string | null;
|
|
4140
|
+
canRevoke: boolean;
|
|
4141
|
+
};
|
|
3926
4142
|
state: AuthorityState;
|
|
3927
4143
|
configured: WebVerifiedAuthorityConfig;
|
|
3928
4144
|
hours: typeof VERIFIED_SESSION_HOURS;
|
|
@@ -3980,11 +4196,38 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3980
4196
|
state: "none";
|
|
3981
4197
|
reason: WebAuthorityRefusal;
|
|
3982
4198
|
};
|
|
3983
|
-
/**
|
|
3984
|
-
|
|
4199
|
+
/**
|
|
4200
|
+
* #1939 §10: revoke every web authority given so far (receipts read as none), without signing anyone out.
|
|
4201
|
+
* AGEND-138: `keep` — the session that asked (the verified owner's own): the epoch still moves, so every other session
|
|
4202
|
+
* and every stored receipt is ended, but this one is authorized again under the new epoch at once (§3 asked afresh,
|
|
4203
|
+
* with the end it already had: a revocation never stretches an authorization). A host session only where it is
|
|
4204
|
+
* allowed to be one — on this computer — as at sign-in.
|
|
4205
|
+
*/
|
|
4206
|
+
revokeWebAuthority(keep?: {
|
|
4207
|
+
session: SessionRecord;
|
|
4208
|
+
peer: WebPeer;
|
|
4209
|
+
gateway: boolean;
|
|
4210
|
+
}): {
|
|
3985
4211
|
epoch: number;
|
|
3986
4212
|
durable: boolean;
|
|
4213
|
+
kept: boolean;
|
|
3987
4214
|
};
|
|
4215
|
+
/**
|
|
4216
|
+
* AGEND-138: who may "Revoke authorization of other devices" — the verified owner only, asked of the LIVE session each
|
|
4217
|
+
* time. A web-only fleet: its owner (this computer's admin here, or signed in from outside). A fleet with a chat
|
|
4218
|
+
* connection: an admin session that is web-verified now (its account confirmed in Discord / Telegram) — the same §3
|
|
4219
|
+
* verdict the rest of web authority uses. A guest, a read-only session, an admin not verified (a device-code or one-time-code
|
|
4220
|
+
* sign-in), the header token: null. `revoke()` ends everyone else's and keeps this session verified.
|
|
4221
|
+
*/
|
|
4222
|
+
webAuthorityRevoker(req: IncomingMessage): {
|
|
4223
|
+
handle: string;
|
|
4224
|
+
current(): boolean;
|
|
4225
|
+
revoke(): {
|
|
4226
|
+
epoch: number;
|
|
4227
|
+
durable: boolean;
|
|
4228
|
+
kept: boolean;
|
|
4229
|
+
};
|
|
4230
|
+
} | null;
|
|
3988
4231
|
/** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
|
|
3989
4232
|
/** #2855: the table scope of an instance the web chat may command (a fleet instance or a ClassicBot room), else null. */
|
|
3990
4233
|
private webCommandScope;
|
|
@@ -3995,6 +4238,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3995
4238
|
command: string;
|
|
3996
4239
|
args?: string;
|
|
3997
4240
|
confirm?: string;
|
|
4241
|
+
action?: import("./web-commands.js").WebModelAction;
|
|
3998
4242
|
}, opts: {
|
|
3999
4243
|
publicLink: boolean;
|
|
4000
4244
|
person?: Pick<WebPersonView, "userId" | "name">;
|
|
@@ -4345,6 +4589,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4345
4589
|
* Daemon's clone of that config hands its CLI. Never today's defaults: an older config object keeps its own.
|
|
4346
4590
|
*/
|
|
4347
4591
|
private launchCredentialKey;
|
|
4592
|
+
private launchCredentialProfile;
|
|
4348
4593
|
/**
|
|
4349
4594
|
* #3313 review r2: failed starts whose CLI was not proven gone keep holding their sign-in (across a retry of the same
|
|
4350
4595
|
* agent too) until a check finds it ended.
|
|
@@ -4377,6 +4622,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4377
4622
|
private acquireKeepAliveRun;
|
|
4378
4623
|
/** #3292: Needs you's lines for kept sign-ins, in the fleet's language (posted in General's world, like config issues). */
|
|
4379
4624
|
private keepAliveAttention;
|
|
4625
|
+
/**
|
|
4626
|
+
* M-2825: the host sign-ins in use, once each — whose end date is warned about even when it is not kept alive:
|
|
4627
|
+
* - each agent's and ClassicBot room's as configured (accountUses: a paired computer's agents use that computer's own);
|
|
4628
|
+
* - #3577 review P2: the one each host agent is starting or running on AS LAUNCHED (its lease; a failed start whose CLI
|
|
4629
|
+
* may still run; a running agent with no lease, by its own launch snapshot) — a profile saved but not yet applied
|
|
4630
|
+
* leaves the old one in use until the restart, as keepAliveInUse() counts it.
|
|
4631
|
+
*/
|
|
4632
|
+
private signInsInUse;
|
|
4380
4633
|
/** #3292: Settings → Accounts → Keep sign-in alive (POST /ui/accounts/keep-alive). `by`: the session's label, for the fleet log. */
|
|
4381
4634
|
setAccountKeepAlive(backend: unknown, profile: unknown, enabled: unknown, fallback: unknown, by: string): KeepAliveSetResult;
|
|
4382
4635
|
/**
|
|
@@ -4420,6 +4673,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4420
4673
|
*/
|
|
4421
4674
|
private withAccountWriter;
|
|
4422
4675
|
signOutAccount(backend: string, profile: unknown, confirm: unknown, by: string, machine?: MachineActor): Promise<SignOutResult | MachineAccountResult>;
|
|
4676
|
+
/** M-2825: a host Claude sign-in whose own file says it is over (credential-profile.ts claudeStoreEnded); false for other CLIs. */
|
|
4677
|
+
private claudeSignInEnded;
|
|
4423
4678
|
backendSignInTargets(): SignInTarget[];
|
|
4424
4679
|
/** #2233: the session with this handle is live, admin, local and of the current dashboard token. */
|
|
4425
4680
|
private isLocalAdminSession;
|
|
@@ -4541,6 +4796,25 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4541
4796
|
}, signIn?: {
|
|
4542
4797
|
profile?: string;
|
|
4543
4798
|
}): Promise<string>;
|
|
4799
|
+
/**
|
|
4800
|
+
* The install window itself, for `/login`'s chat install and the dashboard's Install button alike (AGEND-133): a tmux window running the registry's
|
|
4801
|
+
* command through `unattendedInstallCommand` (no terminal to ask on, low priority, stoppable as a whole, the user's own $SHELL), judged by the installer's
|
|
4802
|
+
* own exit code. The caller holds `claim` (taken before its first await) and gets it released here on every failure; once the session is running,
|
|
4803
|
+
* `events.onDone` owns the release. `activeInstall` is set while it runs, so `/login cancel`, the dashboard's Cancel and a fleet stop all reach it.
|
|
4804
|
+
*/
|
|
4805
|
+
private openInstallWindow;
|
|
4806
|
+
/** AGEND-133: the dashboard's Install button — what the Accounts page asks of `/login`'s install, with no chat to report in. */
|
|
4807
|
+
private webHostInstallsInstance;
|
|
4808
|
+
get webHostInstalls(): WebHostInstalls;
|
|
4809
|
+
/**
|
|
4810
|
+
* AGEND-133: install a CLI for the dashboard. Only the CLI's id arrives (the caller validated it against the registry's table); the command is
|
|
4811
|
+
* `info.unattended ?? info.install` read here, the window and its judgement are `/login`'s (openInstallWindow). The verdict is then checked the way chat's
|
|
4812
|
+
* is — a fresh login shell, else the installer's own directories — and the availability probe reads the version for the page. Everything is
|
|
4813
|
+
* reported through `reporter`; nothing is posted to any chat, and no sign-in is started (the page offers Sign in itself).
|
|
4814
|
+
*/
|
|
4815
|
+
startWebInstall(backendArg: string, reporter: HostInstallReporter, execution?: SettingsExecution, mode?: HostInstallMode): Promise<HostInstallStart>;
|
|
4816
|
+
/** A fresh login shell's answer for `binary`, else the installer's own directories (see locateBinaryOnLoginShell / locateInstalledBackend). */
|
|
4817
|
+
private locateInstalledCli;
|
|
4544
4818
|
/** Whether this backend's CLI is on the fleet's PATH (what `/login` installs when it is not). */
|
|
4545
4819
|
isCliInstalled(backend: string): boolean;
|
|
4546
4820
|
/** M-2281: isCliInstalled without holding the fleet loop (a chat click's path: `which` on a slow PATH can take seconds). */
|
|
@@ -4769,6 +5043,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4769
5043
|
private persistCliEnvProbeResult;
|
|
4770
5044
|
/** Background-probe every distinct backend in use at startup (non-blocking). */
|
|
4771
5045
|
private probeCliEnvs;
|
|
5046
|
+
/** Maintain discovery after committed config changes; a model-field read remains passive. */
|
|
5047
|
+
private probeChangedCliEnvs;
|
|
4772
5048
|
/** Best-effort model list for `/model`: cached CLI env first, else live probe. Never throws. */
|
|
4773
5049
|
private getModelOptions;
|
|
4774
5050
|
/**
|
|
@@ -4950,7 +5226,23 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4950
5226
|
* #2072 part 3: the models a Settings field offers for `backend` — the cached catalog (an instance's own credential
|
|
4951
5227
|
* profile's, when it is named and has one), claude's account catalog included. Read only: never a probe.
|
|
4952
5228
|
*/
|
|
4953
|
-
|
|
5229
|
+
private webModelTargetIds;
|
|
5230
|
+
private webModelTargetSequence;
|
|
5231
|
+
private webModelCatalogs;
|
|
5232
|
+
private webModelRefreshes;
|
|
5233
|
+
/** Resolve only trusted config; the browser never supplies a home, provider URL or credentials. */
|
|
5234
|
+
private webModelBinding;
|
|
5235
|
+
private webModelEnv;
|
|
5236
|
+
modelCatalogFor(backend: string, instance: string | null, selection?: {
|
|
5237
|
+
profile?: string;
|
|
5238
|
+
}): import("./backend/types.js").ModelOption[];
|
|
5239
|
+
/** Explicit, bounded vendor rediscovery. Never publish an answer under a different account/config/instance. */
|
|
5240
|
+
refreshModelCatalogFor(backend: string, instance: string | null, selection?: {
|
|
5241
|
+
profile?: string;
|
|
5242
|
+
}): Promise<{
|
|
5243
|
+
models: import("./backend/types.js").ModelOption[];
|
|
5244
|
+
refreshed: boolean;
|
|
5245
|
+
}>;
|
|
4954
5246
|
/** Host-default fallback only: Grok has no modeled profile home. Never construct a backend or start a probe. */
|
|
4955
5247
|
cliModelCatalogFor(backend: string, instance: string | null): Promise<import("./backend/types.js").ModelOption[]>;
|
|
4956
5248
|
/**
|