@tickernelz/paperclip-pro-server 2026.927.0 → 2026.927.2

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 (202) hide show
  1. package/dist/build-info.json +1 -1
  2. package/dist/routes/issues.d.ts.map +1 -1
  3. package/dist/routes/issues.js +177 -45
  4. package/dist/routes/issues.js.map +1 -1
  5. package/dist/routes/openapi.d.ts.map +1 -1
  6. package/dist/routes/openapi.js +1 -0
  7. package/dist/routes/openapi.js.map +1 -1
  8. package/dist/services/instance-settings.d.ts.map +1 -1
  9. package/dist/services/instance-settings.js +3 -1
  10. package/dist/services/instance-settings.js.map +1 -1
  11. package/node_modules/mdast-util-to-markdown/index.d.ts +2 -0
  12. package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +5 -0
  13. package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -1
  14. package/node_modules/mdast-util-to-markdown/lib/configure.js +19 -0
  15. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +7 -0
  16. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -1
  17. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +12 -1
  18. package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +7 -0
  19. package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -1
  20. package/node_modules/mdast-util-to-markdown/lib/handle/break.js +16 -5
  21. package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +7 -0
  22. package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -1
  23. package/node_modules/mdast-util-to-markdown/lib/handle/code.js +13 -2
  24. package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +7 -0
  25. package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -1
  26. package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +7 -0
  27. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +30 -2
  28. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -1
  29. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +39 -41
  30. package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +7 -0
  31. package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -1
  32. package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +11 -2
  33. package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +7 -0
  34. package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -1
  35. package/node_modules/mdast-util-to-markdown/lib/handle/html.js +7 -0
  36. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +10 -0
  37. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -1
  38. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +17 -2
  39. package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +10 -0
  40. package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -1
  41. package/node_modules/mdast-util-to-markdown/lib/handle/image.js +10 -0
  42. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +9 -0
  43. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -1
  44. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +14 -4
  45. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +10 -0
  46. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -1
  47. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +17 -2
  48. package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +13 -0
  49. package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -1
  50. package/node_modules/mdast-util-to-markdown/lib/handle/link.js +24 -9
  51. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +7 -0
  52. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -1
  53. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +12 -1
  54. package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +7 -0
  55. package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -1
  56. package/node_modules/mdast-util-to-markdown/lib/handle/list.js +7 -0
  57. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +7 -0
  58. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -1
  59. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +7 -0
  60. package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +7 -0
  61. package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -1
  62. package/node_modules/mdast-util-to-markdown/lib/handle/root.js +13 -2
  63. package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +30 -2
  64. package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -1
  65. package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +39 -41
  66. package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +7 -0
  67. package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -1
  68. package/node_modules/mdast-util-to-markdown/lib/handle/text.js +7 -0
  69. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +6 -0
  70. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -1
  71. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +6 -0
  72. package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -1
  73. package/node_modules/mdast-util-to-markdown/lib/index.js +34 -8
  74. package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -1
  75. package/node_modules/mdast-util-to-markdown/lib/join.js +18 -1
  76. package/node_modules/mdast-util-to-markdown/lib/types.d.ts +50 -30
  77. package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -1
  78. package/node_modules/mdast-util-to-markdown/lib/unsafe.js +15 -1
  79. package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts +23 -0
  80. package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts.map +1 -0
  81. package/node_modules/mdast-util-to-markdown/lib/util/character.js +32 -0
  82. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +4 -0
  83. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -1
  84. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +4 -0
  85. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +4 -0
  86. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -1
  87. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -0
  88. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +4 -0
  89. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -1
  90. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +4 -0
  91. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +4 -0
  92. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -1
  93. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +4 -0
  94. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +4 -0
  95. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -1
  96. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +4 -0
  97. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +4 -0
  98. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -1
  99. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +4 -0
  100. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +4 -0
  101. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -1
  102. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +4 -0
  103. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +4 -0
  104. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -1
  105. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +4 -0
  106. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +4 -0
  107. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -1
  108. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +4 -0
  109. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +4 -0
  110. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -1
  111. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +4 -0
  112. package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +3 -1
  113. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +2 -0
  114. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -1
  115. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +9 -0
  116. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +95 -4
  117. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -1
  118. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +636 -57
  119. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +2 -2
  120. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -1
  121. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +1 -1
  122. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +5 -0
  123. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -1
  124. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +12 -7
  125. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +5 -0
  126. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -1
  127. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -2
  128. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +5 -0
  129. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -1
  130. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +20 -15
  131. package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts +31 -0
  132. package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts.map +1 -0
  133. package/node_modules/mdast-util-to-markdown/lib/util/html-kind.js +63 -0
  134. package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +5 -0
  135. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +5 -0
  136. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -1
  137. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +11 -0
  138. package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +2 -2
  139. package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -1
  140. package/node_modules/mdast-util-to-markdown/lib/util/safe.js +71 -7
  141. package/node_modules/mdast-util-to-markdown/package.json +13 -57
  142. package/node_modules/mdast-util-to-markdown/readme.md +139 -84
  143. package/package.json +21 -21
  144. package/ui-dist/assets/{AgentAvatar-RxjiAwO8.js → AgentAvatar-PT82VwmU.js} +1 -1
  145. package/ui-dist/assets/{AgentIdentity-D4BY0hNL.js → AgentIdentity-MCshmbhZ.js} +1 -1
  146. package/ui-dist/assets/{Agents.production-gcp98JXS.js → Agents.production-BZi6klJA.js} +2 -2
  147. package/ui-dist/assets/{CompanyActivity.production-CWlPErYS.js → CompanyActivity.production-hUjwDlzb.js} +1 -1
  148. package/ui-dist/assets/{CompanyExport-JunkVVGm.js → CompanyExport-BQmo7amJ.js} +1 -1
  149. package/ui-dist/assets/{CompanySkills.production-DvSrjYfs.js → CompanySkills.production-HqWy0fEs.js} +1 -1
  150. package/ui-dist/assets/{Costs.production-zx6HrqRG.js → Costs.production-CdRBCdli.js} +1 -1
  151. package/ui-dist/assets/{EmptyState-DfjPe-d3.js → EmptyState-DPcc0zYh.js} +1 -1
  152. package/ui-dist/assets/{MarkdownBody-CsD5-bu_.js → MarkdownBody-D0eCfSWN.js} +1 -1
  153. package/ui-dist/assets/{MarkdownEditor-p2rnT0Be.js → MarkdownEditor-Pip4OXiJ.js} +49 -49
  154. package/ui-dist/assets/{OrgChart.production-C-wrmuDn.js → OrgChart.production-C_I93OQO.js} +1 -1
  155. package/ui-dist/assets/{PageSkeleton-CFPaR2xk.js → PageSkeleton-DHjTwRT3.js} +1 -1
  156. package/ui-dist/assets/{RoutineDetail.production-Skb6CK8y.js → RoutineDetail.production-BF19HlVi.js} +1 -1
  157. package/ui-dist/assets/{RoutineRunVariablesDialog-BWeOhxiO.js → RoutineRunVariablesDialog-IRX4TLng.js} +1 -1
  158. package/ui-dist/assets/{Routines.production-TpFNwHyG.js → Routines.production-BN-xoFb_.js} +1 -1
  159. package/ui-dist/assets/{SidebarContext-bqQ25oRc.js → SidebarContext-D01pu4wh.js} +1 -1
  160. package/ui-dist/assets/{StatusIcon-BJoaLFpW.js → StatusIcon-BuUYMqqU.js} +1 -1
  161. package/ui-dist/assets/{agents-D79f8ubB.js → agents-BlSzFh-1.js} +1 -1
  162. package/ui-dist/assets/{badge-Dtq5g7E6.js → badge-Cf7ihb3q.js} +1 -1
  163. package/ui-dist/assets/{bot-CuAIZ3O7.js → bot-DZDpMzjD.js} +1 -1
  164. package/ui-dist/assets/{button-BvVFpN4P.js → button-CAPbz11u.js} +1 -1
  165. package/ui-dist/assets/{card-Dt_3k83X.js → card-dmVcp3AX.js} +1 -1
  166. package/ui-dist/assets/{check-IIwgETIo.js → check-DDiXDm2i.js} +1 -1
  167. package/ui-dist/assets/{checkbox-Dt_GoRUY.js → checkbox-CmMbs2PZ.js} +1 -1
  168. package/ui-dist/assets/{chevron-down-UBZnuvt1.js → chevron-down-F9aZv-V7.js} +1 -1
  169. package/ui-dist/assets/{chevron-right-B0AHub3v.js → chevron-right-B9JUOr38.js} +1 -1
  170. package/ui-dist/assets/{clipboard-Bj5QAqRq.js → clipboard-CYJ5Q78m.js} +1 -1
  171. package/ui-dist/assets/{company-members-DEqvhrMC.js → company-members-BcZm1g8Q.js} +1 -1
  172. package/ui-dist/assets/createLucideIcon-r3v6fbGz.js +92 -0
  173. package/ui-dist/assets/{definition-wrbKkF1t.js → definition-Ds8jy0r3.js} +1 -1
  174. package/ui-dist/assets/{dist-FWFKwYyU.js → dist-5v80Jc6A.js} +1 -1
  175. package/ui-dist/assets/{dist-VxTJitj7.js → dist-D1zgkcBw.js} +1 -1
  176. package/ui-dist/assets/{environments-CkEnfa1n.js → environments-BVeNFanj.js} +1 -1
  177. package/ui-dist/assets/{external-link-B35J81lc.js → external-link-0lrOvZWO.js} +1 -1
  178. package/ui-dist/assets/{file-text-CD47Bznz.js → file-text-C9vgFckt.js} +1 -1
  179. package/ui-dist/assets/{health-CfAQPRgq.js → health-DeeeogeJ.js} +1 -1
  180. package/ui-dist/assets/{heartbeats-DLceYe5K.js → heartbeats-CK_aXmx5.js} +1 -1
  181. package/ui-dist/assets/{index-qzns_tVc.js → index-zttiya6r.js} +153 -153
  182. package/ui-dist/assets/{input-CFI8T_fr.js → input-DpsS9it-.js} +1 -1
  183. package/ui-dist/assets/{label-JgSsn_gH.js → label-C2ddSDJj.js} +1 -1
  184. package/ui-dist/assets/{loader-circle-AYbv_YhN.js → loader-circle-BD9wx-lw.js} +1 -1
  185. package/ui-dist/assets/{mention-chips-DPVE_n2N.js → mention-chips-DXumPrOR.js} +1 -1
  186. package/ui-dist/assets/{octagon-alert-2PgnRbAG.js → octagon-alert-rGMwyrWA.js} +1 -1
  187. package/ui-dist/assets/{rotate-ccw-D72kg6zn.js → rotate-ccw-CRAQ3Xng.js} +1 -1
  188. package/ui-dist/assets/{router-BrCMx2mP.js → router-DyZkoSkG.js} +2 -2
  189. package/ui-dist/assets/{save-fTBYxOC9.js → save-DUnPDT6R.js} +1 -1
  190. package/ui-dist/assets/{select-BidMsZcD.js → select-mS22eY6T.js} +1 -1
  191. package/ui-dist/assets/{sheet-BAx2-UjA.js → sheet-DeCxNmfl.js} +1 -1
  192. package/ui-dist/assets/{skeleton-CYELISHD.js → skeleton-CKir8TUW.js} +1 -1
  193. package/ui-dist/assets/{tabs-D5oWPScx.js → tabs-DWRZjksg.js} +1 -1
  194. package/ui-dist/assets/{triangle-alert-DFzcyeFH.js → triangle-alert-CgJcxSQX.js} +1 -1
  195. package/ui-dist/assets/{use-adapter-capabilities-aPQHbB6R.js → use-adapter-capabilities-BiWYK4zJ.js} +1 -1
  196. package/ui-dist/assets/{useHiddenSettings-jRtbaks6.js → useHiddenSettings-2JpxuJV7.js} +1 -1
  197. package/ui-dist/assets/{zap-B3DNfTNV.js → zap-P-cXfK28.js} +1 -1
  198. package/ui-dist/index.html +45 -45
  199. package/ui-dist/sw.js +1 -1
  200. package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts +0 -7
  201. package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts.map +0 -1
  202. package/ui-dist/assets/createLucideIcon-eTR0JqwS.js +0 -92
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "2a7fe23fbe210107f3c7005d5fca93135fa31169"
2
+ "commit": "ed50ca7315976302694437fe3db2b06a18ad8609"
3
3
  }
