@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
package/dist/boot/web-admin.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
import { readFile as fsReadFile } from "node:fs/promises";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import { WEB_ADMIN_ENV, formatConfigPath
|
|
5
|
+
import { WEB_ADMIN_ENV, formatConfigPath } from "@sema-agent/settings-schema";
|
|
6
6
|
import { stableStringify } from "@sema-agent/settings-schema/hash";
|
|
7
7
|
import { buildModelRefusalsSignal } from "../model-entry-refusal.js";
|
|
8
8
|
import { CenterPromptSource, FilePromptArtifactStore, FilePromptSourceStateStore, MemoryPromptArtifactStore, MemoryPromptSourceStateStore, } from "@sema-agent/core";
|
|
@@ -11,7 +11,7 @@ import { applyCenterPlugins } from "../capabilities/center-plugins.js";
|
|
|
11
11
|
import { applyCenterArtifact, centerSourceOnError, withPromptArtifactBackfill } from "../capabilities/center-prompts.js";
|
|
12
12
|
import { centerScenarios, centerScenarioDetails } from "../capabilities/scenarios.js";
|
|
13
13
|
import { isRosterGateArmed } from "../config.js";
|
|
14
|
-
import {
|
|
14
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "../deployment-shape.js";
|
|
15
15
|
import { defaultLkgPath, defaultSkillCacheDir, saveLkg, loadLkg, legacyV1LkgPath, migrateV1Lkg } from "../config-lkg.js";
|
|
16
16
|
import { answerStillCurrent, centerStateBin, credentialIdentityNow, judgeCenterCredentialAtBoot } from "../center-credential.js";
|
|
17
17
|
import { createCenterConfigTier } from "../center-config-tier.js";
|
|
@@ -21,7 +21,7 @@ import { createConfigProvider, raceBootFetch, serviceConfigSourceKind, BOOT_FETC
|
|
|
21
21
|
import { ConfigDirUntrustedError } from "../config-dir-trust.js";
|
|
22
22
|
import { createKeyResolver } from "../key-resolver.js";
|
|
23
23
|
import { buildSealedKeyPublicFace, ensureCheckpointCtxSealing, ensureSealedKeyStore, reportExecutionPublicKey } from "../sealed-key.js";
|
|
24
|
-
import { applyEffective, applyCenterReadFace, buildReadFaceBaseline, buildReadFaceSwapCandidate, restoreReadFaceBaseline, mutateInPlace, logEffectiveDiff, applySkillsManifest, resolveMcpServers, resolveA2aPeers, restartReasons, modelPlaneChanged, withModelPlaneOf, fullyLandedForLkg, NO_CENTER_EFFECTIVE, isNoCenterEffective, fetchPromptArtifact } from "../web-admin-client/facade.js";
|
|
24
|
+
import { applyEffective, applyCenterReadFace, buildReadFaceBaseline, buildReadFaceSwapCandidate, restoreReadFaceBaseline, mutateInPlace, logEffectiveDiff, applySkillsManifest, skillManifestEntriesNotInstalled, resolveMcpServers, resolveA2aPeers, restartReasons, modelPlaneChanged, withModelPlaneOf, fullyLandedForLkg, NO_CENTER_EFFECTIVE, isNoCenterEffective, fetchPromptArtifact } from "../web-admin-client/facade.js";
|
|
25
25
|
import { buildConfigHandoff, buildRestartSignal, configHandoffMissing } from "../fleet/engine-signal.js";
|
|
26
26
|
import { createMcpRevocationLedger, enabledMcpEntries } from "../web-admin-client/mcp-revocation.js";
|
|
27
27
|
import { buildUnreadConfigFileFields, buildUnreadConfigKeyFields } from "../web-admin-client/read-warnings.js";
|
|
@@ -749,7 +749,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
749
749
|
const pluginOut = await applyCenterPlugins(skills, effective, {
|
|
750
750
|
cacheRoot: join(config.localDataRoot ?? join(homedir(), ".ai-agent"), "plugin-cache"),
|
|
751
751
|
allowHosts: config.pluginsAllowHosts,
|
|
752
|
-
toolsShareThisFilesystem:
|
|
752
|
+
toolsShareThisFilesystem: DEPLOYMENT_SHAPE_PREDICATES.toolsOnThisHost.holds(config),
|
|
753
753
|
logger,
|
|
754
754
|
}).catch((err) => {
|
|
755
755
|
logger.warn("center_plugins_apply_failed", { error: err instanceof Error ? err.message : String(err) });
|
|
@@ -768,12 +768,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
768
768
|
return false;
|
|
769
769
|
});
|
|
770
770
|
{
|
|
771
|
-
const
|
|
772
|
-
const canonScenarios = (a) => [...(a ?? [])].sort().join("\u0000");
|
|
773
|
-
const liveSkillMiss = enabledManifest.some((m) => !skills.some((sk) => sk.spec.name === m.name &&
|
|
774
|
-
skillContentHash(sk.spec.content) === m.contentHash &&
|
|
775
|
-
sk.spec.description === m.description &&
|
|
776
|
-
canonScenarios(sk.scenarios) === canonScenarios(m.scenarios)));
|
|
771
|
+
const liveSkillMiss = skillManifestEntriesNotInstalled(skills, bootLkgCandidate.effective.skills?.skills ?? []).length > 0;
|
|
777
772
|
if (liveSkillMiss)
|
|
778
773
|
bootSkillStale = true;
|
|
779
774
|
if (liveSkillMiss && (bootPublished || (!lkgSurvivesRestart && lastPrewarmBodiesVerified))) {
|
|
@@ -3,7 +3,7 @@ import { join } from "node:path";
|
|
|
3
3
|
import { FleetEventBus } from "../fleet/fleet-bus.js";
|
|
4
4
|
import { LocalWorkflowAgentSessionIndex } from "../orchestration/workflow-agent-session-index.js";
|
|
5
5
|
import { createCorruptReadFailOpenSeat } from "../observability/corrupt-read-seat.js";
|
|
6
|
-
import { FileWorkflowCompletionInbox, InMemoryWorkflowCompletionInbox, resolveCompletionRoute } from "../orchestration/workflow-completion-inbox.js";
|
|
6
|
+
import { FileWorkflowCompletionInbox, InMemoryWorkflowCompletionInbox, buildWorkflowCompleteInboxEntry, resolveCompletionRoute } from "../orchestration/workflow-completion-inbox.js";
|
|
7
7
|
import { FileWorkflowNotifyJournalStore, JournalingWorkflowRunStore, WorkflowNotifyGate } from "../orchestration/workflow-notify-journal.js";
|
|
8
8
|
import { SubagentSteerRegistry } from "../orchestration/subagent-steer.js";
|
|
9
9
|
import { WorkflowAgentRegistry } from "../orchestration/workflow-agent-steer.js";
|
|
@@ -40,14 +40,7 @@ export function createWorkflowOrchestration(ctx) {
|
|
|
40
40
|
const route = await resolveCompletionRoute(p, getRunStore() ? (id) => getRunStore().getRun(id) : undefined, config.requirePrincipal === true);
|
|
41
41
|
if (!route)
|
|
42
42
|
return;
|
|
43
|
-
await workflowCompletionInbox.enqueue(
|
|
44
|
-
sessionId: route.sessionId,
|
|
45
|
-
owner: route.owner,
|
|
46
|
-
runId: p.runId,
|
|
47
|
-
status: p.status,
|
|
48
|
-
summary: p.summary,
|
|
49
|
-
enqueuedAt: Date.now(),
|
|
50
|
-
});
|
|
43
|
+
await workflowCompletionInbox.enqueue(buildWorkflowCompleteInboxEntry(route, p, Date.now()));
|
|
51
44
|
}
|
|
52
45
|
catch (err) {
|
|
53
46
|
logger.warn("workflow_completion_enqueue_failed", { runId: p.runId, err: String(err) });
|
package/dist/brain.d.ts
CHANGED
|
@@ -16,10 +16,10 @@ export declare const FAST_FAIL_MAX_RETRIES = 2;
|
|
|
16
16
|
*
|
|
17
17
|
* Composition (A1 + the 1.38 resilience stack, ordered timeout-innermost → breaker → failover-outermost):
|
|
18
18
|
* - **Tiered timeouts** (1.38; re-cut by core 7.33.0 along the segments of a call) are passed into each
|
|
19
|
-
* brain at creation: `firstByteTimeoutMs` (fetch() → response headers;
|
|
19
|
+
* brain at creation: `firstByteTimeoutMs` (fetch() → response headers; [ref]: **passed only when the
|
|
20
20
|
* operator set `MODEL_FIRST_BYTE_TIMEOUT_MS`** — absent = no key, core's own default, which carries an
|
|
21
21
|
* upload allowance and one widened retry of its own), `firstTokenTimeoutMs` (headers → first delta,
|
|
22
|
-
* 600s since
|
|
22
|
+
* 600s since [ref] — a self-hosted backend's long prefill legitimately takes minutes, and 120s turned that
|
|
23
23
|
* into a retry handing the same prompt back to the same queue) and `idleTimeoutMs`. The TCP + TLS connect
|
|
24
24
|
* is the transport's own clock (core 7.33.0), not a knob here. env =0 = no engine clock on that segment
|
|
25
25
|
* and the transport's header / body clocks off too (the connect keeps the transport's own clock).
|
|
@@ -57,13 +57,13 @@ export declare function createBrain(config: ServiceConfig, deps?: {
|
|
|
57
57
|
/** {@link degradeRouteFingerprint} 读的那几张表(全是活引用:refresh 就地换代,读数每次现取)。 */
|
|
58
58
|
export type DegradeRoutePlane = Pick<ServiceConfig, "degrade" | "models" | "gatewayBaseUrl" | "modelApiKeyEnv" | "modelApiKeys">;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* [ref]:反应式降级壳焊的是哪一只目标 —— **唯一判据**(createBrain 组壳、启动摘要、`degrade-route` 片的两侧读数同读这一只)。
|
|
61
61
|
* 车道没开(非 reactive)或表里没有叫 `degrade.to` 的条目 ⇒ `undefined`(createBrain 不装降级壳)。
|
|
62
62
|
*/
|
|
63
63
|
export declare function degradeTargetOf(config: Pick<ServiceConfig, "degrade" | "models">): Model | undefined;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
66
|
-
* · `apiKeyEnv` —— 那一代给目标配的 env 变量**名**;壳每跳按这个名字现读值(同名轮换仍热;变量被删 ⇒
|
|
65
|
+
* [ref](R1):降级壳里目标自有凭据的**身份**(不是值)—— 与目标那只 Model 同一代,在 createBrain 组壳那一刻冻结。
|
|
66
|
+
* · `apiKeyEnv` —— 那一代给目标配的 env 变量**名**;壳每跳按这个名字现读值(同名轮换仍热;变量被删 ⇒ [ref] 起 `env_missing` 毒丸,跳响亮拒 —— 7.105.0 及以前是「与自有凭据缺席同一臂」、落网关 key 档)。
|
|
67
67
|
* · `sealed` —— 那一代托管密钥的解封产物(明文,或解不开时的毒丸;与 `config.modelApiKeys` 的值同型)。托管密钥的身份是它的密文;
|
|
68
68
|
* 本进程的托管店在 boot 读一次、此后不变(`ensureSealedKeyStore`),同一密文恒解出同一产物 —— 所以持有那一代的产物就是持有
|
|
69
69
|
* 那一代的身份(壳里没有密文与托管店,也不需要)。重贴 = 新 key = 新身份,要重启才进壳 —— `degrade-route` 指纹带它的身份摘要,
|
|
@@ -75,21 +75,21 @@ export interface DegradeCredentialIdentity {
|
|
|
75
75
|
readonly sealed?: string | SealedCustodyPoison;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* [ref]:读出 `target`(降级壳焊的那只目标,{@link degradeTargetOf})此刻的凭据身份 —— **唯一**读法:createBrain 组壳时冻结它,
|
|
79
79
|
* `degrade-route` 指纹的两侧读数与启动摘要同读它。查表的键与序与修前 `fbOwnApiKey` 同:目标真名、再 `degrade.to`(后者可能是
|
|
80
80
|
* `default` 别名,两张 key 表按真名索引、env 车道的目录则反过来);每个名字上托管密钥压过 env 引用(key-resolver 的序)。
|
|
81
81
|
*/
|
|
82
82
|
export declare function degradeCredentialIdentityOf(config: Pick<ServiceConfig, "degrade" | "modelApiKeyEnv" | "modelApiKeys">, target: Pick<Model, "name">): DegradeCredentialIdentity;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* [ref]:降级壳的**路由指纹**(纯数据)—— `degrade-route` 重启片 `baked` / `current` 两侧读数的唯一读法。
|
|
85
85
|
*
|
|
86
86
|
* 壳在 createBrain 那一刻焊死目标那只 `Model` 对象(env 派生或目录派生):请求打 `model.baseUrl`(缺席回网关根)、body 带
|
|
87
87
|
* `model.id` / `maxTokens` / `compat` / …,走哪条腿看 `provider`;refresh 就地换的是表里的**值**,够不到那只对象。于是指纹 =
|
|
88
88
|
* · 那只 Model 经 `catalogEntryFingerprint`(与 swap 门同一张热字段减法:单价**数值**热、在场性不热;其余字段一律算 —— deny-list,
|
|
89
89
|
* 漂移的失败形是多签一次,绝不漏签);
|
|
90
|
-
* · 有效端点根(
|
|
90
|
+
* · 有效端点根([ref] 同一只解析器 `openaiRouteBaseUrl(baseUrl, gatewayBaseUrl)`);
|
|
91
91
|
* · 它配的凭据**身份**({@link degradeCredentialIdentityOf},壳冻结的同一只):`apiKeyEnv`(变量名,不是值;值热、同名轮换不签)与
|
|
92
|
-
* 托管密钥的**身份摘要**(
|
|
92
|
+
* 托管密钥的**身份摘要**([ref] R1 起壳冻结那一代的 key ⇒ 重贴 = 新身份,必须签;车QU codex r1 [high] F2:修前只有在场位,同端点
|
|
93
93
|
* 重贴不签、旧 key 一直发到人工重启)。摘要 = 明文 sha256 前 16 位十六进制(与 center-credential.ts「token 自身摘要身份」同一种
|
|
94
94
|
* 做法;同一明文重新封一次 = 同一把 key ⇒ 不签);毒丸 = 它的 `publicKeyId` + 成因(不含检测时刻 —— 每次 apply 都会重铸)。
|
|
95
95
|
* 没有焊壳(车道没开 / 没有目标)⇒ `null`。在场 ↔ 缺席的翻转因此自然是一次变化。
|
|
@@ -104,10 +104,10 @@ export interface DegradeRouteWatch {
|
|
|
104
104
|
read(): NonNullable<RestartSliceCtx["degradeRoute"]>;
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* [ref] 复审(opus F2 + codex C1)—— **failover 拓扑 × 首字节段没有部署窗**的启动期披露(纯数据,`build*`;告警由 boot 出)。
|
|
108
108
|
*
|
|
109
109
|
* 缺省下首字节段不铸键(core 自缺省当家,[ref])、`0` = 该段不设引擎钟;而切备只发生在一次调用**失败之后**。于是主网关接了连接
|
|
110
|
-
* 却不回响应头时:缺省 ⇒ 要等 core 的首字节 lane 走完(缺省首窗 + 一次加宽重试;本仓不铸 `firstByteRetries`,
|
|
110
|
+
* 却不回响应头时:缺省 ⇒ 要等 core 的首字节 lane 走完(缺省首窗 + 一次加宽重试;本仓不铸 `firstByteRetries`,[ref] 车PA)才切备,
|
|
111
111
|
* 时间预算短于那一段的调用在备网关被尝试之前就被取消 —— 以 core 7.33.x 缺省计 lane ≈ 15 min,一次带短时间预算的调用
|
|
112
112
|
* (分钟级的工具 / 子任务预算)在主网关的加宽重试窗里就到点,不是「只剩余量」;
|
|
113
113
|
* `0` ⇒ 首字节 lane 永不切备。启动日志里同行的 `gatewayRetryCap:"fast-fail:…"` 只管共享重试梯子,读起来却像「会快切」—— 这条披露把它补齐。
|
package/dist/budget.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ import type { FleetUsageAccumulator } from "./fleet-client.js";
|
|
|
12
12
|
import type { FleetLeaseManager } from "./fleet-lease.js";
|
|
13
13
|
import { type PromptManifestTracker } from "./observability/prompt-manifest.js";
|
|
14
14
|
/** ③ Per-model pricing keyed by model id (core falls back to each Model.cost when a model is absent).
|
|
15
|
-
*
|
|
15
|
+
* [ref]:`m.cost` 运行期可缺席(未定价的模型不铸这个键 —— `config.ts` 的 `buildModelCostKey`),于是
|
|
16
16
|
* 未定价模型在本表里**没有行**;core 的 `isModelPriced` 两边都读(`pricing[id]` 或 `model.cost`),
|
|
17
17
|
* 两边同时缺席 = 这只模型未定价 ⇒ 成本读面整键缺席,而不是编造的 0。
|
|
18
18
|
*
|
|
19
|
-
* 🔴
|
|
19
|
+
* 🔴 [ref] —— 建行判据就是 core 那只谓词本身,不再同形手抄。第二参传 `undefined` 是**语义**不是省事:
|
|
20
20
|
* 这张表正是本函数在建,建之前它不存在,于是谓词落在它的另一半「模型自报价了吗」上。表建好之后
|
|
21
21
|
* 「本部署配没配价目表」这一问归 {@link isPricingConfigured}(它数的是行;每一行都只由本谓词放进来,
|
|
22
22
|
* 所以两问不可能漂成两个答案)。 */
|
|
@@ -32,7 +32,7 @@ export declare function buildPricing(models: Record<string, Model>): Record<stri
|
|
|
32
32
|
* 同一条论证在同一个字面量里**已经执行过一次**:紧邻的 `restartState: () => webAdmin.restartState()`
|
|
33
33
|
* 带着注释「A live getter (not a snapshot) so /health always reads current」—— 兄弟键漏了。本仓第 7 例同形。
|
|
34
34
|
*
|
|
35
|
-
* 🔴
|
|
35
|
+
* 🔴 [ref](判据本身,同一条「0 不是缺席」的病):此前判的是「**有没有一项正价**」
|
|
36
36
|
* (`some(v > 0)`),于是一台把四项单价**显式**配成 0 的部署(= 运营者声明这个模型免费)被报成
|
|
37
37
|
* 「没配价目表」—— 正好是本键要消歧的两态被折成同一个 false,消费端把一个可信的 $0 渲成 unknown。
|
|
38
38
|
* 判据改为**表在不在**:与 core [ref] 的 `isModelPriced`(「price table 是否 EXIST」)同向,也与
|
|
@@ -40,7 +40,7 @@ export declare function buildPricing(models: Record<string, Model>): Record<stri
|
|
|
40
40
|
* 三态读回:未定价 ⇒ 空表 ⇒ false(与改前同值);声明免费 ⇒ 有行(全零)⇒ true(**唯一变的一格**);
|
|
41
41
|
* 配了真价 ⇒ true(与改前同值)。
|
|
42
42
|
*
|
|
43
|
-
* 🔴
|
|
43
|
+
* 🔴 [ref] —— 本函数**不是** `isModelPriced` 的第二份实现,它问的是**部署级**的另一问:「这张表里有行吗」。
|
|
44
44
|
* 「某一只模型定价了吗」只有 core 那一只谓词回答,而这张表的每一行都只由它放进来(见 {@link buildPricing}),
|
|
45
45
|
* 所以两问结构上不可能漂成两个答案。 */
|
|
46
46
|
export declare function isPricingConfigured(pricing: Record<string, ModelPricing>): boolean;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] —— `GET /v1/capabilities` 的 `approvalsStreamLive` 位:**本部署的审批推送面带不带 live 事件族**。
|
|
3
3
|
*
|
|
4
4
|
* ## 病
|
|
5
|
-
*
|
|
5
|
+
* [ref](7.87.0)给 `GET /v1/approvals/stream` 接上了**第二条 diff 源** —— `listLivePending`(与
|
|
6
6
|
* `GET /v1/approvals` 的 `livePending` 同一只读函数),事件另立两词 `live_pending` / `live_resolved`。
|
|
7
7
|
* 那条源的在场性挂在协调器上:`TOOL_APPROVAL_ENABLED=false` 的部署里 `ToolApprovalCoordinator` 根本不装配
|
|
8
|
-
* ⇒ 源整个缺席、流的字节与
|
|
8
|
+
* ⇒ 源整个缺席、流的字节与 [ref] 之前逐字相同(能力缺席 = 零变化,不是空数组;见 `streamApprovals` 的
|
|
9
9
|
* `live` 参数注)。
|
|
10
10
|
*
|
|
11
11
|
* 于是消费端(client-core 的 approvalsFeed / 运营面板)**判不出自己连的是哪一种**:两形都是一条正常开着、
|
|
12
12
|
* 正常心跳的 SSE,差别只在「某一类卡永远不会从推面来」。用「等不到帧」去推断能力缺席不是判据 —— 那正是
|
|
13
|
-
*
|
|
13
|
+
* [ref] 立案时那个病的形状(代理静默卡一小时、屏上零提示),只是换到了消费端这一侧。探位就是为了把
|
|
14
14
|
* 「这台机器会不会推 live 卡」从一次运气变成一次读。
|
|
15
15
|
*
|
|
16
16
|
* ## 形(与 `mcpReconnect` / `executionLane` 同族)
|
|
@@ -5,7 +5,7 @@ import type { SubagentSpawnContext, SubagentToolOptions, ToolSpec } from "@sema-
|
|
|
5
5
|
export declare function nowTool(): ToolSpec;
|
|
6
6
|
/**
|
|
7
7
|
* 委派子代逐次注入的**一组**工具:`tools` 是这组**可能**注入的全部工具对象,`forSpawn` 只在这些对象里选「这一次 spawn 拿不拿」(缺席 = 每次都拿)。
|
|
8
|
-
* 名册与工厂读的是同一张 `tools` —— 工厂只能交出名册里那几只对象,结构上交不出名册外的东西(core 7.46.0
|
|
8
|
+
* 名册与工厂读的是同一张 `tools` —— 工厂只能交出名册里那几只对象,结构上交不出名册外的东西(core 7.46.0 [ref] 的「声明不说谎」在本仓由形状保证,
|
|
9
9
|
* 不靠两张表对拍)。
|
|
10
10
|
*/
|
|
11
11
|
export interface SubagentExtraToolSet {
|
|
@@ -18,16 +18,16 @@ export interface SubagentExtraToolOptions {
|
|
|
18
18
|
readonly extraToolNames: NonNullable<SubagentToolOptions["extraToolNames"]>;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* [ref](core 7.32.0)—— 委派子代的**逐次注入**:`Now` + 部署的 extra tools(今天 = SendUserFile)。
|
|
22
22
|
*
|
|
23
23
|
* 为什么 `Now` 走这条通道:core 7.32.0 起子代按**身份**继承场景层 bundle 的工具(`assembleCodeTools` 交给 Agent 的
|
|
24
24
|
* `inheritedTools` ∩ 父 run 真挂载),而 `Now` 是本仓在 bundle **旁边**组的宿主工具(scenarios.ts),宿主工具**从不**被继承
|
|
25
25
|
* (core:继承整张 `spec.tools` 会把宿主工具带过宿主自己的逐次门)—— 逐次注入是它到达子代的唯一通道。一个工厂、两个产地:
|
|
26
26
|
* 部署那一组的门(只读内建排除)在它自己的 `forSpawn` 里,这里只做合成。
|
|
27
27
|
*
|
|
28
|
-
* core 7.46.0
|
|
28
|
+
* core 7.46.0 [ref] —— **工厂与名册一个来源**:返回委派工具的两键,`extraTools`(每次 spawn 交出 `forSpawn` 选中的那几只)与
|
|
29
29
|
* `extraToolNames`(全部可能交出的那几只的名字 / 别名 / 内容来源,从同一批 `ToolSpec` 读出)。名册在场 ⇒ 引擎重新能列出子代的工具池:
|
|
30
|
-
* 定义级 / 工具级 / `TaskSpec.agents` 清单里没有任何工具答应的名字由引擎按名册判(core 7.51.0
|
|
30
|
+
* 定义级 / 工具级 / `TaskSpec.agents` 清单里没有任何工具答应的名字由引擎按名册判(core 7.51.0 [ref] 起不拒 run:条目原样保留、告知一次并带该写的拼法;
|
|
31
31
|
* 7.46.0–7.50.x 曾开跑前拒 `config.agent.unknown_tool`),记忆内容来源读者按声明读这几只。
|
|
32
32
|
* 修前(core 7.32.0–7.45.x)工厂恒在场 ⇒ 池不可静态知 ⇒ 那一族拼法只告不拒、委派结果一律按「外部」读。
|
|
33
33
|
* 工厂**不抛**:各组的 `tools` 是装配期就建好的对象;部署 `forSpawn` 的抛由 core 收成「这一 spawn 什么都不继承 + 模型面披露句」(onExtraToolsError 记 warn)。
|
|
@@ -36,7 +36,7 @@ export interface SubagentExtraToolOptions {
|
|
|
36
36
|
export declare function createSubagentExtraTools(deployment?: SubagentExtraToolSet): SubagentExtraToolOptions;
|
|
37
37
|
/**
|
|
38
38
|
* `onExtraToolsError` 收到的错误 → 运维行 `subagent_extra_tools_error` 的字段:句子,加上错误**自带**的码与 `detail.reason`(在场才铸)。
|
|
39
|
-
* core 7.46.0
|
|
39
|
+
* core 7.46.0 [ref] 被拒的 spawn(产物不在名册里)带 `config.extra_tool_names` + `undeclared_name` / `undeclared_origin`;部署工厂自己抛的错多半两位都不带。
|
|
40
40
|
* 本仓不按码分支、不重铸 —— 只把错误说的话原样过境到运维面(修前只记句子,码与原因词丢在这一跳)。
|
|
41
41
|
*/
|
|
42
42
|
export declare function extraToolsErrorFields(err: unknown): Record<string, unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Logger } from "../observability/logger.js";
|
|
2
2
|
import { type LoadedSkill } from "./skills.js";
|
|
3
3
|
/**
|
|
4
|
-
* 声明面的 `source.url` 长度上限(
|
|
4
|
+
* 声明面的 `source.url` 长度上限([ref])—— **界在声明关口,不在每个出口各切一刀**。
|
|
5
5
|
*
|
|
6
6
|
* 由来:出口上原有一刀 `.slice(0, 80)`,而它做了两件坏事(① 把 display-safe 铸点的 `«redacted…»` 记号截成
|
|
7
7
|
* 半只;② 与同一条 URL 在别处的处置成了两把尺)。删掉它之后,这个 **center 下发**值在日志行与
|
|
@@ -42,7 +42,7 @@ export declare function validatePluginDecl(decl: PluginDeclWire, allowHosts: rea
|
|
|
42
42
|
/**
|
|
43
43
|
* 条款 3:clone 计划(argv 序列)。纯数据,让"步骤"可被锚定。
|
|
44
44
|
*
|
|
45
|
-
* 7.103.0(
|
|
45
|
+
* 7.103.0([ref] 残余):计划**只**产 argv。隔离 env(收紧③:GIT_CONFIG_GLOBAL/SYSTEM=/dev/null、GIT_TERMINAL_PROMPT=0)的唯一属主是
|
|
46
46
|
* `gitSubprocessEnv({ isolateConfig: true })` —— 修前这三键写在这里、由 `runGit` 叠在 `{ ...process.env }` 上,一件姿势两个写者,
|
|
47
47
|
* 而剥密恰好落在两者之外。锚点随之移到真 spawn 的 env 上(`test/secret-env-scrub-host-legs.test.ts` R2:假 git 读到的整份 env)。
|
|
48
48
|
*/
|
|
@@ -85,7 +85,7 @@ export interface ApplyPluginsResult {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* 装载器**会物化**的插件(按声明序)—— 每条声明过**同一只**判定 {@link validatePluginDecl},只留 `ok` 的
|
|
88
|
-
* `{name, url, sha?}`。restart 指纹(`web-admin-client/restart-signal.ts` 的 skills 片,
|
|
88
|
+
* `{name, url, sha?}`。restart 指纹(`web-admin-client/restart-signal.ts` 的 skills 片,[ref] 波 0)读的就是它:
|
|
89
89
|
* 装载器不读的字段(notes / version)、整条跳过的声明(`enabled:false` / marketplace 源 / 白名单外 host / 坏形)
|
|
90
90
|
* 在这里一并消失,于是「重启之后什么都不会变」的发布不签重启(codex 对抗复审 r1 [medium]);顺序保留 ——
|
|
91
91
|
* 撞名让位按声明序,对调两条是真变化。`allowHosts` 与装载时同一份(部署事实 `PLUGINS_ALLOW_HOSTS`)。
|
|
@@ -105,8 +105,8 @@ export declare function applyCenterPlugins(baseline: LoadedSkill[], eff: {
|
|
|
105
105
|
cacheRoot: string;
|
|
106
106
|
allowHosts: readonly string[];
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
109
|
-
* `loadDeploymentSkills`
|
|
108
|
+
* [ref] —— 「**工具跑的那台机器**的盘就是本进程这台盘吗」,由**组合根**算好传入(`boot/web-admin.ts` 传部署形表行 `toolsOnThisHost` 的答案,与出厂自扫
|
|
109
|
+
* `loadDeploymentSkills` 读的是同一行 —— 判据属主在 `deployment-shape.ts`,这里不第二次判车道、不 import 车道词)。真 ⇒ 目录形 plugin 技能带上自己的
|
|
110
110
|
* 目录(`SkillSpec.baseDir`:`Skill` 结果首行 + `${SKILL_ROOT}` 替换);假 ⇒ 不带(fail-closed:沙箱 / 远端车道上这条路径在工具那边不存在)。
|
|
111
111
|
* 🔴 **必填,不给缺省**:修前这个调用点手上根本没有这一事实,fail-closed 默认把 host 车道也一并挡成「永不带」而没有任何红 —— 必填让「漏传」是编译错。
|
|
112
112
|
*/
|
|
@@ -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, toolsShareThisFilesystem: opts.toolsShareThisFilesystem, ...(opts.logger !== undefined ? { logger: opts.logger } : {}) });
|
|
199
|
+
const loaded = loadSkills(rootCheck.dir, { source: "center", 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 });
|
|
@@ -30,7 +30,7 @@ export interface CenterSourceTransitions {
|
|
|
30
30
|
applyDisabled(sourceRevision: string): Promise<void>;
|
|
31
31
|
/** codex-2 F2(restart-owed disable):撤下写盘失败后重启,内存 prev 丢了但持久态还 active —— 以中心源自身的活候选为准判「欠撤下」,不是只看内存 prev。 */
|
|
32
32
|
current?(): unknown;
|
|
33
|
-
/**
|
|
33
|
+
/** [ref](codex 修复验证轮 V1):本箱**持久记录**是 active —— 即使那份 artifact 此刻加载不出(活候选为空)。「欠撤下」的真源是持久记录;
|
|
34
34
|
* 活候选只是它能加载时的影子。缺席 = 调用方不掌握持久记录(沿用前两条判据)。 */
|
|
35
35
|
persistedActive?(): boolean;
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] ②(设计稿 v1.1 §2②)—— caps `centerWiring`:「这台引擎**此刻**是不是真的接着中心,调用者的额度是不是真的在执行」。
|
|
3
3
|
*
|
|
4
4
|
* 7.105.0 及以前这几件事只有日志和 gauge 知道:拉取、租约、用量三条腿各自沉默 —— 租约鉴权失败 / 中心不可达一律放行,调用方
|
|
5
5
|
* 与运维面板都读不出「额度现在没人在判」。本键把它们收成一个读面(调用方面;运维面仍是 `/health` 与 `GET /v1/diagnostics/wiring`)。
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { type ExecutionLane, type RemoteExecProvider } from "../execution-lane-caps.js";
|
|
2
2
|
export interface ExecutionLaneCapability {
|
|
3
|
-
/** 本部署的执行车道词(闭集 = {@link ExecutionLane} 八词;`REMOTE_EXEC` 未设 ⇒ `"in-process"`,见头注
|
|
3
|
+
/** 本部署的执行车道词(闭集 = {@link ExecutionLane} 八词;`REMOTE_EXEC` 未设 ⇒ `"in-process"`,见头注 [ref] 段)。 */
|
|
4
4
|
readonly provider: ExecutionLane;
|
|
5
5
|
/** 工具跑的那台机器就是本进程这台吗(= server 盘上的绝对路径对模型的工具有没有意义)。
|
|
6
|
-
* 属主 = `
|
|
6
|
+
* 属主 = 部署形表行 `toolsOnThisHost`,与 `skills[].baseDir` 的铸点同一行。 */
|
|
7
7
|
readonly toolsOnThisHost: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* 值 = {@link laneIsolated}(能力表 `isolation` 位,与 boot `remote_exec_enabled.isolated` 同一只)。见头注
|
|
8
|
+
/** [ref]:手在不在 OS 级隔离边界里(容器 / microVM / Kata pod)。**present-iff 本车道有手**(能力表 `coreRemoteExecutionEnv`);
|
|
9
|
+
* 值 = {@link laneIsolated}(能力表 `isolation` 位,与 boot `remote_exec_enabled.isolated` 同一只)。见头注 [ref] 段。 */
|
|
10
10
|
readonly isolated?: boolean;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* 部署席 → 消费端窄投影。形照 `projectWebSearchCapability` / `projectSqlEngineCapability`:
|
|
14
14
|
* 不碰 config.ts(只从车道表模块取词与归一读口,那是叶),于是本模块是叶。
|
|
15
15
|
*
|
|
16
|
-
* 🔴 本处**不写**任何缺席折词(
|
|
16
|
+
* 🔴 本处**不写**任何缺席折词([ref] 门 D):缺席归一只在 {@link executionLaneOf} 一处。
|
|
17
17
|
*/
|
|
18
18
|
export declare function projectExecutionLaneCapability(config: {
|
|
19
19
|
readonly remoteExec?: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "../deployment-shape.js";
|
|
2
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
5
|
const handsWired = laneWiresExecutionEnv(lane);
|
|
6
6
|
return {
|
|
7
7
|
provider: lane,
|
|
8
|
-
toolsOnThisHost:
|
|
8
|
+
toolsOnThisHost: DEPLOYMENT_SHAPE_PREDICATES.toolsOnThisHost.holds(config),
|
|
9
9
|
...(handsWired ? { isolated: laneIsolated(lane) } : {}),
|
|
10
10
|
};
|
|
11
11
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 不是静默继承 full(词表闭集纪律)。
|
|
13
13
|
* ② {@link HANDS_EXCLUSIVE_TOOL_NAMES} + {@link handsDenyPolicy} —— 纵深:hands=none 的任务即便被误接到
|
|
14
14
|
* 有手 Runner 上,手独占名单逐一 deny。**不是**主保证(主保证是根本不挂 factory ⇒ 工具面不可见)。
|
|
15
|
-
* ③ {@link stampHandsLane} / {@link handsLaneOf} —— 车道作为 TaskSpec 上的**显式字段**(
|
|
15
|
+
* ③ {@link stampHandsLane} / {@link handsLaneOf} —— 车道作为 TaskSpec 上的**显式字段**([ref]):
|
|
16
16
|
* resolveSpec 出口铸一次,执行点读一次,**缺席即拒**(不是回落最宽车道)。
|
|
17
17
|
*/
|
|
18
18
|
import { type Runner, type TaskSpec, type ToolPolicy } from "@sema-agent/core";
|
|
@@ -26,7 +26,7 @@ export type ScenarioHands = "full" | "none";
|
|
|
26
26
|
* **LSP 的 manager 座照传,不摘**:挂不挂 LSP 由引擎一处决定 —— core 7.49.2 起 LSP 只在「有手腿 ∧ 接了 manager 座」的腿上挂,无手腿
|
|
27
27
|
* (`hands=none` 的场景、委派子代、后台代理)天然没有。本仓此前在这里再摘一次 `lspManager`(宿主车道的 `NodeLspManager` 经
|
|
28
28
|
* `defaultLspReadText` 直读本地盘、没有读面围栏,当年引擎还会在 StubExecutionEnv 上挂它),是同一件事的第二只写者:引擎一旦决定
|
|
29
|
-
* 它自己的读法,两处只会各改各的。引擎的读数钉在 `test/scenario-hands-lane.test.ts` 的
|
|
29
|
+
* 它自己的读法,两处只会各改各的。引擎的读数钉在 `test/scenario-hands-lane.test.ts` 的 [ref] 段(同一份含 manager 座的 deps,有手腿 roster 有
|
|
30
30
|
* `LSP`、无手孪生没有)。
|
|
31
31
|
*/
|
|
32
32
|
export declare function withoutHands<T extends {
|
|
@@ -69,7 +69,7 @@ export declare function runHasWorkspace(hands: ScenarioHands, laneHasHands: bool
|
|
|
69
69
|
* (test/scenario-hands-lane.test.ts 格7/格8 双钉:真 Runner 过审计 + 零交集门)。
|
|
70
70
|
* filter 打在**整表**(effect 表 + 锚定补集)之后 —— caret floor 下装置会解析到更新的 core,
|
|
71
71
|
* 补集名哪天被退役,只滤前半就是同一次故障换个名字(codex 复审 finding,2026-08-09)。
|
|
72
|
-
*
|
|
72
|
+
* [ref](core 7.41.0 [ref]):判据换成 core 导出的**那一只** `judgeRuleToolName`(策略名审计、会话规则店、本仓写口与配置表同调)——
|
|
73
73
|
* 修前这里直读 `RETIRED_TOOL_NAMES` 表,是本仓第三份「这是不是旧名」的手写判据。名册 = 空集(这张 deny 名单不挂在任何一跑的名册上判)。
|
|
74
74
|
*/
|
|
75
75
|
export declare const HANDS_BAND_TOOL_NAMES: readonly string[];
|
|
@@ -87,7 +87,7 @@ export declare const HANDS_BAND_TOOL_NAMES: readonly string[];
|
|
|
87
87
|
export declare const HANDS_DUAL_USE_TOOL_NAMES: readonly string[];
|
|
88
88
|
export declare const HANDS_EXCLUSIVE_TOOL_NAMES: readonly string[];
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* [ref]:办公向场景(`cowork`)**保留**的手带工具 —— 文件读三件。办公场景挂手(`hands: "full"`:run 有工作区,附件 `path` 受理,这三件要这只手),
|
|
91
91
|
* 但不带编码类工具;「编码类」的定义是**手独占名单减去这张保留表**({@link OFFICE_EXCLUDED_TOOL_NAMES}),不是另抄一张编码工具名单:
|
|
92
92
|
* core 往 band 里加新的手带工具,办公场景**默认就卸它**(fail-closed),要保留得在这里显式点名并过评审。
|
|
93
93
|
* 保留表里每一项必须是 band 全集的成员(对表钉在 `test/cowork-scenario.test.ts`)。
|
|
@@ -114,7 +114,7 @@ export declare function tightenWithHandsDeny(base: ToolPolicy | undefined): Tool
|
|
|
114
114
|
/** 装配点的取用形:`full` 原样放行基线,`none` 叠 deny。**穷举 switch**,无缺省臂。 */
|
|
115
115
|
export declare function toolPolicyForHands(hands: ScenarioHands, base: ToolPolicy | undefined): ToolPolicy | undefined;
|
|
116
116
|
/**
|
|
117
|
-
* 执行车道在 TaskSpec 上的**显式字段键**(
|
|
117
|
+
* 执行车道在 TaskSpec 上的**显式字段键**([ref];修前是一张以 spec **对象身份**为键的 WeakMap 旁表)。
|
|
118
118
|
*
|
|
119
119
|
* 为什么是 symbol 而不是字符串键:`TaskSpec` 是**上游 core 的类型面**,一个字符串键会进
|
|
120
120
|
* `Object.keys` / `JSON.stringify` / core 自己的键审计,等于 server 在别人的契约上私自加一个键;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] —— **无 run 可读的逐台 MCP 状态面**的 server 半场(设计稿 `2026-09-19-s481-mcp-status-face-v1`)。
|
|
3
3
|
*
|
|
4
|
-
* ## 病(deploy 报案 I-1 / cli
|
|
4
|
+
* ## 病(deploy 报案 I-1 / cli [ref])
|
|
5
5
|
* 壳的一次性命令(`sema mcp list`)与交互会话对同一台 MCP 服务器给出**相反**的答案:命令行报 Failed、
|
|
6
6
|
* 会话里那台 server 的工具却能用。根因不是判定不同,而是**没有面** —— 一个从未起过 run 的会话在本服务上
|
|
7
7
|
* 只有 `GET /v1/capabilities.mcp` 那一枚布尔,壳只能自己去拨号、自己造词。
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
* 在 core 那边没有任何期限(core `docs/KNOWN-LIMITS.md`)—— 那一形上本面同样没有期限,补偿只有限速与缓存。
|
|
34
34
|
*/
|
|
35
35
|
import { type McpServerSpec } from "@sema-agent/core";
|
|
36
|
+
import type { UrlCredentialFacts } from "../url-credential.js";
|
|
36
37
|
/**
|
|
37
38
|
* 本面的**拒码闭集**(设计稿 §2 的四枚)。闭集写成型,是为了让 {@link MCP_PROBE_HTTP_STATUS} 那张表
|
|
38
39
|
* 「漏一枚 = 编译红」—— [ref] 的安全轴纪律:词表是闭集,未处置的成员必须是编译错误而不是运行期惊喜。
|
|
@@ -40,7 +41,7 @@ import { type McpServerSpec } from "@sema-agent/core";
|
|
|
40
41
|
export declare const MCP_PROBE_REFUSAL_CODES: readonly ["capability.mcp_injection_required", "limit.rate_exceeded", "request.body_shape", "request.field_invalid", "state.mcp_probe_incomplete"];
|
|
41
42
|
export type McpProbeRefusalCode = (typeof MCP_PROBE_REFUSAL_CODES)[number];
|
|
42
43
|
/**
|
|
43
|
-
* 🔴 **状态档取单表**(`GOVERNANCE_HTTP_STATUS` 的同族形,
|
|
44
|
+
* 🔴 **状态档取单表**(`GOVERNANCE_HTTP_STATUS` 的同族形,[ref]② 的那条律):一个码在本服务上只有**一个**
|
|
44
45
|
* 状态,而路由层**一个字面量都不许手写**。写成 `as const satisfies` 两头都占:格是字面量型(直接当
|
|
45
46
|
* `sendError` 的状态参数用,零 `?? 400` 兜底 —— 兜底就是第二份真源),`satisfies` 保住闭集门。
|
|
46
47
|
*/
|
|
@@ -52,7 +53,7 @@ export declare const MCP_PROBE_HTTP_STATUS: {
|
|
|
52
53
|
readonly "state.mcp_probe_incomplete": 503;
|
|
53
54
|
};
|
|
54
55
|
/**
|
|
55
|
-
* 每 principal 的固定窗限速。**刻意不挂任何无关旋钮**(
|
|
56
|
+
* 每 principal 的固定窗限速。**刻意不挂任何无关旋钮**([ref] 的同一条教训,`DEVICE_ENROLL_RATE_POLICY`
|
|
56
57
|
* 先例):全局 `RATE_LIMIT_RPM` 缺省是 `0` = 关断,把一条真拨号的面挂在它上面 = 出厂形不限速。
|
|
57
58
|
* 12/60s 是**安全地板**,不是可调参数;窗是**每副本**的(多副本部署上有效上界 = 12 × 副本数,如实记)。
|
|
58
59
|
*/
|
|
@@ -157,6 +158,8 @@ export interface McpProbeRefusal {
|
|
|
157
158
|
readonly message: string;
|
|
158
159
|
/** `request.body_shape` 专用:词表外 / 本面不接线的键,全路径形(已清洗+截断+排序+封顶)。 */
|
|
159
160
|
readonly unknownKeys?: readonly string[];
|
|
161
|
+
/** [ref]:申报的 `transport.url` 带凭据 ⇒ `field` + `reason`(与提交腿同一只回答者交回的同一组机读位,原样转述)。 */
|
|
162
|
+
readonly facts?: UrlCredentialFacts;
|
|
160
163
|
}
|
|
161
164
|
/**
|
|
162
165
|
* `POST …/probe` 的体读器:闭形、逐条点名、零静默丢。成功 ⇒ 交给 core 的 `specs`(**原样**转发被读出来的
|
|
@@ -164,7 +167,7 @@ export interface McpProbeRefusal {
|
|
|
164
167
|
*
|
|
165
168
|
* ## 申报「能不能原样用」:问提交腿 fresh 门**同一只**回答者,不另判
|
|
166
169
|
* 本面只判自己那一层(体是对象、顶层只受理 `mcpServers`、这个键必填);`mcpServers` 本身 —— 列表的形、上限、每条的键名与键值 —— 全部交给
|
|
167
|
-
* `task-mcp.ts` 的 `requestMcpDeclarationRefusal`,拒(码 + 句 + `unknownKeys`)原样转述:同一份申报在两扇门上只有一个答案,零拨号之前就给。
|
|
170
|
+
* `task-mcp.ts` 的 `requestMcpDeclarationRefusal`,拒(码 + 句 + `unknownKeys` + url 带凭据那一形的 `field` / `reason`)原样转述:同一份申报在两扇门上只有一个答案,零拨号之前就给。
|
|
168
171
|
* 回答者受理的申报由**同一只**读器(`validateRequestMcp`)交回,读器的产物就是申报本身(只差判官自己的合法归一),经 `toCoreMcpServerSpec`
|
|
169
172
|
* 得到的就是一条任务提交会交给引擎的那一份 —— 本面拨的正是它。读器只在回答者受理之后才跑,所以它对重放存量 body 才有的降级留痕
|
|
170
173
|
* (`source` 写坏的 F 类丢弃)不会在一次被拒的探测上虚记。
|
|
@@ -237,7 +240,7 @@ export interface McpProbeLocal {
|
|
|
237
240
|
/** 带行为的东西 ⇒ `create*`(工厂命名律:`build*` 出纯数据,`create*` 出活对象)。 */
|
|
238
241
|
export declare function createMcpProbeLocal(): McpProbeLocal;
|
|
239
242
|
/**
|
|
240
|
-
*
|
|
243
|
+
* [ref] —— 一行的**本面独有**两键:`toolNames` / `toolNamesTruncated`。两条口走同一只 {@link createMcpProbeWalk},
|
|
241
244
|
* 所以这是它们**唯一**的铸点。
|
|
242
245
|
*
|
|
243
246
|
* ## 来源只有一个
|
|
@@ -308,7 +311,7 @@ export declare function buildMcpInjectionRefusal(): McpProbeRefusal;
|
|
|
308
311
|
*
|
|
309
312
|
* ⚠️ **如实交代一条覆盖边界**:全仓的 `api-error-text-freeze` 门锚的是 `sendError(res, <字面三位数>,
|
|
310
313
|
* "<字面码>", …)`,而本面刻意**不在调用点写字面状态**(状态从 {@link MCP_PROBE_HTTP_STATUS} 单表取,
|
|
311
|
-
*
|
|
314
|
+
* [ref]② 那条律),于是这四句结构上够不着那道门。⇒ 它们由 `test/mcp-status-face-s481.test.ts` 的
|
|
312
315
|
* 「四句逐字节」那一格钉住(改一个字当场红)。把那道全局门扩到「常量表出站」形是另一台车。
|
|
313
316
|
*/
|
|
314
317
|
export declare function buildMcpProbeRateRefusal(): McpProbeRefusal;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* silently). But the TENANT judgment INVERTS: an ssh peer is ONE persistent real machine shared by every
|
|
22
22
|
* task (sshExecutionEnvFactory ignores ctx — same host + same mountPath for all tasks; destroy() only
|
|
23
23
|
* disconnects, files persist; capabilities.isolation:false). "Scoped read = tenant boundary" does NOT
|
|
24
|
-
* hold there, so the ssh lane is SINGLE-USER ONLY (same gate as host) —
|
|
24
|
+
* hold there, so the ssh lane is SINGLE-USER ONLY (same gate as host) — the deployment-shape row `sandboxSendUserFile`.
|
|
25
25
|
*
|
|
26
26
|
* The presigned PUT URL is a capability secret: it never enters model context (the tool returns delivery
|
|
27
27
|
* metadata only) and is REDACTED from every error surfaced from here (curl stderr may echo the URL).
|
|
@@ -74,23 +74,6 @@ export declare class TaskEnvRegistry {
|
|
|
74
74
|
* here forever; the bounded-size backstop covers any remaining no-destroy crash path. */
|
|
75
75
|
wrapFactory(factory: ExecutionEnvFactory): ExecutionEnvFactory;
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Which REMOTE_EXEC lanes may register the sandbox-send TaskEnvRegistry (and thus mount the sandbox-lane
|
|
79
|
-
* SendUserFile source), under which tenancy gate. The judgment per lane (2026-07-14 ssh backfill review):
|
|
80
|
-
*
|
|
81
|
-
* - e2b / k8s: one task = one disposable sandbox; the sandbox filesystem IS the tenant's task workspace,
|
|
82
|
-
* so a sandbox-scoped read is tenant-scoped by construction → open to any tenant.
|
|
83
|
-
* - ssh: the peer is ONE persistent real machine SHARED across tasks (factory ignores ctx: every task
|
|
84
|
-
* gets the same host+mountPath; destroy=disconnect only, files persist). Tenant A's task can read the
|
|
85
|
-
* residue of tenant B's task → the isolation premise FAILS. Multi-tenant here would be an
|
|
86
|
-
* arbitrary-host-path-read → public-URL exfil face, so the lane opens ONLY single-user
|
|
87
|
-
* (`requirePrincipal !== true`), the exact gate the host lane uses. NOT a lane to "fix later with a
|
|
88
|
-
* per-task workspace": tasks legitimately operate outside any workspace on a real host ([ref] —
|
|
89
|
-
* batch deployment), so per-task dirs would not restore the boundary anyway.
|
|
90
|
-
* - adb / local-docker / host / unset: no registry (host+unset use the local-fs source in main.ts;
|
|
91
|
-
* adb/local-docker remain a follow-on).
|
|
92
|
-
*/
|
|
93
|
-
export declare function sandboxSendLaneEnabled(provider: string | undefined, requirePrincipal: boolean): boolean;
|
|
94
77
|
/** Strip the capability URL (and any SigV4 signature) from text before it reaches an error/log — including
|
|
95
78
|
* the percent-encoded forms an adapter may echo (the k8s exec transport carries the command in a request
|
|
96
79
|
* URI, so an error can quote the URL re-encoded; codex review MED). */
|
|
@@ -79,13 +79,6 @@ export class TaskEnvRegistry {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
export function sandboxSendLaneEnabled(provider, requirePrincipal) {
|
|
83
|
-
if (provider === "e2b" || provider === "k8s")
|
|
84
|
-
return true;
|
|
85
|
-
if (provider === "ssh")
|
|
86
|
-
return requirePrincipal !== true;
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
82
|
export function redactPutUrl(text, url) {
|
|
90
83
|
return text
|
|
91
84
|
.split(url)
|