@sema-agent/server 7.134.0 → 7.136.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 +197 -1
- package/USAGE.md +147 -42
- package/deploy/sema-up/README.md +1 -1
- package/deploy/sema-up/chart/templates/NOTES.txt +1 -1
- package/deploy/sema-up/chart/values.yaml +1 -1
- 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 +122 -154
- package/dist/approval-card.js +50 -51
- package/dist/approval-content-kind.d.ts +23 -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 +35 -6
- package/dist/auth-bridge.js +20 -3
- 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/budget-tracing.d.ts +1 -2
- package/dist/boot/budget-tracing.js +2 -2
- 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/org-memory.js +1 -1
- 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 +36 -29
- package/dist/boot/runner-deps.d.ts +11 -11
- package/dist/boot/runner-deps.js +7 -4
- 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-04-stores.d.ts +1 -1
- package/dist/boot/stage-05-execution-env.d.ts +1 -1
- package/dist/boot/stage-05-execution-env.js +4 -4
- package/dist/boot/stage-06-runners.d.ts +1 -1
- package/dist/boot/stage-06-runners.js +0 -2
- package/dist/boot/stage-07-capability-layer.d.ts +1 -1
- package/dist/boot/stage-08-reapers.d.ts +1 -1
- package/dist/boot/stage-09-leader.d.ts +1 -1
- package/dist/boot/stage-10-http-server.d.ts +1 -1
- package/dist/boot/stores.js +4 -4
- package/dist/boot/web-admin.d.ts +17 -17
- package/dist/boot/web-admin.js +15 -27
- package/dist/boot/workflow-orchestration.js +2 -9
- package/dist/brain.d.ts +11 -11
- package/dist/brain.js +12 -3
- package/dist/budget.d.ts +7 -7
- package/dist/budget.js +4 -0
- 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 +11 -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 +29 -32
- package/dist/capability-facts.js +17 -21
- package/dist/center-config-tier.d.ts +1 -1
- package/dist/center-credential.d.ts +22 -8
- package/dist/center-credential.js +18 -3
- 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-catalog.js +12 -10
- package/dist/config-d-migration.js +1 -1
- package/dist/config-invariants.d.ts +5 -5
- package/dist/config-invariants.js +11 -2
- package/dist/config-lkg.d.ts +1 -39
- package/dist/config-lkg.js +1 -83
- package/dist/config-provider.d.ts +13 -13
- package/dist/config-provider.js +2 -1
- package/dist/config-types.d.ts +95 -87
- package/dist/config.d.ts +26 -24
- package/dist/config.js +38 -18
- 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/elicitation.d.ts +8 -7
- package/dist/elicitation.js +9 -8
- 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 +25 -11
- package/dist/file-history-disclosure.js +25 -14
- 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 +45 -14
- package/dist/fleet-client.js +24 -4
- package/dist/fleet-lease.d.ts +23 -19
- package/dist/fleet-lease.js +31 -23
- package/dist/governance-http-status.d.ts +2 -2
- package/dist/hooks/hook-llm.d.ts +7 -7
- package/dist/hooks/hook-llm.js +14 -8
- package/dist/hooks/hook-runner.d.ts +58 -31
- package/dist/hooks/hook-runner.js +37 -19
- 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 +62 -17
- package/dist/http/checkpoint-ctx.js +78 -35
- package/dist/http/dispatch.d.ts +3 -3
- package/dist/http/dispatch.js +9 -9
- 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 +9 -23
- package/dist/http/resume-ctx-read.js +2 -3
- 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 -7
- package/dist/http/routes/approvals-assistant.js +101 -26
- 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 +23 -11
- package/dist/http/routes/session-sync.d.ts +1 -1
- package/dist/http/routes/session-sync.js +97 -46
- package/dist/http/routes/sessions-list.js +1 -1
- package/dist/http/routes/sessions.js +43 -53
- 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 +33 -24
- package/dist/index.d.ts +1 -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 +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-gap.d.ts +49 -4
- package/dist/model-route-gap.js +34 -1
- 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/object-store-buckets.d.ts +13 -0
- package/dist/object-store-buckets.js +3 -0
- 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 +17 -13
- package/dist/observability/fail-open.js +17 -13
- package/dist/observability/metrics.d.ts +3 -3
- package/dist/observability/metrics.js +1 -1
- package/dist/observability/principal-context.d.ts +4 -1
- package/dist/observability/principal-context.js +6 -1
- 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 +20 -18
- package/dist/parked-decide.js +31 -11
- package/dist/parked-revive-surface.d.ts +7 -7
- package/dist/parked-revive-surface.js +2 -3
- package/dist/peer-directory.d.ts +5 -4
- package/dist/peer-directory.js +6 -6
- 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 +42 -15
- package/dist/plugins/approval-ask-store-sql.js +21 -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/blob-backend.js +2 -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 +130 -0
- package/dist/plugins/checkpoint-index-columns.js +90 -0
- package/dist/plugins/checkpoint-store-sql.d.ts +71 -69
- package/dist/plugins/checkpoint-store-sql.js +109 -127
- 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 +15 -7
- package/dist/plugins/file-history-store-sql.js +55 -36
- 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 +7 -7
- 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 +73 -54
- package/dist/plugins/one-time-migrations.js +131 -134
- 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 +26 -13
- package/dist/plugins/remote-env-k8s.js +24 -7
- 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/s3-answer.d.ts +15 -0
- package/dist/plugins/s3-answer.js +5 -0
- 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/snapshot-bucket-presence.d.ts +39 -4
- package/dist/plugins/snapshot-bucket-presence.js +35 -7
- package/dist/plugins/sql-driver.d.ts +8 -8
- package/dist/plugins/sql-errors.d.ts +40 -1
- package/dist/plugins/sql-errors.js +49 -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/store-fault.d.ts +4 -0
- package/dist/plugins/store-fault.js +8 -0
- 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 +10 -3
- 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 +20 -5
- 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-declaration-refusal.d.ts +94 -0
- package/dist/request-declaration-refusal.js +78 -0
- package/dist/request-image-urls.d.ts +6 -0
- package/dist/request-image-urls.js +27 -0
- package/dist/request-key-closure.d.ts +6 -1
- package/dist/request-key-closure.js +5 -2
- 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-caps-resolver.js +1 -1
- package/dist/runtime-governance.d.ts +9 -9
- package/dist/sandbox-pkg-source.d.ts +17 -12
- package/dist/sandbox-pkg-source.js +14 -9
- package/dist/sealed-key.d.ts +22 -3
- package/dist/sealed-key.js +47 -4
- 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 +65 -37
- package/dist/session-incarnation.js +30 -12
- 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-row.d.ts +3 -17
- package/dist/session-row.js +4 -0
- package/dist/session-sync-kernel.d.ts +4 -4
- package/dist/session-sync.d.ts +61 -6
- package/dist/session-sync.js +55 -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 +52 -79
- package/dist/task-a2a.js +224 -62
- package/dist/task-cwd.d.ts +7 -88
- package/dist/task-cwd.js +2 -15
- package/dist/task-mcp.d.ts +13 -17
- package/dist/task-mcp.js +29 -49
- 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 +166 -207
- package/dist/tool-approval.js +61 -61
- package/dist/tool-rule-names.d.ts +2 -2
- package/dist/trace/core-keyset-guard.d.ts +13 -8
- 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 +69 -67
- 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 +61 -31
- package/dist/trace/redact.js +394 -153
- package/dist/trace/self-minted-wire.d.ts +302 -14
- package/dist/trace/self-minted-wire.js +87 -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-refusal.d.ts +52 -0
- package/dist/url-credential-refusal.js +14 -0
- package/dist/url-refusal.d.ts +16 -3
- package/dist/url-refusal.js +15 -2
- 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 +32 -3
- package/dist/workspace-space.js +26 -0
- package/dist/write-protection.d.ts +2 -2
- package/package.json +5 -3
- package/scripts/drain-check-local.mjs +4 -2
- package/scripts/drain-check.mysql.sql +6 -2
- package/scripts/drain-check.pg.sql +6 -2
- package/skills/loop.md +1 -1
- package/skills/schedule.md +1 -1
- package/wire-changes/server@7.104.0.json +134 -0
- package/wire-changes/server@7.105.0.json +53 -0
- package/wire-changes/server@7.106.0.json +475 -0
- package/wire-changes/server@7.107.0.json +64 -0
- package/wire-changes/server@7.108.0.json +153 -0
- package/wire-changes/server@7.109.0.json +46 -0
- package/wire-changes/server@7.110.0.json +90 -0
- package/wire-changes/server@7.111.0.json +86 -0
- package/wire-changes/server@7.112.0.json +60 -0
- package/wire-changes/server@7.113.0.json +26 -0
- package/wire-changes/server@7.114.0.json +26 -0
- package/wire-changes/server@7.115.0.json +97 -0
- package/wire-changes/server@7.116.0.json +218 -0
- package/wire-changes/server@7.116.1.json +26 -0
- package/wire-changes/server@7.117.0.json +65 -0
- package/wire-changes/server@7.118.0.json +129 -0
- package/wire-changes/server@7.119.0.json +65 -0
- package/wire-changes/server@7.120.0.json +89 -0
- package/wire-changes/server@7.121.0.json +219 -0
- package/wire-changes/server@7.122.0.json +54 -0
- package/wire-changes/server@7.123.0.json +26 -0
- package/wire-changes/server@7.124.0.json +336 -0
- package/wire-changes/server@7.124.1.json +26 -0
- package/wire-changes/server@7.125.0.json +111 -0
- package/wire-changes/server@7.126.0.json +285 -0
- package/wire-changes/server@7.127.0.json +77 -0
- package/wire-changes/server@7.127.1.json +26 -0
- package/wire-changes/server@7.127.2.json +53 -0
- package/wire-changes/server@7.128.0.json +26 -0
- package/wire-changes/server@7.129.0.json +106 -0
- package/wire-changes/server@7.129.1.json +26 -0
- package/wire-changes/server@7.130.0.json +26 -0
- package/wire-changes/server@7.131.0.json +118 -0
- package/wire-changes/server@7.132.0.json +226 -0
- package/wire-changes/server@7.133.0.json +1155 -0
- package/wire-changes/server@7.134.0.json +107 -0
- package/wire-changes/server@7.135.0.json +174 -0
- package/wire-changes/server@7.136.0.json +448 -0
- 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
|
+
* (`mcpInjectionHonored` = 锁 ∧ 合规 ∧ `!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 时把请求体(用户内容 / 记忆正文)原样送到
|
package/dist/elicitation.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface ElicitationFrame {
|
|
|
20
20
|
* coordinate instead, same posture as the stream-approval frames' `serverNowMs`. */
|
|
21
21
|
serverNowMs?: number;
|
|
22
22
|
/** "elicitation" only (additive; the same window pair `question` carries): the coordinator's OWN answer window —
|
|
23
|
-
* at expiry the ask
|
|
23
|
+
* at expiry the ask is released as `cancel` (nobody answered; see RELEASE_ACTION). Minted from the SAME `ttlMs` the `setTimeout` below arms (one source), so
|
|
24
24
|
* a form replayed from the ledger can be judged still-waiting (no `elicitation_complete` with this id ∧
|
|
25
25
|
* `expiresAtMs` not reached) or lapsed even when the close row never landed (a lost write, a crashed replica). */
|
|
26
26
|
expiresInMs?: number;
|
|
@@ -37,13 +37,13 @@ export interface ElicitationRunContext {
|
|
|
37
37
|
abortSignal?: AbortSignal;
|
|
38
38
|
}
|
|
39
39
|
export interface ElicitationThrottle {
|
|
40
|
-
/** Max concurrent in-flight elicitations per run leg (parallel tool calls can each elicit). Breach ⇒ decline. */
|
|
40
|
+
/** Max concurrent in-flight elicitations per run leg (parallel tool calls can each elicit). Breach ⇒ refused (`decline`). */
|
|
41
41
|
maxConcurrentPerRun: number;
|
|
42
|
-
/** Max total elicitations one run leg will surface to the human. Breach ⇒ decline
|
|
42
|
+
/** Max total elicitations one run leg will surface to the human. Breach ⇒ refused (`decline`; flood defense). */
|
|
43
43
|
maxTotalPerRun: number;
|
|
44
|
-
/** Min gap (ms) between two elicitations from the SAME server within a run. Within ⇒ decline
|
|
44
|
+
/** Min gap (ms) between two elicitations from the SAME server within a run. Within ⇒ refused (`decline`; burst guard). */
|
|
45
45
|
minIntervalMsPerServer: number;
|
|
46
|
-
/** An unanswered elicitation
|
|
46
|
+
/** An unanswered elicitation is released as `cancel` after this (ms) — the human walked away; don't hold core forever. */
|
|
47
47
|
ttlMs: number;
|
|
48
48
|
}
|
|
49
49
|
export declare const DEFAULT_ELICITATION_THROTTLE: ElicitationThrottle;
|
|
@@ -75,8 +75,9 @@ export declare class ElicitationCoordinator {
|
|
|
75
75
|
* the case where the leg ends/throws while an elicitation is parked but the leg's own loop has already drained. */
|
|
76
76
|
runWithContext<T>(ctx: ElicitationRunContext, fn: () => Promise<T>): Promise<T>;
|
|
77
77
|
/** `RunnerDeps.onElicit`. Core calls this when an opted-in server elicits the END USER mid-tool-call; the resolved
|
|
78
|
-
* value is sent back to the server on the still-open connection. Fail-closed (`
|
|
79
|
-
*
|
|
78
|
+
* value is sent back to the server on the still-open connection. Fail-closed (never `accept`) in every uncertain
|
|
79
|
+
* case: a rule-based refusal is `decline`, a release nobody answered is `cancel` (RELEASE_ACTION).
|
|
80
|
+
* Arrow property so it can be passed as `onElicit: coordinator.elicit` with `this` bound. */
|
|
80
81
|
elicit: (req: McpElicitRequest, signal?: AbortSignal) => Promise<McpElicitResponse>;
|
|
81
82
|
/** `POST /v1/elicitations/:id/respond` — resolve a parked elicitation with the shell's answer. Owner-gated with a
|
|
82
83
|
* 404 (no existence oracle): a non-owner AND an unknown id (answered / expired / wrong replica) both get 404.
|
package/dist/elicitation.js
CHANGED
|
@@ -5,6 +5,7 @@ import { recordFailOpen } from "./observability/fail-open.js";
|
|
|
5
5
|
import { refusalBody } from "./http/refusal-body.js";
|
|
6
6
|
const MAX_ELICIT_MESSAGE_CHARS = 4096;
|
|
7
7
|
const MAX_ELICIT_SCHEMA_BYTES = 8192;
|
|
8
|
+
const RELEASE_ACTION = { refused: "decline", unanswered: "cancel" };
|
|
8
9
|
export const DEFAULT_ELICITATION_THROTTLE = {
|
|
9
10
|
maxConcurrentPerRun: 2,
|
|
10
11
|
maxTotalPerRun: 20,
|
|
@@ -65,7 +66,7 @@ export class ElicitationCoordinator {
|
|
|
65
66
|
finally {
|
|
66
67
|
for (const [, p] of [...this.pending]) {
|
|
67
68
|
if (p.taskId === ctx.taskId)
|
|
68
|
-
p.settle({ action:
|
|
69
|
+
p.settle({ action: RELEASE_ACTION.unanswered });
|
|
69
70
|
}
|
|
70
71
|
this.counters.delete(ctx.taskId);
|
|
71
72
|
}
|
|
@@ -74,18 +75,18 @@ export class ElicitationCoordinator {
|
|
|
74
75
|
elicit = async (req, signal) => {
|
|
75
76
|
const ctx = this.als.getStore();
|
|
76
77
|
if (!ctx)
|
|
77
|
-
return { action:
|
|
78
|
+
return { action: RELEASE_ACTION.refused };
|
|
78
79
|
if (typeof req.url === "string" && req.url.length > 0)
|
|
79
|
-
return { action:
|
|
80
|
+
return { action: RELEASE_ACTION.refused };
|
|
80
81
|
if (signal?.aborted || ctx.abortSignal?.aborted)
|
|
81
|
-
return { action:
|
|
82
|
+
return { action: RELEASE_ACTION.unanswered };
|
|
82
83
|
const rc = this.countersFor(ctx.taskId);
|
|
83
84
|
const t = this.now();
|
|
84
85
|
const last = rc.lastByServer.get(req.server);
|
|
85
86
|
if (rc.inflight >= this.throttle.maxConcurrentPerRun ||
|
|
86
87
|
rc.total >= this.throttle.maxTotalPerRun ||
|
|
87
88
|
(last !== undefined && t - last < this.throttle.minIntervalMsPerServer)) {
|
|
88
|
-
return { action:
|
|
89
|
+
return { action: RELEASE_ACTION.refused };
|
|
89
90
|
}
|
|
90
91
|
const id = uuidv7();
|
|
91
92
|
rc.inflight += 1;
|
|
@@ -107,8 +108,8 @@ export class ElicitationCoordinator {
|
|
|
107
108
|
rc.inflight = Math.max(0, rc.inflight - 1);
|
|
108
109
|
resolveAnswer(r);
|
|
109
110
|
};
|
|
110
|
-
const onAbort = () => settle({ action:
|
|
111
|
-
timer = setTimeout(() => settle({ action:
|
|
111
|
+
const onAbort = () => settle({ action: RELEASE_ACTION.unanswered });
|
|
112
|
+
timer = setTimeout(() => settle({ action: RELEASE_ACTION.unanswered }), this.throttle.ttlMs);
|
|
112
113
|
timer.unref?.();
|
|
113
114
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
114
115
|
ctx.abortSignal?.addEventListener("abort", onAbort, { once: true });
|
|
@@ -124,7 +125,7 @@ export class ElicitationCoordinator {
|
|
|
124
125
|
}
|
|
125
126
|
else if (delivery === "failed") {
|
|
126
127
|
recordFailOpen("server.elicitation.open-frame-undelivered", `elicitation=${id} server=${req.server}`);
|
|
127
|
-
settle({ action:
|
|
128
|
+
settle({ action: RELEASE_ACTION.unanswered });
|
|
128
129
|
}
|
|
129
130
|
const answer = await answerP;
|
|
130
131
|
void emitted
|
|
@@ -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): {
|