@pellux/goodvibes-sdk 0.21.29 → 0.21.33

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 (323) hide show
  1. package/dist/_internal/contracts/zod-schemas/accounts.d.ts +9 -9
  2. package/dist/_internal/contracts/zod-schemas/auth.d.ts +1 -1
  3. package/dist/_internal/daemon/context.d.ts +1 -0
  4. package/dist/_internal/daemon/context.d.ts.map +1 -1
  5. package/dist/_internal/daemon/error-response.js +22 -22
  6. package/dist/_internal/daemon/integration-route-types.d.ts +2 -1
  7. package/dist/_internal/daemon/integration-route-types.d.ts.map +1 -1
  8. package/dist/_internal/daemon/knowledge-routes.js +5 -5
  9. package/dist/_internal/daemon/media-routes.d.ts.map +1 -1
  10. package/dist/_internal/daemon/media-routes.js +4 -3
  11. package/dist/_internal/daemon/operator.d.ts +1 -1
  12. package/dist/_internal/daemon/operator.d.ts.map +1 -1
  13. package/dist/_internal/daemon/operator.js +2 -0
  14. package/dist/_internal/daemon/runtime-route-types.d.ts +2 -1
  15. package/dist/_internal/daemon/runtime-route-types.d.ts.map +1 -1
  16. package/dist/_internal/daemon/runtime-routes.d.ts +1 -1
  17. package/dist/_internal/daemon/runtime-routes.d.ts.map +1 -1
  18. package/dist/_internal/daemon/runtime-routes.js +1 -0
  19. package/dist/_internal/daemon/telemetry-routes.d.ts.map +1 -1
  20. package/dist/_internal/daemon/telemetry-routes.js +13 -12
  21. package/dist/_internal/errors/daemon-error-contract.d.ts +17 -0
  22. package/dist/_internal/errors/daemon-error-contract.d.ts.map +1 -1
  23. package/dist/_internal/errors/daemon-error-contract.js +17 -1
  24. package/dist/_internal/errors/index.d.ts +2 -1
  25. package/dist/_internal/errors/index.d.ts.map +1 -1
  26. package/dist/_internal/errors/index.js +1 -0
  27. package/dist/_internal/platform/artifacts/store.d.ts.map +1 -1
  28. package/dist/_internal/platform/artifacts/store.js +2 -1
  29. package/dist/_internal/platform/automation/scheduler-capacity.d.ts +29 -0
  30. package/dist/_internal/platform/automation/scheduler-capacity.d.ts.map +1 -0
  31. package/dist/_internal/platform/automation/scheduler-capacity.js +31 -0
  32. package/dist/_internal/platform/channels/delivery/shared.d.ts.map +1 -1
  33. package/dist/_internal/platform/channels/delivery/shared.js +3 -2
  34. package/dist/_internal/platform/channels/delivery/strategies-bridge.d.ts.map +1 -1
  35. package/dist/_internal/platform/channels/delivery/strategies-bridge.js +3 -2
  36. package/dist/_internal/platform/channels/delivery/strategies-core.d.ts.map +1 -1
  37. package/dist/_internal/platform/channels/delivery/strategies-core.js +5 -4
  38. package/dist/_internal/platform/channels/delivery/strategies-enterprise.d.ts.map +1 -1
  39. package/dist/_internal/platform/channels/delivery/strategies-enterprise.js +4 -3
  40. package/dist/_internal/platform/companion/companion-chat-rate-limiter.d.ts +7 -0
  41. package/dist/_internal/platform/companion/companion-chat-rate-limiter.d.ts.map +1 -1
  42. package/dist/_internal/platform/companion/companion-chat-rate-limiter.js +16 -0
  43. package/dist/_internal/platform/config/manager.d.ts.map +1 -1
  44. package/dist/_internal/platform/config/manager.js +2 -1
  45. package/dist/_internal/platform/config/schema-domain-runtime.d.ts +6 -0
  46. package/dist/_internal/platform/config/schema-domain-runtime.d.ts.map +1 -1
  47. package/dist/_internal/platform/config/schema-domain-runtime.js +22 -0
  48. package/dist/_internal/platform/config/schema-types.d.ts +16 -2
  49. package/dist/_internal/platform/config/schema-types.d.ts.map +1 -1
  50. package/dist/_internal/platform/config/schema.d.ts.map +1 -1
  51. package/dist/_internal/platform/config/schema.js +1 -0
  52. package/dist/_internal/platform/config/service-registry.d.ts.map +1 -1
  53. package/dist/_internal/platform/config/service-registry.js +2 -1
  54. package/dist/_internal/platform/control-plane/gateway-web-ui.d.ts +0 -1
  55. package/dist/_internal/platform/control-plane/gateway-web-ui.d.ts.map +1 -1
  56. package/dist/_internal/platform/control-plane/gateway-web-ui.js +7 -6
  57. package/dist/_internal/platform/control-plane/gateway.d.ts.map +1 -1
  58. package/dist/_internal/platform/control-plane/gateway.js +7 -0
  59. package/dist/_internal/platform/control-plane/session-broker.d.ts.map +1 -1
  60. package/dist/_internal/platform/control-plane/session-broker.js +38 -5
  61. package/dist/_internal/platform/core/orchestrator-tool-runtime.d.ts.map +1 -1
  62. package/dist/_internal/platform/core/orchestrator-tool-runtime.js +6 -6
  63. package/dist/_internal/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
  64. package/dist/_internal/platform/core/orchestrator-turn-loop.js +10 -2
  65. package/dist/_internal/platform/core/orchestrator.d.ts.map +1 -1
  66. package/dist/_internal/platform/core/orchestrator.js +2 -0
  67. package/dist/_internal/platform/daemon/facade-composition.d.ts +4 -131
  68. package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
  69. package/dist/_internal/platform/daemon/facade-composition.js +9 -10
  70. package/dist/_internal/platform/daemon/facade-types.d.ts +141 -0
  71. package/dist/_internal/platform/daemon/facade-types.d.ts.map +1 -0
  72. package/dist/_internal/platform/daemon/facade-types.js +1 -0
  73. package/dist/_internal/platform/daemon/http/rate-limiter.d.ts +23 -0
  74. package/dist/_internal/platform/daemon/http/rate-limiter.d.ts.map +1 -0
  75. package/dist/_internal/platform/daemon/http/rate-limiter.js +71 -0
  76. package/dist/_internal/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
  77. package/dist/_internal/platform/daemon/http/router-route-contexts.js +2 -1
  78. package/dist/_internal/platform/daemon/http/router.d.ts.map +1 -1
  79. package/dist/_internal/platform/daemon/http/router.js +90 -66
  80. package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
  81. package/dist/_internal/platform/daemon/http-listener.d.ts +14 -0
  82. package/dist/_internal/platform/daemon/http-listener.d.ts.map +1 -1
  83. package/dist/_internal/platform/daemon/http-listener.js +92 -86
  84. package/dist/_internal/platform/daemon/surface-delivery.d.ts.map +1 -1
  85. package/dist/_internal/platform/daemon/surface-delivery.js +6 -5
  86. package/dist/_internal/platform/discovery/mcp-scanner.d.ts.map +1 -1
  87. package/dist/_internal/platform/discovery/mcp-scanner.js +28 -22
  88. package/dist/_internal/platform/discovery/scanner.d.ts.map +1 -1
  89. package/dist/_internal/platform/discovery/scanner.js +38 -22
  90. package/dist/_internal/platform/export/session-export.d.ts +0 -1
  91. package/dist/_internal/platform/export/session-export.d.ts.map +1 -1
  92. package/dist/_internal/platform/export/session-export.js +1 -33
  93. package/dist/_internal/platform/hooks/runners/http.d.ts.map +1 -1
  94. package/dist/_internal/platform/hooks/runners/http.js +15 -1
  95. package/dist/_internal/platform/hooks/types.d.ts +7 -0
  96. package/dist/_internal/platform/hooks/types.d.ts.map +1 -1
  97. package/dist/_internal/platform/integrations/delivery.d.ts +3 -1
  98. package/dist/_internal/platform/integrations/delivery.d.ts.map +1 -1
  99. package/dist/_internal/platform/integrations/delivery.js +3 -2
  100. package/dist/_internal/platform/integrations/discord.d.ts.map +1 -1
  101. package/dist/_internal/platform/integrations/discord.js +6 -5
  102. package/dist/_internal/platform/integrations/ntfy.d.ts.map +1 -1
  103. package/dist/_internal/platform/integrations/ntfy.js +3 -2
  104. package/dist/_internal/platform/integrations/webhooks.d.ts.map +1 -1
  105. package/dist/_internal/platform/integrations/webhooks.js +12 -1
  106. package/dist/_internal/platform/intelligence/lsp/binary-downloader.d.ts.map +1 -1
  107. package/dist/_internal/platform/intelligence/lsp/binary-downloader.js +4 -3
  108. package/dist/_internal/platform/knowledge/store.d.ts.map +1 -1
  109. package/dist/_internal/platform/knowledge/store.js +50 -25
  110. package/dist/_internal/platform/mcp/client.d.ts.map +1 -1
  111. package/dist/_internal/platform/mcp/client.js +3 -2
  112. package/dist/_internal/platform/media/builtin-generation-providers.d.ts.map +1 -1
  113. package/dist/_internal/platform/media/builtin-generation-providers.js +4 -3
  114. package/dist/_internal/platform/media/builtin-image-understanding.d.ts.map +1 -1
  115. package/dist/_internal/platform/media/builtin-image-understanding.js +5 -4
  116. package/dist/_internal/platform/providers/anthropic-compat.d.ts.map +1 -1
  117. package/dist/_internal/platform/providers/anthropic-compat.js +5 -3
  118. package/dist/_internal/platform/providers/anthropic.d.ts.map +1 -1
  119. package/dist/_internal/platform/providers/anthropic.js +10 -7
  120. package/dist/_internal/platform/providers/builtin-catalog.d.ts.map +1 -1
  121. package/dist/_internal/platform/providers/builtin-catalog.js +3 -2
  122. package/dist/_internal/platform/providers/catalogue.d.ts +56 -0
  123. package/dist/_internal/platform/providers/catalogue.d.ts.map +1 -0
  124. package/dist/_internal/platform/providers/catalogue.js +111 -0
  125. package/dist/_internal/platform/providers/context-discovery.d.ts.map +1 -1
  126. package/dist/_internal/platform/providers/context-discovery.js +2 -1
  127. package/dist/_internal/platform/providers/credentials.d.ts +12 -0
  128. package/dist/_internal/platform/providers/credentials.d.ts.map +1 -0
  129. package/dist/_internal/platform/providers/credentials.js +54 -0
  130. package/dist/_internal/platform/providers/gemini.d.ts.map +1 -1
  131. package/dist/_internal/platform/providers/gemini.js +6 -5
  132. package/dist/_internal/platform/providers/github-copilot.d.ts.map +1 -1
  133. package/dist/_internal/platform/providers/github-copilot.js +2 -1
  134. package/dist/_internal/platform/providers/health.d.ts +15 -0
  135. package/dist/_internal/platform/providers/health.d.ts.map +1 -0
  136. package/dist/_internal/platform/providers/health.js +32 -0
  137. package/dist/_internal/platform/providers/llama-cpp.d.ts.map +1 -1
  138. package/dist/_internal/platform/providers/llama-cpp.js +5 -3
  139. package/dist/_internal/platform/providers/lm-studio.d.ts.map +1 -1
  140. package/dist/_internal/platform/providers/lm-studio.js +5 -3
  141. package/dist/_internal/platform/providers/model-benchmarks.d.ts.map +1 -1
  142. package/dist/_internal/platform/providers/model-benchmarks.js +2 -1
  143. package/dist/_internal/platform/providers/model-catalog-cache.d.ts.map +1 -1
  144. package/dist/_internal/platform/providers/model-catalog-cache.js +2 -1
  145. package/dist/_internal/platform/providers/model-limits.d.ts.map +1 -1
  146. package/dist/_internal/platform/providers/model-limits.js +2 -1
  147. package/dist/_internal/platform/providers/ollama.d.ts.map +1 -1
  148. package/dist/_internal/platform/providers/ollama.js +5 -3
  149. package/dist/_internal/platform/providers/openai-codex.d.ts.map +1 -1
  150. package/dist/_internal/platform/providers/openai-codex.js +4 -2
  151. package/dist/_internal/platform/providers/openai-compat.d.ts.map +1 -1
  152. package/dist/_internal/platform/providers/openai-compat.js +3 -2
  153. package/dist/_internal/platform/providers/provider-not-found-error.d.ts +3 -1
  154. package/dist/_internal/platform/providers/provider-not-found-error.d.ts.map +1 -1
  155. package/dist/_internal/platform/providers/provider-not-found-error.js +3 -4
  156. package/dist/_internal/platform/providers/well-known-endpoints.d.ts +53 -0
  157. package/dist/_internal/platform/providers/well-known-endpoints.d.ts.map +1 -0
  158. package/dist/_internal/platform/providers/well-known-endpoints.js +52 -0
  159. package/dist/_internal/platform/runtime/auth/oauth-core.d.ts.map +1 -1
  160. package/dist/_internal/platform/runtime/auth/oauth-core.js +2 -1
  161. package/dist/_internal/platform/runtime/bootstrap-runtime-events.d.ts.map +1 -1
  162. package/dist/_internal/platform/runtime/bootstrap-runtime-events.js +2 -0
  163. package/dist/_internal/platform/runtime/contracts/index.d.ts.map +1 -1
  164. package/dist/_internal/platform/runtime/contracts/index.js +1 -5
  165. package/dist/_internal/platform/runtime/contracts/migrations/schemas.d.ts +57 -0
  166. package/dist/_internal/platform/runtime/contracts/migrations/schemas.d.ts.map +1 -0
  167. package/dist/_internal/platform/runtime/contracts/migrations/schemas.js +157 -0
  168. package/dist/_internal/platform/runtime/correlation.d.ts +44 -0
  169. package/dist/_internal/platform/runtime/correlation.d.ts.map +1 -0
  170. package/dist/_internal/platform/runtime/correlation.js +40 -0
  171. package/dist/_internal/platform/runtime/emitters/security.d.ts +32 -0
  172. package/dist/_internal/platform/runtime/emitters/security.d.ts.map +1 -1
  173. package/dist/_internal/platform/runtime/emitters/security.js +26 -0
  174. package/dist/_internal/platform/runtime/emitters/tools.d.ts +11 -2
  175. package/dist/_internal/platform/runtime/emitters/tools.d.ts.map +1 -1
  176. package/dist/_internal/platform/runtime/emitters/tools.js +27 -0
  177. package/dist/_internal/platform/runtime/emitters/transport.d.ts +27 -0
  178. package/dist/_internal/platform/runtime/emitters/transport.d.ts.map +1 -1
  179. package/dist/_internal/platform/runtime/emitters/transport.js +19 -0
  180. package/dist/_internal/platform/runtime/emitters/turn.d.ts +22 -1
  181. package/dist/_internal/platform/runtime/emitters/turn.d.ts.map +1 -1
  182. package/dist/_internal/platform/runtime/emitters/turn.js +9 -0
  183. package/dist/_internal/platform/runtime/events/index.d.ts +45 -0
  184. package/dist/_internal/platform/runtime/events/index.d.ts.map +1 -1
  185. package/dist/_internal/platform/runtime/events/index.js +130 -22
  186. package/dist/_internal/platform/runtime/events/ops.d.ts +8 -0
  187. package/dist/_internal/platform/runtime/events/ops.d.ts.map +1 -1
  188. package/dist/_internal/platform/runtime/events/security.d.ts +47 -0
  189. package/dist/_internal/platform/runtime/events/security.d.ts.map +1 -1
  190. package/dist/_internal/platform/runtime/events/tools.d.ts +14 -2
  191. package/dist/_internal/platform/runtime/events/tools.d.ts.map +1 -1
  192. package/dist/_internal/platform/runtime/events/transport.d.ts +31 -0
  193. package/dist/_internal/platform/runtime/events/transport.d.ts.map +1 -1
  194. package/dist/_internal/platform/runtime/events/turn.d.ts +25 -1
  195. package/dist/_internal/platform/runtime/events/turn.d.ts.map +1 -1
  196. package/dist/_internal/platform/runtime/events/workspace.d.ts +16 -0
  197. package/dist/_internal/platform/runtime/events/workspace.d.ts.map +1 -1
  198. package/dist/_internal/platform/runtime/integration/helpers.d.ts.map +1 -1
  199. package/dist/_internal/platform/runtime/integration/helpers.js +5 -0
  200. package/dist/_internal/platform/runtime/llm-observability.d.ts +43 -0
  201. package/dist/_internal/platform/runtime/llm-observability.d.ts.map +1 -0
  202. package/dist/_internal/platform/runtime/llm-observability.js +107 -0
  203. package/dist/_internal/platform/runtime/metrics.d.ts +49 -0
  204. package/dist/_internal/platform/runtime/metrics.d.ts.map +1 -0
  205. package/dist/_internal/platform/runtime/metrics.js +114 -0
  206. package/dist/_internal/platform/runtime/ops/control-plane.d.ts +5 -2
  207. package/dist/_internal/platform/runtime/ops/control-plane.d.ts.map +1 -1
  208. package/dist/_internal/platform/runtime/ops/control-plane.js +5 -4
  209. package/dist/_internal/platform/runtime/perf/slo-collector.d.ts.map +1 -1
  210. package/dist/_internal/platform/runtime/perf/slo-collector.js +2 -0
  211. package/dist/_internal/platform/runtime/permissions/divergence-dashboard.d.ts +3 -1
  212. package/dist/_internal/platform/runtime/permissions/divergence-dashboard.d.ts.map +1 -1
  213. package/dist/_internal/platform/runtime/permissions/divergence-dashboard.js +3 -2
  214. package/dist/_internal/platform/runtime/permissions/policy-loader.d.ts +3 -1
  215. package/dist/_internal/platform/runtime/permissions/policy-loader.d.ts.map +1 -1
  216. package/dist/_internal/platform/runtime/permissions/policy-loader.js +3 -2
  217. package/dist/_internal/platform/runtime/permissions/policy-signer.d.ts.map +1 -1
  218. package/dist/_internal/platform/runtime/permissions/policy-signer.js +7 -2
  219. package/dist/_internal/platform/runtime/permissions/simulation.d.ts +3 -1
  220. package/dist/_internal/platform/runtime/permissions/simulation.d.ts.map +1 -1
  221. package/dist/_internal/platform/runtime/permissions/simulation.js +3 -2
  222. package/dist/_internal/platform/runtime/remote/transport-contract.d.ts +14 -2
  223. package/dist/_internal/platform/runtime/remote/transport-contract.d.ts.map +1 -1
  224. package/dist/_internal/platform/runtime/remote/transport-contract.js +7 -5
  225. package/dist/_internal/platform/runtime/store/helpers/reducers/sync.d.ts.map +1 -1
  226. package/dist/_internal/platform/runtime/store/helpers/reducers/sync.js +12 -1
  227. package/dist/_internal/platform/runtime/tasks/manager.d.ts +7 -3
  228. package/dist/_internal/platform/runtime/tasks/manager.d.ts.map +1 -1
  229. package/dist/_internal/platform/runtime/tasks/manager.js +7 -6
  230. package/dist/_internal/platform/runtime/telemetry/api-helpers.d.ts +14 -0
  231. package/dist/_internal/platform/runtime/telemetry/api-helpers.d.ts.map +1 -1
  232. package/dist/_internal/platform/runtime/telemetry/api-helpers.js +59 -0
  233. package/dist/_internal/platform/runtime/telemetry/api.d.ts.map +1 -1
  234. package/dist/_internal/platform/runtime/telemetry/api.js +19 -4
  235. package/dist/_internal/platform/runtime/telemetry/exporters/otlp.d.ts.map +1 -1
  236. package/dist/_internal/platform/runtime/telemetry/exporters/otlp.js +19 -6
  237. package/dist/_internal/platform/runtime/telemetry/exporters/queue.d.ts.map +1 -1
  238. package/dist/_internal/platform/runtime/telemetry/exporters/queue.js +11 -4
  239. package/dist/_internal/platform/runtime/telemetry/meter.d.ts.map +1 -1
  240. package/dist/_internal/platform/runtime/telemetry/meter.js +7 -3
  241. package/dist/_internal/platform/runtime/telemetry/redaction-config.d.ts +9 -0
  242. package/dist/_internal/platform/runtime/telemetry/redaction-config.d.ts.map +1 -0
  243. package/dist/_internal/platform/runtime/telemetry/redaction-config.js +52 -0
  244. package/dist/_internal/platform/runtime/tools/phases/budget.d.ts.map +1 -1
  245. package/dist/_internal/platform/runtime/tools/phases/budget.js +3 -2
  246. package/dist/_internal/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
  247. package/dist/_internal/platform/runtime/transports/daemon-http-client.js +138 -17
  248. package/dist/_internal/platform/scheduler/scheduler.d.ts +19 -2
  249. package/dist/_internal/platform/scheduler/scheduler.d.ts.map +1 -1
  250. package/dist/_internal/platform/scheduler/scheduler.js +65 -25
  251. package/dist/_internal/platform/sessions/manager.d.ts.map +1 -1
  252. package/dist/_internal/platform/sessions/manager.js +6 -2
  253. package/dist/_internal/platform/state/memory-embedding-http.d.ts.map +1 -1
  254. package/dist/_internal/platform/state/memory-embedding-http.js +3 -2
  255. package/dist/_internal/platform/state/project-index.d.ts.map +1 -1
  256. package/dist/_internal/platform/state/project-index.js +6 -4
  257. package/dist/_internal/platform/tools/agent/index.d.ts.map +1 -1
  258. package/dist/_internal/platform/tools/agent/index.js +2 -1
  259. package/dist/_internal/platform/tools/analyze/git-modes.d.ts.map +1 -1
  260. package/dist/_internal/platform/tools/analyze/git-modes.js +2 -1
  261. package/dist/_internal/platform/tools/edit/core.d.ts.map +1 -1
  262. package/dist/_internal/platform/tools/edit/core.js +2 -1
  263. package/dist/_internal/platform/tools/exec/runtime.d.ts.map +1 -1
  264. package/dist/_internal/platform/tools/exec/runtime.js +3 -2
  265. package/dist/_internal/platform/tools/fetch/runtime.d.ts.map +1 -1
  266. package/dist/_internal/platform/tools/fetch/runtime.js +4 -2
  267. package/dist/_internal/platform/tools/read/index.d.ts.map +1 -1
  268. package/dist/_internal/platform/tools/read/index.js +2 -1
  269. package/dist/_internal/platform/tools/registry-tool/index.d.ts.map +1 -1
  270. package/dist/_internal/platform/tools/registry-tool/index.js +2 -1
  271. package/dist/_internal/platform/tools/state/index.d.ts.map +1 -1
  272. package/dist/_internal/platform/tools/state/index.js +2 -1
  273. package/dist/_internal/platform/tools/task/index.d.ts.map +1 -1
  274. package/dist/_internal/platform/tools/task/index.js +2 -1
  275. package/dist/_internal/platform/tools/team/index.d.ts.map +1 -1
  276. package/dist/_internal/platform/tools/team/index.js +2 -1
  277. package/dist/_internal/platform/tools/web-search/index.d.ts.map +1 -1
  278. package/dist/_internal/platform/tools/web-search/index.js +2 -1
  279. package/dist/_internal/platform/tools/worklist/index.d.ts.map +1 -1
  280. package/dist/_internal/platform/tools/worklist/index.js +2 -1
  281. package/dist/_internal/platform/types/errors.d.ts +12 -10
  282. package/dist/_internal/platform/types/errors.d.ts.map +1 -1
  283. package/dist/_internal/platform/types/errors.js +21 -20
  284. package/dist/_internal/platform/utils/error-display.d.ts.map +1 -1
  285. package/dist/_internal/platform/utils/error-display.js +6 -4
  286. package/dist/_internal/platform/utils/fetch-with-timeout.d.ts +17 -0
  287. package/dist/_internal/platform/utils/fetch-with-timeout.d.ts.map +1 -1
  288. package/dist/_internal/platform/utils/fetch-with-timeout.js +59 -0
  289. package/dist/_internal/platform/utils/record-coerce.d.ts +11 -0
  290. package/dist/_internal/platform/utils/record-coerce.d.ts.map +1 -0
  291. package/dist/_internal/platform/utils/record-coerce.js +12 -0
  292. package/dist/_internal/platform/utils/redaction.js +1 -1
  293. package/dist/_internal/platform/utils/ring-buffer.d.ts +54 -0
  294. package/dist/_internal/platform/utils/ring-buffer.d.ts.map +1 -0
  295. package/dist/_internal/platform/utils/ring-buffer.js +96 -0
  296. package/dist/_internal/platform/utils/shell-split.d.ts +11 -0
  297. package/dist/_internal/platform/utils/shell-split.d.ts.map +1 -0
  298. package/dist/_internal/platform/utils/shell-split.js +83 -0
  299. package/dist/_internal/platform/version.js +1 -1
  300. package/dist/_internal/platform/voice/providers/deepgram.d.ts.map +1 -1
  301. package/dist/_internal/platform/voice/providers/deepgram.js +2 -1
  302. package/dist/_internal/platform/voice/providers/elevenlabs.d.ts.map +1 -1
  303. package/dist/_internal/platform/voice/providers/elevenlabs.js +5 -4
  304. package/dist/_internal/platform/voice/providers/google.d.ts.map +1 -1
  305. package/dist/_internal/platform/voice/providers/google.js +5 -4
  306. package/dist/_internal/platform/voice/providers/microsoft.d.ts.map +1 -1
  307. package/dist/_internal/platform/voice/providers/microsoft.js +2 -1
  308. package/dist/_internal/platform/voice/providers/openai.d.ts.map +1 -1
  309. package/dist/_internal/platform/voice/providers/openai.js +4 -3
  310. package/dist/_internal/platform/voice/providers/shared.d.ts.map +1 -1
  311. package/dist/_internal/platform/voice/providers/shared.js +2 -1
  312. package/dist/_internal/platform/voice/providers/vydra.d.ts.map +1 -1
  313. package/dist/_internal/platform/voice/providers/vydra.js +3 -2
  314. package/dist/_internal/platform/watchers/registry.d.ts.map +1 -1
  315. package/dist/_internal/platform/watchers/registry.js +3 -2
  316. package/dist/_internal/platform/workflow/trigger-executor.d.ts.map +1 -1
  317. package/dist/_internal/platform/workflow/trigger-executor.js +5 -3
  318. package/dist/_internal/platform/workspace/daemon-home.d.ts.map +1 -1
  319. package/dist/_internal/platform/workspace/daemon-home.js +6 -2
  320. package/dist/_internal/platform/workspace/workspace-swap-manager.d.ts +1 -0
  321. package/dist/_internal/platform/workspace/workspace-swap-manager.d.ts.map +1 -1
  322. package/dist/_internal/platform/workspace/workspace-swap-manager.js +14 -2
  323. package/package.json +1 -1
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * Returns suggested McpServerConfig[] for servers not already in the registry.
13
13
  */
