@sema-agent/core 7.63.0 → 7.65.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.
Files changed (239) hide show
  1. package/CHANGELOG.md +725 -0
  2. package/dist/agents/cc-peer-directory.js +1 -0
  3. package/dist/agents/cc-peer-wire.d.ts +4 -0
  4. package/dist/agents/cc-peer-wire.js +1 -0
  5. package/dist/agents/cc-uds-peer-channel.js +5 -0
  6. package/dist/agents/cross-session-judge.d.ts +3 -1
  7. package/dist/agents/cross-session-judge.js +4 -1
  8. package/dist/agents/peer-directory.d.ts +8 -0
  9. package/dist/agents/peer-directory.js +4 -0
  10. package/dist/agents/peer-held-queue.d.ts +9 -3
  11. package/dist/agents/peer-held-queue.js +12 -9
  12. package/dist/agents/peer-idle.d.ts +20 -1
  13. package/dist/agents/peer-idle.js +23 -12
  14. package/dist/agents/peer-notice-route.d.ts +16 -5
  15. package/dist/agents/peer-notice-route.js +11 -9
  16. package/dist/agents/peer-notices.d.ts +25 -8
  17. package/dist/agents/peer-notices.js +6 -1
  18. package/dist/agents/peer-session-drain.d.ts +32 -6
  19. package/dist/agents/peer-session-drain.js +100 -26
  20. package/dist/agents/send-message-tool.d.ts +7 -0
  21. package/dist/agents/send-message-tool.js +18 -6
  22. package/dist/agents/subagent.js +25 -5
  23. package/dist/core/allow-entry.d.ts +4 -0
  24. package/dist/core/ask-origin.d.ts +1 -1
  25. package/dist/core/ask-origin.js +2 -2
  26. package/dist/core/ask-unresolvable-notice.d.ts +13 -4
  27. package/dist/core/ask-unresolvable-notice.js +10 -3
  28. package/dist/core/auto-compaction.d.ts +7 -5
  29. package/dist/core/auto-promote.d.ts +3 -2
  30. package/dist/core/background-agent-store.d.ts +14 -0
  31. package/dist/core/background-agent-store.js +3 -0
  32. package/dist/core/checkpoint-queries.d.ts +9 -6
  33. package/dist/core/checkpoint-queries.js +8 -3
  34. package/dist/core/checkpoint-store.d.ts +7 -4
  35. package/dist/core/context-settings.d.ts +39 -9
  36. package/dist/core/context-settings.js +32 -10
  37. package/dist/core/engine-attestation.d.ts +26 -6
  38. package/dist/core/engine-attestation.js +5 -1
  39. package/dist/core/engine-notice.d.ts +37 -2
  40. package/dist/core/engine-notice.js +3 -1
  41. package/dist/core/extension-requester.d.ts +9 -0
  42. package/dist/core/extension-requester.js +7 -0
  43. package/dist/core/file-history-store.d.ts +30 -2
  44. package/dist/core/file-history-store.js +48 -9
  45. package/dist/core/fs-write-gate-policy.js +1 -1
  46. package/dist/core/gate-fold.js +5 -1
  47. package/dist/core/gate-lanes.js +2 -0
  48. package/dist/core/gate-outcome.d.ts +39 -2
  49. package/dist/core/gate-outcome.js +20 -1
  50. package/dist/core/governance-codes.d.ts +8 -4
  51. package/dist/core/governance-codes.js +8 -3
  52. package/dist/core/leg-identity.d.ts +35 -1
  53. package/dist/core/leg-identity.js +10 -0
  54. package/dist/core/mailbox-store.d.ts +39 -4
  55. package/dist/core/mailbox-store.js +14 -2
  56. package/dist/core/memory-engine/consolidation.d.ts +13 -6
  57. package/dist/core/memory-engine/consolidation.js +26 -0
  58. package/dist/core/memory-engine/control-objects.d.ts +58 -0
  59. package/dist/core/memory-engine/control-objects.js +273 -0
  60. package/dist/core/memory-engine/control-plane-adoption.d.ts +51 -0
  61. package/dist/core/memory-engine/control-plane-adoption.js +161 -0
  62. package/dist/core/memory-engine/delegation-settlement.d.ts +73 -40
  63. package/dist/core/memory-engine/delegation-settlement.js +271 -107
  64. package/dist/core/memory-engine/dual-root.d.ts +3 -2
  65. package/dist/core/memory-engine/dual-root.js +7 -3
  66. package/dist/core/memory-engine/engine.d.ts +54 -33
  67. package/dist/core/memory-engine/engine.js +150 -157
  68. package/dist/core/memory-engine/file-backend.d.ts +58 -76
  69. package/dist/core/memory-engine/file-backend.js +111 -268
  70. package/dist/core/memory-engine/index.d.ts +3 -2
  71. package/dist/core/memory-engine/index.js +2 -1
  72. package/dist/core/memory-engine/layout.d.ts +135 -50
  73. package/dist/core/memory-engine/layout.js +214 -89
  74. package/dist/core/memory-engine/memory-age.d.ts +12 -0
  75. package/dist/core/memory-engine/memory-age.js +17 -0
  76. package/dist/core/memory-engine/memory-backend-contract.d.ts +10 -3
  77. package/dist/core/memory-engine/memory-backend-contract.js +159 -2
  78. package/dist/core/memory-engine/memory-deployment.d.ts +12 -4
  79. package/dist/core/memory-engine/memory-deployment.js +31 -6
  80. package/dist/core/memory-engine/origin-clearance.d.ts +12 -3
  81. package/dist/core/memory-engine/origin-clearance.js +64 -9
  82. package/dist/core/memory-engine/session-write-home.d.ts +34 -1
  83. package/dist/core/memory-engine/session-write-home.js +37 -10
  84. package/dist/core/memory-engine/tools.d.ts +2 -2
  85. package/dist/core/memory-engine/tools.js +7 -7
  86. package/dist/core/memory-engine/types.d.ts +55 -12
  87. package/dist/core/memory-engine/types.js +2 -1
  88. package/dist/core/memory-vector.d.ts +6 -14
  89. package/dist/core/memory.d.ts +0 -462
  90. package/dist/core/memory.js +0 -333
  91. package/dist/core/mode-policy.js +3 -3
  92. package/dist/core/mods/agent-stations.d.ts +18 -0
  93. package/dist/core/mods/agent-stations.js +8 -6
  94. package/dist/core/mods/extension-call.d.ts +4 -0
  95. package/dist/core/mods/extension-call.js +8 -0
  96. package/dist/core/mods/tool-call.js +3 -4
  97. package/dist/core/parent-spec-seat.d.ts +2 -2
  98. package/dist/core/peer-channel.d.ts +5 -0
  99. package/dist/core/permission-rule-consent.d.ts +64 -22
  100. package/dist/core/permission-rule-consent.js +106 -58
  101. package/dist/core/permission-rule-store.d.ts +56 -21
  102. package/dist/core/permission-rule-store.js +2 -0
  103. package/dist/core/refusal-echo.d.ts +20 -0
  104. package/dist/core/refusal-echo.js +33 -0
  105. package/dist/core/retention.d.ts +175 -10
  106. package/dist/core/retention.js +44 -0
  107. package/dist/core/retired-keys.d.ts +5 -0
  108. package/dist/core/retired-keys.js +3 -0
  109. package/dist/core/rule-offer-read.d.ts +0 -4
  110. package/dist/core/rule-offer-read.js +2 -18
  111. package/dist/core/runner/classifier-ladder.d.ts +10 -2
  112. package/dist/core/runner/classifier-ladder.js +4 -2
  113. package/dist/core/runner/compact-session.js +10 -7
  114. package/dist/core/runner/compaction-call-options.d.ts +7 -7
  115. package/dist/core/runner/compaction-call-options.js +3 -2
  116. package/dist/core/runner/contracts.d.ts +28 -9
  117. package/dist/core/runner/delegation-owner.d.ts +2 -3
  118. package/dist/core/runner/delegation-owner.js +2 -1
  119. package/dist/core/runner/gate-exit.d.ts +6 -0
  120. package/dist/core/runner/gate-exit.js +11 -2
  121. package/dist/core/runner/memory-consolidation-driver.d.ts +4 -2
  122. package/dist/core/runner/memory-consolidation-driver.js +8 -5
  123. package/dist/core/runner/prepare-ask-lane.js +3 -3
  124. package/dist/core/runner/prepare-caps-and-workflow.d.ts +3 -1
  125. package/dist/core/runner/prepare-caps-and-workflow.js +2 -2
  126. package/dist/core/runner/prepare-config-doors.js +4 -0
  127. package/dist/core/runner/prepare-delegation-surface.d.ts +3 -0
  128. package/dist/core/runner/prepare-delegation-surface.js +2 -2
  129. package/dist/core/runner/prepare-gate-stations.d.ts +8 -0
  130. package/dist/core/runner/prepare-gate-stations.js +15 -7
  131. package/dist/core/runner/prepare-hands-readface.js +1 -1
  132. package/dist/core/runner/prepare-inherited-gate.d.ts +3 -1
  133. package/dist/core/runner/prepare-inherited-gate.js +4 -2
  134. package/dist/core/runner/prepare-memory-engine-session.js +1 -1
  135. package/dist/core/runner/prepare-memory.d.ts +4 -0
  136. package/dist/core/runner/prepare-memory.js +22 -28
  137. package/dist/core/runner/prepare-policy-chain.js +18 -10
  138. package/dist/core/runner/prepare-prompt-inputs.js +1 -1
  139. package/dist/core/runner/prepare-task.d.ts +5 -1
  140. package/dist/core/runner/prepare-task.js +16 -11
  141. package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -1
  142. package/dist/core/runner/prepare-wiring-manifest.js +3 -2
  143. package/dist/core/runner/resume-admission.d.ts +2 -2
  144. package/dist/core/runner/resume-admission.js +2 -23
  145. package/dist/core/runner/role-resolution-table.d.ts +98 -0
  146. package/dist/core/runner/role-resolution-table.js +62 -0
  147. package/dist/core/runner/run-compaction-machinery.js +2 -2
  148. package/dist/core/runner/run-identity-wiring.js +12 -9
  149. package/dist/core/runner/run-leg.js +8 -4
  150. package/dist/core/runner/run-notification-lane.js +23 -23
  151. package/dist/core/runner/run-recovery-lanes.js +3 -3
  152. package/dist/core/runner/run-terminal-adoption.js +1 -1
  153. package/dist/core/runner/run-turn-boundary.js +14 -15
  154. package/dist/core/runner/runtask.js +1 -1
  155. package/dist/core/runner/sub-agent-deny-lists.d.ts +19 -0
  156. package/dist/core/runner/sub-agent-deny-lists.js +25 -0
  157. package/dist/core/runner/tool-occurrence.d.ts +4 -2
  158. package/dist/core/runner/tool-occurrence.js +2 -2
  159. package/dist/core/runner-deps.d.ts +1 -1
  160. package/dist/core/secret-env.d.ts +2 -2
  161. package/dist/core/secret-env.js +6 -20
  162. package/dist/core/session-checkout.d.ts +63 -3
  163. package/dist/core/session-checkout.js +152 -58
  164. package/dist/core/session-store.d.ts +6 -6
  165. package/dist/core/session-store.js +3 -3
  166. package/dist/core/shell-read-silence.js +8 -0
  167. package/dist/core/store-contracts/background-agent-store-contract.js +13 -0
  168. package/dist/core/store-contracts/peer-directory-contract.js +8 -1
  169. package/dist/core/task-event.d.ts +9 -5
  170. package/dist/core/task-notification.d.ts +137 -31
  171. package/dist/core/task-notification.js +198 -100
  172. package/dist/core/task-registry-agent.d.ts +11 -0
  173. package/dist/core/task-registry-agent.js +12 -3
  174. package/dist/core/task-registry-shared.d.ts +11 -0
  175. package/dist/core/task-registry.d.ts +18 -0
  176. package/dist/core/task-registry.js +27 -8
  177. package/dist/core/task-spec.d.ts +7 -2
  178. package/dist/core/tool-errors.d.ts +17 -9
  179. package/dist/core/tool-errors.js +1 -1
  180. package/dist/core/tool-policy.d.ts +18 -1
  181. package/dist/core/tool-policy.js +16 -7
  182. package/dist/core/tool-result-store.d.ts +20 -0
  183. package/dist/core/tool-spec.d.ts +10 -6
  184. package/dist/core/trace.d.ts +3 -2
  185. package/dist/core/workflow-journal-store.d.ts +11 -0
  186. package/dist/core/workflow-journal-store.js +7 -0
  187. package/dist/core/workflow-run-store.d.ts +9 -0
  188. package/dist/core/workflow-run-store.js +6 -0
  189. package/dist/core/write-protect.d.ts +16 -0
  190. package/dist/core/write-protect.js +10 -0
  191. package/dist/engine/compaction/compaction.d.ts +2 -1
  192. package/dist/engine/harness/types.d.ts +1 -0
  193. package/dist/engine/session/repo-utils.d.ts +14 -4
  194. package/dist/engine/session/repo-utils.js +5 -4
  195. package/dist/engine/session/session.d.ts +7 -1
  196. package/dist/engine/session/session.js +5 -2
  197. package/dist/index.d.ts +13 -11
  198. package/dist/index.js +13 -11
  199. package/dist/orchestration/run-workflow-tool.d.ts +4 -0
  200. package/dist/orchestration/run-workflow-tool.js +7 -0
  201. package/dist/orchestration/workflow-types.d.ts +2 -1
  202. package/dist/orchestration/workflow.d.ts +3 -0
  203. package/dist/orchestration/workflow.js +2 -1
  204. package/dist/prompts/default.d.ts +1 -2
  205. package/dist/scenarios/full-body.d.ts +1 -1
  206. package/dist/stores/file/adoption/adopt.d.ts +1 -1
  207. package/dist/stores/file/checkpoint-store.d.ts +6 -0
  208. package/dist/stores/file/checkpoint-store.js +4 -1
  209. package/dist/stores/file/file-history-store.d.ts +13 -0
  210. package/dist/stores/file/file-history-store.js +75 -13
  211. package/dist/stores/file/index.d.ts +12 -16
  212. package/dist/stores/file/index.js +7 -25
  213. package/dist/stores/file/permission-rule-store.d.ts +34 -0
  214. package/dist/stores/file/permission-rule-store.js +104 -9
  215. package/dist/stores/file/session-store.js +1 -1
  216. package/dist/stores/file/tool-result-store.d.ts +14 -0
  217. package/dist/stores/file/tool-result-store.js +39 -2
  218. package/dist/stores/file/workflow-journal-store.d.ts +4 -0
  219. package/dist/stores/file/workflow-journal-store.js +17 -0
  220. package/dist/stores/file/workflow-run-store.d.ts +3 -0
  221. package/dist/stores/file/workflow-run-store.js +15 -0
  222. package/dist/tools/fs/read-deny.d.ts +15 -2
  223. package/dist/tools/fs/read-deny.js +10 -2
  224. package/dist/tools/fs/shell-read-check.d.ts +8 -2
  225. package/dist/tools/fs/shell-read-check.js +7 -7
  226. package/package.json +2 -2
  227. package/test/export-surface.snapshot.json +71 -73
  228. package/wire-changes/core-stores-sql@7.64.0.json +30 -0
  229. package/wire-changes/core-stores-sql@7.65.0.json +30 -0
  230. package/wire-changes/core@7.64.0.json +2653 -0
  231. package/wire-changes/core@7.65.0.json +1650 -0
  232. package/wire-changes/mods-kernel@7.64.0.json +30 -0
  233. package/wire-changes/mods-kernel@7.65.0.json +30 -0
  234. package/wire-changes/primitives@7.64.0.json +30 -0
  235. package/wire-changes/primitives@7.65.0.json +337 -0
  236. package/dist/core/memory-recall.d.ts +0 -208
  237. package/dist/core/memory-recall.js +0 -136
  238. package/dist/stores/file/memory-store.d.ts +0 -124
  239. package/dist/stores/file/memory-store.js +0 -353
