@sema-agent/core 7.72.0 → 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.
Files changed (256) hide show
  1. package/CHANGELOG.md +319 -0
  2. package/dist/agents/inherited-tool-pool.d.ts +26 -1
  3. package/dist/agents/inherited-tool-pool.js +46 -2
  4. package/dist/agents/parked-resume-drive.d.ts +10 -0
  5. package/dist/agents/parked-resume-drive.js +9 -0
  6. package/dist/agents/retain-ledger.d.ts +3 -0
  7. package/dist/agents/send-message-tool.js +1 -0
  8. package/dist/agents/send-user-message-tool.d.ts +12 -0
  9. package/dist/agents/send-user-message-tool.js +67 -0
  10. package/dist/agents/subagent-steps.d.ts +9 -0
  11. package/dist/agents/subagent-steps.js +38 -0
  12. package/dist/agents/subagent.d.ts +2 -0
  13. package/dist/agents/subagent.js +43 -12
  14. package/dist/agents/verify.js +23 -8
  15. package/dist/agents/yield-adoption.js +3 -1
  16. package/dist/brain/anthropic.js +14 -9
  17. package/dist/brain/open-responses.js +4 -5
  18. package/dist/brain/openai.js +30 -23
  19. package/dist/brain/stream-engine.js +159 -151
  20. package/dist/core/actions-digest.d.ts +43 -0
  21. package/dist/core/actions-digest.js +22 -0
  22. package/dist/core/allow-entry.js +3 -3
  23. package/dist/core/auto-mode.d.ts +7 -9
  24. package/dist/core/auto-mode.js +114 -8
  25. package/dist/core/checkpoint-features.d.ts +3 -2
  26. package/dist/core/checkpoint-features.js +1 -1
  27. package/dist/core/checkpoint-rekey.d.ts +1 -1
  28. package/dist/core/checkpoint-rekey.js +6 -1
  29. package/dist/core/checkpoint-requirements.d.ts +23 -3
  30. package/dist/core/checkpoint-requirements.js +5 -1
  31. package/dist/core/checkpoint-row-verdict.js +7 -1
  32. package/dist/core/checkpoint-store.d.ts +24 -2
  33. package/dist/core/checkpoint-store.js +1 -0
  34. package/dist/core/child-clamp-seats.d.ts +15 -0
  35. package/dist/core/child-clamp-seats.js +15 -0
  36. package/dist/core/delegation-frames.d.ts +1 -0
  37. package/dist/core/delegation-frames.js +1 -1
  38. package/dist/core/engine-capabilities.d.ts +5 -1
  39. package/dist/core/engine-capabilities.js +1 -1
  40. package/dist/core/engine-notice.d.ts +30 -22
  41. package/dist/core/engine-version.js +1 -1
  42. package/dist/core/entries-not-applied.d.ts +19 -7
  43. package/dist/core/entries-not-applied.js +33 -1
  44. package/dist/core/governance-codes.d.ts +7 -1
  45. package/dist/core/governance-codes.js +13 -5
  46. package/dist/core/hooks.d.ts +3 -0
  47. package/dist/core/hooks.js +1 -0
  48. package/dist/core/host-instance.d.ts +23 -0
  49. package/dist/core/host-instance.js +69 -0
  50. package/dist/core/instruction-preview.d.ts +63 -0
  51. package/dist/core/instruction-preview.js +406 -0
  52. package/dist/core/leg-budget.d.ts +26 -0
  53. package/dist/core/leg-budget.js +9 -0
  54. package/dist/core/leg-identity.d.ts +51 -1
  55. package/dist/core/leg-identity.js +45 -2
  56. package/dist/core/manager-launch-check.d.ts +48 -0
  57. package/dist/core/manager-launch-check.js +64 -0
  58. package/dist/core/mcp-call-meta.d.ts +2 -2
  59. package/dist/core/mcp-injection-drop.d.ts +20 -10
  60. package/dist/core/mcp-injection-drop.js +9 -3
  61. package/dist/core/mcp-server-spec.d.ts +2 -1
  62. package/dist/core/member-outcome.d.ts +3 -2
  63. package/dist/core/member-outcome.js +1 -1
  64. package/dist/core/memory-engine/deletion-record.d.ts +46 -0
  65. package/dist/core/memory-engine/deletion-record.js +96 -0
  66. package/dist/core/memory-engine/engine.js +24 -16
  67. package/dist/core/memory-engine/file-backend.js +7 -5
  68. package/dist/core/memory-engine/projection-ledger.d.ts +1 -1
  69. package/dist/core/memory-engine/projection-ledger.js +1 -1
  70. package/dist/core/memory-engine/scope-contract.d.ts +18 -13
  71. package/dist/core/memory-engine/scope-contract.js +18 -18
  72. package/dist/core/memory-engine/sync-client.js +26 -6
  73. package/dist/core/memory-engine/sync.d.ts +20 -2
  74. package/dist/core/memory-engine/sync.js +18 -17
  75. package/dist/core/mode-policy.d.ts +21 -6
  76. package/dist/core/mode-policy.js +15 -6
  77. package/dist/core/own-property-receipt.js +11 -4
  78. package/dist/core/parent-spec-seat.d.ts +13 -11
  79. package/dist/core/parent-spec-seat.js +13 -9
  80. package/dist/core/peer-seat.js +3 -3
  81. package/dist/core/peer-task-store.d.ts +365 -0
  82. package/dist/core/peer-task-store.js +682 -0
  83. package/dist/core/permission-rule-consent.js +6 -11
  84. package/dist/core/permission-rule-model.d.ts +27 -0
  85. package/dist/core/permission-rule-model.js +33 -5
  86. package/dist/core/permission-rule-provider.d.ts +35 -33
  87. package/dist/core/permission-rule-provider.js +38 -295
  88. package/dist/core/permission-rule-store.d.ts +181 -8
  89. package/dist/core/permission-rule-store.js +420 -17
  90. package/dist/core/permission-rule-sync.js +15 -1
  91. package/dist/core/project-seat.d.ts +55 -0
  92. package/dist/core/project-seat.js +96 -0
  93. package/dist/core/protocol-http-auth.d.ts +3 -2
  94. package/dist/core/protocol-http-auth.js +26 -18
  95. package/dist/core/remote-env.d.ts +4 -4
  96. package/dist/core/retired-keys.js +1 -0
  97. package/dist/core/rule-offer-read.d.ts +1 -1
  98. package/dist/core/rule-offer-read.js +32 -4
  99. package/dist/core/run-ledger-seat.d.ts +66 -0
  100. package/dist/core/run-ledger-seat.js +70 -0
  101. package/dist/core/run-ledger.d.ts +332 -0
  102. package/dist/core/run-ledger.js +550 -0
  103. package/dist/core/runner/checkpoint-scope.d.ts +13 -3
  104. package/dist/core/runner/checkpoint-scope.js +12 -4
  105. package/dist/core/runner/construction-doors.js +6 -0
  106. package/dist/core/runner/contracts.d.ts +21 -5
  107. package/dist/core/runner/delegation-owner.d.ts +30 -0
  108. package/dist/core/runner/delegation-owner.js +20 -4
  109. package/dist/core/runner/finish-reason-seat.js +4 -2
  110. package/dist/core/runner/leg-frame.js +3 -0
  111. package/dist/core/runner/nested-memory-lane.d.ts +22 -5
  112. package/dist/core/runner/nested-memory-lane.js +91 -30
  113. package/dist/core/runner/person-path-rows.d.ts +21 -16
  114. package/dist/core/runner/person-path-rows.js +80 -15
  115. package/dist/core/runner/prepare-caps-and-workflow.js +98 -88
  116. package/dist/core/runner/prepare-config-doors.d.ts +1 -0
  117. package/dist/core/runner/prepare-config-doors.js +5 -3
  118. package/dist/core/runner/prepare-context-lane.js +1 -0
  119. package/dist/core/runner/prepare-delegation-surface.d.ts +3 -0
  120. package/dist/core/runner/prepare-delegation-surface.js +6 -0
  121. package/dist/core/runner/prepare-execution-env.d.ts +3 -3
  122. package/dist/core/runner/prepare-hands-readface.d.ts +5 -2
  123. package/dist/core/runner/prepare-hands-readface.js +12 -1
  124. package/dist/core/runner/prepare-inherited-gate.d.ts +6 -3
  125. package/dist/core/runner/prepare-inherited-gate.js +13 -5
  126. package/dist/core/runner/prepare-run-refs.d.ts +1 -1
  127. package/dist/core/runner/prepare-run-refs.js +3 -2
  128. package/dist/core/runner/prepare-suspend-saga.d.ts +6 -2
  129. package/dist/core/runner/prepare-suspend-saga.js +4 -2
  130. package/dist/core/runner/prepare-task.js +36 -27
  131. package/dist/core/runner/prepare-turn-wiring.d.ts +4 -3
  132. package/dist/core/runner/prepare-turn-wiring.js +2 -1
  133. package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -1
  134. package/dist/core/runner/prepare-wiring-manifest.js +5 -2
  135. package/dist/core/runner/resume-apply.js +11 -5
  136. package/dist/core/runner/resume-review-outcome.d.ts +3 -0
  137. package/dist/core/runner/resume-review-outcome.js +24 -1
  138. package/dist/core/runner/run-harness-handlers.js +3 -0
  139. package/dist/core/runner/run-identity-wiring.js +3 -2
  140. package/dist/core/runner/run-leg.js +3 -0
  141. package/dist/core/runner/run-notification-lane.js +20 -1
  142. package/dist/core/runner/run-settle-and-teardown.js +21 -12
  143. package/dist/core/runner/run-stop-and-final-verify.js +6 -0
  144. package/dist/core/runner/run-telemetry-and-budget-seats.js +1 -1
  145. package/dist/core/runner/runtask.d.ts +6 -2
  146. package/dist/core/runner/runtask.js +21 -9
  147. package/dist/core/runner/shell-env-withheld.d.ts +3 -2
  148. package/dist/core/runner/shell-env-withheld.js +1 -2
  149. package/dist/core/runner/stop-tail-notice.d.ts +10 -2
  150. package/dist/core/runner/stop-tail-notice.js +9 -2
  151. package/dist/core/runner/stream-settle-backstop.d.ts +1 -0
  152. package/dist/core/runner/stream-settle-backstop.js +1 -0
  153. package/dist/core/runner/task-start-doors.js +6 -3
  154. package/dist/core/runner/terminal-account.d.ts +6 -1
  155. package/dist/core/runner/terminal-account.js +16 -1
  156. package/dist/core/runner/unreadable-person-rows.d.ts +2 -1
  157. package/dist/core/runner-deps.d.ts +13 -10
  158. package/dist/core/secret-env.d.ts +53 -37
  159. package/dist/core/secret-env.js +44 -47
  160. package/dist/core/session-checkout.d.ts +3 -0
  161. package/dist/core/session-checkout.js +1 -0
  162. package/dist/core/session-store.d.ts +12 -6
  163. package/dist/core/session-store.js +26 -6
  164. package/dist/core/session.d.ts +31 -8
  165. package/dist/core/store-contracts/checkpoint-store-contract.js +10 -0
  166. package/dist/core/store-contracts/peer-task-store-contract.d.ts +21 -0
  167. package/dist/core/store-contracts/peer-task-store-contract.js +516 -0
  168. package/dist/core/store-contracts/session-store-contract.d.ts +15 -2
  169. package/dist/core/store-contracts/session-store-contract.js +87 -3
  170. package/dist/core/store-contracts/workflow-journal-store-contract.d.ts +19 -1
  171. package/dist/core/store-contracts/workflow-journal-store-contract.js +89 -1
  172. package/dist/core/task-event.d.ts +10 -3
  173. package/dist/core/task-notification.d.ts +96 -10
  174. package/dist/core/task-notification.js +129 -5
  175. package/dist/core/task-registry-shared.d.ts +12 -1
  176. package/dist/core/task-registry-shared.js +3 -1
  177. package/dist/core/task-registry-workflow.d.ts +1 -1
  178. package/dist/core/task-registry-workflow.js +9 -1
  179. package/dist/core/task-registry.d.ts +39 -2
  180. package/dist/core/task-registry.js +76 -12
  181. package/dist/core/task-result.d.ts +13 -0
  182. package/dist/core/task-spec-members.d.ts +3 -1
  183. package/dist/core/task-spec-members.js +11 -3
  184. package/dist/core/task-spec.d.ts +48 -22
  185. package/dist/core/tool-catalog-entries.js +2 -0
  186. package/dist/core/tool-mount-facts.d.ts +1 -1
  187. package/dist/core/tool-mount-facts.js +1 -0
  188. package/dist/core/tool-mount-plan.d.ts +3 -1
  189. package/dist/core/tool-mount-plan.js +6 -0
  190. package/dist/core/tool-mount-static.d.ts +1 -1
  191. package/dist/core/tool-mount-static.js +4 -2
  192. package/dist/core/tool-result-store.d.ts +19 -2
  193. package/dist/core/tool-result-store.js +51 -2
  194. package/dist/core/tool-spec.d.ts +9 -2
  195. package/dist/core/user-attachment.d.ts +5 -1
  196. package/dist/core/user-attachment.js +14 -7
  197. package/dist/core/wiring-manifest.d.ts +26 -20
  198. package/dist/core/wiring-manifest.js +7 -3
  199. package/dist/core/workflow-journal-store.d.ts +53 -10
  200. package/dist/core/workflow-journal-store.js +27 -4
  201. package/dist/core/workflow-run-store-contract.js +16 -0
  202. package/dist/core/workflow-run-store.d.ts +9 -7
  203. package/dist/core/workflow-run-store.js +4 -1
  204. package/dist/engine/execution-env/node-execution-env.js +3 -1
  205. package/dist/engine/harness/types.d.ts +24 -1
  206. package/dist/engine/harness/types.js +10 -0
  207. package/dist/engine/llm/types.d.ts +5 -7
  208. package/dist/engine/lsp/node-lsp-manager.js +2 -1
  209. package/dist/engine/session/import-validate.js +6 -1
  210. package/dist/engine/session/session.d.ts +15 -2
  211. package/dist/engine/session/session.js +34 -4
  212. package/dist/index.d.ts +18 -7
  213. package/dist/index.js +13 -4
  214. package/dist/orchestration/run-workflow-tool.js +40 -32
  215. package/dist/orchestration/workflow-park-adoption.d.ts +51 -12
  216. package/dist/orchestration/workflow-park-adoption.js +47 -12
  217. package/dist/orchestration/workflow-stop.d.ts +128 -0
  218. package/dist/orchestration/workflow-stop.js +156 -0
  219. package/dist/orchestration/workflow.d.ts +30 -6
  220. package/dist/orchestration/workflow.js +117 -55
  221. package/dist/prompts/manager-recipe.d.ts +18 -0
  222. package/dist/prompts/manager-recipe.js +24 -0
  223. package/dist/stores/file/permission-rule-store.d.ts +3 -1
  224. package/dist/stores/file/permission-rule-store.js +0 -1
  225. package/dist/stores/file/workflow-journal-store.d.ts +16 -3
  226. package/dist/stores/file/workflow-journal-store.js +93 -5
  227. package/dist/stores/file/workflow-run-store.d.ts +1 -1
  228. package/dist/tools/fs/file-write-check.js +9 -3
  229. package/dist/tools/fs/index.d.ts +8 -7
  230. package/dist/tools/fs/index.js +4 -4
  231. package/dist/tools/fs/read-deny-home.d.ts +1 -1
  232. package/dist/tools/fs/read-deny-home.js +5 -5
  233. package/dist/tools/fs/read-deny.d.ts +33 -8
  234. package/dist/tools/fs/read-deny.js +114 -25
  235. package/dist/tools/fs/safety.d.ts +4 -1
  236. package/dist/tools/fs/safety.js +4 -2
  237. package/dist/tools/fs/shell-read-check.d.ts +9 -2
  238. package/dist/tools/fs/shell-read-check.js +96 -14
  239. package/dist/tools/fs/shell-read-establish.d.ts +9 -0
  240. package/dist/tools/fs/shell-read-establish.js +21 -11
  241. package/dist/tools/fs/shell-read-judge.d.ts +13 -1
  242. package/dist/tools/fs/shell-read-judge.js +26 -7
  243. package/dist/tools/fs/shell-read-plan.d.ts +5 -0
  244. package/dist/tools/fs/shell-read-write-targets.js +17 -9
  245. package/package.json +2 -2
  246. package/test/export-surface.snapshot.json +131 -1
  247. package/wire-changes/answers/core-stores-sql@7.73.0.json +28 -0
  248. package/wire-changes/answers/core@7.73.0.json +216 -0
  249. package/wire-changes/answers/mods-kernel@7.73.0.json +7 -0
  250. package/wire-changes/answers/primitives@7.73.0.json +12 -0
  251. package/wire-changes/answers/wiki-gate@7.73.0.json +7 -0
  252. package/wire-changes/core-stores-sql@7.73.0.json +326 -0
  253. package/wire-changes/core@7.73.0.json +6480 -0
  254. package/wire-changes/mods-kernel@7.73.0.json +147 -0
  255. package/wire-changes/primitives@7.73.0.json +227 -0
  256. package/wire-changes/wiki-gate@7.73.0.json +145 -0
