@sema-agent/core 7.51.2 → 7.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +698 -2
- package/README.md +3 -1
- package/dist/agents/agent-transcript-tool.d.ts +1 -1
- package/dist/agents/cascade.js +4 -0
- package/dist/agents/cross-session-envelope.d.ts +8 -0
- package/dist/agents/cross-session-envelope.js +6 -0
- package/dist/agents/cross-session-judge.d.ts +21 -1
- package/dist/agents/cross-session-judge.js +8 -0
- package/dist/agents/cross-session-ref.d.ts +5 -0
- package/dist/agents/cross-session-ref.js +1 -0
- package/dist/agents/cumulative-stats.d.ts +3 -0
- package/dist/agents/cumulative-stats.js +3 -0
- package/dist/agents/list-agents-tool.d.ts +1 -1
- package/dist/agents/org-delivery-gate.d.ts +122 -0
- package/dist/agents/org-delivery-gate.js +69 -0
- package/dist/agents/peer-held-queue.d.ts +9 -4
- package/dist/agents/peer-held-queue.js +6 -5
- package/dist/agents/peer-session-drain.d.ts +35 -5
- package/dist/agents/peer-session-drain.js +271 -180
- package/dist/agents/read-inbox-tool.d.ts +8 -1
- package/dist/agents/read-inbox-tool.js +5 -1
- package/dist/agents/repair-loop.js +4 -0
- package/dist/agents/send-message-tool.d.ts +11 -16
- package/dist/agents/send-message-tool.js +11 -13
- package/dist/agents/subagent.d.ts +3 -0
- package/dist/agents/subagent.js +105 -76
- package/dist/agents/tool-filter.d.ts +58 -13
- package/dist/agents/tool-filter.js +34 -14
- package/dist/bench/metrics.d.ts +1 -0
- package/dist/brain/anthropic.d.ts +6 -1
- package/dist/brain/anthropic.js +17 -13
- package/dist/brain/model-presets.d.ts +4 -5
- package/dist/brain/model-presets.js +6 -5
- package/dist/brain/open-responses.js +16 -12
- package/dist/brain/openai.js +16 -12
- package/dist/brain/request-params.d.ts +12 -33
- package/dist/brain/request-params.js +5 -2
- package/dist/brain/request-route.d.ts +9 -8
- package/dist/brain/request-route.js +1 -0
- package/dist/brain/route-adjudicator.d.ts +123 -47
- package/dist/brain/route-adjudicator.js +171 -42
- package/dist/brain/route-conformance.js +2 -2
- package/dist/brain/routing.d.ts +24 -1
- package/dist/brain/routing.js +54 -19
- package/dist/brain/status-sink.d.ts +18 -0
- package/dist/brain/status-sink.js +7 -0
- package/dist/brain/timeout.js +5 -4
- package/dist/core/a2a.d.ts +5 -2
- package/dist/core/a2a.js +30 -13
- package/dist/core/allow-entry.d.ts +42 -9
- package/dist/core/allow-entry.js +25 -18
- package/dist/core/auto-compaction.d.ts +80 -20
- package/dist/core/auto-compaction.js +65 -18
- package/dist/core/auto-promote.d.ts +2 -1
- package/dist/core/auto-promote.js +2 -2
- package/dist/core/caller-tool-name.d.ts +9 -0
- package/dist/core/caller-tool-name.js +13 -0
- package/dist/core/checkpoint-requirements.d.ts +7 -1
- package/dist/core/checkpoint-requirements.js +2 -0
- package/dist/core/checkpoint-store.d.ts +57 -24
- package/dist/core/checkpoint-store.js +3 -3
- package/dist/core/child-clamp-seats.d.ts +6 -0
- package/dist/core/child-clamp-seats.js +2 -1
- package/dist/core/compliance.js +3 -1
- package/dist/core/credential-vocabulary.d.ts +33 -8
- package/dist/core/credential-vocabulary.js +32 -7
- package/dist/core/decision-receipt.d.ts +2 -2
- package/dist/core/delegation-frames.d.ts +9 -2
- package/dist/core/delegation-name.d.ts +18 -0
- package/dist/core/delegation-name.js +47 -0
- package/dist/core/effective-path-target.d.ts +25 -6
- package/dist/core/effective-path-target.js +24 -2
- package/dist/core/engine-capabilities.d.ts +8 -1
- package/dist/core/engine-capabilities.js +1 -1
- package/dist/core/engine-notice.d.ts +49 -21
- package/dist/core/frontmatter-fence.d.ts +10 -0
- package/dist/core/frontmatter-fence.js +6 -0
- package/dist/core/gate-fold.js +8 -25
- package/dist/core/gate-lanes.js +358 -274
- package/dist/core/gate-outcome.d.ts +11 -6
- package/dist/core/governance-codes.d.ts +11 -4
- package/dist/core/governance-codes.js +12 -3
- package/dist/core/hands-band-screen.d.ts +7 -0
- package/dist/core/hands-band-screen.js +32 -0
- package/dist/core/hooks.d.ts +283 -739
- package/dist/core/hooks.js +100 -193
- package/dist/{tools/fs → core}/image-admission.d.ts +21 -3
- package/dist/{tools/fs → core}/image-admission.js +24 -6
- package/dist/core/locked-config.d.ts +84 -32
- package/dist/core/locked-config.js +128 -42
- package/dist/core/mcp-connection-pool.d.ts +4 -1
- package/dist/core/mcp-connection-pool.js +7 -2
- package/dist/core/mcp-probe.d.ts +12 -9
- package/dist/core/mcp-probe.js +3 -3
- package/dist/core/mcp-server-spec.d.ts +104 -10
- package/dist/core/mcp-server-spec.js +183 -33
- package/dist/core/mcp.d.ts +31 -20
- package/dist/core/mcp.js +66 -56
- package/dist/core/memory-engine/data-plane.js +5 -1
- package/dist/core/memory-engine/distiller.js +16 -2
- package/dist/core/memory-engine/engine.d.ts +22 -30
- package/dist/core/memory-engine/engine.js +16 -10
- package/dist/core/memory-engine/frontmatter.d.ts +6 -0
- package/dist/core/memory-engine/frontmatter.js +19 -16
- package/dist/core/memory.d.ts +2 -2
- package/dist/core/mode-policy.d.ts +5 -16
- package/dist/core/mode-policy.js +7 -19
- package/dist/core/model-seat.d.ts +4 -1
- package/dist/core/mods/dollar.d.ts +109 -0
- package/dist/core/mods/dollar.js +154 -0
- package/dist/core/mods/host.d.ts +23 -0
- package/dist/core/mods/host.js +21 -0
- package/dist/core/mods/kernel/budget.d.ts +43 -0
- package/dist/core/mods/kernel/budget.js +83 -0
- package/dist/core/mods/kernel/dispatch.d.ts +100 -0
- package/dist/core/mods/kernel/dispatch.js +699 -0
- package/dist/core/mods/kernel/events.d.ts +245 -0
- package/dist/core/mods/kernel/events.js +210 -0
- package/dist/core/mods/kernel/index.d.ts +6 -0
- package/dist/core/mods/kernel/index.js +5 -0
- package/dist/core/mods/kernel/receive.d.ts +94 -0
- package/dist/core/mods/kernel/receive.js +188 -0
- package/dist/core/mods/kernel/registration.d.ts +131 -0
- package/dist/core/mods/kernel/registration.js +102 -0
- package/dist/core/mods/kernel/site-rules.d.ts +149 -0
- package/dist/core/mods/kernel/site-rules.js +296 -0
- package/dist/core/mods/stations.d.ts +344 -0
- package/dist/core/mods/stations.js +437 -0
- package/dist/core/mounted-mcp.d.ts +57 -0
- package/dist/core/mounted-mcp.js +71 -2
- package/dist/core/own-property-receipt.d.ts +13 -0
- package/dist/core/own-property-receipt.js +13 -23
- package/dist/core/parent-spec-seat.d.ts +18 -7
- package/dist/core/parent-spec-seat.js +6 -2
- package/dist/core/path-identity.js +2 -1
- package/dist/core/permission-rule-model.d.ts +58 -9
- package/dist/core/permission-rule-model.js +81 -7
- package/dist/core/permission-rule-org.d.ts +163 -33
- package/dist/core/permission-rule-org.js +205 -71
- package/dist/core/permission-rule-syntax.d.ts +15 -0
- package/dist/core/permission-rule-syntax.js +24 -16
- package/dist/core/permission-rules.d.ts +14 -2
- package/dist/core/permission-rules.js +63 -23
- package/dist/core/prompt-section-seat.d.ts +15 -27
- package/dist/core/prompt-section-seat.js +73 -40
- package/dist/core/protocol-http-auth.d.ts +3 -1
- package/dist/core/protocol-http-auth.js +2 -0
- package/dist/core/reminder-mint.d.ts +2 -2
- package/dist/core/remote-env.d.ts +24 -12
- package/dist/core/remote-env.js +1 -0
- package/dist/core/resume-startup-cause.d.ts +16 -1
- package/dist/core/resume-startup-cause.js +4 -1
- package/dist/core/retention.js +7 -2
- package/dist/core/retired-keys.d.ts +12 -2
- package/dist/core/retired-keys.js +15 -1
- package/dist/core/roles.js +60 -10
- package/dist/core/rule-lane-reads.js +1 -1
- package/dist/core/runner/announce-once-ledger.d.ts +31 -1
- package/dist/core/runner/announce-once-ledger.js +22 -0
- package/dist/core/runner/assemble-result.d.ts +9 -0
- package/dist/core/runner/assemble-result.js +3 -1
- package/dist/core/runner/call-hook-stations.d.ts +23 -27
- package/dist/core/runner/call-hook-stations.js +58 -42
- package/dist/core/runner/caller-stop-gate.d.ts +25 -0
- package/dist/core/runner/caller-stop-gate.js +7 -0
- package/dist/core/runner/compaction-seams.d.ts +8 -22
- package/dist/core/runner/compaction-seams.js +28 -53
- package/dist/core/runner/construction-doors.js +11 -1
- package/dist/core/runner/contracts.d.ts +86 -83
- package/dist/core/runner/credential-origin-seat.d.ts +2 -0
- package/dist/core/runner/credential-origin-seat.js +19 -0
- package/dist/core/runner/extra-body-dropped-seat.d.ts +2 -6
- package/dist/core/runner/gate-exit.d.ts +47 -36
- package/dist/core/runner/gate-exit.js +12 -5
- package/dist/core/runner/image.js +1 -2
- package/dist/core/runner/inline-image.js +1 -1
- package/dist/core/runner/mcp-redial.d.ts +52 -10
- package/dist/core/runner/mcp-redial.js +38 -9
- package/dist/core/runner/notice-seat-input.d.ts +11 -0
- package/dist/core/runner/notice-seat-input.js +1 -0
- package/dist/core/runner/permission-rule-lanes.d.ts +5 -2
- package/dist/core/runner/permission-rule-lanes.js +22 -10
- package/dist/core/runner/person-path-rows.d.ts +3 -1
- package/dist/core/runner/person-path-rows.js +3 -2
- package/dist/core/runner/prepare-acquire-reconcile.js +5 -1
- package/dist/core/runner/prepare-ask-lane.d.ts +5 -7
- package/dist/core/runner/prepare-ask-lane.js +6 -15
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +4 -2
- package/dist/core/runner/prepare-caps-and-workflow.js +25 -8
- package/dist/core/runner/prepare-config-doors.d.ts +52 -1
- package/dist/core/runner/prepare-config-doors.js +168 -143
- package/dist/core/runner/prepare-defer-classify.js +7 -11
- package/dist/core/runner/prepare-delegation-surface.d.ts +2 -2
- package/dist/core/runner/prepare-delegation-surface.js +7 -5
- package/dist/core/runner/prepare-gate-stations.d.ts +8 -11
- package/dist/core/runner/prepare-gate-stations.js +11 -10
- package/dist/core/runner/prepare-hands-readface.d.ts +1 -1
- package/dist/core/runner/prepare-hands-readface.js +2 -1
- package/dist/core/runner/prepare-inherited-gate.d.ts +8 -12
- package/dist/core/runner/prepare-inherited-gate.js +10 -23
- package/dist/core/runner/prepare-listings.d.ts +1 -1
- package/dist/core/runner/prepare-listings.js +4 -2
- package/dist/core/runner/prepare-memory-engine-session.d.ts +0 -6
- package/dist/core/runner/prepare-memory-engine-session.js +20 -7
- package/dist/core/runner/prepare-memory.d.ts +3 -2
- package/dist/core/runner/prepare-memory.js +6 -2
- package/dist/core/runner/prepare-offload-wrappers.d.ts +4 -4
- package/dist/core/runner/prepare-offload-wrappers.js +2 -1
- package/dist/core/runner/prepare-park-ask.js +10 -14
- package/dist/core/runner/prepare-policy-chain.d.ts +17 -15
- package/dist/core/runner/prepare-policy-chain.js +104 -109
- package/dist/core/runner/prepare-project-context.d.ts +1 -1
- package/dist/core/runner/prepare-project-context.js +11 -12
- package/dist/core/runner/prepare-prompt-assembly.d.ts +45 -40
- package/dist/core/runner/prepare-prompt-assembly.js +138 -101
- package/dist/core/runner/prepare-prompt-inputs.d.ts +28 -23
- package/dist/core/runner/prepare-prompt-inputs.js +11 -10
- package/dist/core/runner/prepare-protocol-tools.d.ts +11 -7
- package/dist/core/runner/prepare-protocol-tools.js +20 -13
- package/dist/core/runner/prepare-question-face.d.ts +4 -2
- package/dist/core/runner/prepare-question-face.js +4 -3
- package/dist/core/runner/prepare-safety-scan.js +6 -10
- package/dist/core/runner/prepare-suspend-saga.d.ts +6 -0
- package/dist/core/runner/prepare-suspend-saga.js +7 -5
- package/dist/core/runner/prepare-task.js +41 -23
- package/dist/core/runner/prepare-turn-wiring.d.ts +13 -15
- package/dist/core/runner/prepare-turn-wiring.js +29 -27
- package/dist/core/runner/prepare-wiring-manifest.d.ts +13 -9
- package/dist/core/runner/prepare-wiring-manifest.js +14 -11
- package/dist/core/runner/resume-admission.d.ts +4 -1
- package/dist/core/runner/resume-admission.js +7 -5
- package/dist/core/runner/resume-apply.d.ts +5 -2
- package/dist/core/runner/resume-apply.js +24 -42
- package/dist/core/runner/resume-checkpoint-screen.d.ts +1 -0
- package/dist/core/runner/resume-checkpoint-screen.js +9 -1
- package/dist/core/runner/resume-internals-and-config.d.ts +3 -3
- package/dist/core/runner/resume-internals-and-config.js +3 -8
- package/dist/core/runner/resume-preflight.js +38 -16
- package/dist/core/runner/retired-runner-deps.d.ts +5 -6
- package/dist/core/runner/retired-runner-deps.js +4 -5
- package/dist/core/runner/run-brain-sinks.d.ts +3 -2
- package/dist/core/runner/run-brain-sinks.js +5 -1
- package/dist/core/runner/run-compaction-machinery.d.ts +7 -1
- package/dist/core/runner/run-compaction-machinery.js +7 -33
- package/dist/core/runner/run-harness-handlers.js +4 -2
- package/dist/core/runner/run-identity-wiring.d.ts +3 -1
- package/dist/core/runner/run-identity-wiring.js +3 -2
- package/dist/core/runner/run-leg.js +103 -95
- package/dist/core/runner/run-notification-lane.js +1 -0
- package/dist/core/runner/run-recovery-lanes.d.ts +3 -0
- package/dist/core/runner/run-recovery-lanes.js +14 -11
- package/dist/core/runner/run-settle-and-teardown.js +9 -28
- package/dist/core/runner/run-stop-and-final-verify.js +18 -25
- package/dist/core/runner/run-terminal-adoption.d.ts +3 -0
- package/dist/core/runner/run-terminal-adoption.js +34 -22
- package/dist/core/runner/run-tool-mount-facts.js +5 -3
- package/dist/core/runner/run-turn-boundary.js +32 -37
- package/dist/core/runner/runtask.d.ts +6 -7
- package/dist/core/runner/runtask.js +15 -73
- package/dist/core/runner/session-rule-policy.d.ts +5 -5
- package/dist/core/runner/session-rule-policy.js +13 -8
- package/dist/core/runner/side-call-account.d.ts +68 -0
- package/dist/core/runner/side-call-account.js +61 -0
- package/dist/core/runner/skills-seat.d.ts +15 -0
- package/dist/core/runner/skills-seat.js +57 -0
- package/dist/core/runner/stream-halt-verbs.js +12 -17
- package/dist/core/runner/stream-lifecycle-verbs.js +8 -5
- package/dist/core/runner/stream-steer-verb.d.ts +1 -1
- package/dist/core/runner/stream-steer-verb.js +20 -38
- package/dist/core/runner/sub-agent-deny-lists.d.ts +124 -23
- package/dist/core/runner/sub-agent-deny-lists.js +230 -71
- package/dist/core/runner/synthetic-tools.d.ts +5 -2
- package/dist/core/runner/synthetic-tools.js +2 -12
- package/dist/core/runner/tool-end-body.d.ts +5 -6
- package/dist/core/runner/tool-end-body.js +6 -4
- package/dist/core/runner/tool-not-executed.d.ts +15 -0
- package/dist/core/runner/tool-not-executed.js +30 -0
- package/dist/core/runner/tool-occurrence.d.ts +8 -7
- package/dist/core/runner/tool-occurrence.js +5 -5
- package/dist/core/runner/tool-result-media-seat.d.ts +1 -1
- package/dist/core/runner-deps.d.ts +43 -36
- package/dist/core/safety-merge-corpus.js +18 -2
- package/dist/core/secret-env.d.ts +88 -20
- package/dist/core/secret-env.js +192 -38
- package/dist/core/session-policy-store.d.ts +71 -16
- package/dist/core/session-policy-store.js +138 -28
- package/dist/core/session-reconcile.d.ts +4 -0
- package/dist/core/session-reconcile.js +2 -1
- package/dist/core/shell-read-silence.js +3 -32
- package/dist/core/side-query.d.ts +5 -3
- package/dist/core/skill-grant.d.ts +3 -2
- package/dist/core/skill-grant.js +17 -9
- package/dist/core/skills-directory.d.ts +31 -11
- package/dist/core/skills-directory.js +655 -104
- package/dist/core/store-contracts/mailbox-store-contract.js +13 -0
- package/dist/core/task-event.d.ts +49 -3
- package/dist/core/task-notification.js +2 -2
- package/dist/core/task-result.d.ts +8 -0
- package/dist/core/task-spec.d.ts +20 -19
- package/dist/core/task-stream.d.ts +14 -4
- package/dist/core/tighten-task-spec.d.ts +4 -3
- package/dist/core/tighten-task-spec.js +2 -4
- package/dist/core/tool-check-reading.d.ts +74 -0
- package/dist/core/tool-check-reading.js +80 -0
- package/dist/core/tool-policy.d.ts +62 -18
- package/dist/core/tool-policy.js +86 -15
- package/dist/core/tool-registry.d.ts +20 -0
- package/dist/core/tool-registry.js +4 -0
- package/dist/core/tool-spec.d.ts +10 -6
- package/dist/core/tools.js +2 -0
- package/dist/core/trace.d.ts +51 -32
- package/dist/core/types.d.ts +2 -2
- package/dist/core/types.js +1 -1
- package/dist/core/unc-spelling.d.ts +10 -0
- package/dist/core/unc-spelling.js +3 -0
- package/dist/core/untrusted-egress.d.ts +8 -0
- package/dist/core/untrusted-egress.js +4 -1
- package/dist/core/untrusted-text.d.ts +16 -0
- package/dist/core/untrusted-text.js +7 -2
- package/dist/core/user-attachment.d.ts +25 -4
- package/dist/core/user-attachment.js +63 -42
- package/dist/core/wiring-manifest.d.ts +18 -15
- package/dist/core/wiring-manifest.js +2 -2
- package/dist/engine/compaction/utils.js +1 -2
- package/dist/engine/execution-env/node-execution-env.d.ts +4 -3
- package/dist/engine/execution-env/symlink-chain.js +1 -1
- package/dist/engine/harness/agent-harness.d.ts +1 -1
- package/dist/engine/harness/agent-harness.js +5 -4
- package/dist/engine/harness/types.d.ts +20 -16
- package/dist/engine/harness/types.js +7 -1
- package/dist/engine/llm/types.d.ts +12 -7
- package/dist/engine/loop/agent-loop.d.ts +12 -1
- package/dist/engine/loop/agent-loop.js +18 -6
- package/dist/engine/loop/types.d.ts +8 -2
- package/dist/engine/lsp/node-lsp-manager.d.ts +2 -2
- package/dist/engine/session/import-validate.js +3 -10
- package/dist/engine/session/session.d.ts +4 -4
- package/dist/engine/session/session.js +4 -4
- package/dist/index.d.ts +33 -23
- package/dist/index.js +23 -15
- package/dist/internal/harness.d.ts +2 -1
- package/dist/internal/harness.js +2 -1
- package/dist/orchestration/goal.d.ts +24 -1
- package/dist/orchestration/goal.js +3 -2
- package/dist/orchestration/run-spec.d.ts +4 -6
- package/dist/orchestration/run-spec.js +39 -63
- package/dist/orchestration/run-workflow-tool.js +1 -2
- package/dist/orchestration/workflow.d.ts +11 -3
- package/dist/orchestration/workflow.js +11 -2
- package/dist/prompt-assembly/artifact-store.d.ts +72 -56
- package/dist/prompt-assembly/artifact-store.js +60 -52
- package/dist/prompt-assembly/artifact.d.ts +90 -76
- package/dist/prompt-assembly/artifact.js +197 -145
- package/dist/prompt-assembly/assemble.d.ts +36 -29
- package/dist/prompt-assembly/assemble.js +34 -220
- package/dist/prompt-assembly/bands.d.ts +20 -0
- package/dist/prompt-assembly/bands.js +18 -0
- package/dist/prompt-assembly/catalog/constitution.d.ts +23 -0
- package/dist/prompt-assembly/catalog/constitution.js +69 -0
- package/dist/prompt-assembly/catalog/core-behavior.d.ts +9 -0
- package/dist/prompt-assembly/catalog/core-behavior.js +85 -0
- package/dist/prompt-assembly/catalog/index.d.ts +11 -0
- package/dist/prompt-assembly/catalog/index.js +60 -0
- package/dist/prompt-assembly/catalog/memory.d.ts +13 -0
- package/dist/prompt-assembly/catalog/memory.js +6 -0
- package/dist/prompt-assembly/catalog/modes.d.ts +15 -0
- package/dist/prompt-assembly/catalog/modes.js +137 -0
- package/dist/prompt-assembly/catalog/role.d.ts +10 -0
- package/dist/prompt-assembly/catalog/role.js +157 -0
- package/dist/prompt-assembly/catalog/schema.d.ts +138 -0
- package/dist/prompt-assembly/catalog/schema.js +25 -0
- package/dist/prompt-assembly/catalog/sections.d.ts +9 -0
- package/dist/prompt-assembly/catalog/sections.js +98 -0
- package/dist/prompt-assembly/catalog/team.d.ts +4 -0
- package/dist/prompt-assembly/catalog/team.js +258 -0
- package/dist/prompt-assembly/composer.d.ts +26 -28
- package/dist/prompt-assembly/composer.js +124 -46
- package/dist/prompt-assembly/epoch.d.ts +89 -79
- package/dist/prompt-assembly/epoch.js +115 -142
- package/dist/prompt-assembly/explain.d.ts +58 -34
- package/dist/prompt-assembly/explain.js +21 -24
- package/dist/prompt-assembly/overlay.d.ts +137 -0
- package/dist/prompt-assembly/overlay.js +339 -0
- package/dist/prompt-assembly/renderers.d.ts +21 -0
- package/dist/prompt-assembly/renderers.js +39 -0
- package/dist/prompt-assembly/section-usage.d.ts +3 -3
- package/dist/prompt-assembly/section-usage.js +1 -1
- package/dist/prompt-assembly/select.d.ts +71 -0
- package/dist/prompt-assembly/select.js +106 -0
- package/dist/prompt-assembly/sugar.d.ts +31 -0
- package/dist/prompt-assembly/sugar.js +20 -0
- package/dist/prompt-assembly/turn-snapshot.d.ts +3 -2
- package/dist/prompt-assembly/types.d.ts +45 -148
- package/dist/prompts/coordinator.d.ts +2 -21
- package/dist/prompts/coordinator.js +3 -255
- package/dist/prompts/cowork.d.ts +27 -16
- package/dist/prompts/cowork.js +2 -23
- package/dist/prompts/default.d.ts +38 -511
- package/dist/prompts/default.js +20 -288
- package/dist/prompts/supervisor.d.ts +6 -71
- package/dist/prompts/supervisor.js +6 -117
- package/dist/stores/file/permission-rule-store.d.ts +1 -1
- package/dist/stores/file/permission-rule-store.js +2 -1
- package/dist/tools/artifact/artifact-tool.js +4 -3
- package/dist/tools/fs/bash-readonly-classifier.d.ts +6 -5
- package/dist/tools/fs/dir-entries.d.ts +4 -2
- package/dist/tools/fs/dir-entries.js +16 -4
- package/dist/tools/fs/fs-bash.d.ts +1 -1
- package/dist/tools/fs/fs-bash.js +22 -11
- package/dist/tools/fs/fs-pdf.js +17 -13
- package/dist/tools/fs/fs-read.js +4 -3
- package/dist/tools/fs/fs-shared.d.ts +1 -10
- package/dist/tools/fs/fs-shared.js +3 -4
- package/dist/tools/fs/fs-write.js +2 -1
- package/dist/tools/fs/notebook.js +1 -1
- package/dist/tools/fs/pdf.d.ts +20 -10
- package/dist/tools/fs/pdf.js +19 -10
- package/dist/tools/fs/program-read-model.d.ts +68 -8
- package/dist/tools/fs/program-read-model.js +112 -33
- package/dist/tools/fs/program-read-model.rows.js +30 -10
- package/dist/tools/fs/read-deny-home.d.ts +25 -9
- package/dist/tools/fs/read-deny-home.js +28 -27
- package/dist/tools/fs/read-deny.d.ts +41 -11
- package/dist/tools/fs/read-deny.js +51 -5
- package/dist/tools/fs/safety.d.ts +4 -26
- package/dist/tools/fs/safety.js +10 -32
- package/dist/tools/fs/search.js +15 -10
- package/dist/tools/fs/shell-read-argv.d.ts +3 -2
- package/dist/tools/fs/shell-read-argv.js +118 -38
- package/dist/tools/fs/shell-read-establish.d.ts +5 -5
- package/dist/tools/fs/shell-read-establish.js +11 -61
- package/dist/tools/fs/shell-read-identity.js +6 -3
- package/dist/tools/fs/shell-read-judge.d.ts +13 -15
- package/dist/tools/fs/shell-read-judge.js +18 -4
- package/dist/tools/fs/shell-read-plan.d.ts +2 -2
- package/dist/tools/web.js +1 -1
- package/package.json +13 -1
- package/test/export-surface.snapshot.json +306 -103
- package/wire-changes/core@7.52.0.json +5859 -0
- package/wire-changes/core@7.53.0.json +1946 -0
- package/dist/core/hook-seats.d.ts +0 -66
- package/dist/core/hook-seats.js +0 -37
- package/dist/prompt-assembly/packs/sema-default.d.ts +0 -2
- package/dist/prompt-assembly/packs/sema-default.js +0 -147
- package/dist/prompts/simple-sections.d.ts +0 -58
- package/dist/prompts/simple-sections.js +0 -43
|
@@ -1,67 +1,145 @@
|
|
|
1
|
+
import { catalogMessage } from "./catalog/index.js";
|
|
2
|
+
import { foldOverlays } from "./overlay.js";
|
|
3
|
+
import { RENDERERS, runRenderer } from "./renderers.js";
|
|
4
|
+
import { factsHold, selectVariant, selectorsOf, whenHolds } from "./select.js";
|
|
1
5
|
function joinParts(parts) {
|
|
2
6
|
return parts.filter((p) => Boolean(p && p.trim())).join("\n\n");
|
|
3
7
|
}
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
function basesOf(catalog, inputs, s) {
|
|
9
|
+
const bases = new Map();
|
|
10
|
+
for (const section of catalog.sections) {
|
|
11
|
+
if (!factsHold(section.admit, s.facts))
|
|
12
|
+
continue;
|
|
13
|
+
if ("renderer" in section.body) {
|
|
14
|
+
const out = runRenderer(section.body.renderer, inputs, s);
|
|
15
|
+
if (out !== undefined && out.text.trim())
|
|
16
|
+
bases.set(section.id, { kind: "renderer", text: out.text, ...(out.variant !== undefined ? { variant: out.variant } : {}) });
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const lines = "message" in section.body ? [{ message: section.body.message }] : section.body.lines;
|
|
20
|
+
const picked = [];
|
|
21
|
+
for (const line of lines) {
|
|
22
|
+
if ("admit" in line && !factsHold(line.admit, s.facts))
|
|
23
|
+
continue;
|
|
24
|
+
const v = selectVariant(catalogMessage(line.message, catalog), s);
|
|
25
|
+
if (v !== undefined)
|
|
26
|
+
picked.push({ message: line.message, text: v.text, variant: v.id });
|
|
18
27
|
}
|
|
28
|
+
bases.set(section.id, { kind: "lines", lines: picked });
|
|
19
29
|
}
|
|
30
|
+
return bases;
|
|
20
31
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
function selectedTextOf(catalog, bases) {
|
|
33
|
+
const sectionOf = new Map();
|
|
34
|
+
for (const sec of catalog.sections) {
|
|
35
|
+
const ids = "message" in sec.body ? [sec.body.message] : "lines" in sec.body ? sec.body.lines.map((l) => l.message) : (RENDERERS[sec.body.renderer].messages ?? []);
|
|
36
|
+
for (const id of ids)
|
|
37
|
+
sectionOf.set(id, sec);
|
|
38
|
+
}
|
|
39
|
+
return (messageId) => {
|
|
40
|
+
const sec = sectionOf.get(messageId);
|
|
41
|
+
const base = sec === undefined ? undefined : bases.get(sec.id);
|
|
42
|
+
if (base === undefined)
|
|
43
|
+
return undefined;
|
|
44
|
+
if (base.kind === "renderer")
|
|
45
|
+
return base.text;
|
|
46
|
+
return base.lines.find((l) => l.message === messageId)?.text;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function renderSection(section, base, fold) {
|
|
50
|
+
let text;
|
|
51
|
+
let variant;
|
|
52
|
+
if (base.kind === "renderer") {
|
|
53
|
+
const m = "renderer" in section.body ? RENDERERS[section.body.renderer].messages?.[0] : undefined;
|
|
54
|
+
const over = m !== undefined ? fold.messageText.get(m) : undefined;
|
|
55
|
+
text = over?.text ?? base.text;
|
|
56
|
+
variant = base.variant;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
const parts = base.lines.map((l) => fold.messageText.get(l.message)?.text ?? l.text);
|
|
60
|
+
if (parts.length === 0)
|
|
61
|
+
return undefined;
|
|
62
|
+
const joiner = "message" in section.body ? "" : "lines" in section.body ? section.body.joiner : "";
|
|
63
|
+
text = parts.join(joiner);
|
|
64
|
+
variant = base.lines.map((l) => l.variant).join("+");
|
|
65
|
+
}
|
|
66
|
+
if (!text.trim())
|
|
26
67
|
return undefined;
|
|
27
68
|
return {
|
|
28
|
-
id:
|
|
29
|
-
|
|
30
|
-
rank:
|
|
31
|
-
|
|
32
|
-
trust: s.trust,
|
|
33
|
-
mutability: s.mutability,
|
|
34
|
-
cadence: s.cadence,
|
|
35
|
-
cacheClass: s.cacheClass,
|
|
36
|
-
carrier: s.carrier,
|
|
69
|
+
id: section.id,
|
|
70
|
+
band: section.band,
|
|
71
|
+
rank: section.rank,
|
|
72
|
+
...(variant !== undefined ? { variant } : {}),
|
|
37
73
|
text,
|
|
38
|
-
blockId:
|
|
39
|
-
blockJoiner:
|
|
40
|
-
|
|
41
|
-
...(
|
|
74
|
+
blockId: section.block.id,
|
|
75
|
+
blockJoiner: section.block.joiner ?? "\n\n",
|
|
76
|
+
chain: [{ source: "bundled" }, ...(fold.chains.get(section.id) ?? [])],
|
|
77
|
+
...("renderer" in section.body ? { renderer: { id: section.body.renderer, version: RENDERERS[section.body.renderer].version } } : {}),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function renderAdded(e, fold) {
|
|
81
|
+
if (!e.text.trim())
|
|
82
|
+
return undefined;
|
|
83
|
+
return {
|
|
84
|
+
id: e.id,
|
|
85
|
+
band: e.band,
|
|
86
|
+
rank: e.rank,
|
|
87
|
+
text: e.text,
|
|
88
|
+
blockId: e.id.startsWith("core/") ? e.id.slice("core/".length) : e.id,
|
|
89
|
+
blockJoiner: "\n\n",
|
|
90
|
+
chain: fold.chains.get(e.id) ?? [],
|
|
42
91
|
};
|
|
43
92
|
}
|
|
44
|
-
export function
|
|
45
|
-
|
|
46
|
-
const
|
|
93
|
+
export function composeCatalog(plan, inputs) {
|
|
94
|
+
const s = selectorsOf(inputs.facts, plan.host, plan.binding);
|
|
95
|
+
const bases = basesOf(plan.catalog, inputs, s);
|
|
96
|
+
const selectedText = selectedTextOf(plan.catalog, bases);
|
|
97
|
+
const overlayText = (o) => {
|
|
98
|
+
if (o.text !== undefined)
|
|
99
|
+
return o.text;
|
|
100
|
+
if (o.message === undefined)
|
|
101
|
+
return undefined;
|
|
102
|
+
return selectVariant(catalogMessage(o.message, plan.catalog), s)?.text;
|
|
103
|
+
};
|
|
104
|
+
const fold = foldOverlays(plan.overlays ?? [], selectedText, (o) => whenHolds(o.when, s), overlayText);
|
|
105
|
+
const rows = [];
|
|
106
|
+
for (const section of plan.catalog.sections) {
|
|
107
|
+
if (fold.dropped.has(section.id))
|
|
108
|
+
continue;
|
|
109
|
+
const base = bases.get(section.id);
|
|
110
|
+
if (base === undefined)
|
|
111
|
+
continue;
|
|
112
|
+
rows.push({ rank: section.rank, id: section.id, render: () => renderSection(section, base, fold) });
|
|
113
|
+
}
|
|
114
|
+
for (const e of fold.added)
|
|
115
|
+
rows.push({ rank: e.rank, id: e.id, render: () => renderAdded(e, fold) });
|
|
116
|
+
rows.sort((a, b) => a.rank - b.rank);
|
|
117
|
+
const ranks = new Set();
|
|
118
|
+
const ids = new Set();
|
|
119
|
+
for (const r of rows) {
|
|
120
|
+
if (ids.has(r.id))
|
|
121
|
+
throw new Error(`prompt composition: duplicate section id "${r.id}"`);
|
|
122
|
+
if (ranks.has(r.rank))
|
|
123
|
+
throw new Error(`prompt composition: duplicate rank ${r.rank} ("${r.id}")`);
|
|
124
|
+
ids.add(r.id);
|
|
125
|
+
ranks.add(r.rank);
|
|
126
|
+
}
|
|
47
127
|
const sections = [];
|
|
48
|
-
for (const
|
|
49
|
-
const compiled =
|
|
128
|
+
for (const r of rows) {
|
|
129
|
+
const compiled = r.render();
|
|
50
130
|
if (compiled)
|
|
51
131
|
sections.push(compiled);
|
|
52
132
|
}
|
|
53
|
-
const text = joinParts(sections.map((
|
|
133
|
+
const text = joinParts(sections.map((x) => x.text));
|
|
54
134
|
const blocks = [];
|
|
55
|
-
for (const
|
|
135
|
+
for (const x of sections) {
|
|
56
136
|
const last = blocks[blocks.length - 1];
|
|
57
|
-
if (last && last.id ===
|
|
58
|
-
last.text = `${last.text}${
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
blocks.push({ id: s.blockId, text: s.text });
|
|
62
|
-
}
|
|
137
|
+
if (last && last.id === x.blockId)
|
|
138
|
+
last.text = `${last.text}${x.blockJoiner}${x.text}`;
|
|
139
|
+
else
|
|
140
|
+
blocks.push({ id: x.blockId, text: x.text });
|
|
63
141
|
}
|
|
64
|
-
return { text, sections, blocks };
|
|
142
|
+
return { text, sections, blocks, superseded: fold.superseded };
|
|
65
143
|
}
|
|
66
144
|
export const SINGLE_BLOCK_LAYOUT = { groups: [{ groupId: "body", untilRank: Number.POSITIVE_INFINITY, cacheControlBoundary: true }] };
|
|
67
145
|
export function layoutSystemBlocks(composed, layout = SINGLE_BLOCK_LAYOUT) {
|
|
@@ -1,85 +1,95 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import type { PromptCatalog } from "./catalog/schema.js";
|
|
2
|
+
/** Deterministic canonical JSON (sorted keys) — the one identity encoding (the catalog digest, the identity, the
|
|
3
|
+
* center artifact digest). */
|
|
4
|
+
export declare function canonical(node: unknown): string;
|
|
5
|
+
/** `sha256:<hex>` over a canonical encoding. */
|
|
6
|
+
export declare function digestOf(node: unknown): string;
|
|
7
|
+
/** The bundled catalog's digest. Array positions that carry no meaning are normalized (sections by rank, messages and
|
|
8
|
+
* bands by id), so the digest does not depend on how a module lays out its arrays; variant order is meaning (first
|
|
9
|
+
* match wins) and stays. */
|
|
10
|
+
export declare function catalogDigestOf(catalog: PromptCatalog): string;
|
|
11
|
+
/** The inputs of a run's prompt identity. Only `center` is pinned (resolved by digest on resume); the rest are what
|
|
12
|
+
* the run computed, kept so a later run can say what changed. Absent `center` / `deploy` / `task` = that layer
|
|
13
|
+
* contributed nothing. */
|
|
14
|
+
export interface PromptIdentityLayers {
|
|
15
|
+
readonly catalog: string;
|
|
16
|
+
readonly renderers: Readonly<Record<string, number>>;
|
|
17
|
+
/** The adopted center artifact's digest. */
|
|
18
|
+
readonly center?: string;
|
|
19
|
+
readonly deploy?: string;
|
|
20
|
+
readonly task?: string;
|
|
21
|
+
/** H(the run's selector values). */
|
|
22
|
+
readonly binding: string;
|
|
23
|
+
}
|
|
24
|
+
/** A run's prompt identity inputs plus its pinned center layer's provenance — what the epoch record carries. */
|
|
25
|
+
export interface RunPromptIdentity {
|
|
26
|
+
readonly layers: PromptIdentityLayers;
|
|
27
|
+
readonly sourceRevision?: string;
|
|
28
|
+
}
|
|
29
|
+
/** The one identity digest over the four inputs. */
|
|
30
|
+
export declare function promptIdentityOf(layers: PromptIdentityLayers): string;
|
|
31
|
+
/** How a recorded epoch came to be: a legal boundary (`session_start`, `compaction`), or a record that code or
|
|
32
|
+
* inputs moved (`code_change`, naming the changed layers when they are known) or that only the selector values
|
|
33
|
+
* did (`selection_change`). */
|
|
34
|
+
export declare const PROMPT_EPOCH_ACTIVATIONS: readonly ["session_start", "compaction", "code_change", "selection_change"];
|
|
35
|
+
export type PromptEpochActivation = (typeof PROMPT_EPOCH_ACTIVATIONS)[number];
|
|
36
|
+
/** What a `code_change` record names as changed. `published_schema` is the one replacement of a retired-shape center
|
|
37
|
+
* pin by the current center layer. */
|
|
38
|
+
export declare const PROMPT_EPOCH_CHANGES: readonly ["catalog", "renderers", "deploy", "task", "published_schema"];
|
|
39
|
+
export type PromptEpochChange = (typeof PROMPT_EPOCH_CHANGES)[number];
|
|
40
|
+
/** The durable record, persisted as a first-class session entry and restated in every compaction entry's
|
|
41
|
+
* `details.promptEpoch`. */
|
|
24
42
|
export interface PromptEpochDescriptor {
|
|
25
|
-
/** Monotonic per-session
|
|
26
|
-
epoch: number;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
activatedBy: PromptEpochActivation;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* never a silent hybrid recompose (protocol §9.2). */
|
|
36
|
-
centerArtifactDigest?: string;
|
|
37
|
-
/** Opaque publish provenance of the adopted envelope (audit only — never enters any digest). */
|
|
38
|
-
sourceRevision?: string;
|
|
43
|
+
/** Monotonic per-session record counter. */
|
|
44
|
+
readonly epoch: number;
|
|
45
|
+
/** The run's prompt identity ({@link promptIdentityOf}). */
|
|
46
|
+
readonly identity: string;
|
|
47
|
+
readonly layers: PromptIdentityLayers;
|
|
48
|
+
readonly activatedBy: PromptEpochActivation;
|
|
49
|
+
/** Present only on `code_change` records whose changed layers are known. */
|
|
50
|
+
readonly changed?: readonly PromptEpochChange[];
|
|
51
|
+
/** Opaque publish provenance of the pinned center layer (present only with `layers.center`; never digested). */
|
|
52
|
+
readonly sourceRevision?: string;
|
|
39
53
|
}
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* Bundled-pack artifact digest: canonical hash over the pack's structural declaration PLUS each
|
|
45
|
-
* section's probe-rendered content under the probe-fact vectors — all-off, all-on, and one
|
|
46
|
-
* single-axis-flipped vector per axis (content- and admission-binding, incl. single-gate mixed
|
|
47
|
-
* states). TOTALITY over the axes the pack forks on is the load-bearing property (see
|
|
48
|
-
* PROBE_FACTS_OFF/PROBE_FACTS_ON); it is pinned behaviourally by
|
|
49
|
-
* test/hardening-prompt-assembly.test.ts. Deterministic across processes and object insertion order;
|
|
50
|
-
* changes to any section's prose, admission behavior, or structure change the digest. Build version
|
|
51
|
-
* deliberately EXCLUDED (F3): a release that doesn't touch the pack keeps the same identity.
|
|
52
|
-
*/
|
|
53
|
-
export declare function computeBundledArtifactDigest(pack: PromptPack, declared?: EpochDeclaredSections): string;
|
|
54
|
-
/** Mint the descriptor for a NEW session on the current bundled artifact.
|
|
55
|
-
* Subagent/fork note (RB-16 ruling, 2026-07-17): children mint their OWN session_start pin rather
|
|
56
|
-
* than inheriting the parent's descriptor — under v1 bundled-only resolution both produce the
|
|
57
|
-
* identical pin (same process, same pack, same digest), so the protocol's "explicit inheritance
|
|
58
|
-
* via RunInternals" is deferred to the multi-artifact era, where a parent pinned to a non-latest
|
|
59
|
-
* artifact genuinely diverges from a fresh mint (lands with the center candidate machinery). */
|
|
60
|
-
export declare function mintSessionStartEpoch(pack: PromptPack, declared?: EpochDeclaredSections): PromptEpochDescriptor;
|
|
61
|
-
/** Epoch selection at a compaction boundary (protocol §9.3 order steps 1-4, v1 bundled form):
|
|
62
|
-
* the "latest validated candidate" IS the current bundled artifact. Same digest ⇒ restate the
|
|
63
|
-
* current epoch (no advance); different digest (engine upgraded mid-session) ⇒ advance. */
|
|
64
|
-
export declare function selectCompactionEpoch(current: PromptEpochDescriptor | undefined, pack: PromptPack, declared?: EpochDeclaredSections,
|
|
65
|
-
/** RB-31 (design/148 S2) — a compaction-boundary CENTER ADOPTION: the new candidate's provenance
|
|
66
|
-
* rides the advanced descriptor (the caller pre-assembled with the candidate's declarations, so
|
|
67
|
-
* `declared` already reflects the new closure — the digest moves, the epoch advances). */
|
|
68
|
-
centerAdoption?: {
|
|
69
|
-
centerArtifactDigest: string;
|
|
70
|
-
sourceRevision?: string;
|
|
54
|
+
/** What a stored epoch record reads as on the resume path: a v3 pin, or a retired shape recognized by name. */
|
|
55
|
+
export type StoredPromptEpoch = {
|
|
56
|
+
readonly kind: "pin";
|
|
57
|
+
readonly descriptor: PromptEpochDescriptor;
|
|
71
58
|
} | {
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
readonly kind: "legacy";
|
|
60
|
+
readonly centerPinned: boolean;
|
|
61
|
+
};
|
|
74
62
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
63
|
+
* Shape-normalize an untrusted v3 descriptor — the current shape's one judge (the first reading of
|
|
64
|
+
* {@link readStoredPromptEpoch}; a session backend judges a record with it). Strict: a bounded positive epoch, a full
|
|
65
|
+
* digest identity that MATCHES its layers, the closed activation and change vocabularies, provenance only beside a
|
|
66
|
+
* center layer. Members it does not read (a session entry's own `type` / `id` / `parentId` / `timestamp`) are ignored.
|
|
67
|
+
* Undefined for anything else — including every retired shape.
|
|
78
68
|
*/
|
|
79
|
-
export declare function resolveEpochAgainstBundled(pinned: PromptEpochDescriptor | undefined, pack: PromptPack, declared?: EpochDeclaredSections): {
|
|
80
|
-
descriptor: PromptEpochDescriptor;
|
|
81
|
-
migrated: boolean;
|
|
82
|
-
};
|
|
83
|
-
/** Shape-normalize an untrusted candidate (session import face — RB-7: import-validate is a
|
|
84
|
-
* consumer). Returns undefined for anything that isn't a plausible descriptor. */
|
|
85
69
|
export declare function normalizePromptEpoch(raw: unknown): PromptEpochDescriptor | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The resume path's reading of one stored record: a valid v3 pin, `legacy` (a retired shape, recognized by its field
|
|
72
|
+
* names — nothing in it is parsed but whether `centerArtifactDigest` is a digest, the only value the retired reader
|
|
73
|
+
* took for a pin), or undefined (malformed: the walk skips it).
|
|
74
|
+
*/
|
|
75
|
+
export declare function readStoredPromptEpoch(raw: unknown): StoredPromptEpoch | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The record a run leaves at prepare, or undefined when the stored pin already names this run's identity.
|
|
78
|
+
* - no record: `session_start` for a session with no prior conversation; otherwise `code_change` (a session that
|
|
79
|
+
* predates epochs — what changed is unknown);
|
|
80
|
+
* - a v3 pin: the same identity ⇒ nothing; else `code_change` naming the changed code / input layers, or
|
|
81
|
+
* `selection_change` when only the selector values moved;
|
|
82
|
+
* - `legacy`: `code_change` — naming `published_schema` when the retired record pinned a center artifact (the caller
|
|
83
|
+
* applied the center source's tri-state to it), otherwise unknown. The retired record's counter is not read; the
|
|
84
|
+
* v3 line starts at 1.
|
|
85
|
+
*/
|
|
86
|
+
export declare function prepareEpochRecord(stored: StoredPromptEpoch | undefined, layers: PromptIdentityLayers, ctx: {
|
|
87
|
+
readonly priorConversation: boolean;
|
|
88
|
+
readonly sourceRevision?: string;
|
|
89
|
+
}): PromptEpochDescriptor | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* The record a compaction restates or advances: the current pin restated when the run's identity is unchanged (the
|
|
92
|
+
* boundary is stamped), otherwise a new record with the run's layers after the boundary — an adopted center
|
|
93
|
+
* candidate, or an emptied center layer after an explicit revocation.
|
|
94
|
+
*/
|
|
95
|
+
export declare function selectCompactionEpoch(current: PromptEpochDescriptor | undefined, layers: PromptIdentityLayers, sourceRevision?: string): PromptEpochDescriptor;
|