@sema-agent/server 7.139.0 → 7.141.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 +471 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/USAGE.md +94 -26
- package/dist/adoption/runner.js +1 -1
- package/dist/adoption/sql.js +1 -1
- package/dist/approval-batch-census.d.ts +27 -0
- package/dist/approval-batch-census.js +27 -0
- package/dist/approval-card.d.ts +37 -22
- package/dist/approval-card.js +6 -3
- package/dist/approval.d.ts +15 -0
- package/dist/approval.js +10 -0
- package/dist/audit.d.ts +4 -2
- package/dist/audit.js +2 -2
- package/dist/bench/s1/live-deps.js +3 -2
- package/dist/bench/s1/row.d.ts +5 -2
- package/dist/bench/s1/row.js +2 -22
- package/dist/boot/adoption.js +1 -1
- package/dist/boot/device-lane.d.ts +11 -0
- package/dist/boot/device-lane.js +16 -0
- package/dist/boot/engine-lease.d.ts +24 -3
- package/dist/boot/engine-lease.js +9 -2
- package/dist/boot/execution-env.js +18 -12
- package/dist/boot/execution-lane.d.ts +8 -0
- package/dist/boot/execution-lane.js +6 -1
- package/dist/boot/memory-boundary.d.ts +16 -53
- package/dist/boot/memory-boundary.js +10 -20
- package/dist/boot/memory-consolidation.d.ts +16 -12
- package/dist/boot/memory-consolidation.js +24 -13
- package/dist/boot/reapers.d.ts +2 -2
- package/dist/boot/resolve-spec.d.ts +3 -5
- package/dist/boot/resolve-spec.js +9 -8
- package/dist/boot/runner-deps.d.ts +3 -3
- package/dist/boot/runner-deps.js +1 -0
- package/dist/boot/session-faces.d.ts +1 -1
- package/dist/boot/session-faces.js +4 -3
- package/dist/boot/shutdown.js +5 -0
- package/dist/boot/stage-03-store-backend.d.ts +2 -6
- package/dist/boot/stage-03-store-backend.js +2 -3
- package/dist/boot/stage-04-stores.d.ts +2 -6
- package/dist/boot/stage-04-stores.js +5 -5
- package/dist/boot/stage-05-execution-env.d.ts +2 -6
- package/dist/boot/stage-05-execution-env.js +3 -1
- package/dist/boot/stage-06-runners.d.ts +2 -8
- package/dist/boot/stage-06-runners.js +3 -3
- package/dist/boot/stage-07-capability-layer.d.ts +2 -7
- package/dist/boot/stage-07-capability-layer.js +8 -10
- package/dist/boot/stage-08-reapers.d.ts +2 -7
- package/dist/boot/stage-09-leader.d.ts +2 -7
- package/dist/boot/stage-10-http-server.d.ts +2 -7
- package/dist/boot/stage-10-http-server.js +6 -4
- package/dist/boot/stores.d.ts +3 -6
- package/dist/boot/stores.js +37 -44
- package/dist/boot/task-list-lane.d.ts +1 -1
- package/dist/boot/task-list-lane.js +1 -1
- package/dist/boot/web-admin.js +36 -9
- package/dist/capabilities/execution-lane.d.ts +2 -2
- package/dist/capabilities/scenarios.d.ts +1 -1
- package/dist/capability-facts.d.ts +9 -0
- package/dist/capability-facts.js +9 -0
- package/dist/card-void.d.ts +38 -0
- package/dist/card-void.js +23 -0
- package/dist/config-catalog.js +12 -8
- package/dist/config-provider.d.ts +18 -17
- package/dist/config-provider.js +28 -36
- package/dist/config-types.d.ts +36 -9
- package/dist/config.js +56 -46
- package/dist/delegated-session-owner.d.ts +23 -20
- package/dist/delegated-session-owner.js +2 -2
- package/dist/deployment-shape.d.ts +9 -8
- package/dist/deployment-shape.js +4 -4
- package/dist/device-store.d.ts +7 -0
- package/dist/device-store.js +3 -0
- package/dist/execution-config-root.d.ts +22 -0
- package/dist/execution-config-root.js +35 -0
- package/dist/execution-lane-caps.d.ts +145 -107
- package/dist/execution-lane-caps.js +144 -83
- package/dist/execution-placement.d.ts +3 -0
- package/dist/execution-placement.js +7 -0
- package/dist/fleet/drain-entry.d.ts +3 -0
- package/dist/hosted-posture.d.ts +8 -0
- package/dist/hosted-posture.js +4 -0
- package/dist/http/admission.js +3 -3
- package/dist/http/caller-trust.d.ts +3 -2
- package/dist/http/caller-trust.js +2 -1
- package/dist/http/dispatch.js +4 -0
- package/dist/http/live-frame.d.ts +24 -0
- package/dist/http/live-frame.js +16 -0
- package/dist/http/memory-compliance-failure-reply.d.ts +3 -1
- package/dist/http/memory-compliance-failure-reply.js +5 -0
- package/dist/http/memory-layer-reply.d.ts +30 -0
- package/dist/http/memory-layer-reply.js +24 -0
- package/dist/http/resume-legs.js +49 -35
- package/dist/http/retired-service-deps.d.ts +1 -1
- package/dist/http/retired-service-deps.js +1 -1
- package/dist/http/route-table.js +2 -0
- package/dist/http/routes/adoption.js +1 -1
- package/dist/http/routes/approvals-assistant.js +1 -0
- package/dist/http/routes/capabilities.js +5 -4
- package/dist/http/routes/diagnostics.d.ts +0 -19
- package/dist/http/routes/diagnostics.js +16 -2
- package/dist/http/routes/memory-bundle.d.ts +2 -2
- package/dist/http/routes/memory-bundle.js +4 -1
- package/dist/http/routes/memory-compliance.js +9 -2
- package/dist/http/routes/memory-consolidation.js +12 -1
- package/dist/http/routes/memory-origin.js +14 -2
- package/dist/http/routes/memory-policy.js +7 -2
- package/dist/http/routes/run-permission-mode.d.ts +75 -0
- package/dist/http/routes/run-permission-mode.js +170 -0
- package/dist/http/routes/session-sync.d.ts +3 -6
- package/dist/http/routes/session-sync.js +7 -2
- package/dist/http/routes/sessions.js +33 -15
- package/dist/http/routes/tasks.js +67 -68
- package/dist/http/run-read-face.js +3 -3
- package/dist/http/send.d.ts +1 -1
- package/dist/http/send.js +2 -2
- package/dist/http/server.d.ts +14 -27
- package/dist/http/server.js +2 -2
- package/dist/http/sse-log.d.ts +3 -8
- package/dist/http/stored-body-replay.d.ts +3 -3
- package/dist/http/stored-body-replay.js +3 -1
- package/dist/identity-source.d.ts +1 -1
- package/dist/identity-source.js +1 -1
- package/dist/instruction-source-notice.d.ts +7 -0
- package/dist/instruction-source-notice.js +6 -6
- package/dist/lane-home-probe.d.ts +68 -42
- package/dist/lane-home-probe.js +53 -30
- package/dist/leader/wire.js +5 -4
- package/dist/mcp-assertion-header.d.ts +4 -0
- package/dist/mcp-assertion-header.js +5 -0
- package/dist/memory-bundle-engine.d.ts +16 -9
- package/dist/memory-bundle-engine.js +29 -6
- package/dist/memory-operator-faces.d.ts +85 -30
- package/dist/memory-operator-faces.js +136 -30
- package/dist/memory-posture.d.ts +1 -1
- package/dist/memory-project-layer.d.ts +3 -21
- package/dist/memory-project-layer.js +11 -8
- package/dist/memory-scope-stores.d.ts +73 -0
- package/dist/memory-scope-stores.js +86 -0
- package/dist/memory-scope.d.ts +33 -9
- package/dist/memory-scope.js +17 -5
- package/dist/memory-sync-client.d.ts +34 -9
- package/dist/memory-sync-client.js +108 -28
- package/dist/observability/fail-open.d.ts +30 -2
- package/dist/observability/fail-open.js +30 -2
- package/dist/observability/metrics.js +0 -1
- package/dist/observability/run-terminal.d.ts +6 -2
- package/dist/observability/run-terminal.js +25 -26
- package/dist/observability/secret-env-scrub.d.ts +20 -1
- package/dist/observability/secret-env-scrub.js +14 -0
- package/dist/orchestration/workflow-completion-inbox.d.ts +5 -2
- package/dist/orchestration/workflow-completion-inbox.js +13 -5
- package/dist/orchestration/workflow-notify-journal.d.ts +5 -3
- package/dist/orchestration/workflow-notify-journal.js +2 -1
- package/dist/permission-mode-admission.d.ts +68 -0
- package/dist/permission-mode-admission.js +23 -0
- package/dist/permission-rule-list.d.ts +55 -6
- package/dist/permission-rule-list.js +52 -5
- package/dist/plugins/adoption-log-sql.js +4 -4
- package/dist/plugins/approval-ask-store-sql.js +14 -14
- package/dist/plugins/approval-nonce-store.js +4 -4
- package/dist/plugins/blob-backend.d.ts +4 -4
- package/dist/plugins/blob-backend.js +7 -7
- package/dist/plugins/breaker-state-sql.js +2 -2
- package/dist/plugins/caching-session-store.d.ts +6 -0
- package/dist/plugins/caching-session-store.js +3 -0
- package/dist/plugins/checkpoint-index-columns.js +2 -2
- package/dist/plugins/checkpoint-store-sql.d.ts +65 -17
- package/dist/plugins/checkpoint-store-sql.js +90 -19
- package/dist/plugins/device-store-sql.d.ts +5 -2
- package/dist/plugins/device-store-sql.js +23 -20
- package/dist/plugins/ensure-index.d.ts +1 -2
- package/dist/plugins/execution-placement-sql.d.ts +19 -9
- package/dist/plugins/execution-placement-sql.js +20 -9
- package/dist/plugins/file-history-store-sql.d.ts +2 -2
- package/dist/plugins/file-history-store-sql.js +4 -4
- package/dist/plugins/file-run-store.d.ts +2 -2
- package/dist/plugins/file-run-store.js +1 -1
- package/dist/plugins/fork-routing-session-store.d.ts +10 -32
- package/dist/plugins/fork-routing-session-store.js +2 -61
- package/dist/plugins/image-bake-store-sql.js +9 -9
- package/dist/plugins/image-index-sql.js +11 -11
- package/dist/plugins/k8s-exec-protocol.d.ts +4 -1
- package/dist/plugins/k8s-exec-protocol.js +6 -1
- package/dist/plugins/leader-run-store-sql.js +4 -4
- package/dist/plugins/local-checkpoint-store.d.ts +10 -1
- package/dist/plugins/local-checkpoint-store.js +22 -0
- package/dist/plugins/local-session-store.d.ts +227 -35
- package/dist/plugins/local-session-store.js +518 -37
- package/dist/plugins/local-session-window.d.ts +17 -3
- package/dist/plugins/local-session-window.js +7 -13
- package/dist/plugins/mailbox-store-sql.d.ts +2 -1
- package/dist/plugins/mailbox-store-sql.js +4 -4
- package/dist/plugins/memory-engine-tidb.js +5 -5
- package/dist/plugins/memory-optout-grant-store-sql.js +1 -1
- package/dist/plugins/memory-run-store.d.ts +2 -2
- package/dist/plugins/memory-run-store.js +1 -1
- package/dist/plugins/memory-sync-store-tidb.js +3 -3
- package/dist/plugins/one-time-migrations.d.ts +52 -11
- package/dist/plugins/one-time-migrations.js +101 -39
- package/dist/plugins/org-delivery-quota-store.js +2 -2
- package/dist/plugins/outcome-ledger-sql.js +2 -2
- package/dist/plugins/permission-rule-store-sql.d.ts +4 -4
- package/dist/plugins/permission-rule-store-sql.js +16 -16
- package/dist/plugins/pg-pool.js +3 -2
- package/dist/plugins/pg-session-storage.d.ts +2 -0
- package/dist/plugins/pg-session-storage.js +3 -2
- package/dist/plugins/remote-env-adb.d.ts +7 -24
- package/dist/plugins/remote-env-adb.js +22 -5
- package/dist/plugins/remote-env-device.d.ts +2 -28
- package/dist/plugins/remote-env-device.js +2 -1
- package/dist/plugins/remote-env-e2b.d.ts +40 -27
- package/dist/plugins/remote-env-e2b.js +180 -20
- package/dist/plugins/remote-env-file-error.d.ts +1 -1
- package/dist/plugins/remote-env-file-error.js +8 -2
- package/dist/plugins/remote-env-host.d.ts +19 -35
- package/dist/plugins/remote-env-host.js +26 -3
- package/dist/plugins/remote-env-k8s.d.ts +22 -14
- package/dist/plugins/remote-env-k8s.js +150 -26
- package/dist/plugins/remote-env-local-docker.d.ts +27 -24
- package/dist/plugins/remote-env-local-docker.js +91 -24
- package/dist/plugins/remote-env-ssh.d.ts +4 -24
- package/dist/plugins/remote-env-ssh.js +4 -3
- package/dist/plugins/resume-anchor-store-sql.js +2 -2
- package/dist/plugins/retention-lane-store-sql.d.ts +1 -1
- package/dist/plugins/retention-lane-store-sql.js +2 -2
- package/dist/plugins/retention-store-sql.d.ts +1 -1
- package/dist/plugins/retention-store-sql.js +6 -6
- package/dist/plugins/run-store-sql.d.ts +3 -3
- package/dist/plugins/run-store-sql.js +19 -18
- package/dist/plugins/sandbox-read-floor.d.ts +273 -0
- package/dist/plugins/sandbox-read-floor.js +608 -0
- package/dist/plugins/schema-consistency.d.ts +6 -6
- package/dist/plugins/schema-consistency.js +1 -1
- package/dist/plugins/schema-ensure-legs.d.ts +2 -3
- package/dist/plugins/schema-ensure-legs.js +2 -2
- package/dist/plugins/schema-live-columns.d.ts +1 -1
- package/dist/plugins/session-capture-record-store-sql.js +1 -1
- package/dist/plugins/session-ownership.d.ts +2 -1
- package/dist/plugins/session-placement.d.ts +17 -4
- package/dist/plugins/session-placement.js +2 -1
- package/dist/plugins/session-rules-column.d.ts +1 -1
- package/dist/plugins/session-rules-column.js +1 -1
- package/dist/plugins/session-store.d.ts +18 -20
- package/dist/plugins/session-store.js +4 -12
- package/dist/plugins/session-workspace-cell.d.ts +1 -1
- package/dist/plugins/session-workspace-cell.js +1 -1
- package/dist/plugins/shared-memory-store-sql.js +2 -2
- package/dist/plugins/sql-driver.d.ts +10 -5
- package/dist/plugins/sql-driver.js +6 -6
- package/dist/plugins/sql-errors.js +1 -1
- package/dist/plugins/store-backend.d.ts +35 -6
- package/dist/plugins/store-backend.js +27 -10
- package/dist/plugins/store-contracts.d.ts +9 -2
- package/dist/plugins/task-list-store-sql.js +11 -11
- package/dist/plugins/tidb-pool.js +7 -6
- package/dist/plugins/tidb-session-storage.js +4 -4
- package/dist/plugins/tidb-session-store.d.ts +4 -1
- package/dist/plugins/tidb-session-store.js +16 -15
- package/dist/plugins/tool-result-store-sql.d.ts +2 -2
- package/dist/plugins/tool-result-store-sql.js +3 -3
- package/dist/plugins/user-input-ledger-sql.js +2 -2
- package/dist/plugins/workflow-journal-store-sql.js +5 -5
- package/dist/plugins/workflow-run-store-sql.js +19 -19
- package/dist/plugins/write-behind-counter.d.ts +2 -3
- package/dist/plugins/write-behind-counter.js +5 -5
- package/dist/resource-suspend.d.ts +14 -12
- package/dist/resource-suspend.js +1 -1
- package/dist/resource-window.d.ts +4 -3
- package/dist/run-cancel-context.d.ts +34 -0
- package/dist/run-cancel-context.js +7 -0
- package/dist/run-local.js +14 -19
- package/dist/runs.d.ts +47 -16
- package/dist/runs.js +112 -113
- package/dist/security.d.ts +2 -2
- package/dist/server-secret-env.d.ts +2 -1
- package/dist/server-secret-env.js +2 -4
- package/dist/session-error-wire.d.ts +22 -4
- package/dist/session-error-wire.js +16 -0
- package/dist/session-incarnation.d.ts +10 -4
- package/dist/session-incarnation.js +1 -1
- package/dist/session-policy-wire.d.ts +1 -1
- package/dist/session-sync-kernel.d.ts +42 -1
- package/dist/session-sync-kernel.js +17 -0
- package/dist/session-sync.js +16 -4
- package/dist/sql-engine-coordinates.d.ts +49 -0
- package/dist/sql-engine-coordinates.js +27 -0
- package/dist/sql-engine-posture.d.ts +1 -1
- package/dist/sql-engine-posture.js +1 -1
- package/dist/standing-answer-grant.d.ts +31 -2
- package/dist/standing-answer-grant.js +14 -2
- package/dist/store-posture.d.ts +1 -1
- package/dist/{plugins → stores-sql}/background-agent-store-sql.d.ts +2 -2
- package/dist/{plugins → stores-sql}/background-agent-store-sql.js +8 -8
- package/dist/{plugins → stores-sql}/session-policy-store-sql.d.ts +7 -5
- package/dist/{plugins → stores-sql}/session-policy-store-sql.js +12 -12
- package/dist/{plugins → stores-sql}/usage-window-store-sql.d.ts +1 -1
- package/dist/{plugins → stores-sql}/usage-window-store-sql.js +3 -3
- package/dist/task-a2a.d.ts +1 -1
- package/dist/task-a2a.js +5 -6
- package/dist/task-mcp.d.ts +21 -8
- package/dist/task-mcp.js +17 -9
- package/dist/task-settings.d.ts +52 -25
- package/dist/task-settings.js +91 -28
- package/dist/terminal.d.ts +103 -19
- package/dist/terminal.js +72 -20
- package/dist/trace/core-keyset-guard.d.ts +79 -2
- package/dist/trace/exit-seat.d.ts +7 -0
- package/dist/trace/exit-seat.js +1 -0
- package/dist/trace/model-segment.d.ts +2 -2
- package/dist/trace/redact.d.ts +3 -1
- package/dist/trace/redact.js +395 -110
- package/dist/trace/self-minted-wire.d.ts +226 -2
- package/dist/trace/self-minted-wire.js +79 -0
- package/dist/verifier-pause-card.d.ts +8 -0
- package/dist/verifier-pause-card.js +19 -0
- package/dist/web-admin-client/apply-effective.d.ts +5 -7
- package/dist/web-admin-client/apply-effective.js +2 -2
- package/dist/web-admin-client/candidate-gate.d.ts +11 -7
- package/dist/web-admin-client/candidate-gate.js +1 -1
- package/dist/web-admin-client/http-client.d.ts +5 -4
- package/dist/web-admin-client/http-client.js +2 -2
- package/dist/web-admin-client/read-warnings.d.ts +7 -17
- package/dist/web-admin-client/read-warnings.js +5 -9
- package/docs/DEVICE-EXECUTOR-PROTOCOL.md +3 -2
- package/package.json +2 -2
- package/wire-changes/server@7.140.0.json +184 -0
- package/wire-changes/server@7.141.0.json +367 -0
|
@@ -5,24 +5,26 @@
|
|
|
5
5
|
* task opts in, a budget/turns/walltime limit OR a scheduler preempt durably SUSPENDS the task (resumable via
|
|
6
6
|
* `POST /v1/assistant/tasks/:id/resume`) instead of FAILING; absent ⇒ a limit still FAILS.
|
|
7
7
|
*
|
|
8
|
-
* 🔴 EXCLUDE
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* remote VM — ORPHANING both (the run row is
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
8
|
+
* 🔴 EXCLUDE cascade tasks. Core runs a cascade through `runCascade`, which maps a rung's durable suspend to a FAILED
|
|
9
|
+
* result carrying the pause (`errorCode: "unexpected.suspended"`, 内层 status "needs_review" 时铸 `"unexpected.needs_review"`,
|
|
10
|
+
* 停驻因由在 `terminal.nestedPause` —— 真源是 core `agents/suspend-guard.js` 的 `mapNestedSuspend`;`suspended.*` 三码是 bg
|
|
11
|
+
* 子代/委派报告面的词,不落在这条 TaskResult 腿上). A rung's pause lands on the rung's own engine-minted session, which the
|
|
12
|
+
* host-boundary judge (`atHostBoundary`, src/terminal.ts) leaves terminal: the service would `setTerminal(failed)` while core
|
|
13
|
+
* had already minted a pending `resource_limit` checkpoint + suspended the remote VM — ORPHANING both (the run row is
|
|
14
|
+
* terminal, so nothing resumes them). A resource-limit hit on a cascade task must FAIL CLEANLY (no suspend).
|
|
15
|
+
* (Cross review wtyc7ist3 HIGH finding: without this, enabling RESOURCE_SUSPEND leaks a suspended VM + checkpoint on every
|
|
16
|
+
* cascade task that hits a resource limit.) The arm is the judge's session cell seen from the opt-in side: the day the engine
|
|
17
|
+
* lets a rung's pause land on a session the host's resume chain reaches (core [ref]), the judge's answer flips and this arm goes.
|
|
18
|
+
* Every other task — a verify task included — opts in alike. A verify task's implementation leg and fix rounds run on the
|
|
19
|
+
* run's own session, so the judge lifts their pause into a park of the run row (resumable through
|
|
20
|
+
* `POST /v1/assistant/tasks/:id/resume`); the verifier's own leg is built by the engine without an opt-in, so a limit there
|
|
21
|
+
* still fails that leg.
|
|
18
22
|
*/
|
|
19
23
|
export declare function resourceSuspendOptIn(opts: {
|
|
20
24
|
/** `RESOURCE_SUSPEND=true` (the worker-level switch). */
|
|
21
25
|
enabled: boolean;
|
|
22
26
|
/** `RESOURCE_SUSPEND_TTL_SEC` — 0 ⇒ core default (30d) by omitting `ttlMs`. */
|
|
23
27
|
ttlSec: number;
|
|
24
|
-
/** This task requested the developer-mode verify gate (`body.verify === true`). */
|
|
25
|
-
isVerify: boolean;
|
|
26
28
|
/** This task requested the cascade ladder (`body.cascade === true`). */
|
|
27
29
|
isCascade: boolean;
|
|
28
30
|
/** Multi-tenant isolation key — the SAME key durableApproval uses (the principal; "_" when auth is off). */
|
package/dist/resource-suspend.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 【两半各自的真源(刻意不自建第三本账)】
|
|
10
10
|
* · **上限半**:本模块的进程内登记册 —— 记的是**这条 run 真正铸给 core 的那只 `resourceSuspend`**
|
|
11
11
|
* (装配点 `boot/resolve-spec.ts` 的 `resourceSuspendOptIn`),不是读时现取 env。差别是承重的:
|
|
12
|
-
* ①
|
|
12
|
+
* ① cascade 腿被 `resourceSuspendOptIn` **整只排除**(opt-in 不成立)⇒ 登记册里没有它 ⇒
|
|
13
13
|
* 整键缺席,绝不显示一个没人执行的天花板;② 滚动改 env 之后,已在跑的 run 报的仍是它自己那份。
|
|
14
14
|
* · **已耗半**:run 自己的 durable 账本行 `model_usage`(`trace/project.ts` 的 `aggregateModelUsage`)——
|
|
15
15
|
* 与 `TaskStats.modelUsage` 回声**同一份账**,append-only、跨 slice、跨进程(每条腿只追加自己的
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* core 的 `spentTokens` 轴 = 每片 `TaskStats.tokens`(= Σ 每次调用 `usage.totalTokens`,**不含**委派子代,
|
|
22
22
|
* 子代在 `stats.nested`),而 `model_usage` 行正是同一批 `brain.call` 的逐 turn delta、同样只收顶层 run。
|
|
23
23
|
* 已知差:① **滞后至多一个 turn**(delta 在 turn 边界 drain,进行中的那一 turn 还没入账);② 账本行
|
|
24
|
-
* 写失败(F 类)
|
|
24
|
+
* 写失败(F 类)会少计;③ 只回结果的组合腿(verify)没有逐 turn 落账的流,`model_usage` 行只在停驻 / 终局那一拍写 ⇒
|
|
25
|
+
* running 期读到的是上一次停驻时的量,滞后**一整片**(钉:`test/resource-suspend.test.ts` 的 🚧 格)。⇒ 本投影是**分诊/预警**读面,**不是**任何门/CAS/resume 判定的输入。
|
|
25
26
|
*
|
|
26
27
|
* 【登记册的语义边界(与 `turn-activity.ts` 的 `msSinceLastActivity` 逐字同族)】
|
|
27
28
|
* · **同副本 best-effort**:只活在本进程。跨副本 poll(run 跑在别的副本)或本副本重启后 ⇒ 读不到 ⇒
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
* 【已声明的代价:每次 poll 一次全量账本读(codex 交叉复审 R2-[medium],如实登记、本批不修)】
|
|
35
36
|
* {@link buildCrossSliceUsage} 要对**全部** `model_usage` 行求和 ⇒ 调用点(`routes/runs.ts` 的 poll)在
|
|
36
37
|
* 窗已登记时每拍读一次 `getEvents(taskId, 0)`,工作量随「轮询次数 × 已积累事件数」增长。三条限幅是**结构性**
|
|
37
|
-
* 的,不是「应该很少见」:① **只有登记过窗的 run 才读**(没开三旋钮的部署、以及
|
|
38
|
+
* 的,不是「应该很少见」:① **只有登记过窗的 run 才读**(没开三旋钮的部署、以及 cascade 腿,一次都不读);
|
|
38
39
|
* ② 只在 `running` 且非 stale 时读;③ 同一条路上早已存在同形读(终局 + 配了 infra 价目表时的 `needCost` 臂,
|
|
39
40
|
* 同样是 `getEvents(taskId, 0)`)—— 本批加的是**跑动期**这一档,不是新病种。
|
|
40
41
|
* 🔴 真正的收口在**存储面**(不在本模块):给 run store 加一条「累计用量 + resource_limit park 计数」的
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [ref] 件3(cli [ref] sema-bug4 (d) / server [ref]):**取消现场快照**的唯一铸点。
|
|
3
|
+
*
|
|
4
|
+
* 语义边界、缺席纪律、「为什么不写模型调用相位」全部成文在类型属主处 —— 见
|
|
5
|
+
* `plugins/store-contracts.ts` 的 `RunCancelContext` 顶注。本文件只做装配。
|
|
6
|
+
*
|
|
7
|
+
* 三条用户取消腿共用它(**判别材料只许有一份口径**):
|
|
8
|
+
* · `POST /v1/runs/:id/cancel` 的 park 取消腿(`http/routes/runs.ts` cancelSuspended);
|
|
9
|
+
* · `/v1/tasks/stream` 的客户端断连腿(`http/routes/tasks.ts`,没读到 done 的那一支);
|
|
10
|
+
* · durable bg 腿的 abort 结算(`runs.ts` —— 同一条 cancel 动词打到 running 行上时的终局形)。
|
|
11
|
+
*
|
|
12
|
+
* [ref] 起,「取消终局整只长什么样」也收在本文件({@link mintCancelledResult})—— 快照与它所在的
|
|
13
|
+
* 那条结果由同一个属主铸,三条腿一份口径。
|
|
14
|
+
*
|
|
15
|
+
* [ref] 起,「这次取消是谁发起的」也收在本文件:中止那一刻经 {@link createRunAbort} 的句柄登记成因,终局铸点从同一只句柄读。
|
|
16
|
+
*/
|
|
17
|
+
import type { TerminalCause } from "@sema-agent/core";
|
|
1
18
|
import type { AbortCause, PersistedTaskResult, RunCancelContext } from "./plugins/store-contracts.js";
|
|
2
19
|
/**
|
|
3
20
|
* @param taskId 这条 run 的账本 id(turn 活性登记的键)。
|
|
@@ -58,6 +75,23 @@ export declare function mintCancelledResult<R extends PersistedTaskResult>(args:
|
|
|
58
75
|
export declare function mintCancelledResult(args: CancelMintArgs & {
|
|
59
76
|
engineResult?: undefined;
|
|
60
77
|
}): PersistedTaskResult;
|
|
78
|
+
/**
|
|
79
|
+
* 被取消的续跑腿、且这张卡被本服务 expire 之后,终局上的那句话 —— **全仓单源**([ref])。
|
|
80
|
+
*
|
|
81
|
+
* 引擎对一条「批过的那一步没开跑就结束」的续跑腿,在终局文案上补一句通用的话:「…the checkpoint was REOPENED (pending): the same approval can be resumed again」
|
|
82
|
+
* (它对想再续的宿主是真话:引擎确实把卡放回了 pending)。而本服务按取消语义结算这张卡(取消 = run 死:绝不重新 park,卡 expire),于是写在终局上的那句话与可操作面
|
|
83
|
+
* 不一致 —— 文案说可再续,待办队列里没有这张卡、同一张卡再决断 404。取消不可逆(契约),所以真话是这一句。
|
|
84
|
+
* 引擎那句里「放回 pending」的事实与「同一批准可再续」的结论都是**引擎当时**的,本服务在其后改了卡的状态,最后一个写手的句子才对。
|
|
85
|
+
*/
|
|
86
|
+
export declare const CARD_SETTLED_BY_CANCEL_MESSAGE = "Cancelled \u2014 the approved action never started, and the cancel settled this approval: it cannot be resumed (start a new run to continue)";
|
|
87
|
+
/**
|
|
88
|
+
* 一条被取消的续跑腿的失败终局,在本服务亲手 expire 了它那张卡之后的形:**只换文案**,码(引擎补的 `resume.reopened_unstarted` 等)、成因位、统计与其余字段原样
|
|
89
|
+
* (码立住是成文契约;换码是另一条 wire 变更)。非 `failed` 终局原样返回。纯函数,不改入参。
|
|
90
|
+
* 调用点只有 `http/resume-legs.ts` 的 `reopenedAfterLeg`(判据 = 店的事实「本座 expire 了一张 pending 的卡」,不嗅引擎文案)。
|
|
91
|
+
*/
|
|
92
|
+
export declare function withCardSettledByCancelMessage<R extends {
|
|
93
|
+
terminal: TerminalCause;
|
|
94
|
+
}>(leg: R): R;
|
|
61
95
|
/** {@link mintCancelledResult} 的公共实参(`engineResult` 另列:在场与否决定返回型)。 */
|
|
62
96
|
interface CancelMintArgs {
|
|
63
97
|
/** 这条 run 的账本 id(活性登记的键;账本不在场时给空串,快照按「证不出」处理)。 */
|
|
@@ -36,6 +36,13 @@ export function mintCancelledResult(args) {
|
|
|
36
36
|
abortCause: args.cause,
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
+
export const CARD_SETTLED_BY_CANCEL_MESSAGE = "Cancelled — the approved action never started, and the cancel settled this approval: it cannot be resumed (start a new run to continue)";
|
|
40
|
+
export function withCardSettledByCancelMessage(leg) {
|
|
41
|
+
const t = leg.terminal;
|
|
42
|
+
if (t.kind !== "failed")
|
|
43
|
+
return leg;
|
|
44
|
+
return { ...leg, terminal: { ...t, message: CARD_SETTLED_BY_CANCEL_MESSAGE } };
|
|
45
|
+
}
|
|
39
46
|
export function buildCancelledLedgerRow(c) {
|
|
40
47
|
const t = c.terminal;
|
|
41
48
|
return {
|
package/dist/run-local.js
CHANGED
|
@@ -25,13 +25,13 @@ import { acquireLocalBackendWithWait } from "./plugins/store-lock-wait.js";
|
|
|
25
25
|
import { configLocalRoot, createConfigProvider } from "./config-provider.js";
|
|
26
26
|
import { CONFIG_DOMAIN_INVALID_NOTE, buildCandidateRejectedFields, judgeConfigCandidate } from "./web-admin-client/candidate-gate.js";
|
|
27
27
|
import { buildUnreadConfigFileFields, buildUnreadConfigKeyFields } from "./web-admin-client/read-warnings.js";
|
|
28
|
-
import { composeExecutionLane, settleHostLaneShell } from "./boot/execution-lane.js";
|
|
28
|
+
import { composeExecutionLane, settleHostLaneShell, warnReadDenyFloorUnkept } from "./boot/execution-lane.js";
|
|
29
29
|
import { judgeConsolidationValve } from "./boot/memory-consolidation.js";
|
|
30
30
|
import { logConfigDirMigration, migrateLocalConfigDirectory } from "./config-d-migration.js";
|
|
31
31
|
import { assertLocalConfigDirTrusted, ConfigDirUntrustedError } from "./config-dir-trust.js";
|
|
32
32
|
import { applyEffective, applyCenterReadFace, applySkillsManifest, resolveMcpServers, mcpForScenario, resolveA2aPeers, a2aForScenario } from "./web-admin-client/facade.js";
|
|
33
33
|
import { hostExecutionEnvFactory } from "./plugins/remote-env-host.js";
|
|
34
|
-
import {
|
|
34
|
+
import { buildLaneHomeClaim, executionLaneOf } from "./execution-lane-caps.js";
|
|
35
35
|
import { makeLoadProjectMemory, makeProbeInstructionSources } from "./project-memory.js";
|
|
36
36
|
import { createInstructionSourceSeat } from "./instruction-source-notice.js";
|
|
37
37
|
import { loadDeploymentSkills } from "./capabilities/skills.js";
|
|
@@ -42,12 +42,13 @@ import { createTaskListLane } from "./boot/task-list-lane.js";
|
|
|
42
42
|
import { pickHandsRunner, withoutHands } from "./capabilities/hands-lane.js";
|
|
43
43
|
import { HttpError, sessionIdShapeIssue } from "./security.js";
|
|
44
44
|
import { createMemoryEngineIncidentSink } from "./memory-incident-sink.js";
|
|
45
|
-
import { fileMemoryEngineRoot, memoryEngineBackendFor, memorySpecForRequest } from "./memory-scope.js";
|
|
45
|
+
import { fileMemoryEngineRoot, memoryEngineBackendFor, memoryLayersNamedBy, memorySpecForRequest } from "./memory-scope.js";
|
|
46
|
+
import { createMemoryScopeStores } from "./memory-scope-stores.js";
|
|
46
47
|
import { createMemoryProjectLayers } from "./memory-project-layer.js";
|
|
47
48
|
import { assertProjectLayerOwnable } from "./project-identity.js";
|
|
48
49
|
import { declaredCredential } from "./model-route-gap.js";
|
|
49
50
|
import { judgeServedModelRoute } from "./model-route-endpoint.js";
|
|
50
|
-
import {
|
|
51
|
+
import { startMemorySyncRunner } from "./memory-sync-client.js";
|
|
51
52
|
import { buildPricing, cappedCeiling, createTracer } from "./budget.js";
|
|
52
53
|
import { createSharedRunnerDeps } from "./boot/runner-deps.js";
|
|
53
54
|
import { createPeerDesk } from "./peer-seat.js";
|
|
@@ -472,17 +473,22 @@ export async function runLocal(argv, deps = {}) {
|
|
|
472
473
|
const hostRx = config.remoteExec?.provider === "host" ? config.remoteExec : undefined;
|
|
473
474
|
const workspaceDir = args.workspace ?? hostRx?.workspaceBase ?? process.cwd();
|
|
474
475
|
await settleHostLaneShell(config, logger);
|
|
476
|
+
warnReadDenyFloorUnkept(config, logger);
|
|
477
|
+
const homeDirSeat = buildLaneHomeClaim(config);
|
|
475
478
|
const executionEnvFactory = hostRx
|
|
476
479
|
? hostExecutionEnvFactory({
|
|
477
480
|
workspaceDir,
|
|
478
|
-
...
|
|
481
|
+
...homeDirSeat,
|
|
479
482
|
backgroundShell: config.requirePrincipal !== true,
|
|
480
483
|
...(hostRx.commandTimeoutMs != null ? { commandTimeoutMs: hostRx.commandTimeoutMs } : {}),
|
|
481
484
|
})
|
|
482
485
|
: undefined;
|
|
483
486
|
const lspManager = hostRx && config.lspHostEnabled && config.requirePrincipal !== true ? createHostLspManager(config, (event, fields) => logger.info(event, fields)) : undefined;
|
|
484
|
-
const memoryEngine = memoryEngineBackendFor(config, root, memoryEngineIncident);
|
|
485
487
|
const engineDataRoot = fileMemoryEngineRoot(config, root);
|
|
488
|
+
const fileEngine = memoryEngineBackendFor(config, root, memoryEngineIncident);
|
|
489
|
+
const memoryEngine = fileEngine !== undefined
|
|
490
|
+
? createMemoryScopeStores({ backend: fileEngine.backend, root: engineDataRoot, namedLayers: () => memoryLayersNamedBy({ ...config, memoryScope: args.user ?? "local" }), onIncident: memoryEngineIncident })
|
|
491
|
+
: undefined;
|
|
486
492
|
try {
|
|
487
493
|
judgeConsolidationValve({ config, memoryEngine });
|
|
488
494
|
}
|
|
@@ -494,18 +500,7 @@ export async function runLocal(argv, deps = {}) {
|
|
|
494
500
|
}
|
|
495
501
|
let memorySync;
|
|
496
502
|
if (config.memorySync && memoryEngine) {
|
|
497
|
-
|
|
498
|
-
memorySync = createMemorySyncRunner({
|
|
499
|
-
backend: memoryEngine.backend,
|
|
500
|
-
scope: config.memorySync.scope,
|
|
501
|
-
memoryRoot: memoryEngine.root,
|
|
502
|
-
transport,
|
|
503
|
-
log: logger,
|
|
504
|
-
...(config.memorySync.maxPushEntries !== undefined ? { maxPushEntries: config.memorySync.maxPushEntries } : {}),
|
|
505
|
-
...(config.memorySync.maxPullEntries !== undefined ? { maxPullEntries: config.memorySync.maxPullEntries } : {}),
|
|
506
|
-
});
|
|
507
|
-
logger.info("memory_sync_enabled", buildMemorySyncEnabledFields(transport.peer, config.memorySync.scope, memorySync.cursorPathFor(config.memorySync.scope)));
|
|
508
|
-
memorySync.trigger("boot");
|
|
503
|
+
memorySync = startMemorySyncRunner({ sync: config.memorySync, stores: memoryEngine, log: logger });
|
|
509
504
|
}
|
|
510
505
|
else if (config.memorySync) {
|
|
511
506
|
logger.warn("memory_sync_configured_but_memory_dark", { note: "MEMORY_SYNC_URL is set but the file memory engine is dark (MEMORY_ENGINE=off / remote exec lane) — no sync rounds will run" });
|
|
@@ -687,7 +682,7 @@ export async function runLocal(argv, deps = {}) {
|
|
|
687
682
|
}
|
|
688
683
|
}
|
|
689
684
|
const projectKey = memoryEngine
|
|
690
|
-
? await createMemoryProjectLayers({
|
|
685
|
+
? await createMemoryProjectLayers({ stores: memoryEngine, syncRunner: memorySync, log: logger }).prepare(config, scope, workspaceDir)
|
|
691
686
|
: undefined;
|
|
692
687
|
const taskTimeoutSec = Math.floor(parseNumOrFailNonNegative("TASK_TIMEOUT_SEC", process.env.TASK_TIMEOUT_SEC || "0"));
|
|
693
688
|
const timeoutSec = taskWallClockSec(taskTimeoutSec, false);
|
package/dist/runs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defaultTaskRegistry, type CascadeConfig, type CheckpointToken, type RunInternals, type Runner, type SubagentSteerHandle, type TaskResult, type TaskSpec, type TaskStream, type TerminalCause } from "@sema-agent/core";
|
|
2
|
+
import { type CardVoidPort } from "./card-void.js";
|
|
2
3
|
import { type EntryProblem } from "./entry-problems.js";
|
|
3
4
|
import type { SendUserFileEmitter } from "./capabilities/send-user-file-tool.js";
|
|
4
5
|
import type { RunStore } from "./plugins/store-backend.js";
|
|
@@ -181,9 +182,24 @@ export declare function releaseKeyIfZeroWorkRefusal(runStore: {
|
|
|
181
182
|
export declare function createPromptCommitReader(): (ev: {
|
|
182
183
|
readonly type: string;
|
|
183
184
|
}) => string | undefined;
|
|
185
|
+
/** 回退锚写在哪条腿上(探针行的 `leg=`):流式腿 `POST /v1/tasks/stream`、后台腿 `POST /v1/runs`、续跑腿。 */
|
|
186
|
+
export type ResumeAnchorLeg = "stream" | "bg" | "resume";
|
|
187
|
+
/**
|
|
188
|
+
* 回退锚的**唯一**写法(三条腿同一只):**有界** await 写入(单行店操作期限 {@link BASELINE_IO_DEADLINE_MS},与项目指令基线的
|
|
189
|
+
* 读写同一只数、同一只 {@link withinIoDeadline} —— 同为单行 PK 写、同在腿的关键路径上);写失败或到期 ⇒ 不抛(锚是这次提示词能不能
|
|
190
|
+
* 回退的手柄,不是 run 的成败),记一次登记过的 fail-open `server.resume-anchor.capture-failed`(`reason=error|timeout`;计数 + 探针行 + 一次性 warn)。
|
|
191
|
+
* 调用方在本腿的终帧(流式腿的 `done`)**之前** await 它 ⇒ 客户端拿到终帧时锚已落定或已知没落定,没有「锚晚到」的窗;锚店挂住至多让终帧晚一个期限。
|
|
192
|
+
* 到期只放手不取消:那次写照常在飞,迟到落定的锚照样可用(迟到的失败被吞,不重复计数)。
|
|
193
|
+
* 用户面的读数仍只有一处:会话视图用户消息行的 `taskId?`(present-iff 锚在)与 `resumeAt` 的 404 `resume_at.unknown_event`。
|
|
194
|
+
*/
|
|
195
|
+
export declare function settleResumeAnchor(write: () => Promise<void>, where: {
|
|
196
|
+
readonly leg: ResumeAnchorLeg;
|
|
197
|
+
readonly kind: "prompt" | "turn";
|
|
198
|
+
}): Promise<void>;
|
|
184
199
|
export declare class TurnAnchorCapture {
|
|
185
200
|
private readonly capture;
|
|
186
|
-
|
|
201
|
+
/** 这只捕获器在哪条腿上(写失败的 fail-open 探针行带它)。 */
|
|
202
|
+
private readonly leg;
|
|
187
203
|
/** R8 (CC-parity rewind): capture a USER-message anchor straight from the
|
|
188
204
|
* `message_committed{role:"user"}` event — its `entryId` is the persisted user-message `SessionTreeEntry.id`,
|
|
189
205
|
* ALWAYS a valid `resumeAt` target (core accepts a user message; it rejects a tool-result / mid-tool-call
|
|
@@ -197,7 +213,9 @@ export declare class TurnAnchorCapture {
|
|
|
197
213
|
private turnHadTool;
|
|
198
214
|
/** 用户提交是不是提问的唯一读法({@link createPromptCommitReader};附件帧不是提问)。 */
|
|
199
215
|
private readonly promptCommit;
|
|
200
|
-
constructor(capture: ((eventId: string) => Promise<void>) | undefined,
|
|
216
|
+
constructor(capture: ((eventId: string) => Promise<void>) | undefined,
|
|
217
|
+
/** 这只捕获器在哪条腿上(写失败的 fail-open 探针行带它)。 */
|
|
218
|
+
leg: Exclude<ResumeAnchorLeg, "stream">,
|
|
201
219
|
/** R8 (CC-parity rewind): capture a USER-message anchor straight from the
|
|
202
220
|
* `message_committed{role:"user"}` event — its `entryId` is the persisted user-message `SessionTreeEntry.id`,
|
|
203
221
|
* ALWAYS a valid `resumeAt` target (core accepts a user message; it rejects a tool-result / mid-tool-call
|
|
@@ -247,6 +265,20 @@ export declare function parkToolCallId(result: unknown, cs: ParkCheckpointReader
|
|
|
247
265
|
* 不塞进 `checkpointGate`——那是 core 的类型,server 不改其形)。非 park / 无 token / tool-less /
|
|
248
266
|
* 读失败 ⇒ **同一引用**原样返回(键缺席)。graft 不负责 strip——组合序恒为 graft → strip。 */
|
|
249
267
|
export declare function graftParkToolCallId<T>(result: T, cs: ParkCheckpointReader | undefined): Promise<T>;
|
|
268
|
+
/**
|
|
269
|
+
* 🔴 [ref] **停驻没落定就以失败收场的腿:卡的命运先于认领释放**(后台腿与续跑腿同读这一只;动词 = `card-void.ts` 的结算作废)。
|
|
270
|
+
*
|
|
271
|
+
* 腿要以失败收场(行 `failed`、认领释放),而手里的结果是宿主层停驻 —— 引擎交回结果之前已把卡落进 checkpoint 店,卡在本 run 的会话上 ——
|
|
272
|
+
* ⇒ 先把那张卡按它自己的 scope 作废,调用方再放认领。不作废 ⇒ 待决面上留一张卡,兑现它的 run 已经 `failed`、认领已放:决定口照样受理,
|
|
273
|
+
* 续跑在没有认领的会话上驱动(`resume-legs.ts` 认领缺席的成因清单)。顺序承重:先放认领、后作废 ⇒ 两步之间(作废没做成时一直)就是那一形。
|
|
274
|
+
* 停驻没落定的成因不在判据里(停驻行 / 用量行 / 结果到手之后的任何一笔账本写抛):判据只读手里那份结果。
|
|
275
|
+
*
|
|
276
|
+
* `held` = 手里那份结果过了宿主判官之后的形(判官提上来的嵌套停驻同样算;不在本 run 会话上的嵌套停驻 —— cascade 级上的卡 —— 判官不提,
|
|
277
|
+
* 不归本腿作废)。不是停驻 ⇒ 零 I/O。不抛:作废没做成 ⇒ 卡回到「留在待决面上、由兜底收割收走」的形,响亮留痕。
|
|
278
|
+
*/
|
|
279
|
+
export declare function voidHeldParkCard(held: {
|
|
280
|
+
readonly terminal: TerminalCause;
|
|
281
|
+
} | undefined, hostSessionId: string | undefined, cards: CardVoidPort | undefined, leg: "bg" | "resume"): Promise<void>;
|
|
250
282
|
/**
|
|
251
283
|
* Drive a task to completion in the background, persisting its events to the durable run log (S2).
|
|
252
284
|
*
|
|
@@ -263,10 +295,14 @@ export declare function graftParkToolCallId<T>(result: T, cs: ParkCheckpointRead
|
|
|
263
295
|
* Preemption (POST /v1/assistant/tasks/:id/preempt, [ref] seam #2): a SECOND, INDEPENDENT controller
|
|
264
296
|
* (`preemptCtrl`, registered in `preemptable`) carries the scheduler's graceful "yield this task" — when raised,
|
|
265
297
|
* core durably SUSPENDS the task at the next clean turn boundary (gate resource_limit, reason "preempt") so it is
|
|
266
|
-
* RESUMABLE, the opposite of cancel's kill. It is wired ONLY on the plain-stream path
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
298
|
+
* RESUMABLE, the opposite of cancel's kill. It is wired ONLY on the plain-stream path. A cascade cannot honor it: a
|
|
299
|
+
* rung's pause lands on the rung's own engine-minted session, which the host's resume chain cannot reach (the
|
|
300
|
+
* host-boundary judge settles it terminal). A verify task carries the resource-suspend opt-in (a budget / turns /
|
|
301
|
+
* walltime limit parks its implementation leg or fix round), but its FIRST slice here is not wired to the preempt
|
|
302
|
+
* signal (`preemptEligible` below is false for verify, so the preempt endpoint answers a no-op for a verify run this
|
|
303
|
+
* replica owns); a RESUMED verify leg is wired (`resume-legs.ts` registers every resume leg in `preemptableRuns` and
|
|
304
|
+
* threads `preemptSignal` into `resumeWithVerification`). Cross-replica via the `preempt_requested` flag (same heartbeat
|
|
305
|
+
* tick). Eligibility (resourceSuspend +
|
|
270
306
|
* durable store + durable tool-results + remote env) is core's call: an ineligible task's preemptSignal no-ops.
|
|
271
307
|
*
|
|
272
308
|
* Steering (POST /v1/runs/:id/steer, [ref]): the live core `TaskStream` is registered in `steerable` so the
|
|
@@ -335,16 +371,11 @@ approval?: {
|
|
|
335
371
|
declaredFamilies: ReadonlySet<ApprovalFrameFamily>; /** 出处带车道:这条执行上下文的车道(装配点 `durable-run-leg.ts` 写 `ctx.lane`)。 */
|
|
336
372
|
executionLane: import("./execution-lane-caps.js").ExecutionLane;
|
|
337
373
|
},
|
|
338
|
-
/**
|
|
339
|
-
* `suspended` 事件带 `toolCallId`(graft 见 {@link parkToolCallId})
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
kind?: unknown;
|
|
344
|
-
toolCallId?: unknown;
|
|
345
|
-
};
|
|
346
|
-
} | null>;
|
|
347
|
-
},
|
|
374
|
+
/** 本腿结算用的 checkpoint 店(`deps.checkpointStore`),两件事:①[ref] park 投影腿的读口 —— 在场时 durable park 的
|
|
375
|
+
* `suspended` 事件带 `toolCallId`(graft 见 {@link parkToolCallId});②验证门结算时作废验证器自己的停驻卡
|
|
376
|
+
* ({@link voidVerifierPauseCard}:本服务兑现不了的卡不留在待决面上);③停驻没落定就以失败收场时作废手里那张卡({@link voidHeldParkCard})。
|
|
377
|
+
* 缺席 ⇒ ①旧字节逐字不变;②③带凭据的停驻响亮留痕、卡由兜底收割。 */
|
|
378
|
+
checkpointCards?: ParkCheckpointReader & CardVoidPort,
|
|
348
379
|
/** [ref]:装配期(`prepareSpec` → `resolveSpec`)铸下的用户面通告 —— 那一刻本腿的通告口还没开,
|
|
349
380
|
* 所以由本腿在 `registerEngineNoticeLeg` 那一拍连同 `pending` 一起投(投递单点仍是 `route()`)。
|
|
350
381
|
* 缺席 ⇒ 一个字节不投(既有调用方逐字不变)。 */
|