@iowarp/clio-coder 0.5.1 → 0.5.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 (263) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/CHANGELOG.md +24 -0
  3. package/CONTRIBUTING.md +9 -0
  4. package/README.md +3 -3
  5. package/ROADMAP.md +30 -5
  6. package/dist/{acp-X3N7JDGS.js → acp-F6PGOFZ4.js} +2 -2
  7. package/dist/{agents-UYGSMAWR.js → agents-ZHP4R6EX.js} +22 -21
  8. package/dist/assets/codewiki.json +1 -1
  9. package/dist/{auth-CEDCO6O6.js → auth-N75U2H3Z.js} +4 -4
  10. package/dist/{chunk-DGMY2DWE.js → chunk-23UIXH6Z.js} +3 -3
  11. package/dist/{chunk-QTYRMBW6.js → chunk-36XVK5P5.js} +5 -5
  12. package/dist/{chunk-BIQLF3NZ.js → chunk-3DZ4LPLS.js} +6 -6
  13. package/dist/{chunk-7VNLPEUG.js → chunk-3GSPCWFX.js} +12 -12
  14. package/dist/{chunk-CRHPCPZP.js → chunk-4KC4CHKJ.js} +2 -2
  15. package/dist/{chunk-M5FPIZQW.js → chunk-4WJBWKMI.js} +2 -2
  16. package/dist/{chunk-KBUTSJSR.js → chunk-4XBYHXGK.js} +2 -2
  17. package/dist/{chunk-6W75D37F.js → chunk-53P775GE.js} +6 -3
  18. package/dist/{chunk-XZWSP67B.js → chunk-5APYAXCB.js} +2 -2
  19. package/dist/{chunk-A7G7OUND.js → chunk-67HPYNTJ.js} +2 -2
  20. package/dist/{chunk-5JQR5B4D.js → chunk-6KV4KCQZ.js} +4 -4
  21. package/dist/{chunk-V4XJWDHR.js → chunk-6UKFRTXI.js} +2 -1
  22. package/dist/{chunk-NDPF2N2L.js → chunk-7DW7CJW2.js} +2 -2
  23. package/dist/{chunk-5KQEUIWM.js → chunk-7LUEQODV.js} +4 -4
  24. package/dist/{chunk-LNOXCGN2.js → chunk-7UFDIOBT.js} +3 -3
  25. package/dist/{chunk-DXSETN72.js → chunk-7WUGNN43.js} +2 -2
  26. package/dist/{chunk-GW2KVAVI.js → chunk-AA3GRZWS.js} +2 -2
  27. package/dist/{chunk-6B76U65H.js → chunk-ADO3OQIC.js} +3 -3
  28. package/dist/{chunk-UX2L5CUD.js → chunk-AI36V3ON.js} +3 -3
  29. package/dist/{chunk-B7GY6QER.js → chunk-B26OUMJW.js} +2 -2
  30. package/dist/{chunk-LAR7DX5E.js → chunk-B5TASTCK.js} +153 -62
  31. package/dist/{chunk-TGWZXJ7L.js → chunk-BEMQK5Q7.js} +92 -84
  32. package/dist/{chunk-RNDCROSG.js → chunk-CNXU7TR2.js} +3 -3
  33. package/dist/{chunk-AKQ3N3L4.js → chunk-CVMUXT64.js} +35 -66
  34. package/dist/{chunk-733ZBT5P.js → chunk-E74MJF6G.js} +4 -4
  35. package/dist/{chunk-T2MDZES3.js → chunk-EBMTBE76.js} +3 -3
  36. package/dist/{chunk-OZ76TLGU.js → chunk-EEITU7S6.js} +2 -2
  37. package/dist/{chunk-7KI4ZSEB.js → chunk-ELDJWJKM.js} +97 -14
  38. package/dist/{chunk-GCQFN7YI.js → chunk-EMYEQLWO.js} +2 -2
  39. package/dist/{chunk-7FHSA7VB.js → chunk-EQPFEDFV.js} +222 -127
  40. package/dist/{chunk-TDGYTWM6.js → chunk-F4I3H56H.js} +2 -2
  41. package/dist/chunk-F6KCJO3U.js +523 -0
  42. package/dist/{chunk-FGSQHUCK.js → chunk-F6VKWTTY.js} +5 -5
  43. package/dist/{chunk-UJD5MPP6.js → chunk-FLNXQQ5B.js} +2 -2
  44. package/dist/{chunk-GGEEG7CD.js → chunk-FOSRJ2VZ.js} +4 -4
  45. package/dist/{chunk-ZARZ4POR.js → chunk-G5ZDQQE3.js} +3 -3
  46. package/dist/{chunk-QM7HFPQQ.js → chunk-G62JBPXN.js} +7 -7
  47. package/dist/{chunk-ZJPORZTC.js → chunk-GIAI7A2K.js} +2 -2
  48. package/dist/chunk-GPTR6OTU.js +2551 -0
  49. package/dist/{chunk-EZD2BXGP.js → chunk-GUFQPTQK.js} +2 -2
  50. package/dist/{chunk-OPD7GL6F.js → chunk-H6FQVNZC.js} +8 -7
  51. package/dist/chunk-H7REJ7L5.js +80 -0
  52. package/dist/{chunk-EYTLV3W3.js → chunk-HTWTORF7.js} +2 -2
  53. package/dist/{chunk-DF6PI6GN.js → chunk-I6UKQPGS.js} +3 -3
  54. package/dist/{chunk-ISHUS7HC.js → chunk-JRW236JT.js} +3 -3
  55. package/dist/{chunk-DE2LU267.js → chunk-KKAJGT3B.js} +3 -2
  56. package/dist/{chunk-OV62D6KO.js → chunk-KQMYL5GR.js} +3 -3
  57. package/dist/{chunk-WAISUJNQ.js → chunk-KWMFC7FN.js} +3 -3
  58. package/dist/{chunk-4D7QM7S5.js → chunk-LXYHCCIZ.js} +9 -9
  59. package/dist/{chunk-NFSK2VNU.js → chunk-LZMTVVN4.js} +2 -2
  60. package/dist/{chunk-ZNTGRDFA.js → chunk-M5PMRZSR.js} +123 -37
  61. package/dist/chunk-MMZMM6SW.js +131 -0
  62. package/dist/{chunk-FFYTC2KQ.js → chunk-MNABNEBX.js} +2 -2
  63. package/dist/{chunk-XMDBTYCH.js → chunk-N3CWOGVF.js} +3 -3
  64. package/dist/{chunk-VYRQHORQ.js → chunk-NMQSO6Z6.js} +4 -3
  65. package/dist/{chunk-4SYHGVDE.js → chunk-OQNCLZI4.js} +4 -4
  66. package/dist/{chunk-EG4ARXPC.js → chunk-OX6QTA4N.js} +3 -3
  67. package/dist/{chunk-P4GNZPXO.js → chunk-OYUS3UZP.js} +2 -2
  68. package/dist/{chunk-VWKR2NN5.js → chunk-PF36KOGI.js} +290 -111
  69. package/dist/{chunk-LFYA3HYH.js → chunk-PIU6BXXW.js} +2 -2
  70. package/dist/{chunk-EKV4UBCM.js → chunk-PZBQUJ2F.js} +2 -2
  71. package/dist/{chunk-7RET77VB.js → chunk-Q2HKY32Y.js} +2 -2
  72. package/dist/{chunk-VMTCZ2GR.js → chunk-Q4RMNWMZ.js} +4 -4
  73. package/dist/chunk-Q6FRR3AQ.js +48 -0
  74. package/dist/{chunk-6RJMYYIE.js → chunk-QJSIAJBY.js} +3 -3
  75. package/dist/{chunk-DOUISWEE.js → chunk-QOJ4ERMU.js} +5 -5
  76. package/dist/{chunk-IFPDAD7R.js → chunk-RWSRKXLT.js} +3 -3
  77. package/dist/{chunk-T33IYTZM.js → chunk-SAASVMIY.js} +3 -3
  78. package/dist/{chunk-2DTIWSAW.js → chunk-SEQDH6JC.js} +3 -3
  79. package/dist/{chunk-BRCOSE7O.js → chunk-SZUO5BSE.js} +2 -2
  80. package/dist/{chunk-HOEDA42N.js → chunk-T7HZ7KJF.js} +2 -2
  81. package/dist/{chunk-UCINIRHW.js → chunk-TPCZXWLT.js} +3 -3
  82. package/dist/{chunk-ZUKUCZYZ.js → chunk-TQ2KTH4A.js} +2 -2
  83. package/dist/{chunk-4WOOTKFD.js → chunk-U3FETNQB.js} +341 -20
  84. package/dist/{chunk-5B3RTYAK.js → chunk-UGDSB4AN.js} +2 -2
  85. package/dist/{chunk-VKHLUZNO.js → chunk-UZ7YBL43.js} +3 -3
  86. package/dist/{chunk-OXWRE2QJ.js → chunk-VKMSEO7Y.js} +4 -4
  87. package/dist/{chunk-FBXTHPNZ.js → chunk-VLX5VZ35.js} +5 -5
  88. package/dist/{chunk-KIAUZGKF.js → chunk-WAGBMMNX.js} +5 -5
  89. package/dist/{chunk-BFOSV5EZ.js → chunk-WX2YCH7F.js} +2 -2
  90. package/dist/{chunk-SAL2SBP4.js → chunk-XBIGUILU.js} +25 -10
  91. package/dist/{chunk-XOH3SD7H.js → chunk-XKYBFRWR.js} +5 -5
  92. package/dist/{chunk-U5QU5ZOD.js → chunk-XYPWFSU5.js} +3 -3
  93. package/dist/{chunk-YBUECLAF.js → chunk-YEJQDODA.js} +2 -2
  94. package/dist/{chunk-YQ6XEFVK.js → chunk-Z74OGONW.js} +39 -7
  95. package/dist/{chunk-I4ELN5BX.js → chunk-ZTNOEJRI.js} +2 -2
  96. package/dist/cli/index.js +25 -25
  97. package/dist/{clio-Z3JTEL2I.js → clio-4IKFE25F.js} +2 -2
  98. package/dist/{clio-context-tools-GR4OHFSO.js → clio-context-tools-OHJXYX4R.js} +25 -23
  99. package/dist/{code-nav-4X3OI6DK.js → code-nav-XPM3MY5I.js} +7 -7
  100. package/dist/{config-QYIRZHI7.js → config-343YS25T.js} +42 -40
  101. package/dist/{config-graph-TS3SGGQW.js → config-graph-WI263KDX.js} +42 -40
  102. package/dist/{configure-OX7KVJTQ.js → configure-GZDG4HER.js} +21 -21
  103. package/dist/{context-2BNF6HTP.js → context-4OFO7N7Y.js} +12 -12
  104. package/dist/{context-GTMUGAR4.js → context-JLK2RLOG.js} +41 -39
  105. package/dist/{context-NNLBES2Y.js → context-O6DIWCF6.js} +23 -21
  106. package/dist/{context-clear-FVJQBBL7.js → context-clear-MR7KOGQI.js} +41 -39
  107. package/dist/{context-working-set-MOE72SD6.js → context-working-set-YZAD3KWO.js} +14 -13
  108. package/dist/{data-tool-JJPBGMQJ.js → data-tool-EKD7DFHG.js} +7 -7
  109. package/dist/{detail-QZM3QAAU.js → detail-YZPHFEVJ.js} +42 -40
  110. package/dist/{dispatch-runner-2KSQO5FU.js → dispatch-runner-VKVXVTWJ.js} +43 -41
  111. package/dist/{doctor-2U6YR5NH.js → doctor-53AVQXAO.js} +16 -15
  112. package/dist/{doctor-deep-2EJQSHIZ.js → doctor-deep-BLRB2NCG.js} +5 -5
  113. package/dist/{eval-ZKK77JWZ.js → eval-P3BQSLQE.js} +21 -20
  114. package/dist/{evidence-POSEQW4Q.js → evidence-6LLI6SZH.js} +43 -41
  115. package/dist/{evidence-FMP7KZZ2.js → evidence-HTN3JLUO.js} +41 -39
  116. package/dist/{evidence-PJTOE7JA.js → evidence-NJRE3R5H.js} +41 -39
  117. package/dist/{evolve-JT6PAMZE.js → evolve-WWZHJVJP.js} +41 -39
  118. package/dist/{fleet-4XR2ZEOF.js → fleet-GGZ4BVJE.js} +63 -61
  119. package/dist/{fleet-6JJKNIMV.js → fleet-QG3IIWWM.js} +43 -41
  120. package/dist/{fleet-commands-L6WFT7KZ.js → fleet-commands-J2ZIKISQ.js} +7 -7
  121. package/dist/{fleet-decisions-BTQMWU5A.js → fleet-decisions-Y2Q7375Q.js} +8 -8
  122. package/dist/{fleet-graph-553DZ67Q.js → fleet-graph-TCBCCCBP.js} +11 -11
  123. package/dist/{fleet-inspect-SWJMFVDP.js → fleet-inspect-KOLKBC56.js} +43 -41
  124. package/dist/{fleet-preflight-KSIHWQAU.js → fleet-preflight-44UNCC4Y.js} +26 -24
  125. package/dist/{fleet-validate-7NLAE26R.js → fleet-validate-K2FXRZVA.js} +13 -13
  126. package/dist/{fleet-verify-QM6XU2KL.js → fleet-verify-AS444WDW.js} +41 -39
  127. package/dist/{fleet-view-RLKFHFCM.js → fleet-view-X4JU4J6O.js} +42 -40
  128. package/dist/gui/ops-worker.js +9 -9
  129. package/dist/gui/reads-worker.js +9 -8
  130. package/dist/{init-VBUPHABR.js → init-VSOWFHVL.js} +53 -51
  131. package/dist/{interactive-JCVBPVYT.js → interactive-JRCBENLZ.js} +154 -92
  132. package/dist/{interop-J7UOBOSF.js → interop-JR6BCY7R.js} +10 -10
  133. package/dist/{inventory-54G7FSVY.js → inventory-3JUGLVJI.js} +42 -40
  134. package/dist/{library-ROZAMUIL.js → library-7BOH3Y7N.js} +15 -15
  135. package/dist/{library-B3UPGY4V.js → library-7PFONXUI.js} +9 -9
  136. package/dist/{library-MXQA5DLT.js → library-TUYZMFIA.js} +7 -7
  137. package/dist/{library-import-2LTWOVBD.js → library-import-TJVXKLDK.js} +10 -10
  138. package/dist/{library-inventory-LJ3XHLWO.js → library-inventory-MD3AYTP4.js} +9 -9
  139. package/dist/{library-validation-DARHHUNW.js → library-validation-ZDLITEA3.js} +7 -7
  140. package/dist/{memory-5BPQSSOP.js → memory-Q2YVOKK5.js} +41 -39
  141. package/dist/{models-R6HILX6X.js → models-M7BOCW7F.js} +17 -16
  142. package/dist/{monitor-HVRKSFEQ.js → monitor-2HD3MC67.js} +46 -44
  143. package/dist/{orchestrator-OR7V4YWK.js → orchestrator-OUW3ZN6Y.js} +1890 -222
  144. package/dist/{panes-A743ONZ5.js → panes-TTPPSYCL.js} +3 -3
  145. package/dist/{preload-KLXFOX2F.js → preload-A47C2NUF.js} +41 -39
  146. package/dist/{providers-CMETPZNS.js → providers-T43W7EL4.js} +4 -4
  147. package/dist/{resources-FY6XYFN2.js → resources-TP6X2V6W.js} +20 -11
  148. package/dist/{run-UIDRUYAY.js → run-LDSBPMCS.js} +60 -58
  149. package/dist/{share-CAFMMQLM.js → share-URHKKMHR.js} +9 -9
  150. package/dist/{skills-ERKQUC7L.js → skills-E477MOOO.js} +13 -11
  151. package/dist/{skills-eval-JDAXOPWC.js → skills-eval-AIBR2L7H.js} +582 -92
  152. package/dist/{skills-inventory-TVUYJDVN.js → skills-inventory-HLMKY3R5.js} +13 -11
  153. package/dist/{slash-commands-MNKQ5QP3.js → slash-commands-LIIZKA5Y.js} +26 -24
  154. package/dist/{startup-background-PJMWTKVO.js → startup-background-JR2KDK6R.js} +42 -40
  155. package/dist/{steer-KKYXJSH4.js → steer-D7RTAPCM.js} +3 -3
  156. package/dist/{system-IVVZRKGI.js → system-X2P5N4IY.js} +14 -13
  157. package/dist/{targets-RFRUMCQ5.js → targets-VFFAKUFM.js} +25 -24
  158. package/dist/{tasks-6L2JJRC5.js → tasks-ERAWZA22.js} +6 -6
  159. package/dist/{trace-LA5MVR4Y.js → trace-MA5BT7XY.js} +3 -3
  160. package/dist/{usage-LA33SG3R.js → usage-WYFY2L6M.js} +49 -47
  161. package/dist/{verifiers-ECA5GIHL.js → verifiers-TYIW2XKF.js} +7 -7
  162. package/dist/{verify-R6QQCCEB.js → verify-242UFYTP.js} +6 -6
  163. package/dist/{web-fetch-PVZNMBOB.js → web-fetch-LRAGYU6Y.js} +3 -3
  164. package/dist/{wiki-generate-HL73TICA.js → wiki-generate-OFKOX2T6.js} +52 -50
  165. package/dist/worker/entry.js +30 -28
  166. package/docs/architecture/context-engine.md +2 -0
  167. package/docs/guide/context-continuity.md +49 -0
  168. package/docs/guide/proactive-memory.md +3 -0
  169. package/library/registry.yaml +292 -32
  170. package/library/skills/README.md +27 -2
  171. package/library/skills/context/context-handoff/SKILL.md +10 -4
  172. package/library/skills/meta/clio-coder-dev/SKILL.md +92 -88
  173. package/library/skills/meta/clio-coder-dev/evals.md +51 -46
  174. package/library/skills/meta/clio-coder-dev/plugin.json +2 -2
  175. package/library/skills/meta/clio-coder-dev/references/change-map.md +49 -0
  176. package/library/skills/meta/clio-coder-test/SKILL.md +89 -142
  177. package/library/skills/meta/clio-coder-test/evals.md +58 -62
  178. package/library/skills/meta/clio-coder-test/plugin.json +2 -2
  179. package/library/skills/meta/clio-coder-test/references/harness.md +3 -3
  180. package/library/skills/meta/clio-coder-test/references/lifecycle-validation.md +30 -0
  181. package/library/skills/meta/clio-coder-test/references/test-map.md +60 -89
  182. package/library/skills/registry.yaml +5 -5
  183. package/library/skills/skill-marketplace.json +12 -14
  184. package/package.json +1 -1
  185. package/src/cli/skills-eval.ts +1064 -54
  186. package/src/core/clio-repo.ts +3 -0
  187. package/src/core/tool-names.ts +1 -0
  188. package/src/domains/context/budget/inspection.ts +9 -0
  189. package/src/domains/context/budget/live-view.ts +418 -0
  190. package/src/domains/context/budget/pressure.ts +393 -0
  191. package/src/domains/context/budget/request-fit.ts +15 -0
  192. package/src/domains/evidence/build.ts +24 -0
  193. package/src/domains/memory/commit-state.ts +160 -0
  194. package/src/domains/memory/operations.ts +18 -10
  195. package/src/domains/memory/prompt-cache.ts +95 -0
  196. package/src/domains/memory/prompt-section.ts +50 -7
  197. package/src/domains/memory/relevance.ts +93 -0
  198. package/src/domains/memory/restoration.ts +78 -0
  199. package/src/domains/memory/store.ts +39 -1
  200. package/src/domains/middleware/memory-intervention.ts +116 -24
  201. package/src/domains/prompts/compiler.ts +1 -1
  202. package/src/domains/prompts/extension.ts +38 -1
  203. package/src/domains/resources/index.ts +11 -0
  204. package/src/domains/resources/skills/catalog-view.ts +571 -0
  205. package/src/domains/resources/skills/lexical-match.ts +136 -0
  206. package/src/domains/resources/skills/loader.ts +38 -0
  207. package/src/domains/resources/skills/promotion.ts +1 -55
  208. package/src/domains/resources/skills/provenance-pin.ts +50 -20
  209. package/src/domains/safety/action-classifier.ts +1 -0
  210. package/src/domains/session/compaction/branch-summary.ts +4 -1
  211. package/src/domains/session/compaction/compact.ts +18 -2
  212. package/src/domains/session/compaction/cut-point.ts +20 -1
  213. package/src/domains/session/compaction/tokens.ts +48 -3
  214. package/src/domains/session/context-accounting.ts +8 -1
  215. package/src/domains/session/continuity/carry.ts +59 -0
  216. package/src/domains/session/continuity/contract.ts +592 -0
  217. package/src/domains/session/continuity/evidence.ts +290 -0
  218. package/src/domains/session/continuity/fold.ts +1075 -0
  219. package/src/domains/session/continuity/note.ts +79 -0
  220. package/src/domains/session/continuity/operator-request.ts +104 -0
  221. package/src/domains/session/continuity/persistence.ts +408 -0
  222. package/src/domains/session/continuity/ports.ts +231 -0
  223. package/src/domains/session/continuity/projection.ts +538 -0
  224. package/src/domains/session/continuity/validate.ts +352 -0
  225. package/src/domains/session/entries.ts +50 -3
  226. package/src/domains/session/index.ts +48 -0
  227. package/src/domains/session/migrations/index.ts +7 -3
  228. package/src/domains/session/tree/fork.ts +15 -1
  229. package/src/engine/agent.ts +133 -9
  230. package/src/engine/session.ts +13 -6
  231. package/src/entry/orchestrator.ts +114 -31
  232. package/src/interactive/chat-loop.ts +216 -60
  233. package/src/interactive/chat-renderer.ts +99 -8
  234. package/src/interactive/context-overlay.ts +24 -3
  235. package/src/interactive/continuity-controller.ts +526 -0
  236. package/src/interactive/footer/dashboard.ts +12 -1
  237. package/src/interactive/footer/pages.ts +15 -7
  238. package/src/interactive/footer/widgets.ts +32 -7
  239. package/src/interactive/interactive-application.ts +2 -0
  240. package/src/interactive/interactive-slash-runtime.ts +43 -6
  241. package/src/interactive/model-session-replay.ts +130 -3
  242. package/src/interactive/output-reserve.ts +35 -0
  243. package/src/interactive/overlay-session-lifecycle.ts +18 -11
  244. package/src/interactive/session-transcript.ts +2 -1
  245. package/src/interactive/slash-commands.ts +20 -1
  246. package/src/interactive/turn-context.ts +685 -62
  247. package/src/interactive/turn-middleware.ts +39 -6
  248. package/src/interactive/turn-persistence.ts +15 -2
  249. package/src/interactive/turn-runtime.ts +48 -5
  250. package/src/tools/agent-tools.ts +3 -1
  251. package/src/tools/bootstrap.ts +6 -0
  252. package/src/tools/builtin-tool-catalog.ts +9 -0
  253. package/src/tools/context/index.ts +148 -113
  254. package/src/tools/context/surface.ts +11 -7
  255. package/src/tools/core-bootstrap.ts +4 -0
  256. package/src/tools/observation.ts +8 -2
  257. package/src/tools/policy.ts +3 -0
  258. package/src/tools/self-compact.ts +31 -0
  259. package/src/tools/surface.ts +1 -0
  260. package/src/tools/tasks.ts +1 -1
  261. package/dist/chunk-3OODBJ45.js +0 -1325
  262. package/dist/chunk-CTFPFW3H.js +0 -44
  263. package/dist/chunk-I4Y4WKZR.js +0 -386
