@skaile/workspaces 4.11.0 → 4.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/{asset-feeds-3TOP4ZKE.js → asset-feeds-AAQOGRLM.js} +14 -13
  3. package/dist/asset-feeds-AAQOGRLM.js.map +1 -0
  4. package/dist/asset-manager/catalog-deployer.js +10 -9
  5. package/dist/asset-manager/index.js +14 -13
  6. package/dist/asset-manager/installer.js +10 -9
  7. package/dist/bridge/drivers/claude-sdk.js +229 -26
  8. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  9. package/dist/bridge/drivers/codex.js +12 -11
  10. package/dist/bridge/drivers/codex.js.map +1 -1
  11. package/dist/bridge/drivers/continue.js +14 -12
  12. package/dist/bridge/drivers/continue.js.map +1 -1
  13. package/dist/bridge/drivers/echo.js +11 -8
  14. package/dist/bridge/drivers/echo.js.map +1 -1
  15. package/dist/bridge/drivers/gemini.js +10 -8
  16. package/dist/bridge/drivers/goose.js +13 -11
  17. package/dist/bridge/drivers/goose.js.map +1 -1
  18. package/dist/bridge/drivers/omp.js +8 -6
  19. package/dist/bridge/drivers/omp.js.map +1 -1
  20. package/dist/bridge/drivers/opencode.js +15 -12
  21. package/dist/bridge/drivers/opencode.js.map +1 -1
  22. package/dist/bridge/drivers/qwen.js +10 -8
  23. package/dist/bridge/drivers/qwen.js.map +1 -1
  24. package/dist/bridge/index.js +14 -13
  25. package/dist/bridge/src/cloud.d.ts.map +1 -1
  26. package/dist/bridge/src/drivers/claude-sdk.d.ts +18 -1
  27. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  28. package/dist/bridge/src/drivers/echo.d.ts.map +1 -1
  29. package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -1
  30. package/dist/bridge/src/mcp-tool-schema-filter.d.ts +44 -0
  31. package/dist/bridge/src/mcp-tool-schema-filter.d.ts.map +1 -0
  32. package/dist/bridge/src/provider-materialize/continue-config-yaml.d.ts.map +1 -1
  33. package/dist/bridge/src/provider-materialize/env-drivers.d.ts +20 -5
  34. package/dist/bridge/src/provider-materialize/env-drivers.d.ts.map +1 -1
  35. package/dist/bridge/src/provider-materialize/opencode-config.d.ts.map +1 -1
  36. package/dist/bridge/src/types.d.ts +6 -2
  37. package/dist/bridge/src/types.d.ts.map +1 -1
  38. package/dist/{chunk-MKZOK4JU.js → chunk-2FBPAR2V.js} +3 -3
  39. package/dist/{chunk-MKZOK4JU.js.map → chunk-2FBPAR2V.js.map} +1 -1
  40. package/dist/{chunk-CJXSTOGW.js → chunk-4JGTXBQB.js} +4 -4
  41. package/dist/{chunk-CJXSTOGW.js.map → chunk-4JGTXBQB.js.map} +1 -1
  42. package/dist/{chunk-OUJVFZWJ.js → chunk-4SIMGJIU.js} +4 -9
  43. package/dist/chunk-4SIMGJIU.js.map +1 -0
  44. package/dist/{chunk-AT2TJEWG.js → chunk-65VAYFIJ.js} +11 -11
  45. package/dist/chunk-65VAYFIJ.js.map +1 -0
  46. package/dist/{chunk-JM2LRJ46.js → chunk-6Y3ICAPP.js} +3 -3
  47. package/dist/{chunk-JM2LRJ46.js.map → chunk-6Y3ICAPP.js.map} +1 -1
  48. package/dist/{chunk-7IRJ4K4F.js → chunk-7IH3RKKK.js} +3 -3
  49. package/dist/{chunk-7IRJ4K4F.js.map → chunk-7IH3RKKK.js.map} +1 -1
  50. package/dist/{chunk-JECDED7B.js → chunk-7NRF7BQB.js} +5 -5
  51. package/dist/{chunk-JECDED7B.js.map → chunk-7NRF7BQB.js.map} +1 -1
  52. package/dist/{chunk-O3DHAGBO.js → chunk-A2T4WIZL.js} +6 -5
  53. package/dist/chunk-A2T4WIZL.js.map +1 -0
  54. package/dist/chunk-ALLCAFHQ.js +365 -0
  55. package/dist/chunk-ALLCAFHQ.js.map +1 -0
  56. package/dist/chunk-BDFR5MHE.js +141 -0
  57. package/dist/chunk-BDFR5MHE.js.map +1 -0
  58. package/dist/{chunk-W4IPN3DD.js → chunk-BOFL7GIF.js} +62 -10
  59. package/dist/chunk-BOFL7GIF.js.map +1 -0
  60. package/dist/{chunk-WXB6YEHZ.js → chunk-BRNGJTHH.js} +3 -3
  61. package/dist/{chunk-WXB6YEHZ.js.map → chunk-BRNGJTHH.js.map} +1 -1
  62. package/dist/chunk-C3CAXQMA.js +8 -0
  63. package/dist/chunk-C3CAXQMA.js.map +1 -0
  64. package/dist/{chunk-35PMOWAD.js → chunk-CPIAQTYM.js} +4 -4
  65. package/dist/chunk-CPIAQTYM.js.map +1 -0
  66. package/dist/{chunk-REYJKU7T.js → chunk-DHMBE5J7.js} +12 -364
  67. package/dist/chunk-DHMBE5J7.js.map +1 -0
  68. package/dist/{chunk-KSIRR5PL.js → chunk-DPLIN2RA.js} +3 -3
  69. package/dist/{chunk-KSIRR5PL.js.map → chunk-DPLIN2RA.js.map} +1 -1
  70. package/dist/{chunk-PBCNRS7Q.js → chunk-EUHB2BD2.js} +6 -6
  71. package/dist/{chunk-PBCNRS7Q.js.map → chunk-EUHB2BD2.js.map} +1 -1
  72. package/dist/{chunk-6XKQEDF7.js → chunk-FKWGIDUG.js} +6 -5
  73. package/dist/chunk-FKWGIDUG.js.map +1 -0
  74. package/dist/{chunk-ILG4BXYE.js → chunk-GZZPKAV5.js} +27 -3
  75. package/dist/chunk-GZZPKAV5.js.map +1 -0
  76. package/dist/{chunk-M5H4DWIA.js → chunk-HGPSZXZP.js} +3 -3
  77. package/dist/{chunk-M5H4DWIA.js.map → chunk-HGPSZXZP.js.map} +1 -1
  78. package/dist/{chunk-L3PZINDD.js → chunk-HXTBOZL6.js} +8 -8
  79. package/dist/{chunk-L3PZINDD.js.map → chunk-HXTBOZL6.js.map} +1 -1
  80. package/dist/{chunk-IGGHUTOW.js → chunk-HZBRHZPI.js} +4 -4
  81. package/dist/{chunk-IGGHUTOW.js.map → chunk-HZBRHZPI.js.map} +1 -1
  82. package/dist/{chunk-VLXODO37.js → chunk-IQFSXFYG.js} +3 -3
  83. package/dist/{chunk-VLXODO37.js.map → chunk-IQFSXFYG.js.map} +1 -1
  84. package/dist/{chunk-3HKYCT2M.js → chunk-JMKB7IB4.js} +4 -6
  85. package/dist/chunk-JMKB7IB4.js.map +1 -0
  86. package/dist/{chunk-S2MT6SDZ.js → chunk-KTSV5TDX.js} +107 -48
  87. package/dist/chunk-KTSV5TDX.js.map +1 -0
  88. package/dist/{chunk-IECQMSQ5.js → chunk-KUH4EKQQ.js} +4 -129
  89. package/dist/chunk-KUH4EKQQ.js.map +1 -0
  90. package/dist/{chunk-3YTFHHMI.js → chunk-LCKZCLXA.js} +3 -3
  91. package/dist/{chunk-3YTFHHMI.js.map → chunk-LCKZCLXA.js.map} +1 -1
  92. package/dist/{chunk-GXACG5ZE.js → chunk-N6XJGVSK.js} +50 -41
  93. package/dist/chunk-N6XJGVSK.js.map +1 -0
  94. package/dist/{chunk-SIGVAFRJ.js → chunk-NC7YSNBP.js} +10 -10
  95. package/dist/{chunk-SIGVAFRJ.js.map → chunk-NC7YSNBP.js.map} +1 -1
  96. package/dist/{chunk-UXUDNBJM.js → chunk-NKRAHM7T.js} +3 -3
  97. package/dist/{chunk-UXUDNBJM.js.map → chunk-NKRAHM7T.js.map} +1 -1
  98. package/dist/{chunk-WILO77HE.js → chunk-NXTLDFLA.js} +4 -4
  99. package/dist/{chunk-WILO77HE.js.map → chunk-NXTLDFLA.js.map} +1 -1
  100. package/dist/{chunk-FAI2SMFE.js → chunk-P2DLXBZK.js} +4 -4
  101. package/dist/{chunk-FAI2SMFE.js.map → chunk-P2DLXBZK.js.map} +1 -1
  102. package/dist/{chunk-2HUQUTJ3.js → chunk-PE3A6FFW.js} +4 -4
  103. package/dist/{chunk-2HUQUTJ3.js.map → chunk-PE3A6FFW.js.map} +1 -1
  104. package/dist/{chunk-DMUY5C3X.js → chunk-PHURDPQO.js} +10 -8
  105. package/dist/chunk-PHURDPQO.js.map +1 -0
  106. package/dist/{chunk-3T5DRUNZ.js → chunk-PQF3NDQH.js} +5 -5
  107. package/dist/{chunk-3T5DRUNZ.js.map → chunk-PQF3NDQH.js.map} +1 -1
  108. package/dist/{chunk-7BUZQVRR.js → chunk-Q6NDQ6BH.js} +4 -4
  109. package/dist/{chunk-7BUZQVRR.js.map → chunk-Q6NDQ6BH.js.map} +1 -1
  110. package/dist/{chunk-HO4UO25I.js → chunk-QWGSKDD7.js} +91 -7
  111. package/dist/chunk-QWGSKDD7.js.map +1 -0
  112. package/dist/{chunk-2D5BYAL6.js → chunk-RQLL7L72.js} +3 -3
  113. package/dist/{chunk-2D5BYAL6.js.map → chunk-RQLL7L72.js.map} +1 -1
  114. package/dist/{chunk-3XXQPHGL.js → chunk-T3YUSWVK.js} +4 -4
  115. package/dist/{chunk-3XXQPHGL.js.map → chunk-T3YUSWVK.js.map} +1 -1
  116. package/dist/{chunk-MMLXSVQ3.js → chunk-UOJW2DOZ.js} +5 -5
  117. package/dist/{chunk-MMLXSVQ3.js.map → chunk-UOJW2DOZ.js.map} +1 -1
  118. package/dist/{chunk-ELPR5XBG.js → chunk-V4RGCKYC.js} +5 -3
  119. package/dist/chunk-V4RGCKYC.js.map +1 -0
  120. package/dist/{chunk-UKJMQZV6.js → chunk-VOEBLPXO.js} +2 -2
  121. package/dist/chunk-VOEBLPXO.js.map +1 -0
  122. package/dist/{chunk-7SNYWCQS.js → chunk-WIQDBNMF.js} +3 -3
  123. package/dist/{chunk-7SNYWCQS.js.map → chunk-WIQDBNMF.js.map} +1 -1
  124. package/dist/{chunk-A3X4LDOD.js → chunk-WQPLZUXU.js} +6 -6
  125. package/dist/{chunk-A3X4LDOD.js.map → chunk-WQPLZUXU.js.map} +1 -1
  126. package/dist/{chunk-7ZJXFQ42.js → chunk-WZQWZJYL.js} +3 -3
  127. package/dist/{chunk-7ZJXFQ42.js.map → chunk-WZQWZJYL.js.map} +1 -1
  128. package/dist/{chunk-BXV6RLF4.js → chunk-XKPFQ3JT.js} +4 -4
  129. package/dist/{chunk-BXV6RLF4.js.map → chunk-XKPFQ3JT.js.map} +1 -1
  130. package/dist/{chunk-KLMXMW6Z.js → chunk-XPDB4O4H.js} +3 -3
  131. package/dist/{chunk-KLMXMW6Z.js.map → chunk-XPDB4O4H.js.map} +1 -1
  132. package/dist/{chunk-GUZNTYHE.js → chunk-YXUVOWEU.js} +4 -4
  133. package/dist/{chunk-GUZNTYHE.js.map → chunk-YXUVOWEU.js.map} +1 -1
  134. package/dist/{chunk-I3UWSGEB.js → chunk-ZK7DQRB2.js} +3 -3
  135. package/dist/{chunk-I3UWSGEB.js.map → chunk-ZK7DQRB2.js.map} +1 -1
  136. package/dist/{chunk-KJM7Y2FW.js → chunk-ZUOZV7CS.js} +7 -7
  137. package/dist/{chunk-KJM7Y2FW.js.map → chunk-ZUOZV7CS.js.map} +1 -1
  138. package/dist/cli/index.js +76 -69
  139. package/dist/cli/index.js.map +1 -1
  140. package/dist/cli/src/commands/migrate-legacy-entry.d.ts.map +1 -1
  141. package/dist/cli/src/commands/project.d.ts.map +1 -1
  142. package/dist/cli/src/store-auth.d.ts.map +1 -1
  143. package/dist/connectors/config.js +5 -13
  144. package/dist/connectors/index.js +22 -20
  145. package/dist/connectors/src/config.d.ts.map +1 -1
  146. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  147. package/dist/connectors/src/materialized-connectors.d.ts.map +1 -1
  148. package/dist/connectors/src/secrets.d.ts.map +1 -1
  149. package/dist/core/index.js +9 -8
  150. package/dist/core/logging.js +3 -2
  151. package/dist/core/manifest.js +2 -2
  152. package/dist/core/provider-registry-credentials.js +2 -2
  153. package/dist/core/provider-registry.js +1 -1
  154. package/dist/core/runtime-assets.js +5 -4
  155. package/dist/core/src/index.d.ts +3 -3
  156. package/dist/core/src/index.d.ts.map +1 -1
  157. package/dist/core/src/logging/create-logger.d.ts.map +1 -1
  158. package/dist/core/src/logging/index.d.ts +1 -0
  159. package/dist/core/src/logging/index.d.ts.map +1 -1
  160. package/dist/core/src/logging/redact.d.ts +33 -0
  161. package/dist/core/src/logging/redact.d.ts.map +1 -0
  162. package/dist/core/src/logging/retention-value.d.ts +7 -0
  163. package/dist/core/src/logging/retention-value.d.ts.map +1 -0
  164. package/dist/core/src/logging/retention.d.ts.map +1 -1
  165. package/dist/core/src/logging/sanitize.d.ts +11 -0
  166. package/dist/core/src/logging/sanitize.d.ts.map +1 -1
  167. package/dist/core/src/provider-registry.d.ts +22 -0
  168. package/dist/core/src/provider-registry.d.ts.map +1 -1
  169. package/dist/core/src/workspace-config.d.ts +51 -2
  170. package/dist/core/src/workspace-config.d.ts.map +1 -1
  171. package/dist/core/workspace-config.js +4 -3
  172. package/dist/deploy/index.js +9 -8
  173. package/dist/deploy/index.js.map +1 -1
  174. package/dist/discovery/index.js +3 -3
  175. package/dist/{ensure-sources-2OC2X3ZM.js → ensure-sources-PSWARJPK.js} +17 -16
  176. package/dist/ensure-sources-PSWARJPK.js.map +1 -0
  177. package/dist/factory-assets/connectors/box.js +22 -20
  178. package/dist/factory-assets/connectors/deploy.js +22 -20
  179. package/dist/factory-assets/connectors/devserver.js +22 -20
  180. package/dist/factory-assets/connectors/flow/CONNECTOR.md +4 -2
  181. package/dist/factory-assets/connectors/flow/adapter.js +22 -20
  182. package/dist/factory-assets/connectors/flow/contract/schema.d.ts +12 -0
  183. package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
  184. package/dist/factory-assets/connectors/flow/contract.js +4 -3
  185. package/dist/factory-assets/connectors/flow/engine/node-shape.d.ts.map +1 -1
  186. package/dist/factory-assets/connectors/flow/engine.js +13 -11
  187. package/dist/factory-assets/connectors/flow/prompt-fragments.js +3 -2
  188. package/dist/factory-assets/connectors/flow/run-flow.js +24 -22
  189. package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts.map +1 -1
  190. package/dist/factory-assets/connectors/flow.js +22 -20
  191. package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
  192. package/dist/factory-assets/connectors/git.js +22 -20
  193. package/dist/factory-assets/connectors/gmail.js +22 -20
  194. package/dist/factory-assets/connectors/googledrive.js +22 -20
  195. package/dist/factory-assets/connectors/local.js +22 -20
  196. package/dist/factory-assets/connectors/mattermost.js +22 -20
  197. package/dist/factory-assets/connectors/memory.js +22 -20
  198. package/dist/factory-assets/connectors/minio.js +22 -20
  199. package/dist/factory-assets/connectors/postgres.js +22 -20
  200. package/dist/factory-assets/connectors/s3.js +22 -20
  201. package/dist/factory-assets/connectors/sharepoint.js +22 -20
  202. package/dist/factory-assets/connectors/sqlite.js +22 -20
  203. package/dist/factory-assets/connectors/static-server.js +22 -20
  204. package/dist/factory-assets/connectors/tunnel.js +22 -20
  205. package/dist/factory-assets/connectors/webdav.js +22 -20
  206. package/dist/factory-assets/connectors/xstate-store.js +22 -20
  207. package/dist/factory-assets/connectors/xstate.js +22 -20
  208. package/dist/flows-7EB63Q2Q.js +24 -0
  209. package/dist/{flows-H6FL4NZU.js.map → flows-7EB63Q2Q.js.map} +1 -1
  210. package/dist/{helpers-RPJUSSG3.js → helpers-LHHGL2NL.js} +17 -16
  211. package/dist/{helpers-RPJUSSG3.js.map → helpers-LHHGL2NL.js.map} +1 -1
  212. package/dist/library/index.js +12 -11
  213. package/dist/library/install.js +1 -15
  214. package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
  215. package/dist/{library-publish-AAD6GTIF.js → library-publish-4SBO437O.js} +24 -22
  216. package/dist/library-publish-4SBO437O.js.map +1 -0
  217. package/dist/open-library-SF2F7NDS.js +37 -0
  218. package/dist/{open-library-HDOM4MLS.js.map → open-library-SF2F7NDS.js.map} +1 -1
  219. package/dist/paths-IK6Y4OIU.js +20 -0
  220. package/dist/{paths-RL6NZW5X.js.map → paths-IK6Y4OIU.js.map} +1 -1
  221. package/dist/{plugin-store-ZTAJCMTY.js → plugin-store-LUJ4GXSO.js} +11 -10
  222. package/dist/plugin-store-LUJ4GXSO.js.map +1 -0
  223. package/dist/{project-2B52FKAY.js → project-ZHPOPJBE.js} +18 -17
  224. package/dist/{project-2B52FKAY.js.map → project-ZHPOPJBE.js.map} +1 -1
  225. package/dist/resolver/index.js +10 -9
  226. package/dist/run-group-engine/index.js.map +1 -1
  227. package/dist/run-group-engine/src/rollup.d.ts.map +1 -1
  228. package/dist/runner/index.js +33 -31
  229. package/dist/runner/src/capability-registry.d.ts +13 -1
  230. package/dist/runner/src/capability-registry.d.ts.map +1 -1
  231. package/dist/runner/src/codex-init.d.ts.map +1 -1
  232. package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
  233. package/dist/runner/src/compaction/strategy.d.ts +8 -5
  234. package/dist/runner/src/compaction/strategy.d.ts.map +1 -1
  235. package/dist/runner/src/lifecycle-handler.d.ts.map +1 -1
  236. package/dist/runner/src/log-content.d.ts +22 -0
  237. package/dist/runner/src/log-content.d.ts.map +1 -0
  238. package/dist/runner/src/logging-bootstrap.d.ts +6 -1
  239. package/dist/runner/src/logging-bootstrap.d.ts.map +1 -1
  240. package/dist/runner/src/serve.d.ts.map +1 -1
  241. package/dist/runner/src/session-builder.d.ts.map +1 -1
  242. package/dist/sdk/asset-manager.js +14 -13
  243. package/dist/sdk/bridge.js +14 -13
  244. package/dist/sdk/core.js +9 -8
  245. package/dist/sdk/flow.js +13 -11
  246. package/dist/sdk/index.js +33 -31
  247. package/dist/sdk/index.js.map +1 -1
  248. package/dist/sdk/resolver.js +10 -9
  249. package/dist/sdk/runner.js +33 -31
  250. package/dist/{setup-MVBITSVT.js → setup-3NXXR7SH.js} +23 -22
  251. package/dist/setup-3NXXR7SH.js.map +1 -0
  252. package/dist/skills-YB5RHUAT.js +24 -0
  253. package/dist/{skills-Y6MU2NRI.js.map → skills-YB5RHUAT.js.map} +1 -1
  254. package/dist/source-C2OYNI3T.js +38 -0
  255. package/dist/{source-53PY7DXF.js.map → source-C2OYNI3T.js.map} +1 -1
  256. package/dist/{source-manifest-publish-ALRZKEBO.js → source-manifest-publish-BKS763DB.js} +25 -23
  257. package/dist/source-manifest-publish-BKS763DB.js.map +1 -0
  258. package/dist/tui/index.js +33 -31
  259. package/dist/tui/index.js.map +1 -1
  260. package/dist/types/src/manifests/preset.d.ts +5 -5
  261. package/dist/workspace-plugin/adapters/mcp.js +15 -14
  262. package/dist/workspace-plugin/adapters/omp.js +7 -7
  263. package/dist/workspace-plugin/adapters/omp.js.map +1 -1
  264. package/dist/workspace-plugin/index.js +4 -3
  265. package/dist/workspace-plugin/src/adapters/omp.d.ts.map +1 -1
  266. package/package.json +3 -1
  267. package/dist/asset-feeds-3TOP4ZKE.js.map +0 -1
  268. package/dist/chunk-35PMOWAD.js.map +0 -1
  269. package/dist/chunk-3HKYCT2M.js.map +0 -1
  270. package/dist/chunk-6XKQEDF7.js.map +0 -1
  271. package/dist/chunk-AT2TJEWG.js.map +0 -1
  272. package/dist/chunk-DMUY5C3X.js.map +0 -1
  273. package/dist/chunk-ELPR5XBG.js.map +0 -1
  274. package/dist/chunk-GXACG5ZE.js.map +0 -1
  275. package/dist/chunk-HO4UO25I.js.map +0 -1
  276. package/dist/chunk-IECQMSQ5.js.map +0 -1
  277. package/dist/chunk-ILG4BXYE.js.map +0 -1
  278. package/dist/chunk-O3DHAGBO.js.map +0 -1
  279. package/dist/chunk-OUJVFZWJ.js.map +0 -1
  280. package/dist/chunk-REYJKU7T.js.map +0 -1
  281. package/dist/chunk-S2MT6SDZ.js.map +0 -1
  282. package/dist/chunk-UKJMQZV6.js.map +0 -1
  283. package/dist/chunk-W4IPN3DD.js.map +0 -1
  284. package/dist/ensure-sources-2OC2X3ZM.js.map +0 -1
  285. package/dist/flows-H6FL4NZU.js +0 -23
  286. package/dist/library-publish-AAD6GTIF.js.map +0 -1
  287. package/dist/open-library-HDOM4MLS.js +0 -35
  288. package/dist/paths-RL6NZW5X.js +0 -19
  289. package/dist/plugin-store-ZTAJCMTY.js.map +0 -1
  290. package/dist/setup-MVBITSVT.js.map +0 -1
  291. package/dist/skills-Y6MU2NRI.js +0 -23
  292. package/dist/source-53PY7DXF.js +0 -36
  293. package/dist/source-manifest-publish-ALRZKEBO.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#821](https://github.com/skaile-ai/workspaces/pull/821) [`8fa1926`](https://github.com/skaile-ai/workspaces/commit/8fa1926a427dd7c5a129f5ad408eb495ce3fbdf2) Thanks [@Frozen666](https://github.com/Frozen666)! - claude-sdk driver: drop MCP tools whose input schema the Claude API would reject (a top-level property key outside `^[a-zA-Z0-9_.-]{1,64}$`, or a schema that is not valid JSON Schema draft 2020-12) before they reach the CLI. The CLI does this itself only after fetching its remote feature flags, so with `DISABLE_TELEMETRY=1` one bad tool failed every turn with a 400. In-process servers get both checks on their `tools/list` output; capability tools (runner-managed external MCP) get the key check on their declared schema, since the loose Zod conversion keeps keys but always yields a valid 2020-12 shape otherwise. A draft-07-only construct such as a `z.tuple()` on an in-process tool is dropped on purpose. Dropped tools are logged (`kind: mcp`) and named to the agent in one system-prompt line; valid tools on the same server stay. The driver also passes `strictMcpConfig: true`, so a workspace repo's `.mcp.json` is no longer loaded into SDK sessions behind the runner's back. Adds `ajv` as a direct dependency.
