@penclipai/server 2026.704.0 → 2026.714.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (485) hide show
  1. package/dist/adapters/index.d.ts +1 -1
  2. package/dist/adapters/index.d.ts.map +1 -1
  3. package/dist/adapters/index.js.map +1 -1
  4. package/dist/adapters/process/execute.d.ts.map +1 -1
  5. package/dist/adapters/process/execute.js +1 -0
  6. package/dist/adapters/process/execute.js.map +1 -1
  7. package/dist/adapters/registry.d.ts.map +1 -1
  8. package/dist/adapters/registry.js +79 -51
  9. package/dist/adapters/registry.js.map +1 -1
  10. package/dist/adapters/utils.d.ts +5 -0
  11. package/dist/adapters/utils.d.ts.map +1 -1
  12. package/dist/adapters/utils.js.map +1 -1
  13. package/dist/agent-auth-jwt.d.ts +5 -1
  14. package/dist/agent-auth-jwt.d.ts.map +1 -1
  15. package/dist/agent-auth-jwt.js +72 -20
  16. package/dist/agent-auth-jwt.js.map +1 -1
  17. package/dist/app.d.ts +2 -0
  18. package/dist/app.d.ts.map +1 -1
  19. package/dist/app.js +10 -0
  20. package/dist/app.js.map +1 -1
  21. package/dist/built-ins/agents/reflection-coach/AGENTS.md +47 -0
  22. package/dist/built-ins/agents/reflection-coach/routines/recent-agent-reflection.md +77 -0
  23. package/dist/errors.d.ts +1 -1
  24. package/dist/errors.d.ts.map +1 -1
  25. package/dist/errors.js +2 -2
  26. package/dist/errors.js.map +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +208 -116
  29. package/dist/index.js.map +1 -1
  30. package/dist/middleware/api-compression.d.ts +8 -0
  31. package/dist/middleware/api-compression.d.ts.map +1 -0
  32. package/dist/middleware/api-compression.js +207 -0
  33. package/dist/middleware/api-compression.js.map +1 -0
  34. package/dist/middleware/auth.d.ts.map +1 -1
  35. package/dist/middleware/auth.js +130 -3
  36. package/dist/middleware/auth.js.map +1 -1
  37. package/dist/middleware/error-handler.d.ts.map +1 -1
  38. package/dist/middleware/error-handler.js +27 -0
  39. package/dist/middleware/error-handler.js.map +1 -1
  40. package/dist/onboarding-assets/default/AGENTS.md +1 -0
  41. package/dist/redaction.d.ts.map +1 -1
  42. package/dist/redaction.js +11 -0
  43. package/dist/redaction.js.map +1 -1
  44. package/dist/routes/access.d.ts.map +1 -1
  45. package/dist/routes/access.js +4 -3
  46. package/dist/routes/access.js.map +1 -1
  47. package/dist/routes/adapters.d.ts.map +1 -1
  48. package/dist/routes/adapters.js +2 -0
  49. package/dist/routes/adapters.js.map +1 -1
  50. package/dist/routes/agents.d.ts.map +1 -1
  51. package/dist/routes/agents.js +222 -87
  52. package/dist/routes/agents.js.map +1 -1
  53. package/dist/routes/attention.d.ts +3 -0
  54. package/dist/routes/attention.d.ts.map +1 -0
  55. package/dist/routes/attention.js +24 -0
  56. package/dist/routes/attention.js.map +1 -0
  57. package/dist/routes/authz.d.ts.map +1 -1
  58. package/dist/routes/authz.js +29 -1
  59. package/dist/routes/authz.js.map +1 -1
  60. package/dist/routes/board-chat.d.ts.map +1 -1
  61. package/dist/routes/board-chat.js +4 -1
  62. package/dist/routes/board-chat.js.map +1 -1
  63. package/dist/routes/built-in-agents.d.ts +3 -0
  64. package/dist/routes/built-in-agents.d.ts.map +1 -0
  65. package/dist/routes/built-in-agents.js +267 -0
  66. package/dist/routes/built-in-agents.js.map +1 -0
  67. package/dist/routes/cases.d.ts +46 -0
  68. package/dist/routes/cases.d.ts.map +1 -0
  69. package/dist/routes/cases.js +1395 -0
  70. package/dist/routes/cases.js.map +1 -0
  71. package/dist/routes/companies.d.ts.map +1 -1
  72. package/dist/routes/companies.js +4 -1
  73. package/dist/routes/companies.js.map +1 -1
  74. package/dist/routes/company-skills.d.ts.map +1 -1
  75. package/dist/routes/company-skills.js +453 -33
  76. package/dist/routes/company-skills.js.map +1 -1
  77. package/dist/routes/environments.d.ts.map +1 -1
  78. package/dist/routes/environments.js +71 -8
  79. package/dist/routes/environments.js.map +1 -1
  80. package/dist/routes/execution-workspaces.d.ts.map +1 -1
  81. package/dist/routes/execution-workspaces.js +89 -3
  82. package/dist/routes/execution-workspaces.js.map +1 -1
  83. package/dist/routes/health.d.ts +2 -0
  84. package/dist/routes/health.d.ts.map +1 -1
  85. package/dist/routes/health.js +30 -0
  86. package/dist/routes/health.js.map +1 -1
  87. package/dist/routes/inbox-dismissals.d.ts.map +1 -1
  88. package/dist/routes/inbox-dismissals.js +80 -19
  89. package/dist/routes/inbox-dismissals.js.map +1 -1
  90. package/dist/routes/index.d.ts +2 -0
  91. package/dist/routes/index.d.ts.map +1 -1
  92. package/dist/routes/index.js +2 -0
  93. package/dist/routes/index.js.map +1 -1
  94. package/dist/routes/issues.d.ts +25 -0
  95. package/dist/routes/issues.d.ts.map +1 -1
  96. package/dist/routes/issues.js +1455 -46
  97. package/dist/routes/issues.js.map +1 -1
  98. package/dist/routes/openapi.d.ts.map +1 -1
  99. package/dist/routes/openapi.js +448 -11
  100. package/dist/routes/openapi.js.map +1 -1
  101. package/dist/routes/pipelines.js +2 -2
  102. package/dist/routes/pipelines.js.map +1 -1
  103. package/dist/routes/resource-memberships.d.ts.map +1 -1
  104. package/dist/routes/resource-memberships.js +13 -5
  105. package/dist/routes/resource-memberships.js.map +1 -1
  106. package/dist/routes/secrets.d.ts.map +1 -1
  107. package/dist/routes/secrets.js +261 -1
  108. package/dist/routes/secrets.js.map +1 -1
  109. package/dist/routes/sidebar-badges.d.ts.map +1 -1
  110. package/dist/routes/sidebar-badges.js +18 -2
  111. package/dist/routes/sidebar-badges.js.map +1 -1
  112. package/dist/routes/user-profiles.d.ts.map +1 -1
  113. package/dist/routes/user-profiles.js +5 -4
  114. package/dist/routes/user-profiles.js.map +1 -1
  115. package/dist/server-info.d.ts +2 -0
  116. package/dist/server-info.d.ts.map +1 -1
  117. package/dist/server-info.js +20 -5
  118. package/dist/server-info.js.map +1 -1
  119. package/dist/services/access.d.ts +4 -4
  120. package/dist/services/access.d.ts.map +1 -1
  121. package/dist/services/activity.d.ts +3 -3
  122. package/dist/services/activity.d.ts.map +1 -1
  123. package/dist/services/activity.js +5 -4
  124. package/dist/services/activity.js.map +1 -1
  125. package/dist/services/adapter-registry-bootstrap.reconcile.test.js +1 -0
  126. package/dist/services/adapter-registry-bootstrap.reconcile.test.js.map +1 -1
  127. package/dist/services/agent-secret-bindings.d.ts +15 -0
  128. package/dist/services/agent-secret-bindings.d.ts.map +1 -1
  129. package/dist/services/agent-secret-bindings.js +43 -0
  130. package/dist/services/agent-secret-bindings.js.map +1 -1
  131. package/dist/services/agents.d.ts +194 -133
  132. package/dist/services/agents.d.ts.map +1 -1
  133. package/dist/services/agents.js +107 -4
  134. package/dist/services/agents.js.map +1 -1
  135. package/dist/services/approvals.d.ts +10 -10
  136. package/dist/services/approvals.d.ts.map +1 -1
  137. package/dist/services/approvals.js +9 -1
  138. package/dist/services/approvals.js.map +1 -1
  139. package/dist/services/assets.d.ts +5 -5
  140. package/dist/services/attention.d.ts +11 -0
  141. package/dist/services/attention.d.ts.map +1 -0
  142. package/dist/services/attention.js +1024 -0
  143. package/dist/services/attention.js.map +1 -0
  144. package/dist/services/authorization.d.ts +15 -2
  145. package/dist/services/authorization.d.ts.map +1 -1
  146. package/dist/services/authorization.js +324 -8
  147. package/dist/services/authorization.js.map +1 -1
  148. package/dist/services/board-auth.d.ts +2 -2
  149. package/dist/services/budgets.d.ts.map +1 -1
  150. package/dist/services/budgets.js +8 -7
  151. package/dist/services/budgets.js.map +1 -1
  152. package/dist/services/built-in-agent-metadata.d.ts +9 -0
  153. package/dist/services/built-in-agent-metadata.d.ts.map +1 -0
  154. package/dist/services/built-in-agent-metadata.js +39 -0
  155. package/dist/services/built-in-agent-metadata.js.map +1 -0
  156. package/dist/services/built-in-agents.d.ts +394 -0
  157. package/dist/services/built-in-agents.d.ts.map +1 -0
  158. package/dist/services/built-in-agents.js +1426 -0
  159. package/dist/services/built-in-agents.js.map +1 -0
  160. package/dist/services/change-consent-gate.d.ts +18 -0
  161. package/dist/services/change-consent-gate.d.ts.map +1 -0
  162. package/dist/services/change-consent-gate.js +170 -0
  163. package/dist/services/change-consent-gate.js.map +1 -0
  164. package/dist/services/companies.d.ts +14 -8
  165. package/dist/services/companies.d.ts.map +1 -1
  166. package/dist/services/companies.js +6 -1
  167. package/dist/services/companies.js.map +1 -1
  168. package/dist/services/company-artifacts.d.ts +4 -1
  169. package/dist/services/company-artifacts.d.ts.map +1 -1
  170. package/dist/services/company-artifacts.js +9 -1
  171. package/dist/services/company-artifacts.js.map +1 -1
  172. package/dist/services/company-member-roles.d.ts.map +1 -1
  173. package/dist/services/company-member-roles.js +2 -0
  174. package/dist/services/company-member-roles.js.map +1 -1
  175. package/dist/services/company-portability.d.ts +1 -1
  176. package/dist/services/company-portability.d.ts.map +1 -1
  177. package/dist/services/company-portability.js +113 -8
  178. package/dist/services/company-portability.js.map +1 -1
  179. package/dist/services/company-search.d.ts.map +1 -1
  180. package/dist/services/company-search.js +843 -294
  181. package/dist/services/company-search.js.map +1 -1
  182. package/dist/services/company-skills.d.ts +64 -3
  183. package/dist/services/company-skills.d.ts.map +1 -1
  184. package/dist/services/company-skills.js +1205 -20
  185. package/dist/services/company-skills.js.map +1 -1
  186. package/dist/services/costs.d.ts +9 -8
  187. package/dist/services/costs.d.ts.map +1 -1
  188. package/dist/services/costs.js +9 -2
  189. package/dist/services/costs.js.map +1 -1
  190. package/dist/services/dashboard.d.ts +2 -0
  191. package/dist/services/dashboard.d.ts.map +1 -1
  192. package/dist/services/dashboard.js +60 -17
  193. package/dist/services/dashboard.js.map +1 -1
  194. package/dist/services/database-backup-health.d.ts +34 -0
  195. package/dist/services/database-backup-health.d.ts.map +1 -0
  196. package/dist/services/database-backup-health.js +104 -0
  197. package/dist/services/database-backup-health.js.map +1 -0
  198. package/dist/services/document-annotations.d.ts +169 -1
  199. package/dist/services/document-annotations.d.ts.map +1 -1
  200. package/dist/services/document-annotations.js +272 -1
  201. package/dist/services/document-annotations.js.map +1 -1
  202. package/dist/services/documents.d.ts +368 -0
  203. package/dist/services/documents.d.ts.map +1 -1
  204. package/dist/services/documents.js +2 -2
  205. package/dist/services/documents.js.map +1 -1
  206. package/dist/services/environment-config.d.ts.map +1 -1
  207. package/dist/services/environment-config.js +6 -0
  208. package/dist/services/environment-config.js.map +1 -1
  209. package/dist/services/environment-custom-image-runtime.d.ts +28 -0
  210. package/dist/services/environment-custom-image-runtime.d.ts.map +1 -1
  211. package/dist/services/environment-custom-image-runtime.js +106 -7
  212. package/dist/services/environment-custom-image-runtime.js.map +1 -1
  213. package/dist/services/environment-custom-images.d.ts +31 -1
  214. package/dist/services/environment-custom-images.d.ts.map +1 -1
  215. package/dist/services/environment-custom-images.js +110 -4
  216. package/dist/services/environment-custom-images.js.map +1 -1
  217. package/dist/services/environment-execution-target.d.ts.map +1 -1
  218. package/dist/services/environment-execution-target.js +1 -3
  219. package/dist/services/environment-execution-target.js.map +1 -1
  220. package/dist/services/environment-probe.d.ts +1 -0
  221. package/dist/services/environment-probe.d.ts.map +1 -1
  222. package/dist/services/environment-probe.js +99 -5
  223. package/dist/services/environment-probe.js.map +1 -1
  224. package/dist/services/environments.d.ts +3 -1
  225. package/dist/services/environments.d.ts.map +1 -1
  226. package/dist/services/environments.js +98 -3
  227. package/dist/services/environments.js.map +1 -1
  228. package/dist/services/execution-workspace-policy.d.ts +29 -3
  229. package/dist/services/execution-workspace-policy.d.ts.map +1 -1
  230. package/dist/services/execution-workspace-policy.js +44 -1
  231. package/dist/services/execution-workspace-policy.js.map +1 -1
  232. package/dist/services/execution-workspaces.d.ts +64 -1
  233. package/dist/services/execution-workspaces.d.ts.map +1 -1
  234. package/dist/services/execution-workspaces.js +634 -3
  235. package/dist/services/execution-workspaces.js.map +1 -1
  236. package/dist/services/external-objects.d.ts +26 -26
  237. package/dist/services/feedback.d.ts +2 -2
  238. package/dist/services/finance.d.ts +5 -5
  239. package/dist/services/goals.d.ts +8 -8
  240. package/dist/services/heartbeat-stop-metadata.d.ts +2 -2
  241. package/dist/services/heartbeat-stop-metadata.d.ts.map +1 -1
  242. package/dist/services/heartbeat-stop-metadata.js +4 -0
  243. package/dist/services/heartbeat-stop-metadata.js.map +1 -1
  244. package/dist/services/heartbeat-stop-metadata.test.js +9 -0
  245. package/dist/services/heartbeat-stop-metadata.test.js.map +1 -1
  246. package/dist/services/heartbeat.d.ts +133 -28
  247. package/dist/services/heartbeat.d.ts.map +1 -1
  248. package/dist/services/heartbeat.js +1963 -239
  249. package/dist/services/heartbeat.js.map +1 -1
  250. package/dist/services/inbox-dismissals.d.ts +26 -0
  251. package/dist/services/inbox-dismissals.d.ts.map +1 -1
  252. package/dist/services/inbox-dismissals.js +33 -18
  253. package/dist/services/inbox-dismissals.js.map +1 -1
  254. package/dist/services/index.d.ts +3 -1
  255. package/dist/services/index.d.ts.map +1 -1
  256. package/dist/services/index.js +3 -1
  257. package/dist/services/index.js.map +1 -1
  258. package/dist/services/instance-settings.d.ts +25 -1
  259. package/dist/services/instance-settings.d.ts.map +1 -1
  260. package/dist/services/instance-settings.js +103 -5
  261. package/dist/services/instance-settings.js.map +1 -1
  262. package/dist/services/issue-continuation-summary.js +1 -1
  263. package/dist/services/issue-continuation-summary.js.map +1 -1
  264. package/dist/services/issue-recovery-actions.d.ts +3 -0
  265. package/dist/services/issue-recovery-actions.d.ts.map +1 -1
  266. package/dist/services/issue-recovery-actions.js +9 -0
  267. package/dist/services/issue-recovery-actions.js.map +1 -1
  268. package/dist/services/issue-rewake-throttle.d.ts +92 -0
  269. package/dist/services/issue-rewake-throttle.d.ts.map +1 -0
  270. package/dist/services/issue-rewake-throttle.js +139 -0
  271. package/dist/services/issue-rewake-throttle.js.map +1 -0
  272. package/dist/services/issue-thread-interactions.d.ts +8 -1
  273. package/dist/services/issue-thread-interactions.d.ts.map +1 -1
  274. package/dist/services/issue-thread-interactions.js +231 -16
  275. package/dist/services/issue-thread-interactions.js.map +1 -1
  276. package/dist/services/issue-visibility.d.ts +4 -0
  277. package/dist/services/issue-visibility.d.ts.map +1 -0
  278. package/dist/services/issue-visibility.js +9 -0
  279. package/dist/services/issue-visibility.js.map +1 -0
  280. package/dist/services/issues.d.ts +225 -105
  281. package/dist/services/issues.d.ts.map +1 -1
  282. package/dist/services/issues.js +540 -18
  283. package/dist/services/issues.js.map +1 -1
  284. package/dist/services/local-service-supervisor.d.ts +3 -0
  285. package/dist/services/local-service-supervisor.d.ts.map +1 -1
  286. package/dist/services/local-service-supervisor.js +51 -0
  287. package/dist/services/local-service-supervisor.js.map +1 -1
  288. package/dist/services/pipeline-case-outputs.d.ts.map +1 -1
  289. package/dist/services/pipeline-case-outputs.js +2 -1
  290. package/dist/services/pipeline-case-outputs.js.map +1 -1
  291. package/dist/services/pipelines-aggregation.d.ts.map +1 -1
  292. package/dist/services/pipelines-aggregation.js +3 -2
  293. package/dist/services/pipelines-aggregation.js.map +1 -1
  294. package/dist/services/pipelines.d.ts +165 -165
  295. package/dist/services/pipelines.d.ts.map +1 -1
  296. package/dist/services/pipelines.js +6 -4
  297. package/dist/services/pipelines.js.map +1 -1
  298. package/dist/services/plugin-database.d.ts +2 -2
  299. package/dist/services/plugin-environment-driver.d.ts +1 -1
  300. package/dist/services/plugin-host-services.d.ts.map +1 -1
  301. package/dist/services/plugin-host-services.js +3 -1
  302. package/dist/services/plugin-host-services.js.map +1 -1
  303. package/dist/services/plugin-managed-routines.d.ts +1 -0
  304. package/dist/services/plugin-managed-routines.d.ts.map +1 -1
  305. package/dist/services/plugin-registry.d.ts +21 -21
  306. package/dist/services/productivity-review.d.ts +1 -0
  307. package/dist/services/productivity-review.d.ts.map +1 -1
  308. package/dist/services/productivity-review.js +6 -5
  309. package/dist/services/productivity-review.js.map +1 -1
  310. package/dist/services/projects.d.ts +9 -9
  311. package/dist/services/recovery/service.d.ts +82 -54
  312. package/dist/services/recovery/service.d.ts.map +1 -1
  313. package/dist/services/recovery/service.js +200 -35
  314. package/dist/services/recovery/service.js.map +1 -1
  315. package/dist/services/recovery/successful-run-handoff.d.ts +1 -0
  316. package/dist/services/recovery/successful-run-handoff.d.ts.map +1 -1
  317. package/dist/services/recovery/successful-run-handoff.js +2 -0
  318. package/dist/services/recovery/successful-run-handoff.js.map +1 -1
  319. package/dist/services/recovery/successful-run-handoff.test.js +20 -0
  320. package/dist/services/recovery/successful-run-handoff.test.js.map +1 -1
  321. package/dist/services/resource-memberships.d.ts +13 -10
  322. package/dist/services/resource-memberships.d.ts.map +1 -1
  323. package/dist/services/resource-memberships.js +89 -20
  324. package/dist/services/resource-memberships.js.map +1 -1
  325. package/dist/services/responsible-user-denial-run-outcomes.d.ts +60 -0
  326. package/dist/services/responsible-user-denial-run-outcomes.d.ts.map +1 -0
  327. package/dist/services/responsible-user-denial-run-outcomes.js +56 -0
  328. package/dist/services/responsible-user-denial-run-outcomes.js.map +1 -0
  329. package/dist/services/responsible-user-denial-run-outcomes.test.d.ts +2 -0
  330. package/dist/services/responsible-user-denial-run-outcomes.test.d.ts.map +1 -0
  331. package/dist/services/responsible-user-denial-run-outcomes.test.js +75 -0
  332. package/dist/services/responsible-user-denial-run-outcomes.test.js.map +1 -0
  333. package/dist/services/routines.d.ts +30 -8
  334. package/dist/services/routines.d.ts.map +1 -1
  335. package/dist/services/routines.js +241 -18
  336. package/dist/services/routines.js.map +1 -1
  337. package/dist/services/run-liveness.d.ts.map +1 -1
  338. package/dist/services/run-liveness.js +21 -0
  339. package/dist/services/run-liveness.js.map +1 -1
  340. package/dist/services/run-log-store.d.ts +1 -0
  341. package/dist/services/run-log-store.d.ts.map +1 -1
  342. package/dist/services/run-log-store.js +4 -0
  343. package/dist/services/run-log-store.js.map +1 -1
  344. package/dist/services/run-scratch.d.ts +42 -0
  345. package/dist/services/run-scratch.d.ts.map +1 -0
  346. package/dist/services/run-scratch.js +111 -0
  347. package/dist/services/run-scratch.js.map +1 -0
  348. package/dist/services/run-scratch.test.d.ts +2 -0
  349. package/dist/services/run-scratch.test.d.ts.map +1 -0
  350. package/dist/services/run-scratch.test.js +98 -0
  351. package/dist/services/run-scratch.test.js.map +1 -0
  352. package/dist/services/secrets.d.ts +1261 -64
  353. package/dist/services/secrets.d.ts.map +1 -1
  354. package/dist/services/secrets.js +1089 -96
  355. package/dist/services/secrets.js.map +1 -1
  356. package/dist/services/task-watchdogs.d.ts +1 -0
  357. package/dist/services/task-watchdogs.d.ts.map +1 -1
  358. package/dist/services/task-watchdogs.js +78 -9
  359. package/dist/services/task-watchdogs.js.map +1 -1
  360. package/dist/services/work-timeline.d.ts.map +1 -1
  361. package/dist/services/work-timeline.js +34 -2
  362. package/dist/services/work-timeline.js.map +1 -1
  363. package/dist/services/workspace-runtime-read-model.d.ts +30 -29
  364. package/dist/services/workspace-runtime-read-model.d.ts.map +1 -1
  365. package/dist/services/workspace-runtime-read-model.js.map +1 -1
  366. package/dist/services/workspace-runtime.d.ts +59 -13
  367. package/dist/services/workspace-runtime.d.ts.map +1 -1
  368. package/dist/services/workspace-runtime.js +1121 -102
  369. package/dist/services/workspace-runtime.js.map +1 -1
  370. package/dist/skills-catalog/catalog/bundled/paperclip-operations/reflection-coach/SKILL.md +202 -0
  371. package/dist/skills-catalog/catalog/bundled/product/paperclip-capsules/SKILL.md +1 -1
  372. package/dist/skills-catalog/catalog/bundled/product/wireframe/SKILL.md +1 -1
  373. package/dist/skills-catalog/catalog/optional/content/release-announcement/SKILL.md +90 -0
  374. package/dist/skills-catalog/catalog/optional/finance/ramp/SKILL.md +98 -0
  375. package/dist/skills-catalog/generated/catalog.json +84 -12
  376. package/dist/ui-branding.d.ts +7 -0
  377. package/dist/ui-branding.d.ts.map +1 -1
  378. package/dist/ui-branding.js +8 -2
  379. package/dist/ui-branding.js.map +1 -1
  380. package/dist/version.d.ts +14 -0
  381. package/dist/version.d.ts.map +1 -1
  382. package/dist/version.js +114 -3
  383. package/dist/version.js.map +1 -1
  384. package/package.json +19 -20
  385. package/skills/paperclip/SKILL.md +45 -10
  386. package/skills/paperclip/references/api-reference.md +246 -1
  387. package/skills/paperclip/references/cases.md +295 -0
  388. package/skills/paperclip/references/company-skills.md +1 -1
  389. package/skills/paperclip-board/SKILL.md +3 -4
  390. package/skills/paperclip-converting-plans-to-tasks/SKILL.md +3 -7
  391. package/skills/para-memory-files/SKILL.md +3 -7
  392. package/ui-dist/assets/{abnfDiagram-VRR7QNED-BsFz2IiG.js → abnfDiagram-VRR7QNED-Dtgfy1PK.js} +1 -1
  393. package/ui-dist/assets/{arc-HZhAwbOs.js → arc-BGdvNvs8.js} +1 -1
  394. package/ui-dist/assets/{architectureDiagram-ZJ3FMSHR-BteMjuOn.js → architectureDiagram-ZJ3FMSHR-CK19SQDx.js} +1 -1
  395. package/ui-dist/assets/{blockDiagram-677ZJIJ3-Iq66uZjf.js → blockDiagram-677ZJIJ3-Kh4N3XG4.js} +1 -1
  396. package/ui-dist/assets/{browser-ponyfill-BBsuyZJt.js → browser-ponyfill-B3hXtEFW.js} +1 -1
  397. package/ui-dist/assets/{c4Diagram-LMCZKHZV-_nlglj7I.js → c4Diagram-LMCZKHZV-CBHpGrgU.js} +1 -1
  398. package/ui-dist/assets/channel-4fjB8e8N.js +1 -0
  399. package/ui-dist/assets/{chunk-2Q5K7J3B-Cvz7WwSQ.js → chunk-2Q5K7J3B-BdHbqi7k.js} +1 -1
  400. package/ui-dist/assets/{chunk-32BRIVSS-LLubniCS.js → chunk-32BRIVSS-DxtzZzpt.js} +1 -1
  401. package/ui-dist/assets/{chunk-5VM5RSS4-BOst5hcr.js → chunk-5VM5RSS4-DMKxBbgu.js} +1 -1
  402. package/ui-dist/assets/{chunk-EX3LRPZG-D5WNShVm.js → chunk-EX3LRPZG-BaIOPi4v.js} +1 -1
  403. package/ui-dist/assets/{chunk-JWPE2WC7-CA07x4av.js → chunk-JWPE2WC7-DGo3MPmr.js} +1 -1
  404. package/ui-dist/assets/{chunk-MOJQB5TN-Clfi83rK.js → chunk-MOJQB5TN-BEhQg0uD.js} +1 -1
  405. package/ui-dist/assets/{chunk-RYQCIY6F-BhZ6p7YJ.js → chunk-RYQCIY6F-HPJ6zRpJ.js} +1 -1
  406. package/ui-dist/assets/{chunk-V7JOEXUC-CdexJGoV.js → chunk-V7JOEXUC-Bl_6cAJD.js} +1 -1
  407. package/ui-dist/assets/{chunk-VR4S4FIN-8vjmBhr1.js → chunk-VR4S4FIN-KMjgGCsw.js} +1 -1
  408. package/ui-dist/assets/{chunk-XXDRQBXY-CqmCaplj.js → chunk-XXDRQBXY-oWGAIKjr.js} +1 -1
  409. package/ui-dist/assets/classDiagram-OUVF2IWQ-CTXxO5l9.js +1 -0
  410. package/ui-dist/assets/classDiagram-v2-EOCWNBFH-CTXxO5l9.js +1 -0
  411. package/ui-dist/assets/{cose-bilkent-JH36ORCC-CY-zAygY.js → cose-bilkent-JH36ORCC-Ckqse1pH.js} +1 -1
  412. package/ui-dist/assets/{cynefin-VYW2F7L2-BQSQ1HKr.js → cynefin-VYW2F7L2-DfZ8Hzqi.js} +1 -1
  413. package/ui-dist/assets/{cynefinDiagram-TSTJHNR4-NJCuFrZL.js → cynefinDiagram-TSTJHNR4-BkDQo9oi.js} +1 -1
  414. package/ui-dist/assets/{dagre-VKFMJZFB-DAUPIc8g.js → dagre-VKFMJZFB-ClghXQ6E.js} +1 -1
  415. package/ui-dist/assets/{diagram-FQU43EPY-DvMwJlCi.js → diagram-FQU43EPY-D5a0CwpV.js} +1 -1
  416. package/ui-dist/assets/{diagram-G47NLZAW-DPY0Jz_y.js → diagram-G47NLZAW-hVjYR_xl.js} +1 -1
  417. package/ui-dist/assets/{diagram-NH7WQ7WH-BpopeEhp.js → diagram-NH7WQ7WH-BlDPgD5Z.js} +1 -1
  418. package/ui-dist/assets/{diagram-OA4YK3LP-Qpu05z9X.js → diagram-OA4YK3LP-D0iZKIS3.js} +1 -1
  419. package/ui-dist/assets/{diagram-WEI45ONY-DHnvw9XU.js → diagram-WEI45ONY-m6hrfD0J.js} +1 -1
  420. package/ui-dist/assets/{ebnfDiagram-CCIWWBDH-D61S54_7.js → ebnfDiagram-CCIWWBDH-D4SQYLod.js} +1 -1
  421. package/ui-dist/assets/{erDiagram-Q63AITRT-pplAN_x2.js → erDiagram-Q63AITRT-Byzb6-I5.js} +1 -1
  422. package/ui-dist/assets/{flowDiagram-23GEKE2U-BaBcbyDq.js → flowDiagram-23GEKE2U-CaTUkFO6.js} +1 -1
  423. package/ui-dist/assets/{ganttDiagram-NO4QXBWP-BOJSII2b.js → ganttDiagram-NO4QXBWP-DmdMQ3ES.js} +1 -1
  424. package/ui-dist/assets/{gitGraphDiagram-IHSO6WYX-aYAaO4a2.js → gitGraphDiagram-IHSO6WYX-Bt-1g2CS.js} +1 -1
  425. package/ui-dist/assets/{index-CZxYajxF.js → index-2Dk9yO0W.js} +1 -1
  426. package/ui-dist/assets/{index-B8H0SHw1.js → index-8jLpgFNU.js} +1 -1
  427. package/ui-dist/assets/{index-3EKATXgc.js → index-AP_iimxs.js} +1 -1
  428. package/ui-dist/assets/{index-C2JgdjPa.js → index-BNJasQY9.js} +1 -1
  429. package/ui-dist/assets/{index-BaiskB3o.js → index-BO-aNmyX.js} +1 -1
  430. package/ui-dist/assets/{index-B5YenxAQ.js → index-BPCzCn1Y.js} +1 -1
  431. package/ui-dist/assets/{index-Da2kqT1M.js → index-BSLnLTb2.js} +1 -1
  432. package/ui-dist/assets/{index-By0oeEvz.js → index-CCZ2qgHN.js} +1 -1
  433. package/ui-dist/assets/{index-bUFCSEgv.js → index-CLZXR1k9.js} +1 -1
  434. package/ui-dist/assets/{index-CJlw4l9L.js → index-CTNfrE1s.js} +1 -1
  435. package/ui-dist/assets/{index-TmpY6Xh_.js → index-ChNd25s7.js} +1 -1
  436. package/ui-dist/assets/{index-BRgdHUNR.js → index-CjHiMOEO.js} +1 -1
  437. package/ui-dist/assets/{index-DrL6pHSJ.js → index-CmeJQpXZ.js} +1 -1
  438. package/ui-dist/assets/index-CyuYtn7U.css +1 -0
  439. package/ui-dist/assets/{index-CKKytnOd.js → index-CzZjM8eh.js} +1 -1
  440. package/ui-dist/assets/{index-Dceamza_.js → index-D-6T0Aft.js} +1 -1
  441. package/ui-dist/assets/{index-CjDqB1SX.js → index-DG_7V1pG.js} +1 -1
  442. package/ui-dist/assets/index-DIKcgxCt.js +676 -0
  443. package/ui-dist/assets/{index-BKVeJ3Jh.js → index-DiUerHmi.js} +1 -1
  444. package/ui-dist/assets/{index-C-nKjFZh.js → index-NZ7v5Fc2.js} +1 -1
  445. package/ui-dist/assets/{index-CvPPuNs1.js → index-Py70EvBg.js} +1 -1
  446. package/ui-dist/assets/{index-LHkZdu0h.js → index-R3aYn0qM.js} +1 -1
  447. package/ui-dist/assets/{index-BT8b79Bd.js → index-YXpm7gW-.js} +1 -1
  448. package/ui-dist/assets/{index-CemenVOf.js → index-n4q3gzki.js} +1 -1
  449. package/ui-dist/assets/{index-D3ODiUup.js → index-vlZ3GoYY.js} +1 -1
  450. package/ui-dist/assets/{infoDiagram-FWYZ7A6U-C7_90qGq.js → infoDiagram-FWYZ7A6U-jdi5ciVg.js} +1 -1
  451. package/ui-dist/assets/{ishikawaDiagram-FXEZZL3T-T-nPPdTt.js → ishikawaDiagram-FXEZZL3T-CMz5VvYp.js} +1 -1
  452. package/ui-dist/assets/{journeyDiagram-5HDEW3XC-C3hqQN0R.js → journeyDiagram-5HDEW3XC-DK6dk2R-.js} +1 -1
  453. package/ui-dist/assets/{kanban-definition-HUTT4EX6-CPoD9DUm.js → kanban-definition-HUTT4EX6-DX5cZL-D.js} +1 -1
  454. package/ui-dist/assets/{linear-D-S8yr3Z.js → linear-CI96ABKp.js} +1 -1
  455. package/ui-dist/assets/{mermaid.core-DhvH8shK.js → mermaid.core-DnsEVfbd.js} +4 -4
  456. package/ui-dist/assets/{mindmap-definition-LN4V7U3C-CxCIKrKo.js → mindmap-definition-LN4V7U3C-BdDCY7hf.js} +1 -1
  457. package/ui-dist/assets/{pegDiagram-2B236MQR-D4G-PC6N.js → pegDiagram-2B236MQR-DuY4TF-f.js} +1 -1
  458. package/ui-dist/assets/{pieDiagram-ENE6RG2P-N4X8UvqY.js → pieDiagram-ENE6RG2P-bgFw7dm3.js} +1 -1
  459. package/ui-dist/assets/{quadrantDiagram-ABIIQ3AL-CZohoDln.js → quadrantDiagram-ABIIQ3AL-BCZVWyWS.js} +1 -1
  460. package/ui-dist/assets/{railroadDiagram-RFXS5EU6-fMGQVhwF.js → railroadDiagram-RFXS5EU6-D9V5_Cgc.js} +1 -1
  461. package/ui-dist/assets/{requirementDiagram-TGXJPOKE-CK0IuUmk.js → requirementDiagram-TGXJPOKE-CItsya2r.js} +1 -1
  462. package/ui-dist/assets/{sankeyDiagram-HTMAVEWB-pSfb3CqG.js → sankeyDiagram-HTMAVEWB-Cz9IHsZO.js} +1 -1
  463. package/ui-dist/assets/{sequenceDiagram-DBY2YBRQ-CbhkqIeq.js → sequenceDiagram-DBY2YBRQ-hMSqTiwK.js} +1 -1
  464. package/ui-dist/assets/{sizeCapture-X5ZJPWSS-B6vqqPx-.js → sizeCapture-X5ZJPWSS-0g9M5wMf.js} +1 -1
  465. package/ui-dist/assets/{stateDiagram-2N3HPSRC-DIJf9h5C.js → stateDiagram-2N3HPSRC-F8_YhgWl.js} +1 -1
  466. package/ui-dist/assets/stateDiagram-v2-6OUMAXLB-fZImUBtq.js +1 -0
  467. package/ui-dist/assets/{swimlanes-5IMT3BWC-DIX_LV8O.js → swimlanes-5IMT3BWC-CCZqPbpE.js} +2 -2
  468. package/ui-dist/assets/swimlanesDiagram-G3AALYLV-9C1UT51R.js +8 -0
  469. package/ui-dist/assets/{timeline-definition-FHXFAJF6-CD-Pxb_g.js → timeline-definition-FHXFAJF6-BeUIr18x.js} +1 -1
  470. package/ui-dist/assets/{vennDiagram-L72KCM5P-BAZsWL0R.js → vennDiagram-L72KCM5P-D3d5h_G4.js} +1 -1
  471. package/ui-dist/assets/{wardleyDiagram-EHGQE667-CnNyfwX5.js → wardleyDiagram-EHGQE667-Bzt-As9A.js} +1 -1
  472. package/ui-dist/assets/{xychartDiagram-FW5EYKEG-j9YgsD3Y.js → xychartDiagram-FW5EYKEG-C2mly0xf.js} +1 -1
  473. package/ui-dist/fonts/InterVariable-Italic.woff2 +0 -0
  474. package/ui-dist/fonts/InterVariable.woff2 +0 -0
  475. package/ui-dist/fonts/NOTICE.md +17 -0
  476. package/ui-dist/index.html +2 -2
  477. package/ui-dist/locales/en/common.json +1142 -5
  478. package/ui-dist/locales/zh-CN/common.json +1140 -3
  479. package/ui-dist/assets/channel-CsiI2LYw.js +0 -1
  480. package/ui-dist/assets/classDiagram-OUVF2IWQ-CBn1Jqo8.js +0 -1
  481. package/ui-dist/assets/classDiagram-v2-EOCWNBFH-CBn1Jqo8.js +0 -1
  482. package/ui-dist/assets/index-BsL8K1vL.css +0 -1
  483. package/ui-dist/assets/index-D__fTsb2.js +0 -643
  484. package/ui-dist/assets/stateDiagram-v2-6OUMAXLB-DpwLD7YL.js +0 -1
  485. package/ui-dist/assets/swimlanesDiagram-G3AALYLV-Cklauutg.js +0 -8