@@ -6,16 +6,16 @@ import {
6
6
  findCutPoint,
7
7
  getLastAssistantUsage,
8
8
  projectWorkingSet
9
- } from "./chunk-YQ6XEFVK.js";
9
+ } from "./chunk-Z74OGONW.js";
10
10
  import {
11
11
  hasStructuredToolCall,
12
12
  isSelfExplainingAbort,
13
13
  toolResultSummary
14
- } from "./chunk-QTYRMBW6.js";
14
+ } from "./chunk-36XVK5P5.js";
15
15
  import {
16
16
  getPromptManifestFilePath,
17
17
  readPromptCompileManifest
18
- } from "./chunk-ZJPORZTC.js";
18
+ } from "./chunk-GIAI7A2K.js";
19
19
  import {
20
20
  GLYPH,
21
21
  MUTATION_PREVIEW_KEY,
@@ -45,20 +45,20 @@ import {
45
45
  isHelperRun,
46
46
  workerReceiptSummary,
47
47
  workerTargetLabel
48
- } from "./chunk-SAL2SBP4.js";
48
+ } from "./chunk-XBIGUILU.js";
49
49
  import {
50
50
  readAccountabilitySummary
51
- } from "./chunk-GW2KVAVI.js";
51
+ } from "./chunk-AA3GRZWS.js";
52
52
  import {
53
53
  boundSettledText
54
- } from "./chunk-HOEDA42N.js";
54
+ } from "./chunk-T7HZ7KJF.js";
55
55
  import {
56
56
  recallableRefListing
57
- } from "./chunk-EG4ARXPC.js";
57
+ } from "./chunk-OX6QTA4N.js";
58
58
  import {
59
59
  compactionCut,
60
60
  foldWorkingSet
61
- } from "./chunk-EZD2BXGP.js";
61
+ } from "./chunk-GUFQPTQK.js";
62
62
  import {
63
63
  Markdown,
64
64
  truncateToWidth,
@@ -72,24 +72,26 @@ import {
72
72
  formatCostAggregate,
73
73
  inspectEvidence,
74
74
  listEvidenceOverviews
75
- } from "./chunk-7FHSA7VB.js";
75
+ } from "./chunk-EQPFEDFV.js";
76
76
  import {
77
77
  describeWriteBoundaryAttributionDowngrade
78
- } from "./chunk-DXSETN72.js";
78
+ } from "./chunk-7WUGNN43.js";
79
79
  import {
80
80
  formatTrustSummaryLine,
81
81
  trustStateWord
82
- } from "./chunk-OZ76TLGU.js";
82
+ } from "./chunk-EEITU7S6.js";
83
83
  import {
84
+ continuityReplayBlocks,
84
85
  readAuditRows,
86
+ resolveContinuityProjection,
85
87
  responseModelIdObservationFromRecord
86
- } from "./chunk-3OODBJ45.js";
88
+ } from "./chunk-GPTR6OTU.js";
87
89
  import {
88
90
  describeLocalCapacity
89
91
  } from "./chunk-E6IPKW2E.js";
