@iowarp/clio-coder 0.3.7 → 0.3.8

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 (223) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +7 -2
  3. package/dist/{acp-SK4MD6MM.js → acp-U67UHUK2.js} +13 -13
  4. package/dist/{agents-2FN2K6ME.js → agents-YU6SGALZ.js} +35 -33
  5. package/dist/assets/codewiki.json +1 -1
  6. package/dist/{auth-QIYZWM5I.js → auth-5ZPJOIVG.js} +32 -24
  7. package/dist/builtins-C6JMZVV6.js +17 -0
  8. package/dist/{chunk-YD734TPH.js → chunk-26LEYJZH.js} +2 -2
  9. package/dist/{chunk-TSHXZTOQ.js → chunk-2HEJ2F35.js} +5 -5
  10. package/dist/{chunk-WJHBC77E.js → chunk-2HFZQUHL.js} +5 -5
  11. package/dist/{chunk-FO5ZOVUY.js → chunk-3BINW3FP.js} +5 -5
  12. package/dist/{chunk-EOOQZZDE.js → chunk-4SPRNWDE.js} +18 -18
  13. package/dist/{chunk-EBEFWSGL.js → chunk-5DHKRSMQ.js} +7 -7
  14. package/dist/{chunk-OBMAI2DP.js → chunk-5H3GB5BO.js} +11 -9
  15. package/dist/{chunk-JTSEDYVQ.js → chunk-5Q2VVUKB.js} +7 -7
  16. package/dist/{chunk-VQNODYQ4.js → chunk-7RFXX52T.js} +294 -3704
  17. package/dist/{chunk-XEGB6BCN.js → chunk-7RGZWPB6.js} +5 -5
  18. package/dist/{chunk-GH5622CP.js → chunk-A2NJGIB3.js} +2 -2
  19. package/dist/{chunk-CEYBNUGC.js → chunk-A3WNZD3P.js} +323 -27
  20. package/dist/{chunk-D4MDIG46.js → chunk-B5CSFE7B.js} +7 -7
  21. package/dist/{chunk-2SFS6XQE.js → chunk-DGSYXYMX.js} +3 -2
  22. package/dist/{chunk-ZWLZP4ZT.js → chunk-DYIM5TJT.js} +98 -12
  23. package/dist/{chunk-KCMKRQX4.js → chunk-E77JEWSD.js} +42 -49
  24. package/dist/{chunk-J7PIKKWC.js → chunk-EMYUUSFG.js} +7 -7
  25. package/dist/{chunk-JRIO5UD2.js → chunk-EQ63NRB7.js} +5 -5
  26. package/dist/{chunk-UVDSQ6LW.js → chunk-FBVTI2TJ.js} +74 -28
  27. package/dist/{chunk-BMWK7ZIZ.js → chunk-FHJEP5SW.js} +13 -13
  28. package/dist/{chunk-FOT2FX5J.js → chunk-GN57SG4G.js} +7 -7
  29. package/dist/{chunk-SROCI7ZU.js → chunk-GPIEI3LY.js} +5 -5
  30. package/dist/{chunk-UFQ3F4FW.js → chunk-GU2UIAFZ.js} +4 -4
  31. package/dist/{chunk-UND3GU2L.js → chunk-H7IXIC72.js} +2 -2
  32. package/dist/{chunk-VREKEFLL.js → chunk-HLE42MG7.js} +3 -3
  33. package/dist/{chunk-465YSENW.js → chunk-IFBNV6H6.js} +3 -3
  34. package/dist/{chunk-LADCF22A.js → chunk-IGWKHNIQ.js} +113 -54
  35. package/dist/chunk-IIZWH4XA.js +172 -0
  36. package/dist/{chunk-UHXRNZ2J.js → chunk-IJ7RPIYJ.js} +4 -4
  37. package/dist/{chunk-M4AKACEO.js → chunk-J3YUBZWY.js} +2 -2
  38. package/dist/{chunk-AB4XIIVB.js → chunk-JOZYP4GM.js} +6 -6
  39. package/dist/{chunk-ZGH7FGS5.js → chunk-K4XHGFR5.js} +742 -12
  40. package/dist/{chunk-EELBMBT6.js → chunk-KTYTFRMB.js} +62 -5
  41. package/dist/chunk-LU7P4LHA.js +33 -0
  42. package/dist/{chunk-DQA7QLMD.js → chunk-ME6CCNFO.js} +9 -24
  43. package/dist/{chunk-KZ2H5X4G.js → chunk-MXKJU4JB.js} +88 -14
  44. package/dist/{chunk-DMD2AGVS.js → chunk-N22QMJKY.js} +20 -18
  45. package/dist/chunk-NMPKI6XL.js +3006 -0
  46. package/dist/chunk-NUGM5KR6.js +165 -0
  47. package/dist/{chunk-5C77SEEY.js → chunk-P43ETTHK.js} +2 -2
  48. package/dist/{chunk-JNXPYBB4.js → chunk-PMDBGQSJ.js} +2 -2
  49. package/dist/chunk-PT7HYKEM.js +165 -0
  50. package/dist/{chunk-GEYXPTRF.js → chunk-RWSI4YD7.js} +2 -2
  51. package/dist/{chunk-C4JBQ5SR.js → chunk-TANS5ZJS.js} +6 -6
  52. package/dist/{chunk-YTYFXUI3.js → chunk-TB5666IT.js} +9 -9
  53. package/dist/{chunk-UUANF5CR.js → chunk-TLQJPP24.js} +375 -687
  54. package/dist/{chunk-OB5HIGJY.js → chunk-TT36MB5S.js} +2 -1
  55. package/dist/{chunk-DJNLUABN.js → chunk-TTHACPOM.js} +135 -17
  56. package/dist/{chunk-6M7VS3J3.js → chunk-TYPGUK6W.js} +4 -4
  57. package/dist/{chunk-THKY7CD7.js → chunk-U6MBIEMB.js} +108 -24
  58. package/dist/{chunk-PD3MESLB.js → chunk-VAWNZU7Z.js} +4 -4
  59. package/dist/{chunk-IR4CFBFN.js → chunk-VCBR6CU7.js} +12 -12
  60. package/dist/{chunk-WHJYKASB.js → chunk-VHN4MY6O.js} +2 -2
  61. package/dist/{chunk-MXI6J5JF.js → chunk-VWZOAB7K.js} +10 -10
  62. package/dist/{chunk-QCTRSGHQ.js → chunk-WLFILSD5.js} +36 -36
  63. package/dist/{chunk-5UJ6ECTS.js → chunk-WNIJTQQK.js} +6 -6
  64. package/dist/{chunk-4DWFMQDR.js → chunk-WSB3FPX7.js} +68 -20
  65. package/dist/{chunk-3HAPLH5M.js → chunk-WWCZ5F23.js} +112 -10
  66. package/dist/{chunk-X2KV5FXT.js → chunk-WXY7KU3G.js} +2 -2
  67. package/dist/{chunk-PPAMZ32Z.js → chunk-XK56QHLX.js} +6 -1
  68. package/dist/{chunk-DOOEX22V.js → chunk-XWSF374K.js} +4 -4
  69. package/dist/{chunk-6TUKSZVF.js → chunk-YS5VLNH5.js} +8 -8
  70. package/dist/{chunk-ZZMN5OM4.js → chunk-ZNLWCMVZ.js} +2 -2
  71. package/dist/{chunk-WHGPSPT5.js → chunk-ZVJ5BLO2.js} +2 -2
  72. package/dist/cli/index.js +31 -31
  73. package/dist/{clio-WBVQEBKO.js → clio-QVTYJ57A.js} +8 -8
  74. package/dist/code-nav-FGGFIE7L.js +2 -2
  75. package/dist/codewiki/build-worker.js +4 -4
  76. package/dist/{components-F7OEATSO.js → components-ZFA3SAER.js} +8 -8
  77. package/dist/{config-TRBL3RCF.js → config-LW5IJFQN.js} +58 -53
  78. package/dist/{configure-OLCVPHNM.js → configure-7XIZCOU4.js} +26 -21
  79. package/dist/{context-XEWE3MOJ.js → context-L3WL3X7K.js} +47 -41
  80. package/dist/{context-WFPKQSM6.js → context-N52ZA626.js} +22 -22
  81. package/dist/{context-MJIJ6GOX.js → context-Y6Y7QPR6.js} +12 -12
  82. package/dist/{context-clear-KNOS2JPB.js → context-clear-MBQRLSDQ.js} +47 -41
  83. package/dist/{context-index-SSR5ECNE.js → context-index-HVMFQHK3.js} +5 -5
  84. package/dist/{context-working-set-EUXAZI6N.js → context-working-set-GS6DSO7F.js} +14 -14
  85. package/dist/{dispatch-runner-B7MTOVKL.js → dispatch-runner-22ZCNOM3.js} +83 -55
  86. package/dist/{docs-FLJTIDSE.js → docs-7LQ23DLM.js} +8 -8
  87. package/dist/{doctor-RN4YKO2X.js → doctor-M7YEDGAE.js} +24 -20
  88. package/dist/{eval-RUBJVSNQ.js → eval-BEC2WHDA.js} +71 -19
  89. package/dist/{evidence-JZNBUOQZ.js → evidence-REJUMSKM.js} +62 -56
  90. package/dist/{evolve-FJVC4KKI.js → evolve-PY5ZBA5K.js} +41 -35
  91. package/dist/{extensions-IQL36S7K.js → extensions-HVKU65YU.js} +6 -6
  92. package/dist/{fleet-BDKYJFCP.js → fleet-7WZEWRFA.js} +72 -67
  93. package/dist/{fleet-commands-ZFIWZSB3.js → fleet-commands-UVHWM76J.js} +10 -10
  94. package/dist/{fleet-graph-Y6HPXIVF.js → fleet-graph-6ULH7PES.js} +13 -13
  95. package/dist/{fleet-preflight-BHSNPBMH.js → fleet-preflight-J53T6CCE.js} +5 -5
  96. package/dist/{fleet-validate-BIYREGIK.js → fleet-validate-72PC4SLA.js} +17 -17
  97. package/dist/{init-LQUB5COQ.js → init-OG3TPGQG.js} +61 -56
  98. package/dist/{library-NJAHIGG4.js → library-CNTMPLRF.js} +18 -18
  99. package/dist/{memory-OG6HOYKM.js → memory-6IS7F275.js} +43 -37
  100. package/dist/{models-5ZG5XY7J.js → models-ENRJDA5W.js} +33 -28
  101. package/dist/{monitor-TJ7AMTGB.js → monitor-XLDVO7TN.js} +56 -38
  102. package/dist/{orchestrator-WZYB54DM.js → orchestrator-6KSPYRHA.js} +421 -303
  103. package/dist/{paths-XUC7GS6E.js → paths-DBXMZMDU.js} +5 -5
  104. package/dist/registry-LG64LTF4.js +11 -0
  105. package/dist/{reset-PXQT45IY.js → reset-RZ4ER727.js} +10 -10
  106. package/dist/{run-FQ74YF62.js → run-Y2CNK5RU.js} +79 -74
  107. package/dist/{share-FW7SVCL3.js → share-A55GYP6Z.js} +16 -16
  108. package/dist/{skills-7E7IRB3R.js → skills-ALC5J6AT.js} +19 -19
  109. package/dist/{skills-eval-LI75W6OK.js → skills-eval-JPBEBYQU.js} +52 -47
  110. package/dist/support-MIETYA5E.js +38 -0
  111. package/dist/{targets-4CIFKCTW.js → targets-VGNXIR3S.js} +42 -33
  112. package/dist/{terminal-lease-WUZY7ZV5.js → terminal-lease-WOBR64YA.js} +3 -3
  113. package/dist/{uninstall-7FV7IP4E.js → uninstall-ZJF5H5ZN.js} +8 -8
  114. package/dist/{upgrade-K2HVIVMQ.js → upgrade-FUSUAGHR.js} +27 -25
  115. package/dist/{usage-GTZELZQX.js → usage-N4MKVHKD.js} +51 -46
  116. package/dist/{verifiers-RLAHT27O.js → verifiers-YAWOJ3H2.js} +13 -13
  117. package/dist/{verify-BX3BRKH5.js → verify-LTDHYBGY.js} +9 -9
  118. package/dist/{wiki-generate-ASIFASCN.js → wiki-generate-6M7GHTBJ.js} +66 -61
  119. package/dist/worker/entry.js +68 -61
  120. package/docs/alcf-provider.md +1 -1
  121. package/docs/architecture.md +1 -1
  122. package/docs/artifact-versions.md +6 -5
  123. package/docs/built-in-agents.md +1 -1
  124. package/docs/commands-and-modes.md +2 -2
  125. package/docs/configuration-and-targets.md +8 -3
  126. package/docs/context-engine.md +1 -1
  127. package/docs/documentation-guide.md +1 -1
  128. package/docs/eval-runner.md +1 -1
  129. package/docs/evals-internal.md +1 -1
  130. package/docs/evidence-and-memory.md +70 -6
  131. package/docs/evolution.md +1 -1
  132. package/docs/extensions-and-sharing.md +1 -1
  133. package/docs/fleet-dispatch.md +34 -9
  134. package/docs/glossary.md +21 -1
  135. package/docs/installation-and-lifecycle.md +1 -1
  136. package/docs/middleware-and-components.md +1 -1
  137. package/docs/model-catalog.md +1 -1
  138. package/docs/observability.md +2 -2
  139. package/docs/proactive-memory.md +1 -1
  140. package/docs/prompt-envelope-and-tools.md +4 -2
  141. package/docs/provider-adapter-cookbook.md +1 -1
  142. package/docs/release-cut-checklist.md +41 -38
  143. package/docs/safety-model.md +1 -1
  144. package/docs/scientific-validation.md +1 -1
  145. package/docs/skills-marketplace.md +1 -1
  146. package/docs/tool-usage.md +1 -1
  147. package/docs/trace-store.md +1 -1
  148. package/docs/tui-design.md +1 -1
  149. package/docs/worker-dispatch-mechanics.md +1 -1
  150. package/package.json +1 -2
  151. package/src/cli/argv.ts +5 -0
  152. package/src/cli/configure.ts +107 -23
  153. package/src/cli/doctor.ts +5 -1
  154. package/src/cli/evidence.ts +30 -25
  155. package/src/cli/fleet-preflight.ts +2 -12
  156. package/src/cli/shared.ts +1 -0
  157. package/src/cli/targets.ts +4 -1
  158. package/src/cli/validate-model.ts +60 -5
  159. package/src/core/bus-events.ts +25 -0
  160. package/src/core/commit-attribution.ts +4 -4
  161. package/src/core/path-boundary.ts +100 -0
  162. package/src/domains/agents/extension.ts +2 -11
  163. package/src/domains/agents/fleet-contract.ts +30 -12
  164. package/src/domains/agents/recipe.ts +7 -1
  165. package/src/domains/agents/registry.ts +73 -5
  166. package/src/domains/agents/result-contract.ts +128 -17
  167. package/src/domains/agents/write-boundary.ts +15 -50
  168. package/src/domains/context/project-rules.ts +51 -1
  169. package/src/domains/dispatch/assignment-reconcile.ts +22 -5
  170. package/src/domains/dispatch/assignment-store.ts +151 -14
  171. package/src/domains/dispatch/contract.ts +15 -1
  172. package/src/domains/dispatch/delegation-plan.ts +2 -5
  173. package/src/domains/dispatch/execution-role.ts +9 -1
  174. package/src/domains/dispatch/extension.ts +156 -67
  175. package/src/domains/dispatch/fleet-run.ts +57 -3
  176. package/src/domains/dispatch/gate-role-prompts.ts +38 -0
  177. package/src/domains/dispatch/index.ts +3 -1
  178. package/src/domains/dispatch/intent-requirements.ts +40 -0
  179. package/src/domains/dispatch/intent.ts +84 -8
  180. package/src/domains/dispatch/path-scope.ts +370 -0
  181. package/src/domains/dispatch/receipt-integrity.ts +2 -1
  182. package/src/domains/dispatch/types.ts +14 -7
  183. package/src/domains/dispatch/validation.ts +6 -3
  184. package/src/domains/dispatch/write-boundary-enforcer.ts +45 -0
  185. package/src/domains/dispatch/write-boundary.ts +201 -22
  186. package/src/domains/eval/metrics/evidence.ts +79 -2
  187. package/src/domains/eval/runners/clio-run.ts +12 -2
  188. package/src/domains/evidence/build.ts +69 -11
  189. package/src/domains/evidence/index.ts +21 -0
  190. package/src/domains/evidence/provenance.ts +46 -11
  191. package/src/domains/evidence/trust-projection.ts +274 -0
  192. package/src/domains/evidence/trust-status.ts +145 -17
  193. package/src/domains/evidence/types.ts +4 -0
  194. package/src/domains/extensions/discovery.ts +88 -1
  195. package/src/domains/extensions/resources.ts +20 -8
  196. package/src/domains/extensions/state.ts +6 -2
  197. package/src/domains/extensions/types.ts +4 -1
  198. package/src/domains/lifecycle/doctor.ts +140 -1
  199. package/src/domains/prompts/contract.ts +3 -5
  200. package/src/domains/providers/extension.ts +30 -2
  201. package/src/domains/resources/common-loader.ts +3 -0
  202. package/src/domains/resources/prompts/loader.ts +119 -14
  203. package/src/domains/safety/policy-engine.ts +5 -5
  204. package/src/domains/safety/run-effects.ts +64 -1
  205. package/src/domains/safety/scope.ts +7 -12
  206. package/src/engine/acp/server.ts +4 -1
  207. package/src/engine/prompt-templates.ts +18 -1
  208. package/src/engine/worker-runtime.ts +6 -3
  209. package/src/interactive/dispatch-board.ts +53 -3
  210. package/src/interactive/interactive-event-projection.ts +14 -0
  211. package/src/interactive/overlays/settings.ts +141 -47
  212. package/src/interactive/slash-commands.ts +7 -2
  213. package/src/interactive/view/artifacts.ts +42 -9
  214. package/src/interactive/view/view-overlay.ts +15 -3
  215. package/src/interactive/worker-receipts.ts +14 -2
  216. package/src/interactive/worker-stream.ts +8 -0
  217. package/src/tools/dispatch-admission.ts +12 -13
  218. package/src/tools/dispatch-arguments.ts +27 -0
  219. package/src/tools/dispatch-plan.ts +29 -0
  220. package/src/tools/dispatch-runner.ts +48 -13
  221. package/src/tools/monitor.ts +13 -0
  222. package/src/tools/worker-evidence.ts +19 -13
  223. package/src/worker/spec-contract.ts +2 -1
