@sema-agent/server 7.148.0 → 7.150.0
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/MIGRATION.md +551 -9
- package/README.md +17 -2
- package/README.zh-CN.md +5 -1
- package/USAGE.md +126 -68
- package/dist/adoption/wire.d.ts +3 -3
- package/dist/approval-card.d.ts +33 -33
- package/dist/approval-gate-currency.d.ts +1 -1
- package/dist/approval-leg-origin.d.ts +33 -0
- package/dist/approval-leg-origin.js +4 -0
- package/dist/audit.d.ts +1 -1
- package/dist/audit.js +2 -2
- package/dist/auth-bridge.d.ts +9 -1
- package/dist/auth-bridge.js +4 -4
- package/dist/auth-keys.d.ts +10 -1
- package/dist/auth-keys.js +8 -0
- package/dist/background-session-reap.d.ts +1 -1
- package/dist/boot/deferred-sandbox-path-env.d.ts +5 -3
- package/dist/boot/deferred-sandbox-path-env.js +1 -2
- package/dist/boot/execution-env.js +10 -11
- package/dist/boot/execution-lane.d.ts +6 -4
- package/dist/boot/execution-lane.js +3 -1
- package/dist/boot/org-delivery.d.ts +3 -2
- package/dist/boot/parked-revive-gate.d.ts +5 -5
- package/dist/boot/parked-revive-gate.js +2 -3
- package/dist/boot/resolve-spec.d.ts +4 -5
- package/dist/boot/resolve-spec.js +66 -28
- package/dist/boot/retention-lane.d.ts +1 -1
- package/dist/boot/runner-deps.js +3 -1
- package/dist/boot/session-faces.js +21 -21
- package/dist/boot/stage-01-config.d.ts +1 -0
- package/dist/boot/stage-01-config.js +4 -3
- package/dist/boot/stage-02-web-admin-pull.d.ts +1 -0
- package/dist/boot/stage-02-web-admin-pull.js +10 -2
- package/dist/boot/stage-03-store-backend.d.ts +1 -0
- package/dist/boot/stage-03-store-backend.js +4 -4
- package/dist/boot/stage-04-stores.d.ts +1 -0
- package/dist/boot/stage-05-execution-env.d.ts +1 -0
- package/dist/boot/stage-06-runners.d.ts +2 -1
- package/dist/boot/stage-06-runners.js +1 -2
- package/dist/boot/stage-07-capability-layer.d.ts +2 -1
- package/dist/boot/stage-07-capability-layer.js +1 -1
- package/dist/boot/stage-08-reapers.d.ts +2 -1
- package/dist/boot/stage-09-leader.d.ts +2 -1
- package/dist/boot/stage-10-http-server.d.ts +35 -2
- package/dist/boot/stage-10-http-server.js +9 -4
- package/dist/boot/stores.d.ts +3 -0
- package/dist/boot/stores.js +22 -19
- package/dist/boot/web-admin.d.ts +1 -1
- package/dist/capabilities/tool-defer.d.ts +1 -1
- package/dist/capability-facts.d.ts +70 -60
- package/dist/capability-facts.js +45 -49
- package/dist/card-settle-stored-scope.d.ts +56 -0
- package/dist/card-settle-stored-scope.js +27 -0
- package/dist/card-void.d.ts +7 -12
- package/dist/card-void.js +2 -7
- package/dist/config-catalog.d.ts +12 -0
- package/dist/config-catalog.js +37 -33
- package/dist/config-invariants.d.ts +5 -4
- package/dist/config-invariants.js +4 -4
- package/dist/config-types.d.ts +49 -16
- package/dist/config.d.ts +6 -5
- package/dist/config.js +35 -24
- package/dist/context-window-notice.d.ts +31 -0
- package/dist/context-window-notice.js +28 -0
- package/dist/deployment-governance.d.ts +7 -28
- package/dist/deployment-governance.js +1 -14
- package/dist/deployment-shape.d.ts +20 -11
- package/dist/deployment-shape.js +1 -0
- package/dist/device-ws-hub.d.ts +1 -0
- package/dist/device-ws-hub.js +64 -28
- package/dist/device-ws-protocol.d.ts +20 -6
- package/dist/device-ws-protocol.js +9 -2
- package/dist/engine-identity.d.ts +7 -1
- package/dist/engine-identity.js +5 -0
- package/dist/env-name-allowlist-knobs.d.ts +6 -5
- package/dist/env-name-allowlist-knobs.js +5 -0
- package/dist/execution-lane-caps.d.ts +20 -5
- package/dist/execution-lane-caps.js +18 -4
- package/dist/field-conflict.d.ts +2 -2
- package/dist/fleet/engine-signal.d.ts +14 -1
- package/dist/fleet/engine-signal.js +5 -1
- package/dist/fleet/fleet-reconciler.d.ts +1 -1
- package/dist/fleet/serving-lease.d.ts +18 -3
- package/dist/fleet/serving-lease.js +81 -35
- package/dist/fleet-client.d.ts +13 -11
- package/dist/fleet-client.js +53 -33
- package/dist/history-anchor.js +1 -1
- package/dist/hitl-delivery.d.ts +1 -3
- package/dist/hitl-delivery.js +1 -1
- package/dist/hooks/command-spawn.d.ts +7 -2
- package/dist/hooks/command-spawn.js +13 -6
- package/dist/hooks/hook-runner.d.ts +5 -0
- package/dist/hooks/hook-runner.js +11 -7
- package/dist/http/active-run-conflict.d.ts +3 -7
- package/dist/http/active-run-conflict.js +2 -2
- package/dist/http/admission.js +5 -5
- package/dist/http/approval-sweeps.js +5 -3
- package/dist/http/caller-trust.d.ts +2 -2
- package/dist/http/caller-trust.js +3 -3
- package/dist/http/checkpoint-ctx.d.ts +18 -63
- package/dist/http/checkpoint-ctx.js +1 -24
- package/dist/http/claim-heartbeat.d.ts +6 -6
- package/dist/http/claim-heartbeat.js +6 -6
- package/dist/http/claimed-run.d.ts +16 -9
- package/dist/http/claimed-run.js +8 -0
- package/dist/http/dispatch.js +7 -5
- package/dist/http/durable-run-leg.d.ts +8 -1
- package/dist/http/durable-run-leg.js +34 -15
- package/dist/http/execution-context.d.ts +115 -14
- package/dist/http/execution-context.js +130 -40
- package/dist/http/owner-access.d.ts +246 -21
- package/dist/http/owner-access.js +186 -8
- package/dist/http/principal-gate.d.ts +18 -11
- package/dist/http/principal-gate.js +3 -1
- package/dist/http/readiness.d.ts +4 -2
- package/dist/http/resume-ctx-read.d.ts +14 -3
- package/dist/http/resume-ctx-read.js +24 -3
- package/dist/http/resume-legs.d.ts +35 -3
- package/dist/http/resume-legs.js +262 -106
- package/dist/http/route-ctx.d.ts +29 -11
- package/dist/http/routes/a2a-serve.js +17 -14
- package/dist/http/routes/approvals-assistant.d.ts +3 -2
- package/dist/http/routes/approvals-assistant.js +11 -11
- package/dist/http/routes/capabilities.js +5 -4
- package/dist/http/routes/config-catalog.d.ts +1 -1
- package/dist/http/routes/diagnostics.d.ts +3 -1
- package/dist/http/routes/diagnostics.js +30 -5
- package/dist/http/routes/mcp-reconnect.js +2 -2
- package/dist/http/routes/memory-origin.d.ts +1 -1
- package/dist/http/routes/notify-wake.js +2 -3
- package/dist/http/routes/principal-inbox.d.ts +3 -1
- package/dist/http/routes/principal-inbox.js +3 -2
- package/dist/http/routes/projects.d.ts +1 -0
- package/dist/http/routes/projects.js +5 -3
- package/dist/http/routes/retention-ops.d.ts +1 -1
- package/dist/http/routes/run-permission-mode.d.ts +1 -1
- package/dist/http/routes/run-permission-mode.js +2 -2
- package/dist/http/routes/runs.d.ts +1 -1
- package/dist/http/routes/runs.js +33 -37
- package/dist/http/routes/session-memory-sync.js +4 -5
- package/dist/http/routes/session-sync.d.ts +24 -5
- package/dist/http/routes/session-sync.js +45 -37
- package/dist/http/routes/sessions-list.d.ts +1 -1
- package/dist/http/routes/sessions.d.ts +1 -1
- package/dist/http/routes/sessions.js +18 -44
- package/dist/http/routes/tasks.js +136 -101
- package/dist/http/routes/trace-usage.js +14 -14
- package/dist/http/routes/workflows.d.ts +1 -0
- package/dist/http/routes/workflows.js +20 -38
- package/dist/http/server.d.ts +12 -9
- package/dist/http/server.js +35 -6
- package/dist/http/stored-body-replay.d.ts +3 -24
- package/dist/http/stored-body-replay.js +2 -12
- package/dist/http/submit-ctx.d.ts +2 -2
- package/dist/http/submit-ctx.js +5 -5
- package/dist/http/submit-replay.d.ts +15 -2
- package/dist/http/submit-replay.js +10 -4
- package/dist/http/wire-types.d.ts +6 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -0
- package/dist/leader/endpoint.js +9 -8
- package/dist/leg-facts.d.ts +13 -2
- package/dist/leg-facts.js +2 -0
- package/dist/local-store-declaration.d.ts +54 -0
- package/dist/local-store-declaration.js +59 -0
- package/dist/mcp-assertion-header.d.ts +1 -1
- package/dist/mcp-assertion-header.js +1 -1
- package/dist/mcp-authorization-face.d.ts +18 -14
- package/dist/mcp-authorization-face.js +3 -2
- package/dist/memory-project-layer.js +1 -1
- package/dist/memory-scope.d.ts +4 -4
- package/dist/memory-scope.js +4 -4
- package/dist/memory-store-refusal.d.ts +1 -1
- package/dist/memory-sync-client.js +2 -2
- package/dist/model-context-window.d.ts +50 -11
- package/dist/model-context-window.js +20 -1
- package/dist/model-entry-refusal.d.ts +5 -4
- package/dist/model-entry-refusal.js +17 -3
- package/dist/model-reach-scope.d.ts +2 -1
- package/dist/observability/corrupt-read-seat.d.ts +1 -1
- package/dist/observability/fail-open.d.ts +19 -7
- package/dist/observability/fail-open.js +19 -7
- package/dist/observability/logger.d.ts +7 -0
- package/dist/observability/logger.js +3 -1
- package/dist/observability/metrics.js +1 -1
- package/dist/observability/run-terminal.d.ts +1 -1
- package/dist/observability/run-terminal.js +1 -0
- package/dist/observability/secret-env-scrub.d.ts +1 -1
- package/dist/observability/secret-env-scrub.js +1 -1
- package/dist/org-delivery-gate.d.ts +31 -6
- package/dist/org-delivery-gate.js +7 -4
- package/dist/owner-faces.d.ts +30 -5
- package/dist/owner-faces.js +2 -0
- package/dist/park-row-commit.d.ts +67 -0
- package/dist/park-row-commit.js +76 -0
- package/dist/parked-decide.d.ts +9 -7
- package/dist/parked-decide.js +25 -6
- package/dist/peer-directory.d.ts +1 -1
- package/dist/peer-seat.d.ts +1 -1
- package/dist/peer-seat.js +52 -59
- package/dist/plugins/adoption-log-sql.d.ts +3 -3
- package/dist/plugins/adoption-log-sql.js +19 -19
- package/dist/plugins/approval-ask-store-sql.d.ts +1 -1
- package/dist/plugins/approval-ask-store-sql.js +3 -5
- package/dist/plugins/approval-exemption-skill-cutoff.d.ts +64 -0
- package/dist/plugins/approval-exemption-skill-cutoff.js +122 -0
- package/dist/plugins/approval-exemption-skill-m46.d.ts +0 -6
- package/dist/plugins/approval-exemption-skill-m46.js +6 -10
- package/dist/plugins/approval-exemption-store.d.ts +26 -1
- package/dist/plugins/approval-exemption-store.js +28 -19
- package/dist/plugins/ensure-schema-lock-policy.d.ts +36 -3
- package/dist/plugins/ensure-schema-lock-policy.js +75 -9
- package/dist/plugins/exec-path-law.d.ts +34 -0
- package/dist/plugins/exec-path-law.js +13 -0
- package/dist/plugins/file-run-store.d.ts +22 -9
- package/dist/plugins/file-run-store.js +51 -23
- package/dist/plugins/local-checkpoint-store.d.ts +8 -1
- package/dist/plugins/local-checkpoint-store.js +5 -1
- package/dist/plugins/local-data-root-admission.d.ts +52 -0
- package/dist/plugins/local-data-root-admission.js +100 -0
- package/dist/plugins/local-engine-high-water.d.ts +28 -7
- package/dist/plugins/local-engine-high-water.js +27 -22
- package/dist/plugins/local-session-store.d.ts +134 -49
- package/dist/plugins/local-session-store.js +149 -108
- package/dist/plugins/memory-run-store.d.ts +14 -9
- package/dist/plugins/memory-run-store.js +48 -22
- package/dist/plugins/one-time-migration-marker.d.ts +19 -3
- package/dist/plugins/one-time-migration-marker.js +7 -1
- package/dist/plugins/one-time-migrations.d.ts +110 -59
- package/dist/plugins/one-time-migrations.js +224 -136
- package/dist/plugins/org-delivery-quota-store.d.ts +34 -11
- package/dist/plugins/org-delivery-quota-store.js +29 -14
- package/dist/plugins/permission-rule-store-sql.d.ts +1 -1
- package/dist/plugins/permission-rule-store-sql.js +5 -9
- package/dist/plugins/pg-pool.d.ts +1 -1
- package/dist/plugins/pg-pool.js +14 -12
- package/dist/plugins/posix-shell-fs.js +4 -2
- package/dist/plugins/remote-env-adb.js +3 -2
- package/dist/plugins/remote-env-device.d.ts +3 -2
- package/dist/plugins/remote-env-device.js +8 -6
- package/dist/plugins/remote-env-e2b.d.ts +4 -8
- package/dist/plugins/remote-env-e2b.js +21 -15
- package/dist/plugins/remote-env-host.d.ts +51 -10
- package/dist/plugins/remote-env-host.js +97 -31
- package/dist/plugins/remote-env-k8s.js +7 -4
- package/dist/plugins/remote-env-local-docker.d.ts +6 -3
- package/dist/plugins/remote-env-local-docker.js +11 -25
- package/dist/plugins/remote-env-ssh.js +4 -3
- package/dist/plugins/remote-shell.d.ts +3 -1
- package/dist/plugins/remote-shell.js +3 -3
- package/dist/plugins/replica-registration.d.ts +35 -0
- package/dist/plugins/replica-registration.js +48 -0
- package/dist/plugins/retention-lane-store-sql.d.ts +1 -1
- package/dist/plugins/run-store-sql.d.ts +27 -8
- package/dist/plugins/run-store-sql.js +46 -18
- package/dist/plugins/scenario-prefix-switch-m42.d.ts +8 -12
- package/dist/plugins/scenario-prefix-switch-m42.js +9 -6
- package/dist/plugins/schema-consistency.d.ts +91 -5
- package/dist/plugins/schema-consistency.js +189 -7
- package/dist/plugins/schema-drift-sentence.d.ts +6 -5
- package/dist/plugins/schema-drift-sentence.js +13 -5
- package/dist/plugins/serving-requirement.d.ts +49 -0
- package/dist/plugins/serving-requirement.js +53 -0
- package/dist/plugins/session-placement.d.ts +5 -4
- package/dist/plugins/shell-sentinel-owner-m48.d.ts +22 -0
- package/dist/plugins/shell-sentinel-owner-m48.js +6 -0
- package/dist/plugins/stop-then-start-sentence.d.ts +55 -0
- package/dist/plugins/stop-then-start-sentence.js +51 -0
- package/dist/plugins/store-backend.d.ts +23 -9
- package/dist/plugins/store-backend.js +58 -24
- package/dist/plugins/store-contracts.d.ts +45 -5
- package/dist/plugins/store-contracts.js +19 -0
- package/dist/plugins/tidb-pool.d.ts +11 -6
- package/dist/plugins/tidb-pool.js +22 -12
- package/dist/plugins/workspace-custody.d.ts +44 -0
- package/dist/plugins/workspace-custody.js +47 -0
- package/dist/process-instance.d.ts +3 -0
- package/dist/process-instance.js +7 -0
- package/dist/project-context.d.ts +66 -0
- package/dist/project-context.js +70 -0
- package/dist/project-identity.d.ts +8 -7
- package/dist/project-identity.js +40 -17
- package/dist/project-layer-key.d.ts +13 -2
- package/dist/project-layer-key.js +9 -1
- package/dist/question.d.ts +9 -21
- package/dist/question.js +28 -19
- package/dist/read-deny-floor-notice.d.ts +36 -0
- package/dist/read-deny-floor-notice.js +40 -0
- package/dist/{plain-string-record.d.ts → request-declaration-disposition.d.ts} +9 -23
- package/dist/request-declaration-disposition.js +39 -0
- package/dist/run-cancel-card.d.ts +28 -0
- package/dist/run-cancel-card.js +20 -0
- package/dist/run-cancel-context.d.ts +10 -0
- package/dist/run-cancel-context.js +1 -0
- package/dist/run-local.js +28 -13
- package/dist/runs.d.ts +31 -7
- package/dist/runs.js +34 -16
- package/dist/security.d.ts +3 -3
- package/dist/server-secret-env.d.ts +34 -20
- package/dist/server-secret-env.js +61 -18
- package/dist/session-agent.d.ts +4 -12
- package/dist/session-agent.js +0 -6
- package/dist/session-children-retire.d.ts +6 -3
- package/dist/session-children-retire.js +2 -5
- package/dist/session-incarnation.d.ts +18 -4
- package/dist/session-incarnation.js +4 -1
- package/dist/session-notify-door.d.ts +4 -4
- package/dist/session-notify-door.js +5 -6
- package/dist/session-rules-seat.d.ts +4 -3
- package/dist/session-rules-seat.js +3 -11
- package/dist/session-sync.js +3 -3
- package/dist/session-workspace.d.ts +3 -3
- package/dist/store-admission.d.ts +33 -0
- package/dist/store-admission.js +49 -0
- package/dist/store-posture.d.ts +5 -0
- package/dist/store-posture.js +18 -1
- package/dist/stores-sql/checkpoint-store-sql.d.ts +22 -3
- package/dist/stores-sql/checkpoint-store-sql.js +109 -23
- package/dist/stores-sql/file-history-store-sql.d.ts +1 -1
- package/dist/stores-sql/file-history-store-sql.js +3 -5
- package/dist/stores-sql/retention-store-sql.d.ts +1 -1
- package/dist/stores-sql/tool-result-store-sql.d.ts +1 -1
- package/dist/stores-sql/tool-result-store-sql.js +4 -6
- package/dist/task-a2a.d.ts +3 -8
- package/dist/task-a2a.js +25 -27
- package/dist/task-cwd.d.ts +27 -10
- package/dist/task-cwd.js +3 -0
- package/dist/task-mcp.d.ts +3 -3
- package/dist/task-mcp.js +1 -1
- package/dist/task-settings.d.ts +13 -0
- package/dist/task-settings.js +14 -7
- package/dist/terminal.d.ts +2 -0
- package/dist/terminal.js +21 -6
- package/dist/tool-approval.d.ts +50 -41
- package/dist/tool-approval.js +96 -73
- package/dist/trace/engine-notice-wire.d.ts +38 -21
- package/dist/trace/engine-notice-wire.js +25 -4
- package/dist/trace/ledger-sink.d.ts +3 -1
- package/dist/trace/project.d.ts +8 -5
- package/dist/trace/project.js +11 -9
- package/dist/trace/projection-table.d.ts +33 -2
- package/dist/trace/redact.d.ts +12 -0
- package/dist/trace/redact.js +5 -1
- package/dist/trace/self-minted-wire.d.ts +268 -56
- package/dist/trace/self-minted-wire.js +110 -40
- package/dist/trace/tool-card.d.ts +3 -0
- package/dist/trace/tool-card.js +24 -0
- package/dist/trace/tool-output-media.d.ts +2 -1
- package/dist/unattended-permission-mode.d.ts +1 -1
- package/dist/web-admin-client/apply-effective.d.ts +1 -1
- package/dist/web-admin-client/apply-effective.js +22 -9
- package/dist/web-admin-client/effective-keys.d.ts +1 -1
- package/dist/web-admin-client/skills-mcp.d.ts +1 -1
- package/docs/DEVICE-EXECUTOR-PROTOCOL.md +57 -29
- package/docs/error-text-lexicon.json +317 -0
- package/package.json +4 -2
- package/scripts/embed-minimal.mjs +183 -0
- package/wire-changes/server@7.149.0.json +372 -0
- package/wire-changes/server@7.150.0.json +335 -0
- package/dist/plain-string-record.js +0 -70
|
@@ -193,7 +193,7 @@ export async function runStage07(ctx) {
|
|
|
193
193
|
const parkedReviveSurface = checkpointStore && backgroundAgentStore && builtinDefaultScenario ? createParkedReviveSurface(builtinDefaultScenario, { onBackgroundChildEvent: runnerDeps.onBackgroundChildEvent }) : undefined;
|
|
194
194
|
const parkedReviveInheritedGate = parkedReviveSurface && config.durableApproval
|
|
195
195
|
? createParkedReviveInheritedGate({
|
|
196
|
-
config, question, logger, localRoot,
|
|
196
|
+
config, questionSeat: question !== undefined, logger, localRoot,
|
|
197
197
|
approverSeat: createRunnerDepsOnAsk(toolApproval),
|
|
198
198
|
approvalExemptionStore,
|
|
199
199
|
...(runnerDeps.runtimeCapsResolver ? { resolveRuntimeCaps: runnerDeps.runtimeCapsResolver } : {}),
|
|
@@ -89,7 +89,7 @@ export declare function runStage08(ctx: Awaited<ReturnType<typeof runStage07>>):
|
|
|
89
89
|
};
|
|
90
90
|
workflowRunStore: import("../orchestration/workflow-notify-journal.js").JournalingWorkflowRunStore | undefined;
|
|
91
91
|
workflowsCapable: boolean;
|
|
92
|
-
orgDeliveryGate: import("
|
|
92
|
+
orgDeliveryGate: import("../org-delivery-gate.js").ServerOrgDeliveryGate | undefined;
|
|
93
93
|
deploymentMods: readonly import("@sema-agent/core").ModRegistration<import("@sema-agent/core").EngineDollar>[];
|
|
94
94
|
deploymentModsLoaded: readonly import("./deployment-mods.js").LoadedModPackage[];
|
|
95
95
|
belowTaskChainPatterns: readonly string[];
|
|
@@ -172,6 +172,7 @@ export declare function runStage08(ctx: Awaited<ReturnType<typeof runStage07>>):
|
|
|
172
172
|
ceilingVerdict: import("./unpriced-ceiling-verdict.js").UnpricedCeilingVerdict;
|
|
173
173
|
storeEvidence: import("../store-posture.js").StoreEvidence;
|
|
174
174
|
webAdmin: import("./web-admin.js").WebAdminRuntime;
|
|
175
|
+
localAdmission: import("../plugins/local-data-root-admission.js").LocalDataRootAdmission | undefined;
|
|
175
176
|
localRoot: string;
|
|
176
177
|
logger: import("../index.js").Logger;
|
|
177
178
|
metrics: import("../index.js").Metrics;
|
|
@@ -108,7 +108,7 @@ export declare function runStage09(ctx: Awaited<ReturnType<typeof runStage08>>):
|
|
|
108
108
|
};
|
|
109
109
|
workflowRunStore: import("../orchestration/workflow-notify-journal.js").JournalingWorkflowRunStore | undefined;
|
|
110
110
|
workflowsCapable: boolean;
|
|
111
|
-
orgDeliveryGate: import("
|
|
111
|
+
orgDeliveryGate: import("../org-delivery-gate.js").ServerOrgDeliveryGate | undefined;
|
|
112
112
|
deploymentMods: readonly import("@sema-agent/core").ModRegistration<import("@sema-agent/core").EngineDollar>[];
|
|
113
113
|
deploymentModsLoaded: readonly import("./deployment-mods.js").LoadedModPackage[];
|
|
114
114
|
belowTaskChainPatterns: readonly string[];
|
|
@@ -191,6 +191,7 @@ export declare function runStage09(ctx: Awaited<ReturnType<typeof runStage08>>):
|
|
|
191
191
|
ceilingVerdict: import("./unpriced-ceiling-verdict.js").UnpricedCeilingVerdict;
|
|
192
192
|
storeEvidence: import("../store-posture.js").StoreEvidence;
|
|
193
193
|
webAdmin: import("./web-admin.js").WebAdminRuntime;
|
|
194
|
+
localAdmission: import("../plugins/local-data-root-admission.js").LocalDataRootAdmission | undefined;
|
|
194
195
|
localRoot: string;
|
|
195
196
|
logger: import("../index.js").Logger;
|
|
196
197
|
metrics: import("../index.js").Metrics;
|
|
@@ -1,4 +1,36 @@
|
|
|
1
|
+
import { brainSummary } from "../brain.js";
|
|
2
|
+
import { type ServiceConfig } from "../config.js";
|
|
1
3
|
import type { runStage09 } from "./stage-09-leader.js";
|
|
4
|
+
/**
|
|
5
|
+
* 启动协议行 `listening` 的字段(行本身是 `observability/logger.ts` 的 {@link import("../observability/logger.js").STARTUP_PROTOCOL_EVENTS} 一员:不随 `LOG_LEVEL`)。
|
|
6
|
+
* 铸点 = 本文件 listen 之后那一行(全仓唯一,`test/source-hygiene-gate.test.ts` M7),字面量过 {@link exactListeningLine}(键集恰等于本型,可选键与条件展开同算);
|
|
7
|
+
* 键集登记在自铸登记表 `listeningLineKey`(`satisfies Record<keyof ListeningLine, …>`:键加一个而登记表没跟 / 多一个 ⇒ tsc 红)。只登顶层键;`brain` 段里的键随 `brainSummary` 走,不在本型。
|
|
8
|
+
*
|
|
9
|
+
* 绑址两格,一格一个事实:`bindHost` = 本进程**请求**绑的地址(`resolveBindHost` 的答案 —— `BIND_HOST` 经无鉴权自收窄之后的那一只;答案缺席 = 全接口时是说明串);`boundAddress` = 内核**实际**绑上的地址
|
|
10
|
+
* (`server.address().address` 原样:`::` / `0.0.0.0` / `127.0.0.1` / `::1` …;配置写 `localhost` 时它是解析出的那一只)。口同理:`port` 读的也是绑定者自己的答案。
|
|
11
|
+
*/
|
|
12
|
+
export interface ListeningLine {
|
|
13
|
+
readonly port: number;
|
|
14
|
+
readonly bindHost: string;
|
|
15
|
+
readonly bindHostNote?: string;
|
|
16
|
+
readonly boundAddress: string;
|
|
17
|
+
readonly model: ServiceConfig["model"]["id"];
|
|
18
|
+
readonly brain: ReturnType<typeof brainSummary>;
|
|
19
|
+
readonly breakerState: string;
|
|
20
|
+
readonly session: string;
|
|
21
|
+
readonly memory: string;
|
|
22
|
+
readonly instanceId: string;
|
|
23
|
+
readonly rateLimitPerMin: number;
|
|
24
|
+
readonly rateLimit: string;
|
|
25
|
+
readonly maxPrincipalCostUsd: number | null;
|
|
26
|
+
readonly costQuota: string;
|
|
27
|
+
readonly toolResultStore: string;
|
|
28
|
+
readonly otel: string | null;
|
|
29
|
+
readonly perModelKeys: number;
|
|
30
|
+
readonly sealedModelKeys: number;
|
|
31
|
+
readonly sealedPoisonedModels: number;
|
|
32
|
+
readonly workflowRunStore: string;
|
|
33
|
+
}
|
|
2
34
|
export declare function runStage10(ctx: Awaited<ReturnType<typeof runStage09>>): Promise<{
|
|
3
35
|
drainState: import("../fleet/drain-entry.js").DrainState;
|
|
4
36
|
hookWakeBus: {
|
|
@@ -107,7 +139,7 @@ export declare function runStage10(ctx: Awaited<ReturnType<typeof runStage09>>):
|
|
|
107
139
|
};
|
|
108
140
|
workflowRunStore: import("../orchestration/workflow-notify-journal.js").JournalingWorkflowRunStore | undefined;
|
|
109
141
|
workflowsCapable: boolean;
|
|
110
|
-
orgDeliveryGate: import("
|
|
142
|
+
orgDeliveryGate: import("../org-delivery-gate.js").ServerOrgDeliveryGate | undefined;
|
|
111
143
|
deploymentMods: readonly import("@sema-agent/core").ModRegistration<import("@sema-agent/core").EngineDollar>[];
|
|
112
144
|
deploymentModsLoaded: readonly import("./deployment-mods.js").LoadedModPackage[];
|
|
113
145
|
belowTaskChainPatterns: readonly string[];
|
|
@@ -186,10 +218,11 @@ export declare function runStage10(ctx: Awaited<ReturnType<typeof runStage09>>):
|
|
|
186
218
|
taskAttachmentStore: import("../plugins/task-attachment-store.js").TaskAttachmentStore | undefined;
|
|
187
219
|
taskListLane: import("./task-list-lane.js").TaskListLane;
|
|
188
220
|
usageWindowStore: import("@sema-agent/core").UsageWindowStore | undefined;
|
|
189
|
-
config:
|
|
221
|
+
config: ServiceConfig;
|
|
190
222
|
ceilingVerdict: import("./unpriced-ceiling-verdict.js").UnpricedCeilingVerdict;
|
|
191
223
|
storeEvidence: import("../store-posture.js").StoreEvidence;
|
|
192
224
|
webAdmin: import("./web-admin.js").WebAdminRuntime;
|
|
225
|
+
localAdmission: import("../plugins/local-data-root-admission.js").LocalDataRootAdmission | undefined;
|
|
193
226
|
localRoot: string;
|
|
194
227
|
logger: import("../index.js").Logger;
|
|
195
228
|
metrics: import("../index.js").Metrics;
|
|
@@ -31,6 +31,9 @@ import { bindServerLateSeats } from "./late-binds.js";
|
|
|
31
31
|
import { serviceVersion } from "../service-version.js";
|
|
32
32
|
import { buildDisplaySafeUrl } from "../trace/redact.js";
|
|
33
33
|
import { seatText } from "../trace/exit-seat.js";
|
|
34
|
+
function exactListeningLine(line) {
|
|
35
|
+
return line;
|
|
36
|
+
}
|
|
34
37
|
export async function runStage10(ctx) {
|
|
35
38
|
const { peerDesk, approvalAskAudit, approvalExemptionStore, approvalNonceStore, authorize, backend, backgroundAgentStore, brain, breakerState, centerRuntimeCapsResolver, checkpointStore, checkpointCtxSealing, parkCommits, config, webAdmin, consolidationValve, costQuota, belowTaskChainPatterns, deploymentMods, deploymentModsLoaded, deviceLane, drainState, dropSessionScopedOf, durableEnabled, elicitation, fenceSessionOwner, fileHistoryStore, fleetBus, fleetLease, fleetUsage, governanceSeams, handslessRunner, hookAgent, hookLlm, hookWakeBus, imageBakes, imageIndex, instanceId, instrumentDegenerate, leaderEndpoint, loadedSkills, localRoot, logger, lspManager, mcpRevocations, sandboxCapacity, memoryBundleFaces, memoryComplianceFaces, memoryConsolidationFaces, memoryEngine, memoryExportStores, memoryOptOutGrantStore, memoryOriginFaces, memoryPosture, memorySyncCursors, memorySyncRunner, metrics, modelUsageTracker, orgMemoryAdmission, otelExporter, outcomeSink, ownerAware, parkedReviveInheritedGate, parkedReviveSurface, perSessionCwd, perTaskImage, planCacheProbe, pricing, principalCaps, promptManifestTracker, purgeSession, question, rateLimiter, reaper, webAdminJwtVerifier, resumeAnchorStore, retentionLaneStarted, retentionLaneStore, ruleConsent, runStore, runner, runnerDeps, runtimeCapsPeekReading, sandboxGitPlane, scenarioDetails, scenarios, selectEnvTool, sendFileLedger, sendUserFileEmitter, sendUserFileToolSpec, sessionAudit, sessionEnvSelection, sessionMemoryStatusFace, sessionPolicyStore, sessionTitler, sessionWatchRegistry, setSessionCwd, setSessionInheritEnv, setSessionShellEnv, sessionResidentBackground, sharedMemoryStore, sideQueryAccounting, sqlEngine, sqlWorkflowRunStore, staticWiring, storePosture, subRunner, subagentSteerRegistry, taskAttachmentStore, taskLimitCaps, taskTimeoutSec, toolApproval, toolResultStore, usageWindowStore, userInputLedger, webSearchProvider, workflowAgentRegistry, workflowAgentSessionIndex, workflowParkDecisions, workflowCompletionInbox, workflowJournalStore, workflowModelAllowlistSnapshot, workflowNotifyGate, workflowNotifyJournal, workflowRecoverOpts, workflowRunStore, workflowsCapable, orgDeliveryGate } = ctx;
|
|
36
39
|
const stores = {
|
|
@@ -218,7 +221,7 @@ export async function runStage10(ctx) {
|
|
|
218
221
|
checkpointStore, imageIndex, perTaskImage,
|
|
219
222
|
sessionEnvSelection,
|
|
220
223
|
lockedKeys: governanceSeams.lockedKeys,
|
|
221
|
-
|
|
224
|
+
questionSeat: question !== undefined,
|
|
222
225
|
approverSeat: createRunnerDepsOnAsk(toolApproval),
|
|
223
226
|
});
|
|
224
227
|
const runnerFor = createHandsRunnerSelector({ full: runner, handsless: handslessRunner });
|
|
@@ -284,11 +287,12 @@ export async function runStage10(ctx) {
|
|
|
284
287
|
version: serviceVersion(),
|
|
285
288
|
signal: () => mintEngineSignal({ ...deployment, config }),
|
|
286
289
|
modelRefusals: () => deployment.modelRefusalsState?.(),
|
|
287
|
-
...(servingLease ? {
|
|
290
|
+
...(servingLease ? { onHeartbeat: (hearing) => servingLease.noteHeartbeat(hearing) } : {}),
|
|
288
291
|
...(fleetUsage ? { usage: fleetUsage } : {}),
|
|
289
292
|
logger: { info: (m, d) => logger.info(m, d ?? {}), warn: (m, d) => logger.warn(m, d ?? {}) },
|
|
290
293
|
});
|
|
291
294
|
webAdmin.onSelfReportChange(() => void fleetClient?.announceNow());
|
|
295
|
+
servingLease?.onViewChange(() => void fleetClient?.announceNow());
|
|
292
296
|
if (fleetClient) {
|
|
293
297
|
const advertised = config.fleetAdvertiseAddress;
|
|
294
298
|
logger.info("fleet_client_started", { worker: config.webAdmin?.worker, usageReport: fleetUsage !== undefined, announce: advertised !== undefined, ...(advertised !== undefined ? { address: buildDisplaySafeUrl(advertised) } : {}) });
|
|
@@ -299,12 +303,13 @@ export async function runStage10(ctx) {
|
|
|
299
303
|
const bound = server.address();
|
|
300
304
|
if (bound === null || typeof bound === "string")
|
|
301
305
|
throw new Error(`http server listening without a TCP address (server.address() = ${JSON.stringify(bound)})`);
|
|
302
|
-
logger.info("listening", {
|
|
306
|
+
logger.info("listening", exactListeningLine({
|
|
303
307
|
port: bound.port,
|
|
304
308
|
bindHost: bindHost ?? "0.0.0.0/::(all interfaces)",
|
|
305
309
|
...(bindHost === "127.0.0.1" && !config.bindHost
|
|
306
310
|
? { bindHostNote: "auto-narrowed to loopback: write face is unauthenticated (ALLOW_UNAUTHED_WRITES with no service token). Set BIND_HOST explicitly to override." }
|
|
307
311
|
: {}),
|
|
312
|
+
boundAddress: bound.address,
|
|
308
313
|
model: config.model.id,
|
|
309
314
|
brain: brainSummary(config),
|
|
310
315
|
breakerState: config.resilience.circuitBreaker ? (breakerState ? `shared(${backend.kind})` : "in-process") : "off",
|
|
@@ -327,7 +332,7 @@ export async function runStage10(ctx) {
|
|
|
327
332
|
? `db(${backend.kind})`
|
|
328
333
|
: "file"
|
|
329
334
|
: "off",
|
|
330
|
-
});
|
|
335
|
+
}));
|
|
331
336
|
if (workflowNotifyGate) {
|
|
332
337
|
void workflowNotifyGate
|
|
333
338
|
.recover(workflowRecoverOpts)
|
package/dist/boot/stores.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { Metrics } from "../observability/metrics.js";
|
|
|
6
6
|
import { type MemorySyncStore } from "../plugins/memory-sync-store-pg.js";
|
|
7
7
|
import { type TaskAttachmentStore } from "../plugins/task-attachment-store.js";
|
|
8
8
|
import { type StoreBackend } from "../plugins/store-backend.js";
|
|
9
|
+
import type { LocalDataRootAdmission } from "../plugins/local-data-root-admission.js";
|
|
9
10
|
import { type MemoryScopeStores } from "../memory-scope-stores.js";
|
|
10
11
|
import { type StoreEvidence } from "../store-posture.js";
|
|
11
12
|
export interface OpenStoresCtx {
|
|
@@ -15,6 +16,8 @@ export interface OpenStoresCtx {
|
|
|
15
16
|
localRoot: string;
|
|
16
17
|
/** 店的持久性起服证据(起服第 2 段段首 `captureBootStoreEvidence` 取的那一份;直接调本函数的测试同一只取证)。 */
|
|
17
18
|
storeEvidence: StoreEvidence;
|
|
19
|
+
/** local 数据根准入读数(起服第 1 段在本进程第一笔写之前取的那一只;非 local = `undefined`)。直接调本函数的测试经 `test/helpers/open-stores.ts` 同一只准入取。 */
|
|
20
|
+
localAdmission: LocalDataRootAdmission | undefined;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* durable 回决腿的规则位给 `approval_ask` 加了 `rule_command`/`rule_scope_root` 两列,而 `ensureAsk` 的 INSERT 与每一条读**无条件**引用它们 ⇒ 存量表上整条流内审批协议
|
package/dist/boot/stores.js
CHANGED
|
@@ -21,7 +21,7 @@ import { LocalTaskAttachmentStore } from "../plugins/local-task-attachment-store
|
|
|
21
21
|
import { PgTaskAttachmentStore, TiDBTaskAttachmentStore, ensurePgTaskAttachmentSchema, ensureTiDBTaskAttachmentSchema } from "../plugins/task-attachment-store.js";
|
|
22
22
|
import { createSessionStore } from "../plugins/session-store.js";
|
|
23
23
|
import { buildSqlPoolMissingRefusal, missingSqlCoordinateKeys } from "../sql-engine-coordinates.js";
|
|
24
|
-
import { runAndLogOneTimeMigrations } from "../plugins/one-time-migrations.js";
|
|
24
|
+
import { ONE_TIME_MIGRATIONS, runAndLogOneTimeMigrations } from "../plugins/one-time-migrations.js";
|
|
25
25
|
import { createTaskListLane } from "./task-list-lane.js";
|
|
26
26
|
import { ensurePgTaskListSchema, ensureTiDBTaskListSchema } from "../plugins/task-list-store-sql.js";
|
|
27
27
|
import { assertDeviceAuditRebindEventSchema, ensurePgDeviceSchema, ensureTiDBDeviceSchema } from "../plugins/device-store-sql.js";
|
|
@@ -65,19 +65,29 @@ export function buildSessionBoxMountLine(verdict) {
|
|
|
65
65
|
: { level: "warn", fields: { peerLaneMountable: false, peerLaneRefusal: verdict.code, reason: verdict.reason } };
|
|
66
66
|
}
|
|
67
67
|
export async function openStores(ctx) {
|
|
68
|
-
const { config, logger, metrics, localRoot, storeEvidence } = ctx;
|
|
68
|
+
const { config, logger, metrics, localRoot, storeEvidence, localAdmission } = ctx;
|
|
69
69
|
let backend;
|
|
70
70
|
let storeDegradedReason;
|
|
71
|
+
if (config.requirePrincipal && config.dbBackend === "local") {
|
|
72
|
+
throw new Error("REQUIRE_PRINCIPAL=true is not supported on the local file backend (DB_BACKEND=local): the lane is single-user " +
|
|
73
|
+
"by construction — a session created before owners were recorded is claimed by the FIRST principal that submits " +
|
|
74
|
+
"to it during the upgrade window, and the lane's mutual-recognition arms assume one user — so it cannot enforce " +
|
|
75
|
+
"a multi-tenant session boundary. Use a SQL backend (DB_BACKEND=mysql|pg) for multi-tenant, or run local " +
|
|
76
|
+
"single-user with REQUIRE_PRINCIPAL=false (a BFF may still inject x-agent-principal per request for memory " +
|
|
77
|
+
"scoping and audit attribution).");
|
|
78
|
+
}
|
|
71
79
|
const dsnConfigured = !!(config.tidb || config.pg);
|
|
72
80
|
await ensureSnapshotBuckets(config, logger);
|
|
73
81
|
const wantDb = config.sessionBackend === "tidb" ||
|
|
74
82
|
config.dbBackend === "local" ||
|
|
75
83
|
(config.sessionBackend === "auto" && dsnConfigured);
|
|
76
84
|
if (wantDb) {
|
|
77
|
-
const opened = await openStoreBackendWithFallback(config, logger, { runStallVerdicts: (landed) => metrics.inc("runs_reaped_total", { kind: "stale" }, landed) });
|
|
85
|
+
const opened = await openStoreBackendWithFallback(config, logger, { runStallVerdicts: (landed) => metrics.inc("runs_reaped_total", { kind: "stale" }, landed) }, localAdmission, { dataRootMedium: storeEvidence.dataRoot.verdict });
|
|
78
86
|
backend = opened.backend;
|
|
79
87
|
storeDegradedReason = opened.degradedReason;
|
|
80
88
|
}
|
|
89
|
+
if (backend)
|
|
90
|
+
assertCloudSnapshotBlobPosture(backend.kind, config);
|
|
81
91
|
{
|
|
82
92
|
const mysqlPool = backend?.mysqlPool?.();
|
|
83
93
|
const pgPool = backend?.pgPool?.();
|
|
@@ -108,8 +118,6 @@ export async function openStores(ctx) {
|
|
|
108
118
|
else if (mysqlPool)
|
|
109
119
|
await assertSessionExtCascadeOn(mysqlDriver(mysqlPool));
|
|
110
120
|
}
|
|
111
|
-
if (backend)
|
|
112
|
-
await runAndLogOneTimeMigrations(logger, backend);
|
|
113
121
|
if ((process.env.REWIND_SNAPSHOT_MAX_MB ?? "") !== "") {
|
|
114
122
|
logger.warn("rewind_snapshot_max_mb_retired", {
|
|
115
123
|
note: "REWIND_SNAPSHOT_MAX_MB no longer has an effect: the whole-tree snapshot epoch is retired (S-15); per-edited-file history captures only files the agent touches, with no tree walk and no size gate. Remove the env var. Per-blob SQL sizing is governed by SNAPSHOT_BLOB_SQL_MAX_BYTES / object storage as before.",
|
|
@@ -228,6 +236,7 @@ export async function openStores(ctx) {
|
|
|
228
236
|
degradedReason: storeDegradedReason,
|
|
229
237
|
evidence: storeEvidence,
|
|
230
238
|
memoryRootWired: config.memoryEngineBackend === "file" && memoryEngine !== undefined,
|
|
239
|
+
localDeclaration: backend?.localStoreDeclaration?.(),
|
|
231
240
|
});
|
|
232
241
|
metrics.setGauge("store_backend_degraded", storePosture.degradedReason !== undefined ? 1 : 0);
|
|
233
242
|
const freshStart = buildStoreFreshStartLine(storePosture, storeEvidence);
|
|
@@ -422,25 +431,19 @@ export async function openStores(ctx) {
|
|
|
422
431
|
await assertDeviceAuditRebindEventSchema(mysqlDriver(mysqlPool));
|
|
423
432
|
}
|
|
424
433
|
}
|
|
425
|
-
{
|
|
434
|
+
const reconcileSchema = async (pending) => {
|
|
426
435
|
const mysqlPool = backend?.mysqlPool?.();
|
|
427
436
|
const pgPool = backend?.pgPool?.();
|
|
428
437
|
if (pgPool)
|
|
429
|
-
await assertSchemaMatchesCode(async (sql) => (await pgPool.query(sql)).rows, "pg");
|
|
438
|
+
await assertSchemaMatchesCode(async (sql) => (await pgPool.query(sql)).rows, "pg", pending);
|
|
430
439
|
else if (mysqlPool)
|
|
431
|
-
await assertSchemaMatchesCode(async (sql) => (await mysqlPool.query(sql))[0], "mysql");
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
if (config.requirePrincipal && backend?.kind === "local") {
|
|
435
|
-
throw new Error("REQUIRE_PRINCIPAL=true is not supported on the local file backend (DB_BACKEND=local): the lane is single-user " +
|
|
436
|
-
"by construction — a session created before owners were recorded is claimed by the FIRST principal that submits " +
|
|
437
|
-
"to it during the upgrade window, and the lane's mutual-recognition arms assume one user — so it cannot enforce " +
|
|
438
|
-
"a multi-tenant session boundary. Use a SQL backend (DB_BACKEND=mysql|pg) for multi-tenant, or run local " +
|
|
439
|
-
"single-user with REQUIRE_PRINCIPAL=false (a BFF may still inject x-agent-principal per request for memory " +
|
|
440
|
-
"scoping and audit attribution).");
|
|
441
|
-
}
|
|
440
|
+
await assertSchemaMatchesCode(async (sql) => (await mysqlPool.query(sql))[0], "mysql", pending);
|
|
441
|
+
};
|
|
442
|
+
await reconcileSchema(ONE_TIME_MIGRATIONS);
|
|
442
443
|
if (backend)
|
|
443
|
-
|
|
444
|
+
await runAndLogOneTimeMigrations(logger, backend);
|
|
445
|
+
await reconcileSchema([]);
|
|
446
|
+
const sessionStore = createSessionStore(config, backend, metrics);
|
|
444
447
|
if (!config.requirePrincipal && headReadOf(sessionStore) !== undefined) {
|
|
445
448
|
logger.warn("principal_optional", {
|
|
446
449
|
note: "owner-aware session store with REQUIRE_PRINCIPAL=false — owned sessions are protected, but headerless callers can create/share anonymous sessions; set REQUIRE_PRINCIPAL=true for multi-tenant",
|
package/dist/boot/web-admin.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ export interface WebAdminRuntime {
|
|
|
144
144
|
/** [ref] ②:caps `centerWiring.effectivePull` / `effectiveRevision` 的取值口 —— `lastPull`(新状态,只此一枚:boot 实拉 / 迟到 boot 到货 /
|
|
145
145
|
* refresh 拍收尾写)+ 与 `configApplyState()` **同一只** ledger 视图的已应用修订号。形与词表见 `web-admin-client/pull-state.ts`。 */
|
|
146
146
|
centerPullState(): CenterPullView;
|
|
147
|
-
/**
|
|
147
|
+
/** [ref] §5 S2([ref]):center **当前在管**的 ServiceConfig 键集 —— `GET /v1/config/catalog` 判
|
|
148
148
|
* `effectiveLane` 的 center 半场。投影自最近一次成功应用的候选(`latestEffective`,LKG/refresh 同一
|
|
149
149
|
* 份推进点;判据单源 = apply-effective.ts `centerManagedConfigKeys`)。`undefined` = 没有配置管道。
|
|
150
150
|
* ⚠️ 部分应用窗(codex R2-F2 登记):某组整拒时 live config 已吃进其它组而 latestEffective 不推进,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - 🔴 **候选 ≠ 延迟**(core 7.15.0 [ref] 的行为面收窄,本仓两条真后果见下):候选集整体受**一道**
|
|
13
13
|
* 阈值门,全或无 —— 候选的内联字节(name+description+schema)≥ `floor(上下文 token × 10%) × 3`
|
|
14
14
|
* 才延迟,否则**全内联且不挂 `ToolSearch`**。远端协议铸名因此**不再无条件占位**:本仓缺省窗
|
|
15
|
-
* (`ASSUMED_CONTEXT_WINDOW`,今天
|
|
15
|
+
* (`ASSUMED_CONTEXT_WINDOW`,今天 131072 token)下阈值 = 39 321 字符,一个中小 MCP 名册够不着 ⇒ 首请求带全 schema。
|
|
16
16
|
* 唯一不受门的是调用方的 `TaskSpec.deferTools` 字面名单(按字面恒延迟、不计量)。
|
|
17
17
|
* - `RunnerDeps.deferMode:"auto"` 不是第二道门,而是把候选集**拓宽**到全部 caller spec 后走同一道门 ——
|
|
18
18
|
* 在本仓缺省场景下那会连 Agent 与 Task 四件一起卷进候选(与 CC 姿态相反),所以我们**刻意不开**;
|
|
@@ -25,7 +25,6 @@ import type { ServiceBlobExchange, ServiceFileHistoryStore } from "./plugins/sto
|
|
|
25
25
|
import { resolveStreamApprovalGate, type ApprovalFrameFamily } from "./tool-approval.js";
|
|
26
26
|
import { type WorkspaceSyncCapability } from "./workspace-space.js";
|
|
27
27
|
import type { WorkspaceCacheCapability } from "./workspace-cache.js";
|
|
28
|
-
import { type HeadRead } from "./session-incarnation.js";
|
|
29
28
|
import type { HistoryAnchorReaders } from "./history-anchor.js";
|
|
30
29
|
import type { EngineHandoverDoor } from "./boot/engine-lease.js";
|
|
31
30
|
/** why 闭集:词 → 给运维看的一句义(诊断 / 测试读它;wire 上的拒句由各门自写)。 */
|
|
@@ -120,29 +119,40 @@ type Store<K extends keyof Deps> = NonNullable<Deps[K]>;
|
|
|
120
119
|
type WithMethods<T, K extends keyof T> = T & {
|
|
121
120
|
[P in K]-?: NonNullable<T[P]>;
|
|
122
121
|
};
|
|
122
|
+
/**
|
|
123
|
+
* 见证里的 run 店 / 会话店 / 会话视图读**随调用方交来的 deps**(`D`):路由层交的是封住的视图(`route-ctx.ts` 的 `RouteDeps`:带属主的读口在型上调不了)⇒ 见证照样封着
|
|
124
|
+
* (方法在不在照判,见证交给属主存取器的口照读);装配层交完整的店 ⇒ 见证完整。事实不另开一扇读口(视图只在 `owner-access.ts` 的 `sealRouteDeps` 铸一次)。
|
|
125
|
+
*/
|
|
126
|
+
type Held<D, K extends keyof D> = NonNullable<D[K]>;
|
|
127
|
+
/** 判过在场的方法(`K`)在见证上必有;封住的读口在场照样封着(`never`)。 */
|
|
128
|
+
type Present<T, K extends PropertyKey> = T & {
|
|
129
|
+
[P in K]-?: NonNullable<P extends keyof T ? T[P] : never>;
|
|
130
|
+
};
|
|
123
131
|
/** 持久 run 账面在场 —— `/v1/runs/*` 族、trace / 用量统计、assistant 的 preempt / resume / plan-review、
|
|
124
132
|
* 会话 detach、设备换绑都站在这一只事实上。 */
|
|
125
|
-
export declare function durableRuns
|
|
126
|
-
runStore:
|
|
133
|
+
export declare function durableRuns<D extends Pick<Deps, "runStore">>(d: D): Fact<"run_store_absent", {
|
|
134
|
+
runStore: Held<D, "runStore">;
|
|
127
135
|
}>;
|
|
128
|
-
export declare function subagentSteer
|
|
129
|
-
runStore:
|
|
136
|
+
export declare function subagentSteer<D extends Pick<Deps, "runStore" | "subagentSteerRegistry">>(d: D): Fact<"run_store_absent" | "subagent_registry_absent", {
|
|
137
|
+
runStore: Held<D, "runStore">;
|
|
130
138
|
registry: Store<"subagentSteerRegistry">;
|
|
131
139
|
}>;
|
|
132
|
-
export declare function subagentOutput
|
|
133
|
-
runStore:
|
|
140
|
+
export declare function subagentOutput<D extends Pick<Deps, "runStore" | "subagentTaskOutput">>(d: D): Fact<"run_store_absent" | "subagent_output_face_absent", {
|
|
141
|
+
runStore: Held<D, "runStore">;
|
|
134
142
|
output: Store<"subagentTaskOutput">;
|
|
135
143
|
}>;
|
|
136
|
-
export declare function taskHandles
|
|
137
|
-
runStore:
|
|
144
|
+
export declare function taskHandles<D extends Pick<Deps, "runStore" | "taskHandleOutput" | "taskHandleStop">>(d: D): Fact<"run_store_absent" | "task_handle_faces_absent", {
|
|
145
|
+
runStore: Held<D, "runStore">;
|
|
138
146
|
output: Store<"taskHandleOutput">;
|
|
139
147
|
stop: Store<"taskHandleStop">;
|
|
140
148
|
}>;
|
|
141
149
|
/** 会话店按 id 读一行的唯一读口在场(core `headOf`:属主 / 住客 / 叶子一次读;「有没有」与 `session-incarnation.ts` 的 `headReadOf` 同判)。 */
|
|
142
|
-
type
|
|
150
|
+
type SessionDeps = Pick<Deps, "sessionStorage">;
|
|
151
|
+
type SessionWith<D extends SessionDeps, K extends PropertyKey> = Present<Held<D, "sessionStorage">, K>;
|
|
152
|
+
type HeadReadingSessionStore<D extends SessionDeps> = SessionWith<D, "headOf">;
|
|
143
153
|
/** 会话属主面在场(入站 owner 门的地基;缺它,带会话的门一律 fail-closed)。属主 = `headOf(id)?.owner`。 */
|
|
144
|
-
export declare function sessionOwnership(d:
|
|
145
|
-
sessionStorage: HeadReadingSessionStore
|
|
154
|
+
export declare function sessionOwnership<D extends SessionDeps>(d: D): Fact<"session_head_face_absent", {
|
|
155
|
+
sessionStorage: HeadReadingSessionStore<D>;
|
|
146
156
|
}>;
|
|
147
157
|
/**
|
|
148
158
|
* 执行放置读面在场:会话店带执行席(`executionPlacement`:一次行读 = 住客 + 执行放置格;SQL 两孪生与 local 恒带,引擎缺省的内存会话店没有)。
|
|
@@ -151,66 +161,62 @@ export declare function sessionOwnership(d: Pick<Deps, "sessionStorage">): Fact<
|
|
|
151
161
|
export declare function executionPlacementRead(d: Pick<Deps, "sessionStorage">): Fact<"execution_placement_seat_absent", {
|
|
152
162
|
seat: NonNullable<OwnerAwareSessionStore["executionPlacement"]>;
|
|
153
163
|
}>;
|
|
154
|
-
export declare function mcpReconnect
|
|
155
|
-
runStore:
|
|
156
|
-
sessionStorage: HeadReadingSessionStore
|
|
164
|
+
export declare function mcpReconnect<D extends Pick<Deps, "runStore" | "sessionStorage">>(d: D): Fact<"run_store_absent" | "session_head_face_absent", {
|
|
165
|
+
runStore: Held<D, "runStore">;
|
|
166
|
+
sessionStorage: HeadReadingSessionStore<D>;
|
|
157
167
|
}>;
|
|
158
168
|
/**
|
|
159
169
|
* 在飞 run 的切档口(`POST /v1/runs/:id/permission-mode`)= 持久 run 账面 ∧ checkpoint 店(ctx 面)。后一格是承重的:切档要读这条 run 的
|
|
160
170
|
* **存储体**(本任务 settings 的 kill-switch 由受理判官折,与提交口同一份事实),也要把准入的词写回存储体(run 模式词的唯一来源,续跑腿读它);
|
|
161
171
|
* 没有 ctx 面的部署两件都做不了 ⇒ 不提供这一口(能力位 `permissionModeWrite` 同读本事实)。
|
|
162
172
|
*/
|
|
163
|
-
export declare function permissionModeWrite
|
|
164
|
-
runStore:
|
|
173
|
+
export declare function permissionModeWrite<D extends Pick<Deps, "runStore" | "checkpointStore">>(d: D): Fact<"run_store_absent" | "checkpoint_store_absent", {
|
|
174
|
+
runStore: Held<D, "runStore">;
|
|
165
175
|
checkpointStore: Store<"checkpointStore">;
|
|
166
176
|
}>;
|
|
167
|
-
export declare function sessionAuditView
|
|
168
|
-
sessionAudit:
|
|
177
|
+
export declare function sessionAuditView<D extends Pick<Deps, "sessionAudit">>(d: D): Fact<"session_audit_absent", {
|
|
178
|
+
sessionAudit: Held<D, "sessionAudit">;
|
|
169
179
|
}>;
|
|
170
180
|
/** 会话 SSE(watch 注册表 ∧ 头读:属主门与叶子都是 `headOf` 的投影)。 */
|
|
171
|
-
export declare function sessionEventStream
|
|
181
|
+
export declare function sessionEventStream<D extends Pick<Deps, "sessionWatch" | "sessionStorage">>(d: D): Fact<"session_watch_absent" | "session_head_face_absent", {
|
|
172
182
|
watch: Store<"sessionWatch">;
|
|
173
|
-
sessionStorage: HeadReadingSessionStore
|
|
183
|
+
sessionStorage: HeadReadingSessionStore<D>;
|
|
174
184
|
}>;
|
|
175
185
|
type SessionLister = NonNullable<OwnerAwareSessionStore["listSessions"]>;
|
|
176
186
|
/** 会话枚举面:会话店的 `listSessions` —— 唯一的会话 lister(run 店不列会话:只有 run 行、没有会话行的面答不了「有哪些会话」)。见证 = 已绑好宿主的那一只。 */
|
|
177
187
|
export declare function sessionList(d: Pick<Deps, "sessionStorage">): Fact<"session_lister_absent", {
|
|
178
188
|
lister: SessionLister;
|
|
179
189
|
}>;
|
|
180
|
-
export declare function sessionFork(d:
|
|
181
|
-
sessionStorage:
|
|
190
|
+
export declare function sessionFork<D extends SessionDeps>(d: D): Fact<"session_fork_face_absent" | "session_head_face_absent", {
|
|
191
|
+
sessionStorage: SessionWith<D, "headOf" | "fork">;
|
|
182
192
|
}>;
|
|
183
193
|
/** 会话行可写位(`PATCH /v1/sessions/:id`):会话店的头读(属主 + 化身一次读 —— 门判属主,那一读就是写原语的行期望)∧ 行格写原语(锁内判、提交后另读应答行)。
|
|
184
194
|
* 三只 durable 店(SQL 双生 / local)都带;内存 dev 店没有行写口 ⇒ 501。
|
|
185
195
|
* 本面**没有**独立能力位(契约附录 B.2c 登记):老 worker 对这一动词答 405,本事实为假的部署答 501;条件写也没有 —— 列表行上有 `rowTag` 即支持。 */
|
|
186
|
-
export declare function sessionPatch(d:
|
|
187
|
-
sessionStorage:
|
|
196
|
+
export declare function sessionPatch<D extends SessionDeps>(d: D): Fact<"session_row_faces_absent", {
|
|
197
|
+
sessionStorage: SessionWith<D, "headOf" | "writeSessionRowCells">;
|
|
188
198
|
}>;
|
|
189
|
-
/** 删除门读的会话店视图:按 id 读 = 删除门那一只头读,行格的 placement 问询 = 店自己的那一只。门照旧由属主存取器读头(`admitSessionById`),读的就是这一只。 */
|
|
190
|
-
type DeletionGateStore = Pick<OwnerAwareSessionStore, "placementOf"> & {
|
|
191
|
-
readonly headOf: HeadRead;
|
|
192
|
-
};
|
|
193
199
|
/**
|
|
194
|
-
* 会话删除面(purge 协调器 ∧
|
|
195
|
-
*
|
|
200
|
+
* 会话删除面(purge 协调器 ∧ 会话店的头读)。见证 = 协调器 + 判过头读在场的会话店;删除门读哪一只头(删到一半的行也答得出属主的那一只,与协调器围栏读同一只)
|
|
201
|
+
* 只由属主存取器的删除口判(`owner-access.ts` 的 `admitSessionForDeletion`)。
|
|
196
202
|
*/
|
|
197
|
-
export declare function sessionDelete
|
|
203
|
+
export declare function sessionDelete<D extends Pick<Deps, "purgeSession" | "sessionStorage">>(d: D): Fact<"session_purge_absent" | "session_head_face_absent", {
|
|
198
204
|
purge: Store<"purgeSession">;
|
|
199
|
-
|
|
205
|
+
sessionStorage: HeadReadingSessionStore<D>;
|
|
200
206
|
}>;
|
|
201
|
-
export declare function sessionPolicy
|
|
207
|
+
export declare function sessionPolicy<D extends Pick<Deps, "sessionPolicyStore" | "sessionStorage">>(d: D): Fact<"session_policy_store_absent" | "session_head_face_absent", {
|
|
202
208
|
policyStore: Store<"sessionPolicyStore">;
|
|
203
|
-
sessionStorage: HeadReadingSessionStore
|
|
209
|
+
sessionStorage: HeadReadingSessionStore<D>;
|
|
204
210
|
}>;
|
|
205
|
-
type SyncSessionStore =
|
|
211
|
+
type SyncSessionStore<D extends SessionDeps> = SessionWith<D, "exportEntries" | "exportEntriesStream" | "beginImportStaging" | "headOf" | "sessionSummaryOf" | "writeSessionRowCells">;
|
|
206
212
|
type SessionSyncWhy = "store_backend_absent" | "file_history_store_absent" | "session_export_absent" | "session_import_staging_absent" | "session_row_faces_absent" | "policy_purge_absent";
|
|
207
213
|
/** 会话对等同步的**对话半族**(manifest / entries / plan / import 两相):后端 ∧ 文件历史店 ∧ 导出两面 ∧ staged 导入面 ∧
|
|
208
214
|
* 会话行三口(门读头 `headOf` —— 属主 + 化身一次读,属主判门、化身给 identical 短路腿;manifest 带 `title` / `pinned`;导入经行格写原语以 `replay` 写者
|
|
209
215
|
* 按导入落定的那一位住客重放它们)∧ policy 店能清(overwrite-dst 的 commit 要擦目的端旧 policy 行)。
|
|
210
216
|
* 文件历史的 blob 搬运是另一只事实。 */
|
|
211
|
-
export declare function sessionSync
|
|
212
|
-
backend:
|
|
213
|
-
sessionStorage: SyncSessionStore
|
|
217
|
+
export declare function sessionSync<D extends Pick<Deps, "backend" | "sessionStorage" | "fileHistoryStore" | "sessionPolicyStore">>(d: D): Fact<SessionSyncWhy, {
|
|
218
|
+
backend: Held<D, "backend">;
|
|
219
|
+
sessionStorage: SyncSessionStore<D>;
|
|
214
220
|
historyStore: ServiceFileHistoryStore;
|
|
215
221
|
}>;
|
|
216
222
|
/** 会话同步的**文件历史半族**:对话半族 ∧ 文件历史店带 blob 交换组(只有 SQL 两只店有)。「店能不能交换 blob」只在 `blobExchangeOf` 判一次(core 判官),
|
|
@@ -231,10 +237,12 @@ type RewindFilesWhy = "file_history_store_absent" | "session_head_face_absent" |
|
|
|
231
237
|
* 动词本身是引擎 `Runner` 的必有成员(型上必在),不是一格。
|
|
232
238
|
* 见证 = 判过在场的设施(历史店 · 手柄翻译的两只读店 · 会话店);路由在拒臂之后只读见证。
|
|
233
239
|
*/
|
|
234
|
-
export declare function sessionRewindFiles
|
|
240
|
+
export declare function sessionRewindFiles<D extends Pick<Deps, "fileHistoryStore" | "resumeAnchorStore" | "runStore" | "sessionStorage" | "config" | "backend">>(d: D): Fact<RewindFilesWhy, {
|
|
235
241
|
historyStore: ServiceFileHistoryStore;
|
|
236
|
-
anchors: HistoryAnchorReaders
|
|
237
|
-
|
|
242
|
+
anchors: HistoryAnchorReaders & {
|
|
243
|
+
readonly runs: Held<D, "runStore">;
|
|
244
|
+
};
|
|
245
|
+
sessionStorage: HeadReadingSessionStore<D>;
|
|
238
246
|
}>;
|
|
239
247
|
/**
|
|
240
248
|
* 同一口的 `dryRun` **带不带改动统计** —— 能力位 `sessionRewindFilesPreview`。= 立即回退可用 ∧ 店实现了 core 契约的可选座 `diffStats`
|
|
@@ -291,11 +299,11 @@ export declare function deviceLane(d: Pick<Deps, "deviceHub">): Fact<"device_hub
|
|
|
291
299
|
hub: Store<"deviceHub">;
|
|
292
300
|
}>;
|
|
293
301
|
/** 设备管理三动词(列 / 读 / 换绑):hub ∧ 设备店 ∧ 入网 ∧ 持久 run 账面(换绑的「无在飞 run」门要它)。 */
|
|
294
|
-
export declare function deviceManagement
|
|
302
|
+
export declare function deviceManagement<D extends Pick<Deps, "deviceHub" | "deviceStore" | "deviceEnrollment" | "runStore">>(d: D): Fact<"device_hub_absent" | "device_store_absent" | "device_enrollment_absent" | "run_store_absent", {
|
|
295
303
|
hub: Store<"deviceHub">;
|
|
296
304
|
store: Store<"deviceStore">;
|
|
297
305
|
enrollment: Store<"deviceEnrollment">;
|
|
298
|
-
runStore:
|
|
306
|
+
runStore: Held<D, "runStore">;
|
|
299
307
|
}>;
|
|
300
308
|
export declare function fleetStream(d: Pick<Deps, "fleetBus">): Fact<"fleet_bus_absent", {
|
|
301
309
|
fleetBus: Store<"fleetBus">;
|
|
@@ -344,10 +352,10 @@ export declare function memorySyncServe(d: Pick<Deps, "memorySync" | "config">):
|
|
|
344
352
|
* 会话记忆同步触发口(`POST /v1/sessions/:id/memory/sync`):本机同步腿在场 ∧ 持久 run 账面(读集 = 会话最近一条已结腿的记忆观测;收割栅栏读会话的 run 认领)
|
|
345
353
|
* ∧ 会话头读(属主门与 `sourceRevision` = 同一次头读的叶子)。
|
|
346
354
|
*/
|
|
347
|
-
export declare function sessionMemorySync
|
|
355
|
+
export declare function sessionMemorySync<D extends Pick<Deps, "memorySyncLeg" | "runStore" | "sessionStorage">>(d: D): Fact<"memory_sync_leg_absent" | "run_store_absent" | "session_head_face_absent", {
|
|
348
356
|
leg: Store<"memorySyncLeg">;
|
|
349
|
-
runStore:
|
|
350
|
-
sessionStorage: HeadReadingSessionStore
|
|
357
|
+
runStore: Held<D, "runStore">;
|
|
358
|
+
sessionStorage: HeadReadingSessionStore<D>;
|
|
351
359
|
}>;
|
|
352
360
|
/** 跨主体投递门在座(`POST /v1/principal-inbox/messages` 的可用性门与能力位 `principalInboxDelivery` 同读这一只)。门的装配本身是
|
|
353
361
|
* 一道合取(收件箱消费方声明 ∧ 耐久 mailbox ∧ org 成员目录 ∧ 配额店,缺一拒启 —— `boot/stage-06-runners.ts`),
|
|
@@ -368,20 +376,21 @@ export declare function engineHandover(d: Pick<Deps, "drainState">): Fact<"engin
|
|
|
368
376
|
export declare function operatorLane(d: {
|
|
369
377
|
readonly config: Pick<ServiceConfig, "operatorPrincipals" | "operatorSingleUser">;
|
|
370
378
|
}): Fact<"operator_principals_empty">;
|
|
371
|
-
|
|
379
|
+
/** 带收编日志的后端(见证随调用方的 deps:路由层的后端视图上店工厂照样封着)。 */
|
|
380
|
+
type AdoptionCapableBackend<D extends Pick<Deps, "backend">> = Held<D, "backend"> & {
|
|
372
381
|
adoptionLog(): ReturnType<NonNullable<Store<"backend">["adoptionLog"]>>;
|
|
373
382
|
};
|
|
374
|
-
export declare function adoption
|
|
375
|
-
backend: AdoptionCapableBackend
|
|
383
|
+
export declare function adoption<D extends Pick<Deps, "config" | "backend">>(d: D): Fact<"operator_principals_empty" | "adoption_store_absent", {
|
|
384
|
+
backend: AdoptionCapableBackend<D>;
|
|
376
385
|
}>;
|
|
377
|
-
type AdoptionImportSessionStore =
|
|
386
|
+
type AdoptionImportSessionStore<D extends SessionDeps> = SessionWith<D, "beginImportStaging">;
|
|
378
387
|
/**
|
|
379
388
|
* 收编批量导入(`POST /v1/adoption/:id/sessions`)与能力位 `adoptionImport` 的部署半:收编日志 ∧ 会话店的暂存导入面(派生 id 那一格占没占由提交的属主判答,不另要头读面)。
|
|
380
389
|
* **不判运维名册**:这扇门不是 operator 面 —— 调用者是那条收编行的源主体本人(名单空了,已收编的行照样在)。
|
|
381
390
|
*/
|
|
382
|
-
export declare function adoptionSessionImport
|
|
383
|
-
backend: AdoptionCapableBackend
|
|
384
|
-
sessionStorage: AdoptionImportSessionStore
|
|
391
|
+
export declare function adoptionSessionImport<D extends Pick<Deps, "backend" | "sessionStorage">>(d: D): Fact<"adoption_store_absent" | "session_import_staging_absent", {
|
|
392
|
+
backend: AdoptionCapableBackend<D>;
|
|
393
|
+
sessionStorage: AdoptionImportSessionStore<D>;
|
|
385
394
|
}>;
|
|
386
395
|
export declare function memoryBundle(d: Pick<Deps, "config" | "memoryBundleExport" | "memoryBundleImport">): Fact<"operator_principals_empty" | "memory_bundle_faces_absent", {
|
|
387
396
|
exportScopes: Store<"memoryBundleExport">;
|
|
@@ -417,9 +426,9 @@ export declare function ruleLaneForCaller(d: Pick<Deps, "ruleConsent">, principa
|
|
|
417
426
|
export declare function mcpInjection(d: Pick<Deps, "config">): Fact<"caller_mcp_injection_refused">;
|
|
418
427
|
/** server-as-peer:旋钮开 ∧ 持久 run 账面在场。两只 JSON-RPC 方法(`message/send` / `tasks/get`)都要 run 店 ——
|
|
419
428
|
* 没有它,这个 peer 什么都做不了,对外就不该存在(卡与 RPC 一起 404)。 */
|
|
420
|
-
export declare function a2aServe
|
|
429
|
+
export declare function a2aServe<D extends Pick<Deps, "config" | "runStore">>(d: D): Fact<"a2a_serve_off" | "run_store_absent", {
|
|
421
430
|
serve: NonNullable<ServiceConfig["a2aServe"]>;
|
|
422
|
-
runStore:
|
|
431
|
+
runStore: Held<D, "runStore">;
|
|
423
432
|
}>;
|
|
424
433
|
/** 引擎能不能自编排(core 单源 `workflowsCapability`,boot 算好经 `workflowsCapable` 递来;缺席回落行店代理)。 */
|
|
425
434
|
export declare function selfOrchestrationEngine(d: Pick<Deps, "workflowsCapable" | "workflowRunStore">): Fact<"workflow_engine_absent">;
|
|
@@ -473,10 +482,11 @@ export declare function deploymentModPackages(d: Pick<Deps, "deploymentModPackag
|
|
|
473
482
|
export declare function hostScheduler(c: Pick<ServiceConfig, "schedulerEnabled" | "requirePrincipal" | "remoteExec">): Fact<"scheduler_disabled" | "multi_tenant_deployment" | "not_host_lane">;
|
|
474
483
|
/**
|
|
475
484
|
* 前台命令超时转后台(`AUTO_BACKGROUND_ON_TIMEOUT`)在这台部署上生不生效:旋钮开 ∧ 本车道的执行环境能把**运行中的**命令领养成后台任务。
|
|
476
|
-
* 「能领养」就是执行环境的 `backgroundCapabilities.supportsDetach`,三只声明它的适配器(host / k8s / e2b)上它与后台 shell 的 `supported`
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
485
|
+
* 「能领养」就是执行环境的 `backgroundCapabilities.supportsDetach`,三只声明它的适配器(host / k8s / e2b)上它与后台 shell 的 `supported` 是同一个值,
|
|
486
|
+
* 这个值的**唯一**答者是部署形行 `DEPLOYMENT_SHAPE_PREDICATES.backgroundShell`(读能力表那一位:k8s / e2b 任何租户,host 只单主)—— 适配器与本事实读同一行,
|
|
487
|
+
* 本事实不再自己读能力表的三档。host 另有一个全局关停开关(`HOST_BG_ENABLED`),是旋钮不是部署形,所以只在 host 车道上、在行之上合取:
|
|
488
|
+
* 开关是第二参 `hostBackgroundShellOn`,调用方交 `hostBackgroundShellEnabled()`(host 适配器的能力位读同一只;本模块零 I/O,不自己读 env)。
|
|
489
|
+
* 同读钉 `test/auto-background-on-timeout.test.ts` ③ 逐车道 × 单主 / 多租拿装配出的真执行环境的 `supported` / `supportsDetach` 与本事实、行对读。
|
|
480
490
|
* 旋钮先判:关着的部署不论车道都答 `auto_background_off`(运维旋钮无条件,不支持的车道不拒启,只如实报)。
|
|
481
491
|
* `/health.autoBackgroundOnTimeout` 投它的三词({@link autoBackgroundOnTimeoutWord})。
|
|
482
492
|
*/
|