@weavecode/weave 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
  2. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
  3. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/context.js +1 -1
  4. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/helper/css/common.js +3 -5
  5. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/hono-base.js +4 -10
  6. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/hono.js +0 -1
  7. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -1
  8. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +1 -1
  9. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/csrf/index.js +2 -2
  10. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +2 -2
  11. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +2 -2
  12. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/mount/index.js +4 -4
  13. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +13 -11
  14. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +4 -4
  15. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +39 -51
  16. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +15 -5
  17. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/utils/jwt/jwt.js +2 -1
  18. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/utils/mount.js +35 -0
  19. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/utils/url.js +10 -0
  20. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/validator/validator.js +1 -1
  21. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/context.js +1 -1
  22. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/helper/css/common.js +3 -5
  23. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/hono-base.js +4 -10
  24. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/hono.js +0 -1
  25. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/basic-auth/index.js +1 -1
  26. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/bearer-auth/index.js +1 -1
  27. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/csrf/index.js +2 -2
  28. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/jwk/jwk.js +2 -2
  29. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/jwt/jwt.js +2 -2
  30. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/language/language.js +1 -1
  31. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/mount/index.js +4 -4
  32. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/node.js +13 -11
  33. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +5 -5
  34. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/router.js +40 -52
  35. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/trie.js +15 -5
  36. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/middleware/mount/index.d.ts +1 -0
  37. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -3
  38. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +1 -1
  39. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/utils/mount.d.ts +4 -0
  40. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/utils/url.d.ts +1 -0
  41. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/utils/jwt/jwt.js +2 -1
  42. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/utils/mount.js +34 -0
  43. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/utils/url.js +10 -1
  44. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/validator/validator.js +1 -1
  45. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/package.json +1 -1
  46. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
  47. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
  48. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
  49. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
  50. package/node_modules/@weavecode/cli/dist/cli.js +3 -3
  51. package/node_modules/@weavecode/cli/dist/commands/chpass.js +1 -1
  52. package/node_modules/@weavecode/cli/dist/commands/daemon-auth.js +1 -1
  53. package/node_modules/@weavecode/cli/dist/commands/daemon.js +2 -2
  54. package/node_modules/@weavecode/cli/dist/commands/dashboard.js +2 -2
  55. package/node_modules/@weavecode/cli/dist/commands/doctor.js +1 -1
  56. package/node_modules/@weavecode/cli/dist/commands/init.js +1 -1
  57. package/node_modules/@weavecode/cli/dist/commands/msg.js +2 -2
  58. package/node_modules/@weavecode/cli/dist/commands/scan.js +1 -1
  59. package/node_modules/@weavecode/cli/dist/commands/status.js +2 -2
  60. package/node_modules/@weavecode/cli/dist/commands/uninstall.js +1 -1
  61. package/node_modules/@weavecode/cli/dist/i18n/dict/en.js +1 -1
  62. package/node_modules/@weavecode/cli/dist/i18n/dict/zh.d.ts +1 -0
  63. package/node_modules/@weavecode/cli/dist/i18n/dict/zh.js +2 -2
  64. package/node_modules/@weavecode/cli/dist/i18n/index.js +1 -1
  65. package/node_modules/@weavecode/cli/dist/i18n/t.js +1 -1
  66. package/node_modules/@weavecode/cli/dist/init/claudemd-gen.js +3 -3
  67. package/node_modules/@weavecode/cli/dist/init/executor.js +3 -3
  68. package/node_modules/@weavecode/cli/dist/init/git-commit.js +2 -2
  69. package/node_modules/@weavecode/cli/dist/init/harnesses/claude.js +7 -7
  70. package/node_modules/@weavecode/cli/dist/init/harnesses/codex.js +1 -1
  71. package/node_modules/@weavecode/cli/dist/init/instruction-link.js +1 -1
  72. package/node_modules/@weavecode/cli/dist/init/plugin-templates.js +1 -1
  73. package/node_modules/@weavecode/cli/dist/init/prompt.js +4 -4
  74. package/node_modules/@weavecode/cli/dist/init/provision.js +1 -1
  75. package/node_modules/@weavecode/cli/dist/init/uninstall.js +6 -6
  76. package/node_modules/@weavecode/cli/dist/init/wiring.js +1 -1
  77. package/node_modules/@weavecode/cli/dist/parser.js +1 -1
  78. package/node_modules/@weavecode/cli/dist/statusline/ansi.js +1 -1
  79. package/node_modules/@weavecode/cli/package.json +5 -5
  80. package/node_modules/@weavecode/core/dist/harness-checks.js +1 -1
  81. package/node_modules/@weavecode/core/dist/harness.d.ts +89 -0
  82. package/node_modules/@weavecode/core/dist/harness.js +1 -1
  83. package/node_modules/@weavecode/core/dist/index.d.ts +1 -1
  84. package/node_modules/@weavecode/core/dist/index.js +1 -1
  85. package/node_modules/@weavecode/core/dist/platform.js +1 -1
  86. package/node_modules/@weavecode/core/dist/types.js +1 -1
  87. package/node_modules/@weavecode/core/dist/utils/fs.js +1 -1
  88. package/node_modules/@weavecode/core/dist/utils/logger.js +1 -1
  89. package/node_modules/@weavecode/core/package.json +1 -1
  90. package/node_modules/@weavecode/harness/dist/claude/assets.js +4 -4
  91. package/node_modules/@weavecode/harness/dist/claude/capture.js +9 -9
  92. package/node_modules/@weavecode/harness/dist/claude/commands.d.ts +2 -0
  93. package/node_modules/@weavecode/harness/dist/claude/commands.js +3 -2
  94. package/node_modules/@weavecode/harness/dist/claude/config.js +2 -2
  95. package/node_modules/@weavecode/harness/dist/claude/detect.js +1 -1
  96. package/node_modules/@weavecode/harness/dist/claude/edits.js +1 -1
  97. package/node_modules/@weavecode/harness/dist/claude/event-source.js +1 -1
  98. package/node_modules/@weavecode/harness/dist/claude/images.js +2 -2
  99. package/node_modules/@weavecode/harness/dist/claude/index.js +1 -1
  100. package/node_modules/@weavecode/harness/dist/claude/liveness.js +1 -1
  101. package/node_modules/@weavecode/harness/dist/claude/mcp-gen.js +1 -1
  102. package/node_modules/@weavecode/harness/dist/claude/messaging.js +2 -2
  103. package/node_modules/@weavecode/harness/dist/claude/model-aliases.js +1 -1
  104. package/node_modules/@weavecode/harness/dist/claude/narration.js +1 -1
  105. package/node_modules/@weavecode/harness/dist/claude/peers.js +1 -1
  106. package/node_modules/@weavecode/harness/dist/claude/plan.js +1 -1
  107. package/node_modules/@weavecode/harness/dist/claude/plugins.js +4 -4
  108. package/node_modules/@weavecode/harness/dist/claude/prompt-inbox.js +1 -1
  109. package/node_modules/@weavecode/harness/dist/claude/prompt.js +3 -3
  110. package/node_modules/@weavecode/harness/dist/claude/questions.js +2 -2
  111. package/node_modules/@weavecode/harness/dist/claude/resume.js +1 -1
  112. package/node_modules/@weavecode/harness/dist/claude/rewind.js +1 -1
  113. package/node_modules/@weavecode/harness/dist/claude/settings-gen.js +1 -1
  114. package/node_modules/@weavecode/harness/dist/claude/side-question.js +2 -2
  115. package/node_modules/@weavecode/harness/dist/claude/statusline/generator.js +14 -14
  116. package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.js +1 -1
  117. package/node_modules/@weavecode/harness/dist/claude/statusline/surface.js +2 -2
  118. package/node_modules/@weavecode/harness/dist/claude/transcript-cursor.js +2 -2
  119. package/node_modules/@weavecode/harness/dist/claude/transcript.js +7 -7
  120. package/node_modules/@weavecode/harness/dist/codex/assets.js +1 -1
  121. package/node_modules/@weavecode/harness/dist/codex/capture.js +2 -2
  122. package/node_modules/@weavecode/harness/dist/codex/commands.js +4 -4
  123. package/node_modules/@weavecode/harness/dist/codex/config.js +2 -2
  124. package/node_modules/@weavecode/harness/dist/codex/detect.js +1 -1
  125. package/node_modules/@weavecode/harness/dist/codex/event-source.js +2 -2
  126. package/node_modules/@weavecode/harness/dist/codex/images.js +1 -1
  127. package/node_modules/@weavecode/harness/dist/codex/index.js +1 -1
  128. package/node_modules/@weavecode/harness/dist/codex/liveness.js +1 -1
  129. package/node_modules/@weavecode/harness/dist/codex/mcp.js +1 -1
  130. package/node_modules/@weavecode/harness/dist/codex/messaging.js +2 -2
  131. package/node_modules/@weavecode/harness/dist/codex/narration.js +1 -1
  132. package/node_modules/@weavecode/harness/dist/codex/plugin-state.js +1 -1
  133. package/node_modules/@weavecode/harness/dist/codex/plugins.js +3 -3
  134. package/node_modules/@weavecode/harness/dist/codex/provision.js +1 -1
  135. package/node_modules/@weavecode/harness/dist/codex/questions.js +2 -2
  136. package/node_modules/@weavecode/harness/dist/codex/rollout.js +5 -5
  137. package/node_modules/@weavecode/harness/dist/codex/side-question.js +4 -4
  138. package/node_modules/@weavecode/harness/dist/codex/titles.js +4 -4
  139. package/node_modules/@weavecode/harness/dist/codex/toml.js +13 -13
  140. package/node_modules/@weavecode/harness/dist/codex/transcript.js +2 -2
  141. package/node_modules/@weavecode/harness/dist/driver.d.ts +13 -0
  142. package/node_modules/@weavecode/harness/dist/driver.js +1 -1
  143. package/node_modules/@weavecode/harness/dist/init/generated.js +2 -2
  144. package/node_modules/@weavecode/harness/dist/init/pipeline.js +1 -1
  145. package/node_modules/@weavecode/harness/dist/registry-wiring.js +1 -1
  146. package/node_modules/@weavecode/harness/dist/shared/install-link.js +1 -1
  147. package/node_modules/@weavecode/harness/dist/shared/json-cap.js +1 -1
  148. package/node_modules/@weavecode/harness/package.json +2 -2
  149. package/node_modules/@weavecode/server/dist/config/dotted.js +1 -1
  150. package/node_modules/@weavecode/server/dist/config/profiles.js +2 -2
  151. package/node_modules/@weavecode/server/dist/daemon/ai-config.js +2 -2
  152. package/node_modules/@weavecode/server/dist/daemon/ai-context.js +6 -6
  153. package/node_modules/@weavecode/server/dist/daemon/ai-routes.js +4 -4
  154. package/node_modules/@weavecode/server/dist/daemon/api-log.js +3 -3
  155. package/node_modules/@weavecode/server/dist/daemon/auth-routes.js +1 -1
  156. package/node_modules/@weavecode/server/dist/daemon/auto-start.js +6 -6
  157. package/node_modules/@weavecode/server/dist/daemon/capture-routes.js +1 -1
  158. package/node_modules/@weavecode/server/dist/daemon/config-routes.js +1 -1
  159. package/node_modules/@weavecode/server/dist/daemon/cron.js +1 -1
  160. package/node_modules/@weavecode/server/dist/daemon/dashboard-auth.js +2 -2
  161. package/node_modules/@weavecode/server/dist/daemon/dashboard-pusher.js +1 -1
  162. package/node_modules/@weavecode/server/dist/daemon/data-bus.js +1 -1
  163. package/node_modules/@weavecode/server/dist/daemon/decision-config.js +2 -2
  164. package/node_modules/@weavecode/server/dist/daemon/dev-entry.js +1 -1
  165. package/node_modules/@weavecode/server/dist/daemon/entry.js +2 -2
  166. package/node_modules/@weavecode/server/dist/daemon/fs-browser.js +1 -1
  167. package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.js +1 -1
  168. package/node_modules/@weavecode/server/dist/daemon/hooks-routes.js +1 -1
  169. package/node_modules/@weavecode/server/dist/daemon/http.js +1 -1
  170. package/node_modules/@weavecode/server/dist/daemon/liveness.js +1 -1
  171. package/node_modules/@weavecode/server/dist/daemon/mcp-orchestration.js +1 -1
  172. package/node_modules/@weavecode/server/dist/daemon/narration-watcher.js +2 -2
  173. package/node_modules/@weavecode/server/dist/daemon/opener/backend-ghostty.js +1 -1
  174. package/node_modules/@weavecode/server/dist/daemon/opener/backend-iterm.js +1 -1
  175. package/node_modules/@weavecode/server/dist/daemon/opener/backend-konsole.js +2 -2
  176. package/node_modules/@weavecode/server/dist/daemon/opener/backend-terminal-app.js +1 -1
  177. package/node_modules/@weavecode/server/dist/daemon/opener/backend-wezterm.js +1 -1
  178. package/node_modules/@weavecode/server/dist/daemon/opener/backend-wt.js +1 -1
  179. package/node_modules/@weavecode/server/dist/daemon/opener/backend.js +1 -1
  180. package/node_modules/@weavecode/server/dist/daemon/opener/pty-terminals.js +4 -4
  181. package/node_modules/@weavecode/server/dist/daemon/opener/shared.js +1 -1
  182. package/node_modules/@weavecode/server/dist/daemon/opener/wezterm-mux.js +1 -1
  183. package/node_modules/@weavecode/server/dist/daemon/opener/wt.js +3 -3
  184. package/node_modules/@weavecode/server/dist/daemon/opener.js +1 -1
  185. package/node_modules/@weavecode/server/dist/daemon/pet-seed.d.ts +6 -0
  186. package/node_modules/@weavecode/server/dist/daemon/pet-seed.js +1 -0
  187. package/node_modules/@weavecode/server/dist/daemon/pet-window.d.ts +17 -0
  188. package/node_modules/@weavecode/server/dist/daemon/pet-window.js +2 -0
  189. package/node_modules/@weavecode/server/dist/daemon/port.js +1 -1
  190. package/node_modules/@weavecode/server/dist/daemon/project-files.d.ts +1 -1
  191. package/node_modules/@weavecode/server/dist/daemon/project-files.js +2 -2
  192. package/node_modules/@weavecode/server/dist/daemon/project-harnesses.js +2 -2
  193. package/node_modules/@weavecode/server/dist/daemon/project-updates-refresher.js +1 -1
  194. package/node_modules/@weavecode/server/dist/daemon/prompt-images.js +1 -1
  195. package/node_modules/@weavecode/server/dist/daemon/routes/hooks-admin.js +1 -1
  196. package/node_modules/@weavecode/server/dist/daemon/routes/market.js +1 -1
  197. package/node_modules/@weavecode/server/dist/daemon/routes/orchestration.js +1 -1
  198. package/node_modules/@weavecode/server/dist/daemon/routes/path-refs.js +1 -1
  199. package/node_modules/@weavecode/server/dist/daemon/routes/pets.d.ts +3 -0
  200. package/node_modules/@weavecode/server/dist/daemon/routes/pets.js +1 -0
  201. package/node_modules/@weavecode/server/dist/daemon/routes/project-files.js +1 -1
  202. package/node_modules/@weavecode/server/dist/daemon/routes/projects.js +1 -1
  203. package/node_modules/@weavecode/server/dist/daemon/routes/search.js +1 -1
  204. package/node_modules/@weavecode/server/dist/daemon/routes/session-control.js +1 -1
  205. package/node_modules/@weavecode/server/dist/daemon/routes/session-insights.js +1 -1
  206. package/node_modules/@weavecode/server/dist/daemon/routes/settings-statusline.js +1 -1
  207. package/node_modules/@weavecode/server/dist/daemon/routes/uploads.js +1 -1
  208. package/node_modules/@weavecode/server/dist/daemon/routes/visualizations.js +2 -1
  209. package/node_modules/@weavecode/server/dist/daemon/routes/watches.js +1 -1
  210. package/node_modules/@weavecode/server/dist/daemon/server.d.ts +2 -0
  211. package/node_modules/@weavecode/server/dist/daemon/server.js +8 -8
  212. package/node_modules/@weavecode/server/dist/daemon/session-open.d.ts +17 -0
  213. package/node_modules/@weavecode/server/dist/daemon/session-open.js +1 -1
  214. package/node_modules/@weavecode/server/dist/daemon/session-probe.js +1 -1
  215. package/node_modules/@weavecode/server/dist/daemon/settings.d.ts +21 -0
  216. package/node_modules/@weavecode/server/dist/daemon/settings.js +2 -2
  217. package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.js +1 -1
  218. package/node_modules/@weavecode/server/dist/daemon/sse-hub.js +1 -1
  219. package/node_modules/@weavecode/server/dist/daemon/start.js +1 -1
  220. package/node_modules/@weavecode/server/dist/daemon/state.js +2 -2
  221. package/node_modules/@weavecode/server/dist/daemon/static.js +1 -1
  222. package/node_modules/@weavecode/server/dist/daemon/terminal-topology-refresher.js +1 -1
  223. package/node_modules/@weavecode/server/dist/daemon/tls.js +1 -1
  224. package/node_modules/@weavecode/server/dist/daemon/toolkit-routes.js +1 -1
  225. package/node_modules/@weavecode/server/dist/daemon/upload-sessions.js +1 -1
  226. package/node_modules/@weavecode/server/dist/db/db.d.ts +4 -1
  227. package/node_modules/@weavecode/server/dist/db/db.js +2 -2
  228. package/node_modules/@weavecode/server/dist/db/layout.js +1 -1
  229. package/node_modules/@weavecode/server/dist/db/paths.d.ts +4 -0
  230. package/node_modules/@weavecode/server/dist/db/paths.js +1 -1
  231. package/node_modules/@weavecode/server/dist/hooks/answer-keys.js +1 -1
  232. package/node_modules/@weavecode/server/dist/hooks/bus.js +1 -1
  233. package/node_modules/@weavecode/server/dist/hooks/dashboard-rate.js +1 -1
  234. package/node_modules/@weavecode/server/dist/hooks/decision-judge.js +1 -1
  235. package/node_modules/@weavecode/server/dist/hooks/delivery/ack-gate.js +1 -1
  236. package/node_modules/@weavecode/server/dist/hooks/delivery/channels.js +1 -1
  237. package/node_modules/@weavecode/server/dist/hooks/delivery/keys.js +1 -1
  238. package/node_modules/@weavecode/server/dist/hooks/delivery/queue.js +1 -1
  239. package/node_modules/@weavecode/server/dist/hooks/delivery/relay.js +1 -1
  240. package/node_modules/@weavecode/server/dist/hooks/delivery/send.js +2 -2
  241. package/node_modules/@weavecode/server/dist/hooks/delivery/views.d.ts +3 -1
  242. package/node_modules/@weavecode/server/dist/hooks/delivery/views.js +1 -1
  243. package/node_modules/@weavecode/server/dist/hooks/dispatcher.js +6 -6
  244. package/node_modules/@weavecode/server/dist/hooks/edge-extract.js +1 -1
  245. package/node_modules/@weavecode/server/dist/hooks/handlers/webhook.js +1 -1
  246. package/node_modules/@weavecode/server/dist/hooks/headless-runner.js +2 -2
  247. package/node_modules/@weavecode/server/dist/hooks/inbox-socket.js +2 -2
  248. package/node_modules/@weavecode/server/dist/hooks/inbox-worker.js +3 -3
  249. package/node_modules/@weavecode/server/dist/hooks/match.js +1 -1
  250. package/node_modules/@weavecode/server/dist/hooks/message-deliverer.js +5 -5
  251. package/node_modules/@weavecode/server/dist/hooks/mirror.js +4 -4
  252. package/node_modules/@weavecode/server/dist/hooks/orchestration-engine.js +7 -7
  253. package/node_modules/@weavecode/server/dist/hooks/orchestration-graph.js +1 -1
  254. package/node_modules/@weavecode/server/dist/hooks/plugin-installer.js +3 -3
  255. package/node_modules/@weavecode/server/dist/hooks/plugin-loader.js +1 -1
  256. package/node_modules/@weavecode/server/dist/hooks/plugin-project-state.js +1 -1
  257. package/node_modules/@weavecode/server/dist/hooks/prompt-flusher.js +1 -1
  258. package/node_modules/@weavecode/server/dist/hooks/promptbox.js +8 -8
  259. package/node_modules/@weavecode/server/dist/hooks/push-notify.js +2 -2
  260. package/node_modules/@weavecode/server/dist/hooks/question-tracker.js +1 -1
  261. package/node_modules/@weavecode/server/dist/hooks/registry.js +1 -1
  262. package/node_modules/@weavecode/server/dist/hooks/resume-runner.js +1 -1
  263. package/node_modules/@weavecode/server/dist/hooks/session-purge.js +1 -1
  264. package/node_modules/@weavecode/server/dist/hooks/side-questions.js +1 -1
  265. package/node_modules/@weavecode/server/dist/hooks/synthetic-sessions.js +1 -1
  266. package/node_modules/@weavecode/server/dist/hooks/toolkit-scan.js +1 -1
  267. package/node_modules/@weavecode/server/dist/hooks/toolkit.js +5 -5
  268. package/node_modules/@weavecode/server/dist/hooks/watch-engine.js +1 -1
  269. package/node_modules/@weavecode/server/dist/index.d.ts +1 -1
  270. package/node_modules/@weavecode/server/dist/index.js +1 -1
  271. package/node_modules/@weavecode/server/dist/install/apply-update.js +1 -1
  272. package/node_modules/@weavecode/server/dist/install/capabilities.js +1 -1
  273. package/node_modules/@weavecode/server/dist/install/codex-toml.js +1 -1
  274. package/node_modules/@weavecode/server/dist/install/file-assets.js +1 -1
  275. package/node_modules/@weavecode/server/dist/install/fingerprint.js +1 -1
  276. package/node_modules/@weavecode/server/dist/install/global-config.js +1 -1
  277. package/node_modules/@weavecode/server/dist/install/global-file-assets.js +1 -1
  278. package/node_modules/@weavecode/server/dist/install/init-files.js +2 -2
  279. package/node_modules/@weavecode/server/dist/install/install-ledger.js +1 -1
  280. package/node_modules/@weavecode/server/dist/install/installer.js +1 -1
  281. package/node_modules/@weavecode/server/dist/install/library-index.js +1 -1
  282. package/node_modules/@weavecode/server/dist/install/mcp-rows.js +1 -1
  283. package/node_modules/@weavecode/server/dist/install/plugin-install.js +1 -1
  284. package/node_modules/@weavecode/server/dist/install/plugin-rows.js +1 -1
  285. package/node_modules/@weavecode/server/dist/install/plugin-templates.js +1 -1
  286. package/node_modules/@weavecode/server/dist/install/project-config.js +1 -1
  287. package/node_modules/@weavecode/server/dist/install/reader.js +1 -1
  288. package/node_modules/@weavecode/server/dist/install/scan-cache.js +1 -1
  289. package/node_modules/@weavecode/server/dist/install/scanner.js +1 -1
  290. package/node_modules/@weavecode/server/dist/install/settings-mcp.js +2 -2
  291. package/node_modules/@weavecode/server/dist/install/updates.js +1 -1
  292. package/node_modules/@weavecode/server/dist/market/builtin.js +1 -1
  293. package/node_modules/@weavecode/server/dist/market/identity.js +1 -1
  294. package/node_modules/@weavecode/server/dist/market/import.js +2 -2
  295. package/node_modules/@weavecode/server/dist/market/refresh.js +1 -1
  296. package/node_modules/@weavecode/server/dist/market/resolve.js +1 -1
  297. package/node_modules/@weavecode/server/dist/market/updates.js +1 -1
  298. package/node_modules/@weavecode/server/dist/registry.js +2 -2
  299. package/node_modules/@weavecode/server/dist/repositories/hook-dispatches.js +5 -5
  300. package/node_modules/@weavecode/server/dist/repositories/hook-events.d.ts +6 -0
  301. package/node_modules/@weavecode/server/dist/repositories/hook-events.js +8 -5
  302. package/node_modules/@weavecode/server/dist/repositories/hook-rules.js +4 -4
  303. package/node_modules/@weavecode/server/dist/repositories/libraries.js +1 -1
  304. package/node_modules/@weavecode/server/dist/repositories/orchestrations.js +7 -7
  305. package/node_modules/@weavecode/server/dist/repositories/plugin-states.js +1 -1
  306. package/node_modules/@weavecode/server/dist/repositories/projects.js +2 -2
  307. package/node_modules/@weavecode/server/dist/repositories/push-subscriptions.js +2 -2
  308. package/node_modules/@weavecode/server/dist/repositories/session-watches.js +4 -4
  309. package/node_modules/@weavecode/server/dist/repositories/sessions.js +2 -2
  310. package/node_modules/@weavecode/server/dist/repositories/uploads.js +11 -11
  311. package/node_modules/@weavecode/server/dist/statusline/cache-sweeper.js +1 -1
  312. package/node_modules/@weavecode/server/dist/statusline/generator.js +1 -1
  313. package/node_modules/@weavecode/server/dist/statusline/manager.js +3 -3
  314. package/node_modules/@weavecode/server/dist/surfaces.js +1 -1
  315. package/node_modules/@weavecode/server/dist/watch/cache.js +1 -1
  316. package/node_modules/@weavecode/server/dist/watch/classifier.js +1 -1
  317. package/node_modules/@weavecode/server/dist/watch/plugin-mods.js +1 -1
  318. package/node_modules/@weavecode/server/dist/watch/sync-scheduler.js +1 -1
  319. package/node_modules/@weavecode/server/dist/watch/watch-service.js +1 -1
  320. package/node_modules/@weavecode/server/package.json +4 -4
  321. package/node_modules/@weavecode/server/web/dist/assets/abnfDiagram-WEYOIA3C-t5OQjhuS.js +1 -0
  322. package/node_modules/@weavecode/server/web/dist/assets/{arc-DH8-rYAa.js → arc-De-uH_Q9.js} +1 -1
  323. package/node_modules/@weavecode/server/web/dist/assets/architectureDiagram-ZHVYKT53-ImPclD43.js +36 -0
  324. package/node_modules/@weavecode/server/web/dist/assets/{blockDiagram-RJAE7QA3-pT5eO-cB.js → blockDiagram-RJAE7QA3-B5xEQs6X.js} +2 -2
  325. package/node_modules/@weavecode/server/web/dist/assets/{c4Diagram-XDPPPE54-DHDBDMb1.js → c4Diagram-XDPPPE54-DP8MjIgJ.js} +2 -2
  326. package/node_modules/@weavecode/server/web/dist/assets/channel-C0RGiobt.js +1 -0
  327. package/node_modules/@weavecode/server/web/dist/assets/{chunk-2E7WHVMD-CT951PH5.js → chunk-2E7WHVMD-C3UFIDyj.js} +1 -1
  328. package/node_modules/@weavecode/server/web/dist/assets/{chunk-2Q5K7J3B-E5AD7_ZY.js → chunk-2Q5K7J3B-Bgw-3YfG.js} +1 -1
  329. package/node_modules/@weavecode/server/web/dist/assets/{chunk-4EMNKR2T-DWz9qkcy.js → chunk-4EMNKR2T-Dy_Wq9qn.js} +1 -1
  330. package/node_modules/@weavecode/server/web/dist/assets/chunk-55XCU76K-D32C0DXX.js +1 -0
  331. package/node_modules/@weavecode/server/web/dist/assets/{chunk-5VM5RSS4-ci6YzbO5.js → chunk-5VM5RSS4-Dpmi-9Gi.js} +1 -1
  332. package/node_modules/@weavecode/server/web/dist/assets/{chunk-JWPE2WC7-CY4mr2f4.js → chunk-JWPE2WC7-CEYXaZDX.js} +1 -1
  333. package/node_modules/@weavecode/server/web/dist/assets/{chunk-VQ5W62QI-CON8zyg8.js → chunk-VQ5W62QI-A616Pgzo.js} +1 -1
  334. package/node_modules/@weavecode/server/web/dist/assets/chunk-XXDRQBXY-CnxFMLWV.js +1 -0
  335. package/node_modules/@weavecode/server/web/dist/assets/chunk-ZCHMQSOR-BhjCTig8.js +2 -0
  336. package/node_modules/@weavecode/server/web/dist/assets/{classDiagram-v2-4MYWR3UA-GiWZ9xtF.js → classDiagram-v2-4MYWR3UA-rzlq5tPv.js} +2 -2
  337. package/node_modules/@weavecode/server/web/dist/assets/cose-bilkent-JH36ORCC-CxWQXzj8.js +1 -0
  338. package/node_modules/@weavecode/server/web/dist/assets/{cynefin-EF2NZ3EQ-9B__MaRM.js → cynefin-EF2NZ3EQ-AFHjx2wU.js} +1 -1
  339. package/node_modules/@weavecode/server/web/dist/assets/cynefinDiagram-WF24UDRP-Bp_Oaf9U.js +62 -0
  340. package/node_modules/@weavecode/server/web/dist/assets/dagre-NK4GIZVX-7oUPIU35.js +4 -0
  341. package/node_modules/@weavecode/server/web/dist/assets/diagram-CBK3MWTC-D_rS_rSY.js +24 -0
  342. package/node_modules/@weavecode/server/web/dist/assets/diagram-I5XIIV2D-Duc_cKMb.js +24 -0
  343. package/node_modules/@weavecode/server/web/dist/assets/{diagram-ODIL2UCW-CckywF4W.js → diagram-ODIL2UCW-DA0XFVXm.js} +2 -2
  344. package/node_modules/@weavecode/server/web/dist/assets/{diagram-PFBEJUXE-Dpjlc7Wh.js → diagram-PFBEJUXE-D1U0Xhtt.js} +2 -2
  345. package/node_modules/@weavecode/server/web/dist/assets/diagram-RJA3I4VV-CbDFY871.js +41 -0
  346. package/node_modules/@weavecode/server/web/dist/assets/{diagram-TYUNFSNR-DgRJ3zL1.js → diagram-TYUNFSNR-jPg9AxQv.js} +2 -2
  347. package/node_modules/@weavecode/server/web/dist/assets/ebnfDiagram-V4P3TTPT-ZHfGTB0N.js +1 -0
  348. package/node_modules/@weavecode/server/web/dist/assets/{elk-QONTBCTQ-Ch6Gs9G9.js → elk-QONTBCTQ-C-ESJrUi.js} +3 -3
  349. package/node_modules/@weavecode/server/web/dist/assets/{erDiagram-KYQIGQAA-COxT-Pxb.js → erDiagram-KYQIGQAA-DGK7TeHj.js} +2 -2
  350. package/node_modules/@weavecode/server/web/dist/assets/{flowDiagram-IUGLLWBU-CJVWnTBa.js → flowDiagram-IUGLLWBU-CVV4rL8v.js} +1 -1
  351. package/node_modules/@weavecode/server/web/dist/assets/ganttDiagram-R7GPNTJY-CuAwNvbm.js +292 -0
  352. package/node_modules/@weavecode/server/web/dist/assets/gitGraphDiagram-PDYL7XHY-D_15Wtf-.js +106 -0
  353. package/node_modules/@weavecode/server/web/dist/assets/infoDiagram-MVDRKAX5-ClqhbrCa.js +2 -0
  354. package/node_modules/@weavecode/server/web/dist/assets/{ishikawaDiagram-HPEHV2GE-BNjEDIZy.js → ishikawaDiagram-HPEHV2GE-CUJ891JX.js} +2 -2
  355. package/node_modules/@weavecode/server/web/dist/assets/{journeyDiagram-BOSHW7O7-Cao6h91a.js → journeyDiagram-BOSHW7O7-B4skiMu-.js} +2 -2
  356. package/node_modules/@weavecode/server/web/dist/assets/{kanban-definition-FNSA4HC5-CXIx2CHQ.js → kanban-definition-FNSA4HC5-UNGJR_y_.js} +2 -2
  357. package/node_modules/@weavecode/server/web/dist/assets/linear-BEB-UwbR.js +1 -0
  358. package/node_modules/@weavecode/server/web/dist/assets/main-B_0jS_Gz.js +1096 -0
  359. package/node_modules/@weavecode/server/web/dist/assets/main-Czzlavi4.css +11 -0
  360. package/node_modules/@weavecode/server/web/dist/assets/{mermaid.core-D39fi_iR.js → mermaid.core-knGXJfjz.js} +4 -4
  361. package/node_modules/@weavecode/server/web/dist/assets/{mindmap-definition-6OY57UG3-DHqpz_AK.js → mindmap-definition-6OY57UG3-CEldbr3a.js} +2 -2
  362. package/node_modules/@weavecode/server/web/dist/assets/modulepreload-polyfill-B5Qt9EMX.js +1 -0
  363. package/node_modules/@weavecode/server/web/dist/assets/pegDiagram-ECIUJNBX-cNCkGLx3.js +1 -0
  364. package/node_modules/@weavecode/server/web/dist/assets/pet-DJCpIDM5.js +1 -0
  365. package/node_modules/@weavecode/server/web/dist/assets/pieDiagram-GNMPY74T-CfMEFiQD.js +39 -0
  366. package/node_modules/@weavecode/server/web/dist/assets/{quadrantDiagram-D57K4MC3-zSM6o7mB.js → quadrantDiagram-D57K4MC3-knmi2rwP.js} +4 -4
  367. package/node_modules/@weavecode/server/web/dist/assets/railroadDiagram-Y72NRBL7-BJ7AzhEo.js +1 -0
  368. package/node_modules/@weavecode/server/web/dist/assets/{requirementDiagram-EQYSW5RA-CbCLBjHf.js → requirementDiagram-EQYSW5RA-Dte2LGQM.js} +2 -2
  369. package/node_modules/@weavecode/server/web/dist/assets/{sankeyDiagram-SY24JHO5-BucVk6EP.js → sankeyDiagram-SY24JHO5-3noLaWgd.js} +2 -2
  370. package/node_modules/@weavecode/server/web/dist/assets/{sequenceDiagram-BLEHNHQU-Dg8CYEnT.js → sequenceDiagram-BLEHNHQU-CclOWTTc.js} +2 -2
  371. package/node_modules/@weavecode/server/web/dist/assets/sizeCapture-INFHLROL-B82sbLhA.js +1 -0
  372. package/node_modules/@weavecode/server/web/dist/assets/{stateDiagram-v2-A6IESKWZ-BvK2l3is.js → stateDiagram-v2-A6IESKWZ-BXfVDwSN.js} +2 -2
  373. package/node_modules/@weavecode/server/web/dist/assets/swimlanes-B3ENRKFQ-D4lKZaeV.js +1 -0
  374. package/node_modules/@weavecode/server/web/dist/assets/swimlanesDiagram-AYQRV4AK-DbdFh_d6.js +8 -0
  375. package/node_modules/@weavecode/server/web/dist/assets/{timeline-definition-JXYKGLGB-CadU4Qq4.js → timeline-definition-JXYKGLGB-D6H6zP5b.js} +2 -2
  376. package/node_modules/@weavecode/server/web/dist/assets/{usecaseDiagram-WPOLBNNX-BYuZwTDZ.js → usecaseDiagram-WPOLBNNX-D2J2bKo_.js} +2 -2
  377. package/node_modules/@weavecode/server/web/dist/assets/{vennDiagram-Q3Y3IDCW-C7zgxe07.js → vennDiagram-Q3Y3IDCW-pdRbIkpB.js} +2 -2
  378. package/node_modules/@weavecode/server/web/dist/assets/{wardleyDiagram-IVAIDKWA-DA4Otf4s.js → wardleyDiagram-IVAIDKWA-Cyd2QPMf.js} +2 -2
  379. package/node_modules/@weavecode/server/web/dist/assets/{xychartDiagram-4URNHDU4-Bs5YGwMU.js → xychartDiagram-4URNHDU4-Bd4BkwVM.js} +2 -2
  380. package/node_modules/@weavecode/server/web/dist/icons/apple-touch-icon.png +0 -0
  381. package/node_modules/@weavecode/server/web/dist/icons/icon-192.png +0 -0
  382. package/node_modules/@weavecode/server/web/dist/icons/icon-512.png +0 -0
  383. package/node_modules/@weavecode/server/web/dist/icons/icon-maskable-512.png +0 -0
  384. package/node_modules/@weavecode/server/web/dist/index.html +12 -2
  385. package/node_modules/@weavecode/server/web/dist/manifest.webmanifest +16 -0
  386. package/node_modules/@weavecode/server/web/dist/pet.html +60 -0
  387. package/node_modules/@weavecode/templates/dist/index.d.ts +2 -0
  388. package/node_modules/@weavecode/templates/dist/index.js +1 -1
  389. package/node_modules/@weavecode/templates/dist/resources/pets/weave-spider/pet.json +7 -0
  390. package/node_modules/@weavecode/templates/dist/resources/pets/weave-spider/spritesheet.png +0 -0
  391. package/node_modules/@weavecode/templates/dist/resources/weave-market/.claude-plugin/marketplace.json +6 -0
  392. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/.claude-plugin/plugin.json +8 -0
  393. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/skills/weave-pet-hatcher/SKILL.md +121 -0
  394. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/skills/weave-pet-hatcher/scripts/assemble-pet.mjs +308 -0
  395. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/weave.json +4 -0
  396. package/node_modules/@weavecode/templates/package.json +2 -2
  397. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/tslib/README.md +3 -8
  398. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/tslib/package.json +1 -1
  399. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/tslib/tslib.d.ts +4 -2
  400. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/tslib/tslib.es6.js +10 -1
  401. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/tslib/tslib.es6.mjs +10 -1
  402. package/node_modules/selfsigned/node_modules/@peculiar/x509/node_modules/tslib/tslib.js +10 -1
  403. package/node_modules/selfsigned/node_modules/pkijs/node_modules/tslib/README.md +3 -8
  404. package/node_modules/selfsigned/node_modules/pkijs/node_modules/tslib/package.json +1 -1
  405. package/node_modules/selfsigned/node_modules/pkijs/node_modules/tslib/tslib.d.ts +4 -2
  406. package/node_modules/selfsigned/node_modules/pkijs/node_modules/tslib/tslib.es6.js +10 -1
  407. package/node_modules/selfsigned/node_modules/pkijs/node_modules/tslib/tslib.es6.mjs +10 -1
  408. package/node_modules/selfsigned/node_modules/pkijs/node_modules/tslib/tslib.js +10 -1
  409. package/package.json +11 -7
  410. package/scripts/preinstall.mjs +70 -0
  411. package/node_modules/@weavecode/server/web/dist/assets/abnfDiagram-WEYOIA3C-CbIFQh0R.js +0 -1
  412. package/node_modules/@weavecode/server/web/dist/assets/architectureDiagram-ZHVYKT53-qnv6S0sc.js +0 -36
  413. package/node_modules/@weavecode/server/web/dist/assets/channel-BHPeeuzN.js +0 -1
  414. package/node_modules/@weavecode/server/web/dist/assets/chunk-55XCU76K-D-SgWD8w.js +0 -1
  415. package/node_modules/@weavecode/server/web/dist/assets/chunk-XXDRQBXY-DXXXZ4pW.js +0 -1
  416. package/node_modules/@weavecode/server/web/dist/assets/chunk-ZCHMQSOR-CukvPvkM.js +0 -2
  417. package/node_modules/@weavecode/server/web/dist/assets/cose-bilkent-JH36ORCC-D7aJ-akq.js +0 -1
  418. package/node_modules/@weavecode/server/web/dist/assets/cynefinDiagram-WF24UDRP-B2ujZh2k.js +0 -62
  419. package/node_modules/@weavecode/server/web/dist/assets/dagre-NK4GIZVX-nHaB6IWf.js +0 -4
  420. package/node_modules/@weavecode/server/web/dist/assets/diagram-CBK3MWTC-xKfjDvgr.js +0 -24
  421. package/node_modules/@weavecode/server/web/dist/assets/diagram-I5XIIV2D-BHT2-5mY.js +0 -24
  422. package/node_modules/@weavecode/server/web/dist/assets/diagram-RJA3I4VV-M6WznOaW.js +0 -41
  423. package/node_modules/@weavecode/server/web/dist/assets/ebnfDiagram-V4P3TTPT-BzzVN__a.js +0 -1
  424. package/node_modules/@weavecode/server/web/dist/assets/ganttDiagram-R7GPNTJY-BkRpWPUl.js +0 -292
  425. package/node_modules/@weavecode/server/web/dist/assets/gitGraphDiagram-PDYL7XHY-Ba8BJcvZ.js +0 -106
  426. package/node_modules/@weavecode/server/web/dist/assets/index-CtifxEiF.css +0 -11
  427. package/node_modules/@weavecode/server/web/dist/assets/index-FwH9INgS.js +0 -1090
  428. package/node_modules/@weavecode/server/web/dist/assets/infoDiagram-MVDRKAX5-HTQ5FUNK.js +0 -2
  429. package/node_modules/@weavecode/server/web/dist/assets/linear-65WmlvQb.js +0 -1
  430. package/node_modules/@weavecode/server/web/dist/assets/pegDiagram-ECIUJNBX-Cpy1nsER.js +0 -1
  431. package/node_modules/@weavecode/server/web/dist/assets/pieDiagram-GNMPY74T-B1IyNqzr.js +0 -39
  432. package/node_modules/@weavecode/server/web/dist/assets/railroadDiagram-Y72NRBL7-oM4XJIwA.js +0 -1
  433. package/node_modules/@weavecode/server/web/dist/assets/sizeCapture-INFHLROL-C51zb7Oc.js +0 -1
  434. package/node_modules/@weavecode/server/web/dist/assets/swimlanes-B3ENRKFQ-Ds7QOfXW.js +0 -1
  435. package/node_modules/@weavecode/server/web/dist/assets/swimlanesDiagram-AYQRV4AK-ByBF02UJ.js +0 -8