@@ -1,4 +1,4 @@
1
- import { observeEnvironment } from "./shell-read-environment.js";
1
+ import { isAbsence, observeEnvironment } from "./shell-read-environment.js";
2
2
  import { errorResult } from "../../core/tools.js";
3
3
  import { BASH_READONLY_CONFINEMENT_NOTE, targetUnavailableCard, targetUnavailableSentence } from "./fs-shared.js";
4
4
  import { envErrorDetail } from "./env-error-detail.js";
@@ -8,7 +8,7 @@ import { INLINE_TRUNCATION_MARK_CODEPOINTS, inlineUntrusted, PROBE_REASON_MAX }
8
8
  import { NOT_AUTO_ALLOWED, declinedProgramReason } from "./bash-program-position.js";
9
9
  import { bashClassifyDefaultAllow } from "./bash-readonly-classifier.js";
10
10
  import { planShellReads } from "./shell-read-plan.js";
11
- import { createShellReadEstablisher, establishShellReadsLexically } from "./shell-read-establish.js";
11
+ import { createShellReadEstablisher, establishShellReadsLexically, writtenOnLineBefore } from "./shell-read-establish.js";
12
12
  import { readLandingsOf } from "./shell-read-identity.js";
13
13
  import { declaredReadDenyHomes, homeViewsAt } from "./read-deny-home.js";
