mewkit 1.15.0 → 1.16.1

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 (494) hide show
  1. package/NOTICE +24 -0
  2. package/README.md +29 -70
  3. package/dist/commands/visual-plan.d.ts +23 -0
  4. package/dist/commands/visual-plan.d.ts.map +1 -0
  5. package/dist/commands/visual-plan.js +26 -0
  6. package/dist/commands/visual-plan.js.map +1 -0
  7. package/dist/core/capability.d.ts +81 -81
  8. package/dist/core/consolidation-ledger.d.ts.map +1 -1
  9. package/dist/core/consolidation-ledger.js +13 -11
  10. package/dist/core/consolidation-ledger.js.map +1 -1
  11. package/dist/core/install-metadata.d.ts +27 -27
  12. package/dist/core/plugin-manifest.d.ts +16 -16
  13. package/dist/core/release-metadata.d.ts +2 -2
  14. package/dist/core/task-record.d.ts +8 -8
  15. package/dist/index.js +33 -21
  16. package/dist/index.js.map +1 -1
  17. package/dist/local-web/atomic-write.d.ts +15 -0
  18. package/dist/local-web/atomic-write.d.ts.map +1 -0
  19. package/dist/local-web/atomic-write.js +69 -0
  20. package/dist/local-web/atomic-write.js.map +1 -0
  21. package/dist/local-web/constants.d.ts +13 -0
  22. package/dist/local-web/constants.d.ts.map +1 -0
  23. package/dist/local-web/constants.js +13 -0
  24. package/dist/local-web/constants.js.map +1 -0
  25. package/dist/local-web/etag.d.ts +19 -0
  26. package/dist/local-web/etag.d.ts.map +1 -0
  27. package/dist/local-web/etag.js +32 -0
  28. package/dist/local-web/etag.js.map +1 -0
  29. package/dist/local-web/host-guard.d.ts +12 -0
  30. package/dist/local-web/host-guard.d.ts.map +1 -0
  31. package/dist/local-web/host-guard.js +18 -0
  32. package/dist/local-web/host-guard.js.map +1 -0
  33. package/dist/local-web/index.d.ts +23 -0
  34. package/dist/local-web/index.d.ts.map +1 -0
  35. package/dist/local-web/index.js +23 -0
  36. package/dist/local-web/index.js.map +1 -0
  37. package/dist/local-web/local-server.d.ts +37 -0
  38. package/dist/local-web/local-server.d.ts.map +1 -0
  39. package/dist/local-web/local-server.js +85 -0
  40. package/dist/local-web/local-server.js.map +1 -0
  41. package/dist/local-web/open-browser.d.ts +12 -0
  42. package/dist/local-web/open-browser.d.ts.map +1 -0
  43. package/dist/{orchviz/open-url.js → local-web/open-browser.js} +9 -8
  44. package/dist/local-web/open-browser.js.map +1 -0
  45. package/dist/local-web/origin-guard.d.ts +11 -0
  46. package/dist/local-web/origin-guard.d.ts.map +1 -0
  47. package/dist/local-web/origin-guard.js +15 -0
  48. package/dist/local-web/origin-guard.js.map +1 -0
  49. package/dist/local-web/path-boundary.d.ts +20 -0
  50. package/dist/local-web/path-boundary.d.ts.map +1 -0
  51. package/dist/local-web/path-boundary.js +39 -0
  52. package/dist/local-web/path-boundary.js.map +1 -0
  53. package/dist/local-web/request-body.d.ts +24 -0
  54. package/dist/local-web/request-body.d.ts.map +1 -0
  55. package/dist/local-web/request-body.js +68 -0
  56. package/dist/local-web/request-body.js.map +1 -0
  57. package/dist/local-web/static-handler.d.ts +14 -0
  58. package/dist/local-web/static-handler.d.ts.map +1 -0
  59. package/dist/{orchviz/server → local-web}/static-handler.js +11 -6
  60. package/dist/local-web/static-handler.js.map +1 -0
  61. package/dist/migrate/reconcile/portable-manifest.d.ts +12 -12
  62. package/dist/migrate/reconcile/portable-registry.d.ts +24 -24
  63. package/dist/migrate/types.d.ts +10 -10
  64. package/dist/{orchviz/token-estimator.d.ts → token-estimator/index.d.ts} +6 -1
  65. package/dist/token-estimator/index.d.ts.map +1 -0
  66. package/dist/{orchviz/token-estimator.js → token-estimator/index.js} +11 -2
  67. package/dist/token-estimator/index.js.map +1 -0
  68. package/dist/visual-plan/__fixtures__/valid-plan.d.ts +15 -0
  69. package/dist/visual-plan/__fixtures__/valid-plan.d.ts.map +1 -0
  70. package/dist/visual-plan/__fixtures__/valid-plan.js +79 -0
  71. package/dist/visual-plan/__fixtures__/valid-plan.js.map +1 -0
  72. package/dist/visual-plan/application/apply-feedback.d.ts +31 -0
  73. package/dist/visual-plan/application/apply-feedback.d.ts.map +1 -0
  74. package/dist/visual-plan/application/apply-feedback.js +85 -0
  75. package/dist/visual-plan/application/apply-feedback.js.map +1 -0
  76. package/dist/visual-plan/application/apply-patch-op.d.ts +13 -0
  77. package/dist/visual-plan/application/apply-patch-op.d.ts.map +1 -0
  78. package/dist/visual-plan/application/apply-patch-op.js +72 -0
  79. package/dist/visual-plan/application/apply-patch-op.js.map +1 -0
  80. package/dist/visual-plan/application/approve.d.ts +24 -0
  81. package/dist/visual-plan/application/approve.d.ts.map +1 -0
  82. package/dist/visual-plan/application/approve.js +53 -0
  83. package/dist/visual-plan/application/approve.js.map +1 -0
  84. package/dist/visual-plan/application/clock.d.ts +8 -0
  85. package/dist/visual-plan/application/clock.d.ts.map +1 -0
  86. package/dist/visual-plan/application/clock.js +10 -0
  87. package/dist/visual-plan/application/clock.js.map +1 -0
  88. package/dist/visual-plan/application/export-plan.d.ts +19 -0
  89. package/dist/visual-plan/application/export-plan.d.ts.map +1 -0
  90. package/dist/visual-plan/application/export-plan.js +74 -0
  91. package/dist/visual-plan/application/export-plan.js.map +1 -0
  92. package/dist/visual-plan/application/patch-plan.d.ts +26 -0
  93. package/dist/visual-plan/application/patch-plan.d.ts.map +1 -0
  94. package/dist/visual-plan/application/patch-plan.js +48 -0
  95. package/dist/visual-plan/application/patch-plan.js.map +1 -0
  96. package/dist/visual-plan/application/prepare-feedback.d.ts +24 -0
  97. package/dist/visual-plan/application/prepare-feedback.d.ts.map +1 -0
  98. package/dist/visual-plan/application/prepare-feedback.js +70 -0
  99. package/dist/visual-plan/application/prepare-feedback.js.map +1 -0
  100. package/dist/visual-plan/application/rehash.d.ts +19 -0
  101. package/dist/visual-plan/application/rehash.d.ts.map +1 -0
  102. package/dist/visual-plan/application/rehash.js +43 -0
  103. package/dist/visual-plan/application/rehash.js.map +1 -0
  104. package/dist/visual-plan/application/status.d.ts +20 -0
  105. package/dist/visual-plan/application/status.d.ts.map +1 -0
  106. package/dist/visual-plan/application/status.js +27 -0
  107. package/dist/visual-plan/application/status.js.map +1 -0
  108. package/dist/visual-plan/application/validate-plan.d.ts +30 -0
  109. package/dist/visual-plan/application/validate-plan.d.ts.map +1 -0
  110. package/dist/visual-plan/application/validate-plan.js +59 -0
  111. package/dist/visual-plan/application/validate-plan.js.map +1 -0
  112. package/dist/visual-plan/domain/coverage.d.ts +35 -0
  113. package/dist/visual-plan/domain/coverage.d.ts.map +1 -0
  114. package/dist/visual-plan/domain/coverage.js +99 -0
  115. package/dist/visual-plan/domain/coverage.js.map +1 -0
  116. package/dist/visual-plan/domain/cross-refs.d.ts +20 -0
  117. package/dist/visual-plan/domain/cross-refs.d.ts.map +1 -0
  118. package/dist/visual-plan/domain/cross-refs.js +92 -0
  119. package/dist/visual-plan/domain/cross-refs.js.map +1 -0
  120. package/dist/visual-plan/domain/errors.d.ts +43 -0
  121. package/dist/visual-plan/domain/errors.d.ts.map +1 -0
  122. package/dist/visual-plan/domain/errors.js +33 -0
  123. package/dist/visual-plan/domain/errors.js.map +1 -0
  124. package/dist/visual-plan/domain/feedback-schemas.d.ts +160 -0
  125. package/dist/visual-plan/domain/feedback-schemas.d.ts.map +1 -0
  126. package/dist/visual-plan/domain/feedback-schemas.js +71 -0
  127. package/dist/visual-plan/domain/feedback-schemas.js.map +1 -0
  128. package/dist/visual-plan/domain/ids.d.ts +21 -0
  129. package/dist/visual-plan/domain/ids.d.ts.map +1 -0
  130. package/dist/visual-plan/domain/ids.js +25 -0
  131. package/dist/visual-plan/domain/ids.js.map +1 -0
  132. package/dist/visual-plan/domain/patches.d.ts +176 -0
  133. package/dist/visual-plan/domain/patches.d.ts.map +1 -0
  134. package/dist/visual-plan/domain/patches.js +41 -0
  135. package/dist/visual-plan/domain/patches.js.map +1 -0
  136. package/dist/visual-plan/domain/sanitizer-config.d.ts +61 -0
  137. package/dist/visual-plan/domain/sanitizer-config.d.ts.map +1 -0
  138. package/dist/visual-plan/domain/sanitizer-config.js +70 -0
  139. package/dist/visual-plan/domain/sanitizer-config.js.map +1 -0
  140. package/dist/visual-plan/domain/schemas.d.ts +1492 -0
  141. package/dist/visual-plan/domain/schemas.d.ts.map +1 -0
  142. package/dist/visual-plan/domain/schemas.js +166 -0
  143. package/dist/visual-plan/domain/schemas.js.map +1 -0
  144. package/dist/visual-plan/domain/wireframe-theme.d.ts +24 -0
  145. package/dist/visual-plan/domain/wireframe-theme.d.ts.map +1 -0
  146. package/dist/visual-plan/domain/wireframe-theme.js +169 -0
  147. package/dist/visual-plan/domain/wireframe-theme.js.map +1 -0
  148. package/dist/visual-plan/infrastructure/atomic-write.d.ts +11 -0
  149. package/dist/visual-plan/infrastructure/atomic-write.d.ts.map +1 -0
  150. package/dist/visual-plan/infrastructure/atomic-write.js +44 -0
  151. package/dist/visual-plan/infrastructure/atomic-write.js.map +1 -0
  152. package/dist/visual-plan/infrastructure/feedback-repository.d.ts +18 -0
  153. package/dist/visual-plan/infrastructure/feedback-repository.d.ts.map +1 -0
  154. package/dist/visual-plan/infrastructure/feedback-repository.js +59 -0
  155. package/dist/visual-plan/infrastructure/feedback-repository.js.map +1 -0
  156. package/dist/visual-plan/infrastructure/hashing.d.ts +37 -0
  157. package/dist/visual-plan/infrastructure/hashing.d.ts.map +1 -0
  158. package/dist/visual-plan/infrastructure/hashing.js +81 -0
  159. package/dist/visual-plan/infrastructure/hashing.js.map +1 -0
  160. package/dist/visual-plan/infrastructure/plan-state.d.ts +32 -0
  161. package/dist/visual-plan/infrastructure/plan-state.d.ts.map +1 -0
  162. package/dist/visual-plan/infrastructure/plan-state.js +58 -0
  163. package/dist/visual-plan/infrastructure/plan-state.js.map +1 -0
  164. package/dist/visual-plan/infrastructure/receipt-repository.d.ts +17 -0
  165. package/dist/visual-plan/infrastructure/receipt-repository.d.ts.map +1 -0
  166. package/dist/visual-plan/infrastructure/receipt-repository.js +59 -0
  167. package/dist/visual-plan/infrastructure/receipt-repository.js.map +1 -0
  168. package/dist/visual-plan/infrastructure/visual-plan-repository.d.ts +38 -0
  169. package/dist/visual-plan/infrastructure/visual-plan-repository.d.ts.map +1 -0
  170. package/dist/visual-plan/infrastructure/visual-plan-repository.js +97 -0
  171. package/dist/visual-plan/infrastructure/visual-plan-repository.js.map +1 -0
  172. package/dist/visual-plan/infrastructure/wireframe-sanitizer.d.ts +41 -0
  173. package/dist/visual-plan/infrastructure/wireframe-sanitizer.d.ts.map +1 -0
  174. package/dist/visual-plan/infrastructure/wireframe-sanitizer.js +72 -0
  175. package/dist/visual-plan/infrastructure/wireframe-sanitizer.js.map +1 -0
  176. package/dist/visual-plan/interface/cli.d.ts +29 -0
  177. package/dist/visual-plan/interface/cli.d.ts.map +1 -0
  178. package/dist/visual-plan/interface/cli.js +280 -0
  179. package/dist/visual-plan/interface/cli.js.map +1 -0
  180. package/dist/visual-plan/interface/studio.d.ts +20 -0
  181. package/dist/visual-plan/interface/studio.d.ts.map +1 -0
  182. package/dist/visual-plan/interface/studio.js +74 -0
  183. package/dist/visual-plan/interface/studio.js.map +1 -0
  184. package/dist/visual-plan/server/csp.d.ts +13 -0
  185. package/dist/visual-plan/server/csp.d.ts.map +1 -0
  186. package/dist/visual-plan/server/csp.js +17 -0
  187. package/dist/visual-plan/server/csp.js.map +1 -0
  188. package/dist/visual-plan/server/edit-lock.d.ts +28 -0
  189. package/dist/visual-plan/server/edit-lock.d.ts.map +1 -0
  190. package/dist/visual-plan/server/edit-lock.js +71 -0
  191. package/dist/visual-plan/server/edit-lock.js.map +1 -0
  192. package/dist/visual-plan/server/routes/feedback.d.ts +12 -0
  193. package/dist/visual-plan/server/routes/feedback.d.ts.map +1 -0
  194. package/dist/visual-plan/server/routes/feedback.js +63 -0
  195. package/dist/visual-plan/server/routes/feedback.js.map +1 -0
  196. package/dist/visual-plan/server/routes/get-plan.d.ts +14 -0
  197. package/dist/visual-plan/server/routes/get-plan.d.ts.map +1 -0
  198. package/dist/visual-plan/server/routes/get-plan.js +38 -0
  199. package/dist/visual-plan/server/routes/get-plan.js.map +1 -0
  200. package/dist/visual-plan/server/routes/patch.d.ts +10 -0
  201. package/dist/visual-plan/server/routes/patch.d.ts.map +1 -0
  202. package/dist/visual-plan/server/routes/patch.js +66 -0
  203. package/dist/visual-plan/server/routes/patch.js.map +1 -0
  204. package/dist/visual-plan/server/visual-plan-server.d.ts +30 -0
  205. package/dist/visual-plan/server/visual-plan-server.d.ts.map +1 -0
  206. package/dist/visual-plan/server/visual-plan-server.js +79 -0
  207. package/dist/visual-plan/server/visual-plan-server.js.map +1 -0
  208. package/dist/visual-plan-web/architects-daughter-latin-400-normal.woff +0 -0
  209. package/dist/visual-plan-web/architects-daughter-latin-400-normal.woff2 +0 -0
  210. package/dist/visual-plan-web/architects-daughter-latin-ext-400-normal.woff +0 -0
  211. package/dist/visual-plan-web/architects-daughter-latin-ext-400-normal.woff2 +0 -0
  212. package/dist/visual-plan-web/index.css +1 -0
  213. package/dist/visual-plan-web/index.html +17 -0
  214. package/dist/visual-plan-web/index.js +187 -0
  215. package/package.json +15 -18
  216. package/dist/commands/orchviz.d.ts +0 -12
  217. package/dist/commands/orchviz.d.ts.map +0 -1
  218. package/dist/commands/orchviz.js +0 -157
  219. package/dist/commands/orchviz.js.map +0 -1
  220. package/dist/migrate/converters/md-to-codex-rules.d.ts +0 -10
  221. package/dist/migrate/converters/md-to-codex-rules.d.ts.map +0 -1
  222. package/dist/migrate/converters/md-to-codex-rules.js +0 -133
  223. package/dist/migrate/converters/md-to-codex-rules.js.map +0 -1
  224. package/dist/orchviz/constants.d.ts +0 -72
  225. package/dist/orchviz/constants.d.ts.map +0 -1
  226. package/dist/orchviz/constants.js +0 -105
  227. package/dist/orchviz/constants.js.map +0 -1
  228. package/dist/orchviz/fs-utils.d.ts +0 -24
  229. package/dist/orchviz/fs-utils.d.ts.map +0 -1
  230. package/dist/orchviz/fs-utils.js +0 -49
  231. package/dist/orchviz/fs-utils.js.map +0 -1
  232. package/dist/orchviz/index.d.ts +0 -29
  233. package/dist/orchviz/index.d.ts.map +0 -1
  234. package/dist/orchviz/index.js +0 -28
  235. package/dist/orchviz/index.js.map +0 -1
  236. package/dist/orchviz/log-persister.d.ts +0 -22
  237. package/dist/orchviz/log-persister.d.ts.map +0 -1
  238. package/dist/orchviz/log-persister.js +0 -96
  239. package/dist/orchviz/log-persister.js.map +0 -1
  240. package/dist/orchviz/logger.d.ts +0 -13
  241. package/dist/orchviz/logger.d.ts.map +0 -1
  242. package/dist/orchviz/logger.js +0 -47
  243. package/dist/orchviz/logger.js.map +0 -1
  244. package/dist/orchviz/open-url.d.ts +0 -11
  245. package/dist/orchviz/open-url.d.ts.map +0 -1
  246. package/dist/orchviz/open-url.js.map +0 -1
  247. package/dist/orchviz/overlay/collector.d.ts +0 -29
  248. package/dist/orchviz/overlay/collector.d.ts.map +0 -1
  249. package/dist/orchviz/overlay/collector.js +0 -38
  250. package/dist/orchviz/overlay/collector.js.map +0 -1
  251. package/dist/orchviz/overlay/gate-readers.d.ts +0 -18
  252. package/dist/orchviz/overlay/gate-readers.d.ts.map +0 -1
  253. package/dist/orchviz/overlay/gate-readers.js +0 -111
  254. package/dist/orchviz/overlay/gate-readers.js.map +0 -1
  255. package/dist/orchviz/overlay/session-state-readers.d.ts +0 -18
  256. package/dist/orchviz/overlay/session-state-readers.d.ts.map +0 -1
  257. package/dist/orchviz/overlay/session-state-readers.js +0 -78
  258. package/dist/orchviz/overlay/session-state-readers.js.map +0 -1
  259. package/dist/orchviz/parser/handle-progress.d.ts +0 -9
  260. package/dist/orchviz/parser/handle-progress.d.ts.map +0 -1
  261. package/dist/orchviz/parser/handle-progress.js +0 -38
  262. package/dist/orchviz/parser/handle-progress.js.map +0 -1
  263. package/dist/orchviz/parser/handle-system.d.ts +0 -22
  264. package/dist/orchviz/parser/handle-system.d.ts.map +0 -1
  265. package/dist/orchviz/parser/handle-system.js +0 -99
  266. package/dist/orchviz/parser/handle-system.js.map +0 -1
  267. package/dist/orchviz/parser/handle-text.d.ts +0 -10
  268. package/dist/orchviz/parser/handle-text.d.ts.map +0 -1
  269. package/dist/orchviz/parser/handle-text.js +0 -83
  270. package/dist/orchviz/parser/handle-text.js.map +0 -1
  271. package/dist/orchviz/parser/handle-thinking.d.ts +0 -10
  272. package/dist/orchviz/parser/handle-thinking.d.ts.map +0 -1
  273. package/dist/orchviz/parser/handle-thinking.js +0 -35
  274. package/dist/orchviz/parser/handle-thinking.js.map +0 -1
  275. package/dist/orchviz/parser/handle-tool-result.d.ts +0 -10
  276. package/dist/orchviz/parser/handle-tool-result.d.ts.map +0 -1
  277. package/dist/orchviz/parser/handle-tool-result.js +0 -130
  278. package/dist/orchviz/parser/handle-tool-result.js.map +0 -1
  279. package/dist/orchviz/parser/handle-tool-use.d.ts +0 -11
  280. package/dist/orchviz/parser/handle-tool-use.d.ts.map +0 -1
  281. package/dist/orchviz/parser/handle-tool-use.js +0 -120
  282. package/dist/orchviz/parser/handle-tool-use.js.map +0 -1
  283. package/dist/orchviz/parser/index.d.ts +0 -38
  284. package/dist/orchviz/parser/index.d.ts.map +0 -1
  285. package/dist/orchviz/parser/index.js +0 -144
  286. package/dist/orchviz/parser/index.js.map +0 -1
  287. package/dist/orchviz/parser/label-helpers.d.ts +0 -9
  288. package/dist/orchviz/parser/label-helpers.d.ts.map +0 -1
  289. package/dist/orchviz/parser/label-helpers.js +0 -44
  290. package/dist/orchviz/parser/label-helpers.js.map +0 -1
  291. package/dist/orchviz/parser/strip-ansi.d.ts +0 -6
  292. package/dist/orchviz/parser/strip-ansi.d.ts.map +0 -1
  293. package/dist/orchviz/parser/strip-ansi.js +0 -14
  294. package/dist/orchviz/parser/strip-ansi.js.map +0 -1
  295. package/dist/orchviz/parser/utils.d.ts +0 -20
  296. package/dist/orchviz/parser/utils.d.ts.map +0 -1
  297. package/dist/orchviz/parser/utils.js +0 -54
  298. package/dist/orchviz/parser/utils.js.map +0 -1
  299. package/dist/orchviz/permission-detection.d.ts +0 -32
  300. package/dist/orchviz/permission-detection.d.ts.map +0 -1
  301. package/dist/orchviz/permission-detection.js +0 -104
  302. package/dist/orchviz/permission-detection.js.map +0 -1
  303. package/dist/orchviz/plan/apply-todo-toggle.d.ts +0 -29
  304. package/dist/orchviz/plan/apply-todo-toggle.d.ts.map +0 -1
  305. package/dist/orchviz/plan/apply-todo-toggle.js +0 -129
  306. package/dist/orchviz/plan/apply-todo-toggle.js.map +0 -1
  307. package/dist/orchviz/plan/atomic-write.d.ts +0 -25
  308. package/dist/orchviz/plan/atomic-write.d.ts.map +0 -1
  309. package/dist/orchviz/plan/atomic-write.js +0 -85
  310. package/dist/orchviz/plan/atomic-write.js.map +0 -1
  311. package/dist/orchviz/plan/collector.d.ts +0 -49
  312. package/dist/orchviz/plan/collector.d.ts.map +0 -1
  313. package/dist/orchviz/plan/collector.js +0 -169
  314. package/dist/orchviz/plan/collector.js.map +0 -1
  315. package/dist/orchviz/plan/etag.d.ts +0 -24
  316. package/dist/orchviz/plan/etag.d.ts.map +0 -1
  317. package/dist/orchviz/plan/etag.js +0 -58
  318. package/dist/orchviz/plan/etag.js.map +0 -1
  319. package/dist/orchviz/plan/find-active-plan.d.ts +0 -9
  320. package/dist/orchviz/plan/find-active-plan.d.ts.map +0 -1
  321. package/dist/orchviz/plan/find-active-plan.js +0 -90
  322. package/dist/orchviz/plan/find-active-plan.js.map +0 -1
  323. package/dist/orchviz/plan/index.d.ts +0 -23
  324. package/dist/orchviz/plan/index.d.ts.map +0 -1
  325. package/dist/orchviz/plan/index.js +0 -91
  326. package/dist/orchviz/plan/index.js.map +0 -1
  327. package/dist/orchviz/plan/list-plans.d.ts +0 -19
  328. package/dist/orchviz/plan/list-plans.d.ts.map +0 -1
  329. package/dist/orchviz/plan/list-plans.js +0 -143
  330. package/dist/orchviz/plan/list-plans.js.map +0 -1
  331. package/dist/orchviz/plan/parse-phase-file.d.ts +0 -13
  332. package/dist/orchviz/plan/parse-phase-file.d.ts.map +0 -1
  333. package/dist/orchviz/plan/parse-phase-file.js +0 -134
  334. package/dist/orchviz/plan/parse-phase-file.js.map +0 -1
  335. package/dist/orchviz/plan/parse-plan-file.d.ts +0 -19
  336. package/dist/orchviz/plan/parse-plan-file.d.ts.map +0 -1
  337. package/dist/orchviz/plan/parse-plan-file.js +0 -62
  338. package/dist/orchviz/plan/parse-plan-file.js.map +0 -1
  339. package/dist/orchviz/plan/plan-constants.d.ts +0 -17
  340. package/dist/orchviz/plan/plan-constants.d.ts.map +0 -1
  341. package/dist/orchviz/plan/plan-constants.js +0 -19
  342. package/dist/orchviz/plan/plan-constants.js.map +0 -1
  343. package/dist/orchviz/plan/plan-lifecycle.d.ts +0 -17
  344. package/dist/orchviz/plan/plan-lifecycle.d.ts.map +0 -1
  345. package/dist/orchviz/plan/plan-lifecycle.js +0 -97
  346. package/dist/orchviz/plan/plan-lifecycle.js.map +0 -1
  347. package/dist/orchviz/plan/types.d.ts +0 -46
  348. package/dist/orchviz/plan/types.d.ts.map +0 -1
  349. package/dist/orchviz/plan/types.js +0 -6
  350. package/dist/orchviz/plan/types.js.map +0 -1
  351. package/dist/orchviz/protocol.d.ts +0 -171
  352. package/dist/orchviz/protocol.d.ts.map +0 -1
  353. package/dist/orchviz/protocol.js +0 -23
  354. package/dist/orchviz/protocol.js.map +0 -1
  355. package/dist/orchviz/redact.d.ts +0 -10
  356. package/dist/orchviz/redact.d.ts.map +0 -1
  357. package/dist/orchviz/redact.js +0 -38
  358. package/dist/orchviz/redact.js.map +0 -1
  359. package/dist/orchviz/sanitize.d.ts +0 -11
  360. package/dist/orchviz/sanitize.d.ts.map +0 -1
  361. package/dist/orchviz/sanitize.js +0 -38
  362. package/dist/orchviz/sanitize.js.map +0 -1
  363. package/dist/orchviz/server/api-handlers.d.ts +0 -55
  364. package/dist/orchviz/server/api-handlers.d.ts.map +0 -1
  365. package/dist/orchviz/server/api-handlers.js +0 -112
  366. package/dist/orchviz/server/api-handlers.js.map +0 -1
  367. package/dist/orchviz/server/index.d.ts +0 -36
  368. package/dist/orchviz/server/index.d.ts.map +0 -1
  369. package/dist/orchviz/server/index.js +0 -144
  370. package/dist/orchviz/server/index.js.map +0 -1
  371. package/dist/orchviz/server/sse-handler.d.ts +0 -28
  372. package/dist/orchviz/server/sse-handler.d.ts.map +0 -1
  373. package/dist/orchviz/server/sse-handler.js +0 -217
  374. package/dist/orchviz/server/sse-handler.js.map +0 -1
  375. package/dist/orchviz/server/static-handler.d.ts +0 -9
  376. package/dist/orchviz/server/static-handler.d.ts.map +0 -1
  377. package/dist/orchviz/server/static-handler.js.map +0 -1
  378. package/dist/orchviz/server/write-handlers.d.ts +0 -20
  379. package/dist/orchviz/server/write-handlers.d.ts.map +0 -1
  380. package/dist/orchviz/server/write-handlers.js +0 -184
  381. package/dist/orchviz/server/write-handlers.js.map +0 -1
  382. package/dist/orchviz/server/write-utils.d.ts +0 -59
  383. package/dist/orchviz/server/write-utils.d.ts.map +0 -1
  384. package/dist/orchviz/server/write-utils.js +0 -161
  385. package/dist/orchviz/server/write-utils.js.map +0 -1
  386. package/dist/orchviz/session-discovery.d.ts +0 -19
  387. package/dist/orchviz/session-discovery.d.ts.map +0 -1
  388. package/dist/orchviz/session-discovery.js +0 -104
  389. package/dist/orchviz/session-discovery.js.map +0 -1
  390. package/dist/orchviz/session-manager.d.ts +0 -17
  391. package/dist/orchviz/session-manager.d.ts.map +0 -1
  392. package/dist/orchviz/session-manager.js +0 -63
  393. package/dist/orchviz/session-manager.js.map +0 -1
  394. package/dist/orchviz/session-runtime.d.ts +0 -21
  395. package/dist/orchviz/session-runtime.d.ts.map +0 -1
  396. package/dist/orchviz/session-runtime.js +0 -135
  397. package/dist/orchviz/session-runtime.js.map +0 -1
  398. package/dist/orchviz/session-watcher.d.ts +0 -33
  399. package/dist/orchviz/session-watcher.d.ts.map +0 -1
  400. package/dist/orchviz/session-watcher.js +0 -135
  401. package/dist/orchviz/session-watcher.js.map +0 -1
  402. package/dist/orchviz/subagent-meta.d.ts +0 -12
  403. package/dist/orchviz/subagent-meta.d.ts.map +0 -1
  404. package/dist/orchviz/subagent-meta.js +0 -34
  405. package/dist/orchviz/subagent-meta.js.map +0 -1
  406. package/dist/orchviz/subagent-scanner.d.ts +0 -15
  407. package/dist/orchviz/subagent-scanner.d.ts.map +0 -1
  408. package/dist/orchviz/subagent-scanner.js +0 -27
  409. package/dist/orchviz/subagent-scanner.js.map +0 -1
  410. package/dist/orchviz/subagent-watcher.d.ts +0 -20
  411. package/dist/orchviz/subagent-watcher.d.ts.map +0 -1
  412. package/dist/orchviz/subagent-watcher.js +0 -160
  413. package/dist/orchviz/subagent-watcher.js.map +0 -1
  414. package/dist/orchviz/token-estimator.d.ts.map +0 -1
  415. package/dist/orchviz/token-estimator.js.map +0 -1
  416. package/dist/orchviz/tool-input-data.d.ts +0 -11
  417. package/dist/orchviz/tool-input-data.d.ts.map +0 -1
  418. package/dist/orchviz/tool-input-data.js +0 -74
  419. package/dist/orchviz/tool-input-data.js.map +0 -1
  420. package/dist/orchviz/tool-summarizer.d.ts +0 -16
  421. package/dist/orchviz/tool-summarizer.d.ts.map +0 -1
  422. package/dist/orchviz/tool-summarizer.js +0 -129
  423. package/dist/orchviz/tool-summarizer.js.map +0 -1
  424. package/dist/orchviz-web/fira-code-cyrillic-400-normal.woff +0 -0
  425. package/dist/orchviz-web/fira-code-cyrillic-400-normal.woff2 +0 -0
  426. package/dist/orchviz-web/fira-code-cyrillic-500-normal.woff +0 -0
  427. package/dist/orchviz-web/fira-code-cyrillic-500-normal.woff2 +0 -0
  428. package/dist/orchviz-web/fira-code-cyrillic-ext-400-normal.woff +0 -0
  429. package/dist/orchviz-web/fira-code-cyrillic-ext-400-normal.woff2 +0 -0
  430. package/dist/orchviz-web/fira-code-cyrillic-ext-500-normal.woff +0 -0
  431. package/dist/orchviz-web/fira-code-cyrillic-ext-500-normal.woff2 +0 -0
  432. package/dist/orchviz-web/fira-code-greek-400-normal.woff +0 -0
  433. package/dist/orchviz-web/fira-code-greek-400-normal.woff2 +0 -0
  434. package/dist/orchviz-web/fira-code-greek-500-normal.woff +0 -0
  435. package/dist/orchviz-web/fira-code-greek-500-normal.woff2 +0 -0
  436. package/dist/orchviz-web/fira-code-greek-ext-400-normal.woff +0 -0
  437. package/dist/orchviz-web/fira-code-greek-ext-400-normal.woff2 +0 -0
  438. package/dist/orchviz-web/fira-code-greek-ext-500-normal.woff +0 -0
  439. package/dist/orchviz-web/fira-code-greek-ext-500-normal.woff2 +0 -0
  440. package/dist/orchviz-web/fira-code-latin-400-normal.woff +0 -0
  441. package/dist/orchviz-web/fira-code-latin-400-normal.woff2 +0 -0
  442. package/dist/orchviz-web/fira-code-latin-500-normal.woff +0 -0
  443. package/dist/orchviz-web/fira-code-latin-500-normal.woff2 +0 -0
  444. package/dist/orchviz-web/fira-code-latin-ext-400-normal.woff +0 -0
  445. package/dist/orchviz-web/fira-code-latin-ext-400-normal.woff2 +0 -0
  446. package/dist/orchviz-web/fira-code-latin-ext-500-normal.woff +0 -0
  447. package/dist/orchviz-web/fira-code-latin-ext-500-normal.woff2 +0 -0
  448. package/dist/orchviz-web/fira-code-symbols2-400-normal.woff +0 -0
  449. package/dist/orchviz-web/fira-code-symbols2-500-normal.woff +0 -0
  450. package/dist/orchviz-web/index.css +0 -1
  451. package/dist/orchviz-web/index.html +0 -18
  452. package/dist/orchviz-web/index.js +0 -53
  453. package/dist/orchviz-web/inter-cyrillic-400-normal.woff +0 -0
  454. package/dist/orchviz-web/inter-cyrillic-400-normal.woff2 +0 -0
  455. package/dist/orchviz-web/inter-cyrillic-500-normal.woff +0 -0
  456. package/dist/orchviz-web/inter-cyrillic-500-normal.woff2 +0 -0
  457. package/dist/orchviz-web/inter-cyrillic-600-normal.woff +0 -0
  458. package/dist/orchviz-web/inter-cyrillic-600-normal.woff2 +0 -0
  459. package/dist/orchviz-web/inter-cyrillic-ext-400-normal.woff +0 -0
  460. package/dist/orchviz-web/inter-cyrillic-ext-400-normal.woff2 +0 -0
  461. package/dist/orchviz-web/inter-cyrillic-ext-500-normal.woff +0 -0
  462. package/dist/orchviz-web/inter-cyrillic-ext-500-normal.woff2 +0 -0
  463. package/dist/orchviz-web/inter-cyrillic-ext-600-normal.woff +0 -0
  464. package/dist/orchviz-web/inter-cyrillic-ext-600-normal.woff2 +0 -0
  465. package/dist/orchviz-web/inter-greek-400-normal.woff +0 -0
  466. package/dist/orchviz-web/inter-greek-400-normal.woff2 +0 -0
  467. package/dist/orchviz-web/inter-greek-500-normal.woff +0 -0
  468. package/dist/orchviz-web/inter-greek-500-normal.woff2 +0 -0
  469. package/dist/orchviz-web/inter-greek-600-normal.woff +0 -0
  470. package/dist/orchviz-web/inter-greek-600-normal.woff2 +0 -0
  471. package/dist/orchviz-web/inter-greek-ext-400-normal.woff +0 -0
  472. package/dist/orchviz-web/inter-greek-ext-400-normal.woff2 +0 -0
  473. package/dist/orchviz-web/inter-greek-ext-500-normal.woff +0 -0
  474. package/dist/orchviz-web/inter-greek-ext-500-normal.woff2 +0 -0
  475. package/dist/orchviz-web/inter-greek-ext-600-normal.woff +0 -0
  476. package/dist/orchviz-web/inter-greek-ext-600-normal.woff2 +0 -0
  477. package/dist/orchviz-web/inter-latin-400-normal.woff +0 -0
  478. package/dist/orchviz-web/inter-latin-400-normal.woff2 +0 -0
  479. package/dist/orchviz-web/inter-latin-500-normal.woff +0 -0
  480. package/dist/orchviz-web/inter-latin-500-normal.woff2 +0 -0
  481. package/dist/orchviz-web/inter-latin-600-normal.woff +0 -0
  482. package/dist/orchviz-web/inter-latin-600-normal.woff2 +0 -0
  483. package/dist/orchviz-web/inter-latin-ext-400-normal.woff +0 -0
  484. package/dist/orchviz-web/inter-latin-ext-400-normal.woff2 +0 -0
  485. package/dist/orchviz-web/inter-latin-ext-500-normal.woff +0 -0
  486. package/dist/orchviz-web/inter-latin-ext-500-normal.woff2 +0 -0
  487. package/dist/orchviz-web/inter-latin-ext-600-normal.woff +0 -0
  488. package/dist/orchviz-web/inter-latin-ext-600-normal.woff2 +0 -0
  489. package/dist/orchviz-web/inter-vietnamese-400-normal.woff +0 -0
  490. package/dist/orchviz-web/inter-vietnamese-400-normal.woff2 +0 -0
  491. package/dist/orchviz-web/inter-vietnamese-500-normal.woff +0 -0
  492. package/dist/orchviz-web/inter-vietnamese-500-normal.woff2 +0 -0
  493. package/dist/orchviz-web/inter-vietnamese-600-normal.woff +0 -0
  494. package/dist/orchviz-web/inter-vietnamese-600-normal.woff2 +0 -0