@@ -1,6 +1,7 @@
1
1
  import type { EngineNotice } from "../types.js";
2
2
  import { type ConsolidationGateRead, type ConsolidationGateRow, type ConsolidationPlanFile, type ConsolidationProposal, type ConsolidationRunStopReason, type ConsolidationWriteGate, type MemoryConsolidationOptions } from "./consolidation.js";
3
3
  import { foreignDanglingSessionAccounts, type SessionAccountWrite, type EffectiveSettlement, type HoldRow } from "./delegation-settlement.js";
4
+ import { type SessionWriteHomeReading } from "./session-write-home.js";
4
5
  import { type OriginClearanceRow } from "./origin-clearance.js";
5
6
  import { type CommittedBinding, type EraseMemoryEntriesInput, type MemoryErasureAttestation, type TransferEvidence } from "./file-backend.js";
6
7
  import { type MemoryExportBundle, type MemoryImportReport } from "./export-bundle.js";
@@ -129,12 +130,14 @@ export declare const MEMORY_PREFERENCE_DISCIPLINE = "When the user confirms a st
129
130
  * so the correction is a trailing coda, not a rewrite — in two scopes, because the two mounting
130
131
  * seats speak about different things (an unqualified "the memory store is not writable" beside
131
132
  * another, WRITABLE plane's instruction would negate that plane's guidance):