90
92
  import {
91
93
  decisionRationale
92
- } from "./chunk-U5QU5ZOD.js";
94
+ } from "./chunk-XYPWFSU5.js";
93
95
  import {
94
96
  filterEntriesToActivePath
95
97
  } from "./chunk-O5F25NIE.js";
@@ -100,7 +102,7 @@ import {
100
102
  retiredReceiptIntegrity,
101
103
  retiredReceiptIntegrityReason,
102
104
  verifyReceiptIntegrity
103
- } from "./chunk-VKHLUZNO.js";
105
+ } from "./chunk-UZ7YBL43.js";
104
106
  import {
105
107
  applyEditsToNormalizedContent,
106
108
  askAxis,
@@ -117,17 +119,17 @@ import {
117
119
  runKindSupportsLiveSteering,
118
120
  stripBom,
119
121
  toolPresentationPolicy
120
- } from "./chunk-VWKR2NN5.js";
122
+ } from "./chunk-PF36KOGI.js";
121
123
  import {
122
124
  taskBoardCounts
123
- } from "./chunk-NDPF2N2L.js";
125
+ } from "./chunk-7DW7CJW2.js";
124
126
  import {
125
127
  sanitizeCallTargetText,
126
128
  sanitizeMultilineDisplayText
127
129
  } from "./chunk-XNIZBOFV.js";
