@sema-agent/server 7.141.0 → 7.143.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 +657 -0
- package/USAGE.md +102 -30
- package/dist/adoption/plan.js +22 -0
- package/dist/approval-ask-audit-store.d.ts +61 -43
- package/dist/approval-ask-audit-store.js +69 -44
- package/dist/approval-ask-machine.d.ts +15 -7
- package/dist/approval-ask-machine.js +10 -4
- package/dist/approval-card.d.ts +126 -27
- package/dist/approval-card.js +103 -23
- package/dist/approval-crash-convergence.d.ts +17 -7
- package/dist/approval-crash-convergence.js +94 -22
- package/dist/approval-deny-reasons.d.ts +34 -30
- package/dist/approval-deny-reasons.js +21 -6
- package/dist/approval-policy-settlement.d.ts +1 -1
- package/dist/approval-queue-kind.d.ts +27 -0
- package/dist/approval-queue-kind.js +6 -0
- package/dist/approval-reconciler.d.ts +41 -9
- package/dist/approval-reconciler.js +45 -42
- package/dist/audit.js +4 -2
- package/dist/auth-bridge.d.ts +9 -6
- package/dist/auth-bridge.js +9 -3
- package/dist/boot/adoption.js +2 -1
- package/dist/boot/budget-tracing.d.ts +17 -1
- package/dist/boot/budget-tracing.js +10 -6
- package/dist/boot/device-lane.d.ts +1 -1
- package/dist/boot/execution-env.d.ts +24 -4
- package/dist/boot/execution-env.js +26 -23
- package/dist/boot/execution-lane.js +2 -1
- package/dist/boot/exit-boundary.js +5 -4
- package/dist/boot/governance-seams.d.ts +26 -41
- package/dist/boot/governance-seams.js +61 -28
- package/dist/boot/late-binds.d.ts +7 -4
- package/dist/boot/late-binds.js +3 -1
- package/dist/boot/leader.js +2 -4
- package/dist/boot/memory-consolidation.d.ts +0 -8
- package/dist/boot/memory-consolidation.js +5 -4
- package/dist/boot/parked-revive-gate.js +2 -1
- package/dist/boot/permission-rules-audit.d.ts +0 -28
- package/dist/boot/permission-rules-audit.js +2 -1
- package/dist/boot/read-deny-anchor-audit.js +2 -1
- package/dist/boot/reapers.js +9 -7
- package/dist/boot/resolve-spec.d.ts +1 -1
- package/dist/boot/resolve-spec.js +19 -10
- package/dist/boot/retention-lane.js +5 -3
- package/dist/boot/runner-deps.d.ts +10 -7
- package/dist/boot/runner-deps.js +20 -29
- package/dist/boot/runtime-caps.js +3 -2
- package/dist/boot/session-faces.js +4 -3
- package/dist/boot/shutdown.d.ts +9 -0
- package/dist/boot/shutdown.js +19 -4
- package/dist/boot/stage-02-web-admin-pull.js +3 -0
- package/dist/boot/stage-03-store-backend.d.ts +4 -1
- package/dist/boot/stage-03-store-backend.js +1 -2
- package/dist/boot/stage-04-stores.d.ts +5 -2
- package/dist/boot/stage-04-stores.js +6 -7
- package/dist/boot/stage-05-execution-env.d.ts +6 -3
- package/dist/boot/stage-05-execution-env.js +8 -6
- package/dist/boot/stage-06-runners.d.ts +6 -3
- package/dist/boot/stage-06-runners.js +3 -4
- package/dist/boot/stage-07-capability-layer.d.ts +6 -3
- package/dist/boot/stage-07-capability-layer.js +7 -2
- package/dist/boot/stage-08-reapers.d.ts +6 -3
- package/dist/boot/stage-08-reapers.js +3 -2
- package/dist/boot/stage-09-leader.d.ts +6 -3
- package/dist/boot/stage-10-http-server.d.ts +6 -3
- package/dist/boot/stage-10-http-server.js +14 -5
- package/dist/boot/stores.d.ts +5 -2
- package/dist/boot/stores.js +10 -9
- package/dist/boot/web-admin.d.ts +5 -1
- package/dist/boot/web-admin.js +48 -36
- package/dist/boot/webfetch-summarize-lane.js +2 -1
- package/dist/boot/workflow-orchestration.js +3 -2
- package/dist/capabilities/builtin-tools.d.ts +2 -1
- package/dist/capabilities/builtin-tools.js +2 -4
- package/dist/capabilities/composite-members.d.ts +2 -1
- package/dist/capabilities/composite-members.js +2 -1
- package/dist/capabilities/hands-lane.d.ts +9 -39
- package/dist/capabilities/hands-lane.js +8 -13
- package/dist/capabilities/mcp-probe.d.ts +3 -2
- package/dist/capabilities/scenarios.d.ts +11 -1
- package/dist/capabilities/scenarios.js +1 -0
- package/dist/capabilities/skills.d.ts +1 -17
- package/dist/capabilities/skills.js +0 -8
- package/dist/capability-facts.d.ts +31 -7
- package/dist/capability-facts.js +27 -4
- package/dist/card-void.d.ts +6 -9
- package/dist/config-catalog.js +2 -1
- package/dist/config-dir-trust.js +58 -29
- package/dist/config-invariants.d.ts +7 -1
- package/dist/config-invariants.js +7 -0
- package/dist/config-provider.d.ts +10 -0
- package/dist/config-provider.js +15 -4
- package/dist/config-root-migration.d.ts +13 -0
- package/dist/config-root-migration.js +99 -0
- package/dist/config-types.d.ts +19 -8
- package/dist/config.d.ts +10 -3
- package/dist/config.js +18 -4
- package/dist/delegated-session-owner.d.ts +5 -3
- package/dist/delegated-session-owner.js +1 -1
- package/dist/device-ws-protocol.d.ts +1 -0
- package/dist/device-ws-protocol.js +2 -1
- package/dist/env-model-table-gate.d.ts +53 -0
- package/dist/env-model-table-gate.js +53 -0
- package/dist/execution-lane-caps.d.ts +2 -1
- package/dist/fleet/fleet-bus.d.ts +34 -55
- package/dist/fleet/fleet-bus.js +35 -100
- package/dist/fleet/fleet-reconciler.d.ts +4 -4
- package/dist/fleet/fleet-reconciler.js +1 -1
- package/dist/fleet/subagent-tail-bus.d.ts +14 -11
- package/dist/fleet/subagent-tail-bus.js +15 -28
- package/dist/hooks/hook-runner.d.ts +6 -0
- package/dist/hooks/hook-runner.js +58 -8
- package/dist/host-decision.d.ts +54 -20
- package/dist/host-decision.js +42 -14
- package/dist/http/admission.d.ts +1 -1
- package/dist/http/admission.js +7 -3
- package/dist/http/approval-sweeps.js +11 -8
- package/dist/http/caller-trust.d.ts +1 -1
- package/dist/http/dispatch.js +4 -2
- package/dist/http/durable-run-leg.js +2 -2
- package/dist/http/engine-refusal.d.ts +16 -0
- package/dist/http/engine-refusal.js +17 -0
- package/dist/http/execution-context.d.ts +2 -2
- package/dist/http/idempotency.d.ts +1 -1
- package/dist/http/memory-compliance-failure-reply.d.ts +1 -3
- package/dist/http/memory-compliance-failure-reply.js +4 -6
- package/dist/http/owner-access.d.ts +11 -0
- package/dist/http/owner-access.js +13 -0
- package/dist/http/principal-gate.d.ts +3 -1
- package/dist/http/principal-gate.js +17 -8
- package/dist/http/resume-legs.d.ts +21 -7
- package/dist/http/resume-legs.js +76 -58
- package/dist/http/resume-restatement.d.ts +39 -0
- package/dist/http/resume-restatement.js +25 -0
- package/dist/http/route-ctx.d.ts +35 -10
- package/dist/http/route-ctx.js +1 -1
- package/dist/http/route-table.js +2 -0
- package/dist/http/routes/approvals-assistant.d.ts +9 -1
- package/dist/http/routes/approvals-assistant.js +142 -31
- package/dist/http/routes/attachments.js +18 -0
- package/dist/http/routes/capabilities.js +16 -4
- package/dist/http/routes/memory-policy.d.ts +2 -2
- package/dist/http/routes/memory-policy.js +27 -7
- package/dist/http/routes/notify-wake.js +23 -25
- package/dist/http/routes/rules.js +48 -13
- package/dist/http/routes/runs.js +12 -11
- package/dist/http/routes/session-memory-sync.d.ts +91 -0
- package/dist/http/routes/session-memory-sync.js +174 -0
- package/dist/http/routes/session-sync.js +13 -20
- package/dist/http/routes/sessions-list.d.ts +2 -1
- package/dist/http/routes/sessions.d.ts +2 -2
- package/dist/http/routes/sessions.js +22 -23
- package/dist/http/routes/tasks.js +34 -54
- package/dist/http/run-read-face.d.ts +7 -0
- package/dist/http/run-read-face.js +9 -3
- package/dist/http/send.d.ts +5 -0
- package/dist/http/send.js +9 -2
- package/dist/http/server.d.ts +27 -15
- package/dist/http/server.js +4 -6
- package/dist/http/stored-body-replay.js +15 -4
- package/dist/http/submit-replay.d.ts +4 -3
- package/dist/http/submit-replay.js +2 -2
- package/dist/http/sync-submit-body.d.ts +21 -4
- package/dist/http/sync-submit-body.js +13 -0
- package/dist/http/wire-types.d.ts +17 -7
- package/dist/identity-source.d.ts +21 -2
- package/dist/identity-source.js +6 -0
- package/dist/leader/leader.js +5 -2
- package/dist/leader/wire.d.ts +7 -1
- package/dist/leader/wire.js +6 -5
- package/dist/leg-facts.d.ts +37 -0
- package/dist/leg-facts.js +15 -0
- package/dist/memory-bundle-engine.d.ts +1 -4
- package/dist/memory-bundle-engine.js +2 -2
- package/dist/memory-incident-sink.d.ts +19 -6
- package/dist/memory-incident-sink.js +8 -4
- package/dist/memory-operator-faces.d.ts +30 -66
- package/dist/memory-operator-faces.js +17 -88
- package/dist/memory-scope-stores.d.ts +38 -40
- package/dist/memory-scope-stores.js +51 -36
- package/dist/memory-scope.d.ts +0 -9
- package/dist/memory-scope.js +0 -9
- package/dist/memory-sync-client.d.ts +21 -21
- package/dist/memory-sync-client.js +62 -43
- package/dist/memory-sync-identity.d.ts +24 -0
- package/dist/memory-sync-identity.js +57 -0
- package/dist/memory-sync.d.ts +27 -5
- package/dist/memory-sync.js +29 -7
- package/dist/model-plane-face.d.ts +13 -7
- package/dist/model-plane-face.js +2 -1
- package/dist/observability/fail-open.d.ts +47 -14
- package/dist/observability/fail-open.js +37 -11
- package/dist/observability/run-terminal.d.ts +92 -34
- package/dist/observability/run-terminal.js +171 -162
- package/dist/orchestration/workflow-completion-inbox.d.ts +5 -19
- package/dist/orchestration/workflow-completion-inbox.js +0 -12
- package/dist/orchestration/workflow-notify-journal.d.ts +3 -2
- package/dist/orchestration/workflow-park-decision.d.ts +8 -3
- package/dist/orchestration/workflow-park-decision.js +5 -3
- package/dist/org-delivery-gate.d.ts +11 -0
- package/dist/org-delivery-gate.js +19 -1
- package/dist/parked-decide.d.ts +13 -9
- package/dist/parked-decide.js +7 -7
- package/dist/parked-revive-surface.js +1 -1
- package/dist/peer-inbound-face.d.ts +127 -0
- package/dist/peer-inbound-face.js +158 -0
- package/dist/permission-rule-list.d.ts +13 -9
- package/dist/permission-rule-list.js +7 -3
- package/dist/plugins/approval-ask-store-file.d.ts +14 -4
- package/dist/plugins/approval-ask-store-file.js +64 -11
- package/dist/plugins/approval-ask-store-memory.d.ts +2 -1
- package/dist/plugins/approval-ask-store-memory.js +17 -14
- package/dist/plugins/approval-ask-store-sql.d.ts +70 -23
- package/dist/plugins/approval-ask-store-sql.js +79 -30
- package/dist/plugins/checkpoint-store-sql.d.ts +4 -4
- package/dist/plugins/checkpoint-store-sql.js +9 -7
- package/dist/plugins/file-history-store-sql.d.ts +24 -18
- package/dist/plugins/file-history-store-sql.js +24 -19
- package/dist/plugins/file-run-store.d.ts +35 -1
- package/dist/plugins/file-run-store.js +108 -9
- package/dist/plugins/imported-layer-root-retirement.d.ts +82 -0
- package/dist/plugins/imported-layer-root-retirement.js +96 -0
- package/dist/plugins/local-checkpoint-store.d.ts +1 -1
- package/dist/plugins/local-checkpoint-store.js +2 -2
- package/dist/plugins/local-session-store.d.ts +42 -9
- package/dist/plugins/local-session-store.js +83 -33
- package/dist/plugins/local-task-attachment-store.d.ts +12 -2
- package/dist/plugins/local-task-attachment-store.js +67 -43
- package/dist/plugins/mailbox-recipient-lifecycle.d.ts +9 -31
- package/dist/plugins/mailbox-recipient-lifecycle.js +4 -0
- package/dist/plugins/mailbox-store-sql.d.ts +12 -8
- package/dist/plugins/mailbox-store-sql.js +76 -7
- package/dist/plugins/memory-key-guards.d.ts +3 -3
- package/dist/plugins/memory-run-store.d.ts +6 -1
- package/dist/plugins/memory-run-store.js +11 -1
- package/dist/plugins/memory-sync-store-pg.d.ts +15 -0
- package/dist/plugins/memory-sync-store-pg.js +21 -0
- package/dist/plugins/memory-sync-store-tidb.d.ts +2 -0
- package/dist/plugins/memory-sync-store-tidb.js +13 -1
- package/dist/plugins/one-time-migrations.d.ts +58 -2
- package/dist/plugins/one-time-migrations.js +161 -4
- package/dist/plugins/org-delivery-quota-store.d.ts +1 -1
- package/dist/plugins/org-delivery-quota-store.js +2 -12
- package/dist/plugins/park-commit-watch.d.ts +1 -1
- package/dist/plugins/permission-rule-store-file.d.ts +10 -1
- package/dist/plugins/permission-rule-store-file.js +15 -2
- package/dist/plugins/permission-rule-store-sql.d.ts +31 -1
- package/dist/plugins/permission-rule-store-sql.js +35 -2
- package/dist/plugins/remote-env-device.d.ts +8 -11
- package/dist/plugins/remote-env-device.js +6 -3
- package/dist/plugins/remote-env-e2b.d.ts +23 -4
- package/dist/plugins/remote-env-e2b.js +111 -28
- package/dist/plugins/remote-env-k8s.d.ts +61 -22
- package/dist/plugins/remote-env-k8s.js +133 -33
- package/dist/plugins/remote-env-local-docker.d.ts +15 -3
- package/dist/plugins/remote-env-local-docker.js +40 -12
- package/dist/plugins/retention-store-sql.d.ts +2 -2
- package/dist/plugins/run-store-sql.d.ts +9 -1
- package/dist/plugins/run-store-sql.js +9 -1
- package/dist/plugins/sandbox-read-floor.d.ts +5 -7
- package/dist/plugins/sandbox-read-floor.js +2 -7
- package/dist/plugins/sql-errors.d.ts +10 -1
- package/dist/plugins/sql-errors.js +13 -0
- package/dist/plugins/store-backend.d.ts +33 -35
- package/dist/plugins/store-backend.js +10 -1
- package/dist/plugins/store-contracts.d.ts +50 -1
- package/dist/plugins/store-contracts.js +6 -0
- package/dist/plugins/task-attachment-store.d.ts +112 -14
- package/dist/plugins/task-attachment-store.js +207 -29
- package/dist/plugins/tool-result-store-sql.d.ts +9 -8
- package/dist/plugins/tool-result-store-sql.js +23 -2
- package/dist/plugins/wiring-section-codec.d.ts +32 -0
- package/dist/plugins/wiring-section-codec.js +55 -0
- package/dist/plugins/workspace-fill.d.ts +60 -0
- package/dist/plugins/workspace-fill.js +106 -0
- package/dist/project-bundle.d.ts +38 -0
- package/dist/project-bundle.js +609 -0
- package/dist/rule-entry-list.d.ts +3 -2
- package/dist/rule-entry-list.js +5 -1
- package/dist/rules-consent.d.ts +28 -5
- package/dist/rules-consent.js +40 -28
- package/dist/run-local.js +11 -13
- package/dist/runs.d.ts +12 -8
- package/dist/runs.js +6 -8
- package/dist/runtime-governance.d.ts +1 -1
- package/dist/sandbox-egress-policy.d.ts +4 -1
- package/dist/sandbox-egress-policy.js +3 -1
- package/dist/sandbox-git-plane.d.ts +31 -12
- package/dist/sandbox-git-plane.js +24 -4
- package/dist/security.d.ts +9 -0
- package/dist/security.js +8 -0
- package/dist/server-secret-env.d.ts +4 -0
- package/dist/session-error-wire.d.ts +36 -0
- package/dist/session-error-wire.js +13 -0
- package/dist/session-incarnation.d.ts +1 -1
- package/dist/session-notify-door.d.ts +106 -0
- package/dist/session-notify-door.js +93 -0
- package/dist/session-sync.d.ts +9 -14
- package/dist/session-sync.js +5 -5
- package/dist/session-workspace.d.ts +3 -13
- package/dist/session-workspace.js +0 -9
- package/dist/standing-answer-grant.d.ts +5 -0
- package/dist/standing-answer-grant.js +10 -0
- package/dist/stores-sql/session-policy-store-sql.d.ts +4 -2
- package/dist/stores-sql/session-policy-store-sql.js +3 -13
- package/dist/task-mcp.d.ts +1 -1
- package/dist/task-settings.d.ts +21 -10
- package/dist/task-settings.js +46 -13
- package/dist/terminal.d.ts +39 -19
- package/dist/terminal.js +65 -22
- package/dist/tool-approval.d.ts +56 -37
- package/dist/tool-approval.js +78 -71
- package/dist/trace/core-keyset-guard.d.ts +134 -14
- package/dist/trace/engine-notice-wire.d.ts +9 -3
- package/dist/trace/engine-notice-wire.js +7 -3
- package/dist/trace/exit-seat.d.ts +9 -2
- package/dist/trace/exit-seat.js +1 -0
- package/dist/trace/ledger-sink.d.ts +10 -6
- package/dist/trace/ledger-sink.js +2 -2
- package/dist/trace/model-segment.d.ts +55 -25
- package/dist/trace/model-segment.js +101 -33
- package/dist/trace/project.d.ts +25 -5
- package/dist/trace/project.js +22 -0
- package/dist/trace/redact.d.ts +61 -9
- package/dist/trace/redact.js +1490 -468
- package/dist/trace/self-minted-wire.d.ts +745 -24
- package/dist/trace/self-minted-wire.js +239 -9
- package/dist/trace/wire-projection-faces.d.ts +2 -2
- package/dist/trace/wire-projection-faces.js +2 -2
- package/dist/verifier-pause-card.d.ts +33 -5
- package/dist/verifier-pause-card.js +15 -10
- package/dist/web-admin-client/apply-effective.d.ts +12 -16
- package/dist/web-admin-client/apply-effective.js +109 -9
- package/dist/web-admin-client/effective-keys.js +2 -0
- package/dist/web-admin-client/types.d.ts +4 -0
- package/dist/workspace-space.d.ts +19 -3
- package/dist/workspace-space.js +8 -4
- package/docs/DEVICE-EXECUTOR-PROTOCOL.md +3 -1
- package/package.json +3 -2
- package/wire-changes/server@7.142.0.json +639 -0
- package/wire-changes/server@7.143.0.json +1167 -0
package/dist/boot/web-admin.js
CHANGED
|
@@ -18,6 +18,7 @@ import { createCenterConfigTier } from "../center-config-tier.js";
|
|
|
18
18
|
import { buildCenterCredentialHealthView, createCenterCredentialRenewer } from "../center-credential-renewer.js";
|
|
19
19
|
import { centerManagedConfigKeys } from "../web-admin-client/apply-effective.js";
|
|
20
20
|
import { configSourceKind, createConfigProvider, raceBootFetch, BOOT_FETCH_DEFERRED } from "../config-provider.js";
|
|
21
|
+
import { REMOTE_CATALOG_SOURCE } from "../env-model-table-gate.js";
|
|
21
22
|
import { ConfigDirUntrustedError } from "../config-dir-trust.js";
|
|
22
23
|
import { createKeyResolver } from "../key-resolver.js";
|
|
23
24
|
import { buildSealedKeyPublicFace, ensureCheckpointCtxSealing, ensureSealedKeyStore, reportExecutionPublicKey } from "../sealed-key.js";
|
|
@@ -30,7 +31,7 @@ import { CONFIG_DOMAIN_INVALID_NOTE, buildCandidateRejectedFields, candidateReje
|
|
|
30
31
|
import { SHA256_HEX_RE } from "../digest-form.js";
|
|
31
32
|
import { BOOT_REJUDGE_OF_REFUSED_GROUP, createConfigApplyLedger, modelPlaneCommitted, refusedGroups } from "../web-admin-client/apply-ledger.js";
|
|
32
33
|
import { announceReadDenyRows, buildDeploymentPostureSeats } from "./runner-deps.js";
|
|
33
|
-
import {
|
|
34
|
+
import { seatText } from "../trace/exit-seat.js";
|
|
34
35
|
const MODELS_REJECTION_PHRASE = {
|
|
35
36
|
domain_invalid: "models 域判形失败",
|
|
36
37
|
empty: "读不出(空 / 纯空白:半写或截断)",
|
|
@@ -55,11 +56,14 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
55
56
|
let latestEffective;
|
|
56
57
|
let candidateRejection;
|
|
57
58
|
let judgedOrdinal = 0;
|
|
58
|
-
|
|
59
|
+
let arrivalSeq = 0;
|
|
60
|
+
const admitArrival = (ordinal, rejection) => {
|
|
59
61
|
if (ordinal < judgedOrdinal)
|
|
60
|
-
return;
|
|
62
|
+
return { seq: undefined };
|
|
61
63
|
judgedOrdinal = ordinal;
|
|
62
64
|
candidateRejection = rejection;
|
|
65
|
+
arrivalSeq += 1;
|
|
66
|
+
return { seq: arrivalSeq };
|
|
63
67
|
};
|
|
64
68
|
const applyLedger = createConfigApplyLedger();
|
|
65
69
|
let lastPull = "none";
|
|
@@ -88,6 +92,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
88
92
|
let bootSkillStale = false;
|
|
89
93
|
let pendingRestart;
|
|
90
94
|
let modelRefusals;
|
|
95
|
+
let modelRefusalsArrival;
|
|
91
96
|
const cc = config.webAdmin;
|
|
92
97
|
const bootCredential = cc?.credential.read();
|
|
93
98
|
const bootVerdict = bootCredential === undefined ? undefined : judgeCenterCredentialAtBoot(bootCredential);
|
|
@@ -161,14 +166,14 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
161
166
|
`refusing to start rather than run with every sealed model unusable (no_key_store). Make that directory creatable, owned by ` +
|
|
162
167
|
`the service user and chmod-able to 0700 on a writable filesystem, or unset SEALED_KEY_DIR to use <data root>/sealed-key.`);
|
|
163
168
|
}
|
|
164
|
-
logger.warn("sealed_key_store_unavailable", { err: String(err), note: "sealed api keys cannot be unsealed on this host — models carrying sealedApiKey will fail loud per-model" });
|
|
169
|
+
logger.warn("sealed_key_store_unavailable", { err: seatText("operator-log-text", String(err)), note: "sealed api keys cannot be unsealed on this host — models carrying sealedApiKey will fail loud per-model" });
|
|
165
170
|
}
|
|
166
171
|
let checkpointCtxSealing;
|
|
167
172
|
try {
|
|
168
173
|
checkpointCtxSealing = await ensureCheckpointCtxSealing(sealedKeyDir, logger);
|
|
169
174
|
}
|
|
170
175
|
catch (err) {
|
|
171
|
-
logger.warn("checkpoint_ctx_sealing_unavailable", { err: err instanceof Error ? err.message : String(err), dir: join(sealedKeyDir, "checkpoint-ctx-keys"), note: "suspended tasks' request credentials cannot be sealed on this host; with durable approvals on the boot refuses — make that directory (under the sealed-key custody directory: SEALED_KEY_DIR, default <data root>/sealed-key) creatable and chmod-able by the service, or repair / remove a key file there whose public and private halves do not belong together" });
|
|
176
|
+
logger.warn("checkpoint_ctx_sealing_unavailable", { err: seatText("operator-log-text", err instanceof Error ? err.message : String(err)), dir: join(sealedKeyDir, "checkpoint-ctx-keys"), note: "suspended tasks' request credentials cannot be sealed on this host; with durable approvals on the boot refuses — make that directory (under the sealed-key custody directory: SEALED_KEY_DIR, default <data root>/sealed-key) creatable and chmod-able by the service, or repair / remove a key file there whose public and private halves do not belong together" });
|
|
172
177
|
}
|
|
173
178
|
const configProvider = configSourceKind(config) !== undefined
|
|
174
179
|
? createConfigProvider({
|
|
@@ -208,7 +213,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
208
213
|
const domains = verdict.domains.join(",");
|
|
209
214
|
if (candidateRejection?.version === r.effective.version && candidateRejection.domains.join(",") === domains)
|
|
210
215
|
return;
|
|
211
|
-
|
|
216
|
+
admitArrival(ordinal, candidateRejectionOf(r, verdict, candidateSource().kind, Date.now()));
|
|
212
217
|
logger.warn("config_candidate_rejected", buildCandidateRejectedFields(r, verdict, leg, { lkgVersion: latestEffective?.version ?? "(env)", ...localDirField }));
|
|
213
218
|
};
|
|
214
219
|
const noteSourceAtApplied = () => {
|
|
@@ -217,7 +222,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
217
222
|
if (rejected === undefined || rejected.version === appliedVersion)
|
|
218
223
|
return;
|
|
219
224
|
const gen = generationOf(appliedVersion);
|
|
220
|
-
|
|
225
|
+
admitArrival(gen, undefined);
|
|
221
226
|
if (!cc?.dryRun)
|
|
222
227
|
applyLedger.applied(gen, appliedVersion);
|
|
223
228
|
logger.info("config_source_back_to_applied", {
|
|
@@ -234,7 +239,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
234
239
|
listener(changed);
|
|
235
240
|
}
|
|
236
241
|
catch (err) {
|
|
237
|
-
logger.warn("self_report_listener_failed", { changed, error: err instanceof Error ? err.message : String(err), note: "a self-report subscriber threw; the state change stands regardless and the next fleet heartbeat carries it" });
|
|
242
|
+
logger.warn("self_report_listener_failed", { changed, error: seatText("operator-log-text", err instanceof Error ? err.message : String(err)), note: "a self-report subscriber threw; the state change stands regardless and the next fleet heartbeat carries it" });
|
|
238
243
|
}
|
|
239
244
|
}
|
|
240
245
|
};
|
|
@@ -258,8 +263,9 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
258
263
|
if (!same)
|
|
259
264
|
notifySelfReport("model_refusals");
|
|
260
265
|
};
|
|
261
|
-
const recordApply = (rep) => {
|
|
266
|
+
const recordApply = (rep, ticket) => {
|
|
262
267
|
applyLedger.recordApply(rep);
|
|
268
|
+
modelRefusalsArrival = ticket.seq;
|
|
263
269
|
publishModelRefusals(buildModelRefusalsSignal(rep.modelRefusals));
|
|
264
270
|
};
|
|
265
271
|
let adoptedArtifact;
|
|
@@ -326,7 +332,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
326
332
|
});
|
|
327
333
|
}
|
|
328
334
|
catch (e) {
|
|
329
|
-
logger.warn("center_prompts_store_unwritable", { dir: promptEpochDir, err: String(e), note: "file-backed prompt-epoch store unavailable — memory fallback (the center candidate is not restart-durable); built-ins unaffected" });
|
|
335
|
+
logger.warn("center_prompts_store_unwritable", { dir: promptEpochDir, err: seatText("operator-log-text", String(e)), note: "file-backed prompt-epoch store unavailable — memory fallback (the center candidate is not restart-durable); built-ins unaffected" });
|
|
330
336
|
return new CenterPromptSource({
|
|
331
337
|
store: withByDigestBackfill(new MemoryPromptArtifactStore()),
|
|
332
338
|
stateStore: recordingStateStore(binnedPromptStateStore(storePerBin(() => new MemoryPromptSourceStateStore()))),
|
|
@@ -349,7 +355,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
349
355
|
await promptSource.restore();
|
|
350
356
|
}
|
|
351
357
|
catch (e) {
|
|
352
|
-
logger.warn("center_prompts_catalog_restore_failed", { phase, err: String(e), note: "the persisted center-layer state for this credential identity could not be loaded — the center candidate is absent until the next adopt; built-ins unaffected" });
|
|
358
|
+
logger.warn("center_prompts_catalog_restore_failed", { phase, err: seatText("operator-log-text", String(e)), note: "the persisted center-layer state for this credential identity could not be loaded — the center candidate is absent until the next adopt; built-ins unaffected" });
|
|
353
359
|
}
|
|
354
360
|
if (cc !== undefined && identity !== undefined && currentIdentity() !== identity) {
|
|
355
361
|
promptStateIdentity = undefined;
|
|
@@ -474,7 +480,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
474
480
|
return lkgSurvivesRestart;
|
|
475
481
|
}
|
|
476
482
|
catch (err) {
|
|
477
|
-
logger.warn("config_lkg_save_failed", { path: lkgPath, err: String(err), note: "durable persist failed — restart signal proceeds anyway (a dead disk + dead center double-fault can re-loop; fix the disk)" });
|
|
483
|
+
logger.warn("config_lkg_save_failed", { path: lkgPath, err: seatText("operator-log-text", String(err)), note: "durable persist failed — restart signal proceeds anyway (a dead disk + dead center double-fault can re-loop; fix the disk)" });
|
|
478
484
|
return false;
|
|
479
485
|
}
|
|
480
486
|
};
|
|
@@ -511,26 +517,28 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
511
517
|
await saveLkg(lkgPath, cc?.worker, identity, read.lkg.effective, read.lkg.etag);
|
|
512
518
|
}
|
|
513
519
|
catch (err) {
|
|
514
|
-
logger.warn("config_lkg_save_failed", { path: lkgPath, err: String(err), note: "the migrated LKG is used from memory this boot; the on-disk copy is migrated again on the next read-back and replaced by the next clean candidate" });
|
|
520
|
+
logger.warn("config_lkg_save_failed", { path: lkgPath, err: seatText("operator-log-text", String(err)), note: "the migrated LKG is used from memory this boot; the on-disk copy is migrated again on the next read-back and replaced by the next clean candidate" });
|
|
515
521
|
}
|
|
516
522
|
}
|
|
517
523
|
logger.info("config_loaded_lkg", { path: lkgPath, savedAt: read.lkg.savedAt, why, scope, note: lkgReadNote(scope) });
|
|
518
524
|
const lkgEffective = read.lkg.effective;
|
|
519
525
|
candidateIdentity.set(lkgEffective, identity);
|
|
520
526
|
bindValidator(read.lkg.etag, identity);
|
|
521
|
-
return { effective: lkgEffective, ...(read.lkg.etag !== undefined ? { etag: read.lkg.etag } : {}), prompts: read.prompts };
|
|
527
|
+
return { effective: lkgEffective, ...(read.lkg.etag !== undefined ? { etag: read.lkg.etag } : {}), prompts: read.prompts, catalogSource: REMOTE_CATALOG_SOURCE };
|
|
522
528
|
};
|
|
523
529
|
const bootApplyLkgInline = async (lkgR) => {
|
|
524
530
|
const lkgGen = generationOf(lkgR.effective.version);
|
|
525
531
|
applyLedger.seenTarget(lkgGen, lkgR.effective.version);
|
|
532
|
+
const lkgArrival = admitArrival(lkgGen, undefined);
|
|
526
533
|
let lkgReport;
|
|
527
534
|
applyEffective(config, lkgR.effective, logger, {
|
|
528
535
|
leg: "boot",
|
|
536
|
+
catalogSource: lkgR.catalogSource,
|
|
529
537
|
sealedKeys,
|
|
530
538
|
generation: lkgGen,
|
|
531
539
|
report: (rep) => {
|
|
532
540
|
lkgReport = rep;
|
|
533
|
-
recordApply(rep);
|
|
541
|
+
recordApply(rep, lkgArrival);
|
|
534
542
|
},
|
|
535
543
|
});
|
|
536
544
|
const lkgIdentity = candidateIdentityOf(lkgR.effective);
|
|
@@ -562,7 +570,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
562
570
|
}
|
|
563
571
|
catch (applyErr) {
|
|
564
572
|
lkgBooted = false;
|
|
565
|
-
logger.warn("config_lkg_apply_failed", { err: String(applyErr), note: "persisted LKG failed to apply — env fallback serves; the cache rewrites on the next clean candidate" });
|
|
573
|
+
logger.warn("config_lkg_apply_failed", { err: seatText("operator-log-text", String(applyErr)), note: "persisted LKG failed to apply — env fallback serves; the cache rewrites on the next clean candidate" });
|
|
566
574
|
}
|
|
567
575
|
};
|
|
568
576
|
const warnLocalNoModels = (r, verdict) => {
|
|
@@ -613,7 +621,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
613
621
|
}
|
|
614
622
|
else {
|
|
615
623
|
warnReadNotices(r, "boot");
|
|
616
|
-
logEffectiveDiff(config, r.effective, logger);
|
|
624
|
+
logEffectiveDiff(config, r.effective, r.catalogSource, logger);
|
|
617
625
|
ccEtag = r.etag;
|
|
618
626
|
}
|
|
619
627
|
}
|
|
@@ -631,14 +639,16 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
631
639
|
warnReadNotices(r, "boot");
|
|
632
640
|
const bootGen = generationOf(r.effective.version);
|
|
633
641
|
applyLedger.seenTarget(bootGen, r.effective.version);
|
|
642
|
+
const bootArrival = admitArrival(bootGen, undefined);
|
|
634
643
|
let bootReport;
|
|
635
644
|
applyEffective(config, r.effective, logger, {
|
|
636
645
|
leg: "boot",
|
|
646
|
+
catalogSource: r.catalogSource,
|
|
637
647
|
sealedKeys,
|
|
638
648
|
generation: bootGen,
|
|
639
649
|
report: (rep) => {
|
|
640
650
|
bootReport = rep;
|
|
641
|
-
recordApply(rep);
|
|
651
|
+
recordApply(rep, bootArrival);
|
|
642
652
|
},
|
|
643
653
|
});
|
|
644
654
|
markApplied(bootGen, r.effective);
|
|
@@ -651,7 +661,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
651
661
|
const lkgPlane = await bootFromLkg("boot candidate's model plane was refused", "model-plane");
|
|
652
662
|
if (lkgPlane) {
|
|
653
663
|
let planeReport;
|
|
654
|
-
applyEffective(config, withModelPlaneOf(r.effective, lkgPlane.effective), logger, { leg: "boot", sealedKeys, generation: bootGen, report: (rep) => (planeReport = rep) });
|
|
664
|
+
applyEffective(config, withModelPlaneOf(r.effective, lkgPlane.effective), logger, { leg: "boot", catalogSource: lkgPlane.catalogSource, sealedKeys, generation: bootGen, report: (rep) => (planeReport = rep) });
|
|
655
665
|
if (modelPlaneCommitted(planeReport)) {
|
|
656
666
|
bootPlaneEff = lkgPlane.effective;
|
|
657
667
|
logger.warn("config_model_plane_from_lkg", { version: r.effective.version, lkgVersion: lkgPlane.effective.version, note: "the live candidate's model plane was refused at boot — serving the LKG's model plane (the catalog and what rides with it) with the live candidate's other groups; the refresh cadence re-judges the candidate" });
|
|
@@ -681,10 +691,10 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
681
691
|
if (err instanceof ConfigDirUntrustedError)
|
|
682
692
|
throw err;
|
|
683
693
|
if (bootApplyPhase)
|
|
684
|
-
logger.warn("config_apply_refused", { source: configProvider.kind, err: String(err), note: "the pulled candidate failed to apply at boot — falling back to the LKG / env; this is not a reachability failure" });
|
|
694
|
+
logger.warn("config_apply_refused", { source: configProvider.kind, err: seatText("operator-log-text", String(err)), note: "the pulled candidate failed to apply at boot — falling back to the LKG / env; this is not a reachability failure" });
|
|
685
695
|
else
|
|
686
|
-
logger.warn("config_source_unreachable_using_env", { source: configProvider.kind, err: String(err) });
|
|
687
|
-
await bootFallBackWhole(`${bootApplyPhase ? "boot apply refused" : "boot fetch failed"}: ${
|
|
696
|
+
logger.warn("config_source_unreachable_using_env", { source: configProvider.kind, err: seatText("operator-log-text", String(err)) });
|
|
697
|
+
await bootFallBackWhole(`${bootApplyPhase ? "boot apply refused" : "boot fetch failed"}: ${seatText("operator-log-text", String(err))}`);
|
|
688
698
|
}
|
|
689
699
|
if (!dryRun && cc !== undefined && currentIdentity() !== promptStateIdentity)
|
|
690
700
|
await rebasePromptState(currentIdentity(), "boot-end");
|
|
@@ -746,6 +756,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
746
756
|
restartState: () => buildRestartSignal(pendingRestart, planeDeferredNoHandoff),
|
|
747
757
|
configHandoffState: () => (configProvider === undefined || configProvider.kind === "local" || !lkgSurvivesRestart ? undefined : buildConfigHandoff(latchHandoff(), handoffMissingSince)),
|
|
748
758
|
modelRefusalsState: () => modelRefusals,
|
|
759
|
+
latestPlaneRefusalState: () => (modelRefusals?.plane !== undefined && modelRefusalsArrival !== undefined && modelRefusalsArrival === arrivalSeq ? modelRefusals.plane : undefined),
|
|
749
760
|
candidateRejectionState: () => (cc?.dryRun ? undefined : candidateRejection),
|
|
750
761
|
configApplyState: () => (configProvider ? applyLedger.view() : undefined),
|
|
751
762
|
centerPullState: () => {
|
|
@@ -770,7 +781,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
770
781
|
toolsShareThisFilesystem: DEPLOYMENT_SHAPE_PREDICATES.toolsOnThisHost.holds(config),
|
|
771
782
|
logger,
|
|
772
783
|
}).catch((err) => {
|
|
773
|
-
logger.warn("center_plugins_apply_failed", { error: err instanceof Error ? err.message : String(err) });
|
|
784
|
+
logger.warn("center_plugins_apply_failed", { error: seatText("operator-log-text", err instanceof Error ? err.message : String(err)) });
|
|
774
785
|
return undefined;
|
|
775
786
|
});
|
|
776
787
|
if (pluginOut) {
|
|
@@ -782,7 +793,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
782
793
|
}
|
|
783
794
|
if (bootLkgCandidate && lkgEnabled) {
|
|
784
795
|
const bootPublished = await persistLkgDurable(bootLkgCandidate.effective, bootLkgCandidate.etag).catch((err) => {
|
|
785
|
-
logger.warn("config_lkg_save_failed", { err: String(err), note: "boot LKG persist failed — retained for the per-tick retry" });
|
|
796
|
+
logger.warn("config_lkg_save_failed", { err: seatText("operator-log-text", String(err)), note: "boot LKG persist failed — retained for the per-tick retry" });
|
|
786
797
|
return false;
|
|
787
798
|
});
|
|
788
799
|
{
|
|
@@ -905,11 +916,12 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
905
916
|
const committed = applyEffective(config, eff, logger, {
|
|
906
917
|
leg: "hot",
|
|
907
918
|
checkpointStorePresent,
|
|
919
|
+
catalogSource: c.catalogSource,
|
|
908
920
|
sealedKeys,
|
|
909
921
|
generation: gen,
|
|
910
922
|
report: (rep) => {
|
|
911
923
|
report = rep;
|
|
912
|
-
recordApply(rep);
|
|
924
|
+
recordApply(rep, c.arrival);
|
|
913
925
|
},
|
|
914
926
|
...(planeChanged ? { swapPlane: swapRunnerDeps } : {}),
|
|
915
927
|
});
|
|
@@ -937,14 +949,14 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
937
949
|
const demoteToNoCenter = async (awaiting) => {
|
|
938
950
|
const gen = reserveArrivalGeneration();
|
|
939
951
|
applyLedger.seenTarget(gen, NO_CENTER_EFFECTIVE.version);
|
|
940
|
-
const
|
|
952
|
+
const arrival = admitArrival(gen, undefined);
|
|
953
|
+
const hot = await commitHot({ eff: NO_CENTER_EFFECTIVE, catalogSource: REMOTE_CATALOG_SOURCE, prompts: undefined, gen, arrival, phase: "no-center" });
|
|
941
954
|
if (!hot.committed) {
|
|
942
955
|
throw new Error("the no-center tier was refused (the Runners did not accept the env model table) — the previous account's center configuration is still in force; retried next tick");
|
|
943
956
|
}
|
|
944
957
|
if (hot.report !== undefined && !hot.report.fullyApplied) {
|
|
945
958
|
logger.warn("center_identity_demotion_partial", { groups: refusedGroups(hot.report).map((g) => g.group), note: "a group of the no-center tier was refused — that group keeps its previous values (loud; the env base for that group could not be applied)" });
|
|
946
959
|
}
|
|
947
|
-
noteCandidateVerdict(gen, undefined);
|
|
948
960
|
latestEffective = undefined;
|
|
949
961
|
ccEtag = undefined;
|
|
950
962
|
announceTier(tier.demote(awaiting, hot.report !== undefined ? refusedGroups(hot.report).map((g) => g.group) : []));
|
|
@@ -1013,14 +1025,14 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
1013
1025
|
announceCandidateRejected(r, verdict, arrival !== undefined ? "late-boot" : "refresh", tickGen);
|
|
1014
1026
|
return "ok";
|
|
1015
1027
|
}
|
|
1016
|
-
|
|
1028
|
+
const tickArrival = admitArrival(tickGen, undefined);
|
|
1017
1029
|
warnReadNotices(r, "refresh");
|
|
1018
1030
|
if (ccRef?.dryRun) {
|
|
1019
|
-
logEffectiveDiff(config, r.effective, logger);
|
|
1031
|
+
logEffectiveDiff(config, r.effective, r.catalogSource, logger);
|
|
1020
1032
|
ccEtag = r.etag;
|
|
1021
1033
|
}
|
|
1022
1034
|
else {
|
|
1023
|
-
const hot = await commitHot({ eff: r.effective, prompts: verdict.prompts, gen: tickGen, phase: "refresh" });
|
|
1035
|
+
const hot = await commitHot({ eff: r.effective, catalogSource: r.catalogSource, prompts: verdict.prompts, gen: tickGen, arrival: tickArrival, phase: "refresh" });
|
|
1024
1036
|
if (!hot.committed)
|
|
1025
1037
|
return "ok";
|
|
1026
1038
|
const applyReport = hot.report;
|
|
@@ -1054,7 +1066,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
1054
1066
|
}
|
|
1055
1067
|
}
|
|
1056
1068
|
catch (err) {
|
|
1057
|
-
logger.warn("web_admin_refresh_failed", { err: String(err), note: "etag NOT advanced — the same candidate is re-fetched and re-applied next poll" });
|
|
1069
|
+
logger.warn("web_admin_refresh_failed", { err: seatText("operator-log-text", String(err)), note: "etag NOT advanced — the same candidate is re-fetched and re-applied next poll" });
|
|
1058
1070
|
return "failed";
|
|
1059
1071
|
}
|
|
1060
1072
|
finally {
|
|
@@ -1113,7 +1125,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
1113
1125
|
lastPull = "ok";
|
|
1114
1126
|
}
|
|
1115
1127
|
catch (err) {
|
|
1116
|
-
logger.warn("web_admin_refresh_failed", { err: String(err), leg: "boot-deferred", note: "etag NOT advanced — the refresh cadence re-fetches and re-applies the same candidate" });
|
|
1128
|
+
logger.warn("web_admin_refresh_failed", { err: seatText("operator-log-text", String(err)), leg: "boot-deferred", note: "etag NOT advanced — the refresh cadence re-fetches and re-applies the same candidate" });
|
|
1117
1129
|
}
|
|
1118
1130
|
finally {
|
|
1119
1131
|
refreshInFlight = false;
|
|
@@ -1127,14 +1139,14 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
1127
1139
|
announceCandidateRejected(r, lateVerdict, "late-boot", lateGen);
|
|
1128
1140
|
return;
|
|
1129
1141
|
}
|
|
1130
|
-
|
|
1142
|
+
const lateArrival = admitArrival(lateGen, undefined);
|
|
1131
1143
|
warnReadNotices(r, "boot-deferred");
|
|
1132
1144
|
if (ccRef?.dryRun) {
|
|
1133
|
-
logEffectiveDiff(config, r.effective, logger);
|
|
1145
|
+
logEffectiveDiff(config, r.effective, r.catalogSource, logger);
|
|
1134
1146
|
ccEtag = r.etag;
|
|
1135
1147
|
return;
|
|
1136
1148
|
}
|
|
1137
|
-
const hotLate = await commitHot({ eff: r.effective, prompts: lateVerdict.prompts, gen: lateGen, phase: "boot-deferred" });
|
|
1149
|
+
const hotLate = await commitHot({ eff: r.effective, catalogSource: r.catalogSource, prompts: lateVerdict.prompts, gen: lateGen, arrival: lateArrival, phase: "boot-deferred" });
|
|
1138
1150
|
if (!hotLate.committed)
|
|
1139
1151
|
return;
|
|
1140
1152
|
const applyReportLate = hotLate.report;
|
|
@@ -1164,7 +1176,7 @@ export async function createWebAdminRuntime(ctx) {
|
|
|
1164
1176
|
void bootConfigPending.then((r) => {
|
|
1165
1177
|
if (r !== null && configProvider.kind === "remote" && candidateIdentityOf(r.effective) !== currentIdentity()) {
|
|
1166
1178
|
logger.warn("config_boot_arrival_identity_changed", { note: "the late boot pull landed under a center credential that is no longer current — not adopted; re-pulling once under the current credential" });
|
|
1167
|
-
void pullEffective(configProvider, undefined).then(continueArrival, (err) => logger.warn("config_boot_arrival_repull_failed", { err: String(err), note: "the refresh cadence retries under the current credential" }));
|
|
1179
|
+
void pullEffective(configProvider, undefined).then(continueArrival, (err) => logger.warn("config_boot_arrival_repull_failed", { err: seatText("operator-log-text", String(err)), note: "the refresh cadence retries under the current credential" }));
|
|
1168
1180
|
return;
|
|
1169
1181
|
}
|
|
1170
1182
|
continueArrival(r);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createWebFetchSummarizer, resolveTaskModel as coreResolveTaskModel } from "@sema-agent/core";
|
|
2
2
|
import { createPerModelAuthSeat } from "./side-query-lane.js";
|
|
3
|
+
import { seatText } from "../trace/exit-seat.js";
|
|
3
4
|
export function createWebFetchSummarizeLane(ctx) {
|
|
4
5
|
return async (content, prompt, signal) => {
|
|
5
6
|
const model = (() => {
|
|
@@ -7,7 +8,7 @@ export function createWebFetchSummarizeLane(ctx) {
|
|
|
7
8
|
return coreResolveTaskModel({ modelRole: "summarize" }, { models: ctx.config.models, roles: ctx.config.roles }).model;
|
|
8
9
|
}
|
|
9
10
|
catch (err) {
|
|
10
|
-
ctx.logger.warn("webfetch_summarizer_model_unresolved", { err: String(err), note: "this fetch falls back to raw page content" });
|
|
11
|
+
ctx.logger.warn("webfetch_summarizer_model_unresolved", { err: seatText("operator-log-text", String(err)), note: "this fetch falls back to raw page content" });
|
|
11
12
|
return undefined;
|
|
12
13
|
}
|
|
13
14
|
})();
|
|
@@ -7,6 +7,7 @@ import { FileWorkflowCompletionInbox, InMemoryWorkflowCompletionInbox, buildWork
|
|
|
7
7
|
import { FileWorkflowNotifyJournalStore, JournalingWorkflowRunStore, WorkflowNotifyGate } from "../orchestration/workflow-notify-journal.js";
|
|
8
8
|
import { SubagentSteerRegistry } from "../orchestration/subagent-steer.js";
|
|
9
9
|
import { WorkflowAgentRegistry } from "../orchestration/workflow-agent-steer.js";
|
|
10
|
+
import { seatText } from "../trace/exit-seat.js";
|
|
10
11
|
export function createWorkflowOrchestration(ctx) {
|
|
11
12
|
const { config, logger, metrics, localRoot, backend, getRunStore } = ctx;
|
|
12
13
|
const workflowBootAtMs = Date.now();
|
|
@@ -43,12 +44,12 @@ export function createWorkflowOrchestration(ctx) {
|
|
|
43
44
|
await workflowCompletionInbox.enqueue(buildWorkflowCompleteInboxEntry(route, p, Date.now()));
|
|
44
45
|
}
|
|
45
46
|
catch (err) {
|
|
46
|
-
logger.warn("workflow_completion_enqueue_failed", { runId: p.runId, err: String(err) });
|
|
47
|
+
logger.warn("workflow_completion_enqueue_failed", { runId: p.runId, err: seatText("operator-log-text", String(err)) });
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
const workflowNotifyGate = baseWorkflowRunStore && workflowNotifyJournal
|
|
50
51
|
? new WorkflowNotifyGate(workflowNotifyJournal, baseWorkflowRunStore, deliverWorkflowCompletion, {
|
|
51
|
-
onError: (stage, runId, err) => logger.warn("workflow_notify_failed", { stage, runId, err: String(err) }),
|
|
52
|
+
onError: (stage, runId, err) => logger.warn("workflow_notify_failed", { stage, runId, err: seatText("operator-log-text", String(err)) }),
|
|
52
53
|
})
|
|
53
54
|
: undefined;
|
|
54
55
|
const fleetBus = new FleetEventBus();
|
|
@@ -37,7 +37,8 @@ export declare function createSubagentExtraTools(deployment?: SubagentExtraToolS
|
|
|
37
37
|
/**
|
|
38
38
|
* `onExtraToolsError` 收到的错误 → 运维行 `subagent_extra_tools_error` 的字段:句子,加上错误**自带**的码与 `detail.reason`(在场才铸)。
|
|
39
39
|
* core 7.46.0 [ref] 被拒的 spawn(产物不在名册里)带 `config.extra_tool_names` + `undeclared_name` / `undeclared_origin`;部署工厂自己抛的错多半两位都不带。
|
|
40
|
-
* 本仓不按码分支、不重铸 ——
|
|
40
|
+
* 本仓不按码分支、不重铸 —— 只把错误说的话过境到运维面(修前只记句子,码与原因词丢在这一跳)。码是别人写的串(引擎的 `config.extra_tool_names`,或部署工厂自己抛的错):
|
|
41
|
+
* 与运维日志里其余各处同一只判官 —— 是码才带 `code`,其余键缺席({@link codeFieldOf})。
|
|
41
42
|
*/
|
|
42
43
|
export declare function extraToolsErrorFields(err: unknown): Record<string, unknown>;
|
|
43
44
|
//# sourceMappingURL=builtin-tools.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
import { NOW_TOOL_NAME } from "./host-tool-names.js";
|
|
3
|
+
import { codeFieldOf } from "../terminal.js";
|
|
3
4
|
export function nowTool() {
|
|
4
5
|
return {
|
|
5
6
|
name: NOW_TOOL_NAME,
|
|
@@ -21,12 +22,9 @@ export function createSubagentExtraTools(deployment) {
|
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
export function extraToolsErrorFields(err) {
|
|
24
|
-
const fields = { err: err instanceof Error ? err.message : String(err) };
|
|
25
|
+
const fields = { err: err instanceof Error ? err.message : String(err), ...codeFieldOf(err) };
|
|
25
26
|
if (err === null || typeof err !== "object")
|
|
26
27
|
return fields;
|
|
27
|
-
const code = Reflect.get(err, "code");
|
|
28
|
-
if (typeof code === "string")
|
|
29
|
-
fields.code = code;
|
|
30
28
|
const detail = Reflect.get(err, "detail");
|
|
31
29
|
const reason = detail !== null && typeof detail === "object" ? Reflect.get(detail, "reason") : undefined;
|
|
32
30
|
if (typeof reason === "string")
|
|
@@ -45,7 +45,7 @@ export declare const COMPOSITE_CAPABILITY_MEMBERS: {
|
|
|
45
45
|
readonly centerWiring: readonly ["effectivePull", "effectiveRevision", "lease", "leaseHealth", "failMode", "usageReport", "issuer", "worker", "caller"];
|
|
46
46
|
readonly webSearch: readonly ["backend"];
|
|
47
47
|
readonly background: readonly ["listFace", "exitFaces"];
|
|
48
|
-
readonly taskSettings: readonly ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "tightenOnlySeats", "approvalFrameFamilies"];
|
|
48
|
+
readonly taskSettings: readonly ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "httpHookAllowlists", "tightenOnlySeats", "approvalFrameFamilies"];
|
|
49
49
|
readonly settings: readonly ["permissions"];
|
|
50
50
|
readonly permissionModeAuto: readonly ["accepted", "classifierSeat", "entitlementSource", "armed", "reason", "model"];
|
|
51
51
|
readonly writeProtection: readonly ["armed", "rows", "replaced"];
|
|
@@ -56,6 +56,7 @@ export declare const COMPOSITE_CAPABILITY_MEMBERS: {
|
|
|
56
56
|
readonly workspaceSync: readonly ["persist", "keep", "timeoutMs", "cache"];
|
|
57
57
|
readonly userAttachments: readonly ["entries", "kinds", "supplies", "limits"];
|
|
58
58
|
readonly credentialPlane: readonly ["sandboxGit"];
|
|
59
|
+
readonly memorySyncServe: readonly ["identity"];
|
|
59
60
|
};
|
|
60
61
|
type CompositeTable = typeof COMPOSITE_CAPABILITY_MEMBERS;
|
|
61
62
|
/** 值的**具名成员对象臂**(标量 / 字面词 / `false` / `null` / `undefined` / 数组 / 函数臂剥掉)。 */
|
|
@@ -6,7 +6,7 @@ export const COMPOSITE_CAPABILITY_MEMBERS = {
|
|
|
6
6
|
centerWiring: ["effectivePull", "effectiveRevision", "lease", "leaseHealth", "failMode", "usageReport", "issuer", "worker", "caller"],
|
|
7
7
|
webSearch: ["backend"],
|
|
8
8
|
background: ["listFace", "exitFaces"],
|
|
9
|
-
taskSettings: ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "tightenOnlySeats", "approvalFrameFamilies"],
|
|
9
|
+
taskSettings: ["permissions", "permissionMode", "model", "outputStyle", "env", "hooks", "pluginHooks", "managedHookGroups", "httpHookAllowlists", "tightenOnlySeats", "approvalFrameFamilies"],
|
|
10
10
|
settings: ["permissions"],
|
|
11
11
|
permissionModeAuto: ["accepted", "classifierSeat", "entitlementSource", "armed", "reason", "model"],
|
|
12
12
|
writeProtection: ["armed", "rows", "replaced"],
|
|
@@ -17,6 +17,7 @@ export const COMPOSITE_CAPABILITY_MEMBERS = {
|
|
|
17
17
|
workspaceSync: ["persist", "keep", "timeoutMs", "cache"],
|
|
18
18
|
userAttachments: ["entries", "kinds", "supplies", "limits"],
|
|
19
19
|
credentialPlane: ["sandboxGit"],
|
|
20
|
+
memorySyncServe: ["identity"],
|
|
20
21
|
};
|
|
21
22
|
export function gateCompositeMembers(body) {
|
|
22
23
|
return body;
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* 不是静默继承 full(词表闭集纪律)。
|
|
13
13
|
* ② {@link HANDS_EXCLUSIVE_TOOL_NAMES} + {@link handsDenyPolicy} —— 纵深:hands=none 的任务即便被误接到
|
|
14
14
|
* 有手 Runner 上,手独占名单逐一 deny。**不是**主保证(主保证是根本不挂 factory ⇒ 工具面不可见)。
|
|
15
|
-
* ③ {@link
|
|
16
|
-
*
|
|
15
|
+
* ③ {@link createHandsRunnerSelector} —— 车道是这条腿的部署事实(`leg-facts.ts`:装配器出口铸一次,两只漏斗以装配输出调选路器时读一次),
|
|
16
|
+
* **缺席即拒**(不是回落最宽车道)。
|
|
17
17
|
*/
|
|
18
18
|
import { type Runner, type TaskSpec, type ToolPolicy } from "@sema-agent/core";
|
|
19
19
|
/** 场景对手带工具面的表态(闭集)。`full` = core 手带 band 照常 mount;`none` = 不挂 executionEnvFactory 的 Runner。 */
|
|
@@ -114,32 +114,7 @@ export declare function tightenWithHandsDeny(base: ToolPolicy | undefined): Tool
|
|
|
114
114
|
/** 装配点的取用形:`full` 原样放行基线,`none` 叠 deny。**穷举 switch**,无缺省臂。 */
|
|
115
115
|
export declare function toolPolicyForHands(hands: ScenarioHands, base: ToolPolicy | undefined): ToolPolicy | undefined;
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* 为什么是 symbol 而不是字符串键:`TaskSpec` 是**上游 core 的类型面**,一个字符串键会进
|
|
120
|
-
* `Object.keys` / `JSON.stringify` / core 自己的键审计,等于 server 在别人的契约上私自加一个键;
|
|
121
|
-
* symbol 键随 spread(`{...spec}`)与 rest 解构(`const {objective, ...taskConfig} = spec`)结构性
|
|
122
|
-
* 地跟着走,却对上游的键面**不可见**(结构化克隆与 JSON 同样跳过 symbol 键)。于是「车道是 spec 上
|
|
123
|
-
* 的一个字段、复制 spec 不丢车道」与「不污染上游契约」两件事同时成立。
|
|
124
|
-
*
|
|
125
|
-
* 修前的旁表要求「从 resolveSpec 出来的那一只对象必须一路原样活到执行点」——一条**隐形**的对象身份
|
|
126
|
-
* 契约:任何一次 `{...spec}` 都会静默把车道降级成最宽的 `full`(实测:登记 `none` 的 spec 复制后
|
|
127
|
-
* `laneOf` 答 `full`)。字段化把那条隐形要求整条删掉。
|
|
128
|
-
*/
|
|
129
|
-
export declare const HANDS_LANE_FIELD: unique symbol;
|
|
130
|
-
/** 已铸车道的 TaskSpec。铸点唯一(`boot/resolve-spec.ts` 的 resolveSpec 出口),读点唯一({@link handsLaneOf})。 */
|
|
131
|
-
export type LanedTaskSpec = TaskSpec & {
|
|
132
|
-
readonly [HANDS_LANE_FIELD]: ScenarioHands;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* 铸车道(**单一属主**:只允许 resolveSpec 的出口调用)。
|
|
136
|
-
*
|
|
137
|
-
* 字段是 `enumerable`(所以复制得走)、`writable:false` + `configurable:false`(所以同一只 spec 被
|
|
138
|
-
* 第二次铸车道会当场 TypeError —— 两个写者是漂移的成因,响亮好过后到者悄悄赢)。
|
|
139
|
-
*/
|
|
140
|
-
export declare function stampHandsLane<T extends TaskSpec>(spec: T, hands: ScenarioHands): T & LanedTaskSpec;
|
|
141
|
-
/**
|
|
142
|
-
* 车道字段缺席的拒因 —— 具名类,便于调用点/测试按类型判,而不是嗅文案。
|
|
117
|
+
* 车道读不到的拒因 —— 具名类,便于调用点/测试按类型判,而不是嗅文案。
|
|
143
118
|
*
|
|
144
119
|
* 🔴 **刻意不是 `HttpError`、刻意不铸新的 wire 错误码**:它落到 `http/server.ts` 的兜底 catch,
|
|
145
120
|
* wire 上是 500 `internal.error`(内部文本不回显,只进 `request_error` 日志行)。理由两条:
|
|
@@ -153,19 +128,14 @@ export declare class HandsLaneUnstampedError extends Error {
|
|
|
153
128
|
constructor();
|
|
154
129
|
}
|
|
155
130
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
131
|
+
* 装配点的选路席:`{full, handsless}` 两只 Runner + 这条腿的车道 ⇒ 本任务跑哪一只。公共缝 `runnerFor(spec)` 的生产实现;
|
|
132
|
+
* 两只漏斗(受理 / 续跑)以**装配器输出的那一只对象**调它(`leg-facts.ts`:读在 `stampSpecRoot` 复制之前)。
|
|
158
133
|
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*/
|
|
163
|
-
export declare function handsLaneOf(spec: TaskSpec): ScenarioHands;
|
|
164
|
-
/**
|
|
165
|
-
* 装配点的选路席:`{full, handsless}` 两只 Runner + 车道字段 ⇒ 本任务跑哪一只。
|
|
134
|
+
* 车道读不到 ⇒ **缺席即拒**([ref] P 类:车道选择是保护型量,fail-closed;`observability/fail-open.ts` 头注把「车道选择」逐字列在
|
|
135
|
+
* 「正解是 fail-closed,不是留痕后继续放行」那一族里)。读不到的两种来路:嵌入方自带的 `resolveSpec`(不铸本仓的腿事实),
|
|
136
|
+
* 或有人把复制品交了进来(读晚了)—— 都整只拒(500 + 日志留原句),绝不把一个未经裁定的任务放进最宽的有手车道。
|
|
166
137
|
*
|
|
167
|
-
* 具名工厂而不是在 main.ts 手搓闭包:选路规则(
|
|
168
|
-
* 测试与生产装配拿的是同一只(手搓等价闭包 = 第二真源,正是本件要删的那一类)。
|
|
138
|
+
* 具名工厂而不是在 main.ts 手搓闭包:选路规则(读车道 → 穷举 switch)于是只有**一份实现**,测试与生产装配拿的是同一只。
|
|
169
139
|
*/
|
|
170
140
|
export declare function createHandsRunnerSelector(pair: HandsRunnerPair): (spec: TaskSpec) => Runner;
|
|
171
141
|
//# sourceMappingURL=hands-lane.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { handBandEffects, judgeRuleToolName, combinePolicies, createAllowDenyPolicy } from "@sema-agent/core";
|
|
2
|
+
import { legFactsOf } from "../leg-facts.js";
|
|
2
3
|
import { TOOL_NAME_ROSTER } from "../namespaced-rule-name.js";
|
|
3
4
|
export function withoutHands(deps) {
|
|
4
5
|
const { executionEnvFactory: _handsDropped, ...rest } = deps;
|
|
@@ -29,7 +30,7 @@ export const HANDS_BAND_TOOL_NAMES = Object.freeze([
|
|
|
29
30
|
"ExitWorktree",
|
|
30
31
|
"ListAgents",
|
|
31
32
|
].filter((n, i, all) => judgeRuleToolName(n, TOOL_NAME_ROSTER).kind === "current" && all.indexOf(n) === i));
|
|
32
|
-
export const HANDS_DUAL_USE_TOOL_NAMES = Object.freeze(["
|
|
33
|
+
export const HANDS_DUAL_USE_TOOL_NAMES = Object.freeze(["TaskStop", "SendMessage", "AgentTranscript", "ListAgents"]);
|
|
33
34
|
export const HANDS_EXCLUSIVE_TOOL_NAMES = Object.freeze(HANDS_BAND_TOOL_NAMES.filter((n) => !HANDS_DUAL_USE_TOOL_NAMES.includes(n)));
|
|
34
35
|
export const OFFICE_KEPT_HAND_TOOL_NAMES = Object.freeze(["Read", "Glob", "Grep"]);
|
|
35
36
|
export const OFFICE_EXCLUDED_TOOL_NAMES = Object.freeze(HANDS_EXCLUSIVE_TOOL_NAMES.filter((n) => !OFFICE_KEPT_HAND_TOOL_NAMES.includes(n)));
|
|
@@ -48,24 +49,18 @@ export function toolPolicyForHands(hands, base) {
|
|
|
48
49
|
return tightenWithHandsDeny(base);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
export const HANDS_LANE_FIELD = Symbol("sema-server.handsLane");
|
|
52
|
-
export function stampHandsLane(spec, hands) {
|
|
53
|
-
Object.defineProperty(spec, HANDS_LANE_FIELD, { value: hands, enumerable: true, writable: false, configurable: false });
|
|
54
|
-
return spec;
|
|
55
|
-
}
|
|
56
52
|
export class HandsLaneUnstampedError extends Error {
|
|
57
53
|
constructor() {
|
|
58
54
|
super("execution lane is not stamped on this task spec — refusing to run it rather than falling back to the widest (full-hands) lane");
|
|
59
55
|
this.name = "HandsLaneUnstampedError";
|
|
60
56
|
}
|
|
61
57
|
}
|
|
62
|
-
export function handsLaneOf(spec) {
|
|
63
|
-
const lane = spec[HANDS_LANE_FIELD];
|
|
64
|
-
if (lane === undefined)
|
|
65
|
-
throw new HandsLaneUnstampedError();
|
|
66
|
-
return lane;
|
|
67
|
-
}
|
|
68
58
|
export function createHandsRunnerSelector(pair) {
|
|
69
|
-
return (spec) =>
|
|
59
|
+
return (spec) => {
|
|
60
|
+
const hands = legFactsOf(spec)?.hands;
|
|
61
|
+
if (hands === undefined)
|
|
62
|
+
throw new HandsLaneUnstampedError();
|
|
63
|
+
return pickHandsRunner(hands, pair);
|
|
64
|
+
};
|
|
70
65
|
}
|
|
71
66
|
//# sourceMappingURL=hands-lane.js.map
|
|
@@ -354,8 +354,9 @@ export declare function buildMcpProbeInflightRefusal(): McpProbeRefusal;
|
|
|
354
354
|
* 在任何传输被触碰**之前**就被拒)。
|
|
355
355
|
*
|
|
356
356
|
* 异源复核 [medium]:修前这一形在两条口上都被抛给分派器尾 ⇒ `500 internal.error`。可自带申报那一口的申报
|
|
357
|
-
* 是**调用方**写的,把它答成 500
|
|
358
|
-
*
|
|
357
|
+
* 是**调用方**写的,把它答成 500 是把调用方的错说成这台机器故障 ⇒ 自带申报那一口答 400 `request.field_invalid`(本句)。
|
|
358
|
+
* 中心申报那一口**不走本句**:那是部署方写的、部署上挂不起来,引擎的拒按同步提交腿读的同一张「码 → 状态」表读成应答
|
|
359
|
+
* (409 `config.mcp_server_name_collision` + 引擎原句,`http/engine-refusal.ts`),与同一份声明集在提交腿上的答复同码同状态同句。
|
|
359
360
|
*
|
|
360
361
|
* 🔴 **不回显因由**:那句话来自申报集本身,可能带调用方的内情(名字、地址形)。调用方手里有自己的体,
|
|
361
362
|
* 点名「两台撞了命名空间」就够他自己找;原文留在那一层的日志里。
|
|
@@ -5,6 +5,7 @@ import { type RepoReadClient } from "./repo-tools.js";
|
|
|
5
5
|
import { type LoadedSkill, type RunSkillEntry, type ScenarioSkillEntry, type SkillSource } from "./skills.js";
|
|
6
6
|
import { type ScenarioHands } from "./hands-lane.js";
|
|
7
7
|
import type { DelegationRootWitness } from "../delegated-session-owner.js";
|
|
8
|
+
import type { BackgroundCompletionSinkFor } from "../session-notify-door.js";
|
|
8
9
|
/**
|
|
9
10
|
* Scenario routing — a deployment serves many scenarios from one image. Each request's `scenario`
|
|
10
11
|
* selects a pre-wired capability bundle: tools (incl. subagent roster) + its prompt seats + skills.
|
|
@@ -85,7 +86,8 @@ export interface ScenarioContext {
|
|
|
85
86
|
/**
|
|
86
87
|
* [ref] / [ref]:**委派树根的见证**(停驻挂点的属主来源)—— 根会话 id + 调用方判断那一刻读到的根行住客(`delegated-session-owner.ts` 的 `DelegationRootWitness`)。
|
|
87
88
|
* 由**每一个**接了停驻挂点的取用方显式交出(一条读法,没有回落):请求腿 = 本请求经鉴权解析的会话与受理时那一读(`boot/resolve-spec.ts`);`/decide` 赎回面 = 行上的
|
|
88
|
-
* `rootSessionId` 与赎回腿写口放行的那一位住客(`parked-revive-surface.ts`,交不交座都交)
|
|
89
|
+
* `rootSessionId` 与赎回腿写口放行的那一位住客(`parked-revive-surface.ts`,交不交座都交)。它喂停驻挂点与 Runner 之外的后台子代完成 relay(会话通知门的目标住客:属主与化身),
|
|
90
|
+
* 不挂任何会话级设施(那是 {@link sessionId} 的事,
|
|
89
91
|
* 判据是「这只 bundle 是不是在那只会话上取用的」,与属主来源是两个独立判据)。缺席 = 没有根可交(boot 期探针、run-local、行上没有根)⇒ 律给哨兵。
|
|
90
92
|
* 挂点在停驻那一刻再读一次根行:住客不是见证的那一位(删了、同 id 被重新登记)⇒ 停驻否决 —— 不按新住客认领。
|
|
91
93
|
*/
|
|
@@ -157,6 +159,14 @@ export interface ScenarioDeps {
|
|
|
157
159
|
* 停驻都经它(子代沿用父的委派工具实例)。
|
|
158
160
|
*/
|
|
159
161
|
ensureChildSessionDurable?: (sessionId: string, root: DelegationRootWitness | undefined) => Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* **Runner 之外的后台子代完成**交给哪里 —— 按委派树根见证({@link ScenarioContext.delegationRoot})造委派工具挂载期的 `background.notify`。
|
|
164
|
+
* 停驻赎回腿的复活、操作员 `handle.resume` 都不是哪一次 run 内的调用,没有调用车道;引擎只在能解出一只完成 sink(调用 ?? 挂载)时才起后台续跑,
|
|
165
|
+
* 解不出 ⇒ 拒(`revive.no_background`)。sink = 委派树根会话的会话通知门(`session-notify-door.ts` 的 `createBackgroundCompletionRelay`;律与地址、
|
|
166
|
+
* 竞态、条目形都写在那里)。Runner 之内的调用照旧走调用车道,这只 sink 不被调。缺席(没有门的装配:run-local)⇒ 不接 ——
|
|
167
|
+
* 不接一只空 sink(接了 = 引擎起续跑、完成没人收)。
|
|
168
|
+
*/
|
|
169
|
+
backgroundCompletionSinkFor?: BackgroundCompletionSinkFor;
|
|
160
170
|
/**
|
|
161
171
|
* [ref]([ref] F2 症状 → [ref] 定谳):**会话级**任务清单店解析器,属主 =
|
|
162
172
|
* `boot/task-list-lane.ts` 的 {@link import("../boot/task-list-lane.js").createTaskListLane}
|
|
@@ -59,6 +59,7 @@ export function buildScenarios(deps) {
|
|
|
59
59
|
...(deps.backgroundAgentStore ? { agentStore: deps.backgroundAgentStore } : {}),
|
|
60
60
|
...(deps.checkpointStore ? { checkpointStore: deps.checkpointStore } : {}),
|
|
61
61
|
...(ensureChildSessionDurable !== undefined ? { ensureChildSessionDurable: (childSessionId) => ensureChildSessionDurable(childSessionId, delegationRoot) } : {}),
|
|
62
|
+
...(deps.backgroundCompletionSinkFor !== undefined && delegationRoot !== undefined ? { notify: deps.backgroundCompletionSinkFor(delegationRoot) } : {}),
|
|
62
63
|
},
|
|
63
64
|
...createSubagentExtraTools(deps.subagentExtraTools),
|
|
64
65
|
...(deps.logger
|