vouchington-tooling 0.35.0 → 0.36.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 (532) hide show
  1. package/README.md +24 -221
  2. package/dist/agent-blackboard/feedback-audit-source.mjs +2 -2
  3. package/dist/agent-blackboard/feedback-canonical.mjs +1 -1
  4. package/dist/agent-blackboard/feedback-codec.mjs +3 -3
  5. package/dist/agent-blackboard/feedback-compose.mjs +5 -5
  6. package/dist/agent-blackboard/feedback-deadline.mjs +1 -1
  7. package/dist/agent-blackboard/feedback-delivery.mjs +6 -6
  8. package/dist/agent-blackboard/feedback-fields.mjs +1 -1
  9. package/dist/agent-blackboard/feedback-identity.mjs +3 -3
  10. package/dist/agent-blackboard/feedback-journal-audit.mjs +4 -4
  11. package/dist/agent-blackboard/feedback-journal-sandbox.mjs +1 -1
  12. package/dist/agent-blackboard/feedback-online-error.mjs +1 -1
  13. package/dist/agent-blackboard/feedback-online.mjs +7 -7
  14. package/dist/agent-blackboard/feedback-outbox-counts.mjs +2 -2
  15. package/dist/agent-blackboard/feedback-outbox.mjs +7 -7
  16. package/dist/agent-blackboard/index.mjs +13 -13
  17. package/dist/agent-blackboard/journal.mjs +3 -3
  18. package/dist/agent-blackboard/session-tools.mjs +4 -4
  19. package/dist/agent-blackboard/snapshot-cleanup-directory.mjs +3 -3
  20. package/dist/agent-blackboard/snapshot-cleanup-receipt.mjs +1 -1
  21. package/dist/agent-blackboard/snapshot-cleanup-resume.mjs +2 -2
  22. package/dist/agent-blackboard/snapshot-partition-cleanup.mjs +3 -3
  23. package/dist/agent-blackboard/snapshot-partition-format.mjs +3 -3
  24. package/dist/agent-blackboard/snapshot-partition-predicates.mjs +2 -2
  25. package/dist/agent-blackboard/snapshot-partition-read.mjs +2 -2
  26. package/dist/agent-blackboard/snapshot-partition-validate.mjs +2 -2
  27. package/dist/agent-blackboard/snapshot-partition-write.mjs +2 -2
  28. package/dist/agent-blackboard/snapshot-partitions.mjs +4 -4
  29. package/dist/agent-blackboard/snapshot.mjs +2 -2
  30. package/dist/agent-harness-identity/index.d.mts +1 -1
  31. package/dist/api-fixtures/fixture-contract-validation.mjs +1 -1
  32. package/dist/api-fixtures/index.mjs +3 -3
  33. package/dist/ast-grep-examples/companion-parity.mjs +1 -1
  34. package/dist/ast-grep-examples/index.mjs +1 -1
  35. package/dist/basic-auth-doc-sync/index.mjs +2 -2
  36. package/dist/basic-auth-doc-sync/runbook.mjs +4 -4
  37. package/dist/basic-auth-doc-sync/source.mjs +2 -2
  38. package/dist/browser-session-runner/attempt.mjs +5 -5
  39. package/dist/browser-session-runner/index.mjs +4 -4
  40. package/dist/browser-session-runner/output.mjs +1 -1
  41. package/dist/ci-local/index.mjs +2 -2
  42. package/dist/cli/commands/agent-blackboard-flags.mjs +1 -1
  43. package/dist/cli/commands/agent-blackboard.mjs +3 -3
  44. package/dist/cli/commands/ast-grep-examples.mjs +1 -1
  45. package/dist/cli/commands/ast-grep-pack.mjs +1 -1
  46. package/dist/cli/commands/gha-artifacts-cleanup.mjs +1 -1
  47. package/dist/cli/commands/gha-runtime-audit.mjs +1 -1
  48. package/dist/cli/commands/gha-workspace-policy.mjs +2 -2
  49. package/dist/cli/commands/http-origin.mjs +1 -1
  50. package/dist/cli/commands/link-skill.mjs +1 -1
  51. package/dist/cli/commands/mcp.mjs +2 -2
  52. package/dist/cli/commands/nuget-central-version.mjs +1 -1
  53. package/dist/cli/commands/pnpm-install.mjs +1 -1
  54. package/dist/cli/commands/prepare-vitest-reports.mjs +1 -1
  55. package/dist/cli/commands/require-up-to-date.mjs +1 -1
  56. package/dist/cli/commands/retrospective-facts.mjs +1 -1
  57. package/dist/cli/commands/retrospective-transcript.mjs +1 -1
  58. package/dist/cli/commands/runner-port-policy.mjs +1 -1
  59. package/dist/cli/commands/vitest-blob-manifest.mjs +1 -1
  60. package/dist/cli/commands/vitest-report-attempt.mjs +1 -1
  61. package/dist/cli/index.mjs +27 -27
  62. package/dist/cli/installed-version.mjs +1 -1
  63. package/dist/cli/parse-gha-runtime-audit.mjs +1 -1
  64. package/dist/cli/parse-options.mjs +2 -2
  65. package/dist/cli/parse.mjs +5 -5
  66. package/dist/compiler-build/index.mjs +3 -3
  67. package/dist/compiler-build/program.mjs +3 -3
  68. package/dist/config-inventory/collect.mjs +5 -5
  69. package/dist/config-inventory/dynamic-configs.mjs +1 -1
  70. package/dist/config-inventory/env-expression-readers.mjs +1 -1
  71. package/dist/config-inventory/env-prefix-readers.mjs +2 -2
  72. package/dist/config-inventory/env-var-accumulator.mjs +1 -1
  73. package/dist/config-inventory/env-vars.mjs +5 -5
  74. package/dist/config-inventory/index.mjs +2 -2
  75. package/dist/contract-schema/contract-schema-bounded-array.mjs +2 -2
  76. package/dist/contract-schema/contract-schema-extractor.mjs +3 -3
  77. package/dist/contract-schema/contract-schema-object-tuple.mjs +2 -2
  78. package/dist/contract-schema/contract-schema-type-extractor.mjs +5 -5
  79. package/dist/contract-schema/contract-schema-type-utils.mjs +2 -2
  80. package/dist/contract-schema/contract-schema-validator.mjs +1 -1
  81. package/dist/contract-schema/index.mjs +7 -7
  82. package/dist/contract-schema/type-query-call.mjs +3 -3
  83. package/dist/contract-schema/type-query.mjs +2 -2
  84. package/dist/contract-schema/virtual-program.mjs +1 -1
  85. package/dist/coverage-transport/control-v2-parse-object.mjs +2 -2
  86. package/dist/coverage-transport/control-v2.mjs +4 -4
  87. package/dist/coverage-transport/control.mjs +2 -2
  88. package/dist/coverage-transport/discovery.mjs +4 -4
  89. package/dist/coverage-transport/http.mjs +1 -1
  90. package/dist/coverage-transport/index.mjs +10 -10
  91. package/dist/coverage-transport/keys.mjs +1 -1
  92. package/dist/coverage-transport/lib.mjs +6 -6
  93. package/dist/coverage-transport/prefix-transfer.mjs +4 -4
  94. package/dist/coverage-transport/prefix.mjs +3 -3
  95. package/dist/coverage-transport/presign.mjs +1 -1
  96. package/dist/coverage-transport/vitest-blob-transport.mjs +2 -2
  97. package/dist/dependency-license-policy/collect.mjs +5 -5
  98. package/dist/dependency-license-policy/index.mjs +3 -3
  99. package/dist/dependency-license-policy/policy.mjs +1 -1
  100. package/dist/dependency-license-policy/workspace.mjs +1 -1
  101. package/dist/dockerfile-parse/index.mjs +2 -2
  102. package/dist/dockerfile-parse/prewarm-ports.mjs +1 -1
  103. package/dist/dockerfile-parse/runtime-cmd.mjs +2 -2
  104. package/dist/finite-enum-ripple/check.mjs +3 -3
  105. package/dist/finite-enum-ripple/compare.mjs +2 -2
  106. package/dist/finite-enum-ripple/component-paths.mjs +2 -2
  107. package/dist/finite-enum-ripple/configured-object-mutations.mjs +1 -1
  108. package/dist/finite-enum-ripple/create-page-jsx.mjs +1 -1
  109. package/dist/finite-enum-ripple/create-page-literals.mjs +4 -4
  110. package/dist/finite-enum-ripple/create-page-object-visitor.mjs +2 -2
  111. package/dist/finite-enum-ripple/create-page-properties.mjs +1 -1
  112. package/dist/finite-enum-ripple/index.mjs +1 -1
  113. package/dist/finite-enum-ripple/parser-support.mjs +2 -2
  114. package/dist/finite-enum-ripple/parsers.mjs +3 -3
  115. package/dist/finite-enum-ripple/structured-route-check.mjs +4 -4
  116. package/dist/finite-enum-ripple/types.mjs +3 -3
  117. package/dist/finite-enum-ripple/union-factory-check.mjs +2 -2
  118. package/dist/finite-enum-ripple/union-types.mjs +4 -4
  119. package/dist/gh-api-shell-quoting/index.mjs +2 -2
  120. package/dist/gh-api-shell-quoting/logical-line.mjs +1 -1
  121. package/dist/gh-api-shell-quoting/scan.mjs +1 -1
  122. package/dist/gh-api-shell-quoting/yaml.mjs +1 -1
  123. package/dist/gh-cli/index.mjs +4 -4
  124. package/dist/gha-artifacts-cleanup/commands.mjs +2 -2
  125. package/dist/gha-artifacts-cleanup/index.mjs +4 -4
  126. package/dist/gha-check-run/cli.mjs +2 -2
  127. package/dist/gha-check-run/index.mjs +2 -2
  128. package/dist/gha-claude-post-review/index.mjs +2 -2
  129. package/dist/gha-post-review/claude-token.d.mts +2 -2
  130. package/dist/gha-post-review/claude-token.mjs +1 -1
  131. package/dist/gha-post-review/cli.mjs +1 -1
  132. package/dist/gha-post-review/github.mjs +7 -7
  133. package/dist/gha-post-review/index.mjs +6 -6
  134. package/dist/gha-post-review/post.mjs +2 -2
  135. package/dist/gha-post-review/pull-io.mjs +1 -1
  136. package/dist/gha-post-review/token.mjs +1 -1
  137. package/dist/gha-pr-checkpoint/index.mjs +3 -3
  138. package/dist/gha-pr-checkpoint/resume.mjs +1 -1
  139. package/dist/gha-pr-checkpoint/update.mjs +1 -1
  140. package/dist/gha-review-payload/cli.mjs +2 -2
  141. package/dist/gha-review-payload/file.mjs +1 -1
  142. package/dist/gha-review-payload/index.mjs +4 -4
  143. package/dist/gha-review-payload/remap.mjs +1 -1
  144. package/dist/gha-runtime-audit/audit.mjs +4 -4
  145. package/dist/gha-runtime-audit/index.mjs +3 -3
  146. package/dist/gha-workspace-policy/docker-options.mjs +1 -1
  147. package/dist/gha-workspace-policy/docker-workspace-user.mjs +2 -2
  148. package/dist/gha-workspace-policy/index.mjs +3 -3
  149. package/dist/gha-workspace-policy/shell-tokens.mjs +1 -1
  150. package/dist/gha-workspace-policy/sparse-checkout.mjs +1 -1
  151. package/dist/github-projects/index.mjs +2 -2
  152. package/dist/github-projects/project-audit.mjs +1 -1
  153. package/dist/index.mjs +55 -55
  154. package/dist/markdown/content-facts.mjs +1 -1
  155. package/dist/markdown/document-sections.mjs +2 -2
  156. package/dist/markdown/html-blocks.mjs +1 -1
  157. package/dist/markdown/index.mjs +10 -10
  158. package/dist/markdown/sections.mjs +2 -2
  159. package/dist/markdown/tables.mjs +2 -2
  160. package/dist/markdown/tasks.mjs +1 -1
  161. package/dist/mcp-server/context.mjs +2 -2
  162. package/dist/mcp-server/dispatch.mjs +8 -8
  163. package/dist/mcp-server/git-fixture.test-helpers.mjs +1 -1
  164. package/dist/mcp-server/handlers-journal.mjs +4 -4
  165. package/dist/mcp-server/handlers-outbox.mjs +2 -2
  166. package/dist/mcp-server/handlers-session.mjs +3 -3
  167. package/dist/mcp-server/harness.test-helpers.mjs +4 -4
  168. package/dist/mcp-server/main.mjs +1 -1
  169. package/dist/mcp-server/run.mjs +3 -3
  170. package/dist/mcp-server/sdk.mjs +1 -1
  171. package/dist/mcp-server/server.mjs +2 -2
  172. package/dist/mcp-server/worktree.mjs +2 -2
  173. package/dist/nuget-central-version/cli.mjs +1 -1
  174. package/dist/openapi-document/build-openapi-catalog-sse.mjs +1 -1
  175. package/dist/openapi-document/build-openapi-document.mjs +8 -8
  176. package/dist/openapi-document/build-openapi-request.mjs +1 -1
  177. package/dist/openapi-document/build-openapi-response.mjs +3 -3
  178. package/dist/openapi-document/build-openapi-sse-events.mjs +1 -1
  179. package/dist/openapi-document/component-registry.mjs +1 -1
  180. package/dist/openapi-document/contract-schema-intersection-merge.mjs +1 -1
  181. package/dist/openapi-document/contract-schema-to-openapi.mjs +1 -1
  182. package/dist/openapi-document/index.mjs +12 -12
  183. package/dist/openapi-document/openapi-route-helpers.mjs +1 -1
  184. package/dist/pg-schema-snapshot/build-snapshot.mjs +3 -3
  185. package/dist/pg-schema-snapshot/catalog-objects.mjs +1 -1
  186. package/dist/pg-schema-snapshot/catalog-queries.mjs +4 -4
  187. package/dist/pg-schema-snapshot/catalog-table-constraints.mjs +1 -1
  188. package/dist/pg-schema-snapshot/catalog-table-indexes.mjs +1 -1
  189. package/dist/pg-schema-snapshot/catalog-tables.mjs +1 -1
  190. package/dist/pg-schema-snapshot/generate.mjs +5 -5
  191. package/dist/pg-schema-snapshot/index.mjs +6 -6
  192. package/dist/pg-schema-snapshot/markdown-files.mjs +1 -1
  193. package/dist/pg-schema-snapshot/render-markdown.mjs +1 -1
  194. package/dist/pg-schema-snapshot/table-snapshot-constraints.mjs +1 -1
  195. package/dist/pg-schema-snapshot/table-snapshot.mjs +3 -3
  196. package/dist/pnpm-deploy/index.mjs +3 -3
  197. package/dist/pnpm-deploy/restore.mjs +1 -1
  198. package/dist/pnpm-install/exec.mjs +1 -1
  199. package/dist/pnpm-install/index.mjs +8 -8
  200. package/dist/pnpm-install/install-operations.mjs +6 -6
  201. package/dist/pnpm-install/metadata-legacy.mjs +1 -1
  202. package/dist/pnpm-install/metadata.d.mts +1 -1
  203. package/dist/pnpm-install/metadata.mjs +2 -2
  204. package/dist/pnpm-install/native-health.mjs +2 -2
  205. package/dist/pnpm-install/pnpm-install-fixture.test-helpers.mjs +2 -2
  206. package/dist/pnpm-install/runner.mjs +7 -7
  207. package/dist/post-publication-inventory/index.d.mts +6 -0
  208. package/dist/post-publication-inventory/index.mjs +6 -2
  209. package/dist/post-publication-inventory/readers/compose-appends.d.mts +7 -0
  210. package/dist/post-publication-inventory/readers/compose-appends.mjs +38 -0
  211. package/dist/post-publication-inventory/readers/composes.d.mts +2 -0
  212. package/dist/post-publication-inventory/readers/composes.mjs +79 -0
  213. package/dist/post-publication-inventory/readers/composition.d.mts +2 -0
  214. package/dist/post-publication-inventory/readers/composition.mjs +62 -0
  215. package/dist/post-publication-inventory/readers/public-boundary-ast.d.mts +5 -0
  216. package/dist/post-publication-inventory/readers/public-boundary-ast.mjs +33 -0
  217. package/dist/post-publication-inventory/readers/public-boundary-consumed.d.mts +3 -0
  218. package/dist/post-publication-inventory/readers/public-boundary-consumed.mjs +39 -0
  219. package/dist/post-publication-inventory/readers/public-boundary-dataflow.d.mts +3 -0
  220. package/dist/post-publication-inventory/readers/public-boundary-dataflow.mjs +61 -0
  221. package/dist/post-publication-inventory/readers/public-boundary-then.d.mts +9 -0
  222. package/dist/post-publication-inventory/readers/public-boundary-then.mjs +31 -0
  223. package/dist/post-publication-inventory/readers/public-boundary.d.mts +3 -0
  224. package/dist/post-publication-inventory/readers/public-boundary.mjs +71 -0
  225. package/dist/post-publication-inventory/readers/public-view-ast.d.mts +6 -0
  226. package/dist/post-publication-inventory/readers/public-view-ast.mjs +67 -0
  227. package/dist/post-publication-inventory/readers/public-view-options.d.mts +8 -0
  228. package/dist/post-publication-inventory/readers/public-view-protection.d.mts +2 -0
  229. package/dist/post-publication-inventory/readers/public-view-protection.mjs +83 -0
  230. package/dist/post-publication-inventory/readers/public-view.d.mts +2 -0
  231. package/dist/post-publication-inventory/readers/public-view.mjs +117 -0
  232. package/dist/post-publication-inventory/readers/source-ast.d.mts +30 -0
  233. package/dist/post-publication-inventory/readers/source-ast.mjs +52 -0
  234. package/dist/post-publication-inventory/readers/source-executors.d.mts +4 -0
  235. package/dist/post-publication-inventory/readers/source-executors.mjs +38 -0
  236. package/dist/post-publication-inventory/readers/source-helpers.d.mts +16 -0
  237. package/dist/post-publication-inventory/readers/source-helpers.mjs +72 -0
  238. package/dist/post-publication-inventory/readers/source-options.d.mts +8 -0
  239. package/dist/post-publication-inventory/readers/source-sql.d.mts +3 -0
  240. package/dist/post-publication-inventory/readers/source-sql.mjs +17 -0
  241. package/dist/post-publication-inventory/readers/sql-executors.mjs +2 -2
  242. package/dist/post-publication-inventory/readers/sql-source.mjs +3 -3
  243. package/dist/post-publication-inventory/readers/sql-template.mjs +1 -1
  244. package/dist/post-publication-inventory/writers/source.mjs +1 -1
  245. package/dist/retrospective-facts/coverage.mjs +1 -1
  246. package/dist/retrospective-facts/foreign.mjs +3 -3
  247. package/dist/retrospective-facts/index.mjs +4 -4
  248. package/dist/retrospective-facts/local.mjs +4 -4
  249. package/dist/retrospective-transcript/claude-blocks.mjs +1 -1
  250. package/dist/retrospective-transcript/claude.mjs +2 -2
  251. package/dist/retrospective-transcript/codex-messages.mjs +1 -1
  252. package/dist/retrospective-transcript/codex-payload.mjs +2 -2
  253. package/dist/retrospective-transcript/codex-records.mjs +3 -3
  254. package/dist/retrospective-transcript/codex-segment.mjs +1 -1
  255. package/dist/retrospective-transcript/codex.mjs +2 -2
  256. package/dist/retrospective-transcript/index.mjs +9 -9
  257. package/dist/retrospective-transcript/resolve-transcript-file.mjs +2 -2
  258. package/dist/scc-complexity/baseline.mjs +2 -2
  259. package/dist/scc-complexity/index.mjs +8 -8
  260. package/dist/scc-complexity/parser.mjs +1 -1
  261. package/dist/scc-complexity/scope-config.mjs +1 -1
  262. package/dist/session-friction/audit-block.mjs +1 -1
  263. package/dist/session-friction/ci-failures.mjs +2 -2
  264. package/dist/session-friction/classify.mjs +2 -2
  265. package/dist/session-friction/coverage-ledger.mjs +1 -1
  266. package/dist/session-friction/index.mjs +5 -5
  267. package/dist/session-friction/log-file.mjs +2 -2
  268. package/dist/session-friction/log.mjs +7 -7
  269. package/dist/session-friction/normalize.mjs +1 -1
  270. package/dist/session-friction/report.mjs +5 -5
  271. package/dist/session-friction/sandbox.mjs +1 -1
  272. package/dist/session-friction/session-id.mjs +1 -1
  273. package/dist/shared-context/index.mjs +1 -1
  274. package/dist/skill-discovery/index.mjs +3 -3
  275. package/dist/sql-ast/add-column.mjs +1 -1
  276. package/dist/sql-ast/constraint-do-block.mjs +2 -2
  277. package/dist/sql-ast/constraint-shared.mjs +1 -1
  278. package/dist/sql-ast/constraint.mjs +4 -4
  279. package/dist/sql-ast/create-table.mjs +2 -2
  280. package/dist/sql-ast/drop-index.mjs +2 -2
  281. package/dist/sql-ast/implicit-indexes.mjs +1 -1
  282. package/dist/sql-ast/index-metadata.mjs +3 -3
  283. package/dist/sql-ast/index.mjs +8 -8
  284. package/dist/sql-scanner/comments.mjs +1 -1
  285. package/dist/sql-scanner/index.mjs +3 -3
  286. package/dist/sql-scanner/literals.mjs +1 -1
  287. package/dist/swift-semantic-equal/cli.mjs +1 -1
  288. package/dist/swift-semantic-equal/index.mjs +1 -1
  289. package/dist/transient-retry/index.mjs +2 -2
  290. package/dist/vitest-blob-manifest/cli.mjs +2 -2
  291. package/dist/vitest-blob-manifest/index.mjs +4 -4
  292. package/dist/vitest-blob-manifest/report-attempt-cli.mjs +2 -2
  293. package/dist/vitest-blob-manifest/report-attempt.mjs +1 -1
  294. package/dist/vitest-blob-manifest/reports-cli.mjs +3 -3
  295. package/dist/vitest-blob-manifest/reports-source.mjs +2 -2
  296. package/dist/vitest-blob-manifest/reports.mjs +2 -2
  297. package/dist/vitest-diagnostics/index.mjs +8 -8
  298. package/dist/vitest-diagnostics/vitest-fork-exit-records.mjs +1 -1
  299. package/dist/vitest-diagnostics/vitest-fork-exit-sentinel.mjs +2 -2
  300. package/dist/vitest-diagnostics/vitest-fork-leak-detection.mjs +2 -2
  301. package/dist/vitest-diagnostics/vitest-worker-exit-diagnostics-reporter.mjs +2 -2
  302. package/dist/workflow-policy/condition-entailment.mjs +1 -1
  303. package/dist/workflow-policy/index.mjs +4 -4
  304. package/dist/workflow-policy/permission-inheritance.mjs +1 -1
  305. package/dist/workflow-policy/permission-mismatches.mjs +2 -2
  306. package/dist/workflow-policy/secret-readiness.mjs +2 -2
  307. package/dist/workspace-gates/first-party-graph.mjs +2 -2
  308. package/dist/workspace-gates/index.mjs +1 -1
  309. package/dist/workspace-gates/manifest-version-assertions.mjs +2 -2
  310. package/dist/workspace-gates/manifest-version-parser.mjs +1 -1
  311. package/dist/workspace-gates/options.mjs +1 -1
  312. package/dist/workspace-gates/policy.mjs +7 -7
  313. package/dist/workspace-gates/test-helpers.d.mts +2 -2
  314. package/package.json +3 -6
  315. package/dist/api-contract-discovery/header-contract-parser.d.mts +0 -3
  316. package/dist/api-contract-discovery/header-contract-parser.mjs +0 -93
  317. package/dist/api-contract-discovery/header-contract-registry.d.mts +0 -3
  318. package/dist/api-contract-discovery/header-contract-registry.mjs +0 -40
  319. package/dist/api-contract-discovery/header-contract-types.d.mts +0 -19
  320. package/dist/api-contract-discovery/index.d.mts +0 -34
  321. package/dist/api-contract-discovery/index.mjs +0 -27
  322. package/dist/api-contract-discovery/protocol-analysis-cache.d.mts +0 -21
  323. package/dist/api-contract-discovery/protocol-analysis-cache.mjs +0 -7
  324. package/dist/api-contract-discovery/protocol-body-status.d.mts +0 -2
  325. package/dist/api-contract-discovery/protocol-body-status.mjs +0 -4
  326. package/dist/api-contract-discovery/protocol-callback-argument-bindings.d.mts +0 -7
  327. package/dist/api-contract-discovery/protocol-callback-argument-bindings.mjs +0 -33
  328. package/dist/api-contract-discovery/protocol-callback-invocation.d.mts +0 -6
  329. package/dist/api-contract-discovery/protocol-callback-invocation.mjs +0 -111
  330. package/dist/api-contract-discovery/protocol-callback-mutations.d.mts +0 -5
  331. package/dist/api-contract-discovery/protocol-callback-mutations.mjs +0 -42
  332. package/dist/api-contract-discovery/protocol-callback-registration.d.mts +0 -3
  333. package/dist/api-contract-discovery/protocol-callback-registration.mjs +0 -27
  334. package/dist/api-contract-discovery/protocol-callback-values.d.mts +0 -18
  335. package/dist/api-contract-discovery/protocol-callback-values.mjs +0 -114
  336. package/dist/api-contract-discovery/protocol-context-alias.d.mts +0 -3
  337. package/dist/api-contract-discovery/protocol-context-alias.mjs +0 -20
  338. package/dist/api-contract-discovery/protocol-contract-extraction.d.mts +0 -9
  339. package/dist/api-contract-discovery/protocol-contract-extraction.mjs +0 -87
  340. package/dist/api-contract-discovery/protocol-contract-keys.d.mts +0 -1
  341. package/dist/api-contract-discovery/protocol-contract-keys.mjs +0 -8
  342. package/dist/api-contract-discovery/protocol-contract-registry.d.mts +0 -5
  343. package/dist/api-contract-discovery/protocol-contract-registry.mjs +0 -133
  344. package/dist/api-contract-discovery/protocol-executable-path.d.mts +0 -3
  345. package/dist/api-contract-discovery/protocol-executable-path.mjs +0 -64
  346. package/dist/api-contract-discovery/protocol-execution-path.d.mts +0 -4
  347. package/dist/api-contract-discovery/protocol-execution-path.mjs +0 -16
  348. package/dist/api-contract-discovery/protocol-http-association.d.mts +0 -7
  349. package/dist/api-contract-discovery/protocol-http-association.mjs +0 -108
  350. package/dist/api-contract-discovery/protocol-http-body-kinds.d.mts +0 -3
  351. package/dist/api-contract-discovery/protocol-http-body-kinds.mjs +0 -19
  352. package/dist/api-contract-discovery/protocol-http-context-callers.d.mts +0 -7
  353. package/dist/api-contract-discovery/protocol-http-context-callers.mjs +0 -40
  354. package/dist/api-contract-discovery/protocol-http-context-escapes.d.mts +0 -3
  355. package/dist/api-contract-discovery/protocol-http-context-escapes.mjs +0 -95
  356. package/dist/api-contract-discovery/protocol-http-context.d.mts +0 -8
  357. package/dist/api-contract-discovery/protocol-http-context.mjs +0 -85
  358. package/dist/api-contract-discovery/protocol-http-emission.d.mts +0 -3
  359. package/dist/api-contract-discovery/protocol-http-emission.mjs +0 -76
  360. package/dist/api-contract-discovery/protocol-http-implicit-taint.d.mts +0 -7
  361. package/dist/api-contract-discovery/protocol-http-implicit-taint.mjs +0 -26
  362. package/dist/api-contract-discovery/protocol-http-method-access.d.mts +0 -9
  363. package/dist/api-contract-discovery/protocol-http-method-access.mjs +0 -34
  364. package/dist/api-contract-discovery/protocol-http-method-mutations.d.mts +0 -3
  365. package/dist/api-contract-discovery/protocol-http-method-mutations.mjs +0 -31
  366. package/dist/api-contract-discovery/protocol-http-reflect.d.mts +0 -5
  367. package/dist/api-contract-discovery/protocol-http-reflect.mjs +0 -45
  368. package/dist/api-contract-discovery/protocol-http-registration.d.mts +0 -12
  369. package/dist/api-contract-discovery/protocol-http-registration.mjs +0 -53
  370. package/dist/api-contract-discovery/protocol-http-response-mutations.d.mts +0 -3
  371. package/dist/api-contract-discovery/protocol-http-response-mutations.mjs +0 -31
  372. package/dist/api-contract-discovery/protocol-marker-analysis.d.mts +0 -7
  373. package/dist/api-contract-discovery/protocol-marker-analysis.mjs +0 -50
  374. package/dist/api-contract-discovery/protocol-opaque-callback.d.mts +0 -3
  375. package/dist/api-contract-discovery/protocol-opaque-callback.mjs +0 -107
  376. package/dist/api-contract-discovery/protocol-platform-callbacks.d.mts +0 -7
  377. package/dist/api-contract-discovery/protocol-platform-callbacks.mjs +0 -76
  378. package/dist/api-contract-discovery/protocol-platform-mutation-targets.d.mts +0 -5
  379. package/dist/api-contract-discovery/protocol-platform-mutation-targets.mjs +0 -89
  380. package/dist/api-contract-discovery/protocol-platform-writes.d.mts +0 -3
  381. package/dist/api-contract-discovery/protocol-platform-writes.mjs +0 -92
  382. package/dist/api-contract-discovery/protocol-requested-keys.d.mts +0 -5
  383. package/dist/api-contract-discovery/protocol-requested-keys.mjs +0 -45
  384. package/dist/api-contract-discovery/protocol-sse-callers.d.mts +0 -7
  385. package/dist/api-contract-discovery/protocol-sse-callers.mjs +0 -67
  386. package/dist/api-contract-discovery/protocol-sse-emission.d.mts +0 -11
  387. package/dist/api-contract-discovery/protocol-sse-emission.mjs +0 -61
  388. package/dist/api-contract-discovery/protocol-sse-feasible-status.d.mts +0 -3
  389. package/dist/api-contract-discovery/protocol-sse-feasible-status.mjs +0 -24
  390. package/dist/api-contract-discovery/protocol-sse-raw-writes.d.mts +0 -9
  391. package/dist/api-contract-discovery/protocol-sse-raw-writes.mjs +0 -99
  392. package/dist/api-contract-discovery/protocol-sse-status.d.mts +0 -3
  393. package/dist/api-contract-discovery/protocol-sse-status.mjs +0 -84
  394. package/dist/api-contract-discovery/protocol-sse-write-access.d.mts +0 -9
  395. package/dist/api-contract-discovery/protocol-sse-write-access.mjs +0 -42
  396. package/dist/api-contract-discovery/protocol-sse-write-helpers.d.mts +0 -7
  397. package/dist/api-contract-discovery/protocol-sse-write-helpers.mjs +0 -82
  398. package/dist/api-contract-discovery/protocol-sse-write-mutations.d.mts +0 -9
  399. package/dist/api-contract-discovery/protocol-sse-write-mutations.mjs +0 -42
  400. package/dist/api-contract-discovery/protocol-sse-write-resolution.d.mts +0 -14
  401. package/dist/api-contract-discovery/protocol-sse-write-resolution.mjs +0 -79
  402. package/dist/api-contract-discovery/protocol-status-dominance.d.mts +0 -5
  403. package/dist/api-contract-discovery/protocol-status-dominance.mjs +0 -35
  404. package/dist/api-contract-discovery/protocol-write-receiver.d.mts +0 -9
  405. package/dist/api-contract-discovery/protocol-write-receiver.mjs +0 -79
  406. package/dist/api-contract-discovery/query-contract-extraction.d.mts +0 -3
  407. package/dist/api-contract-discovery/query-contract-extraction.mjs +0 -82
  408. package/dist/api-contract-discovery/query-contract-literals.d.mts +0 -13
  409. package/dist/api-contract-discovery/query-contract-literals.mjs +0 -83
  410. package/dist/api-contract-discovery/query-contract-registry.d.mts +0 -3
  411. package/dist/api-contract-discovery/query-contract-registry.mjs +0 -70
  412. package/dist/api-contract-discovery/query-contract-types.d.mts +0 -8
  413. package/dist/api-contract-discovery/registered-route-binding-writes.d.mts +0 -4
  414. package/dist/api-contract-discovery/registered-route-binding-writes.mjs +0 -47
  415. package/dist/api-contract-discovery/registered-route-catalog.d.mts +0 -10
  416. package/dist/api-contract-discovery/registered-route-catalog.mjs +0 -85
  417. package/dist/api-contract-discovery/registered-route-factory-returns.d.mts +0 -3
  418. package/dist/api-contract-discovery/registered-route-factory-returns.mjs +0 -29
  419. package/dist/api-contract-discovery/registered-route-handler-analysis.d.mts +0 -12
  420. package/dist/api-contract-discovery/registered-route-handler-analysis.mjs +0 -119
  421. package/dist/api-contract-discovery/registered-route-handler-helpers.d.mts +0 -3
  422. package/dist/api-contract-discovery/registered-route-handler-helpers.mjs +0 -16
  423. package/dist/api-contract-discovery/registered-route-runtime-parameters.d.mts +0 -3
  424. package/dist/api-contract-discovery/registered-route-runtime-parameters.mjs +0 -5
  425. package/dist/api-contract-discovery/registered-route-terminal-error.d.mts +0 -3
  426. package/dist/api-contract-discovery/registered-route-terminal-error.mjs +0 -98
  427. package/dist/api-contract-discovery/request-contract-implicit.d.mts +0 -17
  428. package/dist/api-contract-discovery/request-contract-implicit.mjs +0 -73
  429. package/dist/api-contract-discovery/request-contract-lenient.d.mts +0 -28
  430. package/dist/api-contract-discovery/request-contract-lenient.mjs +0 -59
  431. package/dist/api-contract-discovery/request-contract-registry.d.mts +0 -14
  432. package/dist/api-contract-discovery/request-contract-registry.mjs +0 -63
  433. package/dist/api-contract-discovery/request-contract-route-analysis.d.mts +0 -25
  434. package/dist/api-contract-discovery/request-contract-route-analysis.mjs +0 -68
  435. package/dist/api-contract-discovery/request-contract-types.d.mts +0 -12
  436. package/dist/api-contract-discovery/request-contract-types.mjs +0 -1
  437. package/dist/api-contract-discovery/request-validation-callbacks.d.mts +0 -9
  438. package/dist/api-contract-discovery/request-validation-callbacks.mjs +0 -27
  439. package/dist/api-contract-discovery/request-validation-checker.d.mts +0 -7
  440. package/dist/api-contract-discovery/request-validation-checker.mjs +0 -25
  441. package/dist/api-contract-discovery/request-validation-conditional.d.mts +0 -6
  442. package/dist/api-contract-discovery/request-validation-conditional.mjs +0 -31
  443. package/dist/api-contract-discovery/request-validation-factory-calls.d.mts +0 -11
  444. package/dist/api-contract-discovery/request-validation-factory-calls.mjs +0 -23
  445. package/dist/api-contract-discovery/request-validation-facts.d.mts +0 -16
  446. package/dist/api-contract-discovery/request-validation-facts.mjs +0 -64
  447. package/dist/api-contract-discovery/request-validation-follow.d.mts +0 -24
  448. package/dist/api-contract-discovery/request-validation-follow.mjs +0 -38
  449. package/dist/api-contract-discovery/request-validation-handler-state.d.mts +0 -8
  450. package/dist/api-contract-discovery/request-validation-handler-state.mjs +0 -35
  451. package/dist/api-contract-discovery/request-validation-input.d.mts +0 -12
  452. package/dist/api-contract-discovery/request-validation-input.mjs +0 -43
  453. package/dist/api-contract-discovery/request-validation-keys.d.mts +0 -25
  454. package/dist/api-contract-discovery/request-validation-keys.mjs +0 -119
  455. package/dist/api-contract-discovery/request-validation-match.d.mts +0 -11
  456. package/dist/api-contract-discovery/request-validation-match.mjs +0 -47
  457. package/dist/api-contract-discovery/request-validation-mutation.d.mts +0 -7
  458. package/dist/api-contract-discovery/request-validation-mutation.mjs +0 -80
  459. package/dist/api-contract-discovery/request-validation-origin.d.mts +0 -20
  460. package/dist/api-contract-discovery/request-validation-origin.mjs +0 -71
  461. package/dist/api-contract-discovery/request-validation-reads.d.mts +0 -13
  462. package/dist/api-contract-discovery/request-validation-reads.mjs +0 -88
  463. package/dist/api-contract-discovery/request-validation-registration.d.mts +0 -9
  464. package/dist/api-contract-discovery/request-validation-registration.mjs +0 -32
  465. package/dist/api-contract-discovery/request-validation-report.d.mts +0 -3
  466. package/dist/api-contract-discovery/request-validation-report.mjs +0 -21
  467. package/dist/api-contract-discovery/request-validation-request-origin.d.mts +0 -5
  468. package/dist/api-contract-discovery/request-validation-request-origin.mjs +0 -13
  469. package/dist/api-contract-discovery/request-validation-select.d.mts +0 -9
  470. package/dist/api-contract-discovery/request-validation-select.mjs +0 -36
  471. package/dist/api-contract-discovery/request-validation-sites.d.mts +0 -9
  472. package/dist/api-contract-discovery/request-validation-sites.mjs +0 -77
  473. package/dist/api-contract-discovery/request-validation-state-key.d.mts +0 -13
  474. package/dist/api-contract-discovery/request-validation-state-key.mjs +0 -30
  475. package/dist/api-contract-discovery/request-validation-trace-helpers.d.mts +0 -14
  476. package/dist/api-contract-discovery/request-validation-trace-helpers.mjs +0 -80
  477. package/dist/api-contract-discovery/request-validation-trace-select.d.mts +0 -23
  478. package/dist/api-contract-discovery/request-validation-trace-select.mjs +0 -45
  479. package/dist/api-contract-discovery/request-validation-trace.d.mts +0 -8
  480. package/dist/api-contract-discovery/request-validation-trace.mjs +0 -130
  481. package/dist/api-contract-discovery/request-validation-types.d.mts +0 -84
  482. package/dist/api-contract-discovery/request-validation-types.mjs +0 -1
  483. package/dist/api-contract-discovery/request-validation-walker.d.mts +0 -26
  484. package/dist/api-contract-discovery/request-validation-walker.mjs +0 -143
  485. package/dist/api-contract-discovery/request-validation.test-helpers.d.mts +0 -39
  486. package/dist/api-contract-discovery/request-validation.test-helpers.mjs +0 -108
  487. package/dist/api-contract-discovery/response-contract-attribution-facts.d.mts +0 -2
  488. package/dist/api-contract-discovery/response-contract-attribution-facts.mjs +0 -18
  489. package/dist/api-contract-discovery/response-contract-attribution.d.mts +0 -3
  490. package/dist/api-contract-discovery/response-contract-attribution.mjs +0 -23
  491. package/dist/api-contract-discovery/response-contract-call-classification.d.mts +0 -3
  492. package/dist/api-contract-discovery/response-contract-call-classification.mjs +0 -37
  493. package/dist/api-contract-discovery/response-contract-ctx-analysis.d.mts +0 -7
  494. package/dist/api-contract-discovery/response-contract-ctx-analysis.mjs +0 -28
  495. package/dist/api-contract-discovery/response-contract-error-branch.d.mts +0 -15
  496. package/dist/api-contract-discovery/response-contract-error-branch.mjs +0 -150
  497. package/dist/api-contract-discovery/response-contract-handler-bindings.d.mts +0 -3
  498. package/dist/api-contract-discovery/response-contract-handler-bindings.mjs +0 -126
  499. package/dist/api-contract-discovery/response-contract-handler-calls.d.mts +0 -3
  500. package/dist/api-contract-discovery/response-contract-handler-calls.mjs +0 -81
  501. package/dist/api-contract-discovery/response-contract-implicit-sources.test-helpers.d.mts +0 -145
  502. package/dist/api-contract-discovery/response-contract-implicit-sources.test-helpers.mjs +0 -145
  503. package/dist/api-contract-discovery/response-contract-implicit-variants.d.mts +0 -2
  504. package/dist/api-contract-discovery/response-contract-implicit-variants.mjs +0 -6
  505. package/dist/api-contract-discovery/response-contract-implicit.d.mts +0 -6
  506. package/dist/api-contract-discovery/response-contract-implicit.mjs +0 -120
  507. package/dist/api-contract-discovery/response-contract-lenient.d.mts +0 -41
  508. package/dist/api-contract-discovery/response-contract-lenient.mjs +0 -52
  509. package/dist/api-contract-discovery/response-contract-media.d.mts +0 -3
  510. package/dist/api-contract-discovery/response-contract-media.mjs +0 -46
  511. package/dist/api-contract-discovery/response-contract-object-symbols.d.mts +0 -3
  512. package/dist/api-contract-discovery/response-contract-object-symbols.mjs +0 -80
  513. package/dist/api-contract-discovery/response-contract-property-mutations.d.mts +0 -5
  514. package/dist/api-contract-discovery/response-contract-property-mutations.mjs +0 -84
  515. package/dist/api-contract-discovery/response-contract-registration.d.mts +0 -11
  516. package/dist/api-contract-discovery/response-contract-registration.mjs +0 -65
  517. package/dist/api-contract-discovery/response-contract-registry.d.mts +0 -7
  518. package/dist/api-contract-discovery/response-contract-registry.mjs +0 -124
  519. package/dist/api-contract-discovery/response-contract-route-analysis.d.mts +0 -12
  520. package/dist/api-contract-discovery/response-contract-route-analysis.mjs +0 -65
  521. package/dist/api-contract-discovery/response-contract-route-syntax.d.mts +0 -7
  522. package/dist/api-contract-discovery/response-contract-route-syntax.mjs +0 -41
  523. package/dist/api-contract-discovery/response-contract-status.d.mts +0 -27
  524. package/dist/api-contract-discovery/response-contract-status.mjs +0 -82
  525. package/dist/api-contract-discovery/response-contract-symbols.d.mts +0 -5
  526. package/dist/api-contract-discovery/response-contract-symbols.mjs +0 -82
  527. package/dist/api-contract-discovery/response-contract-types.d.mts +0 -23
  528. package/dist/api-contract-discovery/response-contract-types.mjs +0 -1
  529. package/dist/api-contract-discovery/test-setup.test-helpers.d.mts +0 -3
  530. package/dist/api-contract-discovery/test-setup.test-helpers.mjs +0 -2
  531. /package/dist/{api-contract-discovery/header-contract-types.mjs → post-publication-inventory/readers/public-view-options.mjs} +0 -0
  532. /package/dist/{api-contract-discovery/query-contract-types.mjs → post-publication-inventory/readers/source-options.mjs} +0 -0