@@ -191,6 +191,137 @@ The response also includes `blockedBy` and `blocks` arrays showing first-class d
191
191
 
192
192
  Blocker wake semantics are strict: `issue_blockers_resolved` only fires when every blocker reaches `done`. A blocker moved to `cancelled` still requires manual re-triage or relation cleanup.
193
193
 
194
+ ### Blocker Diagnostics (`GET /api/issues/:issueId/diagnostics/blockers`)
195
+
196
+ Use this read-only diagnostic when an issue appears stuck on dependencies, especially after an `issue_blockers_resolved` wake or when an issue looks blocked against a blocker that is already `done`.
197
+
198
+ Read `diagnosis` first. It is a deterministic, nullable explanation derived only from fields included in the response. The endpoint also returns bounded structured blocker rows with status, readiness, and anomaly flags:
199
+
200
+ ```json
201
+ {
202
+ "issue": { "id": "issue-99", "identifier": "PAP-99", "title": "Ship API", "status": "blocked", "priority": "medium", "assigneeAgentId": "agent-1", "assigneeUserId": null },
203
+ "diagnosis": "All blockers for PAP-99 are resolved, but the issue is still blocked; this is likely a stale blocker hold.",
204
+ "readiness": { "allBlockersDone": true, "isDependencyReady": true, "unresolvedBlockerCount": 0, "pendingFinalizeBlockerCount": 0 },
205
+ "blockers": [
206
+ {
207
+ "id": "issue-80",
208
+ "identifier": "PAP-80",
209
+ "title": "Design auth schema",
210
+ "status": "done",
211
+ "priority": "high",
212
+ "assigneeAgentId": "agent-55",
213
+ "assigneeUserId": null,
214
+ "isUnresolved": false,
215
+ "isDependencyReady": true,
216
+ "isPendingFinalize": false,
217
+ "flags": ["done_but_blocking"]
218
+ }
219
+ ],
220
+ "omittedUnauthorizedBlockerCount": 0,
221
+ "truncated": false,
222
+ "caps": { "maxBlockers": 100 }
223
+ }
224
+ ```
225
+
226
+ Security and bounds:
227
+
228
+ - The root issue and every returned blocker are independently checked against `issue:read`; unauthorized blockers are omitted.
229
+ - `omittedUnauthorizedBlockerCount` is a number only when the result is not truncated; it is `null` when `truncated` is `true` because blockers beyond the cap may also be unauthorized.
230
+ - If blockers are omitted or the result is truncated, `readiness` is `null` and `diagnosis` does not mention hidden blocker ids, statuses, assignees, or reasons.
231
+ - No raw wake payloads, activity details, errors, or trigger blobs are returned by this Slice-1 endpoint.
232
+
233
+ ### Wake Diagnostics (`GET /api/issues/:issueId/diagnostics/wakes`)
234
+
235
+ Use this read-only diagnostic when you need to answer why an issue's assignee was or was not woken. Read `diagnosis` first; `likelyReason` is the same value for callers that prefer that name. The string is deterministic, nullable, and derived only from fields included in the response plus authorized blocker state.
236
+
237
+ The endpoint returns bounded wake/activity events, newest-first across both event kinds:
238
+
239
+ ```json
240
+ {
241
+ "issue": { "id": "issue-99", "identifier": "PAP-99", "title": "Ship API", "status": "blocked", "priority": "medium", "assigneeAgentId": "agent-1", "assigneeUserId": null },
242
+ "diagnosis": "No wake row exists for PAP-99 in the bounded window. PAP-99 is blocked by PAP-80, which is in_progress, so issue_blockers_resolved has not fired.",
243
+ "likelyReason": "No wake row exists for PAP-99 in the bounded window. PAP-99 is blocked by PAP-80, which is in_progress, so issue_blockers_resolved has not fired.",
244
+ "events": [
245
+ {
246
+ "kind": "wake_request",
247
+ "agentId": "agent-1",
248
+ "source": "automation",
249
+ "reason": "issue_blockers_resolved",
250
+ "status": "completed",
251
+ "coalescedCount": 0,
252
+ "runId": "run-1",
253
+ "requestedAt": "2026-07-07T00:00:00.000Z",
254
+ "claimedAt": "2026-07-07T00:00:01.000Z",
255
+ "finishedAt": "2026-07-07T00:00:10.000Z",
256
+ "failureClass": null
257
+ }
258
+ ],
259
+ "wakeRequestCount": 1,
260
+ "activityRecordCount": 0,
261
+ "truncated": false,
262
+ "truncatedSections": { "wakeRequests": false, "activityRecords": false },
263
+ "caps": { "maxWakeRequests": 50, "maxActivityRecords": 50, "lookbackDays": 14 }
264
+ }
265
+ ```
266
+
267
+ Security and bounds:
268
+
269
+ - The root issue must pass normal issue-read authorization, and Case-B blocker inference uses the same per-blocker authorization rules as blocker diagnostics.
270
+ - Wake rows are matched only through allowlisted issue/task id fields in the wake payload. Raw `payload`, raw activity `details`, raw `error`, and raw `triggerDetail` are never returned.
271
+ - Low-trust or boundary-scoped callers that cannot read company scope receive `null` for wake `agentId`/`runId` and activity `agentId`/`runId`/`holdId`.
272
+ - Wake `source`, `reason`, and `status` are projected through coarse allowlists; unknown producer text is returned as `other`.
273
+ - Failure detail is exposed only as `failureClass` (`failed`, `cancelled`, or `skipped`), never raw error text.
274
+ - Activity records are limited to wake defer/suppression actions and exact allowlisted fields such as `rootIssueId`, `holdId`, `source`, `requestedReason`, and `previousReason`.
275
+ - Results are capped to 50 wake requests and 50 activity records within a 14-day lookback. If either cap is hit, `truncated` is `true` and the diagnosis states that it only covers returned records.
276
+
277
+ ### Subtree Diagnostics (`GET /api/issues/:issueId/diagnostics/subtree`)
278
+
279
+ Use this read-only diagnostic when an issue has child work and you need the combined wake/dependency view for the subtree. Read top-level `diagnosis` first; `likelyReason` is the same value. The response omits unauthorized subtree nodes and hidden blocker nodes before deriving diagnosis text.
280
+
281
+ ```json
282
+ {
283
+ "issue": { "id": "issue-99", "identifier": "PAP-99", "title": "Ship API", "status": "blocked", "priority": "medium", "assigneeAgentId": "agent-1", "assigneeUserId": null },
284
+ "diagnosis": "PAP-99 appears to be the subtree stall point: PAP-99 is blocked by PAP-80, which is in_progress.",
285
+ "likelyReason": "PAP-99 appears to be the subtree stall point: PAP-99 is blocked by PAP-80, which is in_progress.",
286
+ "nodes": [
287
+ {
288
+ "issue": { "id": "issue-99", "identifier": "PAP-99", "title": "Ship API", "status": "blocked", "priority": "medium", "assigneeAgentId": "agent-1", "assigneeUserId": null },
289
+ "parentId": null,
290
+ "depth": 0,
291
+ "diagnosis": "PAP-99 is blocked by PAP-80, which is in_progress.",
292
+ "likelyReason": "PAP-99 is blocked by PAP-80, which is in_progress.",
293
+ "blockers": [
294
+ { "id": "issue-80", "identifier": "PAP-80", "title": "Finish dependency", "status": "in_progress", "priority": "medium", "assigneeAgentId": "agent-2", "assigneeUserId": null, "isUnresolved": true, "isDependencyReady": false, "isPendingFinalize": false, "flags": [] }
295
+ ],
296
+ "blockerReadiness": { "allBlockersDone": false, "isDependencyReady": false, "unresolvedBlockerCount": 1, "pendingFinalizeBlockerCount": 0 },
297
+ "omittedUnauthorizedBlockerCount": 0,
298
+ "wakeEvents": [],
299
+ "wakeRequestCount": 0,
300
+ "activityRecordCount": 0,
301
+ "truncated": false,
302
+ "truncatedSections": { "blockers": false, "wakeRequests": false, "activityRecords": false }
303
+ }
304
+ ],
305
+ "edges": [
306
+ { "kind": "blocks", "fromIssueId": "issue-80", "toIssueId": "issue-99", "timestamp": "2026-07-07T00:00:00.000Z" },
307
+ { "kind": "wake_request", "issueId": "issue-99", "agentId": "agent-1", "reason": "issue_blockers_resolved", "status": "completed", "timestamp": "2026-07-07T00:01:00.000Z" }
308
+ ],
309
+ "nodeCount": 1,
310
+ "omittedUnauthorizedNodeCount": 0,
311
+ "truncated": false,
312
+ "truncatedSections": { "nodes": false, "depth": false, "blockers": false, "wakeRequests": false, "activityRecords": false },
313
+ "caps": { "maxDepth": 8, "maxNodes": 100, "maxBlockersPerNode": 20, "maxWakeRequestsPerNode": 5, "maxActivityRecordsPerNode": 5, "lookbackDays": 14 }
314
+ }
315
+ ```
316
+
317
+ Security and bounds:
318
+
319
+ - The root issue must pass normal issue-read authorization. Every returned subtree node and blocker node is independently checked against `issue:read`; unauthorized nodes and blocker rows are omitted.
320
+ - `diagnosis` and per-node `likelyReason` are deterministic and derived only from returned authorized node, blocker, wake, and activity projections.
321
+ - Raw wake `payload`, activity `details`, raw `error`, and `triggerDetail` are never returned. Wake fields use the same coarse projections as wake diagnostics.
322
+ - Low-trust or boundary-scoped callers that cannot read company scope receive `null` for internal wake `agentId`/`runId` and activity `agentId`/`runId`/`holdId`.
323
+ - The subtree walk is capped to depth 8 and 100 nodes with a cycle guard. Per-node blockers, wake requests, and activity records are also capped. Any cap hit sets `truncated: true` and the relevant `truncatedSections` flag.
324
+
194
325
  ### Execution Policy Fields On An Issue