132
- * - PLANE scope, attached by `inject()` right after a read-only layering's own announcement block:
133
+ * - PLANE scope, attached by `inject()` right after a read-only layering's own notices reminder:
133
134
  * explicitly local to the immediately preceding notices, so a mixed dual-root merge keeps the
134
135
  * writable plane's instruction and announcements fully actionable.
135
- * - SESSION scope, attached by the runner at the block tail when the whole session cannot persist:
136
- * there is no writable instruction left standing there (it is replaced or absent), so the global
137
- * wording is accurate. Name-free by construction (#181 class).
136
+ * - SESSION scope, attached by the runner after all the notices when the whole session cannot
137
+ * persist: there is no writable instruction left standing (it is replaced or absent), so the
138
+ * global wording is accurate. Name-free by construction (#181 class).
139
+ * A coda is its own reminder, minted right after the notices it qualifies (#1123: the notices ride a
140
+ * user message, where an engine sentence outside a reminder would read as the user's words).
138
141
  */
139
142
  export declare const MEMORY_ANNOUNCEMENT_READONLY_PLANE_CODA = "The notices immediately above concern a READ-ONLY memory store: any guidance in them to record, update, or tombstone an entry cannot be applied to that store this session \u2014 surface it to the user instead of claiming it done.";
140
143
  export declare const MEMORY_ANNOUNCEMENT_READONLY_CODA = "The memory store itself is not writable this session, so any guidance above to record, update, or tombstone a memory entry cannot be applied here \u2014 surface it to the user instead of claiming it done.";
@@ -195,8 +198,8 @@ export declare const MEMORY_CAPTURE_OPTOUT_NOTICE = "# Memory\n\nMemory capture
195
198
  * not {@link MEMORY_CAPTURE_OPTOUT_NOTICE} ("at the user's request" would put words in the user's mouth over an
196
199
  * outage), not {@link MEMORY_READONLY_NOTICE} (a session-wide categorical claim, false once the store answers or a
197
200
  * later run mounts: the honest tense is "right now"). The closing correction folds the announcement-coda duty and is
198
- * DIRECTION-FREE on purpose: this notice is composed FIRST and drained announcements ride last, so a locator pointing
199
- * "above" would name a region no announcement can occupy. The second paragraph splices {@link MEMORY_RECALL_FRAMING}.
201
+ * LOCATION-FREE on purpose: the drained notices ride the leg's first request, not this section (#1123), so neither a
202
+ * locator pointing "above" nor one naming "this memory section" would reach them. The second paragraph splices {@link MEMORY_RECALL_FRAMING}.
200
203
  */
201
204
  export interface MemoryUnavailableFacts {
202
205
  what: "capture-record-unreadable" | "mount-failed";
@@ -359,15 +362,20 @@ export interface MemoryInjection {
359
362
  * counterfeit it, tool-name-free because the engine cannot vouch for the roster). Undefined
360
363
  * when empty. */
361
364
  index?: string;
362
- /** design/138 S2-B (时机①) — the announcements DRAINED by this inject (queued by the previous
363
- * session's harvest / the backend's read-side external-change detection). Already rendered into
364
- * {@link block}; exposed raw for observability/tests. Absent when the queue was empty. */
365
+ /** design/138 S2-B (时机①) — the announcements DRAINED by this inject (queued by a harvest of
366
+ * this or an earlier session / the backend's read-side external-change detection). Rendered into
367
+ * {@link announceBlock}; exposed raw for observability/tests. Absent when the queue was empty. */
365
368
  announcements?: MemoryAnnouncement[];
366
- /** The RENDERED announcements segment of {@link block} (design/142 S2b): dual-root
367
- * merging composes from STRUCTURED fields — never by re-parsing `block` (whose instruction/index
368
- * segments contain blank lines a split would shred). Absent when the queue was empty. */
369
+ /** The drained announcements, RENDERED: one engine reminder of notices, followed — for a read-only
370
+ * layering — by the plane coda in a reminder of its own. An EVENT, not state (#1123): it is NOT part
371
+ * of {@link block}. The Runner delivers it once, on the leg's first request (ahead of the user's
372
+ * message), so the cached prompt prefix never carries it; a host driving the engine directly places
373
+ * it the same way. Dual-root merging composes from STRUCTURED fields (design/142 S2b). Absent when
374
+ * the queue was empty. */
369
375
  announceBlock?: string;
370
- /** `instruction + index + announcements` — what prepare-task mounts in the stable-prefix memory slot. */
376
+ /** `instruction + index` — the memory store's STATE, what the Runner mounts in the stable-prefix
377
+ * memory slot. Byte-identical across runs until the state itself changes; the drained notices are
378
+ * {@link announceBlock} (#1123). */
371
379
  block: string;
372
380
  /**
373
381
  * RB-276 — the materialized MEMORY.md whose FULL disk text rides in this injection, for prepare-task
@@ -1076,9 +1084,9 @@ export declare class MemoryEngine {
1076
1084
  * ignore it exactly as before.
1077
1085
  */
1078
1086
  markSessionPolluted(sessionId: string, reason: string, cause?: import("./types.js").MemoryOriginCause): Promise<SessionPollutionMarkOutcome>;
1079
- /** The session's pollution record (in-process mark first, then the durable marker) — undefined =
1080
- * clean. Reads are side-effect-free. */
1081
- sessionPollution(sessionId: string): SessionPollutionRecord | undefined;
1087
+ /** The session's pollution record (in-process mark first, then the durable marker kept by the
1088
+ * governance store) — undefined = clean. Reads are side-effect-free. */
1089
+ sessionPollution(sessionId: string): Promise<SessionPollutionRecord | undefined>;
1082
1090
  /** design/383 §2.1b — the record carrier (defaults to the file trio over this control dir). */
1083
1091
  private readonly captureRecords;
1084
1092
  /** In-process half of the one-way record: a session opted out in THIS process reads opted-out here
@@ -1263,8 +1271,8 @@ export declare class MemoryEngine {
1263
1271
  * (conflicts reported, replay converges), and the attestation carries
1264
1272
  * `evidenceCapability: "none"` + `custodyState: "capability-absent"` throughout — a silent
1265
1273
  * downgrade is the forbidden shape. The read faces show this lane no carrier beyond the deleted
1266
- * entries, so every store carrier class answers `unverified` (and `replay: "unsupported"`): the
1267
- * degraded lane never answers `complete`. Applied deletes close their lineage rows (the same
1274
+ * entries, so every store carrier class but `quarantineCopy` (its copies deleted by id, {@link eraseQuarantineCopies})
1275
+ * answers `unverified` (and `replay: "unsupported"`): the degraded lane never answers `complete`. Applied deletes close their lineage rows (the same
1268
1276
  * space hygiene the organic tombstone path takes).
1269
1277
  *
1270
1278
  * Authorization: `input.expectedScopes` (the import's seat; contract on its JSDoc). A grant-bearing
@@ -1320,8 +1328,8 @@ export declare class MemoryEngine {
1320
1328
  *
1321
1329
  * Failure posture is the control plane's existing fail-closed law: a corrupt lineage or challenge
1322
1330
  * ledger THROWS (`ControlPlaneCorruptError` — an answer is never assembled over an account whose
1323
- * integrity is unknown), and the backend's own refusals (v1-compat store, contended snapshot
1324
- * fence) propagate. CAPABILITY ABSENCE is not failure: a backend without the audit faces answers
1331
+ * integrity is unknown), and the backend's own refusals (a ledger it refuses, a contended
1332
+ * snapshot fence) propagate. CAPABILITY ABSENCE is not failure: a backend without the audit faces answers
1325
1333
  * `binding: "unknown"` / `contentState: "capability-absent"` / `custody: "capability-absent"` —
1326
1334
  * reported honestly, never fabricated and never a throw (#196 absence-reports-not-silent-green).
1327
1335
  */
@@ -1471,23 +1479,20 @@ export declare class MemoryEngine {
1471
1479
  resolveSettlement(settleId: string, to: "clean" | "external", requestId: string): Promise<void>;
1472
1480
  /** §4.2③ — the hold valve: `"release"` commits the held entry at the next harvest WITH a
1473
1481
  * `"static"`-cause marker (a valve release is not a cleanliness proof); `"discard"` disposes it
1474
- * to quarantine. Audited (requestId required). */
1475
- resolveHold(holdId: string, action: "release" | "discard", requestId: string): void;
1482
+ * to quarantine. Audited (requestId required). Answers a Promise: the verdict is written to the hold ledger through
1483
+ * the governance store; a refused call (`memory.hold_resolve_*`) rejects it. */
1484
+ resolveHold(holdId: string, action: "release" | "discard", requestId: string): Promise<void>;
1476
1485
  /** §3.6 — the session-account valve: close a dangling foreign row WITHOUT adjudication (the
1477
1486
  * residue arm keeps firing until the next full-domain harvest closes normally — a valve close
1478
1487
  * must not launder the window it covers). It also ends the session's leg (no live writer of its
1479
1488
  * layer any more). Audited (requestId required). */
1480
1489
  resolveSessionAccount(sessionId: string, requestId: string): Promise<void>;
1481
- /** The engine's control-plane directory (the sidecar home: pollution markers, lineage/challenge
1482
- * ledgers, and the design/336 settlement/hold/session accounts). Exposed so a host (and the
1483
- * runner's settlement handle) can address the SAME plane the engine writes — a second derivation
1484
- * would be a drift seam. */
1485
- get controlPlaneDir(): string;
1486
1490
  /** Read face: every delegation settlement row with its folded effective status (host audit). */
1487
1491
  readDelegationSettlements(): Promise<EffectiveSettlement[]>;
1488
- /** Read face: every instruction-hold row (host audit; custody bytes are addressable through
1489
- * `captureName`/`disposition.quarantineName` under the control plane). */
1490
- readInstructionHolds(): HoldRow[];
1492
+ /** Read face: every instruction-hold row (host audit; custody bytes are addressable as the governance store's
1493
+ * `hold` object `captureName`, and a disposed hold's as its `quarantine` object `disposition.quarantineName`). Answers
1494
+ * a Promise: the ledger is read through the governance store. */
1495
+ readInstructionHolds(): Promise<HoldRow[]>;
1491
1496
  /** Read face: the dangling foreign session-account rows a given session would classify residue
1492
1497
  * against (host audit for the §3.6 valve). */
1493
1498
  readDanglingSessionAccounts(selfSessionId: string): Promise<Awaited<ReturnType<typeof foreignDanglingSessionAccounts>>>;
@@ -1710,8 +1715,10 @@ export declare class MemoryEngine {
1710
1715
  * Host read face: the engine's RESOLVED control-plane directory (the same coordinate a
1711
1716
  * directory-pinned backend already publishes as `controlPlaneRoot`; this accessor answers it
1712
1717
  * after the engine's own precedence — backend pin > constructor argument > derived default).
1713
- * The shipped consolidation driver keeps its run account and mint archives in this plane
1714
- * (design/376 §1.6-4); path knowledge is not authority — nothing here bypasses a verb.
1718
+ * The one accessor of that directory: the runner's settlement handle and the capture floor's
1719
+ * plane coordinate read it here, so a host and the runner address the SAME plane the engine
1720
+ * writes (a second derivation would be a drift seam). Path knowledge is not authority — nothing
1721
+ * here bypasses a verb.
1715
1722
  */
1716
1723
  get controlPlaneRoot(): string;
1717
1724
  /** The store this engine keeps its consolidation state in: the backend's own (`MemoryBackend.governance`) when it
@@ -1766,6 +1773,15 @@ export declare class MemoryEngine {
1766
1773
  * Never throws — an unreadable source is an absent key, which IS the answer.
1767
1774
  */
1768
1775
  sessionMemoryStatus(sessionId: string): Promise<SessionMemoryStatus>;
1776
+ /**
1777
+ * {@link sessionMemoryStatus} with the reading that named (or failed to name) its `writeHome`, from the same one pass over
1778
+ * the ledgers: what a deployment of several stores needs to choose among the stores' homes by the law each store applies
1779
+ * to its own two sources (`chooseSessionWriteHome`). `status` is exactly what `sessionMemoryStatus` answers. Never throws.
1780
+ */
1781
+ sessionMemoryStatusRead(sessionId: string): Promise<{
1782
+ readonly status: SessionMemoryStatus;
1783
+ readonly writeHome: SessionWriteHomeReading;
1784
+ }>;
1769
1785
  /** The committed, side-effect-free audit read: the adoption-restricted committed view when the
1770
1786
  * backend offers one (the File backend — ledger+shadow, no disk adoption), else a non-adopting
1771
1787
  * retrieval view where one is offered, else the backend itself (Pg/TiDB shapes — naturally committed
@@ -1940,6 +1956,10 @@ export declare class MemoryEngine {
1940
1956
  /** {@link refuseOutsideStore} as a value, for a site whose failure lane is a report row rather than a
1941
1957
  * throw: the refusal's text, or `undefined` when the act may proceed. */
1942
1958
  private storeActRefusedText;
1959
+ /** Contain the suspect file at `path` (its already-read `content`): keep its copy among the governance store's
1960
+ * `quarantine` objects, then — the anchor read again after that await, at the act — take it off the plane
1961
+ * ({@link clearContainedPath}). A refused act leaves the path untouched and says why in `detail`. */
1962
+ private containSuspect;
1943
1963
  /** The memory dir against its anchor ({@link anchorStoreRoot}), read every time: at every mount and at the head
1944
1964
  * of every face acting on the memory dir itself; answers the anchored root. With a `handle`, its mount root
1945
1965
  * must be the anchored one too (a handle mounted before a re-anchor names a tree the store no longer has). */
@@ -1992,7 +2012,8 @@ export declare class MemoryEngine {
1992
2012
  private censusScopeTree;
1993
2013
  }
1994
2014
  /** Render drained announcements as ONE engine-owned system-reminder block (the lead/frame is
1995
- * trusted; item identifiers were neutralized at enqueue — see {@link MemoryAnnouncement.items}). */
2015
+ * trusted; item identifiers were neutralized at enqueue — see {@link MemoryAnnouncement.items}). The
2016
+ * lead names no session: a notice may be about this session's own harvest (#1123 ②). */
1996
2017
  export declare function renderAnnouncements(queue: readonly MemoryAnnouncement[], folded: number, reminderMark?: string): string;
1997
2018
  /** Truncate the derived index to the CC injection parameters (200 lines / 25KB). */
1998
2019
  export declare function truncateIndex(text: string): string;