@@ -5,9 +5,26 @@ import {
5
5
  import {
6
6
  hashToolCall
7
7
  } from "./chunk-UOV2BYIW.js";
8
+ import {
9
+ gitTool,
10
+ verifyToolSurface
11
+ } from "./chunk-PMDBGQSJ.js";
12
+ import {
13
+ codeNavToolSurface
14
+ } from "./chunk-XN3L4EYL.js";
15
+ import {
16
+ contextToolSurface
17
+ } from "./chunk-SPULKLCF.js";
8
18
  import {
9
19
  describeDispatchPlan
10
- } from "./chunk-EELBMBT6.js";
20
+ } from "./chunk-KTYTFRMB.js";
21
+ import {
22
+ compileGlobRegex,
23
+ fallbackIgnoredDirs,
24
+ fdIgnoreArgs,
25
+ normalizeGlobInput,
26
+ rgIgnoreArgs
27
+ } from "./chunk-VG7TBQIY.js";
11
28
  import {
12
29
  RESPONSE_SCHEMA_RUNTIME_ID,
13
30
  applyToolProfile,
@@ -18,42 +35,19 @@ import {
18
35
  readMaxBytes,
19
36
  readTool,
20
37
  renderAgentLedger
21
- } from "./chunk-CEYBNUGC.js";
38
+ } from "./chunk-A3WNZD3P.js";
22
39
  import {
23
40
  createTaskBoardStore,
24
41
  taskBoardCounts
25
42
  } from "./chunk-5FR74PWO.js";
