@sema-agent/server 7.131.0 → 7.133.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 +575 -0
- package/README.md +12 -9
- package/README.zh-CN.md +9 -6
- package/USAGE.md +326 -98
- package/deploy/sema-up/README.md +19 -1
- package/deploy/sema-up/chart/templates/server-v4pro.yaml +5 -2
- package/deploy/sema-up/chart/templates/server.yaml +5 -2
- package/deploy/sema-up/stack/compose.yaml +3 -0
- package/deploy/sema-up/stack/sema-stack-cluster.yaml +4 -2
- package/dist/adoption/plan.d.ts +3 -2
- package/dist/adoption/plan.js +7 -5
- package/dist/adoption/runner.js +3 -10
- package/dist/adoption/sql.d.ts +3 -2
- package/dist/adoption/sql.js +3 -5
- package/dist/adoption/wire.d.ts +4 -1
- package/dist/adoption/wire.js +1 -0
- package/dist/approval-ask-audit-store.d.ts +31 -13
- package/dist/approval-ask-audit-store.js +272 -74
- package/dist/approval-ask-machine.d.ts +15 -0
- package/dist/approval-ask-machine.js +6 -0
- package/dist/approval-ask-retention.d.ts +136 -0
- package/dist/approval-ask-retention.js +102 -0
- package/dist/approval-card.d.ts +82 -20
- package/dist/approval-card.js +46 -16
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval.d.ts +9 -0
- package/dist/approval.js +24 -3
- package/dist/audit.d.ts +33 -19
- package/dist/audit.js +12 -16
- package/dist/auth-bridge.d.ts +4 -0
- package/dist/auth-bridge.js +10 -11
- package/dist/bake-runner/main.js +3 -2
- package/dist/boot/deferred-sandbox-path-env.js +1 -1
- package/dist/boot/deployment-mods.d.ts +31 -0
- package/dist/boot/deployment-mods.js +26 -0
- package/dist/boot/execution-env.d.ts +1 -1
- package/dist/boot/execution-env.js +27 -12
- package/dist/boot/execution-lane.js +11 -0
- package/dist/boot/leader.js +2 -0
- package/dist/boot/memory-boundary.d.ts +2 -2
- package/dist/boot/memory-boundary.js +2 -2
- package/dist/boot/memory-consolidation.d.ts +5 -4
- package/dist/boot/memory-consolidation.js +7 -6
- package/dist/boot/org-delivery.d.ts +28 -0
- package/dist/boot/org-delivery.js +20 -0
- package/dist/boot/read-deny-anchor-audit.d.ts +17 -0
- package/dist/boot/read-deny-anchor-audit.js +36 -0
- package/dist/boot/reapers.d.ts +3 -0
- package/dist/boot/reapers.js +21 -1
- package/dist/boot/resolve-spec.d.ts +4 -5
- package/dist/boot/resolve-spec.js +74 -123
- package/dist/boot/runner-deps.d.ts +19 -8
- package/dist/boot/runner-deps.js +15 -2
- package/dist/boot/session-faces.d.ts +2 -7
- package/dist/boot/session-faces.js +4 -2
- package/dist/boot/stage-02-web-admin-pull.js +4 -1
- package/dist/boot/stage-03-store-backend.d.ts +1 -1
- package/dist/boot/stage-03-store-backend.js +2 -2
- package/dist/boot/stage-04-stores.d.ts +1 -1
- package/dist/boot/stage-05-execution-env.d.ts +4 -4
- package/dist/boot/stage-05-execution-env.js +7 -10
- package/dist/boot/stage-06-runners.d.ts +4 -2
- package/dist/boot/stage-06-runners.js +11 -7
- package/dist/boot/stage-07-capability-layer.d.ts +4 -2
- package/dist/boot/stage-07-capability-layer.js +27 -6
- package/dist/boot/stage-08-reapers.d.ts +4 -2
- package/dist/boot/stage-08-reapers.js +2 -2
- package/dist/boot/stage-09-leader.d.ts +6 -9
- package/dist/boot/stage-10-http-server.d.ts +6 -9
- package/dist/boot/stage-10-http-server.js +7 -9
- package/dist/boot/stores.d.ts +1 -1
- package/dist/boot/stores.js +7 -8
- package/dist/boot/web-admin.d.ts +4 -3
- package/dist/boot/web-admin.js +186 -98
- package/dist/boot/workflow-orchestration.d.ts +2 -0
- package/dist/boot/workflow-orchestration.js +2 -1
- package/dist/brain.js +25 -25
- package/dist/breaker-key.d.ts +6 -0
- package/dist/breaker-key.js +29 -0
- package/dist/budget.js +5 -4
- package/dist/caller-text-echo.d.ts +23 -0
- package/dist/caller-text-echo.js +21 -0
- package/dist/capabilities/brand-identity.d.ts +26 -0
- package/dist/capabilities/brand-identity.js +27 -0
- package/dist/capabilities/center-plugins.d.ts +7 -0
- package/dist/capabilities/center-plugins.js +1 -1
- package/dist/capabilities/center-prompts.d.ts +32 -59
- package/dist/capabilities/center-prompts.js +18 -32
- package/dist/capabilities/composite-members.d.ts +1 -1
- package/dist/capabilities/composite-members.js +1 -1
- package/dist/capabilities/engine-capabilities.js +2 -1
- package/dist/capabilities/execution-lane.js +2 -2
- package/dist/capabilities/hands-lane.d.ts +30 -6
- package/dist/capabilities/hands-lane.js +11 -1
- package/dist/capabilities/mcp-probe.d.ts +48 -3
- package/dist/capabilities/mcp-probe.js +47 -135
- package/dist/capabilities/scenarios.d.ts +95 -45
- package/dist/capabilities/scenarios.js +53 -38
- package/dist/capabilities/skills.d.ts +19 -4
- package/dist/capabilities/skills.js +30 -10
- package/dist/capability-facts.d.ts +34 -4
- package/dist/capability-facts.js +28 -2
- package/dist/center-config-tier.d.ts +69 -0
- package/dist/center-config-tier.js +42 -0
- package/dist/checkpoint-identity.d.ts +16 -0
- package/dist/checkpoint-identity.js +19 -0
- package/dist/config-catalog.d.ts +17 -10
- package/dist/config-catalog.js +47 -32
- package/dist/config-d-migration.d.ts +3 -1
- package/dist/config-d-migration.js +2 -2
- package/dist/config-dir-trust.d.ts +114 -0
- package/dist/config-dir-trust.js +388 -0
- package/dist/config-invariants.d.ts +18 -5
- package/dist/config-invariants.js +35 -3
- package/dist/config-lkg.d.ts +9 -9
- package/dist/config-lkg.js +20 -4
- package/dist/config-provider.d.ts +9 -2
- package/dist/config-provider.js +18 -6
- package/dist/config-types.d.ts +75 -20
- package/dist/config-types.js +8 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.js +137 -62
- package/dist/delegated-session-owner.d.ts +185 -0
- package/dist/delegated-session-owner.js +119 -0
- package/dist/device-protocol.d.ts +5 -3
- package/dist/device-protocol.js +1 -1
- package/dist/device-ws-hub.js +21 -2
- package/dist/device-ws-protocol.d.ts +70 -6
- package/dist/device-ws-protocol.js +50 -22
- package/dist/elicitation.js +3 -2
- package/dist/entry-problems.d.ts +34 -0
- package/dist/entry-problems.js +14 -0
- package/dist/env-name-allowlist-knobs.d.ts +12 -2
- package/dist/env-name-allowlist-knobs.js +5 -4
- package/dist/exec-bounds.d.ts +15 -3
- package/dist/exec-bounds.js +4 -0
- package/dist/execution-lane-caps.d.ts +56 -10
- package/dist/execution-lane-caps.js +50 -0
- package/dist/field-conflict.d.ts +43 -0
- package/dist/field-conflict.js +20 -0
- package/dist/fleet/fleet-bus.d.ts +80 -6
- package/dist/fleet/fleet-bus.js +41 -9
- package/dist/hooks/classic-stations.d.ts +91 -0
- package/dist/hooks/classic-stations.js +27 -0
- package/dist/hooks/command-spawn.d.ts +57 -0
- package/dist/hooks/command-spawn.js +139 -0
- package/dist/hooks/hook-llm.d.ts +8 -5
- package/dist/hooks/hook-llm.js +79 -36
- package/dist/hooks/hook-runner.d.ts +349 -95
- package/dist/hooks/hook-runner.js +855 -568
- package/dist/hooks/hook-source.d.ts +44 -0
- package/dist/hooks/hook-source.js +40 -0
- package/dist/http/active-run-conflict.d.ts +5 -13
- package/dist/http/active-run-conflict.js +17 -27
- package/dist/http/admission.d.ts +8 -2
- package/dist/http/admission.js +188 -101
- package/dist/http/approval-sweeps.js +99 -21
- package/dist/http/caller-trust.d.ts +77 -0
- package/dist/http/caller-trust.js +143 -0
- package/dist/http/checkpoint-ctx.d.ts +41 -24
- package/dist/http/checkpoint-ctx.js +23 -16
- package/dist/http/claimed-run.d.ts +14 -0
- package/dist/http/claimed-run.js +15 -0
- package/dist/http/device-placement.d.ts +2 -4
- package/dist/http/device-placement.js +7 -11
- package/dist/http/dispatch.d.ts +0 -4
- package/dist/http/dispatch.js +15 -13
- package/dist/http/durable-run-leg.d.ts +6 -33
- package/dist/http/durable-run-leg.js +36 -10
- package/dist/http/health-self-report.d.ts +7 -5
- package/dist/http/health-self-report.js +4 -18
- package/dist/http/owner-access.d.ts +56 -0
- package/dist/http/owner-access.js +42 -0
- package/dist/http/principal-gate.d.ts +70 -28
- package/dist/http/principal-gate.js +61 -15
- package/dist/http/readiness.d.ts +11 -5
- package/dist/http/readiness.js +10 -3
- package/dist/http/refusal-body.d.ts +21 -0
- package/dist/http/refusal-body.js +4 -0
- package/dist/http/request-guards.d.ts +43 -23
- package/dist/http/request-guards.js +53 -17
- package/dist/http/resume-ctx-read.d.ts +2 -5
- package/dist/http/resume-ctx-read.js +7 -4
- package/dist/http/resume-legs.d.ts +28 -4
- package/dist/http/resume-legs.js +169 -91
- package/dist/http/retired-service-deps.d.ts +43 -0
- package/dist/http/retired-service-deps.js +18 -0
- package/dist/http/route-ctx.d.ts +44 -28
- package/dist/http/route-ctx.js +4 -0
- package/dist/http/route-table.js +2 -0
- package/dist/http/routes/a2a-serve.js +3 -4
- package/dist/http/routes/admin-config-refresh.js +1 -1
- package/dist/http/routes/admin-drain.js +1 -1
- package/dist/http/routes/admin-memory-optout.js +5 -1
- package/dist/http/routes/adoption.js +2 -9
- package/dist/http/routes/approvals-assistant.js +49 -48
- package/dist/http/routes/background.js +3 -2
- package/dist/http/routes/capabilities.js +21 -5
- package/dist/http/routes/config-catalog.d.ts +3 -3
- package/dist/http/routes/config-catalog.js +1 -1
- package/dist/http/routes/devices.js +3 -17
- package/dist/http/routes/diagnostics.js +6 -2
- package/dist/http/routes/images.js +6 -7
- package/dist/http/routes/leader.js +1 -8
- package/dist/http/routes/mcp-reconnect.d.ts +1 -1
- package/dist/http/routes/mcp-reconnect.js +3 -2
- package/dist/http/routes/memory-bundle.js +1 -1
- package/dist/http/routes/memory-compliance.js +1 -1
- package/dist/http/routes/memory-consolidation.js +1 -1
- package/dist/http/routes/memory-origin.js +1 -1
- package/dist/http/routes/memory-policy.d.ts +1 -1
- package/dist/http/routes/memory-policy.js +3 -2
- package/dist/http/routes/notify-wake.js +8 -21
- package/dist/http/routes/observability.js +2 -2
- package/dist/http/routes/principal-inbox.d.ts +39 -0
- package/dist/http/routes/principal-inbox.js +76 -0
- package/dist/http/routes/retention-ops.js +2 -9
- package/dist/http/routes/rules.js +5 -18
- package/dist/http/routes/runs.d.ts +5 -0
- package/dist/http/routes/runs.js +34 -107
- package/dist/http/routes/session-sync.js +15 -26
- package/dist/http/routes/sessions.js +30 -40
- package/dist/http/routes/shared-memory.js +2 -13
- package/dist/http/routes/side-query.js +8 -7
- package/dist/http/routes/tasks.js +67 -21
- package/dist/http/routes/workflows.d.ts +351 -0
- package/dist/http/routes/workflows.js +153 -119
- package/dist/http/send.d.ts +33 -10
- package/dist/http/send.js +21 -4
- package/dist/http/server.d.ts +27 -18
- package/dist/http/server.js +34 -6
- package/dist/http/stored-body-replay.js +17 -4
- package/dist/http/submit-ctx.d.ts +25 -0
- package/dist/http/submit-ctx.js +40 -0
- package/dist/http/submit-replay.d.ts +4 -3
- package/dist/http/submit-replay.js +5 -4
- package/dist/http/wire-types.d.ts +11 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -2
- package/dist/lane-home-probe.d.ts +112 -0
- package/dist/lane-home-probe.js +101 -0
- package/dist/leader/endpoint.d.ts +4 -1
- package/dist/leader/endpoint.js +11 -10
- package/dist/limit-refusal.d.ts +59 -0
- package/dist/limit-refusal.js +15 -0
- package/dist/main.js +1 -1
- package/dist/mcp-assertion-header.d.ts +32 -19
- package/dist/mcp-assertion-header.js +10 -9
- package/dist/mcp-tool-faces.d.ts +5 -0
- package/dist/mcp-tool-faces.js +6 -4
- package/dist/memory-project-layer.d.ts +37 -0
- package/dist/memory-project-layer.js +46 -0
- package/dist/memory-scope.d.ts +24 -17
- package/dist/memory-scope.js +24 -8
- package/dist/memory-sync-client.d.ts +27 -13
- package/dist/memory-sync-client.js +107 -18
- package/dist/model-entry-refusal.d.ts +9 -1
- package/dist/model-entry-refusal.js +6 -1
- package/dist/model-plane-face.d.ts +51 -0
- package/dist/model-plane-face.js +24 -0
- package/dist/model-provider.d.ts +44 -12
- package/dist/model-provider.js +21 -2
- package/dist/model-route-endpoint.d.ts +9 -12
- package/dist/model-route-endpoint.js +8 -11
- package/dist/model-route-env.d.ts +22 -0
- package/dist/model-route-env.js +2 -0
- package/dist/model-route-gap.d.ts +60 -30
- package/dist/model-route-gap.js +21 -15
- package/dist/observability/corrupt-read-seat.d.ts +7 -0
- package/dist/observability/corrupt-read-seat.js +9 -0
- package/dist/observability/cost-taxonomy.d.ts +7 -7
- package/dist/observability/err-text.d.ts +6 -0
- package/dist/observability/err-text.js +18 -4
- package/dist/observability/fail-open.d.ts +76 -14
- package/dist/observability/fail-open.js +76 -14
- package/dist/observability/metrics.js +4 -1
- package/dist/observability/prompt-manifest.d.ts +33 -82
- package/dist/observability/prompt-manifest.js +122 -17
- package/dist/observability/run-terminal.js +14 -6
- package/dist/observability/secret-env-scrub.d.ts +13 -1
- package/dist/observability/secret-env-scrub.js +13 -1
- package/dist/observability/tool-trace.d.ts +16 -21
- package/dist/observability/tool-trace.js +58 -49
- package/dist/operator-ask.d.ts +10 -0
- package/dist/operator-ask.js +3 -0
- package/dist/orchestration/workflow-agent-session-index.d.ts +12 -12
- package/dist/orchestration/workflow-agent-session-index.js +9 -13
- package/dist/orchestration/workflow-completion-inbox.d.ts +42 -15
- package/dist/orchestration/workflow-completion-inbox.js +13 -0
- package/dist/orchestration/workflow-notify-journal.d.ts +13 -32
- package/dist/orchestration/workflow-notify-journal.js +27 -34
- package/dist/orchestration/workflow-park-decision.d.ts +89 -0
- package/dist/orchestration/workflow-park-decision.js +118 -0
- package/dist/org-delivery-gate.d.ts +81 -0
- package/dist/org-delivery-gate.js +59 -0
- package/dist/panel-tool-names.d.ts +23 -0
- package/dist/panel-tool-names.js +8 -0
- package/dist/parked-decide.d.ts +39 -6
- package/dist/parked-decide.js +98 -51
- package/dist/parked-revive-surface.d.ts +9 -2
- package/dist/parked-revive-surface.js +11 -8
- package/dist/per-task-image.d.ts +7 -1
- package/dist/per-task-image.js +3 -3
- package/dist/permission-rule-list.d.ts +1 -1
- package/dist/permission-rule-list.js +2 -2
- package/dist/plain-string-record.d.ts +25 -0
- package/dist/plain-string-record.js +32 -0
- package/dist/plugins/approval-ask-store-file.d.ts +16 -1
- package/dist/plugins/approval-ask-store-file.js +21 -0
- package/dist/plugins/approval-ask-store-memory.d.ts +18 -1
- package/dist/plugins/approval-ask-store-memory.js +34 -2
- package/dist/plugins/approval-ask-store-sql.d.ts +25 -0
- package/dist/plugins/approval-ask-store-sql.js +37 -1
- package/dist/plugins/blob-backend.d.ts +83 -15
- package/dist/plugins/blob-backend.js +68 -15
- package/dist/plugins/breaker-state-sql.d.ts +2 -2
- package/dist/plugins/breaker-state-sql.js +4 -4
- package/dist/plugins/caching-session-store.d.ts +3 -0
- package/dist/plugins/caching-session-store.js +3 -0
- package/dist/plugins/checkpoint-store-sql.d.ts +28 -4
- package/dist/plugins/checkpoint-store-sql.js +59 -28
- package/dist/plugins/file-history-store-sql.d.ts +5 -2
- package/dist/plugins/file-history-store-sql.js +3 -1
- package/dist/plugins/file-run-store.d.ts +5 -13
- package/dist/plugins/file-run-store.js +9 -0
- package/dist/plugins/fork-routing-session-store.d.ts +9 -1
- package/dist/plugins/fork-routing-session-store.js +12 -1
- package/dist/plugins/host-platform.d.ts +2 -0
- package/dist/plugins/host-platform.js +2 -1
- package/dist/plugins/k8s-bg-scripts.d.ts +11 -0
- package/dist/plugins/k8s-bg-scripts.js +22 -0
- package/dist/plugins/local-checkpoint-store.d.ts +2 -0
- package/dist/plugins/local-checkpoint-store.js +11 -3
- package/dist/plugins/local-session-store.d.ts +1 -1
- package/dist/plugins/local-session-store.js +1 -1
- package/dist/plugins/local-session-window.d.ts +39 -0
- package/dist/plugins/local-session-window.js +54 -0
- package/dist/plugins/mailbox-recipient-lifecycle.d.ts +3 -2
- package/dist/plugins/mailbox-store-sql.d.ts +30 -48
- package/dist/plugins/mailbox-store-sql.js +77 -52
- package/dist/plugins/memory-embedder-fingerprint.js +2 -1
- package/dist/plugins/memory-run-store.d.ts +5 -13
- package/dist/plugins/memory-run-store.js +8 -0
- package/dist/plugins/one-time-migrations.d.ts +245 -93
- package/dist/plugins/one-time-migrations.js +668 -207
- package/dist/plugins/org-delivery-quota-store.d.ts +123 -0
- package/dist/plugins/org-delivery-quota-store.js +228 -0
- package/dist/plugins/permission-rule-store-sql.d.ts +13 -7
- package/dist/plugins/permission-rule-store-sql.js +4 -18
- package/dist/plugins/pg-pool.js +39 -7
- package/dist/plugins/pg-session-storage.d.ts +20 -8
- package/dist/plugins/pg-session-storage.js +34 -21
- package/dist/plugins/remote-env-adb.d.ts +12 -12
- package/dist/plugins/remote-env-adb.js +21 -6
- package/dist/plugins/remote-env-device.js +3 -0
- package/dist/plugins/remote-env-e2b.d.ts +1 -1
- package/dist/plugins/remote-env-e2b.js +21 -9
- package/dist/plugins/remote-env-host.d.ts +9 -9
- package/dist/plugins/remote-env-host.js +10 -32
- package/dist/plugins/remote-env-k8s.d.ts +103 -38
- package/dist/plugins/remote-env-k8s.js +288 -95
- package/dist/plugins/remote-env-local-docker.d.ts +27 -13
- package/dist/plugins/remote-env-local-docker.js +82 -11
- package/dist/plugins/remote-env-ssh.d.ts +21 -12
- package/dist/plugins/remote-env-ssh.js +117 -5
- package/dist/plugins/remote-shell.d.ts +0 -1
- package/dist/plugins/remote-shell.js +1 -2
- package/dist/plugins/retention-store-sql.js +6 -2
- package/dist/plugins/run-store-sql.d.ts +16 -14
- package/dist/plugins/run-store-sql.js +22 -2
- package/dist/plugins/schema-consistency.d.ts +54 -0
- package/dist/plugins/schema-consistency.js +52 -0
- package/dist/plugins/schema-indexes.js +2 -0
- package/dist/plugins/send-user-file.js +2 -2
- package/dist/plugins/session-epoch-anchor.d.ts +39 -0
- package/dist/plugins/session-epoch-anchor.js +22 -0
- package/dist/plugins/session-store.d.ts +18 -8
- package/dist/plugins/session-store.js +15 -4
- package/dist/plugins/shared-memory-store-sql.d.ts +9 -3
- package/dist/plugins/shared-memory-store-sql.js +5 -16
- package/dist/plugins/sql-driver.d.ts +205 -1
- package/dist/plugins/sql-driver.js +325 -13
- package/dist/plugins/sql-errors.d.ts +64 -0
- package/dist/plugins/sql-errors.js +57 -0
- package/dist/plugins/store-backend.d.ts +36 -1
- package/dist/plugins/store-backend.js +42 -15
- package/dist/plugins/store-contracts.d.ts +42 -0
- package/dist/plugins/store-contracts.js +1 -0
- package/dist/plugins/tidb-pool.d.ts +6 -1
- package/dist/plugins/tidb-pool.js +44 -10
- package/dist/plugins/tidb-session-storage.d.ts +8 -11
- package/dist/plugins/tidb-session-storage.js +6 -16
- package/dist/plugins/tidb-session-store.d.ts +24 -4
- package/dist/plugins/tidb-session-store.js +29 -5
- package/dist/plugins/workflow-journal-store-sql.d.ts +73 -19
- package/dist/plugins/workflow-journal-store-sql.js +19 -6
- package/dist/plugins/workflow-run-store-sql.d.ts +30 -8
- package/dist/plugins/workflow-run-store-sql.js +50 -9
- package/dist/posture-source.d.ts +18 -10
- package/dist/posture-source.js +4 -1
- package/dist/project-identity.d.ts +45 -6
- package/dist/project-identity.js +162 -8
- package/dist/project-layer-key.d.ts +28 -0
- package/dist/project-layer-key.js +29 -0
- package/dist/prompts-domain-validate.d.ts +17 -61
- package/dist/prompts-domain-validate.js +9 -119
- package/dist/question.js +3 -2
- package/dist/read-deny-entry.d.ts +25 -0
- package/dist/read-deny-entry.js +12 -0
- package/dist/read-face-posture.d.ts +37 -11
- package/dist/read-face-posture.js +32 -3
- package/dist/request-key-closure.d.ts +9 -2
- package/dist/request-key-closure.js +11 -5
- package/dist/request-value-closure.d.ts +5 -0
- package/dist/request-value-closure.js +11 -3
- package/dist/rule-entry-list.d.ts +38 -11
- package/dist/rule-entry-list.js +106 -30
- package/dist/rules-consent.js +3 -4
- package/dist/run-acceptance.d.ts +19 -3
- package/dist/run-acceptance.js +13 -1
- package/dist/run-local.js +54 -24
- package/dist/runs.d.ts +15 -8
- package/dist/runs.js +35 -1
- package/dist/runtime-caps-resolver.d.ts +16 -6
- package/dist/runtime-caps-resolver.js +18 -5
- package/dist/sandbox-pkg-source.d.ts +19 -1
- package/dist/sandbox-pkg-source.js +29 -7
- package/dist/security.d.ts +87 -9
- package/dist/security.js +52 -9
- package/dist/server-secret-env.d.ts +44 -18
- package/dist/server-secret-env.js +49 -8
- package/dist/session-error-wire.d.ts +19 -2
- package/dist/session-error-wire.js +5 -1
- package/dist/session-incarnation.d.ts +15 -5
- package/dist/session-incarnation.js +16 -9
- package/dist/session-titled-frame.d.ts +33 -0
- package/dist/session-titled-frame.js +4 -0
- package/dist/session-titler.d.ts +9 -1
- package/dist/session-titler.js +27 -6
- package/dist/spec-fields.d.ts +28 -16
- package/dist/spec-fields.js +66 -54
- package/dist/sql-engine-posture.d.ts +31 -4
- package/dist/sql-engine-posture.js +36 -1
- package/dist/stored-request-tool-axes-m19.d.ts +19 -4
- package/dist/stored-request-tool-axes-m19.js +30 -2
- package/dist/task-a2a.d.ts +9 -1
- package/dist/task-a2a.js +73 -47
- package/dist/task-cwd.d.ts +1 -1
- package/dist/task-mcp.d.ts +46 -58
- package/dist/task-mcp.js +82 -107
- package/dist/task-settings.d.ts +95 -108
- package/dist/task-settings.js +77 -98
- package/dist/text-bidi.d.ts +1 -48
- package/dist/text-bidi.js +3 -5
- package/dist/tighten-only-seats.d.ts +150 -0
- package/dist/tighten-only-seats.js +196 -0
- package/dist/tool-approval.d.ts +304 -88
- package/dist/tool-approval.js +623 -239
- package/dist/trace/core-keyset-guard.d.ts +122 -20
- package/dist/trace/engine-notice-wire.d.ts +11 -3
- package/dist/trace/engine-notice-wire.js +8 -1
- package/dist/trace/exit-seat.d.ts +28 -0
- package/dist/trace/exit-seat.js +76 -0
- package/dist/trace/ledger-events.d.ts +6 -3
- package/dist/trace/ledger-sink.js +4 -1
- package/dist/trace/model-segment.js +1 -1
- package/dist/trace/project.d.ts +98 -17
- package/dist/trace/project.js +98 -50
- package/dist/trace/projection-table.d.ts +100 -0
- package/dist/trace/projection-table.js +130 -0
- package/dist/trace/redact.d.ts +54 -0
- package/dist/trace/redact.js +778 -152
- package/dist/trace/self-minted-wire.d.ts +345 -1
- package/dist/trace/self-minted-wire.js +117 -1
- package/dist/trace/wire-projection-faces.d.ts +377 -3
- package/dist/trace/wire-projection-faces.js +164 -1
- package/dist/url-refusal.js +2 -0
- package/dist/web-admin-client/apply-effective.d.ts +12 -0
- package/dist/web-admin-client/apply-effective.js +56 -5
- package/dist/web-admin-client/candidate-gate.d.ts +6 -6
- package/dist/web-admin-client/candidate-gate.js +3 -3
- package/dist/web-admin-client/facade.d.ts +1 -1
- package/dist/web-admin-client/facade.js +1 -1
- package/dist/web-admin-client/http-client.js +0 -6
- package/dist/web-admin-client/read-face.js +5 -9
- package/dist/web-admin-client/read-warnings.d.ts +13 -0
- package/dist/web-admin-client/read-warnings.js +10 -0
- package/dist/web-admin-client/skills-mcp.d.ts +3 -0
- package/dist/web-admin-client/skills-mcp.js +11 -9
- package/dist/web-admin-client/types.d.ts +2 -3
- package/dist/workspace-cache.d.ts +35 -0
- package/dist/workspace-cache.js +36 -0
- package/dist/workspace-space.d.ts +3 -2
- package/dist/workspace-space.js +2 -0
- package/docs/DEVICE-EXECUTOR-PROTOCOL.md +65 -10
- package/package.json +8 -4
- package/scripts/drain-check-local.mjs +34 -1
- package/scripts/drain-check.mysql.sql +30 -2
- package/scripts/drain-check.pg.sql +29 -2
- package/dist/capabilities/memory-notice.d.ts +0 -138
- package/dist/capabilities/memory-notice.js +0 -64
- package/dist/capabilities/prompt.d.ts +0 -17
- package/dist/capabilities/prompt.js +0 -6
- package/dist/mcp-content-origin.d.ts +0 -34
- package/dist/mcp-content-origin.js +0 -10
- package/dist/tool-axis-words.d.ts +0 -27
- package/dist/tool-axis-words.js +0 -9
- package/dist/wire-name-bound.d.ts +0 -14
- package/dist/wire-name-bound.js +0 -13
package/dist/brain.js
CHANGED
|
@@ -4,11 +4,12 @@ import { buildDefaultResilience } from "./config-types.js";
|
|
|
4
4
|
import { resolveModelApiKey } from "./key-resolver.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { isModelKeyPoison, modelKeyPoisonIdentity } from "./key-resolver.js";
|
|
7
|
-
import {
|
|
7
|
+
import { anthropicRouteRoot, brainLaneFor, mountRoutes, routeTableOf } from "./model-provider.js";
|
|
8
8
|
import { openaiRouteBaseUrl } from "./model-route-endpoint.js";
|
|
9
9
|
import { catalogEntryFingerprint } from "./web-admin-client/restart-signal.js";
|
|
10
10
|
import { buildDisplaySafeRefusal, buildDisplaySafeUrl } from "./trace/redact.js";
|
|
11
11
|
import { createModelReachBrain } from "./model-unreachable-notice.js";
|
|
12
|
+
import { breakerKeyOf, routeDigestOf } from "./breaker-key.js";
|
|
12
13
|
function isOffDeploymentRoot(baseUrl, config) {
|
|
13
14
|
if (!baseUrl)
|
|
14
15
|
return false;
|
|
@@ -20,6 +21,9 @@ function isOffDeploymentRoot(baseUrl, config) {
|
|
|
20
21
|
function deploymentGatewayRoots(config) {
|
|
21
22
|
return config.gatewayBaseUrl !== undefined ? [config.gatewayBaseUrl, ...config.gatewayFallbackUrls] : [];
|
|
22
23
|
}
|
|
24
|
+
function breakerRoutesOf(config, r) {
|
|
25
|
+
return r.circuitBreaker ? deploymentGatewayRoots(config).slice(0, -1) : [];
|
|
26
|
+
}
|
|
23
27
|
function deploymentGatewayKey(config) {
|
|
24
28
|
return config.gatewayBaseUrl !== undefined ? config.gatewayApiKey : undefined;
|
|
25
29
|
}
|
|
@@ -53,6 +57,7 @@ export function createBrainAssembly(config, deps = {}) {
|
|
|
53
57
|
? { maxRetries: FAST_FAIL_MAX_RETRIES }
|
|
54
58
|
: {};
|
|
55
59
|
const routes = deploymentGatewayRoots(config);
|
|
60
|
+
const breakerRoutes = breakerRoutesOf(config, r);
|
|
56
61
|
const openaiBrains = routes.map((baseUrl, i) => {
|
|
57
62
|
const gatewayKey = deploymentGatewayKey(config);
|
|
58
63
|
const brain = constructRouteBrain(i === 0 ? "gateway route" : `gateway fallback route[${i - 1}]`, [baseUrl], () => createOpenAIBrain({
|
|
@@ -62,13 +67,12 @@ export function createBrainAssembly(config, deps = {}) {
|
|
|
62
67
|
fetchImpl,
|
|
63
68
|
...timeouts,
|
|
64
69
|
}));
|
|
65
|
-
|
|
66
|
-
return r.circuitBreaker && !isLast
|
|
70
|
+
return i < breakerRoutes.length
|
|
67
71
|
? createCircuitBreakerBrain(brain, {
|
|
68
72
|
failureThreshold: r.failureThreshold,
|
|
69
73
|
cooldownMs: r.cooldownMs,
|
|
70
74
|
state: breakerState,
|
|
71
|
-
key: (m) =>
|
|
75
|
+
key: (m) => breakerKeyOf(m, baseUrl),
|
|
72
76
|
})
|
|
73
77
|
: brain;
|
|
74
78
|
});
|
|
@@ -77,23 +81,18 @@ export function createBrainAssembly(config, deps = {}) {
|
|
|
77
81
|
: openaiBrains.length > 1
|
|
78
82
|
? createFailoverBrain(openaiBrains)
|
|
79
83
|
: openaiBrains[0];
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}))
|
|
93
|
-
: undefined;
|
|
94
|
-
let brain = anthropicBrain
|
|
95
|
-
? createRoutingBrain({ anthropic: anthropicBrain }, { fallback: gatewayBrain })
|
|
96
|
-
: gatewayBrain;
|
|
84
|
+
const brainRoutes = mountRoutes(config, (anthropicCfg) => constructRouteBrain("anthropic route", [anthropicCfg.baseUrl], () => createAnthropicBrain({
|
|
85
|
+
...(anthropicCfg.authToken
|
|
86
|
+
? { headers: { Authorization: `Bearer ${anthropicCfg.authToken}` } }
|
|
87
|
+
: { apiKey: anthropicCfg.apiKey }),
|
|
88
|
+
baseUrl: anthropicRouteRoot(anthropicCfg),
|
|
89
|
+
version: anthropicCfg.version,
|
|
90
|
+
cacheBreakpoints: anthropicCfg.cacheBreakpoints,
|
|
91
|
+
...(anthropicCfg.maxRetries !== undefined ? { maxRetries: anthropicCfg.maxRetries } : {}),
|
|
92
|
+
fetchImpl,
|
|
93
|
+
...timeouts,
|
|
94
|
+
})));
|
|
95
|
+
let brain = Object.keys(brainRoutes).length > 0 ? createRoutingBrain(brainRoutes, { fallback: gatewayBrain }) : gatewayBrain;
|
|
97
96
|
let degradeBaked = null;
|
|
98
97
|
if (config.degrade?.reactive) {
|
|
99
98
|
const degradeTo = config.degrade.to;
|
|
@@ -104,12 +103,12 @@ export function createBrainAssembly(config, deps = {}) {
|
|
|
104
103
|
const ownEnvRef = credential.apiKeyEnv !== undefined ? { [fallbackModel.name]: credential.apiKeyEnv } : {};
|
|
105
104
|
const ownSealed = credential.sealed !== undefined ? { [fallbackModel.name]: credential.sealed } : {};
|
|
106
105
|
const fbOwnApiKey = () => resolveModelApiKey(fallbackModel.name, ownEnvRef, process.env, ownSealed);
|
|
107
|
-
const anthropicLaneHop =
|
|
106
|
+
const anthropicLaneHop = brainLaneFor(fallbackModel.provider, brainRoutes) === "anthropic";
|
|
108
107
|
const fbDeclaredRoot = degradeDeclaredRoot(fallbackModel.baseUrl, config);
|
|
109
108
|
const fbDeploymentKey = deploymentGatewayKey(config);
|
|
110
|
-
const fallback = anthropicLaneHop
|
|
109
|
+
const fallback = anthropicLaneHop
|
|
111
110
|
?
|
|
112
|
-
|
|
111
|
+
brainRoutes.anthropic
|
|
113
112
|
: constructRouteBrain(`degrade target "${degradeTo}"`, [fallbackModel.baseUrl, config.gatewayBaseUrl], () => createOpenAIBrain({
|
|
114
113
|
...(fbDeclaredRoot !== undefined ? { baseUrl: fbDeclaredRoot } : {}),
|
|
115
114
|
...(fbDeploymentKey ? { apiKey: fbDeploymentKey } : {}),
|
|
@@ -211,6 +210,7 @@ export function brainSummary(config) {
|
|
|
211
210
|
idleTimeoutMs: r.idleTimeoutMs,
|
|
212
211
|
circuitBreaker: breakerActive,
|
|
213
212
|
circuitBreakerRequested: r.circuitBreaker,
|
|
213
|
+
circuitBreakerRoutes: breakerRoutesOf(config, r).map((u) => ({ route: buildDisplaySafeUrl(u), digest: routeDigestOf(u) })),
|
|
214
214
|
gatewayRetryCap: config.gatewayMaxRetries !== undefined
|
|
215
215
|
? `env:${config.gatewayMaxRetries}`
|
|
216
216
|
: hasFailover || r.circuitBreaker || config.degrade?.reactive
|
|
@@ -223,7 +223,7 @@ export function brainSummary(config) {
|
|
|
223
223
|
const target = degradeTarget;
|
|
224
224
|
if (!target)
|
|
225
225
|
return { reactiveDegradeRoutePairing: null, reactiveDegradeRouteRefusal: null };
|
|
226
|
-
if (
|
|
226
|
+
if (brainLaneFor(target.provider, routeTableOf(config)) === "anthropic") {
|
|
227
227
|
return { reactiveDegradeRoutePairing: "anthropic-lane", reactiveDegradeRouteRefusal: null };
|
|
228
228
|
}
|
|
229
229
|
const credential = degradeCredentialIdentityOf(config, target);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Model } from "@sema-agent/core";
|
|
2
|
+
/** 一条路由的身份摘要(键的路由段;启动日志把它与该路由的展示串并排印出,运维据此把错误文本 / 表行对回路由)。 */
|
|
3
|
+
export declare function routeDigestOf(baseUrl: string): string;
|
|
4
|
+
/** 断路器键:`<头段>@<路由摘要>`,头段 = `<provider>:<model id>`(放不下列宽预算时见 {@link boundedHead})。provider 缺席按 `openai`(与 core 默认键同一个前半)。恒 ≤ 190 字节。 */
|
|
5
|
+
export declare function breakerKeyOf(model: Pick<Model, "provider" | "id">, baseUrl: string): string;
|
|
6
|
+
//# sourceMappingURL=breaker-key.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { routeKeyOf } from "@sema-agent/core";
|
|
3
|
+
const ROUTE_DIGEST_HEX = 24;
|
|
4
|
+
const BREAKER_KEY_MAX_BYTES = 190;
|
|
5
|
+
const HEAD_MAX_BYTES = BREAKER_KEY_MAX_BYTES - 1 - ROUTE_DIGEST_HEX;
|
|
6
|
+
const HEAD_DIGEST_HEX = 16;
|
|
7
|
+
const sha256Hex = (text) => createHash("sha256").update(text, "utf8").digest("hex");
|
|
8
|
+
export function routeDigestOf(baseUrl) {
|
|
9
|
+
return sha256Hex(routeKeyOf(baseUrl)).slice(0, ROUTE_DIGEST_HEX);
|
|
10
|
+
}
|
|
11
|
+
export function breakerKeyOf(model, baseUrl) {
|
|
12
|
+
return `${boundedHead(`${model.provider ?? "openai"}:${model.id}`)}@${routeDigestOf(baseUrl)}`;
|
|
13
|
+
}
|
|
14
|
+
function boundedHead(head) {
|
|
15
|
+
if (Buffer.byteLength(head, "utf8") <= HEAD_MAX_BYTES)
|
|
16
|
+
return head;
|
|
17
|
+
const tail = `~${sha256Hex(head).slice(0, HEAD_DIGEST_HEX)}`;
|
|
18
|
+
let prefix = "";
|
|
19
|
+
let used = 0;
|
|
20
|
+
for (const ch of head) {
|
|
21
|
+
const n = Buffer.byteLength(ch, "utf8");
|
|
22
|
+
if (used + n > HEAD_MAX_BYTES - tail.length)
|
|
23
|
+
break;
|
|
24
|
+
prefix += ch;
|
|
25
|
+
used += n;
|
|
26
|
+
}
|
|
27
|
+
return `${prefix}${tail}`;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=breaker-key.js.map
|
package/dist/budget.js
CHANGED
|
@@ -93,9 +93,11 @@ export function createTracer(metrics, costQuota, modelUsage, fleetUsage, fleetLe
|
|
|
93
93
|
const weightedTokens = Math.round((e.totalInputTokens + e.completionTokens) * qw);
|
|
94
94
|
fleetUsage?.record(currentPrincipal(), e.model, e.taskId, { inputTokens: e.totalInputTokens, outputTokens: e.completionTokens, ...(e.costMicroUsd !== undefined ? { costMicroUsd: e.costMicroUsd } : {}), weightedTokens, quotaWeightAtUse: qw });
|
|
95
95
|
fleetLease?.recordSpend(currentPrincipal(), { weightedTokens, ...(e.costMicroUsd !== undefined ? { costMicroUsd: e.costMicroUsd } : {}) });
|
|
96
|
-
if (e.
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
if (e.turn !== undefined) {
|
|
97
|
+
if (e.firstTokenMs !== undefined)
|
|
98
|
+
metrics.observe("brain_first_token_ms", e.firstTokenMs);
|
|
99
|
+
metrics.observe("brain_call_latency_ms", e.latencyMs);
|
|
100
|
+
}
|
|
99
101
|
}
|
|
100
102
|
else if (e.kind === "tool.call") {
|
|
101
103
|
metrics.inc("tool_calls_total", { name: toolName(e.name), ok: String(e.ok) });
|
|
@@ -107,7 +109,6 @@ export function createTracer(metrics, costQuota, modelUsage, fleetUsage, fleetLe
|
|
|
107
109
|
metrics.inc("degraded_total", { reason: e.reason });
|
|
108
110
|
}
|
|
109
111
|
else if (e.kind === "prompt.assembled") {
|
|
110
|
-
metrics.inc("prompt_constitution_total", { mode: e.constitution });
|
|
111
112
|
promptManifests?.record(e.taskId, promptManifestRecordOf(e));
|
|
112
113
|
}
|
|
113
114
|
else if (e.kind === "config.assembled") {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** 回显的字符上限(剥完控制与双向字符之后数)。 */
|
|
2
|
+
export declare const CALLER_TEXT_ECHO_MAX_CHARS = 64;
|
|
3
|
+
/** 站点给的回显选项。 */
|
|
4
|
+
export interface EchoCallerTextOptions {
|
|
5
|
+
/** 回显的字符上限(剥完控制与双向字符之后数);不给 = {@link CALLER_TEXT_ECHO_MAX_CHARS}。必须是正整数,否则抛 `RangeError`(编程错误,不静默落成某个长度)。 */
|
|
6
|
+
readonly maxChars?: number;
|
|
7
|
+
}
|
|
8
|
+
/** 调用方写的串的回显形(不带引号):剥控制与双向字符 → 截到 `maxChars`(缺省 {@link CALLER_TEXT_ECHO_MAX_CHARS})字 + 「…」。 */
|
|
9
|
+
export declare function echoCallerText(text: string, opts?: EchoCallerTextOptions): string;
|
|
10
|
+
/** 句子里点名一个值的写法:{@link echoCallerText} 外加一对双引号。 */
|
|
11
|
+
export declare function quotedCallerText(text: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* 数据截断(**不是**回显):前 `max` 字 + `…(总长)`;不超则原样。给喂回模型 / 交给 hook 的**数据**用 —— 读的一方(模型、hook 作者)看得出被截、截掉多少。
|
|
14
|
+
* 不剥控制与双向字符:数据要原样(exit 2 的多行 stderr 保行)。写进日志字段 / 回到人面前的串**不用**它,用 {@link echoCallerText}。
|
|
15
|
+
*/
|
|
16
|
+
export declare function clipDataText(s: string, max: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* 硬帽:前 `max` 字,什么也不加;不超则原样,缺席(`undefined`)透传。给带 schema `.max()` 的 wire 字段用(审批卡:整只 ask 不能因为一个 200 KB 的字段落不了库)——
|
|
19
|
+
* 截断记号会让串超过 schema 的上限,所以这里没有记号;也不剥控制与双向字符(卡上的串是要被人审的那一串,清洗会让「看到的」与「将执行的」不是同一个东西)。
|
|
20
|
+
*/
|
|
21
|
+
export declare function capText(s: string, max: number): string;
|
|
22
|
+
export declare function capText(s: string | undefined, max: number): string | undefined;
|
|
23
|
+
//# sourceMappingURL=caller-text-echo.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { stripControlAndBidi } from "@sema-agent/settings-schema";
|
|
2
|
+
export const CALLER_TEXT_ECHO_MAX_CHARS = 64;
|
|
3
|
+
export function echoCallerText(text, opts) {
|
|
4
|
+
const max = opts?.maxChars ?? CALLER_TEXT_ECHO_MAX_CHARS;
|
|
5
|
+
if (!Number.isInteger(max) || max < 1)
|
|
6
|
+
throw new RangeError(`echoCallerText: maxChars must be a positive integer, got ${String(max)}`);
|
|
7
|
+
const clean = stripControlAndBidi(text);
|
|
8
|
+
return clean.length > max ? `${clean.slice(0, max)}…` : clean;
|
|
9
|
+
}
|
|
10
|
+
export function quotedCallerText(text) {
|
|
11
|
+
return `"${echoCallerText(text)}"`;
|
|
12
|
+
}
|
|
13
|
+
export function clipDataText(s, max) {
|
|
14
|
+
return s.length > max ? `${s.slice(0, max)}…(${s.length})` : s;
|
|
15
|
+
}
|
|
16
|
+
export function capText(s, max) {
|
|
17
|
+
if (s === undefined)
|
|
18
|
+
return undefined;
|
|
19
|
+
return s.length > max ? s.slice(0, max) : s;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=caller-text-echo.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 品牌行(`SEMA_IDENTITY`)—— 品牌部署(local / TOC:`CONFIG_PROVIDER=local`、`run-local`)的 `default` / `code` 两场景,模型的 role 层以它开头。
|
|
3
|
+
*
|
|
4
|
+
* 律:品牌行是**部署类的一条 overlay**,不是每请求的分叉。部署座(`RunnerDeps.mods`)上一张 `prompt.compose` 注册,恒答同一条 overlay ——
|
|
5
|
+
* `add` 到 `role` 档(部署类的 add rank 99,排在目录的角色基底 `core/role.base` rank 100 之前),带 `when`:
|
|
6
|
+
* · `binding.anyOf: ["default", "code"]` —— 场景名由 `buildPromptSeats` 写进 `TaskSpec.promptBinding`(恒写);`code-review` / `scan` 与中心声明的场景
|
|
7
|
+
* 不在表里 ⇒ 不挂(它们与 `default` 同为 `general` 角色,`host.role` 分不开,只有 binding 分得开);
|
|
8
|
+
* · `facts.isSubagent: false` —— 委派子代(Agent 工具 / workflow 腿)经父 spec 座继承 binding,但它拿的是子代角色(引擎 sub-agent persona 或定义的
|
|
9
|
+
* systemPrompt),品牌行只属于与用户对话的那一腿(与 7.131.0 同:场景的提示从来不进子代)。
|
|
10
|
+
* 判它挂不挂的只有引擎一处(`whenHolds`,每一类 overlay 同一只);本服务不读 `e.selectors`,不写任何每请求的分支。
|
|
11
|
+
* 文本只在 `prompts/identity.ts` 一处(本模块不复述);「这台部署是不是品牌部署」只有一只判官 {@link isBrandedDeployment} —— HTTP 服务的三个读者
|
|
12
|
+
* (部署座的品牌行 `createDeploymentMods`、commit 尾注署名、场景详情读面的 `promptSummary`)同调它;本地 CLI(`run-local`)恒是品牌形,直接表态 `true`。
|
|
13
|
+
*/
|
|
14
|
+
import type { EngineDollar, ModRegistration, PromptOverlay } from "@sema-agent/core";
|
|
15
|
+
import type { ServiceConfig } from "../config-types.js";
|
|
16
|
+
/** 🔴 **品牌部署的唯一判官**:local 配置源(`CONFIG_PROVIDER=local`,TOC / Sema 产品线)⇒ 品牌部署。读者见本模块头注;再多一个读者也调它,不各写一遍。 */
|
|
17
|
+
export declare function isBrandedDeployment(config: Pick<ServiceConfig, "configProvider">): boolean;
|
|
18
|
+
/** 注册名(admission / 清单 / `superseded` 归因里的那个名字)。 */
|
|
19
|
+
export declare const BRAND_IDENTITY_REGISTRATION = "server.brand-identity";
|
|
20
|
+
/** 品牌行挂的场景(binding 表)。 */
|
|
21
|
+
export declare const BRAND_IDENTITY_SCENARIOS: readonly ["default", "code"];
|
|
22
|
+
/** 那一条 overlay(数据;注册恒答它)。 */
|
|
23
|
+
export declare const BRAND_IDENTITY_OVERLAY: PromptOverlay;
|
|
24
|
+
/** 品牌行的部署注册:`prompt.compose` 是收集型站点 —— 先 `await next(e)`,原样保留它交回的 overlays,再接上自己的一条。 */
|
|
25
|
+
export declare function createBrandIdentityRegistration(): ModRegistration<EngineDollar>;
|
|
26
|
+
//# sourceMappingURL=brand-identity.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SEMA_IDENTITY } from "./prompts/identity.js";
|
|
2
|
+
export function isBrandedDeployment(config) {
|
|
3
|
+
return config.configProvider === "local";
|
|
4
|
+
}
|
|
5
|
+
export const BRAND_IDENTITY_REGISTRATION = "server.brand-identity";
|
|
6
|
+
export const BRAND_IDENTITY_SCENARIOS = ["default", "code"];
|
|
7
|
+
export const BRAND_IDENTITY_OVERLAY = {
|
|
8
|
+
id: "sema/identity",
|
|
9
|
+
op: "add",
|
|
10
|
+
target: "role",
|
|
11
|
+
text: SEMA_IDENTITY,
|
|
12
|
+
when: { binding: { anyOf: [...BRAND_IDENTITY_SCENARIOS] }, facts: { isSubagent: false } },
|
|
13
|
+
};
|
|
14
|
+
export function createBrandIdentityRegistration() {
|
|
15
|
+
return {
|
|
16
|
+
name: BRAND_IDENTITY_REGISTRATION,
|
|
17
|
+
tier: "prepend",
|
|
18
|
+
uses: { events: ["prompt.compose"], calls: [] },
|
|
19
|
+
register(on) {
|
|
20
|
+
on("prompt.compose", async (_$, e, next) => {
|
|
21
|
+
const lower = (await next(e))?.overlays;
|
|
22
|
+
return { overlays: [...(Array.isArray(lower) ? lower : []), BRAND_IDENTITY_OVERLAY] };
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=brand-identity.js.map
|
|
@@ -104,6 +104,13 @@ export declare function applyCenterPlugins(baseline: LoadedSkill[], eff: {
|
|
|
104
104
|
}, opts: {
|
|
105
105
|
cacheRoot: string;
|
|
106
106
|
allowHosts: readonly string[];
|
|
107
|
+
/**
|
|
108
|
+
* S-379 —— 「**工具跑的那台机器**的盘就是本进程这台盘吗」,由**组合根**算好传入(`boot/web-admin.ts` 传 `toolsRunOnThisHost(config)`,与出厂自扫
|
|
109
|
+
* `loadDeploymentSkills` 读的是同一只函数 —— 判据属主在 `task-cwd.ts`,这里不第二次判车道、不 import 车道词)。真 ⇒ 目录形 plugin 技能带上自己的
|
|
110
|
+
* 目录(`SkillSpec.baseDir`:`Skill` 结果首行 + `${SKILL_ROOT}` 替换);假 ⇒ 不带(fail-closed:沙箱 / 远端车道上这条路径在工具那边不存在)。
|
|
111
|
+
* 🔴 **必填,不给缺省**:修前这个调用点手上根本没有这一事实,fail-closed 默认把 host 车道也一并挡成「永不带」而没有任何红 —— 必填让「漏传」是编译错。
|
|
112
|
+
*/
|
|
113
|
+
toolsShareThisFilesystem: boolean;
|
|
107
114
|
logger?: Logger;
|
|
108
115
|
/** 测试口:跳过 validate(materialize 只接受已验声明;真 git 腿用本地 bare repo,validate 层的
|
|
109
116
|
* https-only 单独测——两层分开,谁也不掩护谁)。生产恒 false/缺席。 */
|
|
@@ -196,7 +196,7 @@ export async function applyCenterPlugins(baseline, eff, opts) {
|
|
|
196
196
|
}
|
|
197
197
|
if (!rootCheck.dir)
|
|
198
198
|
continue;
|
|
199
|
-
const loaded = loadSkills(rootCheck.dir, { confineTo: liveDir });
|
|
199
|
+
const loaded = loadSkills(rootCheck.dir, { confineTo: liveDir, toolsShareThisFilesystem: opts.toolsShareThisFilesystem, ...(opts.logger !== undefined ? { logger: opts.logger } : {}) });
|
|
200
200
|
for (const skill of loaded) {
|
|
201
201
|
if (taken.has(skill.spec.name)) {
|
|
202
202
|
out.letGo.push({ plugin: v.name, skill: skill.spec.name });
|
|
@@ -1,48 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* 中心提示层的采纳腿:判官(`prompts-domain-validate.ts` 的 `judgePromptsWire`,经候选判官)收下的那份 artifact → 引擎的中心源
|
|
3
|
+
* (`CenterPromptSource`,经 `RunnerDeps.promptSource` 由引擎采用)。
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* 仅有的一层「形校验」不是语义复检,是**防炸底线**(详见其现居所 `src/prompts-domain-validate.ts`——
|
|
12
|
-
* 判形半场已下沉到该中立叶子,本文件 re-export 保兼容;[ref] S6,lens2 §G):core 对坏形声明的
|
|
13
|
-
* 守卫是 THROW(assemble 期),server 在采用前做结构判形,坏形=拒绝采用该候选的 prompts 面。
|
|
14
|
-
*
|
|
15
|
-
* 生效语义(两段史):1.222 时 core 1.315 的 epoch 是 bundled-only(声明不进 descriptor),热换=resume
|
|
16
|
-
* 三失真,故临时 restart-to-apply;core 1.316([ref] 裁 a/[ref]d)把声明以 (id,slot,chars,contentHash?)
|
|
17
|
-
* 纳入 artifactDigest——声明变=digest 变=**下任务边界自动重 pin**(既有 legacy_migration 机制接手),
|
|
18
|
-
* 进行中会话 epoch pin 保稳。自此恢复**热采用**(main.ts boot+refresh 双点 adopt),与 center
|
|
19
|
-
* 「发布=新任务生效」产品语义对齐([ref]②b)。字节级检测只认 opt-in contentHash(文本不进 digest,
|
|
20
|
-
* 防会话可导出面字典预映)——center 链路恒逐 section 铸([ref]),本投影逐字透传即全强度。
|
|
5
|
+
* 律:中心层只有一种形(引擎当期 schema 的发布形 artifact),只有一个座(`RunnerDeps.promptSource`)。本服务不展开、不选包、不按场景挑段:
|
|
6
|
+
* 「哪个场景用哪段」在 artifact 的 `when.binding` 里,由引擎按每个请求的 `TaskSpec.promptBinding`(场景名,`buildPromptSeats` 一处写)判。
|
|
7
|
+
* 本模块只管三件事:① 把判官交出的值推进中心源的两态过渡({@link applyCenterArtifact});② 按 digest 补拉一份本副本没有的 artifact
|
|
8
|
+
* ({@link withPromptArtifactBackfill},钉着它的会话续跑时用);③ 中心源自己的运维句(启动恢复读到一份引擎拒的 / 读不出的副本)
|
|
9
|
+
* 落进本服务的日志({@link centerSourceOnError})。
|
|
21
10
|
*/
|
|
22
|
-
import { type
|
|
23
|
-
|
|
24
|
-
/** 判形半场(validateCenterPrompts/validatePromptsDomain/CORE_ENGINE_VERSION 及两 interface)已下沉到
|
|
25
|
-
* 中立叶子 `src/prompts-domain-validate.ts`([ref] S6);消费者直引真源([ref] 兼容面全清,
|
|
26
|
-
* 此处兼容 re-export 已删)。 */
|
|
27
|
-
/** [ref]b / [ref] — §9.4 by-digest 补拉组合店:local miss ⇒ fetchRaw(digest) 从 center 拉 envelope ⇒
|
|
28
|
-
* core verifyPromptArtifact 全管线 + **回验「拿到的=要的」digest 逐位**(center 答非所问=丢弃)⇒
|
|
29
|
-
* best-effort 回写 inner(下次直命中)。任何失败=undefined(诚实缺席,fail-loud 归 core 的
|
|
30
|
-
* prompt_snapshot_unavailable——绝不拼杂交)。 */
|
|
31
|
-
export declare function withPromptArtifactBackfill(inner: {
|
|
32
|
-
get(d: string, o: {
|
|
33
|
-
engineVersion: string;
|
|
34
|
-
}): Promise<PublishedPromptArtifactEnvelope | undefined>;
|
|
35
|
-
put(e: PublishedPromptArtifactEnvelope): Promise<void>;
|
|
36
|
-
}, fetchRaw: (artifactDigest: string) => Promise<unknown>, log: {
|
|
11
|
+
import { type PromptArtifactStore, type PublishedPromptArtifact, type RunnerDeps } from "@sema-agent/core";
|
|
12
|
+
type Log = {
|
|
37
13
|
info: (msg: string, meta?: Record<string, unknown>) => void;
|
|
38
14
|
warn: (msg: string, meta?: Record<string, unknown>) => void;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export
|
|
15
|
+
};
|
|
16
|
+
/** §9.4 按 digest 补拉的组合店:本地 miss ⇒ `fetchRaw(digest)` 从中心拉 ⇒ 引擎 `verifyPromptArtifact` 全管线 + **回验「拿到的 = 要的」digest 逐位**
|
|
17
|
+
* (中心答非所问 = 丢弃)⇒ best-effort 回写本地店(下次直命中)。任何失败 = undefined(诚实缺席;响亮归引擎的 `prompt.snapshot_unavailable` —— 绝不拼杂交)。
|
|
18
|
+
* 本地店的 `onRefused`(一份副本在、却用不了:引擎拒 / 读不出)原样交给本地店报,不吞:那是「为什么缺」的那一句。 */
|
|
19
|
+
export declare function withPromptArtifactBackfill(inner: PromptArtifactStore, fetchRaw: (artifactDigest: string) => Promise<unknown>, log: Log): PromptArtifactStore;
|
|
20
|
+
/** 中心源的推进面(引擎 `CenterPromptSource` 的两只写口 + 两只「欠不欠撤下」的读口)。 */
|
|
21
|
+
export interface CenterSourceTransitions {
|
|
46
22
|
applySnapshot(raw: unknown): Promise<{
|
|
47
23
|
ok: true;
|
|
48
24
|
artifactDigest: string;
|
|
@@ -52,27 +28,24 @@ export declare function applyCatalogToSource(source: {
|
|
|
52
28
|
reason: string;
|
|
53
29
|
}>;
|
|
54
30
|
applyDisabled(sourceRevision: string): Promise<void>;
|
|
55
|
-
/** codex-2 F2(restart-owed disable):撤下写盘失败后重启,内存 prev 丢了但持久态还 active——
|
|
56
|
-
* 以 source 自身的 live candidate 为准判「欠 disable」,不是只看内存 prev。 */
|
|
31
|
+
/** codex-2 F2(restart-owed disable):撤下写盘失败后重启,内存 prev 丢了但持久态还 active —— 以中心源自身的活候选为准判「欠撤下」,不是只看内存 prev。 */
|
|
57
32
|
current?(): unknown;
|
|
58
|
-
/** S-651(codex 修复验证轮 V1):本箱**持久记录**是 active —— 即使那份 artifact 此刻加载不出(活候选为空)
|
|
59
|
-
*
|
|
33
|
+
/** S-651(codex 修复验证轮 V1):本箱**持久记录**是 active —— 即使那份 artifact 此刻加载不出(活候选为空)。「欠撤下」的真源是持久记录;
|
|
34
|
+
* 活候选只是它能加载时的影子。缺席 = 调用方不掌握持久记录(沿用前两条判据)。 */
|
|
60
35
|
persistedActive?(): boolean;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 判官交出的值推进中心源的两态过渡:`next` 在场(且 digest 变)⇒ `applySnapshot`(引擎重验 + 落盘 + 原子换候选);`next` 缺席
|
|
39
|
+
* (候选不带 prompts 键 = 闸关 / 没发布)而中心层此前在(内存 prev / 活候选 / 持久 active 任一)⇒ `applyDisabled`(显式撤下,离线重启不复活)。
|
|
40
|
+
* 去重键是 artifact 的内容身份(digest;发布出处 `sourceRevision` 不进身份)。返回过渡是否落地 —— false ⇒ 调用方**不推进**已采纳的值,
|
|
41
|
+
* 下一拍同一过渡自动重试(codex-2 F2:吞错推进曾让失败的采纳 / 撤下永久静默)。
|
|
42
|
+
*/
|
|
43
|
+
export declare function applyCenterArtifact(source: CenterSourceTransitions, next: PublishedPromptArtifact | undefined, prev: PublishedPromptArtifact | undefined, log: Log, phase: string): Promise<boolean>;
|
|
65
44
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* (
|
|
45
|
+
* 中心源自己的运维句(`CenterPromptSource` 的 `onError` 选项,引擎的 `RunnerDeps.onError` 形)落进本服务的日志:启动恢复读到持久记录指着的那份 artifact
|
|
46
|
+
* 被引擎拒(退役 schema 的拒句点名重发写法)/ 读不出 / 根本没有副本 —— 中心源无状态起服并说一句。行名与 Runner 的 `prompt-constitution` 阶段同一个
|
|
47
|
+
* (`prompt_composition_warning`):那一阶段的句子都在说「交给组装的东西没有照写的那样生效」。不传 = 这几句静默(引擎的缺省),所以每个起中心源的入口都传它。
|
|
69
48
|
*/
|
|
70
|
-
export declare function
|
|
71
|
-
|
|
72
|
-
* M9 迁移卫在 provider.stableBlocks 的 identity 声明上探同三锚,命中即走 pass-through 臂(其保留集无
|
|
73
|
-
* `core/role.append`,任何 append rider/outputStyle 会被静默丢)。选包与 {@link centerPromptProvider}
|
|
74
|
-
* 同式(`overrides[s] ?? sections`);锚谓词由调用方注入(task-settings `hasConstitutionAnchors` 单真源)。
|
|
75
|
-
* [ref]①f 的「server 不做语义复检」不动:这不是复检语义,是为 capabilities.appendSystemPrompt 的诚实面
|
|
76
|
-
* 探 core 会走哪条臂。 */
|
|
77
|
-
export declare function centerIdentityAssembled(prompts: EffectiveCenterPrompts, scenarioName: string, isAssembled: (text: unknown) => boolean): boolean;
|
|
49
|
+
export declare function centerSourceOnError(log: Pick<Log, "warn">): NonNullable<RunnerDeps["onError"]>;
|
|
50
|
+
export {};
|
|
78
51
|
//# sourceMappingURL=center-prompts.d.ts.map
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { verifyPromptArtifact } from "@sema-agent/core";
|
|
2
|
-
import { CORE_ENGINE_VERSION } from "../prompts-domain-validate.js";
|
|
3
2
|
import { SHA256_HEX_RE } from "../digest-form.js";
|
|
4
3
|
import { recordFailOpen } from "../observability/fail-open.js";
|
|
5
4
|
export function withPromptArtifactBackfill(inner, fetchRaw, log) {
|
|
6
5
|
const inFlight = new Map();
|
|
7
6
|
return {
|
|
8
|
-
put: (
|
|
9
|
-
get: async (digest,
|
|
7
|
+
put: (artifact) => inner.put(artifact),
|
|
8
|
+
get: async (digest, onRefused) => {
|
|
10
9
|
const hex = digest.replace(/^sha256:/i, "").toLowerCase();
|
|
11
10
|
if (!SHA256_HEX_RE.test(hex))
|
|
12
11
|
return undefined;
|
|
13
12
|
const canonical = `sha256:${hex}`;
|
|
14
|
-
const local = await inner.get(canonical,
|
|
13
|
+
const local = await inner.get(canonical, onRefused);
|
|
15
14
|
if (local)
|
|
16
15
|
return local;
|
|
17
16
|
const pending = inFlight.get(canonical);
|
|
@@ -20,14 +19,14 @@ export function withPromptArtifactBackfill(inner, fetchRaw, log) {
|
|
|
20
19
|
const run = (async () => {
|
|
21
20
|
try {
|
|
22
21
|
const raw = await fetchRaw(canonical);
|
|
23
|
-
const v = verifyPromptArtifact(raw
|
|
22
|
+
const v = verifyPromptArtifact(raw);
|
|
24
23
|
if (!v.ok || v.artifact.artifactDigest.replace(/^sha256:/, "").toLowerCase() !== hex) {
|
|
25
24
|
log.warn("center_prompts_backfill_rejected", { digest: canonical, ...(v.ok ? { got: v.artifact.artifactDigest, code: "digest_mismatch" } : { code: v.code, reason: v.reason }) });
|
|
26
25
|
return undefined;
|
|
27
26
|
}
|
|
28
|
-
await inner.put(
|
|
27
|
+
await inner.put(v.artifact).catch(() => recordFailOpen("server.prompts.artifact-cache-write-failed", `digest=${canonical}`));
|
|
29
28
|
log.info("center_prompts_backfilled", { digest: canonical });
|
|
30
|
-
return
|
|
29
|
+
return v.artifact;
|
|
31
30
|
}
|
|
32
31
|
catch (e) {
|
|
33
32
|
log.warn("center_prompts_backfill_failed", { digest: canonical, err: String(e) });
|
|
@@ -42,22 +41,22 @@ export function withPromptArtifactBackfill(inner, fetchRaw, log) {
|
|
|
42
41
|
},
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
export async function
|
|
44
|
+
export async function applyCenterArtifact(source, next, prev, log, phase) {
|
|
46
45
|
try {
|
|
47
|
-
if (next
|
|
48
|
-
if (prev?.
|
|
46
|
+
if (next !== undefined) {
|
|
47
|
+
if (prev?.artifactDigest === next.artifactDigest)
|
|
49
48
|
return true;
|
|
50
|
-
const r = await source.applySnapshot(next
|
|
49
|
+
const r = await source.applySnapshot(next);
|
|
51
50
|
if (r.ok) {
|
|
52
51
|
log.info("center_prompts_catalog_applied", { phase, artifactDigest: r.artifactDigest });
|
|
53
52
|
return true;
|
|
54
53
|
}
|
|
55
|
-
log.warn("center_prompts_catalog_apply_failed", { phase, code: r.code, reason: r.reason, note: "
|
|
54
|
+
log.warn("center_prompts_catalog_apply_failed", { phase, code: r.code, reason: r.reason, note: "the candidate passed the judge but the source apply failed (disk/state) — built-ins unaffected; candidate unchanged; the transition retries on the next refresh tick" });
|
|
56
55
|
return false;
|
|
57
56
|
}
|
|
58
|
-
if (prev
|
|
59
|
-
await source.applyDisabled(`${phase}:
|
|
60
|
-
log.info("center_prompts_catalog_disabled", { phase, note: "
|
|
57
|
+
if (prev !== undefined || source.current?.() !== undefined || source.persistedActive?.() === true) {
|
|
58
|
+
await source.applyDisabled(`${phase}:prompts-absent`);
|
|
59
|
+
log.info("center_prompts_catalog_disabled", { phase, note: "center layer withdrawn — the engine's candidate is cleared (does not revive offline)" });
|
|
61
60
|
}
|
|
62
61
|
return true;
|
|
63
62
|
}
|
|
@@ -66,22 +65,9 @@ export async function applyCatalogToSource(source, next, prev, log, phase) {
|
|
|
66
65
|
return false;
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
|
-
export function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
export function centerIdentityAssembled(prompts, scenarioName, isAssembled) {
|
|
74
|
-
return scenarioDecls(prompts, scenarioName).some((d) => d.slot === "identity" && isAssembled(d.text));
|
|
75
|
-
}
|
|
76
|
-
function scenarioDecls(prompts, scenarioName) {
|
|
77
|
-
const overrides = prompts.scenarioOverrides;
|
|
78
|
-
if (overrides) {
|
|
79
|
-
if (Object.hasOwn(overrides, scenarioName)) {
|
|
80
|
-
const hit = overrides[scenarioName];
|
|
81
|
-
if (hit)
|
|
82
|
-
return hit;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return prompts.sections;
|
|
68
|
+
export function centerSourceOnError(log) {
|
|
69
|
+
return (err, ctx) => {
|
|
70
|
+
log.warn("prompt_composition_warning", { sessionId: ctx.sessionId, ...(ctx.classification !== undefined ? { classification: ctx.classification } : {}), info: err instanceof Error ? err.message : String(err) });
|
|
71
|
+
};
|
|
86
72
|
}
|
|
87
73
|
//# sourceMappingURL=center-prompts.js.map
|
|
@@ -45,7 +45,7 @@ export declare const COMPOSITE_CAPABILITY_MEMBERS: {
|
|
|
45
45
|
readonly centerWiring: readonly ["effectivePull", "effectiveRevision", "lease", "leaseHealth", "failMode", "usageReport", "issuer", "worker", "caller"];
|
|
46
46
|
readonly webSearch: readonly ["backend"];
|
|
47
47
|
readonly background: readonly ["listFace", "exitFaces"];
|
|
48
|
-
readonly taskSettings: readonly ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks"];
|
|
48
|
+
readonly taskSettings: readonly ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "tightenOnlySeats"];
|
|
49
49
|
readonly settings: readonly ["permissions"];
|
|
50
50
|
readonly permissionModeAuto: readonly ["accepted", "classifierSeat", "entitlementSource", "armed", "reason", "model"];
|
|
51
51
|
readonly writeProtection: readonly ["armed", "rows", "replaced"];
|
|
@@ -6,7 +6,7 @@ export const COMPOSITE_CAPABILITY_MEMBERS = {
|
|
|
6
6
|
centerWiring: ["effectivePull", "effectiveRevision", "lease", "leaseHealth", "failMode", "usageReport", "issuer", "worker", "caller"],
|
|
7
7
|
webSearch: ["backend"],
|
|
8
8
|
background: ["listFace", "exitFaces"],
|
|
9
|
-
taskSettings: ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks"],
|
|
9
|
+
taskSettings: ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "tightenOnlySeats"],
|
|
10
10
|
settings: ["permissions"],
|
|
11
11
|
permissionModeAuto: ["accepted", "classifierSeat", "entitlementSource", "armed", "reason", "model"],
|
|
12
12
|
writeProtection: ["armed", "rows", "replaced"],
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ENGINE_CAPABILITIES } from "@sema-agent/core";
|
|
2
|
-
import { ownCredentialsWithheld } from "../server-secret-env.js";
|
|
2
|
+
import { ownCredentialsWithheld, ownCredentialValuesWithheld } from "../server-secret-env.js";
|
|
3
3
|
const ENGINE_CAPABILITY_FACTS = {
|
|
4
4
|
"inherit_env.own_credentials_withheld": ownCredentialsWithheld,
|
|
5
|
+
"inherit_env.own_credential_values_withheld": ownCredentialValuesWithheld,
|
|
5
6
|
};
|
|
6
7
|
export function engineCapabilityBits() {
|
|
7
8
|
const out = {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { toolsRunOnThisHost } from "../task-cwd.js";
|
|
2
|
-
import {
|
|
2
|
+
import { executionLaneOf, laneIsolated, laneWiresExecutionEnv } from "../execution-lane-caps.js";
|
|
3
3
|
export function projectExecutionLaneCapability(config) {
|
|
4
4
|
const lane = executionLaneOf(config.remoteExec?.provider);
|
|
5
|
-
const handsWired =
|
|
5
|
+
const handsWired = laneWiresExecutionEnv(lane);
|
|
6
6
|
return {
|
|
7
7
|
provider: lane,
|
|
8
8
|
toolsOnThisHost: toolsRunOnThisHost(config),
|