128
130
  import {
129
131
  effectiveToolCall
130
- } from "./chunk-DE2LU267.js";
132
+ } from "./chunk-KKAJGT3B.js";
131
133
  import {
132
134
  redactSecretString,
133
135
  redactToolArgs
@@ -135,7 +137,7 @@ import {
135
137
  import {
136
138
  toolResultPresentationPolicy,
137
139
  toolResultPresentationText
138
- } from "./chunk-OPD7GL6F.js";
140
+ } from "./chunk-H6FQVNZC.js";
139
141
  import {
140
142
  formatSize
141
143
  } from "./chunk-KECNXMDE.js";
@@ -146,7 +148,7 @@ import {
146
148
  estimateAgentContextTokens,
147
149
  estimateReasoningTextTokens,
148
150
  extractReasoningTokens
149
- } from "./chunk-6W75D37F.js";
151
+ } from "./chunk-53P775GE.js";
150
152
  import {
151
153
  streamSimple
152
154
  } from "./chunk-L7G7K4I2.js";
@@ -154,7 +156,7 @@ import {
154
156
  latestSkillContextState,
155
157
  skillContextContentHash,
156
158
  verifiedSkillContextCheckpoint
157
- } from "./chunk-I4Y4WKZR.js";
159
+ } from "./chunk-F6KCJO3U.js";
158
160
  import {
159
161
  redactSecretsText
160
162
  } from "./chunk-O3VV6IVK.js";
