@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
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [ref] —— **部署形谓词的唯一一张表**(消费点读表;吸收 [ref] / [ref] / [ref])。
|
|
3
|
+
*
|
|
4
|
+
* ## 规则
|
|
5
|
+
* 「这台部署是什么形」的每一个布尔判断只有一个答者:{@link DEPLOYMENT_SHAPE_PREDICATES} 的一行。消费点写
|
|
6
|
+
* `DEPLOYMENT_SHAPE_PREDICATES.<行>.holds(config)`,不 import 散落函数;表外不许再长出一只自读部署形事实的布尔判据
|
|
7
|
+
* (反向门 `test/deployment-shape-gate.test.ts` 按语法树判,判据逐字写在那份门的头注里)。
|
|
8
|
+
*
|
|
9
|
+
* ## 两根轴,每根轴一个读口(原始配置键只在这两个函数里被读)
|
|
10
|
+
* · `principal` —— 运维的 `REQUIRE_PRINCIPAL` 声明({@link readPrincipalAxis})。
|
|
11
|
+
* · `lane` —— `REMOTE_EXEC` 的归一车道词(`executionLaneOf`,认不出 ⇒ `undefined`,行必须 fail-closed)+ 那条车道的能力表行 +
|
|
12
|
+
* 车道子旋钮(k8s 运行时类 / 快照店、隐式 host 尾臂记号)({@link readLaneAxis})。
|
|
13
|
+
*
|
|
14
|
+
* ## 轴列不是注释,是型
|
|
15
|
+
* 每行的判官只收到它**声明**的那几根轴的事实({@link DeploymentShapeFacts}),读不到配置本身 —— 判官碰一根没声明的轴 = 编译红;
|
|
16
|
+
* `holds` 的入参型 = 所声明轴读入形的交叉({@link DeploymentShapeInput}),所以调用方递完整 `ServiceConfig` 或只递那几键的窄形都行。
|
|
17
|
+
*
|
|
18
|
+
* ## 什么进表、什么不进
|
|
19
|
+
* 进表的是**形规则**:只由部署形事实决定的布尔(去重后 14 行;同一条规则的多个消费者读同一行,不各成一行)。
|
|
20
|
+
* 把一行与**非形事实**(锁键、合规档位、审批意图、请求身份、请求体)合取的能力判据是**消费者**,住在它自己的模块
|
|
21
|
+
* (`a2aInjectionHonored` = 锁 ∧ 合规 ∧ `!multiTenant`;`taskHooksHonored`;身份门 …),读行、不读原始键。
|
|
22
|
+
* 车道表(`execution-lane-caps.ts`)按车道词键控的布尔列(`laneIsolated` 等)是车道轴自己的事实表,不是「部署」的谓词;行读它们。
|
|
23
|
+
*
|
|
24
|
+
* 依赖纪律:叶模块 —— 值导入只有 `execution-lane-caps.ts`(它本身是叶),零运行期环。
|
|
25
|
+
*/
|
|
26
|
+
import { type ExecutionLane, type ExecutionLaneCaps } from "./execution-lane-caps.js";
|
|
27
|
+
/** `principal` 轴读的配置键(`ServiceConfig` 结构上满足)。 */
|
|
28
|
+
export interface PrincipalAxisInput {
|
|
29
|
+
readonly requirePrincipal?: boolean | undefined;
|
|
30
|
+
}
|
|
31
|
+
/** `principal` 轴的事实。 */
|
|
32
|
+
export interface PrincipalAxisFacts {
|
|
33
|
+
/** 运维声明了 `REQUIRE_PRINCIPAL=true`。 */
|
|
34
|
+
readonly declared: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** `lane` 轴读的配置键:已装配的 `remoteExec` 里本表用得到的那几键(`ServiceConfig` 的判别联合每一臂结构上都满足)。 */
|
|
37
|
+
export interface LaneAxisInput {
|
|
38
|
+
readonly remoteExec?: {
|
|
39
|
+
readonly provider?: string | undefined;
|
|
40
|
+
readonly runtimeClass?: string | undefined;
|
|
41
|
+
readonly s3Snapshot?: unknown;
|
|
42
|
+
readonly singleMachineDefault?: boolean | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
}
|
|
45
|
+
/** `lane` 轴的事实。 */
|
|
46
|
+
export interface LaneAxisFacts {
|
|
47
|
+
/** 归一车道词;认不出 ⇒ `undefined`(生产链上不可达:`loadConfig` 的 [ref] 先拒启;行在这一格必须 fail-closed)。 */
|
|
48
|
+
readonly lane: ExecutionLane | undefined;
|
|
49
|
+
/** 那条车道的能力表行(认不出 ⇒ `undefined`)。 */
|
|
50
|
+
readonly caps: ExecutionLaneCaps | undefined;
|
|
51
|
+
/** k8s 的 `runtimeClass`(别的车道 `undefined`)。 */
|
|
52
|
+
readonly k8sRuntimeClass: string | undefined;
|
|
53
|
+
/** k8s 配了 S3 工作区快照店(别的车道 `false`)。 */
|
|
54
|
+
readonly k8sSnapshotStore: boolean;
|
|
55
|
+
/** host 车道值上带「单机形缺省」记号(唯一写者 = `config.ts` 三元链的隐式 host 尾臂;显式 `REMOTE_EXEC=host` 与文件覆写都不带)。 */
|
|
56
|
+
readonly singleMachineDefault: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** 轴全集(闭集)→ 读入形与事实型。加一根轴 = 在这里加一键 + {@link readAxis} 的穷举 switch 加一臂(漏一处即编译红)。 */
|
|
59
|
+
interface AxisShapes {
|
|
60
|
+
readonly principal: {
|
|
61
|
+
readonly input: PrincipalAxisInput;
|
|
62
|
+
readonly facts: PrincipalAxisFacts;
|
|
63
|
+
};
|
|
64
|
+
readonly lane: {
|
|
65
|
+
readonly input: LaneAxisInput;
|
|
66
|
+
readonly facts: LaneAxisFacts;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** 部署形轴(闭集)。 */
|
|
70
|
+
export type DeploymentShapeAxis = keyof AxisShapes;
|
|
71
|
+
type UnionToIntersection<U> = (U extends unknown ? (u: U) => void : never) extends (i: infer I) => void ? I : never;
|
|
72
|
+
/** 一行的入参型 = 它声明的各轴读入形的交叉。 */
|
|
73
|
+
export type DeploymentShapeInput<A extends DeploymentShapeAxis> = UnionToIntersection<AxisShapes[A]["input"]>;
|
|
74
|
+
/** 一行的判官看得见的事实 = 它声明的那几根轴(恰这几键)。 */
|
|
75
|
+
export type DeploymentShapeFacts<A extends DeploymentShapeAxis> = {
|
|
76
|
+
readonly [K in A]: AxisShapes[K]["facts"];
|
|
77
|
+
};
|
|
78
|
+
/** 表的一行。 */
|
|
79
|
+
export interface DeploymentShapePredicate<A extends DeploymentShapeAxis> {
|
|
80
|
+
/** 这一行读哪几根轴(= 判官入参的型;不是注释)。 */
|
|
81
|
+
readonly axes: readonly A[];
|
|
82
|
+
/** 这一行回答的那一句话(含它判的语义轴:租户 / 车道 / 设备归属 / 隔离强度 …)。 */
|
|
83
|
+
readonly question: string;
|
|
84
|
+
/** 在这台部署上成立吗。 */
|
|
85
|
+
holds(deployment: DeploymentShapeInput<A>): boolean;
|
|
86
|
+
}
|
|
87
|
+
export declare const DEPLOYMENT_SHAPE_PREDICATES: Readonly<{
|
|
88
|
+
/** 身份门的问法。读者:请求面的身份 / 属主门(`http/principal-gate.ts`、`http/request-guards.ts`、`security.ts`)。 */
|
|
89
|
+
principalRequired: DeploymentShapePredicate<"principal">;
|
|
90
|
+
/**
|
|
91
|
+
* 租户轴的问法。今天与 {@link DEPLOYMENT_SHAPE_PREDICATES.principalRequired} 读**同一个声明**([ref] ①:托管 / 多租 ⇔ `REQUIRE_PRINCIPAL=true`,
|
|
92
|
+
* 签发方配置是身份验签轴、不算租户证据)—— 两个问题、一根轴、一个读口;「鉴权必需」与「多租形」拆成两个声明时只改这一行的判官。
|
|
93
|
+
*/
|
|
94
|
+
multiTenant: DeploymentShapePredicate<"principal">;
|
|
95
|
+
/** 读能力表 `callerCwd` 位(host = 单主才开;device = 路径落在发起者自己的设备上,归属由 `device_session` 绑定验过,不要求单主)。 */
|
|
96
|
+
callerCwd: DeploymentShapePredicate<"principal" | "lane">;
|
|
97
|
+
/** 调用方给的宿主绝对路径(附加目录 / 项目上下文 / 本机 SendUserFile / 指令文件探针)只在「手就在本 worker 的盘上 ∧ 单主」时指向调用方自己的东西。 */
|
|
98
|
+
callerOwnsWorkerDisk: DeploymentShapePredicate<"principal" | "lane">;
|
|
99
|
+
/** wire `executionLane.toolsOnThisHost` 与出厂 / 中心技能的 `baseDir`:只问文件系统同一性,与租户无关(出厂内容每个租户拿到同一份)。 */
|
|
100
|
+
toolsOnThisHost: DeploymentShapePredicate<"lane">;
|
|
101
|
+
/** `REMOTE_EXEC` 未设的进程内形(没有手)且单主:进程级消费者(hooks 命令、项目上下文本机读、卡批规则 root)看到的就是引擎自己的进程 cwd / env。 */
|
|
102
|
+
inProcessSingleUser: DeploymentShapePredicate<"principal" | "lane">;
|
|
103
|
+
/** 任务层替部署声明宿主姿态(bypassPermissions 开写面 / host shell 继承整份环境)的射程:device 车道上跨租户宿主穿越结构性不存在(clay 裁定③)。 */
|
|
104
|
+
taskHostPostureDeclarations: DeploymentShapePredicate<"principal" | "lane">;
|
|
105
|
+
/** 写门走 [ref] 代理裁决(文件平面不在 worker 本机);认不出的词 ⇒ 走代理(代理 slot 空 ⇒ 写门 fail-closed)。 */
|
|
106
|
+
sandboxPathAdjudication: DeploymentShapePredicate<"lane">;
|
|
107
|
+
/** 读能力表 `sandboxSendUserFile` 位(e2b / k8s 每任务一只沙箱 ⇒ 任何租户;ssh 共享一台真机 ⇒ 只单主)。 */
|
|
108
|
+
sandboxSendUserFile: DeploymentShapePredicate<"principal" | "lane">;
|
|
109
|
+
/** 读能力表 `remoteScratchpad` 位(`/tmp/scratchpad/<sessionId>` 远端约定)。 */
|
|
110
|
+
remoteScratchpad: DeploymentShapePredicate<"lane">;
|
|
111
|
+
/** 读能力表 `tenantSeparation` 位(值来自 settings-schema 车道词表正本);唯一读者 = 跨域不变量 `multi-tenant-shared-lane`。 */
|
|
112
|
+
laneSeparatesTenants: DeploymentShapePredicate<"principal" | "lane">;
|
|
113
|
+
/**
|
|
114
|
+
* [ref] —— **VM 级**隔离强度(独立内核:e2b 的 Firecracker microVM;k8s 只在 Kata / gVisor 运行时类上)。与能力表 `isolation` 位
|
|
115
|
+
* (OS 级边界,容器即算;wire `executionLane.isolated` 的属主 `laneIsolated`)是两个问题,所以不叫「isolated」。读者:A 值路由。
|
|
116
|
+
*/
|
|
117
|
+
vmIsolatedHands: DeploymentShapePredicate<"lane">;
|
|
118
|
+
/**
|
|
119
|
+
* [ref] —— 执行环境可挂起:能力表 `suspendable` 位(「结构上能不能」)∧ k8s 的前提旋钮(配了 S3 快照店)。真作者是各适配器对 core 的
|
|
120
|
+
* `capabilities.suspendable` 声明(对账:`test/execution-lane-caps.test.ts` 拿真适配器实例逐车道核)。读者:boot `remote_exec_enabled.suspendable`。
|
|
121
|
+
*/
|
|
122
|
+
suspendableHands: DeploymentShapePredicate<"lane">;
|
|
123
|
+
/** 读者两处:`config.ts` 车道落点一行的 `source`(覆写之前)与 `boot/execution-env.ts` 的 `remote_exec_real_system.note`(覆写之后)—— 同一个记号、两个时刻。 */
|
|
124
|
+
singleMachineDefaultLane: DeploymentShapePredicate<"lane">;
|
|
125
|
+
}>;
|
|
126
|
+
export {};
|
|
127
|
+
//# sourceMappingURL=deployment-shape.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { executionLaneCaps, executionLaneOf, handsOnWorkerFilePlane } from "./execution-lane-caps.js";
|
|
2
|
+
function readPrincipalAxis(deployment) {
|
|
3
|
+
return { declared: deployment.requirePrincipal === true };
|
|
4
|
+
}
|
|
5
|
+
function readLaneAxis(deployment) {
|
|
6
|
+
const declaration = deployment.remoteExec;
|
|
7
|
+
const lane = executionLaneOf(declaration?.provider);
|
|
8
|
+
return {
|
|
9
|
+
lane,
|
|
10
|
+
caps: lane === undefined ? undefined : executionLaneCaps(lane),
|
|
11
|
+
k8sRuntimeClass: lane === "k8s" ? declaration?.runtimeClass : undefined,
|
|
12
|
+
k8sSnapshotStore: lane === "k8s" && Boolean(declaration?.s3Snapshot),
|
|
13
|
+
singleMachineDefault: lane === "host" && declaration?.singleMachineDefault === true,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function readAxis(axis, deployment) {
|
|
17
|
+
switch (axis) {
|
|
18
|
+
case "principal":
|
|
19
|
+
return readPrincipalAxis(deployment);
|
|
20
|
+
case "lane":
|
|
21
|
+
return readLaneAxis(deployment);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function createPredicate(axes, question, judge) {
|
|
25
|
+
const declared = Object.freeze([...axes]);
|
|
26
|
+
return Object.freeze({
|
|
27
|
+
axes: declared,
|
|
28
|
+
question,
|
|
29
|
+
holds(deployment) {
|
|
30
|
+
const input = deployment;
|
|
31
|
+
const facts = {};
|
|
32
|
+
for (const axis of declared)
|
|
33
|
+
facts[axis] = readAxis(axis, input);
|
|
34
|
+
return judge(facts);
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function capabilityHolds(cap, principal) {
|
|
39
|
+
switch (cap) {
|
|
40
|
+
case "supported":
|
|
41
|
+
return true;
|
|
42
|
+
case "unsupported":
|
|
43
|
+
return false;
|
|
44
|
+
case "single-user-only":
|
|
45
|
+
return !principal.declared;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const VM_ISOLATION_RUNTIME_CLASSES = new Set(["kata", "kata-qemu", "kata-clh", "kata-fc", "gvisor", "runsc"]);
|
|
49
|
+
export const DEPLOYMENT_SHAPE_PREDICATES = Object.freeze({
|
|
50
|
+
principalRequired: createPredicate(["principal"], "身份轴:运维声明了 REQUIRE_PRINCIPAL=true —— 每个调用方都必须带一个验过的主体。", ({ principal }) => principal.declared),
|
|
51
|
+
multiTenant: createPredicate(["principal"], "租户轴:这台部署服务不止一个主人(托管 / 多租;C-R100 ① 由 REQUIRE_PRINCIPAL=true 声明)。", ({ principal }) => principal.declared),
|
|
52
|
+
callerCwd: createPredicate(["lane", "principal"], "车道 × 租户 / 设备归属:调用方送来的 cwd(与 settings.env)被尊重 —— host 车道且单主,或 device 车道。", ({ lane, principal }) => lane.caps !== undefined && capabilityHolds(lane.caps.callerCwd, principal)),
|
|
53
|
+
callerOwnsWorkerDisk: createPredicate(["lane", "principal"], "车道 × 租户:手就在本 worker 的盘上且部署只有一个主人 —— 这块盘上的路径就是调用方自己的。", ({ lane, principal }) => lane.lane !== undefined && handsOnWorkerFilePlane(lane.lane) && !principal.declared),
|
|
54
|
+
toolsOnThisHost: createPredicate(["lane"], "车道:工具跑的那台机器就是本进程这台(手挂上了且文件平面在本 worker 盘上;车道列 handsOnWorkerFilePlane)。", ({ lane }) => lane.lane !== undefined && handsOnWorkerFilePlane(lane.lane)),
|
|
55
|
+
inProcessSingleUser: createPredicate(["lane", "principal"], "车道 × 租户:进程内车道(REMOTE_EXEC 未设)且部署只有一个主人。", ({ lane, principal }) => lane.lane === "in-process" && !principal.declared),
|
|
56
|
+
taskHostPostureDeclarations: createPredicate(["lane", "principal"], "车道 × 租户 / 设备归属:任务层可以替部署声明宿主姿态 —— device 车道(发起者自己的设备),或单主部署。", ({ lane, principal }) => lane.lane === "device" || !principal.declared),
|
|
57
|
+
sandboxPathAdjudication: createPredicate(["lane"], "车道:写门的路径事实要经代理到执行环境里取(文件平面不在本 worker 盘上;认不出的车道也走代理)。", ({ lane }) => lane.caps === undefined || lane.caps.hostFilePlane !== "supported"),
|
|
58
|
+
sandboxSendUserFile: createPredicate(["lane", "principal"], "车道 × 租户:SendUserFile 的沙箱直传腿可以挂(沙箱盘 = 租户自己的任务工作区,或共享真机上的单主部署)。", ({ lane, principal }) => lane.caps !== undefined && capabilityHolds(lane.caps.sandboxSendUserFile, principal)),
|
|
59
|
+
remoteScratchpad: createPredicate(["lane"], "车道:执行环境里按会话分的远端 scratchpad 约定适用。", ({ lane }) => lane.caps !== undefined && lane.caps.remoteScratchpad === "supported"),
|
|
60
|
+
laneSeparatesTenants: createPredicate(["lane", "principal"], "车道 × 租户:这条车道在这台部署上不让两个租户的命令落在同一个共享目标上(单主部署恒成立;认不出的车道不成立)。", ({ lane, principal }) => lane.caps !== undefined && capabilityHolds(lane.caps.tenantSeparation, principal)),
|
|
61
|
+
vmIsolatedHands: createPredicate(["lane"], "车道 / 隔离强度:手跑在 VM 级边界里(独立内核);runc / 共享内核 / 真机 / 认不出 ⇒ 否。", ({ lane }) => {
|
|
62
|
+
if (lane.lane === "e2b")
|
|
63
|
+
return true;
|
|
64
|
+
if (lane.lane !== "k8s")
|
|
65
|
+
return false;
|
|
66
|
+
const runtimeClass = (lane.k8sRuntimeClass ?? "").trim().toLowerCase();
|
|
67
|
+
return runtimeClass.startsWith("kata") || VM_ISOLATION_RUNTIME_CLASSES.has(runtimeClass);
|
|
68
|
+
}),
|
|
69
|
+
suspendableHands: createPredicate(["lane"], "车道:执行环境可挂起(e2b;k8s 以配了 S3 工作区快照店为前提)。", ({ lane }) => lane.caps !== undefined && lane.caps.suspendable === "supported" && (lane.lane !== "k8s" || lane.k8sSnapshotStore)),
|
|
70
|
+
singleMachineDefaultLane: createPredicate(["lane"], "车道:host 车道是单机形缺省落点(REMOTE_EXEC 未设 ∧ CONFIG_PROVIDER=local,没人点名)。", ({ lane }) => lane.singleMachineDefault),
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=deployment-shape.js.map
|
package/dist/device-store.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const DEVICE_RATE_LIMIT_CODE: "limit.rate_exceeded";
|
|
|
50
50
|
* 排空/停机拒绝复用**既有**的通用码(`draining`,`docs/ASSISTANT-WIRE-CONTRACT.md` 附录 A 已收录,503)。
|
|
51
51
|
*
|
|
52
52
|
* 🔴 刻意不铸 `device.draining`([ref]/[ref]):§4.8 的 device 闭集**冻结**且无 draining 成员,而排空
|
|
53
|
-
* 语义面全部署早有属主词 —— HTTP 计费提交拒臂(`http/readiness.ts` 的 `billableRefusalOf` 唯一铸点,
|
|
53
|
+
* 语义面全部署早有属主词 —— HTTP 计费提交拒臂(`http/readiness.ts` 的 `billableRefusalOf` 唯一铸点,[ref] 前是 `sendError(res, 503, "draining", …)`;SDK spec 逐字引用
|
|
54
54
|
* 的冻结字面)、drain 期新 upgrade 拒(503)、WS hello 拒帧 / bye 帧的 `draining` 分支键。为同一语义再铸
|
|
55
55
|
* `device.*` 同义码 = 消费端要认两套(上面 rate-limit 条的同一判据);且 `device.draining` 在 HTTP 层
|
|
56
56
|
* 零发送点,写进附录 A 即幽灵行(`error-code-catalog-live` 的「文档多码」臂当场红)。
|
package/dist/device-ws-hub.d.ts
CHANGED
|
@@ -180,7 +180,7 @@ export interface DeviceWsHub {
|
|
|
180
180
|
isDraining(): boolean;
|
|
181
181
|
connectedDeviceIds(): string[];
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* [ref](车C C-G2「吊销后活连接 5s 内断」)—— **立刻**对这台设备的活连接重跑一次世代围栏。
|
|
184
184
|
*
|
|
185
185
|
* 🔴 为什么是「重跑围栏」而不是一条新的断连路径:吊销已经在**店内同事务**作废租约并把
|
|
186
186
|
* `conn_generation` 推进一格(§4.6 步 2),所以本连接的下一次带世代谓词的写必然影响 0 行 ——
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 本服务**自己**发往配置端点的出站请求(hook 直连模型腿 `hooks/hook-llm.ts`、记忆 embedder `plugins/memory-embedder.ts`)的
|
|
3
|
-
* 重定向律 —— 与 core 7.51.0(
|
|
3
|
+
* 重定向律 —— 与 core 7.51.0([ref])一方 brain 的请求同一条:请求以 `redirect: "manual"` 发出,端点回重定向 ⇒ 拒;
|
|
4
4
|
* 不跟、不重试、拒句不点名目标。
|
|
5
5
|
*
|
|
6
6
|
* 为什么:请求只去被判过的那个根。传输层(undici)跟随 POST 307 / 308 时把请求体(用户内容 / 记忆正文)原样送到
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] —— **入口地板钳制**通告(`engine_notice` 码 `permission.entry_mode_clamped`)的唯一铸点(core 7.51.0 [ref] 入册:受众 user、
|
|
3
3
|
* 铸者 `NOTICE_MINTER` = `"server"`,引擎从不铸它)。
|
|
4
4
|
*
|
|
5
5
|
* ## 这件事为什么归本仓
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import type { EngineNotice, EngineNoticeCode } from "@sema-agent/core";
|
|
25
25
|
import type { EntryPermissionMode } from "./runtime-governance.js";
|
|
26
|
-
/** 码常量型 = core 码册(
|
|
26
|
+
/** 码常量型 = core 码册([ref] 入册:受众 user、铸者 `"server"`)。 */
|
|
27
27
|
export declare const ENTRY_MODE_CLAMPED: EngineNoticeCode;
|
|
28
28
|
/** 一次受理门盖章的读数 → 至多一条通告(读法见文件头)。 */
|
|
29
29
|
export declare function buildEntryModeClampNotice(entry: EntryPermissionMode, sessionId: string | undefined): EngineNotice | undefined;
|
package/dist/env-facts.d.ts
CHANGED
|
@@ -34,8 +34,8 @@ export interface SandboxEnvFacts {
|
|
|
34
34
|
/**
|
|
35
35
|
* 一条 scratchpad 路径能不能被**原样**宣告(core 的渲染上限 {@link MAX_PATH} 之内)—— scratchpad 的**铸造条件**之一。
|
|
36
36
|
* 两个铸点(server 自算 {@link ensureScratchpadDir}、壳供 {@link screenShellScratchpadDir})读这同一只:渲染不下的路径
|
|
37
|
-
* **根本不铸**(不建目录、不进写门豁免、不宣告 —— 宣告是根围栏那个洞的唯一写者,
|
|
38
|
-
* 🔴
|
|
37
|
+
* **根本不铸**(不建目录、不进写门豁免、不宣告 —— 宣告是根围栏那个洞的唯一写者,[ref],于是也不开洞)。
|
|
38
|
+
* 🔴 [ref] codex r1 [medium]:删 [ref] 折叠之后,只在宣告那一步丢长路径会留下「建了、豁免了、却不宣告也不开洞」的目录;
|
|
39
39
|
* 规则挪到铸点,四件同有同无。(远程车道的 `/tmp/scratchpad/<sessionId>` 恒在上限内:sessionId ≤ 64,见 prepareSpec。)
|
|
40
40
|
*/
|
|
41
41
|
export declare function scratchpadPathRenderable(path: string): boolean;
|
|
@@ -79,13 +79,13 @@ export declare function scratchpadDirFor(localDataRoot: string, sessionId: strin
|
|
|
79
79
|
* {@link purgeScratchpadDir}(session delete)+ {@link sweepStaleScratchpads}(mtime 周期扫),keyed by the
|
|
80
80
|
* same scratchpadDirFor convention;接线(E21 DELETE purge + 周期 sweep)在 main.ts 侧(D 组)。 */
|
|
81
81
|
export declare function ensureScratchpadDir(localDataRoot: string, sessionId: string,
|
|
82
|
-
/** 渲染不下(铸造条件不成立)时的那一行 —— 调用方交日志口(
|
|
82
|
+
/** 渲染不下(铸造条件不成立)时的那一行 —— 调用方交日志口([ref] codex r1:不铸必须说出来,否则「本会话没有 scratchpad」无从排查)。 */
|
|
83
83
|
warn: (msg: string, meta?: object) => void): Promise<string | undefined>;
|
|
84
84
|
/** G3([ref] 壳侧承诺③/[ref]③,[ref]§四接单):**壳供** scratchpad 路径的验收门。
|
|
85
85
|
*
|
|
86
86
|
* 壳(cli)vendored getScratchpadDir 算出 per-session scratchpad 路径随 `TaskRequest.scratchpadDir` 发来;
|
|
87
87
|
* 接受后它**优先于** server 自算(ensureScratchpadDir),喂 resolve-spec 的同一单点(envFacts 宣告 ——
|
|
88
|
-
* core 据它开根围栏的洞,
|
|
88
|
+
* core 据它开根围栏的洞,[ref] 起是那个洞的唯一写者 —— + fs-write gate exemptDirs)。「没到货引擎忽略 = 无害 additive」。
|
|
89
89
|
*
|
|
90
90
|
* 信任边界:这是 exemptDirs **放宽**输入,验收 fail-closed(任何拒收形回落自算,不 fault 任务):
|
|
91
91
|
* - 多租户(requirePrincipal)一律拒——共享 worker 盘上租户自选豁免目录=超范围面;
|
|
@@ -109,9 +109,9 @@ export declare function acceptShellScratchpadDir(raw: unknown, opts: {
|
|
|
109
109
|
warn: (msg: string, meta?: object) => void;
|
|
110
110
|
}): Promise<string | undefined>;
|
|
111
111
|
/**
|
|
112
|
-
* {@link acceptShellScratchpadDir} 的**词法半场**(
|
|
112
|
+
* {@link acceptShellScratchpadDir} 的**词法半场**([ref] 拆出):零 I/O、可在请求的任何一点问。
|
|
113
113
|
*
|
|
114
|
-
* 为什么拆:
|
|
114
|
+
* 为什么拆:[ref] 的前判要在**任何副作用之前**回答「这条请求会把哪个目录当写门豁免域」,而验收门的
|
|
115
115
|
* 后半场是 `mkdir`(副作用 + I/O)。把判据抄一份到前判处 = 两份验收规则,而两份规则漂移的那天,前判
|
|
116
116
|
* 会替一条**根本不会被接受**的壳供路径拒掉请求(或反过来放过一条会被接受的)。所以规则只有这一份,
|
|
117
117
|
* 两个调用点各取所需:验收门 = 本函数 + mkdir;前判 = 本函数。
|
|
@@ -124,7 +124,7 @@ export declare function screenShellScratchpadDir(raw: unknown, opts: {
|
|
|
124
124
|
warn: (msg: string, meta?: object) => void;
|
|
125
125
|
}): string | undefined;
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* [ref](core 7.20.0 / [ref])—— **这条请求会不会把任务根放进写门的豁免域里**。
|
|
128
128
|
*
|
|
129
129
|
* ## 病形(引擎侧的硬拒,不是判决期的宽严)
|
|
130
130
|
* 写门的豁免域就是 scratchpad(`exemptDirs: [scratchpadDir]`,`task-settings.ts` 的
|
|
@@ -142,7 +142,7 @@ export declare function screenShellScratchpadDir(raw: unknown, opts: {
|
|
|
142
142
|
* canonical 就是承诺一件此刻做不到的事(软链形的真身要到裁决时刻才问 fs,那是写门自己的第二道)。
|
|
143
143
|
*
|
|
144
144
|
* ## 射程(每一条都是「不这样写就会误拒」)
|
|
145
|
-
* · **只在 cwd
|
|
145
|
+
* · **只在 cwd 落在本 worker 盘上时判**:部署形表行 `callerOwnsWorkerDisk` 为假的部署(多租户 / 手不在本 worker 盘上的车道)不把 cwd 落到这块盘上,
|
|
146
146
|
* 它永远不会变成门的根 —— 在那里拒等于凭空多一条 400;
|
|
147
147
|
* · **豁免域取这条会话可能挂上的每一只**(不是「这一次挂哪只」):server 自算那条恒是候选(有 session
|
|
148
148
|
* 就算得出),壳供 `body.scratchpadDir` **过了词法验收**才追加为候选(过不了的那条永远挂不上,拿它拒
|
|
@@ -158,7 +158,8 @@ export declare function scratchpadCoveringTaskRoot(args: {
|
|
|
158
158
|
localDataRoot: string;
|
|
159
159
|
sessionId: string | undefined;
|
|
160
160
|
requirePrincipal: boolean;
|
|
161
|
-
|
|
161
|
+
/** 部署形表行 `callerOwnsWorkerDisk`(调用方递表的答案,本模块不判部署形)。 */
|
|
162
|
+
callerOwnsWorkerDisk: boolean;
|
|
162
163
|
}): {
|
|
163
164
|
cwd: {
|
|
164
165
|
asSpelled: string;
|
package/dist/env-facts.js
CHANGED
|
@@ -119,7 +119,7 @@ export function screenShellScratchpadDir(raw, opts) {
|
|
|
119
119
|
return canonical;
|
|
120
120
|
}
|
|
121
121
|
export function scratchpadCoveringTaskRoot(args) {
|
|
122
|
-
if (!args.
|
|
122
|
+
if (!args.callerOwnsWorkerDisk || !isAbsoluteHostPath(args.cwd))
|
|
123
123
|
return undefined;
|
|
124
124
|
const candidates = [];
|
|
125
125
|
const shell = screenShellScratchpadDir(args.shellScratchpadDir, { requirePrincipal: args.requirePrincipal, hostSemanticsLane: true, warn: () => { } });
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] / [ref] —— **名单型 env 旋钮**的闭集表(纯叶:零值依赖,任何层都可值引而不成装载环)。
|
|
3
3
|
*
|
|
4
4
|
* 解析规则(未设 / 形错拒启 / 姿态 / 生效名单)的全文在 `config.ts` `parseEnvNameAllowlist` 的头注;本表只装**各旋钮自己的**事实,
|
|
5
5
|
* 不是解析规则:
|
|
6
6
|
* · `example` 进拒句;
|
|
7
7
|
* · `multiTenant` = `REQUIRE_PRINCIPAL=true` 下名单作不作数 —— **只有服务进程读的旋钮有这一列**(姿态是服务进程的概念):
|
|
8
|
-
* - `LSP_ENV_ALLOW` ⇒ ignored:host 腿语言服务器在多租户姿态下本来就不起,名单无处作数,设了要说出来(
|
|
9
|
-
* - 三只沙箱名单(e2b / local-docker / k8s 各一只) ⇒ honored:
|
|
8
|
+
* - `LSP_ENV_ALLOW` ⇒ ignored:host 腿语言服务器在多租户姿态下本来就不起,名单无处作数,设了要说出来([ref])。
|
|
9
|
+
* - 三只沙箱名单(e2b / local-docker / k8s 各一只) ⇒ honored:[ref] 照录修前语义(任何姿态下都转发),[ref] 主会话裁定维持 —— 沙箱 env 是部署方为隔离沙箱显式配的
|
|
10
10
|
* 带外凭据(e2b / docker / k8s 车道本来就是多租户 fleet 的主形),与 LSP 那条「本机子进程」的形不同;多租户下起服说一句。
|
|
11
|
-
* · `BAKE_ENV_ALLOW`(
|
|
11
|
+
* · `BAKE_ENV_ALLOW`([ref] 残余,7.103.0)由 **bake-runner 进程**读(构建宿主守护进程:没有主体、没有租户 ⇒ 没有姿态列,
|
|
12
12
|
* 不进 {@link describeAllowlistPostures} 的姿态句)。它与服务侧四只旋钮同一只解析器、同一只「点名放行」谓词、同一条「原文按凭据类」律。
|
|
13
13
|
* · `channel` = 这张名单**交给谁、在谁的减法之上**(闭集两词,解析器按它定「不许点哪些名」):
|
|
14
14
|
* - `host-put-back`(`LSP_ENV_ALLOW` / `BAKE_ENV_ALLOW`)—— 剥后放回形:宿主子进程的 env 先经唯一组合(引擎扣掉本服务自有凭据 + 形状剥),
|
|
15
15
|
* 名单点到的键再从本进程环境**原样**取回叠上去。点到本服务自有凭据名 = 把引擎刚扣下的那枚交回去 ⇒ 起服拒,判官 = 引擎同一只
|
|
16
16
|
* (`inheritEnvPolicyProblem`,读起服声明;与引擎拒嵌入方白名单同句)。
|
|
17
|
-
* - `sandbox-grant`(三只沙箱名单)—— 沙箱 env 的唯一来源(沙箱不从本进程继承任何东西),部署方显式交出的带外凭据(
|
|
17
|
+
* - `sandbox-grant`(三只沙箱名单)—— 沙箱 env 的唯一来源(沙箱不从本进程继承任何东西),部署方显式交出的带外凭据([ref] 照转发);
|
|
18
18
|
* 本列不在「自有凭据」律的射程里,只拒点名名单型旋钮(原文按凭据类)。
|
|
19
19
|
* 表是 `Record<旋钮, …>`:闭集加一只旋钮而不补行 = 编译红;行形随读它的进程定(服务进程 ⇒ 必须写姿态列)。
|
|
20
20
|
*
|
package/dist/exec-bounds.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 是它报的那一界。
|
|
13
13
|
*
|
|
14
14
|
* 与 core 远端契约(`ExecStreamOptions.readTimeoutMs`:「缺省也 SHOULD 有活性界,一条命令不得等到环境死」)的对齐:
|
|
15
|
-
* 说了墙钟的命令被墙钟兜住,不会无限等;两界都没说的命令,在有活性界的车道(k8s / e2b)上仍由它兜底。**切断码按触发的那一界**(core 7.52.0
|
|
15
|
+
* 说了墙钟的命令被墙钟兜住,不会无限等;两界都没说的命令,在有活性界的车道(k8s / e2b)上仍由它兜底。**切断码按触发的那一界**(core 7.52.0 [ref]:
|
|
16
16
|
* 两套执行码闭集各有一词):墙钟 ⇒ `timeout`;静默界(调用方的 `readTimeoutMs` 或车道活性界)⇒ `liveness_no_output`,带窗口秒数 `noOutputSec`(车道的界 /
|
|
17
17
|
* 调用方说的静默界,从不是请求的预算)—— 两者解释自己用的是两个数,消费方(core 的 Bash 工具:「no output for N s」对「timed out after N s」)按码分。
|
|
18
18
|
* 静默切断的码、句、秒数只在 {@link buildLivenessCut} 一处铸,六车道同读。
|
|
@@ -68,7 +68,7 @@ export declare function firstBoundOf(bounds: CommandBounds): {
|
|
|
68
68
|
} | undefined;
|
|
69
69
|
/**
|
|
70
70
|
* 🔴 **一次静默切断 —— 唯一铸点**(六条车道 host / e2b / k8s / ssh / adb / local-docker 同读;纯数据,车道用它构造自己那一型的错误):
|
|
71
|
-
* 码恒为 `liveness_no_output`(core 7.52.0
|
|
71
|
+
* 码恒为 `liveness_no_output`(core 7.52.0 [ref];墙钟切断照旧 `timeout`,不经本函数),句子 = {@link livenessCutMessage},`noOutputSec` = 静默窗口的整秒数
|
|
72
72
|
* (core `ExecutionError` 第五构造参;core 读它时向下取整、不足 1 秒不说 —— 本函数同读:不足 1 秒的窗口不带这一位)。远端流式错误(`RemoteExecutionError`)没有这一位的座,只带码与句。
|
|
73
73
|
*/
|
|
74
74
|
export declare function buildLivenessCut(bound: LivenessBound): {
|
|
@@ -14,7 +14,7 @@ export type ExecutionLane = "in-process" | RemoteExecProvider;
|
|
|
14
14
|
* 所以坐标漂了(重命名/搬家/改语义)门会红,注释不会烂在这里。
|
|
15
15
|
*/
|
|
16
16
|
export interface ExecutionLaneCaps {
|
|
17
|
-
/** 调用方送来的 `cwd`
|
|
17
|
+
/** 调用方送来的 `cwd` 是否被尊重。读者:部署形表行 `callerCwd`([ref] 起本位即判据;改前对账 `task-cwd.ts` 的 `cwdHonored || deviceCwdHonored`)。 */
|
|
18
18
|
readonly callerCwd: LaneCapability;
|
|
19
19
|
/** core 的后台 shell 面(`run_in_background`/`BashOutput`/`KillShell`)。判别式:各 adapter 的
|
|
20
20
|
* `backgroundCapabilities.supported`(`plugins/remote-env-{host,e2b,k8s}.ts`);host 腿的闸在
|
|
@@ -26,48 +26,49 @@ export interface ExecutionLaneCaps {
|
|
|
26
26
|
/** LSP。判别式:`boot/execution-env.ts` 的 `lspManager` 两臂(沙箱桥 e2b/k8s;host 本地 NodeLspManager)。 */
|
|
27
27
|
readonly lsp: LaneCapability;
|
|
28
28
|
/** SendUserFile 的**沙箱直传腿**(host/in-process 的本机 fs 源是另一条腿,不是本位)。
|
|
29
|
-
*
|
|
29
|
+
* 读者:部署形表行 `sandboxSendUserFile`([ref] 起本位即判据;判定依据在 `capabilities/sandbox-file-send.ts` 头注)。 */
|
|
30
30
|
readonly sandboxSendUserFile: LaneCapability;
|
|
31
31
|
/**
|
|
32
32
|
* OS 级隔离边界(手跑在容器 / microVM / Kata pod 里,而不是一台真机上)。
|
|
33
|
-
* 🔴
|
|
33
|
+
* 🔴 [ref] 起**本位即判别式**:全仓读它的唯一布尔口是 {@link laneIsolated}(boot `remote_exec_enabled.isolated` 与
|
|
34
34
|
* `remote_exec_real_system` 那一行、`config.d/remote-exec.json` 抢占披露的「隔离降级」判、wire `executionLane.isolated`
|
|
35
35
|
* + 诊断面同位、那一行 note 列的沙箱出路 —— 改前 boot 另手写一份 `e2b || k8s || local-docker`,与本表两处各算)。
|
|
36
36
|
* 本位的**独立作者** = 各 adapter 对 core 的 `capabilities.isolation` 声明:对账测试拿 core 自己的严格读器 `isIsolated`
|
|
37
37
|
* 问每条车道的**真 adapter 实例**,与本表、与 boot 行三方对拍。
|
|
38
38
|
* 型上**没有** `single-user-only` 这一档(隔离是车道的结构事实,不随租户面变)⇒ {@link laneIsolated} 的布尔化是穷举、无兜底。
|
|
39
39
|
* ⚠️ 口径 = **OS 级边界**(容器即算:共享宿主内核的 `local-docker`、runc 上的 k8s pod 都答 supported),**不是**「独立内核」强度。
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* VM 级强度(独立内核:只认 e2b 与 k8s 的 kata / gvisor 运行时,runc / local-docker fail-closed 判否)是**另一个问题、另一个词**:
|
|
41
|
+
* 部署形表行 `vmIsolatedHands`(A 值路由读它,路由上下文键 `vmIsolatedExecEnv`;[ref] 拆开同词异义)—— 不是本位的第二份。
|
|
42
42
|
*/
|
|
43
43
|
readonly isolation: Exclude<LaneCapability, "single-user-only">;
|
|
44
|
-
/** 可挂起(k8s 以配了 `s3Snapshot` 为前提 —— 「结构上能不能」的口径)
|
|
44
|
+
/** 可挂起(k8s 以配了 `s3Snapshot` 为前提 —— 「结构上能不能」的口径)。读者:部署形表行 `suspendableHands`(本位 ∧ k8s 快照店;
|
|
45
|
+
* [ref] 起 boot `remote_exec_enabled.suspendable` 只读那一行,不再手写车道词)。独立作者 = 各适配器的 `capabilities.suspendable`。 */
|
|
45
46
|
readonly suspendable: LaneCapability;
|
|
46
|
-
/** `/tmp/scratchpad/<sessionId>`
|
|
47
|
+
/** `/tmp/scratchpad/<sessionId>` 远端约定。读者:部署形表行 `remoteScratchpad`([ref] 起本位即判据;改前对账 `isRemoteScratchpadLane` 的 Set)。 */
|
|
47
48
|
readonly remoteScratchpad: LaneCapability;
|
|
48
49
|
/** 写门走 [ref] 的 `DeferredSandboxPathEnv` 代理裁决(而不是直接拿 worker 本机 fs 裁)。
|
|
49
|
-
*
|
|
50
|
+
* 判别式:部署形表行 `sandboxPathAdjudication`(读 `hostFilePlane` 的反面;对账钉逼本位与它同值)。 */
|
|
50
51
|
readonly sandboxPathAdjudication: LaneCapability;
|
|
51
52
|
/** git-worktree 隔离。判别式:`boot/execution-env.ts` 的 host 臂 vs `worktree_isolation_unsupported_lane` warn。 */
|
|
52
53
|
readonly worktreeIsolation: LaneCapability;
|
|
53
54
|
/** 记忆持久面的**自动**表态(部署可用 `MEMORY_PERSISTENCE_CAPABLE` 显式覆盖,那是旋钮不是车道位)。
|
|
54
55
|
* 判别式:`boot/memory-boundary.ts` 的 `effectiveMemoryPersistenceCapable`。 */
|
|
55
56
|
readonly memoryPersistenceCapable: LaneCapability;
|
|
56
|
-
/** 文件平面是否就在 worker 本机(= `hostSemanticsLane`)。🔴
|
|
57
|
+
/** 文件平面是否就在 worker 本机(= `hostSemanticsLane`)。🔴 [ref] 起**消费点读本位**,不再各写判别式
|
|
57
58
|
* (改前 `resolve-spec` / `stores` / `memory-scope` / `deferred-sandbox-path-env` 各写一份
|
|
58
59
|
* `lane === undefined || lane === "host"` 的同义形,分叉过就是记忆边界判错盘)。读本位的真装配点:
|
|
59
|
-
*
|
|
60
|
+
* 部署形表行 `sandboxPathAdjudication`(resolve-spec 写门 / parked 赎回腿 /
|
|
60
61
|
* 执行环境装配三处的唯一属主)、`memory-scope.ts` 的 `memoryEngineRemoteLanePosture`、
|
|
61
62
|
* `boot/memory-boundary.ts` 的 `buildMemoryBoundaryLaneFacts`(stores)。(「本会话没有持久记忆」的披露归引擎判、引擎渲染 ——
|
|
62
63
|
* 目录条目 `core/memory.no-persistent-store`,本仓只交 spec 上的事实,不再读本位做判别。)⚠️ `in-process` 在本位上是 YES(hooks/进程内读确实在本机盘上),
|
|
63
64
|
* 但它**没有手** —— 问「手在不在本机盘上」要读 {@link handsOnWorkerFilePlane},不是只读本位。 */
|
|
64
65
|
readonly hostFilePlane: LaneCapability;
|
|
65
66
|
/** core 的 `isRemoteExecutionEnv` 对本车道的判决(鸭子类型,**含 host**)= core 拿没拿到执行环境 = 手带挂没挂。
|
|
66
|
-
* 5.26.0 起它决定 `# Memory` 写指令撤不撤。🔴
|
|
67
|
+
* 5.26.0 起它决定 `# Memory` 写指令撤不撤。🔴 [ref] 起消费点读本位(改前各写 `config.remoteExec !== undefined`);
|
|
67
68
|
* 对账测试拿 core 自己的 `isRemoteExecutionEnv` 问**真 adapter 实例**来核本位的值。 */
|
|
68
69
|
readonly coreRemoteExecutionEnv: LaneCapability;
|
|
69
70
|
/**
|
|
70
|
-
*
|
|
71
|
+
* [ref] / core 7.20.0([ref]):这条车道的适配器**声明**了 `capabilities.canonicalPathAuthoritative`
|
|
71
72
|
* 没有 —— 即「我的 `canonicalPath` 是路径落点的权威,整链答不出来是解析器出了事,不是一个我看不见的
|
|
72
73
|
* 命名空间」。声明 ⇒ 读边界的执行期复核在解析器沉默时**拒**;缺席 ⇒ 今天每个适配器的读法(词法判决
|
|
73
74
|
* 成立、命令照跑)—— **缺席不是「声明为 false」**,所以这一位的 `unsupported` 读作「本车道没表态」。
|
|
@@ -79,7 +80,7 @@ export interface ExecutionLaneCaps {
|
|
|
79
80
|
*/
|
|
80
81
|
readonly canonicalPathAuthority: LaneCapability;
|
|
81
82
|
/**
|
|
82
|
-
* 车PI 修复轮 ②(
|
|
83
|
+
* 车PI 修复轮 ②([ref] / clay C-R91A ②,主会话裁「按表不按词」;裁定语义 = **租户不共宿主**)—— 这条车道**分不分租户**。
|
|
83
84
|
* · `supported` = 每个租户的命令落在各自的目标上(每任务一只沙箱:e2b / k8s / local-docker;发起者自己的设备:device,
|
|
84
85
|
* 归属由 deviceId↔principal 绑定验过),或根本没有手(in-process:没有可共享的执行目标);
|
|
85
86
|
* · `single-user-only` = 所有任务落在**同一个共享目标**上(worker 宿主:host;一台常驻 SSH 对端:ssh;一台 ADB 设备:adb)
|
|
@@ -88,7 +89,7 @@ export interface ExecutionLaneCaps {
|
|
|
88
89
|
* 🔴 **7.114.0 起本位的值不在本仓写**:七条可声明车道读 settings-schema 词表正本的表行(`executionLaneRow(lane).tenantSeparation`;
|
|
89
90
|
* 中心写闸的 `requirePrincipal ∧ single-user-only` 交叉判与本仓 `multi-tenant-shared-lane` 拒启读的是同一个值,不会分叉);
|
|
90
91
|
* 只有 `in-process` 一格是本仓自己的事实(它不在表里)。
|
|
91
|
-
* 唯一消费点是 `config-invariants.ts` 的 `multi-tenant-shared-lane`(
|
|
92
|
+
* 唯一消费点是 `config-invariants.ts` 的 `multi-tenant-shared-lane`(经部署形表行 `laneSeparatesTenants` 落成布尔)。本位值与本仓**运行期事实**
|
|
92
93
|
* 不矛盾的对账 = `test/execution-lanes-schema-conformance.test.ts`(隔离位 / 共享文件平面 ⇒ 租户档的蕴含 + 唯一一条「不隔离却分租户」
|
|
93
94
|
* 的车道 = device 点名);ssh / adb 「两租户同一目标」的行为预言机 = `test/multi-tenant-shared-lane.test.ts`
|
|
94
95
|
* (两个租户的任务铸出的 env 报同一个 `workspaceHandle().sandboxId`)。
|
|
@@ -101,7 +102,7 @@ export interface ExecutionLaneCaps {
|
|
|
101
102
|
* device 行的表态来自 v2 §4.1/§4.3:
|
|
102
103
|
* · `callerCwd: supported` —— 员工在自己设备的项目目录里干活是这条车道的**存在理由**;host 闸防的
|
|
103
104
|
* 「跨租户宿主路径穿越」在此结构性不存在(路径落在发起者自己的设备上,归属已由 deviceId↔principal
|
|
104
|
-
* 绑定验证)
|
|
105
|
+
* 绑定验证),故不要求单用户。(车A-4 前判别式答 false、登记过 {@link PLANNED_LANE_DIVERGENCES},已销行;[ref] 起部署形表行 `callerCwd` 直接读本位。)
|
|
105
106
|
* · `sandboxPathAdjudication: supported` —— 自动判真且**这是深思后的正确默认**:写门经 [ref] 代理把四读
|
|
106
107
|
* 原语转发到设备取真文件系统事实,云盘永不参与设备写目标的裁决。
|
|
107
108
|
* · `remoteScratchpad: supported` —— executor 平台闭集 = darwin|linux,`/tmp/scratchpad/<sessionId>`
|
|
@@ -124,7 +125,7 @@ export declare const ALL_EXECUTION_LANES: readonly ExecutionLane[];
|
|
|
124
125
|
export declare function isExecutionLane(word: string): word is ExecutionLane;
|
|
125
126
|
/**
|
|
126
127
|
* `REMOTE_EXEC` **真能写下去的**那几个词 = settings-schema 词表正本的 `EXECUTION_LANE_WORDS`(冻结副本,次序逐字同)。
|
|
127
|
-
* 读者:配置目录 `REMOTE_EXEC` 行的 `enumValues`(**就用它本人**,身份相等有钉 ——
|
|
128
|
+
* 读者:配置目录 `REMOTE_EXEC` 行的 `enumValues`(**就用它本人**,身份相等有钉 —— [ref] 修过「目录手抄一份词表」的病)、
|
|
128
129
|
* [ref] 拒启句的 `valid:` 列表、`REQUIRE_EXECUTION_LANE` 拒启句的出路、`multi-tenant-shared-lane` 拒启句的出路车道。
|
|
129
130
|
* 7.114.0 起全仓唯一的车道词来源是正本;本常量只是它在本仓的那一个读口。
|
|
130
131
|
*/
|
|
@@ -139,10 +140,10 @@ export declare function executionLaneRow(lane: RemoteExecProvider): ExecutionLan
|
|
|
139
140
|
*/
|
|
140
141
|
export declare function laneRequiredEnv(lane: RemoteExecProvider): readonly string[];
|
|
141
142
|
/**
|
|
142
|
-
*
|
|
143
|
+
* [ref] 件③ / [ref] —— **「`REQUIRE_EXECUTION_LANE=true` ∧ 没有任何车道被点名 ⇒ 拒启」的判据与拒因句的唯一属主**(`modelProviderRefusal` /
|
|
143
144
|
* `modelRouteEndpointRefusal` 同形:属主在叶模块,执法点各自调它,登记在 `config-invariants.ts`)。
|
|
144
145
|
*
|
|
145
|
-
* 🔴 病(
|
|
146
|
+
* 🔴 病([ref],test d327-g6-engine-7112 OBS-4 / OBS-5;2026-10-03 亲核):修前**两份句子**。运行期真拒启的是 `config.ts` 手写 throw
|
|
146
147
|
* (点名 `REQUIRE_EXECUTION_LANE` / `REMOTE_EXEC` + 修法,用户在 stderr 读到的就是它);注册表条目另写了一句短的
|
|
147
148
|
* 「the deployment asked to refuse this state」,而它只在 `web-admin-client/stage-limits.ts` 的全表校验里被调 —— 候选视图只装
|
|
148
149
|
* `BATCH1_LIMIT_KEYS` 的限额键,带不上这两键 ⇒ 对本条恒 `next === live`,**那一句没有任何读者**(test 六个拒启格 stderr 里零命中)。
|
|
@@ -151,15 +152,15 @@ export declare function laneRequiredEnv(lane: RemoteExecProvider): readonly stri
|
|
|
151
152
|
* 判据读**装配结果**(`executionLaneOf` = 全仓唯一的缺席归一读口,缺席 ⇒ `in-process`),不重判 env:`remoteExec` 缺席**就是**
|
|
152
153
|
* 「`REMOTE_EXEC` 未设/空串 ∧ `CONFIG_PROVIDER ≠ local`」这条三元链尾臂的落点;点了名却配不齐 / 认不出归 [ref] 那条既有拒启(两句话各说各的问题)。
|
|
153
154
|
*
|
|
154
|
-
* 句子的量词纪律(
|
|
155
|
-
* 照常执行(test R1n:`Now` 真执行成功)—— 不写「零工具」;名册**总条数**随 core 版本走,不写进句子(
|
|
155
|
+
* 句子的量词纪律([ref] ②):stub 车道上**手带族**(`wiring_manifest.tools.entries[].mountedBy === "hands"`)整族不挂,名册里其余工具
|
|
156
|
+
* 照常执行(test R1n:`Now` 真执行成功)—— 不写「零工具」;名册**总条数**随 core 版本走,不写进句子([ref] ③)。
|
|
156
157
|
*/
|
|
157
158
|
export declare function executionLaneRequiredRefusal(deployment: {
|
|
158
159
|
readonly requireExecutionLane: boolean;
|
|
159
160
|
readonly remoteExec?: ServiceConfigFlat["remoteExec"];
|
|
160
161
|
}): string | undefined;
|
|
161
162
|
/**
|
|
162
|
-
* `config.remoteExec?.provider` → 车道词。**全仓唯一**的缺席归一读口(
|
|
163
|
+
* `config.remoteExec?.provider` → 车道词。**全仓唯一**的缺席归一读口([ref] 门 D:`?? "in-process"` 只许住在这里,
|
|
163
164
|
* `?? "host"` 与 `lane === undefined || lane === "host"` 同义折零容忍)。
|
|
164
165
|
*
|
|
165
166
|
* · `undefined`(REMOTE_EXEC 未设)⇒ `"in-process"`,那是真车道不是缺席;
|
|
@@ -175,7 +176,7 @@ export declare function executionLaneRequiredRefusal(deployment: {
|
|
|
175
176
|
export declare function executionLaneOf(provider: RemoteExecProvider | undefined): ExecutionLane;
|
|
176
177
|
export declare function executionLaneOf(provider: string | undefined): ExecutionLane | undefined;
|
|
177
178
|
/**
|
|
178
|
-
*
|
|
179
|
+
* [ref] —— 「这条车道的**手**就在本 worker 的盘上吗」。**两位合取,都读表**(不手抄):
|
|
179
180
|
* · `coreRemoteExecutionEnv` —— core 拿到了执行环境 = 手带真挂上(`in-process` 答 NO:core 落 `StubExecutionEnv`);
|
|
180
181
|
* · `hostFilePlane` —— 那套手的文件平面就是本 worker 的盘(沙箱 / 远端 / 设备车道答 NO)。
|
|
181
182
|
* 今天只有 `host` 两位同 YES。
|
|
@@ -184,10 +185,10 @@ export declare function executionLaneOf(provider: string | undefined): Execution
|
|
|
184
185
|
* **没有手**。clay 裁 [ref] ③ 的字面写「判据读 `hostFilePlane`」,意图是同一句的「无手不挂」—— 照字面
|
|
185
186
|
* 实现会让无手部署**继续**挂 SendUserFile,与意图相反;本函数按意图实现(收车档 che-MA 写明)。
|
|
186
187
|
*
|
|
187
|
-
*
|
|
188
|
-
* ① `
|
|
189
|
-
* ② `
|
|
190
|
-
* ③ `approval.ts` 的 `buildNoResponderBootWarns` —— 写门的 ask
|
|
188
|
+
* 读者问的都是这一句,**同一只函数**,不许各写一份 `=== "host"`:
|
|
189
|
+
* ① 部署形表行 `toolsOnThisHost`(`deployment-shape.ts`)—— wire `executionLane.toolsOnThisHost` + 出厂自扫技能与中心 plugin 技能的 `baseDir`;
|
|
190
|
+
* ② 部署形表行 `callerOwnsWorkerDisk`(本列 ∧ 单主)—— SendUserFile 本机腿([ref] ③「无手不挂」)、调用方宿主路径(附加目录 / 项目上下文)、指令文件探针;
|
|
191
|
+
* ③ `approval.ts` 的 `buildNoResponderBootWarns` —— 写门的 ask 只在「有手写本机盘」时才会发生(它手里已有车道词,直接读本列)。
|
|
191
192
|
*/
|
|
192
193
|
export declare function handsOnWorkerFilePlane(lane: ExecutionLane): boolean;
|
|
193
194
|
/**
|
|
@@ -215,7 +216,7 @@ export declare function laneMeasuresHome(lane: ExecutionLane): boolean;
|
|
|
215
216
|
/** 车道行声明的读面缺省(`READ_FACE` 缺席时,这条车道自己的那一份)。 */
|
|
216
217
|
export type LaneReadFaceDefault = "open" | "roots";
|
|
217
218
|
/**
|
|
218
|
-
*
|
|
219
|
+
* [ref](clay 裁 [ref])—— **车道行显式声明读面缺省 `readFaceDefault`**:`READ_FACE` 没人表态时,这条车道自己的执行体该不该读面放开。
|
|
219
220
|
* · `open` —— 隔离型车道(`e2b` / `k8s` / `local-docker`:每任务一只沙箱,OS 级隔离边界,`tenantSeparationBasis === "isolation"`):沙箱内部就是模型的整个世界,
|
|
220
221
|
* 读面缺省放开(`auto` 连续干活不再每碰一个根外路径就出卡;写面 / deny 表 / 审批模式不受影响)。
|
|
221
222
|
* · `roots` —— 其余车道(`host` / `in-process` / `ssh` / `adb` / `device`):车道本身不给读面任何放开的理由 —— 手落在一台真机 / 共享目标 / 员工设备上。
|
|
@@ -230,7 +231,7 @@ export declare function laneReadFaceDefault(lane: ExecutionLane): LaneReadFaceDe
|
|
|
230
231
|
/** 声明 `open` 的那一句**挂载告诫**(运维面指路句与车道文档同读这一句):把宿主目录 / 共享卷挂进隔离沙箱的部署,在 `open` 面上宿主文件对模型零问可读。 */
|
|
231
232
|
export declare const LANE_OPEN_READ_FACE_CAUTION = "a deployment that mounts host paths or shared volumes into the sandbox (hostPath, bind mount) exposes those host files to reads on an open face \u2014 pin READ_FACE=roots or add read-deny rows (READ_DENY_PATTERNS) for them";
|
|
232
233
|
/**
|
|
233
|
-
*
|
|
234
|
+
* [ref] —— 「这条车道的手在不在 OS 级隔离边界里」。**全仓唯一**的布尔判别式(读表 `isolation` 位,见该位头注的读者清单)。
|
|
234
235
|
* 穷举 switch、无 default 臂:`isolation` 的型只有两档,加档 = 编译红。
|
|
235
236
|
*
|
|
236
237
|
* ⚠️ 本函数对 `in-process` 也答(表上那一行是 unsupported ⇒ false)—— 那一格是「表」的完整性,不是 wire 的说法:
|
|
@@ -245,19 +246,6 @@ export declare function laneIsolated(lane: ExecutionLane): boolean;
|
|
|
245
246
|
* 穷举 switch、无 default 臂:该位的型三档(supported / unsupported / single-user-only)都要表态,加档 = 编译红。
|
|
246
247
|
*/
|
|
247
248
|
export declare function laneWiresExecutionEnv(lane: ExecutionLane): boolean;
|
|
248
|
-
/**
|
|
249
|
-
* S-281 —— 这条车道是不是**单机形缺省**落点(`REMOTE_EXEC` 未设 / 空串 ∧ `CONFIG_PROVIDER=local`,没人点名)。
|
|
250
|
-
* 判据 = 装配出的车道值自己带的记号 `singleMachineDefault`(唯一写者 = `config.ts` 三元链的隐式 host 尾臂;显式 `REMOTE_EXEC=host`
|
|
251
|
-
* 与 `config.d/remote-exec.json` 覆写都铸不带它的新值)。**唯一读口**,读者两处:`config.ts` 车道落点一行的 `source`
|
|
252
|
-
* (`exec_lane_selected`,文件覆写之前播)与 `boot/execution-env.ts` 的 `remote_exec_real_system.note`(覆写之后打)——
|
|
253
|
-
* 同一个记号、两个时刻,不另按 env 原文重判。
|
|
254
|
-
*/
|
|
255
|
-
export declare function isSingleMachineDefaultLane(remoteExec: ServiceConfigFlat["remoteExec"]): boolean;
|
|
256
|
-
/** 把一位能力在**具体部署**上落成布尔:租户面是唯一入参(旋钮由消费点自己再合取)。
|
|
257
|
-
* 穷举 switch,无 default 臂 —— {@link LaneCapability} 加词而此处不加臂 = 编译红。 */
|
|
258
|
-
export declare function laneCapabilityHolds(cap: LaneCapability, deployment: {
|
|
259
|
-
requirePrincipal?: boolean;
|
|
260
|
-
}): boolean;
|
|
261
249
|
/** 一条**已登记**的分叉:表写的是目标态,今天的判别式还答别的。 */
|
|
262
250
|
export interface PlannedLaneDivergence {
|
|
263
251
|
readonly lane: ExecutionLane;
|
|
@@ -272,7 +260,7 @@ export interface PlannedLaneDivergence {
|
|
|
272
260
|
* 分叉登记簿 —— **闭集**。对账测试双向咬:表外分叉 = 漂移(红),表内分叉被补齐而不销行 = 陈账(红)。
|
|
273
261
|
*
|
|
274
262
|
* 🟢 **空表 = 今天的真实状态**(车A-4,2026-08-28 销行)。唯一那条(device 的 `callerCwd`)已按登记的
|
|
275
|
-
*
|
|
263
|
+
* 条件补齐:当年的 `deviceCwdHonored`([ref] 起并入部署形表行 `callerCwd`,读本表那一位)+ 写侧闸(`boot/resolve-spec.ts` 的同一处单写者)+ 读侧
|
|
276
264
|
* 消费(`plugins/remote-env-device.ts` 的 `effectiveDeviceCwd`)**同批**落地,于是能力表写的 `supported`
|
|
277
265
|
* 与判别式给的答案一致,分叉自然消失 —— 对账测试的双向咬(表外分叉 = 红 / 表内陈账 = 红)因此对本表
|
|
278
266
|
* 只剩「保持空」这一条要求。
|
|
@@ -301,7 +289,7 @@ export interface LaneHomeDeployment {
|
|
|
301
289
|
/**
|
|
302
290
|
* 「**这条部署的执行环境**以哪个 home 运行」—— `~/…` 形权限规则(`Edit(~/.ssh/**)`)唯一的基。
|
|
303
291
|
*
|
|
304
|
-
* ## 病(接入审计 M13 / DEBTS
|
|
292
|
+
* ## 病(接入审计 M13 / DEBTS [ref]④)
|
|
305
293
|
* core 的 `ExecutionEnv.homeDir` 是**由 adapter 声明**的座(`engine/harness/types.d.ts`,可选):
|
|
306
294
|
* 缺席 ⇒ core 的 `resolvePathPattern` 回 `{missingBase:"home"}` ⇒ 该规则对这条腿判 `unreadable`
|
|
307
295
|
* (fail-closed 的 ask)。四只远端 adapter(e2b/k8s/host/ssh)一个都没声明,而 server 侧的 422 前置门
|