@sema-agent/server 7.134.0 → 7.135.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +134 -0
- package/USAGE.md +98 -30
- package/dist/adoption/plan.d.ts +1 -1
- package/dist/approval-ask-audit-store.d.ts +24 -24
- package/dist/approval-ask-machine.d.ts +2 -2
- package/dist/approval-card.d.ts +62 -150
- package/dist/approval-card.js +33 -51
- package/dist/approval-content-kind.d.ts +22 -5
- package/dist/approval-content-kind.js +8 -1
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval-gate-currency.d.ts +22 -3
- package/dist/approval-gate-currency.js +44 -18
- package/dist/approval-hmac.d.ts +7 -7
- package/dist/approval-policy-settlement.d.ts +2 -2
- package/dist/approval-reconciler.d.ts +3 -3
- package/dist/approval.d.ts +8 -8
- package/dist/approval.js +4 -2
- package/dist/auth-bridge.d.ts +1 -1
- package/dist/auto-mode-face.d.ts +4 -4
- package/dist/background-session-reap.d.ts +2 -2
- package/dist/bake-runner/main.d.ts +2 -2
- package/dist/bake-runner/runner.d.ts +4 -4
- package/dist/bench/s1/live-deps.d.ts +1 -1
- package/dist/bench/s1/run-firm.d.ts +1 -1
- package/dist/boot/coordinators.d.ts +2 -2
- package/dist/boot/coordinators.js +2 -2
- package/dist/boot/deferred-sandbox-path-env.d.ts +0 -6
- package/dist/boot/deferred-sandbox-path-env.js +0 -5
- package/dist/boot/engine-lease.d.ts +5 -5
- package/dist/boot/execution-env.d.ts +16 -15
- package/dist/boot/execution-env.js +19 -21
- package/dist/boot/fatal-exit.d.ts +2 -2
- package/dist/boot/late-binds.d.ts +1 -1
- package/dist/boot/leader.d.ts +1 -1
- package/dist/boot/memory-boundary.d.ts +2 -2
- package/dist/boot/memory-consolidation.d.ts +15 -15
- package/dist/boot/parked-revive-gate.d.ts +3 -3
- package/dist/boot/parked-revive-gate.js +3 -2
- package/dist/boot/reapers.d.ts +4 -4
- package/dist/boot/resolve-spec.d.ts +1 -1
- package/dist/boot/resolve-spec.js +28 -24
- package/dist/boot/runner-deps.d.ts +11 -11
- package/dist/boot/runner-deps.js +3 -2
- package/dist/boot/session-faces.d.ts +3 -3
- package/dist/boot/session-faces.js +11 -30
- package/dist/boot/shutdown.d.ts +5 -5
- package/dist/boot/side-query-lane.d.ts +2 -2
- package/dist/boot/stage-05-execution-env.js +4 -4
- package/dist/boot/stage-06-runners.js +0 -2
- package/dist/boot/stores.js +2 -1
- package/dist/boot/web-admin.d.ts +17 -17
- package/dist/boot/web-admin.js +5 -10
- package/dist/boot/workflow-orchestration.js +2 -9
- package/dist/brain.d.ts +11 -11
- package/dist/budget.d.ts +4 -4
- package/dist/capabilities/approvals-push.d.ts +4 -4
- package/dist/capabilities/builtin-tools.d.ts +5 -5
- package/dist/capabilities/center-plugins.d.ts +5 -5
- package/dist/capabilities/center-plugins.js +1 -1
- package/dist/capabilities/center-prompts.d.ts +1 -1
- package/dist/capabilities/center-wiring.d.ts +1 -1
- package/dist/capabilities/composite-members.d.ts +1 -1
- package/dist/capabilities/execution-lane.d.ts +5 -5
- package/dist/capabilities/execution-lane.js +2 -2
- package/dist/capabilities/hands-lane.d.ts +5 -5
- package/dist/capabilities/mcp-probe.d.ts +10 -7
- package/dist/capabilities/sandbox-file-send.d.ts +1 -18
- package/dist/capabilities/sandbox-file-send.js +0 -7
- package/dist/capabilities/scenarios.d.ts +28 -10
- package/dist/capabilities/scenarios.js +15 -5
- package/dist/capabilities/send-user-file-tool.d.ts +1 -1
- package/dist/capabilities/skills.d.ts +31 -12
- package/dist/capabilities/skills.js +23 -17
- package/dist/capabilities/tool-defer.d.ts +1 -1
- package/dist/capability-facts.d.ts +26 -25
- package/dist/capability-facts.js +14 -16
- package/dist/center-config-tier.d.ts +1 -1
- package/dist/center-credential.d.ts +4 -4
- package/dist/checkpoint-identity.d.ts +5 -0
- package/dist/checkpoint-identity.js +14 -0
- package/dist/config-catalog.d.ts +12 -12
- package/dist/config-invariants.d.ts +4 -4
- package/dist/config-invariants.js +3 -2
- package/dist/config-lkg.d.ts +1 -1
- package/dist/config-provider.d.ts +13 -13
- package/dist/config-provider.js +2 -1
- package/dist/config-types.d.ts +83 -83
- package/dist/config.d.ts +26 -24
- package/dist/config.js +12 -10
- package/dist/cross-session-settings.d.ts +1 -1
- package/dist/delegated-session-owner.d.ts +16 -13
- package/dist/delegated-session-owner.js +9 -10
- package/dist/deployment-governance.d.ts +16 -16
- package/dist/deployment-shape.d.ts +127 -0
- package/dist/deployment-shape.js +72 -0
- package/dist/device-store.d.ts +1 -1
- package/dist/device-ws-hub.d.ts +1 -1
- package/dist/egress-redirect.d.ts +1 -1
- package/dist/entry-mode-clamp-notice.d.ts +2 -2
- package/dist/env-facts.d.ts +10 -9
- package/dist/env-facts.js +1 -1
- package/dist/env-name-allowlist-knobs.d.ts +5 -5
- package/dist/exec-bounds.d.ts +2 -2
- package/dist/execution-lane-caps.d.ts +31 -43
- package/dist/execution-lane-caps.js +0 -13
- package/dist/file-history-capture.d.ts +9 -9
- package/dist/file-history-disclosure.d.ts +23 -11
- package/dist/file-history-disclosure.js +7 -12
- package/dist/fleet/drain-entry.d.ts +2 -2
- package/dist/fleet/fleet-bus.d.ts +22 -14
- package/dist/fleet/fleet-bus.js +5 -5
- package/dist/fleet/fleet-reconciler.d.ts +9 -9
- package/dist/fleet/subagent-tail-bus.d.ts +4 -4
- package/dist/fleet-client.d.ts +13 -13
- package/dist/fleet-lease.d.ts +16 -16
- package/dist/governance-http-status.d.ts +2 -2
- package/dist/hooks/hook-llm.d.ts +7 -7
- package/dist/hooks/hook-runner.d.ts +57 -30
- package/dist/hooks/hook-runner.js +36 -18
- package/dist/host-decision.d.ts +5 -5
- package/dist/host-lsp-manager.d.ts +5 -5
- package/dist/hosted-posture.d.ts +23 -13
- package/dist/hosted-posture.js +4 -9
- package/dist/http/admission.d.ts +2 -2
- package/dist/http/admission.js +20 -5
- package/dist/http/approval-sweeps.d.ts +1 -1
- package/dist/http/approval-sweeps.js +2 -1
- package/dist/http/checkpoint-ctx.d.ts +39 -13
- package/dist/http/checkpoint-ctx.js +74 -35
- package/dist/http/dispatch.d.ts +3 -3
- package/dist/http/durable-run-leg.js +4 -3
- package/dist/http/idempotency.d.ts +2 -2
- package/dist/http/mcp-dial-deadline.d.ts +7 -5
- package/dist/http/memory-compliance-failure-reply.d.ts +4 -4
- package/dist/http/owner-access.d.ts +4 -6
- package/dist/http/owner-access.js +1 -1
- package/dist/http/principal-gate.d.ts +7 -7
- package/dist/http/principal-gate.js +3 -2
- package/dist/http/readiness.d.ts +1 -1
- package/dist/http/request-guards.d.ts +4 -4
- package/dist/http/request-guards.js +2 -1
- package/dist/http/resume-ctx-read.d.ts +7 -7
- package/dist/http/resume-ctx-read.js +1 -1
- package/dist/http/resume-legs.d.ts +3 -3
- package/dist/http/resume-legs.js +11 -8
- package/dist/http/route-ctx.d.ts +29 -29
- package/dist/http/route-table.d.ts +9 -9
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/approvals-assistant.d.ts +5 -5
- package/dist/http/routes/approvals-assistant.js +55 -15
- package/dist/http/routes/background.d.ts +3 -3
- package/dist/http/routes/background.js +2 -2
- package/dist/http/routes/capabilities.d.ts +1 -1
- package/dist/http/routes/capabilities.js +16 -8
- package/dist/http/routes/config-catalog.d.ts +1 -1
- package/dist/http/routes/devices.d.ts +1 -1
- package/dist/http/routes/diagnostics.d.ts +3 -3
- package/dist/http/routes/fleet.d.ts +1 -1
- package/dist/http/routes/fleet.js +2 -1
- package/dist/http/routes/mcp-reconnect.d.ts +4 -4
- package/dist/http/routes/mcp-reconnect.js +3 -3
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/notify-wake.d.ts +1 -1
- package/dist/http/routes/notify-wake.js +2 -2
- package/dist/http/routes/rules.d.ts +1 -1
- package/dist/http/routes/runs.js +22 -10
- package/dist/http/routes/session-sync.d.ts +1 -1
- package/dist/http/routes/session-sync.js +73 -44
- package/dist/http/routes/sessions-list.js +1 -1
- package/dist/http/routes/sessions.js +30 -44
- package/dist/http/routes/tasks.d.ts +1 -1
- package/dist/http/routes/trace-usage.d.ts +1 -1
- package/dist/http/routes/workflows.d.ts +3 -0
- package/dist/http/routes/workflows.js +31 -28
- package/dist/http/send.d.ts +5 -5
- package/dist/http/server.d.ts +34 -34
- package/dist/http/session-inherit-env.d.ts +3 -3
- package/dist/http/sse-lifecycle.d.ts +1 -1
- package/dist/http/sse-log.d.ts +2 -2
- package/dist/http/submit-ctx.js +1 -1
- package/dist/http/sync-submit-body.d.ts +1 -1
- package/dist/http/verify-rounds.d.ts +1 -1
- package/dist/http/wire-types.d.ts +28 -21
- package/dist/instruction-source-notice.d.ts +2 -2
- package/dist/key-resolver.d.ts +3 -3
- package/dist/lane-home-probe.d.ts +1 -1
- package/dist/leader/diffout.d.ts +1 -1
- package/dist/leader/diffup.d.ts +2 -2
- package/dist/leader/endpoint.d.ts +1 -1
- package/dist/leader/fanout.d.ts +1 -1
- package/dist/leader/leader.d.ts +4 -4
- package/dist/leader/merge.d.ts +3 -3
- package/dist/leader/repair-wire.d.ts +1 -1
- package/dist/leader/wire.d.ts +6 -6
- package/dist/list-entry-display.d.ts +1 -1
- package/dist/lsp-evict.d.ts +1 -1
- package/dist/mcp-assertion-header.d.ts +1 -1
- package/dist/memory-layer-legacy-lock.d.ts +1 -1
- package/dist/memory-operator-faces.d.ts +1 -1
- package/dist/memory-posture.js +4 -2
- package/dist/memory-project-layer.d.ts +1 -1
- package/dist/memory-scope.d.ts +19 -19
- package/dist/memory-store-refusal.d.ts +4 -4
- package/dist/model-entry-headers.d.ts +2 -2
- package/dist/model-entry-refusal.d.ts +17 -17
- package/dist/model-provider.d.ts +10 -10
- package/dist/model-reach-scope.d.ts +1 -1
- package/dist/model-route-endpoint.d.ts +6 -6
- package/dist/model-route-url.d.ts +5 -5
- package/dist/model-select.d.ts +15 -6
- package/dist/model-select.js +5 -0
- package/dist/model-unreachable-notice.d.ts +3 -3
- package/dist/namespaced-rule-name.d.ts +15 -5
- package/dist/namespaced-rule-name.js +3 -2
- package/dist/observability/corrupt-read-seat.d.ts +9 -9
- package/dist/observability/cost-taxonomy.d.ts +1 -1
- package/dist/observability/err-text.d.ts +1 -1
- package/dist/observability/fail-open.d.ts +12 -8
- package/dist/observability/fail-open.js +12 -8
- package/dist/observability/metrics.d.ts +3 -3
- package/dist/observability/run-terminal.d.ts +36 -36
- package/dist/observability/secret-env-scrub.d.ts +3 -3
- package/dist/observability/tool-trace.d.ts +1 -1
- package/dist/operator-ask.d.ts +4 -4
- package/dist/orchestration/workflow-agent-session-index.d.ts +3 -3
- package/dist/orchestration/workflow-completion-inbox.d.ts +20 -5
- package/dist/orchestration/workflow-completion-inbox.js +29 -7
- package/dist/orchestration/workflow-notify-journal.d.ts +43 -19
- package/dist/orchestration/workflow-notify-journal.js +17 -0
- package/dist/outbound-dispatcher.d.ts +4 -4
- package/dist/parent-watch.d.ts +4 -4
- package/dist/parked-decide.d.ts +16 -15
- package/dist/parked-decide.js +5 -4
- package/dist/parked-revive-surface.d.ts +7 -7
- package/dist/parked-revive-surface.js +2 -3
- package/dist/peer-directory.d.ts +3 -3
- package/dist/peer-directory.js +1 -1
- package/dist/permission-rule-list.d.ts +10 -1
- package/dist/permission-rule-list.js +7 -5
- package/dist/permission-rule-vocab.d.ts +2 -2
- package/dist/plugins/adoption-log-sql.d.ts +1 -1
- package/dist/plugins/approval-ask-store-file.d.ts +8 -1
- package/dist/plugins/approval-ask-store-file.js +6 -3
- package/dist/plugins/approval-ask-store-memory.d.ts +11 -7
- package/dist/plugins/approval-ask-store-memory.js +11 -7
- package/dist/plugins/approval-ask-store-sql.d.ts +34 -15
- package/dist/plugins/approval-ask-store-sql.js +18 -5
- package/dist/plugins/approval-exemption-store.d.ts +3 -3
- package/dist/plugins/approval-nonce-store.d.ts +3 -3
- package/dist/plugins/background-agent-store-sql.d.ts +1 -1
- package/dist/plugins/background-shell-support.d.ts +2 -2
- package/dist/plugins/blob-backend.d.ts +1 -1
- package/dist/plugins/caching-session-store.d.ts +23 -32
- package/dist/plugins/caching-session-store.js +5 -17
- package/dist/plugins/checkpoint-index-columns.d.ts +81 -0
- package/dist/plugins/checkpoint-index-columns.js +62 -0
- package/dist/plugins/checkpoint-store-sql.d.ts +44 -66
- package/dist/plugins/checkpoint-store-sql.js +55 -102
- package/dist/plugins/device-store-sql.d.ts +7 -6
- package/dist/plugins/e2b-orphan-reclaim.d.ts +1 -1
- package/dist/plugins/ensure-schema-lock-policy.d.ts +1 -1
- package/dist/plugins/file-history-store-sql.d.ts +9 -7
- package/dist/plugins/file-history-store-sql.js +27 -15
- package/dist/plugins/file-run-store.d.ts +8 -8
- package/dist/plugins/fork-routing-session-store.d.ts +2 -2
- package/dist/plugins/fork-routing-session-store.js +1 -1
- package/dist/plugins/host-platform.d.ts +10 -10
- package/dist/plugins/image-bake-store-sql.d.ts +1 -1
- package/dist/plugins/image-index-sql.d.ts +1 -1
- package/dist/plugins/leader-run-store-sql.d.ts +1 -1
- package/dist/plugins/local-checkpoint-store.d.ts +10 -10
- package/dist/plugins/local-checkpoint-store.js +3 -4
- package/dist/plugins/local-session-store.d.ts +34 -38
- package/dist/plugins/local-session-store.js +20 -39
- package/dist/plugins/local-session-window.d.ts +1 -1
- package/dist/plugins/mailbox-store-sql.d.ts +2 -2
- package/dist/plugins/memory-engine-pg.d.ts +1 -1
- package/dist/plugins/memory-run-store.d.ts +4 -4
- package/dist/plugins/memory-sync-store-pg.d.ts +3 -3
- package/dist/plugins/one-time-migrations.d.ts +66 -40
- package/dist/plugins/one-time-migrations.js +115 -34
- package/dist/plugins/outcome-ledger-sql.d.ts +1 -1
- package/dist/plugins/park-commit-watch.d.ts +3 -3
- package/dist/plugins/permission-rule-store-file.d.ts +5 -5
- package/dist/plugins/permission-rule-store-file.js +12 -19
- package/dist/plugins/permission-rule-store-sql.d.ts +38 -4
- package/dist/plugins/permission-rule-store-sql.js +67 -24
- package/dist/plugins/pg-cost-quota.d.ts +1 -1
- package/dist/plugins/pg-pool.d.ts +2 -2
- package/dist/plugins/pg-pool.js +5 -2
- package/dist/plugins/pg-rate-limiter.d.ts +1 -1
- package/dist/plugins/pg-session-storage.d.ts +8 -20
- package/dist/plugins/pg-session-storage.js +14 -27
- package/dist/plugins/remote-env-adb.d.ts +10 -10
- package/dist/plugins/remote-env-device.d.ts +10 -9
- package/dist/plugins/remote-env-device.js +6 -2
- package/dist/plugins/remote-env-e2b.d.ts +3 -3
- package/dist/plugins/remote-env-host.d.ts +16 -16
- package/dist/plugins/remote-env-k8s.d.ts +8 -8
- package/dist/plugins/remote-env-local-docker.d.ts +2 -2
- package/dist/plugins/remote-env-ssh.d.ts +4 -4
- package/dist/plugins/remote-scratchpad.d.ts +2 -3
- package/dist/plugins/remote-scratchpad.js +0 -4
- package/dist/plugins/remote-shell.d.ts +6 -6
- package/dist/plugins/retention-lane-store-sql.d.ts +4 -4
- package/dist/plugins/retention-store-sql.d.ts +4 -4
- package/dist/plugins/roster-store-sql.d.ts +1 -1
- package/dist/plugins/run-store-sql.d.ts +8 -8
- package/dist/plugins/schema-consistency.d.ts +2 -2
- package/dist/plugins/schema-ensure-legs.d.ts +3 -3
- package/dist/plugins/schema-indexes.d.ts +1 -1
- package/dist/plugins/schema-live-columns.d.ts +1 -1
- package/dist/plugins/session-event-payload.d.ts +4 -4
- package/dist/plugins/session-fork.d.ts +34 -0
- package/dist/plugins/session-fork.js +29 -0
- package/dist/plugins/session-ownership.js +1 -1
- package/dist/plugins/session-placement.d.ts +1 -1
- package/dist/plugins/session-policy-store-sql.d.ts +12 -12
- package/dist/plugins/session-store.d.ts +2 -2
- package/dist/plugins/session-store.js +2 -2
- package/dist/plugins/shared-memory-store-sql.d.ts +2 -2
- package/dist/plugins/sql-driver.d.ts +8 -8
- package/dist/plugins/sql-errors.d.ts +1 -1
- package/dist/plugins/sql-json-column.d.ts +21 -21
- package/dist/plugins/sql-row-helpers.d.ts +2 -2
- package/dist/plugins/store-backend.d.ts +17 -16
- package/dist/plugins/store-backend.js +3 -3
- package/dist/plugins/store-contracts.d.ts +21 -21
- package/dist/plugins/task-attachment-store.d.ts +2 -2
- package/dist/plugins/task-list-store-sql.d.ts +1 -1
- package/dist/plugins/tidb-pool.d.ts +2 -2
- package/dist/plugins/tidb-pool.js +9 -2
- package/dist/plugins/tidb-session-store.d.ts +16 -26
- package/dist/plugins/tidb-session-store.js +15 -27
- package/dist/plugins/tool-result-store-sql.d.ts +1 -1
- package/dist/plugins/usage-window-store-sql.d.ts +3 -3
- package/dist/plugins/user-input-ledger-file.d.ts +1 -1
- package/dist/plugins/user-input-ledger-sql.d.ts +3 -3
- package/dist/plugins/web-search.d.ts +19 -5
- package/dist/plugins/web-search.js +19 -4
- package/dist/{orchestration/workflow-journal-entry.d.ts → plugins/workflow-journal-payload.d.ts} +23 -32
- package/dist/plugins/workflow-journal-payload.js +32 -0
- package/dist/plugins/workflow-journal-store-sql.d.ts +28 -14
- package/dist/plugins/workflow-journal-store-sql.js +34 -15
- package/dist/plugins/workflow-run-store-sql.d.ts +4 -4
- package/dist/posture-source.d.ts +11 -11
- package/dist/principal-jwt.d.ts +6 -6
- package/dist/project-identity.d.ts +3 -3
- package/dist/project-memory.d.ts +4 -4
- package/dist/read-face-posture.d.ts +7 -7
- package/dist/request-key-closure.d.ts +1 -1
- package/dist/request-key-closure.js +1 -1
- package/dist/request-value-closure.d.ts +15 -8
- package/dist/request-value-closure.js +2 -0
- package/dist/router/route-orchestration.d.ts +11 -16
- package/dist/router/route-orchestration.js +2 -12
- package/dist/rule-entry-list.d.ts +8 -7
- package/dist/rule-entry-list.js +2 -9
- package/dist/rules-consent.d.ts +6 -6
- package/dist/rules-consent.js +2 -0
- package/dist/run-cancel-context.d.ts +5 -5
- package/dist/run-local.d.ts +10 -10
- package/dist/runs.d.ts +13 -11
- package/dist/runs.js +15 -1
- package/dist/runtime-caps-resolver.d.ts +6 -6
- package/dist/runtime-governance.d.ts +9 -9
- package/dist/sandbox-pkg-source.d.ts +9 -31
- package/dist/sandbox-pkg-source.js +14 -8
- package/dist/sealed-key.d.ts +3 -3
- package/dist/security.d.ts +23 -26
- package/dist/security.js +12 -9
- package/dist/server-secret-env.d.ts +10 -10
- package/dist/session-children-retire.d.ts +1 -1
- package/dist/session-error-wire.d.ts +7 -7
- package/dist/session-incarnation.d.ts +52 -35
- package/dist/session-incarnation.js +23 -8
- package/dist/session-policy-wire.d.ts +27 -5
- package/dist/session-policy-wire.js +15 -1
- package/dist/session-records-skipped-notice.d.ts +1 -1
- package/dist/session-sync-kernel.d.ts +4 -4
- package/dist/session-sync.d.ts +49 -6
- package/dist/session-sync.js +52 -10
- package/dist/session-titler.d.ts +7 -6
- package/dist/session-titler.js +8 -13
- package/dist/session-watch.d.ts +3 -3
- package/dist/session-watch.js +4 -4
- package/dist/sighup-idle.d.ts +2 -2
- package/dist/spec-fields.d.ts +4 -4
- package/dist/sql-engine-posture.d.ts +3 -3
- package/dist/store-posture.d.ts +2 -2
- package/dist/stored-request-tool-axes-m19.d.ts +1 -1
- package/dist/task-a2a.d.ts +3 -1
- package/dist/task-a2a.js +34 -2
- package/dist/task-cwd.d.ts +7 -88
- package/dist/task-cwd.js +2 -15
- package/dist/task-mcp.d.ts +12 -8
- package/dist/task-mcp.js +19 -4
- package/dist/task-settings.d.ts +30 -18
- package/dist/task-settings.js +33 -3
- package/dist/task-workflow.d.ts +0 -24
- package/dist/task-workflow.js +2 -1
- package/dist/terminal.d.ts +5 -5
- package/dist/tighten-only-seats.d.ts +7 -6
- package/dist/tighten-only-seats.js +1 -1
- package/dist/tool-approval.d.ts +143 -197
- package/dist/tool-approval.js +13 -28
- package/dist/tool-rule-names.d.ts +2 -2
- package/dist/trace/core-keyset-guard.d.ts +12 -7
- package/dist/trace/engine-notice-wire.d.ts +5 -5
- package/dist/trace/engine-notice-wire.js +1 -0
- package/dist/trace/exit-seat.d.ts +31 -4
- package/dist/trace/exit-seat.js +41 -63
- package/dist/trace/ledger-events.d.ts +3 -3
- package/dist/trace/ledger-sink.d.ts +1 -1
- package/dist/trace/model-segment.d.ts +3 -3
- package/dist/trace/project.d.ts +47 -45
- package/dist/trace/project.js +33 -1
- package/dist/trace/redact.d.ts +44 -30
- package/dist/trace/redact.js +191 -89
- package/dist/trace/self-minted-wire.d.ts +35 -14
- package/dist/trace/self-minted-wire.js +8 -0
- package/dist/trace/sema-provenance.d.ts +1 -1
- package/dist/trace/task-notification-facets.d.ts +4 -4
- package/dist/trace/wire-projection-faces.d.ts +3 -3
- package/dist/trace/wire-projection-faces.js +1 -1
- package/dist/unattended-permission-mode.d.ts +5 -5
- package/dist/url-credential.d.ts +52 -0
- package/dist/url-credential.js +49 -0
- package/dist/url-refusal.d.ts +6 -2
- package/dist/url-refusal.js +8 -1
- package/dist/usage-analytics.d.ts +2 -2
- package/dist/user-input-ledger.d.ts +23 -23
- package/dist/web-admin-client/apply-effective.d.ts +5 -5
- package/dist/web-admin-client/apply-effective.js +2 -1
- package/dist/web-admin-client/apply-ledger.d.ts +2 -2
- package/dist/web-admin-client/center-request.d.ts +2 -2
- package/dist/web-admin-client/facade.d.ts +5 -5
- package/dist/web-admin-client/facade.js +1 -1
- package/dist/web-admin-client/hot-keys-registry.d.ts +2 -2
- package/dist/web-admin-client/http-client.d.ts +4 -4
- package/dist/web-admin-client/mcp-revocation.d.ts +1 -1
- package/dist/web-admin-client/pull-state.d.ts +1 -1
- package/dist/web-admin-client/read-face.d.ts +2 -2
- package/dist/web-admin-client/read-warnings.d.ts +5 -5
- package/dist/web-admin-client/restart-signal.d.ts +6 -6
- package/dist/web-admin-client/skills-mcp.d.ts +28 -3
- package/dist/web-admin-client/skills-mcp.js +29 -1
- package/dist/web-admin-client/types.d.ts +16 -9
- package/dist/workspace-space.d.ts +5 -3
- package/dist/write-protection.d.ts +2 -2
- package/package.json +4 -3
- package/scripts/drain-check-local.mjs +2 -1
- package/scripts/drain-check.mysql.sql +4 -2
- package/scripts/drain-check.pg.sql +4 -2
- package/skills/loop.md +1 -1
- package/dist/http/run-declared-families.d.ts +0 -16
- package/dist/http/run-declared-families.js +0 -12
- package/dist/orchestration/workflow-journal-entry.js +0 -27
|
@@ -69,7 +69,7 @@ export interface CenterCredentialSource {
|
|
|
69
69
|
read(): CenterCredentialRead;
|
|
70
70
|
health(): CenterCredentialHealth;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* [ref]:每次取值之后**同步**回调一次(入参 = 这次的结果,已记进健康态)。续签器的唯一触发口(设计 §2「每次取值后,
|
|
73
73
|
* 读到 user-session 信封且在提前量内 ⇒ 排队一次续签」)。返回退订。回调不许抛(抛 = 这次取值跟着抛,响亮)。
|
|
74
74
|
*/
|
|
75
75
|
onRead(listener: (read: CenterCredentialRead) => void): () => void;
|
|
@@ -92,7 +92,7 @@ export type CenterCredentialSourceSpec = Exclude<WebAdminCredentialDeclaration,
|
|
|
92
92
|
readonly multiTenant: boolean;
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
|
-
* 读两个声明键 —— 判定全交 settings-schema 的判官 `judgeWebAdminCredentialDeclaration`(
|
|
95
|
+
* 读两个声明键 —— 判定全交 settings-schema 的判官 `judgeWebAdminCredentialDeclaration`([ref]:二选一规则的**唯一**实现;空串 = 未设、
|
|
96
96
|
* 不 trim;两个都设 ⇒ throw,boot 拒启,拒句点名两个键、不回显值)。本仓只多读方自己的那一步:文件路径按本进程 cwd 解析成绝对
|
|
97
97
|
* 路径(之后 cwd 变了也读同一个文件 —— 纯契约不碰 `node:path`,这一步归读方)。
|
|
98
98
|
*/
|
|
@@ -128,7 +128,7 @@ export declare const CENTER_CREDENTIAL_REFUSAL_CODES: {
|
|
|
128
128
|
};
|
|
129
129
|
export type CenterCredentialRefusalCode = (typeof CENTER_CREDENTIAL_REFUSAL_CODES)[keyof typeof CENTER_CREDENTIAL_REFUSAL_CODES];
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* [ref] —— boot 读到的凭证怎么处置(`boot/web-admin.ts` 执行,规则只在这里):
|
|
132
132
|
* · `missing` / `expired` ⇒ 响亮(error 级一行),照常起服 —— 前者是「此刻没有凭证」(登出形,文件出现即恢复),
|
|
133
133
|
* 后者续签器立刻续签;
|
|
134
134
|
* · `malformed` / `multi_tenant_session` ⇒ **拒启**,拒句带码、点名文件键,不回显内容(`reason` 由本模块铸,本来就不含内容)。
|
|
@@ -144,7 +144,7 @@ export declare function scopedTokenNeedsWorker(read: CenterCredentialRead, worke
|
|
|
144
144
|
*/
|
|
145
145
|
export declare function centerStateBin(worker: string | undefined, identity: string): string;
|
|
146
146
|
/** 此刻凭证的身份(每次现读);取不到凭证 ⇒ `undefined`(身份未知)—— 唯一例外是 `expired`:令牌不许出站,但信封还读得出
|
|
147
|
-
* 是谁(
|
|
147
|
+
* 是谁([ref]:过期不等于换了人,盘上 LKG / prompt 分箱照常对得上)。「我现在是谁」只有这一只读法。 */
|
|
148
148
|
export declare function credentialIdentityNow(source: CenterCredentialSource): string | undefined;
|
|
149
149
|
/**
|
|
150
150
|
* [ref] E-15 ② —— 一次中心往返的答复**仍属于此刻的凭证**:发出它所用的身份 = 此刻的身份。
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/** `checkpointId` 的长度上界(见本文件头注第 2 条)。 */
|
|
2
2
|
export declare const MAX_CHECKPOINT_ID_CHARS = 128;
|
|
3
|
+
/**
|
|
4
|
+
* 一句要出店的话(日志 / 探针行)里**不许**含这一行的 token:大小写不敏感地把每一处换成记号 —— 与 {@link trustedCheckpointId} 同一条「包含关系 + 大小写不敏感」判据,
|
|
5
|
+
* 用在交不了值、只交得了一句话的出口(引擎铸的披露句按 checkpoint id 点名,而 id 可能被写成了 token)。token 为空 ⇒ 原句。
|
|
6
|
+
*/
|
|
7
|
+
export declare function withoutCheckpointToken(text: string, token: unknown): string;
|
|
3
8
|
/** 持久层读出的 `checkpointId` 过信任边界:是串、非空、不超长、不含 token(大小写不敏感)⇒ 原值;否则 `undefined`。判据全文见本文件头注。 */
|
|
4
9
|
export declare function trustedCheckpointId(raw: unknown, token: unknown): string | undefined;
|
|
5
10
|
/** 带 `checkpointId` 当 join 键的两类 durable 读面(计数 detail 的 `face`)。 */
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { recordFailOpen } from "./observability/fail-open.js";
|
|
2
2
|
export const MAX_CHECKPOINT_ID_CHARS = 128;
|
|
3
|
+
export function withoutCheckpointToken(text, token) {
|
|
4
|
+
const secret = token === undefined || token === null ? "" : String(token);
|
|
5
|
+
if (secret === "")
|
|
6
|
+
return text;
|
|
7
|
+
const lower = text.toLowerCase();
|
|
8
|
+
const needle = secret.toLowerCase();
|
|
9
|
+
let out = "";
|
|
10
|
+
let from = 0;
|
|
11
|
+
for (let at = lower.indexOf(needle); at !== -1; at = lower.indexOf(needle, from)) {
|
|
12
|
+
out += `${text.slice(from, at)}«checkpoint token»`;
|
|
13
|
+
from = at + needle.length;
|
|
14
|
+
}
|
|
15
|
+
return out + text.slice(from);
|
|
16
|
+
}
|
|
3
17
|
export function trustedCheckpointId(raw, token) {
|
|
4
18
|
if (typeof raw !== "string" || raw === "" || raw.length > MAX_CHECKPOINT_ID_CHARS)
|
|
5
19
|
return undefined;
|
package/dist/config-catalog.d.ts
CHANGED
|
@@ -36,12 +36,12 @@ export interface ConfigCatalogSpec {
|
|
|
36
36
|
readonly danger?: readonly CatalogDangerAxis[];
|
|
37
37
|
readonly enumValues?: readonly string[];
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* [ref]① —— 本行**回显**得出的词集(`enumValues` 的子集;缺席 ⇒ 与 `enumValues` 同集)。
|
|
40
40
|
*
|
|
41
41
|
* 🔴 `enumValues` 一直是**两义**的:它既是行对外宣告的「你可以写哪些词」([ref] 件⑤/⑧ 两条钉逐字锚
|
|
42
42
|
* 这一义:窄了=少宣告一档、宽了=宣告一个 boot 会拒的词),又被回显校验当成「实算值合不合法」的闭集。
|
|
43
43
|
* 两义在**多数**行上碰巧同集,于是差别只活在散文里 —— `MANUAL_MODE_SHELL_GATE` 的
|
|
44
|
-
* `derivedDefaultNote` 写着「真姿态只有 always 一个」(
|
|
44
|
+
* `derivedDefaultNote` 写着「真姿态只有 always 一个」([ref] 前是 always/classify 两个),`MODEL_DEFAULT_THINKING` 写着
|
|
45
45
|
* 「缺席/off ⇒ 不铸」,而**没有任何一条腿读那两句话**:`off` 照样留在回显闭集里,回显校验对它放行。
|
|
46
46
|
*
|
|
47
47
|
* ⇒ 把那半句散文变成一处**校验腿真读的声明**:`sanitizeEnumValue` 问 `echoWords ?? enumValues`,
|
|
@@ -53,7 +53,7 @@ export interface ConfigCatalogSpec {
|
|
|
53
53
|
*/
|
|
54
54
|
readonly echoWords?: readonly string[];
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* [ref] —— **底层布尔 ↔ 闭集词**的行内映射,只给「实算腿回布尔、而行对外说词」的 enum 行。
|
|
57
57
|
*
|
|
58
58
|
* 为什么写在行上而不是建第二张全局极性表:`config.ts` 的极性表(`ConfigKnobRecord`)记的是
|
|
59
59
|
* **布尔旋钮**的来源与默认方向,它压根不带词 —— 拿它当 `true→enumValues[0]` 的位置约定用,等于
|
|
@@ -73,7 +73,7 @@ export interface ConfigCatalogSpec {
|
|
|
73
73
|
*
|
|
74
74
|
* 🔴 第二参是**部署 env**,不是第五条供值腿:有几根旋钮的属主不在 `ServiceConfig` 上(它在装配点按
|
|
75
75
|
* env 现算,如 WebSearch 后端),而目录的纪律是「回显属主算出来的值」—— 只能把同一条实算腿的入参放宽,
|
|
76
|
-
* 不能在目录里再抄一遍属主的读法(
|
|
76
|
+
* 不能在目录里再抄一遍属主的读法([ref] / codex r1 F3 的成案:抄一遍就是第二个写者,当场分歧)。
|
|
77
77
|
*/
|
|
78
78
|
readonly resolve?: (config: ServiceConfig, env: NodeJS.ProcessEnv, boot: CatalogBootFacts) => CatalogValue | undefined;
|
|
79
79
|
readonly center?: CatalogCenterSeatSpec;
|
|
@@ -94,12 +94,12 @@ export interface ConfigCatalogRowCenter {
|
|
|
94
94
|
readonly effectiveNow: boolean;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
* 行上**对 `effectiveValue` 的判词位**(闭集;
|
|
97
|
+
* 行上**对 `effectiveValue` 的判词位**(闭集;[ref] 收成一族)—— 每一位**只在为真时铸 `true`、恒不铸 `false`**,缺席 = 这一格没有这件事
|
|
98
98
|
* (不是「不知道」)。净化器({@link sanitizeValue})一次读出值与判词,行投影原样铺平 —— 判词位只有这一种形,第三个判词位加进本闭集即受同一条约束。
|
|
99
|
-
* · `effectiveValueInvalid`(
|
|
99
|
+
* · `effectiveValueInvalid`([ref],additive)—— 本行的实算值**落在它自己宣告的回显闭集之外**(`echoWords ?? enumValues`,[ref]①),
|
|
100
100
|
* 或它的实算腿回了一个本行没有声明映射的布尔。在场时 `effectiveValue` 恒 `null`:回显一个集外值等于目录在教消费方写一个写回去就非法的词,
|
|
101
101
|
* 而**静默丢**会让「配错了」与「真的没设」在 wire 上同形([ref] 响亮臂)。只服务闭集族(`type:"enum"`)。
|
|
102
|
-
* · `effectiveValueWithheld`(
|
|
102
|
+
* · `effectiveValueWithheld`([ref],additive)—— `type:"url"` 行:展示铸点对这一格(单值)或其中任一项(列表)判了扣下(`failedClosed`:
|
|
103
103
|
* 位置律本会显示的一段 —— 整段 query / 一个路径段 —— 因为里面有一条凭据形而不出门)。判决的属主是铸点,目录不另判;
|
|
104
104
|
* 标准位置律(userinfo 落地、query 每个值成记号)对每一行同样成立,不是扣下;值整只成占位 = 这一行的展示律显示不了这个值
|
|
105
105
|
* (通用 url 行:不是层级式 URL;两只出网代理行的展示律更窄 —— 只显示 `scheme://host[:port]`,形不干净整只占位,`outbound-dispatcher.ts` `displayProxyUrl`),也不是本位。
|
|
@@ -135,7 +135,7 @@ export interface ConfigCatalogRow extends CatalogValueVerdicts {
|
|
|
135
135
|
* 而不是回表态原词、未设回 `null`。入参对象本身**必填**(每个调用点都得表态这次有哪些装配事实)。
|
|
136
136
|
*/
|
|
137
137
|
export interface CatalogBootFacts {
|
|
138
|
-
/** 记忆整理阀门的生效值(boot 第 4 段 `createConsolidationValve` 的判决:显式词,或
|
|
138
|
+
/** 记忆整理阀门的生效值(boot 第 4 段 `createConsolidationValve` 的判决:显式词,或 [ref] / [ref] 的出厂缺省派生)。
|
|
139
139
|
* 缺席 = 这次装配没有这件事实(只有不经真装配的桩服务:`ServiceDeps` 平铺视图里组字段是可选的;真装配的分组形里它必填)
|
|
140
140
|
* ⇒ 实算腿答「不知道」(落 env 原文 / null),不猜。 */
|
|
141
141
|
readonly memoryConsolidationValve?: {
|
|
@@ -149,7 +149,7 @@ export interface ConfigCatalogInputs {
|
|
|
149
149
|
readonly boot: CatalogBootFacts;
|
|
150
150
|
readonly knobs: readonly ConfigKnobRecord[];
|
|
151
151
|
/** settings-schema 现行 DOMAINS(调用方传入,原样上 wire 的 `centerDomains` 列表)。🔴 7.106.0 起本注改真:本模块**不是**零包依赖 ——
|
|
152
|
-
* 它值级 import 了 core 与契约包(词表 / 中心凭证键名 /
|
|
152
|
+
* 它值级 import 了 core 与契约包(词表 / 中心凭证键名 / [ref] ⑤a 的 `DOMAIN_SCHEMAS` 座位门);这一格照旧由调用方传,
|
|
153
153
|
* 只因为它是 wire 上的一段列表、由路由决定取哪一份。 */
|
|
154
154
|
readonly centerDomains: readonly string[];
|
|
155
155
|
/** web-admin 当前在管的 ServiceConfig 键集(缺席 = 没有配置管道)。 */
|
|
@@ -168,7 +168,7 @@ export interface ConfigCatalogWire {
|
|
|
168
168
|
readonly centerManaged: number;
|
|
169
169
|
};
|
|
170
170
|
readonly rows: readonly ConfigCatalogRow[];
|
|
171
|
-
/**
|
|
171
|
+
/** [ref](7.106.0)—— 退役 env 墓碑表(settings-schema `RETIRED_ENVS`,本进程起服按它拒启)的投影 `buildRetiredEnvWire()`,**恒在场**
|
|
172
172
|
* (可为空数组)。与 `rows` 分开:rows 是「本进程会读的 env」,这里是「本进程会拒的旧名」—— 一个名字不会同时在两处(墓碑名没有读取点)。 */
|
|
173
173
|
readonly retired: readonly RetiredEnvWire[];
|
|
174
174
|
}
|
|
@@ -178,7 +178,7 @@ export interface ConfigCatalogWire {
|
|
|
178
178
|
*/
|
|
179
179
|
export declare const CONFIG_CATALOG: readonly ConfigCatalogSpec[];
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
181
|
+
* [ref] ⑤a —— **目录座位加载期门**(类修:一次把「目录声称了契约里没有的中心写位」整类关掉)。
|
|
182
182
|
*
|
|
183
183
|
* 行上的 `center` 座位说的是「中心能发布这个键」。它必须对得上契约包 `@sema-agent/settings-schema` 的 `DOMAIN_SCHEMAS`:
|
|
184
184
|
* ① 域在场;② `path` 在该域的 zod 形里解析得出(`a.b` 逐段进对象;`xs[].c` = 进数组元素)。任一不成立 ⇒ **抛**(模块加载即抛:
|
|
@@ -188,7 +188,7 @@ export declare const CONFIG_CATALOG: readonly ConfigCatalogSpec[];
|
|
|
188
188
|
* 解析只认 zod 的结构外衣(optional / nullable / default / catch / readonly / effects·管道 / lazy)与对象 / 数组两种容器;认不出的节点 = 解析不出
|
|
189
189
|
* (fail-closed:宁可多拒一个座位,也不放过一个假座位)。
|
|
190
190
|
*
|
|
191
|
-
* 🔴
|
|
191
|
+
* 🔴 [ref](7.106.0 合并复审 opus 腿 L-1):**只走 zod 公开面**。契约包今天是 zod 3.25、本仓是 zod 4 —— 读 zod 私有定义字段(类型判别名 /
|
|
192
192
|
* 内层 schema / lazy getter)的旧写法在契约包升 zod 4 那天会让 `models[].…` 整族座位解析不出,模块 import 期整只抛。两大版没有一个能同时
|
|
193
193
|
* 公开读到的「这是什么节点」判别位(v4 的 `.def.type` 在 v3 上不存在),`instanceof` 也跨不了两份 zod 的类身份 ⇒ 按两大版**同名的公开访问器**
|
|
194
194
|
* 认形,规则三条(见 {@link zodObjectShapeOf} / {@link isZodArrayFace} / {@link ZOD_WRAPPER_FACES})。钉:`test/config-catalog-zod-public-face.test.ts`。
|
|
@@ -58,7 +58,7 @@ export interface CrossInvariant {
|
|
|
58
58
|
check(input: CrossInvariantInput): string | undefined;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* ──
|
|
61
|
+
* ── [ref] ① 推广(车 UZ 推广轮):**拒因句单铸点**是一类 —— 下面五只是 `config.ts` 区里五条跨域拒启的**判据 + 句子的唯一属主**
|
|
62
62
|
* (`executionLaneRequiredRefusal` / `modelProviderRefusal` 同形):boot 的 throw(`config.ts`,锚在那儿)与注册表条目的 `check` **都调它**,
|
|
63
63
|
* 没有第二份文本可漂。修前这五条逐条两份不同的句子(boot 手写一份、表里另写一份),boot 那份是运维在 stderr 读到的(`config-validation.test.ts`
|
|
64
64
|
* 钉着它的指纹),表那份只在热路径上被调 —— 而热键集带不上这些键 ⇒ 实际无读者。句子**取 boot 那份**(逐字不变);类钉 =
|
|
@@ -69,12 +69,12 @@ export interface CrossInvariant {
|
|
|
69
69
|
export declare function halfOpenDirectDoorRefusal(v: Pick<CrossInvariantView, "directApprovalDoor" | "durableApproval" | "approvalHmacKeys" | "principalJwtPubkeys" | "principalJwtIss" | "principalJwtAud" | "requirePrincipal" | "operatorPrincipals">): string | undefined;
|
|
70
70
|
/**
|
|
71
71
|
* `operator-principals-required`([ref]-① 普查候选 1/2):BFF 多租户 durable 形(DURABLE_APPROVAL ∧ REQUIRE_PRINCIPAL,直连门关)的空 operator 名单。
|
|
72
|
-
* 这条不变量生于审批四读面读「空名单 = 人人是」那条读法的年代(那时它防的是跨租户读待批队列);
|
|
72
|
+
* 这条不变量生于审批四读面读「空名单 = 人人是」那条读法的年代(那时它防的是跨租户读待批队列);[ref] 删了那条读法 —— 空名单在每一面都是「没人是」,
|
|
73
73
|
* 不再外泄任何东西 —— 剩下的事实是「这台多租 worker 的审批队列没有人能当运维」。本版只把句子改真、不改拒启集;删不删这一条是另一次表态。
|
|
74
74
|
*/
|
|
75
75
|
export declare function operatorPrincipalsRequiredRefusal(v: Pick<CrossInvariantView, "durableApproval" | "requirePrincipal" | "operatorPrincipals">): string | undefined;
|
|
76
76
|
/**
|
|
77
|
-
* `operator-single-user`(
|
|
77
|
+
* `operator-single-user`([ref],[ref] ① 裁 A):「谁是 operator」一个事实一个来源。`OPERATOR_SINGLE_USER=true`(单用户形的每个调用方都是运维)
|
|
78
78
|
* 只在单用户形、名单为空时成立:多租形没有「单一用户」(声明会把每个租户都变成运维);名单非空时两个来源答同一个问题。两形都拒,句子点名两根旋钮与出路。
|
|
79
79
|
*/
|
|
80
80
|
export declare function operatorSingleUserRefusal(v: Pick<CrossInvariantView, "operatorSingleUser" | "requirePrincipal" | "operatorPrincipals">): string | undefined;
|
|
@@ -109,7 +109,7 @@ export declare function workflowParkDecisionDomainRefusal(v: Pick<CrossInvariant
|
|
|
109
109
|
export declare function centerIdentityRefusal(v: Pick<CrossInvariantView, "authBridgeIssuer" | "webAdmin">): string | undefined;
|
|
110
110
|
export declare const CONFIG_CROSS_INVARIANTS: readonly CrossInvariant[];
|
|
111
111
|
/**
|
|
112
|
-
* 按 id 取**一条**(
|
|
112
|
+
* 按 id 取**一条**([ref]②:boot 面的单源化出口)。
|
|
113
113
|
*
|
|
114
114
|
* 为什么不是在 boot 期跑 `checkCrossInvariants` 全表:全表里有若干条的 boot 拒启点在 `config.ts` 的装配尾
|
|
115
115
|
* (各自有自己的锚),在这里再跑一遍全表等于给 boot 加上今天不存在的拒启臂 —— 那是行为改动,不是单源化。
|
|
@@ -6,14 +6,15 @@ import { defaultModelRefusal, refusedNameMintedRefusal } from "./model-entry-ref
|
|
|
6
6
|
import { WEB_ADMIN_ENV, httpUrlFlaws } from "@sema-agent/settings-schema";
|
|
7
7
|
import { authBridgeIssuerOf } from "./auth-bridge.js";
|
|
8
8
|
import { buildDisplaySafeUrl } from "./trace/redact.js";
|
|
9
|
-
import { executionLaneCaps, executionLaneOf, executionLaneRequiredRefusal,
|
|
9
|
+
import { executionLaneCaps, executionLaneOf, executionLaneRequiredRefusal, REMOTE_EXEC_PROVIDER_WORDS } from "./execution-lane-caps.js";
|
|
10
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "./deployment-shape.js";
|
|
10
11
|
export const LIVENESS_HEARTBEAT_MS = 30_000;
|
|
11
12
|
const anyServiceAuth = (v) => Boolean(v.authToken) || Object.keys(v.authTokens ?? {}).length > 0;
|
|
12
13
|
const mustNarrowBind = (v) => Boolean(v.allowUnauthedWrites) && !anyServiceAuth(v);
|
|
13
14
|
const directDoorConjuncts = (v) => Boolean(v.directApprovalDoor) && Boolean(v.durableApproval) && v.approvalHmacKeys.length > 0 && v.principalJwtPubkeys.length > 0 && Boolean(v.principalJwtIss) && Boolean(v.principalJwtAud);
|
|
14
15
|
function multiTenantSharedLaneRefusal(v) {
|
|
15
16
|
const lane = executionLaneOf(v.remoteExec?.provider);
|
|
16
|
-
if (
|
|
17
|
+
if (DEPLOYMENT_SHAPE_PREDICATES.laneSeparatesTenants.holds(v))
|
|
17
18
|
return undefined;
|
|
18
19
|
const outlets = REMOTE_EXEC_PROVIDER_WORDS.filter((w) => executionLaneCaps(w).tenantSeparation === "supported");
|
|
19
20
|
return (`REQUIRE_PRINCIPAL=true (multi-tenant posture) with the "${lane}" execution lane runs every tenant's Bash on one shared target — ` +
|
package/dist/config-lkg.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare function lkgPathOverrideOf(raw: string | undefined): string | und
|
|
|
34
34
|
* 根经链接时引擎连目标一起守)两处守它 ⇒ 不另加行(加了就是同一个文件两只判据,`READ_DENY_BUILTIN_EXCLUDE` 删那一行也删不掉它);
|
|
35
35
|
* · 覆写 ⇒ LKG 在配置根外,引擎那一行够不着 ⇒ 这里派生**一行** = 覆写的绝对路径(`/` 开头;`lkgPathOverrideOf` 已把相对值解成绝对)。大小写不敏感
|
|
36
36
|
* (与内建行同读法)。拒句与内建行同一句(`sensitive-path read deny list (pattern …)`)。
|
|
37
|
-
* **行的射程**(引擎读拒表的读法,core 7.48.0
|
|
37
|
+
* **行的射程**(引擎读拒表的读法,core 7.48.0 [ref]):`/` 开头的行**根锚定** —— 只守那一个绝对位置,用户仓里同尾的路径
|
|
38
38
|
* (`/app/config-lkg.json` 之于 `…/repo/app/config-lkg.json`)读得到、Grep 结果里也在;路径经符号链接的目录时,引擎在每次准备时把这一行
|
|
39
39
|
* **沿链放置**到它的字面头真正通向的地方(写进去的文件落在链接目标下,目标路径同样被拒)。
|
|
40
40
|
* 7.120.0–7.122.x 的两处旧读法随之退役:行是尾段任意深度匹配(挡掉用户仓里同尾的路径);本仓另派生一条 realpath 落点行(座席铸一次、
|
|
@@ -18,14 +18,14 @@ import type { ConfigProviderWord } from "./config-types.js";
|
|
|
18
18
|
* ——缺席/空两形并存就是又一处二义。
|
|
19
19
|
* 🔐 原流的 `error` 未经 {@link redactConfigError}(那道脱敏挂在真正进日志流的 `domainErrors` 产出边界上),
|
|
20
20
|
* 路由进日志/审计流的消费者必须自己先脱敏。 */
|
|
21
|
-
/** `credentialIdentity`(
|
|
21
|
+
/** `credentialIdentity`([ref] / [ref] E-15):远程腿恒在场 = 这次拉取所用凭证的身份(分箱键来源);本地腿
|
|
22
22
|
* 缺席(没有凭证 —— config.d 就在本机盘上)。 */
|
|
23
|
-
/** `droppedEntries`(
|
|
23
|
+
/** `droppedEntries`([ref] ②):schema 逐条丢掉的条目(坐标 + 字段诊断,已脱敏;[ref] 起每行带闭集词 `reasonCode`)—— **不**进候选门,
|
|
24
24
|
* 调用方逐条响亮点名、其余照用;缺席 = 这次读零逐条丢弃(与 `domainErrors` 同一种缺席即无的形)。其中的目录条目同一次折叠另记进
|
|
25
25
|
* `effective.models.droppedCatalogEntries`(`GET /v1/models.droppedEntries` 的源,与 `models` 同世代)。 */
|
|
26
26
|
/** `unreadFiles`:`config.d` 里读腿根本不读的文件(不是域 / 不是便携域)—— **不**进候选门(不是读的域判形失败),调用方一份一行
|
|
27
27
|
* `config_unread_file` 点名、其余照用;缺席 = 没有(本地读腿才会有)。 */
|
|
28
|
-
/** `retiredDomains`(
|
|
28
|
+
/** `retiredDomains`([ref]):带事实的退役域文档(契约包的墓碑)—— 读腿不抛,交成发现,候选判官以成因 `retired_domain` 整拒这份候选(与域判形失败
|
|
29
29
|
* 同一条回落链、同一行拒判);缺席 = 没有。远端腿:那一键不进 effective、其余域照读;本地腿:契约读腿在读便携域之前就拒,交出的候选只有版本
|
|
30
30
|
* (这棵树的内容版本,哈希含退役文件 ⇒ 改 / 删它版本即变),内容是空的 effective(被整拒,不会被应用)。 */
|
|
31
31
|
/** `unreadKeys`:本地读腿读了那份文件、却结构上不读其中一键(`prompts.json` 的 `workers`)—— 同 `unreadFiles`,不进候选门,调用方一键一行 `config_unread_key`。 */
|
|
@@ -96,13 +96,13 @@ export interface ConfigProvider {
|
|
|
96
96
|
/**
|
|
97
97
|
* Fetch one skill body by content hash (`sha256:<hex>`). Remote: GET the content endpoint + verify the
|
|
98
98
|
* hash. Local: content-addressed lookup over the skills of the candidate this provider last served (the
|
|
99
|
-
* same read that produced the manifest —
|
|
99
|
+
* same read that produced the manifest — [ref]). Returns `undefined` when the hash
|
|
100
100
|
* is unknown (remote 404 / local miss) so the caller keeps its baseline; throws only on a hard error
|
|
101
101
|
* (remote non-404 HTTP / hash mismatch).
|
|
102
102
|
*/
|
|
103
103
|
fetchSkillContent(contentHash: string): Promise<string | undefined>;
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* [ref]:这只配置源给技能正文留的**盘缓存目录**(content-addressed;`applySkillsManifest` 的读序 内存 → 盘 → 本配置源,读到即回写)。
|
|
106
106
|
* 远程:开着 LKG(`CONFIG_LKG_ENABLED`)时 = 配置根下的 `skill-cache` —— 中心不可达时的 LKG 起服不卡在正文拉取上,LKG 落盘的正文完整性门
|
|
107
107
|
* 也验这同一个目录;关着 = 缺席(不落盘)。本地:恒缺席 —— 正文就内联在本机盘上的 config.d 里,再拷一份是第二份真源。
|
|
108
108
|
*/
|
|
@@ -118,24 +118,24 @@ export interface ConfigProviderInput {
|
|
|
118
118
|
worker?: string;
|
|
119
119
|
dryRun?: boolean;
|
|
120
120
|
};
|
|
121
|
-
/** `CONFIG_PROVIDER` —— 闭集 `local` | `remote` | 缺席(
|
|
121
|
+
/** `CONFIG_PROVIDER` —— 闭集 `local` | `remote` | 缺席([ref]:词表属主 `CONFIG_PROVIDER_WORDS`,认不出的词在
|
|
122
122
|
* `loadConfig` 就拒启,本层**不可能**再收到第三个词 —— 修前那条「认不出 ⇒ 当 local + warn」的臂随之删除)。
|
|
123
123
|
* `local` forces the local backend; `remote` selects the center (falls through to local if no URL). */
|
|
124
124
|
provider?: ConfigProviderWord;
|
|
125
|
-
/** 本地配置源的根(持有 `config.d/<domain>.json`;FileConfigStore 吃根、读 `<root>/config.d`)。🔴
|
|
125
|
+
/** 本地配置源的根(持有 `config.d/<domain>.json`;FileConfigStore 吃根、读 `<root>/config.d`)。🔴 [ref]:**必填**,
|
|
126
126
|
* 值恒来自 {@link configLocalRoot}(入口算一次,工厂与执行车道合成步读同一个)—— 修前是可选、缺席回落
|
|
127
127
|
* `process.cwd()`,而工厂只在 `CONFIG_PROVIDER === "local"` 字面上递它 ⇒ 另一条走到 local 的路上配置源读 cwd、
|
|
128
128
|
* 合成步读 localRoot,两个根分家。一个远程源也收它:`remote` 而无中心 URL 的形照样落回 local。 */
|
|
129
129
|
localDir: string;
|
|
130
|
-
/**
|
|
130
|
+
/** [ref]:本地配置源的属主声明(`CONFIG_LOCAL_OWNER_UID`,配置席 `configLocalOwnerUid`)—— 每拍读 `config.d` 之前的目录信任判官与起服那一次判同一个值。
|
|
131
131
|
* **必填**(值可以是 `undefined` = 没声明):两个生产构造点都必须递,漏递 = 起服判过、每拍却按「没声明」判 ⇒ 每一拍都拒(tsc 在这里挡)。 */
|
|
132
132
|
localOwnerUid: number | undefined;
|
|
133
|
-
/**
|
|
133
|
+
/** [ref]:远程配置源的技能正文盘缓存目录(见 {@link ConfigProvider.skillBodyCacheDir});本地配置源不认它(正文本就在盘上)。缺席 = 不落盘。 */
|
|
134
134
|
skillBodyCacheDir?: string;
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* RemoteConfigProvider — DELEGATES to the exported web-admin HTTP functions. No HTTP is reimplemented;
|
|
138
|
-
* the center endpoint (baseUrl + credential SOURCE —
|
|
138
|
+
* the center endpoint (baseUrl + credential SOURCE — [ref]: read per request, never a bound token) and worker
|
|
139
139
|
* are passed through. The two delegate fns are injectable (defaulting
|
|
140
140
|
* to the real web-admin exports) so a unit test can assert delegation without module-mocking.
|
|
141
141
|
*/
|
|
@@ -192,13 +192,13 @@ export declare function mapToServiceEffective(eff: AgentConfigEffective, version
|
|
|
192
192
|
* `CONFIG_PROVIDER=remote` with no URL is a misconfiguration — we fall through to local rather than
|
|
193
193
|
* constructing a remote provider with no endpoint (the caller would have skipped the remote pull entirely
|
|
194
194
|
* under the old code path; local-with-empty-config.d degrades to env the same way). An UNRECOGNIZED value
|
|
195
|
-
* never reaches this function: `loadConfig` refuses to boot on it (
|
|
195
|
+
* never reaches this function: `loadConfig` refuses to boot on it ([ref]), so a fat-fingered knob can
|
|
196
196
|
* neither source config from an unintended network endpoint nor be read as "local" here while the
|
|
197
197
|
* execution-lane default reads it as "not local".
|
|
198
198
|
*/
|
|
199
199
|
export declare function createConfigProvider(input: ConfigProviderInput): ConfigProvider;
|
|
200
200
|
/**
|
|
201
|
-
*
|
|
201
|
+
* [ref] —— **本地配置根的唯一来源**:`CONFIG_LOCAL_DIR` → `AGENT_DATA_DIR` → `~/.ai-agent`。两个入口(HTTP 服务的第 1 段、
|
|
202
202
|
* run-local)各调一次,算出来的那一个值同时交给 web-admin 工厂(`createConfigProvider` 的 `localDir`)与执行车道合成步
|
|
203
203
|
* (`composeExecutionLane` 的 `localRoot`)—— 修前两个入口各写一份这条链(run-local 还多一个与之等价的三元),工厂又在
|
|
204
204
|
* 字面 `"local"` 之外回落 `process.cwd()`。
|
|
@@ -212,7 +212,7 @@ export declare function configLocalRoot(config: {
|
|
|
212
212
|
/**
|
|
213
213
|
* {@link createConfigProvider} 会造出**哪一种**配置源 —— 判据的唯一属主(构造器与执行车道合成步读同一只:
|
|
214
214
|
* local 形 `config.d/remote-exec.json` 的 file-wins 覆写只在配置源是 local 时生效,车PI 修复轮 ①)。
|
|
215
|
-
* `local` 或没配中心 ⇒ local;其余 ⇒ remote。(
|
|
215
|
+
* `local` 或没配中心 ⇒ local;其余 ⇒ remote。([ref] 起入参是闭集:「认不出的词 ⇒ local」那一臂随拒启删除。)
|
|
216
216
|
*/
|
|
217
217
|
export declare function configProviderKind(input: {
|
|
218
218
|
readonly provider?: ConfigProviderWord | undefined;
|
package/dist/config-provider.js
CHANGED
|
@@ -5,7 +5,7 @@ import { FileConfigStore } from "@sema-agent/settings-schema/node";
|
|
|
5
5
|
import { assertLocalConfigDirTrusted } from "./config-dir-trust.js";
|
|
6
6
|
import { danglingRefs, emptyEffective, findSkillContent, promptArtifactFor, renderRefIssue, skillContentHash, } from "@sema-agent/settings-schema";
|
|
7
7
|
import { redactSecrets } from "./trace/redact.js";
|
|
8
|
-
import { fetchEffective as remoteFetchEffective, fetchSkillContent as remoteFetchSkillContent, WebAdminHttpError, } from "./web-admin-client/facade.js";
|
|
8
|
+
import { fetchEffective as remoteFetchEffective, fetchSkillContent as remoteFetchSkillContent, skillToolListsOf, WebAdminHttpError, } from "./web-admin-client/facade.js";
|
|
9
9
|
import { homedir } from "node:os";
|
|
10
10
|
import { join } from "node:path";
|
|
11
11
|
const OPERAND_FINGERPRINT_KEY = randomBytes(16);
|
|
@@ -190,6 +190,7 @@ export function mapToServiceEffective(eff, version) {
|
|
|
190
190
|
scenarios: s.scenarios ?? [],
|
|
191
191
|
contentHash: skillContentHash(s.content),
|
|
192
192
|
enabled: s.enabled,
|
|
193
|
+
...skillToolListsOf(s),
|
|
193
194
|
})),
|
|
194
195
|
},
|
|
195
196
|
mcp: {
|