@@ -163,7 +165,7 @@ import {
163
165
  } from "./chunk-C2CPOIH2.js";
164
166
  import {
165
167
  ToolNames
166
- } from "./chunk-V4XJWDHR.js";
168
+ } from "./chunk-6UKFRTXI.js";
167
169
  import {
168
170
  clioStateDir,
169
171
  stateRootRemoved
@@ -800,6 +802,7 @@ async function runSummaryStream(input, userText, systemPrompt, maxTokens) {
800
802
  );
801
803
  }
802
804
  input.signal?.throwIfAborted();
805
+ input.beforeSummaryCall?.();
803
806
  const timestamp = (/* @__PURE__ */ new Date()).toISOString();
804
807
  const started = performance.now();
805
808
  let usage;
@@ -889,7 +892,7 @@ async function compact(input) {
889
892
  const usageStart = prevCompactionIndex >= 0 ? prevCompactionIndex : 0;
890
893
  const usageEntries = entries.slice(usageStart);
891
894
  const lastUsage = getLastAssistantUsage(usageEntries);
892
- const tokensBefore = calculateContextTokens(usageEntries, lastUsage);
895
+ const tokensBefore = calculateContextTokens(usageEntries, lastUsage, input.continuityNote);
893
896
  const rawCut = findCutPoint(entries, keepRecentTokens, { startIndex: boundaryStart });
894
897
  const cut = protectedStart !== null && rawCut.firstKeptEntryIndex > protectedStart ? { firstKeptEntryIndex: protectedStart, turnStartIndex: -1, isSplitTurn: false } : rawCut;
895
898
  const historyEnd = cut.isSplitTurn ? cut.turnStartIndex : cut.firstKeptEntryIndex;
@@ -5906,9 +5909,24 @@ function contextComposition(context) {
5906
5909
  system: finiteNonNegative2(breakdown?.systemPromptTokens),
5907
5910
  tools: finiteNonNegative2(breakdown?.toolSchemaTokens),
5908
5911
  chat: finiteNonNegative2(breakdown?.messageTokens) + finiteNonNegative2(breakdown?.pendingUserTokens),
5909
- free: window > 0 ? Math.max(0, window - used) : null
5912
+ free: window > 0 && typeof context.used === "number" && Number.isFinite(context.used) ? Math.max(0, window - used) : null
5910
5913
  };
5911
5914
  }