26
43
  import {
27
44
  formatModelRejection
28
- } from "./chunk-OBMAI2DP.js";
29
- import {
30
- parseAgentLedgerBody
31
- } from "./chunk-CMZWFGD2.js";
32
- import {
33
- webFetchToolSurface
34
- } from "./chunk-ZI647VB5.js";
35
- import {
36
- gitTool,
37
- verifyToolSurface
38
- } from "./chunk-JNXPYBB4.js";
39
- import {
40
- codeNavToolSurface
41
- } from "./chunk-XN3L4EYL.js";
42
- import {
43
- compileGlobRegex,
44
- fallbackIgnoredDirs,
45
- fdIgnoreArgs,
46
- normalizeGlobInput,
47
- rgIgnoreArgs
48
- } from "./chunk-VG7TBQIY.js";
45
+ } from "./chunk-5H3GB5BO.js";
49
46
  import {
50
47
  resolveReadPath,
51
48
  resolveToCwd,
52
49
  toPosixPath
53
50
  } from "./chunk-OQE5J4C6.js";
54
- import {
55
- contextToolSurface
56
- } from "./chunk-SPULKLCF.js";
57
51
  import {
58
52
  evaluateSkillToolSurface,
59
53
  skillActivationFromToolDetails
@@ -94,6 +88,12 @@ import {
94
88
  GREP_MAX_LINE_LENGTH,
95
89
  truncateLine
96
90
  } from "./chunk-OZNBF4L3.js";
91
+ import {
92
+ parseAgentLedgerBody
93
+ } from "./chunk-CMZWFGD2.js";
94
+ import {
95
+ webFetchToolSurface
96
+ } from "./chunk-ZI647VB5.js";
97
97
  import {
98
98
  truncateUtf8
99
99
  } from "./chunk-6XLNIQDB.js";
@@ -109,7 +109,10 @@ import {
109
109
  } from "./chunk-65DEGPJ6.js";
110
110
  import {
111
111
  buildSafeToolEnv
112
- } from "./chunk-D4MDIG46.js";
112
+ } from "./chunk-B5CSFE7B.js";
113
+ import {
114
+ BusChannels
115
+ } from "./chunk-TT36MB5S.js";
113
116
  import {
114
117
  GUARDRAIL_DEFAULTS,
115
118
  isWorkerToolCallCapExceededReason,
@@ -119,16 +122,13 @@ import {
119
122
  workerToolCallCapExceededReason,
120
123
  workerToolCallCapSynthesisReason
121
124
  } from "./chunk-4ZG3XFUR.js";
122
- import {
123
- StringEnum,
124
- engineStreamSimple
125
- } from "./chunk-FCSXB6T2.js";
126
125
  import {
127
126
  clioStateDir
128
127
  } from "./chunk-BNAZZHFG.js";
129
128
  import {
130
- BusChannels
131
- } from "./chunk-OB5HIGJY.js";
129
+ StringEnum,
130
+ engineStreamSimple
131
+ } from "./chunk-FCSXB6T2.js";
132
132
  import {
133
133
  init_esm_shims
134
134
  } from "./chunk-3R73A4XB.js";