@@ -1,3 +1,3 @@
1
- import{readFile as f,writeFile as p,mkdir as d}from"node:fs/promises";import{homedir as h}from"node:os";import s from"node:path";import{DEFAULT_STATUSLINE_CONFIG as a,LEGACY_IDENTITY_LINE as C,LEGACY_METRICS_LINE as x,NAMED_COLORS as v,SEGMENT_ORDER as b}from"./config.js";import{generateStatuslineScript as j,statuslineCacheDir as N}from"./generator.js";import{statuslineSurfaceFor as E}from"../surfaces.js";const w=".weave",y="statusline.json",S="statusline.json",l=E("claude");export function statuslineScriptRelPath(){return l.scriptRelPath}let u=s.join(h(),".weave");export function setGlobalStatuslineDir(e){u=e}export async function readGlobalStatuslineConfig(){try{const e=await f(s.join(u,S),"utf-8");return{...c(JSON.parse(e)),source:"global"}}catch{return a}}export async function writeGlobalStatuslineConfig(e){await d(u,{recursive:!0});const t={...c(e),source:"global"};await p(s.join(u,S),`${JSON.stringify(t,null,2)}
2
- `,"utf-8")}export async function readStatuslineConfig(e){const t=await readGlobalStatuslineConfig();try{const r=await f(s.join(e,w,y),"utf-8"),n=JSON.parse(r);return n.source==="custom"?c(n):t}catch{return t}}export async function writeStatuslineConfig(e,t){const r=s.join(e,w);await d(r,{recursive:!0});const n=(t.source??"global")==="global"?{source:"global"}:c(t);await p(s.join(r,y),`${JSON.stringify(n,null,2)}
3
- `,"utf-8")}export async function writeStatuslineScript(e,t){const r=s.join(e,l.scriptRelPath);return await d(s.dirname(r),{recursive:!0}),await p(r,t,"utf-8"),r}export async function readStatuslineScript(e){try{return await f(s.join(e,l.scriptRelPath),"utf-8")}catch{return""}}export function readStatuslineFacts(e){return l.facts?.(N(),e)??null}export async function ensureSettingsStatusLine(e,t=30){await l.wire(e,{scriptPath:s.join(e,l.scriptRelPath),refreshInterval:t})}export async function applyStatuslineConfig(e,t){await writeStatuslineConfig(e,t);const r=(t.source??"global")==="global"?await readGlobalStatuslineConfig():c(t),n=j(r);await writeStatuslineScript(e,n),await ensureSettingsStatusLine(e,r.refreshInterval)}function I(e){let t,r=!1;if(e.lines?.length)t=e.lines.map(o=>[...o]);else if(e.order?.length){r=!0;const o=e.order;e.layout==="multi"?t=[C.filter(i=>o.includes(i)),x.filter(i=>o.includes(i))].filter(i=>i.length>0):t=[o]}else r=!0,t=a.lines.map(o=>[...o]);const n=new Set;if(t=t.map(o=>o.filter(i=>!b.includes(i)||n.has(i)?!1:(n.add(i),!0))),t.length===0&&(t=[[]]),r){const o=b.filter(i=>{if(n.has(i))return!1;const m=e.segments?.[i];return typeof m?.enabled=="boolean"?m.enabled:a.segments[i].enabled});o.length&&(t[0]=[...t[0],...o])}return t}const $=/^#[0-9a-fA-F]{6}$/,L=/^#([0-9a-fA-F]{3})$/,_=/^ansi256:(\d{1,3})$/;function g(e,t){if(typeof e!="string")return t;if(v.includes(e))return e;const r=_.exec(e);if(r){const o=Number(r[1]);return o>=0&&o<=255?`ansi256:${o}`:t}if($.test(e))return e.toLowerCase();const n=L.exec(e);if(n){const[,o]=n;return`#${o[0]}${o[0]}${o[1]}${o[1]}${o[2]}${o[2]}`.toLowerCase()}return t}function F(e,t){if(!e||typeof e!="object")return{...t};const r=e,n={...t,...r,color:g(r.color,t.color),backgroundColor:r.backgroundColor==null?null:g(r.backgroundColor,t.backgroundColor??"gray")};return(typeof r.label!="string"||r.label==="")&&delete n.label,(typeof r.format!="string"||r.format==="")&&delete n.format,r.metric!=="session"&&r.metric!=="context"&&delete n.metric,r.window!=="five_hour"&&r.window!=="seven_day"&&r.window!=="spend"&&delete n.window,n}function T(e){const t=a.bar;if(!e||typeof e!="object")return{...t};const r=e,n=Math.round(Number(r.cells));return{cells:Number.isFinite(n)?Math.max(1,Math.min(40,n)):t.cells,fill:typeof r.fill=="string"&&r.fill!==""?r.fill:t.fill,empty:typeof r.empty=="string"&&r.empty!==""?r.empty:t.empty}}function c(e){const t={...a.segments};for(const n of Object.keys(t))t[n]=F(e.segments?.[n],t[n]);const r=e.refreshInterval;return{separator:e.separator??a.separator,align:e.align??a.align,logoText:a.logoText,logoColor:g(e.logoColor,a.logoColor),powerline:{...e.powerline,enabled:e.powerline?.enabled??a.powerline.enabled},lines:I(e),refreshInterval:r!=null&&r>=1?r:a.refreshInterval,source:e.source??a.source,bar:T(e.bar),divider:typeof e.divider=="string"?e.divider:a.divider,labelSeparator:typeof e.labelSeparator=="string"?e.labelSeparator:a.labelSeparator,segments:t}}
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 +1 @@
1
- import{createRuntimeRegistry as n}from"@weavecode/harness";const e=n();export function assetSurfaceFor(r){const t=e.get(r)?.assets;if(!t)throw new Error(`no asset surface registered for harness: ${r}`);return t}export function assetSurfaces(){return e.all().map(r=>r.assets).filter(r=>r!==void 0)}export function pluginSurfaceFor(r){const t=e.get(r)?.plugins;if(!t)throw new Error(`no plugin surface registered for harness: ${r}`);return t}export function pluginSurfaces(){return e.all().filter(r=>r.plugins!==void 0).map(r=>({harness:r.id,surface:r.plugins}))}export function pluginStateFor(r){const t=e.get(r)?.pluginState;if(!t)throw new Error(`no plugin state surface registered for harness: ${r}`);return t}export function pluginStateSurfaces(){return e.all().filter(r=>r.pluginState!==void 0).map(r=>({harness:r.id,state:r.pluginState}))}export function messagingSurfaceFor(r){const t=e.get(r)?.messaging;if(!t)throw new Error(`no messaging surface registered for harness: ${r}`);return t}export function messagingSurfaces(){return e.all().filter(r=>r.messaging!==void 0).map(r=>({harness:r.id,surface:r.messaging}))}export function captureSurfaces(){return e.all().filter(r=>r.capture!==void 0).map(r=>({harness:r.id,surface:r.capture}))}export function blockingPromptFor(r){return e.get(r)?.questions??null}export function statuslineSurfaceFor(r){return e.get(r)?.statusline??null}export function statuslineSurfaces(){return e.all().filter(r=>r.statusline!==void 0).map(r=>({harness:r.id,surface:r.statusline}))}export function configSurfaceFor(r){return e.get(r)?.config??null}export function editSurfaceFor(r){return e.get(r)?.edits??null}export function imagesSurfaceFor(r){return e.get(r)?.images??null}export function narrationSurfaceFor(r){return e.get(r)?.narration??null}export function rewindSurfaceFor(r){return e.get(r)?.rewind??null}export function commandsSurfaceFor(r){return e.get(r)?.commands??null}export function configSurfaces(){return e.all().filter(r=>r.config!==void 0).map(r=>({harness:r.id,surface:r.config}))}export function sessionTitleSurfaceFor(r){return e.get(r)?.titles??null}
1
+ import{createRuntimeRegistry as t}from"@weavecode/harness";const r=t();export function assetSurfaceFor(e){const n=r.get(e)?.assets;if(!n)throw new Error(`no asset surface registered for harness: ${e}`);return n}export function assetSurfaces(){return r.all().map(e=>e.assets).filter(e=>e!==void 0)}export function pluginSurfaceFor(e){const n=r.get(e)?.plugins;if(!n)throw new Error(`no plugin surface registered for harness: ${e}`);return n}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 n=r.get(e)?.pluginState;if(!n)throw new Error(`no plugin state surface registered for harness: ${e}`);return n}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 n=r.get(e)?.messaging;if(!n)throw new Error(`no messaging surface registered for harness: ${e}`);return n}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}))}export function configSurfaceFor(e){return r.get(e)?.config??null}export function editSurfaceFor(e){return r.get(e)?.edits??null}export function imagesSurfaceFor(e){return r.get(e)?.images??null}export function narrationSurfaceFor(e){return r.get(e)?.narration??null}export function rewindSurfaceFor(e){return r.get(e)?.rewind??null}export function commandsSurfaceFor(e){return r.get(e)?.commands??null}export function configSurfaces(){return r.all().filter(e=>e.config!==void 0).map(e=>({harness:e.id,surface:e.config}))}export function sessionTitleSurfaceFor(e){return r.get(e)?.titles??null}
@@ -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/")||t.startsWith(".agents/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/")||t.startsWith(".agents/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}}
@@ -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{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(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(i)try{o(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 h(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.6",
3
+ "version": "0.1.8",
4
4
  "description": "Weave daemon — HTTP server, SQLite data layer, and hook ingestion",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,9 +21,9 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@modelcontextprotocol/sdk": "1.32.1",
24
- "@weavecode/core": "^0.1.6",
25
- "@weavecode/harness": "^0.1.6",
26
- "@weavecode/templates": "^0.1.6",
24
+ "@weavecode/core": "^0.1.8",
25
+ "@weavecode/harness": "^0.1.8",
26
+ "@weavecode/templates": "^0.1.8",
27
27
  "chokidar": "^4.0.0",
28
28
  "selfsigned": "^5.5.0",
29
29
  "smol-toml": "^1.3.0",
@@ -0,0 +1 @@
1
+ import{g as p,r as u,d as a}from"./chunk-2E7WHVMD-C3UFIDyj.js";import{p as f}from"./chunk-JWPE2WC7-CEYXaZDX.js";import{_ as n,l as o}from"./mermaid.core-knGXJfjz.js";import"./main-B_0jS_Gz.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-AFHjx2wU.js";import"./modulepreload-polyfill-B5Qt9EMX.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
@@ -1 +1 @@
1
- import{a5 as ln,a6 as an,a7 as H,a8 as j,a9 as B,aa as un,ab as g,ac as tn,ad as L,ae as _,af as rn,ag as o,ah as on,ai as sn,aj as fn}from"./mermaid.core-D39fi_iR.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,q,v,A,C,a){var I=E-l,i=q-h,n=C-v,d=a-A,u=d*I-n*i;if(!(u*u<g))return u=(n*(h-A)-d*(l-v))/u,[l+u*I,h+u*i]}function W(l,h,E,q,v,A,C){var a=l-E,I=h-q,i=(C?A:-A)/L(a*a+I*I),n=i*I,d=-i*a,u=l+n,s=h+d,f=E+n,c=q+d,F=(u+f)/2,t=(s+c)/2,m=f-u,y=c-s,R=m*m+y*y,T=v-A,P=u*c-f*s,O=(y<0?-1:1)*L(on(0,T*T*R-P*P)),S=(P*y-m*O)/R,z=(-P*m-y*O)/R,w=(P*y+m*O)/R,p=(-P*m+y*O)/R,x=S-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(S=w,z=p),{cx:S,cy:z,x01:-n,y01:-d,x11:S*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=gn,E=B(0),q=null,v=yn,A=dn,C=mn,a=null,I=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=I()),s<u&&(d=s,s=u,u=d),!(s>g))a.moveTo(0,0);else if(F>tn-g)a.moveTo(s*H(f),s*j(f)),a.arc(0,0,s,f,c,!t),u>g&&(a.moveTo(u*H(c),u*j(c)),a.arc(0,0,u,c,f,t));else{var m=f,y=c,R=f,T=c,P=F,O=F,S=C.apply(this,arguments)/2,z=S>g&&(q?+q.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(z>g){var G=sn(z/u*j(S)),M=sn(z/s*j(S));(P-=G*2)>g?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(O-=M*2)>g?(M*=t?1:-1,m+=M,y-=M):(O=0,m=y=(f+c)/2)}var J=s*H(m),K=s*j(m),N=u*H(T),Q=u*j(T);if(w>g){var U=s*H(y),V=s*j(y),X=u*H(R),Y=u*j(R),D;if(F<an)if(D=pn(J,K,X,Y,U,V,N,Q)){var Z=J-D[0],$=K-D[1],b=U-D[0],k=V-D[1],nn=1/j(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(D[0]*D[0]+D[1]*D[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>g?x>g?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,y,!t)):a.moveTo(J,K),!(u>g)||!(P>g)?a.lineTo(N,Q):p>g?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[H(d)*n,j(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:B(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:B(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{a5 as ln,a6 as an,a7 as H,a8 as j,a9 as B,aa as un,ab as g,ac as tn,ad as L,ae as _,af as rn,ag as o,ah as on,ai as sn,aj as fn}from"./mermaid.core-knGXJfjz.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,q,v,A,C,a){var I=E-l,i=q-h,n=C-v,d=a-A,u=d*I-n*i;if(!(u*u<g))return u=(n*(h-A)-d*(l-v))/u,[l+u*I,h+u*i]}function W(l,h,E,q,v,A,C){var a=l-E,I=h-q,i=(C?A:-A)/L(a*a+I*I),n=i*I,d=-i*a,u=l+n,s=h+d,f=E+n,c=q+d,F=(u+f)/2,t=(s+c)/2,m=f-u,y=c-s,R=m*m+y*y,T=v-A,P=u*c-f*s,O=(y<0?-1:1)*L(on(0,T*T*R-P*P)),S=(P*y-m*O)/R,z=(-P*m-y*O)/R,w=(P*y+m*O)/R,p=(-P*m+y*O)/R,x=S-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(S=w,z=p),{cx:S,cy:z,x01:-n,y01:-d,x11:S*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=gn,E=B(0),q=null,v=yn,A=dn,C=mn,a=null,I=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=I()),s<u&&(d=s,s=u,u=d),!(s>g))a.moveTo(0,0);else if(F>tn-g)a.moveTo(s*H(f),s*j(f)),a.arc(0,0,s,f,c,!t),u>g&&(a.moveTo(u*H(c),u*j(c)),a.arc(0,0,u,c,f,t));else{var m=f,y=c,R=f,T=c,P=F,O=F,S=C.apply(this,arguments)/2,z=S>g&&(q?+q.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(z>g){var G=sn(z/u*j(S)),M=sn(z/s*j(S));(P-=G*2)>g?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(O-=M*2)>g?(M*=t?1:-1,m+=M,y-=M):(O=0,m=y=(f+c)/2)}var J=s*H(m),K=s*j(m),N=u*H(T),Q=u*j(T);if(w>g){var U=s*H(y),V=s*j(y),X=u*H(R),Y=u*j(R),D;if(F<an)if(D=pn(J,K,X,Y,U,V,N,Q)){var Z=J-D[0],$=K-D[1],b=U-D[0],k=V-D[1],nn=1/j(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(D[0]*D[0]+D[1]*D[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>g?x>g?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,y,!t)):a.moveTo(J,K),!(u>g)||!(P>g)?a.lineTo(N,Q):p>g?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[H(d)*n,j(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:B(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:B(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};