@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
@@ -5,6 +5,7 @@ import { buildOperatorContract } from '../../control-plane/operator-contract.js'
5
5
  import { getProviderRuntimeSnapshot, getProviderUsageSnapshot, listProviderRuntimeSnapshots, } from '../../providers/runtime-snapshot.js';
6
6
  import { inspectKnowledgeGraphqlAccess } from '../../knowledge/index.js';
7
7
  import { emitCompanionMessageReceived } from '../../runtime/emitters/session.js';
8
+ import { correlationCtx } from '../../runtime/correlation.js';
8
9
  import { TelemetryApiService } from '../../runtime/telemetry/api.js';
9
10
  import { inspectInboundTls, inspectOutboundTls } from '../../runtime/network/index.js';
10
11
  import { dispatchDaemonApiRoutes } from '../../control-plane/routes/index.js';
@@ -13,6 +14,7 @@ import { createDaemonKnowledgeRouteHandlers } from './knowledge-routes.js';
13
14
  import { createDaemonMediaRouteHandlers } from './media-routes.js';
14
15
  import { createDaemonRemoteRouteHandlers, handleRemotePairRequest, handleRemotePairVerify, handleRemotePeerHeartbeat, handleRemotePeerWorkPull, handleRemotePeerWorkComplete, } from './remote-routes.js';
15
16
  import { createDaemonRuntimeRouteHandlers } from './runtime-routes.js';
17
+ import { snapshotMetrics } from '../../runtime/metrics.js';
16
18
  import { createDaemonControlRouteHandlers } from './control-routes.js';
17
19
  import { createDaemonIntegrationRouteHandlers } from './integration-routes.js';
18
20
  import { createDaemonTelemetryRouteHandlers } from './telemetry-routes.js';
@@ -40,75 +42,77 @@ export class DaemonHttpRouter {
40
42
  this.telemetryApi?.dispose();
41
43
  }