@@ -5076,7 +5076,7 @@ function registerCoreTools(registry, deps = {}) {
5076
5076
  });
5077
5077
  registry.register({
5078
5078
  ...builtin(
5079
- lazyTool(verifyToolSurface, async () => (await import("./verify-BX3BRKH5.js")).verifyTool),
5079
+ lazyTool(verifyToolSurface, async () => (await import("./verify-LTDHYBGY.js")).verifyTool),
5080
5080
  { path: "src/tools/verify/index.ts", scope: "core" }
5081
5081
  )
5082
5082
  });
@@ -5107,7 +5107,7 @@ function registerCoreTools(registry, deps = {}) {
5107
5107
  registry.register({
5108
5108
  ...builtin(
5109
5109
  lazyTool(contextToolSurface, async () => {
5110
- const { createContextTool } = await import("./context-WFPKQSM6.js");
5110
+ const { createContextTool } = await import("./context-N52ZA626.js");
5111
5111
  if (!session) return createContextTool(skillToolDeps);
5112
5112
  const { probeWorkspace } = await import("./workspace-ZJ6BFM3Q.js");
5113
5113
  return createContextTool({
@@ -5205,4 +5205,4 @@ export {
5205
5205
  assertRegisteredBuiltinTools,
5206
5206
  createRegistry
5207
5207
  };
5208
- //# sourceMappingURL=chunk-QCTRSGHQ.js.map
5208
+ //# sourceMappingURL=chunk-WLFILSD5.js.map
@@ -10,17 +10,17 @@ import {
10
10
  import {
11
11
  FAILURE_CAUSE_TAGS,
12
12
  buildEvidence
13
- } from "./chunk-UUANF5CR.js";
13
+ } from "./chunk-TLQJPP24.js";
14
14
  import {
15
15
  normalizeCostProvenance
16
- } from "./chunk-VQNODYQ4.js";
16
+ } from "./chunk-7RFXX52T.js";
17
+ import {
18
+ BusChannels
19
+ } from "./chunk-TT36MB5S.js";
17
20
  import {
18
21
  clioDataDir,
19
22
  clioStateDir
20
23
  } from "./chunk-BNAZZHFG.js";
21
- import {
22
- BusChannels
23
- } from "./chunk-OB5HIGJY.js";
24
24
  import {
25
25
  init_esm_shims
26
26
  } from "./chunk-3R73A4XB.js";
@@ -802,4 +802,4 @@ export {
802
802
  ObservabilityDomainModule,
803
803
  createObservabilityDomainModule
804
804
  };
805
- //# sourceMappingURL=chunk-5UJ6ECTS.js.map
805
+ //# sourceMappingURL=chunk-WNIJTQQK.js.map
@@ -8,10 +8,7 @@ import {
8
8
  } from "./chunk-5WIGXA4T.js";
9
9
  import {
10
10
  loadMemoryRecordsSync
11
- } from "./chunk-6M7VS3J3.js";
12
- import {
13
- sha256
14
- } from "./chunk-UUANF5CR.js";
11
+ } from "./chunk-TYPGUK6W.js";
15
12
  import {
16
13
  WIKI_INDEX,
17
14
  WIKI_PLAN_FILE,
@@ -47,13 +44,16 @@ import {
47
44
  statePath,
48
45
  writeClioState
49
46
  } from "./chunk-MVVUPGPW.js";
47
+ import {
48
+ sha256
49
+ } from "./chunk-TLQJPP24.js";
50
+ import {
51
+ classifyProjectPreload
52
+ } from "./chunk-JVCV3ICN.js";
50
53
  import {
51
54
  compileGlobRegex,
52
55
  normalizeGlobInput
53
56
  } from "./chunk-VG7TBQIY.js";
54
- import {
55
- detectProjectType
56
- } from "./chunk-XAKHZX5N.js";
57
57
  import {
58
58
  computeFingerprintCached,
59
59
  isStale
@@ -62,15 +62,24 @@ import {
62
62
  codewikiPath,
63
63
  readCodewiki
64
64
  } from "./chunk-LBMZMYH2.js";
65
+ import {
66
+ detectProjectType
67
+ } from "./chunk-XAKHZX5N.js";
65
68
  import {
66
69
  enumerateWorkspaceFiles
67
70
  } from "./chunk-33YXPOE3.js";
71
+ import {
72
+ ceilChars
73
+ } from "./chunk-RWSI4YD7.js";
68
74
  import {
69
75
  INTEROP_AGENT_KINDS
70
76
  } from "./chunk-IHXBNWMM.js";
71
77
  import {
72
- ceilChars
73
- } from "./chunk-GEYXPTRF.js";
78
+ BusChannels
79
+ } from "./chunk-TT36MB5S.js";
80
+ import {
81
+ resolvePackageRoot
82
+ } from "./chunk-IWHMRKLL.js";
74
83
  import {
75
84
  require_dist
76
85
  } from "./chunk-APJ265NV.js";
@@ -78,15 +87,6 @@ import {
78
87
  clioDataDir,
79
88
  resolveClioDirs
80
89
  } from "./chunk-BNAZZHFG.js";
81
- import {
82
- BusChannels
83
- } from "./chunk-OB5HIGJY.js";
84
- import {
85
- classifyProjectPreload
86
- } from "./chunk-JVCV3ICN.js";
87
- import {
88
- resolvePackageRoot
89
- } from "./chunk-IWHMRKLL.js";
90
90
  import {
91
91
  __toESM,
92
92
  init_esm_shims
@@ -2730,11 +2730,59 @@ function ruleMatchesAnyPath(rule, workingPaths) {
2730
2730
  continue;
2731
2731
  }
2732
2732
  for (const path2 of workingPaths) {
2733
- if (regex.test(normalizeGlobInput(path2))) return true;
2733
+ const normalized = normalizeGlobInput(path2);
2734
+ if (regex.test(normalized)) return true;
2735
+ if (normalized.endsWith("/") && globMatchesInsideDirectory(regex, pattern, normalized)) return true;
2734
2736
  }
2735
2737
  }
2736
2738
  return false;
2737
2739
  }
2740
+ function materializedGlobVariants(pattern) {
2741
+ let variants = [""];
2742
+ const normalized = normalizeGlobInput(pattern);
2743
+ for (let index = 0; index < normalized.length; index += 1) {
2744
+ const character = normalized[index];
2745
+ if (character === void 0) break;
2746
+ if (character === "*" && normalized[index + 1] === "*" && normalized[index + 2] === "/") {
2747
+ variants = variants.flatMap((prefix) => [prefix, `${prefix}x/`]).slice(0, 64);
2748
+ index += 2;
2749
+ continue;
2750
+ }
2751
+ if (character === "*" && normalized[index + 1] === "*") {
2752
+ variants = variants.map((prefix) => `${prefix}x`);
2753
+ index += 1;
2754
+ continue;
2755
+ }
2756
+ if (character === "*" || character === "?") {
2757
+ variants = variants.map((prefix) => `${prefix}x`);
2758
+ continue;
2759
+ }
2760
+ if (character === "[") {
2761
+ const end = normalized.indexOf("]", index + 1);
2762
+ const selected = end === -1 ? "x" : normalized[index + 1] ?? "x";
2763
+ variants = variants.map((prefix) => `${prefix}${selected}`);
2764
+ index = end === -1 ? index : end;
2765
+ continue;
2766
+ }
2767
+ variants = variants.map((prefix) => `${prefix}${character}`);
2768
+ }
2769
+ return variants;
2770
+ }
2771
+ function globMatchesInsideDirectory(regex, pattern, directory) {
2772
+ const candidates = /* @__PURE__ */ new Set([`${directory}x`, `${directory}x/x`]);
2773
+ for (const materialized of materializedGlobVariants(pattern)) {
2774
+ if (materialized.startsWith(directory)) candidates.add(materialized);
2775
+ const segments = materialized.split("/");
2776
+ for (let index = 0; index < segments.length; index += 1) {
2777
+ const suffix = segments.slice(index).join("/");
2778
+ if (suffix.length > 0) candidates.add(`${directory}${suffix}`);
2779
+ }
2780
+ for (let index = 0; index < materialized.length; index += 1) {
2781
+ candidates.add(`${directory}${materialized.slice(index)}`);
2782
+ }
2783
+ }
2784
+ return [...candidates].some((candidate) => regex.test(candidate));
2785
+ }
2738
2786
  function selectActiveRules(rules, workingContextPaths) {
2739
2787
  return rules.filter((rule) => {
2740
2788
  if (!rule.enabled) return false;
@@ -4157,4 +4205,4 @@ export {
4157
4205
  buildWikiPlanPrompt,
4158
4206
  buildWikiPagePrompt
4159
4207
  };
4160
- //# sourceMappingURL=chunk-4DWFMQDR.js.map
4208
+ //# sourceMappingURL=chunk-WSB3FPX7.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
  loadSkills
4
- } from "./chunk-C4JBQ5SR.js";
4
+ } from "./chunk-TANS5ZJS.js";
5
5
  import {
6
6
  getVersionInfo
7
7
  } from "./chunk-XPLRXC72.js";
@@ -9,13 +9,13 @@ import {
9
9
  detectInteropAgents,
10
10
  fingerprintNativeRuntime,
11
11
  resolveOnPath
12
- } from "./chunk-SROCI7ZU.js";
12
+ } from "./chunk-GPIEI3LY.js";
13
13
  import {
14
14
  initializeClioHome
15
- } from "./chunk-DOOEX22V.js";
15
+ } from "./chunk-XWSF374K.js";
16
16
  import {
17
- openAuthStorage
18
- } from "./chunk-JRIO5UD2.js";
17
+ credentialsPresent
18
+ } from "./chunk-LU7P4LHA.js";
19
19
  import {
20
20
  interopAgentKind
21
21
  } from "./chunk-IHXBNWMM.js";
@@ -23,10 +23,15 @@ import {
23
23
  formatSettingsIssues,
24
24
  readSettings,
25
25
  validateSettingsFile
26
- } from "./chunk-UHXRNZ2J.js";
26
+ } from "./chunk-IJ7RPIYJ.js";
27
27
  import {
28
28
  readSessionFileEntries
29
- } from "./chunk-FO5ZOVUY.js";
29
+ } from "./chunk-3BINW3FP.js";
30
+ import {
31
+ openAuthStorage,
32
+ resolveAuthTarget,
33
+ targetRequiresAuth
34
+ } from "./chunk-EQ63NRB7.js";
30
35
  import {
31
36
  clioStatePath,
32
37
  resolveClioDirs
@@ -337,7 +342,7 @@ async function runDoctorFleetChecks(projectRoot = process.cwd()) {
337
342
  }
338
343
  const nodes = settings.fleet?.nodes ?? [];
339
344
  if (nodes.length === 0) return [];
340
- const { recordFleetPreflight, runFleetNodePreflight } = await import("./fleet-preflight-BHSNPBMH.js");
345
+ const { recordFleetPreflight, runFleetNodePreflight } = await import("./fleet-preflight-J53T6CCE.js");
341
346
  const targets = (settings.targets ?? []).map((target) => ({
342
347
  id: target.id,
343
348
  runtimeId: target.runtime,
@@ -425,6 +430,102 @@ async function runDoctorRuntimeChecks() {
425
430
  );
426
431
  return results.filter((finding) => finding !== null);
427
432
  }
433
+ function configuredModelRoles(settings, target) {
434
+ const roles = [];
435
+ if (target.defaultModel) roles.push({ role: "defaultModel", model: target.defaultModel });
436
+ if (settings.orchestrator.target === target.id && settings.orchestrator.model) {
437
+ roles.push({ role: "orchestrator.model", model: settings.orchestrator.model });
438
+ }
439
+ if (settings.background.target === target.id && settings.background.model) {
440
+ roles.push({ role: "background.model", model: settings.background.model });
441
+ }
442
+ if (settings.workers.default.target === target.id && settings.workers.default.model) {
443
+ roles.push({ role: "workers.default.model", model: settings.workers.default.model });
444
+ }
445
+ return roles;
446
+ }
447
+ var DOCTOR_MODEL_PROBE_TIMEOUT_MS = 2500;
448
+ async function doctorProbeContext(target, runtime) {
449
+ const ctx = { credentialsPresent: credentialsPresent(), httpTimeoutMs: DOCTOR_MODEL_PROBE_TIMEOUT_MS };
450
+ if (!targetRequiresAuth(target, runtime)) return ctx;
451
+ try {
452
+ const resolution = await openAuthStorage().resolveForTarget(resolveAuthTarget(target, runtime), {
453
+ includeFallback: false
454
+ });
455
+ if (resolution.apiKey) ctx.authToken = resolution.apiKey;
456
+ } catch {
457
+ }
458
+ return ctx;
459
+ }
460
+ async function probeAdvertisedModels(target, runtime) {
461
+ if (runtime.kind !== "http" || typeof runtime.probe !== "function" || !target.url) return null;
462
+ let probe;
463
+ try {
464
+ probe = await runtime.probe(target, await doctorProbeContext(target, runtime));
465
+ } catch {
466
+ return null;
467
+ }
468
+ if (!probe.ok || !probe.models || probe.models.length === 0) return null;
469
+ const advertised = [...probe.models];
470
+ const resident = [];
471
+ for (const [id, status] of Object.entries(probe.modelStates ?? {})) {
472
+ if (!advertised.includes(id)) advertised.push(id);
473
+ if (status.state === "loaded" || status.state === "loading") resident.push(id);
474
+ }
475
+ return { advertised, resident };
476
+ }
477
+ async function runDoctorModelChecks() {
478
+ let settings;
479
+ try {
480
+ settings = readSettings();
481
+ } catch {
482
+ return [];
483
+ }
484
+ if (settings.targets.length === 0) return [];
485
+ const [{ getRuntimeRegistry }, { registerBuiltinRuntimes }, { listKnownModelsForRuntime }] = await Promise.all([
486
+ import("./registry-LG64LTF4.js"),
487
+ import("./builtins-C6JMZVV6.js"),
488
+ import("./support-MIETYA5E.js")
489
+ ]);
490
+ const registry = getRuntimeRegistry();
491
+ if (registry.list().length === 0) registerBuiltinRuntimes(registry);
492
+ const results = await Promise.all(
493
+ settings.targets.map(async (target) => {
494
+ const runtime = registry.get(target.runtime);
495
+ if (!runtime) return null;
496
+ if (listKnownModelsForRuntime(runtime.id).length > 0) return null;
497
+ const roles = configuredModelRoles(settings, target);
498
+ if (roles.length === 0) return null;
499
+ const live = await probeAdvertisedModels(target, runtime);
500
+ const recorded = target.wireModels ?? [];
501
+ if (live === null && recorded.length === 0) {
502
+ return {
503
+ ok: true,
504
+ level: "warn",
505
+ name: `model ${target.id}`,
506
+ detail: `${roles.map((entry) => `${entry.role} '${entry.model}'`).join(", ")} could not be verified: the target did not answer and configure recorded no model list; run \`clio-coder targets --probe\` once it is up`
507
+ };
508
+ }
509
+ const advertised = live ? live.advertised : recorded;
510
+ const source = live ? `advertised by ${target.url ?? target.id} now` : "recorded by configure at last save";
511
+ const missing = roles.filter((entry) => !advertised.includes(entry.model));
512
+ if (missing.length === 0) {
513
+ return {
514
+ ok: true,
515
+ name: `model ${target.id}`,
516
+ detail: `${roles.map((entry) => `${entry.role} '${entry.model}'`).join(", ")} ${source}`
517
+ };
518
+ }
519
+ const resident = live && live.resident.length > 0 ? live.resident.join(", ") : live ? "none" : "unknown";
520
+ return {
521
+ ok: false,
522
+ name: `model ${target.id}`,
523
+ detail: `${missing.map((entry) => `${entry.role} '${entry.model}'`).join(", ")} not ${source} (${advertised.length} ids). Resident instances: ${resident}. Re-run \`clio-coder configure --id ${target.id} --model <advertised id>\`; \`clio-coder targets --probe\` lists them`
524
+ };
525
+ })
526
+ );
527
+ return results.filter((finding) => finding !== null);
528
+ }
428
529
 
429
530
  export {
430
531
  readStateInfo,
@@ -435,6 +536,7 @@ export {
435
536
  formatDoctorReport,
436
537
  runDoctorFleetChecks,
437
538
  runDoctorInteropChecks,
438
- runDoctorRuntimeChecks
539
+ runDoctorRuntimeChecks,
540
+ runDoctorModelChecks
439
541
  };
440
- //# sourceMappingURL=chunk-3HAPLH5M.js.map
542
+ //# sourceMappingURL=chunk-WWCZ5F23.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ZGVHUX3M.js";
5
5
  import {
6
6
  BusChannels
7
- } from "./chunk-OB5HIGJY.js";
7
+ } from "./chunk-TT36MB5S.js";
8
8
  import {
9
9
  init_esm_shims
10
10
  } from "./chunk-3R73A4XB.js";
@@ -226,4 +226,4 @@ export {
226
226
  runWithBudget,
227
227
  getTerminationCoordinator
228
228
  };
229
- //# sourceMappingURL=chunk-X2KV5FXT.js.map
229
+ //# sourceMappingURL=chunk-WXY7KU3G.js.map
@@ -15,6 +15,10 @@ function printError(message, detail) {
15
15
  if (detail) process.stderr.write(` ${detail}
16
16
  `);
17
17
  }
18
+ function printNote(message) {
19
+ process.stderr.write(`${source_default.yellow("note:")} ${message}
20
+ `);
21
+ }
18
22
  function printOk(message) {
19
23
  process.stdout.write(`${source_default.green("ok:")} ${message}
20
24
  `);
@@ -138,6 +142,7 @@ function extractGlobalFlags(argv, isSubcommand = () => false) {
138
142
 
139
143
  export {
140
144
  printError,
145
+ printNote,
141
146
  printOk,
142
147
  printHeader,
143
148
  columnWidths,
@@ -147,4 +152,4 @@ export {
147
152
  globalFlagPositionHint,
148
153
  extractGlobalFlags
149
154
  };
150
- //# sourceMappingURL=chunk-PPAMZ32Z.js.map
155
+ //# sourceMappingURL=chunk-XK56QHLX.js.map
@@ -1,4 +1,7 @@
1
1
  import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
+ import {
3
+ readClioVersion
4
+ } from "./chunk-IWHMRKLL.js";
2
5
  import {
3
6
  DEFAULT_SETTINGS_YAML
4
7
  } from "./chunk-4DGYLA73.js";
@@ -9,9 +12,6 @@ import {
9
12
  clioStateDir,
10
13
  resolveClioDirs
11
14
  } from "./chunk-BNAZZHFG.js";
12
- import {
13
- readClioVersion
14
- } from "./chunk-IWHMRKLL.js";
15
15
  import {
16
16
  init_esm_shims
17
17
  } from "./chunk-3R73A4XB.js";
@@ -143,4 +143,4 @@ function enforceHomePrefixGuard() {
143
143
  export {
144
144
  initializeClioHome
145
145
  };
146
- //# sourceMappingURL=chunk-DOOEX22V.js.map
146
+ //# sourceMappingURL=chunk-XWSF374K.js.map
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
- import {
3
- probeWorkspace
4
- } from "./chunk-HVDIIIQW.js";
5
2
  import {
6
3
  entryBelongsToPath
7
4
  } from "./chunk-W6GROXXM.js";
5
+ import {
6
+ probeWorkspace
7
+ } from "./chunk-HVDIIIQW.js";
8
8
  import {
9
9
  isSessionEntry,
10
10
  isSessionHeader
@@ -15,6 +15,9 @@ import {
15
15
  import {
16
16
  stripTokenizerSentinels
17
17
  } from "./chunk-CFGTUFWB.js";
18
+ import {
19
+ BusChannels
20
+ } from "./chunk-TT36MB5S.js";
18
21
  import {
19
22
  CURRENT_SESSION_FORMAT_VERSION,
20
23
  appendSessionFileEntry,
@@ -26,14 +29,11 @@ import {
26
29
  readSessionMeta,
27
30
  resumeSession,
28
31
  sessionPaths
29
- } from "./chunk-FO5ZOVUY.js";
32
+ } from "./chunk-3BINW3FP.js";
30
33
  import {
31
34
  clioStateDir,
32
35
  stateRootRemoved
33
36
  } from "./chunk-BNAZZHFG.js";
34
- import {
35
- BusChannels
36
- } from "./chunk-OB5HIGJY.js";
37
37
  import {
38
38
  init_esm_shims
39
39
  } from "./chunk-3R73A4XB.js";
@@ -1475,4 +1475,4 @@ export {
1475
1475
  ledgerUsageCalls,
1476
1476
  SessionDomainModule
1477
1477
  };
1478
- //# sourceMappingURL=chunk-6TUKSZVF.js.map
1478
+ //# sourceMappingURL=chunk-YS5VLNH5.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-W6GROXXM.js";
15
15
  import {
16
16
  ceilChars
17
- } from "./chunk-GEYXPTRF.js";
17
+ } from "./chunk-RWSI4YD7.js";
18
18
  import {
19
19
  init_esm_shims
20
20
  } from "./chunk-3R73A4XB.js";
@@ -119,4 +119,4 @@ export {
119
119
  recallableRefListing,
120
120
  recallErrorMessage
121
121
  };
122
- //# sourceMappingURL=chunk-ZZMN5OM4.js.map
122
+ //# sourceMappingURL=chunk-ZNLWCMVZ.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
  ceilChars
4
- } from "./chunk-GEYXPTRF.js";
4
+ } from "./chunk-RWSI4YD7.js";
5
5
  import {
6
6
  clioStateDir
7
7
  } from "./chunk-BNAZZHFG.js";
@@ -616,4 +616,4 @@ export {
616
616
  createTaskMemoryTelemetrySink,
617
617
  taskMemoryBankDelta
618
618
  };
619
- //# sourceMappingURL=chunk-WHGPSPT5.js.map
619
+ //# sourceMappingURL=chunk-ZVJ5BLO2.js.map