@sema-agent/server 7.134.0 → 7.135.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 +134 -0
- package/USAGE.md +98 -30
- package/dist/adoption/plan.d.ts +1 -1
- package/dist/approval-ask-audit-store.d.ts +24 -24
- package/dist/approval-ask-machine.d.ts +2 -2
- package/dist/approval-card.d.ts +62 -150
- package/dist/approval-card.js +33 -51
- package/dist/approval-content-kind.d.ts +22 -5
- package/dist/approval-content-kind.js +8 -1
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval-gate-currency.d.ts +22 -3
- package/dist/approval-gate-currency.js +44 -18
- package/dist/approval-hmac.d.ts +7 -7
- package/dist/approval-policy-settlement.d.ts +2 -2
- package/dist/approval-reconciler.d.ts +3 -3
- package/dist/approval.d.ts +8 -8
- package/dist/approval.js +4 -2
- package/dist/auth-bridge.d.ts +1 -1
- package/dist/auto-mode-face.d.ts +4 -4
- package/dist/background-session-reap.d.ts +2 -2
- package/dist/bake-runner/main.d.ts +2 -2
- package/dist/bake-runner/runner.d.ts +4 -4
- package/dist/bench/s1/live-deps.d.ts +1 -1
- package/dist/bench/s1/run-firm.d.ts +1 -1
- package/dist/boot/coordinators.d.ts +2 -2
- package/dist/boot/coordinators.js +2 -2
- package/dist/boot/deferred-sandbox-path-env.d.ts +0 -6
- package/dist/boot/deferred-sandbox-path-env.js +0 -5
- package/dist/boot/engine-lease.d.ts +5 -5
- package/dist/boot/execution-env.d.ts +16 -15
- package/dist/boot/execution-env.js +19 -21
- package/dist/boot/fatal-exit.d.ts +2 -2
- package/dist/boot/late-binds.d.ts +1 -1
- package/dist/boot/leader.d.ts +1 -1
- package/dist/boot/memory-boundary.d.ts +2 -2
- package/dist/boot/memory-consolidation.d.ts +15 -15
- package/dist/boot/parked-revive-gate.d.ts +3 -3
- package/dist/boot/parked-revive-gate.js +3 -2
- package/dist/boot/reapers.d.ts +4 -4
- package/dist/boot/resolve-spec.d.ts +1 -1
- package/dist/boot/resolve-spec.js +28 -24
- package/dist/boot/runner-deps.d.ts +11 -11
- package/dist/boot/runner-deps.js +3 -2
- package/dist/boot/session-faces.d.ts +3 -3
- package/dist/boot/session-faces.js +11 -30
- package/dist/boot/shutdown.d.ts +5 -5
- package/dist/boot/side-query-lane.d.ts +2 -2
- package/dist/boot/stage-05-execution-env.js +4 -4
- package/dist/boot/stage-06-runners.js +0 -2
- package/dist/boot/stores.js +2 -1
- package/dist/boot/web-admin.d.ts +17 -17
- package/dist/boot/web-admin.js +5 -10
- package/dist/boot/workflow-orchestration.js +2 -9
- package/dist/brain.d.ts +11 -11
- package/dist/budget.d.ts +4 -4
- package/dist/capabilities/approvals-push.d.ts +4 -4
- package/dist/capabilities/builtin-tools.d.ts +5 -5
- package/dist/capabilities/center-plugins.d.ts +5 -5
- package/dist/capabilities/center-plugins.js +1 -1
- package/dist/capabilities/center-prompts.d.ts +1 -1
- package/dist/capabilities/center-wiring.d.ts +1 -1
- package/dist/capabilities/composite-members.d.ts +1 -1
- package/dist/capabilities/execution-lane.d.ts +5 -5
- package/dist/capabilities/execution-lane.js +2 -2
- package/dist/capabilities/hands-lane.d.ts +5 -5
- package/dist/capabilities/mcp-probe.d.ts +10 -7
- package/dist/capabilities/sandbox-file-send.d.ts +1 -18
- package/dist/capabilities/sandbox-file-send.js +0 -7
- package/dist/capabilities/scenarios.d.ts +28 -10
- package/dist/capabilities/scenarios.js +15 -5
- package/dist/capabilities/send-user-file-tool.d.ts +1 -1
- package/dist/capabilities/skills.d.ts +31 -12
- package/dist/capabilities/skills.js +23 -17
- package/dist/capabilities/tool-defer.d.ts +1 -1
- package/dist/capability-facts.d.ts +26 -25
- package/dist/capability-facts.js +14 -16
- package/dist/center-config-tier.d.ts +1 -1
- package/dist/center-credential.d.ts +4 -4
- package/dist/checkpoint-identity.d.ts +5 -0
- package/dist/checkpoint-identity.js +14 -0
- package/dist/config-catalog.d.ts +12 -12
- package/dist/config-invariants.d.ts +4 -4
- package/dist/config-invariants.js +3 -2
- package/dist/config-lkg.d.ts +1 -1
- package/dist/config-provider.d.ts +13 -13
- package/dist/config-provider.js +2 -1
- package/dist/config-types.d.ts +83 -83
- package/dist/config.d.ts +26 -24
- package/dist/config.js +12 -10
- package/dist/cross-session-settings.d.ts +1 -1
- package/dist/delegated-session-owner.d.ts +16 -13
- package/dist/delegated-session-owner.js +9 -10
- package/dist/deployment-governance.d.ts +16 -16
- package/dist/deployment-shape.d.ts +127 -0
- package/dist/deployment-shape.js +72 -0
- package/dist/device-store.d.ts +1 -1
- package/dist/device-ws-hub.d.ts +1 -1
- package/dist/egress-redirect.d.ts +1 -1
- package/dist/entry-mode-clamp-notice.d.ts +2 -2
- package/dist/env-facts.d.ts +10 -9
- package/dist/env-facts.js +1 -1
- package/dist/env-name-allowlist-knobs.d.ts +5 -5
- package/dist/exec-bounds.d.ts +2 -2
- package/dist/execution-lane-caps.d.ts +31 -43
- package/dist/execution-lane-caps.js +0 -13
- package/dist/file-history-capture.d.ts +9 -9
- package/dist/file-history-disclosure.d.ts +23 -11
- package/dist/file-history-disclosure.js +7 -12
- package/dist/fleet/drain-entry.d.ts +2 -2
- package/dist/fleet/fleet-bus.d.ts +22 -14
- package/dist/fleet/fleet-bus.js +5 -5
- package/dist/fleet/fleet-reconciler.d.ts +9 -9
- package/dist/fleet/subagent-tail-bus.d.ts +4 -4
- package/dist/fleet-client.d.ts +13 -13
- package/dist/fleet-lease.d.ts +16 -16
- package/dist/governance-http-status.d.ts +2 -2
- package/dist/hooks/hook-llm.d.ts +7 -7
- package/dist/hooks/hook-runner.d.ts +57 -30
- package/dist/hooks/hook-runner.js +36 -18
- package/dist/host-decision.d.ts +5 -5
- package/dist/host-lsp-manager.d.ts +5 -5
- package/dist/hosted-posture.d.ts +23 -13
- package/dist/hosted-posture.js +4 -9
- package/dist/http/admission.d.ts +2 -2
- package/dist/http/admission.js +20 -5
- package/dist/http/approval-sweeps.d.ts +1 -1
- package/dist/http/approval-sweeps.js +2 -1
- package/dist/http/checkpoint-ctx.d.ts +39 -13
- package/dist/http/checkpoint-ctx.js +74 -35
- package/dist/http/dispatch.d.ts +3 -3
- package/dist/http/durable-run-leg.js +4 -3
- package/dist/http/idempotency.d.ts +2 -2
- package/dist/http/mcp-dial-deadline.d.ts +7 -5
- package/dist/http/memory-compliance-failure-reply.d.ts +4 -4
- package/dist/http/owner-access.d.ts +4 -6
- package/dist/http/owner-access.js +1 -1
- package/dist/http/principal-gate.d.ts +7 -7
- package/dist/http/principal-gate.js +3 -2
- package/dist/http/readiness.d.ts +1 -1
- package/dist/http/request-guards.d.ts +4 -4
- package/dist/http/request-guards.js +2 -1
- package/dist/http/resume-ctx-read.d.ts +7 -7
- package/dist/http/resume-ctx-read.js +1 -1
- package/dist/http/resume-legs.d.ts +3 -3
- package/dist/http/resume-legs.js +11 -8
- package/dist/http/route-ctx.d.ts +29 -29
- package/dist/http/route-table.d.ts +9 -9
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/approvals-assistant.d.ts +5 -5
- package/dist/http/routes/approvals-assistant.js +55 -15
- package/dist/http/routes/background.d.ts +3 -3
- package/dist/http/routes/background.js +2 -2
- package/dist/http/routes/capabilities.d.ts +1 -1
- package/dist/http/routes/capabilities.js +16 -8
- package/dist/http/routes/config-catalog.d.ts +1 -1
- package/dist/http/routes/devices.d.ts +1 -1
- package/dist/http/routes/diagnostics.d.ts +3 -3
- package/dist/http/routes/fleet.d.ts +1 -1
- package/dist/http/routes/fleet.js +2 -1
- package/dist/http/routes/mcp-reconnect.d.ts +4 -4
- package/dist/http/routes/mcp-reconnect.js +3 -3
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/notify-wake.d.ts +1 -1
- package/dist/http/routes/notify-wake.js +2 -2
- package/dist/http/routes/rules.d.ts +1 -1
- package/dist/http/routes/runs.js +22 -10
- package/dist/http/routes/session-sync.d.ts +1 -1
- package/dist/http/routes/session-sync.js +73 -44
- package/dist/http/routes/sessions-list.js +1 -1
- package/dist/http/routes/sessions.js +30 -44
- package/dist/http/routes/tasks.d.ts +1 -1
- package/dist/http/routes/trace-usage.d.ts +1 -1
- package/dist/http/routes/workflows.d.ts +3 -0
- package/dist/http/routes/workflows.js +31 -28
- package/dist/http/send.d.ts +5 -5
- package/dist/http/server.d.ts +34 -34
- package/dist/http/session-inherit-env.d.ts +3 -3
- package/dist/http/sse-lifecycle.d.ts +1 -1
- package/dist/http/sse-log.d.ts +2 -2
- package/dist/http/submit-ctx.js +1 -1
- package/dist/http/sync-submit-body.d.ts +1 -1
- package/dist/http/verify-rounds.d.ts +1 -1
- package/dist/http/wire-types.d.ts +28 -21
- package/dist/instruction-source-notice.d.ts +2 -2
- package/dist/key-resolver.d.ts +3 -3
- package/dist/lane-home-probe.d.ts +1 -1
- package/dist/leader/diffout.d.ts +1 -1
- package/dist/leader/diffup.d.ts +2 -2
- package/dist/leader/endpoint.d.ts +1 -1
- package/dist/leader/fanout.d.ts +1 -1
- package/dist/leader/leader.d.ts +4 -4
- package/dist/leader/merge.d.ts +3 -3
- package/dist/leader/repair-wire.d.ts +1 -1
- package/dist/leader/wire.d.ts +6 -6
- package/dist/list-entry-display.d.ts +1 -1
- package/dist/lsp-evict.d.ts +1 -1
- package/dist/mcp-assertion-header.d.ts +1 -1
- package/dist/memory-layer-legacy-lock.d.ts +1 -1
- package/dist/memory-operator-faces.d.ts +1 -1
- package/dist/memory-posture.js +4 -2
- package/dist/memory-project-layer.d.ts +1 -1
- package/dist/memory-scope.d.ts +19 -19
- package/dist/memory-store-refusal.d.ts +4 -4
- package/dist/model-entry-headers.d.ts +2 -2
- package/dist/model-entry-refusal.d.ts +17 -17
- package/dist/model-provider.d.ts +10 -10
- package/dist/model-reach-scope.d.ts +1 -1
- package/dist/model-route-endpoint.d.ts +6 -6
- package/dist/model-route-url.d.ts +5 -5
- package/dist/model-select.d.ts +15 -6
- package/dist/model-select.js +5 -0
- package/dist/model-unreachable-notice.d.ts +3 -3
- package/dist/namespaced-rule-name.d.ts +15 -5
- package/dist/namespaced-rule-name.js +3 -2
- package/dist/observability/corrupt-read-seat.d.ts +9 -9
- package/dist/observability/cost-taxonomy.d.ts +1 -1
- package/dist/observability/err-text.d.ts +1 -1
- package/dist/observability/fail-open.d.ts +12 -8
- package/dist/observability/fail-open.js +12 -8
- package/dist/observability/metrics.d.ts +3 -3
- package/dist/observability/run-terminal.d.ts +36 -36
- package/dist/observability/secret-env-scrub.d.ts +3 -3
- package/dist/observability/tool-trace.d.ts +1 -1
- package/dist/operator-ask.d.ts +4 -4
- package/dist/orchestration/workflow-agent-session-index.d.ts +3 -3
- package/dist/orchestration/workflow-completion-inbox.d.ts +20 -5
- package/dist/orchestration/workflow-completion-inbox.js +29 -7
- package/dist/orchestration/workflow-notify-journal.d.ts +43 -19
- package/dist/orchestration/workflow-notify-journal.js +17 -0
- package/dist/outbound-dispatcher.d.ts +4 -4
- package/dist/parent-watch.d.ts +4 -4
- package/dist/parked-decide.d.ts +16 -15
- package/dist/parked-decide.js +5 -4
- package/dist/parked-revive-surface.d.ts +7 -7
- package/dist/parked-revive-surface.js +2 -3
- package/dist/peer-directory.d.ts +3 -3
- package/dist/peer-directory.js +1 -1
- package/dist/permission-rule-list.d.ts +10 -1
- package/dist/permission-rule-list.js +7 -5
- package/dist/permission-rule-vocab.d.ts +2 -2
- package/dist/plugins/adoption-log-sql.d.ts +1 -1
- package/dist/plugins/approval-ask-store-file.d.ts +8 -1
- package/dist/plugins/approval-ask-store-file.js +6 -3
- package/dist/plugins/approval-ask-store-memory.d.ts +11 -7
- package/dist/plugins/approval-ask-store-memory.js +11 -7
- package/dist/plugins/approval-ask-store-sql.d.ts +34 -15
- package/dist/plugins/approval-ask-store-sql.js +18 -5
- package/dist/plugins/approval-exemption-store.d.ts +3 -3
- package/dist/plugins/approval-nonce-store.d.ts +3 -3
- package/dist/plugins/background-agent-store-sql.d.ts +1 -1
- package/dist/plugins/background-shell-support.d.ts +2 -2
- package/dist/plugins/blob-backend.d.ts +1 -1
- package/dist/plugins/caching-session-store.d.ts +23 -32
- package/dist/plugins/caching-session-store.js +5 -17
- package/dist/plugins/checkpoint-index-columns.d.ts +81 -0
- package/dist/plugins/checkpoint-index-columns.js +62 -0
- package/dist/plugins/checkpoint-store-sql.d.ts +44 -66
- package/dist/plugins/checkpoint-store-sql.js +55 -102
- package/dist/plugins/device-store-sql.d.ts +7 -6
- package/dist/plugins/e2b-orphan-reclaim.d.ts +1 -1
- package/dist/plugins/ensure-schema-lock-policy.d.ts +1 -1
- package/dist/plugins/file-history-store-sql.d.ts +9 -7
- package/dist/plugins/file-history-store-sql.js +27 -15
- package/dist/plugins/file-run-store.d.ts +8 -8
- package/dist/plugins/fork-routing-session-store.d.ts +2 -2
- package/dist/plugins/fork-routing-session-store.js +1 -1
- package/dist/plugins/host-platform.d.ts +10 -10
- package/dist/plugins/image-bake-store-sql.d.ts +1 -1
- package/dist/plugins/image-index-sql.d.ts +1 -1
- package/dist/plugins/leader-run-store-sql.d.ts +1 -1
- package/dist/plugins/local-checkpoint-store.d.ts +10 -10
- package/dist/plugins/local-checkpoint-store.js +3 -4
- package/dist/plugins/local-session-store.d.ts +34 -38
- package/dist/plugins/local-session-store.js +20 -39
- package/dist/plugins/local-session-window.d.ts +1 -1
- package/dist/plugins/mailbox-store-sql.d.ts +2 -2
- package/dist/plugins/memory-engine-pg.d.ts +1 -1
- package/dist/plugins/memory-run-store.d.ts +4 -4
- package/dist/plugins/memory-sync-store-pg.d.ts +3 -3
- package/dist/plugins/one-time-migrations.d.ts +66 -40
- package/dist/plugins/one-time-migrations.js +115 -34
- package/dist/plugins/outcome-ledger-sql.d.ts +1 -1
- package/dist/plugins/park-commit-watch.d.ts +3 -3
- package/dist/plugins/permission-rule-store-file.d.ts +5 -5
- package/dist/plugins/permission-rule-store-file.js +12 -19
- package/dist/plugins/permission-rule-store-sql.d.ts +38 -4
- package/dist/plugins/permission-rule-store-sql.js +67 -24
- package/dist/plugins/pg-cost-quota.d.ts +1 -1
- package/dist/plugins/pg-pool.d.ts +2 -2
- package/dist/plugins/pg-pool.js +5 -2
- package/dist/plugins/pg-rate-limiter.d.ts +1 -1
- package/dist/plugins/pg-session-storage.d.ts +8 -20
- package/dist/plugins/pg-session-storage.js +14 -27
- package/dist/plugins/remote-env-adb.d.ts +10 -10
- package/dist/plugins/remote-env-device.d.ts +10 -9
- package/dist/plugins/remote-env-device.js +6 -2
- package/dist/plugins/remote-env-e2b.d.ts +3 -3
- package/dist/plugins/remote-env-host.d.ts +16 -16
- package/dist/plugins/remote-env-k8s.d.ts +8 -8
- package/dist/plugins/remote-env-local-docker.d.ts +2 -2
- package/dist/plugins/remote-env-ssh.d.ts +4 -4
- package/dist/plugins/remote-scratchpad.d.ts +2 -3
- package/dist/plugins/remote-scratchpad.js +0 -4
- package/dist/plugins/remote-shell.d.ts +6 -6
- package/dist/plugins/retention-lane-store-sql.d.ts +4 -4
- package/dist/plugins/retention-store-sql.d.ts +4 -4
- package/dist/plugins/roster-store-sql.d.ts +1 -1
- package/dist/plugins/run-store-sql.d.ts +8 -8
- package/dist/plugins/schema-consistency.d.ts +2 -2
- package/dist/plugins/schema-ensure-legs.d.ts +3 -3
- package/dist/plugins/schema-indexes.d.ts +1 -1
- package/dist/plugins/schema-live-columns.d.ts +1 -1
- package/dist/plugins/session-event-payload.d.ts +4 -4
- package/dist/plugins/session-fork.d.ts +34 -0
- package/dist/plugins/session-fork.js +29 -0
- package/dist/plugins/session-ownership.js +1 -1
- package/dist/plugins/session-placement.d.ts +1 -1
- package/dist/plugins/session-policy-store-sql.d.ts +12 -12
- package/dist/plugins/session-store.d.ts +2 -2
- package/dist/plugins/session-store.js +2 -2
- package/dist/plugins/shared-memory-store-sql.d.ts +2 -2
- package/dist/plugins/sql-driver.d.ts +8 -8
- package/dist/plugins/sql-errors.d.ts +1 -1
- package/dist/plugins/sql-json-column.d.ts +21 -21
- package/dist/plugins/sql-row-helpers.d.ts +2 -2
- package/dist/plugins/store-backend.d.ts +17 -16
- package/dist/plugins/store-backend.js +3 -3
- package/dist/plugins/store-contracts.d.ts +21 -21
- package/dist/plugins/task-attachment-store.d.ts +2 -2
- package/dist/plugins/task-list-store-sql.d.ts +1 -1
- package/dist/plugins/tidb-pool.d.ts +2 -2
- package/dist/plugins/tidb-pool.js +9 -2
- package/dist/plugins/tidb-session-store.d.ts +16 -26
- package/dist/plugins/tidb-session-store.js +15 -27
- package/dist/plugins/tool-result-store-sql.d.ts +1 -1
- package/dist/plugins/usage-window-store-sql.d.ts +3 -3
- package/dist/plugins/user-input-ledger-file.d.ts +1 -1
- package/dist/plugins/user-input-ledger-sql.d.ts +3 -3
- package/dist/plugins/web-search.d.ts +19 -5
- package/dist/plugins/web-search.js +19 -4
- package/dist/{orchestration/workflow-journal-entry.d.ts → plugins/workflow-journal-payload.d.ts} +23 -32
- package/dist/plugins/workflow-journal-payload.js +32 -0
- package/dist/plugins/workflow-journal-store-sql.d.ts +28 -14
- package/dist/plugins/workflow-journal-store-sql.js +34 -15
- package/dist/plugins/workflow-run-store-sql.d.ts +4 -4
- package/dist/posture-source.d.ts +11 -11
- package/dist/principal-jwt.d.ts +6 -6
- package/dist/project-identity.d.ts +3 -3
- package/dist/project-memory.d.ts +4 -4
- package/dist/read-face-posture.d.ts +7 -7
- package/dist/request-key-closure.d.ts +1 -1
- package/dist/request-key-closure.js +1 -1
- package/dist/request-value-closure.d.ts +15 -8
- package/dist/request-value-closure.js +2 -0
- package/dist/router/route-orchestration.d.ts +11 -16
- package/dist/router/route-orchestration.js +2 -12
- package/dist/rule-entry-list.d.ts +8 -7
- package/dist/rule-entry-list.js +2 -9
- package/dist/rules-consent.d.ts +6 -6
- package/dist/rules-consent.js +2 -0
- package/dist/run-cancel-context.d.ts +5 -5
- package/dist/run-local.d.ts +10 -10
- package/dist/runs.d.ts +13 -11
- package/dist/runs.js +15 -1
- package/dist/runtime-caps-resolver.d.ts +6 -6
- package/dist/runtime-governance.d.ts +9 -9
- package/dist/sandbox-pkg-source.d.ts +9 -31
- package/dist/sandbox-pkg-source.js +14 -8
- package/dist/sealed-key.d.ts +3 -3
- package/dist/security.d.ts +23 -26
- package/dist/security.js +12 -9
- package/dist/server-secret-env.d.ts +10 -10
- package/dist/session-children-retire.d.ts +1 -1
- package/dist/session-error-wire.d.ts +7 -7
- package/dist/session-incarnation.d.ts +52 -35
- package/dist/session-incarnation.js +23 -8
- package/dist/session-policy-wire.d.ts +27 -5
- package/dist/session-policy-wire.js +15 -1
- package/dist/session-records-skipped-notice.d.ts +1 -1
- package/dist/session-sync-kernel.d.ts +4 -4
- package/dist/session-sync.d.ts +49 -6
- package/dist/session-sync.js +52 -10
- package/dist/session-titler.d.ts +7 -6
- package/dist/session-titler.js +8 -13
- package/dist/session-watch.d.ts +3 -3
- package/dist/session-watch.js +4 -4
- package/dist/sighup-idle.d.ts +2 -2
- package/dist/spec-fields.d.ts +4 -4
- package/dist/sql-engine-posture.d.ts +3 -3
- package/dist/store-posture.d.ts +2 -2
- package/dist/stored-request-tool-axes-m19.d.ts +1 -1
- package/dist/task-a2a.d.ts +3 -1
- package/dist/task-a2a.js +34 -2
- package/dist/task-cwd.d.ts +7 -88
- package/dist/task-cwd.js +2 -15
- package/dist/task-mcp.d.ts +12 -8
- package/dist/task-mcp.js +19 -4
- package/dist/task-settings.d.ts +30 -18
- package/dist/task-settings.js +33 -3
- package/dist/task-workflow.d.ts +0 -24
- package/dist/task-workflow.js +2 -1
- package/dist/terminal.d.ts +5 -5
- package/dist/tighten-only-seats.d.ts +7 -6
- package/dist/tighten-only-seats.js +1 -1
- package/dist/tool-approval.d.ts +143 -197
- package/dist/tool-approval.js +13 -28
- package/dist/tool-rule-names.d.ts +2 -2
- package/dist/trace/core-keyset-guard.d.ts +12 -7
- package/dist/trace/engine-notice-wire.d.ts +5 -5
- package/dist/trace/engine-notice-wire.js +1 -0
- package/dist/trace/exit-seat.d.ts +31 -4
- package/dist/trace/exit-seat.js +41 -63
- package/dist/trace/ledger-events.d.ts +3 -3
- package/dist/trace/ledger-sink.d.ts +1 -1
- package/dist/trace/model-segment.d.ts +3 -3
- package/dist/trace/project.d.ts +47 -45
- package/dist/trace/project.js +33 -1
- package/dist/trace/redact.d.ts +44 -30
- package/dist/trace/redact.js +191 -89
- package/dist/trace/self-minted-wire.d.ts +35 -14
- package/dist/trace/self-minted-wire.js +8 -0
- package/dist/trace/sema-provenance.d.ts +1 -1
- package/dist/trace/task-notification-facets.d.ts +4 -4
- package/dist/trace/wire-projection-faces.d.ts +3 -3
- package/dist/trace/wire-projection-faces.js +1 -1
- package/dist/unattended-permission-mode.d.ts +5 -5
- package/dist/url-credential.d.ts +52 -0
- package/dist/url-credential.js +49 -0
- package/dist/url-refusal.d.ts +6 -2
- package/dist/url-refusal.js +8 -1
- package/dist/usage-analytics.d.ts +2 -2
- package/dist/user-input-ledger.d.ts +23 -23
- package/dist/web-admin-client/apply-effective.d.ts +5 -5
- package/dist/web-admin-client/apply-effective.js +2 -1
- package/dist/web-admin-client/apply-ledger.d.ts +2 -2
- package/dist/web-admin-client/center-request.d.ts +2 -2
- package/dist/web-admin-client/facade.d.ts +5 -5
- package/dist/web-admin-client/facade.js +1 -1
- package/dist/web-admin-client/hot-keys-registry.d.ts +2 -2
- package/dist/web-admin-client/http-client.d.ts +4 -4
- package/dist/web-admin-client/mcp-revocation.d.ts +1 -1
- package/dist/web-admin-client/pull-state.d.ts +1 -1
- package/dist/web-admin-client/read-face.d.ts +2 -2
- package/dist/web-admin-client/read-warnings.d.ts +5 -5
- package/dist/web-admin-client/restart-signal.d.ts +6 -6
- package/dist/web-admin-client/skills-mcp.d.ts +28 -3
- package/dist/web-admin-client/skills-mcp.js +29 -1
- package/dist/web-admin-client/types.d.ts +16 -9
- package/dist/workspace-space.d.ts +5 -3
- package/dist/write-protection.d.ts +2 -2
- package/package.json +4 -3
- package/scripts/drain-check-local.mjs +2 -1
- package/scripts/drain-check.mysql.sql +4 -2
- package/scripts/drain-check.pg.sql +4 -2
- package/skills/loop.md +1 -1
- package/dist/http/run-declared-families.d.ts +0 -16
- package/dist/http/run-declared-families.js +0 -12
- package/dist/orchestration/workflow-journal-entry.js +0 -27
|
@@ -46,12 +46,6 @@
|
|
|
46
46
|
* 该面由 test/task-settings.test.ts 的「真身胜过名字」特征化钉机器可见。
|
|
47
47
|
*/
|
|
48
48
|
import { FileError, StubExecutionEnv, type ExecutionEnv, type ExecutionEnvFactory, type FileInfo, type Result } from "@sema-agent/core";
|
|
49
|
-
/** 哪些 lane 用本模块的代理裁决写门 —— 文件平面**不在** worker 本机的全部(= 能力表 `hostFilePlane` 答否)。
|
|
50
|
-
* 与 resolve-spec 的 `hostSemanticsLane` 是同一判别式的两面,取值处**只此一个**(两处各写一份正是漂移的成因)。
|
|
51
|
-
* 🔴 S-602:改前写的是 `provider !== undefined && provider !== "host"` —— 把缺席并进 host 的同义折(门 D R3),
|
|
52
|
-
* 今天改读表那一位(`in-process` / `host` 答 YES,其余答 NO;读数逐格不变)。认不出的词 ⇒ 走代理裁决:
|
|
53
|
-
* 代理 slot 空 ⇒ 写门 fail-closed(本模块头注裁定 2),与改前同向。 */
|
|
54
|
-
export declare function isSandboxPathAdjudicationLane(provider: string | undefined): boolean;
|
|
55
49
|
/** slot 取值的三态。`ok:false` 的两支都是 fail-closed,分开只为让留痕说得出**哪一种**缺席。 */
|
|
56
50
|
export type SandboxPathEnvLookup = {
|
|
57
51
|
readonly ok: true;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { FileError, StubExecutionEnv, err, ok } from "@sema-agent/core";
|
|
2
2
|
import { normalizeAbsolutePathLexically } from "../task-cwd.js";
|
|
3
|
-
import { executionLaneCaps, executionLaneOf } from "../execution-lane-caps.js";
|
|
4
|
-
export function isSandboxPathAdjudicationLane(provider) {
|
|
5
|
-
const lane = executionLaneOf(provider);
|
|
6
|
-
return lane === undefined || executionLaneCaps(lane).hostFilePlane !== "supported";
|
|
7
|
-
}
|
|
8
3
|
const MAX_BOUND_SESSIONS = 4096;
|
|
9
4
|
export class SandboxPathEnvSlots {
|
|
10
5
|
bySession = new Map();
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
* **多壳共享一只引擎**时它结构性地问错了问题 —— 首壳退了 peer 还在用,监视父 pid 要么误杀要么永不触发。
|
|
9
9
|
* 本件问的是那个真正的问题:**还有没有人附着**。
|
|
10
10
|
*
|
|
11
|
-
* ##
|
|
11
|
+
* ## [ref]:自退律只剩这一条(硬 breaking)
|
|
12
12
|
*
|
|
13
13
|
* `SEMA_PARENT_PID` 看门狗的 drain 臂**整条删**了:父死只是把引擎标成**孤儿**(`parent_watch_orphaned`),
|
|
14
14
|
* 孤儿走的是**本腿这一条**判据,只有一处不同 —— 窗长从 {@link EngineLeaseDeps.lingerMs} 换成
|
|
15
15
|
* {@link EngineLeaseOrphanLane.lingerMs}(`ENGINE_ORPHAN_LINGER_MS`,默认 2s)。于是:
|
|
16
16
|
* · 规则集 **−1**(「父死即退」那条判据没了),参数 +1(孤儿窗);
|
|
17
|
-
* · 「有人附着 / 有 run 在飞就不退」这条结构性保护**对孤儿同样成立** —— cli 拒绝
|
|
17
|
+
* · 「有人附着 / 有 run 在飞就不退」这条结构性保护**对孤儿同样成立** —— cli 拒绝 [ref] 的那一形
|
|
18
18
|
* (A 起引擎、B 按 engine.port 复用、A 正常退)不会再在 B 的 turn 中间把引擎拆掉;
|
|
19
19
|
* · 装配判据随之变成 `parentPid 在场 ∨ engineAutoExit`;`ENGINE_AUTO_EXIT` 关着的 owned 引擎窗长
|
|
20
|
-
* 是 **`Infinity`** —— 父还活着就**永不自退**(与
|
|
20
|
+
* 是 **`Infinity`** —— 父还活着就**永不自退**(与 [ref] 前逐字同),父一死才由孤儿窗接手。
|
|
21
21
|
*
|
|
22
22
|
* ## 机制(逐条都是契约)
|
|
23
23
|
*
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* 6. **interval 必须 unref**:自退检查腿不得成为「进程本该退出却退不掉」的理由(与 drain tick 刻意
|
|
48
48
|
* 不 unref 的取向相反 —— 那一只 tick 就是停机驱动,这一只只是观察者)。**恒一只 interval**:
|
|
49
49
|
* 孤儿态不另起第二只定时器(两只定时器 = 两条自退律,正是本件要消灭的那件事)。
|
|
50
|
-
* 9. **拍频由窗推导,不是第二个旋钮**(
|
|
50
|
+
* 9. **拍频由窗推导,不是第二个旋钮**([ref]):`tickMs = min(`{@link ENGINE_LEASE_TICK_MS}`, 本腿可能
|
|
51
51
|
* 执行的每一个窗)`。理由是顶注 8 那句话的逆命题 —— 实际窗 `[linger, linger+tickMs)` 里,采样滞后
|
|
52
52
|
* 不得压过窗本身:15s 一拍去执行一个 2s 的孤儿窗,「2s」这句承诺就只是个装饰。所以装了孤儿车道
|
|
53
53
|
* (= 壳 spawn 形)的引擎按 2s 采样,没装的(纯服务器形)仍是 15s —— 存量部署一拍都没多跳。
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
* 已由 `inflight()` 结构性守住;parked 行是 durable 的,引擎退掉不丢:下次起来仍可赎回(spawn 形里
|
|
68
68
|
* 「下次」就是壳的下一次 spawn)。伤害面 = 一条 parked run 的赎回被推迟到下次启动,不是丢失。
|
|
69
69
|
* 这是**允许的收窄,不是静默**:有了廉价 parked 计数口(或本腿改成事件驱动)之后应当补上。
|
|
70
|
-
* · **活过父 run 的后台子代理不入判据**(codex R1 [high] 验真后**如实登记**,不是本件引入:
|
|
70
|
+
* · **活过父 run 的后台子代理不入判据**(codex R1 [high] 验真后**如实登记**,不是本件引入:[ref] 之前
|
|
71
71
|
* 父死走的是**当场** drain,而 `drainThenShutdown` 读的是同一只 `inflight()` ⇒ 同一个缺口,只是那时
|
|
72
72
|
* 连这 2s 都没有)。`inflight()` 的口径是**本副本的 HTTP 腿 ∪ leader 腿**(`http/server.ts` 的
|
|
73
73
|
* `inflightRuns`/`steerableRuns`/两只计数器),而 core 侧 `backgroundScope:"session"` 的子代理可以
|
|
@@ -12,14 +12,14 @@ import { type SpaceCommitRows } from "../workspace-space-commit.js";
|
|
|
12
12
|
import * as facts from "../capability-facts.js";
|
|
13
13
|
import { type TaskAttachmentStore } from "../plugins/task-attachment-store.js";
|
|
14
14
|
import type { TaskInheritEnv } from "../request-value-closure.js";
|
|
15
|
-
import type
|
|
15
|
+
import { type HeadRead } from "../session-incarnation.js";
|
|
16
16
|
import type { SpaceReclaimer } from "../workspace-space.js";
|
|
17
17
|
/**
|
|
18
18
|
* per-session 的 **cwd / shellEnv 登记簿**(TOC cwd seam + R-survey shellEnv seam)+ 它们的**租户围栏**。
|
|
19
19
|
*
|
|
20
20
|
* ── 为什么围栏不是可选的(codex R1-F1,判真)────────────────────────────────────────────────────
|
|
21
|
-
* 这两张表只按 `sessionId` 键控。在 host lane
|
|
22
|
-
*
|
|
21
|
+
* 这两张表只按 `sessionId` 键控。在 host lane 上那是安全的:那条车道的闸(部署形表行 `callerCwd` 的 host 臂)
|
|
22
|
+
* 要求单主,整台机器就一个用户。**device lane 把这个前提撤掉了** —— 同一行的 device 臂刻意不要求单用户
|
|
23
23
|
* (员工各连各的设备)。于是一条真实的超范围路径出现了:
|
|
24
24
|
* ① sessionId 由**调用方自选**,而且 `DELETE /v1/sessions/:id` 之后可以被**别人** `register` 重新登记
|
|
25
25
|
* (`boot/session-faces.ts` 的化身围栏注逐字写着这件事);
|
|
@@ -38,12 +38,12 @@ import type { SpaceReclaimer } from "../workspace-space.js";
|
|
|
38
38
|
export interface SessionScopedRegistries {
|
|
39
39
|
readonly perSessionCwd: Map<string, string>;
|
|
40
40
|
readonly perSessionShellEnv: Map<string, Record<string, string>>;
|
|
41
|
-
/**
|
|
41
|
+
/** [ref]:host shell 的继承策略(`inheritEnv` 请求键)。只读面给 host 工厂包装;写只经 {@link setSessionInheritEnv}。 */
|
|
42
42
|
readonly perSessionInheritEnv: ReadonlyMap<string, TaskInheritEnv>;
|
|
43
43
|
setSessionCwd(sid: string, cwd: string): void;
|
|
44
44
|
setSessionShellEnv(sid: string, env: Record<string, string>): void;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* [ref] —— 第三只 per-session 绑定(与 cwd / shellEnv 同一只 LRU 权威、同一条围栏、同一条删除)。
|
|
47
47
|
* `undefined` = **清掉**这一格(不是「不动」):`inheritEnv` 是「本条请求要什么」,缺席的请求要的是缺省清洗 ——
|
|
48
48
|
* 与 cwd / shellEnv 的「缺席 = 留着上一条的值」刻意不同(那两位由壳每条请求重发,粘住无害;这一位粘住 = 替一个没说话的
|
|
49
49
|
* 请求放宽凭据面)。
|
|
@@ -59,10 +59,10 @@ export declare function createSessionScopedRegistries(maxEntries?: number): Sess
|
|
|
59
59
|
/**
|
|
60
60
|
* k8s 车道的**每 run 绑定**:部署级适配器配置 × 三只 run 作用域的座(都按本 run 的 `ctx.sessionId` 取)——
|
|
61
61
|
* · 镜像:§7 P0.5 per-task 镜像(resolveSpec 按调用方 principal 解出、按会话登记;缺席 ⇒ 部署缺省镜像);
|
|
62
|
-
* · **工作区空间的分区 = 会话化身**(`spaceOccupant.incarnation`):建这只 env 时按 id
|
|
63
|
-
* `session-incarnation.ts`;本工厂不取会话,正是 core 给「没取会话的读者」的那只读)
|
|
62
|
+
* · **工作区空间的分区 = 会话化身**(`spaceOccupant.incarnation`):建这只 env 时按 id 读一次会话店的头(`headOf`,会话行上的那一格,
|
|
63
|
+
* `session-incarnation.ts`;本工厂不取会话,正是 core 给「没取会话的读者」的那只读),经 `sessionFaceOfHead` 投成一位活住客。读数是闭集三臂(`SpaceOccupant`,适配器那边逐臂处置):
|
|
64
64
|
* 答令牌 ⇒ 已知;答 `undefined`(没有这只会话)⇒ `{ unread: "incarnation_unknown" }` —— 没有空间:空间车道不开、缓存卷不挂,各一行;
|
|
65
|
-
* 读抛 / 超时(`rpcTimeoutMs`,同一次 connect 里读围栏行与 `latest` 的那一只墙)/ 答出的不是非空串 ⇒ `{ fault: <code> }` —— 读不到空间 ≠ 没有空间:开着的空间车道 / 缓存卷让这只 env 一只 pod 都不建,
|
|
65
|
+
* 读抛 / 超时(`rpcTimeoutMs`,同一次 connect 里读围栏行与 `latest` 的那一只墙)/ 行在而没有令牌(`session.incarnation_missing`)/ 答出的不是非空串 ⇒ `{ fault: <code> }` —— 读不到空间 ≠ 没有空间:开着的空间车道 / 缓存卷让这只 env 一只 pod 都不建,
|
|
66
66
|
* connect 与 resumeVM 都答 `connect_failed`(与 `latest` 读失败同一铸点),一行 `workspace_space_unreadable_occupant`;`code` 是店的错误码,
|
|
67
67
|
* 从不带正文、从不带令牌。**绝不**以会话 id 代替;
|
|
68
68
|
* 同时开这只 env 在空间提交围栏上的座(`spaceOccupant.fence`,run 店的 `workspace_space_commit` 行;法见 `workspace-space-commit.ts`);
|
|
@@ -76,9 +76,10 @@ export declare function createSessionScopedRegistries(maxEntries?: number): Sess
|
|
|
76
76
|
*/
|
|
77
77
|
export declare function createK8sRunEnvFactory(k8sCfg: K8sEnvConfig, seats: {
|
|
78
78
|
imageOf(sessionId: string): string | undefined;
|
|
79
|
-
/** The session store's by-id
|
|
80
|
-
* has none, which `assertWorkspaceSpaceReadable` refuses together with `space` (embeddings that
|
|
81
|
-
|
|
79
|
+
/** The session store's by-id head read (`SessionStore.headOf`, picked once by `headReadOf`); the occupant is its live-occupant projection
|
|
80
|
+
* (`sessionFaceOfHead`). Absent ⇔ the store has none, which `assertWorkspaceSpaceReadable` refuses together with `space` (embeddings that
|
|
81
|
+
* wire another lane pass none). */
|
|
82
|
+
headOf: HeadRead | undefined;
|
|
82
83
|
/** The run store's commit-fence rows (`workspace_space_commit`); answers `undefined` only before stage 7 binds the run store
|
|
83
84
|
* or without a store backend — the latter `assertWorkspaceSpaceReadable` refuses together with `space`. */
|
|
84
85
|
spaceCommits(): SpaceCommitRows | undefined;
|
|
@@ -87,7 +88,7 @@ export declare function createK8sRunEnvFactory(k8sCfg: K8sEnvConfig, seats: {
|
|
|
87
88
|
* k8s 工作区空间的**起服前提**(装配后的真门;同段先例 = `assertDeviceLaneWired`)。法只有一条:
|
|
88
89
|
* **生效策略 `space`(事实 `workspaceSpace`)∧ {@link createK8sRunEnvFactory} 的两只座缺一 ⇒ 拒启。**
|
|
89
90
|
*
|
|
90
|
-
* 空间车道每条 run 开不开,只看工厂的两只座:住客的按 id 读(会话店的 `
|
|
91
|
+
* 空间车道每条 run 开不开,只看工厂的两只座:住客的按 id 读(会话店的 `headOf`,`headReadOf` 在第 5 段判一次,本门与工厂
|
|
91
92
|
* 读同一只返回值)与提交围栏的行(run 店 —— 住在存储后端里;没有存储后端 ⇒ 没有这只座)。缺一 ⇒ 每条 run 都不存,而能力位
|
|
92
93
|
* `workspaceSync.persist` 只读配置、照报 `"space"`。事实**保持只读配置**;让它恒真的办法是拒掉这一组合,不是给事实加运行期依赖。
|
|
93
94
|
* 生效策略缺席(非 k8s 车道 / 没配快照存储:能力位本就不在场,后者有起服一行 `workspace_persist_unavailable`)或 `off` ⇒ 不判。
|
|
@@ -96,7 +97,7 @@ export declare function createK8sRunEnvFactory(k8sCfg: K8sEnvConfig, seats: {
|
|
|
96
97
|
* 拒句一行,点名:旋钮词、缺的是哪一只座、会话店种类(`sessionStoreLabelOf` —— `/health.sessionBackend` 同一读法)、出路。
|
|
97
98
|
*/
|
|
98
99
|
export declare function assertWorkspaceSpaceReadable(space: ReturnType<typeof facts.workspaceSpace>, seats: {
|
|
99
|
-
readonly
|
|
100
|
+
readonly headOf: HeadRead | undefined;
|
|
100
101
|
readonly spaceCommits: (() => SpaceCommitRows | undefined) | undefined;
|
|
101
102
|
}, cache: ReturnType<typeof facts.workspaceCache>, sessionStoreLabel: string): void;
|
|
102
103
|
/** device lane 的三件活对象(店 / 汇聚端 / 准入链)。缺席 = 本部署没有 device 车道。 */
|
|
@@ -116,8 +117,8 @@ export interface ExecutionEnvCtx {
|
|
|
116
117
|
* (`late-binds.ts`),工厂在 run 期才求值。装配(第 5 段)在有存储后端时传、没有时不传(起服门据此判);不传(含只装别的车道的嵌入 /
|
|
117
118
|
* 测试)⇒ 读不到行 ⇒ k8s 空间车道按「住客读不到」不开,每 env 一行 `workspace_space_unavailable`(响亮,不静默)。 */
|
|
118
119
|
spaceCommits?: () => SpaceCommitRows | undefined;
|
|
119
|
-
/** k8s 工作区空间的住客读:会话店的按 id 读(`
|
|
120
|
-
|
|
120
|
+
/** k8s 工作区空间的住客读:会话店的按 id 读(`headReadOf(sessionStore)`,第 5 段判一次、与起服门同一只)。不传 ⇒ 同上,不开、响亮。 */
|
|
121
|
+
headOf?: HeadRead;
|
|
121
122
|
}
|
|
122
123
|
export declare function createExecutionEnv(ctx: ExecutionEnvCtx): {
|
|
123
124
|
perTaskImage: PerTaskImageRegistry;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { createHostLspManager } from "../host-lsp-manager.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TaskEnvRegistry } from "../capabilities/sandbox-file-send.js";
|
|
5
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "../deployment-shape.js";
|
|
5
6
|
import { SessionEnvironmentSelection } from "../capabilities/select-environment-tool.js";
|
|
6
7
|
import { createE2bLspManager } from "../lsp/e2b-manager.js";
|
|
7
8
|
import { evictLspOnDestroy } from "../lsp-evict.js";
|
|
@@ -15,7 +16,7 @@ import { createRunWorkspaceSnapshotSeat } from "../fleet/workspace-snapshot-resi
|
|
|
15
16
|
import { createSpaceCommitFence } from "../workspace-space-commit.js";
|
|
16
17
|
import { localDockerExecutionEnvFactory } from "../plugins/remote-env-local-docker.js";
|
|
17
18
|
import { sshExecutionEnvFactory } from "../plugins/remote-env-ssh.js";
|
|
18
|
-
import {
|
|
19
|
+
import { withRemoteScratchpad } from "../plugins/remote-scratchpad.js";
|
|
19
20
|
import { FileSchedulerBackend, defaultSchedulerStorePath } from "../plugins/scheduler-support.js";
|
|
20
21
|
import * as facts from "../capability-facts.js";
|
|
21
22
|
import { materializeAttachmentsInto } from "../plugins/task-attachment-store.js";
|
|
@@ -23,12 +24,13 @@ import { reapOrphanWorktrees, withWorktreeIsolation } from "../plugins/worktree-
|
|
|
23
24
|
import { derivePkgSourceEnv } from "../sandbox-pkg-source.js";
|
|
24
25
|
import { effectiveHostWorkspace } from "../task-cwd.js";
|
|
25
26
|
import { taskInheritEnvRefusal } from "../hosted-posture.js";
|
|
27
|
+
import { sessionFaceOfHead } from "../session-incarnation.js";
|
|
26
28
|
import { createCacheMissMemory } from "../workspace-cache.js";
|
|
27
29
|
import { workspaceSnapshotTimeoutOf } from "../workspace-space.js";
|
|
28
30
|
import { sayEgressPolicyReading } from "../sandbox-egress-policy.js";
|
|
29
|
-
import {
|
|
31
|
+
import { sandboxPathEnvSlots, withSandboxPathEnvSlot } from "./deferred-sandbox-path-env.js";
|
|
30
32
|
import { LANE_HOME_UNDECLARED_EVENT, createLaneHomeAbsenceReporter } from "../lane-home-probe.js";
|
|
31
|
-
import { REMOTE_EXEC_PROVIDER_WORDS, buildUndeclaredHomeNote, executionLaneHomeDir, executionLaneOf,
|
|
33
|
+
import { REMOTE_EXEC_PROVIDER_WORDS, buildUndeclaredHomeNote, executionLaneHomeDir, executionLaneOf, laneBindsReads, laneIsolated } from "../execution-lane-caps.js";
|
|
32
34
|
function boundedSessionSetter(map, maxEntries) {
|
|
33
35
|
return (sid, value) => {
|
|
34
36
|
map.delete(sid);
|
|
@@ -132,14 +134,14 @@ const INCARNATION_READ_TIMEOUT = "incarnation_read_timeout";
|
|
|
132
134
|
async function occupantOf(seats, sessionId, taskId, boundMs) {
|
|
133
135
|
let answer;
|
|
134
136
|
try {
|
|
135
|
-
const read = seats.
|
|
137
|
+
const read = seats.headOf;
|
|
136
138
|
answer =
|
|
137
139
|
read === undefined
|
|
138
140
|
? undefined
|
|
139
|
-
: await boundedStoreCall(() => read(sessionId), {
|
|
141
|
+
: sessionFaceOfHead(sessionId, await boundedStoreCall(() => read(sessionId), {
|
|
140
142
|
ms: boundMs,
|
|
141
143
|
onTimeout: () => Object.assign(new Error(`session occupant read did not answer within ${boundMs}ms`), { code: INCARNATION_READ_TIMEOUT }),
|
|
142
|
-
});
|
|
144
|
+
}))?.incarnation;
|
|
143
145
|
}
|
|
144
146
|
catch (e) {
|
|
145
147
|
const code = e?.code;
|
|
@@ -147,8 +149,6 @@ async function occupantOf(seats, sessionId, taskId, boundMs) {
|
|
|
147
149
|
}
|
|
148
150
|
if (answer === undefined)
|
|
149
151
|
return { unread: "incarnation_unknown" };
|
|
150
|
-
if (typeof answer !== "string" || answer === "")
|
|
151
|
-
return { fault: "incarnation_read_failed" };
|
|
152
152
|
const rows = seats.spaceCommits();
|
|
153
153
|
return rows !== undefined ? { incarnation: answer, fence: createSpaceCommitFence(rows, answer, taskId) } : { unread: "incarnation_unknown" };
|
|
154
154
|
}
|
|
@@ -158,7 +158,7 @@ function spaceOff(store) {
|
|
|
158
158
|
}
|
|
159
159
|
export function assertWorkspaceSpaceReadable(space, seats, cache, sessionStoreLabel) {
|
|
160
160
|
if (space.available && persistNeedsOccupant(space.policy.persist)) {
|
|
161
|
-
const missing = seats.
|
|
161
|
+
const missing = seats.headOf === undefined ? `the session store (${sessionStoreLabel}) has no by-id occupant read (headOf)`
|
|
162
162
|
: seats.spaceCommits === undefined ? `this deployment has no store backend to hold the space's commit rows (the session store is ${sessionStoreLabel})`
|
|
163
163
|
: undefined;
|
|
164
164
|
if (missing === undefined)
|
|
@@ -169,9 +169,9 @@ export function assertWorkspaceSpaceReadable(space, seats, cache, sessionStoreLa
|
|
|
169
169
|
"DB_BACKEND=memory has none), or set WORKSPACE_PERSIST=off (the default is space), and restart");
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
if (cache.available && (seats.
|
|
173
|
-
const missing = seats.
|
|
174
|
-
? `the session store (${sessionStoreLabel}) has no by-id occupant read (
|
|
172
|
+
if (cache.available && (seats.headOf === undefined || seats.spaceCommits === undefined)) {
|
|
173
|
+
const missing = seats.headOf === undefined
|
|
174
|
+
? `the session store (${sessionStoreLabel}) has no by-id occupant read (headOf)`
|
|
175
175
|
: `this deployment has no store backend to hold the space durably (the session store is ${sessionStoreLabel})`;
|
|
176
176
|
throw new Error(`WORKSPACE_CACHE=volume but ${missing} [workspace-space-unreadable]: ` +
|
|
177
177
|
"the k8s build-cache volume belongs to the workspace space, which is keyed by the session occupant, so here no run would get its volume while " +
|
|
@@ -187,7 +187,7 @@ function persistNeedsOccupant(persist) {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
function buildRealSystemNote(remoteExec) {
|
|
190
|
-
if (!
|
|
190
|
+
if (!DEPLOYMENT_SHAPE_PREDICATES.singleMachineDefaultLane.holds({ remoteExec }))
|
|
191
191
|
return "non-isolated target — actions are permanent; rely on the policy gate + HITL (design/61 §5)";
|
|
192
192
|
const sandboxLanes = REMOTE_EXEC_PROVIDER_WORDS.filter((lane) => laneIsolated(lane)).join("|");
|
|
193
193
|
return ("hands run on this machine with no OS sandbox (single-machine default: REMOTE_EXEC unset, CONFIG_PROVIDER=local) — actions are permanent, " +
|
|
@@ -245,7 +245,7 @@ export function createExecutionEnv(ctx) {
|
|
|
245
245
|
logger,
|
|
246
246
|
...((env) => (env !== undefined ? { podEnv: env } : {}))(buildSandboxLaneEnv(config, config.remoteExec.sandboxEnv)),
|
|
247
247
|
};
|
|
248
|
-
executionEnvFactory = createK8sRunEnvFactory(k8sCfg, { imageOf: (sid) => perTaskImage.get(sid),
|
|
248
|
+
executionEnvFactory = createK8sRunEnvFactory(k8sCfg, { imageOf: (sid) => perTaskImage.get(sid), headOf: ctx.headOf, spaceCommits: ctx.spaceCommits ?? (() => undefined) });
|
|
249
249
|
if (k8sCfg.cache !== undefined || k8sCfg.s3Snapshot !== undefined)
|
|
250
250
|
spaceReclaimer = createSpaceReclaimer(k8sCfg);
|
|
251
251
|
void checkSandboxEgressPolicy(k8sCfg)
|
|
@@ -341,7 +341,7 @@ export function createExecutionEnv(ctx) {
|
|
|
341
341
|
...(config.remoteExec.env ? { env: config.remoteExec.env } : {}),
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
-
if (executionEnvFactory &&
|
|
344
|
+
if (executionEnvFactory && DEPLOYMENT_SHAPE_PREDICATES.remoteScratchpad.holds(config)) {
|
|
345
345
|
executionEnvFactory = withRemoteScratchpad(executionEnvFactory, logger);
|
|
346
346
|
}
|
|
347
347
|
if (config.worktreeIsolation && executionEnvFactory) {
|
|
@@ -387,8 +387,7 @@ export function createExecutionEnv(ctx) {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
const sendUserFileTaskEnvs = (() => {
|
|
390
|
-
|
|
391
|
-
if (!config.sendUserFile || !executionEnvFactory || !sandboxSendLaneEnabled(provider, config.requirePrincipal))
|
|
390
|
+
if (!config.sendUserFile || !executionEnvFactory || !DEPLOYMENT_SHAPE_PREDICATES.sandboxSendUserFile.holds(config))
|
|
392
391
|
return undefined;
|
|
393
392
|
const registry = new TaskEnvRegistry();
|
|
394
393
|
executionEnvFactory = registry.wrapFactory(executionEnvFactory);
|
|
@@ -405,13 +404,12 @@ export function createExecutionEnv(ctx) {
|
|
|
405
404
|
return env;
|
|
406
405
|
};
|
|
407
406
|
}
|
|
408
|
-
if (executionEnvFactory &&
|
|
407
|
+
if (executionEnvFactory && DEPLOYMENT_SHAPE_PREDICATES.sandboxPathAdjudication.holds(config)) {
|
|
409
408
|
executionEnvFactory = withSandboxPathEnvSlot(executionEnvFactory, sandboxPathEnvSlots, logger);
|
|
410
409
|
}
|
|
411
410
|
if (executionEnvFactory) {
|
|
412
411
|
const isolated = laneIsolated(executionLaneOf(config.remoteExec.provider));
|
|
413
|
-
const suspendable =
|
|
414
|
-
(config.remoteExec.provider === "k8s" && !!config.remoteExec.s3Snapshot);
|
|
412
|
+
const suspendable = DEPLOYMENT_SHAPE_PREDICATES.suspendableHands.holds(config);
|
|
415
413
|
const sandboxEnvKeys = forwardedSandboxEnvKeys(config.remoteExec);
|
|
416
414
|
logger.info("remote_exec_enabled", { provider: config.remoteExec.provider, isolated, suspendable, ...(sandboxEnvKeys.length > 0 ? { sandboxEnvKeys } : {}) });
|
|
417
415
|
if (!isolated)
|
|
@@ -9,8 +9,8 @@ export declare function buildFatalErrorText(err: unknown): string;
|
|
|
9
9
|
/**
|
|
10
10
|
* 进程级 fatal 出口的**唯一一只腿**:同一只 {@link buildFatalErrorText} 产物写两个面,然后按崩溃码退。
|
|
11
11
|
*
|
|
12
|
-
* ── 病(
|
|
13
|
-
* 出口过去只有那条 JSON 行。而拒启文案是**多行**的 ——
|
|
12
|
+
* ── 病([ref],test [ref] P2)────────────────────────────────────────────────────────────────────
|
|
13
|
+
* 出口过去只有那条 JSON 行。而拒启文案是**多行**的 —— [ref] 的列集对账会生成
|
|
14
14
|
* `ALTER TABLE <表> ADD COLUMN <列定义>;`,它存在的全部理由就是「运维直接粘进 psql」;塞进 JSON 字符串后
|
|
15
15
|
* 整段变成一串 `\n` 转义,**粘不走**。dist 里也没有 pretty / `isTTY` 分支去把它摊开(有也不该有:出口的
|
|
16
16
|
* 可读性不该取决于终端是谁)。
|
package/dist/boot/leader.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface LeaderCtx {
|
|
|
23
23
|
toolResultStore: ToolResultStoreFull | undefined;
|
|
24
24
|
sessionStore: ReturnType<typeof createSessionStore>;
|
|
25
25
|
checkpointStore: CheckpointStoreFull | undefined;
|
|
26
|
-
/**
|
|
26
|
+
/** [ref]:停驻行凭据的封签器(与 HTTP 面 `ServiceDeps.checkpointCtxSealing` 同一只;起服第 6 段已对「店在、它不在」拒启)。必填键,值可为 undefined。 */
|
|
27
27
|
checkpointCtxSealing: import("../http/checkpoint-ctx.js").CheckpointCtxSealing | undefined;
|
|
28
28
|
/** [ref] 件B/C/D([ref],codex R2-F1):部署治理三座席 —— leader 车道的每一只 Runner 都要带上它,
|
|
29
29
|
* 否则开了 leader 端点的部署就有一条在部署治理**之外**的执行面(合规否决/锁都够不着)。 */
|
|
@@ -95,7 +95,7 @@ export interface MemoryWriteBoundaryFacts {
|
|
|
95
95
|
* core 7.16.0([ref])之后写家还要再深一层(`<平面>/<label>`),但 label 归引擎注册簿,boot 期说不出口;
|
|
96
96
|
* 平面是**包含关系上等价**的那一只(家恒为平面的直接子目录),所以判据停在平面,不猜 label。 */
|
|
97
97
|
memoryRoot: string | undefined;
|
|
98
|
-
/** 执行车道名,只进文案(归一读口 `executionLaneOf` 的答案;
|
|
98
|
+
/** 执行车道名,只进文案(归一读口 `executionLaneOf` 的答案;[ref] 起不在调用点手写 `?? "in-process"`)。 */
|
|
99
99
|
lane: ExecutionLane;
|
|
100
100
|
/** 该车道的文件工具是否跑在**本机** fs 上(in-process / `REMOTE_EXEC=host`)。false = 沙箱盘,与记忆根分平面。
|
|
101
101
|
* ⚠️ 这一位管的是**文件平面**,与下面的 `coreRemoteExecutionEnv` 是**两根轴**,别合并(codex round2
|
|
@@ -119,7 +119,7 @@ export interface MemoryWriteBoundaryFacts {
|
|
|
119
119
|
containmentRoots: readonly string[];
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* [ref] —— 审计的**车道那四位**由本函数从能力表派生(boot/stores.ts 的装配点只调它,不再就地手写):
|
|
123
123
|
* 改前 stores 里是 `lane === undefined || lane === "host"`(同义折,门 D R3)+ `config.remoteExec !== undefined`
|
|
124
124
|
* (座位上的裸缺席判,R4)+ `lane ?? "in-process"` ×3(R2)。两根轴各读表里各自那一位,不合并:
|
|
125
125
|
* · `hostSemanticsLane` ⇐ `hostFilePlane`(文件平面在不在本机);
|
|
@@ -11,10 +11,10 @@ type ConsolidationSeatOptions = ReturnType<typeof resolveMemoryConsolidationDriv
|
|
|
11
11
|
export type ConsolidationSeatLabel = "explicit" | "role:consolidate" | "role:summarize";
|
|
12
12
|
/** {@link buildConsolidationValveAudit} 的告警名闭集(事件名进日志 ⇒ 运维可按名过滤/告警)。 */
|
|
13
13
|
export type ConsolidationValveWarningTag = "memory_consolidation_valve_unreachable" | "memory_consolidation_run_credential_gated";
|
|
14
|
-
/** {@link resolveConsolidationValve} 的起服提示名闭集(
|
|
14
|
+
/** {@link resolveConsolidationValve} 的起服提示名闭集([ref] / [ref];事件名进日志 ⇒ 运维可按名过滤/告警)。 */
|
|
15
15
|
export type ConsolidationValveNoticeTag = "memory_consolidation_default_off_no_cheap_model" | "memory_consolidation_on_main_model";
|
|
16
16
|
/**
|
|
17
|
-
* 阀门判决(
|
|
17
|
+
* 阀门判决([ref] / [ref])。`build*`/`create*` 之外的第三种:纯数据,由 {@link resolveConsolidationValve} 产出。
|
|
18
18
|
* 阀门开关的**唯一**属主:座解析、操作面、引擎面两席、审计告警、武装日志全读 `enabled`,不再各读一次表态。
|
|
19
19
|
*/
|
|
20
20
|
export interface ConsolidationValve {
|
|
@@ -22,7 +22,7 @@ export interface ConsolidationValve {
|
|
|
22
22
|
/** 这一位是谁定的:运维的显式词(`explicit`),还是出厂缺省派生(`derived`)。 */
|
|
23
23
|
readonly source: "explicit" | "derived";
|
|
24
24
|
/**
|
|
25
|
-
* 这一判决**随目录变**吗(
|
|
25
|
+
* 这一判决**随目录变**吗([ref] codex 车内复审 F2)。真 = 派生判决读了整理座落在谁身上(未设 ∧ 结构上跑得起来),
|
|
26
26
|
* 中心热改 roles / 档位就可能翻它 ⇒ 要有一份重启读数盯着({@link createConsolidationValveWatch})。显式词、以及结构上
|
|
27
27
|
* 跑不起来的派生关 ⇒ 假(目录怎么改都翻不动)。
|
|
28
28
|
*/
|
|
@@ -34,7 +34,7 @@ export interface ConsolidationValve {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* 整理座若开,会落在哪只模型上 —— **相对主模型**(
|
|
37
|
+
* 整理座若开,会落在哪只模型上 —— **相对主模型**([ref] 的「便宜模型在场」判据;{@link consolidationSeatBillingOf} 产出)。
|
|
38
38
|
* · `own-model` = 座解到的目录条目**不是**主模型那一条(按条目身份 = 对象引用判,不比 id 串;`MODEL_CHEAP_ID`,或目录的
|
|
39
39
|
* consolidate / summarize / flash 档位绑定);
|
|
40
40
|
* · `main-model` = 座解到主模型那一条本身(env 角色表在 `MODEL_CHEAP_ID` 缺席 —— 或与 `MODEL_ID` 同 id、不铸 cheap 槽 —— 时把
|
|
@@ -80,7 +80,7 @@ export interface ConsolidationDriverSeat {
|
|
|
80
80
|
*/
|
|
81
81
|
export declare function resolveConsolidationDriverSeat(deps: MemoryConsolidationDriverDeps): ConsolidationDriverSeat;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* [ref] 波 0([ref] §3)—— 整理驱动席的 **restart 读数**。过渡件:**波 1 转热后删**(那时每轮 run 起手
|
|
84
84
|
* 现取当前代的席,不再有 boot 烤死的席,这只表也就没有要比的东西了)。
|
|
85
85
|
*
|
|
86
86
|
* ## 为什么要它
|
|
@@ -152,7 +152,7 @@ export declare function createPerScopeSingleFlight<T>(): (scope: string, run: ()
|
|
|
152
152
|
*
|
|
153
153
|
* 阀门关着 ⇒ 整条门不判(缺省姿态,[ref]「缺席不在律内」)。
|
|
154
154
|
*
|
|
155
|
-
* 🔴
|
|
155
|
+
* 🔴 [ref] 起判据拆成「判官 + 拒启包装」两半:判官 {@link consolidationDriverUnwirable} 是三条臂的**唯一**
|
|
156
156
|
* 属主,拒启包装只在阀门开着时把它的拒因抛出去;出厂缺省派生({@link resolveConsolidationValve})读同一只判官决定
|
|
157
157
|
* 「结构上跑不起来 ⇒ 缺省恒关」—— 两处读一只,不是两份三臂。
|
|
158
158
|
*/
|
|
@@ -180,7 +180,7 @@ export type ConsolidationUnwirable = "no-memory-engine" | "no-control-plane" | "
|
|
|
180
180
|
*/
|
|
181
181
|
export declare function consolidationDriverUnwirable(input: ConsolidationWiringFacts): ConsolidationUnwirable | undefined;
|
|
182
182
|
/**
|
|
183
|
-
* 整理座若开会落在哪只模型上(
|
|
183
|
+
* 整理座若开会落在哪只模型上([ref] 的「便宜模型在场」判据)—— **问 core 的同一只解析器**,不抄 role 链
|
|
184
184
|
* ({@link seatLabel} 注里同一条理由:抄一份就是第二真源,而 `ROLE_TIER_DEFAULTS` 的 flash 缺省会让手抄版答错)。
|
|
185
185
|
*
|
|
186
186
|
* 为什么不按 env `MODEL_CHEAP_ID` 的拼写判:它只是供座的一条路。env 角色表在它缺席时把 summarize 指回
|
|
@@ -201,7 +201,7 @@ export declare function consolidationDriverUnwirable(input: ConsolidationWiringF
|
|
|
201
201
|
*/
|
|
202
202
|
export declare function consolidationSeatBillingOf(plane: ConsolidationSeatPlane): ConsolidationSeatBilling;
|
|
203
203
|
/**
|
|
204
|
-
* 🔴
|
|
204
|
+
* 🔴 [ref] / clay **[ref]** —— **阀门判决**:开不开、谁定的、起服时要说什么。阀门开关的**唯一**属主(stage-06 的座解析 /
|
|
205
205
|
* 操作面 / 引擎面两席 / 审计告警 / 武装日志全读它的 `enabled`)。
|
|
206
206
|
*
|
|
207
207
|
* · **显式词恒赢**:`off` ⇒ 关、零提示、**零探针**(一眼都不看角色表 —— off = 零装配零探针那句承诺);`on` ⇒ 开
|
|
@@ -214,7 +214,7 @@ export declare function consolidationSeatBillingOf(plane: ConsolidationSeatPlane
|
|
|
214
214
|
* 座不落主模型({@link consolidationSeatBillingOf} = `own-model`)⇒ **开**;
|
|
215
215
|
* 否则(落主模型 / 解不出)⇒ **关** + 一行 `memory_consolidation_default_off_no_cheap_model`(点名 `MODEL_CHEAP_ID`,
|
|
216
216
|
* 出路 = 配便宜模型,或显式 `off` 静音)。
|
|
217
|
-
* · **半配拒启**(`MEMORY_EMBEDDER_*` 同族,
|
|
217
|
+
* · **半配拒启**(`MEMORY_EMBEDDER_*` 同族,[ref] 起判定点挪到这里):scope 表 / 节律配了而阀门最终**没开** ⇒ 拒启,
|
|
218
218
|
* 拒因说清「为什么没开」。在 `loadConfig` 判会把「未设 + scope + 便宜模型在场」这台本该派生成开的部署当场拒掉。
|
|
219
219
|
*
|
|
220
220
|
* ⚠️ **起服判一次**(restart-to-apply):判决落在 boot 第 4 段的装配点 {@link createConsolidationValve} —— 目录已应用
|
|
@@ -239,7 +239,7 @@ export declare function resolveConsolidationValve(input: {
|
|
|
239
239
|
* baked = boot 判决的投影,current = 此刻拿活配置**重判**一次的投影(`plane` 给活引用的 getter,refresh 就地换代后现取)。
|
|
240
240
|
* · 判决翻了(派生开 → 关:主模型被挪到整理座那一条上,或座被挪回主模型;派生关 → 开:目录给整理座绑上别的模型 / 目录迟到)
|
|
241
241
|
* ⇒ 两侧不等 ⇒ 签重启(重启后 boot 重判)。修前是两臂:开时只盯座位指纹、关时只盯「会不会开」—— 只动主模型的那一形零信号。
|
|
242
|
-
* · 开着而座漂了(中心改了座会解到的那只模型)⇒ 座位指纹不等 ⇒ 签(
|
|
242
|
+
* · 开着而座漂了(中心改了座会解到的那只模型)⇒ 座位指纹不等 ⇒ 签([ref] 波 0 的既有信号,显式 on 同走这一臂)。
|
|
243
243
|
* · 关着而目录怎么变都不翻 ⇒ 两侧同为 `{ valve: "off" }` ⇒ 不签(主模型换代而判决不翻,不造一次什么都不改变的重启)。
|
|
244
244
|
* 主模型条目是判决的**输入**(它决定开 / 关),不进投影本身 —— 进了就会在每一次主模型换代时签一次不翻判决的重启。
|
|
245
245
|
* 显式 off / 结构上跑不起来的派生关 ⇒ `undefined`(判决不随目录变,没有可盯的东西)。
|
|
@@ -283,7 +283,7 @@ export interface ConsolidationValveInput {
|
|
|
283
283
|
*
|
|
284
284
|
* 两个入口各调它一次:HTTP 服务第 4 段经 {@link createConsolidationValve};`run-local` 在记忆引擎接线之后直接调(它没有整理座 ——
|
|
285
285
|
* 不挂手动口、不接 `RunnerDeps` 的整理两席 —— 判决本身对它没有用处,要的只是拒因)。修前这道拒只长在 HTTP 那条装配链上
|
|
286
|
-
* (
|
|
286
|
+
* ([ref] 从 `loadConfig` 挪过来时 `run-local` 没跟上):共享 `.env` 上同一组键,HTTP 服务拒启、`run-local` 带着零效果的 scope 表
|
|
287
287
|
* 静默起跑。判据只有这一只 ⇒ 两个入口对同一份 env 同判同句(未设 + 便宜模型在场 ⇒ 两边都派生开、都照起)。
|
|
288
288
|
*/
|
|
289
289
|
export declare function judgeConsolidationValve(input: ConsolidationValveInput): {
|
|
@@ -312,7 +312,7 @@ export declare function judgeConsolidationValve(input: ConsolidationValveInput):
|
|
|
312
312
|
* 反过来说,**沉默**同样不行:那正是「设了但没生效」病族,而这一形连能力位都是诚实的假,唯一缺的
|
|
313
313
|
* 就是一句把因果说清楚的话。
|
|
314
314
|
*
|
|
315
|
-
* ## 只审**显式**开的阀门(
|
|
315
|
+
* ## 只审**显式**开的阀门([ref] / [ref] 起)
|
|
316
316
|
*
|
|
317
317
|
* 两条告警的前提都是「运维**显式**拧了 on」(上面那句原话)——它们是一次**表态**够不着的诊断。出厂缺省**派生**开的
|
|
318
318
|
* 那台(配了便宜模型的单用户部署)没有表态可审:引擎面的自动整理照跑(不走这两个口),手动口是一件它没要过的东西。
|
|
@@ -360,7 +360,7 @@ export declare function buildStopDetailAudit(input: {
|
|
|
360
360
|
untrustedDetail: string;
|
|
361
361
|
};
|
|
362
362
|
/**
|
|
363
|
-
*
|
|
363
|
+
* [ref] / [ref] —— **`RunnerDeps.autoRunOnRecommendation` 武装席的装配不变量**(D1 的姊妹门)。
|
|
364
364
|
*
|
|
365
365
|
* 与 {@link assertConsolidationDriverWirable} 刻意**分家**而不是加第四臂:那道门问「阀门这根旋钮
|
|
366
366
|
* (`MEMORY_CONSOLIDATION_DRIVER`)开着而这台机器结构上跑不了」,本门问「武装这根旋钮
|
|
@@ -377,7 +377,7 @@ export declare function buildStopDetailAudit(input: {
|
|
|
377
377
|
* ## 判据取的是**结构事实**,不是一个手抄的布尔
|
|
378
378
|
*
|
|
379
379
|
* `memoryConsolidationWired` 由调用点从**它刚刚铸出来的那只 `RunnerDeps`** 上读(`deps.memoryConsolidation
|
|
380
|
-
* !== undefined`),不是在这里写一个常量 ——
|
|
380
|
+
* !== undefined`),不是在这里写一个常量 —— [ref] 把两席接上之后,本门**自动**从「恒拒」变成「阀门开着
|
|
381
381
|
* 就放行」,没有人需要记得回来改一个数。
|
|
382
382
|
*
|
|
383
383
|
* 🔴 **core 的拒绝谓词是两个析取项,本门只覆盖第一个**(对抗复审 F5 [low],验真后如实登记):
|
|
@@ -500,7 +500,7 @@ export declare function createMemoryConsolidationFaces(store: {
|
|
|
500
500
|
* 🔴 这只引擎是四只 operator 面里**真读名册**的那只:`consolidationEligibility` 第四臂
|
|
501
501
|
* (engine.js `listCaptureOptOutSessions`)拿它筛掉 opt-out 会话的贡献条目 —— SQL 部署上漏喂
|
|
502
502
|
* = 驱动器读文件空名册 ⇒ 蒸馏器放大用户明说不要记的内容(S-5 真实失效形;全站同批注入律,
|
|
503
|
-
* 机器钉 capture-optout-lane ②)。
|
|
503
|
+
* 机器钉 capture-optout-lane ②)。[ref] 起 local 车道在引擎接线时也供(core 文件三腿,同一只控制面);
|
|
504
504
|
* 缺席 ⇒ 记忆面暗(引擎未接线),与 Runner 同本。 */
|
|
505
505
|
captureRecordStore?: SessionCaptureRecordStore;
|
|
506
506
|
/** core 7.50.0:整理跑的**写判官座**(必填 —— 缺席不是「没有规则」,core 也拒)。操作面不判任何东西,只把它原样递给驱动动词:
|
|
@@ -7,7 +7,7 @@ import type { ApprovalExemptionStore } from "../plugins/approval-exemption-store
|
|
|
7
7
|
/** 本腿读的配置切面(`ServiceConfig` 结构满足)。两个构造口各自的切面 + lane 判别式读的 `remoteExec`。 */
|
|
8
8
|
export interface ParkedReviveGateConfigView extends DeploymentGovernanceConfigView, ApprovalBaselineConfigView {
|
|
9
9
|
readonly remoteExec?: ServiceConfig["remoteExec"];
|
|
10
|
-
/**
|
|
10
|
+
/** [ref]④:`executionLaneHomeDir` 读的运维声明(切面必须点名本腿消费的每一个字段,否则窄视图字面量会静默丢掉旋钮)。 */
|
|
11
11
|
readonly remoteExecHomeDir?: ServiceConfig["remoteExecHomeDir"];
|
|
12
12
|
/** host 腿裁决 env 的 cwd 占位根(见下方 `hostGateCwd`)。 */
|
|
13
13
|
readonly localDataRoot?: ServiceConfig["localDataRoot"];
|
|
@@ -63,7 +63,7 @@ export interface ParkedReviveGateDeps {
|
|
|
63
63
|
readonly autoModeSeatMounted?: boolean;
|
|
64
64
|
/** [ref]:父 run 的 auto 意图(core 7.34.0 起 = 父腿的 `permissionMode === "auto"`,旧键 `autoModeRequested` 已退役)——
|
|
65
65
|
* 意图武装式下重建 decider 的第三项。⚠️ 今日**本仓无读口**(RunRecord 无 body),生产装配不递 ⇒ 恒缺席。
|
|
66
|
-
*
|
|
66
|
+
* [ref] 登记:core 7.34.0 起子代 checkpoint 的数据半持久 `inheritedGate.permissionMode`(链在 spawn 时的**生效**模式),
|
|
67
67
|
* 这一座可改读它 —— 接线不在本次提货单内,见 7.106.0 收车档「未闭环」。 */
|
|
68
68
|
readonly parentAutoModeIntent?: ((row: BackgroundAgentRecord) => boolean) | undefined;
|
|
69
69
|
readonly logger: {
|
|
@@ -115,7 +115,7 @@ export type RebuiltParentConstraint = NonNullable<RebuiltInheritedGate["parentCo
|
|
|
115
115
|
* (core 对这三个都是 seed 兜底)。
|
|
116
116
|
*
|
|
117
117
|
* 时点语义(成文进 docs/ASSISTANT-WIRE-CONTRACT.md,免运维当 bug 报):
|
|
118
|
-
* · toolPolicy 轴 = **当前** config(与 resume 重折一致)。
|
|
118
|
+
* · toolPolicy 轴 = **当前** config(与 resume 重折一致)。[ref](core 7.35.0 [ref])起部署治理层经 `wrapToolPolicy` 携带内层 `projection`
|
|
119
119
|
* ⇒ 父链那一层的**内容**进了 `cpv1` 摘要:挂起期间改了治理 config(收紧或放松)⇒ 重建链摘要对不上 ⇒ core pre-CAS 响亮拒、卡留 pending
|
|
120
120
|
* (此前那一层 opaque,收紧与放松都按当前 config 兑现;特征化钉 test/parked-revive-e2e.test.ts 已随之翻);
|
|
121
121
|
* · shellGate 轴 = core 取 max(live, park 时 seed)—— 收紧兑现、放松**不**兑现(fail-safe)。
|
|
@@ -4,7 +4,8 @@ import { recordFailOpen } from "../observability/fail-open.js";
|
|
|
4
4
|
import { decodeCheckpointScope } from "../security.js";
|
|
5
5
|
import { createApprovalBaselinePolicy, createDeploymentGovernanceInputs, } from "../deployment-governance.js";
|
|
6
6
|
import { applyRuntimeGovernance } from "../runtime-governance.js";
|
|
7
|
-
import { DeferredSandboxPathEnv,
|
|
7
|
+
import { DeferredSandboxPathEnv, sandboxPathEnvSlots } from "./deferred-sandbox-path-env.js";
|
|
8
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "../deployment-shape.js";
|
|
8
9
|
import { executionLaneHomeDir } from "../execution-lane-caps.js";
|
|
9
10
|
import { createDeploymentListExemption } from "../approval.js";
|
|
10
11
|
function hostGateCwd(config, localRoot) {
|
|
@@ -17,7 +18,7 @@ export function createParkedReviveInheritedGate(deps) {
|
|
|
17
18
|
const metadata = await chainMetadataOf(deps, row, identity);
|
|
18
19
|
const laneHome = executionLaneHomeDir(config);
|
|
19
20
|
const homeBase = laneHome !== undefined ? { taskHome: laneHome } : {};
|
|
20
|
-
const pathAdjudication =
|
|
21
|
+
const pathAdjudication = DEPLOYMENT_SHAPE_PREDICATES.sandboxPathAdjudication.holds(config)
|
|
21
22
|
? {
|
|
22
23
|
env: new DeferredSandboxPathEnv({
|
|
23
24
|
sessionId: row.sessionId,
|
package/dist/boot/reapers.d.ts
CHANGED
|
@@ -70,12 +70,12 @@ export interface ReapersCtx {
|
|
|
70
70
|
subRunner: Runner;
|
|
71
71
|
runStore: ReturnType<StoreBackend["run"]> | undefined;
|
|
72
72
|
checkpointStore: CheckpointStoreFull | undefined;
|
|
73
|
-
/**
|
|
73
|
+
/** [ref]:checkpoint 店的 park 提交观察层(stage-06 与店同一处铸;在场 ⇔ 有 checkpoint 店)。对账收敛器订阅它,在停车行提交那一拍收口 PARKING。 */
|
|
74
74
|
parkCommits: ParkCommitWatch | undefined;
|
|
75
75
|
rateLimiter: RateLimiter | RateLimiterStore | undefined;
|
|
76
76
|
costQuota: CostQuota | CostQuotaStore | undefined;
|
|
77
77
|
toolResultStore: ToolResultStoreFull | undefined;
|
|
78
|
-
/**
|
|
78
|
+
/** [ref]:文件历史的**擦除脸**(后端在即在,与 `FILE_HISTORY_CAPTURE` 无关)—— 本段只用它的孤儿 blob GC。 */
|
|
79
79
|
fileHistoryErasure: FileHistoryErasureFace | undefined;
|
|
80
80
|
taskAttachmentStore: TaskAttachmentStore | undefined;
|
|
81
81
|
imageBakes: ImageBake | undefined;
|
|
@@ -103,9 +103,9 @@ export interface ReapersCtx {
|
|
|
103
103
|
* (`boot/permission-rules-audit.ts` 的 `DormantRuleCounter` 是同一条判据的先例)。
|
|
104
104
|
* 生产传的仍是整只束(结构上满足这个窄口)。 */
|
|
105
105
|
permissionRuleStores: PermissionRuleRetentionSweeper | undefined;
|
|
106
|
-
/**
|
|
106
|
+
/** [ref] 用户输入受理账本(stage-07 装配;缺席 = 无 backend)。每拍在 reapStale **之后**收敛一次(同一条腿串行,理由见 tick 里那一行)。 */
|
|
107
107
|
userInputLedger: Pick<UserInputLedger, "converge"> | undefined;
|
|
108
|
-
/**
|
|
108
|
+
/** [ref] 直连门 nonce 的消费记录店 —— 本 tick 只用它的**到期清扫**一手。行至多活 ~150 秒(= 证明还能被
|
|
109
109
|
* 受理的最后一刻),所以存量是「到达率 × TTL」而不是历史总量,清扫无需分批。无 backend 的 env-only
|
|
110
110
|
* 部署 ⇒ undefined ⇒ 本腿零调用(那种部署也没有 durable 审批门)。 */
|
|
111
111
|
approvalNonceStore: ApprovalNonceStore | undefined;
|
|
@@ -57,7 +57,7 @@ export interface ResolveSpecCtx {
|
|
|
57
57
|
backend: MemoryBackend;
|
|
58
58
|
root: string;
|
|
59
59
|
} | undefined;
|
|
60
|
-
/**
|
|
60
|
+
/** [ref]:记忆同步腿(开 `MEMORY_SYNC_*` 且记忆引擎接线时在场)—— 项目层准备一步把本任务的项目层交给它跟踪(`memory-project-layer.ts`)。 */
|
|
61
61
|
memorySyncRunner: MemorySyncRunner | undefined;
|
|
62
62
|
durableEnabled: boolean;
|
|
63
63
|
/** [ref] ([ref] 案二):活体 AskUserQuestion 面(QuestionCoordinator 的判决探针切面)。在场(=
|