195
326
 
196
327
  When an issue has review or approval gates, `GET /api/issues/:issueId` can also include `executionPolicy` and `executionState`:
@@ -829,6 +960,116 @@ Best practice:
829
960
  - After creating a pending checkbox confirmation, move the source issue to `in_review` with a comment that names exactly what the board must decide. Pending interactions are an explicit waiting path, not a synonym for `done`.
830
961
  - When a `superseded_by_comment` or `stale_target` wake fires, address the new comment or rebuild the target, then create a fresh checkbox confirmation with an idempotency key that includes the new revision id.
831
962
 
963
+ ### Item verdict requests
964
+
965
+ Use `request_item_verdicts` when the board must approve/reject/defer individual items from a known list, and partial responses should wake the assignee as durable progress. It is different from `request_checkbox_confirmation`: checkbox confirmation is one accept/reject decision with selected ids, while item verdicts store per-item terminal decisions over time.
966
+
967
+ Create an item-verdict request:
968
+
969
+ ```json
970
+ POST /api/issues/{issueId}/interactions
971
+ {
972
+ "kind": "request_item_verdicts",
973
+ "idempotencyKey": "verdicts:{issueId}:generated-artifacts:{planRevisionId}",
974
+ "title": "Review generated artifacts",
975
+ "continuationPolicy": "wake_assignee",
976
+ "payload": {
977
+ "version": 1,
978
+ "prompt": "Review each generated artifact.",
979
+ "detailsMarkdown": "Approve artifacts that are ready. Reject items that need another pass.",
980
+ "items": [
981
+ { "id": "api", "label": "API route", "description": "Partial verdict submit endpoint." },
982
+ { "id": "docs", "label": "Docs update", "previewMarkdown": "Documents the route and result shape." }
983
+ ],
984
+ "verdicts": ["approve", "reject", "defer"],
985
+ "requireReasonOn": ["reject"],
986
+ "reasonLabel": "What should change?",
987
+ "allowBulkApprove": true,
988
+ "supersedeOnUserComment": true,
989
+ "target": {
990
+ "type": "issue_document",
991
+ "issueId": "{issueId}",
992
+ "key": "plan",
993
+ "revisionId": "{latestPlanRevisionId}"
994
+ }
995
+ }
996
+ }
997
+ ```
998
+
999
+ Payload field reference (`RequestItemVerdictsPayload`):
1000
+
1001
+ | Field | Type | Default | Notes |
1002
+ | ------------------------ | -------------------------------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
1003
+ | `version` | `1` | required | Versioned for forward compatibility. |
1004
+ | `prompt` | string (1–1000 chars) | required | Headline rendered above the item list. |
1005
+ | `detailsMarkdown` | string (≤ 20000 chars) \| `null` | `null` | Optional markdown context above the list. |
1006
+ | `items` | `[{ id, label, description?, previewMarkdown?, href?, attachmentId? }]` | required, 1–200 entries | Item `id` and `label` are 1–120 chars. Item ids must be unique. `href` must be safe: root-relative, fragment, or http(s). |
1007
+ | `verdicts` | array of `"approve"`, `"reject"`, optional `"defer"` | `["approve","reject"]` | Must include `approve` and `reject`; `defer` is allowed only when listed. |
1008
+ | `requireReasonOn` | verdict array | `["reject"]` | Each value must be enabled by `verdicts`. Pending submissions with those verdicts require a non-empty `reason`. |
1009
+ | `reasonLabel` | string (1–160) \| `null` | `null` | Field label for the verdict reason. |
1010
+ | `allowBulkApprove` | boolean | `true` | UI hint for bulk-approve affordances. Server still validates each submitted item id. |
1011
+ | `supersedeOnUserComment` | boolean | `true` (set server-side) | A later board/user comment expires the still-pending remainder with `outcome: "superseded_by_comment"`. |
1012
+ | `target` | `RequestConfirmationTarget` \| `null` | `null` | Same target schema as confirmations. Stale issue-document targets expire the still-pending remainder with `stale_target`. |
1013
+
1014
+ Submit item verdicts (board action, requires board/user role; agents creating the interaction cannot submit verdicts):
1015
+
1016
+ ```json
1017
+ POST /api/issues/{issueId}/interactions/{interactionId}/verdicts
1018
+ {
1019
+ "verdicts": [
1020
+ { "id": "api", "verdict": "approve" },
1021
+ { "id": "docs", "verdict": "reject", "reason": "Needs install instructions." }
1022
+ ]
1023
+ }
1024
+ ```
1025
+
1026
+ Server behavior:
1027
+
1028
+ - Unknown item ids return 422.
1029
+ - A verdict not listed in `payload.verdicts` returns 422.
1030
+ - A pending item whose verdict is listed in `requireReasonOn` must include a non-empty `reason`.
1031
+ - Re-submitting an already resolved item id is a no-op and does not overwrite the stored verdict or reason.
1032
+ - Each submit that resolves at least one new item queues one assignee wake with `payload.newlyResolvedItemIds` and `payload.itemVerdicts.newlyResolvedItemIds`. Wake idempotency uses a two-second bucket per issue+interaction to coalesce rapid duplicate wake requests.
1033
+
1034
+ Partial result (`RequestItemVerdictsResult`, interaction remains `pending`):
1035
+
1036
+ ```json
1037
+ {
1038
+ "version": 1,
1039
+ "outcome": "resolved",
1040
+ "complete": false,
1041
+ "items": [
1042
+ {
1043
+ "id": "docs",
1044
+ "verdict": "reject",
1045
+ "reason": "Needs install instructions.",
1046
+ "resolvedByUserId": "local-board",
1047
+ "resolvedAt": "2026-07-09T12:00:00.000Z"
1048
+ }
1049
+ ]
1050
+ }
1051
+ ```
1052
+
1053
+ Complete result (interaction becomes `answered`):
1054
+
1055
+ ```json
1056
+ {
1057
+ "version": 1,
1058
+ "outcome": "resolved",
1059
+ "complete": true,
1060
+ "items": [
1061
+ { "id": "api", "verdict": "approve", "resolvedByUserId": "local-board", "resolvedAt": "2026-07-09T12:00:00.000Z" },
1062
+ { "id": "docs", "verdict": "reject", "reason": "Needs install instructions.", "resolvedByUserId": "local-board", "resolvedAt": "2026-07-09T12:00:00.000Z" }
1063
+ ]
1064
+ }
1065
+ ```
1066
+
1067
+ Expiration results preserve already resolved items and omit undecided items:
1068
+
1069
+ - `superseded_by_comment` — `{ outcome: "superseded_by_comment", complete: false, items, commentId }`.
1070
+ - `stale_target` — `{ outcome: "stale_target", complete: false, items, staleTarget }`.
1071
+ - `cancelled` is reserved for future explicit cancellation flows.
1072
+
832
1073
  ### Checking approval status