@@ -1 +1 @@
1
- {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../src/routes/issues.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AA4BvE,OAAO,EAgDL,KAAK,YAAY,EACjB,KAAK,yB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AO,CAAC,OAAO,CAAC,CAAC;IACvB,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC9B,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE;YAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;KAC5D,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACnB,8CAkzeP"}
@@ -10467,7 +10467,7 @@ export function issueRoutes(db, storage, opts = {}) {
10467
10467
  requestedByActorId: actor.actorId,
10468
10468
  });
10469
10469
  // Merge all wakeups from this update into one enqueue per agent to avoid duplicate runs.
10470
- void (async () => {
10470
+ const wakeDispatch = (async () => {
10471
10471
  const dependencyReadinessSvc = svc;
10472
10472
  const wakeups = new Map();
10473
10473
  const addWakeup = (agentId, wakeup) => {
@@ -10836,8 +10836,8 @@ export function issueRoutes(db, storage, opts = {}) {
10836
10836
  });
10837
10837
  }
10838
10838
  }
10839
- for (const { agentId, wakeup } of wakeups.values()) {
10840
- heartbeat
10839
+ await Promise.all([...wakeups.values()].map(async ({ agentId, wakeup }) => {
10840
+ await heartbeat
10841
10841
  .wakeup(agentId, wakeup)
10842
10842
  .then((wakeRun) => {
10843
10843
  if (wakeup.reason !== ISSUE_BLOCKERS_RESOLVED_WAKE_REASON)
@@ -10872,10 +10872,21 @@ export function issueRoutes(db, storage, opts = {}) {
10872
10872
  });
10873
10873
  })
10874
10874
  .catch((err) => logger.warn({ err, issueId: issue.id, agentId }, "failed to wake agent on issue update"));
10875
- }
10876
- })();
10875
+ }));
10876
+ })().catch((err) => logger.warn({ err, issueId: issue.id }, "failed to dispatch the issue update wake"));
10877
10877
  await queueTaskWatchdogEvaluation(issue, actor.runId);
