@open-mercato/cezar 0.19.0-pr1908.4332 → 0.19.0-pr1908.4683

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 (608) hide show
  1. package/README.md +3 -2
  2. package/dist/agent-config/account-identity.js +3 -0
  3. package/dist/agent-config/account-identity.js.map +1 -1
  4. package/dist/agent-config/catalog.d.ts +7 -1
  5. package/dist/agent-config/catalog.js +174 -4
  6. package/dist/agent-config/catalog.js.map +1 -1
  7. package/dist/agent-config/model-settings/gemini.d.ts +8 -0
  8. package/dist/agent-config/model-settings/gemini.js +16 -0
  9. package/dist/agent-config/model-settings/gemini.js.map +1 -0
  10. package/dist/agent-config/model-settings/kimi.d.ts +7 -0
  11. package/dist/agent-config/model-settings/kimi.js +13 -0
  12. package/dist/agent-config/model-settings/kimi.js.map +1 -0
  13. package/dist/agent-config/model-settings/omp.d.ts +11 -0
  14. package/dist/agent-config/model-settings/omp.js +17 -0
  15. package/dist/agent-config/model-settings/omp.js.map +1 -0
  16. package/dist/agent-config/model-settings/shared.d.ts +6 -0
  17. package/dist/agent-config/model-settings/shared.js +17 -3
  18. package/dist/agent-config/model-settings/shared.js.map +1 -1
  19. package/dist/agent-config/models.js +6 -0
  20. package/dist/agent-config/models.js.map +1 -1
  21. package/dist/agent-config/validate.js +15 -0
  22. package/dist/agent-config/validate.js.map +1 -1
  23. package/dist/automations/automation-cli.d.ts +2 -0
  24. package/dist/automations/automation-cli.js +82 -2
  25. package/dist/automations/automation-cli.js.map +1 -1
  26. package/dist/automations/deferred-start.d.ts +5 -4
  27. package/dist/automations/deferred-start.js +5 -1
  28. package/dist/automations/deferred-start.js.map +1 -1
  29. package/dist/automations/paused-work.d.ts +24 -0
  30. package/dist/automations/paused-work.js +61 -0
  31. package/dist/automations/paused-work.js.map +1 -0
  32. package/dist/automations/pr-head.d.ts +3 -0
  33. package/dist/automations/pr-head.js +8 -4
  34. package/dist/automations/pr-head.js.map +1 -1
  35. package/dist/automations/prompts.js +1 -0
  36. package/dist/automations/prompts.js.map +1 -1
  37. package/dist/automations/store.d.ts +16 -0
  38. package/dist/automations/store.js +44 -0
  39. package/dist/automations/store.js.map +1 -1
  40. package/dist/automations/task-template.js +1 -0
  41. package/dist/automations/task-template.js.map +1 -1
  42. package/dist/automations/templates.js +1 -0
  43. package/dist/automations/templates.js.map +1 -1
  44. package/dist/automations/types.d.ts +24 -0
  45. package/dist/automations/types.js +2 -0
  46. package/dist/automations/types.js.map +1 -1
  47. package/dist/automations/validate-input.d.ts +188 -0
  48. package/dist/automations/validate-input.js +85 -0
  49. package/dist/automations/validate-input.js.map +1 -0
  50. package/dist/config.d.ts +12 -5
  51. package/dist/config.js +4 -12
  52. package/dist/config.js.map +1 -1
  53. package/dist/contract/agent-config.d.ts +9 -0
  54. package/dist/contract/agent-profiles.d.ts +74 -20
  55. package/dist/contract/agent.d.ts +12 -0
  56. package/dist/contract/artifacts.d.ts +138 -0
  57. package/dist/contract/assets.d.ts +83 -0
  58. package/dist/contract/automations.d.ts +158 -0
  59. package/dist/contract/dashboard-costs.d.ts +2 -0
  60. package/dist/contract/dashboard.d.ts +8 -0
  61. package/dist/contract/deferred-start.d.ts +33 -0
  62. package/dist/contract/dispatch.d.ts +9 -0
  63. package/dist/contract/events.d.ts +6 -0
  64. package/dist/contract/github.d.ts +13 -0
  65. package/dist/contract/health.d.ts +12 -0
  66. package/dist/contract/impact.d.ts +134 -0
  67. package/dist/contract/index.d.ts +6 -0
  68. package/dist/contract/index.js +2955 -2547
  69. package/dist/contract/managers.d.ts +79 -0
  70. package/dist/contract/runners.d.ts +15 -0
  71. package/dist/contract/runs.d.ts +292 -0
  72. package/dist/contract/skills.d.ts +67 -0
  73. package/dist/contract/telemetry.d.ts +5 -1
  74. package/dist/contract/transfer.d.ts +1932 -0
  75. package/dist/contract/workflows.d.ts +87 -0
  76. package/dist/contract/workspace-layouts.d.ts +6 -0
  77. package/dist/contract/workspace.d.ts +111 -37
  78. package/dist/core/agent-env.js +43 -1
  79. package/dist/core/agent-env.js.map +1 -1
  80. package/dist/core/agent-errors.d.ts +3 -0
  81. package/dist/core/agent-errors.js +13 -0
  82. package/dist/core/agent-errors.js.map +1 -1
  83. package/dist/core/agent-model-policy.d.ts +1 -1
  84. package/dist/core/agent-model-policy.js +1 -1
  85. package/dist/core/agent-model-policy.js.map +1 -1
  86. package/dist/core/agent-profiles.d.ts +19 -3
  87. package/dist/core/agent-profiles.js +27 -3
  88. package/dist/core/agent-profiles.js.map +1 -1
  89. package/dist/core/agent-runner.d.ts +44 -10
  90. package/dist/core/agent-runner.js +21 -7
  91. package/dist/core/agent-runner.js.map +1 -1
  92. package/dist/core/antigravity-runner.js +2 -1
  93. package/dist/core/antigravity-runner.js.map +1 -1
  94. package/dist/core/backend-detect.d.ts +3 -2
  95. package/dist/core/backend-detect.js +80 -1
  96. package/dist/core/backend-detect.js.map +1 -1
  97. package/dist/core/claude-cli-runner.js +30 -3
  98. package/dist/core/claude-cli-runner.js.map +1 -1
  99. package/dist/core/claude-model-catalog.d.ts +6 -1
  100. package/dist/core/claude-model-catalog.js +20 -0
  101. package/dist/core/claude-model-catalog.js.map +1 -1
  102. package/dist/core/claude-usage-status.d.ts +8 -0
  103. package/dist/core/claude-usage-status.js +48 -0
  104. package/dist/core/claude-usage-status.js.map +1 -0
  105. package/dist/core/codex-app-server-runner.d.ts +8 -0
  106. package/dist/core/codex-app-server-runner.js +84 -13
  107. package/dist/core/codex-app-server-runner.js.map +1 -1
  108. package/dist/core/codex-model-catalog.js +42 -0
  109. package/dist/core/codex-model-catalog.js.map +1 -1
  110. package/dist/core/codex-ui-mapper.d.ts +7 -0
  111. package/dist/core/codex-ui-mapper.js +12 -2
  112. package/dist/core/codex-ui-mapper.js.map +1 -1
  113. package/dist/core/copilot-acp-runner.js +5 -1
  114. package/dist/core/copilot-acp-runner.js.map +1 -1
  115. package/dist/core/cursor-agent-runner.js +5 -1
  116. package/dist/core/cursor-agent-runner.js.map +1 -1
  117. package/dist/core/gemini-acp-runner.d.ts +37 -0
  118. package/dist/core/gemini-acp-runner.js +537 -0
  119. package/dist/core/gemini-acp-runner.js.map +1 -0
  120. package/dist/core/gemini-credentials.d.ts +21 -0
  121. package/dist/core/gemini-credentials.js +80 -0
  122. package/dist/core/gemini-credentials.js.map +1 -0
  123. package/dist/core/gemini-sessions.d.ts +18 -0
  124. package/dist/core/gemini-sessions.js +41 -0
  125. package/dist/core/gemini-sessions.js.map +1 -0
  126. package/dist/core/gemini-ui-mapper.d.ts +30 -0
  127. package/dist/core/gemini-ui-mapper.js +80 -0
  128. package/dist/core/gemini-ui-mapper.js.map +1 -0
  129. package/dist/core/junie-runner.js +2 -1
  130. package/dist/core/junie-runner.js.map +1 -1
  131. package/dist/core/kimi-home.d.ts +7 -0
  132. package/dist/core/kimi-home.js +13 -0
  133. package/dist/core/kimi-home.js.map +1 -0
  134. package/dist/core/kimi-model-catalog.d.ts +17 -0
  135. package/dist/core/kimi-model-catalog.js +45 -0
  136. package/dist/core/kimi-model-catalog.js.map +1 -0
  137. package/dist/core/kimi-runner.d.ts +90 -0
  138. package/dist/core/kimi-runner.js +874 -0
  139. package/dist/core/kimi-runner.js.map +1 -0
  140. package/dist/core/kimi-ui-mapper.d.ts +71 -0
  141. package/dist/core/kimi-ui-mapper.js +399 -0
  142. package/dist/core/kimi-ui-mapper.js.map +1 -0
  143. package/dist/core/model-identity.js +11 -0
  144. package/dist/core/model-identity.js.map +1 -1
  145. package/dist/core/model-presets.js +10 -0
  146. package/dist/core/model-presets.js.map +1 -1
  147. package/dist/core/omp-rpc-runner.d.ts +41 -0
  148. package/dist/core/omp-rpc-runner.js +451 -0
  149. package/dist/core/omp-rpc-runner.js.map +1 -0
  150. package/dist/core/omp-ui-mapper.d.ts +56 -0
  151. package/dist/core/omp-ui-mapper.js +468 -0
  152. package/dist/core/omp-ui-mapper.js.map +1 -0
  153. package/dist/core/opencode-http.d.ts +2 -0
  154. package/dist/core/opencode-http.js +2 -2
  155. package/dist/core/opencode-http.js.map +1 -1
  156. package/dist/core/opencode-server-runner.d.ts +3 -1
  157. package/dist/core/opencode-server-runner.js +197 -25
  158. package/dist/core/opencode-server-runner.js.map +1 -1
  159. package/dist/core/opencode-v2-events.d.ts +11 -0
  160. package/dist/core/opencode-v2-events.js +105 -0
  161. package/dist/core/opencode-v2-events.js.map +1 -0
  162. package/dist/core/pi-runner.js +5 -1
  163. package/dist/core/pi-runner.js.map +1 -1
  164. package/dist/core/private-mcp.d.ts +1 -1
  165. package/dist/core/private-mcp.js +2 -2
  166. package/dist/core/private-mcp.js.map +1 -1
  167. package/dist/core/process-signals.d.ts +29 -0
  168. package/dist/core/process-signals.js +85 -0
  169. package/dist/core/process-signals.js.map +1 -0
  170. package/dist/core/provider-auth.d.ts +25 -2
  171. package/dist/core/provider-auth.js +132 -12
  172. package/dist/core/provider-auth.js.map +1 -1
  173. package/dist/core/runner-factory.d.ts +1 -0
  174. package/dist/core/runner-factory.js +38 -1
  175. package/dist/core/runner-factory.js.map +1 -1
  176. package/dist/core/runner-model-catalog.d.ts +8 -0
  177. package/dist/core/runner-model-catalog.js +3 -0
  178. package/dist/core/runner-model-catalog.js.map +1 -1
  179. package/dist/core/tool-display.js +2 -0
  180. package/dist/core/tool-display.js.map +1 -1
  181. package/dist/core/ui-events.d.ts +1 -1
  182. package/dist/core/usage-limit.d.ts +2 -2
  183. package/dist/core/usage-limit.js +5 -3
  184. package/dist/core/usage-limit.js.map +1 -1
  185. package/dist/data-gitignore.d.ts +1 -1
  186. package/dist/data-gitignore.js +1 -0
  187. package/dist/data-gitignore.js.map +1 -1
  188. package/dist/dispatch/engine.d.ts +4 -0
  189. package/dist/dispatch/engine.js +9 -0
  190. package/dist/dispatch/engine.js.map +1 -1
  191. package/dist/e2e-setup.d.ts +8 -3
  192. package/dist/e2e-setup.js +31 -16
  193. package/dist/e2e-setup.js.map +1 -1
  194. package/dist/handoff.d.ts +2 -2
  195. package/dist/handoff.js +5 -5
  196. package/dist/handoff.js.map +1 -1
  197. package/dist/impact/demo-review.json +781 -0
  198. package/dist/impact/diff.d.ts +21 -0
  199. package/dist/impact/diff.js +81 -0
  200. package/dist/impact/diff.js.map +1 -0
  201. package/dist/impact/evidence.d.ts +67 -0
  202. package/dist/impact/evidence.js +238 -0
  203. package/dist/impact/evidence.js.map +1 -0
  204. package/dist/impact/impact-cli.d.ts +12 -0
  205. package/dist/impact/impact-cli.js +141 -0
  206. package/dist/impact/impact-cli.js.map +1 -0
  207. package/dist/impact/launch.d.ts +46 -0
  208. package/dist/impact/launch.js +145 -0
  209. package/dist/impact/launch.js.map +1 -0
  210. package/dist/impact/model.d.ts +551 -0
  211. package/dist/impact/model.js +188 -0
  212. package/dist/impact/model.js.map +1 -0
  213. package/dist/impact/publish.d.ts +30 -0
  214. package/dist/impact/publish.js +119 -0
  215. package/dist/impact/publish.js.map +1 -0
  216. package/dist/impact/render.d.ts +41 -0
  217. package/dist/impact/render.js +109 -0
  218. package/dist/impact/render.js.map +1 -0
  219. package/dist/impact/template.html +670 -0
  220. package/dist/impact/validate.d.ts +25 -0
  221. package/dist/impact/validate.js +273 -0
  222. package/dist/impact/validate.js.map +1 -0
  223. package/dist/index.js +19 -4
  224. package/dist/index.js.map +1 -1
  225. package/dist/managers/engine.js +5 -2
  226. package/dist/managers/engine.js.map +1 -1
  227. package/dist/pack-check.d.ts +1 -0
  228. package/dist/pack-check.js +14 -0
  229. package/dist/pack-check.js.map +1 -1
  230. package/dist/paths.d.ts +6 -0
  231. package/dist/paths.js +19 -1
  232. package/dist/paths.js.map +1 -1
  233. package/dist/runs/agent-error-telemetry.js +7 -4
  234. package/dist/runs/agent-error-telemetry.js.map +1 -1
  235. package/dist/runs/agent-tmpdir.d.ts +25 -6
  236. package/dist/runs/agent-tmpdir.js +136 -25
  237. package/dist/runs/agent-tmpdir.js.map +1 -1
  238. package/dist/runs/artifacts.d.ts +52 -0
  239. package/dist/runs/artifacts.js +243 -0
  240. package/dist/runs/artifacts.js.map +1 -0
  241. package/dist/runs/event-history.d.ts +12 -0
  242. package/dist/runs/event-history.js +61 -0
  243. package/dist/runs/event-history.js.map +1 -1
  244. package/dist/runs/project-assets.d.ts +9 -0
  245. package/dist/runs/project-assets.js +57 -0
  246. package/dist/runs/project-assets.js.map +1 -0
  247. package/dist/runs/review-gate.d.ts +10 -0
  248. package/dist/runs/review-gate.js +12 -0
  249. package/dist/runs/review-gate.js.map +1 -1
  250. package/dist/runs/store.d.ts +70 -4
  251. package/dist/runs/store.js +139 -26
  252. package/dist/runs/store.js.map +1 -1
  253. package/dist/server/agent-setup.d.ts +1 -1
  254. package/dist/server/agent-setup.js +2 -1
  255. package/dist/server/agent-setup.js.map +1 -1
  256. package/dist/server/artifacts.d.ts +33 -0
  257. package/dist/server/artifacts.js +133 -0
  258. package/dist/server/artifacts.js.map +1 -0
  259. package/dist/server/dashboard.d.ts +5 -0
  260. package/dist/server/forge/github-assets.d.ts +7 -0
  261. package/dist/server/forge/github-assets.js +100 -0
  262. package/dist/server/forge/github-assets.js.map +1 -0
  263. package/dist/server/forge/github.d.ts +11 -0
  264. package/dist/server/forge/github.js +42 -0
  265. package/dist/server/forge/github.js.map +1 -1
  266. package/dist/server/open-in-app.js +3 -0
  267. package/dist/server/open-in-app.js.map +1 -1
  268. package/dist/server/provider-action-gate.js +12 -4
  269. package/dist/server/provider-action-gate.js.map +1 -1
  270. package/dist/server/server.d.ts +10012 -6701
  271. package/dist/server/server.js +353 -193
  272. package/dist/server/server.js.map +1 -1
  273. package/dist/server/star-count.d.ts +5 -5
  274. package/dist/server/star-count.js +5 -5
  275. package/dist/server/star-count.js.map +1 -1
  276. package/dist/server-install/steps.js +1 -0
  277. package/dist/server-install/steps.js.map +1 -1
  278. package/dist/skills-provision.js +7 -1
  279. package/dist/skills-provision.js.map +1 -1
  280. package/dist/skills.d.ts +10 -6
  281. package/dist/skills.js +11 -6
  282. package/dist/skills.js.map +1 -1
  283. package/dist/transfer/automations-file.d.ts +46 -0
  284. package/dist/transfer/automations-file.js +172 -0
  285. package/dist/transfer/automations-file.js.map +1 -0
  286. package/dist/transfer/config-bundle.d.ts +100 -0
  287. package/dist/transfer/config-bundle.js +430 -0
  288. package/dist/transfer/config-bundle.js.map +1 -0
  289. package/dist/webhooks/outbox.js +83 -63
  290. package/dist/webhooks/outbox.js.map +1 -1
  291. package/dist/workflows/graph.d.ts +27 -0
  292. package/dist/workflows/load.js +2 -2
  293. package/dist/workflows/load.js.map +1 -1
  294. package/dist/workflows/resume-fallback.d.ts +13 -6
  295. package/dist/workflows/resume-fallback.js +26 -6
  296. package/dist/workflows/resume-fallback.js.map +1 -1
  297. package/dist/workflows/run.d.ts +121 -10
  298. package/dist/workflows/run.js +363 -61
  299. package/dist/workflows/run.js.map +1 -1
  300. package/dist/workflows/templates.d.ts +27 -16
  301. package/dist/workflows/templates.js +17 -0
  302. package/dist/workflows/templates.js.map +1 -1
  303. package/dist/workflows/types.d.ts +21 -0
  304. package/dist/workflows/types.js +3 -1
  305. package/dist/workflows/types.js.map +1 -1
  306. package/dist/workspace/agent-accounts.d.ts +27 -15
  307. package/dist/workspace/agent-accounts.js +4 -14
  308. package/dist/workspace/agent-accounts.js.map +1 -1
  309. package/dist/workspace/agent-profiles.js +3 -0
  310. package/dist/workspace/agent-profiles.js.map +1 -1
  311. package/dist/workspace/config.d.ts +12 -6
  312. package/dist/workspace/config.js +3 -13
  313. package/dist/workspace/config.js.map +1 -1
  314. package/dist/workspace/dashboard-costs.d.ts +1 -0
  315. package/dist/workspace/dashboard-costs.js +1 -0
  316. package/dist/workspace/dashboard-costs.js.map +1 -1
  317. package/dist/workspace/dashboard-insights.d.ts +1 -0
  318. package/dist/workspace/dashboard-insights.js +5 -2
  319. package/dist/workspace/dashboard-insights.js.map +1 -1
  320. package/dist/workspace/dashboard-overview.js +2 -0
  321. package/dist/workspace/dashboard-overview.js.map +1 -1
  322. package/dist/workspace/dashboard.d.ts +1 -0
  323. package/package.json +5 -4
  324. package/scripts/check-pack.mjs +3 -2
  325. package/scripts/copy-assets.mjs +17 -0
  326. package/scripts/mock-claude.mjs +106 -1
  327. package/scripts/mock-gemini-acp.mjs +195 -0
  328. package/scripts/mock-kimi-acp.mjs +126 -0
  329. package/scripts/mock-omp-rpc.mjs +194 -0
  330. package/skills/change-impact/SKILL.md +117 -0
  331. package/skills/change-impact/references/analysis-contract.md +141 -0
  332. package/skills/change-impact/references/public-api.md +92 -0
  333. package/skills/change-impact/references/visual-contract.md +71 -0
  334. package/web/dist/assets/{active-forge-DEmP_h4r.js → active-forge-DO2AaQ-s.js} +1 -1
  335. package/web/dist/assets/agent-task-pickers-CZpw4vcZ.js +1 -0
  336. package/web/dist/assets/{alert-dialog-BZkKvKiu.js → alert-dialog-BihfE0uZ.js} +1 -1
  337. package/web/dist/assets/arrow-down-DACdHKjc.js +1 -0
  338. package/web/dist/assets/arrow-left-BtT8zuL0.js +1 -0
  339. package/web/dist/assets/arrow-up-BAPSgozC.js +1 -0
  340. package/web/dist/assets/ask-answer-Co3javaA.js +1 -0
  341. package/web/dist/assets/{ask-card-CfNUHYt9.js → ask-card-DLtNyMH_.js} +2 -2
  342. package/web/dist/assets/assets-view-CLCckPll.js +1 -0
  343. package/web/dist/assets/{automation-format-BPrWgGBz.js → automation-format-BXwiLf2G.js} +1 -1
  344. package/web/dist/assets/automations-route-JizzZrRf.js +1 -0
  345. package/web/dist/assets/blink-1oEUjxch.webp +0 -0
  346. package/web/dist/assets/blink-B4Y4PYCR.webp +0 -0
  347. package/web/dist/assets/blink-BpqW08tf.webp +0 -0
  348. package/web/dist/assets/blink-C380t2a5.webp +0 -0
  349. package/web/dist/assets/blink-CLn5VMYQ.webp +0 -0
  350. package/web/dist/assets/blink-Cn_tI5Yd.webp +0 -0
  351. package/web/dist/assets/blink-D4EaTnc2.webp +0 -0
  352. package/web/dist/assets/blink-DY4Sm5aw.webp +0 -0
  353. package/web/dist/assets/blink-mcM10OfP.webp +0 -0
  354. package/web/dist/assets/body-CXEwT_gR.webp +0 -0
  355. package/web/dist/assets/body-D-UrLURv.webp +0 -0
  356. package/web/dist/assets/body-D7Q8eJDv.webp +0 -0
  357. package/web/dist/assets/body-DdNSx4-d.webp +0 -0
  358. package/web/dist/assets/body-DlFNtp32.webp +0 -0
  359. package/web/dist/assets/body-EreQeu3g.webp +0 -0
  360. package/web/dist/assets/body-Goc64z5o.webp +0 -0
  361. package/web/dist/assets/body-_FLmHm_q.webp +0 -0
  362. package/web/dist/assets/body-v5xTmq5E.webp +0 -0
  363. package/web/dist/assets/{bot-qZRkHkDp.js → bot-Cm-PLA1M.js} +1 -1
  364. package/web/dist/assets/{button-BrxohNcK.js → button-BqkA8Ovk.js} +1 -1
  365. package/web/dist/assets/{centered-state-CSW_o4N7.js → centered-state-CquGIOsq.js} +1 -1
  366. package/web/dist/assets/check-B1z-_MCO.js +1 -0
  367. package/web/dist/assets/chevron-left-CDAxCC2p.js +1 -0
  368. package/web/dist/assets/chevron-right-DPaV033p.js +1 -0
  369. package/web/dist/assets/chunk-KS7C4IRE-DtL2Gzw3.js +3 -0
  370. package/web/dist/assets/{circle-alert-COKQc-87.js → circle-alert-B7VNkPC2.js} +1 -1
  371. package/web/dist/assets/circle-check-LWKCYKhA.js +1 -0
  372. package/web/dist/assets/{collapsible-BJ0sxcz9.js → collapsible-BuSDxSYs.js} +1 -1
  373. package/web/dist/assets/command-CfdVVS0V.js +1 -0
  374. package/web/dist/assets/{commit-list-HXZj01RO.js → commit-list-D5Nuv2HC.js} +1 -1
  375. package/web/dist/assets/compare-variants-BBOnUKfp.js +1 -0
  376. package/web/dist/assets/composer-BPIW4tmM.js +18 -0
  377. package/web/dist/assets/composer-attachments-DyC9yyGs.js +3 -0
  378. package/web/dist/assets/concerned-BIuYysOA.webp +0 -0
  379. package/web/dist/assets/concerned-BWTrkjRS.webp +0 -0
  380. package/web/dist/assets/concerned-BW_ywmzK.webp +0 -0
  381. package/web/dist/assets/concerned-CXQVACqJ.webp +0 -0
  382. package/web/dist/assets/concerned-DdsJa1t2.webp +0 -0
  383. package/web/dist/assets/concerned-Dlln-1nu.webp +0 -0
  384. package/web/dist/assets/concerned-DrSCYUQV.webp +0 -0
  385. package/web/dist/assets/concerned-TOjmS1qX.webp +0 -0
  386. package/web/dist/assets/concerned-tIx9dV3J.webp +0 -0
  387. package/web/dist/assets/dashboard-B_ytEQ_y.js +44 -0
  388. package/web/dist/assets/diff-BQScRHXz.js +3 -0
  389. package/web/dist/assets/diff-stat-CxDTnfya.js +1 -0
  390. package/web/dist/assets/diff-view-8m9Rnct7.js +13 -0
  391. package/web/dist/assets/{directional-usage-BtjgT5nc.js → directional-usage-BerE4wJK.js} +1 -1
  392. package/web/dist/assets/dist-Br4Ra_c5.js +1 -0
  393. package/web/dist/assets/{download-DH68Y5Vz.js → download-HBguClwD.js} +1 -1
  394. package/web/dist/assets/dropdown-menu-CDv5Teql.js +1 -0
  395. package/web/dist/assets/excited-8dK2gfAF.webp +0 -0
  396. package/web/dist/assets/excited-B-w6ozXs.webp +0 -0
  397. package/web/dist/assets/excited-B4Sch7Ub.webp +0 -0
  398. package/web/dist/assets/excited-BPQk8ECE.webp +0 -0
  399. package/web/dist/assets/excited-BRFi0cue.webp +0 -0
  400. package/web/dist/assets/excited-BvbUAHvw.webp +0 -0
  401. package/web/dist/assets/excited-CCH-VUDr.webp +0 -0
  402. package/web/dist/assets/excited-TMExhEMj.webp +0 -0
  403. package/web/dist/assets/excited-cSRbau5J.webp +0 -0
  404. package/web/dist/assets/{external-link-BVYdhpSK.js → external-link-Bclznsu3.js} +1 -1
  405. package/web/dist/assets/file-preview-DQ7iQhe0.js +2 -0
  406. package/web/dist/assets/{file-DYpKJvYs.js → file-rCLi_p-R.js} +1 -1
  407. package/web/dist/assets/file-tree-Bm38qEZP.js +1 -0
  408. package/web/dist/assets/focused-XMnI1Trp.webp +0 -0
  409. package/web/dist/assets/{folder-CeFUSrsO.js → folder-leteY9jH.js} +1 -1
  410. package/web/dist/assets/follow-up-engine-Q1EcpRpB.js +1 -0
  411. package/web/dist/assets/git-pull-request-CURFMFaU.js +1 -0
  412. package/web/dist/assets/{git-pull-request-draft-DL1VMp1L.js → git-pull-request-draft-BZgJrUou.js} +1 -1
  413. package/web/dist/assets/git-tab-loading-CF0flOMS.js +1 -0
  414. package/web/dist/assets/github-DcvXvc4J.js +1 -0
  415. package/web/dist/assets/happy-B7LJPne_.webp +0 -0
  416. package/web/dist/assets/happy-CCpAho8w.webp +0 -0
  417. package/web/dist/assets/happy-Ch9wxHii.webp +0 -0
  418. package/web/dist/assets/happy-CnoCjXOf.webp +0 -0
  419. package/web/dist/assets/happy-DVeEwiyo.webp +0 -0
  420. package/web/dist/assets/happy-URIT6hFl.webp +0 -0
  421. package/web/dist/assets/happy-ZufSdCLm.webp +0 -0
  422. package/web/dist/assets/happy-kfLwwDLp.webp +0 -0
  423. package/web/dist/assets/happy-nVffy2Sx.webp +0 -0
  424. package/web/dist/assets/{host-usage-o1rC0TiP.js → host-usage-CX8OXl8q.js} +1 -1
  425. package/web/dist/assets/icon-tooltip-BMkyRHLt.js +1 -0
  426. package/web/dist/assets/impact-control-Deh1F44q.js +1 -0
  427. package/web/dist/assets/impact-model-Dj6tIycu.js +1 -0
  428. package/web/dist/assets/index-DuW72uFI.js +33 -0
  429. package/web/dist/assets/index-jRkTI5kE.css +2 -0
  430. package/web/dist/assets/{input-BxjGaO_P.js → input-BO795Un9.js} +1 -1
  431. package/web/dist/assets/laptop-D2EKUOdE.webp +0 -0
  432. package/web/dist/assets/layers-YoqiEcNh.js +1 -0
  433. package/web/dist/assets/layout-cards-Cvq2XaJL.js +1 -0
  434. package/web/dist/assets/{layout-grid-C4d5rrDE.js → layout-grid-CSvbdC6i.js} +1 -1
  435. package/web/dist/assets/left-BBmAC9hS.webp +0 -0
  436. package/web/dist/assets/left-BUX98ijg.webp +0 -0
  437. package/web/dist/assets/left-CCrTs359.webp +0 -0
  438. package/web/dist/assets/left-CxWtAZHp.webp +0 -0
  439. package/web/dist/assets/left-DDCoVDRG.webp +0 -0
  440. package/web/dist/assets/left-DFGwPnRL.webp +0 -0
  441. package/web/dist/assets/left-D_qxT7z_.webp +0 -0
  442. package/web/dist/assets/left-QXVHT2zO.webp +0 -0
  443. package/web/dist/assets/left-S_rwAL-X.webp +0 -0
  444. package/web/dist/assets/leg-left-0EW5L4pu.webp +0 -0
  445. package/web/dist/assets/leg-left-BGo9dZbQ.webp +0 -0
  446. package/web/dist/assets/leg-left-BZ8ETYLj.webp +0 -0
  447. package/web/dist/assets/leg-left-BahG1x_b.webp +0 -0
  448. package/web/dist/assets/leg-left-C-DJQ3Pt.webp +0 -0
  449. package/web/dist/assets/leg-left-C6ZvH8fW.webp +0 -0
  450. package/web/dist/assets/leg-left-DsfFyCf7.webp +0 -0
  451. package/web/dist/assets/leg-left-Iq6VC-OZ.webp +0 -0
  452. package/web/dist/assets/leg-left-rVU9cV-d.webp +0 -0
  453. package/web/dist/assets/leg-right-2MnCGKHj.webp +0 -0
  454. package/web/dist/assets/leg-right-BCgv_Tjj.webp +0 -0
  455. package/web/dist/assets/leg-right-BOxKTHZ9.webp +0 -0
  456. package/web/dist/assets/leg-right-BeDSbUV7.webp +0 -0
  457. package/web/dist/assets/leg-right-BwrF93s6.webp +0 -0
  458. package/web/dist/assets/leg-right-CU-y_n5h.webp +0 -0
  459. package/web/dist/assets/leg-right-DKSfNi2y.webp +0 -0
  460. package/web/dist/assets/leg-right-Dq0ze2e4.webp +0 -0
  461. package/web/dist/assets/leg-right-t34e1CvD.webp +0 -0
  462. package/web/dist/assets/lib-BQXq3kEf.js +1 -0
  463. package/web/dist/assets/loader-circle-DjzuGw6j.js +1 -0
  464. package/web/dist/assets/manager-chat-C4QqN-w6.js +1 -0
  465. package/web/dist/assets/manager-index-BGNDfiIy.js +1 -0
  466. package/web/dist/assets/manager-new-Dek6H9Bg.js +2 -0
  467. package/web/dist/assets/managers-Dufza9IX.js +1 -0
  468. package/web/dist/assets/{markdown-Di8pirEb.js → markdown-CP2EQDsL.js} +1 -1
  469. package/web/dist/assets/{markdown-rDA5iFAU.js → markdown-YWy3FUHK.js} +2 -2
  470. package/web/dist/assets/mascot-picker-0_LGzV_f.js +1 -0
  471. package/web/dist/assets/{message-square-CstvkIHe.js → message-square-beq8DjLH.js} +1 -1
  472. package/web/dist/assets/new-task-form-BgMiEphZ.js +2 -0
  473. package/web/dist/assets/pencil-RUM53auZ.js +1 -0
  474. package/web/dist/assets/picker-pill-BO6YUs1F.js +1 -0
  475. package/web/dist/assets/play-Cj3p2Q5t.js +1 -0
  476. package/web/dist/assets/plus-Bdmhj8CR.js +1 -0
  477. package/web/dist/assets/portrait-BJ2e30PF.webp +0 -0
  478. package/web/dist/assets/portrait-BeDbYw8Z.webp +0 -0
  479. package/web/dist/assets/portrait-Bq7D7LzX.webp +0 -0
  480. package/web/dist/assets/portrait-C6HtaggP.webp +0 -0
  481. package/web/dist/assets/portrait-CcOzDXGs.webp +0 -0
  482. package/web/dist/assets/portrait-D44z6yep.webp +0 -0
  483. package/web/dist/assets/portrait-DHLQRy13.webp +0 -0
  484. package/web/dist/assets/portrait-DU3qlTxc.webp +0 -0
  485. package/web/dist/assets/portrait-q94U_uD6.webp +0 -0
  486. package/web/dist/assets/project-router-xmadY-N9.js +1 -0
  487. package/web/dist/assets/queries-ba5qZ3kd.js +1 -0
  488. package/web/dist/assets/reasoning-effort-pill-B8Z1RaXL.js +1 -0
  489. package/web/dist/assets/reference-chip-C9pVQk05.js +1 -0
  490. package/web/dist/assets/reference-conflict-action-DxUm18aD.js +1 -0
  491. package/web/dist/assets/repo-git-DFf8ZGZv.js +1 -0
  492. package/web/dist/assets/right-BFOa1Ihi.webp +0 -0
  493. package/web/dist/assets/right-BLsBZrK1.webp +0 -0
  494. package/web/dist/assets/right-BVU3rYuj.webp +0 -0
  495. package/web/dist/assets/right-BbES4jIG.webp +0 -0
  496. package/web/dist/assets/right-C2klSA-G.webp +0 -0
  497. package/web/dist/assets/right-Cte2BTL5.webp +0 -0
  498. package/web/dist/assets/right-Dz7jYN17.webp +0 -0
  499. package/web/dist/assets/right-W2oGaUHb.webp +0 -0
  500. package/web/dist/assets/right-XJjUU0AU.webp +0 -0
  501. package/web/dist/assets/run-actions-CLIUiXwS.js +1 -0
  502. package/web/dist/assets/{run-diff-CFHlmgGA.js → run-diff-CxS_a1EO.js} +2 -2
  503. package/web/dist/assets/{save-C4TDysfG.js → save-zfKVAo2Y.js} +1 -1
  504. package/web/dist/assets/{scroll-within-D3mqUngk.js → scroll-within-DhWf-4MN.js} +1 -1
  505. package/web/dist/assets/search-CCE2KMtX.js +1 -0
  506. package/web/dist/assets/{search-x-BkezzsKh.js → search-x-BxcYdvqm.js} +1 -1
  507. package/web/dist/assets/{settings-2-DIHmg7wZ.js → settings-2-B0yYRU0q.js} +1 -1
  508. package/web/dist/assets/sheet-DxqNqi5S.js +1 -0
  509. package/web/dist/assets/skills-BmQ9hZ2c.js +1 -0
  510. package/web/dist/assets/sortable.esm-Dj7Kk-Wk.js +5 -0
  511. package/web/dist/assets/square--LrBHma0.js +1 -0
  512. package/web/dist/assets/standing-C42GacCE.webp +0 -0
  513. package/web/dist/assets/standing-C5Tul1Nv.webp +0 -0
  514. package/web/dist/assets/standing-CUU2Jka6.webp +0 -0
  515. package/web/dist/assets/standing-Ca5nprIS.webp +0 -0
  516. package/web/dist/assets/standing-CgOaMKRT.webp +0 -0
  517. package/web/dist/assets/standing-ClF4PE2-.webp +0 -0
  518. package/web/dist/assets/standing-CoS9fBjb.webp +0 -0
  519. package/web/dist/assets/standing-DZrhVTuG.webp +0 -0
  520. package/web/dist/assets/standing-MhG0Chks.webp +0 -0
  521. package/web/dist/assets/status-dot-Dxb9pPsK.js +1 -0
  522. package/web/dist/assets/tabs-CmEFauE4.js +1 -0
  523. package/web/dist/assets/{tag-B56iP2zA.js → tag-TWBVKabJ.js} +1 -1
  524. package/web/dist/assets/task-commits-sdhrDSta.js +1 -0
  525. package/web/dist/assets/{task-graph-ZjFyDrAV.js → task-graph-DqXUw-PM.js} +1 -1
  526. package/web/dist/assets/task-notes-ur3eZYQs.js +1 -0
  527. package/web/dist/assets/task-workspace-BvamqKbw.js +28 -0
  528. package/web/dist/assets/terminal-CmRAOyqu.js +1 -0
  529. package/web/dist/assets/terminal-drawer-BiRjtnip.js +1 -0
  530. package/web/dist/assets/{terminal-pane-CeYi-FvS.js → terminal-pane-YnSc_Vhs.js} +2 -2
  531. package/web/dist/assets/{textarea-BXN4nZ0d.js → textarea-C58jseO-.js} +1 -1
  532. package/web/dist/assets/toaster-5ad4wwJ9.js +1 -0
  533. package/web/dist/assets/tooltip-45rfBiq8.js +1 -0
  534. package/web/dist/assets/tracker-CcyqVPEo.js +4 -0
  535. package/web/dist/assets/triangle-alert-C1mTIqxM.js +1 -0
  536. package/web/dist/assets/typing-left-BWPbVi7e.webp +0 -0
  537. package/web/dist/assets/typing-right-HDY0V90O.webp +0 -0
  538. package/web/dist/assets/{upload-D_kW6AjR.js → upload-C2gxSnMR.js} +1 -1
  539. package/web/dist/assets/use-now-DD2atNhs.js +1 -0
  540. package/web/dist/assets/utils-Br_dqwn-.js +60 -0
  541. package/web/dist/assets/{workflow-j8scU63W.js → workflow-WvO4bTRt.js} +1 -1
  542. package/web/dist/assets/workflow-graph-B2oESW5u.js +13 -0
  543. package/web/dist/assets/worktree-lifecycle-BxYvSKsA.js +1 -0
  544. package/web/dist/assets/{worktree-lifecycle-operation-mYB7KCpQ.js → worktree-lifecycle-operation-BRID04bW.js} +1 -1
  545. package/web/dist/assets/x-CZSnHsZ4.js +1 -0
  546. package/web/dist/assets/{zoomable-image-CW-pQ6ZO.js → zoomable-image-DCITEnK-.js} +1 -1
  547. package/web/dist/index.html +70 -60
  548. package/web/dist/assets/agent-task-pickers-8skJH9bS.js +0 -1
  549. package/web/dist/assets/arrow-down-cBTb_EjO.js +0 -1
  550. package/web/dist/assets/arrow-left-BvR1Oqhc.js +0 -1
  551. package/web/dist/assets/arrow-up-Cn0IS81u.js +0 -1
  552. package/web/dist/assets/ask-answer-Cfb0vEFv.js +0 -1
  553. package/web/dist/assets/automations-route-B4axw9eb.js +0 -1
  554. package/web/dist/assets/check-B5omShEO.js +0 -1
  555. package/web/dist/assets/chevron-left-D74_-PJ_.js +0 -1
  556. package/web/dist/assets/chevron-right-C3fLn_fF.js +0 -1
  557. package/web/dist/assets/circle-check-j6r9xbE5.js +0 -1
  558. package/web/dist/assets/compare-variants-CDrFR7P_.js +0 -1
  559. package/web/dist/assets/composer-GntpkeQD.js +0 -18
  560. package/web/dist/assets/composer-attachments-Xa-qW8Eq.js +0 -3
  561. package/web/dist/assets/dashboard-CJW-Xk7f.js +0 -44
  562. package/web/dist/assets/diff-RPASOQVF.js +0 -3
  563. package/web/dist/assets/diff-view-Ckaab4uQ.js +0 -13
  564. package/web/dist/assets/file-preview-DOSEbcqV.js +0 -2
  565. package/web/dist/assets/git-tab-loading-DhclV71X.js +0 -1
  566. package/web/dist/assets/git-toolbar-Bk-3i42V.js +0 -1
  567. package/web/dist/assets/github-TdBnzj-H.js +0 -1
  568. package/web/dist/assets/icon-tooltip-CUJLXOxf.js +0 -1
  569. package/web/dist/assets/index-CDhEdFaZ.js +0 -33
  570. package/web/dist/assets/index-Dk1VTlxY.css +0 -2
  571. package/web/dist/assets/layout-cards-BYOEsNbu.js +0 -1
  572. package/web/dist/assets/lib-D2__YoPr.js +0 -1
  573. package/web/dist/assets/loader-circle-DCpZCAyT.js +0 -1
  574. package/web/dist/assets/manager-chat-B1Taq3Eg.js +0 -1
  575. package/web/dist/assets/manager-index-COwisKDf.js +0 -1
  576. package/web/dist/assets/manager-new-BdJPiBs2.js +0 -2
  577. package/web/dist/assets/manager-pickers-CvYpd5cU.js +0 -1
  578. package/web/dist/assets/managers-CDiETPHi.js +0 -1
  579. package/web/dist/assets/pencil-DWtoOm2f.js +0 -1
  580. package/web/dist/assets/picker-pill-DQICTO2N.js +0 -1
  581. package/web/dist/assets/play-BYwEI1EA.js +0 -1
  582. package/web/dist/assets/plus-BPopgSYQ.js +0 -1
  583. package/web/dist/assets/popover-DzdYqnHw.js +0 -1
  584. package/web/dist/assets/project-router-CmpQcVZp.js +0 -1
  585. package/web/dist/assets/queries-DOHu2y2B.js +0 -1
  586. package/web/dist/assets/reference-chip-ty5g_OLC.js +0 -1
  587. package/web/dist/assets/reference-conflict-action-B2LrO-o3.js +0 -1
  588. package/web/dist/assets/repo-git-CyoBxHfP.js +0 -1
  589. package/web/dist/assets/sheet-7RYAcp_E.js +0 -1
  590. package/web/dist/assets/skills-BBqk5FoM.js +0 -1
  591. package/web/dist/assets/sortable.esm-O2daV3YI.js +0 -5
  592. package/web/dist/assets/square-BPbl10lx.js +0 -1
  593. package/web/dist/assets/status-dot-C_5ryAFi.js +0 -1
  594. package/web/dist/assets/tabs-EEnYYrJF.js +0 -1
  595. package/web/dist/assets/task-commits-DFalvqkF.js +0 -1
  596. package/web/dist/assets/task-notes-DRDKGsIw.js +0 -1
  597. package/web/dist/assets/task-workspace-D2ak5sTE.js +0 -28
  598. package/web/dist/assets/terminal-B-JX8x9P.js +0 -1
  599. package/web/dist/assets/terminal-drawer-S0cBMANF.js +0 -1
  600. package/web/dist/assets/toaster-DrFdGtNN.js +0 -3
  601. package/web/dist/assets/tooltip-p6YPEpXC.js +0 -1
  602. package/web/dist/assets/tracker-CFDEuaFt.js +0 -4
  603. package/web/dist/assets/triangle-alert-Crbc2knA.js +0 -1
  604. package/web/dist/assets/use-now-DQpgbshl.js +0 -1
  605. package/web/dist/assets/utils-Df_1kJEk.js +0 -60
  606. package/web/dist/assets/workflow-graph-Cye5SBdg.js +0 -13
  607. package/web/dist/assets/worktree-lifecycle-Da61xsLH.js +0 -1
  608. package/web/dist/assets/x-sQR-jRBj.js +0 -1
