@sema-agent/server 7.133.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 +221 -0
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/USAGE.md +222 -36
- package/deploy/sema-up/README.md +16 -0
- package/deploy/sema-up/chart/Chart.yaml +1 -1
- package/deploy/sema-up/chart/templates/NOTES.txt +15 -0
- package/deploy/sema-up/chart/templates/_helpers.tpl +129 -0
- package/deploy/sema-up/chart/templates/sealed-key.yaml +24 -0
- package/deploy/sema-up/chart/templates/server-v4pro.yaml +14 -0
- package/deploy/sema-up/chart/templates/server.yaml +14 -0
- package/deploy/sema-up/chart/values-full-single.yaml +5 -1
- package/deploy/sema-up/chart/values.yaml +34 -0
- package/dist/adoption/plan.d.ts +1 -1
- package/dist/approval-ask-audit-store.d.ts +25 -25
- package/dist/approval-ask-machine.d.ts +2 -2
- package/dist/approval-card.d.ts +66 -154
- package/dist/approval-card.js +33 -52
- package/dist/approval-content-kind.d.ts +26 -6
- package/dist/approval-content-kind.js +23 -3
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval-gate-currency.d.ts +91 -0
- package/dist/approval-gate-currency.js +120 -0
- 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 +14 -8
- package/dist/approval.js +35 -16
- 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 +7 -2
- package/dist/boot/coordinators.js +8 -5
- 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 +2 -0
- package/dist/boot/leader.js +2 -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/read-deny-anchor-audit.js +2 -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 +29 -16
- package/dist/boot/runner-deps.js +12 -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.d.ts +4 -3
- package/dist/boot/stage-06-runners.js +15 -4
- package/dist/boot/stage-07-capability-layer.d.ts +2 -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-09-leader.js +2 -2
- package/dist/boot/stage-10-http-server.d.ts +2 -1
- package/dist/boot/stage-10-http-server.js +2 -1
- package/dist/boot/stores.d.ts +8 -0
- package/dist/boot/stores.js +10 -13
- package/dist/boot/web-admin.d.ts +21 -15
- package/dist/boot/web-admin.js +16 -12
- package/dist/boot/workflow-orchestration.js +2 -9
- package/dist/brain.d.ts +11 -11
- package/dist/budget.d.ts +4 -4
- package/dist/budget.js +5 -1
- package/dist/caller-text-echo.d.ts +2 -0
- package/dist/caller-text-echo.js +2 -1
- package/dist/canonical-json.d.ts +2 -41
- package/dist/canonical-json.js +2 -13
- 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 +2 -2
- package/dist/capabilities/composite-members.js +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/mcp-probe.js +2 -2
- 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 +27 -24
- package/dist/capability-facts.js +18 -20
- package/dist/center-config-tier.d.ts +1 -1
- package/dist/center-credential.d.ts +4 -4
- package/dist/checkpoint-ctx-seal-m28.d.ts +42 -0
- package/dist/checkpoint-ctx-seal-m28.js +19 -0
- 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/field-conflict.d.ts +2 -1
- package/dist/field-conflict.js +1 -0
- package/dist/file-history-capture.d.ts +9 -9
- package/dist/file-history-disclosure.d.ts +50 -9
- package/dist/file-history-disclosure.js +8 -13
- package/dist/fleet/drain-entry.d.ts +2 -2
- package/dist/fleet/fleet-bus.d.ts +26 -14
- package/dist/fleet/fleet-bus.js +6 -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 +38 -20
- 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 +28 -5
- package/dist/http/approval-sweeps.d.ts +1 -1
- package/dist/http/approval-sweeps.js +5 -2
- package/dist/http/checkpoint-ctx.d.ts +183 -2
- package/dist/http/checkpoint-ctx.js +197 -2
- package/dist/http/dispatch.d.ts +3 -3
- package/dist/http/dispatch.js +3 -3
- package/dist/http/durable-run-leg.js +7 -5
- package/dist/http/idempotency.d.ts +4 -4
- package/dist/http/idempotency.js +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 +39 -13
- package/dist/http/principal-gate.js +30 -6
- package/dist/http/readiness.d.ts +1 -1
- package/dist/http/refusal-body.d.ts +12 -0
- package/dist/http/refusal-body.js +11 -0
- package/dist/http/request-guards.d.ts +4 -13
- package/dist/http/request-guards.js +4 -17
- package/dist/http/resume-ctx-read.d.ts +53 -6
- package/dist/http/resume-ctx-read.js +26 -3
- package/dist/http/resume-legs.d.ts +5 -4
- package/dist/http/resume-legs.js +47 -29
- package/dist/http/route-ctx.d.ts +29 -38
- package/dist/http/route-table.d.ts +9 -9
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/agents-roster.js +2 -3
- package/dist/http/routes/approvals-assistant.d.ts +5 -5
- package/dist/http/routes/approvals-assistant.js +91 -17
- 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 +6 -6
- package/dist/http/routes/diagnostics.js +1 -1
- package/dist/http/routes/fleet.d.ts +1 -1
- package/dist/http/routes/fleet.js +5 -4
- 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/memory-origin.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/rules.js +4 -4
- package/dist/http/routes/runs.js +44 -11
- package/dist/http/routes/session-sync.d.ts +3 -2
- package/dist/http/routes/session-sync.js +109 -62
- package/dist/http/routes/sessions-list.d.ts +1 -1
- package/dist/http/routes/sessions-list.js +4 -5
- package/dist/http/routes/sessions.js +34 -48
- package/dist/http/routes/tasks.d.ts +1 -1
- package/dist/http/routes/tasks.js +21 -16
- package/dist/http/routes/trace-usage.d.ts +1 -1
- package/dist/http/routes/trace-usage.js +7 -9
- 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 +39 -33
- package/dist/http/server.js +5 -2
- 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.d.ts +4 -3
- package/dist/http/submit-ctx.js +19 -3
- 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 +35 -24
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- 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 +9 -5
- package/dist/leader/wire.js +8 -7
- package/dist/list-entry-display.d.ts +1 -1
- package/dist/lsp-evict.d.ts +1 -1
- package/dist/main.js +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-origin-fence.js +2 -2
- 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-compat.d.ts +1 -1
- 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/prompt-manifest.d.ts +19 -8
- package/dist/observability/prompt-manifest.js +9 -8
- 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/observability/tool-trace.js +8 -9
- 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/orchestration/workflow-park-decision.d.ts +1 -1
- package/dist/orchestration/workflow-park-decision.js +1 -0
- package/dist/outbound-dispatcher.d.ts +4 -4
- package/dist/parent-watch.d.ts +4 -4
- package/dist/parked-decide.d.ts +20 -20
- package/dist/parked-decide.js +8 -5
- 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 +3 -25
- package/dist/permission-rule-vocab.js +0 -13
- 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/approval-payload-fingerprint.d.ts +14 -6
- package/dist/plugins/approval-payload-fingerprint.js +1 -1
- 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 +24 -33
- package/dist/plugins/caching-session-store.js +8 -19
- 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 +66 -67
- package/dist/plugins/checkpoint-store-sql.js +100 -103
- 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 +23 -12
- package/dist/plugins/local-checkpoint-store.js +29 -4
- package/dist/plugins/local-session-store.d.ts +44 -45
- package/dist/plugins/local-session-store.js +42 -52
- package/dist/plugins/local-session-window.d.ts +12 -6
- package/dist/plugins/local-session-window.js +1 -17
- 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 +76 -39
- package/dist/plugins/one-time-migrations.js +127 -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 +16 -19
- package/dist/plugins/permission-rule-store-sql.d.ts +38 -4
- package/dist/plugins/permission-rule-store-sql.js +74 -31
- 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 +9 -21
- package/dist/plugins/pg-session-storage.js +51 -42
- package/dist/plugins/remote-env-adb.d.ts +10 -10
- package/dist/plugins/remote-env-device.d.ts +22 -14
- package/dist/plugins/remote-env-device.js +28 -16
- 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.d.ts +11 -0
- package/dist/plugins/session-ownership.js +11 -0
- package/dist/plugins/session-placement.d.ts +12 -14
- package/dist/plugins/session-placement.js +2 -15
- 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 +17 -27
- package/dist/plugins/tidb-session-store.js +52 -42
- 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-tool-axes.d.ts +12 -0
- package/dist/request-tool-axes.js +20 -0
- 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/run-local.js +1 -0
- package/dist/runs.d.ts +15 -12
- package/dist/runs.js +19 -4
- 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 +34 -2
- package/dist/sealed-key.js +55 -1
- package/dist/security.d.ts +31 -32
- 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 +19 -12
- package/dist/session-error-wire.js +4 -1
- 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 +38 -11
- package/dist/session-sync-kernel.js +10 -0
- 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 +38 -5
- package/dist/task-cwd.d.ts +7 -88
- package/dist/task-cwd.js +2 -15
- package/dist/task-mcp.d.ts +14 -10
- package/dist/task-mcp.js +39 -12
- package/dist/task-settings.d.ts +34 -18
- package/dist/task-settings.js +34 -4
- 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 +273 -228
- package/dist/tool-approval.js +125 -47
- package/dist/tool-rule-names.d.ts +7 -1
- package/dist/trace/core-keyset-guard.d.ts +15 -9
- 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 +40 -1
- package/dist/trace/exit-seat.js +46 -14
- package/dist/trace/ledger-events.d.ts +6 -4
- package/dist/trace/ledger-sink.d.ts +1 -1
- package/dist/trace/model-segment.d.ts +3 -3
- package/dist/trace/project.d.ts +65 -46
- package/dist/trace/project.js +49 -5
- package/dist/trace/redact.d.ts +44 -27
- package/dist/trace/redact.js +343 -73
- package/dist/trace/self-minted-wire.d.ts +39 -14
- package/dist/trace/self-minted-wire.js +9 -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 +9 -3
- package/dist/trace/wire-projection-faces.js +7 -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 +29 -4
- package/dist/web-admin-client/skills-mcp.js +31 -4
- package/dist/web-admin-client/types.d.ts +17 -10
- 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 +35 -2
- package/scripts/drain-check.mysql.sql +22 -2
- package/scripts/drain-check.pg.sql +22 -2
- package/skills/loop.md +1 -1
- package/dist/mcp-tool-faces.d.ts +0 -69
- package/dist/mcp-tool-faces.js +0 -104
- package/dist/orchestration/workflow-journal-entry.js +0 -27
|
@@ -31,14 +31,13 @@ export declare const CAPABILITY_FACT_WHY: {
|
|
|
31
31
|
readonly subagent_registry_absent: "the sub-agent steer registry is not wired";
|
|
32
32
|
readonly subagent_output_face_absent: "the background sub-agent output face is not wired";
|
|
33
33
|
readonly task_handle_faces_absent: "the background task-handle output/stop faces are not wired";
|
|
34
|
-
readonly
|
|
34
|
+
readonly session_head_face_absent: "the session store has no by-id head read (sessionStorage.headOf — owner, occupant and leaf of a session row in one read)";
|
|
35
35
|
readonly checkpoint_store_absent: "no durable checkpoint store is wired (DURABLE_APPROVAL)";
|
|
36
36
|
readonly session_audit_absent: "no session audit view is wired (needs a durable session store)";
|
|
37
37
|
readonly session_watch_absent: "the session watch registry is not wired";
|
|
38
|
-
readonly session_leaf_face_absent: "the session store has no leaf-read face (sessionStorage.getLeafId)";
|
|
39
38
|
readonly session_lister_absent: "no session enumerator is wired (session store or run store listSessions)";
|
|
40
39
|
readonly session_fork_face_absent: "the session store has no fork face";
|
|
41
|
-
readonly session_row_faces_absent: "the session store has no session-row faces (
|
|
40
|
+
readonly session_row_faces_absent: "the session store has no session-row faces (headOf / sessionSummaryOf / patchSessionMeta)";
|
|
42
41
|
readonly session_purge_absent: "no session purge coordinator is wired";
|
|
43
42
|
readonly session_policy_store_absent: "no session policy store is wired";
|
|
44
43
|
readonly store_backend_absent: "no store backend is wired (DB_BACKEND=memory, multi-tenant bare boot, or half-configured SQL)";
|
|
@@ -121,48 +120,50 @@ export declare function taskHandles(d: Pick<Deps, "runStore" | "taskHandleOutput
|
|
|
121
120
|
output: Store<"taskHandleOutput">;
|
|
122
121
|
stop: Store<"taskHandleStop">;
|
|
123
122
|
}>;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
/** 会话店按 id 读一行的唯一读口在场(core `headOf`:属主 / 住客 / 叶子一次读;「有没有」与 `session-incarnation.ts` 的 `headReadOf` 同判)。 */
|
|
124
|
+
type HeadReadingSessionStore = WithMethods<OwnerAwareSessionStore, "headOf">;
|
|
125
|
+
/** 会话属主面在场(入站 owner 门的地基;缺它,带会话的门一律 fail-closed)。属主 = `headOf(id)?.owner`。 */
|
|
126
|
+
export declare function sessionOwnership(d: Pick<Deps, "sessionStorage">): Fact<"session_head_face_absent", {
|
|
127
|
+
sessionStorage: HeadReadingSessionStore;
|
|
128
128
|
}>;
|
|
129
|
-
export declare function mcpReconnect(d: Pick<Deps, "runStore" | "sessionStorage">): Fact<"run_store_absent" | "
|
|
129
|
+
export declare function mcpReconnect(d: Pick<Deps, "runStore" | "sessionStorage">): Fact<"run_store_absent" | "session_head_face_absent", {
|
|
130
130
|
runStore: Store<"runStore">;
|
|
131
|
-
sessionStorage:
|
|
131
|
+
sessionStorage: HeadReadingSessionStore;
|
|
132
132
|
}>;
|
|
133
133
|
export declare function sessionAuditView(d: Pick<Deps, "sessionAudit">): Fact<"session_audit_absent", {
|
|
134
134
|
sessionAudit: Store<"sessionAudit">;
|
|
135
135
|
}>;
|
|
136
|
-
|
|
136
|
+
/** 会话 SSE(watch 注册表 ∧ 头读:属主门与叶子都是 `headOf` 的投影)。 */
|
|
137
|
+
export declare function sessionEventStream(d: Pick<Deps, "sessionWatch" | "sessionStorage">): Fact<"session_watch_absent" | "session_head_face_absent", {
|
|
137
138
|
watch: Store<"sessionWatch">;
|
|
138
|
-
sessionStorage:
|
|
139
|
+
sessionStorage: HeadReadingSessionStore;
|
|
139
140
|
}>;
|
|
140
141
|
type SessionLister = NonNullable<OwnerAwareSessionStore["listSessions"]>;
|
|
141
142
|
/** 会话枚举面:session 店的 `listSessions`,否则老形 run 店聚合。见证 = 已绑好宿主的那一只。 */
|
|
142
143
|
export declare function sessionList(d: Pick<Deps, "sessionStorage" | "runStore">): Fact<"session_lister_absent", {
|
|
143
144
|
lister: SessionLister;
|
|
144
145
|
}>;
|
|
145
|
-
export declare function sessionFork(d: Pick<Deps, "sessionStorage">): Fact<"session_fork_face_absent" | "
|
|
146
|
-
sessionStorage: WithMethods<OwnerAwareSessionStore, "
|
|
146
|
+
export declare function sessionFork(d: Pick<Deps, "sessionStorage">): Fact<"session_fork_face_absent" | "session_head_face_absent", {
|
|
147
|
+
sessionStorage: WithMethods<OwnerAwareSessionStore, "headOf" | "fork">;
|
|
147
148
|
}>;
|
|
148
|
-
/** 会话行可写位(`PATCH /v1/sessions/:id`)
|
|
149
|
-
* 三只 durable 店(SQL 双生 / local)都带;内存 dev
|
|
149
|
+
/** 会话行可写位(`PATCH /v1/sessions/:id`):会话店的头读(属主 + 化身一次读 —— 门判属主、写与读回按化身条件)∧ 行写口(写后按同一住客读回)。
|
|
150
|
+
* 三只 durable 店(SQL 双生 / local)都带;内存 dev 店没有行写口 ⇒ 501。
|
|
150
151
|
* 本面**没有**独立能力位(契约附录 B.2c 登记):老 worker 对这一动词答 405,本事实为假的部署答 501。 */
|
|
151
152
|
export declare function sessionPatch(d: Pick<Deps, "sessionStorage">): Fact<"session_row_faces_absent", {
|
|
152
|
-
sessionStorage: WithMethods<OwnerAwareSessionStore, "
|
|
153
|
+
sessionStorage: WithMethods<OwnerAwareSessionStore, "headOf" | "patchSessionMeta">;
|
|
153
154
|
}>;
|
|
154
|
-
export declare function sessionDelete(d: Pick<Deps, "purgeSession" | "sessionStorage">): Fact<"session_purge_absent" | "
|
|
155
|
+
export declare function sessionDelete(d: Pick<Deps, "purgeSession" | "sessionStorage">): Fact<"session_purge_absent" | "session_head_face_absent", {
|
|
155
156
|
purge: Store<"purgeSession">;
|
|
156
|
-
sessionStorage:
|
|
157
|
+
sessionStorage: HeadReadingSessionStore;
|
|
157
158
|
}>;
|
|
158
|
-
export declare function sessionPolicy(d: Pick<Deps, "sessionPolicyStore" | "sessionStorage">): Fact<"session_policy_store_absent" | "
|
|
159
|
+
export declare function sessionPolicy(d: Pick<Deps, "sessionPolicyStore" | "sessionStorage">): Fact<"session_policy_store_absent" | "session_head_face_absent", {
|
|
159
160
|
policyStore: Store<"sessionPolicyStore">;
|
|
160
|
-
sessionStorage:
|
|
161
|
+
sessionStorage: HeadReadingSessionStore;
|
|
161
162
|
}>;
|
|
162
|
-
type SyncSessionStore = WithMethods<OwnerAwareSessionStore, "exportEntries" | "exportEntriesStream" | "beginImportStaging" | "
|
|
163
|
+
type SyncSessionStore = WithMethods<OwnerAwareSessionStore, "exportEntries" | "exportEntriesStream" | "beginImportStaging" | "headOf" | "sessionSummaryOf" | "patchSessionMeta">;
|
|
163
164
|
type SessionSyncWhy = "store_backend_absent" | "file_history_store_absent" | "session_export_absent" | "session_import_staging_absent" | "session_row_faces_absent" | "policy_purge_absent";
|
|
164
165
|
/** 会话对等同步的**对话半族**(manifest / entries / plan / import 两相):后端 ∧ 文件历史店 ∧ 导出两面 ∧ staged 导入面 ∧
|
|
165
|
-
* 会话行三口(
|
|
166
|
+
* 会话行三口(门读头 `headOf` —— 属主 + 化身一次读,属主判门、化身给 identical 短路腿;manifest 带 `title` / `pinned`;导入经唯一写口按导入落定的
|
|
166
167
|
* 那一位住客重放它们)∧ policy 店能清(overwrite-dst 的 commit 要擦目的端旧 policy 行)。
|
|
167
168
|
* 文件历史的 blob 搬运是另一只事实。 */
|
|
168
169
|
export declare function sessionSync(d: Pick<Deps, "backend" | "sessionStorage" | "fileHistoryStore" | "sessionPolicyStore">): Fact<SessionSyncWhy, {
|
|
@@ -205,7 +206,7 @@ export declare function streamApproval(d: Pick<Deps, "toolApproval" | "config" |
|
|
|
205
206
|
* 读根授权(「Yes, and add directory」)这台部署**受理不受理** —— `GET /v1/capabilities` 的 `approvalReadRootGrant` 位,与
|
|
206
207
|
* `POST /v1/tool-approvals/:id/respond` 对应答体 `readRootGrant` 的受理门**读同一只**(位说不受理而口照收,就是「位说 X、行为不是 X」)。
|
|
207
208
|
*
|
|
208
|
-
* 判据 =
|
|
209
|
+
* 判据 = 部署形表行 `callerOwnsWorkerDisk`(手在本 worker 盘上 ∧ 单主;与调用方附加目录同一条信任边界):授权把一个**宿主目录**加进本 run 的读目录,
|
|
209
210
|
* 只有「这台机器一个可信主人」的姿态才有这个授权的语义;多租户与云上 / 容器车道的读面另有归宿(沙箱内的读面档位见 `READ_FACE`)。
|
|
210
211
|
* 消费方的选项可见条件是**合取**:卡上有 `readRootCandidate`(逐卡位,引擎铸)∧ 本位为真。位缺席 = 老 server(不受理)。
|
|
211
212
|
* 没有别的端点按本位判可用与否 —— 它只管应答体里的这一键。
|
|
@@ -220,6 +221,8 @@ export declare function readRootGrant(d: Pick<Deps, "config">): Fact<"read_root_
|
|
|
220
221
|
* · 活卡协调器缺席 ⇒ `[]`(没有审批卡可呈)。
|
|
221
222
|
* 对 why 闭集穷举:`streamApproval` 的拒因多一个 ⇒ 这里编译红,逼着给新拒因定族。三条执行腿选族读的是同一只判据的 `active`,
|
|
222
223
|
* 与本映射的「在场 ⇒ 呈卡族」是同一条规则(真腿对拍钉在 `test/stream-approval-on-e2e.test.ts`)。没有端点按它拒:它是消费方分派帧族的读点,`streamApproval` 的词义不变。
|
|
224
|
+
* [ref]:它也是壳**声明**的依据 —— 一条 run 只在 `settings.approvalFrameFamilies` 含本位那一个族时有活审批通道(三条腿判的是同一只映射
|
|
225
|
+
* `presentedApprovalFrameFamily`);不含 ⇒ 这条腿不呈卡,问当场交无人值守政策口。本位的值不因声明而变。
|
|
223
226
|
*/
|
|
224
227
|
export declare function approvalFrameFamilies(stream: ReturnType<typeof streamApproval>): readonly ApprovalFrameFamily[];
|
|
225
228
|
export declare function deviceLane(d: Pick<Deps, "deviceHub">): Fact<"device_hub_absent", {
|
|
@@ -339,7 +342,7 @@ export declare function workflowsJournal(d: Pick<Deps, "workflowRunStore" | "wor
|
|
|
339
342
|
* `workspace-space.ts`;`persist` 缺省 `space`,`off` = 每轮新建)。**唯一读法**:能力位 `workspaceSync` 投影它的见证,k8s 适配器工厂(`boot/execution-env.ts`)把同一份
|
|
340
343
|
* 见证交给适配器(适配器自己不再解析策略)。`persist: "off"` 仍是 available(存储在、没开 —— 缺省或运维显式 off)—— 与缺席不同义。
|
|
341
344
|
*
|
|
342
|
-
* **为何只读配置仍恒真**:`space` 的空间按会话住客分区、按 run 店的一行提交 —— 住客只有一只按 id 读(会话店的 `
|
|
345
|
+
* **为何只读配置仍恒真**:`space` 的空间按会话住客分区、按 run 店的一行提交 —— 住客只有一只按 id 读(会话店的 `headOf`,
|
|
343
346
|
* 会话行上的那一格),行住在存储后端里。缺一的组合在起服时就被拒(`boot/execution-env.ts` 的 `assertWorkspaceSpaceReadable`,装配第 5 段,
|
|
344
347
|
* 读的正是本事实的见证)⇒ 凡是起得来、报 `space` 的部署都读得出住客、写得下行,本事实不需要运行期依赖(再加一位 = 同一前提两处判)。
|
|
345
348
|
* 剩下的「这条 run 读不到住客」是逐 run 的读失败(适配器的 `unavailable` 臂,响亮一行),不是部署形。
|
package/dist/capability-facts.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { buildOperatorRosterWayOut, operatorRosterPresent } from "./http/principal-gate.js";
|
|
2
2
|
import { mcpInjectionHonored } from "./task-mcp.js";
|
|
3
|
-
import {
|
|
4
|
-
import { resolveStreamApprovalGate } from "./tool-approval.js";
|
|
3
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "./deployment-shape.js";
|
|
4
|
+
import { presentedApprovalFrameFamily, resolveStreamApprovalGate } from "./tool-approval.js";
|
|
5
5
|
import { selfOrchestrationDenial } from "./task-workflow.js";
|
|
6
6
|
import { centerEntitlementSourceWired } from "./runtime-caps-resolver.js";
|
|
7
7
|
import { overwriteWipeIncapable } from "./session-sync.js";
|
|
8
8
|
import { WORKSPACE_PERSIST_DEFAULT, WORKSPACE_SNAPSHOT_KEEP_DEFAULT, workspaceSnapshotTimeoutOf } from "./workspace-space.js";
|
|
9
|
+
import { headReadOf } from "./session-incarnation.js";
|
|
9
10
|
export const CAPABILITY_FACT_WHY = {
|
|
10
11
|
run_store_absent: "no durable run store is wired (DB_BACKEND=mysql|pg|local)",
|
|
11
12
|
subagent_registry_absent: "the sub-agent steer registry is not wired",
|
|
12
13
|
subagent_output_face_absent: "the background sub-agent output face is not wired",
|
|
13
14
|
task_handle_faces_absent: "the background task-handle output/stop faces are not wired",
|
|
14
|
-
|
|
15
|
+
session_head_face_absent: "the session store has no by-id head read (sessionStorage.headOf — owner, occupant and leaf of a session row in one read)",
|
|
15
16
|
checkpoint_store_absent: "no durable checkpoint store is wired (DURABLE_APPROVAL)",
|
|
16
17
|
session_audit_absent: "no session audit view is wired (needs a durable session store)",
|
|
17
18
|
session_watch_absent: "the session watch registry is not wired",
|
|
18
|
-
session_leaf_face_absent: "the session store has no leaf-read face (sessionStorage.getLeafId)",
|
|
19
19
|
session_lister_absent: "no session enumerator is wired (session store or run store listSessions)",
|
|
20
20
|
session_fork_face_absent: "the session store has no fork face",
|
|
21
|
-
session_row_faces_absent: "the session store has no session-row faces (
|
|
21
|
+
session_row_faces_absent: "the session store has no session-row faces (headOf / sessionSummaryOf / patchSessionMeta)",
|
|
22
22
|
session_purge_absent: "no session purge coordinator is wired",
|
|
23
23
|
session_policy_store_absent: "no session policy store is wired",
|
|
24
24
|
store_backend_absent: "no store backend is wired (DB_BACKEND=memory, multi-tenant bare boot, or half-configured SQL)",
|
|
@@ -96,7 +96,7 @@ export function taskHandles(d) {
|
|
|
96
96
|
}
|
|
97
97
|
export function sessionOwnership(d) {
|
|
98
98
|
const s = d.sessionStorage;
|
|
99
|
-
return s
|
|
99
|
+
return headReadOf(s) !== undefined ? yes({ sessionStorage: s }) : no("session_head_face_absent");
|
|
100
100
|
}
|
|
101
101
|
export function mcpReconnect(d) {
|
|
102
102
|
const runs = durableRuns(d);
|
|
@@ -113,12 +113,10 @@ export function sessionAuditView(d) {
|
|
|
113
113
|
export function sessionEventStream(d) {
|
|
114
114
|
if (d.sessionWatch === undefined)
|
|
115
115
|
return no("session_watch_absent");
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
return no("session_owner_face_absent");
|
|
121
|
-
return yes({ watch: d.sessionWatch, sessionStorage: s });
|
|
116
|
+
const owned = sessionOwnership(d);
|
|
117
|
+
if (!owned.available)
|
|
118
|
+
return owned;
|
|
119
|
+
return yes({ watch: d.sessionWatch, sessionStorage: owned.sessionStorage });
|
|
122
120
|
}
|
|
123
121
|
export function sessionList(d) {
|
|
124
122
|
const lister = d.sessionStorage?.listSessions?.bind(d.sessionStorage) ?? d.runStore?.listSessions?.bind(d.runStore);
|
|
@@ -128,13 +126,13 @@ export function sessionFork(d) {
|
|
|
128
126
|
const s = d.sessionStorage;
|
|
129
127
|
if (s?.fork === undefined)
|
|
130
128
|
return no("session_fork_face_absent");
|
|
131
|
-
if (s
|
|
132
|
-
return no("
|
|
129
|
+
if (headReadOf(s) === undefined)
|
|
130
|
+
return no("session_head_face_absent");
|
|
133
131
|
return yes({ sessionStorage: s });
|
|
134
132
|
}
|
|
135
133
|
export function sessionPatch(d) {
|
|
136
134
|
const s = d.sessionStorage;
|
|
137
|
-
if (s
|
|
135
|
+
if (headReadOf(s) === undefined || s?.patchSessionMeta === undefined)
|
|
138
136
|
return no("session_row_faces_absent");
|
|
139
137
|
return yes({ sessionStorage: s });
|
|
140
138
|
}
|
|
@@ -164,7 +162,7 @@ export function sessionSync(d) {
|
|
|
164
162
|
return no("session_export_absent");
|
|
165
163
|
if (s.beginImportStaging === undefined)
|
|
166
164
|
return no("session_import_staging_absent");
|
|
167
|
-
if (s
|
|
165
|
+
if (headReadOf(s) === undefined || s.sessionSummaryOf === undefined || s.patchSessionMeta === undefined)
|
|
168
166
|
return no("session_row_faces_absent");
|
|
169
167
|
if (overwriteWipeIncapable(d.sessionPolicyStore))
|
|
170
168
|
return no("policy_purge_absent");
|
|
@@ -196,7 +194,7 @@ export function streamApproval(d) {
|
|
|
196
194
|
toolApprovalEnabled: d.toolApproval !== undefined,
|
|
197
195
|
streamApprovalEnabled: d.config.streamApproval?.enabled === true,
|
|
198
196
|
backend: d.backend,
|
|
199
|
-
|
|
197
|
+
checkpointStore: d.checkpointStore,
|
|
200
198
|
});
|
|
201
199
|
if (gate.active)
|
|
202
200
|
return yes({ askStore: gate.askStore });
|
|
@@ -216,18 +214,18 @@ export function streamApproval(d) {
|
|
|
216
214
|
}
|
|
217
215
|
}
|
|
218
216
|
export function readRootGrant(d) {
|
|
219
|
-
return
|
|
217
|
+
return DEPLOYMENT_SHAPE_PREDICATES.callerOwnsWorkerDisk.holds(d.config) ? YES : no("read_root_grant_posture_refused");
|
|
220
218
|
}
|
|
221
219
|
export function approvalFrameFamilies(stream) {
|
|
222
220
|
if (stream.available)
|
|
223
|
-
return [
|
|
221
|
+
return [presentedApprovalFrameFamily(true)];
|
|
224
222
|
switch (stream.why) {
|
|
225
223
|
case "tool_approval_disabled":
|
|
226
224
|
return [];
|
|
227
225
|
case "stream_approval_disabled":
|
|
228
226
|
case "store_backend_absent":
|
|
229
227
|
case "checkpoint_store_absent":
|
|
230
|
-
return [
|
|
228
|
+
return [presentedApprovalFrameFamily(false)];
|
|
231
229
|
default: {
|
|
232
230
|
const unhandled = stream.why;
|
|
233
231
|
throw new Error(`unhandled stream-approval why: ${JSON.stringify(unhandled)}`);
|
|
@@ -69,7 +69,7 @@ export interface CenterCredentialSource {
|
|
|
69
69
|
read(): CenterCredentialRead;
|
|
70
70
|
health(): CenterCredentialHealth;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* [ref]:每次取值之后**同步**回调一次(入参 = 这次的结果,已记进健康态)。续签器的唯一触发口(设计 §2「每次取值后,
|
|
73
73
|
* 读到 user-session 信封且在提前量内 ⇒ 排队一次续签」)。返回退订。回调不许抛(抛 = 这次取值跟着抛,响亮)。
|
|
74
74
|
*/
|
|
75
75
|
onRead(listener: (read: CenterCredentialRead) => void): () => void;
|
|
@@ -92,7 +92,7 @@ export type CenterCredentialSourceSpec = Exclude<WebAdminCredentialDeclaration,
|
|
|
92
92
|
readonly multiTenant: boolean;
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
|
-
* 读两个声明键 —— 判定全交 settings-schema 的判官 `judgeWebAdminCredentialDeclaration`(
|
|
95
|
+
* 读两个声明键 —— 判定全交 settings-schema 的判官 `judgeWebAdminCredentialDeclaration`([ref]:二选一规则的**唯一**实现;空串 = 未设、
|
|
96
96
|
* 不 trim;两个都设 ⇒ throw,boot 拒启,拒句点名两个键、不回显值)。本仓只多读方自己的那一步:文件路径按本进程 cwd 解析成绝对
|
|
97
97
|
* 路径(之后 cwd 变了也读同一个文件 —— 纯契约不碰 `node:path`,这一步归读方)。
|
|
98
98
|
*/
|
|
@@ -128,7 +128,7 @@ export declare const CENTER_CREDENTIAL_REFUSAL_CODES: {
|
|
|
128
128
|
};
|
|
129
129
|
export type CenterCredentialRefusalCode = (typeof CENTER_CREDENTIAL_REFUSAL_CODES)[keyof typeof CENTER_CREDENTIAL_REFUSAL_CODES];
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* [ref] —— boot 读到的凭证怎么处置(`boot/web-admin.ts` 执行,规则只在这里):
|
|
132
132
|
* · `missing` / `expired` ⇒ 响亮(error 级一行),照常起服 —— 前者是「此刻没有凭证」(登出形,文件出现即恢复),
|
|
133
133
|
* 后者续签器立刻续签;
|
|
134
134
|
* · `malformed` / `multi_tenant_session` ⇒ **拒启**,拒句带码、点名文件键,不回显内容(`reason` 由本模块铸,本来就不含内容)。
|
|
@@ -144,7 +144,7 @@ export declare function scopedTokenNeedsWorker(read: CenterCredentialRead, worke
|
|
|
144
144
|
*/
|
|
145
145
|
export declare function centerStateBin(worker: string | undefined, identity: string): string;
|
|
146
146
|
/** 此刻凭证的身份(每次现读);取不到凭证 ⇒ `undefined`(身份未知)—— 唯一例外是 `expired`:令牌不许出站,但信封还读得出
|
|
147
|
-
* 是谁(
|
|
147
|
+
* 是谁([ref]:过期不等于换了人,盘上 LKG / prompt 分箱照常对得上)。「我现在是谁」只有这一只读法。 */
|
|
148
148
|
export declare function credentialIdentityNow(source: CenterCredentialSource): string | undefined;
|
|
149
149
|
/**
|
|
150
150
|
* [ref] E-15 ② —— 一次中心往返的答复**仍属于此刻的凭证**:发出它所用的身份 = 此刻的身份。
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 一次性迁移 M28 —— 升级之前写下的停驻行(`checkpoint_ctx`)里,请求面凭据位上的明文起服**原地封好**。
|
|
3
|
+
* 🔴 M28 · 窗口见 `plugins/one-time-migrations.ts` 的 ONE_TIME_MIGRATIONS 登记表(窗、删法、删后由谁接住只写在那一行)。
|
|
4
|
+
*
|
|
5
|
+
* ## 为什么要它(持久数据面)
|
|
6
|
+
* 7.134.0 起凭据位上的值在 ctx 里只以封签存在(规则属主 `http/checkpoint-ctx.ts` 末段「凭据位密封」),续跑上下文读口对凭据位上的明文答
|
|
7
|
+
* 409 `conflict.checkpoint_ctx_unsealable`(`reason:"plaintext"`)。升级前停驻的行是明文 —— 持久数据面不能「翻红」,所以起服扫一遍、用**同一只**封口
|
|
8
|
+
* (`sealStoredCheckpointCtxM28`,与写侧 `sealCheckpointCtx` 同一只走法)封好、原地回写;不删行、不动续跑时钟、已封的与不带凭据的行零写。
|
|
9
|
+
*
|
|
10
|
+
* ## 为什么不在 `one-time-migrations.ts` 的迁移段里
|
|
11
|
+
* 封要保管店派生的封签器,而那一段跑在店层(起服第 3 段,`openStores`),比建店的 web-admin 运行时能把封签器交下去的地方早、也不该反向依赖它;
|
|
12
|
+
* 本条在起服第 6 段 checkpoint 店建成、封签器的装配判(`CHECKPOINT_CTX_SEALING_REQUIRED`)过了之后调一次,早于任何路由装配(与 M10 / M19 / M25
|
|
13
|
+
* 同为在迁移段之外跑的条目)。读数一行 info `checkpoint_ctx_credentials_sealed`,不进 `OneTimeMigrationReport`(登记行 `reportKeys` 空)。
|
|
14
|
+
*/
|
|
15
|
+
import { type CheckpointCtxSealer, type SealedCheckpointCtx } from "./http/checkpoint-ctx.js";
|
|
16
|
+
import { type OneTimeMigrationWindow } from "./plugins/one-time-migrations.js";
|
|
17
|
+
import type { CtxRowsRewriteM28 } from "./plugins/checkpoint-store-sql.js";
|
|
18
|
+
/** 两孪生的店腿(`SqlCheckpointStore` / `LocalCheckpointStore` 的 `rewriteCtxRowsM28`)。 */
|
|
19
|
+
export interface CheckpointCtxRowsRewriterM28 {
|
|
20
|
+
rewriteCtxRowsM28(rewrite: (sessionId: string, ctx: object) => {
|
|
21
|
+
readonly ctx: SealedCheckpointCtx;
|
|
22
|
+
readonly values: number;
|
|
23
|
+
} | undefined): Promise<CtxRowsRewriteM28>;
|
|
24
|
+
}
|
|
25
|
+
/** M28 一次起服的读数(起服 info 行逐键打出;测试按它断言)。`window: "closed"` ⇒ 一行都没读(其余全 0)。 */
|
|
26
|
+
export interface CheckpointCtxSealM28Report {
|
|
27
|
+
readonly window: "open" | "closed";
|
|
28
|
+
readonly rowsScanned: number;
|
|
29
|
+
readonly rowsSealed: number;
|
|
30
|
+
readonly valuesSealed: number;
|
|
31
|
+
readonly rowsUnreadable: number;
|
|
32
|
+
readonly rowsTooLarge: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 跑一次 M28(`today` = UTC 日历日 YYYY-MM-DD;`window` 缺省 = 登记表 M28 那一行 —— 只有测试递别的窗)。窗关 ⇒ 不扫。
|
|
36
|
+
* 店腿的每一行:`sealStoredCheckpointCtxM28` 交回新体(凭据位上的明文封好)⇒ 回写;交回 `undefined`(没有明文)⇒ 不写。
|
|
37
|
+
*/
|
|
38
|
+
export declare function sealCheckpointCtxCredentialsM28(store: CheckpointCtxRowsRewriterM28, sealer: CheckpointCtxSealer, opts: {
|
|
39
|
+
readonly today: string;
|
|
40
|
+
readonly window?: Pick<OneTimeMigrationWindow, "removableAfter">;
|
|
41
|
+
}): Promise<CheckpointCtxSealM28Report>;
|
|
42
|
+
//# sourceMappingURL=checkpoint-ctx-seal-m28.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { sealStoredCheckpointCtxM28 } from "./http/checkpoint-ctx.js";
|
|
2
|
+
import { ONE_TIME_MIGRATIONS, migrationWindowOpen } from "./plugins/one-time-migrations.js";
|
|
3
|
+
function m28Window() {
|
|
4
|
+
const row = ONE_TIME_MIGRATIONS.find((w) => w.id === "M28");
|
|
5
|
+
if (row === undefined)
|
|
6
|
+
throw new Error("checkpoint-ctx-seal-m28: the one-time migration registry has no M28 row — this migration outlived its registry row; delete it with that row");
|
|
7
|
+
return row;
|
|
8
|
+
}
|
|
9
|
+
export async function sealCheckpointCtxCredentialsM28(store, sealer, opts) {
|
|
10
|
+
if (!migrationWindowOpen(opts.window ?? m28Window(), opts.today)) {
|
|
11
|
+
return { window: "closed", rowsScanned: 0, rowsSealed: 0, valuesSealed: 0, rowsUnreadable: 0, rowsTooLarge: 0 };
|
|
12
|
+
}
|
|
13
|
+
const r = await store.rewriteCtxRowsM28((sessionId, ctx) => {
|
|
14
|
+
const out = sealStoredCheckpointCtxM28(ctx, sealer, sessionId);
|
|
15
|
+
return out === undefined ? undefined : { ctx: out.ctx, values: out.valuesSealed };
|
|
16
|
+
});
|
|
17
|
+
return { window: "open", rowsScanned: r.scanned, rowsSealed: r.rewritten, valuesSealed: r.valuesRewritten, rowsUnreadable: r.unreadable, rowsTooLarge: r.tooLarge };
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=checkpoint-ctx-seal-m28.js.map
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** `checkpointId` 的长度上界(见本文件头注第 2 条)。 */
|
|
2
2
|
export declare const MAX_CHECKPOINT_ID_CHARS = 128;
|
|
3
|
+
/**
|
|
4
|
+
* 一句要出店的话(日志 / 探针行)里**不许**含这一行的 token:大小写不敏感地把每一处换成记号 —— 与 {@link trustedCheckpointId} 同一条「包含关系 + 大小写不敏感」判据,
|
|
5
|
+
* 用在交不了值、只交得了一句话的出口(引擎铸的披露句按 checkpoint id 点名,而 id 可能被写成了 token)。token 为空 ⇒ 原句。
|
|
6
|
+
*/
|
|
7
|
+
export declare function withoutCheckpointToken(text: string, token: unknown): string;
|
|
3
8
|
/** 持久层读出的 `checkpointId` 过信任边界:是串、非空、不超长、不含 token(大小写不敏感)⇒ 原值;否则 `undefined`。判据全文见本文件头注。 */
|
|
4
9
|
export declare function trustedCheckpointId(raw: unknown, token: unknown): string | undefined;
|
|
5
10
|
/** 带 `checkpointId` 当 join 键的两类 durable 读面(计数 detail 的 `face`)。 */
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { recordFailOpen } from "./observability/fail-open.js";
|
|
2
2
|
export const MAX_CHECKPOINT_ID_CHARS = 128;
|
|
3
|
+
export function withoutCheckpointToken(text, token) {
|
|
4
|
+
const secret = token === undefined || token === null ? "" : String(token);
|
|
5
|
+
if (secret === "")
|
|
6
|
+
return text;
|
|
7
|
+
const lower = text.toLowerCase();
|
|
8
|
+
const needle = secret.toLowerCase();
|
|
9
|
+
let out = "";
|
|
10
|
+
let from = 0;
|
|
11
|
+
for (let at = lower.indexOf(needle); at !== -1; at = lower.indexOf(needle, from)) {
|
|
12
|
+
out += `${text.slice(from, at)}«checkpoint token»`;
|
|
13
|
+
from = at + needle.length;
|
|
14
|
+
}
|
|
15
|
+
return out + text.slice(from);
|
|
16
|
+
}
|
|
3
17
|
export function trustedCheckpointId(raw, token) {
|
|
4
18
|
if (typeof raw !== "string" || raw === "" || raw.length > MAX_CHECKPOINT_ID_CHARS)
|
|
5
19
|
return undefined;
|
package/dist/config-catalog.d.ts
CHANGED
|
@@ -36,12 +36,12 @@ export interface ConfigCatalogSpec {
|
|
|
36
36
|
readonly danger?: readonly CatalogDangerAxis[];
|
|
37
37
|
readonly enumValues?: readonly string[];
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* [ref]① —— 本行**回显**得出的词集(`enumValues` 的子集;缺席 ⇒ 与 `enumValues` 同集)。
|
|
40
40
|
*
|
|
41
41
|
* 🔴 `enumValues` 一直是**两义**的:它既是行对外宣告的「你可以写哪些词」([ref] 件⑤/⑧ 两条钉逐字锚
|
|
42
42
|
* 这一义:窄了=少宣告一档、宽了=宣告一个 boot 会拒的词),又被回显校验当成「实算值合不合法」的闭集。
|
|
43
43
|
* 两义在**多数**行上碰巧同集,于是差别只活在散文里 —— `MANUAL_MODE_SHELL_GATE` 的
|
|
44
|
-
* `derivedDefaultNote` 写着「真姿态只有 always 一个」(
|
|
44
|
+
* `derivedDefaultNote` 写着「真姿态只有 always 一个」([ref] 前是 always/classify 两个),`MODEL_DEFAULT_THINKING` 写着
|
|
45
45
|
* 「缺席/off ⇒ 不铸」,而**没有任何一条腿读那两句话**:`off` 照样留在回显闭集里,回显校验对它放行。
|
|
46
46
|
*
|
|
47
47
|
* ⇒ 把那半句散文变成一处**校验腿真读的声明**:`sanitizeEnumValue` 问 `echoWords ?? enumValues`,
|
|
@@ -53,7 +53,7 @@ export interface ConfigCatalogSpec {
|
|
|
53
53
|
*/
|
|
54
54
|
readonly echoWords?: readonly string[];
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* [ref] —— **底层布尔 ↔ 闭集词**的行内映射,只给「实算腿回布尔、而行对外说词」的 enum 行。
|
|
57
57
|
*
|
|
58
58
|
* 为什么写在行上而不是建第二张全局极性表:`config.ts` 的极性表(`ConfigKnobRecord`)记的是
|
|
59
59
|
* **布尔旋钮**的来源与默认方向,它压根不带词 —— 拿它当 `true→enumValues[0]` 的位置约定用,等于
|
|
@@ -73,7 +73,7 @@ export interface ConfigCatalogSpec {
|
|
|
73
73
|
*
|
|
74
74
|
* 🔴 第二参是**部署 env**,不是第五条供值腿:有几根旋钮的属主不在 `ServiceConfig` 上(它在装配点按
|
|
75
75
|
* env 现算,如 WebSearch 后端),而目录的纪律是「回显属主算出来的值」—— 只能把同一条实算腿的入参放宽,
|
|
76
|
-
* 不能在目录里再抄一遍属主的读法(
|
|
76
|
+
* 不能在目录里再抄一遍属主的读法([ref] / codex r1 F3 的成案:抄一遍就是第二个写者,当场分歧)。
|
|
77
77
|
*/
|
|
78
78
|
readonly resolve?: (config: ServiceConfig, env: NodeJS.ProcessEnv, boot: CatalogBootFacts) => CatalogValue | undefined;
|
|
79
79
|
readonly center?: CatalogCenterSeatSpec;
|
|
@@ -94,12 +94,12 @@ export interface ConfigCatalogRowCenter {
|
|
|
94
94
|
readonly effectiveNow: boolean;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
* 行上**对 `effectiveValue` 的判词位**(闭集;
|
|
97
|
+
* 行上**对 `effectiveValue` 的判词位**(闭集;[ref] 收成一族)—— 每一位**只在为真时铸 `true`、恒不铸 `false`**,缺席 = 这一格没有这件事
|
|
98
98
|
* (不是「不知道」)。净化器({@link sanitizeValue})一次读出值与判词,行投影原样铺平 —— 判词位只有这一种形,第三个判词位加进本闭集即受同一条约束。
|
|
99
|
-
* · `effectiveValueInvalid`(
|
|
99
|
+
* · `effectiveValueInvalid`([ref],additive)—— 本行的实算值**落在它自己宣告的回显闭集之外**(`echoWords ?? enumValues`,[ref]①),
|
|
100
100
|
* 或它的实算腿回了一个本行没有声明映射的布尔。在场时 `effectiveValue` 恒 `null`:回显一个集外值等于目录在教消费方写一个写回去就非法的词,
|
|
101
101
|
* 而**静默丢**会让「配错了」与「真的没设」在 wire 上同形([ref] 响亮臂)。只服务闭集族(`type:"enum"`)。
|
|
102
|
-
* · `effectiveValueWithheld`(
|
|
102
|
+
* · `effectiveValueWithheld`([ref],additive)—— `type:"url"` 行:展示铸点对这一格(单值)或其中任一项(列表)判了扣下(`failedClosed`:
|
|
103
103
|
* 位置律本会显示的一段 —— 整段 query / 一个路径段 —— 因为里面有一条凭据形而不出门)。判决的属主是铸点,目录不另判;
|
|
104
104
|
* 标准位置律(userinfo 落地、query 每个值成记号)对每一行同样成立,不是扣下;值整只成占位 = 这一行的展示律显示不了这个值
|
|
105
105
|
* (通用 url 行:不是层级式 URL;两只出网代理行的展示律更窄 —— 只显示 `scheme://host[:port]`,形不干净整只占位,`outbound-dispatcher.ts` `displayProxyUrl`),也不是本位。
|
|
@@ -135,7 +135,7 @@ export interface ConfigCatalogRow extends CatalogValueVerdicts {
|
|
|
135
135
|
* 而不是回表态原词、未设回 `null`。入参对象本身**必填**(每个调用点都得表态这次有哪些装配事实)。
|
|
136
136
|
*/
|
|
137
137
|
export interface CatalogBootFacts {
|
|
138
|
-
/** 记忆整理阀门的生效值(boot 第 4 段 `createConsolidationValve` 的判决:显式词,或
|
|
138
|
+
/** 记忆整理阀门的生效值(boot 第 4 段 `createConsolidationValve` 的判决:显式词,或 [ref] / [ref] 的出厂缺省派生)。
|
|
139
139
|
* 缺席 = 这次装配没有这件事实(只有不经真装配的桩服务:`ServiceDeps` 平铺视图里组字段是可选的;真装配的分组形里它必填)
|
|
140
140
|
* ⇒ 实算腿答「不知道」(落 env 原文 / null),不猜。 */
|
|
141
141
|
readonly memoryConsolidationValve?: {
|
|
@@ -149,7 +149,7 @@ export interface ConfigCatalogInputs {
|
|
|
149
149
|
readonly boot: CatalogBootFacts;
|
|
150
150
|
readonly knobs: readonly ConfigKnobRecord[];
|
|
151
151
|
/** settings-schema 现行 DOMAINS(调用方传入,原样上 wire 的 `centerDomains` 列表)。🔴 7.106.0 起本注改真:本模块**不是**零包依赖 ——
|
|
152
|
-
* 它值级 import 了 core 与契约包(词表 / 中心凭证键名 /
|
|
152
|
+
* 它值级 import 了 core 与契约包(词表 / 中心凭证键名 / [ref] ⑤a 的 `DOMAIN_SCHEMAS` 座位门);这一格照旧由调用方传,
|
|
153
153
|
* 只因为它是 wire 上的一段列表、由路由决定取哪一份。 */
|
|
154
154
|
readonly centerDomains: readonly string[];
|
|
155
155
|
/** web-admin 当前在管的 ServiceConfig 键集(缺席 = 没有配置管道)。 */
|
|
@@ -168,7 +168,7 @@ export interface ConfigCatalogWire {
|
|
|
168
168
|
readonly centerManaged: number;
|
|
169
169
|
};
|
|
170
170
|
readonly rows: readonly ConfigCatalogRow[];
|
|
171
|
-
/**
|
|
171
|
+
/** [ref](7.106.0)—— 退役 env 墓碑表(settings-schema `RETIRED_ENVS`,本进程起服按它拒启)的投影 `buildRetiredEnvWire()`,**恒在场**
|
|
172
172
|
* (可为空数组)。与 `rows` 分开:rows 是「本进程会读的 env」,这里是「本进程会拒的旧名」—— 一个名字不会同时在两处(墓碑名没有读取点)。 */
|
|
173
173
|
readonly retired: readonly RetiredEnvWire[];
|
|
174
174
|
}
|
|
@@ -178,7 +178,7 @@ export interface ConfigCatalogWire {
|
|
|
178
178
|
*/
|
|
179
179
|
export declare const CONFIG_CATALOG: readonly ConfigCatalogSpec[];
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
181
|
+
* [ref] ⑤a —— **目录座位加载期门**(类修:一次把「目录声称了契约里没有的中心写位」整类关掉)。
|
|
182
182
|
*
|
|
183
183
|
* 行上的 `center` 座位说的是「中心能发布这个键」。它必须对得上契约包 `@sema-agent/settings-schema` 的 `DOMAIN_SCHEMAS`:
|
|
184
184
|
* ① 域在场;② `path` 在该域的 zod 形里解析得出(`a.b` 逐段进对象;`xs[].c` = 进数组元素)。任一不成立 ⇒ **抛**(模块加载即抛:
|
|
@@ -188,7 +188,7 @@ export declare const CONFIG_CATALOG: readonly ConfigCatalogSpec[];
|
|
|
188
188
|
* 解析只认 zod 的结构外衣(optional / nullable / default / catch / readonly / effects·管道 / lazy)与对象 / 数组两种容器;认不出的节点 = 解析不出
|
|
189
189
|
* (fail-closed:宁可多拒一个座位,也不放过一个假座位)。
|
|
190
190
|
*
|
|
191
|
-
* 🔴
|
|
191
|
+
* 🔴 [ref](7.106.0 合并复审 opus 腿 L-1):**只走 zod 公开面**。契约包今天是 zod 3.25、本仓是 zod 4 —— 读 zod 私有定义字段(类型判别名 /
|
|
192
192
|
* 内层 schema / lazy getter)的旧写法在契约包升 zod 4 那天会让 `models[].…` 整族座位解析不出,模块 import 期整只抛。两大版没有一个能同时
|
|
193
193
|
* 公开读到的「这是什么节点」判别位(v4 的 `.def.type` 在 v3 上不存在),`instanceof` 也跨不了两份 zod 的类身份 ⇒ 按两大版**同名的公开访问器**
|
|
194
194
|
* 认形,规则三条(见 {@link zodObjectShapeOf} / {@link isZodArrayFace} / {@link ZOD_WRAPPER_FACES})。钉:`test/config-catalog-zod-public-face.test.ts`。
|
|
@@ -58,7 +58,7 @@ export interface CrossInvariant {
|
|
|
58
58
|
check(input: CrossInvariantInput): string | undefined;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* ──
|
|
61
|
+
* ── [ref] ① 推广(车 UZ 推广轮):**拒因句单铸点**是一类 —— 下面五只是 `config.ts` 区里五条跨域拒启的**判据 + 句子的唯一属主**
|
|
62
62
|
* (`executionLaneRequiredRefusal` / `modelProviderRefusal` 同形):boot 的 throw(`config.ts`,锚在那儿)与注册表条目的 `check` **都调它**,
|
|
63
63
|
* 没有第二份文本可漂。修前这五条逐条两份不同的句子(boot 手写一份、表里另写一份),boot 那份是运维在 stderr 读到的(`config-validation.test.ts`
|
|
64
64
|
* 钉着它的指纹),表那份只在热路径上被调 —— 而热键集带不上这些键 ⇒ 实际无读者。句子**取 boot 那份**(逐字不变);类钉 =
|
|
@@ -69,12 +69,12 @@ export interface CrossInvariant {
|
|
|
69
69
|
export declare function halfOpenDirectDoorRefusal(v: Pick<CrossInvariantView, "directApprovalDoor" | "durableApproval" | "approvalHmacKeys" | "principalJwtPubkeys" | "principalJwtIss" | "principalJwtAud" | "requirePrincipal" | "operatorPrincipals">): string | undefined;
|
|
70
70
|
/**
|
|
71
71
|
* `operator-principals-required`([ref]-① 普查候选 1/2):BFF 多租户 durable 形(DURABLE_APPROVAL ∧ REQUIRE_PRINCIPAL,直连门关)的空 operator 名单。
|
|
72
|
-
* 这条不变量生于审批四读面读「空名单 = 人人是」那条读法的年代(那时它防的是跨租户读待批队列);
|
|
72
|
+
* 这条不变量生于审批四读面读「空名单 = 人人是」那条读法的年代(那时它防的是跨租户读待批队列);[ref] 删了那条读法 —— 空名单在每一面都是「没人是」,
|
|
73
73
|
* 不再外泄任何东西 —— 剩下的事实是「这台多租 worker 的审批队列没有人能当运维」。本版只把句子改真、不改拒启集;删不删这一条是另一次表态。
|
|
74
74
|
*/
|
|
75
75
|
export declare function operatorPrincipalsRequiredRefusal(v: Pick<CrossInvariantView, "durableApproval" | "requirePrincipal" | "operatorPrincipals">): string | undefined;
|
|
76
76
|
/**
|
|
77
|
-
* `operator-single-user`(
|
|
77
|
+
* `operator-single-user`([ref],[ref] ① 裁 A):「谁是 operator」一个事实一个来源。`OPERATOR_SINGLE_USER=true`(单用户形的每个调用方都是运维)
|
|
78
78
|
* 只在单用户形、名单为空时成立:多租形没有「单一用户」(声明会把每个租户都变成运维);名单非空时两个来源答同一个问题。两形都拒,句子点名两根旋钮与出路。
|
|
79
79
|
*/
|
|
80
80
|
export declare function operatorSingleUserRefusal(v: Pick<CrossInvariantView, "operatorSingleUser" | "requirePrincipal" | "operatorPrincipals">): string | undefined;
|
|
@@ -109,7 +109,7 @@ export declare function workflowParkDecisionDomainRefusal(v: Pick<CrossInvariant
|
|
|
109
109
|
export declare function centerIdentityRefusal(v: Pick<CrossInvariantView, "authBridgeIssuer" | "webAdmin">): string | undefined;
|
|
110
110
|
export declare const CONFIG_CROSS_INVARIANTS: readonly CrossInvariant[];
|
|
111
111
|
/**
|
|
112
|
-
* 按 id 取**一条**(
|
|
112
|
+
* 按 id 取**一条**([ref]②:boot 面的单源化出口)。
|
|
113
113
|
*
|
|
114
114
|
* 为什么不是在 boot 期跑 `checkCrossInvariants` 全表:全表里有若干条的 boot 拒启点在 `config.ts` 的装配尾
|
|
115
115
|
* (各自有自己的锚),在这里再跑一遍全表等于给 boot 加上今天不存在的拒启臂 —— 那是行为改动,不是单源化。
|
|
@@ -6,14 +6,15 @@ import { defaultModelRefusal, refusedNameMintedRefusal } from "./model-entry-ref
|
|
|
6
6
|
import { WEB_ADMIN_ENV, httpUrlFlaws } from "@sema-agent/settings-schema";
|
|
7
7
|
import { authBridgeIssuerOf } from "./auth-bridge.js";
|
|
8
8
|
import { buildDisplaySafeUrl } from "./trace/redact.js";
|
|
9
|
-
import { executionLaneCaps, executionLaneOf, executionLaneRequiredRefusal,
|
|
9
|
+
import { executionLaneCaps, executionLaneOf, executionLaneRequiredRefusal, REMOTE_EXEC_PROVIDER_WORDS } from "./execution-lane-caps.js";
|
|
10
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "./deployment-shape.js";
|
|
10
11
|
export const LIVENESS_HEARTBEAT_MS = 30_000;
|
|
11
12
|
const anyServiceAuth = (v) => Boolean(v.authToken) || Object.keys(v.authTokens ?? {}).length > 0;
|
|
12
13
|
const mustNarrowBind = (v) => Boolean(v.allowUnauthedWrites) && !anyServiceAuth(v);
|
|
13
14
|
const directDoorConjuncts = (v) => Boolean(v.directApprovalDoor) && Boolean(v.durableApproval) && v.approvalHmacKeys.length > 0 && v.principalJwtPubkeys.length > 0 && Boolean(v.principalJwtIss) && Boolean(v.principalJwtAud);
|
|
14
15
|
function multiTenantSharedLaneRefusal(v) {
|
|
15
16
|
const lane = executionLaneOf(v.remoteExec?.provider);
|
|
16
|
-
if (
|
|
17
|
+
if (DEPLOYMENT_SHAPE_PREDICATES.laneSeparatesTenants.holds(v))
|
|
17
18
|
return undefined;
|
|
18
19
|
const outlets = REMOTE_EXEC_PROVIDER_WORDS.filter((w) => executionLaneCaps(w).tenantSeparation === "supported");
|
|
19
20
|
return (`REQUIRE_PRINCIPAL=true (multi-tenant posture) with the "${lane}" execution lane runs every tenant's Bash on one shared target — ` +
|
package/dist/config-lkg.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare function lkgPathOverrideOf(raw: string | undefined): string | und
|
|
|
34
34
|
* 根经链接时引擎连目标一起守)两处守它 ⇒ 不另加行(加了就是同一个文件两只判据,`READ_DENY_BUILTIN_EXCLUDE` 删那一行也删不掉它);
|
|
35
35
|
* · 覆写 ⇒ LKG 在配置根外,引擎那一行够不着 ⇒ 这里派生**一行** = 覆写的绝对路径(`/` 开头;`lkgPathOverrideOf` 已把相对值解成绝对)。大小写不敏感
|
|
36
36
|
* (与内建行同读法)。拒句与内建行同一句(`sensitive-path read deny list (pattern …)`)。
|
|
37
|
-
* **行的射程**(引擎读拒表的读法,core 7.48.0
|
|
37
|
+
* **行的射程**(引擎读拒表的读法,core 7.48.0 [ref]):`/` 开头的行**根锚定** —— 只守那一个绝对位置,用户仓里同尾的路径
|
|
38
38
|
* (`/app/config-lkg.json` 之于 `…/repo/app/config-lkg.json`)读得到、Grep 结果里也在;路径经符号链接的目录时,引擎在每次准备时把这一行
|
|
39
39
|
* **沿链放置**到它的字面头真正通向的地方(写进去的文件落在链接目标下,目标路径同样被拒)。
|
|
40
40
|
* 7.120.0–7.122.x 的两处旧读法随之退役:行是尾段任意深度匹配(挡掉用户仓里同尾的路径);本仓另派生一条 realpath 落点行(座席铸一次、
|