10878
10878
  const changes = issueResponse.changes ?? {};
10879
+ const delivery = comment
10880
+ ? await resolveMessageDeliveryDisposition({
10881
+ issue,
10882
+ commentId: comment.id,
10883
+ actor,
10884
+ requested: req.body.commentDeliver,
10885
+ boardUserId: req.actor.type === "board" ? req.actor.userId ?? null : null,
10886
+ wakeDispatch,
10887
+ })
10888
+ : null;
10889
+ const commentResponse = comment && delivery ? { ...comment, ...delivery } : comment;
10879
10890
  if (prefersMinimalIssueUpdateResponse(req)) {
10880
10891
  res.setHeader("Preference-Applied", "return=minimal");
10881
10892
  res.json({
@@ -10883,11 +10894,11 @@ export function issueRoutes(db, storage, opts = {}) {
10883
10894
  identifier: issueResponse.identifier,
10884
10895
  updatedAt: issueResponse.updatedAt,
10885
10896
  changes,
10886
- comment,
10897
+ comment: commentResponse,
10887
10898
  });
10888
10899
  return;
10889
10900
  }
10890
- res.json({ ...issueResponse, changes, comment });
10901
+ res.json({ ...issueResponse, changes, comment: commentResponse });
10891
10902
  });
10892
10903
  router.delete("/issues/:id", async (req, res) => {
10893
10904
  const id = req.params.id;
@@ -11290,26 +11301,15 @@ export function issueRoutes(db, storage, opts = {}) {
11290
11301
  });
11291
11302
  res.json(await runRedactions.redactForIssue(issue.companyId, issue.id, queue));
11292
11303
  });
