@sema-agent/server 7.52.1 → 7.53.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/USAGE.md +2 -1
- package/dist/adoption/plan.d.ts +3 -3
- package/dist/adoption/quiesce.d.ts +1 -1
- package/dist/adoption/sql.d.ts +2 -2
- package/dist/adoption/wire.d.ts +1 -1
- package/dist/approval-ask-machine.d.ts +2 -2
- package/dist/approval-card.d.ts +18 -18
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval-hmac.d.ts +2 -2
- package/dist/approval-reconciler.d.ts +14 -14
- package/dist/approval.d.ts +2 -2
- package/dist/audit.d.ts +4 -4
- package/dist/auth-keys.d.ts +6 -6
- package/dist/bench/l8/artifact.d.ts +6 -1
- package/dist/bench/l8/artifact.js +2 -27
- package/dist/bench/l8/escape.d.ts +3 -3
- package/dist/bench/l8/index.d.ts +1 -1
- package/dist/bench/s1/arms.d.ts +3 -3
- package/dist/bench/s1/oracle.d.ts +2 -2
- package/dist/bench/s1/reviewer.d.ts +1 -1
- package/dist/bench/s1/row.d.ts +5 -5
- package/dist/bench/s1/runner-ctx.d.ts +3 -3
- package/dist/boot/config-center.d.ts +14 -7
- package/dist/boot/config-center.js +2 -0
- package/dist/boot/coordinators.d.ts +4 -4
- package/dist/boot/crash-last.d.ts +1 -1
- package/dist/boot/device-lane.d.ts +3 -3
- package/dist/boot/engine-lease.d.ts +4 -4
- package/dist/boot/governance-seams.d.ts +5 -5
- package/dist/boot/leader.d.ts +5 -5
- package/dist/boot/limit-sync.d.ts +1 -1
- package/dist/boot/memory-boundary.d.ts +5 -5
- package/dist/boot/memory-consolidation.d.ts +8 -2
- package/dist/boot/memory-consolidation.js +1 -0
- package/dist/boot/org-memory.d.ts +5 -5
- package/dist/boot/parked-revive-gate.d.ts +6 -6
- package/dist/boot/permission-rules-audit.d.ts +2 -2
- package/dist/boot/reapers.d.ts +8 -8
- package/dist/boot/resolve-spec.d.ts +4 -4
- package/dist/boot/retention-lane.d.ts +1 -1
- package/dist/boot/runner-deps.d.ts +33 -27
- package/dist/boot/runner-deps.js +2 -1
- package/dist/boot/runtime-caps.d.ts +4 -4
- package/dist/boot/session-faces.d.ts +1 -1
- package/dist/boot/shutdown.d.ts +10 -10
- package/dist/boot/side-query-lane.d.ts +14 -14
- package/dist/boot/stores.js +5 -0
- package/dist/boot/task-list-lane.d.ts +3 -3
- package/dist/boot/webfetch-summarize-lane.d.ts +9 -9
- package/dist/boot/workflow-orchestration.d.ts +1 -1
- package/dist/bounded-session-map.d.ts +1 -1
- package/dist/brain.d.ts +3 -3
- package/dist/budget.d.ts +3 -3
- package/dist/canonical-json.d.ts +53 -0
- package/dist/canonical-json.js +48 -0
- package/dist/capabilities/center-prompts.d.ts +13 -13
- package/dist/capabilities/collab-workflows.d.ts +1 -1
- package/dist/capabilities/hands-lane.d.ts +4 -4
- package/dist/capabilities/memory-notice.d.ts +4 -4
- package/dist/capabilities/prompt.d.ts +2 -2
- package/dist/capabilities/sandbox-file-send.d.ts +2 -2
- package/dist/capabilities/scenarios.d.ts +16 -16
- package/dist/capabilities/skills.d.ts +1 -1
- package/dist/capabilities/team.d.ts +3 -3
- package/dist/capabilities/tool-defer.d.ts +6 -6
- package/dist/config-catalog.d.ts +139 -0
- package/dist/config-catalog.js +556 -0
- package/dist/config-center/apply-effective.d.ts +20 -7
- package/dist/config-center/apply-effective.js +45 -0
- package/dist/config-center/apply-ledger.d.ts +6 -6
- package/dist/config-center/facade.d.ts +3 -2
- package/dist/config-center/hot-keys-registry.d.ts +2 -2
- package/dist/config-center/http-client.d.ts +5 -5
- package/dist/config-center/mcp-revocation.d.ts +6 -4
- package/dist/config-center/mcp-revocation.js +2 -12
- package/dist/config-center/restart-signal.d.ts +11 -1
- package/dist/config-center/restart-signal.js +1 -1
- package/dist/config-center/skills-mcp.d.ts +2 -2
- package/dist/config-center/stage-limits.d.ts +3 -3
- package/dist/config-center/types.d.ts +23 -19
- package/dist/config-invariants.d.ts +1 -1
- package/dist/config-provider.d.ts +2 -2
- package/dist/config-types.d.ts +140 -132
- package/dist/config.d.ts +22 -22
- package/dist/config.js +2 -1
- package/dist/degenerate-instrument.d.ts +1 -1
- package/dist/deployment-governance.d.ts +13 -13
- package/dist/device-store.d.ts +2 -2
- package/dist/device-ws-hub.d.ts +3 -3
- package/dist/device-ws-protocol.d.ts +3 -3
- package/dist/digest-form.d.ts +1 -1
- package/dist/elicitation.d.ts +1 -1
- package/dist/env-facts.d.ts +7 -7
- package/dist/execution-lane-caps.d.ts +5 -5
- package/dist/fleet/fleet-bus.d.ts +53 -53
- package/dist/fleet/fleet-reconciler.d.ts +2 -2
- package/dist/fleet/fleet-terminal-window.d.ts +1 -1
- package/dist/fleet/subagent-tail-bus.d.ts +3 -3
- package/dist/fleet-client.d.ts +3 -3
- package/dist/fleet-lease.d.ts +1 -1
- package/dist/hooks/branch-transcript.d.ts +2 -2
- package/dist/hooks/cc-agent-hook-prompt.d.ts +2 -2
- package/dist/hooks/cc-stop-prompt.d.ts +2 -2
- package/dist/hooks/hook-llm.d.ts +1 -1
- package/dist/hooks/hook-runner.d.ts +5 -5
- package/dist/http/active-run-conflict.d.ts +31 -33
- package/dist/http/active-run-conflict.js +4 -2
- package/dist/http/route-ctx.d.ts +22 -22
- package/dist/http/routes/a2a-serve.d.ts +2 -2
- package/dist/http/routes/admin-config-refresh.d.ts +1 -1
- package/dist/http/routes/admin-drain.d.ts +4 -4
- package/dist/http/routes/admin-memory-optout.d.ts +5 -5
- package/dist/http/routes/adoption.d.ts +1 -1
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/approvals-assistant.d.ts +6 -6
- package/dist/http/routes/approvals-assistant.js +4 -1
- package/dist/http/routes/capabilities.d.ts +1 -1
- package/dist/http/routes/capabilities.js +1 -0
- package/dist/http/routes/config-catalog.d.ts +28 -0
- package/dist/http/routes/config-catalog.js +42 -0
- package/dist/http/routes/diagnostics.d.ts +2 -2
- package/dist/http/routes/fleet.d.ts +1 -1
- package/dist/http/routes/images.d.ts +1 -1
- package/dist/http/routes/leader.d.ts +1 -1
- package/dist/http/routes/memory-bundle.d.ts +4 -4
- package/dist/http/routes/memory-compliance.d.ts +7 -7
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/memory-origin.d.ts +9 -9
- package/dist/http/routes/memory-policy.d.ts +3 -3
- package/dist/http/routes/notify-wake.d.ts +1 -1
- package/dist/http/routes/observability.d.ts +1 -1
- package/dist/http/routes/retention-ops.d.ts +1 -1
- package/dist/http/routes/rules.d.ts +3 -3
- package/dist/http/routes/run-memory-capture.d.ts +1 -1
- package/dist/http/routes/runs.d.ts +3 -3
- package/dist/http/routes/runs.js +12 -17
- package/dist/http/routes/session-sync.d.ts +2 -2
- package/dist/http/routes/sessions-list.d.ts +1 -1
- package/dist/http/routes/sessions.d.ts +9 -1
- package/dist/http/routes/sessions.js +60 -0
- package/dist/http/routes/shared-memory.d.ts +1 -1
- package/dist/http/routes/side-query.d.ts +1 -1
- 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 +1 -1
- package/dist/http/run-meta.d.ts +1 -1
- package/dist/http/send.d.ts +6 -6
- package/dist/http/server.d.ts +84 -67
- package/dist/http/server.js +20 -10
- package/dist/http/sse-lifecycle.d.ts +1 -1
- package/dist/http/sse-log.d.ts +6 -6
- package/dist/http/verify-rounds.d.ts +3 -3
- package/dist/http/wire-gate.d.ts +2 -2
- package/dist/http/wire-types.d.ts +38 -38
- package/dist/key-resolver.d.ts +1 -1
- package/dist/leader/diffout.d.ts +2 -2
- package/dist/leader/diffup.d.ts +1 -1
- package/dist/leader/endpoint.d.ts +1 -1
- package/dist/leader/fanout.d.ts +6 -6
- package/dist/leader/grader-env-factory.d.ts +1 -1
- package/dist/leader/leader.d.ts +12 -12
- package/dist/leader/merge.d.ts +3 -3
- package/dist/leader/planner.d.ts +5 -5
- package/dist/leader/repair-oracle.d.ts +1 -1
- package/dist/leader/wire.d.ts +9 -9
- package/dist/lsp/manager.d.ts +2 -2
- package/dist/lsp/types.d.ts +1 -1
- package/dist/lsp/ws-transport.d.ts +2 -2
- package/dist/main.js +12 -2
- package/dist/mcp-content-origin.d.ts +1 -1
- package/dist/memory-bundle-engine.d.ts +5 -3
- package/dist/memory-bundle-engine.js +2 -2
- package/dist/memory-operator-faces.d.ts +41 -11
- package/dist/memory-operator-faces.js +12 -0
- package/dist/memory-origin-fence.d.ts +1 -1
- package/dist/memory-origin-fence.js +2 -13
- package/dist/memory-posture.d.ts +6 -6
- package/dist/memory-scope.d.ts +7 -7
- package/dist/model-select.d.ts +5 -5
- package/dist/observability/cost-quota.d.ts +6 -6
- package/dist/observability/cost-taxonomy.d.ts +2 -2
- package/dist/observability/fail-open.d.ts +1 -5
- package/dist/observability/fail-open.js +0 -4
- package/dist/observability/metrics.d.ts +1 -1
- package/dist/observability/prompt-manifest.d.ts +8 -8
- package/dist/observability/rate-limit.d.ts +2 -2
- package/dist/observability/secret-env-scrub.d.ts +1 -1
- package/dist/observability/tool-trace.d.ts +1 -1
- package/dist/orchestration/hardened-vm-runner.d.ts +6 -6
- package/dist/orchestration/hardened-vm-worker-runner.d.ts +1 -1
- package/dist/orchestration/subagent-steer.d.ts +3 -3
- package/dist/orchestration/workflow-agent-steer.d.ts +1 -1
- package/dist/orchestration/workflow-completion-inbox.d.ts +6 -6
- package/dist/orchestration/workflow-notify-journal.d.ts +6 -6
- package/dist/parent-watch.d.ts +1 -1
- package/dist/parked-decide.d.ts +11 -11
- package/dist/plan-cache-probe.d.ts +1 -1
- package/dist/plugins/adoption-log-sql.d.ts +4 -4
- package/dist/plugins/approval-ask-store-memory.d.ts +1 -1
- package/dist/plugins/approval-ask-store-memory.js +12 -0
- package/dist/plugins/approval-ask-store-sql.d.ts +39 -17
- package/dist/plugins/approval-ask-store-sql.js +23 -6
- package/dist/plugins/approval-payload-fingerprint.d.ts +23 -0
- package/dist/plugins/approval-payload-fingerprint.js +23 -0
- package/dist/plugins/background-agent-store-sql.d.ts +8 -8
- package/dist/plugins/background-shell-support.d.ts +12 -12
- package/dist/plugins/blob-backend.d.ts +3 -3
- package/dist/plugins/breaker-state-sql.d.ts +3 -3
- package/dist/plugins/caching-session-store.d.ts +6 -6
- package/dist/plugins/checkpoint-store-sql.d.ts +162 -66
- package/dist/plugins/checkpoint-store-sql.js +76 -33
- package/dist/plugins/device-store-sql.d.ts +4 -3
- package/dist/plugins/e2b-orphan-reclaim.d.ts +3 -3
- package/dist/plugins/file-history-store-sql.d.ts +9 -8
- package/dist/plugins/file-run-store.d.ts +27 -27
- package/dist/plugins/fork-routing-session-store.d.ts +9 -9
- package/dist/plugins/image-bake-store-sql.d.ts +1 -1
- package/dist/plugins/image-index-sql.d.ts +2 -2
- package/dist/plugins/k8s-bg-scripts.d.ts +1 -1
- package/dist/plugins/k8s-exec-protocol.d.ts +1 -1
- package/dist/plugins/leader-run-store-sql.d.ts +1 -1
- package/dist/plugins/local-checkpoint-store.d.ts +26 -17
- package/dist/plugins/local-checkpoint-store.js +21 -11
- package/dist/plugins/local-session-store.d.ts +5 -5
- package/dist/plugins/mailbox-store-sql.d.ts +6 -6
- package/dist/plugins/memory-embedder-fingerprint.d.ts +2 -2
- package/dist/plugins/memory-engine-pg.d.ts +1 -1
- package/dist/plugins/memory-engine-tidb.d.ts +1 -1
- package/dist/plugins/memory-key-guards.d.ts +3 -3
- package/dist/plugins/memory-optout-grant-store-sql.d.ts +10 -10
- package/dist/plugins/memory-origin-law.d.ts +13 -13
- package/dist/plugins/memory-run-store.d.ts +12 -12
- package/dist/plugins/outcome-ledger-sql.d.ts +3 -3
- package/dist/plugins/permission-rule-store-file.d.ts +3 -3
- package/dist/plugins/permission-rule-store-sql.d.ts +38 -33
- package/dist/plugins/permission-rule-store-sql.js +7 -12
- package/dist/plugins/pg-cost-quota.d.ts +2 -2
- package/dist/plugins/pg-pool.js +5 -0
- package/dist/plugins/pg-query.d.ts +1 -1
- package/dist/plugins/pg-rate-limiter.d.ts +2 -2
- package/dist/plugins/pg-session-storage.d.ts +9 -9
- package/dist/plugins/remote-env-adb.d.ts +1 -1
- package/dist/plugins/remote-env-device.d.ts +2 -2
- package/dist/plugins/remote-env-e2b.d.ts +11 -11
- package/dist/plugins/remote-env-file-error.d.ts +2 -2
- package/dist/plugins/remote-env-host.d.ts +10 -10
- package/dist/plugins/remote-env-k8s.d.ts +7 -7
- package/dist/plugins/remote-env-local-docker.d.ts +1 -1
- package/dist/plugins/remote-env-ssh.d.ts +9 -9
- package/dist/plugins/remote-scratchpad.d.ts +1 -1
- package/dist/plugins/resume-anchor-store-sql.d.ts +1 -1
- package/dist/plugins/retention-lane-store-sql.d.ts +2 -2
- package/dist/plugins/retention-store-sql.d.ts +11 -11
- package/dist/plugins/roster-store-sql.d.ts +5 -5
- package/dist/plugins/run-store-sql.d.ts +12 -12
- package/dist/plugins/scheduler-support.d.ts +1 -1
- package/dist/plugins/send-user-file.d.ts +1 -1
- package/dist/plugins/session-capture-record-store-sql.d.ts +99 -0
- package/dist/plugins/session-capture-record-store-sql.js +110 -0
- package/dist/plugins/session-placement.d.ts +1 -1
- package/dist/plugins/session-policy-store-sql.d.ts +2 -2
- package/dist/plugins/session-store.d.ts +3 -3
- package/dist/plugins/shared-memory-store-sql.d.ts +5 -5
- package/dist/plugins/sql-driver.d.ts +7 -7
- package/dist/plugins/sql-errors.d.ts +2 -2
- package/dist/plugins/sql-escape.d.ts +1 -1
- package/dist/plugins/sql-row-helpers.d.ts +1 -1
- package/dist/plugins/store-backend.d.ts +32 -19
- package/dist/plugins/store-backend.js +4 -0
- package/dist/plugins/store-contracts.d.ts +9 -9
- package/dist/plugins/task-list-store-sql.d.ts +3 -3
- package/dist/plugins/tidb-cost-quota.d.ts +3 -3
- package/dist/plugins/tidb-pool.js +9 -0
- package/dist/plugins/tidb-rate-limiter.d.ts +2 -2
- package/dist/plugins/tidb-session-storage.d.ts +2 -2
- package/dist/plugins/tidb-session-store.d.ts +11 -11
- package/dist/plugins/tool-result-store-sql.d.ts +8 -8
- package/dist/plugins/usage-window-store-sql.d.ts +3 -3
- package/dist/plugins/web-search.d.ts +7 -7
- package/dist/plugins/workflow-journal-store-sql.d.ts +6 -6
- package/dist/plugins/workflow-run-store-sql.d.ts +1 -1
- package/dist/plugins/write-behind-counter.d.ts +6 -6
- package/dist/principal-jwt.d.ts +2 -2
- package/dist/project-memory.d.ts +1 -1
- package/dist/prompts-domain-validate.d.ts +8 -8
- package/dist/question.d.ts +3 -3
- package/dist/resource-suspend.d.ts +4 -4
- package/dist/resource-window.d.ts +3 -3
- package/dist/router/route-orchestration.d.ts +1 -1
- package/dist/rules-consent.d.ts +48 -40
- package/dist/run-local.d.ts +5 -5
- package/dist/runs.d.ts +19 -19
- package/dist/runtime-caps-resolver.d.ts +6 -6
- package/dist/runtime-governance.d.ts +7 -7
- package/dist/security.d.ts +13 -13
- package/dist/session-leaf-bus.d.ts +1 -1
- package/dist/session-sync-content.d.ts +4 -4
- package/dist/session-sync-kernel.d.ts +2 -2
- package/dist/session-sync.d.ts +13 -13
- package/dist/session-titler.d.ts +1 -1
- package/dist/session-watch.d.ts +3 -3
- package/dist/shared-memory-scope-authorizer.d.ts +4 -4
- package/dist/sighup-idle.d.ts +1 -1
- package/dist/spec-fields.d.ts +20 -20
- package/dist/ssh-host-key.d.ts +5 -5
- package/dist/store-live-probe.d.ts +2 -2
- package/dist/task-cwd.d.ts +11 -11
- package/dist/task-mcp.d.ts +5 -5
- package/dist/task-settings.d.ts +35 -35
- package/dist/task-workflow.d.ts +3 -3
- package/dist/text-bidi.d.ts +1 -1
- package/dist/tool-approval.d.ts +171 -160
- package/dist/tool-approval.js +33 -28
- package/dist/trace/core-keyset-guard.d.ts +19 -5
- package/dist/trace/engine-notice-wire.d.ts +6 -6
- package/dist/trace/injection-tier.d.ts +2 -2
- package/dist/trace/ledger-events.d.ts +3 -3
- package/dist/trace/ledger-sink.d.ts +7 -7
- package/dist/trace/project.d.ts +30 -30
- package/dist/turn-activity.d.ts +4 -4
- package/dist/usage-analytics.d.ts +1 -1
- package/dist/wall-clock-jump-guard.d.ts +3 -3
- package/package.json +5 -5
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* ONE standalone oracle, shared by ALL three arms; ONLY the profile (arms.ts) differs. The oracle is:
|
|
5
5
|
* - OBJECTIVE: it runs `runExecGate` (real exit codes; null-exit never passes; an empty suite never passes —
|
|
6
6
|
* `exec-gate.d.ts`). There is NO model/LLM parameter ANYWHERE in this type (objective-oracle discipline,
|
|
7
|
-
*
|
|
7
|
+
* [ref] §2.2.1 — the LLM is a GATE inside an arm, never the MEASURE in the numerator).
|
|
8
8
|
* - DECORRELATED + ANTI-REWARD-HACK: it grades in a DISTINCT grader env (`ctx.newGraderEnv()`), never the
|
|
9
9
|
* worker's own env — the SAME isolation the repair-loop §5.1 identity check enforces.
|
|
10
10
|
* - HIDDEN + RESTORED-BEFORE-SCORING: the worker never sees `task.hiddenTestFiles`; the oracle WRITES them into
|
|
11
|
-
* the grader checkout, overwriting any worker-authored same-named file (anti-rewrite,
|
|
11
|
+
* the grader checkout, overwriting any worker-authored same-named file (anti-rewrite, [ref] §2.2).
|
|
12
12
|
*
|
|
13
13
|
* The repair leg needs core's `RepairOracle = (graderEnv, evidence) => OracleResult` shape — a DIFFERENT
|
|
14
14
|
* signature. `repair-oracle-adapter.ts` wraps this standalone oracle into that closure (do NOT pass `runOracle`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* S1 value-verdict harness — the DETERMINISTIC RUBRIC REVIEWER (the C2 model). SPEC-S1-value-harness.md §9 +
|
|
3
|
-
*
|
|
3
|
+
* [ref] §3.4. PURE / deterministic, NO model call.
|
|
4
4
|
*
|
|
5
5
|
* 🔴 WHY A FIXED RUBRIC, NOT AN LLM REVIEWER: an LLM reviewer reintroduces judge noise AND makes C2
|
|
6
6
|
* (human-review wall-time) non-reproducible. The reviewer is a fixed-checklist approval decider whose
|
package/dist/bench/s1/row.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* S1 value-verdict harness — the RawRow `s1.v1` CONTRACT (
|
|
2
|
+
* S1 value-verdict harness — the RawRow `s1.v1` CONTRACT ([ref] metrics layer).
|
|
3
3
|
*
|
|
4
|
-
* 🔴 RawRow IS core's `RunRecord` (the
|
|
5
|
-
* core ships the
|
|
4
|
+
* 🔴 RawRow IS core's `RunRecord` (the [ref] metric input) + the OUT-OF-BAND provenance the harness needs.
|
|
5
|
+
* core ships the [ref] metrics layer via the SUBPATH export `@sema-agent/core/bench`(1.111.0 首发;L17:版本锚随装机 core 走,见 S1_CORE_VERSION)
|
|
6
6
|
* The harness no longer mirrors the types — it IMPORTS the real `RunRecord` /
|
|
7
7
|
* `OracleVerdicts` / `DeliveryDecision` / `CoreStatsSubset` / `InterceptCounterfactual` and re-expresses
|
|
8
8
|
* `RawRow` as `RunRecord & { schemaVersion; meta? }`. A `RawRow[]` is therefore assignable to `RunRecord[]`,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* 🔴 OWNERSHIP SPLIT (anti-laundering — load-bearing):
|
|
16
16
|
* - The HARNESS (this file + arms.ts) is the PRODUCER: it emits ONE conformant row per (task × arm × seed) with
|
|
17
17
|
* the raw measurement inputs (oracle / stats / delivery / counterfactual) and an HONEST `runStatus`.
|
|
18
|
-
* - The METRIC TOOL (core `buildReport`,
|
|
18
|
+
* - The METRIC TOOL (core `buildReport`, [ref]) does the CORRECTLY/INCORRECTLY/UNVERIFIED-withheld split via
|
|
19
19
|
* the counterfactual JOIN + the Simpson grouping. The harness NEVER credits a bare withhold as value.
|
|
20
20
|
* - The NUMERATOR is ONLY DELIVERED-CORRECT, and the OBJECTIVE oracle (oracle.ts) is the measure — an LLM-judge
|
|
21
21
|
* is NEVER in the numerator (it may only be a GATE inside an arm).
|
|
@@ -90,7 +90,7 @@ export declare function rowToJsonl(row: RawRow): string;
|
|
|
90
90
|
/** Serialize a batch of RawRows to a JSONL document (one row per line, trailing newline). */
|
|
91
91
|
export declare function rowsToJsonl(rows: RawRow[]): string;
|
|
92
92
|
/**
|
|
93
|
-
* 🔴 Wire the REAL
|
|
93
|
+
* 🔴 Wire the REAL [ref] metric tool. `buildReport` (core 1.111.0 `@sema-agent/core/bench`) is the
|
|
94
94
|
* value-verdict JOIN: it SCORES only `scored` rows, GROUPS by `(suiteVersion, taskId, archetype, valueDimension,
|
|
95
95
|
* arm)` (the Simpson guard), folds each cell, splits the withhold bucket by the counterfactual, and emits the
|
|
96
96
|
* `ValueJudgmentReport` (groupedCells / comparisons / cells / pareto / excluded). A `RawRow[]` is assignable to its
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Runner ingredients (config / brain / pricing), the SAME budget for every arm, and the injected deterministic
|
|
4
4
|
* clock that makes C2 (human-review wall-time) reproducible.
|
|
5
5
|
*
|
|
6
|
-
* 🔴 THE §3.2 RED LINE (
|
|
6
|
+
* 🔴 THE §3.2 RED LINE ([ref]'s #1 confound): every leaf TaskSpec across all 3 arms carries the SAME
|
|
7
7
|
* `limits.{ maxTokens, maxCostUsd, maxTurns }` (core ≥5.8: budget keys live ONLY in `limits` — a top-level
|
|
8
8
|
* `maxTokens`/`maxCostUsd` is a silently-unread dead key), and TEAM's per-worker budgets sum to ≤ the solo budget — so no
|
|
9
9
|
* arm can win on a bigger pie. `assertBudgetMatch` (below) is the build-time guard the shape test runs.
|
|
@@ -36,7 +36,7 @@ export interface RowBudget {
|
|
|
36
36
|
export declare function budgetDescriptor(budget: BenchBudget, arm: string, teamWorkerBudgetSumUsd?: number): RowBudget;
|
|
37
37
|
/** The single budget every arm shares (the §3.2 red line). All scalars are the SAME across SOLO/SUP/TEAM. */
|
|
38
38
|
export interface BenchBudget {
|
|
39
|
-
/** SAME base model all arms (
|
|
39
|
+
/** SAME base model all arms ([ref] §3.2 — decorrelation is a separate axis, not the value axis). */
|
|
40
40
|
modelId: string;
|
|
41
41
|
/** `TaskSpec.limits.maxTokens` — SAME all arms. */
|
|
42
42
|
maxTokens: number;
|
|
@@ -52,7 +52,7 @@ export interface BenchBudget {
|
|
|
52
52
|
/**
|
|
53
53
|
* An injectable deterministic clock (SPEC §2). EVERY Runner in EVERY arm is built with `now: ctx.now`, and the
|
|
54
54
|
* reviewer's modeled think-time advances `advanceClock(ms)` — so `stats.humanReview.totalWaitMs` is reproducible
|
|
55
|
-
* and NEVER consumes real wall-time (`RunnerDeps.now`, core types.d.ts:1002 /
|
|
55
|
+
* and NEVER consumes real wall-time (`RunnerDeps.now`, core types.d.ts:1002 / [ref] §4.3 flaky-guard).
|
|
56
56
|
*
|
|
57
57
|
* 🔴 CLOCK-ADVANCE OWNERSHIP (review #10 — HARNESS-OWNS-CLOCK, the single fold point per arm): the modeled review
|
|
58
58
|
* wait is folded into ctx.clock by the HARNESS exactly once per arm — SUP in driveSupSuspendResume (per leg), TEAM
|
|
@@ -40,9 +40,9 @@ export interface ConfigCenterRuntime {
|
|
|
40
40
|
/** per-model key resolver 首建(原位调用,见文件头注 5)。 */
|
|
41
41
|
initKeyResolver(): void;
|
|
42
42
|
/** 60s refresh cadence + boot-deferred 到货续接。
|
|
43
|
-
* `limitSync`(
|
|
43
|
+
* `limitSync`([ref] 批1)= 恒构造的两只限额座的换代口:commit 之后**零 await 内**推一把,与 pricing /
|
|
44
44
|
* keyResolver 那两件派生重建同族(缺席 = 这条腿本部署没装配,例如 run-local)。
|
|
45
|
-
* `swapRunnerModels`(core 5.49,[
|
|
45
|
+
* `swapRunnerModels`(core 5.49,[ref]①)= 模型面永久热的换装口:plane 变更候选在 commit 前喂给
|
|
46
46
|
* 全部 boot Runner 原子换代;在场 ⇒ models-tiers defer/restart 臂退役,缺席 ⇒ 旧 defer 行为逐字保留。 */
|
|
47
47
|
startRefreshLoop(a: {
|
|
48
48
|
runnerTierFrozen: boolean;
|
|
@@ -53,13 +53,13 @@ export interface ConfigCenterRuntime {
|
|
|
53
53
|
tiers: Record<string, string>;
|
|
54
54
|
}) => void;
|
|
55
55
|
}): void;
|
|
56
|
-
/**
|
|
56
|
+
/** [ref]-2:停刷新环(hardShutdown 收尾链;幂等,未起环时 no-op)。 */
|
|
57
57
|
stopRefreshLoop(): void;
|
|
58
|
-
/**
|
|
58
|
+
/** [ref](core 5.50 [ref]):mid-turn MCP 撤销台账读口,喂 `RunnerDeps.mcpRevocations` 席。
|
|
59
59
|
* **取走即声明接线**——调用本方法后,restart 信号的 mcp 片对纯删除向豁免(台账即时承接);
|
|
60
60
|
* 不取 ⇒ 旧 restart 语义逐字保留(fail-closed)。 */
|
|
61
61
|
takeMcpRevocations(): import("../config-center/mcp-revocation.js").McpRevocationLedger;
|
|
62
|
-
/**
|
|
62
|
+
/** [ref] 诊断投影:当前被撤销的 MCP 服务器名单;纯 env 部署(无配置管道)= undefined(additive 纪律)。 */
|
|
63
63
|
mcpRevocationState(): {
|
|
64
64
|
revoked: string[];
|
|
65
65
|
} | undefined;
|
|
@@ -80,11 +80,18 @@ export interface ConfigCenterRuntime {
|
|
|
80
80
|
since: number;
|
|
81
81
|
blocked?: string[];
|
|
82
82
|
} | undefined;
|
|
83
|
-
/**
|
|
83
|
+
/** [ref] 世代账:/health 的 target/applied/失败持续时长三键 + 诊断端点的 configApply 段(同一份读数)。
|
|
84
84
|
* `undefined` = 本部署没有配置管道(纯 env worker)⇒ 两个读面的形状**逐字不变**(additive 纪律)。 */
|
|
85
85
|
configApplyState(): ConfigApplyLedgerView | undefined;
|
|
86
|
+
/** DESIGN-278 §5 S2([ref]):center **当前在管**的 ServiceConfig 键集 —— `GET /v1/config/catalog` 判
|
|
87
|
+
* `effectiveLane` 的 center 半场。投影自最近一次成功应用的候选(`latestEffective`,LKG/refresh 同一
|
|
88
|
+
* 份推进点;判据单源 = apply-effective.ts `centerManagedConfigKeys`)。`undefined` = 没有配置管道。
|
|
89
|
+
* ⚠️ 部分应用窗(codex R2-F2 登记):某组整拒时 live config 已吃进其它组而 latestEffective 不推进,
|
|
90
|
+
* 该窗内本键集滞后一代 —— 目录端点只据此报**归因位**(managedNow),值仍是活 config 实算;
|
|
91
|
+
* 逐键 applied 账(设计稿 §8-7)收口这半格。 */
|
|
92
|
+
centerManagedKeys(): ReadonlySet<string> | undefined;
|
|
86
93
|
/**
|
|
87
|
-
*
|
|
94
|
+
* [ref] 追加件:手动触发**一次既有** refresh 拍(`POST /v1/admin/config/refresh` 的实现面)。
|
|
88
95
|
*
|
|
89
96
|
* 一拍在飞 ⇒ **join** 它(并发调用共享同一拍,绝不并发双拍、绝不另铸拉取路径);返回时该拍已落地,
|
|
90
97
|
* 所以调用方紧接着读 `configApplyState()` 就是本次触发的结果。
|
|
@@ -12,6 +12,7 @@ import { validatePromptsDomain, CORE_ENGINE_VERSION } from "../prompts-domain-va
|
|
|
12
12
|
import { centerScenarios, centerScenarioDetails } from "../capabilities/scenarios.js";
|
|
13
13
|
import { configLkgEnabled } from "../config.js";
|
|
14
14
|
import { defaultLkgPath, defaultSkillCacheDir, saveLkg, loadLkg } from "../config-lkg.js";
|
|
15
|
+
import { centerManagedConfigKeys } from "../config-center/apply-effective.js";
|
|
15
16
|
import { createConfigProvider, raceBootFetch, BOOT_FETCH_DEFERRED } from "../config-provider.js";
|
|
16
17
|
import { createKeyResolver } from "../key-resolver.js";
|
|
17
18
|
import { ensureSealedKeyStore, reportExecutionPublicKey } from "../sealed-key.js";
|
|
@@ -354,6 +355,7 @@ export async function createConfigCenterRuntime(ctx) {
|
|
|
354
355
|
restartState: () => pendingRestart,
|
|
355
356
|
planeDeferredState: () => planeDeferredNoHandoff,
|
|
356
357
|
configApplyState: () => (configProvider ? applyLedger.view() : undefined),
|
|
358
|
+
centerManagedKeys: () => (configProvider ? centerManagedConfigKeys(latestEffective) : undefined),
|
|
357
359
|
async refreshNow() {
|
|
358
360
|
if (!manualRefresh)
|
|
359
361
|
return "not-wired";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] A10:composition root 分段 —— 进程内活体 HITL 协调器 + SendUserFile 工具面。
|
|
3
3
|
*
|
|
4
4
|
* 纯搬运:函数体逐字来自 `main.ts`(原 1443-1518 行),缩进不变;新增的只有 import 与包壳。
|
|
5
5
|
*
|
|
@@ -21,13 +21,13 @@ export interface LiveCoordinatorsCtx {
|
|
|
21
21
|
logger: Logger;
|
|
22
22
|
backend: StoreBackend | undefined;
|
|
23
23
|
sendUserFileTaskEnvs: TaskEnvRegistry | undefined;
|
|
24
|
-
/**
|
|
24
|
+
/** [ref] 车二:持久化权限规则的同意车道(main.ts 与 `RunnerDeps.permissionRuleStore` **同源**于
|
|
25
25
|
* `backend.permissionRule()` 的同一个返回值)。在场 ⇒ ask 帧投 `ruleOffers` + 回决可兑付。 */
|
|
26
26
|
ruleConsent: RuleConsentLane | undefined;
|
|
27
|
-
/**
|
|
27
|
+
/** [ref](F-1):卡批规则的 project root 解析器(语义单点=task-cwd.ts `cardRuleScopeRoot`;main.ts
|
|
28
28
|
* 用 per-session cwd 登记簿 + config 铸)。缺席 ⇒ 不铸 scope,卡批规则落 core 的 global 缺省。 */
|
|
29
29
|
ruleScopeRootFor: ((sessionId: string | undefined) => string | undefined) | undefined;
|
|
30
|
-
/**
|
|
30
|
+
/** [ref]:PARKED 行迟到决议的赎回席**取值口**(晚绑 —— 席本体是 `createHttpServer` 的产物,而本段
|
|
31
31
|
* 必须排在它之前;同款 holder 先例 = reaper 的 `getRunDenySweep`)。取到 undefined ⇒ 那条臂逐字回落
|
|
32
32
|
* 修前 404(partial 部署安全)。缺席(不传本键)⇒ 协调器整条迟到腿的 PARKED 臂恒 404。 */
|
|
33
33
|
getParkedRedeem?: () => ParkedAskRedeem | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] A10 分段 —— **device lane 的装配件**(device-executor-lane-v2 §4.6/§4.7/§5,车A-4)。
|
|
3
3
|
*
|
|
4
4
|
* 一处建齐三件活对象:**店**(四表双库的 `DeviceStore`)→ **准入链**(`DeviceEnrollment`,含跨副本
|
|
5
5
|
* 限速座)→ **WS 汇聚端**(`DeviceWsHub`)。三件的依赖是单向的(hub 吃 store+enrollment),所以它们
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* 🔴 本模块**不**做车道选择:`REMOTE_EXEC=device` 与否由调用方判(main.ts)。它只回答一件事 ——
|
|
13
13
|
* 「这台机器上,device lane 的三件装配得起来吗」。装不起来就返回 `undefined`,由
|
|
14
|
-
* {@link assertDeviceLaneWired} 响亮拒启(
|
|
14
|
+
* {@link assertDeviceLaneWired} 响亮拒启([ref]:执行车道上没有静默降级臂)。
|
|
15
15
|
*/
|
|
16
16
|
import { type DeviceEnrollRateLimiter, type DeviceEnrollment } from "../device-enrollment.js";
|
|
17
17
|
import type { DeviceStore } from "../device-store.js";
|
|
@@ -70,7 +70,7 @@ export declare function createDeviceLane(ctx: DeviceLaneCtx): DeviceLane | undef
|
|
|
70
70
|
* 建表失败 ⇒ `backend=undefined` + 一条 warn 就继续启动。那次启动里 device lane 的四表整个不在,
|
|
71
71
|
* 而 `boot/execution-env.ts` 的第七臂拿不到三件 ⇒ `executionEnvFactory` 落 `undefined` ⇒ core 拿
|
|
72
72
|
* `StubExecutionEnv`:**一台自称在员工设备上执行的 worker 实际在自己进程里跑,而且回执同形**。
|
|
73
|
-
* 那正是
|
|
73
|
+
* 那正是 [ref]「执行车道禁静默降级」点名的样板病,也正是 A-1 那条临时门当初要拦的东西 —— 换执法点,
|
|
74
74
|
* 不是取消执法。
|
|
75
75
|
*
|
|
76
76
|
* 抛而不是 warn:降级的代价由用户承担(他以为命令跑在自己机器上、看到的却是云上一个空目录的结果)。
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref](黑板 [ref]②,cli [ref] 认领消费)—— 引擎**附着租约自退**。
|
|
3
3
|
*
|
|
4
4
|
* ## 防的是什么
|
|
5
5
|
*
|
|
6
6
|
* 壳自 spawn 引擎的本机形里,壳正常退出之后引擎**继续活着**:占端口、占库连接池、占模型配额,而且
|
|
7
|
-
*
|
|
7
|
+
* 用户已经离开了、再没有人会关心它。[ref] 的 parent 监视只覆盖「生我的那个 pid 没了」这一形,而
|
|
8
8
|
* **多壳共享一只引擎**时它结构性地问错了问题 —— 首壳退了 peer 还在用,监视父 pid 要么误杀要么永不触发。
|
|
9
9
|
* 本件问的是那个真正的问题:**还有没有人附着**。
|
|
10
10
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* 1. **opt-in**:`ENGINE_AUTO_EXIT` 默认 **false** ⇒ 整件不装配(`boot/shutdown.ts` 连本函数都不调)。
|
|
14
14
|
* 服务器部署形逐字零变化 —— 一台 k8s 上的 replica 半夜没人用不是「该退了」,是**正常的低谷**。
|
|
15
15
|
* 壳 spawn 形由壳在 spawn 时显式注入 `true`。**部署级旋钮无条件生效**:它不派生自任何客户端表态
|
|
16
|
-
* (本仓 operator-knob
|
|
16
|
+
* (本仓 operator-knob 铁律,[ref] 同病两犯史),`ENGINE_LINGER_MS` 的坏值校验也不挂在本键的表态上。
|
|
17
17
|
* 2. **自退判据 = 三合取,且必须持续满 `lingerMs`**:
|
|
18
18
|
* · 附着租约集空(`attachedStreams() === 0`);
|
|
19
19
|
* · 无在飞 run(`inflight() === 0` —— **与 /health 的 `inflight` 同一只 getter**,不另立第二判据);
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* 4. **退出 = 走 `drain`**,即 `boot/shutdown.ts` 里 SIGTERM 用的那一条 `drainThenShutdown`:拒新提交
|
|
28
28
|
* (503+Retry-After)→ 候在途腿跑完 → `hardShutdown`。in-flight run 的结算 / park 语义与人工停机
|
|
29
29
|
* **逐字一致**。本模块自己**从不** `process.exit`。
|
|
30
|
-
* 5. **crash-last 判别位**([
|
|
30
|
+
* 5. **crash-last 判别位**([ref] ④「flush 判别位标 auto-exit 非崩溃」):走上面那条受控退,
|
|
31
31
|
* `hardShutdown` 一进来就 `clearCrashLast` ⇒ 遗言文件被删 ⇒「文件在场 ⇔ 上次退出=崩溃」这条契约
|
|
32
32
|
* 对自退**自动成立**。刻意**不**另写一条 `reason:"auto-exit"` 的遗言行:那会把该文件的语义从
|
|
33
33
|
* 「崩溃判别位」稀释成「上次退出记录」,而运维读它就是为了判前者(见 `crash-last.ts` 顶注)。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] 件B/C/D([ref] 件1)—— 三个**部署治理座席**的装配点:把 core 5.13.0 起就存在、本仓一直
|
|
3
3
|
* 零接线的三个 `RunnerDeps` seam 接上。
|
|
4
4
|
*
|
|
5
5
|
* · 件B `compliancePostureResolver` —— per-principal 合规档位否决(闭集 profile × 闭集 capability;
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* ## 真源:为什么三件都只接 env
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* [ref] §1 的三层分工表里,center 那一列对 B/C/D 写的都是「**新建**」——中心侧的档位真源 / 策略
|
|
13
13
|
* 真源 / 保留期真源**至今不存在**。接一条 center 腿等于造一个恒缺席的假面(件A 的 org 目录能接 center,
|
|
14
|
-
* 是因为那一面真被建出来了)。所以本装配点的供数只有部署配置面,并且这**恰好**是
|
|
14
|
+
* 是因为那一面真被建出来了)。所以本装配点的供数只有部署配置面,并且这**恰好**是 [ref] §4.3 对
|
|
15
15
|
* 「谁能解锁」的裁定:锁是**配置期物**,铸锁真源只有 center governance 域与部署 env,二者都是 operator
|
|
16
16
|
* 控制的配置面,自带各自既有鉴权 —— 「谁能解锁」≡「谁能改部署配置」,不引入新鉴权面。
|
|
17
17
|
*
|
|
@@ -72,11 +72,11 @@ export interface GovernanceSeamsCtx {
|
|
|
72
72
|
store: object | undefined;
|
|
73
73
|
}>;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* [ref] 车1 —— **本 build 是否真的接了留存执行器**(sweep lane;车2 的 `startRetentionLane()`)。
|
|
76
76
|
* 缺席 = `false`。
|
|
77
77
|
*
|
|
78
78
|
* 🔴 为什么这一位必须存在(codex 交叉复审 R2-[critical],验真后修):core 的
|
|
79
|
-
* `assertRetentionCapability`
|
|
79
|
+
* `assertRetentionCapability` 只读**店的声明位**。[ref] 车1 让三只 SQL 店如实声明了 `"managed"`
|
|
80
80
|
* (它们的行确实由托管留存删),于是那道门从此**放行** locked policy —— 可执行器还在车2 手里。
|
|
81
81
|
* 两者之间的窗口如果什么都不做,后果正是本仓最忌的那种:部署自述「策略已受管」、审计与能力面
|
|
82
82
|
* 也这么说,而**没有任何东西在删数据**;车1 之前那条 `retention_policy_not_executed` 的响亮 warn
|
package/dist/boot/leader.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] A10:composition root 分段 —— v2 leader endpoint([ref] + [ref])。
|
|
3
3
|
*
|
|
4
4
|
* 纯搬运:函数体逐字来自 `main.ts`(原 3094-3171 行),缩进不变;新增的只有 import 与包壳。
|
|
5
5
|
*
|
|
@@ -22,10 +22,10 @@ export interface LeaderCtx {
|
|
|
22
22
|
toolResultStore: ToolResultStoreFull | undefined;
|
|
23
23
|
sessionStore: ReturnType<StoreBackend["session"]>;
|
|
24
24
|
checkpointStore: CheckpointStoreFull | undefined;
|
|
25
|
-
/**
|
|
25
|
+
/** [ref] 件B/C/D([ref],codex R2-F1):部署治理三座席 —— leader 车道的每一只 Runner 都要带上它,
|
|
26
26
|
* 否则开了 leader 端点的部署就有一条在部署治理**之外**的执行面(合规否决/锁都够不着)。 */
|
|
27
27
|
governanceSeams: import("./governance-seams.js").GovernanceSeams;
|
|
28
|
-
/**
|
|
28
|
+
/** [ref] 车4 件1:durable store 后端(leader-run 登记表从这里取)。缺席 = 无 DB 的 env-only worker。 */
|
|
29
29
|
backend?: StoreBackend | undefined;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
@@ -40,7 +40,7 @@ export interface LeaderCtx {
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function leaderK8sMinioGap(leaderEnabled: boolean, leaderProvider: string | undefined, hasS3: boolean): string[] | null;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* [ref] 车4 件2 的**能力面**门(codex 交叉复审 R1-high①,验真后修)。
|
|
44
44
|
*
|
|
45
45
|
* config 层的门②判的是 `DB_BACKEND` 的字面值 —— 那句话回答的是「运维要没要 durable」。它回答不了
|
|
46
46
|
* 「这次启动**真的拿到**了 durable 吗」:`openStoreBackendWithFallback` 在 `SESSION_BACKEND=auto`
|
|
@@ -49,7 +49,7 @@ export declare function leaderK8sMinioGap(leaderEnabled: boolean, leaderProvider
|
|
|
49
49
|
* 跨副本 GET 404、重启失忆 —— 而这条腿的产物是**真 git push**。
|
|
50
50
|
*
|
|
51
51
|
* ⇒ 判据锚**真拿到了没有**。纯谓词、只吃两个原语(与 {@link leaderK8sMinioGap} 同姿势),便于单测。
|
|
52
|
-
* 抛而不是 warn:这正是
|
|
52
|
+
* 抛而不是 warn:这正是 [ref]「安全/执行车道禁静默 fail-open」说的那一类 —— 降级的代价由用户承担,
|
|
53
53
|
* 而承担的方式是重复的真实推送。
|
|
54
54
|
*/
|
|
55
55
|
export declare function assertLeaderDurableStore(leaderEnabled: boolean, hasLeaderRunStore: boolean): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] 批1 —— 限额座的**换代同步口**([ref] §2 B簇1)。
|
|
3
3
|
*
|
|
4
4
|
* `applyEffective` 的 commit 段只做一件事:把新值写进 `config`。两只限额座(RateGate / QuotaTracker)持有的
|
|
5
5
|
* 是**比较参数**,不是 config 引用,所以它们要在 commit 之后被推一把 —— 与 `pricing` / `keyResolver` 那两件
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] 记忆边界不变式(板 [ref]② 立案,[ref] 裁1 与 core [ref] 同窗)—— 启动期把「结构性写不进的记忆
|
|
3
3
|
* 部署形」说出来。
|
|
4
4
|
*
|
|
5
|
-
* 根本问题(test 仓 [
|
|
6
|
-
* `memory_index`(
|
|
5
|
+
* 根本问题(test 仓 [ref] 实测,[ref]② 定位):core 的记忆工具面是 `memory_search`/`memory_get`/
|
|
6
|
+
* `memory_index`([ref] 第五单起第三只,枚举面,仍只读)三只**只读**工具;**写**记忆没有专用工具 —— 模型用 fs 工具往记忆根写文件,harvest 再从那里收编。于是整条链的成立
|
|
7
7
|
* 条件是「记忆根落在该次任务的 fs 授权边界之内」。server 把根交给 core(`RunnerDeps.memoryEngineDir`)
|
|
8
8
|
* 之后,没有任何一处保证这一点,也没有任何一处说过「这台部署的记忆写面够不着」。默认根是
|
|
9
9
|
* `~/.ai-agent`(或 `AGENT_DATA_DIR`),默认围栏是任务 cwd —— 两者天然不相交:用户说「记住 X」,模型照
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ⚠️ 这不是 fail-open 的托词:真正的 fail-closed 归属面在别处(多租户记忆整体 dark、remote lane 默认 dark)。
|
|
17
17
|
* 本模块判的是「已经决定要开记忆」之后的**可达性**,而可达性的证据一半在部署环境里,不在进程里。
|
|
18
18
|
*
|
|
19
|
-
* ── 指路:声明 `false` 之后引擎那边发生什么(core 5.27.0,[
|
|
19
|
+
* ── 指路:声明 `false` 之后引擎那边发生什么(core 5.27.0,[ref] F2;[ref] 提货批)────────────────────
|
|
20
20
|
* 本模块两条 warn 的收尾句都在劝 operator 表态(`MEMORY_PERSISTENCE_CAPABLE=true|false`)。表 `false`
|
|
21
21
|
* 之后的语义自 core 5.27.0 起**不止是披露**:该会话成为**受限会话** —— materialize/search/harvest 按
|
|
22
22
|
* 已提交账(ledger + shadow)供给,磁盘上无事务背书的分歧既不收编也不供给,而是留盘 + 响亮点名
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* 也**不投**这个读面(硬造一个消费点 = 造给自己看的 wire 键)。哪天真要在诊断面露它,先有消费方需求。
|
|
40
40
|
*/
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* [ref] A3 源头修(黑板 [ref]/[ref]/[ref],[ref])—— `memoryPersistenceCapable` 的**装配层有效值**:
|
|
43
43
|
* operator 显式 env 恒赢;env 缺席时,`REMOTE_EXEC=host` 腿自动补 `true`;其余一律缺席(现行为)。
|
|
44
44
|
*
|
|
45
45
|
* ## 为什么 host 腿可以自动声明(而且只有 host 腿)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConsolidationDriverRunRow, type ConsolidationRunReceipt, type MemoryBackend, type MemoryConsolidationDriverDeps, type RunMemoryConsolidationOptions } from "@sema-agent/core";
|
|
1
|
+
import { type ConsolidationDriverRunRow, type ConsolidationRunReceipt, type MemoryBackend, type MemoryConsolidationDriverDeps, type RunMemoryConsolidationOptions, type SessionCaptureRecordStore } from "@sema-agent/core";
|
|
2
2
|
/** D3 投影的座标签闭集。`role:<name>` 里的 name 只可能是 core 的 role 链两跳之一。 */
|
|
3
3
|
export type ConsolidationSeatLabel = "explicit" | "role:consolidate" | "role:summarize";
|
|
4
4
|
/** {@link buildConsolidationValveAudit} 的告警名闭集(事件名进日志 ⇒ 运维可按名过滤/告警)。 */
|
|
@@ -66,7 +66,7 @@ export declare function createPerScopeSingleFlight<T>(): (scope: string, run: ()
|
|
|
66
66
|
* **不带标记**地提交)。这一条本来就会在引擎构造期抛,提前判只为一件事:把**两根**旋钮的名字同时
|
|
67
67
|
* 写进句子 —— core 的那句话只提到 provenance,而运维要知道是哪一根把这台机器拦下的。
|
|
68
68
|
*
|
|
69
|
-
* 阀门关着 ⇒ 整条门不判(
|
|
69
|
+
* 阀门关着 ⇒ 整条门不判(缺省姿态,[ref]「缺席不在律内」)。
|
|
70
70
|
*/
|
|
71
71
|
export declare function assertConsolidationDriverWirable(input: {
|
|
72
72
|
enabled: boolean;
|
|
@@ -187,5 +187,11 @@ export declare function createMemoryConsolidationFaces(store: {
|
|
|
187
187
|
/** 停因自由文本的**运维日志**座(缺席 = 没人听,不影响任何行为)。载荷由 {@link buildStopDetailAudit}
|
|
188
188
|
* 铸,调用点在单飞回调**之内** ⇒ 一轮真 run 一行,并入的等待者不各落一行。 */
|
|
189
189
|
onStopDetail?: (audit: ReturnType<typeof buildStopDetailAudit>) => void;
|
|
190
|
+
/** [ref]②(383 §2.1b):capture opt-out 记录的 SQL 载体(main.ts 单实例,与 Runner 同源)。
|
|
191
|
+
* 🔴 这只引擎是四只 operator 面里**真读名册**的那只:`consolidationEligibility` 第四臂
|
|
192
|
+
* (engine.js `listCaptureOptOutSessions`)拿它筛掉 opt-out 会话的贡献条目 —— SQL 部署上漏喂
|
|
193
|
+
* = 驱动器读文件空名册 ⇒ 蒸馏器放大用户明说不要记的内容(S-5 真实失效形;全站同批注入律,
|
|
194
|
+
* 机器钉 capture-optout-lane ②)。缺席(local 车道)⇒ core 文件三腿,与 Runner 同本。 */
|
|
195
|
+
captureRecordStore?: SessionCaptureRecordStore;
|
|
190
196
|
}): MemoryConsolidationFaces;
|
|
191
197
|
//# sourceMappingURL=memory-consolidation.d.ts.map
|
|
@@ -113,6 +113,7 @@ export function createMemoryConsolidationFaces(store, input) {
|
|
|
113
113
|
consolidation: {},
|
|
114
114
|
...(input.provenance !== undefined ? { provenance: input.provenance } : {}),
|
|
115
115
|
...(input.onIncident !== undefined ? { onIncident: input.onIncident } : {}),
|
|
116
|
+
...(input.captureRecordStore !== undefined ? { captureRecordStore: input.captureRecordStore } : {}),
|
|
116
117
|
});
|
|
117
118
|
const flight = createPerScopeSingleFlight();
|
|
118
119
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] 件A([ref] 件3③)——org 记忆准入的装配点:把 org-memory-admission 模块接上 core 5.13.0
|
|
3
3
|
* 的两个 seam(`RunnerDeps.memoryScopeAdmission` / `RunnerDeps.deploymentMemoryScopes`)。
|
|
4
4
|
*
|
|
5
5
|
* 目录源三态(单选,授权面不做双源合并):
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* backend 非 file——见下方 `memoryPlaneLive` 注)的 projects 登记簿里挂了 org 键 ——这些键在多租户下
|
|
20
20
|
* 按 request-origin 盖章(N2 部署形态维)——而目录源缺席(含 configCenter dryRun 形)⇒ 启动报错:
|
|
21
21
|
* 该部署的每个 projectId 请求都会在 prepare 期被整拒,「audit 在跑但恒拒」不是可运行状态,响亮拒
|
|
22
|
-
* 启动比静默全拒服务诚实(clay 三裁 [
|
|
22
|
+
* 启动比静默全拒服务诚实(clay 三裁 [ref]:直接 BREAKING,不留兼容臂)。记忆面 dark 的部署里这些
|
|
23
23
|
* 键根本到不了准入门,不在探测范围(复审 D-1)。
|
|
24
24
|
*/
|
|
25
25
|
import type { RunnerDeps } from "@sema-agent/core";
|
|
@@ -32,7 +32,7 @@ export interface OrgMemoryAdmissionWiring {
|
|
|
32
32
|
/**
|
|
33
33
|
* core 准入 seam 的 deployment-origin **回落表**(boot 期一次值快照)。
|
|
34
34
|
*
|
|
35
|
-
* 🔴
|
|
35
|
+
* 🔴 [ref]:这一席**故意**留快照,不跟 `config.projects` 的热应用走,理由是 core 根本不优先吃它:
|
|
36
36
|
* 本仓每个请求都在 `boot/resolve-spec.ts` 现读 `config.projects[...].defaultScopes`(热加的项目当场
|
|
37
37
|
* 进 spec),并在 `memory-scope.ts` 按 `originPolicy.multiTenant` 给每个 `org:` 键**盖章**;core 的
|
|
38
38
|
* `memory-admission` 先看盖章、只有没盖章时才查这张表 ⇒ 单用户部署下热注册项目的 org 键恒被覆盖为
|
|
@@ -41,7 +41,7 @@ export interface OrgMemoryAdmissionWiring {
|
|
|
41
41
|
*/
|
|
42
42
|
deploymentMemoryScopes: RunnerDeps["deploymentMemoryScopes"];
|
|
43
43
|
/**
|
|
44
|
-
* 同一份判据的**取值口**(
|
|
44
|
+
* 同一份判据的**取值口**([ref] 修):`createSharedMemoryScopeAuthorizer` 的
|
|
45
45
|
* `deploymentScopes` 席用它,每次 `resolve` 现算。
|
|
46
46
|
*
|
|
47
47
|
* 为什么这个消费点必须活取而上面那个可以不:共享记忆读面对 principal-less 请求**直接**把这组 scope
|
|
@@ -57,7 +57,7 @@ export interface OrgMemoryAdmissionWiring {
|
|
|
57
57
|
* (单用户/无 center 且无 env 表)⇒ 策略面逐字保持收编前的 operator-only 行为。 */
|
|
58
58
|
directory: OrgMemoryDirectory | undefined;
|
|
59
59
|
}
|
|
60
|
-
/** 依赖收窄到真实消费面(warn/inc 各一手)——接口隔离让测试用真形字面量,零铸形([
|
|
60
|
+
/** 依赖收窄到真实消费面(warn/inc 各一手)——接口隔离让测试用真形字面量,零铸形([ref] §1)。 */
|
|
61
61
|
export declare function createOrgMemoryAdmissionWiring(opts: {
|
|
62
62
|
config: ServiceConfig;
|
|
63
63
|
logger: Pick<Logger, "warn">;
|
|
@@ -16,7 +16,7 @@ export interface ApprovalExemptionProbe {
|
|
|
16
16
|
export interface ParkedReviveGateDeps {
|
|
17
17
|
/** ⚠️ **活引用**:热改字段(autonomy/commandPolicy/守卫集/审批四旋钮)每次赎回现读,见下方「禁 memoize」。 */
|
|
18
18
|
readonly config: ParkedReviveGateConfigView;
|
|
19
|
-
/**
|
|
19
|
+
/** [ref]:活体 AskUserQuestion 面。赎回腿今天无 ALS ctx ⇒ 判 ask,与原形同判。
|
|
20
20
|
* ⚠️ 它同时是**决议链元数据** `contentMandate` 的唯一判据(见 {@link mandatePostureOf})。 */
|
|
21
21
|
readonly question: LiveQuestionFace | undefined;
|
|
22
22
|
/**
|
|
@@ -47,7 +47,7 @@ export interface ParkedReviveGateDeps {
|
|
|
47
47
|
readonly approverSeat: RunnerDepsOnAsk | undefined;
|
|
48
48
|
readonly approvalExemptionStore: ApprovalExemptionProbe | undefined;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* [ref] —— core `RunnerDeps.runtimeCapsResolver` 的**同一只**(main.ts 的 `runtimeCapsResolver`,
|
|
51
51
|
* 单一属主同 `boot/runtime-caps.ts`)。重建条目的第三位决议链元数据 `autoModeArmed` 的唯一判据是
|
|
52
52
|
* per-principal 的 `RuntimeCaps.autoMode`,而它只有 center 解得出 —— 见 {@link autoModePostureOf}。
|
|
53
53
|
* 缺席(无 center 的部署 / dry-run)⇒ core 侧 `runtimeCaps` 也恒 undefined ⇒ 该位在 park 时也从不置位,
|
|
@@ -82,7 +82,7 @@ export type RebuiltInheritedGate = NonNullable<NonNullable<NonNullable<ToolExecu
|
|
|
82
82
|
* 能收紧的槽时,本仓的编译面要看得见)。 */
|
|
83
83
|
export type RebuiltParentConstraint = NonNullable<RebuiltInheritedGate["parentConstraints"]>[number];
|
|
84
84
|
/**
|
|
85
|
-
* 赎回腿的父约束链重建(
|
|
85
|
+
* 赎回腿的父约束链重建([ref] 件二)。
|
|
86
86
|
*
|
|
87
87
|
* 语义:**同/跨副本一致地重建「部署 ⊇ 操作员」两层完整链**——审批基线(durable question 门 + F4 高危写
|
|
88
88
|
* 审批门 + 会话豁免探针)作 base 的 `toolPolicy` 座,经**折叠属主** `applyRuntimeGovernance`
|
|
@@ -93,7 +93,7 @@ export type RebuiltParentConstraint = NonNullable<RebuiltInheritedGate["parentCo
|
|
|
93
93
|
* 热改字段(registry 热应用换 config 引用),boot 期铸一次 = 把治理冻在启动那一刻的值上,而 resume 腿的
|
|
94
94
|
* 书面语义是「按**当前** config 重折」(与 resolve-spec 的审批基线读活 config 同一姿势)。
|
|
95
95
|
*
|
|
96
|
-
* 🔴 **单层链是正确的响亮拒**(
|
|
96
|
+
* 🔴 **单层链是正确的响亮拒**([ref] §2.5 特征化格):本腿恒建 count=1。嵌套子代(孙代 park,
|
|
97
97
|
* count≥2)的重建本腿做不到——跨副本连「祖先各层分别是什么」都没有持久化——于是 core 的 pre-CAS
|
|
98
98
|
* `resume.parent_constraint_mismatch` 会响亮拒绝,checkpoint 留 pending。**不许**顺手把它补齐成静默单层:
|
|
99
99
|
* 那等于让孙代在一条比它挂起时更松的祖先链下复活。
|
|
@@ -111,7 +111,7 @@ export type RebuiltParentConstraint = NonNullable<RebuiltInheritedGate["parentCo
|
|
|
111
111
|
* 时点语义(成文进 docs/ASSISTANT-WIRE-CONTRACT.md,免运维当 bug 报):
|
|
112
112
|
* · toolPolicy 轴 = **当前** config(与 resume 重折一致,收紧与放松都被兑现——放松是一次显式运维动作);
|
|
113
113
|
* · shellGate 轴 = core 取 max(live, park 时 seed)—— 收紧兑现、放松**不**兑现(fail-safe)。
|
|
114
|
-
* · `autoModeArmed` 轴(
|
|
114
|
+
* · `autoModeArmed` 轴([ref])= 按**当前** per-principal entitlement 现解(见 {@link autoModePostureOf});
|
|
115
115
|
* 与 toolPolicy 轴同族:挂起期间权益被撤/被授 ⇒ 摘要对不上 ⇒ core pre-CAS 响亮拒,不静默换姿势跑。
|
|
116
116
|
* · `onAsk` 轴 = 部署的活体审批席(`deps.approverSeat`),**在场即供**:park 时那一层冻的就是它。
|
|
117
117
|
* 席位缺席的部署上不供,而**这不等于 auto-deny**(codex R3-中1 验真纠正):此形恒带
|
|
@@ -124,7 +124,7 @@ export type RebuiltParentConstraint = NonNullable<RebuiltInheritedGate["parentCo
|
|
|
124
124
|
* (test/parked-revive-e2e.test.ts);真 settings→park→赎回的端到端钉未建(候件,随收口件一起)。
|
|
125
125
|
*/
|
|
126
126
|
/**
|
|
127
|
-
* 🔴
|
|
127
|
+
* 🔴 [ref] 第二半(codex 交叉复审 medium,验真后采纳)—— 席位多收一位**权威 principal**。
|
|
128
128
|
*
|
|
129
129
|
* 为什么不能只看 `row.scope`:`principal ?? "default"` 这套约定在那一列上是**有损**的(匿名与一个真名叫
|
|
130
130
|
* `default` 的租户同形),而匿名别名匹配(见 `parked-decide.ts` 的 `backgroundScopesForCheckpointScope`)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] §3([ref] v2 §6 F4 的**残余采纳**)—— 默认 ON 的**休眠行审计**。
|
|
3
3
|
*
|
|
4
4
|
* 🔴 这条审计存在的唯一理由:`PERMISSION_RULES_ENABLED` 的默认值在本车从 OFF 翻成 ON,而**旋钮翻转
|
|
5
|
-
* 与规则行的寿命是两条独立的时间线**。三张表自
|
|
5
|
+
* 与规则行的寿命是两条独立的时间线**。三张表自 [ref] 车二起就随中央 `ensureSchema` 建、并且从来没有被
|
|
6
6
|
* 清过,所以下面这两类部署在升级的那一刻会突然带着**既有**规则行开始放行:
|
|
7
7
|
* · 曾经把旋钮开过一段时间又关掉的部署(行留在库里,只是没人读);
|
|
8
8
|
* · 从旧库恢复/克隆出来的部署(行跟着数据一起来的)。
|
package/dist/boot/reapers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] A10:composition root 分段 —— 后台 reaper / 维护 tick。
|
|
3
3
|
*
|
|
4
4
|
* 纯搬运:函数体逐字来自 `main.ts`(原 2387-2599 行),缩进不变;新增的只有 import 与
|
|
5
5
|
* `startReapers(ctx)` 包壳。
|
|
@@ -22,7 +22,7 @@ import type { WorkflowNotifyGate, WorkflowNotifyJournalStore } from "../orchestr
|
|
|
22
22
|
import type { TaskAttachmentStore } from "../plugins/task-attachment-store.js";
|
|
23
23
|
import type { CheckpointStoreFull, CostQuotaStore, ImageBake, RateLimiterStore, ServiceWorkflowJournalStore, StoreBackend, ToolResultStoreFull } from "../plugins/store-backend.js";
|
|
24
24
|
import type { ToolApprovalCoordinator } from "../tool-approval.js";
|
|
25
|
-
/**
|
|
25
|
+
/** [ref] / [ref]§五(sema-comms `audits/failopen-governance-176.md` §7 "Z 类 1 条"):default consecutive-failure
|
|
26
26
|
* count before a reaper leg's swallowed error gets a `warn` line. The ~15 `.catch(() => undefined)` sites
|
|
27
27
|
* below are correct in DIRECTION (a hiccuping periodic sweep must never crash the whole tick loop — one bad
|
|
28
28
|
* leg cannot be allowed to starve its ~15 siblings), but were zero-observability: an operator watching only
|
|
@@ -51,7 +51,7 @@ export interface ThrottledReaperCatch {
|
|
|
51
51
|
* survives across ticks — a fresh instance per tick would never accumulate past 1.
|
|
52
52
|
*/
|
|
53
53
|
export declare function createThrottledReaperCatch(name: string, logger: Logger, threshold?: number): ThrottledReaperCatch;
|
|
54
|
-
/**
|
|
54
|
+
/** [ref] —— 维护 tick 真正消费的那**一手**(窄口;理由见 `ReapersCtx.permissionRuleStores`)。
|
|
55
55
|
* 可选成员:File 车道没有这一面(追加日志的压实是另一件事,如实登记在 `rules-consent.ts` 的
|
|
56
56
|
* `PermissionRuleStoreBundle.reapExpired` 注里),缺席 ⇒ 本腿零调用。 */
|
|
57
57
|
export interface PermissionRuleRetentionSweeper {
|
|
@@ -74,7 +74,7 @@ export interface ReapersCtx {
|
|
|
74
74
|
imageBakes: ImageBake | undefined;
|
|
75
75
|
worktreeReap: (() => Promise<void>) | undefined;
|
|
76
76
|
workflowNotifyGate: WorkflowNotifyGate | undefined;
|
|
77
|
-
/** [
|
|
77
|
+
/** [ref]/[ref] recover 的两半 opts(boot 与周期扫描共用,单点合成在 workflow-orchestration)。 */
|
|
78
78
|
workflowRecoverOpts: Parameters<WorkflowNotifyGate["recover"]>[0];
|
|
79
79
|
workflowJournalStore: ServiceWorkflowJournalStore | undefined;
|
|
80
80
|
sqlWorkflowRunStore: WorkflowRunStore | undefined;
|
|
@@ -82,11 +82,11 @@ export interface ReapersCtx {
|
|
|
82
82
|
rosterStore: RunnerDeps["rosterStore"];
|
|
83
83
|
backgroundAgentStore: RunnerDeps["backgroundAgentStore"];
|
|
84
84
|
mailboxStore: RunnerDeps["mailboxStore"];
|
|
85
|
-
/**
|
|
85
|
+
/** [ref] 车6:流内审批撤卡帧的 live 投递口(收敛器/孤儿代打腿产出的帧经它反查 broker 的活连接)。
|
|
86
86
|
* `TOOL_APPROVAL_ENABLED=false` 的部署恒 undefined ⇒ 收敛器照常收敛,只是不发通知帧(壳侧靠
|
|
87
87
|
* 重连 preamble 对账,见 approval-card.ts 的 `ApprovalRevokeFrame` 顶注)。 */
|
|
88
88
|
toolApproval: ToolApprovalCoordinator | undefined;
|
|
89
|
-
/**
|
|
89
|
+
/** [ref]:规则店的**保留期口**。`PERMISSION_RULES_ENABLED=false` 或后端没实装 ⇒ undefined
|
|
90
90
|
* ⇒ 本腿根本不注册(零扫描),与它的同族旋钮腿同姿势。
|
|
91
91
|
*
|
|
92
92
|
* 🔴 类型刻意窄到 {@link PermissionRuleRetentionSweeper} 而不是整个 `PermissionRuleStoreBundle`:
|
|
@@ -141,7 +141,7 @@ interface ReapSessionsInputs {
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
|
-
* 🔴
|
|
144
|
+
* 🔴 [ref] C18(core 5.48.0 [ref],[ref] 提货单)——**分区腿武装**的判据本体。
|
|
145
145
|
*
|
|
146
146
|
* core 5.48 起 `reapDurableAgents` 的 `deps.sessions` 多一只可选 `listPlaced`:在场即启用**分区收割
|
|
147
147
|
* 腿** —— 一条 placed 转录的属主行已经不在(put 从未落地 / 上一轮条件删赢了但 release 失败)时,行驱动
|
|
@@ -153,7 +153,7 @@ interface ReapSessionsInputs {
|
|
|
153
153
|
* · `release` 对 **placed id** 必须走 host 店:路由店(`ForkRoutingSessionStore`)对一个重启后不认识
|
|
154
154
|
* 的 id 会回落 transient(进程内 no-op),那会让 core 数出一次**从未发生**的 release
|
|
155
155
|
* (`orphanPlacedReleased` 当场变成谎)而字节还在库里。故先按**持久化元组**判(一次 PK 探针),
|
|
156
|
-
* placed 走 host 店的真删除;其余 id 原样保留 [
|
|
156
|
+
* placed 走 host 店的真删除;其余 id 原样保留 [ref] 裁定的双店语义。
|
|
157
157
|
* · 🔴 探针本身失败 ⇒ **响亮抛**(codex 交叉复审 R1-[medium],验真后修:本函数的初版把探针错误
|
|
158
158
|
* 改写成 `undefined` 再落路由店 —— 而重启后路由店不认识 placed id ⇒ transient no-op,core 却因为
|
|
159
159
|
* release 正常 resolve 而 `orphanPlacedReleased++`。间歇性 DB 故障于是被**伪装成 GC 成功**:监控
|
|
@@ -23,7 +23,7 @@ type PrincipalCaps = ReturnType<typeof createPrincipalEntitlementsClient>;
|
|
|
23
23
|
/** `resolveSpec` 原先从 `main()` 闭包里拿到的全部 boot 局部量。 */
|
|
24
24
|
export interface ResolveSpecCtx {
|
|
25
25
|
config: ServiceConfig;
|
|
26
|
-
/**
|
|
26
|
+
/** [ref]:hands lane 登记簿。resolveSpec 在产出 TaskSpec 时按场景判别位登记本请求的表态,HTTP 执行点
|
|
27
27
|
* 凭同一只登记簿选 Runner —— **必须与 main.ts 传给 `runnerFor` 的是同一实例**(异实例 = 每个请求都
|
|
28
28
|
* 落回 full,收窄静默失效)。 */
|
|
29
29
|
handsLanes: HandsLaneRegistry;
|
|
@@ -65,12 +65,12 @@ export interface ResolveSpecCtx {
|
|
|
65
65
|
root: string;
|
|
66
66
|
} | undefined;
|
|
67
67
|
durableEnabled: boolean;
|
|
68
|
-
/**
|
|
68
|
+
/** [ref] ([ref] 案二):活体 AskUserQuestion 面(QuestionCoordinator 的判决探针切面)。在场(=
|
|
69
69
|
* ASK_QUESTION_ENABLED)时 durable question 门按活流上下文分腿、spec 不再 stamp QUESTION_AWAITS_RESUME
|
|
70
70
|
* (否则 spec.onQuestion 恒遮蔽 RunnerDeps.onQuestion 的活人腿);缺席时行为与旧形逐字一致。 */
|
|
71
71
|
liveQuestionFace: LiveQuestionFace | undefined;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* [ref] 件C —— 部署级**活体审批席**(`RunnerDeps.onAsk` 的同源铸法,main.ts 递
|
|
74
74
|
* `createRunnerDepsOnAsk(toolApproval)`;单一属主同 `boot/runner-deps.ts`,与 `parked-revive-gate.ts`
|
|
75
75
|
* 的 `approverSeat` 是同一格)。
|
|
76
76
|
*
|
|
@@ -87,7 +87,7 @@ export interface ResolveSpecCtx {
|
|
|
87
87
|
imageIndex: ReturnType<NonNullable<StoreBackend["imageIndex"]>> | undefined;
|
|
88
88
|
perTaskImage: PerTaskImageRegistry;
|
|
89
89
|
sessionEnvSelection: SessionEnvironmentSelection;
|
|
90
|
-
/**
|
|
90
|
+
/** [ref] 件C:本部署已校验的锁集(boot/governance-seams.ts 的产物,与 `RunnerDeps.lockedConfig`
|
|
91
91
|
* 同源一次解析)。空集 = 无锁 = 现行为。本域只用它做**同步拒面**(§4.3),不做第二次裁决。 */
|
|
92
92
|
lockedKeys: ReadonlySet<import("@sema-agent/core").LockedKey>;
|
|
93
93
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] 车2 —— 托管留存的 **sweep lane**(设计稿 `docs/DESIGN-270-retention-lane.md` v1.3 §3/§4/§7)。
|
|
3
3
|
*
|
|
4
4
|
* ── 为什么是独立文件、独立定时器,而不是折进 `startReapers()`(设计稿 §3 首条)───────────────────
|
|
5
5
|
* `boot/reapers.ts` 里那二十条腿全都是**容忍多副本**的幂等清理:每台副本各扫各的,重复扫一遍只是浪费。
|