42
44
  async handleRequest(req) {
43
- const url = new URL(req.url);
44
- if (url.pathname === '/login' && req.method === 'POST') {
45
- return this.handleLogin(req);
46
- }
47
- if (url.pathname === '/api/remote/pair/request' && req.method === 'POST') {
48
- return handleRemotePairRequest({
49
- parseJsonBody: (request) => this.parseJsonBody(request),
50
- distributedRuntime: this.context.distributedRuntime,
51
- }, req);
52
- }
53
- if (url.pathname === '/api/remote/pair/verify' && req.method === 'POST') {
54
- return handleRemotePairVerify({
55
- parseJsonBody: (request) => this.parseJsonBody(request),
56
- distributedRuntime: this.context.distributedRuntime,
57
- }, req);
58
- }
59
- if (url.pathname === '/api/remote/heartbeat' && req.method === 'POST') {
60
- return handleRemotePeerHeartbeat({
61
- parseJsonBody: (request) => this.parseJsonBody(request),
62
- requireRemotePeer: (request, scope) => this.context.requireRemotePeer(request, scope),
63
- distributedRuntime: this.context.distributedRuntime,
64
- }, req);
65
- }
66
- if (url.pathname === '/api/remote/work/pull' && req.method === 'POST') {
67
- return handleRemotePeerWorkPull({
68
- parseJsonBody: (request) => this.parseJsonBody(request),
69
- requireRemotePeer: (request, scope) => this.context.requireRemotePeer(request, scope),
70
- distributedRuntime: this.context.distributedRuntime,
71
- }, req);
72
- }
73
- const remoteWorkCompleteMatch = url.pathname.match(/^\/api\/remote\/work\/([^/]+)\/complete$/);
74
- if (remoteWorkCompleteMatch && req.method === 'POST') {
75
- return handleRemotePeerWorkComplete({
76
- parseJsonBody: (request) => this.parseJsonBody(request),
77
- requireRemotePeer: (request, scope) => this.context.requireRemotePeer(request, scope),
78
- distributedRuntime: this.context.distributedRuntime,
79
- }, remoteWorkCompleteMatch[1], req);
80
- }
81
- if (url.pathname === '/webhook/github' && req.method === 'POST') {
82
- return this.handleGitHubWebhook(req);
83
- }
84
- if (url.pathname.startsWith('/webhook/')) {
85
- const pluginResponse = await this.context.channelPlugins.handleInbound(url.pathname, req);
86
- if (pluginResponse)
87
- return pluginResponse;
88
- }
89
- if (url.pathname === '/api/control-plane/web' && req.method === 'GET') {
90
- return this.context.controlPlaneGateway.renderWebUi();
91
- }
92
- if ((url.pathname === '/api/control-plane/auth' || url.pathname === '/api/control-plane/whoami') && req.method === 'GET') {
45
+ return correlationCtx.run({ requestId: req.headers.get('x-request-id') ?? crypto.randomUUID() }, async () => {
46
+ const url = new URL(req.url);
47
+ if (url.pathname === '/login' && req.method === 'POST') {
48
+ return this.handleLogin(req);
49
+ }
50
+ if (url.pathname === '/api/remote/pair/request' && req.method === 'POST') {
51
+ return handleRemotePairRequest({
52
+ parseJsonBody: (request) => this.parseJsonBody(request),
53
+ distributedRuntime: this.context.distributedRuntime,
54
+ }, req);
55
+ }
56
+ if (url.pathname === '/api/remote/pair/verify' && req.method === 'POST') {
57
+ return handleRemotePairVerify({
58
+ parseJsonBody: (request) => this.parseJsonBody(request),
59
+ distributedRuntime: this.context.distributedRuntime,
60
+ }, req);
61
+ }
62
+ if (url.pathname === '/api/remote/heartbeat' && req.method === 'POST') {
63
+ return handleRemotePeerHeartbeat({
64
+ parseJsonBody: (request) => this.parseJsonBody(request),
65
+ requireRemotePeer: (request, scope) => this.context.requireRemotePeer(request, scope),
66
+ distributedRuntime: this.context.distributedRuntime,
67
+ }, req);
68
+ }
69
+ if (url.pathname === '/api/remote/work/pull' && req.method === 'POST') {
70
+ return handleRemotePeerWorkPull({
71
+ parseJsonBody: (request) => this.parseJsonBody(request),
72
+ requireRemotePeer: (request, scope) => this.context.requireRemotePeer(request, scope),
73
+ distributedRuntime: this.context.distributedRuntime,
74
+ }, req);
75
+ }
76
+ const remoteWorkCompleteMatch = url.pathname.match(/^\/api\/remote\/work\/([^/]+)\/complete$/);
77
+ if (remoteWorkCompleteMatch && req.method === 'POST') {
78
+ return handleRemotePeerWorkComplete({
79
+ parseJsonBody: (request) => this.parseJsonBody(request),
80
+ requireRemotePeer: (request, scope) => this.context.requireRemotePeer(request, scope),
81
+ distributedRuntime: this.context.distributedRuntime,
82
+ }, remoteWorkCompleteMatch[1], req);
83
+ }
84
+ if (url.pathname === '/webhook/github' && req.method === 'POST') {
85
+ return this.handleGitHubWebhook(req);
86
+ }
87
+ if (url.pathname.startsWith('/webhook/')) {
88
+ const pluginResponse = await this.context.channelPlugins.handleInbound(url.pathname, req);
89
+ if (pluginResponse)
90
+ return pluginResponse;
91
+ }
92
+ if (url.pathname === '/api/control-plane/web' && req.method === 'GET') {
93
+ return this.context.controlPlaneGateway.renderWebUi();
94
+ }
95
+ if ((url.pathname === '/api/control-plane/auth' || url.pathname === '/api/control-plane/whoami') && req.method === 'GET') {
96
+ const apiResponse = await this.dispatchApiRoutes(req);
97
+ if (apiResponse)
98
+ return apiResponse;
99
+ }
100
+ if (!this.context.checkAuth(req)) {
101
+ return jsonErrorResponse(new AppError('Authentication required', 'AUTH_REQUIRED', false, {
102
+ category: 'authentication',
103
+ source: 'runtime',
104
+ guidance: 'Authenticate with the operator shared token or an authenticated user session before calling daemon APIs.',
105
+ }), { status: 401 });
106
+ }
93
107
  const apiResponse = await this.dispatchApiRoutes(req);
94
108
  if (apiResponse)
95
109
  return apiResponse;
96
- }
97
- if (!this.context.checkAuth(req)) {
98
- return jsonErrorResponse(new AppError('Authentication required', 'AUTH_REQUIRED', false, {
99
- category: 'authentication',
110
+ return jsonErrorResponse(new AppError(`Route not found: ${url.pathname}`, 'NOT_FOUND', false, {
111
+ category: 'not_found',
100
112
  source: 'runtime',
101
- guidance: 'Authenticate with the operator shared token or an authenticated user session before calling daemon APIs.',
102
- }), { status: 401 });
103
- }
104
- const apiResponse = await this.dispatchApiRoutes(req);
105
- if (apiResponse)
106
- return apiResponse;
107
- return jsonErrorResponse(new AppError(`Route not found: ${url.pathname}`, 'NOT_FOUND', false, {
108
- category: 'not_found',
109
- source: 'runtime',
110
- guidance: 'Check the daemon API path and version. New SDK-facing routes are published under /api/v1.',
111
- }), { status: 404 });
113
+ guidance: 'Check the daemon API path and version. New SDK-facing routes are published under /api/v1.',
114
+ }), { status: 404 });
115
+ });
112
116
  }