@@ -0,0 +1,141 @@
1
+ # Review model v4
2
+
3
+ Write a JSON object shaped like cezar's demo model (`cez impact render --demo` renders it), but
4
+ never copy its fictional conclusions into a real review. `cez impact render` validates the shape,
5
+ every id and reference, the statuses, the graph and the mandatory sections, and prints each
6
+ problem as `path: message`. Unknown keys are refused, so a misspelt key comes back as an issue.
7
+
8
+ ## Context and provenance
9
+
10
+ Set `schema_version` to `4`. `meta` holds `title`, `subtitle`, `repository`, `pr`, `base`,
11
+ `head`, boolean `demo`, and `subject_kind` (`"pr"` or `"spec"`). `pr` is the subject's label:
12
+ `PR #123 · title`, or the spec path. Use exact SHAs for `base` and `head` (for a spec: the
13
+ commit and the spec's blob SHA). `summary` is a concise product-level explanation. `scope_note`
14
+ says what was not assessed.
15
+
16
+ `decision` holds `label`, `rationale`, `evidence` and `conditions`. Each condition has `id`,
17
+ `title`, `owner` (a role), `verification` (what clears it), `evidence`, and optional
18
+ `api_changes`: the ids of the API changes this condition settles. A recommendation is a
19
+ human-reviewed judgment, never a mechanical merge authorization.
20
+
21
+ Each evidence record has a unique `id`, `kind` (`observed`, `inferred`, `unknown`, `demo`),
22
+ `title`, `source` and `detail`; an optional `url` must be credential-free `https`. Use a base/head
23
+ path and line, or an exact command with its exit status, SHA and timestamp. `source` alone is a
24
+ locator, not proof; read the source first. Never label a synthetic example `observed`, and never
25
+ attach a confidence percentage. `demo` evidence is only allowed when `meta.demo` is true.
26
+
27
+ ## Ids
28
+
29
+ Every element the report lets the user point at carries an `id`: conditions, capabilities,
30
+ nodes, edges, flows, trade-offs, fit rows, questions and API changes. These ids are unique
31
+ **across the whole model** (evidence ids and view ids are their own namespaces; flow step ids
32
+ only need to be unique within their diagram). Keep ids stable when you revise a model, so a
33
+ correction can be traced.
34
+
35
+ ## Product delta
36
+
37
+ `capabilities`: `id`, `status` (`added`, `modified`, `removed`), `title`, `before`, `after`,
38
+ `impact`, `components` (node ids) and `evidence`. Describe a user-visible capability, not an
39
+ implementation file. `home_view` is computed by the renderer; do not write it.
40
+
41
+ ## Architecture
42
+
43
+ `architecture`: `headline`, `description`, `nodes`, `edges`, `views`. The headline and
44
+ description introduce the whole architecture story; each view carries its own heading and
45
+ captions.
46
+
47
+ Nodes have `id`, `label`, `kind`, `status` (`added`, `modified`, `removed`, `unchanged`),
48
+ `before`, `after`, `impact` and `evidence`. A node is described once, however many views draw it.
49
+ `before` and `after` explain responsibility, not mere presence. `kind` states the abstraction
50
+ (module, service, UI, integration); do not imply that every module is deployed on its own.
51
+
52
+ Edges have `id`, `from`, `to`, `label`, `status` and `evidence`. An arrow states a directed
53
+ relationship: HTTPS request, reads, writes, emits, calls, static import. A `modified` edge also
54
+ has `before_label`, and the same endpoints must carry a real semantic change; when endpoints move,
55
+ use two edges (one removed, one added). An edge cannot exist in a state where one of its
56
+ endpoints does not. No self-edges. Import relationships are not runtime traces. Observed indirect
57
+ impact should name the exact relationship chain; an uncertain blast radius stays inferred.
58
+
59
+ ### Views: how many diagrams the change needs
60
+
61
+ `views` is a list of 1–8 diagram sections. Each becomes its own numbered map with its own
62
+ before/after/compare board and inspector.
63
+
64
+ Each view has `id`, `title`, `description`, `before_caption`, `after_caption`, an optional
65
+ `focus`, and `places`: a list of `{node, col (0..2), row (0..9)}`. A view holds 2–12 components;
66
+ 5–9 read best. Positions are shared by the before and after state of that view, and no two
67
+ components may share a cell. A node may be placed in several views.
68
+
69
+ Choose the split by what has to be explained, not by file count:
70
+
71
+ - One view when the change stays inside one boundary.
72
+ - Two to four views for a large change: the runtime path, then data ownership and tenancy, then
73
+ the extension points third parties see; or one view per bounded context.
74
+ - Split a board when it would exceed about nine components, mix relationships of different kinds
75
+ (runtime calls, data ownership, deployment) on one canvas, or serve two audiences.
76
+ - Every view needs its own reason to exist, stated in its description.
77
+
78
+ The renderer enforces: every node is placed in at least one view; both endpoints of every edge
79
+ are placed together in at least one view; every capability's components fit inside one view (its
80
+ home view); `focus` names a component placed in that view.
81
+
82
+ ## Public API delta
83
+
84
+ `api_changes`: a list, empty when the change touches no public surface (the report then says
85
+ *No breaking changes found*). Each entry:
86
+
87
+ | Field | |
88
+ |---|---|
89
+ | `id` | unique, model-wide |
90
+ | `surface` | `http`, `export`, `event`, `cli`, `config`, `schema`, `extension-point`, `other` |
91
+ | `name` | `POST /store-api/checkout/cart/line-item`, `CheckoutOrderPlacedEvent`, `export function foo`, `--trunk` |
92
+ | `status` | `added`, `modified`, `removed`, `deprecated` |
93
+ | `breaking` | `true`, `false`, or `"unknown"` when you could not decide |
94
+ | `impact` | why it breaks; required when `breaking` is `true`, and when a `removed` surface is not marked breaking (say why removing it is safe) |
95
+ | `before`, `after` | the signature or shape, short (omit the side that does not exist) |
96
+ | `consumers` | who is known to depend on it: node ids or free text |
97
+ | `migration` | what a consumer must do; required when `breaking` is `true` |
98
+ | `evidence` | evidence ids; a breaking change needs at least one `observed` record (`demo` counts only in a demo) |
99
+
100
+ **Linking breaking changes to the decision.** Every `breaking: true` change must be listed in
101
+ the `api_changes` array of at least one `decision.conditions` entry: the condition that says who
102
+ clears it and how (a major version, a BC layer, a migration window). The renderer refuses a model
103
+ where a breaking change is not named by any condition, or where a condition names an id that does
104
+ not exist.
105
+
106
+ ```json
107
+ "conditions": [
108
+ { "id": "cond-migration", "title": "Migration without cutting anyone off", "owner": "Product owner",
109
+ "verification": "An agreed transition period and a message to customers.",
110
+ "evidence": ["E5"], "api_changes": ["api-personal-tokens"] }
111
+ ]
112
+ ```
113
+
114
+ ## Behavior and judgment
115
+
116
+ `flows`: `id`, `title`, `before`, `after`, `outcome`, `failure`, `evidence`. Each `before`/`after`
117
+ has `steps` (`id`, `label`, `component` node id, `status`) and `links` (`from` step id, `to` step
118
+ id, `label`). A step may not reference a component that does not exist in that state. Represent
119
+ decisions and loops with links; never silently flatten them. Distinguish an inferred runtime flow
120
+ from an executed trace.
121
+
122
+ `tradeoffs`: `id`, `title`, `pro`, `con`, `alternative`, `evidence`: a paired benefit and cost
123
+ and a feasible alternative, not generic best practice.
124
+
125
+ `fit`: `id`, `title`, `status` (`aligned`, `tension`, `unknown`), `rule`, `assessment`,
126
+ `evidence`. Include at least one product criterion and one architecture criterion. Cite the actual
127
+ ADR, convention or roadmap; say unknown when it is absent. Address whether the feature belongs in
128
+ core or in an optional integration.
129
+
130
+ `questions`: `id`, `owner`, `question`, `why`, `evidence`. Questions carry uncertainty; do not
131
+ invent a decision from missing product strategy, integration tests, runtime behavior or SLOs.
132
+
133
+ `capabilities`, `flows`, `fit` and `evidence` cannot be empty; `tradeoffs`, `questions` and
134
+ `api_changes` may be.
135
+
136
+ ## Minimum acceptance
137
+
138
+ A real review includes a product delta, relationship evidence and an honest public API section.
139
+ Every claim, node/edge/flow mapping, API change and decision carries evidence ids. When context is
140
+ missing, add explicit `unknown` evidence and say so; never deliver a polished fictional
141
+ conclusion. An honest partial analysis beats inferred certainty.
@@ -0,0 +1,92 @@
1
+ # Finding the public API delta
2
+
3
+ A public surface is anything a consumer outside the changed code depends on: another service, a
4
+ plugin, a script, a user's configuration, a stored record. `cez impact evidence` lists
5
+ `public_surface_candidates` — changed paths that *look like* a surface in their ecosystem. That
6
+ list is a starting point, never proof: read each candidate at both commits, and look for surfaces
7
+ the patterns cannot see (a route registered in an ordinary file, an exported type changed through
8
+ a re-export).
9
+
10
+ Diff a surface at the pinned commits without checking anything out:
11
+
12
+ ```bash
13
+ git show <base>:path/to/file > /tmp/before && git show <head>:path/to/file > /tmp/after
14
+ git diff <merge_base> <head> -- path/to/file
15
+ git grep -n '<symbol>' <head> -- '*.ts' # who still uses it at head
16
+ git log --format='%h %s' <merge_base>..<head> -- path/to/file
17
+ ```
18
+
19
+ For a spec, the "before" is the surface in the code today and the "after" is what the spec
20
+ describes; cite the spec's lines.
21
+
22
+ ## Is it breaking?
23
+
24
+ Breaking: a consumer that worked before fails, misbehaves or must change after. Typical:
25
+
26
+ - removing or renaming anything public (route, field, export, event, flag, env var, block);
27
+ - a new **required** input, a narrower accepted type, a stricter validation;
28
+ - a changed meaning, unit, default or order of something consumers read;
29
+ - a removed field in a response or event payload; a type made optional that consumers read as
30
+ always present;
31
+ - a changed error contract (status code, exception class) callers branch on.
32
+
33
+ Usually not breaking: a new optional input, a new endpoint/event/export, a widened accepted type,
34
+ an additive response field (unless consumers validate strictly). A deprecation is not breaking
35
+ until the surface is removed, but say when it will be. If you cannot tell, write
36
+ `"breaking": "unknown"` and explain in `impact`; never guess safe.
37
+
38
+ ## TypeScript / JavaScript
39
+
40
+ - `package.json`: `exports`, `main`, `module`, `types`, `bin`, `engines`, `peerDependencies`.
41
+ A removed subpath export is breaking.
42
+ - `index.ts` / barrel re-exports: what leaves the barrel leaves the API.
43
+ - `.d.ts` and exported types: diff the declarations, not the implementation.
44
+ - Framework conventions: route files (Next.js `app/**/route.ts`, `pages/api`), Hono/Express
45
+ route registrations, React component props of a published UI kit.
46
+
47
+ ## HTTP and RPC
48
+
49
+ - OpenAPI/Swagger documents, GraphQL schemas (`.graphql`), protobuf (`.proto`).
50
+ - Route registrations and their request/response validators. In cezar itself every shape is a
51
+ zod schema in `packages/contract`, and the route inventory is BACKWARD_COMPATIBILITY.md §2.
52
+ - Status codes, headers, auth requirements, pagination and error bodies.
53
+
54
+ ## PHP / Symfony / Shopware
55
+
56
+ - **Store API and Admin API routes**: `#[Route(path: '/store-api/…')]` / `'/api/…'` attributes
57
+ (older code: `@Route` annotations) on controllers and `*Route` classes, usually under
58
+ `SalesChannel/`, `StoreApi/` or `Api/`. Check path, method, `_routeScope`, required request
59
+ fields and response struct.
60
+ - **Abstract route and service decoration**: Shopware's `Abstract*Route::getDecorated()` pattern
61
+ and `decorates="…"` in `services.xml`; a changed abstract method signature breaks every
62
+ decorator.
63
+ - **Events**: `*Event` classes (constructor and getters), event name constants, and
64
+ `*Subscriber::getSubscribedEvents()`. A removed getter or a changed event name is breaking.
65
+ - **DI container**: `services.xml` / `services.php` service ids, tags (`shopware.entity.definition`,
66
+ `kernel.event_subscriber`, `shopware.payment.method`…), public/private flags, arguments.
67
+ - **Entities**: `*Definition.php` fields and flags (`Required`, `ApiAware`, `Runtime`),
68
+ `*Entity` getters, `*Collection`; plus `Migration*.php` — a dropped or renamed column breaks
69
+ data and integrations; destructive changes belong in `updateDestructive`.
70
+ - **Administration**: Twig `{% block %}` names in `Resources/app/administration/**/*.html.twig`
71
+ that plugins override, component names registered with `Component.register/override`, and
72
+ Vuex/Pinia store shapes. A renamed block silently drops every plugin override.
73
+ - **Storefront**: Twig blocks under `Resources/views/`, JS plugin names, SCSS variables.
74
+ - **Annotations**: `@internal` (not a public surface — changes are not breaking for others),
75
+ `@deprecated tag:vX.Y.0` (announces a future break; note the version), `@final`.
76
+ - `composer.json` (`require`, autoload namespaces) and `plugin.xml`/plugin metadata.
77
+
78
+ ## Generic surfaces
79
+
80
+ - **CLI**: commands, flags, positional arguments, exit codes, output that scripts parse.
81
+ - **Environment variables**: names, defaults, accepted values (`.env.example` and the docs table).
82
+ - **Config schemas**: keys, defaults, validation; a newly required key breaks every existing
83
+ config.
84
+ - **Data**: database migrations, stored file formats, message/queue payloads, cache keys.
85
+ - **Extension points**: hooks, plugin interfaces, webhooks, theme blocks.
86
+
87
+ ## Recording it
88
+
89
+ One `api_changes` entry per surface (see analysis-contract.md). For each breaking change: the
90
+ reason in `impact`, a `migration` a consumer can follow, at least one `observed` evidence record
91
+ (the before/after locations you read), and a decision condition that lists its id in
92
+ `api_changes`.
@@ -0,0 +1,71 @@
1
+ # The impact report
2
+
3
+ Optimize time-to-understand. The first screen answers three things: what changes for the user,
4
+ the provisional decision with its main condition, and whether the public API breaks. Diff
5
+ statistics are supporting evidence, never the hero.
6
+
7
+ You do not write HTML. `cez impact render` composes the report from your model with cezar's own
8
+ template; this file tells you what the reader will see, so you can write a model that reads well.
9
+
10
+ ## Design
11
+
12
+ - **cezar-native.** The report uses the cockpit's tokens: near-black surfaces and the lime accent
13
+ in dark, white surfaces in light, violet for demo markers, the cockpit's status inks. It follows
14
+ the viewer's system theme; the cockpit's Assets view passes `#theme=dark|light`.
15
+ - **No network.** One self-contained file with a strict CSP: no webfonts (system stacks; Inter
16
+ when installed), no images from anywhere, no requests. Repository text is escaped and never
17
+ executes.
18
+ - **Change semantics: colour plus a glyph, never colour alone.** `+ New` success green,
19
+ `~ Changed` amber ink, `− Removed` danger red with dashed outlines and edges, `· Unchanged`
20
+ soft. API changes add `↓ Deprecated`; breaking reads `✕ Breaking`, undecided `? Undecided`.
21
+ - **Credit.** The header and footer carry "Created by the Open Mercato Team" with a link to
22
+ <https://github.com/open-mercato/open-mercato>.
23
+
24
+ ## Composition
25
+
26
+ A sticky horizontal section bar (no sidebar) with scroll-spy: Overview · Capabilities ·
27
+ Architecture *n* · Public API · Flows · Trade-offs · Fit · Questions. Counts sit beside the
28
+ labels; Public API shows `N breaking` in red when there are any.
29
+
30
+ 1. **Overview.** Subject, repository, comparison; the title and subtitle; the summary; three
31
+ facts — Decision (label + first condition), For the user (the first capability), Public API
32
+ (`N breaking changes` or `No breaking changes found`, plus undecided rows); then the
33
+ recommendation with its evidence beside the numbered conditions (owner, verification, the API
34
+ changes each one settles); then the scope note. Order your conditions and capabilities so the
35
+ most important one comes first.
36
+ 2. **Capabilities.** Cards in an auto-fill grid. Selecting one lights up its components in its
37
+ home view; *Show in map N* jumps there.
38
+ 3. **Architecture.** One numbered map per view, in model order: title, description, a
39
+ Before/After/Compare switch, a board of HTML nodes with SVG edges (positions shared across
40
+ states; absent components drawn as dashed placeholders), an inspector with the selected
41
+ component's before/after, impact, relationships and the other maps that draw it, a caption,
42
+ and the relationships as text.
43
+ 4. **Public API.** A table grouped by surface, groups with breaking rows first and breaking rows
44
+ first within each group; every row expands into before/after, impact, consumers, migration
45
+ and evidence.
46
+ 5. **Flows.** A scenario picker, before and after step diagrams side by side, then the outcome for
47
+ the user and the failure behavior. Clicking a step selects its component in the map.
48
+ 6. **Trade-offs, Fit, Questions.** Benefit/cost/alternative cards; fit rows with the rule and the
49
+ assessment; questions with their owner and why they matter.
50
+ 7. **Evidence inspector.** Every evidence chip opens one dialog (keyboard usable, Escape closes);
51
+ *All evidence* lists everything with its kind.
52
+
53
+ ## Spec mode
54
+
55
+ For `subject_kind: "spec"`, every Before/After label reads **Today/Proposed**, board headings
56
+ read *Today · in the code* and *Proposed · by the spec*, and absent components say *Not built
57
+ yet*.
58
+
59
+ ## Asking about an element
60
+
61
+ Every condition, capability, node, edge, API row, flow, flow step, trade-off, fit row and question
62
+ carries its model id as `data-ref`. Inside the cockpit, clicking one (or its *Ask* tag) puts a
63
+ reference to it into the task's composer; the report never sends anything by itself. This is why
64
+ ids must be stable across revisions.
65
+
66
+ ## Writing for the layout
67
+
68
+ - Node labels fit three short lines and kinds two; the full text is in the inspector.
69
+ - Edge labels are a few words ("emits key events", "reads SQL directly").
70
+ - Captions say what the reader should notice in that state.
71
+ - Prefer one honest board to three thin ones, and split a crowded one along a boundary.
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t}from"./react-runtime-CCIEwYL0.js";import{F as n,Z as r}from"./queries-DOHu2y2B.js";import{N as i}from"./button-BrxohNcK.js";import{s as a}from"./project-router-CmpQcVZp.js";var o=i(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),s=e(t(),1),c={github:`gh`};function l(e){return c[e]}function u(e){return`the ${e} CLI is not installed or not logged in — run \`${e} auth login\``}function d(e,t,n){let r=t?.bootProject??e?.bootProject??null;if(n===null||n==="default"||n===r)return e?.forge;let i=t?.projects?.find(e=>e.id===n);if(!i||!e)return;if(!i.forge)return null;let a=l(i.forge),o=a?e.checks?.find(e=>e.name===a):void 0;return!a||!o?{kind:i.forge}:o.available?{kind:i.forge,available:!0}:{kind:i.forge,available:!1,reason:u(a)}}function f(){let e=n().data,t=r().data,i=a();return(0,s.useMemo)(()=>d(e,t,i),[e,t,i])}export{o as n,f as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t}from"./react-runtime-CCIEwYL0.js";import{$ as n,F as r}from"./queries-ba5qZ3kd.js";import{N as i}from"./button-BqkA8Ovk.js";import{s as a}from"./project-router-xmadY-N9.js";var o=i(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),s=e(t(),1),c={github:`gh`};function l(e){return c[e]}function u(e){return`the ${e} CLI is not installed or not logged in — run \`${e} auth login\``}function d(e,t,n){let r=t?.bootProject??e?.bootProject??null;if(n===null||n==="default"||n===r)return e?.forge;let i=t?.projects?.find(e=>e.id===n);if(!i||!e)return;if(!i.forge)return null;let a=l(i.forge),o=a?e.checks?.find(e=>e.name===a):void 0;return!a||!o?{kind:i.forge}:o.available?{kind:i.forge,available:!0}:{kind:i.forge,available:!1,reason:u(a)}}function f(){let e=r().data,t=n().data,i=a();return(0,s.useMemo)(()=>d(e,t,i),[e,t,i])}export{o as n,f as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Br_dqwn-.js";import{k as i}from"./run-actions-CLIUiXwS.js";import{t as a}from"./check-B1z-_MCO.js";import{s as o}from"./dist-Br4Ra_c5.js";import{y as s}from"./impact-model-Dj6tIycu.js";import{_ as c,b as l,p as u,x as d,y as f}from"./composer-BPIW4tmM.js";import{t as p}from"./workflow-WvO4bTRt.js";import{a as m,i as h,n as g}from"./use-now-DD2atNhs.js";import{t as _}from"./project-router-xmadY-N9.js";import{a as v,i as y,o as b,r as x,s as S,t as C}from"./command-CfdVVS0V.js";import{a as w}from"./picker-pill-BO6YUs1F.js";import{u as T}from"./index-DuW72uFI.js";var E=n();function D({name:e,route:t,selected:n,list:i,detail:a}){return(0,E.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,E.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,E.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function O({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,E.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,E.jsx)(_,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var k=e(t(),1);function A({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[s,c]=(0,k.useState)(!1),[u,f]=(0,k.useState)(``),_=(0,k.useRef)(null),T=l(e,u);return(0,E.jsxs)(g,{open:s,onOpenChange:e=>{c(e),e||f(``)},children:[(0,E.jsx)(m,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(w,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,E.jsx)(p,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,E.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,E.jsx)(o,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(h,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(C,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,E.jsx)(v,{placeholder:`search workflows…`,value:u,onValueChange:f,onInput:()=>_.current?.scrollTo(0,0)}),(0,E.jsxs)(S,{ref:_,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[T.length===0?(0,E.jsx)(x,{children:`Nothing matches.`}):null,(0,E.jsx)(y,{children:T.map(e=>{let r=t===e.name;return(0,E.jsxs)(b,{value:`workflow ${e.name}`,keywords:d(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),c(!1)},children:[(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,E.jsx)(a,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function j({skills:e,skillUsage:t,selected:n,onToggle:l,maxSelections:p,slotPrefix:_=`gh`}){let[D,O]=(0,k.useState)(!1),[A,j]=(0,k.useState)(``),[M,N]=(0,k.useState)(null),P=(0,k.useRef)(null),{mostUsed:F,project:I,global:L}=c(f(e,A,t),t),R=(e,t)=>{let i=n.includes(e.name);return(0,E.jsxs)(b,{value:`skill ${e.name} ${e.path}`,keywords:d(e.name,e.description),"data-slot":`${_}-skill-option`,"data-skill":e.name,"data-selected":i?`true`:void 0,disabled:!i&&p!==void 0&&n.length>=p,onSelect:()=>l(e.name),children:[(0,E.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,E.jsx)(`button`,{type:`button`,"data-slot":`${_}-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),N(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,E.jsx)(s,{"aria-hidden":`true`,className:`size-3.5`})}),i?(0,E.jsx)(a,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(T,{skill:M,onClose:()=>N(null)}),(0,E.jsxs)(g,{open:D,onOpenChange:e=>{O(e),e||j(``)},children:[(0,E.jsx)(m,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${_}-skills-trigger`,"aria-label":`Choose skills`,className:r(w,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,E.jsx)(i,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,E.jsx)(o,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(h,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(C,{label:`Choose skills`,shouldFilter:!1,children:[(0,E.jsx)(v,{placeholder:`search skills…`,value:A,onValueChange:j,onInput:()=>P.current?.scrollTo(0,0)}),(0,E.jsxs)(S,{ref:P,"data-slot":`${_}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[F.length===0&&I.length===0&&L.length===0?(0,E.jsx)(x,{children:`Nothing matches.`}):null,F.length>0?(0,E.jsx)(y,{heading:`Most used`,children:F.map(e=>R(e,u(e)))}):null,I.length>0?(0,E.jsx)(y,{heading:`Project skills`,children:I.map(e=>R(e,!0))}):null,L.length>0?(0,E.jsx)(y,{heading:`Global`,children:L.map(e=>R(e,!1))}):null]})]})})]})]})}export{D as i,A as n,O as r,j as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Df_1kJEk.js";import{C as i,a,c as o,d as s,i as c,j as l,l as u,n as d,o as f,r as p,s as m,u as h,w as g}from"./button-BrxohNcK.js";var _=e(t(),1),v=n(),y=`AlertDialog`,[b,ee]=g(y,[s]),x=s(),S=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(p,{...r,...n,modal:!0})};S.displayName=y;var C=`AlertDialogTrigger`,w=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(h,{...i,...r,ref:t})});w.displayName=C;var T=`AlertDialogPortal`,E=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(o,{...r,...n})};E.displayName=T;var D=`AlertDialogOverlay`,O=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(m,{...i,...r,ref:t})});O.displayName=D;var k=`AlertDialogContent`,[A,j]=b(k),M=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...o}=e,s=x(n),c=l(t,_.useRef(null)),u=_.useRef(null);return(0,v.jsx)(A,{scope:n,cancelRef:u,children:(0,v.jsx)(a,{role:`alertdialog`,...s,...o,ref:c,onOpenAutoFocus:i(o.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});M.displayName=k;var N=`AlertDialogTitle`,P=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(u,{...i,...r,ref:t})});P.displayName=N;var F=`AlertDialogDescription`,I=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(f,{...i,...r,ref:t})});I.displayName=F;var L=`AlertDialogAction`,R=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(c,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogCancel`,B=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=j(z,n),a=x(n),o=l(t,i);return(0,v.jsx)(c,{...a,...r,ref:o})});B.displayName=z;var V=S,te=E,H=O,U=M,W=R,G=B,K=P,q=I;function J({...e}){return(0,v.jsx)(V,{"data-slot":`alert-dialog`,...e})}function Y({...e}){return(0,v.jsx)(te,{"data-slot":`alert-dialog-portal`,...e})}function X({className:e,...t}){return(0,v.jsx)(H,{"data-slot":`alert-dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Z({className:e,...t}){return(0,v.jsxs)(Y,{children:[(0,v.jsx)(X,{}),(0,v.jsx)(U,{"data-slot":`alert-dialog-content`,className:r(`fixed top-[50%] left-[50%] z-50 grid w-full grid-cols-1 max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-card p-6 shadow-modal duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-md`,e),...t})]})}function Q({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function $({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function ne({className:e,...t}){return(0,v.jsx)(K,{"data-slot":`alert-dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function re({className:e,...t}){return(0,v.jsx)(q,{"data-slot":`alert-dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}function ie({className:e,...t}){return(0,v.jsx)(W,{"data-slot":`alert-dialog-action`,className:r(d({variant:`contrast`}),e),...t})}function ae({className:e,...t}){return(0,v.jsx)(G,{"data-slot":`alert-dialog-cancel`,className:r(d({variant:`outline`}),e),...t})}export{re as a,ne as c,Z as i,ie as n,$ as o,ae as r,Q as s,J as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Br_dqwn-.js";import{C as i,a,c as o,d as s,i as c,j as l,l as u,n as d,o as f,r as p,s as m,u as h,w as g}from"./button-BqkA8Ovk.js";var _=e(t(),1),v=n(),y=`AlertDialog`,[b,ee]=g(y,[s]),x=s(),S=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(p,{...r,...n,modal:!0})};S.displayName=y;var C=`AlertDialogTrigger`,w=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(h,{...i,...r,ref:t})});w.displayName=C;var T=`AlertDialogPortal`,E=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(o,{...r,...n})};E.displayName=T;var D=`AlertDialogOverlay`,O=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(m,{...i,...r,ref:t})});O.displayName=D;var k=`AlertDialogContent`,[A,j]=b(k),M=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...o}=e,s=x(n),c=l(t,_.useRef(null)),u=_.useRef(null);return(0,v.jsx)(A,{scope:n,cancelRef:u,children:(0,v.jsx)(a,{role:`alertdialog`,...s,...o,ref:c,onOpenAutoFocus:i(o.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});M.displayName=k;var N=`AlertDialogTitle`,P=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(u,{...i,...r,ref:t})});P.displayName=N;var F=`AlertDialogDescription`,I=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(f,{...i,...r,ref:t})});I.displayName=F;var L=`AlertDialogAction`,R=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(c,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogCancel`,B=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=j(z,n),a=x(n),o=l(t,i);return(0,v.jsx)(c,{...a,...r,ref:o})});B.displayName=z;var V=S,te=E,H=O,U=M,W=R,G=B,K=P,q=I;function J({...e}){return(0,v.jsx)(V,{"data-slot":`alert-dialog`,...e})}function Y({...e}){return(0,v.jsx)(te,{"data-slot":`alert-dialog-portal`,...e})}function X({className:e,...t}){return(0,v.jsx)(H,{"data-slot":`alert-dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Z({className:e,...t}){return(0,v.jsxs)(Y,{children:[(0,v.jsx)(X,{}),(0,v.jsx)(U,{"data-slot":`alert-dialog-content`,className:r(`fixed top-[50%] left-[50%] z-50 grid w-full grid-cols-1 max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-card p-6 shadow-modal duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-md`,e),...t})]})}function Q({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function $({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function ne({className:e,...t}){return(0,v.jsx)(K,{"data-slot":`alert-dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function re({className:e,...t}){return(0,v.jsx)(q,{"data-slot":`alert-dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}function ie({className:e,...t}){return(0,v.jsx)(W,{"data-slot":`alert-dialog-action`,className:r(d({variant:`contrast`}),e),...t})}function ae({className:e,...t}){return(0,v.jsx)(G,{"data-slot":`alert-dialog-cancel`,className:r(d({variant:`outline`}),e),...t})}export{re as a,ne as c,Z as i,ie as n,$ as o,ae as r,Q as s,J as t};
@@ -0,0 +1 @@
1
+ import{N as e}from"./button-BqkA8Ovk.js";var t=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{N as e}from"./button-BqkA8Ovk.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{N as e}from"./button-BqkA8Ovk.js";var t=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t}from"./react-runtime-CCIEwYL0.js";import{Wt as n,b as r,et as i,pr as a}from"./queries-ba5qZ3kd.js";import{E as o,T as s,g as c,l,m as u}from"./run-actions-CLIUiXwS.js";import{z as d}from"./new-task-form-BgMiEphZ.js";var f=e(t(),1),p=[50,100,200,400,800,1e3,1e3,1e3,1e3],m=e=>new Promise(t=>setTimeout(t,e));function h(e){return e instanceof a&&e.status===409&&e.message===`run is still active`}async function g(e,t=m){for(let n=0;;n+=1)try{return await e()}catch(e){let r=p[n];if(!h(e)||r===void 0)throw e;await t(r)}}function _(e){return c(e.status)?`live`:u(e).continueRun?`resume`:`unavailable`}function v(e,t,c=`ask_answer`){let u=n(e.id,t),p=r(e.id,t),m=s(e),h=o(e),v=i(),[y,b]=(0,f.useState)(void 0),[x,S]=(0,f.useState)(!1),C=(0,f.useRef)(!1),w=_(e),T=w===`resume`?!h.usable:w===`live`&&!m.usable,E=w===`unavailable`?`no-session`:T?`provider`:void 0,D=E===`no-session`?`This session has ended and no agent session was recorded, so the answer cannot be delivered.`:E===`provider`?w===`resume`?h.reason:m.reason:void 0,O=e=>h.usable?p.mutateAsync({text:e}).then(e=>(d(c),e)):Promise.reject(Error(h.reason??`The run provider is unavailable.`));return{mode:w,providerPending:w===`resume`&&v.isPending,blockedBy:E,reason:D,isPending:x||u.isPending||p.isPending,error:y,send:async t=>{if(E||C.current)return D;C.current=!0,S(!0),b(void 0);try{if(w===`resume`){await g(()=>O(t));return}try{await u.mutateAsync({text:t}),d(c)}catch(n){if(n instanceof a&&n.status===409&&l(e)!==void 0){await g(()=>O(t));return}throw n}return}catch(e){let t=e instanceof Error?e.message:String(e);return b(t),t}finally{C.current=!1,S(!1)}}}}export{v as t};
@@ -1,2 +1,2 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Df_1kJEk.js";import{t as i}from"./button-BrxohNcK.js";import{t as a}from"./ask-answer-Cfb0vEFv.js";import{t as o}from"./textarea-BXN4nZ0d.js";import{t as s}from"./project-router-CmpQcVZp.js";function c(e){let t=`flex w-full flex-col pb-2.5`;return e?`${t} [contain-intrinsic-block-size:auto_3rem] [content-visibility:auto]`:t}function l(e){return e.scrollTop<Math.max(600,e.clientHeight)}function u(e,t){let n=t.find(({bottom:t})=>t>e);return n===void 0?void 0:{key:n.key,offset:n.top-e}}function d(e,t,n,r,i){if(n===void 0)return i;let a=r.find(({key:e})=>e===n.key);return a===void 0?i:e+(a.top-t-n.offset)}function f(e,t=24){return e.scrollHeight-e.scrollTop-e.clientHeight<t}function p(e,t){let n=new URLSearchParams(e).get(`thread`);return n===`flat`||n===`virtual`?n:t>300?`virtual`:`flat`}var m=new Map;function h(e,t){m.set(e,t)}function g(e){return m.get(e)}var _=new Map;function v(e,t){_.set(e,t)}function y(e,t){let n=_.get(e);return n!==void 0&&n.rows===t?n.cache:void 0}var b=e(t(),1),x=new Map,S=(e,t)=>JSON.stringify([e,t.id,t.questions.map(e=>[e.header,e.question,e.options.map(e=>e.label)])]);function C(e,t){return x.get(S(e,t))??{}}function w(e,t,n){x.set(S(e,t),n)}function T(e,t){x.delete(S(e,t))}var E=n(),D=`I need more information to answer this — please explain the context and ask again.`,O={labels:[]},k=e=>e.other?.trim().replace(/\s+/g,` `)??``,A=e=>e.moreInfo===!0||e.labels.length>0||k(e)!==``;function j(e,t){if(t.moreInfo)return`${e.header}: ${D}`;let n=k(t);return`${e.header}: ${[...t.labels,...n?[n]:[]].join(`, `)}`}function M({ask:e,run:t}){return(0,b.useEffect)(()=>{e.resolved&&T(t.id,e)},[e,t.id]),e.resolved?(0,E.jsxs)(`div`,{"data-slot":`ask-card`,"data-resolved":`true`,className:`rounded-lg border border-border bg-card px-3.5 py-2.5 text-xs text-muted-foreground`,children:[(0,E.jsx)(`span`,{className:`text-soft-foreground`,children:`Answered`}),e.answer?(0,E.jsx)(`span`,{className:`ml-1.5 break-words whitespace-pre-line text-foreground`,children:e.answer}):null]}):(0,E.jsx)(N,{ask:e,run:t})}function N({ask:e,run:t}){let n=a(t);return(0,E.jsx)(P,{ask:e,ownerId:t.id,delivery:n,asker:e.fromWorkflow?`The workflow is asking`:`The agent is asking`})}function P({ask:e,ownerId:t,delivery:n,asker:r}){let a=n.blockedBy!==void 0,o=e.questions,c=o.length===1&&o[0]?.multiSelect!==!0,[l,u]=(0,b.useState)(()=>C(t,e)),d=(n,r)=>u(i=>{let a={...i,[n]:r};return w(t,e,a),a}),f=e=>l[e]??O,p=e=>A(f(e)),m=o.every((e,t)=>p(t)),h=o.some((e,t)=>p(t))?o.filter((e,t)=>!p(t)).map(e=>e.header):[],g=()=>void n.send(o.map((e,t)=>j(e,f(t))).join(`
2
- `)),_=n.mode===`resume`;return(0,E.jsxs)(`div`,{"data-slot":`ask-card`,"data-resolved":`false`,"data-delivery":n.mode,className:`rounded-lg border border-primary/25 bg-primary/[0.04] px-4 pt-3.5 pb-3.5`,children:[(0,E.jsx)(`div`,{className:`mb-2.5 flex items-center gap-2`,children:(0,E.jsx)(`span`,{className:`text-xs font-medium text-primary`,children:r})}),(0,E.jsx)(`div`,{className:`flex flex-col gap-4`,children:o.map((e,t)=>(0,E.jsx)(F,{question:e,disabled:n.isPending||a,oneTap:c,answer:f(t),onChange:e=>{a||d(t,e)},onSubmit:t=>{!a&&A(t)&&n.send(j(e,t))}},e.id??t))}),c?_?(0,E.jsx)(`p`,{"data-slot":`ask-resume-hint`,className:`mt-3 text-meta text-soft-foreground`,children:`The session has ended — your answer reopens it and goes to the agent.`}):null:(0,E.jsxs)(`div`,{className:`mt-3 flex items-center gap-2.5`,children:[(0,E.jsx)(i,{size:`sm`,disabled:n.isPending||a||!m,onClick:g,children:_?`Send answer & reopen`:`Send answer`}),(0,E.jsx)(`span`,{"data-slot":_?`ask-resume-hint`:`ask-hint`,className:`text-meta text-soft-foreground`,children:_?`the session has ended — sending reopens it`:`${o.length>1?`answer each question`:`pick one or more`} — or type a reply below`})]}),!c&&h.length>0?(0,E.jsxs)(`p`,{"data-slot":`ask-unanswered`,className:`mt-2 text-meta text-soft-foreground`,children:[`unanswered: `,h.join(`, `)]}):null,n.blockedBy===`provider`?(0,E.jsxs)(`div`,{"data-slot":`ask-provider-gate`,className:`mt-3 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,E.jsx)(`span`,{children:n.reason}),(0,E.jsx)(s,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]}):null,n.blockedBy===`no-session`?(0,E.jsx)(`p`,{"data-slot":`ask-no-session`,className:`mt-3 text-xs text-muted-foreground`,children:n.reason}):null,n.error?(0,E.jsx)(`p`,{"data-slot":`ask-error`,role:`alert`,className:`mt-3 text-xs text-danger`,children:n.error}):null]})}function F({question:e,disabled:t,oneTap:n,answer:r,onChange:a,onSubmit:s}){let c=e.multiSelect===!0,l=r.other!==void 0,u=(0,b.useRef)(null),[d,f]=(0,b.useState)(!1);(0,b.useEffect)(()=>{d&&(u.current?.focus(),f(!1))},[d]);let p=e=>n?s(e):a(e),m=e=>{if(!c){p({labels:[e]});return}a({labels:r.labels.includes(e)?r.labels.filter(t=>t!==e):[...r.labels,e],...l?{other:r.other}:{}})};return(0,E.jsxs)(`div`,{role:`group`,"aria-label":e.question,children:[(0,E.jsxs)(`div`,{className:`mb-0.5 flex items-center gap-2`,children:[(0,E.jsx)(`span`,{className:`rounded-md bg-primary px-1.5 py-0.5 eyebrow text-primary-foreground`,children:e.header}),c?(0,E.jsx)(`span`,{className:`ml-auto text-micro text-soft-foreground`,children:`select all that apply`}):null]}),(0,E.jsx)(`p`,{className:`mb-2.5 break-words text-sm font-semibold text-foreground`,children:e.question}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.options.map(e=>(0,E.jsx)(I,{label:e.label,description:e.description,checkbox:c,selected:r.labels.includes(e.label),disabled:t,onClick:()=>m(e.label)},e.label)),(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(L,{slot:`ask-other`,selected:l,disabled:t,onClick:()=>{if(l){a({labels:r.labels});return}a({labels:c?r.labels:[],other:``}),f(!0)},children:`Other…`}),(0,E.jsx)(L,{slot:`ask-more-info`,selected:r.moreInfo===!0,disabled:t,onClick:()=>r.moreInfo?a(O):p({labels:[],moreInfo:!0}),children:`Need more info`})]}),l?(0,E.jsxs)(`div`,{"data-slot":`ask-other-input`,className:`flex flex-col gap-2`,children:[(0,E.jsx)(o,{ref:u,rows:2,"aria-label":`Your own answer: ${e.question}`,placeholder:`Type your own answer`,value:r.other,disabled:t,onChange:e=>a({...r,other:e.target.value}),onKeyDown:e=>{n&&e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),s(r))}}),n?(0,E.jsx)(`div`,{children:(0,E.jsx)(i,{size:`sm`,disabled:t||!A(r),onClick:()=>s(r),children:`Send answer`})}):null]}):null]})]})}function I({label:e,description:t,checkbox:n,selected:i,disabled:a,onClick:o}){return(0,E.jsxs)(`button`,{type:`button`,disabled:a,"aria-pressed":i,onClick:o,className:r(`flex w-full flex-col gap-0.5 rounded-md border px-3.5 py-2.5 text-left transition-colors`,`hover:border-primary/50 hover:bg-primary/[0.06] disabled:pointer-events-none disabled:opacity-50`,i?`border-primary/60 bg-primary/[0.06]`:`border-border bg-card`),children:[(0,E.jsxs)(`span`,{className:`flex min-w-0 items-start gap-2 text-ui font-semibold text-foreground`,children:[n?(0,E.jsx)(`span`,{"aria-hidden":!0,className:r(`flex size-4 shrink-0 items-center justify-center rounded border text-micro`,i?`border-primary bg-primary text-primary-foreground`:`border-soft-foreground`),children:i?`✓`:``}):null,(0,E.jsx)(`span`,{className:`min-w-0 break-words`,children:e})]}),t?(0,E.jsx)(`span`,{className:`min-w-0 break-words text-xs text-muted-foreground`,children:t}):null]})}function L({slot:e,selected:t,disabled:n,onClick:i,children:a}){return(0,E.jsx)(`button`,{type:`button`,"data-slot":e,disabled:n,"aria-pressed":t,onClick:i,className:r(`rounded-md border border-dashed px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors`,`hover:border-primary/50 hover:bg-primary/[0.06] hover:text-foreground disabled:pointer-events-none disabled:opacity-50`,t?`border-primary/60 bg-primary/[0.06] text-foreground`:`border-border bg-card`),children:a})}export{f as a,g as c,d,p as f,u as i,v as l,P as n,l as o,c as p,T as r,y as s,M as t,h as u};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Br_dqwn-.js";import{t as i}from"./button-BqkA8Ovk.js";import{t as a}from"./textarea-C58jseO-.js";import{t as o}from"./ask-answer-Co3javaA.js";import{t as s}from"./project-router-xmadY-N9.js";function c(e){let t=`flex w-full flex-col pb-2.5`;return e?`${t} [contain-intrinsic-block-size:auto_3rem] [content-visibility:auto]`:t}function l(e){return e.scrollTop<Math.max(600,e.clientHeight)}function u(e,t){let n=t.find(({bottom:t})=>t>e);return n===void 0?void 0:{key:n.key,offset:n.top-e}}function d(e,t,n,r,i){if(n===void 0)return i;let a=r.find(({key:e})=>e===n.key);return a===void 0?i:e+(a.top-t-n.offset)}function f(e,t=24){return e.scrollHeight-e.scrollTop-e.clientHeight<t}function p(e,t){let n=new URLSearchParams(e).get(`thread`);return n===`flat`||n===`virtual`?n:t>300?`virtual`:`flat`}var m=new Map;function h(e,t){m.set(e,t)}function g(e){return m.get(e)}var _=new Map;function v(e,t){_.set(e,t)}function y(e,t){let n=_.get(e);return n!==void 0&&n.rows===t?n.cache:void 0}var b=e(t(),1),x=new Map,S=(e,t)=>JSON.stringify([e,t.id,t.questions.map(e=>[e.header,e.question,e.options.map(e=>e.label)])]);function C(e,t){return x.get(S(e,t))??{}}function w(e,t,n){x.set(S(e,t),n)}function T(e,t){x.delete(S(e,t))}var E=n(),D=`I need more information to answer this — please explain the context and ask again.`,O={labels:[]},k=e=>e.other?.trim().replace(/\s+/g,` `)??``,A=e=>e.moreInfo===!0||e.labels.length>0||k(e)!==``;function j(e,t){if(t.moreInfo)return`${e.header}: ${D}`;let n=k(t);return`${e.header}: ${[...t.labels,...n?[n]:[]].join(`, `)}`}function M({ask:e,run:t}){return(0,b.useEffect)(()=>{e.resolved&&T(t.id,e)},[e,t.id]),e.resolved?(0,E.jsxs)(`div`,{"data-slot":`ask-card`,"data-resolved":`true`,className:`rounded-lg border border-border bg-card px-3.5 py-2.5 text-xs text-muted-foreground`,children:[(0,E.jsx)(`span`,{className:`text-soft-foreground`,children:`Answered`}),e.answer?(0,E.jsx)(`span`,{className:`ml-1.5 break-words whitespace-pre-line text-foreground`,children:e.answer}):null]}):(0,E.jsx)(N,{ask:e,run:t})}function N({ask:e,run:t}){let n=o(t);return(0,E.jsx)(P,{ask:e,ownerId:t.id,delivery:n,asker:e.fromWorkflow?`The workflow is asking`:`The agent is asking`})}function P({ask:e,ownerId:t,delivery:n,asker:r}){let a=n.blockedBy!==void 0,o=e.questions,c=o.length===1&&o[0]?.multiSelect!==!0,[l,u]=(0,b.useState)(()=>C(t,e)),d=(n,r)=>u(i=>{let a={...i,[n]:r};return w(t,e,a),a}),f=e=>l[e]??O,p=e=>A(f(e)),m=o.every((e,t)=>p(t)),h=o.some((e,t)=>p(t))?o.filter((e,t)=>!p(t)).map(e=>e.header):[],g=()=>void n.send(o.map((e,t)=>j(e,f(t))).join(`
2
+ `)),_=n.mode===`resume`;return(0,E.jsxs)(`div`,{"data-slot":`ask-card`,"data-resolved":`false`,"data-delivery":n.mode,className:`rounded-lg border border-primary/25 bg-primary/[0.04] px-4 pt-3.5 pb-3.5`,children:[(0,E.jsx)(`div`,{className:`mb-2.5 flex items-center gap-2`,children:(0,E.jsx)(`span`,{className:`text-xs font-medium text-primary`,children:r})}),(0,E.jsx)(`div`,{className:`flex flex-col gap-4`,children:o.map((e,t)=>(0,E.jsx)(F,{question:e,disabled:n.isPending||a,oneTap:c,answer:f(t),onChange:e=>{a||d(t,e)},onSubmit:t=>{!a&&A(t)&&n.send(j(e,t))}},e.id??t))}),c?_?(0,E.jsx)(`p`,{"data-slot":`ask-resume-hint`,className:`mt-3 text-meta text-soft-foreground`,children:`The session has ended — your answer reopens it and goes to the agent.`}):null:(0,E.jsxs)(`div`,{className:`mt-3 flex items-center gap-2.5`,children:[(0,E.jsx)(i,{size:`sm`,disabled:n.isPending||a||!m,onClick:g,children:_?`Send answer & reopen`:`Send answer`}),(0,E.jsx)(`span`,{"data-slot":_?`ask-resume-hint`:`ask-hint`,className:`text-meta text-soft-foreground`,children:_?`the session has ended — sending reopens it`:`${o.length>1?`answer each question`:`pick one or more`} — or type a reply below`})]}),!c&&h.length>0?(0,E.jsxs)(`p`,{"data-slot":`ask-unanswered`,className:`mt-2 text-meta text-soft-foreground`,children:[`unanswered: `,h.join(`, `)]}):null,n.blockedBy===`provider`?(0,E.jsxs)(`div`,{"data-slot":`ask-provider-gate`,className:`mt-3 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,E.jsx)(`span`,{children:n.reason}),(0,E.jsx)(s,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]}):null,n.blockedBy===`no-session`?(0,E.jsx)(`p`,{"data-slot":`ask-no-session`,className:`mt-3 text-xs text-muted-foreground`,children:n.reason}):null,n.error?(0,E.jsx)(`p`,{"data-slot":`ask-error`,role:`alert`,className:`mt-3 text-xs text-danger`,children:n.error}):null]})}function F({question:e,disabled:t,oneTap:n,answer:r,onChange:o,onSubmit:s}){let c=e.multiSelect===!0,l=r.other!==void 0,u=(0,b.useRef)(null),[d,f]=(0,b.useState)(!1);(0,b.useEffect)(()=>{d&&(u.current?.focus(),f(!1))},[d]);let p=e=>n?s(e):o(e),m=e=>{if(!c){p({labels:[e]});return}o({labels:r.labels.includes(e)?r.labels.filter(t=>t!==e):[...r.labels,e],...l?{other:r.other}:{}})};return(0,E.jsxs)(`div`,{role:`group`,"aria-label":e.question,children:[(0,E.jsxs)(`div`,{className:`mb-0.5 flex items-center gap-2`,children:[(0,E.jsx)(`span`,{className:`rounded-md bg-primary px-1.5 py-0.5 eyebrow text-primary-foreground`,children:e.header}),c?(0,E.jsx)(`span`,{className:`ml-auto text-micro text-soft-foreground`,children:`select all that apply`}):null]}),(0,E.jsx)(`p`,{className:`mb-2.5 break-words text-sm font-semibold text-foreground`,children:e.question}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.options.map(e=>(0,E.jsx)(I,{label:e.label,description:e.description,checkbox:c,selected:r.labels.includes(e.label),disabled:t,onClick:()=>m(e.label)},e.label)),(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(L,{slot:`ask-other`,selected:l,disabled:t,onClick:()=>{if(l){o({labels:r.labels});return}o({labels:c?r.labels:[],other:``}),f(!0)},children:`Other…`}),(0,E.jsx)(L,{slot:`ask-more-info`,selected:r.moreInfo===!0,disabled:t,onClick:()=>r.moreInfo?o(O):p({labels:[],moreInfo:!0}),children:`Need more info`})]}),l?(0,E.jsxs)(`div`,{"data-slot":`ask-other-input`,className:`flex flex-col gap-2`,children:[(0,E.jsx)(a,{ref:u,rows:2,"aria-label":`Your own answer: ${e.question}`,placeholder:`Type your own answer`,value:r.other,disabled:t,onChange:e=>o({...r,other:e.target.value}),onKeyDown:e=>{n&&e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),s(r))}}),n?(0,E.jsx)(`div`,{children:(0,E.jsx)(i,{size:`sm`,disabled:t||!A(r),onClick:()=>s(r),children:`Send answer`})}):null]}):null]})]})}function I({label:e,description:t,checkbox:n,selected:i,disabled:a,onClick:o}){return(0,E.jsxs)(`button`,{type:`button`,disabled:a,"aria-pressed":i,onClick:o,className:r(`flex w-full flex-col gap-0.5 rounded-md border px-3.5 py-2.5 text-left transition-colors`,`hover:border-primary/50 hover:bg-primary/[0.06] disabled:pointer-events-none disabled:opacity-50`,i?`border-primary/60 bg-primary/[0.06]`:`border-border bg-card`),children:[(0,E.jsxs)(`span`,{className:`flex min-w-0 items-start gap-2 text-ui font-semibold text-foreground`,children:[n?(0,E.jsx)(`span`,{"aria-hidden":!0,className:r(`flex size-4 shrink-0 items-center justify-center rounded border text-micro`,i?`border-primary bg-primary text-primary-foreground`:`border-soft-foreground`),children:i?`✓`:``}):null,(0,E.jsx)(`span`,{className:`min-w-0 break-words`,children:e})]}),t?(0,E.jsx)(`span`,{className:`min-w-0 break-words text-xs text-muted-foreground`,children:t}):null]})}function L({slot:e,selected:t,disabled:n,onClick:i,children:a}){return(0,E.jsx)(`button`,{type:`button`,"data-slot":e,disabled:n,"aria-pressed":t,onClick:i,className:r(`rounded-md border border-dashed px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors`,`hover:border-primary/50 hover:bg-primary/[0.06] hover:text-foreground disabled:pointer-events-none disabled:opacity-50`,t?`border-primary/60 bg-primary/[0.06] text-foreground`:`border-border bg-card`),children:a})}export{f as a,g as c,d,p as f,u as i,v as l,P as n,l as o,c as p,T as r,y as s,M as t,h as u};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ct as r,ba as i,wt as a}from"./queries-ba5qZ3kd.js";import{St as o,t as s}from"./utils-Br_dqwn-.js";import{f as c}from"./chunk-KS7C4IRE-DtL2Gzw3.js";import{N as l,t as u}from"./button-BqkA8Ovk.js";import{T as d}from"./run-actions-CLIUiXwS.js";import{s as f}from"./dist-Br4Ra_c5.js";import{a as p,i as m,l as h,n as g,o as _,t as v}from"./dropdown-menu-CDv5Teql.js";import{t as y}from"./download-HBguClwD.js";import{t as b}from"./external-link-Bclznsu3.js";import{t as x}from"./file-preview-DQ7iQhe0.js";import{t as S}from"./file-rCLi_p-R.js";import{t as C}from"./layers-YoqiEcNh.js";import{t as w}from"./loader-circle-DjzuGw6j.js";import{a as T,c as E,d as D,f as O,i as k,l as A,o as j,r as M,s as N,t as P,u as F}from"./follow-up-engine-Q1EcpRpB.js";import{t as I}from"./triangle-alert-C1mTIqxM.js";import{t as L}from"./x-CZSnHsZ4.js";import{c as R}from"./project-router-xmadY-N9.js";import{n as z}from"./format-DHK74MwW.js";import{t as B}from"./centered-state-CquGIOsq.js";import{t as V}from"./markdown-YWy3FUHK.js";import{Z as H,_t as U,pt as W,rt as G,vt as K}from"./index-DuW72uFI.js";var q=l(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),J=l(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Y=e(t(),1);function X(e){let t=o.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function Z(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Q(e,t){let n=(0,Y.useRef)(t);n.current=t,(0,Y.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=X(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var $=n();function ee({run:e,reference:t,onClearReference:n}){let r=P(e),i=M(e,r.continueWith),a=d(e),[o,s]=(0,Y.useState)(``),[c,l]=(0,Y.useState)(!1),[f,p]=(0,Y.useState)(null),m=(0,Y.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),p(null);try{await i(Z(t,o.trim()),[]),s(``),n()}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,$.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,$.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,$.jsx)(q,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`truncate`,title:`${t.ref} — ${t.label}`,children:[(0,$.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]}),(0,$.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,$.jsx)(L,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,$.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,$.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||f?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,$.jsxs)(u,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,$.jsx)(w,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,$.jsx)(D,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||f?(0,$.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-xs text-soft-foreground`,children:f??v}):null]})}var te=`No assets yet`,ne=`Agents publish pages here when they write to the run's artifacts folder.`;function re({runId:e,routed:t,run:n}){let r=a(e),o=c(),l=R(),[d,f]=(0,Y.useState)(void 0),p=t?o.name:d,m=r.data?.artifacts??[],h=E(m,p),g=(0,Y.useCallback)(n=>{t?l(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):f(n)},[l,t,e]),[_,v]=oe(),[x,S]=(0,Y.useState)(0),[T,D]=(0,Y.useState)(void 0),k=h?.kind===`html`?ie(r.data?.versions,h.name):[],A=k.at(-1)?.version,j=T&&h&&T.name===h.name&&T.version!==A&&k.some(e=>e.version===T.version)?T.version:void 0,M=(0,Y.useRef)(null),[N,P]=(0,Y.useState)(null);return Q(M,P),r.isPending?(0,$.jsx)(B,{icon:(0,$.jsx)(w,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,$.jsx)(B,{icon:(0,$.jsx)(I,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:r.error.message}):(0,$.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,$.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[h?(0,$.jsx)(se,{artifacts:m,current:h,onSelect:g}):(0,$.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),h?.kind===`html`?(0,$.jsxs)(`span`,{"data-slot":`assets-sandboxed`,title:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground sm:inline-flex`,children:[(0,$.jsx)(W,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]}):null,h&&k.length>1?(0,$.jsx)(ae,{versions:k,viewing:j,onSelect:e=>D(e===A?void 0:{name:h.name,version:e})}):null,j===void 0?null:(0,$.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,j,(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,$.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>D(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),r.data.truncated?(0,$.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,r.data.artifacts.length,` files; the folder has more`]}):null,(0,$.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,$.jsx)(u,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":_,"aria-label":_?`Leave focus`:`Focus`,title:_?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,className:s(`text-muted-foreground`,_&&`bg-muted text-foreground`),onClick:()=>v(!_),children:_?(0,$.jsx)(U,{"aria-hidden":`true`}):(0,$.jsx)(K,{"aria-hidden":`true`})}),h?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(u,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,$.jsx)(`a`,{"data-action":`assets-open`,href:i(e,h.name,j),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:(0,$.jsx)(b,{"aria-hidden":`true`})})}),(0,$.jsx)(u,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,$.jsx)(`a`,{"data-action":`assets-download`,href:i(e,h.name,j),download:h.name,"aria-label":`Download`,title:`Download`,children:(0,$.jsx)(y,{"aria-hidden":`true`})})}),(0,$.jsx)(u,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-reload`,"aria-label":`Reload`,title:`Reload`,className:`text-muted-foreground`,onClick:()=>S(e=>e+1),children:(0,$.jsx)(O,{"aria-hidden":`true`})})]}):null]})]}),h?(0,$.jsx)(ce,{runId:e,artifact:h,version:j,frameRef:M},`${h.name}@${h.updatedAt}#${x}v${j??``}`):(0,$.jsx)(B,{icon:(0,$.jsx)(C,{}),tone:`neutral`,heading:`h2`,title:te,subtitle:ne}),n&&h?(0,$.jsx)(ee,{run:n,reference:N,onClearReference:()=>P(null)}):null]})}function ie(e,t){return(e??[]).filter(e=>e.files.includes(t))}function ae({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,$.jsxs)(v,{children:[(0,$.jsx)(h,{asChild:!0,children:(0,$.jsxs)(u,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,$.jsx)(J,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,$.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,z(r.updatedAt),` ago`]}):null,(0,$.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,$.jsxs)(g,{align:`start`,className:`w-56`,children:[(0,$.jsx)(m,{children:`Versions`}),(0,$.jsx)(p,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,$.jsxs)(_,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,z(e.updatedAt),` ago`,e.version===r?.version?(0,$.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function oe(){let[e,t]=(0,Y.useState)(()=>A(`assets`)),n=(0,Y.useCallback)(e=>{F(`assets`,e),t(e)},[]);return(0,Y.useEffect)(()=>{if(e)return H(()=>n(!1))},[e,n]),[e,n]}function se({artifacts:e,current:t,onSelect:n}){let r=N(e);return(0,$.jsxs)(v,{children:[(0,$.jsx)(h,{asChild:!0,children:(0,$.jsxs)(u,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${j(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:j(t)}),(0,$.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:T[t.kind]}),(0,$.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,$.jsxs)(g,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,$.jsxs)(m,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,$.jsx)(p,{value:t.name,onValueChange:n,children:r.map(e=>(0,$.jsx)(_,{value:e.name,"data-asset":e.name,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:j(e)}),(0,$.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,T[e.kind],` · `,z(e.updatedAt)]})]})},e.name))})]})]})}function ce({runId:e,artifact:t,version:n,frameRef:r}){let a=G(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,$.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:j(t),src:`${o}#theme=${a}`,sandbox:k,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,$.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:j(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,$.jsx)(le,{runId:e,artifact:t});case`other`:return(0,$.jsx)(B,{icon:(0,$.jsx)(S,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,$.jsx)(u,{asChild:!0,variant:`outline`,children:(0,$.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,$.jsx)(y,{"aria-hidden":`true`}),`Download`]})})})}}function le({runId:e,artifact:t}){let n=r(e,t.name,t.updatedAt);return n.isPending?(0,$.jsxs)(`p`,{className:`px-4 py-6 text-center text-xs text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,$.jsx)(B,{icon:(0,$.jsx)(I,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,$.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,$.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,$.jsx)(V,{children:n.data})}):(0,$.jsx)(x,{path:t.name,text:n.data})})}export{re as AssetsView};
@@ -1 +1 @@
1
- import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{A as n,B as r,L as i,N as a,t as o,z as s}from"./utils-Df_1kJEk.js";import{N as c}from"./button-BrxohNcK.js";var l=c(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),u=c(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);e();var d=t();function f({className:e,flush:t=!1,...n}){return(0,d.jsx)(`div`,{"data-slot":`card`,"data-flush":t?`true`:void 0,className:o(`flex flex-col rounded-lg border bg-card text-card-foreground shadow-xs`,t?`gap-0 overflow-hidden py-0`:`gap-6 py-6`,e),...n})}function p(e){return n[((e-1)%7+7)%7]??``}function m(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?`${p(n.weekday)} ${a(n.hour,n.minute)}`:``}function h(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?a(n.hour,n.minute):``}function g(e,t,n=Date.now()){let i=Date.parse(e),o=r(i,t);if(!o)return``;if(n-i<6*864e5)return`${p(o.weekday)} ${a(o.hour,o.minute)}`;let s=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][o.month-1];return`${o.day} ${s} ${a(o.hour,o.minute)}`}function _(e,t=Date.now()){let n=Math.max(0,Math.round((e-t)/6e4));return n<60?`in ${n}m`:n<1440?`in ${Math.round(n/60)}h`:`in ${Math.round(n/1440)}d`}function v(e){let t=Math.round(e/60),n=Math.floor(t/60);return n>0?`${n}h ${String(t%60).padStart(2,`0`)}m`:`${t}m`}function y(e){return e>=10?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function b(e){switch(e){case`done`:return`success`;case`running`:case`queued`:case`waiting`:return`pending`;case`failed`:case`cancelled`:return`danger`;case`review`:return`violet`}}function x(e){switch(e){case`review`:return`needs review`;case`waiting`:return`needs you`;default:return e}}function S(e){if(e.kind===`schedule`)return s(e).map(i).join(`; `);if(e.kind===`tracker`){let t=e.trackerTrigger,n=t?.association.kind===`jira`?`Jira`:t?.association.kind===`linear`?`Linear`:`Tracker`;return t?`${n} · ${t.events.join(`, `)}${t.targetStatusIds?.length?` → ${t.targetStatusIds.join(`, `)}`:``}${t.changedLabelIds?.length?` · labels ${t.changedLabelIds.join(`, `)}`:``} · every ${Math.round((e.intervalSeconds??1800)/60)} min`:`${n} · select an event to complete setup`}let t=(e.events??[]).join(`, `),n=Math.round((e.intervalSeconds??300)/60);return`on ${t||`github`} · every ${n} min`}function C(e){switch(e){case`launched`:case`manual`:case`catch-up`:return`success`;case`failed`:case`error`:case`rate-limited`:return`danger`;default:return`neutral`}}export{_ as a,b as c,y as d,f,g as i,h as l,l as m,p as n,C as o,u as p,m as r,x as s,v as t,S as u};
1
+ import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{F as n,G as r,H as i,R as a,W as o,t as s}from"./utils-Br_dqwn-.js";import{N as c}from"./button-BqkA8Ovk.js";var l=c(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),u=c(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);e();var d=t();function f({className:e,flush:t=!1,...n}){return(0,d.jsx)(`div`,{"data-slot":`card`,"data-flush":t?`true`:void 0,className:s(`flex flex-col rounded-lg border bg-card text-card-foreground shadow-xs`,t?`gap-0 overflow-hidden py-0`:`gap-6 py-6`,e),...n})}function p(e){return n[((e-1)%7+7)%7]??``}function m(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?`${p(n.weekday)} ${a(n.hour,n.minute)}`:``}function h(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?a(n.hour,n.minute):``}function g(e,t,n=Date.now()){let i=Date.parse(e),o=r(i,t);if(!o)return``;if(n-i<6*864e5)return`${p(o.weekday)} ${a(o.hour,o.minute)}`;let s=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][o.month-1];return`${o.day} ${s} ${a(o.hour,o.minute)}`}function _(e,t=Date.now()){let n=Math.max(0,Math.round((e-t)/6e4));return n<60?`in ${n}m`:n<1440?`in ${Math.round(n/60)}h`:`in ${Math.round(n/1440)}d`}function v(e){let t=Math.round(e/60),n=Math.floor(t/60);return n>0?`${n}h ${String(t%60).padStart(2,`0`)}m`:`${t}m`}function y(e){return e>=10?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function b(e){switch(e){case`done`:return`success`;case`running`:case`queued`:case`waiting`:return`pending`;case`failed`:case`cancelled`:return`danger`;case`review`:return`violet`}}function x(e){switch(e){case`review`:return`needs review`;case`waiting`:return`needs you`;default:return e}}function S(e){if(e.kind===`schedule`)return o(e).map(i).join(`; `);if(e.kind===`tracker`){let t=e.trackerTrigger,n=t?.association.kind===`jira`?`Jira`:t?.association.kind===`linear`?`Linear`:`Tracker`;return t?`${n} · ${t.events.join(`, `)}${t.targetStatusIds?.length?` → ${t.targetStatusIds.join(`, `)}`:``}${t.changedLabelIds?.length?` · labels ${t.changedLabelIds.join(`, `)}`:``} · every ${Math.round((e.intervalSeconds??1800)/60)} min`:`${n} · select an event to complete setup`}let t=(e.events??[]).join(`, `),n=Math.round((e.intervalSeconds??300)/60);return`on ${t||`github`} · every ${n} min`}function C(e){switch(e){case`launched`:case`manual`:case`catch-up`:return`success`;case`failed`:case`error`:case`rate-limited`:return`danger`;default:return`neutral`}}export{_ as a,b as c,y as d,f,g as i,h as l,l as m,p as n,C as o,u as p,m as r,x as s,v as t,S as u};