@weavecode/weave 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/node_modules/@weavecode/cli/dist/cli.js +3 -3
  2. package/node_modules/@weavecode/cli/dist/commands/daemon.d.ts +7 -0
  3. package/node_modules/@weavecode/cli/dist/commands/daemon.js +2 -2
  4. package/node_modules/@weavecode/cli/dist/commands/dashboard.d.ts +0 -2
  5. package/node_modules/@weavecode/cli/dist/commands/dashboard.js +2 -1
  6. package/node_modules/@weavecode/cli/dist/commands/doctor.js +1 -1
  7. package/node_modules/@weavecode/cli/dist/commands/init.js +1 -1
  8. package/node_modules/@weavecode/cli/dist/commands/msg.js +2 -2
  9. package/node_modules/@weavecode/cli/dist/commands/scan.js +1 -1
  10. package/node_modules/@weavecode/cli/dist/commands/status.js +2 -2
  11. package/node_modules/@weavecode/cli/dist/i18n/dict/en.js +6 -12
  12. package/node_modules/@weavecode/cli/dist/i18n/dict/zh.d.ts +44 -2
  13. package/node_modules/@weavecode/cli/dist/i18n/dict/zh.js +6 -12
  14. package/node_modules/@weavecode/cli/dist/init/claudemd-gen.d.ts +2 -3
  15. package/node_modules/@weavecode/cli/dist/init/claudemd-gen.js +4 -4
  16. package/node_modules/@weavecode/cli/dist/init/executor.js +3 -3
  17. package/node_modules/@weavecode/cli/dist/init/git-commit.js +1 -1
  18. package/node_modules/@weavecode/cli/dist/init/harnesses/claude.js +7 -7
  19. package/node_modules/@weavecode/cli/dist/init/harnesses/zcode.d.ts +29 -0
  20. package/node_modules/@weavecode/cli/dist/init/harnesses/zcode.js +1 -0
  21. package/node_modules/@weavecode/cli/dist/init/helpers-gen.d.ts +4 -0
  22. package/node_modules/@weavecode/cli/dist/init/helpers-gen.js +1 -20
  23. package/node_modules/@weavecode/cli/dist/init/mcp-gen.d.ts +3 -20
  24. package/node_modules/@weavecode/cli/dist/init/mcp-gen.js +1 -1
  25. package/node_modules/@weavecode/cli/dist/init/prompt.js +4 -4
  26. package/node_modules/@weavecode/cli/dist/init/settings-gen.d.ts +3 -30
  27. package/node_modules/@weavecode/cli/dist/init/settings-gen.js +1 -1
  28. package/node_modules/@weavecode/cli/package.json +5 -5
  29. package/node_modules/@weavecode/core/dist/harness.d.ts +45 -2
  30. package/node_modules/@weavecode/core/dist/harness.js +1 -1
  31. package/node_modules/@weavecode/core/dist/index.d.ts +2 -2
  32. package/node_modules/@weavecode/core/dist/index.js +1 -1
  33. package/node_modules/@weavecode/core/dist/terminal.d.ts +28 -4
  34. package/node_modules/@weavecode/core/dist/terminal.js +1 -1
  35. package/node_modules/@weavecode/core/dist/types.d.ts +188 -19
  36. package/node_modules/@weavecode/core/dist/types.js +1 -1
  37. package/node_modules/@weavecode/core/package.json +1 -1
  38. package/node_modules/@weavecode/harness/dist/claude/assets.d.ts +10 -0
  39. package/node_modules/@weavecode/harness/dist/claude/assets.js +4 -1
  40. package/node_modules/@weavecode/harness/dist/claude/capture.d.ts +15 -3
  41. package/node_modules/@weavecode/harness/dist/claude/capture.js +15 -9
  42. package/node_modules/@weavecode/harness/dist/claude/event-source.d.ts +1 -1
  43. package/node_modules/@weavecode/harness/dist/claude/event-source.js +1 -1
  44. package/node_modules/@weavecode/harness/dist/claude/helpers-gen.d.ts +5 -0
  45. package/node_modules/@weavecode/harness/dist/claude/helpers-gen.js +20 -0
  46. package/node_modules/@weavecode/harness/dist/claude/index.d.ts +10 -1
  47. package/node_modules/@weavecode/harness/dist/claude/index.js +1 -1
  48. package/node_modules/@weavecode/harness/dist/claude/mcp-gen.d.ts +22 -0
  49. package/node_modules/@weavecode/harness/dist/claude/mcp-gen.js +1 -0
  50. package/node_modules/@weavecode/harness/dist/claude/messaging.d.ts +11 -2
  51. package/node_modules/@weavecode/harness/dist/claude/messaging.js +4 -1
  52. package/node_modules/@weavecode/harness/dist/claude/model-aliases.d.ts +39 -0
  53. package/node_modules/@weavecode/harness/dist/claude/model-aliases.js +1 -0
  54. package/node_modules/@weavecode/harness/dist/claude/plan.d.ts +2 -0
  55. package/node_modules/@weavecode/harness/dist/claude/plan.js +1 -0
  56. package/node_modules/@weavecode/harness/dist/claude/questions.js +2 -1
  57. package/node_modules/@weavecode/harness/dist/claude/settings-gen.d.ts +32 -0
  58. package/node_modules/@weavecode/harness/dist/claude/settings-gen.js +1 -0
  59. package/node_modules/@weavecode/harness/dist/claude/side-question.d.ts +12 -0
  60. package/node_modules/@weavecode/harness/dist/claude/side-question.js +1 -0
  61. package/node_modules/@weavecode/harness/dist/claude/statusline/config.d.ts +200 -0
  62. package/node_modules/@weavecode/harness/dist/claude/statusline/config.js +1 -0
  63. package/node_modules/@weavecode/harness/dist/claude/statusline/generator.d.ts +12 -0
  64. package/node_modules/@weavecode/harness/dist/claude/statusline/generator.js +745 -0
  65. package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.d.ts +10 -0
  66. package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.js +1 -0
  67. package/node_modules/@weavecode/harness/dist/claude/statusline/surface.d.ts +20 -0
  68. package/node_modules/@weavecode/harness/dist/claude/statusline/surface.js +2 -0
  69. package/node_modules/@weavecode/harness/dist/claude/transcript.d.ts +16 -0
  70. package/node_modules/@weavecode/harness/dist/claude/transcript.js +4 -2
  71. package/node_modules/@weavecode/harness/dist/codex/assets.js +1 -1
  72. package/node_modules/@weavecode/harness/dist/codex/index.d.ts +1 -0
  73. package/node_modules/@weavecode/harness/dist/codex/index.js +1 -1
  74. package/node_modules/@weavecode/harness/dist/codex/mcp.d.ts +30 -0
  75. package/node_modules/@weavecode/harness/dist/codex/mcp.js +1 -0
  76. package/node_modules/@weavecode/harness/dist/codex/messaging.js +1 -1
  77. package/node_modules/@weavecode/harness/dist/driver.d.ts +168 -3
  78. package/node_modules/@weavecode/harness/dist/index.d.ts +1 -0
  79. package/node_modules/@weavecode/harness/dist/index.js +1 -1
  80. package/node_modules/@weavecode/harness/dist/init/generated.d.ts +37 -0
  81. package/node_modules/@weavecode/harness/dist/init/generated.js +2 -0
  82. package/node_modules/@weavecode/harness/dist/registry-wiring.d.ts +3 -1
  83. package/node_modules/@weavecode/harness/dist/zcode/assets.d.ts +8 -0
  84. package/node_modules/@weavecode/harness/dist/zcode/assets.js +1 -0
  85. package/node_modules/@weavecode/harness/dist/zcode/capture.d.ts +36 -0
  86. package/node_modules/@weavecode/harness/dist/zcode/capture.js +3 -0
  87. package/node_modules/@weavecode/harness/dist/zcode/detect.d.ts +2 -0
  88. package/node_modules/@weavecode/harness/dist/zcode/detect.js +1 -0
  89. package/node_modules/@weavecode/harness/dist/zcode/event-source.d.ts +8 -0
  90. package/node_modules/@weavecode/harness/dist/zcode/event-source.js +1 -0
  91. package/node_modules/@weavecode/harness/dist/zcode/index.d.ts +13 -0
  92. package/node_modules/@weavecode/harness/dist/zcode/index.js +1 -0
  93. package/node_modules/@weavecode/harness/dist/zcode/mcp.d.ts +6 -0
  94. package/node_modules/@weavecode/harness/dist/zcode/mcp.js +2 -0
  95. package/node_modules/@weavecode/harness/dist/zcode/messaging.d.ts +13 -0
  96. package/node_modules/@weavecode/harness/dist/zcode/messaging.js +1 -0
  97. package/node_modules/@weavecode/harness/dist/zcode/resume.d.ts +7 -0
  98. package/node_modules/@weavecode/harness/dist/zcode/resume.js +1 -0
  99. package/node_modules/@weavecode/harness/package.json +2 -2
  100. package/node_modules/@weavecode/server/dist/daemon/ai-config.js +2 -2
  101. package/node_modules/@weavecode/server/dist/daemon/ai-context.js +6 -6
  102. package/node_modules/@weavecode/server/dist/daemon/ai-routes.js +4 -4
  103. package/node_modules/@weavecode/server/dist/daemon/api-log.d.ts +48 -0
  104. package/node_modules/@weavecode/server/dist/daemon/api-log.js +3 -0
  105. package/node_modules/@weavecode/server/dist/daemon/auth-routes.js +1 -1
  106. package/node_modules/@weavecode/server/dist/daemon/auto-start.js +6 -6
  107. package/node_modules/@weavecode/server/dist/daemon/capture-routes.js +1 -1
  108. package/node_modules/@weavecode/server/dist/daemon/claude-liveness.js +1 -1
  109. package/node_modules/@weavecode/server/dist/daemon/dashboard-auth.js +2 -2
  110. package/node_modules/@weavecode/server/dist/daemon/data-bus.js +1 -1
  111. package/node_modules/@weavecode/server/dist/daemon/dev-entry.js +1 -1
  112. package/node_modules/@weavecode/server/dist/daemon/fs-browser.js +1 -1
  113. package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.d.ts +13 -1
  114. package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.js +1 -1
  115. package/node_modules/@weavecode/server/dist/daemon/hooks-routes.js +1 -1
  116. package/node_modules/@weavecode/server/dist/daemon/http.js +1 -1
  117. package/node_modules/@weavecode/server/dist/daemon/opener.d.ts +102 -19
  118. package/node_modules/@weavecode/server/dist/daemon/opener.js +97 -7
  119. package/node_modules/@weavecode/server/dist/daemon/port.js +1 -1
  120. package/node_modules/@weavecode/server/dist/daemon/project-harnesses.js +2 -2
  121. package/node_modules/@weavecode/server/dist/daemon/project-updates-refresher.d.ts +4 -3
  122. package/node_modules/@weavecode/server/dist/daemon/project-updates-refresher.js +1 -1
  123. package/node_modules/@weavecode/server/dist/daemon/server.d.ts +15 -0
  124. package/node_modules/@weavecode/server/dist/daemon/server.js +8 -6
  125. package/node_modules/@weavecode/server/dist/daemon/session-probe.d.ts +72 -2
  126. package/node_modules/@weavecode/server/dist/daemon/session-probe.js +1 -1
  127. package/node_modules/@weavecode/server/dist/daemon/settings.d.ts +10 -0
  128. package/node_modules/@weavecode/server/dist/daemon/settings.js +2 -2
  129. package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.d.ts +7 -1
  130. package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.js +1 -1
  131. package/node_modules/@weavecode/server/dist/daemon/sse-hub.d.ts +40 -0
  132. package/node_modules/@weavecode/server/dist/daemon/sse-hub.js +1 -0
  133. package/node_modules/@weavecode/server/dist/daemon/start.js +1 -1
  134. package/node_modules/@weavecode/server/dist/daemon/state.js +2 -2
  135. package/node_modules/@weavecode/server/dist/daemon/static.js +1 -1
  136. package/node_modules/@weavecode/server/dist/daemon/terminal-topology-refresher.d.ts +4 -1
  137. package/node_modules/@weavecode/server/dist/daemon/tls.js +1 -1
  138. package/node_modules/@weavecode/server/dist/daemon/toolkit-routes.js +1 -1
  139. package/node_modules/@weavecode/server/dist/db/db.js +38 -2
  140. package/node_modules/@weavecode/server/dist/db/paths.d.ts +4 -0
  141. package/node_modules/@weavecode/server/dist/db/paths.js +1 -1
  142. package/node_modules/@weavecode/server/dist/hooks/answer-keys.js +1 -1
  143. package/node_modules/@weavecode/server/dist/hooks/bus.d.ts +5 -0
  144. package/node_modules/@weavecode/server/dist/hooks/bus.js +1 -1
  145. package/node_modules/@weavecode/server/dist/hooks/dispatcher.js +6 -6
  146. package/node_modules/@weavecode/server/dist/hooks/handlers/webhook.js +1 -1
  147. package/node_modules/@weavecode/server/dist/hooks/headless-runner.js +2 -2
  148. package/node_modules/@weavecode/server/dist/hooks/inbox-socket.d.ts +17 -4
  149. package/node_modules/@weavecode/server/dist/hooks/inbox-socket.js +2 -1
  150. package/node_modules/@weavecode/server/dist/hooks/inbox-worker.d.ts +27 -6
  151. package/node_modules/@weavecode/server/dist/hooks/inbox-worker.js +3 -3
  152. package/node_modules/@weavecode/server/dist/hooks/match.js +1 -1
  153. package/node_modules/@weavecode/server/dist/hooks/message-deliverer.d.ts +200 -13
  154. package/node_modules/@weavecode/server/dist/hooks/message-deliverer.js +3 -2
  155. package/node_modules/@weavecode/server/dist/hooks/mirror.d.ts +9 -4
  156. package/node_modules/@weavecode/server/dist/hooks/mirror.js +4 -4
  157. package/node_modules/@weavecode/server/dist/hooks/plugin-installer.js +3 -3
  158. package/node_modules/@weavecode/server/dist/hooks/plugin-loader.js +1 -1
  159. package/node_modules/@weavecode/server/dist/hooks/plugin-project-state.js +1 -1
  160. package/node_modules/@weavecode/server/dist/hooks/prompt-flusher.js +1 -1
  161. package/node_modules/@weavecode/server/dist/hooks/promptbox.d.ts +13 -0
  162. package/node_modules/@weavecode/server/dist/hooks/promptbox.js +8 -8
  163. package/node_modules/@weavecode/server/dist/hooks/push-notify.js +2 -2
  164. package/node_modules/@weavecode/server/dist/hooks/question-tracker.d.ts +6 -4
  165. package/node_modules/@weavecode/server/dist/hooks/question-tracker.js +1 -1
  166. package/node_modules/@weavecode/server/dist/hooks/registry.js +1 -1
  167. package/node_modules/@weavecode/server/dist/hooks/resume-runner.js +1 -1
  168. package/node_modules/@weavecode/server/dist/hooks/sequence-engine.js +1 -1
  169. package/node_modules/@weavecode/server/dist/hooks/session-purge.d.ts +7 -0
  170. package/node_modules/@weavecode/server/dist/hooks/session-purge.js +1 -1
  171. package/node_modules/@weavecode/server/dist/hooks/session-sweeper.d.ts +5 -8
  172. package/node_modules/@weavecode/server/dist/hooks/session-sweeper.js +1 -1
  173. package/node_modules/@weavecode/server/dist/hooks/side-questions.d.ts +41 -0
  174. package/node_modules/@weavecode/server/dist/hooks/side-questions.js +1 -0
  175. package/node_modules/@weavecode/server/dist/hooks/toolkit-scan.js +1 -1
  176. package/node_modules/@weavecode/server/dist/hooks/toolkit.d.ts +8 -0
  177. package/node_modules/@weavecode/server/dist/hooks/toolkit.js +5 -5
  178. package/node_modules/@weavecode/server/dist/hooks/watch-engine.d.ts +7 -0
  179. package/node_modules/@weavecode/server/dist/hooks/watch-engine.js +1 -1
  180. package/node_modules/@weavecode/server/dist/index.d.ts +1 -1
  181. package/node_modules/@weavecode/server/dist/install/apply-update.d.ts +1 -1
  182. package/node_modules/@weavecode/server/dist/install/apply-update.js +1 -1
  183. package/node_modules/@weavecode/server/dist/install/capabilities.d.ts +10 -0
  184. package/node_modules/@weavecode/server/dist/install/capabilities.js +1 -1
  185. package/node_modules/@weavecode/server/dist/install/codex-toml.d.ts +8 -26
  186. package/node_modules/@weavecode/server/dist/install/codex-toml.js +1 -1
  187. package/node_modules/@weavecode/server/dist/install/file-assets.js +1 -1
  188. package/node_modules/@weavecode/server/dist/install/fingerprint.d.ts +5 -1
  189. package/node_modules/@weavecode/server/dist/install/fingerprint.js +1 -1
  190. package/node_modules/@weavecode/server/dist/install/git-classify.d.ts +30 -0
  191. package/node_modules/@weavecode/server/dist/install/git-classify.js +1 -0
  192. package/node_modules/@weavecode/server/dist/install/global-config.d.ts +2 -4
  193. package/node_modules/@weavecode/server/dist/install/global-config.js +1 -2
  194. package/node_modules/@weavecode/server/dist/install/global-file-assets.js +1 -1
  195. package/node_modules/@weavecode/server/dist/install/init-files.d.ts +46 -0
  196. package/node_modules/@weavecode/server/dist/install/init-files.js +2 -0
  197. package/node_modules/@weavecode/server/dist/install/install-ledger.js +1 -1
  198. package/node_modules/@weavecode/server/dist/install/installer.d.ts +3 -5
  199. package/node_modules/@weavecode/server/dist/install/installer.js +1 -3
  200. package/node_modules/@weavecode/server/dist/install/library-index.js +1 -1
  201. package/node_modules/@weavecode/server/dist/install/mcp-rows.d.ts +5 -5
  202. package/node_modules/@weavecode/server/dist/install/mcp-rows.js +1 -1
  203. package/node_modules/@weavecode/server/dist/install/plugin-install.js +1 -1
  204. package/node_modules/@weavecode/server/dist/install/plugin-rows.js +1 -1
  205. package/node_modules/@weavecode/server/dist/install/plugin-templates.js +1 -1
  206. package/node_modules/@weavecode/server/dist/install/project-config.d.ts +0 -2
  207. package/node_modules/@weavecode/server/dist/install/project-config.js +2 -2
  208. package/node_modules/@weavecode/server/dist/install/reader.js +1 -1
  209. package/node_modules/@weavecode/server/dist/install/scan-cache.js +1 -1
  210. package/node_modules/@weavecode/server/dist/install/scanner.js +1 -1
  211. package/node_modules/@weavecode/server/dist/install/settings-mcp.js +2 -2
  212. package/node_modules/@weavecode/server/dist/install/updates.d.ts +17 -5
  213. package/node_modules/@weavecode/server/dist/install/updates.js +1 -1
  214. package/node_modules/@weavecode/server/dist/market/builtin.js +1 -1
  215. package/node_modules/@weavecode/server/dist/market/identity.js +1 -1
  216. package/node_modules/@weavecode/server/dist/market/import.js +2 -2
  217. package/node_modules/@weavecode/server/dist/market/refresh.js +1 -1
  218. package/node_modules/@weavecode/server/dist/market/resolve.js +1 -1
  219. package/node_modules/@weavecode/server/dist/market/updates.js +1 -1
  220. package/node_modules/@weavecode/server/dist/registry.js +2 -2
  221. package/node_modules/@weavecode/server/dist/repositories/hook-dispatches.js +5 -5
  222. package/node_modules/@weavecode/server/dist/repositories/hook-events.d.ts +7 -0
  223. package/node_modules/@weavecode/server/dist/repositories/hook-events.js +2 -2
  224. package/node_modules/@weavecode/server/dist/repositories/hook-rules.js +4 -4
  225. package/node_modules/@weavecode/server/dist/repositories/libraries.js +1 -1
  226. package/node_modules/@weavecode/server/dist/repositories/plugin-states.js +1 -1
  227. package/node_modules/@weavecode/server/dist/repositories/projects.d.ts +7 -0
  228. package/node_modules/@weavecode/server/dist/repositories/projects.js +2 -2
  229. package/node_modules/@weavecode/server/dist/repositories/push-subscriptions.js +2 -2
  230. package/node_modules/@weavecode/server/dist/repositories/session-watches.js +4 -4
  231. package/node_modules/@weavecode/server/dist/repositories/sessions.d.ts +32 -8
  232. package/node_modules/@weavecode/server/dist/repositories/sessions.js +2 -2
  233. package/node_modules/@weavecode/server/dist/repositories/side-questions.d.ts +50 -0
  234. package/node_modules/@weavecode/server/dist/repositories/side-questions.js +6 -0
  235. package/node_modules/@weavecode/server/dist/repositories/uploads.d.ts +66 -0
  236. package/node_modules/@weavecode/server/dist/repositories/uploads.js +7 -0
  237. package/node_modules/@weavecode/server/dist/statusline/cache-sweeper.js +1 -1
  238. package/node_modules/@weavecode/server/dist/statusline/config.d.ts +4 -198
  239. package/node_modules/@weavecode/server/dist/statusline/config.js +1 -1
  240. package/node_modules/@weavecode/server/dist/statusline/generator.d.ts +5 -0
  241. package/node_modules/@weavecode/server/dist/statusline/generator.js +1 -676
  242. package/node_modules/@weavecode/server/dist/statusline/manager.d.ts +7 -5
  243. package/node_modules/@weavecode/server/dist/statusline/manager.js +3 -4
  244. package/node_modules/@weavecode/server/dist/surfaces.d.ts +11 -1
  245. package/node_modules/@weavecode/server/dist/surfaces.js +1 -1
  246. package/node_modules/@weavecode/server/dist/watch/cache.js +1 -1
  247. package/node_modules/@weavecode/server/dist/watch/classifier.js +1 -1
  248. package/node_modules/@weavecode/server/dist/watch/plugin-mods.js +1 -1
  249. package/node_modules/@weavecode/server/dist/watch/sync-scheduler.d.ts +8 -4
  250. package/node_modules/@weavecode/server/dist/watch/sync-scheduler.js +1 -1
  251. package/node_modules/@weavecode/server/dist/watch/watch-service.js +1 -1
  252. package/node_modules/@weavecode/server/package.json +4 -4
  253. package/node_modules/@weavecode/server/web/dist/assets/index-CHWbLAje.js +594 -0
  254. package/node_modules/@weavecode/server/web/dist/assets/index-D0s5v8QS.css +11 -0
  255. package/node_modules/@weavecode/server/web/dist/index.html +14 -2
  256. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-plugin-creator/skills/weave-plugin-creator/SKILL.md +2 -2
  257. package/node_modules/@weavecode/templates/package.json +2 -2
  258. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/README.md +50 -32
  259. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/build/index.d.ts +86 -40
  260. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/build/index.es.js +860 -353
  261. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/build/index.js +860 -353
  262. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-cms/node_modules/asn1js/package.json +20 -17
  263. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/README.md +50 -32
  264. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/build/index.d.ts +86 -40
  265. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/build/index.es.js +860 -353
  266. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/build/index.js +860 -353
  267. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-csr/node_modules/asn1js/package.json +20 -17
  268. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/README.md +50 -32
  269. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/build/index.d.ts +86 -40
  270. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/build/index.es.js +860 -353
  271. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/build/index.js +860 -353
  272. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-ecc/node_modules/asn1js/package.json +20 -17
  273. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/README.md +50 -32
  274. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/build/index.d.ts +86 -40
  275. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/build/index.es.js +860 -353
  276. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/build/index.js +860 -353
  277. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-pkcs9/node_modules/asn1js/package.json +20 -17
  278. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/README.md +50 -32
  279. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/build/index.d.ts +86 -40
  280. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/build/index.es.js +860 -353
  281. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/build/index.js +860 -353
  282. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-rsa/node_modules/asn1js/package.json +20 -17
  283. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/README.md +50 -32
  284. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/build/index.d.ts +86 -40
  285. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/build/index.es.js +860 -353
  286. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/build/index.js +860 -353
  287. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/node_modules/asn1js/package.json +20 -17
  288. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/README.md +50 -32
  289. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/build/index.d.ts +86 -40
  290. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/build/index.es.js +860 -353
  291. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/build/index.js +860 -353
  292. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/@peculiar/asn1-x509/node_modules/asn1js/package.json +20 -17
  293. package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/README.md +50 -32
  294. package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/build/index.d.ts +86 -40
  295. package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/build/index.es.js +860 -353
  296. package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/build/index.js +860 -353
  297. package/node_modules/selfsigned/node_modules/pkijs/node_modules/asn1js/package.json +20 -17
  298. package/package.json +6 -6
  299. package/node_modules/@weavecode/server/web/dist/assets/index-BOzaRlQE.js +0 -560
  300. package/node_modules/@weavecode/server/web/dist/assets/index-ChX8G8cT.css +0 -11