113
117
  async dispatchApiRoutes(req) {
114
118
  // Companion chat routes — scoped to /api/companion/chat/..., session-isolated.
@@ -295,6 +299,7 @@ export class DaemonHttpRouter {
295
299
  // subscribe and render the companion message in the conversation view.
296
300
  emitCompanionMessageReceived(this.context.runtimeBus, { sessionId, traceId: `companion:${envelope.messageId}`, source: 'companion-followup' }, { sessionId, ...envelope });
297
301
  },
302
+ snapshotMetrics: () => snapshotMetrics(),
298
303
  openSessionEventStream: (req, sessionId) => {
299
304
  // Create a session-scoped SSE stream for the companion app to receive
300
305
  // turn events (STREAM_DELTA, TURN_COMPLETED, etc.) and agent events.
@@ -351,15 +356,34 @@ export class DaemonHttpRouter {
351
356
  });
352
357
  }
353
358
  async parseJsonBody(req) {
359
+ // SEC-05: cap inbound JSON bodies at 1 MiB to prevent memory exhaustion.
360
+ const MAX_JSON_BYTES = 1 * 1024 * 1024; // 1 MiB
361
+ const contentLength = req.headers.get('content-length');
362
+ if (contentLength !== null && Number(contentLength) > MAX_JSON_BYTES) {
363
+ return Response.json({ error: 'Request body too large' }, { status: 413 });
364
+ }
354
365
  try {
355
- return await req.json();
366
+ const text = await req.text();
367
+ if (text.length > MAX_JSON_BYTES) {
368
+ return Response.json({ error: 'Request body too large' }, { status: 413 });
369
+ }
370
+ return this.parseJsonText(text);
356
371
  }
357
372
  catch {
358
373
  return Response.json({ error: 'Invalid JSON body' }, { status: 400 });
359
374
  }
360
375
  }