833
1074
 
834
1075
  ```
@@ -927,6 +1168,9 @@ Terminal states: `done`, `cancelled`
927
1168
  | GET | `/api/companies/:companyId/issues` | List issues, sorted by priority. Filters: `?status=`, `?assigneeAgentId=`, `?assigneeUserId=`, `?projectId=`, `?labelId=`, `?q=` (full-text search across title, identifier, description, comments) |
928
1169
  | GET | `/api/issues/:issueId` | Issue details + ancestors |
929
1170
  | GET | `/api/issues/:issueId/heartbeat-context` | Compact context for heartbeat: issue state, ancestor summaries, comment cursor |
1171
+ | GET | `/api/issues/:issueId/diagnostics/blockers` | Read-only blocker diagnostic with `diagnosis`, readiness, and bounded anomaly flags |
1172
+ | GET | `/api/issues/:issueId/diagnostics/wakes` | Read-only wake-history diagnostic with `diagnosis`, bounded events, and Case-B inference |
1173
+ | GET | `/api/issues/:issueId/diagnostics/subtree` | Read-only subtree diagnostic combining visible child, blocker, and wake edges with `diagnosis` |
930
1174
  | POST | `/api/companies/:companyId/issues` | Create issue (supports `blockedByIssueIds: string[]` for dependencies) |
931
1175
  | PATCH | `/api/issues/:issueId` | Update issue (optional `comment` field; `blockedByIssueIds` replaces blocker set) |
932
1176
  | POST | `/api/issues/:issueId/checkout` | Atomic checkout (claim + start). Idempotent if you already own it. |
@@ -935,10 +1179,11 @@ Terminal states: `done`, `cancelled`
935
1179
  | GET | `/api/issues/:issueId/comments/:commentId` | Get a specific comment by ID |
936
1180
  | POST | `/api/issues/:issueId/comments` | Add comment (@-mentions trigger wakeups) |
937
1181
  | GET | `/api/issues/:issueId/interactions` | List issue-thread interactions |
938
- | POST | `/api/issues/:issueId/interactions` | Create issue-thread interaction (`suggest_tasks`, `ask_user_questions`, `request_confirmation`, `request_checkbox_confirmation`) |
1182
+ | POST | `/api/issues/:issueId/interactions` | Create issue-thread interaction (`suggest_tasks`, `ask_user_questions`, `request_confirmation`, `request_checkbox_confirmation`, `request_item_verdicts`) |
939
1183
  | POST | `/api/issues/:issueId/interactions/:interactionId/accept` | Accept suggested tasks or confirmation (body: `selectedClientKeys` for `suggest_tasks`; `selectedOptionIds` for `request_checkbox_confirmation`) |
940
1184
  | POST | `/api/issues/:issueId/interactions/:interactionId/reject` | Reject suggested tasks or confirmation |
941
1185
  | POST | `/api/issues/:issueId/interactions/:interactionId/respond` | Respond to structured questions |
1186
+ | POST | `/api/issues/:issueId/interactions/:interactionId/verdicts` | Submit partial item verdicts for `request_item_verdicts` |
942
1187
  | GET | `/api/issues/:issueId/documents` | List issue documents |
943
1188
  | GET | `/api/issues/:issueId/documents/:key` | Get issue document by key |
944
1189
  | PUT | `/api/issues/:issueId/documents/:key` | Create or update issue document (send `baseRevisionId` when updating) |
@@ -0,0 +1,295 @@
1
+ # Cases
2
+
3
+ Cases are agent-owned work records for durable outputs such as blog posts,
4
+ research packets, release notes, incidents, QA runs, or generated asset sets.
5
+ They are company-scoped and live beside issues: issues coordinate work, while
6
+ cases preserve the structured object an agent is producing.
7
+
8
+ Cases are experimental and must be enabled with `experimental.enableCases`.
9
+ If a route returns `403 Cases are disabled`, stop and report that the operator
10
+ must enable cases before the skill can use this surface.
11
+
12
+ ## Core Model
13
+
14
+ A case has:
15
+
16
+ - `identifier`: server-assigned display id such as `PAP-C42`
17
+ - `caseType`: skill-owned type such as `blog_post`, `image_assets`, or `incident`
18
+ - `key`: optional deterministic upsert key inside `(companyId, caseType)`
19
+ - `title` and optional `summary`
20
+ - `status`: `draft`, `in_progress`, `in_review`, `approved`, `done`, or `cancelled`
21
+ - `fields`: JSON object owned by the skill using the case
22
+ - `parentCaseId`: optional parent case for child work
23
+ - documents, attachments, issue links, labels, and events
24
+
25
+ Use deterministic `caseType` + `key` when a skill may be retried. Repeating
26
+ `POST /api/companies/:companyId/cases` with the same `caseType` and `key`
27
+ upserts the same case instead of creating a duplicate.
28
+
29
+ ## Upsert Semantics
30
+
31
+ `POST /api/companies/:companyId/cases` creates or upserts a case.
32
+
33
+ Request:
34
+
35
+ ```json
36
+ {
37
+ "caseType": "blog_post",
38
+ "key": "launch-announcement",
39
+ "title": "Launch announcement",
40
+ "summary": "Draft launch post for operators.",
41
+ "status": "draft",
42
+ "fields": {
43
+ "slug": "launch-announcement",
44
+ "target_audience": "operators"
45
+ }
46
+ }
47
+ ```
48
+
49
+ Response:
50
+
51
+ - `201` when a new case was created
52
+ - `200` when an existing `(caseType, key)` case was updated
53
+
54
+ Field behavior on upsert:
55
+
56
+ - `title` is required and replaces the previous title.
57
+ - `projectId`, `summary`, `status`, `fields`, and `parentCaseId` replace the
58
+ previous value when present.
59
+ - Omitted optional values preserve the previous value during upsert.
60
+ - `fields` is replaced as a whole object when provided. It is not deep-merged.
61
+ Send the complete desired JSON object each time.
62
+ - Concurrent retries with the same `(caseType, key)` converge to one case.
63
+
64
+ Do not use a random `key` for retryable skills. Use a stable content slug,
65
+ external id, source URL hash, or parent-derived request key.
66
+
67
+ ## Read And Search
68
+
69
+ Get a case by UUID or identifier:
70
+
71
+ ```http
72
+ GET /api/cases/PAP-C42
73
+ ```
74
+
75
+ List cases for a company:
76
+
77
+ ```http
78
+ GET /api/companies/:companyId/cases?type=blog_post&status=active&q=launch
79
+ ```
80
+
81
+ Useful filters:
82
+
83
+ - `type`: exact `caseType`
84
+ - `status`: exact lifecycle status, or `active` for non-terminal cases
85
+ - `projectId` / `project`: project UUID
86
+ - `labelId` / `label`: label UUID
87
+ - `q`: identifier, title, summary, or key search
88
+ - `limit`: 1-200, default 100
89
+
90
+ ## Documents
91
+
92
+ Use case documents for rich bodies such as drafts, briefs, reports, or plans.
93
+
94
+ ```http
95
+ PUT /api/cases/:caseIdOrIdentifier/documents/body
96
+ Content-Type: application/json
97
+
98
+ {
99
+ "title": "Launch announcement body",
100
+ "format": "markdown",
101
+ "body": "# Launch announcement\n\nDraft copy...",
102
+ "changeSummary": "Initial draft"
103
+ }
104
+ ```
105
+
106
+ Updating an existing case document requires `baseRevisionId`:
107
+
108
+ ```json
109
+ {
110
+ "baseRevisionId": "latest-revision-uuid",
111
+ "body": "Updated body"
112
+ }
113
+ ```
114
+
115
+ If you get `409 stale_base_revision`, refetch the case detail, read the latest
116
+ document revision id, merge intentionally, and retry with that `baseRevisionId`.
117
+
118
+ ## Fields
119
+
120
+ Each skill owns the schema of `fields` for the `caseType` it creates. Keep fields
121
+ small, typed, and stable enough for other agents to inspect.
122
+
123
+ Examples:
124
+
125
+ ```json
126
+ {
127
+ "slug": "launch-announcement",
128
+ "target_audience": "operators",
129
+ "publish_url": "https://example.com/blog/launch-announcement"
130
+ }
131
+ ```
132
+
133
+ Patch fields or status with:
134
+
135
+ ```http
136
+ PATCH /api/cases/:caseIdOrIdentifier
137
+ Content-Type: application/json
138
+
139
+ {
140
+ "status": "in_review",
141
+ "fields": {
142
+ "slug": "launch-announcement",
143
+ "target_audience": "operators",
144
+ "publish_url": "https://example.com/blog/launch-announcement"
145
+ }
146
+ }
147
+ ```
148
+
149
+ Remember: `fields` replaces the whole object when present.
150
+
151
+ ## Issue Links
152
+
153
+ Link cases to issues explicitly when needed:
154
+
155
+ ```http
156
+ POST /api/cases/:caseIdOrIdentifier/links
157
+ Content-Type: application/json
158
+
159
+ {
160
+ "issueId": "issue-uuid",
161
+ "role": "reference"
162
+ }
163
+ ```
164
+
165
+ Roles:
166
+
167
+ - `origin`: the issue/run that created the case
168
+ - `work`: an issue/run that changed the case
169
+ - `reference`: related issue context
170
+
171
+ Agent run writes auto-link the run's issue when Paperclip can resolve it from
172
+ the run JWT or `X-Paperclip-Run-Id`. Creation/upsert writes use `origin`; later
173
+ document, patch, and attachment writes use `work` when no link already exists.
174
+ You do not need to manually link the current issue before writing the case.
175
+
176
+ ## Child Cases
177
+
178
+ Create child cases by setting `parentCaseId` to the parent case UUID.
179
+
180
+ ```json
181
+ {
182
+ "caseType": "image_assets",
183
+ "key": "launch-announcement:hero-images",
184
+ "title": "Hero images for launch announcement",
185
+ "parentCaseId": "parent-case-uuid",
186
+ "fields": {
187
+ "required_assets": ["hero", "social-card"]
188
+ }
189
+ }
190
+ ```
191
+
192
+ Use child cases when the output has independently inspectable pieces or when
193
+ another agent can work on a bounded part without editing the parent case body.
194
+
195
+ ## Attachments
196
+
197
+ Attach generated files with multipart form data:
198
+
199
+ ```http
200
+ POST /api/cases/:caseIdOrIdentifier/attachments
201
+ Content-Type: multipart/form-data
202
+
203
+ file=@hero.png
204
+ ```
205
+
206
+ The server records an asset and adds an `attachment_added` case event.
207
+
208
+ ## Lifecycle
209
+
210
+ Use the lifecycle consistently:
211
+
212
+ - `draft`: case exists but useful work has not started
213
+ - `in_progress`: an agent is actively producing or revising it
214
+ - `in_review`: ready for reviewer, board, or downstream approval
215
+ - `approved`: accepted but not finally shipped or archived
216
+ - `done`: complete and no further action remains
217
+ - `cancelled`: intentionally abandoned
218
+
219
+ Terminal statuses are `done` and `cancelled`; setting either records
220
+ `completedAt`. Moving back to a non-terminal status clears `completedAt`.
221
+
222
+ ## Worked Blog Post Example
223
+
224
+ Create or upsert the parent blog post:
225
+
226
+ ```http
227
+ POST /api/companies/:companyId/cases
228
+ Content-Type: application/json
229
+
230
+ {
231
+ "caseType": "blog_post",
232
+ "key": "paperclip-cases-launch",
233
+ "title": "Introducing Paperclip Cases",
234
+ "summary": "Blog post explaining the cases surface for agent outputs.",
235
+ "status": "in_progress",
236
+ "fields": {
237
+ "slug": "paperclip-cases-launch",
238
+ "target_audience": "AI company operators",
239
+ "publish_url": null
240
+ }
241
+ }
242
+ ```
243
+
244
+ Write the body:
245
+
246
+ ```http
247
+ PUT /api/cases/PAP-C42/documents/body
248
+ Content-Type: application/json
249
+
250
+ {
251
+ "title": "Introducing Paperclip Cases",
252
+ "format": "markdown",
253
+ "body": "# Introducing Paperclip Cases\n\n..."
254
+ }
255
+ ```
256
+
257
+ Create the child image-assets case:
258
+
259
+ ```http
260
+ POST /api/companies/:companyId/cases
261
+ Content-Type: application/json
262
+
263
+ {
264
+ "caseType": "image_assets",
265
+ "key": "paperclip-cases-launch:image-assets",
266
+ "title": "Image assets for Introducing Paperclip Cases",
267
+ "parentCaseId": "parent-case-uuid",
268
+ "status": "in_progress",
269
+ "fields": {
270
+ "slug": "paperclip-cases-launch",
271
+ "required_assets": ["hero", "social-card"],
272
+ "publish_url": null
273
+ }
274
+ }
275
+ ```
276
+
277
+ Attach generated assets to the child, then patch both cases as they move through
278
+ review:
279
+
280
+ ```http
281
+ PATCH /api/cases/PAP-C42
282
+ Content-Type: application/json
283
+
284
+ {
285
+ "status": "in_review",
286
+ "fields": {
287
+ "slug": "paperclip-cases-launch",
288
+ "target_audience": "AI company operators",
289
+ "publish_url": "https://example.com/blog/paperclip-cases-launch"
290
+ }
291
+ }
292
+ ```
293
+
294
+ If the same skill retries the example with the same keys, it updates the parent
295
+ and child cases rather than creating duplicates.
@@ -4,7 +4,7 @@ Use this reference when a board user, CEO, or manager asks you to find a skill,
4
4
 
5
5
  ## What Exists
6
6
 
7
- - App-shipped catalog: a curated set of company skills in `@paperclipai/skills-catalog`, browseable and installable without leaving Paperclip.
7
+ - App-shipped catalog: a curated set of company skills in `@penclipai/skills-catalog`, browseable and installable without leaving Paperclip.
8
8
  - Company skill library: install, inspect, update, audit, reset, and read company skills for the whole company.
9
9
  - Agent skill assignment: add or remove company skills on an existing agent.
10
10
  - Hire/create composition: pass `desiredSkills` when creating or hiring an agent so the same assignment model applies immediately.
@@ -1,10 +1,9 @@
1
1
  ---
2
2
  name: paperclip-board
3
3
  description: >
4
- Manage a Paperclip company as a board member via chat. Covers onboarding
5
- (company creation, CEO setup, hiring plans), agent management, approvals,
6
- task monitoring, cost oversight, and work product review. Use this skill
7
- whenever the user wants to interact with their Paperclip control plane.
4
+ Manage a Paperclip company as a board member via chat. Use when the user wants
5
+ onboarding, company or agent management, approvals, task monitoring, cost
6
+ oversight, or work product review in the Paperclip control plane.
8
7
  ---
9
8
 
10
9
  # Paperclip Board Skill
@@ -1,13 +1,9 @@
1
1
  ---
2
2
  name: paperclip-converting-plans-to-tasks
3
3
  description: >
4
- The Paperclip way of converting a plan into executable tasks. Use whenever
5
- you are asked to plan, scope, or break down work inside a Paperclip company.
6
- Industry-agnostic guidance on how to translate a plan into assigned issues
7
- with the right specialty, dependencies, and parallelization so Paperclip's
8
- executor can pick up the work — it does not prescribe a plan format. Pair
9
- with the `paperclip` skill, which covers the mechanics of writing the plan
10
- document and reassigning the issue.
4
+ Convert Paperclip plans into executable issue graphs. Use when asked to plan,
5
+ scope, or break down Paperclip company work into assigned tasks with specialty
6
+ fit, dependencies, blockers, and parallelization.
11
7
  ---
12
8
 
13
9
  # Paperclip — Converting Plans to Tasks
@@ -1,13 +1,9 @@
1
1
  ---
2
2
  name: para-memory-files
3
3
  description: >
4
- File-based memory system using Tiago Forte's PARA method. Use this skill whenever
5
- you need to store, retrieve, update, or organize knowledge across sessions. Covers
6
- three memory layers: (1) Knowledge graph in PARA folders with atomic YAML facts,
7
- (2) Daily notes as raw timeline, (3) Tacit knowledge about user patterns. Also
8
- handles planning files, memory decay, weekly synthesis, and recall via qmd.
9
- Trigger on any memory operation: saving facts, writing daily notes, creating
10
- entities, running weekly synthesis, recalling past context, or managing plans.
4
+ Use a file-based PARA memory system to store, retrieve, and organize durable
5
+ knowledge across sessions. Trigger on saving facts, daily notes, entity
6
+ records, weekly synthesis, recall, tacit user patterns, or plan memory.
11
7
  ---
12
8
 
13
9
  # PARA Memory Files
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-Clfi83rK.js";import{p as f}from"./chunk-JWPE2WC7-CA07x4av.js";import{_ as n,l as o}from"./mermaid.core-DhvH8shK.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BQSQ1HKr.js";import"./index-D__fTsb2.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-BEhQg0uD.js";import{p as f}from"./chunk-JWPE2WC7-DGo3MPmr.js";import{_ as n,l as o}from"./mermaid.core-DnsEVfbd.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-DfZ8Hzqi.js";import"./index-DIKcgxCt.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};