@@ -1,4 +1,7 @@
1
1
  import { type StatuslineConfig } from './config.js';
2
+ import type { StatuslineFacts } from '@weavecode/harness';
3
+ /** 生成脚本的项目根相对落点(posix)——init 文件漂移检测的比对面。 */
4
+ export declare function statuslineScriptRelPath(): string;
2
5
  /** Point the global template directory elsewhere (tests use a temp dir). */
3
6
  export declare function setGlobalStatuslineDir(dir: string): void;
4
7
  /** Read the user's global statusline template; falls back to the default. */
@@ -22,12 +25,11 @@ export declare function writeStatuslineScript(projectPath: string, script: strin
22
25
  /** Read the generated statusline script (empty string if absent). */
23
26
  export declare function readStatuslineScript(projectPath: string): Promise<string>;
24
27
  /**
25
- * Ensure `.claude/settings.json` has a `statusLine` entry pointing at the
26
- * statusline script, with a `refreshInterval` (seconds) so Claude Code re-runs
27
- * it on a timer during idle periods — updates after each assistant response
28
- * are event-driven by Claude Code itself and need no weave-side polling.
29
- * Preserves all other settings. Idempotent.
28
+ * 渲染脚本算好留在缓存里的块事实(今天 = git 三块),供对话页底条摆同款块。
29
+ * 缓存文件名/键形归 harness(surface.facts),这里只递缓存目录与目录路径。
30
30
  */
31
+ export declare function readStatuslineFacts(projectPath: string): StatuslineFacts | null;
32
+ /** settings.json 的 statusLine 键形归 claude(surface.wire),此处只转发。 */
31
33
  export declare function ensureSettingsStatusLine(projectPath: string, refreshInterval?: number): Promise<void>;
32
34
  /**
33
35
  * Apply a statusline config to a project: persist it, regenerate the script
@@ -1,4 +1,3 @@
1
- import{readFile as u,writeFile as f,mkdir as p,access as C}from"node:fs/promises";import{homedir as j}from"node:os";import s from"node:path";import{DEFAULT_STATUSLINE_CONFIG as i,LEGACY_IDENTITY_LINE as v,LEGACY_METRICS_LINE as x,NAMED_COLORS as N,SEGMENT_ORDER as y}from"./config.js";import{generateStatuslineScript as $}from"./generator.js";const b=".weave",S="statusline.json",g=".claude/helpers",m="statusline.cjs",E=".claude/settings.json",h="statusline.json";let d=s.join(j(),".weave");export function setGlobalStatuslineDir(e){d=e}async function I(e){try{return await C(e),!0}catch{return!1}}export async function readGlobalStatuslineConfig(){try{const e=await u(s.join(d,h),"utf-8");return{...l(JSON.parse(e)),source:"global"}}catch{return i}}export async function writeGlobalStatuslineConfig(e){await p(d,{recursive:!0});const r={...l(e),source:"global"};await f(s.join(d,h),`${JSON.stringify(r,null,2)}
2
- `,"utf-8")}export async function readStatuslineConfig(e){const r=await readGlobalStatuslineConfig();try{const t=await u(s.join(e,b,S),"utf-8"),n=JSON.parse(t);return n.source==="custom"?l(n):r}catch{return r}}export async function writeStatuslineConfig(e,r){const t=s.join(e,b);await p(t,{recursive:!0});const n=(r.source??"global")==="global"?{source:"global"}:l(r);await f(s.join(t,S),`${JSON.stringify(n,null,2)}
3
- `,"utf-8")}export async function writeStatuslineScript(e,r){const t=s.join(e,g);await p(t,{recursive:!0});const n=s.join(t,m);return await f(n,r,"utf-8"),n}export async function readStatuslineScript(e){try{return await u(s.join(e,g,m),"utf-8")}catch{return""}}export async function ensureSettingsStatusLine(e,r=30){const t=s.join(e,E),n=process.platform==="win32";let o={};if(await I(t))try{o=JSON.parse(await u(t,"utf-8"))}catch{o={}}const a=s.join(e,g,m),c=n?`node "${a}"`:`node ${a}`;o.statusLine={type:"command",command:c,padding:0,refreshInterval:Math.max(1,Math.round(r))},await p(s.dirname(t),{recursive:!0}),await f(t,`${JSON.stringify(o,null,2)}
4
- `,"utf-8")}export async function applyStatuslineConfig(e,r){await writeStatuslineConfig(e,r);const t=(r.source??"global")==="global"?await readGlobalStatuslineConfig():l(r),n=$(t);await writeStatuslineScript(e,n),await ensureSettingsStatusLine(e,t.refreshInterval)}function L(e){let r,t=!1;if(e.lines?.length)r=e.lines.map(o=>[...o]);else if(e.order?.length){t=!0;const o=e.order;e.layout==="multi"?r=[v.filter(a=>o.includes(a)),x.filter(a=>o.includes(a))].filter(a=>a.length>0):r=[o]}else t=!0,r=i.lines.map(o=>[...o]);const n=new Set;if(r=r.map(o=>o.filter(a=>!y.includes(a)||n.has(a)?!1:(n.add(a),!0))),r.length===0&&(r=[[]]),t){const o=y.filter(a=>{if(n.has(a))return!1;const c=e.segments?.[a];return typeof c?.enabled=="boolean"?c.enabled:i.segments[a].enabled});o.length&&(r[0]=[...r[0],...o])}return r}const O=/^#[0-9a-fA-F]{6}$/,_=/^#([0-9a-fA-F]{3})$/,T=/^ansi256:(\d{1,3})$/;function w(e,r){if(typeof e!="string")return r;if(N.includes(e))return e;const t=T.exec(e);if(t){const o=Number(t[1]);return o>=0&&o<=255?`ansi256:${o}`:r}if(O.test(e))return e.toLowerCase();const n=_.exec(e);if(n){const[,o]=n;return`#${o[0]}${o[0]}${o[1]}${o[1]}${o[2]}${o[2]}`.toLowerCase()}return r}function A(e,r){if(!e||typeof e!="object")return{...r};const t=e,n={...r,...t,color:w(t.color,r.color),backgroundColor:t.backgroundColor==null?null:w(t.backgroundColor,r.backgroundColor??"gray")};return(typeof t.label!="string"||t.label==="")&&delete n.label,(typeof t.format!="string"||t.format==="")&&delete n.format,t.metric!=="session"&&t.metric!=="context"&&delete n.metric,t.window!=="five_hour"&&t.window!=="seven_day"&&t.window!=="spend"&&delete n.window,n}function F(e){const r=i.bar;if(!e||typeof e!="object")return{...r};const t=e,n=Math.round(Number(t.cells));return{cells:Number.isFinite(n)?Math.max(1,Math.min(40,n)):r.cells,fill:typeof t.fill=="string"&&t.fill!==""?t.fill:r.fill,empty:typeof t.empty=="string"&&t.empty!==""?t.empty:r.empty}}function l(e){const r={...i.segments};for(const n of Object.keys(r))r[n]=A(e.segments?.[n],r[n]);const t=e.refreshInterval;return{separator:e.separator??i.separator,align:e.align??i.align,logoText:i.logoText,logoColor:w(e.logoColor,i.logoColor),powerline:{...e.powerline,enabled:e.powerline?.enabled??i.powerline.enabled},lines:L(e),refreshInterval:t!=null&&t>=1?t:i.refreshInterval,source:e.source??i.source,bar:F(e.bar),divider:typeof e.divider=="string"?e.divider:i.divider,labelSeparator:typeof e.labelSeparator=="string"?e.labelSeparator:i.labelSeparator,segments:r}}
1
+ import{readFile as f,writeFile as g,mkdir as m}from"node:fs/promises";import{homedir as h}from"node:os";import s from"node:path";import{DEFAULT_STATUSLINE_CONFIG as i,LEGACY_IDENTITY_LINE as C,LEGACY_METRICS_LINE as E,NAMED_COLORS as L,SEGMENT_ORDER as d}from"./config.js";import{generateStatuslineScript as x,statuslineCacheDir as I}from"./generator.js";import{statuslineSurfaceFor as N}from"../surfaces.js";const b=".weave",w="statusline.json",y="statusline.json",a=N("claude");export function statuslineScriptRelPath(){return a.scriptRelPath}let u=s.join(h(),".weave");export function setGlobalStatuslineDir(t){u=t}export async function readGlobalStatuslineConfig(){try{const t=await f(s.join(u,y),"utf-8");return{...c(JSON.parse(t)),source:"global"}}catch{return i}}export async function writeGlobalStatuslineConfig(t){await m(u,{recursive:!0});const e={...c(t),source:"global"};await g(s.join(u,y),`${JSON.stringify(e,null,2)}
2
+ `,"utf-8")}export async function readStatuslineConfig(t){const e=await readGlobalStatuslineConfig();try{const n=await f(s.join(t,b,w),"utf-8"),r=JSON.parse(n);return r.source==="custom"?c(r):e}catch{return e}}export async function writeStatuslineConfig(t,e){const n=s.join(t,b);await m(n,{recursive:!0});const o=(e.source??"global")==="global"?{source:"global"}:c(e);await g(s.join(n,w),`${JSON.stringify(o,null,2)}
3
+ `,"utf-8")}export async function writeStatuslineScript(t,e){const n=s.join(t,a.scriptRelPath);return await m(s.dirname(n),{recursive:!0}),await g(n,e,"utf-8"),n}export async function readStatuslineScript(t){try{return await f(s.join(t,a.scriptRelPath),"utf-8")}catch{return""}}export function readStatuslineFacts(t){return a.facts?.(I(),t)??null}export async function ensureSettingsStatusLine(t,e=30){await a.wire(t,{scriptPath:s.join(t,a.scriptRelPath),refreshInterval:e})}export async function applyStatuslineConfig(t,e){await writeStatuslineConfig(t,e);const n=(e.source??"global")==="global"?await readGlobalStatuslineConfig():c(e),r=x(n);await writeStatuslineScript(t,r),await ensureSettingsStatusLine(t,n.refreshInterval)}function T(t){let e,n=!1;if(t.lines?.length)e=t.lines.map(o=>[...o]);else if(t.order?.length){n=!0;const o=t.order;t.layout==="multi"?e=[C.filter(l=>o.includes(l)),E.filter(l=>o.includes(l))].filter(l=>l.length>0):e=[o]}else n=!0,e=i.lines.map(o=>[...o]);const r=new Set;if(e=e.map(o=>o.filter(l=>!d.includes(l)||r.has(l)?!1:(r.add(l),!0))),e.length===0&&(e=[[]]),n){const o=d.filter(l=>{if(r.has(l))return!1;const S=t.segments?.[l];return typeof S?.enabled=="boolean"?S.enabled:i.segments[l].enabled});o.length&&(e[0]=[...e[0],...o])}return e}const _=/^#[0-9a-fA-F]{6}$/,A=/^#([0-9a-fA-F]{3})$/,F=/^ansi256:(\d{1,3})$/;function p(t,e){if(typeof t!="string")return e;if(L.includes(t))return t;const n=F.exec(t);if(n){const o=Number(n[1]);return o>=0&&o<=255?`ansi256:${o}`:e}if(_.test(t))return t.toLowerCase();const r=A.exec(t);if(r){const[,o]=r;return`#${o[0]}${o[0]}${o[1]}${o[1]}${o[2]}${o[2]}`.toLowerCase()}return e}function $(t,e){if(!t||typeof t!="object")return{...e};const n=t,r={...e,...n,color:p(n.color,e.color),backgroundColor:n.backgroundColor==null?null:p(n.backgroundColor,e.backgroundColor??"gray")};return(typeof n.label!="string"||n.label==="")&&delete r.label,(typeof n.format!="string"||n.format==="")&&delete r.format,n.metric!=="session"&&n.metric!=="context"&&delete r.metric,n.window!=="five_hour"&&n.window!=="seven_day"&&n.window!=="spend"&&delete r.window,r}function j(t){const e=i.bar;if(!t||typeof t!="object")return{...e};const n=t,r=Math.round(Number(n.cells));return{cells:Number.isFinite(r)?Math.max(1,Math.min(40,r)):e.cells,fill:typeof n.fill=="string"&&n.fill!==""?n.fill:e.fill,empty:typeof n.empty=="string"&&n.empty!==""?n.empty:e.empty}}function c(t){const e={...i.segments};for(const r of Object.keys(e))e[r]=$(t.segments?.[r],e[r]);const n=t.refreshInterval;return{separator:t.separator??i.separator,align:t.align??i.align,logoText:i.logoText,logoColor:p(t.logoColor,i.logoColor),powerline:{...t.powerline,enabled:t.powerline?.enabled??i.powerline.enabled},lines:T(t),refreshInterval:n!=null&&n>=1?n:i.refreshInterval,source:t.source??i.source,bar:j(t.bar),divider:typeof t.divider=="string"?t.divider:i.divider,labelSeparator:typeof t.labelSeparator=="string"?t.labelSeparator:i.labelSeparator,segments:e}}
@@ -1,5 +1,5 @@
1
1
  import type { Harness } from '@weavecode/core';
2
- import { type AssetSurface, type BlockingPromptSpec, type CaptureSurface, type MessagingSurface, type PluginStateSurface, type PluginSurface } from '@weavecode/harness';
2
+ import { type AssetSurface, type BlockingPromptSpec, type CaptureSurface, type MessagingSurface, type PluginStateSurface, type PluginSurface, type StatuslineSurface } from '@weavecode/harness';
3
3
  /** 按 harness 取资产表面;未注册或未补 assets 槽抛错。 */
4
4
  export declare function assetSurfaceFor(harness: Harness): AssetSurface;
5
5
  /**
@@ -51,3 +51,13 @@ export declare function captureSurfaces(): Array<{
51
51
  * harness 无此机制(不跟踪、不作答)——codex 无此类交互,缺席即静默。
52
52
  */
53
53
  export declare function blockingPromptFor(harness: Harness): BlockingPromptSpec | null;
54
+ /**
55
+ * 按 harness 取 statusline 面;null = 该 harness 没有 statusline 概念。
56
+ * 「TUI 里能不能注入」由面自己的 `tui` 答,调用方不按 harness 名判。
57
+ */
58
+ export declare function statuslineSurfaceFor(harness: Harness): StatuslineSurface | null;
59
+ /** 全部声明了 statusline 槽的 (harness, 面) 列表——能力矩阵按本表枚举。 */
60
+ export declare function statuslineSurfaces(): Array<{
61
+ harness: Harness;
62
+ surface: StatuslineSurface;
63
+ }>;
@@ -1 +1 @@
1
- import{createRuntimeRegistry as n}from"@weavecode/harness";const t=n();export function assetSurfaceFor(r){const e=t.get(r)?.assets;if(!e)throw new Error(`no asset surface registered for harness: ${r}`);return e}export function assetSurfaces(){return t.all().map(r=>r.assets).filter(r=>r!==void 0)}export function pluginSurfaceFor(r){const e=t.get(r)?.plugins;if(!e)throw new Error(`no plugin surface registered for harness: ${r}`);return e}export function pluginSurfaces(){return t.all().filter(r=>r.plugins!==void 0).map(r=>({harness:r.id,surface:r.plugins}))}export function pluginStateFor(r){const e=t.get(r)?.pluginState;if(!e)throw new Error(`no plugin state surface registered for harness: ${r}`);return e}export function pluginStateSurfaces(){return t.all().filter(r=>r.pluginState!==void 0).map(r=>({harness:r.id,state:r.pluginState}))}export function messagingSurfaceFor(r){const e=t.get(r)?.messaging;if(!e)throw new Error(`no messaging surface registered for harness: ${r}`);return e}export function messagingSurfaces(){return t.all().filter(r=>r.messaging!==void 0).map(r=>({harness:r.id,surface:r.messaging}))}export function captureSurfaces(){return t.all().filter(r=>r.capture!==void 0).map(r=>({harness:r.id,surface:r.capture}))}export function blockingPromptFor(r){return t.get(r)?.questions??null}
1
+ import{createRuntimeRegistry as n}from"@weavecode/harness";const r=n();export function assetSurfaceFor(e){const t=r.get(e)?.assets;if(!t)throw new Error(`no asset surface registered for harness: ${e}`);return t}export function assetSurfaces(){return r.all().map(e=>e.assets).filter(e=>e!==void 0)}export function pluginSurfaceFor(e){const t=r.get(e)?.plugins;if(!t)throw new Error(`no plugin surface registered for harness: ${e}`);return t}export function pluginSurfaces(){return r.all().filter(e=>e.plugins!==void 0).map(e=>({harness:e.id,surface:e.plugins}))}export function pluginStateFor(e){const t=r.get(e)?.pluginState;if(!t)throw new Error(`no plugin state surface registered for harness: ${e}`);return t}export function pluginStateSurfaces(){return r.all().filter(e=>e.pluginState!==void 0).map(e=>({harness:e.id,state:e.pluginState}))}export function messagingSurfaceFor(e){const t=r.get(e)?.messaging;if(!t)throw new Error(`no messaging surface registered for harness: ${e}`);return t}export function messagingSurfaces(){return r.all().filter(e=>e.messaging!==void 0).map(e=>({harness:e.id,surface:e.messaging}))}export function captureSurfaces(){return r.all().filter(e=>e.capture!==void 0).map(e=>({harness:e.id,surface:e.capture}))}export function blockingPromptFor(e){return r.get(e)?.questions??null}export function statuslineSurfaceFor(e){return r.get(e)?.statusline??null}export function statuslineSurfaces(){return r.all().filter(e=>e.statusline!==void 0).map(e=>({harness:e.id,surface:e.statusline}))}
@@ -1 +1 @@
1
- export class WatchCache{byProject=new Map;upsert(e,t){let r=this.byProject.get(e);r||(r=new Map,this.byProject.set(e,r)),r.set(t.relPath,t)}remove(e,t){this.byProject.get(e)?.delete(t)}list(e){const t=this.byProject.get(e);return t?[...t.values()].sort((r,l)=>r.relPath.localeCompare(l.relPath)):[]}clear(e){this.byProject.delete(e)}clearAll(){this.byProject.clear()}}
1
+ export class WatchCache{byProject=new Map;upsert(e,t){let r=this.byProject.get(e);r||(r=new Map,this.byProject.set(e,r)),r.set(t.relPath,t)}remove(e,t){this.byProject.get(e)?.delete(t)}list(e){const t=this.byProject.get(e);return t?[...t.values()].sort((r,c)=>r.relPath.localeCompare(c.relPath)):[]}clear(e){this.byProject.delete(e)}clearAll(){this.byProject.clear()}}
@@ -1 +1 @@
1
- import{assetSurfaces as r}from"../surfaces.js";export function classifyAsset(s){const t=normalizeRelPath(s);if(t===".mcp.json")return"mcp";if(t.startsWith(".claude/skills/")||t.startsWith(".codex/skills/"))return"skill";if(t===".claude/settings.json"||t===".claude/settings.local.json"||t===".codex/config.toml")return"settings";if(t.startsWith(".claude/commands/")||t.startsWith(".codex/prompts/"))return"command";if(t.startsWith(".claude/agents/"))return"agent";if(t.startsWith(".claude/helpers/"))return"helper";if(t.startsWith(".claude/workflows/"))return"workflow";if(t.startsWith(".claude/rules/"))return"rule";if(t.startsWith(".claude/output-styles/"))return"output-style";if(t.startsWith(".claude/plugins/")||t.startsWith(".weave/plugins/"))return"plugin";const e=t.slice(t.lastIndexOf("/")+1);return e==="CLAUDE.md"||e==="AGENTS.md"?"instructions":"other"}export function classifyAgent(s){const t=normalizeRelPath(s);return r().find(e=>e.classify(t))?.harness??"claude"}export function normalizeRelPath(s){let t=s.replace(/\\/g,"/");for(;t.startsWith("./");)t=t.slice(2);for(;t.startsWith("/");)t=t.slice(1);return t}
1
+ import{assetSurfaces as i}from"../surfaces.js";export function classifyAsset(s){const t=normalizeRelPath(s);if(t===".mcp.json")return"mcp";if(t.startsWith(".claude/skills/")||t.startsWith(".codex/skills/"))return"skill";if(t===".claude/settings.json"||t===".claude/settings.local.json"||t===".codex/config.toml")return"settings";if(t.startsWith(".claude/commands/")||t.startsWith(".codex/prompts/"))return"command";if(t.startsWith(".claude/agents/"))return"agent";if(t.startsWith(".claude/helpers/"))return"helper";if(t.startsWith(".claude/workflows/"))return"workflow";if(t.startsWith(".claude/rules/"))return"rule";if(t.startsWith(".claude/output-styles/"))return"output-style";if(t.startsWith(".claude/plugins/")||t.startsWith(".weave/plugins/"))return"plugin";const e=t.slice(t.lastIndexOf("/")+1);return e==="CLAUDE.md"||e==="AGENTS.md"?"instructions":"other"}export function classifyAgent(s){const t=normalizeRelPath(s);return i().find(r=>r.classify(t))?.harness??"claude"}export function normalizeRelPath(s){let t=s.replace(/\\/g,"/");for(;t.startsWith("./");)t=t.slice(2);for(;t.startsWith("/");)t=t.slice(1);return t}
@@ -1 +1 @@
1
- import{readFileSync as c,statSync as u,existsSync as a}from"node:fs";import n from"node:path";const h=8;export class PluginModsSniffer{cache=new Map;verdicts=new Map;revalidate;constructor(t={}){this.revalidate=t.revalidate??!0}refine(t,e,s){return t!=="plugin"?t:this.sniff(n.dirname(s))?"mods":"plugin"}sniff(t){if(!this.revalidate){const s=this.verdicts.get(t);if(s!==void 0)return s}const e=this.walkUp(t);return this.revalidate||this.verdicts.set(t,e),e}walkUp(t){let e=t;for(let s=0;s<h;s++){if(f(e))return!1;if(this.hooksMods(e))return!0;if(a(n.join(e,".claude-plugin","plugin.json")))return!1;const i=n.dirname(e);if(i===e)return!1;e=i}return!1}hooksMods(t){const e=n.join(t,"hooks","hooks.json"),s=this.cache.get(t);let i=-1;if(a(e))try{i=u(e).mtimeMs}catch{}if(i===-1)return s?.hooksMtimeMs!==-1&&this.cache.set(t,{mods:!1,hooksMtimeMs:-1}),!1;if(s&&s.hooksMtimeMs===i)return s.mods;const o=d(e);return this.cache.set(t,{mods:o,hooksMtimeMs:i}),o}}function f(r){if(n.basename(r)!=="plugins")return!1;const t=n.basename(n.dirname(r));return t===".claude"||t===".weave"}export function hasNonEmptyModules(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;const t=r.modules;return Array.isArray(t)&&t.length>0}function d(r){try{return hasNonEmptyModules(JSON.parse(c(r,"utf8")))}catch{return!1}}
1
+ import{readFileSync as f,statSync as u,existsSync as o}from"node:fs";import n from"node:path";const l=8;export class PluginModsSniffer{cache=new Map;verdicts=new Map;revalidate;constructor(e={}){this.revalidate=e.revalidate??!0}refine(e,t,s){return e!=="plugin"?e:this.sniff(n.dirname(s))?"mods":"plugin"}sniff(e){if(!this.revalidate){const s=this.verdicts.get(e);if(s!==void 0)return s}const t=this.walkUp(e);return this.revalidate||this.verdicts.set(e,t),t}walkUp(e){let t=e;for(let s=0;s<l;s++){if(c(t))return!1;if(this.hooksMods(t))return!0;if(o(n.join(t,".claude-plugin","plugin.json")))return!1;const i=n.dirname(t);if(i===t)return!1;t=i}return!1}hooksMods(e){const t=n.join(e,"hooks","hooks.json"),s=this.cache.get(e);let i=-1;if(o(t))try{i=u(t).mtimeMs}catch{}if(i===-1)return s?.hooksMtimeMs!==-1&&this.cache.set(e,{mods:!1,hooksMtimeMs:-1}),!1;if(s&&s.hooksMtimeMs===i)return s.mods;const a=h(t);return this.cache.set(e,{mods:a,hooksMtimeMs:i}),a}}function c(r){if(n.basename(r)!=="plugins")return!1;const e=n.basename(n.dirname(r));return e===".claude"||e===".weave"}export function hasNonEmptyModules(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;const e=r.modules;return Array.isArray(e)&&e.length>0}function h(r){try{return hasNonEmptyModules(JSON.parse(f(r,"utf8")))}catch{return!1}}
@@ -3,8 +3,12 @@ import type { LibraryRepository } from '../repositories/libraries.js';
3
3
  import type { PluginManager } from '../hooks/plugin-loader.js';
4
4
  import { FingerprintCache } from '../install/fingerprint.js';
5
5
  /**
6
- * SyncScheduler — periodically applies outdated updates to projects that have
7
- * opted into auto-sync (`.weave/config.json` → `autoSync: true`).
6
+ * SyncScheduler — periodically applies outdated updates to every project.
7
+ *
8
+ * **自动/手动由 git 分类单点决定,不再是 per-project 开关**(用户裁决):不进 git
9
+ * 的 init 生成物与资产由这里自动刷新;会进 git 的一律只报不写,dashboard 提醒
10
+ * 用户跑 `weave init`。所以 tick 无条件扫全部项目,落盘范围由 `syncAll` 内部按
11
+ * git 归类分流。
8
12
  *
9
13
  * This is decoupled from the WatchService's 5s reconcile: sync runs on a longer
10
14
  * cadence (default 60s) because it rehashes source directories and writes
@@ -21,7 +25,7 @@ export interface SyncSchedulerOptions {
21
25
  /**
22
26
  * 一轮同步落地后的对账面(项目角标刷新器)。资产写盘会经 watch → SSE 回流,
23
27
  * 但项目插件模板的物化落点(`.claude/` 副本)不带 plugin.reloaded——角标只能
24
- * 靠这一下对账,否则 autoSync 清掉漂移后角标会一直亮着。
28
+ * 靠这一下对账,否则自动同步清掉漂移后角标会一直亮着。
25
29
  */
26
30
  onSynced?: () => void;
27
31
  }
