@maycombhq/atticus 2.0.0-beta.12.2 → 2.0.0-beta.13

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 (220) hide show
  1. package/dist/bin.js +3 -3
  2. package/dist/{chunk-6J2BWOLO.js → chunk-22VA7YYG.js} +11 -11
  3. package/dist/{chunk-LUBKMCTR.js → chunk-27HOC77H.js} +2 -2
  4. package/dist/chunk-2HFVFEBT.js +37 -0
  5. package/dist/{chunk-CAH7L2QH.js → chunk-2JQ2SCX7.js} +7 -7
  6. package/dist/{chunk-KMU7XNK3.js → chunk-2M76O6AN.js} +2 -2
  7. package/dist/{chunk-KZSIKS64.js → chunk-2V7A3J7B.js} +10 -10
  8. package/dist/{chunk-5VZJX75P.js → chunk-2W6ZLQX6.js} +11 -11
  9. package/dist/{chunk-OOQPEISI.js → chunk-2Z4U33UI.js} +3 -3
  10. package/dist/{chunk-M2U3IZ54.js → chunk-3JOHZDKD.js} +5 -5
  11. package/dist/{chunk-C43X7Y7O.js → chunk-3ODHCYOG.js} +4 -4
  12. package/dist/{chunk-N3Z5NFM4.js → chunk-3RI2HYPB.js} +4 -4
  13. package/dist/{chunk-CV2Y7JQU.js → chunk-3VYKAAQ4.js} +5 -5
  14. package/dist/{chunk-PWUVIOMW.js → chunk-3ZYGPIOB.js} +17 -17
  15. package/dist/{chunk-WMWYW4WB.js → chunk-46VGJBRS.js} +1 -1
  16. package/dist/{chunk-AVEKRWDF.js → chunk-4CBEOTJG.js} +4 -4
  17. package/dist/{chunk-UA4DLNV7.js → chunk-4HAYYEFB.js} +2 -2
  18. package/dist/{chunk-XKARSCXA.js → chunk-4IAZSN4N.js} +14 -14
  19. package/dist/{chunk-FM56YGBC.js → chunk-4NMF7XDM.js} +7 -7
  20. package/dist/{chunk-U55GKPUB.js → chunk-4WUHO5SI.js} +14 -14
  21. package/dist/{chunk-FAAOOT34.js → chunk-55H65YKF.js} +4 -4
  22. package/dist/{chunk-JW3ENKRI.js → chunk-5EOJSQM3.js} +20 -20
  23. package/dist/{chunk-2UPMPTNJ.js → chunk-5GQHLNZB.js} +4 -4
  24. package/dist/{chunk-YYV55774.js → chunk-5LDFVOKT.js} +1 -1
  25. package/dist/{chunk-OHBNRL75.js → chunk-5MT5MY3V.js} +1 -1
  26. package/dist/{chunk-JLF4JIZ6.js → chunk-5SDBKA5U.js} +10 -10
  27. package/dist/chunk-5UQ5W2PF.js +54 -0
  28. package/dist/{chunk-TDKSKJU3.js → chunk-5WBRQSLJ.js} +8 -8
  29. package/dist/{chunk-MPC5BQ6O.js → chunk-62CGLT7D.js} +16 -16
  30. package/dist/chunk-6EHE7PX4.js +54 -0
  31. package/dist/{chunk-PPP75X5G.js → chunk-6L3OB44C.js} +11 -11
  32. package/dist/{chunk-WMCKOZFT.js → chunk-6TY7S6Y6.js} +5 -5
  33. package/dist/{chunk-3RQK5AWY.js → chunk-6VLNXNEM.js} +4 -4
  34. package/dist/{chunk-YU63ND72.js → chunk-6Z2SM6TU.js} +9 -9
  35. package/dist/{chunk-24ARIOB7.js → chunk-7HX7LQ66.js} +1 -1
  36. package/dist/{chunk-LO3NRDCE.js → chunk-7YXDLJCV.js} +1 -1
  37. package/dist/{chunk-V3P5ZJSO.js → chunk-A5YAXW5G.js} +31 -8
  38. package/dist/{chunk-6FYKGYAO.js → chunk-A64EHZTF.js} +6 -6
  39. package/dist/{chunk-2IFPJYBT.js → chunk-A7URZ77Y.js} +19 -19
  40. package/dist/{chunk-2L5XV7QK.js → chunk-B2EIZVAW.js} +10 -10
  41. package/dist/{chunk-JFCTPPRA.js → chunk-BAGRINRH.js} +102 -102
  42. package/dist/{chunk-LZABEKI6.js → chunk-BH5DMXG5.js} +134 -13
  43. package/dist/{chunk-QZIAPAUG.js → chunk-CFIDOXSH.js} +136 -35
  44. package/dist/{chunk-O775JVDM.js → chunk-CFYAQTDM.js} +15 -15
  45. package/dist/{chunk-J6FWM4VI.js → chunk-CK5Z3RIN.js} +9 -9
  46. package/dist/{chunk-WQKMAOD7.js → chunk-DAZHJOLA.js} +4 -4
  47. package/dist/{chunk-QXI64SJ4.js → chunk-DFDEUYHX.js} +1 -1
  48. package/dist/{chunk-7YZ6JPFR.js → chunk-DHWMEG7N.js} +2 -2
  49. package/dist/{chunk-ASCZ47XX.js → chunk-DJEDFJTZ.js} +2 -2
  50. package/dist/{chunk-5WIH5VUB.js → chunk-DJTZVXI5.js} +4 -4
  51. package/dist/{chunk-OQPFFBPQ.js → chunk-DN4FULFM.js} +17 -17
  52. package/dist/{chunk-7CJ2TNZZ.js → chunk-DO6B66AS.js} +16 -16
  53. package/dist/{chunk-CLDB6K2T.js → chunk-EBVKNIKO.js} +13 -13
  54. package/dist/chunk-ECGTN32T.js +43 -0
  55. package/dist/{chunk-TLTKLVZZ.js → chunk-EFI6BBPE.js} +1 -1
  56. package/dist/{chunk-S4EGGQZB.js → chunk-EJJONXPS.js} +14 -14
  57. package/dist/{chunk-AOPL3VT7.js → chunk-ETOIM5LK.js} +15 -15
  58. package/dist/{chunk-QLJ7KLO3.js → chunk-EUSWNGGG.js} +5 -5
  59. package/dist/chunk-F4WLUEZY.js +43 -0
  60. package/dist/chunk-F7EHN4CC.js +151 -0
  61. package/dist/{chunk-7XYCCKGI.js → chunk-FGGCLKPG.js} +12 -12
  62. package/dist/{chunk-IPB6EKUH.js → chunk-FMGMRFEH.js} +4 -4
  63. package/dist/chunk-FODNRZC7.js +38 -0
  64. package/dist/{chunk-5CIFSHTS.js → chunk-FZTXX5Z2.js} +17 -17
  65. package/dist/{chunk-GGBEM27J.js → chunk-GAK5KDYV.js} +3 -3
  66. package/dist/{chunk-3DMXBIDW.js → chunk-GELBERZB.js} +3 -3
  67. package/dist/{chunk-NTUHEHC6.js → chunk-GFQ4ZUY3.js} +13 -13
  68. package/dist/{chunk-RSAJ33C6.js → chunk-GMXE44X7.js} +15 -15
  69. package/dist/{chunk-RICWZRBR.js → chunk-GNEFMED4.js} +4 -4
  70. package/dist/{chunk-5P766RED.js → chunk-GT6BMFHZ.js} +13 -1
  71. package/dist/{chunk-73QQ3KWY.js → chunk-GWB4XIMM.js} +11 -11
  72. package/dist/{chunk-AQPK22BH.js → chunk-HGNJNPMB.js} +1 -1
  73. package/dist/{chunk-EWJ32DKS.js → chunk-HGNMMBFJ.js} +6 -6
  74. package/dist/{chunk-LQ5CEQFQ.js → chunk-HK2BXCMW.js} +3 -3
  75. package/dist/{chunk-MA43MHVR.js → chunk-HOQB4B3F.js} +3 -3
  76. package/dist/{chunk-HSLT4NZA.js → chunk-HRVG2MOI.js} +19 -19
  77. package/dist/{chunk-UOW37F7C.js → chunk-HS7OZ3ZE.js} +3 -3
  78. package/dist/{chunk-P44WNZXO.js → chunk-I6PYLKHK.js} +15 -15
  79. package/dist/{chunk-REFOPAZF.js → chunk-IDJJ5MDV.js} +24 -24
  80. package/dist/{chunk-UGMJ3Z35.js → chunk-IF6UROTX.js} +2 -2
  81. package/dist/{chunk-PQVZO25F.js → chunk-IJQ5BF5K.js} +3 -3
  82. package/dist/{chunk-AV2DVINC.js → chunk-IQLHTDHS.js} +10 -10
  83. package/dist/{chunk-ZIVRZ3WV.js → chunk-IUDD5WS3.js} +21 -21
  84. package/dist/{chunk-ZUCJCBS5.js → chunk-J422SCUS.js} +4 -4
  85. package/dist/chunk-J5QWT2LV.js +41 -0
  86. package/dist/{chunk-TDQNBA2N.js → chunk-J6CM5ZST.js} +20 -20
  87. package/dist/{chunk-PR5X4SIJ.js → chunk-J7G2BGW4.js} +4 -4
  88. package/dist/{chunk-35FTAQDX.js → chunk-JCGIAHCX.js} +4 -4
  89. package/dist/{chunk-AAIAS55Y.js → chunk-JI3QP66O.js} +21 -21
  90. package/dist/{chunk-PG5FIVP3.js → chunk-JQKFZIQN.js} +16 -16
  91. package/dist/{chunk-DDCK4CFE.js → chunk-JSTI6YPH.js} +2 -2
  92. package/dist/{chunk-K2WOVID6.js → chunk-JW3YAB24.js} +31 -31
  93. package/dist/{chunk-LURMCWUG.js → chunk-K3VT62TE.js} +2 -2
  94. package/dist/{chunk-E52MNV5B.js → chunk-K4J4Z37A.js} +1090 -40
  95. package/dist/{chunk-PURVXI7L.js → chunk-KEOTTRK2.js} +4 -4
  96. package/dist/{chunk-KTHFVH6T.js → chunk-KEZXPK4U.js} +9 -9
  97. package/dist/{chunk-M63Z7PIB.js → chunk-KK4I5NNI.js} +7 -7
  98. package/dist/{chunk-P4L435FY.js → chunk-KLXAX2YW.js} +12 -12
  99. package/dist/{chunk-WPBQT6VF.js → chunk-KMDIJ6O4.js} +4 -4
  100. package/dist/{chunk-QJWE44D4.js → chunk-KUFJDY4S.js} +3 -3
  101. package/dist/{chunk-BGASQ4UD.js → chunk-KV24YCMX.js} +11 -11
  102. package/dist/{chunk-G3CY3PFO.js → chunk-KYR4XMXR.js} +2 -2
  103. package/dist/{chunk-KLROTB6N.js → chunk-L2EHYZCH.js} +2 -2
  104. package/dist/{chunk-AODGV7YL.js → chunk-L32HJTTW.js} +23 -23
  105. package/dist/{chunk-NAFPFQMJ.js → chunk-LPVS4DPT.js} +4 -4
  106. package/dist/{chunk-5WJCV6ED.js → chunk-LRO3Y2XQ.js} +1 -1
  107. package/dist/{chunk-ACW2C7CY.js → chunk-LYWEB453.js} +5 -5
  108. package/dist/chunk-LZDK3V3W.js +34 -0
  109. package/dist/{chunk-3BZR2M2H.js → chunk-M54PJXYX.js} +149 -104
  110. package/dist/{chunk-OG42OLZK.js → chunk-M6W3P3ZI.js} +24 -24
  111. package/dist/{chunk-OYGY4DI2.js → chunk-MBAKCS2U.js} +25 -8
  112. package/dist/{chunk-QQLWNMLX.js → chunk-MBQY6L3Z.js} +10 -10
  113. package/dist/{chunk-JEZM3NRF.js → chunk-MCRCJLAE.js} +2 -2
  114. package/dist/{chunk-EUK4IONY.js → chunk-MSAXKU4C.js} +7 -7
  115. package/dist/{chunk-VOZI4AFV.js → chunk-MSF6XELY.js} +14 -14
  116. package/dist/{chunk-ZT6WXY3J.js → chunk-MYZPN2BV.js} +23 -23
  117. package/dist/{chunk-DLSPFAC5.js → chunk-N35OSYIU.js} +3 -3
  118. package/dist/{chunk-7JA7XGWC.js → chunk-N3Z2D3OC.js} +24 -24
  119. package/dist/{chunk-IRA6XAXY.js → chunk-NEDAQDC7.js} +11 -11
  120. package/dist/{chunk-JARVXMUW.js → chunk-NEEOJJWT.js} +2 -2
  121. package/dist/{chunk-GP3NGMWY.js → chunk-NEYVK52V.js} +3 -3
  122. package/dist/chunk-NKIGYJY6.js +41 -0
  123. package/dist/{chunk-3LWQYHID.js → chunk-NPL4XMOC.js} +7 -7
  124. package/dist/{chunk-PI6KNUBW.js → chunk-NRJC7XTD.js} +5 -5
  125. package/dist/{chunk-6IFOKO2R.js → chunk-NVDAZOVS.js} +17 -17
  126. package/dist/{chunk-T34ITVSM.js → chunk-O2QUSGER.js} +4 -4
  127. package/dist/{chunk-JTI3FKGI.js → chunk-OE3ECGHN.js} +4 -4
  128. package/dist/{chunk-ZJDOYEW4.js → chunk-OKXRQPQF.js} +6 -6
  129. package/dist/{chunk-YDBWECPT.js → chunk-OPMTVYWM.js} +8 -8
  130. package/dist/{chunk-BLEZRUU5.js → chunk-OR4FYMZM.js} +18 -18
  131. package/dist/{chunk-X2SHYKUY.js → chunk-OXEOXPG5.js} +6 -6
  132. package/dist/{chunk-4CPOXPS4.js → chunk-P2AKNGWM.js} +3 -3
  133. package/dist/{chunk-IUWOOFPR.js → chunk-PAYFWXVA.js} +2 -2
  134. package/dist/{chunk-JLZPUCEC.js → chunk-PCYGJOR2.js} +6 -6
  135. package/dist/{chunk-IVBSAKVG.js → chunk-PFUX5AVG.js} +15 -15
  136. package/dist/{chunk-EL4VOLGT.js → chunk-PJ7CW2B5.js} +22 -22
  137. package/dist/{chunk-IUKKHYEK.js → chunk-PLZ6S6QS.js} +6 -6
  138. package/dist/{chunk-X4VLWQR2.js → chunk-PWDRDFYW.js} +11 -11
  139. package/dist/{chunk-VK22DOCQ.js → chunk-QBA67JWK.js} +22 -22
  140. package/dist/{chunk-7OHYHBEQ.js → chunk-QF6RSKKI.js} +1 -1
  141. package/dist/{chunk-2Y4EWUDF.js → chunk-QOZICYAF.js} +4 -4
  142. package/dist/{chunk-SOLKTI2T.js → chunk-QPAOZXXQ.js} +4 -4
  143. package/dist/{chunk-PPCCFZG7.js → chunk-QQIZGLRA.js} +2 -2
  144. package/dist/{chunk-U7RMOCQQ.js → chunk-QTJCLGFC.js} +7 -7
  145. package/dist/{chunk-EPTCDW3U.js → chunk-QVPYGH7N.js} +11 -11
  146. package/dist/{chunk-OV3WHHRI.js → chunk-RAFD4MYO.js} +1 -1
  147. package/dist/{chunk-66VD3EHO.js → chunk-RDPHVCTU.js} +10 -10
  148. package/dist/{chunk-R2A6DAPC.js → chunk-S32NYQZZ.js} +369 -360
  149. package/dist/{chunk-KDKLT22F.js → chunk-S56NJ5LE.js} +2 -2
  150. package/dist/{chunk-HZGTUG23.js → chunk-SDAULIGH.js} +1 -1
  151. package/dist/{chunk-JQHNT45I.js → chunk-SQKDHGAD.js} +17 -17
  152. package/dist/{chunk-OQTSTW2G.js → chunk-SYPSS5UX.js} +6 -6
  153. package/dist/{chunk-5BDBPV6V.js → chunk-T7LGRFVD.js} +28 -28
  154. package/dist/{chunk-RA3TVBWK.js → chunk-TCIFQSMO.js} +1 -1
  155. package/dist/{chunk-E53MN24E.js → chunk-THOVQFPT.js} +9 -9
  156. package/dist/{chunk-THZXSH5O.js → chunk-TM5JJL6I.js} +11 -11
  157. package/dist/{chunk-R5DGXWOX.js → chunk-TW2XD4CT.js} +5 -5
  158. package/dist/{chunk-FR6J2NW5.js → chunk-U4N4DZS5.js} +3 -3
  159. package/dist/{chunk-EHLZJPGF.js → chunk-U4SGGO54.js} +24 -24
  160. package/dist/{chunk-YIO2LEBW.js → chunk-U4WFATJZ.js} +23 -23
  161. package/dist/{chunk-6ZQOYNTT.js → chunk-U57NQAE5.js} +46 -2
  162. package/dist/{chunk-X5IKLUFM.js → chunk-U7X3CZIL.js} +3 -3
  163. package/dist/chunk-UCLAXME7.js +34 -0
  164. package/dist/{chunk-LIRPXFA4.js → chunk-UCS7HXFX.js} +17 -17
  165. package/dist/{chunk-QBUHJ77Q.js → chunk-UDENIR6E.js} +18 -18
  166. package/dist/{chunk-S6JXYEG4.js → chunk-UDI4QI6D.js} +5 -5
  167. package/dist/{chunk-RNUHS433.js → chunk-ULRDKBHJ.js} +5 -5
  168. package/dist/{chunk-4Q6HX5GQ.js → chunk-UQRUMRB2.js} +1 -1
  169. package/dist/{chunk-GFMOU6YM.js → chunk-USPTS2HZ.js} +17 -17
  170. package/dist/{chunk-34COONQ2.js → chunk-V4B44XRC.js} +7 -7
  171. package/dist/{chunk-K7ICVNZ6.js → chunk-VBPHSKJI.js} +22 -22
  172. package/dist/{chunk-CW4OVNJF.js → chunk-VCEUC3GC.js} +10 -10
  173. package/dist/{chunk-VZM535M5.js → chunk-VCN6THJZ.js} +6 -6
  174. package/dist/{chunk-4M3OQM5V.js → chunk-VFQARMOE.js} +10 -10
  175. package/dist/{chunk-ZTF2NSQD.js → chunk-VG3NSHIA.js} +5 -5
  176. package/dist/{chunk-767WN7BP.js → chunk-VKVGHROQ.js} +3 -3
  177. package/dist/{chunk-THLOT563.js → chunk-VUUU7BOK.js} +22 -22
  178. package/dist/{chunk-S6IJNQFM.js → chunk-VXKPHJVK.js} +19 -19
  179. package/dist/{chunk-OAXCNACK.js → chunk-W5PMBPKI.js} +3 -3
  180. package/dist/{chunk-X3HFDWKA.js → chunk-W7CZCZPE.js} +1 -1
  181. package/dist/chunk-WAYZHK2C.js +48 -0
  182. package/dist/{chunk-ZPNRTY73.js → chunk-WC4Z3UHZ.js} +4 -4
  183. package/dist/{chunk-WOWEF5DL.js → chunk-WJ7BAWOR.js} +13 -13
  184. package/dist/{chunk-FT2E2DHW.js → chunk-WJK5WJLA.js} +1 -1
  185. package/dist/{chunk-ZNXTVNPY.js → chunk-WNEAZYEK.js} +19 -19
  186. package/dist/{chunk-WKVNT6DL.js → chunk-WPBI7LBA.js} +14 -14
  187. package/dist/{chunk-ZS2EZYOR.js → chunk-WPHKKINR.js} +4 -4
  188. package/dist/{chunk-QUHSKUDF.js → chunk-XDMYQ5RR.js} +27 -27
  189. package/dist/{chunk-MT6GHEH5.js → chunk-XFQKKNEF.js} +4 -4
  190. package/dist/{chunk-V5UZVS74.js → chunk-XYEMI627.js} +11 -11
  191. package/dist/{chunk-D6CUQIU3.js → chunk-YBWUVSAH.js} +20 -20
  192. package/dist/{chunk-4DRSRU4U.js → chunk-YCYAA4MB.js} +22 -22
  193. package/dist/{chunk-LNPS5GQ3.js → chunk-YECVNCO4.js} +9 -9
  194. package/dist/{chunk-UELYGLNG.js → chunk-YGEHNSJ4.js} +14 -14
  195. package/dist/{chunk-J347EH7F.js → chunk-YJI3S2YA.js} +5 -5
  196. package/dist/{chunk-OKLXZ35H.js → chunk-YLTOP7OS.js} +4 -4
  197. package/dist/{chunk-CXDUMI7E.js → chunk-YVHUKQ5U.js} +3 -3
  198. package/dist/{chunk-U24UW3SV.js → chunk-YZGYUMWJ.js} +11 -11
  199. package/dist/{chunk-DRA2V4R4.js → chunk-Z43VYNEY.js} +15 -15
  200. package/dist/{chunk-5BVNNYU7.js → chunk-ZGJVAHQC.js} +1 -1
  201. package/dist/{chunk-3ENG33LV.js → chunk-ZHMVB3YW.js} +3 -3
  202. package/dist/{chunk-64BU3UUE.js → chunk-ZMHOCHTY.js} +16 -16
  203. package/dist/{chunk-HFMLZFY4.js → chunk-ZQHFZ6WO.js} +6 -6
  204. package/dist/{chunk-2DFYLFBL.js → chunk-ZS2WLK7A.js} +17 -17
  205. package/dist/{chunk-7V3IIWMG.js → chunk-ZWIYJCW5.js} +23 -23
  206. package/dist/chunk-ZWY72UOG.js +45 -0
  207. package/dist/files.json +446 -438
  208. package/dist/packages/sdk/npm/index.js +56 -8
  209. package/package.json +5 -5
  210. package/dist/chunk-6VIQB6XT.js +0 -37
  211. package/dist/chunk-BUJJLQ7C.js +0 -41
  212. package/dist/chunk-FML6GOUB.js +0 -45
  213. package/dist/chunk-HEQ2YUFK.js +0 -43
  214. package/dist/chunk-JHISKJFN.js +0 -48
  215. package/dist/chunk-KLFPFMXV.js +0 -38
  216. package/dist/chunk-KSAKVVOA.js +0 -34
  217. package/dist/chunk-M5NKIQKM.js +0 -34
  218. package/dist/chunk-O23JP5EA.js +0 -54
  219. package/dist/chunk-WZEUA4PU.js +0 -54
  220. package/dist/chunk-XMRFYVBB.js +0 -41
