@xopcai/xopc 0.0.103 → 0.0.105

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 (950) hide show
  1. package/README.md +7 -4
  2. package/README.zh-CN.md +7 -4
  3. package/dist/_virtual/_rolldown/runtime.js +2 -3
  4. package/dist/browser-ext/manifest.json +1 -1
  5. package/dist/extensions/feishu/src/adapters/cli-login.d.ts +1 -1
  6. package/dist/extensions/feishu/src/adapters/cli-login.js +1 -1
  7. package/dist/extensions/feishu/src/adapters/cli-login.js.map +1 -1
  8. package/dist/extensions/feishu/src/adapters/gateway-setup.d.ts +2 -0
  9. package/dist/extensions/feishu/src/adapters/gateway-setup.js +225 -0
  10. package/dist/extensions/feishu/src/adapters/gateway-setup.js.map +1 -0
  11. package/dist/extensions/feishu/src/index.d.ts +8 -1
  12. package/dist/extensions/feishu/src/index.js +14 -1
  13. package/dist/extensions/feishu/src/index.js.map +1 -0
  14. package/dist/extensions/feishu/src/outbound/outbound-adapter.js +1 -1
  15. package/dist/extensions/feishu/src/plugin.d.ts +2 -1
  16. package/dist/extensions/feishu/src/plugin.js +2 -0
  17. package/dist/extensions/feishu/src/plugin.js.map +1 -1
  18. package/dist/extensions/feishu/src/streaming/streaming-adapter.js +1 -1
  19. package/dist/extensions/feishu/src/transport/webhook/monitor.js +1 -1
  20. package/dist/extensions/feishu/xopc.extension.json +66 -1
  21. package/dist/extensions/telegram/src/adapters/gateway-setup.d.ts +2 -0
  22. package/dist/extensions/telegram/src/adapters/gateway-setup.js +146 -0
  23. package/dist/extensions/telegram/src/adapters/gateway-setup.js.map +1 -0
  24. package/dist/extensions/telegram/src/adapters/security-adapter.js +1 -1
  25. package/dist/extensions/telegram/src/command-handler.js +1 -2
  26. package/dist/extensions/telegram/src/command-handler.js.map +1 -1
  27. package/dist/extensions/telegram/src/config-schema.js +2 -2
  28. package/dist/extensions/telegram/src/config-schema.js.map +1 -1
  29. package/dist/extensions/telegram/src/doctor.d.ts +1 -0
  30. package/dist/extensions/telegram/src/doctor.js +68 -0
  31. package/dist/extensions/telegram/src/doctor.js.map +1 -1
  32. package/dist/extensions/telegram/src/index.d.ts +8 -1
  33. package/dist/extensions/telegram/src/index.js +15 -2
  34. package/dist/extensions/telegram/src/index.js.map +1 -0
  35. package/dist/extensions/telegram/src/plugin.d.ts +13 -5
  36. package/dist/extensions/telegram/src/plugin.js +32 -12
  37. package/dist/extensions/telegram/src/plugin.js.map +1 -1
  38. package/dist/extensions/telegram/src/proxy-fetch.js +22 -5
  39. package/dist/extensions/telegram/src/proxy-fetch.js.map +1 -1
  40. package/dist/extensions/telegram/xopc.extension.json +412 -5
  41. package/dist/extensions/weixin/src/adapters/onboard-cli.js +2 -2
  42. package/dist/extensions/weixin/src/adapters/onboard-cli.js.map +1 -1
  43. package/dist/extensions/weixin/src/api/api.js +1 -1
  44. package/dist/extensions/weixin/src/index.d.ts +8 -0
  45. package/dist/extensions/weixin/src/index.js +12 -1
  46. package/dist/extensions/weixin/src/index.js.map +1 -0
  47. package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
  48. package/dist/extensions/weixin/src/plugin.d.ts +2 -1
  49. package/dist/extensions/weixin/src/plugin.js +77 -2
  50. package/dist/extensions/weixin/src/plugin.js.map +1 -1
  51. package/dist/extensions/weixin/xopc.extension.json +52 -0
  52. package/dist/gateway/static/root/assets/agents-XzgIVKcI.js +396 -0
  53. package/dist/gateway/static/root/assets/{apps-page-C5RmwmTT.js → apps-page-B7Us3RMl.js} +1 -1
  54. package/dist/gateway/static/root/assets/browser-BLJWD7WI.js +8 -0
  55. package/dist/gateway/static/root/assets/channels-settings-BgeV6fzw.js +1 -0
  56. package/dist/gateway/static/root/assets/cron-page-DKGHEeAU.js +1 -0
  57. package/dist/gateway/static/root/assets/{dist-CWm8hTXZ.js → dist-DJDkNhu5.js} +1 -1
  58. package/dist/gateway/static/root/assets/{extension-debug-page-BzYgTkS9.js → extension-debug-page-DI1XJTJi.js} +1 -1
  59. package/dist/gateway/static/root/assets/{extension-page-BmTZH6gL.js → extension-page-SuafGTT_.js} +1 -1
  60. package/dist/gateway/static/root/assets/extension-settings-page-cKmGax9v.js +1 -0
  61. package/dist/gateway/static/root/assets/{fetch-CMoWY2Si.js → fetch-CkvRO30i.js} +1 -1
  62. package/dist/gateway/static/root/assets/gateway-startup-retry-BkKyRDrF.js +1 -0
  63. package/dist/gateway/static/root/assets/heartbeat-config-api-CRiDcxtt.js +1 -0
  64. package/dist/gateway/static/root/assets/index-50FVtgXU.js +4845 -0
  65. package/dist/gateway/static/root/assets/index-BPYKW7FB.css +1 -0
  66. package/dist/gateway/static/root/assets/{logs-page-BjdQjHwk.js → logs-page-DM8o5-Bm.js} +2 -2
  67. package/dist/gateway/static/root/assets/{note-detail-page-8Er4197b.js → note-detail-page-j53jtvq9.js} +53 -53
  68. package/dist/gateway/static/root/assets/{note-time-CF3vf1jm.js → note-time-Ck2H2Qpw.js} +1 -1
  69. package/dist/gateway/static/root/assets/notes-page-CsWIw35Q.js +1 -0
  70. package/dist/gateway/static/root/assets/schema-form-BvmGNxiJ.js +1 -0
  71. package/dist/gateway/static/root/assets/sessions-page-CLPsbyOW.js +1 -0
  72. package/dist/gateway/static/root/assets/settings-advanced-gate-DRdayl8P.js +2 -0
  73. package/dist/gateway/static/root/assets/{settings-form-section-C7qA7y0J.js → settings-form-section-BlIYg2gZ.js} +1 -1
  74. package/dist/gateway/static/root/assets/settings-page-CRGHT_bm.js +3 -0
  75. package/dist/gateway/static/root/assets/{share-preview-page-Tvr5Mtq5.js → share-preview-page-BlT6Akvk.js} +1 -1
  76. package/dist/gateway/static/root/assets/skills-page-Ce-RIH2y.js +2 -0
  77. package/dist/gateway/static/root/assets/{theme-store-HTvJlFLL.js → theme-store-DYgVdRB4.js} +1 -1
  78. package/dist/gateway/static/root/assets/url-DPEStU4M.js +3 -0
  79. package/dist/gateway/static/root/assets/voice-api-key-field-CJGTidqc.js +1 -0
  80. package/dist/gateway/static/root/assets/{workflow-page.utils-CeBkAjP7.js → workflow-page.utils-_sjXCMvi.js} +1 -1
  81. package/dist/gateway/static/root/assets/workflows-page-o63aaARK.js +27 -0
  82. package/dist/gateway/static/root/index.html +6 -5
  83. package/dist/package.js +1 -1
  84. package/dist/src/agent/agent-manager.d.ts +18 -6
  85. package/dist/src/agent/agent-manager.js +60 -35
  86. package/dist/src/agent/agent-manager.js.map +1 -1
  87. package/dist/src/agent/builtin-agent-ids.d.ts +2 -0
  88. package/dist/src/agent/builtin-agent-ids.js +17 -0
  89. package/dist/src/agent/builtin-agent-ids.js.map +1 -0
  90. package/dist/src/agent/child-agent-factory.d.ts +4 -0
  91. package/dist/src/agent/child-agent-factory.js +28 -8
  92. package/dist/src/agent/child-agent-factory.js.map +1 -1
  93. package/dist/src/agent/context/workspace-templates/AGENTS.md +23 -184
  94. package/dist/src/agent/embedded/run-turn.js +8 -2
  95. package/dist/src/agent/embedded/run-turn.js.map +1 -1
  96. package/dist/src/agent/embedded/session-tool-result-guard.js +1 -1
  97. package/dist/src/agent/embedded/subscribe-session.js +33 -51
  98. package/dist/src/agent/embedded/subscribe-session.js.map +1 -1
  99. package/dist/src/agent/embedded/types.d.ts +36 -35
  100. package/dist/src/agent/fallback/candidates.js +1 -1
  101. package/dist/src/agent/fallback/candidates.js.map +1 -1
  102. package/dist/src/agent/inbound/inbound-loop.js +1 -1
  103. package/dist/src/agent/inbound/turn-dispatcher.d.ts +3 -0
  104. package/dist/src/agent/inbound/turn-dispatcher.js +25 -5
  105. package/dist/src/agent/inbound/turn-dispatcher.js.map +1 -1
  106. package/dist/src/agent/models/manager.d.ts +1 -1
  107. package/dist/src/agent/models/manager.js +1 -1
  108. package/dist/src/agent/models/manager.js.map +1 -1
  109. package/dist/src/agent/orchestration/run-agent-turn-with-fallbacks.d.ts +1 -1
  110. package/dist/src/agent/orchestration/run-agent-turn-with-fallbacks.js +1 -1
  111. package/dist/src/agent/orchestration/run-agent-turn-with-fallbacks.js.map +1 -1
  112. package/dist/src/agent/prompt/memory/index.js +30 -2
  113. package/dist/src/agent/prompt/memory/index.js.map +1 -1
  114. package/dist/src/agent/prompt/sections/tooling.js +4 -0
  115. package/dist/src/agent/prompt/sections/tooling.js.map +1 -1
  116. package/dist/src/agent/service/direct-turn-helpers.d.ts +3 -0
  117. package/dist/src/agent/service/direct-turn-helpers.js +6 -3
  118. package/dist/src/agent/service/direct-turn-helpers.js.map +1 -1
  119. package/dist/src/agent/service/process-direct-streaming.d.ts +3 -0
  120. package/dist/src/agent/service/process-direct-streaming.js +50 -19
  121. package/dist/src/agent/service/process-direct-streaming.js.map +1 -1
  122. package/dist/src/agent/service-inbound-utils.d.ts +0 -1
  123. package/dist/src/agent/service-inbound-utils.js +1 -17
  124. package/dist/src/agent/service-inbound-utils.js.map +1 -1
  125. package/dist/src/agent/service.d.ts +4 -4
  126. package/dist/src/agent/service.js +29 -16
  127. package/dist/src/agent/service.js.map +1 -1
  128. package/dist/src/agent/service.types.d.ts +3 -0
  129. package/dist/src/agent/session/session-config-service.d.ts +1 -0
  130. package/dist/src/agent/session/session-config-service.js +9 -1
  131. package/dist/src/agent/session/session-config-service.js.map +1 -1
  132. package/dist/src/agent/session/session-inspector.d.ts +2 -1
  133. package/dist/src/agent/session/session-inspector.js +4 -0
  134. package/dist/src/agent/session/session-inspector.js.map +1 -1
  135. package/dist/src/agent/skills/config.js +1 -3
  136. package/dist/src/agent/skills/config.js.map +1 -1
  137. package/dist/src/agent/skills/format-skills-prompt.d.ts +1 -0
  138. package/dist/src/agent/skills/format-skills-prompt.js +3 -2
  139. package/dist/src/agent/skills/format-skills-prompt.js.map +1 -1
  140. package/dist/src/agent/skills/index.js +20 -5
  141. package/dist/src/agent/skills/index.js.map +1 -1
  142. package/dist/src/agent/skills/installer.js +14 -27
  143. package/dist/src/agent/skills/installer.js.map +1 -1
  144. package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +11 -1
  145. package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js.map +1 -1
  146. package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js +18 -4
  147. package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js.map +1 -1
  148. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +11 -2
  149. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js.map +1 -1
  150. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +2 -2
  151. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js.map +1 -1
  152. package/dist/src/agent/skills/skill-manager.d.ts +4 -1
  153. package/dist/src/agent/skills/skill-manager.js +3 -3
  154. package/dist/src/agent/skills/skill-manager.js.map +1 -1
  155. package/dist/src/agent/skills/skill-view-path.d.ts +1 -17
  156. package/dist/src/agent/skills/skill-view-path.js +3 -66
  157. package/dist/src/agent/skills/skill-view-path.js.map +1 -1
  158. package/dist/src/agent/skills/test-framework.js +2 -3
  159. package/dist/src/agent/skills/test-framework.js.map +1 -1
  160. package/dist/src/agent/source-context/index.d.ts +2 -0
  161. package/dist/src/agent/source-context/index.js +3 -0
  162. package/dist/src/agent/source-context/injector.d.ts +3 -0
  163. package/dist/src/agent/source-context/injector.js +36 -0
  164. package/dist/src/agent/source-context/injector.js.map +1 -0
  165. package/dist/src/agent/source-context/types.d.ts +19 -0
  166. package/dist/src/agent/source-context/types.js +10 -0
  167. package/dist/src/agent/source-context/types.js.map +1 -0
  168. package/dist/src/agent/streaming/reasoning-visibility-sse.js +1 -0
  169. package/dist/src/agent/streaming/reasoning-visibility-sse.js.map +1 -1
  170. package/dist/src/agent/tool-manuals/browser.d.ts +1 -0
  171. package/{skills/browser/SKILL.md → dist/src/agent/tool-manuals/browser.js} +51 -54
  172. package/dist/src/agent/tool-manuals/browser.js.map +1 -0
  173. package/dist/src/agent/tool-manuals/index.d.ts +10 -0
  174. package/dist/src/agent/tool-manuals/index.js +28 -0
  175. package/dist/src/agent/tool-manuals/index.js.map +1 -0
  176. package/dist/src/agent/tools/browser/tool/browser-use-tool.js +1 -1
  177. package/dist/src/agent/tools/browser/tool/browser-use-tool.js.map +1 -1
  178. package/dist/src/agent/tools/factory.js +2 -0
  179. package/dist/src/agent/tools/factory.js.map +1 -1
  180. package/dist/src/agent/tools/index.d.ts +1 -0
  181. package/dist/src/agent/tools/index.js +2 -1
  182. package/dist/src/agent/tools/skills-tools.js +37 -8
  183. package/dist/src/agent/tools/skills-tools.js.map +1 -1
  184. package/dist/src/agent/tools/tool-manual-tool.d.ts +6 -0
  185. package/dist/src/agent/tools/tool-manual-tool.js +34 -0
  186. package/dist/src/agent/tools/tool-manual-tool.js.map +1 -0
  187. package/dist/src/agent/workflow/catalog.d.ts +7 -2
  188. package/dist/src/agent/workflow/catalog.js +66 -25
  189. package/dist/src/agent/workflow/catalog.js.map +1 -1
  190. package/dist/src/agent/workflow/subagent-runner.d.ts +3 -0
  191. package/dist/src/agent/workflow/subagent-runner.js +50 -4
  192. package/dist/src/agent/workflow/subagent-runner.js.map +1 -1
  193. package/dist/src/agent/workflow/types.d.ts +10 -0
  194. package/dist/src/auth/credentials.js +10 -5
  195. package/dist/src/auth/credentials.js.map +1 -1
  196. package/dist/src/channels/catalog/channel-catalog-service.d.ts +11 -0
  197. package/dist/src/channels/catalog/channel-catalog-service.js +168 -0
  198. package/dist/src/channels/catalog/channel-catalog-service.js.map +1 -0
  199. package/dist/src/channels/catalog/channel-catalog-types.d.ts +22 -0
  200. package/dist/src/channels/catalog/channel-catalog-types.js +1 -0
  201. package/dist/src/channels/dock.d.ts +0 -7
  202. package/dist/src/channels/dock.js +1 -21
  203. package/dist/src/channels/index.d.ts +1 -3
  204. package/dist/src/channels/index.js +1 -5
  205. package/dist/src/channels/lifecycle-supervisor.d.ts +1 -0
  206. package/dist/src/channels/lifecycle-supervisor.js +11 -0
  207. package/dist/src/channels/lifecycle-supervisor.js.map +1 -1
  208. package/dist/src/channels/manager.d.ts +1 -0
  209. package/dist/src/channels/manager.js +3 -0
  210. package/dist/src/channels/manager.js.map +1 -1
  211. package/dist/src/channels/pairing/pairing-channel.d.ts +2 -3
  212. package/dist/src/channels/pairing/pairing-messages.js +1 -1
  213. package/dist/src/channels/pairing/pairing-messages.js.map +1 -1
  214. package/dist/src/channels/pairing/pairing-service.d.ts +1 -1
  215. package/dist/src/channels/pairing/pairing-service.js +8 -27
  216. package/dist/src/channels/pairing/pairing-service.js.map +1 -1
  217. package/dist/src/channels/plugin-types.d.ts +3 -1
  218. package/dist/src/channels/plugins/types.adapters.d.ts +55 -2
  219. package/dist/src/channels/telegram/index.js +1 -1
  220. package/dist/src/chat-commands/builtins/config.js +4 -4
  221. package/dist/src/chat-commands/builtins/config.js.map +1 -1
  222. package/dist/src/chat-commands/config-paths.js +1 -1
  223. package/dist/src/chat-commands/config-paths.js.map +1 -1
  224. package/dist/src/chat-commands/context.js +1 -1
  225. package/dist/src/chat-commands/context.js.map +1 -1
  226. package/dist/src/cli/bin.js +1 -1
  227. package/dist/src/cli/command-manifest.js +1 -1
  228. package/dist/src/cli/command-manifest.js.map +1 -1
  229. package/dist/src/cli/commands/agent.js +2 -2
  230. package/dist/src/cli/commands/agent.js.map +1 -1
  231. package/dist/src/cli/commands/agents.js +2 -4
  232. package/dist/src/cli/commands/agents.js.map +1 -1
  233. package/dist/src/cli/commands/auth.js +1 -1
  234. package/dist/src/cli/commands/channels.d.ts +1 -5
  235. package/dist/src/cli/commands/channels.js +115 -281
  236. package/dist/src/cli/commands/channels.js.map +1 -1
  237. package/dist/src/cli/commands/config.js +2 -2
  238. package/dist/src/cli/commands/config.js.map +1 -1
  239. package/dist/src/cli/commands/doctor/checks/channel-config.js +16 -69
  240. package/dist/src/cli/commands/doctor/checks/channel-config.js.map +1 -1
  241. package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +6 -4
  242. package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js.map +1 -1
  243. package/dist/src/cli/commands/doctor/checks/channel-plugins.js +2 -2
  244. package/dist/src/cli/commands/doctor/checks/channel-plugins.js.map +1 -1
  245. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  246. package/dist/src/cli/commands/doctor/checks/provider-auth.js +13 -9
  247. package/dist/src/cli/commands/doctor/checks/provider-auth.js.map +1 -1
  248. package/dist/src/cli/commands/extension-dev.js +2 -1
  249. package/dist/src/cli/commands/extension-dev.js.map +1 -1
  250. package/dist/src/cli/commands/extension-marketplace.js +2 -1
  251. package/dist/src/cli/commands/extension-marketplace.js.map +1 -1
  252. package/dist/src/cli/commands/extension-pack.js +2 -1
  253. package/dist/src/cli/commands/extension-pack.js.map +1 -1
  254. package/dist/src/cli/commands/models.js +7 -4
  255. package/dist/src/cli/commands/models.js.map +1 -1
  256. package/dist/src/cli/commands/onboard/channels/index.js +1 -1
  257. package/dist/src/cli/commands/onboard/channels/index.js.map +1 -1
  258. package/dist/src/cli/commands/onboard/channels/registry.d.ts +2 -1
  259. package/dist/src/cli/commands/onboard/channels/registry.js +32 -8
  260. package/dist/src/cli/commands/onboard/channels/registry.js.map +1 -1
  261. package/dist/src/cli/commands/onboard/model.js +8 -5
  262. package/dist/src/cli/commands/onboard/model.js.map +1 -1
  263. package/dist/src/cli/commands/onboard.js +4 -6
  264. package/dist/src/cli/commands/onboard.js.map +1 -1
  265. package/dist/src/cli/commands/setup-shared/runner.d.ts +1 -1
  266. package/dist/src/cli/commands/setup-shared/runner.js.map +1 -1
  267. package/dist/src/cli/commands/setup-shared/types.d.ts +1 -1
  268. package/dist/src/cli/commands/setup-shared/types.js.map +1 -1
  269. package/dist/src/cli/commands/tui.js +13 -5
  270. package/dist/src/cli/commands/tui.js.map +1 -1
  271. package/dist/src/cli/extension-cli-register.js +1 -1
  272. package/dist/src/commands/agents.config.d.ts +3 -3
  273. package/dist/src/commands/agents.config.js +7 -7
  274. package/dist/src/commands/agents.config.js.map +1 -1
  275. package/dist/src/config/agent-profile.d.ts +1 -1
  276. package/dist/src/config/agent-profile.js +6 -2
  277. package/dist/src/config/agent-profile.js.map +1 -1
  278. package/dist/src/config/agent-typed-models.d.ts +2 -2
  279. package/dist/src/config/agent-typed-models.js +13 -2
  280. package/dist/src/config/agent-typed-models.js.map +1 -1
  281. package/dist/src/config/index.js +3 -3
  282. package/dist/src/config/integration.d.ts +1 -1
  283. package/dist/src/config/loader.d.ts +0 -1
  284. package/dist/src/config/loader.js +4 -9
  285. package/dist/src/config/loader.js.map +1 -1
  286. package/dist/src/config/models-json.d.ts +6 -6
  287. package/dist/src/config/paths.d.ts +1 -0
  288. package/dist/src/config/paths.js +5 -1
  289. package/dist/src/config/paths.js.map +1 -1
  290. package/dist/src/config/rules.js +2 -12
  291. package/dist/src/config/rules.js.map +1 -1
  292. package/dist/src/config/schema.d.ts +74 -47
  293. package/dist/src/config/schema.js +28 -66
  294. package/dist/src/config/schema.js.map +1 -1
  295. package/dist/src/config/validate-channel-configs.d.ts +0 -3
  296. package/dist/src/config/validate-channel-configs.js +29 -10
  297. package/dist/src/config/validate-channel-configs.js.map +1 -1
  298. package/dist/src/cron/executor.js +1 -4
  299. package/dist/src/cron/executor.js.map +1 -1
  300. package/dist/src/document-understanding/extract.d.ts +13 -0
  301. package/dist/src/document-understanding/extract.js +63 -0
  302. package/dist/src/document-understanding/extract.js.map +1 -0
  303. package/dist/src/extensions/activation-context.js +3 -1
  304. package/dist/src/extensions/activation-context.js.map +1 -1
  305. package/dist/src/extensions/activation-planner.js +12 -0
  306. package/dist/src/extensions/activation-planner.js.map +1 -1
  307. package/dist/src/extensions/api.d.ts +5 -1
  308. package/dist/src/extensions/api.js +12 -0
  309. package/dist/src/extensions/api.js.map +1 -1
  310. package/dist/src/extensions/discover-extensions.js +17 -13
  311. package/dist/src/extensions/discover-extensions.js.map +1 -1
  312. package/dist/src/extensions/extension-metadata-snapshot.js +11 -5
  313. package/dist/src/extensions/extension-metadata-snapshot.js.map +1 -1
  314. package/dist/src/extensions/index.js +12 -4
  315. package/dist/src/extensions/index.js.map +1 -0
  316. package/dist/src/extensions/loader.d.ts +5 -1
  317. package/dist/src/extensions/loader.js +12 -11
  318. package/dist/src/extensions/loader.js.map +1 -1
  319. package/dist/src/extensions/manifest-registry.js +98 -93
  320. package/dist/src/extensions/manifest-registry.js.map +1 -1
  321. package/dist/src/extensions/normalize-manifest.js +91 -15
  322. package/dist/src/extensions/normalize-manifest.js.map +1 -1
  323. package/dist/src/extensions/sdk/index.js +1 -1
  324. package/dist/src/extensions/sdk/testing.js +4 -0
  325. package/dist/src/extensions/sdk/testing.js.map +1 -1
  326. package/dist/src/extensions/types/core.d.ts +32 -1
  327. package/dist/src/extensions/types/manifest.d.ts +60 -0
  328. package/dist/src/extensions/types/tui.d.ts +414 -5
  329. package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
  330. package/dist/src/gateway/agent-builtin-tools.js +16 -0
  331. package/dist/src/gateway/agent-builtin-tools.js.map +1 -1
  332. package/dist/src/gateway/agent-run-relay.d.ts +2 -3
  333. package/dist/src/gateway/agent-run-relay.js +10 -3
  334. package/dist/src/gateway/agent-run-relay.js.map +1 -1
  335. package/dist/src/gateway/agents-admin.d.ts +32 -19
  336. package/dist/src/gateway/agents-admin.js +113 -93
  337. package/dist/src/gateway/agents-admin.js.map +1 -1
  338. package/dist/src/gateway/chat-stream/mapper.d.ts +34 -0
  339. package/dist/src/gateway/chat-stream/mapper.js +244 -0
  340. package/dist/src/gateway/chat-stream/mapper.js.map +1 -0
  341. package/dist/src/gateway/chat-stream/protocol.d.ts +100 -0
  342. package/dist/src/gateway/chat-stream/protocol.js +1 -0
  343. package/dist/src/gateway/heartbeat/service.js +1 -1
  344. package/dist/src/gateway/hono/lib/agent-model.d.ts +4 -4
  345. package/dist/src/gateway/hono/lib/agent-model.js +13 -11
  346. package/dist/src/gateway/hono/lib/agent-model.js.map +1 -1
  347. package/dist/src/gateway/hono/lib/config-payload.d.ts +19 -7
  348. package/dist/src/gateway/hono/lib/config-payload.js +16 -15
  349. package/dist/src/gateway/hono/lib/config-payload.js.map +1 -1
  350. package/dist/src/gateway/hono/routes/agents.js +83 -48
  351. package/dist/src/gateway/hono/routes/agents.js.map +1 -1
  352. package/dist/src/gateway/hono/routes/channels.js +134 -214
  353. package/dist/src/gateway/hono/routes/channels.js.map +1 -1
  354. package/dist/src/gateway/hono/routes/commands-skills.js +10 -4
  355. package/dist/src/gateway/hono/routes/commands-skills.js.map +1 -1
  356. package/dist/src/gateway/hono/routes/config-patch/agents.js +26 -13
  357. package/dist/src/gateway/hono/routes/config-patch/agents.js.map +1 -1
  358. package/dist/src/gateway/hono/routes/config-patch/channels.d.ts +1 -11
  359. package/dist/src/gateway/hono/routes/config-patch/channels.js +18 -165
  360. package/dist/src/gateway/hono/routes/config-patch/channels.js.map +1 -1
  361. package/dist/src/gateway/hono/routes/config.js +5 -2
  362. package/dist/src/gateway/hono/routes/config.js.map +1 -1
  363. package/dist/src/gateway/hono/routes/dreaming.js +1 -1
  364. package/dist/src/gateway/hono/routes/lazy-bundles.js +13 -1
  365. package/dist/src/gateway/hono/routes/lazy-bundles.js.map +1 -1
  366. package/dist/src/gateway/hono/routes/notes.js +46 -27
  367. package/dist/src/gateway/hono/routes/notes.js.map +1 -1
  368. package/dist/src/gateway/hono/routes/public-gateway.js +2 -4
  369. package/dist/src/gateway/hono/routes/public-gateway.js.map +1 -1
  370. package/dist/src/gateway/hono/routes/sessions.js +179 -0
  371. package/dist/src/gateway/hono/routes/sessions.js.map +1 -1
  372. package/dist/src/gateway/hono/routes/tui.d.ts +3 -0
  373. package/dist/src/gateway/hono/routes/tui.js +16 -0
  374. package/dist/src/gateway/hono/routes/tui.js.map +1 -0
  375. package/dist/src/gateway/hono/routes/workflows.js +25 -1
  376. package/dist/src/gateway/hono/routes/workflows.js.map +1 -1
  377. package/dist/src/gateway/hono/sse.d.ts +5 -7
  378. package/dist/src/gateway/hono/sse.js +21 -38
  379. package/dist/src/gateway/hono/sse.js.map +1 -1
  380. package/dist/src/gateway/protocol.js.map +1 -1
  381. package/dist/src/gateway/service/agent-runner.d.ts +2 -4
  382. package/dist/src/gateway/service/agent-runner.js +1 -1
  383. package/dist/src/gateway/service/agent-runner.js.map +1 -1
  384. package/dist/src/gateway/service/marketplace-service.d.ts +4 -3
  385. package/dist/src/gateway/service/marketplace-service.js +7 -4
  386. package/dist/src/gateway/service/marketplace-service.js.map +1 -1
  387. package/dist/src/gateway/service/run-gateway-agent.d.ts +2 -6
  388. package/dist/src/gateway/service/run-gateway-agent.js +63 -36
  389. package/dist/src/gateway/service/run-gateway-agent.js.map +1 -1
  390. package/dist/src/gateway/service/sessions-api.d.ts +19 -0
  391. package/dist/src/gateway/service/sessions-api.js +12 -0
  392. package/dist/src/gateway/service/sessions-api.js.map +1 -1
  393. package/dist/src/gateway/service.d.ts +6 -0
  394. package/dist/src/gateway/service.js +84 -57
  395. package/dist/src/gateway/service.js.map +1 -1
  396. package/dist/src/heartbeat/index.js +1 -1
  397. package/dist/src/notes/agent-context.d.ts +40 -0
  398. package/dist/src/notes/agent-context.js +383 -0
  399. package/dist/src/notes/agent-context.js.map +1 -0
  400. package/dist/src/notes/index.d.ts +2 -0
  401. package/dist/src/notes/index.js +2 -1
  402. package/dist/src/notes/service.d.ts +5 -0
  403. package/dist/src/notes/service.js +22 -0
  404. package/dist/src/notes/service.js.map +1 -1
  405. package/dist/src/notes/store.js +2 -0
  406. package/dist/src/notes/store.js.map +1 -1
  407. package/dist/src/project-trust/trust-store.d.ts +30 -0
  408. package/dist/src/project-trust/trust-store.js +194 -0
  409. package/dist/src/project-trust/trust-store.js.map +1 -0
  410. package/dist/src/providers/index.d.ts +1 -1
  411. package/dist/src/providers/index.js +18 -7
  412. package/dist/src/providers/index.js.map +1 -1
  413. package/dist/src/routing/resolve-route.d.ts +0 -3
  414. package/dist/src/routing/resolve-route.js.map +1 -1
  415. package/dist/src/routing/resolve-tui-session-key.d.ts +2 -0
  416. package/dist/src/routing/resolve-tui-session-key.js +8 -3
  417. package/dist/src/routing/resolve-tui-session-key.js.map +1 -1
  418. package/dist/src/session/client-history.d.ts +32 -0
  419. package/dist/src/session/client-history.js +232 -1
  420. package/dist/src/session/client-history.js.map +1 -1
  421. package/dist/src/session/manager.d.ts +37 -4
  422. package/dist/src/session/manager.js +39 -15
  423. package/dist/src/session/manager.js.map +1 -1
  424. package/dist/src/session/session-context-for-llm.d.ts +93 -1
  425. package/dist/src/session/session-context-for-llm.js +105 -2
  426. package/dist/src/session/session-context-for-llm.js.map +1 -1
  427. package/dist/src/session/store.d.ts +37 -0
  428. package/dist/src/session/store.js +127 -2
  429. package/dist/src/session/store.js.map +1 -1
  430. package/dist/src/session/stored-rows-to-file-entries.js +37 -1
  431. package/dist/src/session/stored-rows-to-file-entries.js.map +1 -1
  432. package/dist/src/session/types.d.ts +14 -1
  433. package/dist/src/session/types.js.map +1 -1
  434. package/dist/src/storage/sqlite/index.d.ts +1 -0
  435. package/dist/src/storage/sqlite/index.js +2 -1
  436. package/dist/src/storage/sqlite/migrations/004_add_session_type_metadata.sql +15 -0
  437. package/dist/src/storage/sqlite/migrations/005_add_note_agent_contexts.sql +10 -0
  438. package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
  439. package/dist/src/storage/sqlite/migrations/runner.js +3 -3
  440. package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
  441. package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
  442. package/dist/src/storage/sqlite/note-agent-context-repository.d.ts +10 -0
  443. package/dist/src/storage/sqlite/note-agent-context-repository.js +35 -0
  444. package/dist/src/storage/sqlite/note-agent-context-repository.js.map +1 -0
  445. package/dist/src/storage/sqlite/row-mappers.d.ts +14 -1
  446. package/dist/src/storage/sqlite/row-mappers.js +14 -1
  447. package/dist/src/storage/sqlite/row-mappers.js.map +1 -1
  448. package/dist/src/storage/sqlite/schema.js +1 -1
  449. package/dist/src/storage/sqlite/session-metadata.js +1 -0
  450. package/dist/src/storage/sqlite/session-metadata.js.map +1 -1
  451. package/dist/src/storage/sqlite/session-repository.js +52 -25
  452. package/dist/src/storage/sqlite/session-repository.js.map +1 -1
  453. package/dist/src/tui/backends/embedded-backend.d.ts +53 -4
  454. package/dist/src/tui/backends/embedded-backend.js +227 -39
  455. package/dist/src/tui/backends/embedded-backend.js.map +1 -1
  456. package/dist/src/tui/backends/gateway-sse-backend.d.ts +59 -3
  457. package/dist/src/tui/backends/gateway-sse-backend.js +416 -26
  458. package/dist/src/tui/backends/gateway-sse-backend.js.map +1 -1
  459. package/dist/src/tui/chat-history.d.ts +5 -1
  460. package/dist/src/tui/chat-history.js +78 -8
  461. package/dist/src/tui/chat-history.js.map +1 -1
  462. package/dist/src/tui/clipboard-text.d.ts +5 -0
  463. package/dist/src/tui/clipboard-text.js +46 -0
  464. package/dist/src/tui/clipboard-text.js.map +1 -0
  465. package/dist/src/tui/components/assistant-message.d.ts +19 -3
  466. package/dist/src/tui/components/assistant-message.js +115 -9
  467. package/dist/src/tui/components/assistant-message.js.map +1 -1
  468. package/dist/src/tui/components/bash-execution.d.ts +3 -2
  469. package/dist/src/tui/components/bash-execution.js +31 -3
  470. package/dist/src/tui/components/bash-execution.js.map +1 -1
  471. package/dist/src/tui/components/bash-summary.d.ts +23 -0
  472. package/dist/src/tui/components/bash-summary.js +87 -0
  473. package/dist/src/tui/components/bash-summary.js.map +1 -0
  474. package/dist/src/tui/components/branch-message-summary.d.ts +17 -0
  475. package/dist/src/tui/components/branch-message-summary.js +43 -0
  476. package/dist/src/tui/components/branch-message-summary.js.map +1 -0
  477. package/dist/src/tui/components/branch-summary.d.ts +13 -0
  478. package/dist/src/tui/components/branch-summary.js +51 -0
  479. package/dist/src/tui/components/branch-summary.js.map +1 -0
  480. package/dist/src/tui/components/chat-log.d.ts +46 -6
  481. package/dist/src/tui/components/chat-log.js +183 -21
  482. package/dist/src/tui/components/chat-log.js.map +1 -1
  483. package/dist/src/tui/components/compaction-summary.d.ts +13 -0
  484. package/dist/src/tui/components/compaction-summary.js +46 -0
  485. package/dist/src/tui/components/compaction-summary.js.map +1 -0
  486. package/dist/src/tui/components/custom-editor.d.ts +1 -0
  487. package/dist/src/tui/components/custom-editor.js +2 -0
  488. package/dist/src/tui/components/custom-editor.js.map +1 -1
  489. package/dist/src/tui/components/custom-message.d.ts +23 -0
  490. package/dist/src/tui/components/custom-message.js +65 -0
  491. package/dist/src/tui/components/custom-message.js.map +1 -0
  492. package/dist/src/tui/components/extension-dialog.d.ts +42 -0
  493. package/dist/src/tui/components/extension-dialog.js +127 -0
  494. package/dist/src/tui/components/extension-dialog.js.map +1 -0
  495. package/dist/src/tui/components/scoped-models-selector.d.ts +7 -2
  496. package/dist/src/tui/components/scoped-models-selector.js +89 -16
  497. package/dist/src/tui/components/scoped-models-selector.js.map +1 -1
  498. package/dist/src/tui/components/searchable-select-list.d.ts +30 -3
  499. package/dist/src/tui/components/searchable-select-list.js +82 -10
  500. package/dist/src/tui/components/searchable-select-list.js.map +1 -1
  501. package/dist/src/tui/components/session-selector.d.ts +18 -4
  502. package/dist/src/tui/components/session-selector.js +207 -40
  503. package/dist/src/tui/components/session-selector.js.map +1 -1
  504. package/dist/src/tui/components/settings-selector.d.ts +6 -2
  505. package/dist/src/tui/components/settings-selector.js +126 -7
  506. package/dist/src/tui/components/settings-selector.js.map +1 -1
  507. package/dist/src/tui/components/thinking-selector.d.ts +12 -0
  508. package/dist/src/tui/components/thinking-selector.js +48 -0
  509. package/dist/src/tui/components/thinking-selector.js.map +1 -0
  510. package/dist/src/tui/components/tool-execution.d.ts +57 -3
  511. package/dist/src/tui/components/tool-execution.js +378 -28
  512. package/dist/src/tui/components/tool-execution.js.map +1 -1
  513. package/dist/src/tui/components/tui-bottom-bar.d.ts +9 -1
  514. package/dist/src/tui/components/tui-bottom-bar.js +56 -11
  515. package/dist/src/tui/components/tui-bottom-bar.js.map +1 -1
  516. package/dist/src/tui/components/tui-header.d.ts +9 -2
  517. package/dist/src/tui/components/tui-header.js +25 -5
  518. package/dist/src/tui/components/tui-header.js.map +1 -1
  519. package/dist/src/tui/components/user-message.d.ts +4 -2
  520. package/dist/src/tui/components/user-message.js +42 -9
  521. package/dist/src/tui/components/user-message.js.map +1 -1
  522. package/dist/src/tui/components/visual-truncate.d.ts +11 -0
  523. package/dist/src/tui/components/visual-truncate.js +27 -0
  524. package/dist/src/tui/components/visual-truncate.js.map +1 -0
  525. package/dist/src/tui/extension-host/autocomplete.d.ts +43 -0
  526. package/dist/src/tui/extension-host/autocomplete.js +116 -0
  527. package/dist/src/tui/extension-host/autocomplete.js.map +1 -0
  528. package/dist/src/tui/extension-host/host.d.ts +31 -1
  529. package/dist/src/tui/extension-host/host.js +123 -6
  530. package/dist/src/tui/extension-host/host.js.map +1 -1
  531. package/dist/src/tui/extension-host/load-extensions.d.ts +6 -1
  532. package/dist/src/tui/extension-host/load-extensions.js +4 -3
  533. package/dist/src/tui/extension-host/load-extensions.js.map +1 -1
  534. package/dist/src/tui/extension-host/runtime-context.d.ts +21 -0
  535. package/dist/src/tui/extension-host/runtime-context.js +152 -0
  536. package/dist/src/tui/extension-host/runtime-context.js.map +1 -0
  537. package/dist/src/tui/extension-host/runtime.d.ts +52 -4
  538. package/dist/src/tui/extension-host/runtime.js +547 -85
  539. package/dist/src/tui/extension-host/runtime.js.map +1 -1
  540. package/dist/src/tui/extension-host/surface.d.ts +20 -0
  541. package/dist/src/tui/extension-host/surface.js +30 -6
  542. package/dist/src/tui/extension-host/surface.js.map +1 -1
  543. package/dist/src/tui/extension-host/tool-renderers.d.ts +6 -3
  544. package/dist/src/tui/extension-host/tool-renderers.js +43 -5
  545. package/dist/src/tui/extension-host/tool-renderers.js.map +1 -1
  546. package/dist/src/tui/format-tui-hotkeys.d.ts +12 -2
  547. package/dist/src/tui/format-tui-hotkeys.js +22 -5
  548. package/dist/src/tui/format-tui-hotkeys.js.map +1 -1
  549. package/dist/src/tui/tui-agent-events.d.ts +8 -6
  550. package/dist/src/tui/tui-agent-events.js +200 -59
  551. package/dist/src/tui/tui-agent-events.js.map +1 -1
  552. package/dist/src/tui/tui-backend.d.ts +169 -3
  553. package/dist/src/tui/tui-command-formatters.d.ts +76 -0
  554. package/dist/src/tui/tui-command-formatters.js +594 -0
  555. package/dist/src/tui/tui-command-formatters.js.map +1 -0
  556. package/dist/src/tui/tui-commands.d.ts +57 -7
  557. package/dist/src/tui/tui-commands.js +639 -43
  558. package/dist/src/tui/tui-commands.js.map +1 -1
  559. package/dist/src/tui/tui-context-usage.d.ts +1 -1
  560. package/dist/src/tui/tui-context-usage.js +9 -1
  561. package/dist/src/tui/tui-context-usage.js.map +1 -1
  562. package/dist/src/tui/tui-extension-user-message.d.ts +8 -0
  563. package/dist/src/tui/tui-extension-user-message.js +32 -0
  564. package/dist/src/tui/tui-extension-user-message.js.map +1 -0
  565. package/dist/src/tui/tui-follow-up-queue.d.ts +9 -0
  566. package/dist/src/tui/tui-follow-up-queue.js +18 -0
  567. package/dist/src/tui/tui-follow-up-queue.js.map +1 -0
  568. package/dist/src/tui/tui-local-shell.d.ts +11 -1
  569. package/dist/src/tui/tui-local-shell.js +50 -8
  570. package/dist/src/tui/tui-local-shell.js.map +1 -1
  571. package/dist/src/tui/tui-model-picker.d.ts +26 -0
  572. package/dist/src/tui/tui-model-picker.js +152 -0
  573. package/dist/src/tui/tui-model-picker.js.map +1 -0
  574. package/dist/src/tui/tui-oauth-login.d.ts +16 -0
  575. package/dist/src/tui/tui-oauth-login.js +189 -0
  576. package/dist/src/tui/tui-oauth-login.js.map +1 -0
  577. package/dist/src/tui/tui-overlays.d.ts +3 -3
  578. package/dist/src/tui/tui-overlays.js +6 -7
  579. package/dist/src/tui/tui-overlays.js.map +1 -1
  580. package/dist/src/tui/tui-picker-overlay.d.ts +27 -32
  581. package/dist/src/tui/tui-picker-overlay.js +340 -30
  582. package/dist/src/tui/tui-picker-overlay.js.map +1 -1
  583. package/dist/src/tui/tui-picker-services.d.ts +41 -0
  584. package/dist/src/tui/tui-picker-services.js +1 -0
  585. package/dist/src/tui/tui-run-state.d.ts +11 -0
  586. package/dist/src/tui/tui-run-state.js +114 -0
  587. package/dist/src/tui/tui-run-state.js.map +1 -0
  588. package/dist/src/tui/tui-runtime-hints.d.ts +4 -0
  589. package/dist/src/tui/tui-runtime-hints.js +18 -0
  590. package/dist/src/tui/tui-runtime-hints.js.map +1 -0
  591. package/dist/src/tui/tui-scoped-models.d.ts +1 -1
  592. package/dist/src/tui/tui-scoped-models.js +2 -2
  593. package/dist/src/tui/tui-scoped-models.js.map +1 -1
  594. package/dist/src/tui/tui-session-actions.d.ts +5 -3
  595. package/dist/src/tui/tui-session-actions.js +21 -9
  596. package/dist/src/tui/tui-session-actions.js.map +1 -1
  597. package/dist/src/tui/tui-session-format.d.ts +4 -1
  598. package/dist/src/tui/tui-session-format.js +17 -3
  599. package/dist/src/tui/tui-session-format.js.map +1 -1
  600. package/dist/src/tui/tui-session-snapshot.d.ts +82 -0
  601. package/dist/src/tui/tui-session-snapshot.js +184 -0
  602. package/dist/src/tui/tui-session-snapshot.js.map +1 -0
  603. package/dist/src/tui/tui-session-stats.d.ts +3 -0
  604. package/dist/src/tui/tui-session-stats.js +59 -0
  605. package/dist/src/tui/tui-session-stats.js.map +1 -0
  606. package/dist/src/tui/tui-settings.d.ts +21 -0
  607. package/dist/src/tui/tui-settings.js +28 -1
  608. package/dist/src/tui/tui-settings.js.map +1 -1
  609. package/dist/src/tui/tui-skills-autocomplete.js +1 -1
  610. package/dist/src/tui/tui-skills-autocomplete.js.map +1 -1
  611. package/dist/src/tui/tui-startup-resources.d.ts +3 -0
  612. package/dist/src/tui/tui-startup-resources.js +39 -0
  613. package/dist/src/tui/tui-startup-resources.js.map +1 -0
  614. package/dist/src/tui/tui-startup-text.d.ts +10 -0
  615. package/dist/src/tui/tui-startup-text.js +58 -0
  616. package/dist/src/tui/tui-startup-text.js.map +1 -0
  617. package/dist/src/tui/tui-stdio-filter.d.ts +1 -0
  618. package/dist/src/tui/tui-stdio-filter.js +11 -7
  619. package/dist/src/tui/tui-stdio-filter.js.map +1 -1
  620. package/dist/src/tui/tui-submit.d.ts +2 -0
  621. package/dist/src/tui/tui-submit.js +2 -1
  622. package/dist/src/tui/tui-submit.js.map +1 -1
  623. package/dist/src/tui/tui-tool-diff.js +61 -7
  624. package/dist/src/tui/tui-tool-diff.js.map +1 -1
  625. package/dist/src/tui/tui-tool-result.d.ts +17 -0
  626. package/dist/src/tui/tui-tool-result.js +74 -0
  627. package/dist/src/tui/tui-tool-result.js.map +1 -0
  628. package/dist/src/tui/tui-transcript-tree-picker.d.ts +57 -0
  629. package/dist/src/tui/tui-transcript-tree-picker.js +604 -0
  630. package/dist/src/tui/tui-transcript-tree-picker.js.map +1 -0
  631. package/dist/src/tui/tui-transcript-tree.d.ts +7 -0
  632. package/dist/src/tui/tui-transcript-tree.js +316 -0
  633. package/dist/src/tui/tui-transcript-tree.js.map +1 -0
  634. package/dist/src/tui/tui-types.d.ts +25 -34
  635. package/dist/src/tui/tui-types.js +12 -0
  636. package/dist/src/tui/tui-types.js.map +1 -1
  637. package/dist/src/tui/tui.js +1288 -112
  638. package/dist/src/tui/tui.js.map +1 -1
  639. package/dist/src/tui/xopc-tui-keybindings.d.ts +127 -2
  640. package/dist/src/tui/xopc-tui-keybindings.js +127 -2
  641. package/dist/src/tui/xopc-tui-keybindings.js.map +1 -1
  642. package/dist/src/workflows/domain/definition-utils.d.ts +2 -1
  643. package/dist/src/workflows/domain/definition-utils.js +18 -8
  644. package/dist/src/workflows/domain/definition-utils.js.map +1 -1
  645. package/dist/src/workflows/domain/definition.d.ts +25 -0
  646. package/dist/src/workflows/domain/event.d.ts +1 -0
  647. package/dist/src/workflows/domain/result.d.ts +15 -0
  648. package/dist/src/workflows/domain/run.d.ts +2 -0
  649. package/dist/src/workflows/domain/run.js.map +1 -1
  650. package/dist/src/workflows/engine/projector.js +4 -0
  651. package/dist/src/workflows/engine/projector.js.map +1 -1
  652. package/dist/src/workflows/engine/workflow-engine.d.ts +37 -1
  653. package/dist/src/workflows/engine/workflow-engine.js +75 -11
  654. package/dist/src/workflows/engine/workflow-engine.js.map +1 -1
  655. package/dist/src/workflows/index.d.ts +1 -0
  656. package/dist/src/workflows/index.js +4 -1
  657. package/dist/src/workflows/registry/catalog-workflow-definition-registry.d.ts +9 -0
  658. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js +40 -0
  659. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js.map +1 -0
  660. package/dist/src/workflows/registry/index.d.ts +2 -0
  661. package/dist/src/workflows/registry/index.js +2 -0
  662. package/dist/src/workflows/registry/workflow-definition-registry.d.ts +15 -0
  663. package/dist/src/workflows/registry/workflow-definition-registry.js +1 -0
  664. package/dist/src/workflows/runtime/index.d.ts +2 -0
  665. package/dist/src/workflows/runtime/index.js +2 -1
  666. package/dist/src/workflows/runtime/script-workflow-runtime.d.ts +5 -0
  667. package/dist/src/workflows/runtime/script-workflow-runtime.js +15 -0
  668. package/dist/src/workflows/runtime/script-workflow-runtime.js.map +1 -0
  669. package/dist/src/workflows/runtime/workflow-runtime-port.d.ts +16 -0
  670. package/dist/src/workflows/runtime/workflow-runtime-port.js +1 -0
  671. package/dist/src/workflows/service/run-view-to-snapshot.js +3 -0
  672. package/dist/src/workflows/service/run-view-to-snapshot.js.map +1 -1
  673. package/dist/src/workflows/service/workflow-run-service.d.ts +3 -0
  674. package/dist/src/workflows/service/workflow-run-service.js +10 -15
  675. package/dist/src/workflows/service/workflow-run-service.js.map +1 -1
  676. package/dist/src/workflows/service/workflow-session-bridge.d.ts +1 -1
  677. package/dist/src/workflows/service/workflow-session-bridge.js +4 -1
  678. package/dist/src/workflows/service/workflow-session-bridge.js.map +1 -1
  679. package/package.json +23 -17
  680. package/skills/creative/frontend-design/SKILL.md +1 -1
  681. package/skills/creative/theme-factory/SKILL.md +1 -1
  682. package/skills/documents/xlsx/SKILL.md +1 -1
  683. package/skills/engineering/diagnose/SKILL.md +2 -2
  684. package/skills/engineering/tdd/SKILL.md +1 -1
  685. package/skills/tools/github/SKILL.md +6 -1
  686. package/skills/tools/webapp-testing/SKILL.md +4 -1
  687. package/dist/extensions/telegram/src/adapters/config-surface.d.ts +0 -2
  688. package/dist/extensions/telegram/src/adapters/config-surface.js +0 -26
  689. package/dist/extensions/telegram/src/adapters/config-surface.js.map +0 -1
  690. package/dist/extensions/weixin/src/__tests__/workflow-progress.test.js +0 -158
  691. package/dist/extensions/weixin/src/__tests__/workflow-progress.test.js.map +0 -1
  692. package/dist/gateway/static/root/assets/agents-BwXkia_W.js +0 -222
  693. package/dist/gateway/static/root/assets/channels-settings-tlOTdaXw.js +0 -1
  694. package/dist/gateway/static/root/assets/channels-status-swr-D4XjqwqC.js +0 -8
  695. package/dist/gateway/static/root/assets/cron-api-DcmfGuj0.js +0 -1
  696. package/dist/gateway/static/root/assets/cron-page-CijJ4G6F.js +0 -1
  697. package/dist/gateway/static/root/assets/extension-settings-page-CyJk_G64.js +0 -1
  698. package/dist/gateway/static/root/assets/field-primitives-C4GpxsDo.js +0 -1
  699. package/dist/gateway/static/root/assets/heartbeat-config-api-CLD0Gpi3.js +0 -1
  700. package/dist/gateway/static/root/assets/index-0HmunJW9.js +0 -4845
  701. package/dist/gateway/static/root/assets/index-Bk75Phrd.css +0 -1
  702. package/dist/gateway/static/root/assets/notes-page-BBnTh0uI.js +0 -1
  703. package/dist/gateway/static/root/assets/sessions-page-B0riYK7j.js +0 -1
  704. package/dist/gateway/static/root/assets/settings-advanced-gate-DiP_WHu_.js +0 -2
  705. package/dist/gateway/static/root/assets/settings-page-1ZPhcCZ9.js +0 -3
  706. package/dist/gateway/static/root/assets/skills-page-BQ1hllKD.js +0 -2
  707. package/dist/gateway/static/root/assets/url-F3_D_6zZ.js +0 -3
  708. package/dist/gateway/static/root/assets/utils-CPr3FBh2.js +0 -1
  709. package/dist/gateway/static/root/assets/voice-api-key-field-BkbDl6dH.js +0 -1
  710. package/dist/gateway/static/root/assets/workflows-page-D059ysoF.js +0 -27
  711. package/dist/src/agent/embedded/map-stream-events.d.ts +0 -9
  712. package/dist/src/agent/embedded/map-stream-events.js +0 -63
  713. package/dist/src/agent/embedded/map-stream-events.js.map +0 -1
  714. package/dist/src/channels/dock.js.map +0 -1
  715. package/dist/src/channels/plugins/bundled.d.ts +0 -11
  716. package/dist/src/channels/plugins/bundled.js +0 -10
  717. package/dist/src/channels/plugins/bundled.js.map +0 -1
  718. package/dist/src/channels/registry.d.ts +0 -25
  719. package/dist/src/channels/registry.js +0 -82
  720. package/dist/src/channels/registry.js.map +0 -1
  721. package/dist/src/config/localized-text.d.ts +0 -6
  722. package/dist/src/config/localized-text.js +0 -42
  723. package/dist/src/config/localized-text.js.map +0 -1
  724. package/dist/src/generated/bundled-channel-plugins.d.ts +0 -10
  725. package/dist/src/generated/bundled-channel-plugins.js +0 -16
  726. package/dist/src/generated/bundled-channel-plugins.js.map +0 -1
  727. package/dist/src/tui/stream-assembler.d.ts +0 -22
  728. package/dist/src/tui/stream-assembler.js +0 -63
  729. package/dist/src/tui/stream-assembler.js.map +0 -1
  730. package/skills/browser/SKILL-zh.md +0 -188
  731. package/skills/business/company-values/SKILL-zh.md +0 -80
  732. package/skills/business/company-values/SKILL.md +0 -80
  733. package/skills/business/find-community/SKILL-zh.md +0 -50
  734. package/skills/business/find-community/SKILL.md +0 -50
  735. package/skills/business/first-customers/SKILL-zh.md +0 -76
  736. package/skills/business/first-customers/SKILL.md +0 -76
  737. package/skills/business/grow-sustainably/SKILL-zh.md +0 -92
  738. package/skills/business/grow-sustainably/SKILL.md +0 -92
  739. package/skills/business/marketing-plan/SKILL-zh.md +0 -100
  740. package/skills/business/marketing-plan/SKILL.md +0 -100
  741. package/skills/business/minimalist-review/SKILL-zh.md +0 -82
  742. package/skills/business/minimalist-review/SKILL.md +0 -82
  743. package/skills/business/mvp/SKILL-zh.md +0 -81
  744. package/skills/business/mvp/SKILL.md +0 -81
  745. package/skills/business/pricing/SKILL-zh.md +0 -64
  746. package/skills/business/pricing/SKILL.md +0 -64
  747. package/skills/business/processize/SKILL-zh.md +0 -91
  748. package/skills/business/processize/SKILL.md +0 -91
  749. package/skills/business/validate-idea/SKILL-zh.md +0 -68
  750. package/skills/business/validate-idea/SKILL.md +0 -68
  751. package/skills/creative/algorithmic-art/LICENSE.txt +0 -202
  752. package/skills/creative/algorithmic-art/SKILL-zh.md +0 -405
  753. package/skills/creative/algorithmic-art/SKILL.md +0 -405
  754. package/skills/creative/algorithmic-art/templates/generator_template.js +0 -223
  755. package/skills/creative/algorithmic-art/templates/viewer.html +0 -599
  756. package/skills/creative/frontend-design/SKILL-zh.md +0 -42
  757. package/skills/creative/theme-factory/SKILL-zh.md +0 -59
  758. package/skills/creative/web-artifacts-builder/LICENSE.txt +0 -202
  759. package/skills/creative/web-artifacts-builder/SKILL-zh.md +0 -74
  760. package/skills/creative/web-artifacts-builder/SKILL.md +0 -74
  761. package/skills/creative/web-artifacts-builder/scripts/bundle-artifact.sh +0 -54
  762. package/skills/creative/web-artifacts-builder/scripts/init-artifact.sh +0 -322
  763. package/skills/creative/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  764. package/skills/documents/doc-coauthoring/SKILL-zh.md +0 -375
  765. package/skills/documents/doc-coauthoring/SKILL.md +0 -375
  766. package/skills/documents/docx/LICENSE.txt +0 -30
  767. package/skills/documents/docx/SKILL-zh.md +0 -590
  768. package/skills/documents/docx/SKILL.md +0 -590
  769. package/skills/documents/docx/scripts/__init__.py +0 -1
  770. package/skills/documents/docx/scripts/accept_changes.py +0 -135
  771. package/skills/documents/docx/scripts/comment.py +0 -318
  772. package/skills/documents/docx/scripts/office/helpers/__init__.py +0 -0
  773. package/skills/documents/docx/scripts/office/helpers/merge_runs.py +0 -199
  774. package/skills/documents/docx/scripts/office/helpers/simplify_redlines.py +0 -197
  775. package/skills/documents/docx/scripts/office/pack.py +0 -159
  776. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
  777. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
  778. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
  779. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
  780. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
  781. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
  782. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
  783. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
  784. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
  785. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
  786. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
  787. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
  788. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
  789. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
  790. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
  791. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
  792. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
  793. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
  794. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
  795. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
  796. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
  797. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
  798. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
  799. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
  800. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
  801. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
  802. package/skills/documents/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
  803. package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
  804. package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
  805. package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
  806. package/skills/documents/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
  807. package/skills/documents/docx/scripts/office/schemas/mce/mc.xsd +0 -75
  808. package/skills/documents/docx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
  809. package/skills/documents/docx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
  810. package/skills/documents/docx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
  811. package/skills/documents/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
  812. package/skills/documents/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
  813. package/skills/documents/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
  814. package/skills/documents/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
  815. package/skills/documents/docx/scripts/office/soffice.py +0 -183
  816. package/skills/documents/docx/scripts/office/unpack.py +0 -132
  817. package/skills/documents/docx/scripts/office/validate.py +0 -111
  818. package/skills/documents/docx/scripts/office/validators/__init__.py +0 -15
  819. package/skills/documents/docx/scripts/office/validators/base.py +0 -847
  820. package/skills/documents/docx/scripts/office/validators/docx.py +0 -446
  821. package/skills/documents/docx/scripts/office/validators/pptx.py +0 -275
  822. package/skills/documents/docx/scripts/office/validators/redlining.py +0 -247
  823. package/skills/documents/docx/scripts/templates/comments.xml +0 -3
  824. package/skills/documents/docx/scripts/templates/commentsExtended.xml +0 -3
  825. package/skills/documents/docx/scripts/templates/commentsExtensible.xml +0 -3
  826. package/skills/documents/docx/scripts/templates/commentsIds.xml +0 -3
  827. package/skills/documents/docx/scripts/templates/people.xml +0 -3
  828. package/skills/documents/pdf/LICENSE.txt +0 -30
  829. package/skills/documents/pdf/SKILL-zh.md +0 -314
  830. package/skills/documents/pdf/SKILL.md +0 -314
  831. package/skills/documents/pdf/forms.md +0 -294
  832. package/skills/documents/pdf/reference.md +0 -612
  833. package/skills/documents/pdf/scripts/check_bounding_boxes.py +0 -65
  834. package/skills/documents/pdf/scripts/check_fillable_fields.py +0 -11
  835. package/skills/documents/pdf/scripts/convert_pdf_to_images.py +0 -33
  836. package/skills/documents/pdf/scripts/create_validation_image.py +0 -37
  837. package/skills/documents/pdf/scripts/extract_form_field_info.py +0 -122
  838. package/skills/documents/pdf/scripts/extract_form_structure.py +0 -115
  839. package/skills/documents/pdf/scripts/fill_fillable_fields.py +0 -98
  840. package/skills/documents/pdf/scripts/fill_pdf_form_with_annotations.py +0 -107
  841. package/skills/documents/pptx/LICENSE.txt +0 -30
  842. package/skills/documents/pptx/SKILL-zh.md +0 -232
  843. package/skills/documents/pptx/SKILL.md +0 -232
  844. package/skills/documents/pptx/editing.md +0 -205
  845. package/skills/documents/pptx/pptxgenjs.md +0 -420
  846. package/skills/documents/pptx/scripts/__init__.py +0 -0
  847. package/skills/documents/pptx/scripts/add_slide.py +0 -195
  848. package/skills/documents/pptx/scripts/clean.py +0 -286
  849. package/skills/documents/pptx/scripts/office/helpers/__init__.py +0 -0
  850. package/skills/documents/pptx/scripts/office/helpers/merge_runs.py +0 -199
  851. package/skills/documents/pptx/scripts/office/helpers/simplify_redlines.py +0 -197
  852. package/skills/documents/pptx/scripts/office/pack.py +0 -159
  853. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
  854. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
  855. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
  856. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
  857. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
  858. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
  859. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
  860. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
  861. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
  862. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
  863. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
  864. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
  865. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
  866. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
  867. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
  868. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
  869. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
  870. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
  871. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
  872. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
  873. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
  874. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
  875. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
  876. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
  877. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
  878. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
  879. package/skills/documents/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
  880. package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
  881. package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
  882. package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
  883. package/skills/documents/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
  884. package/skills/documents/pptx/scripts/office/schemas/mce/mc.xsd +0 -75
  885. package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
  886. package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
  887. package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
  888. package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
  889. package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
  890. package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
  891. package/skills/documents/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
  892. package/skills/documents/pptx/scripts/office/soffice.py +0 -183
  893. package/skills/documents/pptx/scripts/office/unpack.py +0 -132
  894. package/skills/documents/pptx/scripts/office/validate.py +0 -111
  895. package/skills/documents/pptx/scripts/office/validators/__init__.py +0 -15
  896. package/skills/documents/pptx/scripts/office/validators/base.py +0 -847
  897. package/skills/documents/pptx/scripts/office/validators/docx.py +0 -446
  898. package/skills/documents/pptx/scripts/office/validators/pptx.py +0 -275
  899. package/skills/documents/pptx/scripts/office/validators/redlining.py +0 -247
  900. package/skills/documents/pptx/scripts/thumbnail.py +0 -289
  901. package/skills/documents/xlsx/SKILL-zh.md +0 -292
  902. package/skills/engineering/diagnose/SKILL-zh.md +0 -117
  903. package/skills/engineering/grill-with-docs/ADR-FORMAT.md +0 -47
  904. package/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md +0 -77
  905. package/skills/engineering/grill-with-docs/SKILL-zh.md +0 -88
  906. package/skills/engineering/grill-with-docs/SKILL.md +0 -88
  907. package/skills/engineering/improve-codebase-architecture/DEEPENING.md +0 -37
  908. package/skills/engineering/improve-codebase-architecture/INTERFACE-DESIGN.md +0 -44
  909. package/skills/engineering/improve-codebase-architecture/LANGUAGE.md +0 -53
  910. package/skills/engineering/improve-codebase-architecture/SKILL-zh.md +0 -71
  911. package/skills/engineering/improve-codebase-architecture/SKILL.md +0 -71
  912. package/skills/engineering/tdd/SKILL-zh.md +0 -109
  913. package/skills/engineering/to-issues/SKILL-zh.md +0 -81
  914. package/skills/engineering/to-issues/SKILL.md +0 -81
  915. package/skills/engineering/to-prd/SKILL-zh.md +0 -76
  916. package/skills/engineering/to-prd/SKILL.md +0 -74
  917. package/skills/engineering/zoom-out/SKILL-zh.md +0 -7
  918. package/skills/engineering/zoom-out/SKILL.md +0 -7
  919. package/skills/tools/find-skills/SKILL-zh.md +0 -440
  920. package/skills/tools/github/SKILL-zh.md +0 -48
  921. package/skills/tools/internal-comms/LICENSE.txt +0 -202
  922. package/skills/tools/internal-comms/SKILL-zh.md +0 -32
  923. package/skills/tools/internal-comms/SKILL.md +0 -32
  924. package/skills/tools/internal-comms/examples/3p-updates.md +0 -47
  925. package/skills/tools/internal-comms/examples/company-newsletter.md +0 -65
  926. package/skills/tools/internal-comms/examples/faq-answers.md +0 -30
  927. package/skills/tools/internal-comms/examples/general-comms.md +0 -16
  928. package/skills/tools/skill-creator/LICENSE.txt +0 -202
  929. package/skills/tools/skill-creator/SKILL-zh.md +0 -483
  930. package/skills/tools/skill-creator/SKILL.md +0 -485
  931. package/skills/tools/skill-creator/agents/analyzer.md +0 -274
  932. package/skills/tools/skill-creator/agents/comparator.md +0 -202
  933. package/skills/tools/skill-creator/agents/grader.md +0 -223
  934. package/skills/tools/skill-creator/assets/eval_review.html +0 -146
  935. package/skills/tools/skill-creator/eval-viewer/generate_review.py +0 -471
  936. package/skills/tools/skill-creator/eval-viewer/viewer.html +0 -1325
  937. package/skills/tools/skill-creator/references/schemas.md +0 -430
  938. package/skills/tools/skill-creator/scripts/__init__.py +0 -0
  939. package/skills/tools/skill-creator/scripts/aggregate_benchmark.py +0 -401
  940. package/skills/tools/skill-creator/scripts/generate_report.py +0 -326
  941. package/skills/tools/skill-creator/scripts/improve_description.py +0 -247
  942. package/skills/tools/skill-creator/scripts/package_skill.py +0 -136
  943. package/skills/tools/skill-creator/scripts/quick_validate.py +0 -103
  944. package/skills/tools/skill-creator/scripts/run_eval.py +0 -310
  945. package/skills/tools/skill-creator/scripts/run_loop.py +0 -328
  946. package/skills/tools/skill-creator/scripts/utils.py +0 -47
  947. package/skills/tools/summarize/SKILL-zh.md +0 -47
  948. package/skills/tools/weather/SKILL-zh.md +0 -46
  949. package/skills/tools/weather/SKILL.md +0 -46
  950. package/skills/tools/webapp-testing/SKILL-zh.md +0 -96