@@ -37,6 +41,6 @@ export declare class SyncScheduler {
37
41
  constructor(projects: ProjectRepository, libraries: LibraryRepository, options?: SyncSchedulerOptions);
38
42
  start(): void;
39
43
  stop(): void;
40
- /** One sync sweep across all projects opted into auto-sync. */
44
+ /** One sync sweep across all projects. */
41
45
  tick(): Promise<void>;
42
46
  }
@@ -1 +1 @@
1
- import{FingerprintCache as a}from"../install/fingerprint.js";import{buildLibraryIndex as e}from"../install/library-index.js";import{detectUpdates as n}from"../install/updates.js";import{syncAll as c}from"../install/apply-update.js";import{readProjectConfig as h,markSynced as o}from"../install/project-config.js";import{syncPlugins as l}from"../hooks/plugin-project-state.js";export class SyncScheduler{projects;libraries;timer;intervalMs;cache;plugins;onSynced;running=!1;constructor(s,r,i={}){this.projects=s,this.libraries=r,this.intervalMs=i.intervalMs??6e4,this.cache=i.cache??new a,this.plugins=i.plugins,this.onSynced=i.onSynced}start(){this.timer||(this.timer=setInterval(()=>{this.tick()},this.intervalMs))}stop(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}async tick(){if(!this.running&&this.libraries){this.running=!0;try{const s=this.libraries.list(),r=await e(s),i=this.plugins?.list().map(t=>t.id);for(const t of this.projects.list())if((await h(t.path)).autoSync){if(i)try{l(t,i,{projects:this.projects})}catch{}(await n(t.path,s,this.cache,r)).available!==0&&(await c(t.path,s,this.cache,r),await o(t.path,new Date().toISOString()),this.onSynced?.())}}finally{this.running=!1}}}}
1
+ import{FingerprintCache as e}from"../install/fingerprint.js";import{buildLibraryIndex as n}from"../install/library-index.js";import{detectUpdates as a}from"../install/updates.js";import{syncAll as c}from"../install/apply-update.js";import{markSynced as h}from"../install/project-config.js";import{syncPlugins as o}from"../hooks/plugin-project-state.js";export class SyncScheduler{projects;libraries;timer;intervalMs;cache;plugins;onSynced;running=!1;constructor(r,s,t={}){this.projects=r,this.libraries=s,this.intervalMs=t.intervalMs??6e4,this.cache=t.cache??new e,this.plugins=t.plugins,this.onSynced=t.onSynced}start(){this.timer||(this.timer=setInterval(()=>{this.tick()},this.intervalMs))}stop(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}async tick(){if(!this.running&&this.libraries){this.running=!0;try{const r=this.libraries.list(),s=await n(r),t=this.plugins?.list().map(i=>i.id);for(const i of this.projects.list()){if(t)try{o(i,t,{projects:this.projects})}catch{}(await a(i.path,r,this.cache,s)).available!==0&&(await c(i.path,r,this.cache,s),await h(i.path,new Date().toISOString()),this.onSynced?.())}}finally{this.running=!1}}}}
@@ -1 +1 @@
1
- import{EventEmitter as p}from"node:events";import{existsSync as b,lstatSync as w,readdirSync as y,realpathSync as P,statSync as f,watch as d}from"node:fs";import h from"node:path";import{watch as j}from"chokidar";import{WatchCache as v}from"./cache.js";import{classifyAgent as R,classifyAsset as S,normalizeRelPath as g}from"./classifier.js";import{PluginModsSniffer as T}from"./plugin-mods.js";import{globalPersonalSkillRootsOwned as M}from"../install/global-config.js";import{assetSurfaces as G}from"../surfaces.js";const k="<global>",I=new T;export function shouldIgnore(l){return l===""||l==="."||l===".weave"||l.startsWith(".weave/")?!1:G().every(t=>t.ignore(l))}export class WatchService{projects;emitter=new p;watchers=new Map;cache=new v;debounceMs;reconcileMs;isIgnored;globalRootSource;timers=new Map;pending=new Map;reconcileTimer;globalRoots=new Map;globalPending=new Map;globalTimer;constructor(t,e={}){this.projects=t,this.debounceMs=e.debounceMs??300,this.reconcileMs=e.reconcileMs??5e3,this.isIgnored=e.isIgnored??shouldIgnore,this.globalRootSource=e.globalRootSource??M}start(){this.reconcile(),this.reconcileTimer=setInterval(()=>this.reconcile(),this.reconcileMs)}stop(){for(const t of this.watchers.values())t.close();this.watchers.clear();for(const t of[...this.globalRoots.keys()])this.unwatchGlobalRoot(t);for(const t of this.timers.values())clearTimeout(t);this.timers.clear(),this.pending.clear(),this.globalPending.clear(),this.globalTimer&&(clearTimeout(this.globalTimer),this.globalTimer=void 0),this.cache.clearAll(),this.reconcileTimer&&(clearInterval(this.reconcileTimer),this.reconcileTimer=void 0)}reconcile(){const t=new Set(this.projects.list().map(e=>e.path));for(const e of t)this.watchers.has(e)||(this.watchProject(e),this.watchers.has(e)&&this.emitter.emit("project",{action:"added",projectPath:e}));for(const e of[...this.watchers.keys()])t.has(e)||(this.unwatchProject(e),this.emitter.emit("project",{action:"removed",projectPath:e}));this.reconcileGlobalRoots()}reconcileGlobalRoots(){const t=this.globalRootSource(),e=new Set(t.map(s=>s.root));for(const{harness:s,root:o}of t){if(this.globalRoots.has(o)){this.syncGlobalEntries(o);continue}b(o)&&this.watchGlobalRoot(o,s)}for(const s of[...this.globalRoots.keys()])(!e.has(s)||!b(s))&&this.unwatchGlobalRoot(s)}getAssets(t){return this.cache.list(t)}subscribe(t){return this.emitter.on("change",t),()=>this.emitter.off("change",t)}subscribeProjects(t){return this.emitter.on("project",t),()=>this.emitter.off("project",t)}watchProject(t){if(!b(t))return;const e=this.projects.getByPath(t)?.name??h.basename(t),s=j(".",{cwd:t,ignored:o=>this.isIgnored(g(h.relative(t,o))),ignoreInitial:!1,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});this.watchers.set(t,s),s.on("add",o=>this.onFile(t,e,o,"add")),s.on("change",o=>this.onFile(t,e,o,"change")),s.on("unlink",o=>this.onFile(t,e,o,"unlink")),s.on("error",o=>this.emitter.emit("watch-error",o))}unwatchProject(t){const e=this.watchers.get(t);e&&(e.close(),this.watchers.delete(t));const s=this.timers.get(t);s&&(clearTimeout(s),this.timers.delete(t)),this.pending.delete(t),this.cache.clear(t)}watchGlobalRoot(t,e){const s=d(t,(o,i)=>{this.syncGlobalEntries(t),i&&this.emitGlobalPath(t,g(String(i)))});s.on("error",o=>this.emitter.emit("watch-error",o)),this.globalRoots.set(t,{harness:e,root:s,entries:new Map}),this.syncGlobalEntries(t)}syncGlobalEntries(t){const e=this.globalRoots.get(t);if(!e)return;let s;try{s=y(t)}catch{return}const o=new Set;for(const i of s){if(i.startsWith("."))continue;const r=h.join(t,i);let a;try{if(!f(r).isDirectory())continue;a=P(r)}catch{continue}o.add(i);const c=e.entries.get(i);if(c?.real===a)continue;c&&(c.watcher.close(),e.entries.delete(i));const n=d(a,{recursive:!0},(u,m)=>{m&&this.emitGlobalPath(t,g(h.join(i,String(m))))});n.on("error",()=>{n.close(),e.entries.delete(i)}),e.entries.set(i,{real:a,watcher:n})}for(const[i,r]of e.entries)o.has(i)||(r.watcher.close(),e.entries.delete(i))}unwatchGlobalRoot(t){const e=this.globalRoots.get(t);if(e){e.root.close();for(const s of e.entries.values())s.watcher.close();this.globalRoots.delete(t)}}emitGlobalPath(t,e){if(!e||e.split("/").some(i=>i.startsWith(".")))return;const s=h.join(t,e);let o="unlink";try{if(!f(s).isFile())return;o="change"}catch{}this.enqueueGlobal({projectPath:k,projectName:"global",category:"skill",agent:this.globalRoots.get(t)?.harness??"claude",relPath:e,absPath:s,kind:o})}enqueueGlobal(t){this.globalPending.set(t.absPath,t),this.globalTimer&&clearTimeout(this.globalTimer),this.globalTimer=setTimeout(()=>this.flushGlobal(),this.debounceMs)}flushGlobal(){this.globalTimer=void 0;for(const t of this.globalPending.values())this.emitter.emit("change",t);this.globalPending.clear()}onFile(t,e,s,o){const i=g(s),r=h.join(t,i);let a=S(i);o!=="unlink"&&a==="plugin"&&(a=I.refine(a,i,r));const c=R(i);let n;if(o==="unlink")this.cache.remove(t,i);else try{const u=w(r);n=u.isSymbolicLink()||void 0;const m=n?f(r).mtimeMs:u.mtimeMs;this.cache.upsert(t,{absPath:r,relPath:i,category:a,agent:c,mtimeMs:m,...n?{isSymlink:!0}:{}})}catch{this.cache.remove(t,i)}this.enqueue(t,{projectPath:t,projectName:e,category:a,agent:c,relPath:i,absPath:r,kind:o,...n?{isSymlink:!0}:{}})}enqueue(t,e){let s=this.pending.get(t);s||(s=new Map,this.pending.set(t,s)),s.set(e.relPath,e);const o=this.timers.get(t);o&&clearTimeout(o),this.timers.set(t,setTimeout(()=>this.flush(t),this.debounceMs))}flush(t){this.timers.delete(t);const e=this.pending.get(t);if(this.pending.delete(t),!!e)for(const s of e.values())this.emitter.emit("change",s)}}
1
+ import{EventEmitter as w}from"node:events";import{existsSync as g,lstatSync as y,readdirSync as p,realpathSync as S,statSync as b,watch as d}from"node:fs";import h from"node:path";import{watch as v}from"chokidar";import{WatchCache as R}from"./cache.js";import{classifyAgent as T,classifyAsset as M,normalizeRelPath as f}from"./classifier.js";import{PluginModsSniffer as G}from"./plugin-mods.js";import{globalPersonalSkillRootsOwned as k}from"../install/global-config.js";import{assetSurfaces as I}from"../surfaces.js";const E="<global>",W=new G;export function shouldIgnore(c){return c===""||c==="."||c===".weave"||c.startsWith(".weave/")?!1:I().every(e=>e.ignore(c))}export class WatchService{projects;emitter=new w;watchers=new Map;cache=new R;debounceMs;reconcileMs;isIgnored;globalRootSource;timers=new Map;pending=new Map;reconcileTimer;globalRoots=new Map;globalPending=new Map;globalTimer;constructor(e,t={}){this.projects=e,this.debounceMs=t.debounceMs??300,this.reconcileMs=t.reconcileMs??5e3,this.isIgnored=t.isIgnored??shouldIgnore,this.globalRootSource=t.globalRootSource??k}start(){this.reconcile(),this.reconcileTimer=setInterval(()=>this.reconcile(),this.reconcileMs)}stop(){for(const e of this.watchers.values())e.close();this.watchers.clear();for(const e of[...this.globalRoots.keys()])this.unwatchGlobalRoot(e);for(const e of this.timers.values())clearTimeout(e);this.timers.clear(),this.pending.clear(),this.globalPending.clear(),this.globalTimer&&(clearTimeout(this.globalTimer),this.globalTimer=void 0),this.cache.clearAll(),this.reconcileTimer&&(clearInterval(this.reconcileTimer),this.reconcileTimer=void 0)}reconcile(){const e=new Set(this.projects.list().map(t=>t.path));for(const t of e)this.watchers.has(t)||(this.watchProject(t),this.watchers.has(t)&&this.emitter.emit("project",{action:"added",projectPath:t}));for(const t of[...this.watchers.keys()])e.has(t)||(this.unwatchProject(t),this.emitter.emit("project",{action:"removed",projectPath:t}));this.reconcileGlobalRoots()}reconcileGlobalRoots(){const e=this.globalRootSource(),t=new Set(e.map(s=>s.root));for(const{harness:s,root:o}of e){if(this.globalRoots.has(o)){this.syncGlobalEntries(o);continue}g(o)&&this.watchGlobalRoot(o,s)}for(const s of[...this.globalRoots.keys()])(!t.has(s)||!g(s))&&this.unwatchGlobalRoot(s)}getAssets(e){return this.cache.list(e)}subscribe(e){return this.emitter.on("change",e),()=>this.emitter.off("change",e)}subscribeProjects(e){return this.emitter.on("project",e),()=>this.emitter.off("project",e)}watchProject(e){if(!g(e))return;const s=this.projects.getByPath(e)?.name??h.basename(e),o=v(".",{cwd:e,ignored:i=>this.isIgnored(f(h.relative(e,i))),ignoreInitial:!1,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});this.watchers.set(e,o),o.on("add",i=>this.onFile(e,s,i,"add")),o.on("change",i=>this.onFile(e,s,i,"change")),o.on("unlink",i=>this.onFile(e,s,i,"unlink")),o.on("error",i=>this.emitter.emit("watch-error",i))}unwatchProject(e){const t=this.watchers.get(e);t&&(t.close(),this.watchers.delete(e));const s=this.timers.get(e);s&&(clearTimeout(s),this.timers.delete(e)),this.pending.delete(e),this.cache.clear(e)}watchGlobalRoot(e,t){const s=d(e,(o,i)=>{this.syncGlobalEntries(e),i&&this.emitGlobalPath(e,f(String(i)))});s.on("error",o=>this.emitter.emit("watch-error",o)),this.globalRoots.set(e,{harness:t,root:s,entries:new Map}),this.syncGlobalEntries(e)}syncGlobalEntries(e){const t=this.globalRoots.get(e);if(!t)return;let s;try{s=p(e)}catch{return}const o=new Set;for(const i of s){if(i.startsWith("."))continue;const n=h.join(e,i);let r;try{if(!b(n).isDirectory())continue;r=S(n)}catch{continue}o.add(i);const a=t.entries.get(i);if(a?.real===r)continue;a&&(a.watcher.close(),t.entries.delete(i));const l=d(r,{recursive:!0},(u,m)=>{m&&this.emitGlobalPath(e,f(h.join(i,String(m))))});l.on("error",()=>{l.close(),t.entries.delete(i)}),t.entries.set(i,{real:r,watcher:l})}for(const[i,n]of t.entries)o.has(i)||(n.watcher.close(),t.entries.delete(i))}unwatchGlobalRoot(e){const t=this.globalRoots.get(e);if(t){t.root.close();for(const s of t.entries.values())s.watcher.close();this.globalRoots.delete(e)}}emitGlobalPath(e,t){if(!t||t.split("/").some(i=>i.startsWith(".")))return;const s=h.join(e,t);let o="unlink";try{if(!b(s).isFile())return;o="change"}catch{}this.enqueueGlobal({projectPath:E,projectName:"global",category:"skill",agent:this.globalRoots.get(e)?.harness??"claude",relPath:t,absPath:s,kind:o})}enqueueGlobal(e){this.globalPending.set(e.absPath,e),this.globalTimer&&clearTimeout(this.globalTimer),this.globalTimer=setTimeout(()=>this.flushGlobal(),this.debounceMs)}flushGlobal(){this.globalTimer=void 0;for(const e of this.globalPending.values())this.emitter.emit("change",e);this.globalPending.clear()}onFile(e,t,s,o){const i=f(s),n=h.join(e,i);let r=M(i);o!=="unlink"&&r==="plugin"&&(r=W.refine(r,i,n));const a=T(i);let l;if(o==="unlink")this.cache.remove(e,i);else try{const u=y(n);l=u.isSymbolicLink()||void 0;const m=l?b(n).mtimeMs:u.mtimeMs;this.cache.upsert(e,{absPath:n,relPath:i,category:r,agent:a,mtimeMs:m,...l?{isSymlink:!0}:{}})}catch{this.cache.remove(e,i)}this.enqueue(e,{projectPath:e,projectName:t,category:r,agent:a,relPath:i,absPath:n,kind:o,...l?{isSymlink:!0}:{}})}enqueue(e,t){let s=this.pending.get(e);s||(s=new Map,this.pending.set(e,s)),s.set(t.relPath,t);const o=this.timers.get(e);o&&clearTimeout(o),this.timers.set(e,setTimeout(()=>this.flush(e),this.debounceMs))}flush(e){this.timers.delete(e);const t=this.pending.get(e);if(this.pending.delete(e),!!t)for(const s of t.values())this.emitter.emit("change",s)}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weavecode/server",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Weave daemon — HTTP server, SQLite data layer, and hook ingestion",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,9 +20,9 @@
20
20
  "node": ">=22.5.0"
21
21
  },
22
22
  "dependencies": {
23
- "@weavecode/core": "^0.1.0",
24
- "@weavecode/harness": "^0.1.0",
25
- "@weavecode/templates": "^0.1.0",
23
+ "@weavecode/core": "^0.1.2",
24
+ "@weavecode/harness": "^0.1.2",
25
+ "@weavecode/templates": "^0.1.2",
26
26
  "chokidar": "^4.0.0",
27
27
  "selfsigned": "^5.5.0",
28
28
  "smol-toml": "^1.3.0",