@@ -30511,10 +30511,34 @@ var ASSISTANTS = [
30511
30511
  var AssistantId = external_exports.enum(ASSISTANTS);
30512
30512
  var STEP_CLASSES = ["read", "draft", "critic", "knowledge", "quick"];
30513
30513
  var StepClass = external_exports.enum(STEP_CLASSES);
30514
- var RUNTIME_SCHEMA_VERSION = 2;
30514
+ var RUNTIME_SCHEMA_VERSION = 3;
30515
+ var ConfiguredMode = external_exports.enum(["hand-off", "model", "headless-claude-code", "copilot-acp"]);
30516
+ var CopilotAcpSettings = external_exports.strictObject({
30517
+ command: external_exports.string().trim().min(1).optional(),
30518
+ model: StepModelId().optional(),
30519
+ maxTurns: external_exports.number().int().positive().max(5e3).optional(),
30520
+ timeoutMs: external_exports.number().int().min(1e4).max(24 * 60 * 6e4).optional()
30521
+ });
30522
+ function StepModelId() {
30523
+ return external_exports.string().min(1).regex(/^\S+$/, "a model id, without spaces");
30524
+ }
30525
+ var COPILOT_ACP_DEFAULTS = {
30526
+ command: "npx --yes @github/copilot-language-server",
30527
+ maxTurns: 200,
30528
+ timeoutMs: 30 * 6e4
30529
+ };
30530
+ function copilotAcpOf(runtime) {
30531
+ const c = runtime?.copilotAcp ?? {};
30532
+ return {
30533
+ command: c.command ?? COPILOT_ACP_DEFAULTS.command,
30534
+ ...c.model ? { model: c.model } : {},
30535
+ maxTurns: c.maxTurns ?? COPILOT_ACP_DEFAULTS.maxTurns,
30536
+ timeoutMs: c.timeoutMs ?? COPILOT_ACP_DEFAULTS.timeoutMs
30537
+ };
30538
+ }
30515
30539
  var StepModel = external_exports.string().min(1).regex(/^\S+$/, "a model name or vendor/family, without spaces");
30516
30540
  var RuntimeFields = external_exports.strictObject({
30517
- schemaVersion: external_exports.union([V2, external_exports.literal(RUNTIME_SCHEMA_VERSION)]),
30541
+ schemaVersion: external_exports.union([V2, external_exports.literal(2), external_exports.literal(RUNTIME_SCHEMA_VERSION)]),
30518
30542
  assistants: external_exports.strictObject({
30519
30543
  allowed: external_exports.array(AssistantId).min(1),
30520
30544
  default: AssistantId
@@ -30526,10 +30550,13 @@ var RuntimeFields = external_exports.strictObject({
30526
30550
  * don't hold a gate, AI buttons become guidance, and people write what agents would draft.
30527
30551
  */
30528
30552
  ai: external_exports.enum(["on", "text-only", "off"]).default("on"),
30529
- /** How AI steps run: hand-off to the assistant, a direct model call, or headless Claude Code. */
30553
+ /**
30554
+ * How AI steps run: hand-off to the assistant, a direct model call, headless Claude Code, or
30555
+ * (version 3, ADR 0171) Copilot driven unattended through its Agent Client Protocol.
30556
+ */
30530
30557
  modes: external_exports.strictObject({
30531
- allowed: external_exports.array(external_exports.enum(["hand-off", "model", "headless-claude-code"])).min(1),
30532
- default: external_exports.enum(["hand-off", "model", "headless-claude-code"])
30558
+ allowed: external_exports.array(ConfiguredMode).min(1),
30559
+ default: ConfiguredMode
30533
30560
  }).refine((m) => m.allowed.includes(m.default), "the default mode must be allowed").default({ allowed: ["hand-off"], default: "hand-off" }),
30534
30561
  models: external_exports.strictObject({
30535
30562
  allowed: external_exports.array(external_exports.string().min(1)).default([]),
@@ -30569,6 +30596,8 @@ var RuntimeFields = external_exports.strictObject({
30569
30596
  * the section and one with an empty section get the same defaults.
30570
30597
  */
30571
30598
  retrieval: RetrievalSettings.optional(),
30599
+ /** Version 3 (ADR 0171): how copilot-acp starts the Copilot language server. */
30600
+ copilotAcp: CopilotAcpSettings.optional(),
30572
30601
  /** Atticus sends no telemetry unless an organisation turns it on here. */
30573
30602
  telemetry: external_exports.strictObject({ enabled: external_exports.boolean().default(false) }).default({ enabled: false }),
30574
30603
  adapters: external_exports.strictObject({
@@ -30601,6 +30630,20 @@ var RuntimeFields = external_exports.strictObject({
30601
30630
  }).optional()
30602
30631
  });
30603
30632
  var Runtime = RuntimeFields.superRefine((r, ctx) => {
30633
+ if (r.schemaVersion < 3) {
30634
+ if ([...r.modes.allowed, r.modes.default].includes("copilot-acp"))
30635
+ ctx.addIssue({
30636
+ code: "custom",
30637
+ path: ["modes"],
30638
+ message: "copilot-acp needs schemaVersion 3 (ADR 0171): run atticus upgrade"
30639
+ });
30640
+ if (r.copilotAcp !== void 0)
30641
+ ctx.addIssue({
30642
+ code: "custom",
30643
+ path: ["copilotAcp"],
30644
+ message: "copilotAcp needs schemaVersion 3 (ADR 0171): run atticus upgrade"
30645
+ });
30646
+ }
30604
30647
  if (r.schemaVersion !== 1)
30605
30648
  return;
30606
30649
  for (const c of STEP_CLASSES)
@@ -31793,8 +31836,12 @@ function placeholderIn(s) {
31793
31836
  if (env)
31794
31837
  return { name: env[1], before: "", after: "" };
31795
31838
  const i = t.indexOf("${");
31796
- if (i < 0)
31797
- return void 0;
31839
+ if (i < 0) {
31840
+ const at3 = /@([A-Za-z_][A-Za-z0-9_.-]*)@/.exec(t);
31841
+ if (!at3)
31842
+ return void 0;
31843
+ return { name: at3[1], before: t.slice(0, at3.index), after: t.slice(at3.index + at3[0].length) };
31844
+ }
31798
31845
  let depth = 0;
31799
31846
  let j = i + 2;
31800
31847
  for (; j < t.length; j++) {
@@ -37423,7 +37470,14 @@ var EstateJoins = external_exports.strictObject({
37423
37470
 
37424
37471
  // packages/core/dist/schema/ai.js
37425
37472
  var AI_SCHEMA_VERSION = 1;
37426
- var RuntimeKind = external_exports.enum(["hand-off", "model", "headless-claude-code", "mock", "replay"]);
37473
+ var RuntimeKind = external_exports.enum([
37474
+ "hand-off",
37475
+ "model",
37476
+ "headless-claude-code",
37477
+ "copilot-acp",
37478
+ "mock",
37479
+ "replay"
37480
+ ]);
37427
37481
  var AgentInput = external_exports.union([
37428
37482
  ChangeArtifact,
37429
37483
  external_exports.enum([
@@ -37507,7 +37561,12 @@ var RunState = external_exports.enum([
37507
37561
  "failed",
37508
37562
  "cancelled"
37509
37563
  ]);
37510
- var RUN_SCHEMA_VERSION = 4;
37564
+ var RUN_SCHEMA_VERSION = 5;
37565
+ var RunAssistant = external_exports.strictObject({
37566
+ name: external_exports.string().min(1),
37567
+ version: external_exports.string().min(1).optional(),
37568
+ protocolVersion: external_exports.number().int().min(0).optional()
37569
+ });
37511
37570
  var RunRetrieval = external_exports.strictObject({
37512
37571
  expansion: external_exports.strictObject({
37513
37572
  run: external_exports.string().min(1).optional(),
@@ -37586,13 +37645,15 @@ var RunSummary = external_exports.strictObject({
37586
37645
  * Claude Code was given, or the editor's model a hand-off was answered with (`atticus handoff
37587
37646
  * done --model`). Left out when nothing said which.
37588
37647
  */
37589
- model: external_exports.string().min(1).optional()
37648
+ model: external_exports.string().min(1).optional(),
37649
+ /** The assistant program it talked to (version 5, ADR 0171), when the runtime drives one. */
37650
+ assistant: RunAssistant.optional()
37590
37651
  });
37591
37652
  function migrateRunSummary(raw) {
37592
37653
  if (typeof raw !== "object" || raw === null)
37593
37654
  return raw;
37594
37655
  const r = raw;
37595
- return r.schemaVersion === 1 || r.schemaVersion === 2 || r.schemaVersion === 3 ? { ...r, schemaVersion: RUN_SCHEMA_VERSION } : raw;
37656
+ return r.schemaVersion === 1 || r.schemaVersion === 2 || r.schemaVersion === 3 || r.schemaVersion === 4 ? { ...r, schemaVersion: RUN_SCHEMA_VERSION } : raw;
37596
37657
  }
37597
37658
  var readRunSummary = (raw) => RunSummary.safeParse(migrateRunSummary(raw));
37598
37659
  var Recording = external_exports.strictObject({
@@ -42712,6 +42773,13 @@ function stripMeta(s) {
42712
42773
  import { createHash as createHash5 } from "node:crypto";
42713
42774
  var DECLARED_TOPIC = "declared-topic";
42714
42775
  var short = (s, n = 6) => createHash5("sha256").update(s).digest("hex").slice(0, n);
42776
+ var MAX_RECORD_ID = 120;
42777
+ var fitRecordId = (id) => {
42778
+ if (id.length <= MAX_RECORD_ID)
42779
+ return id;
42780
+ const hash2 = createHash5("sha256").update(id, "utf8").digest("hex").slice(0, 16);
42781
+ return `${id.slice(0, MAX_RECORD_ID - hash2.length - 1).replace(/[-._]+$/, "")}.${hash2}`;
42782
+ };
42715
42783
  var evKey = (e) => `${e.repo ?? ""}|${e.path ?? ""}|${e.line ?? ""}|${e.side ?? ""}|${e.source}`;
42716
42784
  function unionEvidence(...lists) {
42717
42785
  const seen = /* @__PURE__ */ new Map();
@@ -43264,6 +43332,32 @@ function mergeCatalog(input2) {
43264
43332
  out.push(l);
43265
43333
  inOut.add(l);
43266
43334
  }
43335
+ const long = /* @__PURE__ */ new Map();
43336
+ for (const r of out)
43337
+ if (r.id.length > MAX_RECORD_ID)
43338
+ long.set(r.id, fitRecordId(r.id));
43339
+ if (long.size) {
43340
+ const swap = (v) => {
43341
+ if (typeof v === "string") {
43342
+ const exact = long.get(v);
43343
+ if (exact)
43344
+ return exact;
43345
+ if (v.length > MAX_RECORD_ID) {
43346
+ for (const [from, to] of long)
43347
+ if (v.startsWith(`${from}.`))
43348
+ return fitRecordId(to + v.slice(from.length));
43349
+ }
43350
+ return v;
43351
+ }
43352
+ if (Array.isArray(v))
43353
+ return v.map(swap);
43354
+ if (v && typeof v === "object")
43355
+ return Object.fromEntries(Object.entries(v).map(([k, x]) => [k, swap(x)]));
43356
+ return v;
43357
+ };
43358
+ for (let i = 0; i < out.length; i++)
43359
+ out[i] = swap(out[i]);
43360
+ }
43267
43361
  const invalid = [];
43268
43362
  const records = [];
43269
43363
  const seen = /* @__PURE__ */ new Set();
@@ -43716,10 +43810,31 @@ function migrateRuntimeText(text5) {
43716
43810
  const line = /^schemaVersion:[ \t]*1[ \t]*(#.*)?$/m;
43717
43811
  if (line.test(text5))
43718
43812
  return {
43719
- text: text5.replace(line, (_m, c) => `schemaVersion: ${RUNTIME_SCHEMA_VERSION}${c ? ` ${c}` : ""}`),
43813
+ text: text5.replace(line, (_m, c) => `schemaVersion: 2${c ? ` ${c}` : ""}`),
43814
+ changed: true
43815
+ };
43816
+ doc.set("schemaVersion", 2);
43817
+ return { text: doc.toString(), changed: true };
43818
+ }
43819
+ function namesCopilotAcp(doc) {
43820
+ const js = doc.toJS() ?? {};
43821
+ const allowed = Array.isArray(js.modes?.allowed) ? js.modes.allowed : [];
43822
+ return js.copilotAcp !== void 0 || allowed.includes("copilot-acp") || js.modes?.default === "copilot-acp";
43823
+ }
43824
+ function migrateRuntimeV3Text(text5) {
43825
+ const doc = (0, import_yaml13.parseDocument)(text5);
43826
+ if (doc.errors.length || !(0, import_yaml13.isMap)(doc.contents))
43827
+ return { text: text5, changed: false };
43828
+ const v = doc.get("schemaVersion");
43829
+ if (v !== 1 && v !== 2 || !namesCopilotAcp(doc))
43830
+ return { text: text5, changed: false };
43831
+ const line = /^schemaVersion:[ \t]*[12][ \t]*(#.*)?$/m;
43832
+ if (line.test(text5))
43833
+ return {
43834
+ text: text5.replace(line, (_m, c) => `schemaVersion: 3${c ? ` ${c}` : ""}`),
43720
43835
  changed: true
43721
43836
  };
43722
- doc.set("schemaVersion", RUNTIME_SCHEMA_VERSION);
43837
+ doc.set("schemaVersion", 3);
43723
43838
  return { text: doc.toString(), changed: true };
43724
43839
  }
43725
43840
 
@@ -45927,6 +46042,9 @@ export {
45927
46042
  STEP_CLASSES,
45928
46043
  StepClass,
45929
46044
  RUNTIME_SCHEMA_VERSION,
46045
+ CopilotAcpSettings,
46046
+ COPILOT_ACP_DEFAULTS,
46047
+ copilotAcpOf,
45930
46048
  Runtime,
45931
46049
  stepModelsOf,
45932
46050
  SkillMeta,
@@ -46280,6 +46398,7 @@ export {
46280
46398
  ContextPackManifest,
46281
46399
  RunState,
46282
46400
  RUN_SCHEMA_VERSION,
46401
+ RunAssistant,
46283
46402
  RunRetrieval,
46284
46403
  ToolDefinition,
46285
46404
  ToolCallRecord,
@@ -46324,6 +46443,7 @@ export {
46324
46443
  openApiDocument,
46325
46444
  api_exports,
46326
46445
  DECLARED_TOPIC,
46446
+ fitRecordId,
46327
46447
  endpointId,
46328
46448
  mergeCatalog,
46329
46449
  MESH_KEY,
@@ -46335,6 +46455,7 @@ export {
46335
46455
  migrateChangeTypesText,
46336
46456
  migrateSourcesText,
46337
46457
  migrateRuntimeText,
46458
+ migrateRuntimeV3Text,
46338
46459
  migrateRolesText,
46339
46460
  mapAtOnce,
46340
46461
  readParsedFiles,
@@ -3,30 +3,35 @@ import { fileURLToPath as __atticusFileURLToPath } from "node:url";
3
3
  var require = __atticusCreateRequire(import.meta.url);
4
4
  var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
5
5
  var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
+ import {
7
+ copilotAcpAllowed,
8
+ copilotAcpByDefault,
9
+ readWrites
10
+ } from "./chunk-F7EHN4CC.js";
6
11
  import {
7
12
  mapCommand,
8
13
  mapStateOf
9
- } from "./chunk-S4EGGQZB.js";
14
+ } from "./chunk-EJJONXPS.js";
10
15
  import {
11
16
  factsRepos,
12
17
  verifyCommand
13
- } from "./chunk-TDKSKJU3.js";
18
+ } from "./chunk-5WBRQSLJ.js";
14
19
  import {
15
20
  plannedTopUp,
16
21
  recordRulesNow,
17
22
  ruleSetsOfFiles
18
- } from "./chunk-ZJDOYEW4.js";
19
- import "./chunk-KLROTB6N.js";
20
- import "./chunk-GGBEM27J.js";
23
+ } from "./chunk-OKXRQPQF.js";
24
+ import "./chunk-L2EHYZCH.js";
25
+ import "./chunk-GAK5KDYV.js";
21
26
  import {
22
27
  estateFreshness
23
- } from "./chunk-M2U3IZ54.js";
28
+ } from "./chunk-3JOHZDKD.js";
24
29
  import {
25
30
  onboardingQueue
26
- } from "./chunk-UGMJ3Z35.js";
27
- import "./chunk-IPB6EKUH.js";
28
- import "./chunk-HFMLZFY4.js";
29
- import "./chunk-LNPS5GQ3.js";
31
+ } from "./chunk-IF6UROTX.js";
32
+ import "./chunk-FMGMRFEH.js";
33
+ import "./chunk-ZQHFZ6WO.js";
34
+ import "./chunk-YECVNCO4.js";
30
35
  import {
31
36
  checkoutOf,
32
37
  conventionsAt,
@@ -35,11 +40,11 @@ import {
35
40
  loadReadPlan,
36
41
  partUnaccounted,
37
42
  readPlanProgress
38
- } from "./chunk-WMCKOZFT.js";
39
- import "./chunk-PPCCFZG7.js";
40
- import "./chunk-2UPMPTNJ.js";
41
- import "./chunk-C43X7Y7O.js";
42
- import "./chunk-PURVXI7L.js";
43
+ } from "./chunk-6TY7S6Y6.js";
44
+ import "./chunk-QQIZGLRA.js";
45
+ import "./chunk-5GQHLNZB.js";
46
+ import "./chunk-3ODHCYOG.js";
47
+ import "./chunk-KEOTTRK2.js";
43
48
  import {
44
49
  isMetarepo,
45
50
  notMetarepo
@@ -49,28 +54,29 @@ import {
49
54
  assistantTier,
50
55
  readProbes,
51
56
  rulesLacking
52
- } from "./chunk-R2A6DAPC.js";
57
+ } from "./chunk-S32NYQZZ.js";
53
58
  import "./chunk-VOGCSYOI.js";
54
59
  import {
55
60
  estateRepos,
56
61
  productionRepos
57
- } from "./chunk-E53MN24E.js";
58
- import "./chunk-ZUCJCBS5.js";
62
+ } from "./chunk-THOVQFPT.js";
63
+ import "./chunk-J422SCUS.js";
59
64
  import {
60
65
  dirSource,
61
66
  sameCommit,
62
67
  sessionTokensFor
63
- } from "./chunk-DLSPFAC5.js";
64
- import "./chunk-ZS2EZYOR.js";
65
- import "./chunk-KDKLT22F.js";
66
- import "./chunk-UA4DLNV7.js";
67
- import "./chunk-OV3WHHRI.js";
68
- import "./chunk-AQPK22BH.js";
69
- import "./chunk-5WJCV6ED.js";
70
- import "./chunk-FT2E2DHW.js";
68
+ } from "./chunk-N35OSYIU.js";
69
+ import "./chunk-WPHKKINR.js";
70
+ import "./chunk-S56NJ5LE.js";
71
+ import "./chunk-4HAYYEFB.js";
72
+ import "./chunk-RAFD4MYO.js";
73
+ import "./chunk-HGNJNPMB.js";
74
+ import "./chunk-LRO3Y2XQ.js";
75
+ import "./chunk-WJK5WJLA.js";
71
76
  import {
77
+ AcpSignInError,
72
78
  currentPromptLimit
73
- } from "./chunk-E52MNV5B.js";
79
+ } from "./chunk-K4J4Z37A.js";
74
80
  import {
75
81
  factsDirOf,
76
82
  factsRelOf,
@@ -80,7 +86,7 @@ import {
80
86
  orgPackDirOf,
81
87
  parseFacts,
82
88
  require_dist
83
- } from "./chunk-LZABEKI6.js";
89
+ } from "./chunk-BH5DMXG5.js";
84
90
  import {
85
91
  ensureLocalIgnore,
86
92
  writeFileAtomic
@@ -414,7 +420,7 @@ function planLines(plan) {
414
420
  const parts = reading.reduce((n, i) => n + i.parts.length, 0);
415
421
  const planned = reading.reduce((n, i) => n + Math.max(i.total, i.parts.length), 0);
416
422
  const tokens = reading.reduce((n, i) => n + i.tokens, 0);
417
- out.push(`The estate at ${tokensText(plan.limit)} tokens a prompt (${plan.limitFrom === "flag" ? "--max-tokens" : plan.limitFrom === "probe" ? "the limit atticus probe measured" : "runtime.yaml's maxInput"}), ${plan.mode === "model" ? "read by runtime.yaml's model, unattended" : "read by Copilot Chat in agent mode: you paste one line per part"}:`);
423
+ out.push(`The estate at ${tokensText(plan.limit)} tokens a prompt (${plan.limitFrom === "flag" ? "--max-tokens" : plan.limitFrom === "probe" ? "the limit atticus probe measured" : "runtime.yaml's maxInput"}), ${plan.mode === "model" ? "read by runtime.yaml's model, unattended" : plan.mode === "copilot-acp" ? "read by GitHub Copilot through its Agent Client Protocol, unattended: one new session per part" : "read by Copilot Chat in agent mode: you paste one line per part"}:`);
418
424
  plan.items.forEach((i, n) => {
419
425
  const head = ` ${n + 1}. ${i.repo}${i.prototype ? " (prototype: read, never joined)" : ""}`;
420
426
  if (i.kind === "carry" || i.kind === "rules" && !i.parts.length)
@@ -565,7 +571,12 @@ async function mapAllCommand(root, o, io, deps = {}) {
565
571
  }
566
572
  const limit = lim.limit;
567
573
  const allowed = modelModeAllowed(op);
568
- const mode = o.mode ?? (allowed ? "model" : "copilot");
574
+ const mode = o.mode ?? (copilotAcpByDefault(op) ? "copilot-acp" : allowed ? "model" : "copilot");
575
+ if (mode === "copilot-acp" && !copilotAcpAllowed(op) && !deps.acp) {
576
+ io.err("runtime.yaml doesn't allow copilot-acp here (schemaVersion 3, copilot-acp in modes.allowed and copilot in assistants.allowed): map the estate through Copilot Chat (atticus map --all without --mode copilot-acp), or ask for it in a pull request (ADR 0171).");
577
+ return 2;
578
+ }
579
+ const stateMode = mode === "model" ? "model" : "copilot";
569
580
  if (mode === "model" && !allowed && !deps.runtime) {
570
581
  io.err("runtime.yaml doesn't allow model mode with a provider here: map the estate through Copilot (atticus map --all without --mode model).");
571
582
  return 2;
@@ -579,7 +590,7 @@ async function mapAllCommand(root, o, io, deps = {}) {
579
590
  return 2;
580
591
  }
581
592
  let state = await readMapAllState(root);
582
- if (state && (state.gaps !== !!o.gaps || state.mode !== mode))
593
+ if (state && (state.gaps !== !!o.gaps || state.mode !== stateMode))
583
594
  state = void 0;
584
595
  const plan = await planEstate(root, op, o, { limit: lim.limit, limitFrom: lim.from, mode, ...deps.git ? { git: deps.git } : {} }, state);
585
596
  if (typeof plan === "string") {
@@ -599,7 +610,7 @@ async function mapAllCommand(root, o, io, deps = {}) {
599
610
  const st = state ?? {
600
611
  schemaVersion: 1,
601
612
  updatedAt: "",
602
- mode,
613
+ mode: stateMode,
603
614
  gaps: !!o.gaps,
604
615
  repos: {}
605
616
  };
@@ -648,6 +659,7 @@ async function mapAllCommand(root, o, io, deps = {}) {
648
659
  };
649
660
  let quit = false;
650
661
  let capHit = false;
662
+ let signIn = false;
651
663
  let runtime;
652
664
  const items = plan.items;
653
665
  for (const [n, item] of items.entries()) {
@@ -687,6 +699,18 @@ async function mapAllCommand(root, o, io, deps = {}) {
687
699
  }
688
700
  continue;
689
701
  }
702
+ if (mode === "copilot-acp") {
703
+ for (const part of item.parts) {
704
+ if (quit || stopped() || capHit)
705
+ break;
706
+ const end = await acpPart(item, part, where);
707
+ if (end === "quit")
708
+ quit = true;
709
+ if (end === "cap")
710
+ capHit = true;
711
+ }
712
+ continue;
713
+ }
690
714
  for (const part of item.parts) {
691
715
  if (quit || stopped())
692
716
  break;
@@ -701,7 +725,7 @@ async function mapAllCommand(root, o, io, deps = {}) {
701
725
  if (interrupted) {
702
726
  if (!idleStop) {
703
727
  io.out("");
704
- io.out(capHit ? `Stopped at the cap (${o.maxParts !== void 0 ? `--max-parts ${o.maxParts}` : ""}${o.maxParts !== void 0 && o.budgetTokens !== void 0 ? ", " : ""}${o.budgetTokens !== void 0 ? `--budget-tokens ${o.budgetTokens}` : ""}): ${plural(totals.spent.prompts, "prompt")} run. atticus map --all carries on from here.` : "Stopped. Where the estate stands is saved: atticus map --all carries on from here.");
728
+ io.out(capHit ? `Stopped at the cap (${o.maxParts !== void 0 ? `--max-parts ${o.maxParts}` : ""}${o.maxParts !== void 0 && o.budgetTokens !== void 0 ? ", " : ""}${o.budgetTokens !== void 0 ? `--budget-tokens ${o.budgetTokens}` : ""}): ${plural(totals.spent.prompts, mode === "copilot-acp" ? "session" : "prompt")} run. atticus map --all carries on from here.` : "Stopped. Where the estate stands is saved: atticus map --all carries on from here.");
705
729
  }
706
730
  } else if (totals.parts || totals.repos.size) {
707
731
  io.out("");
@@ -725,7 +749,7 @@ async function mapAllCommand(root, o, io, deps = {}) {
725
749
  }
726
750
  await save();
727
751
  await summary(interrupted);
728
- return 0;
752
+ return signIn ? 1 : 0;
729
753
  async function copilotPart(item, part, where) {
730
754
  const ps = partState(item, part.part);
731
755
  const nth = item.parts.indexOf(part) + 1;
@@ -922,6 +946,83 @@ async function mapAllCommand(root, o, io, deps = {}) {
922
946
  io.out(copied ? "The line is on your clipboard." : "Copy the line above (no clipboard tool here).");
923
947
  io.out("Waiting for the facts it writes. s + Enter skips this part, r + Enter verifies what is there and gives the line again for what's left, q + Enter (or Ctrl+C) stops; atticus map --all carries on.");
924
948
  }
949
+ function overCap() {
950
+ return o.maxParts !== void 0 && totals.spent.prompts >= o.maxParts || o.budgetTokens !== void 0 && totals.spent.tokens >= o.budgetTokens;
951
+ }
952
+ async function acpPart(item, part, where) {
953
+ const ps = partState(item, part.part);
954
+ const label = item.total > 1 ? `part ${part.part} of ${item.total}` : "one session";
955
+ const progress = item.total > 1 ? await readPlanProgress(root, item.repo) : void 0;
956
+ const first0 = item.kind === "rules" ? await rulesLine(item) : item.kind === "gaps" ? await gapsLine(item) : item.force ? forceLine(item, part) : ps.retries > 0 || progress?.next && progress.next.part !== part.part ? await restLine(item, part) ?? `/atticus-map ${item.repo}` : `/atticus-map ${item.repo}`;
957
+ if (first0 === void 0) {
958
+ io.out(`${item.repo}: no gaps left; nothing to read.`);
959
+ return finishPart(item, part, ps);
960
+ }
961
+ if (first0 === "done")
962
+ return finishPart(item, part, ps);
963
+ let line = first0;
964
+ const runner = deps.acp ?? await deps.makeAcp?.();
965
+ if (!runner) {
966
+ io.err("No Copilot session runner: copilot-acp needs runtime.yaml's copilotAcp.");
967
+ return "quit";
968
+ }
969
+ for (let attempt = 0; attempt < 2; attempt++) {
970
+ if (stopped())
971
+ break;
972
+ if (overCap())
973
+ return "cap";
974
+ io.out("");
975
+ io.out(`===== ${item.repo}, ${item.kind === "gaps" ? "the gaps pass" : item.kind === "rules" ? "the rules top-up" : label} (${where})${attempt ? ", given again in a new session" : ""} =====`);
976
+ io.out(`In a NEW Copilot session (copilot-acp): ${line}`);
977
+ const base = item.force ? await writtenOf(root, item.repo) : "";
978
+ const first = await snapOf(root, item.repo);
979
+ totals.spent.prompts++;
980
+ try {
981
+ const r = await runner({
982
+ line,
983
+ change: `map-${item.repo}`,
984
+ writeRoots: readWrites(root),
985
+ ...deps.signal ? { signal: deps.signal } : {},
986
+ onProgress: io.out
987
+ });
988
+ totals.spent.tokens += r.usage ? r.usage.inputTokens + r.usage.outputTokens : part.tokens;
989
+ io.out(`The session ended (${r.stopped ?? r.stopReason}).`);
990
+ } catch (e) {
991
+ if (e instanceof AcpSignInError) {
992
+ io.err(e.message);
993
+ signIn = true;
994
+ ps.state = "incomplete";
995
+ await save();
996
+ return "quit";
997
+ }
998
+ totals.spent.tokens += part.tokens;
999
+ io.out(`${item.repo} ${label}: the Copilot session failed: ${firstLine(e)}`);
1000
+ }
1001
+ if (stopped())
1002
+ break;
1003
+ const wrote = item.force ? await writtenOf(root, item.repo) !== base : void 0;
1004
+ const v = existsSync(join(factsDirOf(root), `${item.repo}.jsonl`)) ? await verifyStep(item) : void 0;
1005
+ const after = await snapOf(root, item.repo);
1006
+ if (v && !v.rejected && await covered(root, item, part, first, after, v.coverage.unknown, wrote))
1007
+ return finishPart(item, part, ps);
1008
+ if (attempt > 0)
1009
+ break;
1010
+ ps.retries++;
1011
+ await save();
1012
+ const rest = item.kind === "rules" ? await rulesLine(item) : item.kind === "gaps" ? await gapsLine(item) : item.force ? forceLine(item, part) : await restLine(item, part);
1013
+ if (rest === "done" || rest === void 0 && item.kind === "gaps")
1014
+ return finishPart(item, part, ps);
1015
+ line = rest ?? `/atticus-map ${item.repo}`;
1016
+ io.out(`${item.repo} ${label} isn't accounted for yet${v?.rejected ? ` (${plural(v.rejected, "fact")} rejected)` : ""}: one more try in a NEW session with only what is left (${line}).`);
1017
+ }
1018
+ ps.state = "incomplete";
1019
+ await save();
1020
+ if (stopped())
1021
+ return "quit";
1022
+ io.out(`${item.repo} ${label}: still not accounted for after a second session; moving on. atticus map --all carries on from here.`);
1023
+ totals.ends.push(endOf(item, part, "incomplete"));
1024
+ return "incomplete";
1025
+ }
925
1026
  async function modelRead(item, where, rt) {
926
1027
  io.out("");
927
1028
  io.out(item.kind === "rules" ? `===== ${item.repo} (${where}): topping up on the model for the reading rules added since it was read (${(item.sets ?? []).join(", ")}) =====` : `===== ${item.repo} (${where}): ${item.kind === "reread" ? "re-reading what changed" : "reading"} on the model, ${plural(item.batches ?? 0, "prompt")} =====`);
@@ -991,7 +1092,7 @@ async function mapAllCommand(root, o, io, deps = {}) {
991
1092
  const open = (await listQuestions(root, { state: "open" }).catch(() => ({ questions: [] }))).questions.length;
992
1093
  const rejected = [...totals.rejected.values()].reduce((n, x) => n + x, 0);
993
1094
  io.out("");
994
- io.out(`${interrupted2 ? "So far" : "Done"}: ${plural(totals.repos.size, "repo")} read, ${plural(totals.parts, "part")}${mode === "model" ? ` (${plural(totals.spent.prompts, "prompt")})` : ""}; ${plural(rejected, "fact")} rejected; links +${totals.added} -${totals.removed}; ${plural(open, "question")} open.`);
1095
+ io.out(`${interrupted2 ? "So far" : "Done"}: ${plural(totals.repos.size, "repo")} read, ${plural(totals.parts, "part")}${mode === "model" ? ` (${plural(totals.spent.prompts, "prompt")})` : mode === "copilot-acp" ? ` (${plural(totals.spent.prompts, "session")})` : ""}; ${plural(rejected, "fact")} rejected; links +${totals.added} -${totals.removed}; ${plural(open, "question")} open.`);
995
1096
  const left = totals.ends.filter((e) => e.end !== "done");
996
1097
  if (left.length) {
997
1098
  io.out("Not finished:");
@@ -6,21 +6,21 @@ var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
6
  import {
7
7
  buildDigest,
8
8
  digestCommand
9
- } from "./chunk-VZM535M5.js";
10
- import "./chunk-JTI3FKGI.js";
11
- import "./chunk-PI6KNUBW.js";
12
- import "./chunk-24ARIOB7.js";
13
- import "./chunk-4Q6HX5GQ.js";
14
- import "./chunk-E53MN24E.js";
15
- import "./chunk-ZUCJCBS5.js";
16
- import "./chunk-DLSPFAC5.js";
17
- import "./chunk-ZS2EZYOR.js";
18
- import "./chunk-KDKLT22F.js";
19
- import "./chunk-UA4DLNV7.js";
20
- import "./chunk-5WJCV6ED.js";
21
- import "./chunk-FT2E2DHW.js";
22
- import "./chunk-E52MNV5B.js";
23
- import "./chunk-LZABEKI6.js";
9
+ } from "./chunk-VCN6THJZ.js";
10
+ import "./chunk-OE3ECGHN.js";
11
+ import "./chunk-NRJC7XTD.js";
12
+ import "./chunk-7HX7LQ66.js";
13
+ import "./chunk-UQRUMRB2.js";
14
+ import "./chunk-THOVQFPT.js";
15
+ import "./chunk-J422SCUS.js";
16
+ import "./chunk-N35OSYIU.js";
17
+ import "./chunk-WPHKKINR.js";
18
+ import "./chunk-S56NJ5LE.js";
19
+ import "./chunk-4HAYYEFB.js";
20
+ import "./chunk-LRO3Y2XQ.js";
21
+ import "./chunk-WJK5WJLA.js";
22
+ import "./chunk-K4J4Z37A.js";
23
+ import "./chunk-BH5DMXG5.js";
24
24
  import "./chunk-MMB2OHUY.js";
25
25
  import "./chunk-TV45EUGM.js";
26
26
  export {
@@ -9,7 +9,7 @@ import {
9
9
  matrixMarkdown,
10
10
  traceMatrix,
11
11
  writeTraceFindings
12
- } from "./chunk-CAH7L2QH.js";
12
+ } from "./chunk-2JQ2SCX7.js";
13
13
  import {
14
14
  table
15
15
  } from "./chunk-VOGCSYOI.js";
@@ -18,14 +18,14 @@ import {
18
18
  readDataChanges,
19
19
  readHops,
20
20
  reviewedGates
21
- } from "./chunk-JTI3FKGI.js";
21
+ } from "./chunk-OE3ECGHN.js";
22
22
  import {
23
23
  assess,
24
24
  changeFolder,
25
25
  changeStore,
26
26
  checkFindings,
27
27
  loadChangeContext
28
- } from "./chunk-PI6KNUBW.js";
28
+ } from "./chunk-NRJC7XTD.js";
29
29
  import {
30
30
  GlossaryError,
31
31
  aliasDecision,
@@ -37,28 +37,28 @@ import {
37
37
  resolveTermId,
38
38
  scanGlossary,
39
39
  writeDecisions
40
- } from "./chunk-E53MN24E.js";
40
+ } from "./chunk-THOVQFPT.js";
41
41
  import {
42
42
  BUILT_IN_EXTRACTORS,
43
43
  SHIPPED_DIALECTS_DIR,
44
44
  dialectExtractor,
45
45
  loadShippedDialects,
46
46
  runDialectTests
47
- } from "./chunk-UA4DLNV7.js";
47
+ } from "./chunk-4HAYYEFB.js";
48
48
  import {
49
49
  baseClonePath,
50
50
  checkoutState,
51
51
  createGit,
52
52
  readChangeRepos
53
- } from "./chunk-5WJCV6ED.js";
53
+ } from "./chunk-LRO3Y2XQ.js";
54
54
  import {
55
55
  DEFAULT_IGNORES,
56
56
  fsRepo,
57
57
  scanRepo
58
- } from "./chunk-FT2E2DHW.js";
58
+ } from "./chunk-WJK5WJLA.js";
59
59
  import {
60
60
  runtimeForCli
61
- } from "./chunk-E52MNV5B.js";
61
+ } from "./chunk-K4J4Z37A.js";
62
62
  import {
63
63
  catalogDirOf,
64
64
  external_exports,
@@ -67,7 +67,7 @@ import {
67
67
  normalizePath,
68
68
  orgPackDirOf,
69
69
  require_dist
70
- } from "./chunk-LZABEKI6.js";
70
+ } from "./chunk-BH5DMXG5.js";
71
71
  import {
72
72
  __toESM
73
73
  } from "./chunk-TV45EUGM.js";