package/README.md CHANGED
@@ -242,7 +242,6 @@ import {
242
242
  validateFixtureContracts,
243
243
  writeGeneratedFiles,
244
244
  } from 'vouchington-tooling/api-fixtures'
245
- import { discoverAppRouteCtxContractsV1 } from 'vouchington-tooling/api-contract-discovery'
246
245
  import { decide, deriveRetryAttempt } from 'vouchington-tooling/transient-retry'
247
246
  import { parseCsvRows, streamCsvRows } from 'vouchington-tooling/csv'
248
247
  import {
@@ -470,226 +469,6 @@ token-source router remains deprecated for one release line.
470
469
  filenames, tolerates partial files, returns only a bounded field allowlist, and never emits raw
471
470
  native frame symbols. Both structured reads and text rendering have hard report-count limits.
472
471
 
473
- `api-contract-discovery` is the version-one adapter for `app.route('/path').get/post/...` and
474
- `ctx` response conventions. Pass a classic TypeScript `program` and its route `sourceFiles` to
475
- `discoverAppRouteCtxContractsV1`. The result contains registered routes and response, request,
476
- query, and header contracts. The caller owns program construction, route-file selection, and
477
- generation. Pass `options.formatAliases` and `options.boundedArrayAlias` for application type
478
- aliases; `options.onRouteError` enables lenient response and request extraction. The adapter
479
- does not cache programs or depend on the caller's repository layout. OpenAPI document assembly
480
- remains a separate `openapi-document` call.
481
-
482
- `options.onAmbiguousAttribution` optionally emits facts for response calls lexically inside handler
483
- functions registered to multiple routes, plus inline response calls within those handlers. Facts
484
- are delivered after discovery succeeds, ordered by normalized source location; each callback gets
485
- its own copy of the sorted route list. It recognizes direct property handlers on `const`
486
- object-literal receivers, shorthand properties, immutable aliases, and inline handlers. Mutable
487
- receivers whose properties may be reassigned, variable receivers without object-literal initializers,
488
- and non-identifier receiver expressions fail closed for attribution.
489
- Direct identifier assignment, identifier writes through array/object destructuring or loop targets,
490
- identifier updates, and dot-property assignment or updates make that binding ineligible for attribution.
491
- Computed receiver-property writes, `delete`, runtime reflection, and other indirect mutation are not
492
- analyzed. Named helper calls are not followed transitively: for example, an
493
- emission inside `emit(ctx)` is not attributed when a registered `shared(ctx)` handler calls
494
- `emit(ctx)`. The callback does not change the discovered contract result.
495
-
496
- Query contracts (`apiQuery`) carry requiredness. A top-level parameter descriptor type may include
497
- `required: true` (inline or through an intersection such as `{ readonly required: true }`); the
498
- extracted descriptor then has `required: true` and the OpenAPI parameter emits `required: true`,
499
- otherwise `required: false`. `required` must be the literal `true`; `false`, `boolean`, optional, or
500
- non-literal values fail as a malformed query parameter, as do `required` together with `default` and
501
- `required` on `csv-array` `items`.
502
-
503
- `discoverRequestValidationFacts({ program, sourceFiles, validators, factories, executedCallbacks })`
504
- reports, per registered route (`METHOD:/template`), the route `kind` and `source`, every configured
505
- validator call its handlers reach (`validatorSites`), every configured handler-factory call
506
- (`factorySites`), and the raw request carriers the handlers read (`carrierReads`). It reports
507
- facts only; which routes must validate and what counts as covered stay with the caller.
508
-
509
- ```ts
510
- import { discoverRequestValidationFacts } from 'vouchington-tooling/api-contract-discovery'
511
-
512
- const facts = discoverRequestValidationFacts({
513
- program,
514
- sourceFiles,
515
- validators: [
516
- {
517
- module: 'lib/validation.ts', // resolved declaration path suffix, or a package specifier
518
- exportName: 'validateInput',
519
- operationArgument: 1,
520
- carriers: { kind: 'input-object', argument: 2 }, // or { kind: 'fixed', carriers, optionCarriers }
521
- },
522
- ],
523
- factories: [
524
- {
525
- module: 'lib/factory.ts',
526
- exportName: 'createThingHandler',
527
- optionsArgument: 0,
528
- operationProperty: 'operation',
529
- carriers: ['path', 'body'],
530
- },
531
- ],
532
- executedCallbacks: [
533
- {
534
- module: 'lib/admit.ts',
535
- exportName: 'admitWork',
536
- argument: 0,
537
- properties: ['beforeCapacity'],
538
- },
539
- ],
540
- })
541
- ```
542
-
543
- A call matches only when its callee resolves, through aliases, re-exports and path mappings, to the
544
- configured export of a declaration file matching `module` (`.d.ts`, `.d.mts` and `.d.cts` suffixes
545
- are ignored when comparing, and the configured `module` may be written with or without a `.ts`,
546
- `.mts`, `.cts`, `.js`, `.mjs` or `.cjs` extension, so `lib/validation.js` matches `lib/validation.ts`
547
- and `lib/validation.d.ts`); import specifier text and same-named local functions never match.
548
- Operation keys resolve through literals, `const`s (including imported ones), `as const`,
549
- `satisfies`, helper parameters bound to static arguments, and, for factories, the option property
550
- including spread `const` objects; anything else, including a name with no symbol, gives
551
- `operation: null` with `unresolvedReason`. Each validated carrier reports `origins`, the request
552
- carriers (`path`, `query`, `body`, `header`) its value derives from, traced through calls, followed
553
- helper returns, branches, logical operands, spreads and earlier assignments; `unresolved` is set
554
- when part of the value depends on an unbound parameter. An unconditional reassignment of the
555
- identifier itself earlier in the same function body (not inside a branch, loop or `try`) replaces
556
- the earlier origins, conditional reassignments merge, and property writes such as `x.limit = n`
557
- always add; an assignment on a statically dead path (`if (false)`) is ignored. A destructured
558
- local traces only the property or element it binds (`const { chosen } = pair`), resolved through
559
- object and array literals, `const`s and followed helper returns (also awaited), and falls back to the
560
- whole initializer when it cannot be selected (rest, computed key, spread, unknown source).
561
- A destructured handler context parameter (`({ query, params, request }) => ...`) binds each member
562
- to its carrier. A helper parameter that is reassigned is not trusted as the bound operation key:
563
- only a lone unconditional reassignment is used, anything else gives `operation: null`.
564
- Generator functions are not followed, because calling one does not run its body.
565
- Fixed-carrier validators report the carrier itself as their origin.
566
-
567
- An input-object validator's input is resolved through `const` objects and spreads with
568
- last-write-wins semantics, like the factory option resolver. When it cannot be fully resolved (a
569
- non-literal input, a spread of something that is not a resolvable `const` object, a cyclic spread,
570
- or a computed property name), `carriers` lists what was found and the site sets
571
- `unresolvedCarriers` to the reason, so a consumer must not treat `carriers` as complete. A `const`
572
- object (input or factory options) with a property write before the use (`o.p = x`, `o[k] = x`,
573
- `delete o.p`, `o.n++`, `Object.assign(o, ...)`) is unresolvable too, and a factory then reports
574
- `operation: null`.
575
-
576
- `conditional` is true under `if`/ternary branches, the right of `&&`/`||`/`??`, `switch` cases,
577
- loop bodies, `catch` and `finally`. Handlers are walked into function declarations and `const`
578
- function expressions in `sourceFiles`, and only through bindings that are never reassigned (`let`
579
- and reassigned bindings are not trusted as handlers). A callback passed to a followed helper is
580
- followed only when the helper runs it, and is conditional unless it is invoked directly from the
581
- helper's own body outside any condition. Known limit: the invocations of an inline callback are
582
- found only in the callback's own source file, so a callback passed to a helper declared in another
583
- file (`withTx(ctx, async () => { validateInput(...) })`) is not walked. Inline callback properties of an `executedCallbacks` host,
584
- written as identifiers or string literals, are walked as executed and take only the condition of
585
- the call to the configured host, never how its implementation invokes them. Configured validator
586
- and factory implementations are never entered, but their callee and arguments are still walked for
587
- nested validator sites and reads; only reads that build a validator's input are left out, including
588
- reads inside a followed helper that only prepares that input. Validators evaluated while a handler is
589
- built (registration time) are not sites: only the walk of the handler reports validators. A handler a
590
- helper returns under a runtime branch (`if (flag) return ctx => ...`) reports `conditional: true`. Factory
591
- sites are reported for factory calls whose returned handler is a registration-time value (a route
592
- registration argument, a module `const` used as one, or a helper-returned handler); a factory call
593
- inside a handler body, such as a discarded `createThingHandler(options);`, is not a factory site.
594
- A factory site is also found through a module `const` initialized by a factory call that a handler
595
- calls (`const handler = createThingHandler({...})`, then `handler(ctx)`). Like validator sites,
596
- `FactorySite.conditional` is true when the site is reached only under a condition, and a site
597
- reached both ways is reported unconditional. A template-literal operation key folds to a string
598
- when every substitution resolves (literals, `const`s, bound parameters); otherwise it is `null`.
599
-
600
- Pass the `program` you already built: the function uses it as given and never builds its own.
601
- Helpers are followed only within `sourceFiles`, so pass every file that declares a followed helper,
602
- not just the route files; a helper declared elsewhere is not entered, which silently yields empty
603
- `origins` rather than an error. An omitted optional or defaulted helper argument contributes no
604
- origin and is not `unresolved`; an omitted required argument is `unresolved`. Per-call caches make
605
- repeated helpers cheap, so a 700-route program completes in seconds once the program exists.
606
-
607
- Each `carrierReads` entry has `access`: `key` for a static key (`ctx.query.limit`, destructured
608
- names, a resolvable `ctx.query[name]`), `computed` for a non-static key (`ctx.query[name]`, a
609
- computed destructuring key; `key: null`), and `whole` for the carrier used as a value
610
- (`consume(ctx.query)`, `{ ...ctx.params }`, `return ctx.headers`, a rest element) or a body read
611
- such as `ctx.request.json()` (`key: null`). A `const` alias of a carrier is not itself a read; its
612
- uses are.
613
-
614
- Version one recognizes literal-key `apiResponse`, `apiNoContent`, `apiOpenApiRawResponse`,
615
- `apiRequest`, `apiRequestContract`, `apiNoRequestBody`, `apiQuery`, and `apiHeaders` markers inside
616
- `app.route(...).get/post/put/patch/delete(...)` handlers. It also inspects unmarked `ctx.json`,
617
- `ctx.pipeline`, `ctx.response.empty/buffer/xml`, `ctx.request.json/buffer`, `parseJsonBody`,
618
- `ctx.setStatus`, and static `Content-Type` setters. The input source files and TypeScript checker
619
- are the source representation; the adapter does not parse or discover a repository on its own.
620
- Reading the handler context in another object's computed assignment key preserves its binding;
621
- assignments or updates to the context itself, including side effects inside that key, still reject it.
622
-
623
- Error-only 405 routes require a terminal throw on the handler's own context. Named handlers and
624
- imported wrappers are followed through compiler declarations; conditional, caught, recursive,
625
- fallthrough, and callback-only throws do not prove an error-only route. Empty `never[]` contracts
626
- render as arrays with no items, and `Record<string, never>` renders as a closed empty object.
627
- Standalone `never` and `any` remain unsupported contracts.
628
-
629
- Caller-owned `apiSseFrame(key, { event, data })` markers expose literal event names and concrete
630
- payloads from the frames actually written by a route, including callbacks passed to a handler
631
- factory. SSE responses keep a string body schema and describe each payload under the media
632
- type's `x-sse-events` map. Callback arguments require a concrete helper invocation path; ignored,
633
- declaration-only, deferred, or rewritten callbacks fail closed. Callback options passed to a callee
634
- without a concrete implementation also fail closed. Opaque callback escape checks include array and
635
- tuple containers, nested object properties, and literal array spreads. Factory callbacks must execute
636
- from the returned request handler; registration-time invocations do not prove a request emission. Compiler-resolved platform timers
637
- and Promise executors supply invocation paths using the caller Program's actual standard-library
638
- identities; shadowed, custom, or reassigned platform APIs do not. Mutation checks recognize Node's
639
- compiler-declared `global` as well as `globalThis`. Fluent route registrations retain their method. Stable named
640
- handlers and called local helpers are followed within their declaring source file. Ordinary response,
641
- request, query, and header markers also require callback invocation before route attribution.
642
- Broad names, unknown root payloads, executable unmarked frames through stream aliases, and
643
- conditional or mutable-context status changes fail closed. Called SSE helpers inherit the proven
644
- request context and its status at the invocation; mutually exclusive complete status branches retain
645
- their separate responses. Explicit SSE statuses must be integers from 100 through 599.
646
- Unconditional blocks preserve the last proven status setter; conditional or foreign overwrites fail closed.
647
- Indirect `setStatus.call`, `apply`, and `bind` forms fail closed instead of assuming status 200.
648
- Ambiguous caller contexts fail closed. A raw stream failure invalidates all
649
- selected SSE rows, including when only one protocol variant was requested. Object-literal wrapper
650
- receivers fail closed for marked frames because their properties can mutate; raw wrapper writes
651
- are matched to the original stream, including proven helper-parameter forwarding, overloaded helper
652
- implementations, and literal bracket
653
- methods. Compiler-resolved `Reflect.apply` calls use their actual receiver and payload.
654
- Unsupported computed methods on that receiver fail closed. Byte-bearing
655
- stream `end` calls and streams used as pipe destinations are raw emissions; empty terminal cleanup
656
- is preserved. Replacing a selected stream's `write` implementation invalidates its frame evidence.
657
- Binding a selected stream's `write` or `end` method fails closed because the bound
658
- method can escape the proven emission path. A callback that captures
659
- the route's stream or HTTP context and escapes to a callee without a concrete implementation can
660
- write undocumented bytes, so the affected response contracts fail closed. Uncalled local callbacks,
661
- dead branches, and implemented helpers that ignore their callback preserve the proven contracts.
662
- Cataloged SSE routes with only extracted non-SSE variants retain an unavailable event-stream
663
- possibility alongside those responses until the extracted variants describe the stream.
664
-
665
- Caller-owned `apiOpenApiHttpResponse(key, response)` markers bind a constant opaque response
666
- carrying optional readonly `apiHttpResponseVariants` metadata. Each concrete union variant has
667
- `status` and `bodyKind`; content variants also have `mediaType` and `body`. Discovery associates
668
- the marked variable's status and body emissions without reading or replacing response bytes.
669
- Feasible assignments, deletions, or updates to its body or status, including cast and constant
670
- aliases, invalidate the selected contracts because their metadata no longer proves the dispatch.
671
- A status setter must dominate each body emission, including separate branches; constant context
672
- aliases are followed, assigned mutable context aliases and object-literal context wrappers fail closed,
673
- and helper parameters must resolve to the registered caller's unchanged response context.
674
- Helper-owned contracts also account for response emissions in their proven caller scopes.
675
- Opaque callees receiving the canonical HTTP context or its response object invalidate its contract;
676
- implemented helpers and consumed callbacks retain their proven dispatch behavior.
677
- Feasible assignments or deletions of response methods through canonical context aliases invalidate
678
- that dispatch evidence; dead, ignored, or unrelated method mutations preserve the contract.
679
- Indirect response `call`, `apply`, and `bind` forms fail closed, including borrowed context receivers.
680
- Compiler-resolved standard `Reflect.apply` uses its target and actual receiver to reject unrepresented
681
- HTTP emissions; project implementations, unrelated contexts, and non-executed calls are preserved.
682
- SSE frames and branded content variants reject body-forbidden 1xx, 204, 205, and 304 statuses.
683
- Literal bracket response methods have the same emission checks as property methods. Unrelated raw emissions
684
- remain unavailable. Separate branded response branches are checked together, and the nearest
685
- proven status setter for each body must belong to that response. Observed content and bodyless
686
- emissions must match the complete metadata union, including an empty response in the `else` branch
687
- of a positive body check. Exact requested protocol rows are selected before
688
- other payloads, media types, or statuses are validated. In lenient mode, incomplete marker evidence
689
- keeps every selected sibling unavailable. Explicit 400 content variants also include the framework's
690
- JSON error schema independently of their own media type. Explicit bodyless 400 metadata also
691
- retains that framework JSON possibility and fails closed on the conflicting body kinds.
692
-
693
472
  Fork diagnostics use a caller-selected `recordDirectory` in both the worker setup file and the
694
473
  main-process reporter. Call `registerForkExitSentinel({ recordDirectory })` once per fork, then
695
474
  update `setCurrentForkExitModule` and `setCurrentForkExitProject` around tests. Construct
@@ -897,3 +676,27 @@ in `.tsx`. Template expressions join their static fragments for DML matching, wh
897
676
  for generated-table facts come from templates rather than ordinary quoted strings. Dynamic
898
677
  eligibility-table matching expects an unquoted literal immediately after the DML prefix and does
899
678
  not recognize `DELETE FROM ONLY`.
679
+
680
+ ## Publication reader source facts
681
+
682
+ The same subpath exports `sourceImportsAndComposesAny`, `sourceImportsAndUsesBoundaryAny`, and
683
+ `sourceFiltersWithPublicBoundary`. Each accepts source text, selected imported symbols, and
684
+ `ReaderSourceAnalysisOptions`. Configure allowed modules per imported symbol, SQL tag and executor
685
+ imports through the existing `ReaderSqlTemplateOptions`, the ignored-call identifier, and the
686
+ candidate ID property. Missing import configuration admits no module.
687
+
688
+ These functions preserve the existing lexical source heuristics: named import aliases, local
689
+ builder bindings, reassignment rejection, append/push consumption, returned boundary results,
690
+ and collection filtering with the selected ID set. They do not prove runtime execution, general
691
+ call graphs, or type identity. Malformed source throws through the ESTree parser. Inventory
692
+ selection, classifications, exceptions, and diagnostics remain consumer policy.
693
+
694
+ `composesPublicEligibilityView(source, options)` checks live SQL fragments with
695
+ `ReaderPublicViewOptions`: SQL extraction settings, source and eligibility relation names, and
696
+ their ID columns. Await `initSqlAst()` from `vouchington-tooling/sql-ast` before calling it. The
697
+ existing parser is reused; no separate SQL facts or parser dependency is introduced.
698
+
699
+ The check preserves the existing nested SELECT/CTE, equality, inner-join, and correlated EXISTS
700
+ heuristics. It rejects weakened OR/NOT/boolean/CASE predicates and non-filtering left joins. Every
701
+ recognized live source reader must be protected. Unparseable SQL fragments are skipped; malformed
702
+ source returns false. These are bounded syntactic heuristics, not a general SQL safety proof.
@@ -1,5 +1,5 @@
1
- import { buildSessionFrictionReport, } from '../session-friction/index.mjs';
2
- import { buildJournalAuditReport, } from './feedback-journal-audit.mjs';
1
+ import { buildSessionFrictionReport, } from "../session-friction/index.mjs";
2
+ import { buildJournalAuditReport, } from "./feedback-journal-audit.mjs";
3
3
  const ASSESSED_SOURCE_ERROR = 'complete feedback coverage requires assessed available factual and finding sources';
4
4
  const NOT_ASSESSED_MARKDOWN = '## CI Failures\nStatus: unavailable (not assessed)\n\n## Sandbox & Permission Audit\nStatus: unavailable (not assessed)';
5
5
  export function assertSingleAuditSource(input) {
@@ -1,4 +1,4 @@
1
- import { isObject } from './snapshot-partition-guards.mjs';
1
+ import { isObject } from "./snapshot-partition-guards.mjs";
2
2
  export function canonicalFeedback(value) {
3
3
  return JSON.stringify(ordered(value));
4
4
  }
@@ -1,6 +1,6 @@
1
- import { normalizeRepositories, validateFeedbackText, validateFeedbackReferences, } from './feedback-fields.mjs';
2
- export { normalizeRepositories } from './feedback-fields.mjs';
3
- import { isCount, isObject } from './snapshot-partition-guards.mjs';
1
+ import { normalizeRepositories, validateFeedbackText, validateFeedbackReferences, } from "./feedback-fields.mjs";
2
+ export { normalizeRepositories } from "./feedback-fields.mjs";
3
+ import { isCount, isObject } from "./snapshot-partition-guards.mjs";
4
4
  const FEEDBACK_MAX_BYTES = 16_384;
5
5
  const OUTCOMES = [
6
6
  'in-progress',
@@ -1,8 +1,8 @@
1
- import { runRetrospectiveFactsReport, } from '../retrospective-facts/index.mjs';
2
- import { runRetrospectiveTranscriptReport, } from '../retrospective-transcript/index.mjs';
3
- import { assertSingleAuditSource, auditAssessed, buildAuditReport, completeCoverageError, } from './feedback-audit-source.mjs';
4
- import { createFeedbackEnvelope, redactFeedbackText } from './feedback-codec.mjs';
5
- import { validateFeedbackText } from './feedback-fields.mjs';
1
+ import { runRetrospectiveFactsReport, } from "../retrospective-facts/index.mjs";
2
+ import { runRetrospectiveTranscriptReport, } from "../retrospective-transcript/index.mjs";
3
+ import { assertSingleAuditSource, auditAssessed, buildAuditReport, completeCoverageError, } from "./feedback-audit-source.mjs";
4
+ import { createFeedbackEnvelope, redactFeedbackText } from "./feedback-codec.mjs";
5
+ import { validateFeedbackText } from "./feedback-fields.mjs";
6
6
  function assessment(title, value) {
7
7
  if (!['findings', 'none-observed', 'not-assessed', 'unavailable'].includes(value.status))
8
8
  throw new Error('assessment status must be explicit');
@@ -1,4 +1,4 @@
1
- import { FeedbackDeliveryError } from './feedback-online-error.mjs';
1
+ import { FeedbackDeliveryError } from "./feedback-online-error.mjs";
2
2
  export async function feedbackDeadline(operation, timeoutMs = 20_000) {
3
3
  if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 20_000)
4
4
  throw new Error('feedback timeoutMs must be between 1 and 20000');
@@ -1,9 +1,9 @@
1
- import { createFeedbackEnvelope, validateFeedbackEnvelope } from './feedback-codec.mjs';
2
- import { validateFeedbackIdentity } from './feedback-identity.mjs';
3
- import { deliverFeedbackOnline } from './feedback-online.mjs';
4
- import { FeedbackDeliveryError, feedbackDiagnostic } from './feedback-online-error.mjs';
5
- import { feedbackOutboxStatus, listFeedbackOutbox, persistFeedbackOutbox, removeFeedbackOutbox, } from './feedback-outbox.mjs';
6
- export { FeedbackDeliveryError } from './feedback-online-error.mjs';
1
+ import { createFeedbackEnvelope, validateFeedbackEnvelope } from "./feedback-codec.mjs";
2
+ import { validateFeedbackIdentity } from "./feedback-identity.mjs";
3
+ import { deliverFeedbackOnline } from "./feedback-online.mjs";
4
+ import { FeedbackDeliveryError, feedbackDiagnostic } from "./feedback-online-error.mjs";
5
+ import { feedbackOutboxStatus, listFeedbackOutbox, persistFeedbackOutbox, removeFeedbackOutbox, } from "./feedback-outbox.mjs";
6
+ export { FeedbackDeliveryError } from "./feedback-online-error.mjs";
7
7
  export async function writeFeedback(input) {
8
8
  if (input.mode !== 'interactive' && input.mode !== 'autonomous')
9
9
  throw new Error('feedback mode must be explicitly interactive or autonomous');
@@ -1,4 +1,4 @@
1
- import { isWellFormedUnicode } from '../session-friction/text.mjs';
1
+ import { isWellFormedUnicode } from "../session-friction/text.mjs";
2
2
  export function validateFeedbackText(value, label, maximum) {
3
3
  if (typeof value !== 'string' ||
4
4
  !value.trim() ||
@@ -1,6 +1,6 @@
1
- import { isWellFormedUnicode } from '../session-friction/text.mjs';
2
- import { assertSessionId } from './session-id.mjs';
3
- import { isObject } from './snapshot-partition-guards.mjs';
1
+ import { isWellFormedUnicode } from "../session-friction/text.mjs";
2
+ import { assertSessionId } from "./session-id.mjs";
3
+ import { isObject } from "./snapshot-partition-guards.mjs";
4
4
  export function validateFeedbackIdentity(identity) {
5
5
  if (!isObject(identity) || typeof identity.sessionId !== 'string')
6
6
  throw new Error('explicit feedback identity is required');
@@ -1,7 +1,7 @@
1
- import { buildCiFailuresSection, getConformingGroups, incompleteCiSection, } from '../session-friction/ci-failures.mjs';
2
- import { scanJournal } from '../session-friction/journal.mjs';
3
- import { validateSessionId } from '../session-friction/session-id.mjs';
4
- import { getConformingSandboxBlocks, journalSandboxSection, unavailableSandboxSection, } from './feedback-journal-sandbox.mjs';
1
+ import { buildCiFailuresSection, getConformingGroups, incompleteCiSection, } from "../session-friction/ci-failures.mjs";
2
+ import { scanJournal } from "../session-friction/journal.mjs";
3
+ import { validateSessionId } from "../session-friction/session-id.mjs";
4
+ import { getConformingSandboxBlocks, journalSandboxSection, unavailableSandboxSection, } from "./feedback-journal-sandbox.mjs";
5
5
  function report(journalStatus, markdown) {
6
6
  return { coverage: { journalStatus, frictionStatus: 'journal-only', truncated: false }, markdown };
7
7
  }
@@ -1,4 +1,4 @@
1
- import { conformingBlocks, matchAuditBlock } from '../session-friction/audit-block.mjs';
1
+ import { conformingBlocks, matchAuditBlock } from "../session-friction/audit-block.mjs";
2
2
  const SANDBOX_SECTION_HEADER = '## Sandbox & Permission Audit';
3
3
  const SOURCE = 'journal entries only; no friction log observed';
4
4
  const EVIDENCE = /^ {2}- Evidence: .*[^\s]$/;
@@ -1,4 +1,4 @@
1
- import { isObject } from './snapshot-partition-guards.mjs';
1
+ import { isObject } from "./snapshot-partition-guards.mjs";
2
2
  export class FeedbackDeliveryError extends Error {
3
3
  status = 'blocked';
4
4
  diagnostic;
@@ -1,10 +1,10 @@
1
- import { feedbackDeadline } from './feedback-deadline.mjs';
2
- import { FeedbackDeliveryError, feedbackDiagnostic } from './feedback-online-error.mjs';
3
- import { canonicalFeedback, canonicalFeedbackEvent } from './feedback-canonical.mjs';
4
- import { loadClient, resolveBlackboardConnection } from './client.mjs';
5
- import { normalizeRepositories, validateFeedbackEnvelope } from './feedback-codec.mjs';
6
- import { validateFeedbackIdentity } from './feedback-identity.mjs';
7
- import { isObject } from './snapshot-partition-guards.mjs';
1
+ import { feedbackDeadline } from "./feedback-deadline.mjs";
2
+ import { FeedbackDeliveryError, feedbackDiagnostic } from "./feedback-online-error.mjs";
3
+ import { canonicalFeedback, canonicalFeedbackEvent } from "./feedback-canonical.mjs";
4
+ import { loadClient, resolveBlackboardConnection } from "./client.mjs";
5
+ import { normalizeRepositories, validateFeedbackEnvelope } from "./feedback-codec.mjs";
6
+ import { validateFeedbackIdentity } from "./feedback-identity.mjs";
7
+ import { isObject } from "./snapshot-partition-guards.mjs";
8
8
  async function ensureSession(sessions, identity) {
9
9
  try {
10
10
  return await sessions.ensure({
@@ -1,5 +1,5 @@
1
- import { assertSessionId } from './session-id.mjs';
2
- import { readFeedbackOutbox } from './feedback-outbox.mjs';
1
+ import { assertSessionId } from "./session-id.mjs";
2
+ import { readFeedbackOutbox } from "./feedback-outbox.mjs";
3
3
  /** Counts a session separately from all retry records in the shared worktree outbox. */
4
4
  export function feedbackOutboxCounts(directory, sessionId) {
5
5
  assertSessionId(sessionId);
@@ -1,13 +1,13 @@
1
- import { canonicalFeedback, canonicalFeedbackEvent } from './feedback-canonical.mjs';
1
+ import { canonicalFeedback, canonicalFeedbackEvent } from "./feedback-canonical.mjs";
2
2
  import { createHash, randomUUID } from 'node:crypto';
3
3
  import { closeSync, constants, fsyncSync, fstatSync, openSync, readdirSync, renameSync, unlinkSync, } from 'node:fs';
4
4
  import { isAbsolute, join, resolve } from 'node:path';
5
- import { ensureOutboxDirectory } from './feedback-outbox-directory.mjs';
6
- import { withFileLock } from '../session-friction/lock.mjs';
7
- import { openLogFile, readLogContent, writeAll } from '../session-friction/log-file.mjs';
8
- import { validateFeedbackEnvelope } from './feedback-codec.mjs';
9
- import { validateFeedbackIdentity } from './feedback-identity.mjs';
10
- import { isObject } from './snapshot-partition-guards.mjs';
5
+ import { ensureOutboxDirectory } from "./feedback-outbox-directory.mjs";
6
+ import { withFileLock } from "../session-friction/lock.mjs";
7
+ import { openLogFile, readLogContent, writeAll } from "../session-friction/log-file.mjs";
8
+ import { validateFeedbackEnvelope } from "./feedback-codec.mjs";
9
+ import { validateFeedbackIdentity } from "./feedback-identity.mjs";
10
+ import { isObject } from "./snapshot-partition-guards.mjs";
11
11
  const FEEDBACK_OUTBOX_MAX_RECORDS = 128;
12
12
  const FEEDBACK_OUTBOX_MAX_BYTES = 2_000_000;
13
13
  const RECORD_MAX_BYTES = 18_000;
@@ -1,11 +1,11 @@
1
- import { appendJournalMarkdown, checkJournalInput } from './journal.mjs';
2
- import { loadClient, resolveBlackboardConnection, } from './client.mjs';
1
+ import { appendJournalMarkdown, checkJournalInput } from "./journal.mjs";
2
+ import { loadClient, resolveBlackboardConnection, } from "./client.mjs";
3
3
  import { readFile } from 'node:fs/promises';
4
- import { assertSessionId } from './session-id.mjs';
5
- export { cleanupSnapshotPartitions, partitionSnapshot } from './snapshot.mjs';
6
- export { assertSessionId } from './session-id.mjs';
7
- export { appendJournalMarkdown } from './journal.mjs';
8
- export { archiveBlackboardSession, ensureBlackboardSession, exportSnapshot, } from './session-tools.mjs';
4
+ import { assertSessionId } from "./session-id.mjs";
5
+ export { cleanupSnapshotPartitions, partitionSnapshot } from "./snapshot.mjs";
6
+ export { assertSessionId } from "./session-id.mjs";
7
+ export { appendJournalMarkdown } from "./journal.mjs";
8
+ export { archiveBlackboardSession, ensureBlackboardSession, exportSnapshot, } from "./session-tools.mjs";
9
9
  export async function probeBlackboard(env, dependencies) {
10
10
  const { Sessions } = await loadClient(dependencies);
11
11
  await new Sessions(resolveBlackboardConnection(env)).list({ limit: 1 });
@@ -58,9 +58,9 @@ export function formatJournalEntries(sessionId, entries) {
58
58
  .map(({ createdAt, markdown }) => `## ${createdAt}\n\n${markdown}`)
59
59
  .join('\n\n');
60
60
  }
61
- export { resolveBlackboardConnection } from './client.mjs';
62
- export { createFeedbackEnvelope, validateFeedbackEnvelope } from './feedback-codec.mjs';
63
- export { writeFeedback, verifyFreshFeedback, flushFeedbackOutbox, FeedbackDeliveryError, } from './feedback-delivery.mjs';
64
- export { feedbackOutboxStatus, readFeedbackOutbox } from './feedback-outbox.mjs';
65
- export { composeRetrospective } from './feedback-compose.mjs';
66
- export { feedbackOutboxCounts } from './feedback-outbox-counts.mjs';
61
+ export { resolveBlackboardConnection } from "./client.mjs";
62
+ export { createFeedbackEnvelope, validateFeedbackEnvelope } from "./feedback-codec.mjs";
63
+ export { writeFeedback, verifyFreshFeedback, flushFeedbackOutbox, FeedbackDeliveryError, } from "./feedback-delivery.mjs";
64
+ export { feedbackOutboxStatus, readFeedbackOutbox } from "./feedback-outbox.mjs";
65
+ export { composeRetrospective } from "./feedback-compose.mjs";
66
+ export { feedbackOutboxCounts } from "./feedback-outbox-counts.mjs";
@@ -1,6 +1,6 @@
1
- import { createFeedbackEnvelope, normalizeRepositories } from './feedback-codec.mjs';
2
- import { writeFeedback } from './feedback-delivery.mjs';
3
- import { assertSessionId } from './session-id.mjs';
1
+ import { createFeedbackEnvelope, normalizeRepositories } from "./feedback-codec.mjs";
2
+ import { writeFeedback } from "./feedback-delivery.mjs";
3
+ import { assertSessionId } from "./session-id.mjs";
4
4
  /** Validates the identity, repositories, and timestamp before any note text is read. */
5
5
  export function checkJournalInput(input) {
6
6
  assertSessionId(input.sessionId);
@@ -1,7 +1,7 @@
1
- import { loadClient, resolveBlackboardConnection, } from './client.mjs';
2
- import { validateFeedbackIdentity } from './feedback-identity.mjs';
3
- import { assertSessionId } from './session-id.mjs';
4
- import { isObject } from './snapshot-partition-guards.mjs';
1
+ import { loadClient, resolveBlackboardConnection, } from "./client.mjs";
2
+ import { validateFeedbackIdentity } from "./feedback-identity.mjs";
3
+ import { assertSessionId } from "./session-id.mjs";
4
+ import { isObject } from "./snapshot-partition-guards.mjs";
5
5
  const UPGRADE_HINT = 'upgrade agent-blackboard in the consumer package';
6
6
  /** Idempotently creates the session; an existing session must match the supplied identity. */
7
7
  export async function ensureBlackboardSession(input) {
@@ -1,7 +1,7 @@
1
1
  import { join } from 'node:path';
2
- import { RECEIPT_NAME, sameCleanupReceipt } from './snapshot-cleanup-receipt.mjs';
3
- import { removeResumeReceipt, writeResumeReceipt } from './snapshot-cleanup-resume.mjs';
4
- import { assertPartitionFile, validatePartition } from './snapshot-partition-validate.mjs';
2
+ import { RECEIPT_NAME, sameCleanupReceipt } from "./snapshot-cleanup-receipt.mjs";
3
+ import { removeResumeReceipt, writeResumeReceipt } from "./snapshot-cleanup-resume.mjs";
4
+ import { assertPartitionFile, validatePartition } from "./snapshot-partition-validate.mjs";
5
5
  const PARTITION = /^partition-([1-9][0-9]*)\.jsonl$/;
6
6
  export async function removePartitionDirectory(filesystem, path, originalPath, receipt, directory, resume, startDeleting) {
7
7
  const names = await filesystem.readdir(path);
@@ -1,7 +1,7 @@
1
1
  import { createHmac, randomUUID, timingSafeEqual } from 'node:crypto';
2
2
  import { chmod, lstat, writeFile } from 'node:fs/promises';
3
3
  import { basename, join } from 'node:path';
4
- import { loadCleanupSigningKey } from './snapshot-cleanup-key.mjs';
4
+ import { loadCleanupSigningKey } from "./snapshot-cleanup-key.mjs";
5
5
  export const RECEIPT_NAME = '.agent-blackboard-cleanup-receipt.json';
6
6
  function record(value) {
7
7
  return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -3,7 +3,7 @@ import { constants } from 'node:fs';
3
3
  import { link, lstat, open, readFile, readdir, rm, unlink } from 'node:fs/promises';
4
4
  import { tmpdir } from 'node:os';
5
5
  import { join } from 'node:path';
6
- import { sameCleanupReceipt, verifyCleanupReceipt } from './snapshot-cleanup-receipt.mjs';
6
+ import { sameCleanupReceipt, verifyCleanupReceipt } from "./snapshot-cleanup-receipt.mjs";
7
7
  const defaults = { link, lstat, open, readFile, readdir, rm, unlink };
8
8
  let filesystem = defaults;
9
9
  export function setResumeFilesystemForTest(overrides) {
@@ -65,7 +65,7 @@ export async function writeResumeReceipt(receipt) {
65
65
  let file;
66
66
  try {
67
67
  file = await filesystem.open(temporary, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o400);
68
- const { serializeCleanupReceipt } = await import('./snapshot-cleanup-receipt.mjs');
68
+ const { serializeCleanupReceipt } = await import("./snapshot-cleanup-receipt.mjs");
69
69
  await file.writeFile(serializeCleanupReceipt(receipt));
70
70
  await file.sync();
71
71
  await file.close();
@@ -2,9 +2,9 @@ import { randomUUID } from 'node:crypto';
2
2
  import { lstat, readFile, readdir, rename, rm, rmdir } from 'node:fs/promises';
3
3
  import { tmpdir } from 'node:os';
4
4
  import { basename, dirname, isAbsolute, join, resolve } from 'node:path';
5
- import { verifyCleanupReceipt } from './snapshot-cleanup-receipt.mjs';
6
- import { removePartitionDirectory } from './snapshot-cleanup-directory.mjs';
7
- import { removeResumeReceipt, requireResumeReceipt, writeResumeReceipt, } from './snapshot-cleanup-resume.mjs';
5
+ import { verifyCleanupReceipt } from "./snapshot-cleanup-receipt.mjs";
6
+ import { removePartitionDirectory } from "./snapshot-cleanup-directory.mjs";
7
+ import { removeResumeReceipt, requireResumeReceipt, writeResumeReceipt, } from "./snapshot-cleanup-resume.mjs";
8
8
  const SOURCE_NAME = /^agent-blackboard-snapshot-[0-9a-f-]{36}\.jsonl$/;
9
9
  const DIRECTORY_NAME = /^agent-blackboard-partitions-[A-Za-z0-9]+$/;
10
10
  const defaults = { lstat, readFile, readdir, rename, rm, rmdir };
@@ -1,6 +1,6 @@
1
- import { assertSessionId } from './session-id.mjs';
2
- import { isManifest, isSession } from './snapshot-partition-predicates.mjs';
3
- import { isObject, isTimestamp } from './snapshot-partition-guards.mjs';
1
+ import { assertSessionId } from "./session-id.mjs";
2
+ import { isManifest, isSession } from "./snapshot-partition-predicates.mjs";
3
+ import { isObject, isTimestamp } from "./snapshot-partition-guards.mjs";
4
4
  function isEntry(value) {
5
5
  if (isObject(value) &&
6
6
  typeof value.sessionId === 'string' &&
@@ -1,5 +1,5 @@
1
- import { assertSessionId } from './session-id.mjs';
2
- import { isCount, isObject, isTimestamp } from './snapshot-partition-guards.mjs';
1
+ import { assertSessionId } from "./session-id.mjs";
2
+ import { isCount, isObject, isTimestamp } from "./snapshot-partition-guards.mjs";
3
3
  function isSelection(value) {
4
4
  if (!isObject(value) || value.archived !== false)
5
5
  return false;
@@ -1,8 +1,8 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import { open } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import { assertManifest, consumeSnapshotRecord, parseSnapshotRecord, snapshotLine, } from './snapshot-partition-format.mjs';
5
- import { readLines, writeAll } from './snapshot-partition-io.mjs';
4
+ import { assertManifest, consumeSnapshotRecord, parseSnapshotRecord, snapshotLine, } from "./snapshot-partition-format.mjs";
5
+ import { readLines, writeAll } from "./snapshot-partition-io.mjs";
6
6
  export async function stageSnapshot(source, directory) {
7
7
  const index = join(directory, 'index.jsonl');
8
8
  const indexFile = await open(index, 'wx', 0o600);
@@ -1,8 +1,8 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import { constants } from 'node:fs';
3
3
  import { open } from 'node:fs/promises';
4
- import { consumeSnapshotRecord, assertManifest, parseSnapshotRecord, } from './snapshot-partition-format.mjs';
5
- import { readLines } from './snapshot-partition-io.mjs';
4
+ import { consumeSnapshotRecord, assertManifest, parseSnapshotRecord, } from "./snapshot-partition-format.mjs";
5
+ import { readLines } from "./snapshot-partition-io.mjs";
6
6
  export function assertPartitionFile(info) {
7
7
  if (!info.isFile() || info.isSymbolicLink() || info.nlink !== 1 || (info.mode & 0o222) !== 0)
8
8
  throw new Error('partition directory contains an unsafe partition');
@@ -2,8 +2,8 @@ import { createHash } from 'node:crypto';
2
2
  import { constants } from 'node:fs';
3
3
  import { chmod, open, rename } from 'node:fs/promises';
4
4
  import { join } from 'node:path';
5
- import { countsFor, manifestFor, snapshotLine, } from './snapshot-partition-format.mjs';
6
- import { readLines, writeAll } from './snapshot-partition-io.mjs';
5
+ import { countsFor, manifestFor, snapshotLine, } from "./snapshot-partition-format.mjs";
6
+ import { readLines, writeAll } from "./snapshot-partition-io.mjs";
7
7
  async function copyBlock(block, output, hash) {
8
8
  const input = await open(block.path, constants.O_RDONLY | constants.O_NOFOLLOW);
9
9
  const buffer = Buffer.allocUnsafe(64 * 1024);