14
14
  import { anyOptionWord, programArgs } from "./shell-read-write-targets.js";
@@ -176,11 +176,7 @@ async function writeGuardsOf(judged, boundary, env, signal) {
176
176
  const dest = await probe(parentOf(view));
177
177
  return dest === undefined || dest.ok || (dest.error.code !== "not_found" && dest.error.code !== "not_directory");
178
178
  };
179
- const changedBefore = (view, at) => {
180
- const fold = (p) => p.normalize("NFC").toLowerCase();
181
- const dir = fold(parentOf(view));
182
- return writtenBy.some((paths, i) => i !== at && (i < at || concurrent) && paths.some((w) => withinAnyRoot([fold(w)], dir) || withinAnyRoot([dir], fold(w))));
183
- };
179
+ const changedBefore = (view, at) => writtenOnLineBefore(writtenBy, at, concurrent, parentOf(view));
184
180
  const answer = async (view, key) => (await judge(view, { fs: env, ...(signal !== undefined ? { signal } : {}), ...(key ? { canonical: true } : {}) })) ?? "clear";
185
181
  const asked = [...[...asKey].map(([view, v]) => [view, v, true]), ...[...asSpelling].filter(([view]) => !landingKeys.has(view)).map(([view, v]) => [view, v, false])];
186
182
  const slotOf = (view, key) => `${key || landingKeys.has(view) ? "key" : "spelling"}\u0000${view}`;
