@sema-agent/server 7.134.0 → 7.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +197 -1
- package/USAGE.md +147 -42
- package/deploy/sema-up/README.md +1 -1
- package/deploy/sema-up/chart/templates/NOTES.txt +1 -1
- package/deploy/sema-up/chart/values.yaml +1 -1
- package/dist/adoption/plan.d.ts +1 -1
- package/dist/approval-ask-audit-store.d.ts +24 -24
- package/dist/approval-ask-machine.d.ts +2 -2
- package/dist/approval-card.d.ts +122 -154
- package/dist/approval-card.js +50 -51
- package/dist/approval-content-kind.d.ts +23 -5
- package/dist/approval-content-kind.js +8 -1
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval-gate-currency.d.ts +22 -3
- package/dist/approval-gate-currency.js +44 -18
- package/dist/approval-hmac.d.ts +7 -7
- package/dist/approval-policy-settlement.d.ts +2 -2
- package/dist/approval-reconciler.d.ts +3 -3
- package/dist/approval.d.ts +8 -8
- package/dist/approval.js +4 -2
- package/dist/auth-bridge.d.ts +35 -6
- package/dist/auth-bridge.js +20 -3
- package/dist/auto-mode-face.d.ts +4 -4
- package/dist/background-session-reap.d.ts +2 -2
- package/dist/bake-runner/main.d.ts +2 -2
- package/dist/bake-runner/runner.d.ts +4 -4
- package/dist/bench/s1/live-deps.d.ts +1 -1
- package/dist/bench/s1/run-firm.d.ts +1 -1
- package/dist/boot/budget-tracing.d.ts +1 -2
- package/dist/boot/budget-tracing.js +2 -2
- package/dist/boot/coordinators.d.ts +2 -2
- package/dist/boot/coordinators.js +2 -2
- package/dist/boot/deferred-sandbox-path-env.d.ts +0 -6
- package/dist/boot/deferred-sandbox-path-env.js +0 -5
- package/dist/boot/engine-lease.d.ts +5 -5
- package/dist/boot/execution-env.d.ts +16 -15
- package/dist/boot/execution-env.js +19 -21
- package/dist/boot/fatal-exit.d.ts +2 -2
- package/dist/boot/late-binds.d.ts +1 -1
- package/dist/boot/leader.d.ts +1 -1
- package/dist/boot/memory-boundary.d.ts +2 -2
- package/dist/boot/memory-consolidation.d.ts +15 -15
- package/dist/boot/org-memory.js +1 -1
- package/dist/boot/parked-revive-gate.d.ts +3 -3
- package/dist/boot/parked-revive-gate.js +3 -2
- package/dist/boot/reapers.d.ts +4 -4
- package/dist/boot/resolve-spec.d.ts +1 -1
- package/dist/boot/resolve-spec.js +36 -29
- package/dist/boot/runner-deps.d.ts +11 -11
- package/dist/boot/runner-deps.js +7 -4
- package/dist/boot/session-faces.d.ts +3 -3
- package/dist/boot/session-faces.js +11 -30
- package/dist/boot/shutdown.d.ts +5 -5
- package/dist/boot/side-query-lane.d.ts +2 -2
- package/dist/boot/stage-04-stores.d.ts +1 -1
- package/dist/boot/stage-05-execution-env.d.ts +1 -1
- package/dist/boot/stage-05-execution-env.js +4 -4
- package/dist/boot/stage-06-runners.d.ts +1 -1
- package/dist/boot/stage-06-runners.js +0 -2
- package/dist/boot/stage-07-capability-layer.d.ts +1 -1
- package/dist/boot/stage-08-reapers.d.ts +1 -1
- package/dist/boot/stage-09-leader.d.ts +1 -1
- package/dist/boot/stage-10-http-server.d.ts +1 -1
- package/dist/boot/stores.js +4 -4
- package/dist/boot/web-admin.d.ts +17 -17
- package/dist/boot/web-admin.js +15 -27
- package/dist/boot/workflow-orchestration.js +2 -9
- package/dist/brain.d.ts +11 -11
- package/dist/brain.js +12 -3
- package/dist/budget.d.ts +7 -7
- package/dist/budget.js +4 -0
- package/dist/capabilities/approvals-push.d.ts +4 -4
- package/dist/capabilities/builtin-tools.d.ts +5 -5
- package/dist/capabilities/center-plugins.d.ts +5 -5
- package/dist/capabilities/center-plugins.js +1 -1
- package/dist/capabilities/center-prompts.d.ts +1 -1
- package/dist/capabilities/center-wiring.d.ts +1 -1
- package/dist/capabilities/composite-members.d.ts +1 -1
- package/dist/capabilities/execution-lane.d.ts +5 -5
- package/dist/capabilities/execution-lane.js +2 -2
- package/dist/capabilities/hands-lane.d.ts +5 -5
- package/dist/capabilities/mcp-probe.d.ts +11 -7
- package/dist/capabilities/sandbox-file-send.d.ts +1 -18
- package/dist/capabilities/sandbox-file-send.js +0 -7
- package/dist/capabilities/scenarios.d.ts +28 -10
- package/dist/capabilities/scenarios.js +15 -5
- package/dist/capabilities/send-user-file-tool.d.ts +1 -1
- package/dist/capabilities/skills.d.ts +31 -12
- package/dist/capabilities/skills.js +23 -17
- package/dist/capabilities/tool-defer.d.ts +1 -1
- package/dist/capability-facts.d.ts +29 -32
- package/dist/capability-facts.js +17 -21
- package/dist/center-config-tier.d.ts +1 -1
- package/dist/center-credential.d.ts +22 -8
- package/dist/center-credential.js +18 -3
- package/dist/checkpoint-identity.d.ts +5 -0
- package/dist/checkpoint-identity.js +14 -0
- package/dist/config-catalog.d.ts +12 -12
- package/dist/config-catalog.js +12 -10
- package/dist/config-d-migration.js +1 -1
- package/dist/config-invariants.d.ts +5 -5
- package/dist/config-invariants.js +11 -2
- package/dist/config-lkg.d.ts +1 -39
- package/dist/config-lkg.js +1 -83
- package/dist/config-provider.d.ts +13 -13
- package/dist/config-provider.js +2 -1
- package/dist/config-types.d.ts +95 -87
- package/dist/config.d.ts +26 -24
- package/dist/config.js +38 -18
- package/dist/cross-session-settings.d.ts +1 -1
- package/dist/delegated-session-owner.d.ts +16 -13
- package/dist/delegated-session-owner.js +9 -10
- package/dist/deployment-governance.d.ts +16 -16
- package/dist/deployment-shape.d.ts +127 -0
- package/dist/deployment-shape.js +72 -0
- package/dist/device-store.d.ts +1 -1
- package/dist/device-ws-hub.d.ts +1 -1
- package/dist/egress-redirect.d.ts +1 -1
- package/dist/elicitation.d.ts +8 -7
- package/dist/elicitation.js +9 -8
- package/dist/entry-mode-clamp-notice.d.ts +2 -2
- package/dist/env-facts.d.ts +10 -9
- package/dist/env-facts.js +1 -1
- package/dist/env-name-allowlist-knobs.d.ts +5 -5
- package/dist/exec-bounds.d.ts +2 -2
- package/dist/execution-lane-caps.d.ts +31 -43
- package/dist/execution-lane-caps.js +0 -13
- package/dist/file-history-capture.d.ts +9 -9
- package/dist/file-history-disclosure.d.ts +25 -11
- package/dist/file-history-disclosure.js +25 -14
- package/dist/fleet/drain-entry.d.ts +2 -2
- package/dist/fleet/fleet-bus.d.ts +22 -14
- package/dist/fleet/fleet-bus.js +5 -5
- package/dist/fleet/fleet-reconciler.d.ts +9 -9
- package/dist/fleet/subagent-tail-bus.d.ts +4 -4
- package/dist/fleet-client.d.ts +45 -14
- package/dist/fleet-client.js +24 -4
- package/dist/fleet-lease.d.ts +23 -19
- package/dist/fleet-lease.js +31 -23
- package/dist/governance-http-status.d.ts +2 -2
- package/dist/hooks/hook-llm.d.ts +7 -7
- package/dist/hooks/hook-llm.js +14 -8
- package/dist/hooks/hook-runner.d.ts +58 -31
- package/dist/hooks/hook-runner.js +37 -19
- package/dist/host-decision.d.ts +5 -5
- package/dist/host-lsp-manager.d.ts +5 -5
- package/dist/hosted-posture.d.ts +23 -13
- package/dist/hosted-posture.js +4 -9
- package/dist/http/admission.d.ts +2 -2
- package/dist/http/admission.js +20 -5
- package/dist/http/approval-sweeps.d.ts +1 -1
- package/dist/http/approval-sweeps.js +2 -1
- package/dist/http/checkpoint-ctx.d.ts +62 -17
- package/dist/http/checkpoint-ctx.js +78 -35
- package/dist/http/dispatch.d.ts +3 -3
- package/dist/http/dispatch.js +9 -9
- package/dist/http/durable-run-leg.js +4 -3
- package/dist/http/idempotency.d.ts +2 -2
- package/dist/http/mcp-dial-deadline.d.ts +7 -5
- package/dist/http/memory-compliance-failure-reply.d.ts +4 -4
- package/dist/http/owner-access.d.ts +4 -6
- package/dist/http/owner-access.js +1 -1
- package/dist/http/principal-gate.d.ts +7 -7
- package/dist/http/principal-gate.js +3 -2
- package/dist/http/readiness.d.ts +1 -1
- package/dist/http/request-guards.d.ts +4 -4
- package/dist/http/request-guards.js +2 -1
- package/dist/http/resume-ctx-read.d.ts +9 -23
- package/dist/http/resume-ctx-read.js +2 -3
- package/dist/http/resume-legs.d.ts +3 -3
- package/dist/http/resume-legs.js +11 -8
- package/dist/http/route-ctx.d.ts +29 -29
- package/dist/http/route-table.d.ts +9 -9
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/approvals-assistant.d.ts +5 -7
- package/dist/http/routes/approvals-assistant.js +101 -26
- package/dist/http/routes/background.d.ts +3 -3
- package/dist/http/routes/background.js +2 -2
- package/dist/http/routes/capabilities.d.ts +1 -1
- package/dist/http/routes/capabilities.js +16 -8
- package/dist/http/routes/config-catalog.d.ts +1 -1
- package/dist/http/routes/devices.d.ts +1 -1
- package/dist/http/routes/diagnostics.d.ts +3 -3
- package/dist/http/routes/fleet.d.ts +1 -1
- package/dist/http/routes/fleet.js +2 -1
- package/dist/http/routes/mcp-reconnect.d.ts +4 -4
- package/dist/http/routes/mcp-reconnect.js +3 -3
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/notify-wake.d.ts +1 -1
- package/dist/http/routes/notify-wake.js +2 -2
- package/dist/http/routes/rules.d.ts +1 -1
- package/dist/http/routes/runs.js +23 -11
- package/dist/http/routes/session-sync.d.ts +1 -1
- package/dist/http/routes/session-sync.js +97 -46
- package/dist/http/routes/sessions-list.js +1 -1
- package/dist/http/routes/sessions.js +43 -53
- package/dist/http/routes/tasks.d.ts +1 -1
- package/dist/http/routes/trace-usage.d.ts +1 -1
- package/dist/http/routes/workflows.d.ts +3 -0
- package/dist/http/routes/workflows.js +31 -28
- package/dist/http/send.d.ts +5 -5
- package/dist/http/server.d.ts +34 -34
- package/dist/http/session-inherit-env.d.ts +3 -3
- package/dist/http/sse-lifecycle.d.ts +1 -1
- package/dist/http/sse-log.d.ts +2 -2
- package/dist/http/submit-ctx.js +1 -1
- package/dist/http/sync-submit-body.d.ts +1 -1
- package/dist/http/verify-rounds.d.ts +1 -1
- package/dist/http/wire-types.d.ts +33 -24
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/instruction-source-notice.d.ts +2 -2
- package/dist/key-resolver.d.ts +3 -3
- package/dist/lane-home-probe.d.ts +1 -1
- package/dist/leader/diffout.d.ts +1 -1
- package/dist/leader/diffup.d.ts +2 -2
- package/dist/leader/endpoint.d.ts +1 -1
- package/dist/leader/fanout.d.ts +1 -1
- package/dist/leader/leader.d.ts +4 -4
- package/dist/leader/merge.d.ts +3 -3
- package/dist/leader/repair-wire.d.ts +1 -1
- package/dist/leader/wire.d.ts +6 -6
- package/dist/list-entry-display.d.ts +1 -1
- package/dist/lsp-evict.d.ts +1 -1
- package/dist/mcp-assertion-header.d.ts +1 -1
- package/dist/memory-layer-legacy-lock.d.ts +1 -1
- package/dist/memory-operator-faces.d.ts +1 -1
- package/dist/memory-posture.js +4 -2
- package/dist/memory-project-layer.d.ts +1 -1
- package/dist/memory-scope.d.ts +19 -19
- package/dist/memory-store-refusal.d.ts +4 -4
- package/dist/model-entry-headers.d.ts +2 -2
- package/dist/model-entry-refusal.d.ts +17 -17
- package/dist/model-provider.d.ts +10 -10
- package/dist/model-reach-scope.d.ts +1 -1
- package/dist/model-route-endpoint.d.ts +6 -6
- package/dist/model-route-gap.d.ts +49 -4
- package/dist/model-route-gap.js +34 -1
- package/dist/model-route-url.d.ts +5 -5
- package/dist/model-select.d.ts +15 -6
- package/dist/model-select.js +5 -0
- package/dist/model-unreachable-notice.d.ts +3 -3
- package/dist/namespaced-rule-name.d.ts +15 -5
- package/dist/namespaced-rule-name.js +3 -2
- package/dist/object-store-buckets.d.ts +13 -0
- package/dist/object-store-buckets.js +3 -0
- package/dist/observability/corrupt-read-seat.d.ts +9 -9
- package/dist/observability/cost-taxonomy.d.ts +1 -1
- package/dist/observability/err-text.d.ts +1 -1
- package/dist/observability/fail-open.d.ts +17 -13
- package/dist/observability/fail-open.js +17 -13
- package/dist/observability/metrics.d.ts +3 -3
- package/dist/observability/metrics.js +1 -1
- package/dist/observability/principal-context.d.ts +4 -1
- package/dist/observability/principal-context.js +6 -1
- package/dist/observability/run-terminal.d.ts +36 -36
- package/dist/observability/secret-env-scrub.d.ts +3 -3
- package/dist/observability/tool-trace.d.ts +1 -1
- package/dist/operator-ask.d.ts +4 -4
- package/dist/orchestration/workflow-agent-session-index.d.ts +3 -3
- package/dist/orchestration/workflow-completion-inbox.d.ts +20 -5
- package/dist/orchestration/workflow-completion-inbox.js +29 -7
- package/dist/orchestration/workflow-notify-journal.d.ts +43 -19
- package/dist/orchestration/workflow-notify-journal.js +17 -0
- package/dist/outbound-dispatcher.d.ts +4 -4
- package/dist/parent-watch.d.ts +4 -4
- package/dist/parked-decide.d.ts +20 -18
- package/dist/parked-decide.js +31 -11
- package/dist/parked-revive-surface.d.ts +7 -7
- package/dist/parked-revive-surface.js +2 -3
- package/dist/peer-directory.d.ts +5 -4
- package/dist/peer-directory.js +6 -6
- package/dist/permission-rule-list.d.ts +10 -1
- package/dist/permission-rule-list.js +7 -5
- package/dist/permission-rule-vocab.d.ts +2 -2
- package/dist/plugins/adoption-log-sql.d.ts +1 -1
- package/dist/plugins/approval-ask-store-file.d.ts +8 -1
- package/dist/plugins/approval-ask-store-file.js +6 -3
- package/dist/plugins/approval-ask-store-memory.d.ts +11 -7
- package/dist/plugins/approval-ask-store-memory.js +11 -7
- package/dist/plugins/approval-ask-store-sql.d.ts +42 -15
- package/dist/plugins/approval-ask-store-sql.js +21 -5
- package/dist/plugins/approval-exemption-store.d.ts +3 -3
- package/dist/plugins/approval-nonce-store.d.ts +3 -3
- package/dist/plugins/background-agent-store-sql.d.ts +1 -1
- package/dist/plugins/background-shell-support.d.ts +2 -2
- package/dist/plugins/blob-backend.d.ts +1 -1
- package/dist/plugins/blob-backend.js +2 -1
- package/dist/plugins/caching-session-store.d.ts +23 -32
- package/dist/plugins/caching-session-store.js +5 -17
- package/dist/plugins/checkpoint-index-columns.d.ts +130 -0
- package/dist/plugins/checkpoint-index-columns.js +90 -0
- package/dist/plugins/checkpoint-store-sql.d.ts +71 -69
- package/dist/plugins/checkpoint-store-sql.js +109 -127
- package/dist/plugins/device-store-sql.d.ts +7 -6
- package/dist/plugins/e2b-orphan-reclaim.d.ts +1 -1
- package/dist/plugins/ensure-schema-lock-policy.d.ts +1 -1
- package/dist/plugins/file-history-store-sql.d.ts +15 -7
- package/dist/plugins/file-history-store-sql.js +55 -36
- package/dist/plugins/file-run-store.d.ts +8 -8
- package/dist/plugins/fork-routing-session-store.d.ts +2 -2
- package/dist/plugins/fork-routing-session-store.js +1 -1
- package/dist/plugins/host-platform.d.ts +10 -10
- package/dist/plugins/image-bake-store-sql.d.ts +1 -1
- package/dist/plugins/image-index-sql.d.ts +1 -1
- package/dist/plugins/leader-run-store-sql.d.ts +1 -1
- package/dist/plugins/local-checkpoint-store.d.ts +10 -10
- package/dist/plugins/local-checkpoint-store.js +7 -7
- package/dist/plugins/local-session-store.d.ts +34 -38
- package/dist/plugins/local-session-store.js +20 -39
- package/dist/plugins/local-session-window.d.ts +1 -1
- package/dist/plugins/mailbox-store-sql.d.ts +2 -2
- package/dist/plugins/memory-engine-pg.d.ts +1 -1
- package/dist/plugins/memory-run-store.d.ts +4 -4
- package/dist/plugins/memory-sync-store-pg.d.ts +3 -3
- package/dist/plugins/one-time-migrations.d.ts +73 -54
- package/dist/plugins/one-time-migrations.js +131 -134
- package/dist/plugins/outcome-ledger-sql.d.ts +1 -1
- package/dist/plugins/park-commit-watch.d.ts +3 -3
- package/dist/plugins/permission-rule-store-file.d.ts +5 -5
- package/dist/plugins/permission-rule-store-file.js +12 -19
- package/dist/plugins/permission-rule-store-sql.d.ts +38 -4
- package/dist/plugins/permission-rule-store-sql.js +67 -24
- package/dist/plugins/pg-cost-quota.d.ts +1 -1
- package/dist/plugins/pg-pool.d.ts +2 -2
- package/dist/plugins/pg-pool.js +5 -2
- package/dist/plugins/pg-rate-limiter.d.ts +1 -1
- package/dist/plugins/pg-session-storage.d.ts +8 -20
- package/dist/plugins/pg-session-storage.js +14 -27
- package/dist/plugins/remote-env-adb.d.ts +10 -10
- package/dist/plugins/remote-env-device.d.ts +10 -9
- package/dist/plugins/remote-env-device.js +6 -2
- package/dist/plugins/remote-env-e2b.d.ts +3 -3
- package/dist/plugins/remote-env-host.d.ts +16 -16
- package/dist/plugins/remote-env-k8s.d.ts +26 -13
- package/dist/plugins/remote-env-k8s.js +24 -7
- package/dist/plugins/remote-env-local-docker.d.ts +2 -2
- package/dist/plugins/remote-env-ssh.d.ts +4 -4
- package/dist/plugins/remote-scratchpad.d.ts +2 -3
- package/dist/plugins/remote-scratchpad.js +0 -4
- package/dist/plugins/remote-shell.d.ts +6 -6
- package/dist/plugins/retention-lane-store-sql.d.ts +4 -4
- package/dist/plugins/retention-store-sql.d.ts +4 -4
- package/dist/plugins/roster-store-sql.d.ts +1 -1
- package/dist/plugins/run-store-sql.d.ts +8 -8
- package/dist/plugins/s3-answer.d.ts +15 -0
- package/dist/plugins/s3-answer.js +5 -0
- package/dist/plugins/schema-consistency.d.ts +2 -2
- package/dist/plugins/schema-ensure-legs.d.ts +3 -3
- package/dist/plugins/schema-indexes.d.ts +1 -1
- package/dist/plugins/schema-live-columns.d.ts +1 -1
- package/dist/plugins/session-event-payload.d.ts +4 -4
- package/dist/plugins/session-fork.d.ts +34 -0
- package/dist/plugins/session-fork.js +29 -0
- package/dist/plugins/session-ownership.js +1 -1
- package/dist/plugins/session-placement.d.ts +1 -1
- package/dist/plugins/session-policy-store-sql.d.ts +12 -12
- package/dist/plugins/session-store.d.ts +2 -2
- package/dist/plugins/session-store.js +2 -2
- package/dist/plugins/shared-memory-store-sql.d.ts +2 -2
- package/dist/plugins/snapshot-bucket-presence.d.ts +39 -4
- package/dist/plugins/snapshot-bucket-presence.js +35 -7
- package/dist/plugins/sql-driver.d.ts +8 -8
- package/dist/plugins/sql-errors.d.ts +40 -1
- package/dist/plugins/sql-errors.js +49 -1
- package/dist/plugins/sql-json-column.d.ts +21 -21
- package/dist/plugins/sql-row-helpers.d.ts +2 -2
- package/dist/plugins/store-backend.d.ts +17 -16
- package/dist/plugins/store-backend.js +3 -3
- package/dist/plugins/store-contracts.d.ts +21 -21
- package/dist/plugins/store-fault.d.ts +4 -0
- package/dist/plugins/store-fault.js +8 -0
- package/dist/plugins/task-attachment-store.d.ts +2 -2
- package/dist/plugins/task-list-store-sql.d.ts +1 -1
- package/dist/plugins/tidb-pool.d.ts +2 -2
- package/dist/plugins/tidb-pool.js +10 -3
- package/dist/plugins/tidb-session-store.d.ts +16 -26
- package/dist/plugins/tidb-session-store.js +15 -27
- package/dist/plugins/tool-result-store-sql.d.ts +1 -1
- package/dist/plugins/usage-window-store-sql.d.ts +3 -3
- package/dist/plugins/user-input-ledger-file.d.ts +1 -1
- package/dist/plugins/user-input-ledger-sql.d.ts +3 -3
- package/dist/plugins/web-search.d.ts +19 -5
- package/dist/plugins/web-search.js +20 -5
- package/dist/{orchestration/workflow-journal-entry.d.ts → plugins/workflow-journal-payload.d.ts} +23 -32
- package/dist/plugins/workflow-journal-payload.js +32 -0
- package/dist/plugins/workflow-journal-store-sql.d.ts +28 -14
- package/dist/plugins/workflow-journal-store-sql.js +34 -15
- package/dist/plugins/workflow-run-store-sql.d.ts +4 -4
- package/dist/posture-source.d.ts +11 -11
- package/dist/principal-jwt.d.ts +6 -6
- package/dist/project-identity.d.ts +3 -3
- package/dist/project-memory.d.ts +4 -4
- package/dist/read-face-posture.d.ts +7 -7
- package/dist/request-declaration-refusal.d.ts +94 -0
- package/dist/request-declaration-refusal.js +78 -0
- package/dist/request-image-urls.d.ts +6 -0
- package/dist/request-image-urls.js +27 -0
- package/dist/request-key-closure.d.ts +6 -1
- package/dist/request-key-closure.js +5 -2
- package/dist/request-value-closure.d.ts +15 -8
- package/dist/request-value-closure.js +2 -0
- package/dist/router/route-orchestration.d.ts +11 -16
- package/dist/router/route-orchestration.js +2 -12
- package/dist/rule-entry-list.d.ts +8 -7
- package/dist/rule-entry-list.js +2 -9
- package/dist/rules-consent.d.ts +6 -6
- package/dist/rules-consent.js +2 -0
- package/dist/run-cancel-context.d.ts +5 -5
- package/dist/run-local.d.ts +10 -10
- package/dist/runs.d.ts +13 -11
- package/dist/runs.js +15 -1
- package/dist/runtime-caps-resolver.d.ts +6 -6
- package/dist/runtime-caps-resolver.js +1 -1
- package/dist/runtime-governance.d.ts +9 -9
- package/dist/sandbox-pkg-source.d.ts +17 -12
- package/dist/sandbox-pkg-source.js +14 -9
- package/dist/sealed-key.d.ts +22 -3
- package/dist/sealed-key.js +47 -4
- package/dist/security.d.ts +23 -26
- package/dist/security.js +12 -9
- package/dist/server-secret-env.d.ts +10 -10
- package/dist/session-children-retire.d.ts +1 -1
- package/dist/session-error-wire.d.ts +7 -7
- package/dist/session-incarnation.d.ts +65 -37
- package/dist/session-incarnation.js +30 -12
- package/dist/session-policy-wire.d.ts +27 -5
- package/dist/session-policy-wire.js +15 -1
- package/dist/session-records-skipped-notice.d.ts +1 -1
- package/dist/session-row.d.ts +3 -17
- package/dist/session-row.js +4 -0
- package/dist/session-sync-kernel.d.ts +4 -4
- package/dist/session-sync.d.ts +61 -6
- package/dist/session-sync.js +55 -10
- package/dist/session-titler.d.ts +7 -6
- package/dist/session-titler.js +8 -13
- package/dist/session-watch.d.ts +3 -3
- package/dist/session-watch.js +4 -4
- package/dist/sighup-idle.d.ts +2 -2
- package/dist/spec-fields.d.ts +4 -4
- package/dist/sql-engine-posture.d.ts +3 -3
- package/dist/store-posture.d.ts +2 -2
- package/dist/stored-request-tool-axes-m19.d.ts +1 -1
- package/dist/task-a2a.d.ts +52 -79
- package/dist/task-a2a.js +224 -62
- package/dist/task-cwd.d.ts +7 -88
- package/dist/task-cwd.js +2 -15
- package/dist/task-mcp.d.ts +13 -17
- package/dist/task-mcp.js +29 -49
- package/dist/task-settings.d.ts +30 -18
- package/dist/task-settings.js +33 -3
- package/dist/task-workflow.d.ts +0 -24
- package/dist/task-workflow.js +2 -1
- package/dist/terminal.d.ts +5 -5
- package/dist/tighten-only-seats.d.ts +7 -6
- package/dist/tighten-only-seats.js +1 -1
- package/dist/tool-approval.d.ts +166 -207
- package/dist/tool-approval.js +61 -61
- package/dist/tool-rule-names.d.ts +2 -2
- package/dist/trace/core-keyset-guard.d.ts +13 -8
- package/dist/trace/engine-notice-wire.d.ts +5 -5
- package/dist/trace/engine-notice-wire.js +1 -0
- package/dist/trace/exit-seat.d.ts +31 -4
- package/dist/trace/exit-seat.js +69 -67
- package/dist/trace/ledger-events.d.ts +3 -3
- package/dist/trace/ledger-sink.d.ts +1 -1
- package/dist/trace/model-segment.d.ts +3 -3
- package/dist/trace/project.d.ts +47 -45
- package/dist/trace/project.js +33 -1
- package/dist/trace/redact.d.ts +61 -31
- package/dist/trace/redact.js +394 -153
- package/dist/trace/self-minted-wire.d.ts +302 -14
- package/dist/trace/self-minted-wire.js +87 -0
- package/dist/trace/sema-provenance.d.ts +1 -1
- package/dist/trace/task-notification-facets.d.ts +4 -4
- package/dist/trace/wire-projection-faces.d.ts +3 -3
- package/dist/trace/wire-projection-faces.js +1 -1
- package/dist/unattended-permission-mode.d.ts +5 -5
- package/dist/url-credential-refusal.d.ts +52 -0
- package/dist/url-credential-refusal.js +14 -0
- package/dist/url-refusal.d.ts +16 -3
- package/dist/url-refusal.js +15 -2
- package/dist/usage-analytics.d.ts +2 -2
- package/dist/user-input-ledger.d.ts +23 -23
- package/dist/web-admin-client/apply-effective.d.ts +5 -5
- package/dist/web-admin-client/apply-effective.js +2 -1
- package/dist/web-admin-client/apply-ledger.d.ts +2 -2
- package/dist/web-admin-client/center-request.d.ts +2 -2
- package/dist/web-admin-client/facade.d.ts +5 -5
- package/dist/web-admin-client/facade.js +1 -1
- package/dist/web-admin-client/hot-keys-registry.d.ts +2 -2
- package/dist/web-admin-client/http-client.d.ts +4 -4
- package/dist/web-admin-client/mcp-revocation.d.ts +1 -1
- package/dist/web-admin-client/pull-state.d.ts +1 -1
- package/dist/web-admin-client/read-face.d.ts +2 -2
- package/dist/web-admin-client/read-warnings.d.ts +5 -5
- package/dist/web-admin-client/restart-signal.d.ts +6 -6
- package/dist/web-admin-client/skills-mcp.d.ts +28 -3
- package/dist/web-admin-client/skills-mcp.js +29 -1
- package/dist/web-admin-client/types.d.ts +16 -9
- package/dist/workspace-space.d.ts +32 -3
- package/dist/workspace-space.js +26 -0
- package/dist/write-protection.d.ts +2 -2
- package/package.json +5 -3
- package/scripts/drain-check-local.mjs +4 -2
- package/scripts/drain-check.mysql.sql +6 -2
- package/scripts/drain-check.pg.sql +6 -2
- package/skills/loop.md +1 -1
- package/skills/schedule.md +1 -1
- package/wire-changes/server@7.104.0.json +134 -0
- package/wire-changes/server@7.105.0.json +53 -0
- package/wire-changes/server@7.106.0.json +475 -0
- package/wire-changes/server@7.107.0.json +64 -0
- package/wire-changes/server@7.108.0.json +153 -0
- package/wire-changes/server@7.109.0.json +46 -0
- package/wire-changes/server@7.110.0.json +90 -0
- package/wire-changes/server@7.111.0.json +86 -0
- package/wire-changes/server@7.112.0.json +60 -0
- package/wire-changes/server@7.113.0.json +26 -0
- package/wire-changes/server@7.114.0.json +26 -0
- package/wire-changes/server@7.115.0.json +97 -0
- package/wire-changes/server@7.116.0.json +218 -0
- package/wire-changes/server@7.116.1.json +26 -0
- package/wire-changes/server@7.117.0.json +65 -0
- package/wire-changes/server@7.118.0.json +129 -0
- package/wire-changes/server@7.119.0.json +65 -0
- package/wire-changes/server@7.120.0.json +89 -0
- package/wire-changes/server@7.121.0.json +219 -0
- package/wire-changes/server@7.122.0.json +54 -0
- package/wire-changes/server@7.123.0.json +26 -0
- package/wire-changes/server@7.124.0.json +336 -0
- package/wire-changes/server@7.124.1.json +26 -0
- package/wire-changes/server@7.125.0.json +111 -0
- package/wire-changes/server@7.126.0.json +285 -0
- package/wire-changes/server@7.127.0.json +77 -0
- package/wire-changes/server@7.127.1.json +26 -0
- package/wire-changes/server@7.127.2.json +53 -0
- package/wire-changes/server@7.128.0.json +26 -0
- package/wire-changes/server@7.129.0.json +106 -0
- package/wire-changes/server@7.129.1.json +26 -0
- package/wire-changes/server@7.130.0.json +26 -0
- package/wire-changes/server@7.131.0.json +118 -0
- package/wire-changes/server@7.132.0.json +226 -0
- package/wire-changes/server@7.133.0.json +1155 -0
- package/wire-changes/server@7.134.0.json +107 -0
- package/wire-changes/server@7.135.0.json +174 -0
- package/wire-changes/server@7.136.0.json +448 -0
- package/dist/http/run-declared-families.d.ts +0 -16
- package/dist/http/run-declared-families.js +0 -12
- package/dist/orchestration/workflow-journal-entry.js +0 -27
package/dist/http/send.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare const SSE_MAX_STREAM_MS: number;
|
|
|
51
51
|
*/
|
|
52
52
|
export declare const SSE_HEARTBEAT_IDLE_MS = 15000;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* [ref] —— 服务端**主动**收一条已开的 SSE 流:一帧 `event: error`(帧形与流帽那一帧同一套 `{type:"error", errorCode, message}`,
|
|
55
55
|
* 消费端按既有「服务端收流 ⇒ 重连」协议处置,SDK 的流读口把它当一帧事件交出再重连)后 `end()`。
|
|
56
56
|
*
|
|
57
57
|
* 收流的是分派器,不是流自己的泵:泵此刻可能正停在一次 await 上,醒来还会写一帧。Node 上 `end()` 之后、`close` 之前的那一写会发一个
|
|
@@ -102,25 +102,25 @@ export declare function httpErrorBody(e: HttpError): RefusalBody;
|
|
|
102
102
|
/** 整面拒:状态 = `e.status`,体 = {@link httpErrorBody}。手里拿着一只 `HttpError` 的路由站点一律调它。 */
|
|
103
103
|
export declare function sendHttpError(res: ServerResponse, e: HttpError): void;
|
|
104
104
|
/**
|
|
105
|
-
* 🔴 B1 /
|
|
105
|
+
* 🔴 B1 / [ref] —— `SessionPolicyError` → 应答,经 {@link sessionPolicyErrorHttp} 那**一只**映射
|
|
106
106
|
* (`src/session-policy-wire.ts`)。回 `true` = 已应答,调用点 `return`。
|
|
107
107
|
*
|
|
108
108
|
* 为什么是一只共享腿而不是每个站点一句 `instanceof`:映射本身早就收成一处了,而**咨询它的站点**只有两条
|
|
109
109
|
* **写**腿 —— 偏偏 core 7.25.0 那个新词 `corrupt` 是在**读**上抛出来的(店读不出它自己写的那一行:
|
|
110
|
-
*
|
|
110
|
+
* [ref] 的两道读回拒 + C1 的体形拒)。于是 `GET /v1/sessions/:id/policy` 与 2c 的 manifest 导出腿把它交给了
|
|
111
111
|
* 域外通用臂 ⇒ `500 internal.error "internal error"`:码丢,连带**修复路径**也丢(同一行 `PUT` 却答
|
|
112
112
|
* `500 corrupt` 并点名那一列)。一只腿之后,新站点只会忘记调它,不会再各自发明一份映射。
|
|
113
113
|
*/
|
|
114
114
|
export declare function sendSessionPolicyError(res: ServerResponse, e: unknown, sentencePrefix?: string): boolean;
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
116
|
+
* [ref] —— core `SessionError` → 应答,经 {@link sessionErrorHttp} 那**一只**映射(`src/session-error-wire.ts`)。
|
|
117
117
|
* 回 `true` = 已应答,调用点 `return`;`false` = 不是 `SessionError`,或这个词在这一面上是登记过的留白(站点的既有
|
|
118
118
|
* 处置照旧 —— 通常是继续上抛到全局兜底)。
|
|
119
119
|
*
|
|
120
120
|
* 句子:属主给了固定句就发它(import 面 `invalid_session` / `placement_refused` 两句),否则发 core 的原句过既有脱敏(`redactErrorMessage`:
|
|
121
121
|
* 不抛、有上限)。core 的 `corrupt_session` 原句只点名会话 id 与跳过计数(「Session <id> is unreadable: its log has no
|
|
122
122
|
* meta header (N of M records skipped as corrupt)」),SQL 两店的原句点名 `<表>.<列>` 与行号 —— 两者都不含盘上路径
|
|
123
|
-
* (路径只进运维面:`server.session-repo.corrupt-record-skipped` 的探针行,
|
|
123
|
+
* (路径只进运维面:`server.session-repo.corrupt-record-skipped` 的探针行,[ref];SQL 两店走各自的拒绝句)。
|
|
124
124
|
*/
|
|
125
125
|
export declare function sendSessionError(res: ServerResponse, e: unknown, face: SessionErrorFace): boolean;
|
|
126
126
|
export declare function msg(e: unknown): string;
|
package/dist/http/server.d.ts
CHANGED
|
@@ -95,14 +95,14 @@ export interface ServiceCoreDeps {
|
|
|
95
95
|
* `boot/resolve-spec.ts` 的 `declaresInteractivePosture`)。缺席/false ⇒ 无人腿,不声明 posture ——
|
|
96
96
|
* bg(`POST /v1/runs`)、A2A、resume、cron/wake 一律走这一侧,行为字节不变。
|
|
97
97
|
* ⚠️ 它是**腿身份**不是能力表态:绝不从请求体读,只由路由装配点按 URL 定(客户端说了不算)。 */
|
|
98
|
-
/** `opts.onNotice` (
|
|
98
|
+
/** `opts.onNotice` ([ref], core 7.9.1):装配期铸下的、**这条会话**的用户面通告(今天只有一族:请求腿
|
|
99
99
|
* MCP 注入被丢弃)。装配跑在通告腿开口**之前**(`prepareSpec` → 路由注册 `registerEngineNoticeLeg`),
|
|
100
100
|
* 所以它不能在铸点直接 `route()` ——收下来交给调用腿,由腿在开口那一拍连同 `pending` 一起投。
|
|
101
101
|
* 缺席(桩)⇒ 只走结构化日志终点,行为逐字不变。
|
|
102
102
|
* ⚠️ 7.69.0(R-1)起 **resume 家族也递这一位** —— 四条 resume 腿收敛到 `resolveResumeSpec` 一只 resolver,
|
|
103
103
|
* 通告口接一次、四腿同得(见 http/server.ts 的 `resolveResumeSpec` 顶注);此处旧注写作「resume 家族缺席」
|
|
104
104
|
* 已过期,按新行为改。
|
|
105
|
-
* `opts.unattendedLeg`(
|
|
105
|
+
* `opts.unattendedLeg`([ref] 候裁 18,codex r3 F1;[ref] ① 改形):续跑家族在 ctx 带无人值守标(`CheckpointCtx.unattendedLeg`)时递 `true` ——
|
|
106
106
|
* 装配器在**全部折叠之后**经首跑同一只合并口 `withUnattendedLeg` 重挂那条腿(`default` + 按类作答的 onAsk)。只由续跑腿
|
|
107
107
|
* 按服务端写的 ctx 位递,绝不从请求体读。 */
|
|
108
108
|
resolveSpec: (body: TaskRequestBody, req: IncomingMessage | undefined, auth?: RequestAuth, opts?: {
|
|
@@ -115,8 +115,8 @@ export interface ServiceCoreDeps {
|
|
|
115
115
|
* [ref] 场景 hands lane 选路:按 `resolveSpec` 刚产出的 TaskSpec 取本任务的执行 Runner。
|
|
116
116
|
* 装配点(`boot/stage-10-http-server.ts`)传的是 `createHandsRunnerSelector` —— 选路规则只有那一份实现,
|
|
117
117
|
* 本层不解释场景,只取用。
|
|
118
|
-
* 🔴 **必填**(
|
|
119
|
-
* (带全量手的主 Runner)。而同一轴上「车道**字段**缺席」早已是拒(
|
|
118
|
+
* 🔴 **必填**([ref],7.105.0):修前这一席可选,缺席 ⇒ 静默落 {@link ServiceDeps.runner} —— 最宽的那只
|
|
119
|
+
* (带全量手的主 Runner)。而同一轴上「车道**字段**缺席」早已是拒([ref],`handsLaneOf` 抛
|
|
120
120
|
* `HandsLaneUnstampedError`),席缺席回落最宽 = 同一件事两条律。现在缺席是**编译错**;绕过类型
|
|
121
121
|
* (JS 嵌入方 / `as` 硬转)造的 deps 在 {@link createHttpServer} 入口**拒启**。单 Runner 的嵌入方显式传
|
|
122
122
|
* `runnerFor: () => runner` —— 那是一句表态,不是一个回落。
|
|
@@ -146,14 +146,14 @@ export interface ServiceStoreDeps {
|
|
|
146
146
|
/** Per-session approval exemption store — enables decide body `remember:"session"` + the
|
|
147
147
|
* exemptions list/revoke surfaces on /v1/approvals. The ask-gate probe is wired separately (main.ts). */
|
|
148
148
|
approvalExemptionStore?: ApprovalExemptionStore;
|
|
149
|
-
/**
|
|
149
|
+
/** [ref]:直连门审批证明的**一次性消费记录**(`plan_review` 的 nonce)。每条 store 车道都供,所以在任何
|
|
150
150
|
* `DB_BACKEND` 上都在场;缺席只出现在装配缝(桩 deps)—— 那时直连门的 plan_review **拒**(501,见
|
|
151
151
|
* `routes/approvals-assistant.ts` 的消费点),绝不静默受理一份结构上可重放的证明。BFF 门不读这只店。 */
|
|
152
152
|
approvalNonceStore?: ApprovalNonceStore;
|
|
153
153
|
/** Durable-checkpoint store ([ref], core 1.67): durable F4 suspend/resume. When present, the resume
|
|
154
154
|
* endpoint + suspended-run surfacing are active. Set only when DURABLE_APPROVAL + a TiDB pool. */
|
|
155
155
|
checkpointStore?: CheckpointStoreFull;
|
|
156
|
-
/**
|
|
156
|
+
/** [ref]:停驻行凭据的**封签器**(`sealed-key.ts` `ensureCheckpointCtxSealing`,这一域自己的保管店 `<数据根>/sealed-key/checkpoint-ctx-keys/`;规则属主 = `checkpoint-ctx.ts` 末段
|
|
157
157
|
* 「凭据位密封」)。提交体里请求面凭据位上的值在 `checkpoint_ctx` 里只以封签存在:写 ctx 的每一笔经它封、续跑上下文读口经它开。
|
|
158
158
|
* 🔴 **与 `checkpointStore` 同在**:店在而它缺席 ⇒ `createHttpServer` 拒启(句子 = `CHECKPOINT_CTX_SEALING_REQUIRED`)—— 凭据只以封签落盘,
|
|
159
159
|
* 封不了就不落,没有「明文照写」的第二种装配。嵌入方:`checkpointCtxSealing: await ensureCheckpointCtxSealing(sealedKeyDir)`
|
|
@@ -172,7 +172,7 @@ export interface ServiceStoreDeps {
|
|
|
172
172
|
/** [ref] per-edited-file rewind history store. Present ⇒ the rewind capabilities are advertised; core uses it
|
|
173
173
|
* via RunnerDeps.fileHistoryStore (first-touch tracking + per-turn boundaries + tracked-set restore, ANY
|
|
174
174
|
* env). Also the 2c history-transfer store (exportHistory/importHistory + blob negotiation faces).
|
|
175
|
-
* 🔴
|
|
175
|
+
* 🔴 [ref]:这是装配单点 `assembleFileHistory` 的**店**(后端在即在,与 `FILE_HISTORY_CAPTURE` 无关 —— 旋钮只关捕获,
|
|
176
176
|
* 落在 core 的 `RunnerDeps.fileHistoryCapture` 上)。rewind 族四位与 2c sync 路由族跟它走;能力词 `fileHistoryCapture`
|
|
177
177
|
* = `fileHistoryCaptureOf(本键, config.fileHistoryCapture)`(与 core 捕获位同一只判定)。
|
|
178
178
|
* 擦除(E21 / 孤儿 blob GC)不读本键,读 boot 侧的擦除脸。 */
|
|
@@ -209,7 +209,7 @@ export interface ServiceStoreDeps {
|
|
|
209
209
|
* (subscribeWorkflow) and works whenever self-orchestration is on, store or not. Runs are owner-gated by
|
|
210
210
|
* `scope` (= the creating principal). Also drives `capabilities.workflowsList` (= "can durably LIST runs"). */
|
|
211
211
|
workflowRunStore?: WorkflowRunStore;
|
|
212
|
-
/**
|
|
212
|
+
/** [ref] 车CM:workflow 出身 park 的**有界 join** 索引 —— 与 `workflowRunStore` **成对**才构成第三条
|
|
213
213
|
* 车道(索引只回答「去哪条 run 找」,行本体与赎回键仍以 run 的 blob 为准)。与 RunnerDeps 侧同实例
|
|
214
214
|
* (boot/workflow-orchestration.ts);任一缺席 = 那条车道不存在(workflow 出身的 park 落 legacy 腿,
|
|
215
215
|
* 与本批之前逐字同形)。契约与单写者纪律的属主 = orchestration/workflow-agent-session-index.ts。 */
|
|
@@ -236,8 +236,8 @@ export interface ServiceStoreDeps {
|
|
|
236
236
|
/** SendUserFile 账本(多租户治理面):scope↔object 映射的读面 GET /v1/sendfile-links。present ⇔ 签发面
|
|
237
237
|
* 已配 AND 有 store backend(main.ts 建;写点在两条 send lane 的 withLedgerRecording)。 */
|
|
238
238
|
sendFileLedger?: import("../plugins/send-file-ledger.js").SendFileLedger;
|
|
239
|
-
/**
|
|
240
|
-
* 在场 ⇔ 有 store backend(生产恒与 `runStore` 同源于 backend)。消费点:steer 的 live 腿 / interrupt{text} / 同步子代的 steer(
|
|
239
|
+
/** [ref] 用户输入受理账本(「200 applied」受理的影子;单写者 = `src/user-input-ledger.ts` 的活对象,boot 装配在 stage-07 并跑一次收敛)。
|
|
240
|
+
* 在场 ⇔ 有 store backend(生产恒与 `runStore` 同源于 backend)。消费点:steer 的 live 腿 / interrupt{text} / 同步子代的 steer([ref])受理前写 `accepted`(写不进 ⇒ 503
|
|
241
241
|
* `steering.ledger_unavailable`)、三条 run 腿开通告口那一拍铸 `crashed` 通告并在收场时 settle、`GET /v1/sessions/:id` 的
|
|
242
242
|
* `userInputUndrained` 读面。缺席只出现在不接 backend 的 stub-harness 上(那时没有这一面,行为与修前逐字相同)。 */
|
|
243
243
|
userInputLedger?: import("../user-input-ledger.js").UserInputLedger;
|
|
@@ -311,8 +311,8 @@ export interface ServiceCoordinatorDeps {
|
|
|
311
311
|
* 对它做**有界**等待(3s cap,routes/fleet.ts),SIGKILL 后壳重连不再与 recover 赛跑。缺席或已
|
|
312
312
|
* resolve=立即组装(memory 后端、无 notify gate 的部署);main.ts 铸(recover 收官即落,失败也落)。 */
|
|
313
313
|
fleetRecoveryDone?: Promise<void>;
|
|
314
|
-
/** [ref] session-watch registry(SSE 订阅共享探针面)。present ⇔ sessionStorage
|
|
315
|
-
* (
|
|
314
|
+
/** [ref] session-watch registry(SSE 订阅共享探针面)。present ⇔ sessionStorage 有按 id 的头读 `headOf`(属主 + 叶子一次读)
|
|
315
|
+
* (装配期建);absent ⇒ /v1/sessions/:id/events 501(capabilities.sessionEvents 同谓词,永不漂)。 */
|
|
316
316
|
sessionWatch?: import("../session-watch.js").SessionWatchRegistry;
|
|
317
317
|
/** asyncRewake wake 管道 holder(main.ts 建壳,server 启动装 deliver=session→本副本活流 steer)。 */
|
|
318
318
|
hookWakeBus?: {
|
|
@@ -353,7 +353,7 @@ export interface ServiceSeamDeps {
|
|
|
353
353
|
*/
|
|
354
354
|
deviceStore?: import("../device-store.js").DeviceStore;
|
|
355
355
|
/**
|
|
356
|
-
*
|
|
356
|
+
* [ref](车C 余件):device lane 的**准入链**(`createDeviceEnrollment`)—— 管理面三个写动词
|
|
357
357
|
* (签发 / 注册 / 吊销)与首绑写协议(`commitPlacement`)的**唯一**判据属主。
|
|
358
358
|
*
|
|
359
359
|
* 🔴 为什么路由拿的是它而不是 {@link deviceStore}:enrollment 那一层持着两件路由造不出来的东西 ——
|
|
@@ -366,7 +366,7 @@ export interface ServiceSeamDeps {
|
|
|
366
366
|
*/
|
|
367
367
|
deviceEnrollment?: import("../device-enrollment.js").DeviceEnrollment;
|
|
368
368
|
/**
|
|
369
|
-
*
|
|
369
|
+
* [ref] × 7.106.0 合并复审 X1:host 车道会话登记簿的 `inheritEnv` **写口**(`boot/execution-env.ts` 的 `setSessionInheritEnv`)。
|
|
370
370
|
* 唯一调用者 = `http/session-inherit-env.ts` 的 `commitSessionInheritEnv`(四个 run 认领点在认领之后调;判据与残余见那只文件)。
|
|
371
371
|
* 缺席 = 本部署不是 host 车道(没有工厂读这一格)⇒ 提交点 no-op。装配 = `boot/stage-10-http-server.ts`(host 车道才给)。
|
|
372
372
|
*/
|
|
@@ -381,7 +381,7 @@ export interface ServiceSeamDeps {
|
|
|
381
381
|
* run-ledger/checkpoint/tool-result rows, owner-guarded, in one call. Returns `{ deleted }` (idempotent) — or
|
|
382
382
|
* `{ active }` when the runs-ledger TX re-asserted a still-live run (a concurrent createRun raced the route's
|
|
383
383
|
* pre-check), which the route maps to 409. Enables DELETE /v1/sessions/:id. Wired by main.ts (all the stores). */
|
|
384
|
-
/** E21 删除协调器。三种结局:删了 / 有活跑(`{active}`,409 `conflict.session_active_run`)/
|
|
384
|
+
/** E21 删除协调器。三种结局:删了 / 有活跑(`{active}`,409 `conflict.session_active_run`)/ [ref]:以本会话为根的后台子代没停干净
|
|
385
385
|
* (`{childrenAlive}` = 仍活着的子代句柄,409 `conflict.session_children_alive` 的 `remaining[]`;会话记录不动)。 */
|
|
386
386
|
purgeSession?: (sessionId: string, owner: string | null) => Promise<{
|
|
387
387
|
deleted: boolean;
|
|
@@ -491,7 +491,7 @@ export interface ServiceSeamDeps {
|
|
|
491
491
|
status: (sessionId: string) => Promise<SessionMemoryStatus>;
|
|
492
492
|
};
|
|
493
493
|
/**
|
|
494
|
-
*
|
|
494
|
+
* [ref](core 7.22.0 [ref] W1)—— 本**部署**的自动整理武装事实,`GET /v1/sessions/:id/memory-status`
|
|
495
495
|
* 的 `autoConsolidationArmed` 格。
|
|
496
496
|
*
|
|
497
497
|
* 🔴 **唯一读法**:值必须由 core 的 `autoRunOnRecommendationEffective(RunnerDeps)` 组
|
|
@@ -505,7 +505,7 @@ export interface ServiceSeamDeps {
|
|
|
505
505
|
*/
|
|
506
506
|
memoryAutoConsolidationArmed: boolean;
|
|
507
507
|
/**
|
|
508
|
-
*
|
|
508
|
+
* [ref] / [ref] + 车PI 修复轮 ④ —— 记忆整理阀门的**生效判决**(boot 第 4 段 `createConsolidationValve`:显式词,或出厂缺省按
|
|
509
509
|
* 装配结果派生)。配置目录那一行(`GET /v1/config/catalog` 的 `MEMORY_CONSOLIDATION_DRIVER` `effectiveValue`)读它 —— 那一列的契约是
|
|
510
510
|
* 「本进程实际生效值」,而这根旋钮的生效值只有装配期才知道。🔴 **必填**:装配漏接 ⇒ tsc 红;测试桩在 `test/helpers/boot.ts` 显式给。
|
|
511
511
|
*/
|
|
@@ -544,7 +544,7 @@ export interface ServiceSeamDeps {
|
|
|
544
544
|
* 启用 `POST /v1/admin/memory/consolidation/run` 与 `GET /v1/admin/memory/consolidation`(两口 operator-only)。
|
|
545
545
|
* main.ts 把它接到 `createMemoryConsolidationFaces` 的产物上。
|
|
546
546
|
* 🔴 缺席的**唯一**成因是「阀门没开」(显式 `MEMORY_CONSOLIDATION_DRIVER=off`,或未设而出厂缺省派生成关 ——
|
|
547
|
-
*
|
|
547
|
+
* [ref] / [ref]:整理座落主模型 / 结构上跑不起来;判决属主 `boot/memory-consolidation.ts` `resolveConsolidationValve`):
|
|
548
548
|
* 阀门开着却结构上跑不了的三种形(引擎没接线 / 后端没有控制面归属 / `MEMORY_PROVENANCE=off`)在
|
|
549
549
|
* **启动期**就被拒了(`boot/memory-consolidation.ts`),那些机器根本起不来。⇒ 缺席形是 **404 族**
|
|
550
550
|
* (整域不挂),刻意**不是** 501:501 说「换部署形态」,这里的动作是「把旋钮打开」。全文见
|
|
@@ -605,7 +605,7 @@ export interface ServiceSeamDeps {
|
|
|
605
605
|
};
|
|
606
606
|
};
|
|
607
607
|
}) => void;
|
|
608
|
-
/**
|
|
608
|
+
/** [ref](core 7.32.0):parked 赎回面工厂(按行解析驱动哪只 Agent 工具 + 同出一张列表的继承座;属主 `parked-revive-surface.ts`)。
|
|
609
609
|
* 缺席 = 这台部署没有 park 底座(checkpointStore / backgroundAgentStore 任一缺席),bg 赎回臂不接线。 */
|
|
610
610
|
parkedReviveSurface?: import("../parked-revive-surface.js").ParkedReviveSurfaceFactory;
|
|
611
611
|
/** 可选第三件:revive args 的 `subagent_type` roster 成员集([ref] Q1 成员性规则)。当前生产装配
|
|
@@ -687,12 +687,12 @@ export interface ServiceDeploymentDeps {
|
|
|
687
687
|
* main.ts passes the effective store label (`durable(pg)` / `durable(mysql)` / `durable(local)` / "memory",
|
|
688
688
|
* same derivation as the boot `listening` log). Absent → fall back to the raw config enum. */
|
|
689
689
|
sessionStoreLabel?: string;
|
|
690
|
-
/** S5 →
|
|
690
|
+
/** S5 → [ref] ①:持久化姿态的**唯一**装配值(`store-posture.ts`,`boot/stores.ts` 铸):`/health` 的 `storeDegraded` / `durable:false`
|
|
691
691
|
* (present-iff `degradedReason` 在场)与 caps `store` 同读它,gauge `store_backend_degraded` 在装配点读同一只。
|
|
692
692
|
* 缺席 = 这个进程不是由 composition root 装起来的(测试夹具形)⇒ `/health` 不带降级位、caps `store` 取诚实下限
|
|
693
693
|
* (`declared` = 配置词,`backend:"memory"` —— 本面不知道任何装出来的后端)。 */
|
|
694
694
|
storePosture?: import("../store-posture.js").StorePosture;
|
|
695
|
-
/**
|
|
695
|
+
/** [ref] ②:caps `centerWiring` 的读面(`capabilities/center-wiring.ts` `createCenterWiringReader`;入参 = 请求的已验 principal)。
|
|
696
696
|
* 缺席 = 没接中心(或测试夹具)⇒ 键整个缺席。 */
|
|
697
697
|
centerWiring?: (principal: string | undefined) => import("../capabilities/center-wiring.js").CenterWiring;
|
|
698
698
|
/**
|
|
@@ -707,7 +707,7 @@ export interface ServiceDeploymentDeps {
|
|
|
707
707
|
* • [ref]:`attachedStreams` 同样 ASSIGNED BY createServer —— 本副本当前打开着的 SSE 流条数
|
|
708
708
|
* (= 引擎附着租约集的大小)。消费方是 `boot/engine-lease.ts` 的自退判据;与 `inflight` 同族,
|
|
709
709
|
* 同一个共享盒子,不另开第二条 main↔server 的通道。
|
|
710
|
-
* •
|
|
710
|
+
* • [ref]:`inflight` 只数**工作** —— 只读订阅流(路由表 `subscription` 列的八条 GET SSE 读面)不进 admission 计数,只进
|
|
711
711
|
* `attachedStreams`;`endSubscriptions`(同样 ASSIGNED BY createServer)发 `draining` 终帧后关掉它们,收尾链在排空进入那一拍与
|
|
712
712
|
* 硬停起点各调一次。
|
|
713
713
|
*/
|
|
@@ -724,7 +724,7 @@ export interface ServiceDeploymentDeps {
|
|
|
724
724
|
* changes (skills/mcp/a2a/scenarios/… baked at boot — the `RestartSlice` closed set) that DIFFER from this process's boot config.
|
|
725
725
|
* Surfaced at GET /health as `restartRequired` + `restart{reasons,version,since}` so the orchestrator can
|
|
726
726
|
* auto rolling-restart the worker. Change-detected (not presence) — absent when nothing baked-at-boot
|
|
727
|
-
* changed, so polling it never causes a restart loop.
|
|
727
|
+
* changed, so polling it never causes a restart loop. [ref]:the fleet heartbeat reads THIS getter too
|
|
728
728
|
* (`boot/stage-10-http-server.ts` → `restart: () => deployment.restartState?.()`), so `/health.restart` and the
|
|
729
729
|
* announcement's `restart` are the same object — one mint point, two exits. */
|
|
730
730
|
restartState?: () => RestartSignal | undefined;
|
|
@@ -733,18 +733,18 @@ export interface ServiceDeploymentDeps {
|
|
|
733
733
|
* (按组的 appliedVersion / deferredKeys+铸因 / lastRejected 消毒形)。缺席 = 这个进程没有配置管道
|
|
734
734
|
* (纯 env 部署 / 测试夹具)⇒ 两个面的形状逐字不变(additive)。 */
|
|
735
735
|
configApplyState?: () => import("../web-admin-client/apply-ledger.js").ConfigApplyLedgerView | undefined;
|
|
736
|
-
/**
|
|
736
|
+
/** [ref]:中心凭证健康位(`/health.centerCredential`)—— 凭证来源的健康态 + 续签器状态(`center-credential-renewer.ts`
|
|
737
737
|
* `buildCenterCredentialHealthView` 铸形,只有闭集词 / 时刻 / 计数,不带路径与令牌)。缺席 / 返回 undefined = 健康或没有中心
|
|
738
738
|
* ⇒ `/health` 形状逐字不变(additive)。 */
|
|
739
739
|
centerCredentialState?: () => import("../center-credential-renewer.js").CenterCredentialHealthView | undefined;
|
|
740
|
-
/**
|
|
740
|
+
/** [ref]:`/health.centerIdentityNotice` —— 中心凭证换人后的**最近一条**两态通告(`center-config-tier.ts` 铸:`{ code, message, at }`,码闭集两词、句冻结)。取值口交出的
|
|
741
741
|
* 就是 wire 形,`/health` 不另投影;无鉴权面,只有码 / 冻结句 / 时刻。缺席 / 返回 undefined = 从未换过人或没有中心 ⇒ `/health` 形状逐字不变(additive)。 */
|
|
742
742
|
centerIdentityNoticeState?: () => import("../center-config-tier.js").CenterIdentityNotice | undefined;
|
|
743
|
-
/**
|
|
743
|
+
/** [ref]:模型拒因信号(`/health.modelRefusals`,settings-schema 6.2.0 `ModelRefusalsSignal` 形:名 → 码 + 组拒码)。fleet 心跳读**这同一只**
|
|
744
744
|
* (`boot/stage-10-http-server.ts` → `modelRefusals: () => deployment.modelRefusalsState?.()`)—— 一处铸、两出口。缺席 / 返回 undefined =
|
|
745
745
|
* 没有可报的拒或没有配置管道 ⇒ `/health` 形状逐字不变(additive)。 */
|
|
746
746
|
modelRefusalsState?: () => import("@sema-agent/settings-schema").ModelRefusalsSignal | undefined;
|
|
747
|
-
/**
|
|
747
|
+
/** [ref]:`GET /v1/models.candidateRejected` 的取值口 —— 最近一次配置候选被判官整拒的结论(`boot/stage-10-http-server.ts` →
|
|
748
748
|
* `candidateRejectionState: () => webAdmin.candidateRejectionState()`;座 = web-admin 的 `candidateRejection`,`config_candidate_rejected` 日志行的去重键读同一份)。
|
|
749
749
|
* present-iff 当前生效配置是因候选被拒而回落的那一份;缺席 / 返回 undefined = 没有被拒的候选或没有配置管道 ⇒ `GET /v1/models` 不出该键(additive)。 */
|
|
750
750
|
candidateRejectionState?: () => import("../web-admin-client/candidate-gate.js").CandidateRejection | undefined;
|
|
@@ -791,10 +791,10 @@ export interface ServiceDeploymentDeps {
|
|
|
791
791
|
* `GET /v1/capabilities` 的 `memoryEngine` 位(窄投影)。缺席 = 这个进程不是由 composition root 装
|
|
792
792
|
* 起来的(测试夹具形)⇒ 诊断面报 null、能力位取诚实下限 false。 */
|
|
793
793
|
memoryPosture?: import("../memory-posture.js").MemoryPosture;
|
|
794
|
-
/**
|
|
794
|
+
/** [ref]:SQL **引擎读口**(`sql-engine-posture.ts` 的单一推导点 —— boot 期借一条池连接触发驱动的连接初始化,交回本池的驱动:
|
|
795
795
|
* `dialect`(SQL 文本轴,恒在)+ 活的 `facts`(`SET` 之后**回读复核**过的真值;池重连后驱动会重新初始化并刷新,快照会说谎)。
|
|
796
796
|
* 读者:`GET /v1/diagnostics/wiring` 的 `sqlEngine` 段(operator-only,全量含版本与两堵墙)与 `GET /v1/capabilities` 的 `store.sql` 位(窄投影;
|
|
797
|
-
* 7.106.0 前是顶层 `sql`,
|
|
797
|
+
* 7.106.0 前是顶层 `sql`,[ref] ①)读 `facts`;提交受理口的 413 把整只读口交给唯一判官 `sql-driver.ts` `sqlWallsOf`(墙的方言只从这里来(与事实同出一只驱动),不另从店后端读);其中包墙是连接级事实 ——
|
|
798
798
|
* 这里的包墙是最近一次初始化的那条连接的读数,受理口那一腿是同一只规则的提前一跑,终判在将要执行写入的那条连接上(`sql-driver.ts` `connectJudged`;SQL 快照 blob 的店判与 `PUT /sync/blobs` 的 413 来自它)。
|
|
799
799
|
* 两种缺席、两个值:**席缺席** = 本部署没有 SQL 后端(env-only worker、local 文件后端);**`facts` 是 `null`** = 有 SQL 后端、但事实此刻没建立
|
|
800
800
|
* (池上最近一次连接初始化被拒,驱动当场作废了事实)。两者在两个读面上都报缺席(诚实缺席,不铸空壳);墙按方言读后者(MySQL 协议 ⇒ 最保守的假定墙)。
|
|
@@ -803,14 +803,14 @@ export interface ServiceDeploymentDeps {
|
|
|
803
803
|
* 本服务自己的装配(`boot/stores.ts` → `stage-10`)按同一个谓词(`sqlPoolsOf`)建立它,恒给。值形也在起服时判(同一只判官 `sqlEngineSeatIssue` 的另一臂):
|
|
804
804
|
* `{ dialect: "tidb" | "pg", facts }`,`facts` 是 `null` 或带 `maxRowBytes` / `maxPacketBytes` / `wallSources` 的引擎事实;只改了键名的 `() => facts` 之类 ⇒ 起服拒。 */
|
|
805
805
|
sqlEngine?: import("../plugins/sql-driver.js").SqlEngineReading;
|
|
806
|
-
/**
|
|
806
|
+
/** [ref]:**写保护名表**的姿态(`write-protection.ts` 的 boot 期单一推导点 —— 与递给每只 Runner 的
|
|
807
807
|
* `writeProtectedPaths` 座同一份 config 决定)。两个读面共用:`GET /v1/diagnostics/wiring` 的
|
|
808
808
|
* `writeProtection` 段(operator-only,**逐行**表 + 来源 + 被丢的缺省行名)与 `GET /v1/capabilities`
|
|
809
809
|
* 的 `writeProtection` 位(窄投影 `{armed, rows, replaced}`,**不含行内容**)。
|
|
810
810
|
* boot 期算一次的**存活对象**(纯 config 派生,运行期不变;core 座没有热改腿)。
|
|
811
811
|
* 缺席 = 这个进程不是由 composition root 装起来的(测试夹具形)⇒ 诊断面报 null、能力位报 null。 */
|
|
812
812
|
writeProtection?: import("../write-protection.js").WriteProtectionPosture;
|
|
813
|
-
/**
|
|
813
|
+
/** [ref]:**部署侧 WebSearch 后端**(`WEB_SEARCH_PROVIDER`)—— `GET /v1/capabilities` 的 `webSearch` 位的
|
|
814
814
|
* 唯一席位。值**逐字**取自 boot 期真正拿去造后端的那份 `webSearchConfigFromEnv()` 产物
|
|
815
815
|
* (`boot/stage-07-capability-layer.ts`),所以「能力位说 brave、装配里装的是 tavily」结构上不可能。
|
|
816
816
|
* 缺席 = 本部署没有搜索后端(未设 / 拼错 / 装配没喂席位)⇒ 窄投影报 `{backend:"none"}`;
|
|
@@ -818,7 +818,7 @@ export interface ServiceDeploymentDeps {
|
|
|
818
818
|
* ⚠️ 席位只承载**部署默认**:单用户车道上每请求的 `settings.webSearch` 压过它,但那条腿**不经过本席**
|
|
819
819
|
* (它在场景装配里每请求现算),所以本位不会随调用方漂。 */
|
|
820
820
|
webSearchProvider?: import("../plugins/web-search.js").WebSearchProvider;
|
|
821
|
-
/**
|
|
821
|
+
/** [ref]:本进程模型钥匙保管店的**公钥面** —— `GET /v1/capabilities` 的 `sealedKey` 段唯一席位。值**逐字**取自
|
|
822
822
|
* web-admin 运行时(`boot/web-admin.ts` 的 `sealedKeyPublic`,boot 期建的那一只店),路由里不再建店、不读全局。
|
|
823
823
|
* 类型只有最新那把公钥(`sealed-key.ts` `SealedKeyPublicFace`):私钥、保管路径、持有的旧 id 列表从这一层结构上够不着。
|
|
824
824
|
* 缺席 = 本进程没有保管店(boot 建店失败,或不是由 composition root 装起来的测试夹具形)⇒ caps 的 `sealedKey` 键缺席。 */
|
|
@@ -876,7 +876,7 @@ export declare function flattenServiceDeps(deps: ServiceDeps): FlatServiceDeps;
|
|
|
876
876
|
/**
|
|
877
877
|
* Managed-Agents-style HTTP/SSE service surface.
|
|
878
878
|
* GET /health
|
|
879
|
-
* GET /readyz → readiness probe: 200 {ready:true} / 503 {ready:false, reasons} (
|
|
879
|
+
* GET /readyz → readiness probe: 200 {ready:true} / 503 {ready:false, reasons} ([ref]; same predicate
|
|
880
880
|
* as /health.ready, the billable-submit 503s and the fleet heartbeat — http/readiness.ts)
|
|
881
881
|
* POST /v1/tasks → run to completion, TaskResult JSON (synchronous)
|
|
882
882
|
* POST /v1/tasks/stream → SSE of TaskEvent, live tokens (synchronous, same instance)
|
|
@@ -902,7 +902,7 @@ export declare function createHttpServer(rawDeps: ServiceDeps): http.Server & {
|
|
|
902
902
|
/** SSE: replay durable events after Last-Event-ID, then tail until the run is terminal (or stale). */
|
|
903
903
|
/**
|
|
904
904
|
* The differences a concrete log (task_run | image_bake) feeds the ONE resumable SSE reader (P2.8). Everything
|
|
905
|
-
* the reader does — Last-Event-ID/`?from=` resume (every row with seq > from; no eviction answer,
|
|
905
|
+
* the reader does — Last-Event-ID/`?from=` resume (every row with seq > from; no eviction answer, [ref] ①), the per-poll concurrent
|
|
906
906
|
* status+events read, the terminal re-fetch (the terminal event lands in the gap before the status flips), the
|
|
907
907
|
* stale fallback, the 15-min cap, the 15s idle heartbeat — is provider-agnostic and lives in `streamSseLog`.
|
|
908
908
|
* 🔴 The task_run provider MUST keep the existing wire bytes EXACTLY (center's relay + 730+ tests depend on it).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] × 7.106.0 合并复审 X1(gpt-6 腿 A F1 [high],验证腿 B verified)—— 请求键 `inheritEnv` 的**会话绑定唯一提交点**。
|
|
3
3
|
*
|
|
4
4
|
* ── 分界(与 `device-placement.ts` 的首绑写协议同一句判据)──────────────────────────────────────────────────
|
|
5
5
|
* 凡需要「这条会话此刻归我这条 run」才成立的事,排在 run 认领之后;其余全排在建任何东西之前。`inheritEnv` 的三道判
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
* 赢或 wake 新行建成之后)。无 run 店的部署没有认领这回事:调用点落在认领段**之后**的同一位置,等价于「起跑前、一切拒之后」。
|
|
15
15
|
* 写的值 = 受理时那条请求体的键(续跑腿 = 盘上那条体的键);缺席 = 清掉(缺省清洗;理由在 `setSessionInheritEnv` 顶注)。
|
|
16
16
|
*
|
|
17
|
-
* ── 残余(如实,
|
|
17
|
+
* ── 残余(如实,[ref])──────────────────────────────────────────────────────────────────────────────────────
|
|
18
18
|
* 登记簿仍按**会话**键控、host 工厂在 run 起跑那一刻现读(core `ExecutionEnvFactoryContext` 只带 sessionId / taskId,没有 per-run 座)。
|
|
19
19
|
* 有 run 店的部署上认领本身串行化同会话的 run(`task_active` 唯一键),「写 → 读」落在同一条认领窗里;没有 run 店的部署上同会话
|
|
20
20
|
* 并发受理的两条 run 仍是「最后写者赢」。续跑腿在 markResuming 赢之后写,core 的 pre-CAS 守卫(D-1 绑定 / 过期 token)之后才拒的续跑
|
|
21
|
-
* 已写下**那条 park 任务自己**盘上的值(不是别的请求的),下一条受理的 run 照写覆盖。根治 = core 的 per-run 座(
|
|
21
|
+
* 已写下**那条 park 任务自己**盘上的值(不是别的请求的),下一条受理的 run 照写覆盖。根治 = core 的 per-run 座([ref])。
|
|
22
22
|
* 射程只在单用户 host 部署(`"all"` 的射程门)⇒ 写者恒是同一主人。
|
|
23
23
|
*/
|
|
24
24
|
import type { TaskInheritEnv } from "../request-value-closure.js";
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* ## 为什么注册完还要回看一眼状态
|
|
34
34
|
*
|
|
35
35
|
* 光「订阅未来事件」不够:`'close'` **只发一次**,而四条腿的接线全都排在若干次 await 之后
|
|
36
|
-
* (trace 是 `getRun`,runs 是 subagent probe;sse-log 自
|
|
36
|
+
* (trace 是 `getRun`,runs 是 subagent probe;sse-log 自 [ref] ① 起写头前已无 await,此前是 `retainedFrom`)。客户端
|
|
37
37
|
* 在那段慢查询里断开 ⇒ 两个 close 都在监听器注册**之前**烧完(实测:后装的监听器不会被补发)⇒
|
|
38
38
|
* 清理整条不发生,泵对着死连接轮询到 15 分钟帽。这不是假想:`sse-log.ts` 的 preamble 注里记着的
|
|
39
39
|
* 同一个坑,当时只把 preamble 挪到了接线之后,而接线本身前面还有别的 await。
|
package/dist/http/sse-log.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface SseLogProvider<E extends {
|
|
|
33
33
|
* 一批**非账本**帧(今天唯一的用户 = 审批未决卡的全量对账基准)。
|
|
34
34
|
*
|
|
35
35
|
* 为什么是这里的内部 hook,而不是调用方在 `streamSseLog` **之前**自己写:写头是本 helper 的事,调用方
|
|
36
|
-
* 先调 `sseHeaders` 会被这里重复写头。(
|
|
36
|
+
* 先调 `sseHeaders` 会被这里重复写头。([ref] ① 之前本 helper 在写头之前还有一道 416 判定,那是这条
|
|
37
37
|
* 理由的另一半 —— 判定随「账本不存在局部头部裁剪」一起删了,见 {@link streamSseLog} 头注。)
|
|
38
38
|
*
|
|
39
39
|
* 返回帧**不带 `id:`** —— 它不是账本行,不参与 `Last-Event-ID` 游标(壳的规则:preamble 给的是
|
|
@@ -82,7 +82,7 @@ export declare function collectSsePreamble(preamble: (signal: AbortSignal) => Pr
|
|
|
82
82
|
/** The shared resumable SSE pump (P2.8) — provider supplies the log-specific differences; the liveness/
|
|
83
83
|
* heartbeat/terminal-re-fetch/15-min-cap logic is identical for task_run + image_bake.
|
|
84
84
|
*
|
|
85
|
-
* 🔴
|
|
85
|
+
* 🔴 [ref] ①:**没有「续读点已被淘汰」这一答**。两条日志都**没有局部头部裁剪腿** —— `task_event` 唯一的删除者
|
|
86
86
|
* 是整棵会话树连删(会话删除 / 托管留存,`task_run` 行同批消失 ⇒ 调用方开流前 404),`image_bake_event` 库里一条
|
|
87
87
|
* 删除语句都没有。此前这里按 `retainedFrom > from + 1` 答 416 `limit.retention_evicted`:真淘汰永远走不到它,
|
|
88
88
|
* 唯一走得到的形是「写失败耗掉了号」留下的**头部缺行**(ledger-sink 账本留洞)—— 那一形里什么都没被淘汰,416
|
package/dist/http/submit-ctx.js
CHANGED
|
@@ -8,7 +8,7 @@ function unsealableRefusal(e) {
|
|
|
8
8
|
status: 409,
|
|
9
9
|
body: refusalBody({
|
|
10
10
|
errorCode: "conflict.checkpoint_ctx_unsealable",
|
|
11
|
-
message: "this deployment cannot store this task's credentials (
|
|
11
|
+
message: "this deployment cannot store this task's credentials (static request headers, the command lines and environment values given to MCP stdio servers and command hooks, settings.env, or settings.webSearch.apiKey) for resuming it: they are kept only sealed, and this server has no sealed-key store — nothing was run; ask whoever operates this deployment to give the service a writable sealed-key directory (<data root>/sealed-key/), or submit the task without those credentials",
|
|
12
12
|
facts: { field: e.field, reason: e.reason },
|
|
13
13
|
}),
|
|
14
14
|
};
|
|
@@ -19,6 +19,6 @@ export declare function clampVerifyRounds(v: unknown): number;
|
|
|
19
19
|
/** `undefined` when `body.verify` is not `true` (the caller didn't opt into the gate); otherwise the clamped
|
|
20
20
|
* rounds + (if `maxCostUsd` is a positive number) the same USD→micro-USD cost ceiling the cascade lane uses.
|
|
21
21
|
* Same expression that lived inline at all four verify/resume call sites in http/server.ts (fresh-submit,
|
|
22
|
-
* resumeCheckpoint, resumePreempted, drivePlanReview — named resumePlanReview before
|
|
22
|
+
* resumeCheckpoint, resumePreempted, drivePlanReview — named resumePlanReview before [ref]) — collected here VERBATIM ([ref] R9). */
|
|
23
23
|
export declare function verifyRoundsFromBody(body: Pick<TaskRequestBody, "verify" | "verifyRounds" | "maxCostUsd">): VerifyRoundsSpec | undefined;
|
|
24
24
|
//# sourceMappingURL=verify-rounds.d.ts.map
|
|
@@ -77,6 +77,12 @@ export interface TaskRequestBody {
|
|
|
77
77
|
* 只在非缺省风格时声明。值形的属主是引擎(`{ name, turnReminder? }` 恰两键、`name` 非空且 ≤ `OUTPUT_STYLE_NAME_MAX`、`turnReminder` 在场即非空串):
|
|
78
78
|
* 本服务**不另判**,坏值在 prepare 被引擎拒 `config.output_style_invalid`(不会被静默忽略)。能力位 `outputStyle`。 */
|
|
79
79
|
outputStyle?: TaskSpec["outputStyle"];
|
|
80
|
+
/** 7.135.0(core 7.55.0):这一条 run 不读部署的项目上下文(引擎 `TaskSpec.projectMemory`,唯一的词 `"disabled"`):带这个词的腿引擎不调
|
|
81
|
+
* `RunnerDeps.loadProjectMemory` —— 项目层、声明的指令文件、它们喂的那几处一并缺席(引擎自己的 git 状态车道、记忆引擎、技能 / hooks / MCP 不受影响)。
|
|
82
|
+
* 原样投给引擎;拼写门与 `fileHistory` 同一张单成员关断词表(`request-value-closure.ts`:别的值 fresh 400 `request.field_invalid`、续跑重放同判),
|
|
83
|
+
* 引擎读到的恒是这一个词;子代随父继承(引擎的夹紧表)。
|
|
84
|
+
* 本服务自铸的 `wiring_manifest.instructions` 段在这样的腿上缺席(loader 没被调就没有陈述)。能力位 `projectMemory`。 */
|
|
85
|
+
projectMemory?: TaskSpec["projectMemory"];
|
|
80
86
|
/** Explicit model selection (CLI `/model` picker + `run --model <ref>`). An INTENT by catalog
|
|
81
87
|
* name (e.g. "deepseek-pro") — resolveSpec gates it against the SAME allow-list as an inline `@name` mention
|
|
82
88
|
* (config.models keys), so it picks WHICH configured model but can never inject one. Wins over an inline
|
|
@@ -112,7 +118,7 @@ export interface TaskRequestBody {
|
|
|
112
118
|
* content in the user's OWN principal-isolated task (self-harm surface, not privilege widening);
|
|
113
119
|
* scenario/center skills remain the only trusted layer.
|
|
114
120
|
*
|
|
115
|
-
* 🔴 **类型 = core 的 `SkillSpec` 本体,不是它的手抄子集**(
|
|
121
|
+
* 🔴 **类型 = core 的 `SkillSpec` 本体,不是它的手抄子集**([ref]):这里曾写死
|
|
116
122
|
* `{ name; description; content }` —— core 闭集六位里的三位,而 `manifest` / `files` / `baseDir`
|
|
117
123
|
* 三位在运行期一直是**收的**(受理门 `validateUserSkills` 不判未知键,`mergeUserSkills` 原样透传到
|
|
118
124
|
* `TaskSpec.skills`)。一份会漂的手抄 = 声明面比真受理面**窄**,SDK 消费方按声明写代码就以为发不了,
|
|
@@ -199,13 +205,13 @@ export interface TaskRequestBody {
|
|
|
199
205
|
* value is the same handle as `resumeAt` (the prompt's taskId); the service resolves it → the entry id. Honored ONLY
|
|
200
206
|
* when `resumeAt` is ABSENT (the two modes are mutually exclusive). Requires the anchor map + a FileHistoryStore. */
|
|
201
207
|
rewindFilesTo?: string;
|
|
202
|
-
/**
|
|
208
|
+
/** [ref](core 7.31.0 [ref] `TaskSpec.fileHistory`)—— 请求级的**文件历史关断词**,唯一词 `"disabled"`(core 的拼法,
|
|
203
209
|
* 与 `checkpointStore` 同;没有 `"enabled"` —— 缺席就是「部署说了算」的唯一形,声明只能单向收紧)。`"disabled"` ⇒
|
|
204
210
|
* 这条 run 零历史店调用:编辑照常落盘,但不做首次触碰备份、不铸回合边界、不做 fork 携带;委派出去的子代继承
|
|
205
211
|
* (core `ParentSpecSeat` 从本位铸,本仓零接线)。`wiring_manifest.fileHistory` 报 `"disabled"`。
|
|
206
212
|
* 同一个提交里再要还原(`restoreFiles` / `rewindFilesTo` / 退役 `rewindFiles`)= 体内矛盾 ⇒ **受理时** 400
|
|
207
213
|
* `request.field_conflict`(`request-value-closure.ts` 的 `FILE_HISTORY_DISABLED_NO_RESTORE`):立门时 core 的 `rewind.capture_disabled`
|
|
208
|
-
* 落在会话按 `resumeAt` 分叉之后、拒后不回滚,所以本层在副作用之前拒(
|
|
214
|
+
* 落在会话按 `resumeAt` 分叉之后、拒后不回滚,所以本层在副作用之前拒([ref] / core 7.35.0 [ref] 起 core 在分叉**之前**拒,
|
|
209
215
|
* 本层 400 照旧有效)。续跑腿不过这道门。
|
|
210
216
|
* ⚠️ 拼写门**两腿同判、响亮拒**:fresh 400 `request.field_invalid`;resume 重放同判(与 `memoryCapture` / `memory`
|
|
211
217
|
* 同一张单成员闭集表,`request-value-closure.ts` 的 `singleMemberOffFieldIssue`)。
|
|
@@ -240,7 +246,7 @@ export interface TaskRequestBody {
|
|
|
240
246
|
* core 默认开列表注入的通道)与三个 deadline opt-out 在类型面失踪。agentListing/skillsListing 是
|
|
241
247
|
* boolean 透传(core DEFAULT-ON,explicit false 才关);budgetUsd/mcpInstructions 只认 literal true;
|
|
242
248
|
* limits 三个 opt-out 只认 literal false(normalizer 同判)。 */
|
|
243
|
-
/** core 7.39.0
|
|
249
|
+
/** core 7.39.0 [ref]:`planModeReminder` 退役(硬破坏,零别名)—— 提交即 400 点名退役;plan 姿态由引擎从 `permissionMode:"plan"` 自己陈述。 */
|
|
244
250
|
attachments?: {
|
|
245
251
|
todoReminder?: boolean;
|
|
246
252
|
todoReminderMode?: "baseline" | "off";
|
|
@@ -261,7 +267,7 @@ export interface TaskRequestBody {
|
|
|
261
267
|
forwardSubagentEvents?: boolean;
|
|
262
268
|
/** G3([ref] 壳侧承诺③/[ref]③):壳供 per-session scratchpad 路径(壳 vendored getScratchpadDir 的
|
|
263
269
|
* 约定路径)。接受后优先于 server 自算,同源喂 envFacts.scratchpadDir 宣告(core 据它开根围栏的洞,
|
|
264
|
-
*
|
|
270
|
+
* [ref] 起是唯一写者,引擎的模式门也据它免问)—— 壳提示词与引擎的写根指同一个目录。验收 fail-closed(单用户 +
|
|
265
271
|
* host-semantics lane + 绝对路径/深度/长度门,规则在 env-facts.acceptShellScratchpadDir),拒收形
|
|
266
272
|
* warn 后回落自算——「没到货引擎忽略 = 无害 additive」的对偶:异形键忽略,任务照跑。 */
|
|
267
273
|
scratchpadDir?: string;
|
|
@@ -288,7 +294,7 @@ export interface TaskRequestBody {
|
|
|
288
294
|
* it takes the same single-user gate as backgroundShell/hooks (multi-tenant warns + ignores; advertised via
|
|
289
295
|
* capabilities.retainBackgroundProcesses). Boolean fail-loud at submit; only `true` rides the spec. */
|
|
290
296
|
retainBackgroundProcesses?: boolean;
|
|
291
|
-
/**
|
|
297
|
+
/** [ref](core 7.8.0 [ref] `TaskSpec.excludeAllTools`,cli [ref] / 板 [ref]): **整只工具面卸载**
|
|
292
298
|
* —— 调用方工具、脚手架、手、MCP、skills 一个都不挂,模型这一 run 里没有任何工具可调、终局是纯文本。
|
|
293
299
|
*
|
|
294
300
|
* 🔴 **与 {@link excludeTools} 是两种语义,刻意不折叠**:`"*"` 是一个合法的调用方工具名,所以「卸全部」
|
|
@@ -300,7 +306,7 @@ export interface TaskRequestBody {
|
|
|
300
306
|
* 探测:本键在不在受理面由**键闭集**自己回答 —— 没接线的 server 版本对它 400 `request.body_shape`
|
|
301
307
|
* 并逐字列名,所以**不加能力位**(一个键一条探测路,不长第二条)。 */
|
|
302
308
|
excludeAllTools?: boolean;
|
|
303
|
-
/**
|
|
309
|
+
/** [ref](cli [ref] 请托;CC 2.1.280 `--disable-slash-commands`「Disable all skills」,cli280.js:240760 整张命令表置空):
|
|
304
310
|
* **这一发一只技能都不装** —— 场景出厂技能(启动期烤入 + 中心下发)、调用方 `skills`、子代定义的 `agents[].skills`
|
|
305
311
|
* 一个都不进 `TaskSpec`。`true` ⇒ `TaskSpec.skills = []`(core 对空表:零 `<skills>` 块、`Skill` 工具不挂);
|
|
306
312
|
* `false` / 缺席 = 技能照旧。值形门与 {@link excludeAllTools} **同一只**(非 boolean ⇒ 400 `request.field_invalid`);
|
|
@@ -308,10 +314,11 @@ export interface TaskRequestBody {
|
|
|
308
314
|
* 续跑重放逐字重放存量体 ⇒ 同一只写点同判(坏形 defensive:只认 literal `true`)。无租户门(收窄,不跨租户)。
|
|
309
315
|
* 探测位 `GET /v1/capabilities` 的 `disableSkills`(与本键同一个词)。 */
|
|
310
316
|
disableSkills?: boolean;
|
|
311
|
-
/** core 7.41.0
|
|
317
|
+
/** core 7.41.0 [ref] —— **人用名字点过的技能**(壳从人敲的 `/name` 解析出来的,按 `SkillSpec.name`),原样交给 core 的
|
|
312
318
|
* `TaskSpec.userInvokedSkills`:这些技能的 `allowedTools` / `disallowedTools` 开跑即生效,不出 `Skill` 卡(人自己点的名就是那句表态),
|
|
313
319
|
* 只管这一次 run(steer 不终止它,下一次 run 不带)。每个名字必须是这一 run 装着的技能(场景出厂 ∪ 本请求 `skills`),否则引擎
|
|
314
|
-
* 拒启 `config.user_invoked_skill_unknown`(同步腿 400)
|
|
320
|
+
* 拒启 `config.user_invoked_skill_unknown`(同步腿 400)。场景出厂那一半的名字从场景卡读(`GET /v1/capabilities/scenarios/:name` 的 `skills[].name`,
|
|
321
|
+
* 能力位 `scenarioSkills`;[ref])—— 拒句里的名字是引擎的散文,不是契约。值形:非空串数组(受理门 400 `request.field_invalid`);续跑重放逐字重放存量体,
|
|
315
322
|
* 坏形不挂键。不投递技能正文(正文照旧由 `Skill` 工具 / 调用方负责)。 */
|
|
316
323
|
userInvokedSkills?: string[];
|
|
317
324
|
/** [ref]② (core 1.314 工具面控制批): roster 真卸载清单(schema 不上 wire,manifest 收窄)。wire 工具名;
|
|
@@ -319,7 +326,7 @@ export interface TaskRequestBody {
|
|
|
319
326
|
* 读成空的条目(退役拼法 `bash`、大小写孪生 `BASH`、任何工具名都不可能有的拼法、`*`)7.131.0 起受理口 400 `config.tool_face_control` 并点名现名
|
|
320
327
|
* (拒侧读成空 = 放行,不照跑);读得出的名字与真未知名(拼写合法、没有近似也没有退役对应)照收。 */
|
|
321
328
|
excludeTools?: string[];
|
|
322
|
-
/**
|
|
329
|
+
/** [ref](core 7.49.0 [ref],[ref]):引擎的**可用性选择器** —— 这一 run 只用列出的工具(wire 名、别名、`Tool(content)` 整只、
|
|
323
330
|
* `mcp__srv` / `mcp__srv__*` / 工具段通配;`"*"` = 本层不设名单;`[]` = 什么都不给)。宿主**原样透传**进 `TaskSpec.allowTools`:
|
|
324
331
|
* 不算补集、不过滤、不与 `settings.permissions.allow`(免问)混词;真未知名(拼写合法、没有近似也没有退役对应:懒挂载的合法形)照跑(原样保留,今天什么都不准,之后挂上同名工具即生效;引擎告知运维一次),
|
|
325
332
|
* 任何工具名都不可能有的拼法由引擎开跑前拒(`config.tool_face_control`,同步腿 400);7.131.0 起受理口另拒近似名(大小写孪生 `BASH`:想放的什么也没放 = 静默收窄,句子点名现名);
|
|
@@ -381,7 +388,7 @@ export interface TaskRequestBody {
|
|
|
381
388
|
* 记忆面暗的部署(引擎未接线 / 多租户)上本键随 `memory` 整体缺席而无处落 —— 那里本就零采集。
|
|
382
389
|
* Rides the persisted body onto resume legs(与 memoryWrite 同姿势)。 */
|
|
383
390
|
memoryCapture?: "off";
|
|
384
|
-
/** core [ref] r5 §5 W3(server
|
|
391
|
+
/** core [ref] r5 §5 W3(server [ref]):**请求级「记忆整面关」声明** —— `"off"` = 这一次运行**不挂记忆面**
|
|
385
392
|
* (没有 `# Memory` 段/索引/三只记忆工具/写准入)。单成员闭集,**没有** `"on"`(缺席就是记忆照常挂的唯一形;
|
|
386
393
|
* 声明只能单向收紧)。透传为 `TaskSpec.memory.enabled:false` —— ⚠️ **保留事实,不折成整键缺席**:core 的
|
|
387
394
|
* 终局观测面把「有 spec 但被关」读作 `reason:"disabled"`、把「没有 spec」读作 `reason:"no-spec"`,审计上
|
|
@@ -419,15 +426,15 @@ export interface TaskRequestBody {
|
|
|
419
426
|
projectId?: string;
|
|
420
427
|
/** [#40 / TOC cwd seam, SDK 0.0.36] The TOC client's launch directory — the agent's HOST execution-env workspace
|
|
421
428
|
* runs HERE (CC-parity: `sema` in a project dir operates on THAT project). An ABSOLUTE host path. 🔒 honored ONLY
|
|
422
|
-
* on the single-user `host` lane (
|
|
429
|
+
* on the single-user `host` lane or the `device` lane (deployment-shape row `callerCwd`); IGNORED on cloud/container lanes + multi-tenant host
|
|
423
430
|
* (a caller can't point a shared/cloud worker at an arbitrary host path). Validated absolute (prepareSpec 400s a
|
|
424
431
|
* relative cwd — it would silently resolve against the SERVICE process cwd). */
|
|
425
432
|
cwd?: string;
|
|
426
433
|
/**
|
|
427
|
-
*
|
|
434
|
+
* [ref](7.106.0,core [ref] [ref] ②)—— 模型驱动的 host shell **继承多少用户环境**,由调用方按请求声明。
|
|
428
435
|
* 闭集两词(词表外 ⇒ 400 `request.field_invalid`,两腿同判,判据属主 `request-value-closure.ts` 的 `inheritEnvFieldIssue`):
|
|
429
436
|
* · `"all"` —— 整份用户环境**减本服务自有凭据名**(配置目录 secret 名 / 名单型旋钮名 / 模型条目 `apiKeyEnv`,起服向引擎声明一次,判在引擎;7.129.0 起,CC 交互形);只在**单用户**部署兑现,射程 = 写容纳面那一只
|
|
430
|
-
* `
|
|
437
|
+
* 部署形表行 `taskHostPostureDeclarations`(`deployment-shape.ts`)⇒ 托管部署(`REQUIRE_PRINCIPAL=true`)响亮拒
|
|
431
438
|
* 422 `request.host_posture_refused`;
|
|
432
439
|
* · `"scrub"` —— 缺省清洗(剥凭据形变量),**任何车道、任何部署**都受理(它就是缺省;7.106.0 合并复审 X7)。
|
|
433
440
|
* **缺席 = 缺省清洗**:不带键的请求把本会话的绑定清掉(不继承上一条请求的声明 —— 这一位是「本条请求要什么」,
|
|
@@ -439,7 +446,7 @@ export interface TaskRequestBody {
|
|
|
439
446
|
*/
|
|
440
447
|
inheritEnv?: "all" | "scrub";
|
|
441
448
|
/**
|
|
442
|
-
*
|
|
449
|
+
* [ref](device lane 首绑写协议,design `device-executor-lane-v2` §4.3.2)—— 这条**根会话**要执行在
|
|
443
450
|
* 哪台已注册的员工设备上(`POST /v1/devices/enroll` 返回的 `dev_<ulid>`)。
|
|
444
451
|
*
|
|
445
452
|
* 与 {@link cwd} **同级同信任姿势**:调用方供给、server 闸裁 —— 它不是身份,身份恒取验证过的
|
|
@@ -455,7 +462,7 @@ export interface TaskRequestBody {
|
|
|
455
462
|
deviceId?: string;
|
|
456
463
|
/** [ref] (CC `--add-dir`, core `TaskSpec.additionalDirectories`): extra host dirs the FILE tools may reach
|
|
457
464
|
* beyond the containment root. 🔒 Gated exactly like `cwd`/`shellEnv` — honored ONLY on the single-user host
|
|
458
|
-
* lane (
|
|
465
|
+
* lane (deployment-shape row `callerOwnsWorkerDisk`); off that lane `boot/resolve-spec.ts` drops them with a loud
|
|
459
466
|
* `task_additional_directories_ignored` (never silently). SHAPE is fail-loud at submit (absolute host paths,
|
|
460
467
|
* no `..` segments, ≤ MAX_ADDITIONAL_DIRS entries) — separate from whether the lane honors them.
|
|
461
468
|
* `additionalReadDirectories` (core 5.11.0) is the same door with a READ-only semantic: it widens the read
|
|
@@ -490,7 +497,7 @@ export interface TaskRequestBody {
|
|
|
490
497
|
* NOT mirrored here — a hand-written second shape on this interface would be the classic mirror-drift form.
|
|
491
498
|
* Per-key ownership is split, not single: `parseTaskSettings` (src/task-settings.ts) defensively owns the
|
|
492
499
|
* shared settings keys on every path, while `settings.webSearch` has its OWN judge (plugins/web-search.ts
|
|
493
|
-
* `judgeRequestWebSearch`,
|
|
500
|
+
* `judgeRequestWebSearch`, [ref]): a malformed block — including a missing or unknown `provider` — 400s on submit
|
|
494
501
|
* on every lane, and only the single-user
|
|
495
502
|
* scenario lane honors a well-formed one (capabilities/scenarios.ts — the multi-tenant lane ignores it by design;
|
|
496
503
|
* a malformed block replayed on resume mounts no WebSearch for that call — never a substitute destination — with a
|
|
@@ -526,7 +533,7 @@ export interface TaskRequestBody {
|
|
|
526
533
|
* (完整论证见 `task-mcp.ts` 的 `assertRequestMcpEntries` 顶注)。部署面的正门是 center 下发的
|
|
527
534
|
* `CenterMcpServer.contentOrigin`。
|
|
528
535
|
*
|
|
529
|
-
*
|
|
536
|
+
* [ref]:`transport.kind:"http"` 的条目可选 `assertionHeader`(托管连接器断言头的**头名**,契约包 settings-schema ≥12.2.0 同键)。
|
|
530
537
|
* 与 `principalHeader` **互斥**:同设 ⇒ 新提交腿同步 400 `request.body_shape`(拒句与契约包解析期那一句逐字相同);值不是字符串 ⇒ 400
|
|
531
538
|
* `request.field_invalid`。耐久 resume 腿不拒(重放存量 body),也**不摘 server**(摘了,park 在它工具审批上的任务批准后撞 `resume.tool_unavailable`
|
|
532
539
|
* 且每次重试重放同一份 body):降级到升级前的读法 —— server 照挂、`principalHeader` 胜、`assertionHeader` 不生效,一行 warn `mcp_assertion_header_ignored`。
|
|
@@ -534,12 +541,14 @@ export interface TaskRequestBody {
|
|
|
534
541
|
* 声明被接收、server 照常挂载但不带断言头,并有一行运维 info `mcp_assertion_header_not_sent { server }`;发送随引擎座。 */
|
|
535
542
|
mcpServers?: RequestMcpServerSpec[];
|
|
536
543
|
/** [DESIGN-269 车1] Caller-supplied per-request A2A peers (remote agents this task may call), aligned to
|
|
537
|
-
* core `A2aServerSpec`. 🔒 honored on a SINGLE-USER deployment
|
|
538
|
-
* had `a2a_peers` denied by its compliance posture (task-a2a.ts `a2aInjectionHonored`, the same three-veto
|
|
544
|
+
* core `A2aServerSpec`. 🔒 honored on a SINGLE-USER deployment (task-a2a.ts `a2aInjectionHonored`, the same
|
|
539
545
|
* predicate `capabilities.a2aInjection` advertises) — the requester is the super-admin of their OWN worker,
|
|
540
546
|
* on ANY execution lane (an A2A call is a plain outbound HTTPS request from the worker, so the lane where
|
|
541
547
|
* tool calls run is irrelevant); IGNORED on multi-tenant (a tenant can't point the shared worker at an
|
|
542
|
-
* agent of their choosing).
|
|
548
|
+
* agent of their choosing). A2A has no operator lock and no compliance capability today. A new submission
|
|
549
|
+
* with a malformed list or entry is refused 400 (`assertRequestA2aEntries`: not an array / over the 32-entry
|
|
550
|
+
* cap / an entry that is not an object / a key outside {@link A2A_PEER_ENTRY_KEYS} / a key whose value is
|
|
551
|
+
* unusable / a url or cardUrl carrying a credential) — the same refusal shape as `mcpServers`, whatever the lane.
|
|
543
552
|
* 🔴 Every skill a peer advertises mounts `egress:true` + `effect:"write"` (core's ruling) — declaring a
|
|
544
553
|
* peer is declaring an outbound WRITE channel, not a data source. Validated + gated downstream; the
|
|
545
554
|
* center/config baseline wins on a name clash (the peer name IS the tool namespace). */
|
|
@@ -590,7 +599,7 @@ export type ApprovalStaleCurrentPending = {
|
|
|
590
599
|
/** 当前 pending 的 server 铸 `boundInputHash`(行上有才带;逐字回显,壳不重算)。 */
|
|
591
600
|
boundInputHash?: string;
|
|
592
601
|
};
|
|
593
|
-
/**
|
|
602
|
+
/** [ref] —— `wiring_manifest` **起手接线回执**在 wire 上的值形。
|
|
594
603
|
*
|
|
595
604
|
* 🔴 **从投影器的返回型派生,不手抄键**:键表的唯一属主是 `trace/project.ts` 的
|
|
596
605
|
* {@link wiringManifestFaceEventData}(它自己又把 `tools` 段的判形属主让给 core 的 typebox schema)。
|
|
@@ -600,11 +609,11 @@ export type ApprovalStaleCurrentPending = {
|
|
|
600
609
|
* `unknown`,产物按段 present-iff 铸)。所以这一行**不**声称「wire 上的每一段都有静态型」;它声称的是
|
|
601
610
|
* 「这一键的值恒等于那只投影器的产物」,而那正是消费端唯一需要的那句话。段级判据的属主在 core。 */
|
|
602
611
|
export type WiringManifestReceipt = ReturnType<typeof wiringManifestFaceEventData>;
|
|
603
|
-
/**
|
|
612
|
+
/** [ref] —— `POST /v1/tasks`(**非流式**)200 体的值形(不含下方 {@link SyncSubmitExtraKeys}),**从铸点返回型派生**:
|
|
604
613
|
* 「封口脱敏后的引擎结果」,park 时再叠 poll 回执三键 `{taskId, sessionId, status}`。键表的唯一属主是
|
|
605
614
|
* `http/sync-submit-body.ts` 的 `buildSyncSubmitBody`(结果的键集属主是 core `TaskResult`),这里不手抄一张。 */
|
|
606
615
|
export type SyncSubmitBody = ReturnType<typeof buildSyncSubmitBody>;
|
|
607
|
-
/**
|
|
616
|
+
/** [ref] —— `POST /v1/tasks`(**非流式**)200 体在 {@link SyncSubmitBody}(引擎结果 / park 回执)之外带的**附加键**。
|
|
608
617
|
*
|
|
609
618
|
* 两键都是 **additive + present-iff**,同一只装饰点铸(`routes/tasks.ts` 的 `withSyncSubmitKeys`),
|
|
610
619
|
* 所以三处 200 出口(终局 / suspended / needs_review)与幂等重放腿自动同形:
|