11293
- router.post("/issues/:id/queued-comments/:commentId/steer", validate(queuedCommentSteeringTargetSchema), async (req, res) => {
11294
- assertBoard(req);
11295
- if (!req.actor.userId)
11296
- throw forbidden("Board user context required");
11297
- const id = req.params.id;
11298
- const commentId = req.params.commentId;
11299
- const issue = await getAccessibleResource(req, res, svc.getById(id), "Issue not found");
11300
- if (!issue)
11301
- return;
11302
- if (issue.conversationAgentId)
11303
- throw conflict("Conversation messages are processed in order at turn boundaries");
11304
- const decision = await decideIssueAccess(req, issue, "issue:comment");
11305
- if (!decision.allowed)
11306
- throw forbidden(decision.explanation, authorizationDeniedDetails(decision));
11307
- const actor = getActorInfo(req);
11308
- const responseWake = await db.select().from(agentWakeupRequests).where(and(eq(agentWakeupRequests.id, req.body.queueId), eq(agentWakeupRequests.companyId, issue.companyId))).then(rows => rows[0]);
11309
- const response = responseWake ? await readQueuedInteractionResponse(db, issue.companyId, issue.id, responseWake.payload) : null;
11304
+ async function steerQueuedCommentInTransaction(input) {
11305
+ const { issue, actor, commentId } = input;
11306
+ const responseWake = await db.select().from(agentWakeupRequests).where(and(eq(agentWakeupRequests.id, input.queueId), eq(agentWakeupRequests.companyId, issue.companyId))).then(rows => rows[0]);
11307
+ const response = responseWake
11308
+ ? await readQueuedInteractionResponse(db, issue.companyId, issue.id, responseWake.payload)
11309
+ : null;
11310
11310
  const steeringIdentity = await reserveSteeredIdentity(db, {
11311
11311
  companyId: issue.companyId,
11312
- runId: req.body.targetRunId,
11312
+ runId: input.targetRunId,
11313
11313
  issueId: issue.id,
11314
11314
  messageId: commentId,
11315
11315
  source: response?.comment.id === commentId ? "interaction" : "comment",
@@ -11320,10 +11320,6 @@ export function issueRoutes(db, storage, opts = {}) {
11320
11320
  let queue;
11321
11321
  try {
11322
11322
  queue = await db.transaction(async (tx) => {
11323
- // A client can lose the successful response after the final queued
11324
- // message cancels its wake. Lock the original queue and target run
11325
- // first so that the persisted acknowledgement remains a durable
11326
- // idempotency record even when no pending queue remains.
11327
11323
  await tx
11328
11324
  .select({ id: issueRows.id })
11329
11325
  .from(issueRows)
@@ -11332,7 +11328,7 @@ export function issueRoutes(db, storage, opts = {}) {
11332
11328
  const retryWake = await tx
11333
11329
  .select()
11334
11330
  .from(agentWakeupRequests)
11335
- .where(and(eq(agentWakeupRequests.id, req.body.queueId), eq(agentWakeupRequests.companyId, issue.companyId), issue.assigneeAgentId
11331
+ .where(and(eq(agentWakeupRequests.id, input.queueId), eq(agentWakeupRequests.companyId, issue.companyId), issue.assigneeAgentId
11336
11332
  ? eq(agentWakeupRequests.agentId, issue.assigneeAgentId)
11337
11333
  : undefined))
11338
11334
  .for("update")
@@ -11342,7 +11338,7 @@ export function issueRoutes(db, storage, opts = {}) {
11342
11338
  ? await tx
11343
11339
  .select()
11344
11340
  .from(heartbeatRuns)
11345
- .where(and(eq(heartbeatRuns.id, req.body.targetRunId), eq(heartbeatRuns.companyId, issue.companyId), eq(heartbeatRuns.agentId, retryWake.agentId)))
11341
+ .where(and(eq(heartbeatRuns.id, input.targetRunId), eq(heartbeatRuns.companyId, issue.companyId), eq(heartbeatRuns.agentId, retryWake.agentId)))
11346
11342
  .for("update")
11347
11343
  .limit(1)
11348
11344
  .then((rows) => rows[0] ?? null)
@@ -11355,7 +11351,7 @@ export function issueRoutes(db, storage, opts = {}) {
11355
11351
  (retryRunContext.issueId === issue.id ||
11356
11352
  retryRunContext.taskId === issue.id) &&
11357
11353
  retryAcknowledgement.status === "acknowledged" &&
11358
- retryAcknowledgement.queueId === req.body.queueId) {
11354
+ retryAcknowledgement.queueId === input.queueId) {
11359
11355
  duplicate = true;
11360
11356
  acknowledgedTurnId =
11361
11357
  typeof retryAcknowledgement.turnId === "string"
@@ -11372,8 +11368,8 @@ export function issueRoutes(db, storage, opts = {}) {
11372
11368
  tx,
11373
11369
  issue,
11374
11370
  actor,
11375
- queueId: req.body.queueId,
11376
- targetRunId: req.body.targetRunId,
11371
+ queueId: input.queueId,
11372
+ targetRunId: input.targetRunId,
11377
11373
  });
11378
11374
  if (!locked.activeRun) {
11379
11375
  throw conflict("The queued message targets a stale run", {
@@ -11384,7 +11380,7 @@ export function issueRoutes(db, storage, opts = {}) {
11384
11380
  const acknowledgements = readObject(runResult.queuedSteeringAcknowledgements);
11385
11381
  const priorAcknowledgement = readObject(acknowledgements[commentId]);
11386
11382
  if (priorAcknowledgement.status === "acknowledged" &&
11387
- priorAcknowledgement.queueId === req.body.queueId) {
11383
+ priorAcknowledgement.queueId === input.queueId) {
11388
11384
  duplicate = true;
11389
11385
  acknowledgedTurnId =
11390
11386
  typeof priorAcknowledgement.turnId === "string"
@@ -11400,8 +11396,8 @@ export function issueRoutes(db, storage, opts = {}) {
11400
11396
  }
11401
11397
  assertQueueMutationTarget({
11402
11398
  queue: locked.queue,
11403
- queueId: req.body.queueId,
11404
- revision: req.body.revision,
11399
+ queueId: input.queueId,
11400
+ revision: input.revision,
11405
11401
  });
11406
11402
  if (locked.queue.protocol !== "paperclip_runner_v1") {
11407
11403
  throw conflict("This runner does not support same-turn steering", {
@@ -11463,7 +11459,7 @@ export function issueRoutes(db, storage, opts = {}) {
11463
11459
  ...acknowledgements,
11464
11460
  [commentId]: {
11465
11461
  status: "acknowledged",
11466
- queueId: req.body.queueId,
11462
+ queueId: input.queueId,
11467
11463
  turnId: acknowledgement.turnId,
11468
11464
  acknowledgedAt: now.toISOString(),
11469
11465
  },
@@ -11494,6 +11490,124 @@ export function issueRoutes(db, storage, opts = {}) {
11494
11490
  }
11495
11491
  throw error;
11496
11492
  }
11493
+ return { queue, duplicate, acknowledgedTurnId };
11494
+ }
11495
+ function steeringUnavailableFromError(error) {
11496
+ const code = error instanceof HttpError &&
11497
+ error.details &&
11498
+ typeof error.details === "object" &&
11499
+ !Array.isArray(error.details) &&
11500
+ typeof error.details.code === "string"
11501
+ ? error.details.code
11502
+ : null;
11503
+ if (code === "steering_unsupported")
11504
+ return "legacy_protocol";
11505
+ if (code === "queued_comment_stale_target" ||
11506
+ code === "queued_comment_not_pending" ||
11507
+ code === "queued_comment_already_dispatching" ||
11508
+ code === "queued_comment_stale_queue" ||
11509
+ code === "queued_comment_revision_conflict" ||
11510
+ code === "queued_response_requires_fresh_session") {
11511
+ return "no_active_run";
11512
+ }
11513
+ return "steering_failed";
11514
+ }
11515
+ /**
11516
+ * Resolve how a freshly posted message was actually delivered, and steer it
11517
+ * when the resolved mode is `"steer"`.
11518
+ *
11519
+ * This never fails the write. Every path that cannot steer returns a queue
11520
+ * disposition with the reason attached, so a caller can always tell "queued
11521
+ * because you asked" from "you asked to steer and got a queue instead".
11522
+ */
11523
+ async function resolveMessageDeliveryDisposition(input) {
11524
+ const effective = input.requested ??
11525
+ (await instanceSettings.getGeneral()).defaultMessageDelivery;
11526
+ if (effective === "queue") {
11527
+ return { deliveredAs: "queued", steeringUnavailable: "not_requested" };
11528
+ }
11529
+ if (input.actor.actorType === "agent" || !input.boardUserId) {
11530
+ return { deliveredAs: "queued", steeringUnavailable: "board_only" };
11531
+ }
11532
+ if (input.issue.conversationAgentId) {
11533
+ return {
11534
+ deliveredAs: "queued",
11535
+ steeringUnavailable: input.requested === "steer" ? "conversation_issue" : "not_requested",
11536
+ };
11537
+ }
11538
+ try {
11539
+ await input.wakeDispatch;
11540
+ }
11541
+ catch (err) {
11542
+ logger.warn({ err, issueId: input.issue.id, commentId: input.commentId }, "failed to complete the comment wake dispatch before steering");
11543
+ }
11544
+ let target = null;
11545
+ try {
11546
+ const issue = await svc.getById(input.issue.id);
11547
+ const activeRun = issue ? await resolveActiveIssueRun(issue) : null;
11548
+ const queue = await buildQueuedCommentQueue({
11549
+ executor: db,
11550
+ issue: issue ?? input.issue,
11551
+ activeRun,
11552
+ actor: input.actor,
11553
+ steeringDisposition: "temporarily_unavailable",
11554
+ });
11555
+ const entry = queue.entries.find((candidate) => candidate.comment.id === input.commentId);
11556
+ if (entry && queue.protocol !== "paperclip_runner_v1") {
11557
+ return { deliveredAs: "queued", steeringUnavailable: "legacy_protocol" };
11558
+ }
11559
+ target =
11560
+ entry && queue.queueId && queue.targetRunId
11561
+ ? { queueId: queue.queueId, targetRunId: queue.targetRunId, revision: queue.revision }
11562
+ : null;
11563
+ }
11564
+ catch (err) {
11565
+ logger.warn({ err, issueId: input.issue.id, commentId: input.commentId }, "failed to resolve the steering target for a posted comment");
11566
+ }
11567
+ if (!target) {
11568
+ return { deliveredAs: "queued", steeringUnavailable: "no_active_run" };
11569
+ }
11570
+ try {
11571
+ await steerQueuedCommentInTransaction({
11572
+ issue: input.issue,
11573
+ actor: input.actor,
11574
+ commentId: input.commentId,
11575
+ queueId: target.queueId,
11576
+ targetRunId: target.targetRunId,
11577
+ revision: target.revision,
11578
+ });
11579
+ }
11580
+ catch (error) {
11581
+ return {
11582
+ deliveredAs: "queued",
11583
+ steeringUnavailable: steeringUnavailableFromError(error),
11584
+ };
11585
+ }
11586
+ return { deliveredAs: "steered" };
11587
+ }
11588
+ router.post("/issues/:id/queued-comments/:commentId/steer", validate(queuedCommentSteeringTargetSchema), async (req, res) => {
11589
+ assertBoard(req);
11590
+ if (!req.actor.userId)
11591
+ throw forbidden("Board user context required");
11592
+ const id = req.params.id;
11593
+ const commentId = req.params.commentId;
11594
+ const issue = await getAccessibleResource(req, res, svc.getById(id), "Issue not found");
11595
+ if (!issue)
11596
+ return;
11597
+ if (issue.conversationAgentId)
11598
+ throw conflict("Conversation messages are processed in order at turn boundaries");
11599
+ const decision = await decideIssueAccess(req, issue, "issue:comment");
11600
+ if (!decision.allowed)
11601
+ throw forbidden(decision.explanation, authorizationDeniedDetails(decision));
11602
+ const actor = getActorInfo(req);
11603
+ const { queue, duplicate, acknowledgedTurnId } = await steerQueuedCommentInTransaction({
11604
+ issue,
11605
+ actor,
11606
+ commentId,
11607
+ queueId: req.body.queueId,
11608
+ targetRunId: req.body.targetRunId,
11609
+ revision: req.body.revision,
11610
+ });
11497
11611
  await logActivity(db, {
11498
11612
  companyId: issue.companyId,
11499
11613
  actorType: actor.actorType,
@@ -12640,7 +12754,17 @@ export function issueRoutes(db, storage, opts = {}) {
12640
12754
  publishActivity(publication);
12641
12755
  await issueReferencesSvc.syncComment(comment.id);
12642
12756
  await deliverConversationComments(db, issue, heartbeat.wakeup);
12643
- res.status(201).json(comment);
12757
+ res.status(201).json({
12758
+ ...comment,
12759
+ ...(await resolveMessageDeliveryDisposition({
12760
+ issue,
12761
+ commentId: comment.id,
12762
+ actor,
12763
+ requested: req.body.deliver,
12764
+ boardUserId: req.actor.userId ?? null,
12765
+ wakeDispatch: Promise.resolve(),
12766
+ })),
12767
+ });
12644
12768
  return;
12645
12769
  }
12646
12770
  if (req.actor.type === "agent" && req.body.onBehalfOfUserId != null) {
@@ -13164,7 +13288,7 @@ export function issueRoutes(db, storage, opts = {}) {
13164
13288
  currentIssue.status === "todo",
13165
13289
  });
13166
13290
  // Merge all wakeups from this comment into one enqueue per agent to avoid duplicate runs.
13167
- void (async () => {
13291
+ const wakeDispatch = (async () => {
13168
13292
  const wakeups = new Map();
13169
13293
  const addWakeup = (agentId, wakeup) => {
13170
13294
  const wakeIssueId = wakeup.payload &&
@@ -13430,8 +13554,8 @@ export function issueRoutes(db, storage, opts = {}) {
13430
13554
  });
13431
13555
  }
13432
13556
  }
13433
- for (const { agentId, wakeup } of wakeups.values()) {
13434
- heartbeat
13557
+ await Promise.all([...wakeups.values()].map(async ({ agentId, wakeup }) => {
13558
+ await heartbeat
13435
13559
  .wakeup(agentId, wakeup)
13436
13560
  .then((wakeRun) => {
13437
13561
  if (wakeup.reason !== ISSUE_BLOCKERS_RESOLVED_WAKE_REASON)
@@ -13466,10 +13590,18 @@ export function issueRoutes(db, storage, opts = {}) {
13466
13590
  });
13467
13591
  })
13468
13592
  .catch((err) => logger.warn({ err, issueId: currentIssue.id, agentId }, "failed to wake agent on issue comment"));
13469
- }
13470
- })();
13593
+ }));
13594
+ })().catch((err) => logger.warn({ err, issueId: currentIssue.id }, "failed to dispatch the issue comment wake"));
13471
13595
  await queueTaskWatchdogEvaluation(currentIssue, actor.runId);
13472
- res.status(201).json(comment);
13596
+ const delivery = await resolveMessageDeliveryDisposition({
13597
+ issue: currentIssue,
13598
+ commentId: comment.id,
13599
+ actor,
13600
+ requested: req.body.deliver,
13601
+ boardUserId: req.actor.type === "board" ? req.actor.userId ?? null : null,
13602
+ wakeDispatch,
13603
+ });
13604
+ res.status(201).json({ ...comment, ...delivery });
13473
13605
  });
13474
13606
  router.post("/issues/:id/feedback-votes", validate(upsertIssueFeedbackVoteSchema), async (req, res) => {
13475
13607
  const id = req.params.id;