@@ -0,0 +1,160 @@
1
+ /**
2
+ * `visual-feedback/v1` immutable batch schema + resolution-receipt schema.
3
+ *
4
+ * A feedback batch is written once and never mutated (red-team: immutability is
5
+ * the misapplication guard). It captures the reviewer's intent against an exact
6
+ * `baseRevision` + `baseHash`; the apply loop (Phase 6) refuses to apply a batch
7
+ * whose base no longer matches the artifact. The batch `id` is charset-locked so
8
+ * a consumer can validate it BEFORE any path join.
9
+ *
10
+ * The resolution receipt mirrors the batch, recording a per-operation outcome
11
+ * (`applied | rejected | unresolved`). Batches remain byte-immutable after
12
+ * resolution; the receipt is the mutable-outcome surface.
13
+ *
14
+ * `markup` operation points are position-absolute / unanchored (red-team L3):
15
+ * they do NOT track frames across layout regeneration — documented, not a bug.
16
+ */
17
+ import { z } from "zod";
18
+ export declare const FEEDBACK_OP_TYPES: readonly ["annotation", "copy-change", "field-change", "flow-change", "scope-change", "other"];
19
+ export declare const FeedbackBatchSchema: z.ZodObject<{
20
+ schemaVersion: z.ZodLiteral<"visual-feedback/v1">;
21
+ id: z.ZodString;
22
+ planId: z.ZodString;
23
+ baseRevision: z.ZodNumber;
24
+ baseHash: z.ZodString;
25
+ createdAt: z.ZodString;
26
+ operations: z.ZodArray<z.ZodObject<{
27
+ type: z.ZodEnum<["annotation", "copy-change", "field-change", "flow-change", "scope-change", "other"]>;
28
+ frameId: z.ZodOptional<z.ZodString>;
29
+ elementId: z.ZodOptional<z.ZodString>;
30
+ sourceRefId: z.ZodOptional<z.ZodString>;
31
+ visualPoint: z.ZodOptional<z.ZodObject<{
32
+ x: z.ZodNumber;
33
+ y: z.ZodNumber;
34
+ }, "strict", z.ZodTypeAny, {
35
+ y: number;
36
+ x: number;
37
+ }, {
38
+ y: number;
39
+ x: number;
40
+ }>>;
41
+ intent: z.ZodString;
42
+ comment: z.ZodOptional<z.ZodString>;
43
+ context: z.ZodOptional<z.ZodString>;
44
+ }, "strict", z.ZodTypeAny, {
45
+ type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
46
+ intent: string;
47
+ context?: string | undefined;
48
+ frameId?: string | undefined;
49
+ elementId?: string | undefined;
50
+ sourceRefId?: string | undefined;
51
+ visualPoint?: {
52
+ y: number;
53
+ x: number;
54
+ } | undefined;
55
+ comment?: string | undefined;
56
+ }, {
57
+ type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
58
+ intent: string;
59
+ context?: string | undefined;
60
+ frameId?: string | undefined;
61
+ elementId?: string | undefined;
62
+ sourceRefId?: string | undefined;
63
+ visualPoint?: {
64
+ y: number;
65
+ x: number;
66
+ } | undefined;
67
+ comment?: string | undefined;
68
+ }>, "many">;
69
+ status: z.ZodDefault<z.ZodEnum<["open", "resolved"]>>;
70
+ }, "strict", z.ZodTypeAny, {
71
+ status: "resolved" | "open";
72
+ schemaVersion: "visual-feedback/v1";
73
+ id: string;
74
+ planId: string;
75
+ baseRevision: number;
76
+ baseHash: string;
77
+ createdAt: string;
78
+ operations: {
79
+ type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
80
+ intent: string;
81
+ context?: string | undefined;
82
+ frameId?: string | undefined;
83
+ elementId?: string | undefined;
84
+ sourceRefId?: string | undefined;
85
+ visualPoint?: {
86
+ y: number;
87
+ x: number;
88
+ } | undefined;
89
+ comment?: string | undefined;
90
+ }[];
91
+ }, {
92
+ schemaVersion: "visual-feedback/v1";
93
+ id: string;
94
+ planId: string;
95
+ baseRevision: number;
96
+ baseHash: string;
97
+ createdAt: string;
98
+ operations: {
99
+ type: "annotation" | "other" | "copy-change" | "field-change" | "flow-change" | "scope-change";
100
+ intent: string;
101
+ context?: string | undefined;
102
+ frameId?: string | undefined;
103
+ elementId?: string | undefined;
104
+ sourceRefId?: string | undefined;
105
+ visualPoint?: {
106
+ y: number;
107
+ x: number;
108
+ } | undefined;
109
+ comment?: string | undefined;
110
+ }[];
111
+ status?: "resolved" | "open" | undefined;
112
+ }>;
113
+ export type FeedbackBatch = z.infer<typeof FeedbackBatchSchema>;
114
+ export declare const ResolutionReceiptSchema: z.ZodObject<{
115
+ schemaVersion: z.ZodLiteral<"visual-feedback-receipt/v1">;
116
+ batchId: z.ZodString;
117
+ planId: z.ZodString;
118
+ baseRevision: z.ZodNumber;
119
+ resolvedAtRevision: z.ZodNumber;
120
+ resolvedAt: z.ZodString;
121
+ entries: z.ZodArray<z.ZodObject<{
122
+ index: z.ZodNumber;
123
+ outcome: z.ZodEnum<["applied", "rejected", "unresolved"]>;
124
+ notes: z.ZodOptional<z.ZodString>;
125
+ }, "strict", z.ZodTypeAny, {
126
+ index: number;
127
+ outcome: "rejected" | "applied" | "unresolved";
128
+ notes?: string | undefined;
129
+ }, {
130
+ index: number;
131
+ outcome: "rejected" | "applied" | "unresolved";
132
+ notes?: string | undefined;
133
+ }>, "many">;
134
+ }, "strict", z.ZodTypeAny, {
135
+ entries: {
136
+ index: number;
137
+ outcome: "rejected" | "applied" | "unresolved";
138
+ notes?: string | undefined;
139
+ }[];
140
+ schemaVersion: "visual-feedback-receipt/v1";
141
+ planId: string;
142
+ baseRevision: number;
143
+ batchId: string;
144
+ resolvedAtRevision: number;
145
+ resolvedAt: string;
146
+ }, {
147
+ entries: {
148
+ index: number;
149
+ outcome: "rejected" | "applied" | "unresolved";
150
+ notes?: string | undefined;
151
+ }[];
152
+ schemaVersion: "visual-feedback-receipt/v1";
153
+ planId: string;
154
+ baseRevision: number;
155
+ batchId: string;
156
+ resolvedAtRevision: number;
157
+ resolvedAt: string;
158
+ }>;
159
+ export type ResolutionReceipt = z.infer<typeof ResolutionReceiptSchema>;
160
+ //# sourceMappingURL=feedback-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback-schemas.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/feedback-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,iBAAiB,gGAOpB,CAAC;AAeX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWtB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAUhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU1B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * `visual-feedback/v1` immutable batch schema + resolution-receipt schema.
3
+ *
4
+ * A feedback batch is written once and never mutated (red-team: immutability is
5
+ * the misapplication guard). It captures the reviewer's intent against an exact
6
+ * `baseRevision` + `baseHash`; the apply loop (Phase 6) refuses to apply a batch
7
+ * whose base no longer matches the artifact. The batch `id` is charset-locked so
8
+ * a consumer can validate it BEFORE any path join.
9
+ *
10
+ * The resolution receipt mirrors the batch, recording a per-operation outcome
11
+ * (`applied | rejected | unresolved`). Batches remain byte-immutable after
12
+ * resolution; the receipt is the mutable-outcome surface.
13
+ *
14
+ * `markup` operation points are position-absolute / unanchored (red-team L3):
15
+ * they do NOT track frames across layout regeneration — documented, not a bug.
16
+ */
17
+ import { z } from "zod";
18
+ import { ENTITY_ID_RE, FEEDBACK_BATCH_ID_RE } from "./ids.js";
19
+ const EntityId = z.string().regex(ENTITY_ID_RE);
20
+ const BatchId = z.string().regex(FEEDBACK_BATCH_ID_RE, "invalid feedback batch id (path-injection guard)");
21
+ export const FEEDBACK_OP_TYPES = [
22
+ "annotation",
23
+ "copy-change",
24
+ "field-change",
25
+ "flow-change",
26
+ "scope-change",
27
+ "other",
28
+ ];
29
+ const FeedbackOperationSchema = z
30
+ .object({
31
+ type: z.enum(FEEDBACK_OP_TYPES),
32
+ frameId: EntityId.optional(),
33
+ elementId: z.string().optional(),
34
+ sourceRefId: EntityId.optional(),
35
+ visualPoint: z.object({ x: z.number(), y: z.number() }).strict().optional(),
36
+ intent: z.string().min(1),
37
+ comment: z.string().optional(),
38
+ context: z.string().optional(),
39
+ })
40
+ .strict();
41
+ export const FeedbackBatchSchema = z
42
+ .object({
43
+ schemaVersion: z.literal("visual-feedback/v1"),
44
+ id: BatchId,
45
+ planId: EntityId,
46
+ baseRevision: z.number().int().nonnegative(),
47
+ baseHash: z.string().min(1),
48
+ createdAt: z.string().min(1),
49
+ operations: z.array(FeedbackOperationSchema).min(1).max(500),
50
+ status: z.enum(["open", "resolved"]).default("open"),
51
+ })
52
+ .strict();
53
+ const ResolutionEntrySchema = z
54
+ .object({
55
+ index: z.number().int().nonnegative(),
56
+ outcome: z.enum(["applied", "rejected", "unresolved"]),
57
+ notes: z.string().optional(),
58
+ })
59
+ .strict();
60
+ export const ResolutionReceiptSchema = z
61
+ .object({
62
+ schemaVersion: z.literal("visual-feedback-receipt/v1"),
63
+ batchId: BatchId,
64
+ planId: EntityId,
65
+ baseRevision: z.number().int().nonnegative(),
66
+ resolvedAtRevision: z.number().int().nonnegative(),
67
+ resolvedAt: z.string().min(1),
68
+ entries: z.array(ResolutionEntrySchema),
69
+ })
70
+ .strict();
71
+ //# sourceMappingURL=feedback-schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback-schemas.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/feedback-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC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,KAAK,CAAC,qBAAqB,CAAC;CACvC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Shared identifier patterns for the visual-plan contracts.
3
+ *
4
+ * Feedback batch ids are the security-sensitive one: a consumer validates the
5
+ * id against `FEEDBACK_BATCH_ID_RE` BEFORE any path join (red-team M8), so the
6
+ * charset is deliberately narrow — no dots, slashes, or path separators can
7
+ * appear in a batch filename.
8
+ */
9
+ /** Generic artifact-internal id: lowercase/uppercase alnum + hyphen/underscore. */
10
+ export declare const ENTITY_ID_RE: RegExp;
11
+ /**
12
+ * Strict feedback-batch id: `feedback-<digits>-<slug>`. The fixed charset makes
13
+ * the id safe to interpolate into a filename without traversal risk. Validated
14
+ * before any path join.
15
+ */
16
+ export declare const FEEDBACK_BATCH_ID_RE: RegExp;
17
+ /** True when `id` is a structurally valid artifact-internal id. */
18
+ export declare function isValidEntityId(id: string): boolean;
19
+ /** True when `id` is a structurally valid feedback-batch id (path-injection safe). */
20
+ export declare function isValidFeedbackBatchId(id: string): boolean;
21
+ //# sourceMappingURL=ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/ids.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mFAAmF;AACnF,eAAO,MAAM,YAAY,QAAsC,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAgD,CAAC;AAElF,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE1D"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Shared identifier patterns for the visual-plan contracts.
3
+ *
4
+ * Feedback batch ids are the security-sensitive one: a consumer validates the
5
+ * id against `FEEDBACK_BATCH_ID_RE` BEFORE any path join (red-team M8), so the
6
+ * charset is deliberately narrow — no dots, slashes, or path separators can
7
+ * appear in a batch filename.
8
+ */
9
+ /** Generic artifact-internal id: lowercase/uppercase alnum + hyphen/underscore. */
10
+ export const ENTITY_ID_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
11
+ /**
12
+ * Strict feedback-batch id: `feedback-<digits>-<slug>`. The fixed charset makes
13
+ * the id safe to interpolate into a filename without traversal risk. Validated
14
+ * before any path join.
15
+ */
16
+ export const FEEDBACK_BATCH_ID_RE = /^feedback-\d{8,}-[a-z0-9]([a-z0-9-]{0,63})$/;
17
+ /** True when `id` is a structurally valid artifact-internal id. */
18
+ export function isValidEntityId(id) {
19
+ return ENTITY_ID_RE.test(id);
20
+ }
21
+ /** True when `id` is a structurally valid feedback-batch id (path-injection safe). */
22
+ export function isValidFeedbackBatchId(id) {
23
+ return FEEDBACK_BATCH_ID_RE.test(id);
24
+ }
25
+ //# sourceMappingURL=ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/ids.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAG,mCAAmC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,6CAA6C,CAAC;AAElF,mEAAmE;AACnE,MAAM,UAAU,eAAe,CAAC,EAAU;IACzC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,sBAAsB,CAAC,EAAU;IAChD,OAAO,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Typed VISUAL-ONLY patch operations (Phase 5).
3
+ *
4
+ * These are the only mutations the studio may apply directly to the artifact —
5
+ * lane/order moves, annotation add/edit/remove, connector-label edits, and
6
+ * schema-backed wireframe TEXT-field edits. Raw HTML/CSS editing, freeform
7
+ * resize, and Markdown edits are NOT patch ops (semantic changes go through the
8
+ * feedback→agent loop). Every accepted patch bumps `revision` and clears
9
+ * approval; the application layer re-validates the mutated plan before writing.
10
+ *
11
+ * A wireframe field is targeted by a `wf-field-<id>` CLASS in the wireframe HTML
12
+ * (class is in the sanitizer allowlist, so no allowlist change is needed) — only
13
+ * that element's TEXT content is replaced, then the whole wireframe re-sanitized.
14
+ */
15
+ import { z } from "zod";
16
+ export declare const PatchOpSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
17
+ type: z.ZodLiteral<"move-frame-lane">;
18
+ frameId: z.ZodString;
19
+ laneId: z.ZodString;
20
+ }, "strict", z.ZodTypeAny, {
21
+ type: "move-frame-lane";
22
+ laneId: string;
23
+ frameId: string;
24
+ }, {
25
+ type: "move-frame-lane";
26
+ laneId: string;
27
+ frameId: string;
28
+ }>, z.ZodObject<{
29
+ type: z.ZodLiteral<"reorder-frame">;
30
+ frameId: z.ZodString;
31
+ order: z.ZodNumber;
32
+ }, "strict", z.ZodTypeAny, {
33
+ type: "reorder-frame";
34
+ order: number;
35
+ frameId: string;
36
+ }, {
37
+ type: "reorder-frame";
38
+ order: number;
39
+ frameId: string;
40
+ }>, z.ZodObject<{
41
+ type: z.ZodLiteral<"update-annotation">;
42
+ annotationId: z.ZodString;
43
+ text: z.ZodOptional<z.ZodString>;
44
+ placement: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
45
+ points: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
+ x: z.ZodNumber;
47
+ y: z.ZodNumber;
48
+ }, "strict", z.ZodTypeAny, {
49
+ y: number;
50
+ x: number;
51
+ }, {
52
+ y: number;
53
+ x: number;
54
+ }>, "many">>;
55
+ }, "strict", z.ZodTypeAny, {
56
+ type: "update-annotation";
57
+ annotationId: string;
58
+ text?: string | undefined;
59
+ placement?: "top" | "right" | "bottom" | "left" | undefined;
60
+ points?: {
61
+ y: number;
62
+ x: number;
63
+ }[] | undefined;
64
+ }, {
65
+ type: "update-annotation";
66
+ annotationId: string;
67
+ text?: string | undefined;
68
+ placement?: "top" | "right" | "bottom" | "left" | undefined;
69
+ points?: {
70
+ y: number;
71
+ x: number;
72
+ }[] | undefined;
73
+ }>, z.ZodObject<{
74
+ type: z.ZodLiteral<"append-annotation">;
75
+ annotation: z.ZodObject<{
76
+ id: z.ZodString;
77
+ kind: z.ZodEnum<["note", "markup"]>;
78
+ text: z.ZodString;
79
+ targetId: z.ZodOptional<z.ZodString>;
80
+ placement: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
81
+ points: z.ZodOptional<z.ZodArray<z.ZodObject<{
82
+ x: z.ZodNumber;
83
+ y: z.ZodNumber;
84
+ }, "strict", z.ZodTypeAny, {
85
+ y: number;
86
+ x: number;
87
+ }, {
88
+ y: number;
89
+ x: number;
90
+ }>, "many">>;
91
+ }, "strict", z.ZodTypeAny, {
92
+ id: string;
93
+ kind: "note" | "markup";
94
+ text: string;
95
+ targetId?: string | undefined;
96
+ placement?: "top" | "right" | "bottom" | "left" | undefined;
97
+ points?: {
98
+ y: number;
99
+ x: number;
100
+ }[] | undefined;
101
+ }, {
102
+ id: string;
103
+ kind: "note" | "markup";
104
+ text: string;
105
+ targetId?: string | undefined;
106
+ placement?: "top" | "right" | "bottom" | "left" | undefined;
107
+ points?: {
108
+ y: number;
109
+ x: number;
110
+ }[] | undefined;
111
+ }>;
112
+ }, "strict", z.ZodTypeAny, {
113
+ type: "append-annotation";
114
+ annotation: {
115
+ id: string;
116
+ kind: "note" | "markup";
117
+ text: string;
118
+ targetId?: string | undefined;
119
+ placement?: "top" | "right" | "bottom" | "left" | undefined;
120
+ points?: {
121
+ y: number;
122
+ x: number;
123
+ }[] | undefined;
124
+ };
125
+ }, {
126
+ type: "append-annotation";
127
+ annotation: {
128
+ id: string;
129
+ kind: "note" | "markup";
130
+ text: string;
131
+ targetId?: string | undefined;
132
+ placement?: "top" | "right" | "bottom" | "left" | undefined;
133
+ points?: {
134
+ y: number;
135
+ x: number;
136
+ }[] | undefined;
137
+ };
138
+ }>, z.ZodObject<{
139
+ type: z.ZodLiteral<"remove-annotation">;
140
+ annotationId: z.ZodString;
141
+ }, "strict", z.ZodTypeAny, {
142
+ type: "remove-annotation";
143
+ annotationId: string;
144
+ }, {
145
+ type: "remove-annotation";
146
+ annotationId: string;
147
+ }>, z.ZodObject<{
148
+ type: z.ZodLiteral<"update-connector-label">;
149
+ connectorId: z.ZodString;
150
+ label: z.ZodString;
151
+ }, "strict", z.ZodTypeAny, {
152
+ type: "update-connector-label";
153
+ label: string;
154
+ connectorId: string;
155
+ }, {
156
+ type: "update-connector-label";
157
+ label: string;
158
+ connectorId: string;
159
+ }>, z.ZodObject<{
160
+ type: z.ZodLiteral<"update-wireframe-field">;
161
+ frameId: z.ZodString;
162
+ fieldId: z.ZodString;
163
+ text: z.ZodString;
164
+ }, "strict", z.ZodTypeAny, {
165
+ type: "update-wireframe-field";
166
+ text: string;
167
+ frameId: string;
168
+ fieldId: string;
169
+ }, {
170
+ type: "update-wireframe-field";
171
+ text: string;
172
+ frameId: string;
173
+ fieldId: string;
174
+ }>]>;
175
+ export type PatchOp = z.infer<typeof PatchOpSchema>;
176
+ //# sourceMappingURL=patches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/patches.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Typed VISUAL-ONLY patch operations (Phase 5).
3
+ *
4
+ * These are the only mutations the studio may apply directly to the artifact —
5
+ * lane/order moves, annotation add/edit/remove, connector-label edits, and
6
+ * schema-backed wireframe TEXT-field edits. Raw HTML/CSS editing, freeform
7
+ * resize, and Markdown edits are NOT patch ops (semantic changes go through the
8
+ * feedback→agent loop). Every accepted patch bumps `revision` and clears
9
+ * approval; the application layer re-validates the mutated plan before writing.
10
+ *
11
+ * A wireframe field is targeted by a `wf-field-<id>` CLASS in the wireframe HTML
12
+ * (class is in the sanitizer allowlist, so no allowlist change is needed) — only
13
+ * that element's TEXT content is replaced, then the whole wireframe re-sanitized.
14
+ */
15
+ import { z } from "zod";
16
+ import { ENTITY_ID_RE } from "./ids.js";
17
+ import { AnnotationSchema } from "./schemas.js";
18
+ const EntityId = z.string().regex(ENTITY_ID_RE);
19
+ const Placement = z.enum(["top", "right", "bottom", "left"]);
20
+ const Points = z.array(z.object({ x: z.number(), y: z.number() }).strict());
21
+ const MoveFrameLane = z.object({ type: z.literal("move-frame-lane"), frameId: EntityId, laneId: EntityId }).strict();
22
+ const ReorderFrame = z.object({ type: z.literal("reorder-frame"), frameId: EntityId, order: z.number().int() }).strict();
23
+ const UpdateAnnotation = z
24
+ .object({ type: z.literal("update-annotation"), annotationId: EntityId, text: z.string().min(1).optional(), placement: Placement.optional(), points: Points.optional() })
25
+ .strict();
26
+ const AppendAnnotation = z.object({ type: z.literal("append-annotation"), annotation: AnnotationSchema }).strict();
27
+ const RemoveAnnotation = z.object({ type: z.literal("remove-annotation"), annotationId: EntityId }).strict();
28
+ const UpdateConnectorLabel = z.object({ type: z.literal("update-connector-label"), connectorId: EntityId, label: z.string() }).strict();
29
+ const UpdateWireframeField = z
30
+ .object({ type: z.literal("update-wireframe-field"), frameId: EntityId, fieldId: EntityId, text: z.string() })
31
+ .strict();
32
+ export const PatchOpSchema = z.discriminatedUnion("type", [
33
+ MoveFrameLane,
34
+ ReorderFrame,
35
+ UpdateAnnotation,
36
+ AppendAnnotation,
37
+ RemoveAnnotation,
38
+ UpdateConnectorLabel,
39
+ UpdateWireframeField,
40
+ ]);
41
+ //# sourceMappingURL=patches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patches.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/patches.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAChD,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAE5E,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACrH,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAA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CAAC,kBAAkB,CAAC,MAAM,EAAE;IACzD,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,oBAAoB;CACpB,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Shared wireframe-sanitizer allowlist config.
3
+ *
4
+ * This module is the SINGLE source of truth for the sanitizer boundary and is
5
+ * imported by BOTH sides (red-team H2): the Node save-time sanitizer here in
6
+ * Phase 1 (jsdom-backed DOMPurify) and the browser render-time sanitizer in
7
+ * Phase 4 (native-DOM DOMPurify). Two parsers over ONE allowlist is the only
8
+ * way to keep the reject-at-save and re-sanitize-at-render decisions identical.
9
+ *
10
+ * It is pure data — no DOM, no jsdom, no dompurify import — so both environments
11
+ * can consume it without pulling in the other's engine.
12
+ *
13
+ * Reject semantics (not repair): the caller sanitizes with this config, then
14
+ * diffs the sanitized output against the DOM-normalized input; ANY delta is a
15
+ * rejection with a JSON path. This config's job is only to define what "safe"
16
+ * means; the diff enforces reject-not-repair.
17
+ */
18
+ /**
19
+ * Semantic wireframe tag vocabulary. Anything outside this list is stripped by
20
+ * DOMPurify, which the reject-diff then turns into a hard error. Interactive
21
+ * form controls (`input`, `textarea`, `select`, `form`) are intentionally
22
+ * absent — wireframes represent them as `.wf-*`-classed structural elements,
23
+ * never live controls.
24
+ */
25
+ export declare const WIREFRAME_ALLOWED_TAGS: readonly string[];
26
+ /**
27
+ * Allowed attributes. `class` carries the `.wf-*` vocabulary; `href` is allowed
28
+ * but scheme-restricted by `WIREFRAME_ALLOWED_URI_REGEXP`. `style` is NOT
29
+ * allowed (inline CSS is how fixed-position / z-index / font-face attacks
30
+ * arrive), so any `style=` attribute is stripped and the diff rejects it.
31
+ */
32
+ export declare const WIREFRAME_ALLOWED_ATTR: readonly string[];
33
+ /**
34
+ * URL scheme allowlist for `href`. Permits http(s), mailto, in-page anchors,
35
+ * and site-relative paths (a single leading `/`). Everything else —
36
+ * `javascript:`, `data:`, `vbscript:`, tab/entity-obfuscated schemes, AND
37
+ * protocol-relative `//host` (which resolves to an external origin) — is
38
+ * rejected by DOMPurify and the diff.
39
+ */
40
+ export declare const WIREFRAME_ALLOWED_URI_REGEXP: RegExp;
41
+ /**
42
+ * The DOMPurify config object, identical on both sides.
43
+ *
44
+ * NOTE: `USE_PROFILES` is deliberately NOT set — DOMPurify IGNORES
45
+ * `ALLOWED_TAGS`/`ALLOWED_ATTR` whenever a profile is present, and the built-in
46
+ * html profile permits form controls. The explicit `ALLOWED_TAGS` allowlist is
47
+ * strictly stronger: anything outside it (form controls, SVG, MathML, script)
48
+ * is stripped, which the reject-diff turns into a hard error. Data/ARIA attrs
49
+ * are off; `style` is force-forbidden even though it is already off-allowlist.
50
+ */
51
+ export declare const WIREFRAME_SANITIZE_CONFIG: {
52
+ ALLOWED_TAGS: string[];
53
+ ALLOWED_ATTR: string[];
54
+ ALLOW_DATA_ATTR: boolean;
55
+ ALLOW_ARIA_ATTR: boolean;
56
+ FORBID_ATTR: string[];
57
+ FORBID_TAGS: string[];
58
+ ALLOWED_URI_REGEXP: RegExp;
59
+ WHOLE_DOCUMENT: boolean;
60
+ };
61
+ //# sourceMappingURL=sanitizer-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitizer-config.d.ts","sourceRoot":"","sources":["../../../src/visual-plan/domain/sanitizer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EASnD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAuC,CAAC;AAE5F;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,QAAwC,CAAC;AAElF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;CASrC,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Shared wireframe-sanitizer allowlist config.
3
+ *
4
+ * This module is the SINGLE source of truth for the sanitizer boundary and is
5
+ * imported by BOTH sides (red-team H2): the Node save-time sanitizer here in
6
+ * Phase 1 (jsdom-backed DOMPurify) and the browser render-time sanitizer in
7
+ * Phase 4 (native-DOM DOMPurify). Two parsers over ONE allowlist is the only
8
+ * way to keep the reject-at-save and re-sanitize-at-render decisions identical.
9
+ *
10
+ * It is pure data — no DOM, no jsdom, no dompurify import — so both environments
11
+ * can consume it without pulling in the other's engine.
12
+ *
13
+ * Reject semantics (not repair): the caller sanitizes with this config, then
14
+ * diffs the sanitized output against the DOM-normalized input; ANY delta is a
15
+ * rejection with a JSON path. This config's job is only to define what "safe"
16
+ * means; the diff enforces reject-not-repair.
17
+ */
18
+ /**
19
+ * Semantic wireframe tag vocabulary. Anything outside this list is stripped by
20
+ * DOMPurify, which the reject-diff then turns into a hard error. Interactive
21
+ * form controls (`input`, `textarea`, `select`, `form`) are intentionally
22
+ * absent — wireframes represent them as `.wf-*`-classed structural elements,
23
+ * never live controls.
24
+ */
25
+ export const WIREFRAME_ALLOWED_TAGS = [
26
+ "section", "header", "footer", "main", "nav", "aside", "article",
27
+ "div", "span", "p",
28
+ "h1", "h2", "h3", "h4", "h5", "h6",
29
+ "ul", "ol", "li", "dl", "dt", "dd",
30
+ "a", "strong", "em", "small", "b", "i", "u", "code", "pre", "blockquote",
31
+ "figure", "figcaption", "hr", "br",
32
+ "table", "thead", "tbody", "tfoot", "tr", "th", "td", "caption",
33
+ "label",
34
+ ];
35
+ /**
36
+ * Allowed attributes. `class` carries the `.wf-*` vocabulary; `href` is allowed
37
+ * but scheme-restricted by `WIREFRAME_ALLOWED_URI_REGEXP`. `style` is NOT
38
+ * allowed (inline CSS is how fixed-position / z-index / font-face attacks
39
+ * arrive), so any `style=` attribute is stripped and the diff rejects it.
40
+ */
41
+ export const WIREFRAME_ALLOWED_ATTR = ["class", "href", "title", "role"];
42
+ /**
43
+ * URL scheme allowlist for `href`. Permits http(s), mailto, in-page anchors,
44
+ * and site-relative paths (a single leading `/`). Everything else —
45
+ * `javascript:`, `data:`, `vbscript:`, tab/entity-obfuscated schemes, AND
46
+ * protocol-relative `//host` (which resolves to an external origin) — is
47
+ * rejected by DOMPurify and the diff.
48
+ */
49
+ export const WIREFRAME_ALLOWED_URI_REGEXP = /^(?:(?:https?|mailto):|#|\/(?!\/))/i;
50
+ /**
51
+ * The DOMPurify config object, identical on both sides.
52
+ *
53
+ * NOTE: `USE_PROFILES` is deliberately NOT set — DOMPurify IGNORES
54
+ * `ALLOWED_TAGS`/`ALLOWED_ATTR` whenever a profile is present, and the built-in
55
+ * html profile permits form controls. The explicit `ALLOWED_TAGS` allowlist is
56
+ * strictly stronger: anything outside it (form controls, SVG, MathML, script)
57
+ * is stripped, which the reject-diff turns into a hard error. Data/ARIA attrs
58
+ * are off; `style` is force-forbidden even though it is already off-allowlist.
59
+ */
60
+ export const WIREFRAME_SANITIZE_CONFIG = {
61
+ ALLOWED_TAGS: [...WIREFRAME_ALLOWED_TAGS],
62
+ ALLOWED_ATTR: [...WIREFRAME_ALLOWED_ATTR],
63
+ ALLOW_DATA_ATTR: false,
64
+ ALLOW_ARIA_ATTR: false,
65
+ FORBID_ATTR: ["style"],
66
+ FORBID_TAGS: ["style", "script", "iframe", "object", "embed", "form", "svg", "math"],
67
+ ALLOWED_URI_REGEXP: WIREFRAME_ALLOWED_URI_REGEXP,
68
+ WHOLE_DOCUMENT: false,
69
+ };
70
+ //# sourceMappingURL=sanitizer-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitizer-config.js","sourceRoot":"","sources":["../../../src/visual-plan/domain/sanitizer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACxD,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS;IAChE,KAAK,EAAE,MAAM,E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