@@ -367,8 +363,8 @@ function refusalOf(tool, fold, boundary, paths) {
367
363
  if (fold.finding === "deny_hit" && w?.deny !== undefined) {
368
364
  const target = w.read.target ?? w.deny.matchedView;
369
365
  const write = w.deny.face === "write";
370
- const under = !write && w.deny.under === true;
371
- const { sentence: core, echoed } = readDenyRefusal({ target, pattern: w.deny.pattern, matchedView: w.deny.matchedView, ...(write ? { face: "write" } : {}), ...(w.deny.readRow === true ? { readRow: true } : {}), ...(under ? { under: true } : {}) });
366
+ const under = w.deny.under === true;
367
+ const { sentence: core, echoed } = readDenyRefusal({ target, pattern: w.deny.pattern, matchedView: w.deny.matchedView, ...(write ? { face: "write" } : {}), ...(w.deny.readRow === true ? { readRow: true } : {}), ...(under ? { under: true } : {}), ...(w.deny.lookup !== undefined ? { lookup: w.deny.lookup, action: "removing" } : {}) });
372
368
  const through = deniedThrough(w.read, boundary);
373
369
  const sentence = `Error (${tool}): ${core} ${write ? writeDenyRefusalNote() : under ? DENY_UNDER_REFUSAL_NOTE : DENY_REFUSAL_NOTE}${through !== undefined ? ` ${DENIED_THROUGH_NOTE[through]}` : ""}`;
374
370
  return { sentence, echoed, ...(write ? {} : { details: violationDetails({ code: "read_path_denied", message: sentence, target, pattern: w.deny.pattern }) }) };
@@ -473,12 +469,96 @@ async function applyAlsoInside(judged, boundary) {
473
469
  });
474
470
  return rewrite(judged);
475
471
  }
