@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
|
@@ -9,8 +9,8 @@ export declare function buildFatalErrorText(err: unknown): string;
|
|
|
9
9
|
/**
|
|
10
10
|
* 进程级 fatal 出口的**唯一一只腿**:同一只 {@link buildFatalErrorText} 产物写两个面,然后按崩溃码退。
|
|
11
11
|
*
|
|
12
|
-
* ── 病(
|
|
13
|
-
* 出口过去只有那条 JSON 行。而拒启文案是**多行**的 ——
|
|
12
|
+
* ── 病([ref],test [ref] P2)────────────────────────────────────────────────────────────────────
|
|
13
|
+
* 出口过去只有那条 JSON 行。而拒启文案是**多行**的 —— [ref] 的列集对账会生成
|
|
14
14
|
* `ALTER TABLE <表> ADD COLUMN <列定义>;`,它存在的全部理由就是「运维直接粘进 psql」;塞进 JSON 字符串后
|
|
15
15
|
* 整段变成一串 `\n` 转义,**粘不走**。dist 里也没有 pretty / `isTTY` 分支去把它摊开(有也不该有:出口的
|
|
16
16
|
* 可读性不该取决于终端是谁)。
|
package/dist/boot/leader.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface LeaderCtx {
|
|
|
23
23
|
toolResultStore: ToolResultStoreFull | undefined;
|
|
24
24
|
sessionStore: ReturnType<typeof createSessionStore>;
|
|
25
25
|
checkpointStore: CheckpointStoreFull | undefined;
|
|
26
|
-
/**
|
|
26
|
+
/** [ref]:停驻行凭据的封签器(与 HTTP 面 `ServiceDeps.checkpointCtxSealing` 同一只;起服第 6 段已对「店在、它不在」拒启)。必填键,值可为 undefined。 */
|
|
27
27
|
checkpointCtxSealing: import("../http/checkpoint-ctx.js").CheckpointCtxSealing | undefined;
|
|
28
28
|
/** [ref] 件B/C/D([ref],codex R2-F1):部署治理三座席 —— leader 车道的每一只 Runner 都要带上它,
|
|
29
29
|
* 否则开了 leader 端点的部署就有一条在部署治理**之外**的执行面(合规否决/锁都够不着)。 */
|
|
@@ -95,7 +95,7 @@ export interface MemoryWriteBoundaryFacts {
|
|
|
95
95
|
* core 7.16.0([ref])之后写家还要再深一层(`<平面>/<label>`),但 label 归引擎注册簿,boot 期说不出口;
|
|
96
96
|
* 平面是**包含关系上等价**的那一只(家恒为平面的直接子目录),所以判据停在平面,不猜 label。 */
|
|
97
97
|
memoryRoot: string | undefined;
|
|
98
|
-
/** 执行车道名,只进文案(归一读口 `executionLaneOf` 的答案;
|
|
98
|
+
/** 执行车道名,只进文案(归一读口 `executionLaneOf` 的答案;[ref] 起不在调用点手写 `?? "in-process"`)。 */
|
|
99
99
|
lane: ExecutionLane;
|
|
100
100
|
/** 该车道的文件工具是否跑在**本机** fs 上(in-process / `REMOTE_EXEC=host`)。false = 沙箱盘,与记忆根分平面。
|
|
101
101
|
* ⚠️ 这一位管的是**文件平面**,与下面的 `coreRemoteExecutionEnv` 是**两根轴**,别合并(codex round2
|
|
@@ -119,7 +119,7 @@ export interface MemoryWriteBoundaryFacts {
|
|
|
119
119
|
containmentRoots: readonly string[];
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* [ref] —— 审计的**车道那四位**由本函数从能力表派生(boot/stores.ts 的装配点只调它,不再就地手写):
|
|
123
123
|
* 改前 stores 里是 `lane === undefined || lane === "host"`(同义折,门 D R3)+ `config.remoteExec !== undefined`
|
|
124
124
|
* (座位上的裸缺席判,R4)+ `lane ?? "in-process"` ×3(R2)。两根轴各读表里各自那一位,不合并:
|
|
125
125
|
* · `hostSemanticsLane` ⇐ `hostFilePlane`(文件平面在不在本机);
|
|
@@ -11,10 +11,10 @@ type ConsolidationSeatOptions = ReturnType<typeof resolveMemoryConsolidationDriv
|
|
|
11
11
|
export type ConsolidationSeatLabel = "explicit" | "role:consolidate" | "role:summarize";
|
|
12
12
|
/** {@link buildConsolidationValveAudit} 的告警名闭集(事件名进日志 ⇒ 运维可按名过滤/告警)。 */
|
|
13
13
|
export type ConsolidationValveWarningTag = "memory_consolidation_valve_unreachable" | "memory_consolidation_run_credential_gated";
|
|
14
|
-
/** {@link resolveConsolidationValve} 的起服提示名闭集(
|
|
14
|
+
/** {@link resolveConsolidationValve} 的起服提示名闭集([ref] / [ref];事件名进日志 ⇒ 运维可按名过滤/告警)。 */
|
|
15
15
|
export type ConsolidationValveNoticeTag = "memory_consolidation_default_off_no_cheap_model" | "memory_consolidation_on_main_model";
|
|
16
16
|
/**
|
|
17
|
-
* 阀门判决(
|
|
17
|
+
* 阀门判决([ref] / [ref])。`build*`/`create*` 之外的第三种:纯数据,由 {@link resolveConsolidationValve} 产出。
|
|
18
18
|
* 阀门开关的**唯一**属主:座解析、操作面、引擎面两席、审计告警、武装日志全读 `enabled`,不再各读一次表态。
|
|
19
19
|
*/
|
|
20
20
|
export interface ConsolidationValve {
|
|
@@ -22,7 +22,7 @@ export interface ConsolidationValve {
|
|
|
22
22
|
/** 这一位是谁定的:运维的显式词(`explicit`),还是出厂缺省派生(`derived`)。 */
|
|
23
23
|
readonly source: "explicit" | "derived";
|
|
24
24
|
/**
|
|
25
|
-
* 这一判决**随目录变**吗(
|
|
25
|
+
* 这一判决**随目录变**吗([ref] codex 车内复审 F2)。真 = 派生判决读了整理座落在谁身上(未设 ∧ 结构上跑得起来),
|
|
26
26
|
* 中心热改 roles / 档位就可能翻它 ⇒ 要有一份重启读数盯着({@link createConsolidationValveWatch})。显式词、以及结构上
|
|
27
27
|
* 跑不起来的派生关 ⇒ 假(目录怎么改都翻不动)。
|
|
28
28
|
*/
|
|
@@ -34,7 +34,7 @@ export interface ConsolidationValve {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* 整理座若开,会落在哪只模型上 —— **相对主模型**(
|
|
37
|
+
* 整理座若开,会落在哪只模型上 —— **相对主模型**([ref] 的「便宜模型在场」判据;{@link consolidationSeatBillingOf} 产出)。
|
|
38
38
|
* · `own-model` = 座解到的目录条目**不是**主模型那一条(按条目身份 = 对象引用判,不比 id 串;`MODEL_CHEAP_ID`,或目录的
|
|
39
39
|
* consolidate / summarize / flash 档位绑定);
|
|
40
40
|
* · `main-model` = 座解到主模型那一条本身(env 角色表在 `MODEL_CHEAP_ID` 缺席 —— 或与 `MODEL_ID` 同 id、不铸 cheap 槽 —— 时把
|
|
@@ -80,7 +80,7 @@ export interface ConsolidationDriverSeat {
|
|
|
80
80
|
*/
|
|
81
81
|
export declare function resolveConsolidationDriverSeat(deps: MemoryConsolidationDriverDeps): ConsolidationDriverSeat;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* [ref] 波 0([ref] §3)—— 整理驱动席的 **restart 读数**。过渡件:**波 1 转热后删**(那时每轮 run 起手
|
|
84
84
|
* 现取当前代的席,不再有 boot 烤死的席,这只表也就没有要比的东西了)。
|
|
85
85
|
*
|
|
86
86
|
* ## 为什么要它
|
|
@@ -152,7 +152,7 @@ export declare function createPerScopeSingleFlight<T>(): (scope: string, run: ()
|
|
|
152
152
|
*
|
|
153
153
|
* 阀门关着 ⇒ 整条门不判(缺省姿态,[ref]「缺席不在律内」)。
|
|
154
154
|
*
|
|
155
|
-
* 🔴
|
|
155
|
+
* 🔴 [ref] 起判据拆成「判官 + 拒启包装」两半:判官 {@link consolidationDriverUnwirable} 是三条臂的**唯一**
|
|
156
156
|
* 属主,拒启包装只在阀门开着时把它的拒因抛出去;出厂缺省派生({@link resolveConsolidationValve})读同一只判官决定
|
|
157
157
|
* 「结构上跑不起来 ⇒ 缺省恒关」—— 两处读一只,不是两份三臂。
|
|
158
158
|
*/
|
|
@@ -180,7 +180,7 @@ export type ConsolidationUnwirable = "no-memory-engine" | "no-control-plane" | "
|
|
|
180
180
|
*/
|
|
181
181
|
export declare function consolidationDriverUnwirable(input: ConsolidationWiringFacts): ConsolidationUnwirable | undefined;
|
|
182
182
|
/**
|
|
183
|
-
* 整理座若开会落在哪只模型上(
|
|
183
|
+
* 整理座若开会落在哪只模型上([ref] 的「便宜模型在场」判据)—— **问 core 的同一只解析器**,不抄 role 链
|
|
184
184
|
* ({@link seatLabel} 注里同一条理由:抄一份就是第二真源,而 `ROLE_TIER_DEFAULTS` 的 flash 缺省会让手抄版答错)。
|
|
185
185
|
*
|
|
186
186
|
* 为什么不按 env `MODEL_CHEAP_ID` 的拼写判:它只是供座的一条路。env 角色表在它缺席时把 summarize 指回
|
|
@@ -201,7 +201,7 @@ export declare function consolidationDriverUnwirable(input: ConsolidationWiringF
|
|
|
201
201
|
*/
|
|
202
202
|
export declare function consolidationSeatBillingOf(plane: ConsolidationSeatPlane): ConsolidationSeatBilling;
|
|
203
203
|
/**
|
|
204
|
-
* 🔴
|
|
204
|
+
* 🔴 [ref] / clay **[ref]** —— **阀门判决**:开不开、谁定的、起服时要说什么。阀门开关的**唯一**属主(stage-06 的座解析 /
|
|
205
205
|
* 操作面 / 引擎面两席 / 审计告警 / 武装日志全读它的 `enabled`)。
|
|
206
206
|
*
|
|
207
207
|
* · **显式词恒赢**:`off` ⇒ 关、零提示、**零探针**(一眼都不看角色表 —— off = 零装配零探针那句承诺);`on` ⇒ 开
|
|
@@ -214,7 +214,7 @@ export declare function consolidationSeatBillingOf(plane: ConsolidationSeatPlane
|
|
|
214
214
|
* 座不落主模型({@link consolidationSeatBillingOf} = `own-model`)⇒ **开**;
|
|
215
215
|
* 否则(落主模型 / 解不出)⇒ **关** + 一行 `memory_consolidation_default_off_no_cheap_model`(点名 `MODEL_CHEAP_ID`,
|
|
216
216
|
* 出路 = 配便宜模型,或显式 `off` 静音)。
|
|
217
|
-
* · **半配拒启**(`MEMORY_EMBEDDER_*` 同族,
|
|
217
|
+
* · **半配拒启**(`MEMORY_EMBEDDER_*` 同族,[ref] 起判定点挪到这里):scope 表 / 节律配了而阀门最终**没开** ⇒ 拒启,
|
|
218
218
|
* 拒因说清「为什么没开」。在 `loadConfig` 判会把「未设 + scope + 便宜模型在场」这台本该派生成开的部署当场拒掉。
|
|
219
219
|
*
|
|
220
220
|
* ⚠️ **起服判一次**(restart-to-apply):判决落在 boot 第 4 段的装配点 {@link createConsolidationValve} —— 目录已应用
|
|
@@ -239,7 +239,7 @@ export declare function resolveConsolidationValve(input: {
|
|
|
239
239
|
* baked = boot 判决的投影,current = 此刻拿活配置**重判**一次的投影(`plane` 给活引用的 getter,refresh 就地换代后现取)。
|
|
240
240
|
* · 判决翻了(派生开 → 关:主模型被挪到整理座那一条上,或座被挪回主模型;派生关 → 开:目录给整理座绑上别的模型 / 目录迟到)
|
|
241
241
|
* ⇒ 两侧不等 ⇒ 签重启(重启后 boot 重判)。修前是两臂:开时只盯座位指纹、关时只盯「会不会开」—— 只动主模型的那一形零信号。
|
|
242
|
-
* · 开着而座漂了(中心改了座会解到的那只模型)⇒ 座位指纹不等 ⇒ 签(
|
|
242
|
+
* · 开着而座漂了(中心改了座会解到的那只模型)⇒ 座位指纹不等 ⇒ 签([ref] 波 0 的既有信号,显式 on 同走这一臂)。
|
|
243
243
|
* · 关着而目录怎么变都不翻 ⇒ 两侧同为 `{ valve: "off" }` ⇒ 不签(主模型换代而判决不翻,不造一次什么都不改变的重启)。
|
|
244
244
|
* 主模型条目是判决的**输入**(它决定开 / 关),不进投影本身 —— 进了就会在每一次主模型换代时签一次不翻判决的重启。
|
|
245
245
|
* 显式 off / 结构上跑不起来的派生关 ⇒ `undefined`(判决不随目录变,没有可盯的东西)。
|
|
@@ -283,7 +283,7 @@ export interface ConsolidationValveInput {
|
|
|
283
283
|
*
|
|
284
284
|
* 两个入口各调它一次:HTTP 服务第 4 段经 {@link createConsolidationValve};`run-local` 在记忆引擎接线之后直接调(它没有整理座 ——
|
|
285
285
|
* 不挂手动口、不接 `RunnerDeps` 的整理两席 —— 判决本身对它没有用处,要的只是拒因)。修前这道拒只长在 HTTP 那条装配链上
|
|
286
|
-
* (
|
|
286
|
+
* ([ref] 从 `loadConfig` 挪过来时 `run-local` 没跟上):共享 `.env` 上同一组键,HTTP 服务拒启、`run-local` 带着零效果的 scope 表
|
|
287
287
|
* 静默起跑。判据只有这一只 ⇒ 两个入口对同一份 env 同判同句(未设 + 便宜模型在场 ⇒ 两边都派生开、都照起)。
|
|
288
288
|
*/
|
|
289
289
|
export declare function judgeConsolidationValve(input: ConsolidationValveInput): {
|
|
@@ -312,7 +312,7 @@ export declare function judgeConsolidationValve(input: ConsolidationValveInput):
|
|
|
312
312
|
* 反过来说,**沉默**同样不行:那正是「设了但没生效」病族,而这一形连能力位都是诚实的假,唯一缺的
|
|
313
313
|
* 就是一句把因果说清楚的话。
|
|
314
314
|
*
|
|
315
|
-
* ## 只审**显式**开的阀门(
|
|
315
|
+
* ## 只审**显式**开的阀门([ref] / [ref] 起)
|
|
316
316
|
*
|
|
317
317
|
* 两条告警的前提都是「运维**显式**拧了 on」(上面那句原话)——它们是一次**表态**够不着的诊断。出厂缺省**派生**开的
|
|
318
318
|
* 那台(配了便宜模型的单用户部署)没有表态可审:引擎面的自动整理照跑(不走这两个口),手动口是一件它没要过的东西。
|
|
@@ -360,7 +360,7 @@ export declare function buildStopDetailAudit(input: {
|
|
|
360
360
|
untrustedDetail: string;
|
|
361
361
|
};
|
|
362
362
|
/**
|
|
363
|
-
*
|
|
363
|
+
* [ref] / [ref] —— **`RunnerDeps.autoRunOnRecommendation` 武装席的装配不变量**(D1 的姊妹门)。
|
|
364
364
|
*
|
|
365
365
|
* 与 {@link assertConsolidationDriverWirable} 刻意**分家**而不是加第四臂:那道门问「阀门这根旋钮
|
|
366
366
|
* (`MEMORY_CONSOLIDATION_DRIVER`)开着而这台机器结构上跑不了」,本门问「武装这根旋钮
|
|
@@ -377,7 +377,7 @@ export declare function buildStopDetailAudit(input: {
|
|
|
377
377
|
* ## 判据取的是**结构事实**,不是一个手抄的布尔
|
|
378
378
|
*
|
|
379
379
|
* `memoryConsolidationWired` 由调用点从**它刚刚铸出来的那只 `RunnerDeps`** 上读(`deps.memoryConsolidation
|
|
380
|
-
* !== undefined`),不是在这里写一个常量 ——
|
|
380
|
+
* !== undefined`),不是在这里写一个常量 —— [ref] 把两席接上之后,本门**自动**从「恒拒」变成「阀门开着
|
|
381
381
|
* 就放行」,没有人需要记得回来改一个数。
|
|
382
382
|
*
|
|
383
383
|
* 🔴 **core 的拒绝谓词是两个析取项,本门只覆盖第一个**(对抗复审 F5 [low],验真后如实登记):
|
|
@@ -500,7 +500,7 @@ export declare function createMemoryConsolidationFaces(store: {
|
|
|
500
500
|
* 🔴 这只引擎是四只 operator 面里**真读名册**的那只:`consolidationEligibility` 第四臂
|
|
501
501
|
* (engine.js `listCaptureOptOutSessions`)拿它筛掉 opt-out 会话的贡献条目 —— SQL 部署上漏喂
|
|
502
502
|
* = 驱动器读文件空名册 ⇒ 蒸馏器放大用户明说不要记的内容(S-5 真实失效形;全站同批注入律,
|
|
503
|
-
* 机器钉 capture-optout-lane ②)。
|
|
503
|
+
* 机器钉 capture-optout-lane ②)。[ref] 起 local 车道在引擎接线时也供(core 文件三腿,同一只控制面);
|
|
504
504
|
* 缺席 ⇒ 记忆面暗(引擎未接线),与 Runner 同本。 */
|
|
505
505
|
captureRecordStore?: SessionCaptureRecordStore;
|
|
506
506
|
/** core 7.50.0:整理跑的**写判官座**(必填 —— 缺席不是「没有规则」,core 也拒)。操作面不判任何东西,只把它原样递给驱动动词:
|
package/dist/boot/org-memory.js
CHANGED
|
@@ -31,7 +31,7 @@ export function createOrgMemoryAdmissionWiring(opts) {
|
|
|
31
31
|
fetchSection: (principal) => fetchPrincipalOrgMemory({ baseUrl: centerLeg.baseUrl, credential }, principal, fetch, centerLeg.worker),
|
|
32
32
|
grantTtlMs: config.memoryOrgGrantTtlMs,
|
|
33
33
|
unavailableBackoffMs: config.memoryOrgUnavailableBackoffMs,
|
|
34
|
-
}));
|
|
34
|
+
})).now;
|
|
35
35
|
return { lookup: (principal) => directoryNow().lookup(principal) };
|
|
36
36
|
})()
|
|
37
37
|
: staticJson !== undefined
|
|
@@ -7,7 +7,7 @@ import type { ApprovalExemptionStore } from "../plugins/approval-exemption-store
|
|
|
7
7
|
/** 本腿读的配置切面(`ServiceConfig` 结构满足)。两个构造口各自的切面 + lane 判别式读的 `remoteExec`。 */
|
|
8
8
|
export interface ParkedReviveGateConfigView extends DeploymentGovernanceConfigView, ApprovalBaselineConfigView {
|
|
9
9
|
readonly remoteExec?: ServiceConfig["remoteExec"];
|
|
10
|
-
/**
|
|
10
|
+
/** [ref]④:`executionLaneHomeDir` 读的运维声明(切面必须点名本腿消费的每一个字段,否则窄视图字面量会静默丢掉旋钮)。 */
|
|
11
11
|
readonly remoteExecHomeDir?: ServiceConfig["remoteExecHomeDir"];
|
|
12
12
|
/** host 腿裁决 env 的 cwd 占位根(见下方 `hostGateCwd`)。 */
|
|
13
13
|
readonly localDataRoot?: ServiceConfig["localDataRoot"];
|
|
@@ -63,7 +63,7 @@ export interface ParkedReviveGateDeps {
|
|
|
63
63
|
readonly autoModeSeatMounted?: boolean;
|
|
64
64
|
/** [ref]:父 run 的 auto 意图(core 7.34.0 起 = 父腿的 `permissionMode === "auto"`,旧键 `autoModeRequested` 已退役)——
|
|
65
65
|
* 意图武装式下重建 decider 的第三项。⚠️ 今日**本仓无读口**(RunRecord 无 body),生产装配不递 ⇒ 恒缺席。
|
|
66
|
-
*
|
|
66
|
+
* [ref] 登记:core 7.34.0 起子代 checkpoint 的数据半持久 `inheritedGate.permissionMode`(链在 spawn 时的**生效**模式),
|
|
67
67
|
* 这一座可改读它 —— 接线不在本次提货单内,见 7.106.0 收车档「未闭环」。 */
|
|
68
68
|
readonly parentAutoModeIntent?: ((row: BackgroundAgentRecord) => boolean) | undefined;
|
|
69
69
|
readonly logger: {
|
|
@@ -115,7 +115,7 @@ export type RebuiltParentConstraint = NonNullable<RebuiltInheritedGate["parentCo
|
|
|
115
115
|
* (core 对这三个都是 seed 兜底)。
|
|
116
116
|
*
|
|
117
117
|
* 时点语义(成文进 docs/ASSISTANT-WIRE-CONTRACT.md,免运维当 bug 报):
|
|
118
|
-
* · toolPolicy 轴 = **当前** config(与 resume 重折一致)。
|
|
118
|
+
* · toolPolicy 轴 = **当前** config(与 resume 重折一致)。[ref](core 7.35.0 [ref])起部署治理层经 `wrapToolPolicy` 携带内层 `projection`
|
|
119
119
|
* ⇒ 父链那一层的**内容**进了 `cpv1` 摘要:挂起期间改了治理 config(收紧或放松)⇒ 重建链摘要对不上 ⇒ core pre-CAS 响亮拒、卡留 pending
|
|
120
120
|
* (此前那一层 opaque,收紧与放松都按当前 config 兑现;特征化钉 test/parked-revive-e2e.test.ts 已随之翻);
|
|
121
121
|
* · shellGate 轴 = core 取 max(live, park 时 seed)—— 收紧兑现、放松**不**兑现(fail-safe)。
|
|
@@ -4,7 +4,8 @@ import { recordFailOpen } from "../observability/fail-open.js";
|
|
|
4
4
|
import { decodeCheckpointScope } from "../security.js";
|
|
5
5
|
import { createApprovalBaselinePolicy, createDeploymentGovernanceInputs, } from "../deployment-governance.js";
|
|
6
6
|
import { applyRuntimeGovernance } from "../runtime-governance.js";
|
|
7
|
-
import { DeferredSandboxPathEnv,
|
|
7
|
+
import { DeferredSandboxPathEnv, sandboxPathEnvSlots } from "./deferred-sandbox-path-env.js";
|
|
8
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "../deployment-shape.js";
|
|
8
9
|
import { executionLaneHomeDir } from "../execution-lane-caps.js";
|
|
9
10
|
import { createDeploymentListExemption } from "../approval.js";
|
|
10
11
|
function hostGateCwd(config, localRoot) {
|
|
@@ -17,7 +18,7 @@ export function createParkedReviveInheritedGate(deps) {
|
|
|
17
18
|
const metadata = await chainMetadataOf(deps, row, identity);
|
|
18
19
|
const laneHome = executionLaneHomeDir(config);
|
|
19
20
|
const homeBase = laneHome !== undefined ? { taskHome: laneHome } : {};
|
|
20
|
-
const pathAdjudication =
|
|
21
|
+
const pathAdjudication = DEPLOYMENT_SHAPE_PREDICATES.sandboxPathAdjudication.holds(config)
|
|
21
22
|
? {
|
|
22
23
|
env: new DeferredSandboxPathEnv({
|
|
23
24
|
sessionId: row.sessionId,
|
package/dist/boot/reapers.d.ts
CHANGED
|
@@ -70,12 +70,12 @@ export interface ReapersCtx {
|
|
|
70
70
|
subRunner: Runner;
|
|
71
71
|
runStore: ReturnType<StoreBackend["run"]> | undefined;
|
|
72
72
|
checkpointStore: CheckpointStoreFull | undefined;
|
|
73
|
-
/**
|
|
73
|
+
/** [ref]:checkpoint 店的 park 提交观察层(stage-06 与店同一处铸;在场 ⇔ 有 checkpoint 店)。对账收敛器订阅它,在停车行提交那一拍收口 PARKING。 */
|
|
74
74
|
parkCommits: ParkCommitWatch | undefined;
|
|
75
75
|
rateLimiter: RateLimiter | RateLimiterStore | undefined;
|
|
76
76
|
costQuota: CostQuota | CostQuotaStore | undefined;
|
|
77
77
|
toolResultStore: ToolResultStoreFull | undefined;
|
|
78
|
-
/**
|
|
78
|
+
/** [ref]:文件历史的**擦除脸**(后端在即在,与 `FILE_HISTORY_CAPTURE` 无关)—— 本段只用它的孤儿 blob GC。 */
|
|
79
79
|
fileHistoryErasure: FileHistoryErasureFace | undefined;
|
|
80
80
|
taskAttachmentStore: TaskAttachmentStore | undefined;
|
|
81
81
|
imageBakes: ImageBake | undefined;
|
|
@@ -103,9 +103,9 @@ export interface ReapersCtx {
|
|
|
103
103
|
* (`boot/permission-rules-audit.ts` 的 `DormantRuleCounter` 是同一条判据的先例)。
|
|
104
104
|
* 生产传的仍是整只束(结构上满足这个窄口)。 */
|
|
105
105
|
permissionRuleStores: PermissionRuleRetentionSweeper | undefined;
|
|
106
|
-
/**
|
|
106
|
+
/** [ref] 用户输入受理账本(stage-07 装配;缺席 = 无 backend)。每拍在 reapStale **之后**收敛一次(同一条腿串行,理由见 tick 里那一行)。 */
|
|
107
107
|
userInputLedger: Pick<UserInputLedger, "converge"> | undefined;
|
|
108
|
-
/**
|
|
108
|
+
/** [ref] 直连门 nonce 的消费记录店 —— 本 tick 只用它的**到期清扫**一手。行至多活 ~150 秒(= 证明还能被
|
|
109
109
|
* 受理的最后一刻),所以存量是「到达率 × TTL」而不是历史总量,清扫无需分批。无 backend 的 env-only
|
|
110
110
|
* 部署 ⇒ undefined ⇒ 本腿零调用(那种部署也没有 durable 审批门)。 */
|
|
111
111
|
approvalNonceStore: ApprovalNonceStore | undefined;
|
|
@@ -57,7 +57,7 @@ export interface ResolveSpecCtx {
|
|
|
57
57
|
backend: MemoryBackend;
|
|
58
58
|
root: string;
|
|
59
59
|
} | undefined;
|
|
60
|
-
/**
|
|
60
|
+
/** [ref]:记忆同步腿(开 `MEMORY_SYNC_*` 且记忆引擎接线时在场)—— 项目层准备一步把本任务的项目层交给它跟踪(`memory-project-layer.ts`)。 */
|
|
61
61
|
memorySyncRunner: MemorySyncRunner | undefined;
|
|
62
62
|
durableEnabled: boolean;
|
|
63
63
|
/** [ref] ([ref] 案二):活体 AskUserQuestion 面(QuestionCoordinator 的判决探针切面)。在场(=
|
|
@@ -19,23 +19,25 @@ import { explicitOperatorOk } from "../http/server.js";
|
|
|
19
19
|
import { isAtMentionable, matchCatalogModel, modelSupportsImages, refusedCatalogEntry, resolveTaskModel, selectableCatalog, terminalCatalogName } from "../model-select.js";
|
|
20
20
|
import { echoModelRef, modelUnavailableMessage } from "../model-entry-refusal.js";
|
|
21
21
|
import { PerTaskImageRegistry, resolveSandboxImageRef } from "../per-task-image.js";
|
|
22
|
-
import {
|
|
22
|
+
import { remoteScratchpadDirFor } from "../plugins/remote-scratchpad.js";
|
|
23
23
|
import { bindAttachmentsForTask } from "../plugins/task-attachment-store.js";
|
|
24
24
|
import { resourceSuspendOptIn } from "../resource-suspend.js";
|
|
25
|
-
import {
|
|
25
|
+
import { routeServiceTask, supPostureOverrides } from "../router/route-orchestration.js";
|
|
26
26
|
import { tightenGoverned } from "../governance-overrides.js";
|
|
27
27
|
import { gateExecutionLane } from "../runtime-caps-resolver.js";
|
|
28
28
|
import { applyRuntimeGovernance } from "../runtime-governance.js";
|
|
29
29
|
import { HttpError, createCodedHttpError, encodeCheckpointScope } from "../security.js";
|
|
30
|
-
import {
|
|
30
|
+
import { headReadOf, sessionFaceOfHead } from "../session-incarnation.js";
|
|
31
31
|
import { memorySpecForRequest } from "../memory-scope.js";
|
|
32
32
|
import { createMemoryProjectLayers } from "../memory-project-layer.js";
|
|
33
33
|
import { inheritEnvFieldIssue, singleMemberOffFieldIssue } from "../request-value-closure.js";
|
|
34
34
|
import { a2aForScenario, mcpForScenario } from "../web-admin-client/facade.js";
|
|
35
35
|
import { normalizeAttachments, normalizeResilience, normalizeResumeAtMode, normalizeSuggestNextPrompts, promptProfileFromBody, resolveTaskLimits, retainBackgroundProcessesFromBody, taskAgentsSpecFragment, toolMaterializeStrategyFromBody, allowToolsSpecFragment, toolNameListFromBody } from "../spec-fields.js";
|
|
36
36
|
import { isAbsoluteHostPath } from "@sema-agent/settings-schema";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
37
|
+
import { effectiveHostWorkspace, parseAdditionalDirectories, satisfiedByProcessCwd, shellEnvMismatchCount } from "../task-cwd.js";
|
|
38
|
+
import { DEPLOYMENT_SHAPE_PREDICATES } from "../deployment-shape.js";
|
|
39
|
+
import { assertRequestA2aEntries, resolveRequestA2a, snapshotRequestA2a } from "../task-a2a.js";
|
|
40
|
+
import { assertRequestImageUrls } from "../request-image-urls.js";
|
|
39
41
|
import { assertRequestMcpEntries, assertRequestMcpUnlocked, resolveRequestMcp } from "../task-mcp.js";
|
|
40
42
|
import { storedToolAxesRereadM19 } from "../stored-request-tool-axes-m19.js";
|
|
41
43
|
import { storedHooksRereadM20 } from "../stored-request-hooks-m20.js";
|
|
@@ -45,7 +47,7 @@ import { entryProblemsFacts } from "../entry-problems.js";
|
|
|
45
47
|
import { inertToolListEntryOf } from "../rule-entry-list.js";
|
|
46
48
|
import { TENANCY_WALL_CLOCK_BASE_SEC, enableForkFromBody, normalizeRetainSubagentSessions, selfOrchestrationFromBody } from "../task-workflow.js";
|
|
47
49
|
import { redactSecrets } from "../trace/redact.js";
|
|
48
|
-
import { DeferredSandboxPathEnv,
|
|
50
|
+
import { DeferredSandboxPathEnv, sandboxPathEnvSlots } from "./deferred-sandbox-path-env.js";
|
|
49
51
|
import { executionLaneHomeDir, executionLaneOf, laneWiresExecutionEnv } from "../execution-lane-caps.js";
|
|
50
52
|
import { effectiveMemoryPersistenceCapable } from "./memory-boundary.js";
|
|
51
53
|
import { withUnattendedLeg } from "../unattended-permission-mode.js";
|
|
@@ -53,17 +55,17 @@ import { fieldConflictFacts } from "../field-conflict.js";
|
|
|
53
55
|
export function createResolveSpec(ctx) {
|
|
54
56
|
const { config, logger, metrics, localRoot, scenarios, principalCaps, centerRuntimeCapsResolver, getKeyResolver, taskAttachmentStore, perSessionCwd, setSessionCwd, setSessionShellEnv, fenceSessionOwner, hookLlm, hookAgent, fleetBus, hookWakeBus, resumeAnchorStore, ownerAware, taskLimitCaps, taskTimeoutSec, selectEnvTool, sendUserFileToolSpec, memoryEngine, memorySyncRunner, durableEnabled, approvalExemptionStore, checkpointStore, imageIndex, perTaskImage, sessionEnvSelection, liveQuestionFace, approverSeat, lockedKeys, } = ctx;
|
|
55
57
|
const scenarioGate = createScenarioGate({ config, scenarios, principalCaps, logger }, "enforce");
|
|
56
|
-
const
|
|
58
|
+
const sessionHeadOf = headReadOf(ownerAware);
|
|
57
59
|
assertGuardPatternsUsable(config);
|
|
58
60
|
const onlySensitiveBaseline = buildOnlySensitiveBaselineWarning(config, {
|
|
59
61
|
approvalSeat: durableEnabled ? "durable" : "absent",
|
|
60
62
|
singleUserAutoAcceptBaseline: singleUserAutoAcceptBaselineApplies(config),
|
|
61
63
|
});
|
|
62
64
|
const realTaskRootOf = (auth) => {
|
|
63
|
-
if (
|
|
65
|
+
if (DEPLOYMENT_SHAPE_PREDICATES.sandboxPathAdjudication.holds(config))
|
|
64
66
|
return undefined;
|
|
65
67
|
const sessionCwd = auth?.sessionId ? effectiveHostWorkspace(perSessionCwd.get(auth.sessionId), {}) : undefined;
|
|
66
|
-
return sessionCwd ?? (config.remoteExec ===
|
|
68
|
+
return sessionCwd ?? (executionLaneOf(config.remoteExec?.provider) === "in-process" ? process.cwd() : undefined);
|
|
67
69
|
};
|
|
68
70
|
const memoryProjectLayers = createMemoryProjectLayers({ backend: memoryEngine?.backend, syncRunner: memorySyncRunner, log: logger });
|
|
69
71
|
if (onlySensitiveBaseline)
|
|
@@ -85,7 +87,7 @@ export function createResolveSpec(ctx) {
|
|
|
85
87
|
localDataRoot: config.localDataRoot ?? localRoot,
|
|
86
88
|
sessionId: auth?.sessionId,
|
|
87
89
|
requirePrincipal: config.requirePrincipal,
|
|
88
|
-
|
|
90
|
+
callerOwnsWorkerDisk: DEPLOYMENT_SHAPE_PREDICATES.callerOwnsWorkerDisk.holds(config),
|
|
89
91
|
});
|
|
90
92
|
if (conflict) {
|
|
91
93
|
throw new HttpError(400, `cwd "${conflict.cwd.asSpelled}" is inside this session's scratchpad "${conflict.scratchpadDir.asSpelled}" — the scratchpad is the fs-write gate's EXEMPT directory, so a task rooted there would auto-approve every write under its own root and the engine refuses to build the gate at all (config.write_exempt_dir_covers_root). Point cwd at the project directory instead (or send no cwd and let the session keep the one it has): this session registers the cwd you send, so a task that happens not to mount the write gate would still leave every LATER task on this session rooted in the exemption. A workflow that really is meant to write without prompts says so with a knob that means it (a permission mode, an open write face) and still keeps its root outside the scratchpad — those knobs do not lift this refusal, because the conflict is between two fields of this request, not a permission level.`, { code: "request.field_conflict", extra: { ...fieldConflictFacts("scratchpad_root", body.scratchpadDir === conflict.scratchpadDir.asSpelled ? ["cwd", "scratchpadDir"] : ["cwd"]), cwd: conflict.cwd, scratchpadDir: conflict.scratchpadDir } });
|
|
@@ -138,7 +140,12 @@ export function createResolveSpec(ctx) {
|
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
|
-
|
|
143
|
+
const storedToolAxes = opts?.leg === "fresh" ? undefined : storedToolAxesRereadM19(new Date().toISOString().slice(0, 10));
|
|
144
|
+
const a2aPeers = snapshotRequestA2a(body.a2aPeers, { reread: storedToolAxes !== undefined });
|
|
145
|
+
if (opts?.leg === "fresh")
|
|
146
|
+
assertRequestA2aEntries(a2aPeers);
|
|
147
|
+
if (opts?.leg === "fresh")
|
|
148
|
+
assertRequestImageUrls(body.images);
|
|
142
149
|
const gated = await gateScenarioAndAppend(body, auth, opts);
|
|
143
150
|
const effMode = effectivePermissionMode(body, gated.parsedSettings.settings);
|
|
144
151
|
if (effMode !== undefined && modePolicyOf(effMode).writeFace === "open") {
|
|
@@ -149,7 +156,7 @@ export function createResolveSpec(ctx) {
|
|
|
149
156
|
const lane = bindSettingsCwdEnvAndModel(body, auth, gated, opts);
|
|
150
157
|
const anchors = await resolveHistoryAnchors(body, auth);
|
|
151
158
|
const projectKey = memoryEngine ? await memoryProjectLayers.prepare(config, auth?.memoryScope, realTaskRootOf(auth)) : undefined;
|
|
152
|
-
const spec = assembleSpecLiteral(body, auth, req, opts, { ...gated, ...lane, ...anchors, projectKey }, effMode);
|
|
159
|
+
const spec = assembleSpecLiteral(body, auth, req, opts, { ...gated, ...lane, ...anchors, projectKey, a2aPeers, storedToolAxes }, effMode);
|
|
153
160
|
const folded = await foldGovernanceAndSettings(body, auth, spec, gated);
|
|
154
161
|
const final = await applyImageFactsAndRouting(body, auth, folded.governed, {
|
|
155
162
|
scenarioName: gated.scenarioName,
|
|
@@ -162,7 +169,7 @@ export function createResolveSpec(ctx) {
|
|
|
162
169
|
const gateScenarioAndAppend = async (body, auth, opts) => {
|
|
163
170
|
const scenarioName = await scenarioGate(auth?.principal, body.scenario);
|
|
164
171
|
gateExecutionLane(await principalCaps?.executionRuling(auth?.principal), executionLaneOf(config.remoteExec?.provider), logger);
|
|
165
|
-
const cap = selectScenario(scenarios, scenarioName)(body, auth?.principal, auth?.sessionId !== undefined ? { sessionId: auth.sessionId, delegationRoot: { sessionId: auth.sessionId, incarnation: (await
|
|
172
|
+
const cap = selectScenario(scenarios, scenarioName)(body, auth?.principal, auth?.sessionId !== undefined ? { sessionId: auth.sessionId, delegationRoot: { sessionId: auth.sessionId, incarnation: (sessionHeadOf === undefined ? undefined : sessionFaceOfHead(auth.sessionId, await sessionHeadOf(auth.sessionId)))?.incarnation ?? null } } : {});
|
|
166
173
|
const acceptedAppend = acceptAppendSystemPrompt(body.appendSystemPrompt, (detail) => logger.warn("append_system_prompt_dropped", { detail, sessionId: auth?.sessionId ?? null }));
|
|
167
174
|
const objective = typeof body.objective === "string" ? body.objective : "";
|
|
168
175
|
const parsedSettings = parseTaskSettings(body.settings, opts?.leg === "fresh" || !taskHooksHonored(config) ? {} : { storedHooksReread: storedHooksRereadM20(new Date().toISOString().slice(0, 10)) });
|
|
@@ -216,14 +223,14 @@ export function createResolveSpec(ctx) {
|
|
|
216
223
|
};
|
|
217
224
|
const bindSettingsCwdEnvAndModel = (body, auth, gated, opts) => {
|
|
218
225
|
const { objective, parsedSettings } = gated;
|
|
219
|
-
const cwdWriteGate =
|
|
226
|
+
const cwdWriteGate = DEPLOYMENT_SHAPE_PREDICATES.callerCwd.holds(config);
|
|
220
227
|
const execLane = executionLaneOf(config.remoteExec?.provider);
|
|
221
228
|
if (auth?.sessionId)
|
|
222
229
|
fenceSessionOwner(auth.sessionId, auth.principal ?? null);
|
|
223
230
|
if (typeof body.cwd === "string" && body.cwd.length > 0 && auth?.sessionId) {
|
|
224
231
|
if (cwdWriteGate && isAbsoluteHostPath(body.cwd))
|
|
225
232
|
setSessionCwd(auth.sessionId, body.cwd);
|
|
226
|
-
else if (
|
|
233
|
+
else if (DEPLOYMENT_SHAPE_PREDICATES.inProcessSingleUser.holds(config) && isAbsoluteHostPath(body.cwd) && satisfiedByProcessCwd(body.cwd, realpathSync))
|
|
227
234
|
logger.debug("task_cwd_inherited", { lane: execLane, sessionId: auth.sessionId });
|
|
228
235
|
else
|
|
229
236
|
logger.warn("task_cwd_ignored", { honored: cwdWriteGate, lane: execLane, sessionId: auth.sessionId });
|
|
@@ -231,7 +238,7 @@ export function createResolveSpec(ctx) {
|
|
|
231
238
|
if (parsedSettings.settings?.shellEnv && auth?.sessionId) {
|
|
232
239
|
if (cwdWriteGate)
|
|
233
240
|
setSessionShellEnv(auth.sessionId, parsedSettings.settings.shellEnv);
|
|
234
|
-
else if (
|
|
241
|
+
else if (DEPLOYMENT_SHAPE_PREDICATES.inProcessSingleUser.holds(config)) {
|
|
235
242
|
const requested = parsedSettings.settings.shellEnv;
|
|
236
243
|
const mismatched = shellEnvMismatchCount(requested, process.env);
|
|
237
244
|
if (mismatched === 0)
|
|
@@ -273,13 +280,14 @@ export function createResolveSpec(ctx) {
|
|
|
273
280
|
}, settingsHooksBudgetMs(config));
|
|
274
281
|
})();
|
|
275
282
|
const rawAddDirs = body.additionalDirectories;
|
|
276
|
-
const
|
|
277
|
-
|
|
283
|
+
const callerOwnsWorkerDisk = DEPLOYMENT_SHAPE_PREDICATES.callerOwnsWorkerDisk.holds(config);
|
|
284
|
+
const additionalDirectories = callerOwnsWorkerDisk ? parseAdditionalDirectories(rawAddDirs) : undefined;
|
|
285
|
+
if (rawAddDirs !== undefined && !callerOwnsWorkerDisk) {
|
|
278
286
|
logger.warn("task_additional_directories_ignored", { honored: false, sessionId: auth?.sessionId ?? null });
|
|
279
287
|
}
|
|
280
288
|
const rawAddReadDirs = body.additionalReadDirectories;
|
|
281
|
-
const additionalReadDirectories =
|
|
282
|
-
if (rawAddReadDirs !== undefined && !
|
|
289
|
+
const additionalReadDirectories = callerOwnsWorkerDisk ? parseAdditionalDirectories(rawAddReadDirs) : undefined;
|
|
290
|
+
if (rawAddReadDirs !== undefined && !callerOwnsWorkerDisk) {
|
|
283
291
|
logger.warn("task_additional_read_directories_ignored", { honored: false, sessionId: auth?.sessionId ?? null });
|
|
284
292
|
}
|
|
285
293
|
const wireCatalog = selectableCatalog(config.models, config.tiers, config.modelRefusals);
|
|
@@ -316,7 +324,7 @@ export function createResolveSpec(ctx) {
|
|
|
316
324
|
if (typeof body.resumeAt === "string" && body.resumeAt.length > 0) {
|
|
317
325
|
if (!auth?.sessionId)
|
|
318
326
|
throw new HttpError(422, "resumeAt requires a session to branch (resume_at.no_session)", { code: "resume_at.no_session" });
|
|
319
|
-
if (!resumeAnchorStore || !
|
|
327
|
+
if (!resumeAnchorStore || !sessionHeadOf)
|
|
320
328
|
throw new HttpError(501, "resume-at is not available on this worker (no session-store backend for the anchor map)");
|
|
321
329
|
resumeAtEntryId = await resumeAnchorStore.resolve(auth.sessionId, body.resumeAt, auth.principal ?? null);
|
|
322
330
|
if (resumeAtEntryId === undefined)
|
|
@@ -326,7 +334,7 @@ export function createResolveSpec(ctx) {
|
|
|
326
334
|
if (resumeAtEntryId === undefined && typeof body.rewindFilesTo === "string" && body.rewindFilesTo.length > 0) {
|
|
327
335
|
if (!auth?.sessionId)
|
|
328
336
|
throw new HttpError(422, "rewindFilesTo requires a session (rewind_files_to.no_session)", { code: "rewind_files_to.no_session" });
|
|
329
|
-
if (!resumeAnchorStore || !
|
|
337
|
+
if (!resumeAnchorStore || !sessionHeadOf)
|
|
330
338
|
throw new HttpError(501, "rewind-files-to is not available on this worker (no session-store backend for the anchor map)");
|
|
331
339
|
rewindFilesToEntryId = await resumeAnchorStore.resolve(auth.sessionId, body.rewindFilesTo, auth.principal ?? null);
|
|
332
340
|
if (rewindFilesToEntryId === undefined)
|
|
@@ -351,13 +359,13 @@ export function createResolveSpec(ctx) {
|
|
|
351
359
|
return deriveAskEffective(askForm.form, "unresolved") === "human_reachable";
|
|
352
360
|
};
|
|
353
361
|
const assembleSpecLiteral = (body, auth, req, opts, parts, effMode) => {
|
|
354
|
-
const { scenarioName, cap, hands, acceptedAppend, parsedSettings, attachmentNotice, taskHooks, additionalDirectories, additionalReadDirectories, wireCatalog, picked, resumeAtEntryId, rewindFilesToEntryId, s4DefaultScopes, projectKey, } = parts;
|
|
355
|
-
const storedToolAxes = opts?.leg === "fresh" ? undefined : storedToolAxesRereadM19(new Date().toISOString().slice(0, 10));
|
|
362
|
+
const { scenarioName, cap, hands, acceptedAppend, parsedSettings, attachmentNotice, taskHooks, additionalDirectories, additionalReadDirectories, wireCatalog, picked, resumeAtEntryId, rewindFilesToEntryId, s4DefaultScopes, projectKey, a2aPeers, storedToolAxes, } = parts;
|
|
356
363
|
const spec = {
|
|
357
364
|
objective: attachmentNotice ? `${picked.cleanedObjective}\n\n${attachmentNotice}` : picked.cleanedObjective,
|
|
358
365
|
...buildPromptSeats(scenarioName, cap.prompt, typeof body.systemPrompt === "string" ? body.systemPrompt : undefined),
|
|
359
366
|
appendSystemPrompt: acceptedAppend,
|
|
360
367
|
...(body.outputStyle !== undefined ? { outputStyle: body.outputStyle } : {}),
|
|
368
|
+
...(body.projectMemory !== undefined ? { projectMemory: body.projectMemory } : {}),
|
|
361
369
|
sessionId: auth?.sessionId,
|
|
362
370
|
principal: auth?.principal,
|
|
363
371
|
images: body.images,
|
|
@@ -485,7 +493,7 @@ export function createResolveSpec(ctx) {
|
|
|
485
493
|
...(parsedSettings.settings?.skillListingBudgetFraction !== undefined ? { skillListingBudgetFraction: parsedSettings.settings.skillListingBudgetFraction } : {}),
|
|
486
494
|
...(parsedSettings.settings?.skillListingMaxDescChars !== undefined ? { skillListingMaxDescChars: parsedSettings.settings.skillListingMaxDescChars } : {}),
|
|
487
495
|
mcp: resolveRequestMcp(mcpForScenario(config.mcpServers, scenarioName), body.mcpServers, config, logger, opts?.onNotice !== undefined ? { sessionId: auth?.sessionId, emit: opts.onNotice } : undefined, storedToolAxes),
|
|
488
|
-
a2a: resolveRequestA2a(a2aForScenario(config.a2aPeers, scenarioName),
|
|
496
|
+
a2a: resolveRequestA2a(a2aForScenario(config.a2aPeers, scenarioName), a2aPeers, config, logger, opts?.leg === "fresh" ? "fresh" : "resume", storedToolAxes),
|
|
489
497
|
toolPolicy: toolPolicyForHands(hands, durableEnabled
|
|
490
498
|
? createApprovalBaselinePolicy(config, {
|
|
491
499
|
kind: "durable",
|
|
@@ -520,7 +528,7 @@ export function createResolveSpec(ctx) {
|
|
|
520
528
|
};
|
|
521
529
|
const foldGovernanceAndSettings = async (body, auth, spec, gated) => {
|
|
522
530
|
const { acceptedAppend, parsedSettings } = gated;
|
|
523
|
-
const hostSemanticsLane = !
|
|
531
|
+
const hostSemanticsLane = !DEPLOYMENT_SHAPE_PREDICATES.sandboxPathAdjudication.holds(config);
|
|
524
532
|
const laneHomeBase = () => {
|
|
525
533
|
const home = executionLaneHomeDir(config);
|
|
526
534
|
return home !== undefined ? { taskHome: home } : {};
|
|
@@ -618,7 +626,7 @@ export function createResolveSpec(ctx) {
|
|
|
618
626
|
perTaskImage.set(auth.sessionId, resolved.ref);
|
|
619
627
|
resolvedImageCaps = resolved.capabilities;
|
|
620
628
|
}
|
|
621
|
-
const remoteScratchpadDir = !hostSemanticsLane &&
|
|
629
|
+
const remoteScratchpadDir = !hostSemanticsLane && DEPLOYMENT_SHAPE_PREDICATES.remoteScratchpad.holds(config)
|
|
622
630
|
? remoteScratchpadDirFor(auth?.sessionId)
|
|
623
631
|
: undefined;
|
|
624
632
|
const declaredScratchpadDir = scratchpadDir ?? remoteScratchpadDir;
|
|
@@ -638,9 +646,8 @@ export function createResolveSpec(ctx) {
|
|
|
638
646
|
if (facts)
|
|
639
647
|
governed = { ...governed, envFacts: facts };
|
|
640
648
|
if (config.routerEnabled) {
|
|
641
|
-
const isolatedExecEnv = isIsolatedExecEnv(config.remoteExec?.provider, config.remoteExec?.provider === "k8s" ? config.remoteExec.runtimeClass : undefined);
|
|
642
649
|
const decision = routeServiceTask({
|
|
643
|
-
|
|
650
|
+
vmIsolatedExecEnv: DEPLOYMENT_SHAPE_PREDICATES.vmIsolatedHands.holds(config),
|
|
644
651
|
hasExecutionEnv: laneWiresExecutionEnv(executionLaneOf(config.remoteExec?.provider)),
|
|
645
652
|
...(config.autonomy ? { autonomy: config.autonomy } : {}),
|
|
646
653
|
});
|
|
@@ -62,12 +62,12 @@ export declare function createRunnerDepsOnAsk(toolApproval: ToolApprovalCoordina
|
|
|
62
62
|
* `memory-tools-not-mounted` / `shared-memory-not-mounted`(core 7.52.0 起一只铸点 `announceMemoryNotMounted`,词在
|
|
63
63
|
* announce-once-ledger 的表行)/ `file-history-no-store` / `file-history-no-env`(prepare-file-history 的 `livenessArm` 变量,core 7.30 起
|
|
64
64
|
* 就在 —— 只认字面量的旧扫描看不见它们,两词一直被标 `classificationKnown:false`、指标折 `unknown`,本版随扫描改读两种写法一并收进表)。
|
|
65
|
-
*
|
|
65
|
+
* [ref]:第五词 `shell-gate-off` 随 core 7.34.0 的 off 车道一起退役(引擎侧零发射点),同批删 —— 它唯一的本仓消费者
|
|
66
66
|
* (「本 session 显式 bypass ⇒ 降级 info」那条回查腿与 `boot/session-shell-gate-registry.ts` 登记簿)一并删干净。所以这是「按实现亲读」的开集快照,不是 core 类型闭集——词表外的值原样进日志并标
|
|
67
67
|
* `classificationKnown:false`(指标标签折 `unknown`),不吞不编;与安装包的锁步由 test/boot-runner-deps-shared-base.test.ts
|
|
68
68
|
* 的 dist 扫描格钉住(两种发射写法都读;读不出词的经变量发射点本身红;core 加词/收进 d.ts 那天先红)。 */
|
|
69
69
|
export declare const CONFIG_ADVISORY_CLASSIFICATIONS: ReadonlySet<string>;
|
|
70
|
-
/**
|
|
70
|
+
/** [ref]:core 的 [ref] 前缀缓存**断裂**探测器交给宿主的根因**闭集**,以及每个词的日志级别。
|
|
71
71
|
* 闭集**不抄词**:词源直接取 core 公开导出的 `CacheBreakFinding["cause"]`(`@sema-agent/core` 根导出,
|
|
72
72
|
* `dist/index.d.ts`;实现在 `dist/core/cache-break-detector.d.ts`),于是 core 加词/删词 ⇒
|
|
73
73
|
* `Record<PromptCacheBreakCause, …>` 少键/多键 = **编译错**(CLAUDE.md [ref]「词表是闭集 + 穷举」)。
|
|
@@ -108,14 +108,14 @@ export interface RunnerDepsCtx {
|
|
|
108
108
|
toolApproval: ToolApprovalCoordinator | undefined;
|
|
109
109
|
sessionStore: ReturnType<typeof createSessionStore>;
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* [ref](test [ref] 核心发现①)—— **一条部署腿上的每一只 Runner 看同一只检查点店**。
|
|
112
112
|
*
|
|
113
113
|
* 本键从「差异键」升进{@link createSharedRunnerDeps 共享基座}。修前它**只**挂在 subRunner 上,主
|
|
114
114
|
* runner 靠 per-task `spec.checkpointStore` 拿店 —— 而 core 的 `run_workflow` 是挂在**主** Runner
|
|
115
|
-
* (`prepare-caps-and-workflow.js` 的 `runner: runnerSelf`;⚠️
|
|
116
|
-
*
|
|
115
|
+
* (`prepare-caps-and-workflow.js` 的 `runner: runnerSelf`;⚠️ [ref]:这里**不写 dist 行号** ——
|
|
116
|
+
* [ref] 票据当年引的那组坐标每版都在漂,复核一律按符号名搜)上的。
|
|
117
117
|
*
|
|
118
|
-
* ⚠️ **
|
|
118
|
+
* ⚠️ **[ref] 当初写下的病理有一半已被 core 7.14.0 消解,如实订正**([ref] 的 `CheckpointSeat` 重构):
|
|
119
119
|
* · **7.13.0 及以前**:`orchestration/workflow-primitives.js` 只在父侧
|
|
120
120
|
* `parentCheckpointStoreDisabled === true` 时给子代盖 `"disabled"`,**不把父侧真店透传给子代**
|
|
121
121
|
* ⇒ 子代的 `resolveCheckpointStore(spec, deps)` 落到主 runner 这一格 = `undefined`
|
|
@@ -164,9 +164,9 @@ export interface RunnerDepsCtx {
|
|
|
164
164
|
* `memoryEngineDir`:引擎从它解出每条腿的唯一豁免根(守卫集不再收 `dataRoot`)。开引擎时与 `memoryEngine.root` 同一只。 */
|
|
165
165
|
engineDataRoot: string;
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
167
|
+
* [ref](core 7.21.1)—— 记忆整理的**已解析座**(`boot/memory-consolidation.ts` 的
|
|
168
168
|
* `resolveConsolidationDriverSeat` 产物),在场 **iff** 整理阀门开着(`resolveConsolidationValve` 的判决:
|
|
169
|
-
* `MEMORY_CONSOLIDATION_DRIVER=on`,或未设而
|
|
169
|
+
* `MEMORY_CONSOLIDATION_DRIVER=on`,或未设而 [ref] / [ref] 出厂缺省派生成开)且记忆引擎接了线。
|
|
170
170
|
*
|
|
171
171
|
* 🔴 **一座两用,不是两次装配**:同一只座同时喂 admin 阀门的操作面引擎与这里的引擎面两席
|
|
172
172
|
* (`RunnerDeps.memoryConsolidation` + `memoryConsolidationDriver`)。第二次解析会让「谁在花钱」
|
|
@@ -174,12 +174,12 @@ export interface RunnerDepsCtx {
|
|
|
174
174
|
* 缺席 ⇒ 两席都**不写键** ⇒ 引擎那半场对 7.20.x 逐字节不变。
|
|
175
175
|
*/
|
|
176
176
|
consolidationSeat: ConsolidationDriverSeat | undefined;
|
|
177
|
-
/** [ref]②([ref] §2.1b,core 7.0.2 [ref] 件2)/
|
|
177
|
+
/** [ref]②([ref] §2.1b,core 7.0.2 [ref] 件2)/ [ref]:会话 capture opt-out 记录的**按平面取用源**
|
|
178
178
|
* (`backend.sessionCaptureRecords()`,main.ts 取**一次**、与四只 operator 面引擎同一只源 —— 全站同批
|
|
179
179
|
* 注入律,机器钉 = test/memory-capture-optout-lane.test.ts ②)。在场 ⇒ `capture:"off"` 声明与中途翻转
|
|
180
180
|
* verb 真持久;缺席 ⇒ core 读作「无店」,而 core 的 `captureCarrierUnsupported` 判据是**席位在不在**
|
|
181
181
|
* (不是「文件形能不能用」),叠上 `isRemoteExecutionEnv` 的接口形鸭子判 ⇒ 两条 ingress 都拒
|
|
182
|
-
* `config.memory_capture_unsupported`。
|
|
182
|
+
* `config.memory_capture_unsupported`。[ref] 起三条车道都供(SQL 双方言 twin / local 的控制面文件三腿),
|
|
183
183
|
* 所以缺席今天只剩一个成因:**记忆面暗**的 local 部署(那时 core 的 capture 腿本就不参与)。 */
|
|
184
184
|
sessionCaptureRecords: SessionCaptureRecordSource | undefined;
|
|
185
185
|
memorySyncRunner: MemorySyncRunner | undefined;
|
|
@@ -201,7 +201,7 @@ export interface RunnerDepsCtx {
|
|
|
201
201
|
runtimeCapsResolver: RunnerDeps["runtimeCapsResolver"];
|
|
202
202
|
/** [ref] per-edited-file rewind history (core `RunnerDeps.fileHistoryStore`; replaces the retired E19
|
|
203
203
|
* whole-tree snapshot seat — core 94632197 renamed the seat, not a coexistence). WIRING IS THE OPT-IN.
|
|
204
|
-
*
|
|
204
|
+
* [ref]:值 = `assembleFileHistory` 的店(后端在即在,与旋钮无关 —— 旋钮关的部署照样还原已存历史)。 */
|
|
205
205
|
fileHistoryStore: ReturnType<StoreBackend["fileHistory"]> | undefined;
|
|
206
206
|
/** [ref] 车二:持久化权限规则店 provider(core `RunnerDeps.permissionRuleStore`)。缺席 ⇒ 引擎的
|
|
207
207
|
* `permissionRules.storeWired` 如实报 false、`AskRequest.ruleOffers` 不铸(诚实缺席)。 */
|