8
+
9
+ - [#807](https://github.com/skaile-ai/workspaces/pull/807) [`59e5778`](https://github.com/skaile-ai/workspaces/commit/59e5778898fcbe5b975e5a7cdd9387d173f276c7) Thanks [@Frozen666](https://github.com/Frozen666)! - Tier the managed-compaction threshold by the resolved context window: 40% on a window of 1 000 000 tokens or more, 80% below and for an unknown window. Before, a flat 80% became an 800k-token trigger once the drivers started to report a 1M window for plain `claude-opus-5` and `claude-fable-5-1`, and turns above 400k context cost most of the spend. New `compaction:` keys `largeWindowThresholdPercent` (default 40), `smallWindowThresholdPercent` (default 80) and `largeWindowMinTokens` (default 1000000) set the tiers; `thresholdPercent` no longer has a default and, when set, overrides both tiers. `COMPACTION_DEFAULTS.thresholdPercent` is now `undefined`. New export `resolveCompactionThresholdPercent(contextWindow, config?)` from `@skaile/workspaces/core` holds the rule. `mergeSkWorkspaceConfigs` no longer drops the `compaction:` and `patches:` blocks when config files are layered; it merges each per key, the overlay winning.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#811](https://github.com/skaile-ai/workspaces/pull/811) [`ff8eac0`](https://github.com/skaile-ai/workspaces/commit/ff8eac0b09a5c557a99f465d18f69be5d0c0f9ed) Thanks [@Frozen666](https://github.com/Frozen666)! - The runner now honours the `skaile.yaml` `logging:` block at session start. The config decoder dropped the key, so the `LogStore` always booted with the defaults and a saved log level or retention had no effect until it was pushed live. `SkWorkspaceConfig` gains a typed `logging` key (new type export `LoggingConfig` from `@skaile/workspaces/core`: `mode`, `level`, `retention.{maxEntries, maxAgeDays}`); `decodeSkaileYaml` keeps it and drops an unknown `mode` or `level`, or a retention limit that is not a number of 0 or more, with a warning diagnostic (the runner then uses the default), and `mergeSkWorkspaceConfigs` merges it per key.
14
+
15
+ ## 4.12.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#793](https://github.com/skaile-ai/workspaces/pull/793) [`b4da777`](https://github.com/skaile-ai/workspaces/commit/b4da7772314b6ccc3bb80f76c1a7fa4f23ea6c09) Thanks [@Frozen666](https://github.com/Frozen666)! - The strict Flow v2 parser now refuses `control.optional: true` on a `router` node that can run, with an error at `nodes.<i>.control.optional` naming the router. A skipped router satisfies every outgoing edge at once, turning a branch point into a fan-out, so an optional router was a latent trap that validated clean and misbehaved only once its retries ran out. The inert placeholder the v1 normalizer emits for every non-executable legacy node (`contract.requires: [{ expr: "false" }]` plus `control.optional: true`) is exempt: it never becomes available, so it can neither fail nor branch, and `optional` is what lets such a run reach `done`. The runtime's refusal to degrade a router to `skipped` stays in place as defence in depth.
20
+
21
+ Breaking-change scope: minor rather than patch because a stored v2 document carrying an optional runnable router would now fail at every ingress (session flow start, run-group route and handler, scheduler re-parse). A census of all 21 shipped flows found none: every one of the 30 optional routers they normalize to is an inert placeholder, and all flows that passed the strict JSON round trip before this change still pass it. No host action is needed.
22
+
23
+ ### Patch Changes
24
+
25
+ - [#806](https://github.com/skaile-ai/workspaces/pull/806) [`1f5c7bd`](https://github.com/skaile-ai/workspaces/commit/1f5c7bdebba88af6b75ee13bc56c3db84b32bab7) Thanks [@Frozen666](https://github.com/Frozen666)! - Treat an Anthropic base URL ending in `/v1` (or `/`) as the same endpoint in every driver. `https://api.anthropic.com/v1` on the `anthropic` preset is now the stock endpoint for OpenCode, Goose and Continue, so they name it `anthropic` and write no provider file for it. omp and Goose get an `anthropic-messages` endpoint as its host root, because their clients append `/v1/messages`; OpenCode and Continue get `<host root>/v1`, because theirs append `/messages`. OpenAI-style base URLs are unchanged. New exports from `@skaile/workspaces/core/provider-registry`: `normalizeAnthropicBaseUrl` and `normalizeEntryBaseUrl`.
26
+
27
+ - [#792](https://github.com/skaile-ai/workspaces/pull/792) [`510e920`](https://github.com/skaile-ai/workspaces/commit/510e9204d72e5899718578b80ded7a1985ea8f0a) Thanks [@Frozen666](https://github.com/Frozen666)! - Make the `install` and `connectors/config` subpaths loadable by CommonJS-transpiling consumers (e.g. ts-jest). Their static import graphs no longer reach the `core` / `core/logging` barrels, whose shared chunks carry `import.meta`; they import the narrow core modules instead. `install`, `connectors/config` and `discovery` join `bridge/codex-app-server` in the `check:import-meta` CI gate, which now documents that list as the package's committed CJS-safe entries. `factory-assets/connectors/flow/engine` stays out of that list: its `locate` module resolves the packaged factory assets through `import.meta.url`.
28
+
29
+ - [#804](https://github.com/skaile-ai/workspaces/pull/804) [`e421be1`](https://github.com/skaile-ai/workspaces/commit/e421be1ec5755de92763069c91915d8a94d6ca4b) Thanks [@Frozen666](https://github.com/Frozen666)! - Stop credentials embedded in a mount source from reaching the log store. Every string a logger records — the message, each `data` value, the error message and stack — now passes through `redactCredentials`, which blanks URL userinfo (`https://user:token@host`, `s3://key:secret@bucket`, a password containing `@`), a scheme-less `user:secret@host`, secret-named query parameters (`?access_token=`, `X-Amz-Signature=`), rclone connection-string parameters (`pass=`, `secret_access_key=`) and rclone `--…-pass=` flags, and keeps host and path. A `data` field named like a secret (`token`, `password`, `apiKey`, `client_secret`, …; not bare `key`, `auth` or `sig`) is blanked whole, also under `SKAILE_LOG_CONTENT=1`. Before, the git driver logged `mount.source` verbatim at `mount start`, so a token in the declared URL went to SQLite, stdout and the gateway forward. A failed connect's `error` and `source` — returned by `listFailedConnectors()` and the agent's `connector_list` tool, and sent as `connector_status.error` — are redacted the same way. `redactCredentials` is exported from `@skaile/workspaces/core/logging`; the git driver and the runner lifecycle handler now use it in place of their own copies.
30
+
31
+ - [#797](https://github.com/skaile-ai/workspaces/pull/797) [`03d9da1`](https://github.com/skaile-ai/workspaces/commit/03d9da10957e4baa888569cd0b1a8e9f6e12313f) Thanks [@Frozen666](https://github.com/Frozen666)! - Stop logging session content from the runner. Capability calls now log metadata only — call id, duration, outcome, error name and code, input and output size in bytes — instead of the full input, output and error; a failed fire-and-forget call logs only the capability name and call id. The full system prompt is no longer logged at debug; only its length is. Both come back with `SKAILE_LOG_CONTENT=1`, a local-development opt-in that is off by default. `SKAILE_LOG_SYSTEM_PROMPT` is gone: the prompt text used to be logged unless it was set to `0`. `BridgeCapabilityHooks.invoke` takes an optional fourth `callId` argument.
32
+
3
33
  ## 4.11.0
4
34
 
5
35
  ### Minor Changes
@@ -1,20 +1,21 @@
1
- import { assignDomain, buildDomainIndex, DOMAIN_MD_FILENAME, parseDomainMd } from './chunk-M5H4DWIA.js';
1
+ import { assignDomain, buildDomainIndex, DOMAIN_MD_FILENAME, parseDomainMd } from './chunk-HGPSZXZP.js';
2
2
  import './chunk-JXT46QFC.js';
3
- import './chunk-JECDED7B.js';
3
+ import './chunk-7NRF7BQB.js';
4
4
  import './chunk-4GY63JU6.js';
5
- import { factoryAssetRoots } from './chunk-WILO77HE.js';
5
+ import { factoryAssetRoots } from './chunk-NXTLDFLA.js';
6
6
  import './chunk-F3HNW354.js';
7
7
  import './chunk-K5GBV4SA.js';
8
8
  import './chunk-QVZA2MDT.js';
9
- import { scanRepo } from './chunk-HO4UO25I.js';
9
+ import { scanRepo } from './chunk-QWGSKDD7.js';
10
10
  import './chunk-MENCWIHW.js';
11
11
  import './chunk-P4VHQA4N.js';
12
- import { walkDir, parseFrontmatter } from './chunk-MKZOK4JU.js';
12
+ import { walkDir, parseFrontmatter } from './chunk-2FBPAR2V.js';
13
13
  import './chunk-GEEW6SY2.js';
14
- import './chunk-3HKYCT2M.js';
15
- import './chunk-KSIRR5PL.js';
16
- import './chunk-ILG4BXYE.js';
17
- import './chunk-W4IPN3DD.js';
14
+ import './chunk-JMKB7IB4.js';
15
+ import './chunk-DPLIN2RA.js';
16
+ import './chunk-GZZPKAV5.js';
17
+ import './chunk-C3CAXQMA.js';
18
+ import './chunk-BOFL7GIF.js';
18
19
  import './chunk-N7B3LZ7V.js';
19
20
  import './chunk-NSBPE2FW.js';
20
21
  import { existsSync, readFileSync } from 'fs';
@@ -68,7 +69,7 @@ async function libraryAssets() {
68
69
  const domains = [];
69
70
  try {
70
71
  const [{ openLibraryManager }, { skaileHomeDir }, { getGlobalCacheDir }] = await Promise.all([
71
- import('./open-library-HDOM4MLS.js'),
72
+ import('./open-library-SF2F7NDS.js'),
72
73
  import('./library/index.js'),
73
74
  import('./core/index.js')
74
75
  ]);
@@ -101,7 +102,7 @@ async function libraryAssets() {
101
102
  async function storeAssets(projectDir) {
102
103
  const notes = [];
103
104
  try {
104
- const { resolveCatalogSource } = await import('./open-library-HDOM4MLS.js');
105
+ const { resolveCatalogSource } = await import('./open-library-SF2F7NDS.js');
105
106
  const { source, close } = await resolveCatalogSource({ projectDir });
106
107
  try {
107
108
  const assets = await source.listAssets();
@@ -205,5 +206,5 @@ function dedupeBySlug(domains) {
205
206
  }
206
207
 
207
208
  export { gatherAssetFeeds };
208
- //# sourceMappingURL=asset-feeds-3TOP4ZKE.js.map
209
- //# sourceMappingURL=asset-feeds-3TOP4ZKE.js.map
209
+ //# sourceMappingURL=asset-feeds-AAQOGRLM.js.map
210
+ //# sourceMappingURL=asset-feeds-AAQO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AI,SAAA,EAAW,OAAA,CAAQ,OAAO,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA;AAAA;AAAA,IAGA,OAAA,EAAS,YAAA,CAAa,CAAC,GAAG,MAAM,OAAA,EAAS,GAAG,GAAA,CAAI,OAAA,EAAS,GAAG,IAAA,CAAK,OAAA,EAAS,GAAG,OAAA,CAAQ,OAAO,CAAC,CAAA;AAAA,IAC7F,KAAA,EAAO,CAAC,GAAG,IAAA,CAAK,KAAA,EAAO,GAAG,KAAA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF;AAGA,SAAS,aAAa,OAAA,EAA2C;AAC/D,EAAA,MAAM,IAAA,uBAAW,GAAA,EAAY;AAC7B,EAAA,MAAM,MAAuB,EAAC;AAC9B,EAAA,KAAA,MAAW,KAAK,OAAA,EAAS;AACvB,IAAA,IAAI,IAAA,CAAK,GAAA,CAAI,CAAA,CAAE,IAAI,CAAA,EAAG;AACtB,IAAA,IAAA,CAAK,GAAA,CAAI,EAAE,IAAI,CAAA;AACf,IAAA,GAAA,CAAI,KAAK,CAAC,CAAA;AAAA,EACZ;AACA,EAAA,OAAO,GAAA;AACT","file":"asset-feeds-AAQOGRLM.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Four feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex` (filesystem\n * scan of each library's `path`).\n * - **Factory assets** — the bundled first-party `factory-assets` tree\n * (`factoryAssetRoots()`), scanned from disk. Always present; no network.\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport { existsSync, readFileSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogDomain,\n type CatalogEntry,\n factoryAssetRoots,\n parseFrontmatter,\n scanRepo,\n walkDir,\n} from \"@skaile/workspaces/core\";\nimport {\n assignDomain,\n buildDomainIndex,\n DOMAIN_MD_FILENAME,\n type DomainMd,\n parseDomainMd,\n} from \"@skaile/workspaces/discovery\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\" | \"factory\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"factory\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n /**\n * Second-level grouping label for the manage tree. Defaults (when unset) to the\n * entry's `publisher`; the source feed sets it to the source's short repo name\n * so the Sources band groups by source — \"which repo did this come from\" — not\n * by the asset-intrinsic publisher.\n */\n group?: string;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n /**\n * Display-only domain metadata, keyed (by the consumer) on `slug`. Populated\n * from the store's `catalog.listDomains` when the connected catalog source\n * exposes it; empty otherwise. The manage TUI joins `entry.domainSlug` → a\n * domain for grouping headers, descriptions, and relation badges.\n */\n domains: CatalogDomain[];\n notes: FeedNote[];\n}\n\n// ── Domain stamping (on-disk feeds) ──────────────────────────────────────────\n//\n// `scanRepo` (the source / library / factory scan path) does not read the\n// `DOMAIN.md` sidecars, so its entries arrive with no `domainSlug` and render\n// flat under their publisher band. We re-derive the grouping here from the\n// root's `DOMAIN.md` files (the same sidecars the remote store computes\n// server-side), and fall back to the repo/source name for any entry no domain\n// claims so it still groups instead of landing in the synthetic \"no domain\" pile.\n\n/** Repo-relative POSIX path (DOMAIN.md slugs are matched whole-segment, `/`-joined). */\nfunction toPosix(p: string): string {\n return p.split(path.sep).join(\"/\");\n}\n\n/** Parse every `DOMAIN.md` sidecar under `root` into a {@link DomainMd}. */\nasync function loadDomainMds(root: string): Promise<DomainMd[]> {\n const out: DomainMd[] = [];\n for await (const { path: filePath, name } of walkDir(root)) {\n if (name !== DOMAIN_MD_FILENAME) continue;\n try {\n const { data } = parseFrontmatter(readFileSync(filePath, \"utf8\"));\n out.push(parseDomainMd(toPosix(path.relative(root, filePath)), data));\n } catch {}\n }\n return out;\n}\n\n/**\n * Stamp `domainSlug` onto every entry scanned from `root` using the root's\n * `DOMAIN.md` sidecars. Returns the `CatalogDomain` registry for the real\n * domains, plus a synthetic fallback domain when any entry used the fallback.\n * Mutates `entries` in place (sets `entry.domainSlug`).\n *\n * `synthesizeFallback` (default true): entries no domain claims fall back to\n * `fallbackSlug` (the repo/source name). Pass `false` when the caller already\n * groups these entries one level up (e.g. the source feed groups by source\n * node) — unmatched entries then get no domain (`\"\"`) and hang directly under\n * that parent, instead of nesting under a same-named fallback domain.\n */\nasync function stampDomains(\n root: string,\n fallbackSlug: string,\n entries: CatalogEntry[],\n synthesizeFallback = true,\n): Promise<CatalogDomain[]> {\n const domainMds = await loadDomainMds(root);\n const assignables = entries.map((entry) => ({\n entry,\n ref: `${entry.kind}:${entry.name}`,\n relativePath: toPosix(path.relative(root, entry.source)),\n }));\n\n let usedFallback = false;\n for (const a of assignables) {\n const slug = assignDomain(a.relativePath, domainMds);\n if (slug) a.entry.domainSlug = slug;\n else if (synthesizeFallback) {\n a.entry.domainSlug = fallbackSlug;\n usedFallback = true;\n } else a.entry.domainSlug = \"\";\n }\n\n const { index } = buildDomainIndex(assignables, domainMds);\n const catalog: CatalogDomain[] = Object.values(index).map((d) => ({\n slug: d.slug,\n title: d.title,\n ...(d.description ? { description: d.description } : {}),\n ...(d.relation ? { relation: d.relation } : {}),\n ...(d.order !== undefined ? { order: d.order } : {}),\n ...(d.recommended[0] ? { recommendedRef: d.recommended[0] } : {}),\n }));\n if (usedFallback) catalog.push({ slug: fallbackSlug, title: fallbackSlug });\n return catalog;\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/cache/sources/` cache). Each\n * library's `path` is scanned with `scanRepo` and grouped under the bare library\n * name (`group: <name>`) so the manage TUI shows a clean `<name>` band — no\n * `library:` prefix and no redundant same-named fallback domain (mirrors the\n * source feed).\n */\nasync function libraryAssets(): Promise<{\n entries: OriginEntry[];\n domains: CatalogDomain[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n const domains: CatalogDomain[] = [];\n try {\n const [{ openLibraryManager }, { skaileHomeDir }, { getGlobalCacheDir }] = await Promise.all([\n import(\"./open-library.ts\"),\n import(\"@skaile/workspaces/library\"),\n import(\"@skaile/workspaces/core\"),\n ]);\n const { manager, close } = await openLibraryManager();\n try {\n // Authoring libraries are the rows that are NOT source clones. index.db\n // rows predating the cache migration still carry the legacy\n // ~/.skaile/sources path, so exclude both roots.\n const newRoot = getGlobalCacheDir();\n const legacyRoot = path.join(skaileHomeDir(), \"sources\");\n const libs = (await manager.listLibraries()).filter(\n (l) => !l.path.startsWith(newRoot) && !l.path.startsWith(legacyRoot),\n );\n const entries: OriginEntry[] = [];\n for (const lib of libs) {\n if (!existsSync(lib.path)) continue;\n // Scan + group under the bare library name. `synthesizeFallback: false`\n // (as the source feed does) keeps domainless assets directly under the\n // library band instead of a redundant same-named fallback domain.\n const libEntries = [...(await scanRepo(lib.path, lib.name))];\n domains.push(...(await stampDomains(lib.path, lib.name, libEntries, false)));\n for (const entry of libEntries) entries.push({ origin: \"library\", entry, group: lib.name });\n }\n return { entries, domains, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], domains, notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n domains: CatalogDomain[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n const assets = await source.listAssets();\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n domainSlug: a.domainSlug,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n // Domains are optional on the catalog source — only the store backend\n // (post Part 4 `catalog.listDomains`) exposes them. Duck-type the call so\n // older sources and the local catalog degrade to no domains, not an error.\n const domains = await loadDomains(source);\n return { entries, domains, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], domains: [], notes };\n }\n}\n\n/** Optional `listDomains` capability — returns `[]` when the source lacks it. */\nasync function loadDomains(source: unknown): Promise<CatalogDomain[]> {\n const fn = (source as { listDomains?: () => Promise<CatalogDomain[]> }).listDomains;\n if (typeof fn !== \"function\") return [];\n const domains = await fn.call(source);\n return Array.isArray(domains) ? domains : [];\n}\n\n/** The slice of `AssetManager` the source feed needs (kept narrow for tests). */\ninterface AssetManagerLike {\n search: () => Promise<CatalogEntry[]>;\n searchRepoRoots: () => { repoName: string; root: string }[];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which now merges\n * `skaile.yaml`'s `sources:` field into the repositories map, then stamps\n * `DOMAIN.md`-derived domain grouping onto the scanned entries via\n * `searchRepoRoots()`.\n */\nasync function sourceAssets(\n am: AssetManagerLike,\n): Promise<{ entries: OriginEntry[]; domains: CatalogDomain[] }> {\n // The bundled factory tree is injected into the repositories map as an implicit\n // source, so `am.search()` returns it too. It has its own `factory` origin band,\n // so drop it here — otherwise the same first-party skills list twice under Sources.\n const factoryPrefixes = factoryAssetRoots().map((r) => (r.endsWith(path.sep) ? r : r + path.sep));\n const isFactoryPath = (p: string) =>\n factoryPrefixes.some((fp) => p === fp.slice(0, -1) || p.startsWith(fp));\n\n const all = (await am.search()).filter((e) => !isFactoryPath(e.source));\n const entries: OriginEntry[] = [];\n const domains: CatalogDomain[] = [];\n // Group each source's entries under the source node (its short repo name), not\n // the publisher: under Sources the navigational question is \"which repo did\n // this come from\". Each entry's `source` (absolute manifest path) lives under\n // exactly one declared root, so group + stamp by prefix. The cache slug is\n // URL-keyed `github.com/<org>/<repo>` — take the trailing segment.\n for (const { repoName, root } of am.searchRepoRoots()) {\n if (isFactoryPath(root)) continue;\n const prefix = root.endsWith(path.sep) ? root : root + path.sep;\n const owned = all.filter((e) => e.source === root || e.source.startsWith(prefix));\n if (owned.length === 0) continue;\n const sourceName = repoName.split(\"/\").pop() || repoName;\n // No synthetic fallback domain — the source node already groups these, so a\n // same-named fallback would just nest the source under itself.\n domains.push(...(await stampDomains(root, sourceName, owned, false)));\n for (const entry of owned) entries.push({ origin: \"source\", entry, group: sourceName });\n }\n return { entries, domains };\n}\n\n/**\n * Factory-asset feed: scan the bundled first-party `factory-assets` tree(s)\n * resolved by `factoryAssetRoots()` (the `SKAILE_FACTORY_ASSETS_DIR` override\n * layer ahead of the bundled tree). Local disk only, no network — the entries are\n * the built-in skills / connectors / bundles that ship with `@skaile/workspaces`.\n * `factoryAssetRoots()` already dedupes, so the env override pointing at the\n * bundled dir collapses to one root.\n */\nasync function factoryAssets(): Promise<{\n entries: CatalogEntry[];\n domains: CatalogDomain[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n const domains: CatalogDomain[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n const rootEntries = [...(await scanRepo(root, \"skaile-factory\"))];\n domains.push(...(await stampDomains(root, \"skaile-factory\", rootEntries)));\n entries.push(...rootEntries);\n }\n return { entries, domains, notes };\n } catch (err) {\n notes.push({\n feed: \"factory\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], domains, notes };\n }\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk. The factory\n * scan is local disk only, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: AssetManagerLike,\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = await factoryAssets();\n const src = await sourceAssets(am);\n return {\n entries: [\n ...src.entries,\n ...libs.entries,\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n // Store domains first (server-curated), then the on-disk feeds; dedupe by\n // slug, first-wins, so a store-served domain shadows a same-slug local one.\n domains: dedupeBySlug([...store.domains, ...src.domains, ...libs.domains, ...factory.domains]),\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n\n/** First-wins dedupe of a domain list by `slug`. */\nfunction dedupeBySlug(domains: CatalogDomain[]): CatalogDomain[] {\n const seen = new Set<string>();\n const out: CatalogDomain[] = [];\n for (const d of domains) {\n if (seen.has(d.slug)) continue;\n seen.add(d.slug);\n out.push(d);\n }\n return out;\n}\n"]}
@@ -1,19 +1,20 @@
1
- export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-7BUZQVRR.js';
2
- import '../chunk-JECDED7B.js';
1
+ export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-Q6NDQ6BH.js';
2
+ import '../chunk-7NRF7BQB.js';
3
3
  import '../chunk-4GY63JU6.js';
4
- import '../chunk-WILO77HE.js';
4
+ import '../chunk-NXTLDFLA.js';
5
5
  import '../chunk-F3HNW354.js';
6
6
  import '../chunk-K5GBV4SA.js';
7
7
  import '../chunk-QVZA2MDT.js';
8
- import '../chunk-HO4UO25I.js';
8
+ import '../chunk-QWGSKDD7.js';
9
9
  import '../chunk-MENCWIHW.js';
10
10
  import '../chunk-P4VHQA4N.js';
11
- import '../chunk-MKZOK4JU.js';
11
+ import '../chunk-2FBPAR2V.js';
12
12
  import '../chunk-GEEW6SY2.js';
13
- import '../chunk-3HKYCT2M.js';
14
- import '../chunk-KSIRR5PL.js';
15
- import '../chunk-ILG4BXYE.js';
16
- import '../chunk-W4IPN3DD.js';
13
+ import '../chunk-JMKB7IB4.js';
14
+ import '../chunk-DPLIN2RA.js';
15
+ import '../chunk-GZZPKAV5.js';
16
+ import '../chunk-C3CAXQMA.js';
17
+ import '../chunk-BOFL7GIF.js';
17
18
  import '../chunk-NSBPE2FW.js';
18
19
  //# sourceMappingURL=catalog-deployer.js.map
19
20
  //# sourceMappingURL=catalog-deployer.js.map
@@ -1,26 +1,27 @@
1
- export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, NON_DEPLOYABLE_KINDS, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName } from '../chunk-L3PZINDD.js';
2
- import '../chunk-A3X4LDOD.js';
3
- import '../chunk-M5H4DWIA.js';
4
- import '../chunk-UKJMQZV6.js';
1
+ export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, NON_DEPLOYABLE_KINDS, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName } from '../chunk-HXTBOZL6.js';
2
+ import '../chunk-WQPLZUXU.js';
3
+ import '../chunk-HGPSZXZP.js';
4
+ import '../chunk-VOEBLPXO.js';
5
5
  import '../chunk-R7FOF242.js';
6
6
  import '../chunk-JXT46QFC.js';
7
- export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-CJXSTOGW.js';
7
+ export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-4JGTXBQB.js';
8
8
  export { BUILT_IN_FRAGMENTS, loadPromptExtensions, resolveFragments } from '../chunk-CGYEHQOX.js';
9
- import '../chunk-JECDED7B.js';
9
+ import '../chunk-7NRF7BQB.js';
10
10
  import '../chunk-4GY63JU6.js';
11
- import '../chunk-WILO77HE.js';
11
+ import '../chunk-NXTLDFLA.js';
12
12
  import '../chunk-F3HNW354.js';
13
13
  import '../chunk-K5GBV4SA.js';
14
14
  import '../chunk-QVZA2MDT.js';
15
- import '../chunk-HO4UO25I.js';
15
+ import '../chunk-QWGSKDD7.js';
16
16
  import '../chunk-MENCWIHW.js';
17
17
  import '../chunk-P4VHQA4N.js';
18
- import '../chunk-MKZOK4JU.js';
18
+ import '../chunk-2FBPAR2V.js';
19
19
  import '../chunk-GEEW6SY2.js';
20
- import '../chunk-3HKYCT2M.js';
21
- import '../chunk-KSIRR5PL.js';
22
- import '../chunk-ILG4BXYE.js';
23
- import '../chunk-W4IPN3DD.js';
20
+ import '../chunk-JMKB7IB4.js';
21
+ import '../chunk-DPLIN2RA.js';
22
+ import '../chunk-GZZPKAV5.js';
23
+ import '../chunk-C3CAXQMA.js';
24
+ import '../chunk-BOFL7GIF.js';
24
25
  export { appendHistory, clearHistory, getRecentHistory, loadHistory } from '../chunk-KTBKW2FI.js';
25
26
  import '../chunk-UQ6LFBPZ.js';
26
27
  export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, driverTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-DKCFWSVW.js';
@@ -1,20 +1,21 @@
1
- export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-CJXSTOGW.js';
1
+ export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-4JGTXBQB.js';
2
2
  import '../chunk-CGYEHQOX.js';
3
- import '../chunk-JECDED7B.js';
3
+ import '../chunk-7NRF7BQB.js';
4
4
  import '../chunk-4GY63JU6.js';
5
- import '../chunk-WILO77HE.js';
5
+ import '../chunk-NXTLDFLA.js';
6
6
  import '../chunk-F3HNW354.js';
7
7
  import '../chunk-K5GBV4SA.js';
8
8
  import '../chunk-QVZA2MDT.js';
9
- import '../chunk-HO4UO25I.js';
9
+ import '../chunk-QWGSKDD7.js';
10
10
  import '../chunk-MENCWIHW.js';
11
11
  import '../chunk-P4VHQA4N.js';
12
- import '../chunk-MKZOK4JU.js';
12
+ import '../chunk-2FBPAR2V.js';
13
13
  import '../chunk-GEEW6SY2.js';
14
- import '../chunk-3HKYCT2M.js';
15
- import '../chunk-KSIRR5PL.js';
16
- import '../chunk-ILG4BXYE.js';
17
- import '../chunk-W4IPN3DD.js';
14
+ import '../chunk-JMKB7IB4.js';
15
+ import '../chunk-DPLIN2RA.js';
16
+ import '../chunk-GZZPKAV5.js';
17
+ import '../chunk-C3CAXQMA.js';
18
+ import '../chunk-BOFL7GIF.js';
18
19
  import '../chunk-DKCFWSVW.js';
19
20
  import '../chunk-N7B3LZ7V.js';
20
21
  import '../chunk-NSBPE2FW.js';
@@ -1,31 +1,178 @@
1
- import { scrubPoisonedTranscript, resolveClaudeConfigDir, claudeEndpointMode, buildClaudeEndpointEnv } from '../../chunk-OUJVFZWJ.js';
2
- import { dispatchCapability } from '../../chunk-35PMOWAD.js';
3
- import { fetchProviderModels } from '../../chunk-BXV6RLF4.js';
1
+ import { scrubPoisonedTranscript, resolveClaudeConfigDir, claudeEndpointMode, buildClaudeEndpointEnv } from '../../chunk-4SIMGJIU.js';
2
+ import { dispatchCapability } from '../../chunk-CPIAQTYM.js';
3
+ import { fetchProviderModels } from '../../chunk-XKPFQ3JT.js';
4
4
  import { AuthError, classifyClaudeSdkError, reclassifyAuthAsAccountUnavailable, AccountUnavailableError } from '../../chunk-GAH4YRCI.js';
5
- import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger, entryCredentialValue, registryDriverConfig } from '../../chunk-3T5DRUNZ.js';
5
+ import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger, entryCredentialValue, registryDriverConfig } from '../../chunk-PQF3NDQH.js';
6
6
  import '../../chunk-6E6PKKAD.js';
7
7
  import { withActivityLabelShape } from '../../chunk-O64WU6WS.js';
8
- import '../../chunk-JECDED7B.js';
8
+ import '../../chunk-7NRF7BQB.js';
9
9
  import '../../chunk-4GY63JU6.js';
10
- import '../../chunk-WILO77HE.js';
10
+ import '../../chunk-NXTLDFLA.js';
11
11
  import '../../chunk-F3HNW354.js';
12
12
  import '../../chunk-K5GBV4SA.js';
13
13
  import '../../chunk-QVZA2MDT.js';
14
- import '../../chunk-HO4UO25I.js';
14
+ import '../../chunk-QWGSKDD7.js';
15
15
  import '../../chunk-MENCWIHW.js';
16
16
  import '../../chunk-P4VHQA4N.js';
17
- import '../../chunk-MKZOK4JU.js';
17
+ import '../../chunk-2FBPAR2V.js';
18
18
  import '../../chunk-GEEW6SY2.js';
19
- import '../../chunk-3HKYCT2M.js';
20
- import '../../chunk-KSIRR5PL.js';
21
- import { mergeRegistries, parseModelRef, isEntryEnabled, resolveEntryBaseUrl } from '../../chunk-ILG4BXYE.js';
22
- import '../../chunk-W4IPN3DD.js';
19
+ import '../../chunk-JMKB7IB4.js';
20
+ import '../../chunk-DPLIN2RA.js';
21
+ import { mergeRegistries, parseModelRef, isEntryEnabled, resolveEntryBaseUrl } from '../../chunk-GZZPKAV5.js';
22
+ import '../../chunk-C3CAXQMA.js';
23
+ import { createLogger } from '../../chunk-BOFL7GIF.js';
23
24
  import '../../chunk-N7B3LZ7V.js';
24
25
  import '../../chunk-NSBPE2FW.js';
25
26
  import { spawnSync, spawn } from 'child_process';
26
27
  import { readFileSync, existsSync } from 'fs';
27
28
  import { createRequire } from 'module';
28
29
  import * as zNS from 'zod';
30
+ import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
31
+ import { Ajv2020 } from 'ajv/dist/2020.js';
32
+
33
+ var TOOL_PROPERTY_KEY_PATTERN = /^[a-zA-Z0-9_.-]{1,64}$/;
34
+ var DRAFT_2020_12_META = "https://json-schema.org/draft/2020-12/schema";
35
+ var PROBE_TIMEOUT_MS = 5e3;
36
+ var metaValidator = null;
37
+ function draft202012MetaValidator() {
38
+ if (metaValidator) return metaValidator;
39
+ const ajv = new Ajv2020({ strict: false, validateFormats: false, logger: false });
40
+ const validate = ajv.getSchema(DRAFT_2020_12_META);
41
+ if (!validate) throw new Error("ajv draft 2020-12 meta-schema is unavailable");
42
+ metaValidator = validate;
43
+ return validate;
44
+ }
45
+ function checkToolPropertyKeys(schema) {
46
+ if (!schema || typeof schema !== "object" || Array.isArray(schema)) return null;
47
+ const props = schema.properties;
48
+ if (!props || typeof props !== "object" || Array.isArray(props)) return null;
49
+ for (const key of Object.keys(props)) {
50
+ if (!TOOL_PROPERTY_KEY_PATTERN.test(key)) {
51
+ return `property key ${JSON.stringify(key)} does not match ${TOOL_PROPERTY_KEY_PATTERN.source}`;
52
+ }
53
+ }
54
+ return null;
55
+ }
56
+ function checkToolInputSchema(schema) {
57
+ if (!schema || typeof schema !== "object" || Array.isArray(schema)) {
58
+ return "input schema is not a JSON object";
59
+ }
60
+ const keyReason = checkToolPropertyKeys(schema);
61
+ if (keyReason) return keyReason;
62
+ const validate = draft202012MetaValidator();
63
+ if (!validate(schema)) {
64
+ const first = validate.errors?.[0];
65
+ const where = first?.instancePath || "/";
66
+ return `not valid JSON Schema draft 2020-12: ${where} ${first?.message ?? "is invalid"}`;
67
+ }
68
+ return null;
69
+ }
70
+ var filteredInstances = /* @__PURE__ */ new WeakMap();
71
+ function sdkInstanceOf(config) {
72
+ if (!config || typeof config !== "object") return null;
73
+ const c = config;
74
+ if (c.type !== "sdk" || !c.instance || typeof c.instance !== "object") return null;
75
+ const inst = c.instance;
76
+ return typeof inst.connect === "function" && typeof inst.close === "function" ? inst : null;
77
+ }
78
+ function withTimeout(p, what) {
79
+ let timer;
80
+ const timeout = new Promise((_, reject) => {
81
+ timer = setTimeout(() => reject(new Error(`${what} timed out`)), PROBE_TIMEOUT_MS);
82
+ });
83
+ return Promise.race([p, timeout]).finally(() => clearTimeout(timer));
84
+ }
85
+ async function listInProcessTools(instance) {
86
+ const [clientSide, serverSide] = InMemoryTransport.createLinkedPair();
87
+ const pending = /* @__PURE__ */ new Map();
88
+ clientSide.onmessage = (msg) => {
89
+ const m = msg;
90
+ const id = typeof m.id === "number" ? m.id : void 0;
91
+ if (id === void 0) return;
92
+ pending.get(id)?.(m);
93
+ pending.delete(id);
94
+ };
95
+ let nextId = 1;
96
+ const call = (method, params) => withTimeout(
97
+ new Promise((resolve, reject) => {
98
+ const id = nextId++;
99
+ pending.set(id, resolve);
100
+ clientSide.send({ jsonrpc: "2.0", id, method, params }).catch(reject);
101
+ }),
102
+ method
103
+ ).then((res) => {
104
+ if (res.error) throw new Error(`${method} failed: ${JSON.stringify(res.error)}`);
105
+ return res.result ?? {};
106
+ });
107
+ await clientSide.start();
108
+ await instance.connect(serverSide);
109
+ try {
110
+ await call("initialize", {
111
+ protocolVersion: "2025-06-18",
112
+ capabilities: {},
113
+ clientInfo: { name: "skaile-tool-schema-filter", version: "1.0.0" }
114
+ });
115
+ await clientSide.send({ jsonrpc: "2.0", method: "notifications/initialized" });
116
+ const tools = [];
117
+ let cursor;
118
+ do {
119
+ const page = await call("tools/list", cursor ? { cursor } : {});
120
+ tools.push(...page.tools ?? []);
121
+ cursor = typeof page.nextCursor === "string" ? page.nextCursor : void 0;
122
+ } while (cursor);
123
+ return tools;
124
+ } finally {
125
+ await instance.close().catch(() => {
126
+ });
127
+ }
128
+ }
129
+ var defaultLog = createLogger({ kind: "mcp", subkind: "tool-schema-filter" });
130
+ async function filterInProcessMcpServerTools(server, config, log = defaultLog) {
131
+ const instance = sdkInstanceOf(config);
132
+ if (!instance) return [];
133
+ const cached = filteredInstances.get(instance);
134
+ if (cached) return cached;
135
+ const registered = instance._registeredTools;
136
+ if (!registered || Object.keys(registered).length === 0) return [];
137
+ if (instance.isConnected?.()) {
138
+ log.debug("in-process MCP server already connected; schema check skipped", { server });
139
+ return [];
140
+ }
141
+ let wireTools;
142
+ try {
143
+ wireTools = await listInProcessTools(instance);
144
+ } catch (err) {
145
+ log.warn("could not inspect in-process MCP server tools; passing it unchanged", {
146
+ server,
147
+ error: err instanceof Error ? err.message : String(err)
148
+ });
149
+ return [];
150
+ }
151
+ const dropped = [];
152
+ for (const tool of wireTools) {
153
+ const reason = checkToolInputSchema(tool.inputSchema);
154
+ if (!reason) continue;
155
+ const handle = registered[tool.name];
156
+ if (typeof handle?.disable !== "function") {
157
+ log.warn("MCP tool has an invalid input schema but cannot be disabled", {
158
+ server,
159
+ tool: tool.name,
160
+ reason
161
+ });
162
+ continue;
163
+ }
164
+ handle.disable();
165
+ dropped.push({ server, tool: tool.name, reason });
166
+ log.warn("MCP tool dropped: invalid input schema", { server, tool: tool.name, reason });
167
+ }
168
+ filteredInstances.set(instance, dropped);
169
+ return dropped;
170
+ }
171
+ function formatDroppedToolsNotice(dropped) {
172
+ if (dropped.length === 0) return null;
173
+ const items = dropped.map((d) => `${d.tool} (server ${d.server}: ${d.reason})`).join("; ");
174
+ return `Some MCP tools were not loaded because the Claude API would reject their input schema: ${items}. Do not try to call them.`;
175
+ }
29
176
 
30
177
  // bridge/src/drivers/sanitize-assistant-text.ts
31
178
  var NS = "(?:[a-z][a-z0-9]*:)?";
@@ -306,6 +453,8 @@ var ClaudeSdkDriver = class extends AgentDriver {
306
453
  supportsInBandAbort: true
307
454
  };
308
455
  log = getBridgeLogger("claude-sdk");
456
+ /** `kind: mcp` logger for tool-schema drops, alongside the runner's MCP rows. */
457
+ mcpLog = createLogger({ kind: "mcp", subkind: "tool-schema-filter" });
309
458
  config;
310
459
  abortController = null;
311
460
  running = false;
@@ -522,6 +671,8 @@ var ClaudeSdkDriver = class extends AgentDriver {
522
671
  * upstream auth-shaped failures get a quota-aware hint when warranted.
523
672
  */
524
673
  usingOauthCredential = false;
674
+ /** Capability tools already warned about, so a per-turn rebuild logs each once. */
675
+ warnedDroppedCapabilityTools = /* @__PURE__ */ new Set();
525
676
  /**
526
677
  * @param config - Driver configuration. Claude SDK-relevant fields:
527
678
  * - `cwd` — working directory; SDK session files and agent definitions are read from here.
@@ -1264,10 +1415,16 @@ var ClaudeSdkDriver = class extends AgentDriver {
1264
1415
  this.usingOauthCredential = endpoint.mode === "anthropic" && !endpoint.credential;
1265
1416
  const claudePath = this.findClaudeBinary();
1266
1417
  const onStderr = (data) => this.log.warn("claude stderr", { line: data.trim() });
1418
+ const { patch: mcpServersPatch, dropped: droppedMcpTools } = await this.buildEffectiveMcpServers();
1419
+ const systemPromptAppend = [this.config.systemPrompt, formatDroppedToolsNotice(droppedMcpTools)].filter((part) => !!part).join("\n\n");
1267
1420
  const options = {
1268
1421
  cwd: this.config.cwd,
1269
1422
  // Load project + user settings so .claude/skills/ are discovered
1270
1423
  settingSources: ["user", "project"],
1424
+ // MCP servers come only from the runner (`mcpServers` below). Without
1425
+ // this the CLI also loads the workspace repo's `.mcp.json` unprompted,
1426
+ // which bypasses the runner's approval flow and the schema filter.
1427
+ strictMcpConfig: true,
1271
1428
  // Use full Claude Code tool preset so skills, agents, etc. work
1272
1429
  tools: { type: "preset", preset: "claude_code" },
1273
1430
  permissionMode: "bypassPermissions",
@@ -1319,7 +1476,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
1319
1476
  systemPrompt: {
1320
1477
  type: "preset",
1321
1478
  preset: "claude_code",
1322
- ...this.config.systemPrompt ? { append: this.config.systemPrompt } : {}
1479
+ ...systemPromptAppend ? { append: systemPromptAppend } : {}
1323
1480
  },
1324
1481
  // ── Session continuity ────────────────────────────────────────────────
1325
1482
  // Three-level fallback ensures the right session is always resumed:
@@ -1340,7 +1497,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
1340
1497
  // calls into that server route back through `hooks.invoke()` so the
1341
1498
  // registry's per-handler logger fires and fire-and-forget / render
1342
1499
  // semantics apply uniformly.
1343
- ...await this.buildEffectiveMcpServers(),
1500
+ ...mcpServersPatch,
1344
1501
  // ── Main-agent handoff ────────────────────────────────────────────────
1345
1502
  // agentName (from AgentConfig) is the equivalent of `claude --agent <name>`.
1346
1503
  // The SDK reads .claude/agents/<agentName>.md from the cwd; that file was
@@ -1468,40 +1625,81 @@ var ClaudeSdkDriver = class extends AgentDriver {
1468
1625
  *
1469
1626
  * Returns an empty options patch when neither source is configured, so legacy
1470
1627
  * v1 sessions remain unaffected.
1628
+ *
1629
+ * Tools the Claude API would reject are removed on the way out and
1630
+ * reported in `dropped`, so one bad tool cannot fail every turn when the
1631
+ * CLI's own flag-gated filter is off: `config.mcpServers` entries get the
1632
+ * wire probe, and `skaile-capabilities` gets the key rule while it is built
1633
+ * (see {@link buildCapabilityMcpServer}).
1471
1634
  */
1472
1635
  async buildEffectiveMcpServers() {
1473
1636
  const out = {};
1637
+ const dropped = [];
1474
1638
  if (this.config.mcpServers) {
1475
1639
  Object.assign(out, this.config.mcpServers);
1476
1640
  }
1477
1641
  const hooks = this.config.capabilities;
1478
1642
  if (hooks) {
1479
- const capServer = await this.buildCapabilityMcpServer();
1480
- if (capServer) {
1481
- out["skaile-capabilities"] = capServer;
1643
+ const cap = await this.buildCapabilityMcpServer();
1644
+ dropped.push(...cap.dropped);
1645
+ if (cap.server) {
1646
+ out["skaile-capabilities"] = cap.server;
1482
1647
  }
1483
1648
  }
1484
- return Object.keys(out).length > 0 ? { mcpServers: out } : {};
1649
+ if (this.config.mcpServers) {
1650
+ const results = await Promise.all(
1651
+ Object.entries(this.config.mcpServers).map(
1652
+ ([name, config]) => filterInProcessMcpServerTools(name, config, this.mcpLog)
1653
+ )
1654
+ );
1655
+ for (const r of results) dropped.push(...r);
1656
+ }
1657
+ return {
1658
+ patch: Object.keys(out).length > 0 ? { mcpServers: out } : {},
1659
+ dropped
1660
+ };
1485
1661
  }
1486
1662
  /**
1487
1663
  * Build the synthetic MCP server that exposes registered capabilities to the
1488
1664
  * Claude Agent SDK. Lazy-imports `createSdkMcpServer` from the SDK and `zod`
1489
1665
  * (an SDK peer) since both are optional peers of this bridge.
1490
1666
  *
1491
- * Returns null when the SDK or zod is unavailable, or when the registry
1667
+ * `server` is null when the SDK or zod is unavailable, or when the registry
1492
1668
  * exposes no tools — leaving the legacy `mcpServers` untouched.
1669
+ *
1670
+ * A tool whose declared schema has a property key the API rejects
1671
+ * ({@link checkToolPropertyKeys}) is left out and reported in `dropped`.
1672
+ * Only the key rule applies here: `jsonSchemaToZodLoose` copies keys
1673
+ * verbatim but flattens every other construct to string/number/boolean/
1674
+ * array/record/any, so the wire schema is always valid draft 2020-12 and
1675
+ * a declared-schema meta check would drop tools that work.
1493
1676
  */
1494
1677
  async buildCapabilityMcpServer() {
1678
+ const dropped = [];
1495
1679
  const hooks = this.config.capabilities;
1496
- if (!hooks) return null;
1497
- const tools = hooks.composeTools();
1498
- if (tools.length === 0) return null;
1680
+ if (!hooks) return { server: null, dropped };
1681
+ const tools = hooks.composeTools().filter((tool) => {
1682
+ const reason = checkToolPropertyKeys(tool.parameters);
1683
+ if (!reason) return true;
1684
+ dropped.push({ server: "skaile-capabilities", tool: tool.name, reason });
1685
+ const key = `${tool.name}\0${reason}`;
1686
+ if (!this.warnedDroppedCapabilityTools.has(key)) {
1687
+ this.warnedDroppedCapabilityTools.add(key);
1688
+ this.mcpLog.warn("MCP tool dropped: invalid input schema", {
1689
+ server: "skaile-capabilities",
1690
+ tool: tool.name,
1691
+ reason
1692
+ });
1693
+ }
1694
+ return false;
1695
+ });
1696
+ if (tools.length === 0) return { server: null, dropped };
1499
1697
  let sdk;
1500
1698
  try {
1501
1699
  sdk = await import('@anthropic-ai/claude-agent-sdk');
1502
1700
  } catch {
1503
1701
  this.log.warn("claude-agent-sdk unavailable; cannot build capability MCP server");
1504
- return null;
1702
+ return { server: null, dropped };
1505
1703
  }
1506
1704
  const z2 = zStatic;
1507
1705
  const sdkTools = tools.map((tool) => ({
@@ -1524,9 +1722,11 @@ var ClaudeSdkDriver = class extends AgentDriver {
1524
1722
  callId,
1525
1723
  tool.name,
1526
1724
  input,
1527
- (err) => this.log.warn("background capability handler failed", {
1725
+ () => this.log.warn("background capability handler failed", {
1528
1726
  name: tool.name,
1529
- error: String(err)
1727
+ callId
1728
+ // Nothing from the error: its message or name can quote the call's
1729
+ // content. The registry's `failed` row for the same call has the metadata.
1530
1730
  })
1531
1731
  );
1532
1732
  const text = typeof dispatch.result === "string" ? dispatch.result : JSON.stringify(dispatch.result ?? {});
@@ -1539,7 +1739,10 @@ var ClaudeSdkDriver = class extends AgentDriver {
1539
1739
  }
1540
1740
  }
1541
1741
  }));
1542
- return sdk.createSdkMcpServer({ name: "skaile-capabilities", tools: sdkTools });
1742
+ return {
1743
+ server: sdk.createSdkMcpServer({ name: "skaile-capabilities", tools: sdkTools }),
1744
+ dropped
1745
+ };
1543
1746
  }
1544
1747
  /** Fetch and cache slash commands from the SDK query. */
1545
1748
  async fetchSlashCommands() {