476
- async function runShellReadStation(tool, command, declared, seat, readers, establisher, env, signal) {
477
- const plan = planShellReads(command, declarationsOf(declared, readers, env.cdPath, env.receivedEnvNames));
472
+ export const SUBTREE_SEARCH_MS = 2_000;
473
+ export const SUBTREE_SEARCH_DIRS = 16_384;
474
+ async function searchSubtree(env, root, named, signal) {
475
+ const stop = new AbortController();
476
+ const timer = setTimeout(() => stop.abort(), SUBTREE_SEARCH_MS);
477
+ const onAbort = () => stop.abort();
478
+ signal?.addEventListener("abort", onAbort, { once: true });
479
+ const ended = new Promise((resolve) => stop.signal.addEventListener("abort", () => resolve("ended"), { once: true }));
480
+ const unfinished = (why) => ({ kind: "unfinished", why: signal?.aborted === true ? "the call was cancelled" : why });
481
+ const outOfTime = `the search ran past its ${SUBTREE_SEARCH_MS / 1000} s bound`;
482
+ try {
483
+ if (signal?.aborted === true)
484
+ return unfinished("");
485
+ const top = await Promise.race([env.fileInfo(root, stop.signal), ended]);
486
+ if (top === "ended")
487
+ return unfinished(outOfTime);
488
+ if (!top.ok)
489
+ return isAbsence(top.error.code) ? { kind: "clear" } : unfinished(`it could not be inspected (${top.error.code})`);
490
+ if (top.value.kind !== "directory")
491
+ return { kind: "clear" };
492
+ const queue = [root];
493
+ for (let listed = 0; queue.length > 0; listed++) {
494
+ if (listed >= SUBTREE_SEARCH_DIRS)
495
+ return unfinished(`it holds more than ${SUBTREE_SEARCH_DIRS} folders`);
496
+ const dir = queue.shift();
497
+ const entries = await Promise.race([env.listDir(dir, stop.signal), ended]);
498
+ if (entries === "ended")
499
+ return unfinished(outOfTime);
500
+ if (!entries.ok) {
501
+ if (isAbsence(entries.error.code))
502
+ continue;
503
+ return unfinished(`"${dir}" could not be listed (${entries.error.code})`);
504
+ }
505
+ for (const entry of entries.value) {
506
+ const at = `${dir.replace(/[\\/]+$/, "")}/${entry.name}`;
507
+ const pattern = named.ledBy(entry.name);
508
+ if (pattern !== null)
509
+ return { kind: "found", pattern, at };
510
+ if (entry.kind === "directory")
511
+ queue.push(at);
512
+ }
513
+ }
514
+ return { kind: "clear" };
515
+ }
516
+ catch {
517
+ return unfinished("the environment threw");
518
+ }
519
+ finally {
520
+ clearTimeout(timer);
521
+ signal?.removeEventListener("abort", onAbort);
522
+ }
523
+ }
524
+ function removesSubtree(f) {
525
+ const r = f.read;
526
+ return r.candidate.face === "write" && r.candidate.subtree === "removed" && r.written !== undefined && r.target !== undefined && (r.established === "canonical" || r.established === "expansion") && (f.kind === "none" || f.kind === "outside_roots");
527
+ }
528
+ async function applyRemovalSearch(judged, boundary, env, signal) {
529
+ const named = boundary.writeDenyNamed;
530
+ if (named === undefined || named.rows.length === 0)
531
+ return judged;
532
+ const searched = new Map();
533
+ const answered = new Map();
534
+ for (const f of allFindings(judged)) {
535
+ if (!removesSubtree(f))
536
+ continue;
537
+ const target = f.read.target;
538
+ let search = searched.get(target);
539
+ if (search === undefined)
540
+ searched.set(target, (search = searchSubtree(env, target, named, signal)));
541
+ const found = await search;
542
+ if (found.kind === "clear")
543
+ continue;
544
+ if (found.kind === "unfinished") {
545
+ const cause = `the folders below "${target}" could not all be searched for a name the deny rows ${named.rows.map((p) => `"${p}"`).join(", ")} start with: ${found.why}`;
546
+ answered.set(f, { read: { ...f.read, cause }, kind: "unanswered", denyRowUnasked: true, containment: f.containment });
547
+ continue;
548
+ }
549
+ const readRow = boundary.writeDenyGuardsReads?.(found.pattern) === true ? { readRow: true } : {};
550
+ answered.set(f, { ...f, kind: "deny_hit", deny: { pattern: found.pattern, matchedView: normalizeAbsPathLexically(target), face: "write", under: true, lookup: { found: found.at }, ...readRow } });
551
+ }
552
+ if (answered.size === 0)
553
+ return judged;
554
+ const rewrite = (j) => ({ ...j, segments: j.segments.map((s) => ({ ...s, findings: s.findings.map((f) => answered.get(f) ?? f), nested: s.nested.map(rewrite) })) });
555
+ return rewrite(judged);
556
+ }
557
+ async function runShellReadStation(tool, plan, declared, seat, establisher, env, signal) {
478
558
  const door = observeEnvironment(env);
479
559
  const established = await establisher.establish(plan, declared, signal, door);
480
560
  const boundary = { ...declared, roots: established.roots };
481
- const onPlan = await applyAlsoInside(judgePlan(plan, established, boundary), boundary);
561
+ const onPlan = await applyRemovalSearch(await applyAlsoInside(judgePlan(plan, established, boundary), boundary), boundary, env, signal);
482
562
  const judgedNow = () => {
483
563
  const unfinished = door.incomplete();
484
564
  return unfinished.length > 0 ? { ...onPlan, incomplete: unfinished } : onPlan;
@@ -503,7 +583,8 @@ async function runShellReadStation(tool, command, declared, seat, readers, estab
503
583
  export async function judgeShellRead(input) {
504
584
  assertNoRetiredShellReadBoundaryKeys(input.boundary);
505
585
  const readers = input.readers ?? new Set(bashClassifyDefaultAllow());
506
- const run = await runShellReadStation(input.tool ?? "Bash", input.command, input.boundary, commandSeatOf(input.seat), readers, createShellReadEstablisher(input.env, input.boundary.roots, { homeViews: homeViewsAt(input.env, input.readDenyHomes === undefined ? declaredReadDenyHomes(input.env) : checkedReadDenyHomes(input.readDenyHomes)) }), input.env, input.signal);
586
+ const plan = planShellReads(input.command, declarationsOf(input.boundary, readers, input.env.cdPath, input.env.receivedEnvNames));
587
+ const run = await runShellReadStation(input.tool ?? "Bash", plan, input.boundary, commandSeatOf(input.seat), createShellReadEstablisher(input.env, input.boundary.roots, { homeViews: homeViewsAt(input.env, input.readDenyHomes === undefined ? declaredReadDenyHomes(input.env) : checkedReadDenyHomes(input.readDenyHomes)) }), input.env, input.signal);
507
588
  const offer = normalizeReadRootCandidate(run.verdict.readRootCandidate);
508
589
  return {
509
590
  plan: run.plan,
@@ -567,7 +648,8 @@ export function createShellReadStation(opts) {
567
648
  return null;
568
649
  const seat = callOpts.seat ?? opts.seatOf(member);
569
650
  return (async () => {
570
- const run = await runShellReadStation(call.toolName, command, boundary, seat, readers, establisherFor(boundary.roots), opts.env, signal);
651
+ const plan = planShellReads(command, declarationsOf(boundary, readers, opts.env.cdPath, opts.env.receivedEnvNames));
652
+ const run = await runShellReadStation(call.toolName, plan, boundary, seat, establisherFor(boundary.roots), opts.env, signal);
571
653
  if (run.verdict.disposition !== "refuse" && callOpts.toolCallId !== undefined)
572
654
  remember(callOpts.toolCallId, { toolName: member, boundary: run.boundary, established: run.established, command });
573
655
  const verdict = opts.offersReadRootGrant === false ? withoutGrantOffer(run.verdict) : run.verdict;
@@ -92,6 +92,15 @@ export interface ShellReadEstablisher {
92
92
  readonly changed: readonly EstablishedRead[];
93
93
  }>;
94
94
  }
95
+ /**
96
+ * THE order judgment of a line's writes, one for every reader of a filesystem fact taken before the line runs (the
97
+ * establishment's {@link JudgedCandidate.onlyIf} facts, the write guards' writability): does a run BEFORE run `at` — or beside
98
+ * it, where the line runs segments at once (a pipe, a background) — write on the line of `place` (that path, a path above it
99
+ * or one below it)? A later run cannot change what run `at` meets (`cp a b && touch b`: the copy meets the tree before the
100
+ * touch). `writes[i]` is what the i-th run writes. Compared with letter case and composition folded: on a filesystem that
101
+ * ignores them (`mkdir BOX && cp x box`) two spellings are one place, and a fold that only over-matches keeps the fact unsettled.
102
+ */
103
+ export declare function writtenOnLineBefore(writes: readonly (readonly string[])[], at: number, concurrent: boolean, place: string): boolean;
95
104
  /**
96
105
  * The PURE, lexical establishment of a whole plan — what an isolated sandbox gets, and what any consumer
97
106
  * with no environment in hand (a unit pin, a lexical pre-read) can compute. Patterns and traversal roots
@@ -160,11 +160,20 @@ function lexicalReadsOf(candidate, boundary, placed) {
160
160
  }
161
161
  function writtenByText(plan, boundary) {
162
162
  const targets = new Set();
163
- const writers = new Map();
163
+ const runs = [];
164
+ const writes = [];
165
+ let concurrent = false;
164
166
  const speculativeSeen = new Set();
165
167
  let unplaced = false;
166
168
  const walk = (p) => {
167
169
  for (const s of p.segments) {
170
+ for (const n of s.nested)
171
+ walk(n);
172
+ const wrote = [];
173
+ runs.push(s);
174
+ writes.push(wrote);
175
+ if (p.shape.backgrounded || s.connector === "|")
176
+ concurrent = true;
168
177
  for (const c of s.reads) {
169
178
  if (c.speculative === undefined || c.expands !== false || c.bases === "unmodelled")
170
179
  continue;
@@ -190,16 +199,19 @@ function writtenByText(plan, boundary) {
190
199
  else {
191
200
  const t = normalizeAbsPathLexically(r.target);
192
201
  targets.add(t);
193
- writers.set(t, (writers.get(t) ?? new Set()).add(s));
202
+ wrote.push(t);
194
203
  }
195
204
  }
196
205
  }
197
- for (const n of s.nested)
198
- walk(n);
199
206
  }
200
207
  };
201
208
  walk(plan);
202
- return { targets, unplaced, writers };
209
+ return { targets, unplaced, runs, writes, concurrent };
210
+ }
211
+ export function writtenOnLineBefore(writes, at, concurrent, place) {
212
+ const fold = (p) => p.normalize("NFC").toLowerCase();
213
+ const here = fold(place);
214
+ return writes.some((paths, i) => i !== at && (i < at || concurrent) && paths.some((w) => withinAnyRoot([fold(w)], here) || withinAnyRoot([here], fold(w))));
203
215
  }
204
216
  function unfollowedBackupReads(j, boundary, cause) {
205
217
  const named = sedBackupNames(j.followed.operand.spelled, j.followed.suffix).flatMap((name) => lexicalReadsOf({ ...j.candidate, spelled: name }, boundary));
@@ -558,15 +570,13 @@ function establishLegOver(seen, readRoots) {
558
570
  for (const r of lexicalReadsOf(fact.candidate, boundary)) {
559
571
  if (r.established !== "lexical" || r.target === undefined)
560
572
  return undefined;
561
- const place = normalizeAbsPathLexically(r.target);
562
- for (const [t, by] of written.writers)
563
- if ((t === place || withinAnyRoot([place], t)) && [...by].some((s) => s !== segment))
564
- return undefined;
573
+ if (writtenOnLineBefore(written.writes, written.runs.indexOf(segment), written.concurrent, normalizeAbsPathLexically(r.target)))
574
+ return undefined;
565
575
  const at = fact.seat === "entry" ? await entryOf(r.target, signal) : await resolve(r.target, signal);
566
576
  if (at === undefined || (!at.exact && at.missing !== true))
567
577
  return undefined;
568
- const info = at.missing === true && !at.exact ? undefined : await env.fileInfo(at.value, signal);
569
- const here = info === undefined ? false : info.ok ? info.value.kind === "directory" : isAbsence(info.error.code) ? false : undefined;
578
+ const info = at.missing === true && !at.exact ? undefined : fact.seat === "entry" ? await env.fileInfo(at.value, signal) : await env.listDir(at.value, signal);
579
+ const here = info === undefined ? false : info.ok ? Array.isArray(info.value) || info.value.kind === "directory" : isAbsence(info.error.code) ? false : undefined;
570
580
  if (here === undefined || (directory !== undefined && directory !== here))
571
581
  return undefined;
572
582
  directory = here;
@@ -27,7 +27,7 @@ import type { ReadCandidate, ShellReadPlan, ShellReadSegment } from "./shell-rea
27
27
  import type { Incomplete, ObservedFilesystem } from "./shell-read-environment.js";
28
28
  import type { WriteSeat } from "./shell-read-write-targets.js";
29
29
  import { type ContainmentFace } from "./containment-face.js";
30
- import { type JudgedPathRow } from "./read-deny.js";
30
+ import { type JudgedPathRow, type ReadDenyFinding, type ReadDenyRootAnswer } from "./read-deny.js";
31
31
  import type { AssertAllKeysHandled } from "../../core/ask-origin.js";
32
32
  /** WHAT the judge found about a command — a closed set, registered in `docs/CLOSED-SETS.md`. */
33
33
  export declare const SHELL_READ_FINDINGS: readonly ["deny_hit", "outside_roots", "unestablishable", "declined", "identity_changed", "unanswered", "target_unavailable", "none"];
@@ -241,6 +241,17 @@ export interface ShellReadBoundary extends BashReadonlyRootBoundary {
241
241
  /** Does the row `writeDenyMatch` named (its rule) guard the READ face too — a `Read(…)` rule on the write face
242
242
  * ({@link import("./read-deny.js").WriteDenyMatcher.guardsReads})? Read once per hit, so the refusal says which family refused. */
243
243
  readonly writeDenyGuardsReads?: (pattern: string) => boolean;
244
+ /** The write table's rows named by or below a subtree removal/rename target (`WriteDenyMatcher.rowUnderRoot`). */
245
+ readonly writeDenyUnder?: (resolvedPath: string) => ReadDenyRootAnswer;
246
+ /** The write table's unanchored rows (`WriteDenyMatcher.unanchoredRows`, never empty here) and the first of them whose leading
247
+ * name one directory entry name matches (`WriteDenyMatcher.rowLedByName`): what the station searches a recursive removal's
248
+ * subtree for, under its own bound ({@link import("./shell-read-check.js").SUBTREE_SEARCH_MS}). PRESENT-IFF such a row. */
249
+ readonly writeDenyNamed?: {
250
+ readonly rows: readonly string[];
251
+ readonly ledBy: (entryName: string) => string | null;
252
+ };
253
+ /** The write table's rows AT or BELOW a path (`WriteDenyMatcher.rowAtOrBelow`): read by `writesPlaced` via {@link denyRowAtOrBelow}. */
254
+ readonly writeDenyAtOrBelow?: (resolvedPath: string) => string | null;
244
255
  /** The read table's rows AT or BELOW a path (`readDenySeat`'s `denyAtOrBelow`, read-deny.ts): read by the station's
245
256
  * `writesPlaced` fact only, through {@link denyRowAtOrBelow}. */
246
257
  readonly denyAtOrBelow?: (resolvedPath: string) => string | null;
@@ -355,6 +366,7 @@ export interface ReadFinding {
355
366
  readonly face?: "write";
356
367
  readonly readRow?: true;
357
368
  readonly under?: true;
369
+ readonly lookup?: ReadDenyFinding["lookup"];
358
370
  };
359
371
  /** A `deny_hit` on no row: the read's target is a process-private /proc file (`isProcSensitiveFile`, safety.ts — the set the
360
372
  * file read tools refuse), or a tree walk's root holds such files (`holdsProcSensitiveFile`); the view it was matched on. */
@@ -64,19 +64,32 @@ export function judgeRead(read, boundary) {
64
64
  if (pattern !== null)
65
65
  return { read, kind: "deny_hit", deny: { pattern, matchedView: folded, ...(writeTarget ? { face: "write", ...(boundary.writeDenyGuardsReads?.(pattern) === true ? { readRow: true } : {}) } : {}) }, containment: writeTarget ? writeContainmentOf(read, boundary) : containmentOf(read, boundary) };
66
66
  }
67
- if (!writeTarget && read.candidate.provenance === "traversal_root" && boundary.denyUnder !== undefined) {
67
+ const checksUnder = writeTarget ? read.candidate.subtree !== undefined && read.written !== undefined : read.candidate.provenance === "traversal_root";
68
+ const denyUnder = writeTarget ? boundary.writeDenyUnder : boundary.denyUnder;
69
+ if (checksUnder && denyUnder !== undefined) {
68
70
  let unplaced;
69
71
  for (const view of [...(read.target !== undefined ? [read.target] : []), ...read.spellings, ...(read.hops ?? [])]) {
70
72
  const folded = normalizeAbsPathLexically(view);
71
- const under = boundary.denyUnder(folded);
72
- if (typeof under === "string")
73
- return { read, kind: "deny_hit", deny: { pattern: under, matchedView: folded, under: true }, containment: containmentOf(read, boundary) };
73
+ const under = denyUnder(folded);
74
+ if (typeof under === "string") {
75
+ return {
76
+ read,
77
+ kind: "deny_hit",
78
+ deny: {
79
+ pattern: under,
80
+ matchedView: folded,
81
+ under: true,
82
+ ...(writeTarget ? { face: "write", ...(boundary.writeDenyGuardsReads?.(under) === true ? { readRow: true } : {}) } : {}),
83
+ },
84
+ containment: writeTarget ? writeContainmentOf(read, boundary) : containmentOf(read, boundary),
85
+ };
86
+ }
74
87
  if (under !== null && typeof under === "object")
75
88
  unplaced ??= under.unplaced;
76
89
  }
77
90
  if (unplaced !== undefined) {
78
91
  const cause = `the home-anchored deny row "${unplaced}" cannot be placed (no home directory is known for this environment), so "${read.target ?? read.candidate.spelled}" may hold it`;
79
- return { read: { ...read, cause }, kind: "unanswered", denyRowUnasked: true, containment: containmentOf(read, boundary) };
92
+ return { read: { ...read, cause }, kind: "unanswered", denyRowUnasked: true, containment: writeTarget ? writeContainmentOf(read, boundary) : containmentOf(read, boundary) };
80
93
  }
81
94
  }
82
95
  }
@@ -138,14 +151,20 @@ function personAllowAdmits(read, boundary) {
138
151
  return hit !== undefined && hit.unreadable === undefined;
139
152
  }
140
153
  export function denyRowAtOrBelow(read, boundary, carriesContent) {
141
- if (boundary.writeDenyMatch !== undefined)
154
+ const views = [...(read.target !== undefined ? [read.target] : []), ...read.spellings];
155
+ if (boundary.writeDenyAtOrBelow !== undefined) {
156
+ if (views.some((view) => boundary.writeDenyAtOrBelow(normalizeAbsPathLexically(view)) !== null))
157
+ return true;
158
+ }
159
+ else if (boundary.writeDenyMatch !== undefined) {
142
160
  return true;
161
+ }
143
162
  if (!carriesContent)
144
163
  return false;
145
164
  const atOrBelow = boundary.denyAtOrBelow;
146
165
  if (atOrBelow === undefined)
147
166
  return false;
148
- return [...(read.target !== undefined ? [read.target] : []), ...read.spellings].some((view) => atOrBelow(normalizeAbsPathLexically(view)) !== null);
167
+ return views.some((view) => atOrBelow(normalizeAbsPathLexically(view)) !== null);
149
168
  }
150
169
  export function denyFloorShadowsOf(candidates) {
151
170
  return candidates.flatMap((c) => (c.floorSpelled === undefined ? [] : [{ spelled: c.floorSpelled, raw: c.raw, provenance: c.provenance, expands: globInWord(readOfText(c.raw).word) ? "glob" : false, bases: [], denyOnly: true, ...(c.face !== undefined ? { face: c.face } : {}), ...(c.face === "write" && c.expands === "unresolvable" && !/[$`]/.test(c.floorSpelled) ? { twin: true } : {}) }]));
@@ -101,6 +101,11 @@ export interface ReadCandidate {
101
101
  /** A WRITE target (a `>`-family redirection, a `sed` `w` file, a file-writing command's operand): established like a
102
102
  * read, judged on the WRITE face — the write deny rows, then the write roots where written — never as a read. */
103
103
  readonly face?: "write";
104
+ /** On a write target: the command takes the entire subtree at this path with it — `removed` (`rm -r`, `find -delete`'s
105
+ * starting points) or `moved` (an `mv` source) — so a write-facing deny row whose location lies beneath it refuses the
106
+ * operation ({@link ShellReadBoundary.writeDenyUnder}); below a `removed` one an unanchored row is also searched for by
107
+ * name ({@link ShellReadBoundary.writeDenyNamed}). A moved subtree keeps its names, so an unanchored row still meets them. */
108
+ readonly subtree?: "removed" | "moved";
104
109
  /** A reading the station takes where no row says the program opens the word — a word of a program with no row, a
105
110
  * role only another implementation reads — so the filesystem decides it: `containment` = the spelling always meets
106
111
  * the deny rows and is a containment candidate only where it exists; `whole` = a whole word (`NAME=value`, an option
@@ -51,7 +51,7 @@ function writeOwnersOf(segment) {
51
51
  function writeTargetsOf(segment) {
52
52
  const out = [];
53
53
  const writeOnly = new Set();
54
- const write = (c, seats, written, child, onlyIf, through) => void out.push({ candidate: { ...c, face: "write", ...(through === true ? { through } : {}) }, ...(seats !== undefined ? { seats } : {}), ...(written !== undefined ? { written } : {}), ...(child === true ? { child } : {}), ...(onlyIf !== undefined ? { onlyIf } : {}) });
54
+ const write = (c, seats, written, child, onlyIf, through, subtree) => void out.push({ candidate: { ...c, face: "write", ...(through === true ? { through } : {}), ...(subtree !== undefined ? { subtree } : {}) }, ...(seats !== undefined ? { seats } : {}), ...(written !== undefined ? { written } : {}), ...(child === true ? { child } : {}), ...(onlyIf !== undefined ? { onlyIf } : {}) });
55
55
  for (const r of segment.redirects)
56
56
  if (r.direction === "out" && r.target !== undefined)
57
57
  write(r.target, undefined, undefined, undefined, undefined, true);
@@ -63,7 +63,8 @@ function writeTargetsOf(segment) {
63
63
  const all = writeReadings(row, args);
64
64
  const selected = implementationsOf(row).flatMap((view) => selectedOptions(view, args, "one-implementation"));
65
65
  const moved = [...new Set(selected.flatMap((o) => o.writesAt ?? []))];
66
- return { row, words, program, all, readings: all.filter((r) => r.written.length > 0 || (r.unexplained && r.operandRole !== undefined)), override: moved.length > 0 ? moved : undefined, beyondOperands: selected.some((o) => o.effect === "writes" || o.effect === "executes") };
66
+ const recursiveRemove = row.key === "rm" && selected.some((o) => o.selects === "traversal");
67
+ return { row, words, program, all, readings: all.filter((r) => r.written.length > 0 || (r.unexplained && r.operandRole !== undefined)), override: moved.length > 0 ? moved : undefined, beyondOperands: selected.some((o) => o.effect === "writes" || o.effect === "executes"), recursiveRemove };
67
68
  });
68
69
  const edited = new Map();
69
70
  for (const c of segment.reads) {
@@ -99,7 +100,8 @@ function writeTargetsOf(segment) {
99
100
  const seats = stated ? [...new Set(roles.flatMap((role) => o.override ?? role.seats ?? ["landing"]))] : undefined;
100
101
  const written = unexplained || roles.some((role) => role.writtenAt === undefined) ? undefined : [...new Set(roles.flatMap((role) => role.writtenAt ?? []))];
101
102
  const speculative = readings < o.all.length && roles.every((role) => role.effect === "edit-in-place") ? { candidate: c, holds: "present" } : undefined;
102
- write(c, seats, written, undefined, speculative, !unexplained && writesThrough(roles, o.row, o.words) ? true : undefined);
103
+ const subtree = o.recursiveRemove ? "removed" : o.row.key === "mv" && (unexplained || o.all.some((r) => r.copy !== undefined && r.copy.sources.some((idx) => at.has(idx)))) ? "moved" : undefined;
104
+ write(c, seats, written, undefined, speculative, !unexplained && writesThrough(roles, o.row, o.words) ? true : undefined, subtree);
103
105
  if (roles.some((role) => role.effect === "edit-in-place") && c.expands === false)
104
106
  edited.set(o, [...(edited.get(o) ?? []), { candidate: c, ...(speculative !== undefined ? { onlyIf: speculative } : {}) }]);
105
107
  }
@@ -107,12 +109,12 @@ function writeTargetsOf(segment) {
107
109
  writeOnly.add(c);
108
110
  }
109
111
  for (const o of owners) {
110
- for (const c of copyDestinationChildren(segment, o.row, o.words, o.all))
111
- write(c, ["landing", "entry"], undefined, true);
112
+ for (const { candidate, onlyIf } of copyDestinationChildren(segment, o.row, o.words, o.all))
113
+ write(candidate, ["landing", "entry"], undefined, true, onlyIf);
112
114
  out.push(...backupTargetsOf(edited.get(o) ?? [], o.readings, o.override));
113
115
  }
114
116
  for (const c of walkRemovalTargetsOf(segment))
115
- write(c, ["landing", "entry"]);
117
+ write(c, ["landing", "entry"], undefined, undefined, undefined, undefined, "removed");
116
118
  const readWords = new Set();
117
119
  for (const o of owners) {
118
120
  if (!o.program)
@@ -140,6 +142,11 @@ function copyDestinationChildren(segment, row, words, readings) {
140
142
  const candidateOf = (raw) => segment.reads.find((c) => c.raw === raw && WORD_PROVENANCES.has(c.provenance));
141
143
  const start = segment.programStart;
142
144
  const children = new Map();
145
+ const keep = (key, candidate, onlyIf) => {
146
+ const prev = children.get(key);
147
+ if (prev === undefined || (prev.onlyIf !== undefined && onlyIf === undefined))
148
+ children.set(key, onlyIf !== undefined ? { candidate, onlyIf } : { candidate });
149
+ };
143
150
  for (const r of readings) {
144
151
  if (r.copy === undefined)
145
152
  continue;
@@ -152,18 +159,19 @@ function copyDestinationChildren(segment, row, words, readings) {
152
159
  const destRole = r.written.find((w) => w.at === destination?.at)?.role;
153
160
  if (destCandidate !== undefined && destRole !== undefined && passesUnasked({ ...destCandidate, face: "write", ...(writesThrough([destRole], row, words) ? { through: true } : {}) }))
154
161
  continue;
162
+ const destDirFact = destination !== undefined && destCandidate !== undefined ? { candidate: destCandidate, holds: "directory" } : undefined;
155
163
  for (const at of sources) {
156
164
  const src = words[at];
157
165
  const source = candidateOf(src.raw);
158
166
  if (source !== undefined && source.expands !== false) {
159
167
  if (destination !== undefined)
160
168
  continue;
161
- children.set(`\0${source.raw}`, source);
169
+ keep(`\0${source.raw}`, source);
162
170
  }
163
171
  const child = `${dest.spelled.replace(/\/+$/, "")}/${src.spelled.replace(/\/+$/, "").split("/").pop() ?? ""}`;
164
- if (child.endsWith("/") || children.has(child))
172
+ if (child.endsWith("/"))
165
173
  continue;
166
- children.set(child, destCandidate !== undefined && source !== undefined ? renamed(destCandidate, child) : { spelled: child, raw: src.raw, provenance: "unlisted_word", expands: "unresolvable", bases: [] });
174
+ keep(child, destCandidate !== undefined && source !== undefined ? renamed(destCandidate, child) : { spelled: child, raw: src.raw, provenance: "unlisted_word", expands: "unresolvable", bases: [] }, destDirFact);
167
175
  }
168
176
  }
169
177
  return [...children.values()];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/core",
3
- "version": "7.72.0",
3
+ "version": "7.73.0",
4
4
  "description": "Stateless, task-oriented AI agent core",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",
@@ -141,7 +141,7 @@
141
141
  "dependencies": {
142
142
  "@modelcontextprotocol/client": "2.4.0",
143
143
  "@modelcontextprotocol/core": "2.4.0",
144
- "@sema-agent/primitives": "7.72.0",
144
+ "@sema-agent/primitives": "7.73.0",
145
145
  "typebox": "1.1.39",
146
146
  "undici": "7.30.2"
147
147
  },