@songsid/agend 2.4.0-beta.24 → 2.4.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/dist/agend-home.js +5 -5
- package/dist/agend-home.js.map +1 -1
- package/dist/agent-endpoint.js +10 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-workspace.d.ts +18 -2
- package/dist/agent-workspace.js +15 -4
- package/dist/agent-workspace.js.map +1 -1
- package/dist/backend/antigravity.js +8 -6
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.js +17 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-usage-credits.d.ts +8 -0
- package/dist/backend/claude-usage-credits.js +121 -0
- package/dist/backend/claude-usage-credits.js.map +1 -0
- package/dist/backend/types.d.ts +30 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.js +7 -1
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/tool-router.js +1 -0
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/cli-audited.js +9 -4
- package/dist/cli-audited.js.map +1 -1
- package/dist/cli.js +184 -21
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +11 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/contact-auth-store.d.ts +18 -0
- package/dist/contact-auth-store.js +55 -8
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-auth-types.d.ts +3 -0
- package/dist/contact-auth-types.js.map +1 -1
- package/dist/contact-change-proposals.d.ts +34 -0
- package/dist/contact-change-proposals.js +1 -1
- package/dist/contact-change-proposals.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +1 -0
- package/dist/cross-instance-notice.js +9 -8
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +35 -0
- package/dist/daemon.js +234 -19
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +42 -1
- package/dist/delivery-outbox.js +194 -20
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-context.d.ts +8 -0
- package/dist/fleet-lock.d.ts +67 -2
- package/dist/fleet-lock.js +236 -2
- package/dist/fleet-lock.js.map +1 -1
- package/dist/fleet-manager.d.ts +163 -6
- package/dist/fleet-manager.js +1136 -75
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +20 -1
- package/dist/fleet-windows-runtime.js +98 -18
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +7 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +14 -4
- package/dist/home-update-lock.d.ts +35 -0
- package/dist/home-update-lock.js +81 -0
- package/dist/home-update-lock.js.map +1 -0
- package/dist/hub/compose/member.d.ts +5 -1
- package/dist/hub/compose/member.js +9 -5
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/member/room-ask.d.ts +5 -0
- package/dist/hub/member/room-ask.js +43 -16
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-mention-feedback.d.ts +2 -0
- package/dist/hub/member/room-mention-feedback.js +1 -1
- package/dist/hub/member/room-mention-feedback.js.map +1 -1
- package/dist/hub/member/room-post-answers.d.ts +2 -0
- package/dist/hub/member/room-post-answers.js +1 -1
- package/dist/hub/member/room-post-answers.js.map +1 -1
- package/dist/hub/member/room-post.d.ts +5 -0
- package/dist/hub/member/room-post.js +4 -1
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/member/updates.d.ts +7 -1
- package/dist/hub/member/updates.js +7 -1
- package/dist/hub/member/updates.js.map +1 -1
- package/dist/hub/representative.d.ts +7 -0
- package/dist/hub/representative.js +38 -5
- package/dist/hub/representative.js.map +1 -1
- package/dist/install-lock.d.ts +15 -1
- package/dist/install-lock.js +16 -8
- package/dist/install-lock.js.map +1 -1
- package/dist/install-ownership.d.ts +165 -0
- package/dist/install-ownership.js +404 -0
- package/dist/install-ownership.js.map +1 -0
- package/dist/instance-config-impact.js +2 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.d.ts +4 -0
- package/dist/instructions.js +4 -0
- package/dist/instructions.js.map +1 -1
- package/dist/local-pane-endpoint.d.ts +4 -1
- package/dist/local-pane-endpoint.js +12 -2
- package/dist/local-pane-endpoint.js.map +1 -1
- package/dist/locale.js +160 -4
- package/dist/locale.js.map +1 -1
- package/dist/native-agent-admission.d.ts +7 -0
- package/dist/native-agent-admission.js +46 -3
- package/dist/native-agent-admission.js.map +1 -1
- package/dist/native-mcp.d.ts +16 -1
- package/dist/native-mcp.js +38 -5
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-pane-lifecycle.d.ts +9 -0
- package/dist/native-pane-lifecycle.js +23 -0
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.d.ts +19 -6
- package/dist/native-pane-manager.js +79 -4
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you.d.ts +8 -0
- package/dist/needs-you.js +1 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +12 -0
- package/dist/outbound-handlers.js +30 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/package-preimage.js +4 -0
- package/dist/package-preimage.js.map +1 -1
- package/dist/pane-port.d.ts +1 -0
- package/dist/plist-args.d.ts +9 -0
- package/dist/plist-args.js +22 -0
- package/dist/plist-args.js.map +1 -0
- package/dist/public-preview.d.ts +4 -6
- package/dist/public-preview.js +5 -2
- package/dist/public-preview.js.map +1 -1
- package/dist/public-web-gateway.js +8 -3
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +13 -1
- package/dist/public-web-link.js +28 -1
- package/dist/public-web-link.js.map +1 -1
- package/dist/recover.cjs +2452 -0
- package/dist/remote-card-prompt.d.ts +6 -2
- package/dist/remote-card-prompt.js +12 -3
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/reply-draft.d.ts +12 -0
- package/dist/reply-draft.js +81 -0
- package/dist/reply-draft.js.map +1 -0
- package/dist/request-contact-api.d.ts +15 -0
- package/dist/request-contact-api.js +120 -0
- package/dist/request-contact-api.js.map +1 -0
- package/dist/request-contact-card.d.ts +36 -0
- package/dist/request-contact-card.js +206 -0
- package/dist/request-contact-card.js.map +1 -0
- package/dist/request-contact-gate.d.ts +79 -0
- package/dist/request-contact-gate.js +262 -0
- package/dist/request-contact-gate.js.map +1 -0
- package/dist/request-contact-native.d.ts +52 -0
- package/dist/request-contact-native.js +83 -0
- package/dist/request-contact-native.js.map +1 -0
- package/dist/request-contact-types.d.ts +86 -0
- package/dist/request-contact-types.js +7 -0
- package/dist/request-contact-types.js.map +1 -0
- package/dist/request-context-call-protocol.d.ts +12 -0
- package/dist/request-context-call-protocol.js +14 -0
- package/dist/request-context-call-protocol.js.map +1 -0
- package/dist/request-context-call.d.ts +22 -0
- package/dist/request-context-call.js +35 -0
- package/dist/request-context-call.js.map +1 -0
- package/dist/request-context-drain.d.ts +39 -0
- package/dist/request-context-drain.js +159 -0
- package/dist/request-context-drain.js.map +1 -0
- package/dist/request-context-fence.d.ts +28 -0
- package/dist/request-context-fence.js +58 -0
- package/dist/request-context-fence.js.map +1 -0
- package/dist/request-context-migration.d.ts +64 -0
- package/dist/request-context-migration.js +158 -0
- package/dist/request-context-migration.js.map +1 -0
- package/dist/request-context-pane.d.ts +25 -0
- package/dist/request-context-pane.js +48 -0
- package/dist/request-context-pane.js.map +1 -0
- package/dist/request-context-policy.d.ts +74 -0
- package/dist/request-context-policy.js +116 -0
- package/dist/request-context-policy.js.map +1 -0
- package/dist/request-context-recovery.d.ts +14 -0
- package/dist/request-context-recovery.js +56 -0
- package/dist/request-context-recovery.js.map +1 -0
- package/dist/request-context-relay.d.ts +19 -0
- package/dist/request-context-relay.js +63 -0
- package/dist/request-context-relay.js.map +1 -0
- package/dist/request-context-returns.d.ts +67 -0
- package/dist/request-context-returns.js +211 -0
- package/dist/request-context-returns.js.map +1 -0
- package/dist/request-context-store.d.ts +2 -1
- package/dist/request-context-store.js +8 -1
- package/dist/request-context-store.js.map +1 -1
- package/dist/request-context-turns.d.ts +99 -0
- package/dist/request-context-turns.js +215 -0
- package/dist/request-context-turns.js.map +1 -0
- package/dist/request-context-view.d.ts +33 -0
- package/dist/request-context-view.js +36 -0
- package/dist/request-context-view.js.map +1 -0
- package/dist/request-hub-context.d.ts +130 -0
- package/dist/request-hub-context.js +89 -0
- package/dist/request-hub-context.js.map +1 -0
- package/dist/request-hub-output.d.ts +11 -0
- package/dist/request-hub-output.js +21 -0
- package/dist/request-hub-output.js.map +1 -0
- package/dist/runtime-cli-install.js +13 -11
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-client.d.ts +2 -0
- package/dist/runtime-client.js +17 -4
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +4 -1
- package/dist/runtime-coordinator.js +10 -3
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-pane-assets.d.ts +1 -1
- package/dist/runtime-pane-assets.js +1 -1
- package/dist/runtime-pane-assets.js.map +1 -1
- package/dist/runtime-pane-host.d.ts +3 -0
- package/dist/runtime-pane-host.js +39 -21
- package/dist/runtime-pane-host.js.map +1 -1
- package/dist/runtime-pane-link.d.ts +6 -2
- package/dist/runtime-pane-link.js +17 -4
- package/dist/runtime-pane-link.js.map +1 -1
- package/dist/runtime-pane-mcp-relay.d.ts +11 -1
- package/dist/runtime-pane-mcp-relay.js +69 -3
- package/dist/runtime-pane-mcp-relay.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +28 -1
- package/dist/runtime-pane-mcp.js +92 -15
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-port.d.ts +6 -0
- package/dist/runtime-pane-port.js +23 -4
- package/dist/runtime-pane-port.js.map +1 -1
- package/dist/runtime-pane-protocol.d.ts +4 -0
- package/dist/runtime-pane-protocol.js +11 -4
- package/dist/runtime-pane-protocol.js.map +1 -1
- package/dist/runtime-pane-service.d.ts +1 -0
- package/dist/runtime-pane-service.js +25 -9
- package/dist/runtime-pane-service.js.map +1 -1
- package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
- package/dist/runtime-pane-stdio-protocol.js +12 -5
- package/dist/runtime-pane-stdio-protocol.js.map +1 -1
- package/dist/runtime-pane-stdio.js +5 -5
- package/dist/runtime-pane-stdio.js.map +1 -1
- package/dist/runtime-protocol.d.ts +3 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/scheduler/scheduler.d.ts +6 -0
- package/dist/scheduler/scheduler.js +19 -1
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +4 -0
- package/dist/scheduler/task-board.js +6 -0
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/service-activation.js +3 -13
- package/dist/service-activation.js.map +1 -1
- package/dist/service-lock.d.ts +28 -0
- package/dist/service-lock.js +85 -0
- package/dist/service-lock.js.map +1 -0
- package/dist/settings-api.d.ts +6 -0
- package/dist/settings-api.js +35 -0
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +1 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/state-lease.d.ts +24 -0
- package/dist/state-lease.js +103 -0
- package/dist/state-lease.js.map +1 -0
- package/dist/tmux-binary.js +1 -1
- package/dist/tmux-binary.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +2 -0
- package/dist/topic-commands.js +21 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.js +3 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/tunnel/named-link-test.d.ts +27 -0
- package/dist/tunnel/named-link-test.js +41 -0
- package/dist/tunnel/named-link-test.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/ui/chat-store.js +5 -4
- package/dist/ui/fleet-office-card.js +15 -2
- package/dist/ui/fleet-office-skin.js +33 -9
- package/dist/ui/fleet-office-zones.js +8 -3
- package/dist/ui/fleet-office.js +136 -18
- package/dist/ui/fleet-task-files.js +1 -1
- package/dist/ui/panel-chat.js +15 -2
- package/dist/ui/panel-needs.js +22 -2
- package/dist/ui/panel-settings.js +22 -8
- package/dist/ui/settings-preview-address.js +156 -0
- package/dist/ui/settings-registry.js +2 -0
- package/dist/ui/settings-strings.js +6 -6
- package/dist/ui/shared/app.css +76 -2
- package/dist/ui/shared/chat-strings.js +6 -2
- package/dist/ui/shared/chat-thread.js +7 -1
- package/dist/ui/shared/preview-panel.js +1 -1
- package/dist/ui/shared/preview.js +11 -2
- package/dist/ui/shared/tokens.css +18 -3
- package/dist/ui/shared/ui-confirm.js +5 -4
- package/dist/ui/shared/workspace.css +7 -0
- package/dist/ui/usage-credits-card.js +84 -0
- package/dist/ui/workspace-ignored-strings.js +16 -0
- package/dist/ui/workspace-panel.js +15 -6
- package/dist/update-card.d.ts +193 -0
- package/dist/update-card.js +620 -0
- package/dist/update-card.js.map +1 -0
- package/dist/update-dispatch.d.ts +16 -1
- package/dist/update-dispatch.js +12 -4
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-forward.d.ts +73 -0
- package/dist/update-forward.js +283 -0
- package/dist/update-forward.js.map +1 -0
- package/dist/update-idle.d.ts +1 -0
- package/dist/update-idle.js +12 -3
- package/dist/update-idle.js.map +1 -1
- package/dist/update-install.d.ts +2 -1
- package/dist/update-install.js +18 -10
- package/dist/update-install.js.map +1 -1
- package/dist/update-journal.d.ts +351 -0
- package/dist/update-journal.js +717 -0
- package/dist/update-journal.js.map +1 -0
- package/dist/update-launch.js +1 -1
- package/dist/update-launch.js.map +1 -1
- package/dist/update-npm-env.d.ts +45 -12
- package/dist/update-npm-env.js +48 -0
- package/dist/update-npm-env.js.map +1 -1
- package/dist/update-package-restore.d.ts +75 -0
- package/dist/update-package-restore.js +318 -0
- package/dist/update-package-restore.js.map +1 -0
- package/dist/update-quiescence.d.ts +192 -0
- package/dist/update-quiescence.js +330 -0
- package/dist/update-quiescence.js.map +1 -0
- package/dist/update-readiness-host.d.ts +61 -0
- package/dist/update-readiness-host.js +297 -0
- package/dist/update-readiness-host.js.map +1 -0
- package/dist/update-readiness.d.ts +83 -0
- package/dist/update-readiness.js +459 -0
- package/dist/update-readiness.js.map +1 -0
- package/dist/update-recovery/kit.d.ts +35 -0
- package/dist/update-recovery/kit.js +99 -0
- package/dist/update-recovery/kit.js.map +1 -0
- package/dist/update-recovery/pre-start.d.ts +34 -0
- package/dist/update-recovery/pre-start.js +103 -0
- package/dist/update-recovery/pre-start.js.map +1 -0
- package/dist/update-recovery/recover-main.d.ts +1 -0
- package/dist/update-recovery/recover-main.js +4 -0
- package/dist/update-recovery/recover-main.js.map +1 -0
- package/dist/update-recovery/recover.d.ts +22 -0
- package/dist/update-recovery/recover.js +124 -0
- package/dist/update-recovery/recover.js.map +1 -0
- package/dist/update-recovery/route.d.ts +53 -0
- package/dist/update-recovery/route.js +262 -0
- package/dist/update-recovery/route.js.map +1 -0
- package/dist/update-recovery/runner.d.ts +58 -0
- package/dist/update-recovery/runner.js +196 -0
- package/dist/update-recovery/runner.js.map +1 -0
- package/dist/update-recovery/service-manager.d.ts +39 -0
- package/dist/update-recovery/service-manager.js +57 -0
- package/dist/update-recovery/service-manager.js.map +1 -0
- package/dist/update-restore.d.ts +44 -0
- package/dist/update-restore.js +355 -0
- package/dist/update-restore.js.map +1 -0
- package/dist/update-retained.d.ts +38 -0
- package/dist/update-retained.js +91 -0
- package/dist/update-retained.js.map +1 -0
- package/dist/update-rollback.d.ts +74 -0
- package/dist/update-rollback.js +221 -0
- package/dist/update-rollback.js.map +1 -0
- package/dist/update-settings.d.ts +36 -0
- package/dist/update-settings.js +122 -0
- package/dist/update-settings.js.map +1 -0
- package/dist/update-snapshot-manifest.d.ts +32 -0
- package/dist/update-snapshot-manifest.js +65 -0
- package/dist/update-snapshot-manifest.js.map +1 -0
- package/dist/update-snapshot-scope.d.ts +67 -0
- package/dist/update-snapshot-scope.js +172 -0
- package/dist/update-snapshot-scope.js.map +1 -0
- package/dist/update-snapshot.d.ts +34 -0
- package/dist/update-snapshot.js +246 -0
- package/dist/update-snapshot.js.map +1 -0
- package/dist/update-writers.d.ts +71 -0
- package/dist/update-writers.js +235 -0
- package/dist/update-writers.js.map +1 -0
- package/dist/web-api.d.ts +3 -0
- package/dist/web-api.js +43 -8
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +7 -0
- package/dist/web-chat-history.js +15 -0
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-preview.d.ts +5 -0
- package/dist/web-preview.js +1 -1
- package/dist/web-preview.js.map +1 -1
- package/dist/web-update.d.ts +6 -0
- package/dist/windows-agents.d.ts +12 -0
- package/dist/windows-agents.js +5 -0
- package/dist/windows-agents.js.map +1 -1
- package/launcher/agend +4 -1
- package/launcher/agend-agent +4 -1
- package/launcher/agend-install.cjs +16 -8
- package/launcher/install-admission.d.cts +8 -0
- package/launcher/npm-allow-scripts.cjs +72 -0
- package/launcher/npm-global-prefix.cjs +81 -0
- package/launcher/postinstall.cjs +9 -8
- package/launcher/runtime-select.cjs +8 -2
- package/package.json +3 -2
- package/scripts/preinstall-guard.cjs +1 -1
package/dist/fleet-lock.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ensureAgendHome } from "./agend-home.js";
|
|
2
|
-
import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { closeSync, existsSync, fsyncSync, openSync, readFileSync, renameSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
3
3
|
import { execFileSync } from "node:child_process";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
|
-
import { join } from "node:path";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
6
|
/** Whether a process command line identifies the AgEnD setup page. */
|
|
7
7
|
export function isSetupHostCommandLine(commandLine) {
|
|
8
8
|
const normalized = commandLine.replace(/\0/g, " ").replace(/\s+/g, " ").trim();
|
|
@@ -52,6 +52,11 @@ function parseRecord(raw) {
|
|
|
52
52
|
if (!Number.isSafeInteger(value.pid) || (value.pid ?? 0) <= 1 || typeof value.nonce !== "string") {
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
|
+
if (value.role === "update" && (typeof value.attemptId !== "string" || !value.attemptId))
|
|
56
|
+
return null;
|
|
57
|
+
if (value.handoff != null && (typeof value.handoff.nonce !== "string" || !/^[0-9a-f]{32}$/.test(value.handoff.nonce)
|
|
58
|
+
|| !["old", "trial", "rollback"].includes(value.handoff.gen)))
|
|
59
|
+
return null;
|
|
55
60
|
return value;
|
|
56
61
|
}
|
|
57
62
|
catch {
|
|
@@ -71,7 +76,10 @@ export function acquireFleetLock(dataDir, probe = {}) {
|
|
|
71
76
|
nonce: probe.nonce ?? randomBytes(16).toString("hex"),
|
|
72
77
|
createdAt: new Date().toISOString(),
|
|
73
78
|
role: probe.role ?? "fleet",
|
|
79
|
+
...(probe.role === "update" ? { attemptId: probe.attemptId ?? "", handoff: null } : {}),
|
|
74
80
|
};
|
|
81
|
+
if (record.role === "update" && !/^\d{8}T\d{6}Z-[0-9a-f]{8}$/.test(record.attemptId ?? ""))
|
|
82
|
+
throw new Error("an update fence needs its attempt id");
|
|
75
83
|
const serialized = JSON.stringify(record) + "\n";
|
|
76
84
|
const isAlive = probe.isProcessAlive ?? processAlive;
|
|
77
85
|
const readCommandLine = probe.readCommandLine ?? readProcessCommandLine;
|
|
@@ -93,6 +101,40 @@ export function acquireFleetLock(dataDir, probe = {}) {
|
|
|
93
101
|
continue;
|
|
94
102
|
}
|
|
95
103
|
const owner = parseRecord(observed);
|
|
104
|
+
// M-3770 §4.3: an updater's fence. Never stale by its command line (an updater isn't `fleet start`): it is taken
|
|
105
|
+
// over only by the start its record plans, holding that nonce and winning the single-use claim — atomically, by a
|
|
106
|
+
// rename over the lock (no release and re-acquire). Anything else refuses while the updater lives.
|
|
107
|
+
if (owner && owner.role === "update") {
|
|
108
|
+
const nonce = probe.handoffNonce === undefined ? (process.env.AGEND_UPDATE_HANDOFF ?? null) : probe.handoffNonce;
|
|
109
|
+
if (nonce && owner.handoff && owner.handoff.nonce === nonce && record.role === "fleet") {
|
|
110
|
+
const claim = probe.claimHandoff;
|
|
111
|
+
if (!claim || !claim(owner.attemptId, nonce, pid))
|
|
112
|
+
throw new Error(`Another start has claimed this update's handoff (attempt ${owner.attemptId})`);
|
|
113
|
+
const taken = { ...record, nonce };
|
|
114
|
+
const takenSerialized = JSON.stringify(taken) + "\n";
|
|
115
|
+
const tmp = `${lockPath}.handoff-${pid}-${randomBytes(4).toString("hex")}`;
|
|
116
|
+
const fd = openSync(tmp, "wx", 0o600);
|
|
117
|
+
try {
|
|
118
|
+
writeSync(fd, takenSerialized);
|
|
119
|
+
fsyncSync(fd);
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
closeSync(fd);
|
|
123
|
+
}
|
|
124
|
+
if (readFileSync(lockPath, "utf8") !== observed) {
|
|
125
|
+
unlinkSync(tmp);
|
|
126
|
+
throw new Error(`The update's fence changed during the handoff (attempt ${owner.attemptId})`);
|
|
127
|
+
}
|
|
128
|
+
renameSync(tmp, lockPath);
|
|
129
|
+
fsyncDir(dataDir);
|
|
130
|
+
return { path: lockPath, record: taken, serialized: takenSerialized };
|
|
131
|
+
}
|
|
132
|
+
if (isAlive(owner.pid)) {
|
|
133
|
+
throw new Error(`AgEnD is updating (attempt ${owner.attemptId}); this fleet start is refused until the update hands over or ends`);
|
|
134
|
+
}
|
|
135
|
+
// The updater is gone. Its fence is never taken by staleness here: recovery (the journal) owns it.
|
|
136
|
+
throw new Error(`An update's fence is left by a stopped updater (attempt ${owner.attemptId}); run the recovery (agend update --resolve)`);
|
|
137
|
+
}
|
|
96
138
|
if (owner && isAlive(owner.pid)) {
|
|
97
139
|
const commandLine = readCommandLine(owner.pid);
|
|
98
140
|
// A live setup host is an owner in its own right. Before the role existed
|
|
@@ -147,6 +189,8 @@ export function fleetLockHeldByAnother(dataDir, probe = {}) {
|
|
|
147
189
|
const owner = parseRecord(readFileSync(join(dataDir, "fleet.lock"), "utf8"));
|
|
148
190
|
if (!owner || owner.pid === (probe.pid ?? process.pid) || !(probe.isProcessAlive ?? processAlive)(owner.pid))
|
|
149
191
|
return false;
|
|
192
|
+
if (owner.role === "update")
|
|
193
|
+
return true; // M-3770: a live updater's fence is held, whatever its command line
|
|
150
194
|
const commandLine = (probe.readCommandLine ?? readProcessCommandLine)(owner.pid);
|
|
151
195
|
if (!commandLine)
|
|
152
196
|
return true; // an unreadable live owner is never assumed absent
|
|
@@ -160,6 +204,10 @@ export function fleetLockHeldByAnother(dataDir, probe = {}) {
|
|
|
160
204
|
export function releaseFleetLock(handle) {
|
|
161
205
|
if (!handle || !existsSync(handle.path))
|
|
162
206
|
return false;
|
|
207
|
+
// M-3770 §4.3: an update fence with a planned handoff is never unlinked directly — the planned start may rename its
|
|
208
|
+
// record in between this compare and the unlink. Revoke first (setFleetLockHandoff(handle, null, revoke)).
|
|
209
|
+
if (handle.record.role === "update" && handle.record.handoff)
|
|
210
|
+
return false;
|
|
163
211
|
try {
|
|
164
212
|
if (readFileSync(handle.path, "utf8") !== handle.serialized)
|
|
165
213
|
return false;
|
|
@@ -181,4 +229,190 @@ export function releaseProcessFleetLock() {
|
|
|
181
229
|
processFleetLock = undefined;
|
|
182
230
|
return released;
|
|
183
231
|
}
|
|
232
|
+
const fsyncDir = (dir) => { const fd = openSync(dir, "r"); try {
|
|
233
|
+
fsyncSync(fd);
|
|
234
|
+
}
|
|
235
|
+
finally {
|
|
236
|
+
closeSync(fd);
|
|
237
|
+
} };
|
|
238
|
+
/**
|
|
239
|
+
* M-3770 §4.3: the updater writes the planned handoff into its own fence record (tmp, fsync, rename, directory fsync),
|
|
240
|
+
* only while the lock is still exactly its record. Returns the new handle, or null when the lock is no longer its own.
|
|
241
|
+
*
|
|
242
|
+
* Replacing or clearing a handoff already planned races the start that holds its nonce: that start may win the claim
|
|
243
|
+
* and rename its record over the lock between this function's compare and its rename, which would put the fence back
|
|
244
|
+
* over a live fleet. So the planned nonce is revoked first through `revoke` — the journal's `revokeHandoff`, which
|
|
245
|
+
* takes the SAME single-use claim file. Exactly one of the two wins it: when the start did, nothing is rewritten (null).
|
|
246
|
+
*/
|
|
247
|
+
export function setFleetLockHandoff(handle, handoff, revoke) {
|
|
248
|
+
if (handle.record.role !== "update")
|
|
249
|
+
throw new Error("only an update fence plans a handoff");
|
|
250
|
+
if (handoff && !/^[0-9a-f]{32}$/.test(handoff.nonce))
|
|
251
|
+
throw new Error("a handoff nonce is 32 hex digits");
|
|
252
|
+
const planned = handle.record.handoff;
|
|
253
|
+
if (planned) {
|
|
254
|
+
if (!revoke)
|
|
255
|
+
throw new Error("a planned handoff is replaced only after its nonce is revoked");
|
|
256
|
+
if (!revoke(handle.record.attemptId, planned.nonce))
|
|
257
|
+
return null; // the start won its claim: the lock is its
|
|
258
|
+
}
|
|
259
|
+
let current;
|
|
260
|
+
try {
|
|
261
|
+
current = readFileSync(handle.path, "utf8");
|
|
262
|
+
}
|
|
263
|
+
catch {
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
if (current !== handle.serialized)
|
|
267
|
+
return null;
|
|
268
|
+
const record = { ...handle.record, handoff };
|
|
269
|
+
const serialized = JSON.stringify(record) + "\n";
|
|
270
|
+
const tmp = `${handle.path}.plan-${record.pid}-${randomBytes(4).toString("hex")}`;
|
|
271
|
+
const fd = openSync(tmp, "wx", 0o600);
|
|
272
|
+
try {
|
|
273
|
+
writeSync(fd, serialized);
|
|
274
|
+
fsyncSync(fd);
|
|
275
|
+
}
|
|
276
|
+
finally {
|
|
277
|
+
closeSync(fd);
|
|
278
|
+
}
|
|
279
|
+
renameSync(tmp, handle.path);
|
|
280
|
+
fsyncDir(dirname(handle.path));
|
|
281
|
+
return { path: handle.path, record, serialized };
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* M-3770 §4.3 rev 5: a generation the attempt started took the lock over and then died before its acknowledgement.
|
|
285
|
+
* The updater (or runner) has journaled that generation as started and dead; now it re-takes its fence. Only that exact
|
|
286
|
+
* record — role fleet, the generation's nonce — and only when its holder is proven gone (no such process; a live pid,
|
|
287
|
+
* maybe reused, is never taken). The replacement is owned: an O_EXCL reclaim marker first, the record compared again,
|
|
288
|
+
* then the update record written to a fresh tmp, fsynced and renamed over the lock, the directory fsynced, the marker
|
|
289
|
+
* removed. Returns the new fence's handle, or why not.
|
|
290
|
+
*/
|
|
291
|
+
export function retakeDeadFleetLock(dataDir, fence, probe = {}) {
|
|
292
|
+
return replaceDeadHolder(dataDir, fence, owner => (owner.role ?? "fleet") === "fleet" && owner.nonce === fence.nonce ? null : "fleet.lock doesn't hold that generation's record", probe);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* M-3770 §6.2: the recovery runner takes over the fence of the attempt's own updater, once that updater is proven gone —
|
|
296
|
+
* the same owned replacement as above (marker, compare again, tmp + fsync + rename, directory fsync). Only an `update`
|
|
297
|
+
* record of THIS attempt; a live holder is never taken. When the fence is already this process's, it is returned as is.
|
|
298
|
+
*/
|
|
299
|
+
export function adoptUpdateFence(dataDir, fence, probe = {}) {
|
|
300
|
+
const pid = fence.pid ?? process.pid;
|
|
301
|
+
let current;
|
|
302
|
+
try {
|
|
303
|
+
current = readFileSync(join(dataDir, "fleet.lock"), "utf8");
|
|
304
|
+
}
|
|
305
|
+
catch (err) {
|
|
306
|
+
return { ok: false, reason: `fleet.lock can't be read (${err.message})` };
|
|
307
|
+
}
|
|
308
|
+
const owner = parseRecord(current);
|
|
309
|
+
if (owner && owner.role === "update" && owner.attemptId === fence.attemptId && owner.pid === pid) {
|
|
310
|
+
clearCrashedReclaim(dataDir, fence.attemptId, pid, probe); // a marker our own crashed run left behind
|
|
311
|
+
return { ok: true, handle: { path: join(dataDir, "fleet.lock"), record: owner, serialized: current } };
|
|
312
|
+
}
|
|
313
|
+
return replaceDeadHolder(dataDir, { pid, attemptId: fence.attemptId }, o => (o.role === "update" && o.attemptId === fence.attemptId ? null : "fleet.lock isn't this attempt's fence"), probe);
|
|
314
|
+
}
|
|
315
|
+
/** The owned re-take's marker beside fleet.lock (one helper for every reader and writer of it). */
|
|
316
|
+
const reclaimMarkerPath = (dataDir) => `${join(dataDir, "fleet.lock")}.reclaim`;
|
|
317
|
+
/**
|
|
318
|
+
* A reclaim marker left by a crash (Fable #4531 F1): the marker holds the record its taker meant to write. When that is
|
|
319
|
+
* THIS attempt's update record and its pid is proven gone, it is our own crashed reclaim — removed (the directory
|
|
320
|
+
* fsynced) so the replacement can run again. Any other marker (another attempt, a live pid, unreadable) stays.
|
|
321
|
+
*/
|
|
322
|
+
function clearCrashedReclaim(dataDir, attemptId, selfPid, probe) {
|
|
323
|
+
const marker = reclaimMarkerPath(dataDir);
|
|
324
|
+
let text;
|
|
325
|
+
try {
|
|
326
|
+
text = readFileSync(marker, "utf8");
|
|
327
|
+
}
|
|
328
|
+
catch {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
const rec = parseRecord(text);
|
|
332
|
+
// Ours: this attempt's record, and its taker gone — or this very process (an exception mid-reclaim, not a crash).
|
|
333
|
+
if (!rec || rec.role !== "update" || rec.attemptId !== attemptId || (rec.pid !== selfPid && (probe.isProcessAlive ?? processAlive)(rec.pid)))
|
|
334
|
+
return false;
|
|
335
|
+
try {
|
|
336
|
+
unlinkSync(marker);
|
|
337
|
+
fsyncDir(dataDir);
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
catch {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
/** The owned replacement of a dead holder's record by a fresh update fence (no handoff). `accept` returns why not, or null. */
|
|
345
|
+
function replaceDeadHolder(dataDir, fence, accept, probe) {
|
|
346
|
+
const lockPath = join(dataDir, "fleet.lock"), marker = reclaimMarkerPath(dataDir);
|
|
347
|
+
let observed;
|
|
348
|
+
try {
|
|
349
|
+
observed = readFileSync(lockPath, "utf8");
|
|
350
|
+
}
|
|
351
|
+
catch (err) {
|
|
352
|
+
return { ok: false, reason: `fleet.lock can't be read (${err.message})` };
|
|
353
|
+
}
|
|
354
|
+
const owner = parseRecord(observed);
|
|
355
|
+
if (!owner)
|
|
356
|
+
return { ok: false, reason: "fleet.lock can't be read as a record" };
|
|
357
|
+
const why = accept(owner);
|
|
358
|
+
if (why)
|
|
359
|
+
return { ok: false, reason: why };
|
|
360
|
+
if ((probe.isProcessAlive ?? processAlive)(owner.pid))
|
|
361
|
+
return { ok: false, reason: `fleet.lock's holder (pid ${owner.pid}) is still a live process; it is never taken` };
|
|
362
|
+
const pid = fence.pid ?? process.pid;
|
|
363
|
+
const record = { pid, nonce: randomBytes(16).toString("hex"), createdAt: new Date().toISOString(), role: "update", attemptId: fence.attemptId, handoff: null };
|
|
364
|
+
const serialized = JSON.stringify(record) + "\n";
|
|
365
|
+
const takeMarker = () => writeFileSync(marker, serialized, { flag: "wx", mode: 0o600 });
|
|
366
|
+
try {
|
|
367
|
+
takeMarker();
|
|
368
|
+
}
|
|
369
|
+
catch (err) {
|
|
370
|
+
if (err.code !== "EEXIST")
|
|
371
|
+
return { ok: false, reason: `the reclaim marker can't be created (${err.message})` };
|
|
372
|
+
// Our own crashed reclaim's marker (this attempt, its taker gone): cleared, then taken once more.
|
|
373
|
+
if (!clearCrashedReclaim(dataDir, fence.attemptId, fence.pid ?? process.pid, probe))
|
|
374
|
+
return { ok: false, reason: `a reclaim marker ${marker} is present (another reclaim, or one left by a crash); nothing is taken` };
|
|
375
|
+
try {
|
|
376
|
+
takeMarker();
|
|
377
|
+
}
|
|
378
|
+
catch (again) {
|
|
379
|
+
return { ok: false, reason: `the reclaim marker can't be taken (${again.message})` };
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
try {
|
|
383
|
+
if (readFileSync(lockPath, "utf8") !== observed)
|
|
384
|
+
return { ok: false, reason: "fleet.lock changed during the reclaim" };
|
|
385
|
+
const tmp = `${lockPath}.retake-${pid}-${randomBytes(4).toString("hex")}`;
|
|
386
|
+
const fd = openSync(tmp, "wx", 0o600);
|
|
387
|
+
try {
|
|
388
|
+
writeSync(fd, serialized);
|
|
389
|
+
fsyncSync(fd);
|
|
390
|
+
}
|
|
391
|
+
finally {
|
|
392
|
+
closeSync(fd);
|
|
393
|
+
}
|
|
394
|
+
renameSync(tmp, lockPath);
|
|
395
|
+
fsyncDir(dataDir);
|
|
396
|
+
return { ok: true, handle: { path: lockPath, record, serialized } };
|
|
397
|
+
}
|
|
398
|
+
catch (err) {
|
|
399
|
+
return { ok: false, reason: `fleet.lock can't be re-taken (${err.message})` };
|
|
400
|
+
}
|
|
401
|
+
finally {
|
|
402
|
+
try {
|
|
403
|
+
unlinkSync(marker);
|
|
404
|
+
fsyncDir(dataDir);
|
|
405
|
+
}
|
|
406
|
+
catch { /* removed, or the directory went */ }
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
/** The fleet lock's record as written (null: absent or unparsable). For the updater's acknowledgement of a takeover. */
|
|
410
|
+
export function readFleetLockRecord(dataDir) {
|
|
411
|
+
try {
|
|
412
|
+
return parseRecord(readFileSync(join(dataDir, "fleet.lock"), "utf8"));
|
|
413
|
+
}
|
|
414
|
+
catch {
|
|
415
|
+
return null;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
184
418
|
//# sourceMappingURL=fleet-lock.js.map
|
package/dist/fleet-lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet-lock.js","sourceRoot":"","sources":["../src/fleet-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW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import { type RequestContextPolicyPort } from "./request-context-policy.js";
|
|
2
|
+
import type { RequestContactApiHost } from "./request-contact-api.js";
|
|
3
|
+
import type { RequestContactPrincipal } from "./request-contact-types.js";
|
|
4
|
+
import type { RequestContactCards } from "./request-contact-card.js";
|
|
5
|
+
import { type RequestContextRegistrationGate } from "./request-context-fence.js";
|
|
1
6
|
type HubHeldCloseOutcome = import("./hub/question-close-model.js").HubHeldCloseOutcome;
|
|
2
7
|
import { type HostAlertSettings } from './host-monitoring-alert-settings.js';
|
|
3
8
|
import { type SetupTokenOwner, type SetupTokenRequest } from "./claude-setup-token.js";
|
|
@@ -12,7 +17,7 @@ import { SettingsConfirmationStore, type SettingsPendingView } from "./settings-
|
|
|
12
17
|
import { type GeneralSwitchInput } from "./general-binding.js";
|
|
13
18
|
import { SettingsExecution } from "./settings-transaction.js";
|
|
14
19
|
import { AppIconStore } from "./web-app-icon.js";
|
|
15
|
-
import { type NamedTestResult } from "./tunnel/named-link-test.js";
|
|
20
|
+
import { type NamedTestResult, type PreviewRouteResult } from "./tunnel/named-link-test.js";
|
|
16
21
|
import { OfficeShareService } from "./office-share-service.js";
|
|
17
22
|
import { OfficeTalk } from "./office-talk.js";
|
|
18
23
|
import { type OfficeShare } from "./office-share.js";
|
|
@@ -84,6 +89,7 @@ import { RuntimeInstallService } from "./runtime-install.js";
|
|
|
84
89
|
import { RuntimeCoordinator } from "./runtime-coordinator.js";
|
|
85
90
|
import { FleetWindowsRuntime, type NativeRuntimePatch } from "./fleet-windows-runtime.js";
|
|
86
91
|
import { NativeMcpSessions } from "./native-mcp.js";
|
|
92
|
+
import type { RequestContextLocalCall } from "./request-context-call.js";
|
|
87
93
|
import { type LogAnswer, type LogQuery } from "./log-service.js";
|
|
88
94
|
import { type ViewHistoryAnswer, type ViewHistoryQuery } from "./view-history.js";
|
|
89
95
|
import { WebChatHistory, type WebChatPost } from "./web-chat-history.js";
|
|
@@ -110,6 +116,8 @@ import { SearchIndex } from "./search/search-index.js";
|
|
|
110
116
|
import { type CrossInstanceRecord, type XmsgVisibility } from "./search/search-docs.js";
|
|
111
117
|
import { WebSettingsTools } from "./web-settings-tools.js";
|
|
112
118
|
import { type Delegation, type TrafficItem } from "./fleet-traffic.js";
|
|
119
|
+
import { type QuiescenceGate } from "./update-quiescence.js";
|
|
120
|
+
import { type UpdateCardView } from "./update-card.js";
|
|
113
121
|
import { type WebUpdateHost } from "./web-update.js";
|
|
114
122
|
import { WebBackendLogins, type SignInTarget } from "./web-backend-login.js";
|
|
115
123
|
import { type ClaudeInstall } from "./claude-install-kind.js";
|
|
@@ -343,6 +351,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
343
351
|
private static sighupHandlerInstalled;
|
|
344
352
|
/** Test seam: inject a spy to verify saveFleetConfig calls fsync. Default: fsyncSync. */
|
|
345
353
|
fsyncForTest: ((fd: number) => void) | undefined;
|
|
354
|
+
/** S-244: the quiescence barrier. Unset, every pane write and admission proceeds as today. */
|
|
355
|
+
private quiescence;
|
|
356
|
+
attachQuiescence(gate: QuiescenceGate | null): void;
|
|
346
357
|
private children;
|
|
347
358
|
readonly lifecycle: InstanceLifecycle;
|
|
348
359
|
readonly stormWindow: StormWindow;
|
|
@@ -403,6 +414,17 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
403
414
|
fleetConfig: FleetConfig | null;
|
|
404
415
|
private fleetWindowsRuntime;
|
|
405
416
|
private nativeMcpStore;
|
|
417
|
+
private readonly requestContextIpcCalls;
|
|
418
|
+
private readonly requestContextFleetCalls;
|
|
419
|
+
setRequestContextDrainRegistration(registration: RequestContextRegistrationGate): void;
|
|
420
|
+
get requestContextFleetDrainRevision(): string;
|
|
421
|
+
requestContextFleetDrainView(rootId: string): import("./request-context-fence.js").RequestContextDrainView;
|
|
422
|
+
private finishRequestContextIpcCall;
|
|
423
|
+
private purgeRequestContextIpcCalls;
|
|
424
|
+
private observeRequestContextResponses;
|
|
425
|
+
/** Captured at IPC arrival, not a later lookup of this instance's current turn. */
|
|
426
|
+
requestContextCallOf(message: object): RequestContextLocalCall | null;
|
|
427
|
+
private captureRequestContextIpcCall;
|
|
406
428
|
private paneManager;
|
|
407
429
|
private localPaneRelay;
|
|
408
430
|
private openingLocalPane;
|
|
@@ -514,14 +536,53 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
514
536
|
* independently, its progress on the message), pinned to the advice the notice named, re-read now and at the launch.
|
|
515
537
|
*/
|
|
516
538
|
private handleHubUpdateCallback;
|
|
539
|
+
private updateChatCardBusy;
|
|
540
|
+
/** #4485 review 2: a sync asked for while one ran; the running one runs again. */
|
|
541
|
+
private updateChatCardAgain;
|
|
542
|
+
/** #4485 review 2: each posted card's delivery address and the version it shows, by nonce (independent of the pending map). */
|
|
543
|
+
private updateChatCardSent;
|
|
544
|
+
/** #4485 r2: the version each card's buttons answer for, bound when its delivery starts (before the platform answers). */
|
|
545
|
+
private updateChatCardVersion;
|
|
546
|
+
/** #4485 review 2: an answer that came while its card was still being posted (the post records it when it returns). */
|
|
547
|
+
private updateChatCardAnswered;
|
|
548
|
+
private updateChatCardTimer;
|
|
549
|
+
private readUpdateChatCard;
|
|
550
|
+
private writeUpdateChatCard;
|
|
551
|
+
/** The card's words for a state (the offer: two sentences, the second only where true — §3.1, Phase 1). */
|
|
552
|
+
private updateChatCardText;
|
|
553
|
+
/** General's chat place for the card, or null (no General, no chat: a web-only fleet's banner says it). */
|
|
554
|
+
private updateChatCardPlace;
|
|
555
|
+
/**
|
|
556
|
+
* M-3770 1.5: keep General's one update card in step with the fleet's card (S-234's UpdateOfferCard). An offer that
|
|
557
|
+
* newly qualifies (a new version, or back after Not now) is posted with its buttons; every later state edits that same
|
|
558
|
+
* message (its buttons retired: the adapters cannot swap them). Never throws; one at a time.
|
|
559
|
+
*/
|
|
560
|
+
syncUpdateChatCard(): Promise<void>;
|
|
561
|
+
/** Edit the posted card: retire its buttons if they are still live (with `text`), else edit its text without buttons. */
|
|
562
|
+
private editUpdateChatCard;
|
|
563
|
+
/**
|
|
564
|
+
* M-3770 1.5: a press on the chat card — a fleet admin's only (anyone else is told privately, the buttons stay: the
|
|
565
|
+
* same gate as the Hub's Update now). The answer is the web's (the one card); the message is edited to its new state.
|
|
566
|
+
*/
|
|
567
|
+
private handleUpdateCardCallback;
|
|
517
568
|
private hubUpdates;
|
|
518
569
|
private hubUpdateOwned;
|
|
519
570
|
private hubUpdateBootProgress;
|
|
571
|
+
/** This process's local idle launch. Its own claim must not look like some other update holding the machine. */
|
|
572
|
+
private localIdleOwned;
|
|
573
|
+
private localIdleBootProgress;
|
|
520
574
|
private pendingHubFleetUpdates;
|
|
521
575
|
hubFleetUpdates(): import("./hub/member/updates.js").HubMemberUpdates | null;
|
|
576
|
+
/** `ownClaim` is this caller's launch, so that launch does not look busy to itself. The Hub queue passes its claim; the local card passes its own. */
|
|
522
577
|
private hubUpdateIdle;
|
|
523
578
|
private hubUpdateCanInstall;
|
|
524
579
|
private launchHubUpdate;
|
|
580
|
+
/**
|
|
581
|
+
* One idle installer, Hub or local. Claims the machine and writes a marker before any await, then settles the row
|
|
582
|
+
* when the child is gone and the marker is no longer in progress.
|
|
583
|
+
*/
|
|
584
|
+
private launchClaimedUpdate;
|
|
585
|
+
private claimedIdleOutcome;
|
|
525
586
|
private hubUpdateOutcome;
|
|
526
587
|
private recordHubUpdateNotice;
|
|
527
588
|
private postHubUpdateChat;
|
|
@@ -773,6 +834,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
773
834
|
caller: string;
|
|
774
835
|
text: string;
|
|
775
836
|
callerCurrent(): boolean;
|
|
837
|
+
requestScope?: import("./request-hub-output.js").RequestHubOutputScope;
|
|
776
838
|
extras?: import("./hub-report-target.js").HubReportExtras;
|
|
777
839
|
}): Promise<import("./hub-report-target.js").HubReportOutcome> | null;
|
|
778
840
|
/** M-3127 OutboundContext: an agent's `react` on a Hub room question (its correlation id as message_id); null: not one. */
|
|
@@ -781,6 +843,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
781
843
|
caller: string;
|
|
782
844
|
emoji: string;
|
|
783
845
|
callerCurrent(): boolean;
|
|
846
|
+
requestScope?: import("./request-hub-output.js").RequestHubOutputScope;
|
|
784
847
|
}): Promise<import("./hub-report-target.js").HubReportOutcome> | null;
|
|
785
848
|
private hubReacts;
|
|
786
849
|
/** The member side's pane-failure hook for a Hub-issued correlation id (else null). */
|
|
@@ -1109,8 +1172,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1109
1172
|
private updateCheckTimer;
|
|
1110
1173
|
/** M-2738: the last update check's answer, for the web (null until the first check settles). */
|
|
1111
1174
|
private updateCheckState;
|
|
1175
|
+
/** S-234: the one durable update offer. Opened on the first check or answer. */
|
|
1176
|
+
private updateCard?;
|
|
1112
1177
|
/** M-2738: a web "check now" in flight, and when the last one ran (one a minute at most). */
|
|
1113
1178
|
private updateCheckNow;
|
|
1179
|
+
/** M-3770 (#4480 §4): the last pre-flight — a diagnostic for the page; every launch proves its local checks again. */
|
|
1180
|
+
private updatePreflight;
|
|
1181
|
+
private updatePreflightRunning;
|
|
1114
1182
|
/** M-2738: a web start's Idempotency-Key → its answer (a retried request never starts a second update). */
|
|
1115
1183
|
private webUpdateStarts;
|
|
1116
1184
|
/**
|
|
@@ -1760,6 +1828,22 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1760
1828
|
private contactService;
|
|
1761
1829
|
private contactDeliveryCurrent;
|
|
1762
1830
|
contactPermissions(name: string, actor: ContactPerson): ContactPermissions;
|
|
1831
|
+
/** Identity-only read. This does not install/enable the same-card host. */
|
|
1832
|
+
requestContextPolicy?: RequestContextPolicyPort;
|
|
1833
|
+
requestContextRelay?: import("./request-context-relay.js").RequestContextRelayPort;
|
|
1834
|
+
/** L installs this explicitly; H defines no production switch. */
|
|
1835
|
+
makeRequestContextPolicy(): RequestContextPolicyPort;
|
|
1836
|
+
requestContactPrincipal(req: import("node:http").IncomingMessage, url: URL): RequestContactPrincipal | null;
|
|
1837
|
+
/**
|
|
1838
|
+
* S-229: the same-card service the native cards use. Null — today's M-3680 card and General proposals, unchanged —
|
|
1839
|
+
* until L installs it at the cutover; synthetic rigs install it directly. Installing it grants no actor: every
|
|
1840
|
+
* decision still comes from a platform callback's person through cards.decide.
|
|
1841
|
+
*/
|
|
1842
|
+
private requestContactCardsPort;
|
|
1843
|
+
installRequestContactCards(cards: RequestContactCards | null): void;
|
|
1844
|
+
/** Dormant assembly for L and synthetic rigs; merely defining this method installs no service or route authority. */
|
|
1845
|
+
makeRequestContactCards(): RequestContactCards;
|
|
1846
|
+
makeRequestContactApi(): RequestContactApiHost;
|
|
1763
1847
|
contactActor(req: import("node:http").IncomingMessage, url: URL): ContactPerson | null;
|
|
1764
1848
|
writeContactPermissions(name: string, raw: ContactPermissionsWrite, actor: ContactPerson): ContactPermissions;
|
|
1765
1849
|
clearContactOrigin(name: string, raw: ContactOriginClear, actor: ContactPerson): ContactPermissions;
|
|
@@ -1848,8 +1932,28 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1848
1932
|
/** Requests whose card was posted or tried: forgotten when the request is decided, and at most HELD_CARDS_KEPT. */
|
|
1849
1933
|
private heldTicketCards?;
|
|
1850
1934
|
private syncHeldTicketCard;
|
|
1935
|
+
/** The one General on the target's Discord/Telegram connection that may carry its contact cards. */
|
|
1936
|
+
private contactCardRoute;
|
|
1937
|
+
/**
|
|
1938
|
+
* S-229: post slice I's same card. prepareForNativePost checks this exact General route as the posting owner before
|
|
1939
|
+
* and after reading (authority none, canDecide false); the entry keeps the card's CAS snapshot, so a click decides
|
|
1940
|
+
* exactly the image people saw, through cards.decide.
|
|
1941
|
+
*/
|
|
1942
|
+
private postSameContactCard;
|
|
1943
|
+
/**
|
|
1944
|
+
* S-229: General proposes a decision on the same card — its one suggested choice plus Not now. General never decides:
|
|
1945
|
+
* the platform callback's person does, through cards.decide. Always allow needs people, expiry and a confirmation, so
|
|
1946
|
+
* a grant proposal is sent to the web.
|
|
1947
|
+
*/
|
|
1948
|
+
private proposeSameContactCard;
|
|
1851
1949
|
private postHeldTicketCard;
|
|
1852
1950
|
private handleContactTicketCallback;
|
|
1951
|
+
/**
|
|
1952
|
+
* S-229: one click on the same card. The decision is the clicker's, on the posted snapshot, through cards.decide —
|
|
1953
|
+
* the web's writer — so a duplicate, another card or the web racing it yields one committed outcome. A lost race
|
|
1954
|
+
* re-reads and shows that outcome; a changed request closes this card and posts one fresh card.
|
|
1955
|
+
*/
|
|
1956
|
+
private decideSameContactCard;
|
|
1853
1957
|
contactAuthorization(id: string, actor: ContactPerson): ContactTicket;
|
|
1854
1958
|
contactAuthorizations(actor: ContactPerson, filter: {
|
|
1855
1959
|
agent?: string;
|
|
@@ -1902,6 +2006,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1902
2006
|
duplicate: boolean;
|
|
1903
2007
|
kind: string;
|
|
1904
2008
|
};
|
|
2009
|
+
requestDeliveryView(deliveryId: string): {
|
|
2010
|
+
view: import("./request-context-view.js").RequestProvenanceView;
|
|
2011
|
+
body: string;
|
|
2012
|
+
} | null;
|
|
1905
2013
|
queryDurableDeliveryStatus(callerInstance: string, selector: DeliveryStatusSelector): DeliveryStatusPage;
|
|
1906
2014
|
/** A terminal OOM stop is not an auto-wakeable pause, including after a fleet restart. */
|
|
1907
2015
|
private sessionOomStopped;
|
|
@@ -2259,6 +2367,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2259
2367
|
private refreshInstanceExecutionState;
|
|
2260
2368
|
private deliverWithIdleGate;
|
|
2261
2369
|
private holdDeliveryForStorm;
|
|
2370
|
+
/**
|
|
2371
|
+
* Last synchronous commit of a pane write (S-244). True: the barrier journaled an adapter or web turn, so it is
|
|
2372
|
+
* not sent. There is no await between this and `ipc.send`. Unarmed, or not an agent turn: false, and the send proceeds.
|
|
2373
|
+
* A Hub or room payload is not a copy: `refuseHubPane` refuses it before this, and the producer leaves the row queued.
|
|
2374
|
+
*/
|
|
2375
|
+
private holdPaneSend;
|
|
2376
|
+
/** The fence is up and this payload belongs to a durable Hub or room row. Do not send it and do not copy it. */
|
|
2377
|
+
private refuseHubPane;
|
|
2262
2378
|
/**
|
|
2263
2379
|
* Hand a payload to an instance's IPC, waiting out a *transient* disconnect.
|
|
2264
2380
|
*
|
|
@@ -2766,6 +2882,17 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2766
2882
|
}): Promise<NamedTestResult | {
|
|
2767
2883
|
busy: true;
|
|
2768
2884
|
}>;
|
|
2885
|
+
private previewRouteTestRunning;
|
|
2886
|
+
/**
|
|
2887
|
+
* M-3814: Settings → Access → the fixed preview address's Check — the saved `web.public_link.preview_hostname`,
|
|
2888
|
+
* through the open fixed link's tunnel, to this preview listener (its boot id is the proof). One at a time; starts
|
|
2889
|
+
* nothing. An admin session only, over the public link too (M-3278; settings-api.ts).
|
|
2890
|
+
*/
|
|
2891
|
+
testPreviewRoute(input?: {
|
|
2892
|
+
hostname?: unknown;
|
|
2893
|
+
}): Promise<PreviewRouteResult | {
|
|
2894
|
+
busy: true;
|
|
2895
|
+
}>;
|
|
2769
2896
|
private getTunnelLane;
|
|
2770
2897
|
private publicOwnerCurrent;
|
|
2771
2898
|
/**
|
|
@@ -3604,7 +3731,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3604
3731
|
private setInstanceDescription;
|
|
3605
3732
|
private handleSetDisplayName;
|
|
3606
3733
|
private handleSetDescription;
|
|
3607
|
-
handleScheduleCrudHttp(instance: string, op: string, args: Record<string, unknown
|
|
3734
|
+
handleScheduleCrudHttp(instance: string, op: string, args: Record<string, unknown>, requestContextAdmission?: import("./request-context-call.js").RequestContextCallAdmission): Promise<unknown>;
|
|
3608
3735
|
/**
|
|
3609
3736
|
* The only place an agent's request creates, changes or removes a schedule
|
|
3610
3737
|
* (#895). The IPC handler (MCP calls, direct channel.sock writes) and the
|
|
@@ -3652,14 +3779,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3652
3779
|
*/
|
|
3653
3780
|
decisionProjectRootFor(instance: string): string | null;
|
|
3654
3781
|
handleDecisionCrudHttp(instance: string, op: string, args: Record<string, unknown>): Promise<unknown>;
|
|
3655
|
-
handleTaskCrudHttp(instance: string, args: Record<string, unknown
|
|
3782
|
+
handleTaskCrudHttp(instance: string, args: Record<string, unknown>, _snapshot?: unknown, requestContextAdmission?: import("./request-context-call.js").RequestContextCallAdmission): Promise<unknown>;
|
|
3656
3783
|
handleSetDisplayNameHttp(instance: string, name: string): Promise<unknown>;
|
|
3657
3784
|
handleListEmojisHttp(instance: string, refresh: boolean, args?: Record<string, unknown>): Promise<unknown>;
|
|
3658
3785
|
handleListStickersHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
|
|
3659
3786
|
handlePreviewStickersHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
|
|
3660
3787
|
handleSetPersonaEmojiHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
|
|
3661
3788
|
/** #1629: `agend-agent theme …` — the same service as the tools; `instance` is the token's. */
|
|
3662
|
-
handleWebThemeHttp(instance: string, tool: string, args: Record<string, unknown
|
|
3789
|
+
handleWebThemeHttp(instance: string, tool: string, args: Record<string, unknown>, requestContextAdmission?: import("./request-context-call.js").RequestContextCallAdmission): Promise<unknown>;
|
|
3663
3790
|
handlePreviewEmojisHttp(instance: string, args: Record<string, unknown>): Promise<unknown>;
|
|
3664
3791
|
handleSetDescriptionHttp(instance: string, description: string): Promise<unknown>;
|
|
3665
3792
|
private summarizeToolCall;
|
|
@@ -3768,7 +3895,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3768
3895
|
* document. Unknown keys and comments remain untouched; redundant
|
|
3769
3896
|
* non-identity instance leaves are canonicalized to inheritance afterward.
|
|
3770
3897
|
*/
|
|
3771
|
-
saveFleetConfig(explicitPatches?: RawConfigPatch[]): void;
|
|
3898
|
+
saveFleetConfig(explicitPatches?: RawConfigPatch[], requestContextAdmission?: import("./request-context-call.js").RequestContextCallAdmission): void;
|
|
3772
3899
|
private sharedIdentitySource;
|
|
3773
3900
|
private sharedDefaultsView;
|
|
3774
3901
|
private pendingRuntimeIdentity;
|
|
@@ -4424,8 +4551,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4424
4551
|
actions: Array<{
|
|
4425
4552
|
id: string;
|
|
4426
4553
|
label: string;
|
|
4554
|
+
hint?: string;
|
|
4555
|
+
role?: import("./backend/types.js").RemoteCardRole;
|
|
4427
4556
|
confirmation?: import("./backend/types.js").RemoteCardOption["confirmation"];
|
|
4428
4557
|
}>;
|
|
4558
|
+
view?: import("./backend/types.js").RemoteCardView;
|
|
4429
4559
|
expiresAt: number;
|
|
4430
4560
|
links?: import("./topic-link.js").TextLink[];
|
|
4431
4561
|
}>;
|
|
@@ -6425,7 +6555,34 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
6425
6555
|
/** Tests only: where lookUpUpdateTarget looks for npm (M-2858); unset in production (the running install, process.env). */
|
|
6426
6556
|
private updateNpmProbe?;
|
|
6427
6557
|
private lookUpUpdateTarget;
|
|
6428
|
-
/** M-
|
|
6558
|
+
/** M-3770: the pre-flight probes (runUpdatePreflight; tests stub that module, so no real npm or systemctl runs). */
|
|
6559
|
+
protected probeUpdatePreflight(opts: {
|
|
6560
|
+
target?: string | null;
|
|
6561
|
+
localOnly?: boolean;
|
|
6562
|
+
}): Promise<import("./update-readiness.js").UpdatePreflight>;
|
|
6563
|
+
/**
|
|
6564
|
+
* M-3770: refresh the cached pre-flight for the offered version. One at a time; never throws. A run is bound to the
|
|
6565
|
+
* version it judged: if the offer moved meanwhile its result is not published (Prism #4483 3) and the run starts again
|
|
6566
|
+
* for the new one. What it finds is merged by check (mergePreflight): a launch's fresher local rows are kept.
|
|
6567
|
+
*/
|
|
6568
|
+
refreshUpdatePreflight(): Promise<void>;
|
|
6569
|
+
/**
|
|
6570
|
+
* M-3770 (#4480 §4.2): identity is proven at the moment of change. The local checks run again now, whatever the cached
|
|
6571
|
+
* result says, and decide; the network ones (P7, P10) are `agend update`'s own. The cache takes the fresh rows and
|
|
6572
|
+
* keeps a cached P7/P10 only while it still applies, with its own age (mergePreflight).
|
|
6573
|
+
* Returns the refusal in words, or null to go ahead.
|
|
6574
|
+
*/
|
|
6575
|
+
updatePreflightGate(origin: "press" | "unattended"): Promise<string | null>;
|
|
6576
|
+
private ensureUpdateCard;
|
|
6577
|
+
/** Display names of agents still working. Pause is not an agent. */
|
|
6578
|
+
private updateBusyNames;
|
|
6579
|
+
private refreshUpdateCard;
|
|
6580
|
+
/** The card, for a test or a chat reply. Null when nothing is offered, including a pin. */
|
|
6581
|
+
updateOfferView(): UpdateCardView | null;
|
|
6582
|
+
describeUpdateOffer(): string;
|
|
6583
|
+
refuseImmediateUpdate(): string | null;
|
|
6584
|
+
beginUpdateRun(): void;
|
|
6585
|
+
/** M-2738: record a look's answer for the web — the same offer the card keeps. */
|
|
6429
6586
|
private recordUpdateCheck;
|
|
6430
6587
|
private checkForUpdates;
|
|
6431
6588
|
/** The web's update routes (web-api.ts handleWebUpdate) read and start through this. */
|