14
- import { existsSync, readdirSync, statSync } from 'fs';
14
+ import { readdir, stat } from 'node:fs/promises';
15
15
  import { join } from 'path';
16
16
  import { logger } from '../utils/logger.js';
17
17
  import { requireSurfaceRoot } from '../runtime/surface-root.js';
@@ -50,15 +50,15 @@ function deriveServerName(nameOrPath) {
50
50
  * Check if a given package is installed locally (in node_modules).
51
51
  * Returns the bin path if found, null otherwise.
52
52
  */
53
- function findLocalNpxBin(cwd, packageName) {
53
+ async function findLocalNpxBin(cwd, packageName) {
54
54
  // Check project-local node_modules/.bin
55
55
  const binName = packageName.replace(/^@[^/]+\//, '');
56
56
  const localBin = join(cwd, 'node_modules', '.bin', binName);
57
- if (existsSync(localBin))
57
+ if (await stat(localBin).then(() => true).catch(() => false))
58
58
  return localBin;
59
59
  // Also check if the package itself exists in node_modules
60
60
  const localPkg = join(cwd, 'node_modules', packageName, 'package.json');
61
- if (existsSync(localPkg))
61
+ if (await stat(localPkg).then(() => true).catch(() => false))
62
62
  return packageName;
63
63
  return null;
64
64
  }
@@ -68,27 +68,27 @@ function findLocalNpxBin(cwd, packageName) {
68
68
  * - .mcp/mcp.json (already handled by loadMcpConfig, skip)
69
69
  * - .mcp/<name>/index.js or .mcp/<name>/index.ts or .mcp/<name>/server.js
70
70
  */
71
- function scanProjectMcpDir(roots, knownNames) {
71
+ async function scanProjectMcpDir(roots, knownNames) {
72
72
  const mcpDir = join(roots.workingDirectory, '.mcp');
73
- if (!existsSync(mcpDir))
73
+ if (!await stat(mcpDir).then(() => true).catch(() => false))
74
74
  return [];
75
75
  const suggestions = [];
76
76
  try {
77
- const entries = readdirSync(mcpDir);
77
+ const entries = await readdir(mcpDir);
78
78
  for (const entry of entries) {
79
79
  // Skip mcp.json — already read by loadMcpConfig
80
80
  if (entry === 'mcp.json')
81
81
  continue;
82
82
  const entryPath = join(mcpDir, entry);
83
83
  try {
84
- const stat = statSync(entryPath);
85
- if (!stat.isDirectory())
84
+ const entryStat = await stat(entryPath);
85
+ if (!entryStat.isDirectory())
86
86
  continue;
87
87
  // Look for a server entry point inside the subdirectory
88
88
  const candidates = ['index.js', 'index.ts', 'server.js', 'server.ts', 'main.js', 'main.ts'];
89
89
  for (const candidate of candidates) {
90
90
  const candidatePath = join(entryPath, candidate);
91
- if (existsSync(candidatePath)) {
91
+ if (await stat(candidatePath).then(() => true).catch(() => false)) {
92
92
  if (knownNames.has(entry))
93
93
  break; // already registered
94
94
  const runtime = candidate.endsWith('.ts') ? 'bun' : 'node';
@@ -117,22 +117,22 @@ function scanProjectMcpDir(roots, knownNames) {
117
117
  * - <name>/index.js, <name>/server.js, etc.
118
118
  * - <name>.js, <name>.ts standalone scripts
119
119
  */
120
- function scanGoodvibesMcpDir(roots, knownNames) {
120
+ async function scanGoodvibesMcpDir(roots, knownNames) {
121
121
  const mcpDir = join(roots.homeDirectory, '.goodvibes', requireSurfaceRoot(roots.surfaceRoot, 'MCP discovery surfaceRoot'), 'mcp');
122
- if (!existsSync(mcpDir))
122
+ if (!await stat(mcpDir).then(() => true).catch(() => false))
123
123
  return [];
124
124
  const suggestions = [];
125
125
  try {
126
- const entries = readdirSync(mcpDir);
126
+ const entries = await readdir(mcpDir);
127
127
  for (const entry of entries) {
128
128
  const entryPath = join(mcpDir, entry);
129
129
  try {
130
- const stat = statSync(entryPath);
131
- if (stat.isDirectory()) {
130
+ const entryStat = await stat(entryPath);
131
+ if (entryStat.isDirectory()) {
132
132
  const candidates = ['index.js', 'index.ts', 'server.js', 'server.ts'];
133
133
  for (const candidate of candidates) {
134
134
  const candidatePath = join(entryPath, candidate);
135
- if (existsSync(candidatePath)) {
135
+ if (await stat(candidatePath).then(() => true).catch(() => false)) {
136
136
  if (knownNames.has(entry))
137
137
  break;
138
138
  const runtime = candidate.endsWith('.ts') ? 'bun' : 'node';
@@ -141,7 +141,7 @@ function scanGoodvibesMcpDir(roots, knownNames) {
141
141
  }
142
142
  }
143
143
  }
144
- else if (stat.isFile()) {
144
+ else if (entryStat.isFile()) {
145
145
  // Standalone script: name.js or name.ts
146
146
  if (!entry.endsWith('.js') && !entry.endsWith('.ts'))
147
147
  continue;
@@ -165,10 +165,10 @@ function scanGoodvibesMcpDir(roots, knownNames) {
165
165
  /**
166
166
  * Check for locally-installed npx MCP packages not already registered.
167
167
  */
168
- function scanNpxMcpPackages(roots, knownNames) {
168
+ async function scanNpxMcpPackages(roots, knownNames) {
169
169
  const suggestions = [];
170
170
  for (const pkg of KNOWN_NPX_MCP_PACKAGES) {
171
- const binPath = findLocalNpxBin(roots.workingDirectory, pkg);
171
+ const binPath = await findLocalNpxBin(roots.workingDirectory, pkg);
172
172
  if (!binPath)
173
173
  continue;
174
174
  const serverName = deriveServerName(pkg);
@@ -202,15 +202,21 @@ export async function scanMcpServers(roots, registeredNames = new Set()) {
202
202
  }
203
203
  }
204
204
  };
205
+ // Run all three scanners in parallel — they are independent
206
+ const [projectResults, goodvibesResults, npxResults] = await Promise.all([
207
+ scanProjectMcpDir(roots, registeredNames),
208
+ scanGoodvibesMcpDir(roots, registeredNames),
209
+ scanNpxMcpPackages(roots, registeredNames),
210
+ ]);
205
211
  // 1. Project .mcp/ directory
206
212
  locationsScanned++;
207
- addSuggestions(scanProjectMcpDir(roots, registeredNames));
213
+ addSuggestions(projectResults);
208
214
  // 2. ~/.goodvibes/<surface>/mcp/ user-global directory
209
215
  locationsScanned++;
210
- addSuggestions(scanGoodvibesMcpDir(roots, registeredNames));
216
+ addSuggestions(goodvibesResults);
211
217
  // 3. Locally installed npx MCP packages
212
218
  locationsScanned++;
213
- addSuggestions(scanNpxMcpPackages(roots, registeredNames));
219
+ addSuggestions(npxResults);
214
220
  logger.debug('[mcp-scanner] Scan complete', {
215
221
  locationsScanned,
216
222
  suggestions: suggestions.length,
@@ -1 +1 @@
1
- {"version":3,"file":"scanner.d.ts","sourceRoot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H,wBAAsB,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CASzD;AAED;;;GAGG;AACH,wBAAsB,IAAI,CACxB,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACtD,OAAO,CAAC,UAAU,CAAC,CA8BrB"}
@@ -3,7 +3,9 @@ import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
3
3
  import { dirname } from 'node:path';
4
4
  import { logger } from '../utils/logger.js';
5
5
  import { discoverContextWindows } from '../providers/context-discovery.js';
6
+ import { WELL_KNOWN_LOCAL_PORTS } from '../providers/well-known-endpoints.js';
6
7
  import { resolveSurfaceDirectory } from '../runtime/surface-root.js';
8
+ import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
7
9
  function getPersistedPath(roots) {
8
10
  return resolveSurfaceDirectory(roots.homeDirectory, roots.surfaceRoot, 'discovered-providers.json');
9
11
  }
@@ -57,8 +59,9 @@ export function persistProviders(roots, servers) {
57
59
  mkdirSync(dirname(persistedPath), { recursive: true });
58
60
  writeFileSync(persistedPath, JSON.stringify([...byKey.values()], null, 2) + '\n', 'utf-8');
59
61
  }
60
- catch {
61
- // Non-fatal — persistence is best-effort
62
+ catch (err) {
63
+ // OBS-11: Non-fatal — persistence is best-effort
64
+ logger.debug('[Scanner] persistProviders failed (non-fatal)', { error: String(err) });
62
65
  }
63
66
  }
64
67
  /** Remove specific servers from the persisted file (by host:port). */
@@ -77,14 +80,27 @@ export function removePersistedProviders(roots, toRemove) {
77
80
  const filtered = current.filter(s => !removeKeys.has(`${s.host}:${s.port}`));
78
81
  writeFileSync(persistedPath, JSON.stringify(filtered, null, 2) + '\n', 'utf-8');
79
82
  }
80
- catch {
81
- // Non-fatal
83
+ catch (err) {
84
+ // OBS-11: Non-fatal — removal from persisted file failed
85
+ logger.debug('[Scanner] removePersistedProviders failed (non-fatal)', { error: String(err) });
82
86
  }
83
87
  }
84
88
  // ---------------------------------------------------------------------------
85
89
  // Constants
86
90
  // ---------------------------------------------------------------------------
87
- const KNOWN_PORTS = [1234, 1337, 2242, 4891, 5000, 5001, 7860, 8000, 8001, 8080, 11434];
91
+ const KNOWN_PORTS = [
92
+ WELL_KNOWN_LOCAL_PORTS.lmStudio,
93
+ WELL_KNOWN_LOCAL_PORTS.jan,
94
+ WELL_KNOWN_LOCAL_PORTS.aphrodite,
95
+ WELL_KNOWN_LOCAL_PORTS.gpt4all,
96
+ 5000,
97
+ WELL_KNOWN_LOCAL_PORTS.koboldCpp,
98
+ 7860,
99
+ 8000,
100
+ 8001,
101
+ WELL_KNOWN_LOCAL_PORTS.llamaCpp,
102
+ WELL_KNOWN_LOCAL_PORTS.ollama,
103
+ ];
88
104
  const PROBE_TIMEOUT_MS = 200;
89
105
  const MAX_CONCURRENT_PROBES = 50;
90
106
  const METADATA_TIMEOUT_MS = 2000;
@@ -152,7 +168,7 @@ async function probeHost(host, port) {
152
168
  }
153
169
  async function tryFetch(url) {
154
170
  try {
155
- const res = await fetch(url, {
171
+ const res = await instrumentedFetch(url, {
156
172
  signal: AbortSignal.timeout(PROBE_TIMEOUT_MS),
157
173
  });
158
174
  if (!res.ok)
@@ -200,17 +216,17 @@ function identifyServer(port, headers, responseBody) {
200
216
  .map((item) => String(item.id))
201
217
  .join(' ');
202
218
  }
203
- if (port === 11434)
219
+ if (port === WELL_KNOWN_LOCAL_PORTS.ollama)
204
220
  return 'ollama';
205
- if (port === 1337)
221
+ if (port === WELL_KNOWN_LOCAL_PORTS.jan)
206
222
  return 'jan';
207
- if (port === 4891)
223
+ if (port === WELL_KNOWN_LOCAL_PORTS.gpt4all)
208
224
  return 'gpt4all';
209
- if (port === 5001)
225
+ if (port === WELL_KNOWN_LOCAL_PORTS.koboldCpp)
210
226
  return 'koboldcpp';
211
- if (port === 2242)
227
+ if (port === WELL_KNOWN_LOCAL_PORTS.aphrodite)
212
228
  return 'aphrodite';
213
- if (port === 1234 || headerValues.includes('lmstudio') || modelIds.includes('lmstudio')) {
229
+ if (port === WELL_KNOWN_LOCAL_PORTS.lmStudio || headerValues.includes('lmstudio') || modelIds.includes('lmstudio')) {
214
230
  return 'lm-studio';
215
231
  }
216
232
  if (Object.keys(headers).some((k) => k.startsWith('x-vllm')))
@@ -240,7 +256,7 @@ export async function fetchModelContextWindows(host, port, serverType, models) {
240
256
  // Ollama: POST /api/show for each model — parallel to avoid blocking pool slot
241
257
  await Promise.allSettled(models.map(async (model) => {
242
258
  try {
243
- const res = await fetch(`http://${host}:${port}/api/show`, {
259
+ const res = await instrumentedFetch(`http://${host}:${port}/api/show`, {
244
260
  method: 'POST',
245
261
  headers: { 'Content-Type': 'application/json' },
246
262
  body: JSON.stringify({ name: model }),
@@ -281,7 +297,7 @@ export async function fetchModelContextWindows(host, port, serverType, models) {
281
297
  // vLLM: GET /v1/models/{id} returns max_model_len — parallel to avoid blocking pool slot
282
298
  await Promise.allSettled(models.map(async (model) => {
283
299
  try {
284
- const res = await fetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
300
+ const res = await instrumentedFetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
285
301
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
286
302
  });
287
303
  if (!res.ok)
@@ -301,7 +317,7 @@ export async function fetchModelContextWindows(host, port, serverType, models) {
301
317
  case 'llamacpp': {
302
318
  // llama.cpp: GET /props returns default_generation_settings.n_ctx (server-wide)
303
319
  try {
304
- const res = await fetch(`http://${host}:${port}/props`, {
320
+ const res = await instrumentedFetch(`http://${host}:${port}/props`, {
305
321
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
306
322
  });
307
323
  if (res.ok) {
@@ -349,7 +365,7 @@ export async function fetchModelContextWindows(host, port, serverType, models) {
349
365
  // Generic: try /v1/models/{id} for each model, look for common context length fields — parallel
350
366
  await Promise.allSettled(models.map(async (model) => {
351
367
  try {
352
- const res = await fetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
368
+ const res = await instrumentedFetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
353
369
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
354
370
  });
355
371
  if (!res.ok)
@@ -371,7 +387,7 @@ export async function fetchModelContextWindows(host, port, serverType, models) {
371
387
  // Fallback: try /props (llama.cpp-style) if no context windows found
372
388
  if (Object.keys(result).length === 0 && models.length > 0) {
373
389
  try {
374
- const res = await fetch(`http://${host}:${port}/props`, {
390
+ const res = await instrumentedFetch(`http://${host}:${port}/props`, {
375
391
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
376
392
  });
377
393
  if (res.ok) {
@@ -410,7 +426,7 @@ async function fetchModelOutputLimits(host, port, serverType, models) {
410
426
  // Ollama: POST /api/show for each model — look for num_predict in model_info or parameters
411
427
  await Promise.allSettled(models.map(async (model) => {
412
428
  try {
413
- const res = await fetch(`http://${host}:${port}/api/show`, {
429
+ const res = await instrumentedFetch(`http://${host}:${port}/api/show`, {
414
430
  method: 'POST',
415
431
  headers: { 'Content-Type': 'application/json' },
416
432
  body: JSON.stringify({ name: model }),
@@ -450,7 +466,7 @@ async function fetchModelOutputLimits(host, port, serverType, models) {
450
466
  // vLLM: GET /v1/models/{id} — look for max_completion_tokens
451
467
  await Promise.allSettled(models.map(async (model) => {
452
468
  try {
453
- const res = await fetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
469
+ const res = await instrumentedFetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
454
470
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
455
471
  });
456
472
  if (!res.ok)
@@ -470,7 +486,7 @@ async function fetchModelOutputLimits(host, port, serverType, models) {
470
486
  case 'llamacpp': {
471
487
  // llama.cpp: GET /props — look for default_generation_settings.n_predict
472
488
  try {
473
- const res = await fetch(`http://${host}:${port}/props`, {
489
+ const res = await instrumentedFetch(`http://${host}:${port}/props`, {
474
490
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
475
491
  });
476
492
  if (res.ok) {
@@ -502,7 +518,7 @@ async function fetchModelOutputLimits(host, port, serverType, models) {
502
518
  // Generic: try /v1/models/{id} for each model, look for common output limit fields
503
519
  await Promise.allSettled(models.map(async (model) => {
504
520
  try {
505
- const res = await fetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
521
+ const res = await instrumentedFetch(`http://${host}:${port}/v1/models/${encodeURIComponent(model)}`, {
506
522
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
507
523
  });
508
524
  if (!res.ok)
@@ -522,7 +538,7 @@ async function fetchModelOutputLimits(host, port, serverType, models) {
522
538
  // Fallback: try /props (llama.cpp-style) for n_predict if no output limits found
523
539
  if (Object.keys(result).length === 0 && models.length > 0) {
524
540
  try {
525
- const res = await fetch(`http://${host}:${port}/props`, {
541
+ const res = await instrumentedFetch(`http://${host}:${port}/props`, {
526
542
  signal: AbortSignal.timeout(METADATA_TIMEOUT_MS),
527
543
  });
528
544
  if (res.ok) {
@@ -12,7 +12,6 @@ export interface SessionExportData {
12
12
  /** ISO timestamp of export. */
13
13
  exportedAt?: string;
14
14
  }
15
- export declare function redactSensitiveData(text: string): string;
16
15
  /**
17
16
  * redactMessage - Deep-clone a message and redact all string fields that may
18
17
  * contain sensitive data (content, reasoning, tool arguments).
@@ -1 +1 @@
1
- {"version":3,"file":"session-export.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/export/session-export.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiC,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAIvG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,+BAA+B;IAC/B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B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAqB/D;AAID;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,aAAa,EAAE,EACzB,QAAQ,CAAC,EAAE,cAAc,EACzB,OAAO,GAAE,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,MAAM,CAwCR;AAqBD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,aAAa,EAAE,EACzB,QAAQ,CAAC,EAAE,cAAc,EACzB,OAAO,GAAE,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,MAAM,CAsBR;AAOD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,aAAa,EAAE,EACzB,QAAQ,CAAC,EAAE,cAAc,EACzB,OAAO,GAAE,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,MAAM,CA0JR;AAmQD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAG/F"}
@@ -1,38 +1,6 @@
1
1
  import { join } from 'node:path';
2
2
  import { exportToMarkdown, extractText } from './markdown.js';
3
- // ── Sensitive-data redaction ──────────────────────────────────────────────────
4
- /** Patterns that identify sensitive content — API keys and absolute paths. */
5
- const REDACT_PATTERNS = [
6
- // Generic API key patterns (sk-*, key-*, bearer tokens)
7
- { pattern: /\b(sk-[A-Za-z0-9_-]{20,})/g, replacement: '[REDACTED_API_KEY]' },
8
- { pattern: /\b(key-[A-Za-z0-9_-]{16,})/g, replacement: '[REDACTED_API_KEY]' },
9
- // Bearer / Authorization header values
10
- { pattern: /(Bearer\s+)[A-Za-z0-9._~+\/-]+=*/gi, replacement: '$1[REDACTED_TOKEN]' },
11
- // GitHub tokens
12
- { pattern: /\b(ghp_[A-Za-z0-9]{36,})/g, replacement: '[REDACTED_GITHUB_TOKEN]' },
13
- { pattern: /\b(gho_[A-Za-z0-9]{36,})/g, replacement: '[REDACTED_GITHUB_TOKEN]' },
14
- { pattern: /\b(github_pat_[A-Za-z0-9_]{36,})/g, replacement: '[REDACTED_GITHUB_TOKEN]' },
15
- // GitLab tokens
16
- { pattern: /\b(glpat-[A-Za-z0-9_-]{20,})/g, replacement: '[REDACTED_GITLAB_TOKEN]' },
17
- // Slack tokens
18
- { pattern: /\b(xoxb-[A-Za-z0-9-]{24,})/g, replacement: '[REDACTED_SLACK_TOKEN]' },
19
- { pattern: /\b(xoxp-[A-Za-z0-9-]{24,})/g, replacement: '[REDACTED_SLACK_TOKEN]' },
20
- // AWS access keys
21
- { pattern: /\b(AKIA[A-Z0-9]{16})\b/g, replacement: '[REDACTED_AWS_KEY]' },
22
- // Absolute Unix paths starting from home (e.g. /home/alice/projects/...)
23
- { pattern: /\/home\/[A-Za-z0-9_.-]+/g, replacement: '/home/[REDACTED]' },
24
- // Absolute Unix paths in /Users (macOS)
25
- { pattern: /\/Users\/[A-Za-z0-9_.-]+/g, replacement: '/Users/[REDACTED]' },
26
- // Windows user paths (C:\Users\username\...)
27
- { pattern: /[A-Za-z]:\\Users\\[A-Za-z0-9_.-]+/g, replacement: 'C:\\Users\\[REDACTED]' },
28
- ];
29
- export function redactSensitiveData(text) {
30
- let result = text;
31
- for (const { pattern, replacement } of REDACT_PATTERNS) {
32
- result = result.replace(pattern, replacement);
33
- }
34
- return result;
35
- }
3
+ import { redactSensitiveData } from '../utils/redaction.js';
36
4
  // ── Message redaction helper ─────────────────────────────────────────────────
37
5
  /**
38
6
  * redactMessage - Deep-clone a message and redact all string fields that may
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/hooks/runners/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIzE;;;GAGG;AACH,wBAAsB,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAkDrF"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/hooks/runners/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMzE;;;GAGG;AACH,wBAAsB,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CA+DrF"}
@@ -1,5 +1,7 @@
1
1
  import { logger } from '../../utils/logger.js';
2
2
  import { summarizeError } from '../../utils/error-display.js';
3
+ import { classifyHostTrustTier, extractHostname, emitSsrfDeny } from '../../tools/fetch/trust-tiers.js';
4
+ import { instrumentedFetch } from '../../utils/fetch-with-timeout.js';
3
5
  /**
4
6
  * HTTP hook runner.
5
7
  * POSTs the event JSON to the configured URL and parses the response as HookResult.
@@ -9,13 +11,25 @@ export async function run(hook, event) {
9
11
  if (!url) {
10
12
  return { ok: false, error: 'http hook missing "url" field' };
11
13
  }
14
+ // SEC-08: SSRF tier filter — block requests to internal/private hosts unless
15
+ // the hook definition opts in with allowInternal: true.
16
+ if (!hook.allowInternal) {
17
+ const hostname = extractHostname(url);
18
+ if (hostname !== null) {
19
+ const trustResult = classifyHostTrustTier(hostname);
20
+ if (trustResult.tier === 'blocked') {
21
+ emitSsrfDeny(hostname, url, trustResult.reason);
22
+ return { ok: false, error: `http hook blocked: ${trustResult.reason}` };
23
+ }
24
+ }
25
+ }
12
26
  const timeoutMs = (hook.timeout ?? 30) * 1000;
13
27
  try {
14
28
  const controller = new AbortController();
15
29
  const timer = setTimeout(() => controller.abort(), timeoutMs);
16
30
  let response;
17
31
  try {
18
- response = await fetch(url, {
32
+ response = await instrumentedFetch(url, {
19
33
  method: 'POST',
20
34
  headers: {
21
35
  'Content-Type': 'application/json',
@@ -68,6 +68,13 @@ export interface HookDefinition {
68
68
  name?: string;
69
69
  /** Whether the hook is enabled (default: true) */
70
70
  enabled?: boolean;
71
+ /**
72
+ * For http hooks: when true, bypasses the SEC-08 SSRF tier filter and
73
+ * allows requests to internal/private hosts. Use only in trusted,
74
+ * air-gapped environments where the hook target is a known internal service.
75
+ * Default: false (SSRF filter active).
76
+ */
77
+ allowInternal?: boolean;
71
78
  }
72
79
  /** Hook chain step */
73
80
  export interface ChainStep {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/hooks/types.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,6BAA6B;AAC7B,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzE,4BAA4B;AAC5B,MAAM,MAAM,YAAY,GACpB,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAC7C,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAC5D,YAAY,GAAG,WAAW,GAAG,eAAe,GAAG,eAAe,CAAC;AAEnE,iEAAiE;AACjE,MAAM,MAAM,aAAa,GAAG,GAAG,SAAS,IAAI,YAAY,IAAI,MAAM,EAAE,CAAC;AAErE,oCAAoC;AACpC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,QA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,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,6BAA6B;AAC7B,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;IACzC,yBAAyB;IACzB,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;CACtB"}
@@ -1,3 +1,4 @@
1
+ import { GoodVibesSdkError } from '../../errors/index.js';
1
2
  /**
2
3
  * The three possible outcomes for a single integration delivery attempt.
3
4
  *
@@ -26,9 +27,10 @@ export type DeliveryFailureClass = 'retryable' | 'terminal';
26
27
  */
27
28
  export declare function classifyDeliveryError(error: unknown): DeliveryFailureClass;
28
29
  /** Typed delivery error that carries an explicit failure classification. */
29
- export declare class DeliveryError extends Error {
30
+ export declare class DeliveryError extends GoodVibesSdkError {
30
31
  readonly failureClass: DeliveryFailureClass;
31
32
  readonly statusCode?: number | undefined;
33
+ readonly code: 'DELIVERY_ERROR';
32
34
  constructor(message: string, failureClass: DeliveryFailureClass, statusCode?: number | undefined);
33
35
  }
34
36
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/delivery.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,UAAU,CAAC;AAS5D;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CA6B1E;AAMD,4EAA4E;AAC5E,qBAAa,aAAc,SAAQ,KAAK;aAGpB,YAAY,EAAE,oBAAoB;aAClC,UAAU,CAAC,EAAE,MAAM;gBAFnC,OAAO,EAAE,MAAM,EACC,YAAY,EAA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AC,OAAO,EAAE,eAAe,CAAC;IAClC,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,iCAAiC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,OAAO,GACnB,sBAAsB,CASxB"}
@@ -1,4 +1,5 @@
1
1
  import { logger } from '../utils/logger.js';
2
+ import { GoodVibesSdkError } from '../../errors/index.js';
2
3
  import { summarizeError } from '../utils/error-display.js';
3
4
  // ---------------------------------------------------------------------------
4
5
  // Failure classification
@@ -46,11 +47,11 @@ export function classifyDeliveryError(error) {
46
47
  // DeliveryError — typed error with explicit classification
47
48
  // ---------------------------------------------------------------------------
48
49
  /** Typed delivery error that carries an explicit failure classification. */
49
- export class DeliveryError extends Error {
50
+ export class DeliveryError extends GoodVibesSdkError {
50
51
  failureClass;
51
52
  statusCode;
52
53
  constructor(message, failureClass, statusCode) {
53
- super(message);
54
+ super(message, { code: 'DELIVERY_ERROR', category: 'internal', source: 'runtime', recoverable: false });
54
55
  this.failureClass = failureClass;
55
56
  this.statusCode = statusCode;
56
57
  this.name = 'DeliveryError';
@@ -1 +1 @@
1
- {"version":3,"file":"discord.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/discord.ts"],"names":[],"mappings":"AAOA,mDAAmD;AACnD,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAC;AAEX,yCAAyC;AACzC,eAAO,MAAM,8BAA8B;;;;;CAKjC,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,O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AAS,IAAI,OAAO,CAEvB;YAEa,aAAa;IAwB3B,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,OAAO;CAOhB"}
@@ -1,5 +1,6 @@
1
1
  import { logger } from '../utils/logger.js';
2
2
  import { summarizeError } from '../utils/error-display.js';
3
+ import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
3
4
  // ---------------------------------------------------------------------------
4
5
  // Types
5
6
  // ---------------------------------------------------------------------------
@@ -198,7 +199,7 @@ export class DiscordIntegration {
198
199
  payload.content = content;
199
200
  if (embeds && embeds.length > 0)
200
201
  payload.embeds = embeds;
201
- const res = await fetch(target, {
202
+ const res = await instrumentedFetch(target, {
202
203
  method: 'POST',
203
204
  headers: { 'Content-Type': 'application/json' },
204
205
  body: JSON.stringify(payload),
@@ -222,7 +223,7 @@ export class DiscordIntegration {
222
223
  payload.content = content;
223
224
  if (embeds && embeds.length > 0)
224
225
  payload.embeds = embeds;
225
- const res = await fetch(`https://discord.com/api/v10/channels/${channelId}/messages`, {
226
+ const res = await instrumentedFetch(`https://discord.com/api/v10/channels/${channelId}/messages`, {
226
227
  method: 'POST',
227
228
  headers: {
228
229
  'Content-Type': 'application/json',
@@ -244,7 +245,7 @@ export class DiscordIntegration {
244
245
  const payload = { type };
245
246
  if (data)
246
247
  payload.data = data;
247
- const res = await fetch(`https://discord.com/api/v10/interactions/${interactionId}/${interactionToken}/callback`, {
248
+ const res = await instrumentedFetch(`https://discord.com/api/v10/interactions/${interactionId}/${interactionToken}/callback`, {
248
249
  method: 'POST',
249
250
  headers: { 'Content-Type': 'application/json' },
250
251
  body: JSON.stringify(payload),
@@ -263,7 +264,7 @@ export class DiscordIntegration {
263
264
  const payload = { content };
264
265
  if (embeds && embeds.length > 0)
265
266
  payload.embeds = embeds;
266
- const res = await fetch(`https://discord.com/api/v10/webhooks/${applicationId}/${interactionToken}/messages/@original`, {
267
+ const res = await instrumentedFetch(`https://discord.com/api/v10/webhooks/${applicationId}/${interactionToken}/messages/@original`, {
267
268
  method: 'PATCH',
268
269
  headers: { 'Content-Type': 'application/json' },
269
270
  body: JSON.stringify(payload),
@@ -278,7 +279,7 @@ export class DiscordIntegration {
278
279
  if (!token) {
279
280
  throw new Error(`DiscordIntegration: botToken is required for ${path}`);
280
281
  }
281
- const res = await fetch(`https://discord.com/api/v10${path}`, {
282
+ const res = await instrumentedFetch(`https://discord.com/api/v10${path}`, {
282
283
  method: options.method ?? 'GET',
283
284
  headers: {
284
285
  Authorization: `Bot ${token}`,
@@ -1 +1 @@
1
- {"version":3,"file":"ntfy.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/ntfy.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,GAAG,cAAc,GAAG,MAAM,CAAC;IAChH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,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MAAM;IAepH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAoB7F,mBAAmB,CACvB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACzD,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,IAAI,CAAC;IAgChB,gBAAgB,CACd,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACzD,OAAO,GAAE,oBAAyB,GACjC,SAAS;IAiBZ,OAAO,CAAC,gBAAgB;CAKzB"}
@@ -1,5 +1,6 @@
1
1
  /** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
2
2
  import { fetchWithTimeout } from '../utils/fetch-with-timeout.js';
3
+ import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
3
4
  export class NtfyIntegration {
4
5
  baseUrl;
5
6
  token;
@@ -56,7 +57,7 @@ export class NtfyIntegration {
56
57
  async poll(topic, options = {}) {
57
58
  const url = this.buildSubscribeUrl(topic, 'json', { ...options, poll: true });
58
59
  const headers = this.buildAuthHeaders();
59
- const response = await fetch(url, {
60
+ const response = await instrumentedFetch(url, {
60
61
  method: 'GET',
61
62
  headers,
62
63
  signal: options.signal,
@@ -74,7 +75,7 @@ export class NtfyIntegration {
74
75
  }
75
76
  async subscribeJsonStream(topic, onMessage, options = {}) {
76
77
  const url = this.buildSubscribeUrl(topic, 'json', options);
77
- const response = await fetch(url, {
78
+ const response = await instrumentedFetch(url, {
78
79
  method: 'GET',
79
80
  headers: this.buildAuthHeaders(),
80
81
  signal: options.signal,