@sema-agent/core 7.71.1 → 7.73.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/CHANGELOG.md +500 -0
- package/dist/agents/cross-session-ref.d.ts +2 -2
- package/dist/agents/cross-session-ref.js +7 -2
- package/dist/agents/inherited-tool-pool.d.ts +30 -2
- package/dist/agents/inherited-tool-pool.js +53 -7
- package/dist/agents/parked-resume-drive.d.ts +10 -0
- package/dist/agents/parked-resume-drive.js +9 -0
- package/dist/agents/retain-ledger.d.ts +3 -0
- package/dist/agents/send-message-tool.js +7 -2
- package/dist/agents/send-user-message-tool.d.ts +12 -0
- package/dist/agents/send-user-message-tool.js +67 -0
- package/dist/agents/subagent-steps.d.ts +9 -0
- package/dist/agents/subagent-steps.js +38 -0
- package/dist/agents/subagent.d.ts +2 -0
- package/dist/agents/subagent.js +47 -12
- package/dist/agents/verify.js +23 -7
- package/dist/agents/yield-adoption.js +3 -1
- package/dist/brain/anthropic.js +14 -9
- package/dist/brain/open-responses.js +4 -5
- package/dist/brain/openai.js +30 -23
- package/dist/brain/stream-engine.js +159 -151
- package/dist/core/a2a.d.ts +24 -3
- package/dist/core/a2a.js +27 -8
- package/dist/core/actions-digest.d.ts +43 -0
- package/dist/core/actions-digest.js +22 -0
- package/dist/core/agent-state.d.ts +28 -7
- package/dist/core/agent-state.js +19 -6
- package/dist/core/allow-entry.js +3 -3
- package/dist/core/approval-object.d.ts +7 -3
- package/dist/core/approval-object.js +30 -9
- package/dist/core/auto-mode.d.ts +7 -9
- package/dist/core/auto-mode.js +114 -8
- package/dist/core/checkpoint-features.d.ts +16 -5
- package/dist/core/checkpoint-features.js +35 -6
- package/dist/core/checkpoint-rekey.d.ts +1 -1
- package/dist/core/checkpoint-rekey.js +6 -1
- package/dist/core/checkpoint-requirements.d.ts +23 -3
- package/dist/core/checkpoint-requirements.js +5 -1
- package/dist/core/checkpoint-row-verdict.d.ts +1 -1
- package/dist/core/checkpoint-row-verdict.js +10 -4
- package/dist/core/checkpoint-store.d.ts +24 -2
- package/dist/core/checkpoint-store.js +1 -0
- package/dist/core/child-clamp-seats.d.ts +15 -0
- package/dist/core/child-clamp-seats.js +15 -0
- package/dist/core/delegation-frames.d.ts +1 -0
- package/dist/core/delegation-frames.js +1 -1
- package/dist/core/effective-path-target.d.ts +19 -0
- package/dist/core/effective-path-target.js +95 -38
- package/dist/core/engine-capabilities.d.ts +5 -1
- package/dist/core/engine-capabilities.js +1 -1
- package/dist/core/engine-notice.d.ts +34 -23
- package/dist/core/engine-version.js +1 -1
- package/dist/core/entries-not-applied.d.ts +19 -7
- package/dist/core/entries-not-applied.js +33 -1
- package/dist/core/file-history-store.d.ts +15 -4
- package/dist/core/file-history-store.js +53 -23
- package/dist/core/gate-fold.js +3 -1
- package/dist/core/governance-codes.d.ts +10 -1
- package/dist/core/governance-codes.js +17 -5
- package/dist/core/hooks.d.ts +3 -0
- package/dist/core/hooks.js +1 -0
- package/dist/core/host-instance.d.ts +23 -0
- package/dist/core/host-instance.js +69 -0
- package/dist/core/instruction-preview.d.ts +63 -0
- package/dist/core/instruction-preview.js +406 -0
- package/dist/core/judged-read.d.ts +57 -0
- package/dist/core/judged-read.js +1 -0
- package/dist/core/leg-budget.d.ts +26 -0
- package/dist/core/leg-budget.js +9 -0
- package/dist/core/leg-identity.d.ts +51 -1
- package/dist/core/leg-identity.js +45 -2
- package/dist/core/manager-launch-check.d.ts +48 -0
- package/dist/core/manager-launch-check.js +64 -0
- package/dist/core/mcp-call-meta.d.ts +2 -2
- package/dist/core/mcp-host-seat.d.ts +5 -0
- package/dist/core/mcp-host-seat.js +7 -1
- package/dist/core/mcp-injection-drop.d.ts +20 -10
- package/dist/core/mcp-injection-drop.js +9 -3
- package/dist/core/mcp-server-spec.d.ts +2 -1
- package/dist/core/mcp.js +3 -1
- package/dist/core/member-outcome.d.ts +3 -2
- package/dist/core/member-outcome.js +1 -1
- package/dist/core/memory-engine/deletion-record.d.ts +46 -0
- package/dist/core/memory-engine/deletion-record.js +96 -0
- package/dist/core/memory-engine/engine.js +24 -16
- package/dist/core/memory-engine/file-backend.js +7 -5
- package/dist/core/memory-engine/index.d.ts +1 -1
- package/dist/core/memory-engine/index.js +1 -1
- package/dist/core/memory-engine/layout.js +6 -4
- package/dist/core/memory-engine/projection-ledger.d.ts +1 -1
- package/dist/core/memory-engine/projection-ledger.js +1 -1
- package/dist/core/memory-engine/scope-contract.d.ts +69 -11
- package/dist/core/memory-engine/scope-contract.js +99 -34
- package/dist/core/memory-engine/sync-client.js +26 -6
- package/dist/core/memory-engine/sync.d.ts +20 -2
- package/dist/core/memory-engine/sync.js +18 -17
- package/dist/core/mode-policy.d.ts +21 -6
- package/dist/core/mode-policy.js +15 -6
- package/dist/core/mounted-mcp.d.ts +7 -2
- package/dist/core/mounted-mcp.js +10 -1
- package/dist/core/own-property-receipt.js +11 -4
- package/dist/core/param-rule-reach.d.ts +8 -3
- package/dist/core/param-rule-reach.js +9 -1
- package/dist/core/parent-spec-seat.d.ts +13 -1
- package/dist/core/parent-spec-seat.js +18 -0
- package/dist/core/peer-registration.d.ts +52 -0
- package/dist/core/peer-registration.js +37 -0
- package/dist/core/peer-seat.d.ts +3 -1
- package/dist/core/peer-seat.js +3 -3
- package/dist/core/peer-task-store.d.ts +365 -0
- package/dist/core/peer-task-store.js +682 -0
- package/dist/core/permission-rule-consent.js +6 -11
- package/dist/core/permission-rule-model.d.ts +27 -0
- package/dist/core/permission-rule-model.js +34 -6
- package/dist/core/permission-rule-provider.d.ts +35 -33
- package/dist/core/permission-rule-provider.js +38 -295
- package/dist/core/permission-rule-store.d.ts +181 -8
- package/dist/core/permission-rule-store.js +420 -17
- package/dist/core/permission-rule-sync.js +15 -1
- package/dist/core/project-seat.d.ts +55 -0
- package/dist/core/project-seat.js +96 -0
- package/dist/core/protocol-http-auth.d.ts +3 -2
- package/dist/core/protocol-http-auth.js +26 -18
- package/dist/core/remote-env.d.ts +4 -4
- package/dist/core/retired-keys.js +1 -0
- package/dist/core/rule-offer-read.d.ts +1 -1
- package/dist/core/rule-offer-read.js +32 -4
- package/dist/core/run-ledger-seat.d.ts +66 -0
- package/dist/core/run-ledger-seat.js +70 -0
- package/dist/core/run-ledger.d.ts +332 -0
- package/dist/core/run-ledger.js +550 -0
- package/dist/core/runner/chain-mismatch.d.ts +32 -0
- package/dist/core/runner/chain-mismatch.js +29 -0
- package/dist/core/runner/changes-history.d.ts +1 -0
- package/dist/core/runner/changes-history.js +2 -2
- package/dist/core/runner/checkpoint-scope.d.ts +13 -3
- package/dist/core/runner/checkpoint-scope.js +12 -4
- package/dist/core/runner/construction-doors.js +6 -0
- package/dist/core/runner/contracts.d.ts +22 -3
- package/dist/core/runner/delegation-owner.d.ts +30 -0
- package/dist/core/runner/delegation-owner.js +20 -4
- package/dist/core/runner/file-history-restore.d.ts +3 -1
- package/dist/core/runner/file-history-restore.js +9 -6
- package/dist/core/runner/finish-reason-seat.js +4 -2
- package/dist/core/runner/leg-frame.js +3 -0
- package/dist/core/runner/loaded-skills.d.ts +2 -0
- package/dist/core/runner/loaded-skills.js +10 -0
- package/dist/core/runner/nested-memory-lane.d.ts +22 -5
- package/dist/core/runner/nested-memory-lane.js +91 -30
- package/dist/core/runner/person-path-rows.d.ts +23 -20
- package/dist/core/runner/person-path-rows.js +82 -18
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +4 -0
- package/dist/core/runner/prepare-caps-and-workflow.js +105 -90
- package/dist/core/runner/prepare-config-doors.d.ts +1 -0
- package/dist/core/runner/prepare-config-doors.js +5 -3
- package/dist/core/runner/prepare-context-lane.js +1 -0
- package/dist/core/runner/prepare-delegation-surface.d.ts +3 -0
- package/dist/core/runner/prepare-delegation-surface.js +6 -0
- package/dist/core/runner/prepare-execution-env.d.ts +3 -3
- package/dist/core/runner/prepare-file-history.js +1 -1
- package/dist/core/runner/prepare-hands-readface.d.ts +10 -2
- package/dist/core/runner/prepare-hands-readface.js +36 -22
- package/dist/core/runner/prepare-inherited-gate.d.ts +8 -5
- package/dist/core/runner/prepare-inherited-gate.js +14 -6
- package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -2
- package/dist/core/runner/prepare-memory-engine-session.js +2 -2
- package/dist/core/runner/prepare-memory.js +3 -15
- package/dist/core/runner/prepare-project-context.d.ts +1 -1
- package/dist/core/runner/prepare-project-context.js +3 -7
- package/dist/core/runner/prepare-protocol-tools.d.ts +5 -0
- package/dist/core/runner/prepare-protocol-tools.js +2 -2
- package/dist/core/runner/prepare-run-refs.d.ts +1 -1
- package/dist/core/runner/prepare-run-refs.js +3 -2
- package/dist/core/runner/prepare-suspend-saga.d.ts +6 -2
- package/dist/core/runner/prepare-suspend-saga.js +4 -2
- package/dist/core/runner/prepare-task.js +50 -37
- package/dist/core/runner/prepare-turn-wiring.d.ts +4 -3
- package/dist/core/runner/prepare-turn-wiring.js +2 -1
- package/dist/core/runner/prepare-wiring-manifest.d.ts +5 -1
- package/dist/core/runner/prepare-wiring-manifest.js +8 -4
- package/dist/core/runner/read-session-changes.js +1 -1
- package/dist/core/runner/resume-apply.js +11 -5
- package/dist/core/runner/resume-checkpoint-screen.d.ts +8 -7
- package/dist/core/runner/resume-checkpoint-screen.js +7 -6
- package/dist/core/runner/resume-review-outcome.d.ts +3 -0
- package/dist/core/runner/resume-review-outcome.js +24 -1
- package/dist/core/runner/rewind-files.js +3 -2
- package/dist/core/runner/run-harness-handlers.js +3 -0
- package/dist/core/runner/run-identity-wiring.js +3 -2
- package/dist/core/runner/run-leg.js +9 -2
- package/dist/core/runner/run-notification-lane.js +20 -1
- package/dist/core/runner/run-settle-and-teardown.js +21 -12
- package/dist/core/runner/run-stop-and-final-verify.js +6 -0
- package/dist/core/runner/run-telemetry-and-budget-seats.js +1 -1
- package/dist/core/runner/runtask.d.ts +6 -2
- package/dist/core/runner/runtask.js +21 -9
- package/dist/core/runner/shell-env-withheld.d.ts +3 -2
- package/dist/core/runner/shell-env-withheld.js +1 -2
- package/dist/core/runner/stop-tail-notice.d.ts +10 -2
- package/dist/core/runner/stop-tail-notice.js +9 -2
- package/dist/core/runner/stream-settle-backstop.d.ts +1 -0
- package/dist/core/runner/stream-settle-backstop.js +1 -0
- package/dist/core/runner/task-start-doors.js +6 -3
- package/dist/core/runner/terminal-account.d.ts +10 -1
- package/dist/core/runner/terminal-account.js +23 -3
- package/dist/core/runner/tool-face-overlay.d.ts +2 -11
- package/dist/core/runner/tool-face-overlay.js +39 -0
- package/dist/core/runner/trim-stretch.js +7 -2
- package/dist/core/runner/unreadable-person-rows.d.ts +2 -1
- package/dist/core/runner-deps.d.ts +13 -10
- package/dist/core/scheduler.d.ts +47 -7
- package/dist/core/scheduler.js +19 -7
- package/dist/core/secret-env.d.ts +60 -37
- package/dist/core/secret-env.js +45 -48
- package/dist/core/sensitive-path-policy.js +14 -7
- package/dist/core/session-checkout.d.ts +3 -0
- package/dist/core/session-checkout.js +1 -0
- package/dist/core/session-store.d.ts +12 -6
- package/dist/core/session-store.js +26 -6
- package/dist/core/session.d.ts +31 -8
- package/dist/core/shell-read-silence.js +1 -0
- package/dist/core/store-contracts/checkpoint-store-contract.js +17 -0
- package/dist/core/store-contracts/peer-task-store-contract.d.ts +21 -0
- package/dist/core/store-contracts/peer-task-store-contract.js +516 -0
- package/dist/core/store-contracts/session-store-contract.d.ts +15 -2
- package/dist/core/store-contracts/session-store-contract.js +87 -3
- package/dist/core/store-contracts/workflow-journal-store-contract.d.ts +19 -1
- package/dist/core/store-contracts/workflow-journal-store-contract.js +89 -1
- package/dist/core/task-event.d.ts +11 -3
- package/dist/core/task-notification.d.ts +97 -10
- package/dist/core/task-notification.js +129 -5
- package/dist/core/task-registry-shared.d.ts +12 -1
- package/dist/core/task-registry-shared.js +3 -1
- package/dist/core/task-registry-workflow.d.ts +1 -1
- package/dist/core/task-registry-workflow.js +9 -1
- package/dist/core/task-registry.d.ts +39 -2
- package/dist/core/task-registry.js +76 -12
- package/dist/core/task-result.d.ts +13 -0
- package/dist/core/task-spec-members.d.ts +3 -1
- package/dist/core/task-spec-members.js +11 -3
- package/dist/core/task-spec.d.ts +57 -23
- package/dist/core/tool-catalog-entries.js +4 -0
- package/dist/core/tool-face-reader.js +1 -1
- package/dist/core/tool-face.d.ts +7 -0
- package/dist/core/tool-face.js +1 -0
- package/dist/core/tool-mount-facts.d.ts +5 -3
- package/dist/core/tool-mount-facts.js +4 -3
- package/dist/core/tool-mount-plan.d.ts +7 -3
- package/dist/core/tool-mount-plan.js +11 -5
- package/dist/core/tool-mount-static.d.ts +2 -2
- package/dist/core/tool-mount-static.js +28 -14
- package/dist/core/tool-registry.d.ts +33 -1
- package/dist/core/tool-registry.js +33 -0
- package/dist/core/tool-result-store.d.ts +19 -2
- package/dist/core/tool-result-store.js +51 -2
- package/dist/core/tool-roster.d.ts +16 -0
- package/dist/core/tool-roster.js +6 -0
- package/dist/core/tool-spec.d.ts +13 -4
- package/dist/core/tools.d.ts +6 -0
- package/dist/core/tools.js +1 -1
- package/dist/core/user-attachment.d.ts +5 -1
- package/dist/core/user-attachment.js +14 -7
- package/dist/core/wiring-manifest.d.ts +89 -29
- package/dist/core/wiring-manifest.js +44 -4
- package/dist/core/workflow-journal-store.d.ts +53 -10
- package/dist/core/workflow-journal-store.js +27 -4
- package/dist/core/workflow-run-store-contract.js +16 -0
- package/dist/core/workflow-run-store.d.ts +9 -7
- package/dist/core/workflow-run-store.js +4 -1
- package/dist/engine/execution-env/node-execution-env.js +3 -1
- package/dist/engine/harness/messages.d.ts +1 -1
- package/dist/engine/harness/messages.js +2 -1
- package/dist/engine/harness/types.d.ts +24 -1
- package/dist/engine/harness/types.js +10 -0
- package/dist/engine/llm/types.d.ts +5 -7
- package/dist/engine/loop/types.d.ts +2 -0
- package/dist/engine/lsp/node-lsp-manager.js +2 -1
- package/dist/engine/session/import-validate.js +6 -1
- package/dist/engine/session/session.d.ts +15 -2
- package/dist/engine/session/session.js +35 -5
- package/dist/index.d.ts +27 -12
- package/dist/index.js +20 -8
- package/dist/orchestration/run-workflow-tool.js +40 -32
- package/dist/orchestration/workflow-park-adoption.d.ts +51 -12
- package/dist/orchestration/workflow-park-adoption.js +47 -12
- package/dist/orchestration/workflow-stop.d.ts +128 -0
- package/dist/orchestration/workflow-stop.js +156 -0
- package/dist/orchestration/workflow.d.ts +30 -6
- package/dist/orchestration/workflow.js +117 -54
- package/dist/prompts/manager-recipe.d.ts +18 -0
- package/dist/prompts/manager-recipe.js +24 -0
- package/dist/stores/file/adoption/marker.d.ts +2 -27
- package/dist/stores/file/adoption/marker.js +12 -0
- package/dist/stores/file/index.d.ts +1 -1
- package/dist/stores/file/index.js +1 -1
- package/dist/stores/file/permission-rule-store.d.ts +3 -1
- package/dist/stores/file/permission-rule-store.js +0 -1
- package/dist/stores/file/workflow-journal-store.d.ts +16 -3
- package/dist/stores/file/workflow-journal-store.js +93 -5
- package/dist/stores/file/workflow-run-store.d.ts +1 -1
- package/dist/tools/artifact/artifact-tool.js +11 -6
- package/dist/tools/fs/file-read-check.d.ts +45 -11
- package/dist/tools/fs/file-read-check.js +200 -57
- package/dist/tools/fs/file-write-check.js +9 -3
- package/dist/tools/fs/index.d.ts +8 -7
- package/dist/tools/fs/index.js +4 -4
- package/dist/tools/fs/judged-reads.d.ts +51 -0
- package/dist/tools/fs/judged-reads.js +68 -0
- package/dist/tools/fs/read-deny-home.d.ts +1 -1
- package/dist/tools/fs/read-deny-home.js +5 -5
- package/dist/tools/fs/read-deny.d.ts +33 -8
- package/dist/tools/fs/read-deny.js +114 -25
- package/dist/tools/fs/safety.d.ts +12 -1
- package/dist/tools/fs/safety.js +16 -3
- package/dist/tools/fs/shell-read-check.d.ts +25 -5
- package/dist/tools/fs/shell-read-check.js +100 -15
- package/dist/tools/fs/shell-read-establish.d.ts +9 -0
- package/dist/tools/fs/shell-read-establish.js +34 -14
- package/dist/tools/fs/shell-read-judge.d.ts +13 -1
- package/dist/tools/fs/shell-read-judge.js +26 -7
- package/dist/tools/fs/shell-read-plan.d.ts +5 -0
- package/dist/tools/fs/shell-read-write-targets.js +17 -9
- package/dist/tools/scheduler-store-move.d.ts +74 -0
- package/dist/tools/scheduler-store-move.js +103 -0
- package/dist/tools/scheduler-tools.d.ts +43 -29
- package/dist/tools/scheduler-tools.js +161 -118
- package/package.json +2 -2
- package/test/export-surface.snapshot.json +173 -3
- package/wire-changes/answers/core-stores-sql@7.72.0.json +12 -0
- package/wire-changes/answers/core-stores-sql@7.73.0.json +28 -0
- package/wire-changes/answers/core@7.72.0.json +84 -0
- package/wire-changes/answers/core@7.73.0.json +216 -0
- package/wire-changes/answers/mods-kernel@7.72.0.json +7 -0
- package/wire-changes/answers/mods-kernel@7.73.0.json +7 -0
- package/wire-changes/answers/primitives@7.72.0.json +6 -0
- package/wire-changes/answers/primitives@7.73.0.json +12 -0
- package/wire-changes/answers/wiki-gate@7.72.0.json +7 -0
- package/wire-changes/answers/wiki-gate@7.73.0.json +7 -0
- package/wire-changes/core-stores-sql@7.72.0.json +215 -0
- package/wire-changes/core-stores-sql@7.73.0.json +326 -0
- package/wire-changes/core@7.72.0.json +2426 -0
- package/wire-changes/core@7.73.0.json +6480 -0
- package/wire-changes/mods-kernel@7.72.0.json +147 -0
- package/wire-changes/mods-kernel@7.73.0.json +147 -0
- package/wire-changes/primitives@7.72.0.json +143 -0
- package/wire-changes/primitives@7.73.0.json +227 -0
- package/wire-changes/wiki-gate@7.72.0.json +145 -0
- package/wire-changes/wiki-gate@7.73.0.json +145 -0
|
@@ -175,6 +175,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
175
175
|
"config.durable_gate_unavailable",
|
|
176
176
|
"config.peer_admission_out_of_range",
|
|
177
177
|
"config.peer_lane_unmounted",
|
|
178
|
+
"config.scheduler_store_unmoved",
|
|
178
179
|
"config.secret_env_scrubbed",
|
|
179
180
|
"inherit_env.names_withheld",
|
|
180
181
|
"config.credential_not_withheld",
|
|
@@ -293,6 +294,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
293
294
|
"task.late_approval",
|
|
294
295
|
"task.interrupt_unconsumed",
|
|
295
296
|
"task.wait_ceiling_reached",
|
|
297
|
+
"task.manager_launch_narrowed",
|
|
296
298
|
"task.completed_past_limit",
|
|
297
299
|
"task.verdict_refused",
|
|
298
300
|
"task.tool_turn_incomplete",
|
|
@@ -309,6 +311,7 @@ export const ENGINE_NOTICE_CODES = Object.freeze([
|
|
|
309
311
|
"skills.listing_truncated",
|
|
310
312
|
"agents.listing_truncated",
|
|
311
313
|
"tool_result.offload_put_failed",
|
|
314
|
+
"tool_result.offload_put_unsettled",
|
|
312
315
|
"tool_result.media_refused",
|
|
313
316
|
"tool_result.media_persisted",
|
|
314
317
|
"tool_result.read_refused",
|
|
@@ -364,6 +367,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
364
367
|
"task.late_approval": "user",
|
|
365
368
|
"task.interrupt_unconsumed": "user",
|
|
366
369
|
"task.wait_ceiling_reached": "user",
|
|
370
|
+
"task.manager_launch_narrowed": "user",
|
|
367
371
|
"task.tool_turn_incomplete": "user",
|
|
368
372
|
"task.tool_turn_unrecovered": "user",
|
|
369
373
|
"task.completed_past_limit": "operator",
|
|
@@ -432,6 +436,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
432
436
|
"config.tool_face_undeclared": "operator",
|
|
433
437
|
"config.tool_face_invalid": "operator",
|
|
434
438
|
"config.peer_lane_unmounted": "operator",
|
|
439
|
+
"config.scheduler_store_unmoved": "operator",
|
|
435
440
|
"config.peer_admission_out_of_range": "operator",
|
|
436
441
|
"config.secret_env_scrubbed": "operator",
|
|
437
442
|
"config.credential_not_withheld": "operator",
|
|
@@ -493,6 +498,7 @@ const NOTICE_AUDIENCE_TABLE = {
|
|
|
493
498
|
"skills.listing_truncated": "operator",
|
|
494
499
|
"agents.listing_truncated": "operator",
|
|
495
500
|
"tool_result.offload_put_failed": "operator",
|
|
501
|
+
"tool_result.offload_put_unsettled": "operator",
|
|
496
502
|
"tool_result.media_refused": "operator",
|
|
497
503
|
"tool_result.media_persisted": "operator",
|
|
498
504
|
"tool_result.read_refused": "operator",
|
|
@@ -584,6 +590,7 @@ const NOTICE_ATTENTION_TABLE = {
|
|
|
584
590
|
"task.halt_unconsumed": "act",
|
|
585
591
|
"task.interrupt_unconsumed": "act",
|
|
586
592
|
"task.wait_ceiling_reached": "act",
|
|
593
|
+
"task.manager_launch_narrowed": "act",
|
|
587
594
|
"task.late_approval": "act",
|
|
588
595
|
"memory.capture_optout_unpersisted": "act",
|
|
589
596
|
"memory.mount_failed": "act",
|
|
@@ -655,6 +662,7 @@ const NOTICE_ATTENTION_TABLE = {
|
|
|
655
662
|
"config.permission_rules_skipped": "act",
|
|
656
663
|
"config.peer_admission_out_of_range": "act",
|
|
657
664
|
"config.peer_lane_unmounted": "act",
|
|
665
|
+
"config.scheduler_store_unmoved": "act",
|
|
658
666
|
"config.credential_not_withheld": "act",
|
|
659
667
|
"config.cross_boundary_posture_undeclared": "act",
|
|
660
668
|
"config.cross_boundary_record_unwritten": "act",
|
|
@@ -682,6 +690,7 @@ const NOTICE_ATTENTION_TABLE = {
|
|
|
682
690
|
"instructions.family_undeclared": "act",
|
|
683
691
|
"approval.approver_defect": "act",
|
|
684
692
|
"tool_result.offload_put_failed": "act",
|
|
693
|
+
"tool_result.offload_put_unsettled": "act",
|
|
685
694
|
"artifact.owner_refused": "act",
|
|
686
695
|
"fs.staging_file_left": "act",
|
|
687
696
|
"store.lock_retained": "act",
|
|
@@ -789,6 +798,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
789
798
|
"config.durable_gate_unavailable": "engine",
|
|
790
799
|
"config.peer_admission_out_of_range": "engine",
|
|
791
800
|
"config.peer_lane_unmounted": "engine",
|
|
801
|
+
"config.scheduler_store_unmoved": "engine",
|
|
792
802
|
"config.secret_env_scrubbed": "engine",
|
|
793
803
|
"inherit_env.names_withheld": "engine",
|
|
794
804
|
"config.credential_not_withheld": "engine",
|
|
@@ -907,6 +917,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
907
917
|
"task.late_approval": "engine",
|
|
908
918
|
"task.interrupt_unconsumed": "engine",
|
|
909
919
|
"task.wait_ceiling_reached": "engine",
|
|
920
|
+
"task.manager_launch_narrowed": "engine",
|
|
910
921
|
"task.completed_past_limit": "engine",
|
|
911
922
|
"task.verdict_refused": "engine",
|
|
912
923
|
"task.tool_turn_incomplete": "engine",
|
|
@@ -923,6 +934,7 @@ const NOTICE_MINTER_TABLE = {
|
|
|
923
934
|
"skills.listing_truncated": "engine",
|
|
924
935
|
"agents.listing_truncated": "engine",
|
|
925
936
|
"tool_result.offload_put_failed": "engine",
|
|
937
|
+
"tool_result.offload_put_unsettled": "engine",
|
|
926
938
|
"tool_result.media_refused": "engine",
|
|
927
939
|
"tool_result.media_persisted": "engine",
|
|
928
940
|
"tool_result.read_refused": "engine",
|
|
@@ -1040,7 +1052,7 @@ export const NOTICE_CODE_LINEAGE = Object.freeze({
|
|
|
1040
1052
|
attentionBefore: "act",
|
|
1041
1053
|
attentionAfter: "inform",
|
|
1042
1054
|
branches: [
|
|
1043
|
-
{ to: "route.stream_content_dropped", when: "a frame refused after the end carried the model's output", keys: { statement: null, word: "word", frames: "frames", sessionId: "sessionId", runId: "runId" } },
|
|
1055
|
+
{ to: "route.stream_content_dropped", when: "a frame refused after the end carried the model's output", keys: { statement: null, word: "word", frames: "frames", sessionId: "sessionId", runId: "runId" }, added: ["ending"] },
|
|
1044
1056
|
],
|
|
1045
1057
|
},
|
|
1046
1058
|
"memory.capture_opted_out": {
|
|
@@ -1095,7 +1107,7 @@ export const NOTICE_CODE_LINEAGE = Object.freeze({
|
|
|
1095
1107
|
sessionId: "sessionId",
|
|
1096
1108
|
runId: "runId",
|
|
1097
1109
|
},
|
|
1098
|
-
added: ["kind", "identity", "entries[].reason", "entries[].behavior", "entries[].member", "entries[].element.partition", "entries[].element.index", "entries[].element.read"],
|
|
1110
|
+
added: ["kind", "identity", "reasonCounts", "entries[].reason", "entries[].behavior", "entries[].member", "entries[].element.partition", "entries[].element.index", "entries[].element.read"],
|
|
1099
1111
|
toDetail: { kind: ["stored_rule_row"] },
|
|
1100
1112
|
},
|
|
1101
1113
|
],
|
|
@@ -1121,7 +1133,7 @@ export const NOTICE_CODE_LINEAGE = Object.freeze({
|
|
|
1121
1133
|
agentId: "agentId",
|
|
1122
1134
|
runId: "runId",
|
|
1123
1135
|
},
|
|
1124
|
-
added: ["kind", "identity"],
|
|
1136
|
+
added: ["kind", "identity", "reasonCounts"],
|
|
1125
1137
|
toDetail: { kind: ["rule_text_unreadable"] },
|
|
1126
1138
|
},
|
|
1127
1139
|
],
|
|
@@ -1182,7 +1194,7 @@ export const NOTICE_CODE_LINEAGE = Object.freeze({
|
|
|
1182
1194
|
"entries[].carriedBy": "entries[].carriedBy",
|
|
1183
1195
|
sessionId: "sessionId",
|
|
1184
1196
|
},
|
|
1185
|
-
added: ["kind", "count", "identity"],
|
|
1197
|
+
added: ["kind", "count", "identity", "reasonCounts"],
|
|
1186
1198
|
toDetail: { kind: ["allow_entry_inert"] },
|
|
1187
1199
|
bounded: { "entries[]": 8 },
|
|
1188
1200
|
},
|
|
@@ -1204,7 +1216,7 @@ export const NOTICE_CODE_LINEAGE = Object.freeze({
|
|
|
1204
1216
|
"entries[].carriedBy": "entries[].carriedBy",
|
|
1205
1217
|
sessionId: "sessionId",
|
|
1206
1218
|
},
|
|
1207
|
-
added: ["count", "identity"],
|
|
1219
|
+
added: ["count", "identity", "reasonCounts"],
|
|
1208
1220
|
bounded: { "entries[]": 8 },
|
|
1209
1221
|
},
|
|
1210
1222
|
],
|
package/dist/core/hooks.d.ts
CHANGED
|
@@ -543,6 +543,9 @@ export declare function createHookEnvCapabilities(env: ExecutionEnv): HookEnvCap
|
|
|
543
543
|
export interface HookInvocationIdentity {
|
|
544
544
|
/** The run's session id (uuid domain) — the same key `TaskResult.sessionId` reports. */
|
|
545
545
|
readonly sessionId: string;
|
|
546
|
+
/** The delegation tree's root session id — the session the tree's shared task list belongs to (`task_list.partition_is_root_session`):
|
|
547
|
+
* `internals.rootSessionId` when present, else {@link sessionId} on a top-level leg, else absent (never fabricated on a child/observer leg with no root anchor). */
|
|
548
|
+
readonly rootSessionId?: string;
|
|
546
549
|
/** The run's unified task id (the leg's one mint; TaskEvent's `sourceTaskId` and `task_progress` key on it): a background
|
|
547
550
|
* sub-agent's registry task id, else the host's declared task id, else {@link sessionId}. */
|
|
548
551
|
readonly taskId: string;
|
package/dist/core/hooks.js
CHANGED
|
@@ -81,6 +81,7 @@ const IDENTITY_AGENT_NAME_MAX = 80;
|
|
|
81
81
|
export function mintHookInvocationIdentity(facts) {
|
|
82
82
|
return Object.freeze(Object.assign(Object.create(null), {
|
|
83
83
|
sessionId: facts.sessionId,
|
|
84
|
+
...(facts.rootSessionId !== undefined ? { rootSessionId: facts.rootSessionId } : {}),
|
|
84
85
|
taskId: facts.taskId,
|
|
85
86
|
legKind: facts.legKind,
|
|
86
87
|
isDelegatedChild: facts.isDelegatedChild,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Deployment-declared host process identity (`RunnerDeps.host`, projected onto `WiringManifest.host`). */
|
|
2
|
+
export interface HostInstanceDeclaration {
|
|
3
|
+
/** Stable identifier of the host process / replica (single-line visible string, 1..256 UTF-16 units). */
|
|
4
|
+
readonly instanceId: string;
|
|
5
|
+
/** Epoch milliseconds when the host process started (non-negative safe integer, matching `/health.startedAt`). */
|
|
6
|
+
readonly startedAt: number;
|
|
7
|
+
}
|
|
8
|
+
/** Engine-minted per-leg instance identity (`WiringManifest.leg.instance`). */
|
|
9
|
+
export interface WiringLegInstance {
|
|
10
|
+
/** The leg's per-run invocation id (`TaskResult.runId`), minted once at prepare entry. */
|
|
11
|
+
readonly runId: string;
|
|
12
|
+
/** Wall-clock epoch milliseconds minted once beside {@link runId} at prepare entry. */
|
|
13
|
+
readonly startedAt: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Receive `RunnerDeps.host` (or `WiringFacts.host`) through the engine's one member door (`receiveMembers`).
|
|
17
|
+
* Absent (`undefined`) ⇒ `undefined` (omitted from the manifest). Present ⇒ validated and returned as a frozen copy;
|
|
18
|
+
* any bad container, stray member, throwing getter, invalid `instanceId`, or invalid `startedAt` throws
|
|
19
|
+
* `config.invalid_argument` naming `<subject>` or `<subject>.<member>` (each member is read once: a getter is kept at its first answer).
|
|
20
|
+
*/
|
|
21
|
+
export declare function receiveHostInstance(raw: unknown, subject?: string): Readonly<HostInstanceDeclaration> | undefined;
|
|
22
|
+
/** Screen and freeze a `WiringFacts.legInstance` fact for `deriveWiringManifest`. */
|
|
23
|
+
export declare function readLegInstanceFact(raw: unknown): Readonly<WiringLegInstance>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { callerText } from "./caller-text.js";
|
|
2
|
+
import { optionKeys, receiveMembers } from "./own-property-receipt.js";
|
|
3
|
+
import { describeRejectedValue } from "./tool-search-setting.js";
|
|
4
|
+
const HOST_INSTANCE_KEYS = optionKeys()({ instanceId: 0, startedAt: 0 });
|
|
5
|
+
const HOST_INSTANCE_ID_MAX_CHARS = 256;
|
|
6
|
+
function hostRefusal(message, field) {
|
|
7
|
+
const e = new Error(message);
|
|
8
|
+
e.code = "config.invalid_argument";
|
|
9
|
+
e.detail = Object.freeze({ field });
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
export function receiveHostInstance(raw, subject = "RunnerDeps.host") {
|
|
13
|
+
if (raw === undefined)
|
|
14
|
+
return undefined;
|
|
15
|
+
if (typeof raw !== "object" || raw === null) {
|
|
16
|
+
throw hostRefusal(`${subject} must be a plain object { instanceId, startedAt }, got ${raw === null ? "null" : typeof raw}`, subject);
|
|
17
|
+
}
|
|
18
|
+
let copy;
|
|
19
|
+
try {
|
|
20
|
+
copy = receiveMembers(raw, { subject, unit: "member", moment: "when host identity is declared" }, HOST_INSTANCE_KEYS, (msg, [stray]) => hostRefusal(msg, typeof stray === "string" ? `${subject}.${stray}` : subject));
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
if (err instanceof Error && err.detail === undefined) {
|
|
24
|
+
const { member } = err;
|
|
25
|
+
const field = typeof member === "string" ? `${subject}.${member}` : subject;
|
|
26
|
+
err.detail = Object.freeze({ field });
|
|
27
|
+
}
|
|
28
|
+
throw err;
|
|
29
|
+
}
|
|
30
|
+
const idField = `${subject}.instanceId`;
|
|
31
|
+
const id = copy.instanceId;
|
|
32
|
+
if (typeof id !== "string") {
|
|
33
|
+
throw hostRefusal(`${idField} must be a non-empty string, got ${describeRejectedValue(id)}`, idField);
|
|
34
|
+
}
|
|
35
|
+
if (id.length === 0 || id.trim().length === 0) {
|
|
36
|
+
throw hostRefusal(`${idField} must be a non-empty visible string (got empty or whitespace-only)`, idField);
|
|
37
|
+
}
|
|
38
|
+
if (id.trim() !== id) {
|
|
39
|
+
throw hostRefusal(`${idField} must not carry leading or trailing whitespace (${callerText(id)})`, idField);
|
|
40
|
+
}
|
|
41
|
+
if (/[\u0000-\u001f\u007f-\u009f\u{2028}\u{2029}]/u.test(id)) {
|
|
42
|
+
throw hostRefusal(`${idField} must be a single-line visible string without control characters (${callerText(id)})`, idField);
|
|
43
|
+
}
|
|
44
|
+
if (/(?:^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF](?:$|[^\uDC00-\uDFFF])/.test(id)) {
|
|
45
|
+
throw hostRefusal(`${idField} must be well-formed Unicode`, idField);
|
|
46
|
+
}
|
|
47
|
+
if (id.length > HOST_INSTANCE_ID_MAX_CHARS) {
|
|
48
|
+
throw hostRefusal(`${idField} exceeds ${HOST_INSTANCE_ID_MAX_CHARS} UTF-16 code units (got ${id.length})`, idField);
|
|
49
|
+
}
|
|
50
|
+
const startedAtField = `${subject}.startedAt`;
|
|
51
|
+
const startedAt = copy.startedAt;
|
|
52
|
+
if (typeof startedAt !== "number" || !Number.isSafeInteger(startedAt) || startedAt < 0) {
|
|
53
|
+
throw hostRefusal(`${startedAtField} must be a non-negative safe integer epoch-ms timestamp, got ${describeRejectedValue(startedAt)}`, startedAtField);
|
|
54
|
+
}
|
|
55
|
+
return Object.freeze({ instanceId: id, startedAt });
|
|
56
|
+
}
|
|
57
|
+
export function readLegInstanceFact(raw) {
|
|
58
|
+
if (typeof raw !== "object" || raw === null) {
|
|
59
|
+
throw new Error(`the legInstance wiring fact must be { runId, startedAt }, got ${raw === null ? "null" : typeof raw}`);
|
|
60
|
+
}
|
|
61
|
+
const { runId, startedAt } = raw;
|
|
62
|
+
if (typeof runId !== "string" || runId.length === 0) {
|
|
63
|
+
throw new Error(`the legInstance wiring fact requires a non-empty string runId, got ${describeRejectedValue(runId)}`);
|
|
64
|
+
}
|
|
65
|
+
if (typeof startedAt !== "number" || !Number.isSafeInteger(startedAt) || startedAt < 0) {
|
|
66
|
+
throw new Error(`the legInstance wiring fact requires a non-negative safe integer epoch-ms startedAt, got ${describeRejectedValue(startedAt)}`);
|
|
67
|
+
}
|
|
68
|
+
return Object.freeze({ runId, startedAt });
|
|
69
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { SessionStore } from "./session.js";
|
|
2
|
+
import type { TerminalFailureDetail } from "./terminal-cause.js";
|
|
3
|
+
import type { RunnerDeps, TaskSpec } from "./types.js";
|
|
4
|
+
import type { RunInternals } from "./runner/contracts.js";
|
|
5
|
+
import { type InstructionsWithheldReason } from "./runner/nested-memory-lane.js";
|
|
6
|
+
import { type SessionReadFileStates } from "./runner/session-read-file-states.js";
|
|
7
|
+
/** Why an `outside_its_root` withheld file would still be refused by Read admission even after `externalIncludes` approval. */
|
|
8
|
+
export declare const EXTERNAL_INCLUDE_POST_APPROVAL_BLOCKS: readonly ["outside_roots", "rule_denied", "approval_required", "admission_unknown"];
|
|
9
|
+
export type ExternalIncludePostApprovalBlock = (typeof EXTERNAL_INCLUDE_POST_APPROVAL_BLOCKS)[number];
|
|
10
|
+
/** One instruction file loaded via an `@` include on a leg's first load. */
|
|
11
|
+
export interface InstructionIncludedEntry {
|
|
12
|
+
/** Resolved canonical path of the included instruction file. */
|
|
13
|
+
readonly path: string;
|
|
14
|
+
/** Resolved path of the file (or name of the host text) whose `@` include named this file. */
|
|
15
|
+
readonly includedBy: string;
|
|
16
|
+
/** Path after `@` as the engine read it. */
|
|
17
|
+
readonly spelled: string;
|
|
18
|
+
}
|
|
19
|
+
/** One lane-discovered or host-text instruction file that was not loaded on a leg's first load. */
|
|
20
|
+
export interface InstructionWithheldEntry {
|
|
21
|
+
/** Path the lane probed (or first skipped host text name for `too_many_texts`, or spelled include for `unanchored`). */
|
|
22
|
+
readonly path: string;
|
|
23
|
+
/** Why the file was not loaded — the same closed set `instructions.withheld` notices carry. */
|
|
24
|
+
readonly reason: InstructionsWithheldReason;
|
|
25
|
+
/** Resolved canonical target for `outside_its_root` when resolution named a key (pass this in `externalIncludes`). */
|
|
26
|
+
readonly target?: string;
|
|
27
|
+
/** Resolved path of the file (or name of the host text) whose `@` include named this file. */
|
|
28
|
+
readonly includedBy?: string;
|
|
29
|
+
/** Path after `@` as the engine read it; present with `includedBy`. */
|
|
30
|
+
readonly spelled?: string;
|
|
31
|
+
/** Present on `outside_its_root` entries only when Read admission would still refuse the file after approval. */
|
|
32
|
+
readonly blockedAfterApproval?: ExternalIncludePostApprovalBlock;
|
|
33
|
+
}
|
|
34
|
+
/** The instruction files a leg starts with, shared identically by `WiringManifest.instructions` and `Runner.previewInstructions`. */
|
|
35
|
+
export interface WiringInstructions {
|
|
36
|
+
readonly selected: readonly string[];
|
|
37
|
+
readonly additionalDirectories?: ReadonlyArray<{
|
|
38
|
+
readonly directory: string;
|
|
39
|
+
readonly selected: readonly string[];
|
|
40
|
+
}>;
|
|
41
|
+
/** Files loaded via `@` include; present iff non-empty. */
|
|
42
|
+
readonly included?: readonly InstructionIncludedEntry[];
|
|
43
|
+
/** Lane-discovered and host-text files withheld; present iff non-empty. */
|
|
44
|
+
readonly withheld?: readonly InstructionWithheldEntry[];
|
|
45
|
+
}
|
|
46
|
+
/** Coded answer of `Runner.previewInstructions(spec)`: either the instruction manifest preview, or the run's coded refusal. */
|
|
47
|
+
export type InstructionPreviewResult = {
|
|
48
|
+
readonly ok: true;
|
|
49
|
+
readonly projectMemory: "on" | "disabled" | "absent";
|
|
50
|
+
readonly instructions?: WiringInstructions;
|
|
51
|
+
} | {
|
|
52
|
+
readonly ok: false;
|
|
53
|
+
readonly code?: string;
|
|
54
|
+
readonly message: string;
|
|
55
|
+
readonly detail?: TerminalFailureDetail;
|
|
56
|
+
};
|
|
57
|
+
export interface PreviewInstructionsSeats {
|
|
58
|
+
readonly deps: RunnerDeps;
|
|
59
|
+
readonly sessions: SessionStore;
|
|
60
|
+
readonly readStates: SessionReadFileStates;
|
|
61
|
+
}
|
|
62
|
+
/** Read what instruction files a run of `spec` would load or withhold, through the lane's single first-load reading. */
|
|
63
|
+
export declare function previewInstructionsOf(seats: PreviewInstructionsSeats, spec: TaskSpec, internals?: RunInternals): Promise<InstructionPreviewResult>;
|