5915
+ function contextUsageText(context) {
5916
+ const used = context.budget ? context.used : context.ledger?.usedTokens ?? context.used;
5917
+ const window = context.budget ? context.contextWindow : context.ledger?.contextWindow ?? context.contextWindow;
5918
+ const source = context.budget?.inputSource === "historical" ? "saved " : context.budget && used !== null ? "~" : "";
5919
+ return `${source}${used === null ? "?" : formatFooterTokens(used)} / ${window ? formatFooterTokens(window) : "?"}`;
5920
+ }
5921
+ function contextOccupancyBar(context, cells, theme5) {
5922
+ if (!context.budget && context.ledger) return renderContextMeterBar(context.ledger, cells, theme5);
5923
+ return buildSegmentedContextBar(
5924
+ theme5,
5925
+ cells,
5926
+ context.contextWindow ?? 0,
5927
+ context.used === null ? void 0 : contextBreakdownForBar(context)
5928
+ );
5929
+ }
5912
5930
  function renderDashboardRow(theme5, row, keyWidth) {
5913
5931
  if (!row.value) return null;
5914
5932
  if (row.kind !== "kv") return row.value;
@@ -6096,7 +6114,7 @@ function ledgerBar(theme5, ledger, cells) {
6096
6114
  function contextQuadrant(facts, options = {}) {
6097
6115
  const theme5 = clioTheme();
6098
6116
  const ledger = facts.ledger ?? null;
6099
- const hasLedger = ledger !== null && ledger.contextWindow > 0;
6117
+ const hasLedger = !facts.budget && ledger !== null && ledger.contextWindow > 0;
6100
6118
  const barCells = expandedContextBarCells(options.width);
6101
6119
  let bar;
6102
6120
  let fill;
@@ -6117,7 +6135,7 @@ function contextQuadrant(facts, options = {}) {
6117
6135
  composition.chat > 0 ? theme5.fg("accent", formatFooterTokens(composition.chat)) : null,
6118
6136
  composition.free !== null ? theme5.style("frame", `free ${formatFooterTokens(composition.free)}`, { dim: true }) : null
6119
6137
  ]);
6120
- bar = buildSegmentedContextBar(theme5, barCells, facts.contextWindow ?? 0, contextBreakdownForBar(facts));
6138
+ bar = contextOccupancyBar(facts, barCells, theme5);
6121
6139
  const filledChar = visibleWidth(GLYPH.contextFull) === 1 ? GLYPH.contextFull : GLYPH.barFull;
6122
6140
  const freeChar = visibleWidth(GLYPH.contextFree) === 1 ? GLYPH.contextFree : GLYPH.barEmpty;
6123
6141
  legendRows = [
@@ -6131,7 +6149,7 @@ function contextQuadrant(facts, options = {}) {
6131
6149
  "Context",
6132
6150
  [
6133
6151
  statusRow(bar),
6134
- kv("used", formatUsedWindow(usedTokens, windowTokens)),
6152
+ kv("used", facts.budget ? contextUsageText(facts) : formatUsedWindow(usedTokens, windowTokens)),
6135
6153
  fill ? styledKv("fill", fill) : statusRow(null),
6136
6154
  chatFree ? styledKv("budget", chatFree) : statusRow(null),
6137
6155
  kv("compact", formatCompaction(facts)),
@@ -8188,6 +8206,10 @@ function createCoalescingChatRenderer(deps) {
8188
8206
  };
8189
8207
  return renderer;
8190
8208
  }
8209
+ function activeEntriesBeforeCompactionCut(turns, options = {}, truncateAtSelection = true) {
8210
+ const active = filterEntriesToActivePath(turns, options.activeLeafTurnId ?? options.uptoTurnId);
8211
+ return truncateAtSelection ? truncateAtTurn(active, options.uptoTurnId) : active;
8212
+ }
8191
8213
  function extractTurnText(payload) {
8192
8214
  if (typeof payload === "string") return payload;
8193
8215
  if (!payload || typeof payload !== "object") return "";
@@ -8697,15 +8719,15 @@ function skillActivationContextText(entry) {
8697
8719
  function buildReplayAgentMessagesFromTurns(turns, options = {}) {
8698
8720
  const out = createOrderedReplaySink();
8699
8721
  const seenToolCalls = /* @__PURE__ */ new Set();
8700
- const activeEntries = truncateAtTurn(
8701
- filterEntriesToActivePath(turns, options.activeLeafTurnId ?? options.uptoTurnId),
8702
- options.uptoTurnId
8703
- );
8722
+ const activeEntries = activeEntriesBeforeCompactionCut(turns, options);
8704
8723
  const skillState = latestSkillContextState(activeEntries);
8705
- const evidence = truncateAtTurn(
8706
- filterEntriesToActivePath(options.skillContextEntries ?? turns, options.activeLeafTurnId ?? options.uptoTurnId),
8707
- options.uptoTurnId
8708
- );
8724
+ let continuityEmitted = false;
8725
+ const emitContinuity = (timestamp) => {
8726
+ if (continuityEmitted) return;
8727
+ continuityEmitted = true;
8728
+ for (const block of options.continuityBlocks ?? []) out.push(makeTextMessage("user", block, timestamp));
8729
+ };
8730
+ const evidence = activeEntriesBeforeCompactionCut(options.skillContextEntries ?? turns, options);
8709
8731
  const verified = captureSkillContext(evidence, skillState);
8710
8732
  for (const entry of selectReplayEntries(turns, options)) {
8711
8733
  switch (entry.kind) {
@@ -8766,6 +8788,7 @@ ${skill.requestText}`, entry.timestamp));
8766
8788
  for (const block of skill.content) out.push(makeTextMessage("user", block.text, entry.timestamp));
8767
8789
  }
8768
8790
  }
8791
+ emitContinuity(entry.timestamp);
8769
8792
  break;
8770
8793
  case "skillActivation":
8771
8794
  if (entry.activation.runId !== void 0 || skillState && !skillState.activationRefs.includes(entry.turnId))
@@ -8798,9 +8821,17 @@ ${skill.requestText}`, entry.timestamp));
8798
8821
  // entries themselves never become messages.
8799
8822
  case "contextEviction":
8800
8823
  case "contextRecall":
8824
+ // Continuity records are bookkeeping. The chain and the commit payload
8825
+ // never become model messages; the one thing that reaches the model is
8826
+ // the accepted note, projected once through `continuityBlocks`. Handling
8827
+ // each commit here instead would emit a copy per record and would still
8828
+ // miss a commit that sits before the cut.
8829
+ case "handoffTransaction":
8830
+ case "continuityCommit":
8801
8831
  break;
8802
8832
  }
8803
8833
  }
8834
+ emitContinuity(activeEntries[activeEntries.length - 1]?.timestamp ?? (/* @__PURE__ */ new Date(0)).toISOString());
8804
8835
  out.flush();
8805
8836
  return out.messages;
8806
8837
  }
@@ -8960,6 +8991,21 @@ function rehydrateChatPanelFromTurns(chatPanel, turns, options = {}) {
8960
8991
  chatPanel.applyWorkerState(state);
8961
8992
  break;
8962
8993
  }
8994
+ // One bounded provenance line each. The transcript says a handoff
8995
+ // happened and where it stands; the note itself is rendered once,
8996
+ // below, under its own label, rather than once per record.
8997
+ case "handoffTransaction":
8998
+ appendReplayLine(
8999
+ chatPanel,
9000
+ `[continuity] ${entry.event.phase} handoff=${entry.identity.handoffId} seq=${entry.transition.sequence} attempt=${entry.transition.attempt}`
9001
+ );
9002
+ break;
9003
+ case "continuityCommit":
9004
+ appendReplayLine(
9005
+ chatPanel,
9006
+ `[continuity] commit handoff=${entry.continuity.identity.handoffId} outcome=${entry.continuity.commit.outcome} tokens=${entry.continuity.commit.tokensBefore}->${entry.continuity.commit.tokensAfter}`
9007
+ );
9008
+ break;
8963
9009
  case "label":
8964
9010
  case "taskLedger":
8965
9011
  case "decisionLedger":
@@ -8968,6 +9014,9 @@ function rehydrateChatPanelFromTurns(chatPanel, turns, options = {}) {
8968
9014
  break;
8969
9015
  }
8970
9016
  }
9017
+ for (const block of options.continuityBlocks ?? []) {
9018
+ for (const line of block.split("\n")) appendReplayLine(chatPanel, line);
9019
+ }
8971
9020
  for (const pendingId of pendingToolIds) {
8972
9021
  chatPanel.applyEvent({
8973
9022
  type: "tool_execution_end",
@@ -8980,10 +9029,44 @@ function rehydrateChatPanelFromTurns(chatPanel, turns, options = {}) {
8980
9029
  }
8981
9030
 
8982
9031
  // src/interactive/model-session-replay.ts
9032
+ function continuityContextFromSession(session) {
9033
+ const meta = session?.current();
9034
+ if (!meta) return {};
9035
+ const parentSessionId = meta.parentSessionId ?? null;
9036
+ const parentTurnId = meta.parentTurnId ?? null;
9037
+ return {
9038
+ sessionId: meta.id,
9039
+ ...parentSessionId !== null && parentTurnId !== null ? { fork: { parentSessionId, parentTurnId } } : {}
9040
+ };
9041
+ }
9042
+ function resolveReplayContinuity(entries, options = {}) {
9043
+ const context = options.continuity ?? {};
9044
+ return resolveContinuityProjection({
9045
+ // The positional cut applies only to a real historical selection. A live
9046
+ // /tree switch passes `uptoTurnId` for display and must still see the
9047
+ // sidecars anchored after the selected message, because they are part of
9048
+ // its own branch's current state.
9049
+ entries: activeEntriesBeforeCompactionCut(entries, options, context.historical === true),
9050
+ ...context.sessionId === void 0 ? {} : { sessionId: context.sessionId },
9051
+ ...context.fork === void 0 ? {} : { fork: context.fork },
9052
+ ...context.historical === void 0 ? {} : { historical: context.historical },
9053
+ ...context.unreadableRecords === void 0 ? {} : { unreadableRecords: context.unreadableRecords },
9054
+ ...context.nowMs === void 0 ? {} : { nowMs: context.nowMs }
9055
+ });
9056
+ }
9057
+ function withContinuityReplay(turns, options, session) {
9058
+ const merged = { ...options, continuity: continuityContextFromSession(session) };
9059
+ return { ...merged, continuityBlocks: continuityReplayBlocks(resolveReplayContinuity(turns, merged)) };
9060
+ }
8983
9061
  function buildModelReplayAgentMessagesFromTurns(entries, options = {}) {
8984
9062
  const activeLeafTurnId = options.activeLeafTurnId ?? options.uptoTurnId;
9063
+ const blocks = options.continuityBlocks ?? continuityReplayBlocks(resolveReplayContinuity(entries, options));
8985
9064
  const projected = projectWorkingSet(entries, foldWorkingSet(entries, activeLeafTurnId), activeLeafTurnId);
8986
- return buildReplayAgentMessagesFromTurns(projected, { ...options, skillContextEntries: entries });
9065
+ return buildReplayAgentMessagesFromTurns(projected, {
9066
+ ...options,
9067
+ skillContextEntries: entries,
9068
+ continuityBlocks: blocks
9069
+ });
8987
9070
  }
8988
9071
 
8989
9072
  // src/interactive/loop-guard-interrupt.ts
@@ -9525,7 +9608,6 @@ export {
9525
9608
  renderToolPreview,
9526
9609
  canGroupObservation,
9527
9610
  foldSessionArtifacts,
9528
- renderContextMeterBar,
9529
9611
  renderContextMeterGrid,
9530
9612
  renderEvictedTokensLine,
9531
9613
  contextCategorySwatch,
@@ -9568,6 +9650,8 @@ export {
9568
9650
  fitDashboardLine,
9569
9651
  formatToolTally,
9570
9652
  formatUsd,
9653
+ contextUsageText,
9654
+ contextOccupancyBar,
9571
9655
  workspaceQuadrant,
9572
9656
  sessionQuadrant,
9573
9657
  contextQuadrant,
@@ -9585,6 +9669,8 @@ export {
9585
9669
  workerRunEntryFields,
9586
9670
  createCoalescingChatRenderer,
9587
9671
  rehydrateChatPanelFromTurns,
9672
+ continuityContextFromSession,
9673
+ withContinuityReplay,
9588
9674
  buildModelReplayAgentMessagesFromTurns,
9589
9675
  hasAssistantGenerationDelta,
9590
9676
  createAssistantGenerationTiming,
@@ -9608,4 +9694,4 @@ export {
9608
9694
  autonomyDeniedNotice,
9609
9695
  safetyBlockedNotice
9610
9696
  };
9611
- //# sourceMappingURL=chunk-ZNTGRDFA.js.map
9697
+ //# sourceMappingURL=chunk-M5PMRZSR.js.map
@@ -0,0 +1,131 @@
1
+ import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
+ import {
3
+ init_esm_shims
4
+ } from "./chunk-ECBHH7LU.js";
5
+
6
+ // src/core/skill-activation.ts
7
+ init_esm_shims();
8
+ var SKILL_SUGGESTION_ANCHOR = "Suggested skill: /skill <name>";
9
+ var SKILL_SUGGESTION_PREFIX = SKILL_SUGGESTION_ANCHOR.slice(0, SKILL_SUGGESTION_ANCHOR.indexOf("<name>"));
10
+ var SKILL_INSTALL_OFFER_OPTION_PROJECT = "Install for this project";
11
+ var SKILL_INSTALL_OFFER_OPTION_USER = "Install globally";
12
+ var SKILL_INSTALL_OFFER_OPTION_NOT_NOW = "Not now";
13
+ var SKILL_INSTALL_OFFER_OPTION_NEVER = "Never offer this skill";
14
+ function armedSkillSurface(policy) {
15
+ if (!policy) return void 0;
16
+ const declared = [...policy.loadedSkillPolicies.entries()].filter(
17
+ ([, declaration]) => (declaration.allowedTools?.length ?? 0) > 0 || (declaration.disallowedTools?.length ?? 0) > 0
18
+ );
19
+ if (declared.length === 0) return void 0;
20
+ return {
21
+ allowedSkillNames: [...policy.allowedSkillNames],
22
+ requests: [...policy.requests],
23
+ loadedSkillNames: new Set(policy.loadedSkillNames),
24
+ loadedSkillPolicies: new Map(declared),
25
+ carriedSurface: true
26
+ };
27
+ }
28
+ function skillSurfaceNames(policy) {
29
+ return policy ? [...policy.loadedSkillPolicies.keys()] : [];
30
+ }
31
+ function skillSurfaceLabels(policy) {
32
+ if (!policy) return [];
33
+ return [...policy.loadedSkillPolicies.keys()].map(
34
+ (name) => policy.requests.some((request) => request.name === name) ? `${name} (operator)` : `${name} (model)`
35
+ );
36
+ }
37
+ function withModelSkillActivation(policy, enabled) {
38
+ if (policy) {
39
+ policy.modelActivation = enabled;
40
+ return policy;
41
+ }
42
+ if (!enabled) return void 0;
43
+ return {
44
+ allowedSkillNames: [],
45
+ requests: [],
46
+ loadedSkillNames: /* @__PURE__ */ new Set(),
47
+ loadedSkillPolicies: /* @__PURE__ */ new Map(),
48
+ modelActivation: true
49
+ };
50
+ }
51
+ var SKILL_SURFACE_EXEMPT_TOOLS = /* @__PURE__ */ new Set(["context", "ask_user", "gateway"]);
52
+ function evaluateSkillToolSurface(policy, tool) {
53
+ if (!policy || policy.loadedSkillPolicies.size === 0) return null;
54
+ if (SKILL_SURFACE_EXEMPT_TOOLS.has(tool)) return null;
55
+ const entries = [...policy.loadedSkillPolicies.entries()];
56
+ const skills = entries.map(([name]) => name);
57
+ const carriedSurface = policy.carriedSurface === true;
58
+ const disallowedBy = entries.filter(([, declared]) => declared.disallowedTools?.includes(tool) === true).map(([name]) => name);
59
+ if (disallowedBy.length > 0) return { skills, mergedAllowedTools: null, disallowedBy, carriedSurface };
60
+ if (tool === "limitation") return null;
61
+ const allowLists = entries.map(([, declared]) => declared.allowedTools);
62
+ if (allowLists.some((list) => list === void 0 || list.length === 0)) return null;
63
+ const merged = [...new Set(allowLists.flatMap((list) => [...list ?? []]))];
64
+ if (merged.includes(tool)) return null;
65
+ return { skills, mergedAllowedTools: merged, disallowedBy: [], carriedSurface };
66
+ }
67
+ function agentSkillToolPolicy(skillNames) {
68
+ const allowedSkillNames = [...new Set(skillNames.map((name) => name.trim()).filter((name) => name.length > 0))];
69
+ if (allowedSkillNames.length === 0) return void 0;
70
+ return {
71
+ allowedSkillNames,
72
+ requests: allowedSkillNames.map((name) => ({ name, args: "", source: "recipe", installed: true })),
73
+ loadedSkillNames: /* @__PURE__ */ new Set(),
74
+ loadedSkillPolicies: /* @__PURE__ */ new Map()
75
+ };
76
+ }
77
+ function trimmedString(value) {
78
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
79
+ }
80
+ function skillActivationFromSource(source, triggeredBy, turnId) {
81
+ const sourceOrigin = trimmedString(source.sourceOrigin) ?? trimmedString(source.sourceInfo?.source);
82
+ return {
83
+ name: source.name,
84
+ filePath: source.filePath,
85
+ hash: source.hash,
86
+ source: source.source,
87
+ ...sourceOrigin ? { sourceOrigin } : {},
88
+ triggeredBy,
89
+ ...turnId ? { turnId } : {}
90
+ };
91
+ }
92
+ function skillActivationFromToolDetails(details, turnId) {
93
+ if (!details || typeof details !== "object" || Array.isArray(details)) return null;
94
+ const record = details;
95
+ const name = trimmedString(record.name);
96
+ const filePath = trimmedString(record.filePath) ?? trimmedString(record.path);
97
+ const hash = trimmedString(record.hash);
98
+ const source = trimmedString(record.source);
99
+ const sourceOrigin = trimmedString(record.sourceOrigin) ?? trimmedString(record.origin);
100
+ if (!name || !filePath || !hash || !source) return null;
101
+ const activation = skillActivationFromSource(
102
+ { name, filePath, hash, source, ...sourceOrigin ? { sourceOrigin } : {} },
103
+ "tool",
104
+ turnId
105
+ );
106
+ if (record.drift === "match" || record.drift === "mismatch") activation.drift = record.drift;
107
+ return activation;
108
+ }
109
+ function isSkillActivation(value) {
110
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
111
+ const record = value;
112
+ return typeof record.name === "string" && typeof record.filePath === "string" && typeof record.hash === "string" && typeof record.source === "string" && (record.sourceOrigin === void 0 || typeof record.sourceOrigin === "string") && (record.triggeredBy === "slash-command" || record.triggeredBy === "tool") && (record.turnId === void 0 || typeof record.turnId === "string") && (record.runId === void 0 || typeof record.runId === "string");
113
+ }
114
+
115
+ export {
116
+ SKILL_SUGGESTION_ANCHOR,
117
+ SKILL_SUGGESTION_PREFIX,
118
+ SKILL_INSTALL_OFFER_OPTION_PROJECT,
119
+ SKILL_INSTALL_OFFER_OPTION_USER,
120
+ SKILL_INSTALL_OFFER_OPTION_NOT_NOW,
121
+ SKILL_INSTALL_OFFER_OPTION_NEVER,
122
+ armedSkillSurface,
123
+ skillSurfaceNames,
124
+ skillSurfaceLabels,
125
+ withModelSkillActivation,
126
+ evaluateSkillToolSurface,
127
+ agentSkillToolPolicy,
128
+ skillActivationFromToolDetails,
129
+ isSkillActivation
130
+ };
131
+ //# sourceMappingURL=chunk-MMZMM6SW.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-C2CPOIH2.js";
8
8
  import {
9
9
  ToolNames
10
- } from "./chunk-V4XJWDHR.js";
10
+ } from "./chunk-6UKFRTXI.js";
11
11
  import {
12
12
  typebox_exports
13
13
  } from "./chunk-GH5ZR6JP.js";
@@ -413,4 +413,4 @@ export {
413
413
  prepareDataAdmissionArguments,
414
414
  dataToolSurface
415
415
  };
416
- //# sourceMappingURL=chunk-FFYTC2KQ.js.map
416
+ //# sourceMappingURL=chunk-MNABNEBX.js.map
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-7QXCO3AF.js";
14
14
  import {
15
15
  createSafetyPolicyEngine
16
- } from "./chunk-733ZBT5P.js";
16
+ } from "./chunk-E74MJF6G.js";
17
17
  import {
18
18
  classify
19
- } from "./chunk-VYRQHORQ.js";
19
+ } from "./chunk-NMQSO6Z6.js";
20
20
  import {
21
21
  clioStateDir,
22
22
  stateRootRemoved
@@ -658,4 +658,4 @@ export {
658
658
  parseRigorOverride,
659
659
  SafetyDomainModule
660
660
  };
661
- //# sourceMappingURL=chunk-XMDBTYCH.js.map
661
+ //# sourceMappingURL=chunk-N3CWOGVF.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
2
  import {
3
3
  extractCommandPathWalks
4
- } from "./chunk-P4GNZPXO.js";
4
+ } from "./chunk-OYUS3UZP.js";
5
5
  import {
6
6
  artifactDefaultPath
7
7
  } from "./chunk-NTTS3O53.js";
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  ToolNames,
18
18
  isHarnessExtensionToolName
19
- } from "./chunk-V4XJWDHR.js";
19
+ } from "./chunk-6UKFRTXI.js";
20
20
  import {
21
21
  init_esm_shims
22
22
  } from "./chunk-ECBHH7LU.js";
@@ -65,6 +65,7 @@ function baseClassify(tool) {
65
65
  case ToolNames.WebFetch:
66
66
  case ToolNames.Git:
67
67
  case ToolNames.CodeNav:
68
+ case ToolNames.SelfCompact:
68
69
  case ToolNames.Context:
69
70
  // clio_docs and clio_library read Clio's bundled documentation and the
70
71
  // recipe catalog; data streams structured files. None writes.
@@ -411,4 +412,4 @@ export {
411
412
  normalizeCallPaths,
412
413
  classify
413
414
  };
414
- //# sourceMappingURL=chunk-VYRQHORQ.js.map
415
+ //# sourceMappingURL=chunk-NMQSO6Z6.js.map
@@ -4,17 +4,17 @@ import {
4
4
  listChecks,
5
5
  runProjectCheck,
6
6
  runScriptCheck
7
- } from "./chunk-7RET77VB.js";
7
+ } from "./chunk-Q2HKY32Y.js";
8
8
  import {
9
9
  BROWSER_MODES,
10
10
  prepareBoundedImage,
11
11
  prepareVerifyArguments,
12
12
  verifyToolSurface
13
- } from "./chunk-YBUECLAF.js";
13
+ } from "./chunk-YEJQDODA.js";
14
14
  import {
15
15
  maxOutputArg,
16
16
  timeoutArg
17
- } from "./chunk-CRHPCPZP.js";
17
+ } from "./chunk-4KC4CHKJ.js";
18
18
  import {
19
19
  escapeRegExp
20
20
  } from "./chunk-DZLR4UEH.js";
@@ -665,4 +665,4 @@ var verifyTool = {
665
665
  export {
666
666
  verifyTool
667
667
  };
668
- //# sourceMappingURL=chunk-4SYHGVDE.js.map
668
+ //# sourceMappingURL=chunk-OQNCLZI4.js.map
@@ -10,13 +10,13 @@ import {
10
10
  refKey,
11
11
  toolResultPayload,
12
12
  toolResultText
13
- } from "./chunk-EZD2BXGP.js";
13
+ } from "./chunk-GUFQPTQK.js";
14
14
  import {
15
15
  filterEntriesToActivePath
16
16
  } from "./chunk-O5F25NIE.js";
17
17
  import {
18
18
  ceilChars
19
- } from "./chunk-6W75D37F.js";
19
+ } from "./chunk-53P775GE.js";
20
20
  import {
21
21
  init_esm_shims
22
22
  } from "./chunk-ECBHH7LU.js";
@@ -136,4 +136,4 @@ export {
136
136
  recallableRefListing,
137
137
  recallErrorMessage
138
138
  };
139
- //# sourceMappingURL=chunk-EG4ARXPC.js.map
139
+ //# sourceMappingURL=chunk-OX6QTA4N.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-M4KFUXS7.js";
12
12
  import {
13
13
  ToolNames
14
- } from "./chunk-V4XJWDHR.js";
14
+ } from "./chunk-6UKFRTXI.js";
15
15
  import {
16
16
  init_esm_shims
17
17
  } from "./chunk-ECBHH7LU.js";
@@ -1153,4 +1153,4 @@ export {
1153
1153
  scanShellLike,
1154
1154
  scanShellLikeDeep
1155
1155
  };
1156
- //# sourceMappingURL=chunk-P4GNZPXO.js.map
1156
+ //# sourceMappingURL=chunk-OYUS3UZP.js.map