@@ -1,47 +0,0 @@
1
- # ADR Format
2
-
3
- ADRs live in `docs/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc.
4
-
5
- Create the `docs/adr/` directory lazily — only when the first ADR is needed.
6
-
7
- ## Template
8
-
9
- ```md
10
- # {Short title of the decision}
11
-
12
- {1-3 sentences: what's the context, what did we decide, and why.}
13
- ```
14
-
15
- That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why* — not in filling out sections.
16
-
17
- ## Optional sections
18
-
19
- Only include these when they add genuine value. Most ADRs won't need them.
20
-
21
- - **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`) — useful when decisions are revisited
22
- - **Considered Options** — only when the rejected alternatives are worth remembering
23
- - **Consequences** — only when non-obvious downstream effects need to be called out
24
-
25
- ## Numbering
26
-
27
- Scan `docs/adr/` for the highest existing number and increment by one.
28
-
29
- ## When to offer an ADR
30
-
31
- All three of these must be true:
32
-
33
- 1. **Hard to reverse** — the cost of changing your mind later is meaningful
34
- 2. **Surprising without context** — a future reader will look at the code and wonder "why on earth did they do it this way?"
35
- 3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
36
-
37
- If a decision is easy to reverse, skip it — you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing."
38
-
39
- ### What qualifies
40
-
41
- - **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres."
42
- - **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP."
43
- - **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library — just the ones that would take a quarter to swap out.
44
- - **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s.
45
- - **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate.
46
- - **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract."
47
- - **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it — otherwise someone will suggest GraphQL again in six months.
@@ -1,77 +0,0 @@
1
- # CONTEXT.md Format
2
-
3
- ## Structure
4
-
5
- ```md
6
- # {Context Name}
7
-
8
- {One or two sentence description of what this context is and why it exists.}
9
-
10
- ## Language
11
-
12
- **Order**:
13
- {A concise description of the term}
14
- _Avoid_: Purchase, transaction
15
-
16
- **Invoice**:
17
- A request for payment sent to a customer after delivery.
18
- _Avoid_: Bill, payment request
19
-
20
- **Customer**:
21
- A person or organization that places orders.
22
- _Avoid_: Client, buyer, account
23
-
24
- ## Relationships
25
-
26
- - An **Order** produces one or more **Invoices**
27
- - An **Invoice** belongs to exactly one **Customer**
28
-
29
- ## Example dialogue
30
-
31
- > **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
32
- > **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed."
33
-
34
- ## Flagged ambiguities
35
-
36
- - "account" was used to mean both **Customer** and **User** — resolved: these are distinct concepts.
37
- ```
38
-
39
- ## Rules
40
-
41
- - **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others as aliases to avoid.
42
- - **Flag conflicts explicitly.** If a term is used ambiguously, call it out in "Flagged ambiguities" with a clear resolution.
43
- - **Keep definitions tight.** One sentence max. Define what it IS, not what it does.
44
- - **Show relationships.** Use bold term names and express cardinality where obvious.
45
- - **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
46
- - **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
47
- - **Write an example dialogue.** A conversation between a dev and a domain expert that demonstrates how the terms interact naturally and clarifies boundaries between related concepts.
48
-
49
- ## Single vs multi-context repos
50
-
51
- **Single context (most repos):** One `CONTEXT.md` at the repo root.
52
-
53
- **Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
54
-
55
- ```md
56
- # Context Map
57
-
58
- ## Contexts
59
-
60
- - [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
61
- - [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
62
- - [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
63
-
64
- ## Relationships
65
-
66
- - **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
67
- - **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
68
- - **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
69
- ```
70
-
71
- The skill infers which structure applies:
72
-
73
- - If `CONTEXT-MAP.md` exists, read it to find contexts
74
- - If only a root `CONTEXT.md` exists, single context
75
- - If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
76
-
77
- When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
@@ -1,88 +0,0 @@
1
- ---
2
- name: grill-with-docs
3
- description: 对你的计划进行挑战性审问,对照现有领域模型,精炼术语,并在决策形成时实时更新文档(CONTEXT.md、ADR)。当用户想要对照项目语言和已记录的决策对计划进行压力测试时使用。
4
- ---
5
-
6
- <做什么>
7
-
8
- 不断地就计划的每个方面对我进行审问,直到达成共同理解。遍历设计树的每个分支,逐一解决决策间的依赖关系。对每个问题,提供你的推荐答案。
9
-
10
- 一次问一个问题,在每个问题得到反馈后再继续。
11
-
12
- 如果某个问题可以通过探索代码库来回答,则改为探索代码库。
13
-
14
- </做什么>
15
-
16
- <支持信息>
17
-
18
- ## 领域意识
19
-
20
- 在代码库探索过程中,同时查找现有文档:
21
-
22
- ### 文件结构
23
-
24
- 大多数仓库有一个单一的上下文:
25
-
26
- ```
27
- /
28
- ├── CONTEXT.md
29
- ├── docs/
30
- │ └── adr/
31
- │ ├── 0001-event-sourced-orders.md
32
- │ └── 0002-postgres-for-write-model.md
33
- └── src/
34
- ```
35
-
36
- 如果根目录存在 `CONTEXT-MAP.md`,则仓库有多个上下文。该映射指向每个上下文的所在位置:
37
-
38
- ```
39
- /
40
- ├── CONTEXT-MAP.md
41
- ├── docs/
42
- │ └── adr/ ← 系统级决策
43
- ├── src/
44
- │ ├── ordering/
45
- │ │ ├── CONTEXT.md
46
- │ │ └── docs/adr/ ← 特定上下文的决策
47
- │ └── billing/
48
- │ ├── CONTEXT.md
49
- │ └── docs/adr/
50
- ```
51
-
52
- 惰性创建文件——只有在你需要写东西时才创建。如果不存在 `CONTEXT.md`,在第一个术语被确定时创建。如果不存在 `docs/adr/`,在第一个 ADR 需要时创建。
53
-
54
- ## 会话期间
55
-
56
- ### 对照词汇表进行质询
57
-
58
- 当用户使用的术语与 `CONTEXT.md` 中现有的语言冲突时,立即指出来。"你的词汇表将'取消'定义为 X,但你似乎指的是 Y——到底是哪个?"
59
-
60
- ### 精炼模糊语言
61
-
62
- 当用户使用模糊或过载的术语时,提出精确的规范术语。"你说'账户'——你是指客户(Customer)还是用户(User)?它们是不同的东西。"
63
-
64
- ### 讨论具体场景
65
-
66
- 当领域关系被讨论时,用具体场景进行压力测试。创造能够探测边缘情况的场景,迫使用户精确说明概念之间的边界。
67
-
68
- ### 与代码交叉引用
69
-
70
- 当用户说明某事物的工作方式时,检查代码是否一致。如果发现矛盾,指出:"你的代码取消了整个订单,但你刚才说可以部分取消——哪个是正确的?"
71
-
72
- ### 实时更新 CONTEXT.md
73
-
74
- 当一个术语被确定时,立即更新 `CONTEXT.md`。不要批量处理——在发生时捕获它们。使用 [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md) 中的格式。
75
-
76
- 不要将 `CONTEXT.md` 与实现细节耦合。只包含对领域专家有意义的术语。
77
-
78
- ### 谨慎提供 ADR
79
-
80
- 只有在以下三个条件都满足时才提供创建 ADR:
81
-
82
- 1. **难以逆转**——以后改变主意的成本是有意义的
83
- 2. **没有上下文会令人惊讶**——未来的读者会疑惑"他们为什么这样做?"
84
- 3. **是真正权衡的结果**——存在真正的替代方案,你因特定原因选择了其中一个
85
-
86
- 如果三者中任何一个缺失,跳过 ADR。使用 [ADR-FORMAT.md](./ADR-FORMAT.md) 中的格式。
87
-
88
- </支持信息>
@@ -1,88 +0,0 @@
1
- ---
2
- name: grill-with-docs
3
- description: Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
4
- ---
5
-
6
- <what-to-do>
7
-
8
- Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
9
-
10
- Ask the questions one at a time, waiting for feedback on each question before continuing.
11
-
12
- If a question can be answered by exploring the codebase, explore the codebase instead.
13
-
14
- </what-to-do>
15
-
16
- <supporting-info>
17
-
18
- ## Domain awareness
19
-
20
- During codebase exploration, also look for existing documentation:
21
-
22
- ### File structure
23
-
24
- Most repos have a single context:
25
-
26
- ```
27
- /
28
- ├── CONTEXT.md
29
- ├── docs/
30
- │ └── adr/
31
- │ ├── 0001-event-sourced-orders.md
32
- │ └── 0002-postgres-for-write-model.md
33
- └── src/
34
- ```
35
-
36
- If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
37
-
38
- ```
39
- /
40
- ├── CONTEXT-MAP.md
41
- ├── docs/
42
- │ └── adr/ ← system-wide decisions
43
- ├── src/
44
- │ ├── ordering/
45
- │ │ ├── CONTEXT.md
46
- │ │ └── docs/adr/ ← context-specific decisions
47
- │ └── billing/
48
- │ ├── CONTEXT.md
49
- │ └── docs/adr/
50
- ```
51
-
52
- Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
53
-
54
- ## During the session
55
-
56
- ### Challenge against the glossary
57
-
58
- When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
59
-
60
- ### Sharpen fuzzy language
61
-
62
- When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."
63
-
64
- ### Discuss concrete scenarios
65
-
66
- When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
67
-
68
- ### Cross-reference with code
69
-
70
- When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
71
-
72
- ### Update CONTEXT.md inline
73
-
74
- When a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md).
75
-
76
- Don't couple `CONTEXT.md` to implementation details. Only include terms that are meaningful to domain experts.
77
-
78
- ### Offer ADRs sparingly
79
-
80
- Only offer to create an ADR when all three are true:
81
-
82
- 1. **Hard to reverse** — the cost of changing your mind later is meaningful
83
- 2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
84
- 3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
85
-
86
- If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
87
-
88
- </supporting-info>
@@ -1,37 +0,0 @@
1
- # Deepening
2
-
3
- How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**.
4
-
5
- ## Dependency categories
6
-
7
- When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam.
8
-
9
- ### 1. In-process
10
-
11
- Pure computation, in-memory state, no I/O. Always deepenable — merge the modules and test through the new interface directly. No adapter needed.
12
-
13
- ### 2. Local-substitutable
14
-
15
- Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.
16
-
17
- ### 3. Remote but owned (Ports & Adapters)
18
-
19
- Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.
20
-
21
- Recommendation shape: *"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."*
22
-
23
- ### 4. True external (Mock)
24
-
25
- Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.
26
-
27
- ## Seam discipline
28
-
29
- - **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection.
30
- - **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them.
31
-
32
- ## Testing strategy: replace, don't layer
33
-
34
- - Old unit tests on shallow modules become waste once tests at the deepened module's interface exist — delete them.
35
- - Write new tests at the deepened module's interface. The **interface is the test surface**.
36
- - Tests assert on observable outcomes through the interface, not internal state.
37
- - Tests should survive internal refactors — they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
@@ -1,44 +0,0 @@
1
- # Interface Design
2
-
3
- When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout) — your first idea is unlikely to be the best.
4
-
5
- Uses the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**, **leverage**.
6
-
7
- ## Process
8
-
9
- ### 1. Frame the problem space
10
-
11
- Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
12
-
13
- - The constraints any new interface would need to satisfy
14
- - The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
15
- - A rough illustrative code sketch to ground the constraints — not a proposal, just a way to make the constraints concrete
16
-
17
- Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
18
-
19
- ### 2. Spawn sub-agents
20
-
21
- Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module.
22
-
23
- Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
24
-
25
- - Agent 1: "Minimize the interface — aim for 1–3 entry points max. Maximise leverage per entry point."
26
- - Agent 2: "Maximise flexibility — support many use cases and extension."
27
- - Agent 3: "Optimise for the most common caller — make the default case trivial."
28
- - Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."
29
-
30
- Include both [LANGUAGE.md](LANGUAGE.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
31
-
32
- Each sub-agent outputs:
33
-
34
- 1. Interface (types, methods, params — plus invariants, ordering, error modes)
35
- 2. Usage example showing how callers use it
36
- 3. What the implementation hides behind the seam
37
- 4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
38
- 5. Trade-offs — where leverage is high, where it's thin
39
-
40
- ### 3. Present and compare
41
-
42
- Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**.
43
-
44
- After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated — the user wants a strong read, not a menu.
@@ -1,53 +0,0 @@
1
- # Language
2
-
3
- Shared vocabulary for every suggestion this skill makes. Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
4
-
5
- ## Terms
6
-
7
- **Module**
8
- Anything with an interface and an implementation. Deliberately scale-agnostic — applies equally to a function, class, package, or tier-spanning slice.
9
- _Avoid_: unit, component, service.
10
-
11
- **Interface**
12
- Everything a caller must know to use the module correctly. Includes the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics.
13
- _Avoid_: API, signature (too narrow — those refer only to the type-level surface).
14
-
15
- **Implementation**
16
- What's inside a module — its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
17
-
18
- **Depth**
19
- Leverage at the interface — the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface. A module is **shallow** when the interface is nearly as complex as the implementation.
20
-
21
- **Seam** _(from Michael Feathers)_
22
- A place where you can alter behaviour without editing in that place. The *location* at which a module's interface lives. Choosing where to put the seam is its own design decision, distinct from what goes behind it.
23
- _Avoid_: boundary (overloaded with DDD's bounded context).
24
-
25
- **Adapter**
26
- A concrete thing that satisfies an interface at a seam. Describes *role* (what slot it fills), not substance (what's inside).
27
-
28
- **Leverage**
29
- What callers get from depth. More capability per unit of interface they have to learn. One implementation pays back across N call sites and M tests.
30
-
31
- **Locality**
32
- What maintainers get from depth. Change, bugs, knowledge, and verification concentrate at one place rather than spreading across callers. Fix once, fixed everywhere.
33
-
34
- ## Principles
35
-
36
- - **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.
37
- - **The deletion test.** Imagine deleting the module. If complexity vanishes, the module wasn't hiding anything (it was a pass-through). If complexity reappears across N callers, the module was earning its keep.
38
- - **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.
39
- - **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.
40
-
41
- ## Relationships
42
-
43
- - A **Module** has exactly one **Interface** (the surface it presents to callers and tests).
44
- - **Depth** is a property of a **Module**, measured against its **Interface**.
45
- - A **Seam** is where a **Module**'s **Interface** lives.
46
- - An **Adapter** sits at a **Seam** and satisfies the **Interface**.
47
- - **Depth** produces **Leverage** for callers and **Locality** for maintainers.
48
-
49
- ## Rejected framings
50
-
51
- - **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
52
- - **"Interface" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know.
53
- - **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**.
@@ -1,71 +0,0 @@
1
- ---
2
- name: improve-codebase-architecture
3
- description: 在代码库中发现深化机会,参考 CONTEXT.md 中的领域语言和 docs/adr/ 中的决策。当用户想要改进架构、寻找重构机会、整合紧密耦合的模块或使代码库更易测试和更利于 AI 导航时使用。
4
- ---
5
-
6
- # 改进代码库架构
7
-
8
- 暴露架构摩擦并建议**深化机会**——将浅模块转化为深模块的重构。目标是可测试性和 AI 可导航性。
9
-
10
- ## 词汇表
11
-
12
- 在每个建议中精确使用这些术语。一致的语言是关键——不要滑向"组件"、"服务"、"API"或"边界"。完整定义见 [LANGUAGE.md](LANGUAGE.md)。
13
-
14
- - **模块(Module)** — 任何有接口和实现的东西(函数、类、包、切片)。
15
- - **接口(Interface)** — 调用者必须知道的一切才能使用该模块:类型、不变式、错误模式、顺序、配置。不仅仅是类型签名。
16
- - **实现(Implementation)** — 内部的代码。
17
- - **深度(Depth)** — 接口的杠杆作用:一个小接口背后的大量行为。**深(Deep)** = 高杠杆。**浅(Shallow)** = 接口几乎与实现一样复杂。
18
- - **接缝(Seam)** — 接口所在的位置;无需原位编辑即可改变行为的地方。(使用此词,而不是"边界"。)
19
- - **适配器(Adapter)** — 在接缝处满足接口的具体事物。
20
- - **杠杆(Leverage)** — 调用者从深度中获得的东西。
21
- - **局部性(Locality)** — 维护者从深度中获得的东西:变更、错误、知识集中在一个地方。
22
-
23
- 关键原则(完整列表见 [LANGUAGE.md](LANGUAGE.md)):
24
-
25
- - **删除测试**:想象删除该模块。如果复杂性消失了,它是一个透传。如果复杂性重新出现在 N 个调用者身上,它物有所值。
26
- - **接口就是测试表面。**
27
- - **一个适配器 = 假设性接缝。两个适配器 = 真实接缝。**
28
-
29
- 此技能**受**项目领域模型的指导。领域语言为好的接缝提供名称;ADR 记录了此技能不应重新争论的决策。
30
-
31
- ## 流程
32
-
33
- ### 1. 探索
34
-
35
- 首先读取项目的领域词汇表和你将触及区域中的任何 ADR。
36
-
37
- 然后使用 `subagent_type=Explore` 的 Agent 工具遍历代码库。不要遵循僵化的启发式规则——有机地探索,并注意你在哪里遇到摩擦:
38
-
39
- - 在哪里理解一个概念需要在许多小模块之间来回跳跃?
40
- - 哪些模块是**浅的**——接口几乎与实现一样复杂?
41
- - 在哪里纯函数仅仅为了可测试性而被提取出来,但真正的 bug 隐藏在它们如何被调用中(没有**局部性**)?
42
- - 在哪里紧密耦合的模块跨越它们的接缝泄露?
43
- - 代码库的哪些部分未经测试,或通过当前接口难以测试?
44
-
45
- 对你怀疑是浅层的任何东西应用**删除测试**:删除它会集中复杂性,还是仅仅移动它?"是的,会集中"就是你想要的信号。
46
-
47
- ### 2. 展示候选
48
-
49
- 以编号列表展示深化机会。对每个候选:
50
-
51
- - **文件** — 涉及哪些文件/模块
52
- - **问题** — 为什么当前架构导致摩擦
53
- - **解决方案** — 将改变的通俗英文描述
54
- - **收益** — 用局部性和杠杆来解释,以及测试将如何改进
55
-
56
- **领域部分使用 CONTEXT.md 词汇,架构部分使用 [LANGUAGE.md](LANGUAGE.md) 词汇。** 如果 `CONTEXT.md` 定义了"订单(Order)",就说"订单录入模块"——而不是"FooBarHandler",也不是"订单服务"。
57
-
58
- **ADR 冲突**:如果一个候选与现有 ADR 相矛盾,只有在摩擦足够真实、值得重新审视 ADR 时才提出。清晰标记(例如"_与 ADR-0007 矛盾——但值得重新讨论,因为……"_)。不要列出每个 ADR 禁止的理论重构。
59
-
60
- 暂时不要提出接口。问用户:"你希望探索哪些?"
61
-
62
- ### 3. 质询循环
63
-
64
- 一旦用户选择一个候选,进入质询对话。与他们一起遍历设计树——约束、依赖关系、深化后的模块形态、接缝背后的内容、哪些测试存活。
65
-
66
- 副作用在决策结晶时实时发生:
67
-
68
- - **为一个不在 `CONTEXT.md` 中的概念命名了深化模块?** 将术语添加到 `CONTEXT.md`——和 `/grill-with-docs` 相同的规范(见 [CONTEXT-FORMAT.md](../grill-with-docs/CONTEXT-FORMAT.md))。如果文件不存在则惰性创建。
69
- - **对话中精炼了一个模糊术语?** 立即更新 `CONTEXT.md`。
70
- - **用户因重要原因拒绝了候选?** 提供 ADR,表述为:_"要我把它记录为 ADR 吗?这样未来的架构评审就不会再提出同样的建议。"_ 只有当这个原因对一个未来的探索者来说确实需要知道以避免重复提议相同内容时才提供——跳过临时原因("现在不值得")和自明的原因。见 [ADR-FORMAT.md](../grill-with-docs/ADR-FORMAT.md)。
71
- - **想为深化模块探索替代接口?** 见 [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md)。
@@ -1,71 +0,0 @@
1
- ---
2
- name: improve-codebase-architecture
3
- description: Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
4
- ---
5
-
6
- # Improve Codebase Architecture
7
-
8
- Surface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
9
-
10
- ## Glossary
11
-
12
- Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in [LANGUAGE.md](LANGUAGE.md).
13
-
14
- - **Module** — anything with an interface and an implementation (function, class, package, slice).
15
- - **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.
16
- - **Implementation** — the code inside.
17
- - **Depth** — leverage at the interface: a lot of behaviour behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.
18
- - **Seam** — where an interface lives; a place behaviour can be altered without editing in place. (Use this, not "boundary.")
19
- - **Adapter** — a concrete thing satisfying an interface at a seam.
20
- - **Leverage** — what callers get from depth.
21
- - **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.
22
-
23
- Key principles (see [LANGUAGE.md](LANGUAGE.md) for the full list):
24
-
25
- - **Deletion test**: imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
26
- - **The interface is the test surface.**
27
- - **One adapter = hypothetical seam. Two adapters = real seam.**
28
-
29
- This skill is _informed_ by the project's domain model. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
30
-
31
- ## Process
32
-
33
- ### 1. Explore
34
-
35
- Read the project's domain glossary and any ADRs in the area you're touching first.
36
-
37
- Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
38
-
39
- - Where does understanding one concept require bouncing between many small modules?
40
- - Where are modules **shallow** — interface nearly as complex as the implementation?
41
- - Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?
42
- - Where do tightly-coupled modules leak across their seams?
43
- - Which parts of the codebase are untested, or hard to test through their current interface?
44
-
45
- Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
46
-
47
- ### 2. Present candidates
48
-
49
- Present a numbered list of deepening opportunities. For each candidate:
50
-
51
- - **Files** — which files/modules are involved
52
- - **Problem** — why the current architecture is causing friction
53
- - **Solution** — plain English description of what would change
54
- - **Benefits** — explained in terms of locality and leverage, and also in how tests would improve
55
-
56
- **Use CONTEXT.md vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."
57
-
58
- **ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly (e.g. _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
59
-
60
- Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
61
-
62
- ### 3. Grilling loop
63
-
64
- Once the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
65
-
66
- Side effects happen inline as decisions crystallize:
67
-
68
- - **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `/grill-with-docs` (see [CONTEXT-FORMAT.md](../grill-with-docs/CONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.
69
- - **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.
70
- - **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones. See [ADR-FORMAT.md](../grill-with-docs/ADR-FORMAT.md).
71
- - **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md).