361
376
  async parseOptionalJsonBody(req) {
377
+ // SEC-05: cap inbound JSON bodies at 1 MiB to prevent memory exhaustion.
378
+ const MAX_JSON_BYTES = 1 * 1024 * 1024; // 1 MiB
379
+ const contentLength = req.headers.get('content-length');
380
+ if (contentLength !== null && Number(contentLength) > MAX_JSON_BYTES) {
381
+ return Response.json({ error: 'Request body too large' }, { status: 413 });
382
+ }
362
383
  const raw = await req.text();
384
+ if (raw.length > MAX_JSON_BYTES) {
385
+ return Response.json({ error: 'Request body too large' }, { status: 413 });
386
+ }
363
387
  if (!raw.trim())
364
388
  return null;
365
389
  return this.parseJsonText(raw);
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-route-types.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/daemon/http/runtime-route-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,yBAAyB,IAAI,4BAA4B,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAA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pB,qBAAqB,GACrB,0BAA0B,GAC1B,wBAAwB,GACxB,0BAA0B,GAC1B,wBAAwB,GACxB,2BAA2B,GAC3B,0BAA0B,GAC1B,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,oBAAoB,GACpB,gBAAgB,GAChB,sBAAsB,CACzB,CAAC"}
@@ -18,6 +18,17 @@ interface HttpListenerConfig {
18
18
  * reverse proxy. Overrides the httpListener.trustProxy config value when set.
19
19
  */
20
20
  trustProxy?: boolean;
21
+ /**
22
+ * When true, CORS enforcement is active:
23
+ * - Constructor refuses to start when hostMode=network and allowedOrigins is empty
24
+ * - Requests carrying an Origin header are validated against allowedOrigins
25
+ * Default: false (permissive — no CORS enforcement). Opt-in for multi-user,
26
+ * internet-exposed, or enterprise deployments where browser-based CSRF is a
27
+ * concern. Home/single-user local deployments do not need this and the default
28
+ * behavior matches pre-0.21.29 semantics. When true, allowedOrigins must be
29
+ * configured (or hostMode must be local/loopback) — see SEC-07.
30
+ */
31
+ enforceCors?: boolean;
21
32
  /** Pre-configured UserAuthManager owned by the runtime service graph. */
22
33
  userAuth: UserAuthManager;
23
34
  }
@@ -40,6 +51,8 @@ export declare class HttpListener {
40
51
  private port;
41
52
  private host;
42
53
  private allowedOrigins;
54
+ /** SEC-07: opt-in strict CORS enforcement. Default false (permissive). */
55
+ private enforceCors;
43
56
  private hookDispatcher;
44
57
  private authToken;
45
58
  private userAuth;
@@ -90,6 +103,7 @@ export declare class HttpListener {
90
103
  private checkAuth;
91
104
  private parseJsonBody;
92
105
  private handleRequest;
106
+ private _handleRequestInner;
93
107
  private handleLogin;
94
108
  private handleWebhook;
95
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"http-listener.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/http-listener.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAMxD,OAAO,EAAE,eAAe,E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AAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3B;;;OAGG;IACH,OAAO,CAAC,gCAAgC;IAwDxC;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAMD,OAAO,CAAC,SAAS;YAOH,aAAa;YAsBb,aAAa;YAiCb,mBAAmB;YA4DnB,WAAW;YAiDX,aAAa;CAgD5B"}
@@ -1,4 +1,6 @@
1
+ import { randomUUID } from 'node:crypto';
1
2
  import { logger } from '../utils/logger.js';
3
+ import { authFailureTotal, authSuccessTotal, httpRequestDurationMs, httpRequestsTotal, } from '../runtime/metrics.js';
2
4
  import { HookDispatcher } from '../hooks/dispatcher.js';
3
5
  import { authenticateOperatorRequest, buildOperatorSessionCookie, } from '../security/http-auth.js';
4
6
  import { UserAuthManager } from '../security/user-auth.js';
@@ -8,68 +10,7 @@ import { summarizeError } from '../utils/error-display.js';
8
10
  import { requirePortAvailable } from './port-check.js';
9
11
  import { resolveHostBinding } from './host-resolver.js';
10
12
  import { createHostModeRestartWatcher } from './host-mode-watcher.js';
11
- // ---------------------------------------------------------------------------
12
- // Rate limiter (sliding window per IP, in-memory)
13
- // ---------------------------------------------------------------------------
14
- const RATE_WINDOW_MS = 60_000;
15
- /** Entries older than this are eligible for TTL eviction. Default: 10 minutes. */
16
- const RATE_TTL_MS = 10 * 60_000;
17
- /** Maximum number of IP entries kept in the limiter at any time (LRU eviction). */
18
- const RATE_MAX_ENTRIES = 10_000;
19
- /** How often the background sweep runs to evict expired entries (ms). */
20
- const RATE_SWEEP_INTERVAL_MS = 60_000;
21
- class RateLimiter {
22
- limit;
23
- /** hits[ip] = sorted ascending array of request timestamps within the window */
24
- counts = new Map();
25
- /** Insertion-order LRU: tracks which IP was most recently active */
26
- accessOrder = [];
27
- sweepInterval = null;
28
- constructor(limit) {
29
- this.limit = limit;
30
- // Periodic sweep to evict entries whose TTL has expired (C5 fix)
31
- this.sweepInterval = setInterval(() => this._sweep(), RATE_SWEEP_INTERVAL_MS);
32
- }
33
- /** Returns true if the request is allowed, false if rate-limited. */
34
- check(ip) {
35
- const now = Date.now();
36
- const windowStart = now - RATE_WINDOW_MS;
37
- const hits = (this.counts.get(ip) ?? []).filter((t) => t > windowStart);
38
- hits.push(now);
39
- this.counts.set(ip, hits);
40
- // Maintain LRU access order
41
- const idx = this.accessOrder.indexOf(ip);
42
- if (idx !== -1)
43
- this.accessOrder.splice(idx, 1);
44
- this.accessOrder.push(ip);
45
- // Evict oldest entry when cap is exceeded
46
- if (this.accessOrder.length > RATE_MAX_ENTRIES) {
47
- const evict = this.accessOrder.shift();
48
- this.counts.delete(evict);
49
- }
50
- return hits.length <= this.limit;
51
- }
52
- /** Stop the background sweep interval. Call this when the listener stops. */
53
- stop() {
54
- if (this.sweepInterval !== null) {
55
- clearInterval(this.sweepInterval);
56
- this.sweepInterval = null;
57
- }
58
- }
59
- /** Evict entries whose last-seen timestamp is older than RATE_TTL_MS. */
60
- _sweep() {
61
- const cutoff = Date.now() - RATE_TTL_MS;
62
- for (const [ip, hits] of this.counts) {
63
- // If the most recent hit is older than TTL, the entry is stale
64
- if (hits.length === 0 || hits[hits.length - 1] < cutoff) {
65
- this.counts.delete(ip);
66
- const idx = this.accessOrder.indexOf(ip);
67
- if (idx !== -1)
68
- this.accessOrder.splice(idx, 1);
69
- }
70
- }
71
- }
72
- }
13
+ import { RateLimiter } from './http/rate-limiter.js';
73
14
  // ---------------------------------------------------------------------------
74
15
  // HttpListener
75
16
  // ---------------------------------------------------------------------------
@@ -89,6 +30,8 @@ export class HttpListener {
89
30
  port;
90
31
  host;
91
32
  allowedOrigins;
33
+ /** SEC-07: opt-in strict CORS enforcement. Default false (permissive). */
34
+ enforceCors;
92
35
  hookDispatcher;
93
36
  authToken = null;
94
37
  userAuth;
@@ -115,14 +58,17 @@ export class HttpListener {
115
58
  this.port = config.port ?? resolvedHttpBinding.port;
116
59
  this.host = config.host ?? resolvedHttpBinding.host;
117
60
  this.allowedOrigins = config.allowedOrigins ?? [];
118
- // SEC-07: Refuse to construct when hostMode=network and allowedOrigins is not configured.
119
- // An empty allowedOrigins combined with a network-reachable bind is an open CSRF vector —
120
- // any browser-initiated cross-origin request will carry an Origin header and be accepted.
121
- const effectiveHostMode = this.configManager.get('httpListener.hostMode') ?? 'local';
122
- if (effectiveHostMode === 'network' && this.allowedOrigins.length === 0) {
123
- throw new Error('SECURITY_UNSAFE_ORIGIN_CONFIG: hostMode=network requires non-empty allowedOrigins to prevent CSRF. '
124
- + 'Set config.httpListener.allowedOrigins to a list of trusted origins '
125
- + "(e.g. ['https://companion.example.com']).");
61
+ this.enforceCors = config.enforceCors ?? false;
62
+ // SEC-07: When enforceCors is true, refuse to construct with hostMode=network + empty allowedOrigins.
63
+ // Off by default home and single-user local deployments don't need CORS enforcement.
64
+ // Enterprise / multi-user / internet-exposed deployments set enforceCors: true to gate against CSRF.
65
+ if (this.enforceCors) {
66
+ const effectiveHostMode = this.configManager.get('httpListener.hostMode') ?? 'local';
67
+ if (effectiveHostMode === 'network' && this.allowedOrigins.length === 0) {
68
+ throw new Error('SECURITY_UNSAFE_ORIGIN_CONFIG: hostMode=network with enforceCors=true requires non-empty allowedOrigins. '
69
+ + 'Set config.httpListener.allowedOrigins to a list of trusted origins '
70
+ + "(e.g. ['https://companion.example.com']), or leave enforceCors unset for permissive mode.");
71
+ }
126
72
  }
127
73
  this.hookDispatcher = config.hookDispatcher ?? null;
128
74
  this.userAuth = config.userAuth;
@@ -288,8 +234,18 @@ export class HttpListener {
288
234
  }) !== null;
289
235
  }
290
236
  async parseJsonBody(req) {
237
+ // SEC-05: cap inbound JSON bodies at 1 MiB to prevent memory exhaustion.
238
+ const MAX_JSON_BYTES = 1 * 1024 * 1024; // 1 MiB
239
+ const contentLength = req.headers.get('content-length');
240
+ if (contentLength !== null && Number(contentLength) > MAX_JSON_BYTES) {
241
+ return Response.json({ error: 'Request body too large' }, { status: 413 });
242
+ }
291
243
  try {
292
- return await req.json();
244
+ const text = await req.text();
245
+ if (text.length > MAX_JSON_BYTES) {
246
+ return Response.json({ error: 'Request body too large' }, { status: 413 });
247
+ }
248
+ return JSON.parse(text);
293
249
  }
294
250
  catch {
295
251
  return Response.json({ error: 'Invalid JSON body' }, { status: 400 });
@@ -299,23 +255,53 @@ export class HttpListener {
299
255
  // Request handling
300
256
  // -------------------------------------------------------------------------
301
257
  async handleRequest(req) {
258
+ const requestId = randomUUID();
259
+ const startMs = Date.now();
302
260
  const url = new URL(req.url);
303
261
  const clientIp = extractForwardedClientIp(req, this.trustProxy || (this.tlsState?.trustProxy ?? false)) ?? 'unknown';
304
- // SEC-07: CORS origin check applies to ALL paths (including /login).
305
- // Logic:
262
+ let response = null;
263
+ try {
264
+ response = await this._handleRequestInner(req, url, clientIp, requestId);
265
+ return response;
266
+ }
267
+ finally {
268
+ const status = response?.status ?? 500;
269
+ const latencyMs = Date.now() - startMs;
270
+ // OBS-01: structured HTTP access log — SIEM-ingestable
271
+ logger.info('HTTP_ACCESS_LOG', {
272
+ type: 'HTTP_ACCESS_LOG',
273
+ requestId,
274
+ method: req.method,
275
+ path: url.pathname,
276
+ status,
277
+ latencyMs,
278
+ clientIp,
279
+ });
280
+ // C-1: record HTTP metric instruments
281
+ const statusClass = status >= 500 ? '5xx' : status >= 400 ? '4xx' : '2xx';
282
+ const pathPattern = url.pathname.replace(/\/[0-9a-f-]{8,}(?=\/|$)/gi, '/:id');
283
+ httpRequestsTotal.add(1, { method: req.method, status_class: statusClass });
284
+ httpRequestDurationMs.record(latencyMs, { method: req.method, path_pattern: pathPattern, status_class: statusClass });
285
+ }
286
+ }
287
+ async _handleRequestInner(req, url, clientIp, requestId) {
288
+ // SEC-07: CORS origin check is OPT-IN via enforceCors. Default is permissive
289
+ // (home/single-user deployments) — pre-0.21.29 behavior preserved. When
290
+ // enforceCors is true:
306
291
  // - No Origin header → same-origin or non-browser request → allow.
307
- // - Origin present + allowedOrigins empty → no allowlist configured; block to
308
- // prevent CSRF even when hostMode is not 'network' (e.g. 'auto' with a
309
- // network-reachable bind). Constructor already refuses hostMode=network with
310
- // empty allowedOrigins at startup, but defence-in-depth covers the request path.
292
+ // - Origin present + allowedOrigins empty → no allowlist configured; 403 CORS_NOT_CONFIGURED.
293
+ // (Constructor already refuses hostMode=network + empty allowlist at startup; this is
294
+ // defence-in-depth for non-network modes configured with enforceCors.)
311
295
  // - Origin present + allowedOrigins non-empty → check allowlist.
312
- const origin = req.headers.get('origin');
313
- if (origin !== null) {
314
- if (this.allowedOrigins.length === 0) {
315
- return Response.json({ error: 'CORS_NOT_CONFIGURED: no allowedOrigins set' }, { status: 403 });
316
- }
317
- if (!this.allowedOrigins.includes(origin)) {
318
- return Response.json({ error: 'ORIGIN_NOT_ALLOWED' }, { status: 403 });
296
+ if (this.enforceCors) {
297
+ const origin = req.headers.get('origin');
298
+ if (origin !== null) {
299
+ if (this.allowedOrigins.length === 0) {
300
+ return Response.json({ error: 'CORS_NOT_CONFIGURED: no allowedOrigins set' }, { status: 403 });
301
+ }
302
+ if (!this.allowedOrigins.includes(origin)) {
303
+ return Response.json({ error: 'ORIGIN_NOT_ALLOWED' }, { status: 403 });
304
+ }
319
305
  }
320
306
  }
321
307
  // SEC-03: /login route handled AFTER origin check and under its own tight
@@ -325,7 +311,7 @@ export class HttpListener {
325
311
  if (!this.loginRateLimiter.check(clientIp)) {
326
312
  return Response.json({ error: 'Too many requests' }, { status: 429 });
327
313
  }
328
- return this.handleLogin(req);
314
+ return this.handleLogin(req, clientIp, requestId);
329
315
  }
330
316
  // General rate limiting for all other routes.
331
317
  if (!this.rateLimiter.check(clientIp)) {
@@ -344,7 +330,7 @@ export class HttpListener {
344
330
  }
345
331
  return Response.json({ error: 'Not found' }, { status: 404 });
346
332
  }
347
- async handleLogin(req) {
333
+ async handleLogin(req, clientIp, requestId) {
348
334
  const body = await this.parseJsonBody(req);
349
335
  if (body instanceof Response)
350
336
  return body;
@@ -352,9 +338,29 @@ export class HttpListener {
352
338
  const password = typeof body.password === 'string' ? body.password : '';
353
339
  const user = this.userAuth.authenticate(username, password);
354
340
  if (!user) {
341
+ // OBS-02: AUTH_FAILED — never log credential values
342
+ logger.warn('AUTH_FAILED', {
343
+ type: 'AUTH_FAILED',
344
+ requestId,
345
+ usernameAttempted: username,
346
+ clientIp,
347
+ reason: 'invalid_credentials',
348
+ });
349
+ // C-1: record auth failure metric
350
+ authFailureTotal.add(1);
355
351
  return Response.json({ error: 'Invalid credentials' }, { status: 401 });
356
352
  }
357
353
  const session = this.userAuth.createSession(user.username);
354
+ // OBS-02: AUTH_SUCCEEDED — never log credential values
355
+ // C-1: record auth success metric
356
+ authSuccessTotal.add(1);
357
+ logger.info('AUTH_SUCCEEDED', {
358
+ type: 'AUTH_SUCCEEDED',
359
+ requestId,
360
+ username: user.username,
361
+ clientIp,
362
+ method: 'password',
363
+ });
358
364
  return Response.json({
359
365
  authenticated: true,
360
366
  token: session.token,
@@ -1 +1 @@
1
- {"version":3,"file":"surface-delivery.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/daemon/surface-delivery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAK7G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGtD,KAAK,eAAe,GAChB,OAAO,GACP,SAAS,GACT,MAAM,GACN,SAAS,GACT,UAAU,GACV,aAAa,GACb,QAAQ,GACR,UAAU,GACV,UAAU,GACV,SAAS,GACT,aAAa,GACb,YAAY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MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBpF,wBAAwB,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBtF,qBAAqB,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBnF,wBAAwB,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCtF,oBAAoB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCzE,kBAAkB,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,SAAS;IAS5G,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAKxD,OAAO,CAAC,wBAAwB;IAmE1B,0BAA0B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAyChG,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBlG,yBAAyB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB/F,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CA0BzG"}
@@ -3,6 +3,7 @@ import { SlackIntegration, DiscordIntegration, NtfyIntegration } from '../integr
3
3
  import { logger } from '../utils/logger.js';
4
4
  import { validatePublicWebhookUrl } from '../utils/url-safety.js';
5
5
  import { summarizeError } from '../utils/error-display.js';
6
+ import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
6
7
  function isSupportedDeliverySurface(surface) {
7
8
  return surface === 'slack'
8
9
  || surface === 'discord'
@@ -116,7 +117,7 @@ export class DaemonSurfaceDeliveryHelper {
116
117
  ?? process.env.SLACK_BOT_TOKEN;
117
118
  const slack = new SlackIntegration(webhookUrl ?? undefined, botToken ?? undefined);
118
119
  if (pending.responseUrl) {
119
- await fetch(pending.responseUrl, {
120
+ await instrumentedFetch(pending.responseUrl, {
120
121
  method: 'POST',
121
122
  headers: { 'Content-Type': 'application/json' },
122
123
  body: JSON.stringify({
@@ -153,7 +154,7 @@ export class DaemonSurfaceDeliveryHelper {
153
154
  ?? process.env.SLACK_BOT_TOKEN;
154
155
  const slack = new SlackIntegration(webhookUrl ?? undefined, botToken ?? undefined);
155
156
  if (pending.responseUrl) {
156
- await fetch(pending.responseUrl, {
157
+ await instrumentedFetch(pending.responseUrl, {
157
158
  method: 'POST',
158
159
  headers: { 'Content-Type': 'application/json' },
159
160
  body: JSON.stringify({
@@ -237,7 +238,7 @@ export class DaemonSurfaceDeliveryHelper {
237
238
  else if (secret && pending.callbackSignature === 'shared-secret') {
238
239
  headers.set('X-Goodvibes-Webhook-Secret', secret);
239
240
  }
240
- await fetch(validation.url, {
241
+ await instrumentedFetch(validation.url, {
241
242
  method: 'POST',
242
243
  headers,
243
244
  signal: AbortSignal.timeout(timeoutMs),
@@ -379,7 +380,7 @@ export class DaemonSurfaceDeliveryHelper {
379
380
  ]
380
381
  : undefined;
381
382
  if (typeof binding.metadata.responseUrl === 'string' && binding.metadata.responseUrl.startsWith('https://')) {
382
- await fetch(binding.metadata.responseUrl, {
383
+ await instrumentedFetch(binding.metadata.responseUrl, {
383
384
  method: 'POST',
384
385
  headers: { 'Content-Type': 'application/json' },
385
386
  body: JSON.stringify({
@@ -450,7 +451,7 @@ export class DaemonSurfaceDeliveryHelper {
450
451
  if (secret) {
451
452
  headers.set('X-Goodvibes-Signature', this.signWebhookPayload(payload, secret));
452
453
  }
453
- await fetch(validation.url, {
454
+ await instrumentedFetch(validation.url, {
454
455
  method: 'POST',
455
456
  headers,
456
457
  body: payload,
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-scanner.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/discovery/mcp-scanner.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAIlE,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,kCAAkC;IAClC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,eAAe,CAAC,GAAG;IAC7F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AA4KF;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,iBAAiB,EACxB,eAAe,GAAE,GAAG,CAAC,MAAM,CAAa,GACvC,OAAO,CAAC,kBAAkB,CAAC,CAiC7B"}
1
+ {"version":3,"file":"mcp-scanner.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/discovery/mcp-scanner.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAIlE,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,kCAAkC;IAClC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,eAAe,CAAC,GAAG;IAC7F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AA4KF;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,iBAAiB,EACxB,eAAe,GAAE,GAAG,CAAC,MAAM,CAAa,GACvC,OAAO,CAAC,kBAAkB,CAAC,CAwC7B"}