@pellux/goodvibes-sdk 0.21.30 → 0.21.34

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 (307) 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/config/manager.d.ts.map +1 -1
  41. package/dist/_internal/platform/config/manager.js +2 -1
  42. package/dist/_internal/platform/config/schema-domain-runtime.d.ts +6 -0
  43. package/dist/_internal/platform/config/schema-domain-runtime.d.ts.map +1 -1
  44. package/dist/_internal/platform/config/schema-domain-runtime.js +22 -0
  45. package/dist/_internal/platform/config/schema-types.d.ts +16 -2
  46. package/dist/_internal/platform/config/schema-types.d.ts.map +1 -1
  47. package/dist/_internal/platform/config/schema.d.ts.map +1 -1
  48. package/dist/_internal/platform/config/schema.js +1 -0
  49. package/dist/_internal/platform/config/service-registry.d.ts.map +1 -1
  50. package/dist/_internal/platform/config/service-registry.js +2 -1
  51. package/dist/_internal/platform/control-plane/gateway-web-ui.d.ts +0 -1
  52. package/dist/_internal/platform/control-plane/gateway-web-ui.d.ts.map +1 -1
  53. package/dist/_internal/platform/control-plane/gateway-web-ui.js +7 -6
  54. package/dist/_internal/platform/control-plane/session-broker.d.ts.map +1 -1
  55. package/dist/_internal/platform/control-plane/session-broker.js +12 -4
  56. package/dist/_internal/platform/core/orchestrator-tool-runtime.d.ts.map +1 -1
  57. package/dist/_internal/platform/core/orchestrator-tool-runtime.js +6 -6
  58. package/dist/_internal/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
  59. package/dist/_internal/platform/core/orchestrator-turn-loop.js +10 -2
  60. package/dist/_internal/platform/daemon/facade-composition.d.ts +4 -131
  61. package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
  62. package/dist/_internal/platform/daemon/facade-composition.js +9 -10
  63. package/dist/_internal/platform/daemon/facade-types.d.ts +141 -0
  64. package/dist/_internal/platform/daemon/facade-types.d.ts.map +1 -0
  65. package/dist/_internal/platform/daemon/facade-types.js +1 -0
  66. package/dist/_internal/platform/daemon/http/rate-limiter.d.ts +23 -0
  67. package/dist/_internal/platform/daemon/http/rate-limiter.d.ts.map +1 -0
  68. package/dist/_internal/platform/daemon/http/rate-limiter.js +71 -0
  69. package/dist/_internal/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
  70. package/dist/_internal/platform/daemon/http/router-route-contexts.js +2 -1
  71. package/dist/_internal/platform/daemon/http/router.d.ts.map +1 -1
  72. package/dist/_internal/platform/daemon/http/router.js +70 -65
  73. package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
  74. package/dist/_internal/platform/daemon/http-listener.d.ts +1 -0
  75. package/dist/_internal/platform/daemon/http-listener.d.ts.map +1 -1
  76. package/dist/_internal/platform/daemon/http-listener.js +53 -73
  77. package/dist/_internal/platform/daemon/surface-delivery.d.ts.map +1 -1
  78. package/dist/_internal/platform/daemon/surface-delivery.js +6 -5
  79. package/dist/_internal/platform/discovery/mcp-scanner.d.ts.map +1 -1
  80. package/dist/_internal/platform/discovery/mcp-scanner.js +28 -22
  81. package/dist/_internal/platform/discovery/scanner.d.ts.map +1 -1
  82. package/dist/_internal/platform/discovery/scanner.js +38 -22
  83. package/dist/_internal/platform/export/session-export.d.ts +0 -1
  84. package/dist/_internal/platform/export/session-export.d.ts.map +1 -1
  85. package/dist/_internal/platform/export/session-export.js +1 -33
  86. package/dist/_internal/platform/hooks/runners/http.d.ts.map +1 -1
  87. package/dist/_internal/platform/hooks/runners/http.js +2 -1
  88. package/dist/_internal/platform/integrations/delivery.d.ts +3 -1
  89. package/dist/_internal/platform/integrations/delivery.d.ts.map +1 -1
  90. package/dist/_internal/platform/integrations/delivery.js +3 -2
  91. package/dist/_internal/platform/integrations/discord.d.ts.map +1 -1
  92. package/dist/_internal/platform/integrations/discord.js +6 -5
  93. package/dist/_internal/platform/integrations/ntfy.d.ts.map +1 -1
  94. package/dist/_internal/platform/integrations/ntfy.js +3 -2
  95. package/dist/_internal/platform/integrations/webhooks.d.ts.map +1 -1
  96. package/dist/_internal/platform/integrations/webhooks.js +2 -1
  97. package/dist/_internal/platform/intelligence/lsp/binary-downloader.d.ts.map +1 -1
  98. package/dist/_internal/platform/intelligence/lsp/binary-downloader.js +4 -3
  99. package/dist/_internal/platform/knowledge/store.d.ts.map +1 -1
  100. package/dist/_internal/platform/knowledge/store.js +50 -25
  101. package/dist/_internal/platform/mcp/client.d.ts.map +1 -1
  102. package/dist/_internal/platform/mcp/client.js +3 -2
  103. package/dist/_internal/platform/media/builtin-generation-providers.d.ts.map +1 -1
  104. package/dist/_internal/platform/media/builtin-generation-providers.js +4 -3
  105. package/dist/_internal/platform/media/builtin-image-understanding.d.ts.map +1 -1
  106. package/dist/_internal/platform/media/builtin-image-understanding.js +5 -4
  107. package/dist/_internal/platform/providers/anthropic-compat.d.ts.map +1 -1
  108. package/dist/_internal/platform/providers/anthropic-compat.js +5 -3
  109. package/dist/_internal/platform/providers/anthropic.d.ts.map +1 -1
  110. package/dist/_internal/platform/providers/anthropic.js +10 -7
  111. package/dist/_internal/platform/providers/builtin-catalog.d.ts.map +1 -1
  112. package/dist/_internal/platform/providers/builtin-catalog.js +3 -2
  113. package/dist/_internal/platform/providers/catalogue.d.ts +56 -0
  114. package/dist/_internal/platform/providers/catalogue.d.ts.map +1 -0
  115. package/dist/_internal/platform/providers/catalogue.js +111 -0
  116. package/dist/_internal/platform/providers/context-discovery.d.ts.map +1 -1
  117. package/dist/_internal/platform/providers/context-discovery.js +2 -1
  118. package/dist/_internal/platform/providers/credentials.d.ts +12 -0
  119. package/dist/_internal/platform/providers/credentials.d.ts.map +1 -0
  120. package/dist/_internal/platform/providers/credentials.js +54 -0
  121. package/dist/_internal/platform/providers/gemini.d.ts.map +1 -1
  122. package/dist/_internal/platform/providers/gemini.js +6 -5
  123. package/dist/_internal/platform/providers/github-copilot.d.ts.map +1 -1
  124. package/dist/_internal/platform/providers/github-copilot.js +2 -1
  125. package/dist/_internal/platform/providers/health.d.ts +15 -0
  126. package/dist/_internal/platform/providers/health.d.ts.map +1 -0
  127. package/dist/_internal/platform/providers/health.js +32 -0
  128. package/dist/_internal/platform/providers/llama-cpp.d.ts.map +1 -1
  129. package/dist/_internal/platform/providers/llama-cpp.js +5 -3
  130. package/dist/_internal/platform/providers/lm-studio.d.ts.map +1 -1
  131. package/dist/_internal/platform/providers/lm-studio.js +5 -3
  132. package/dist/_internal/platform/providers/model-benchmarks.d.ts.map +1 -1
  133. package/dist/_internal/platform/providers/model-benchmarks.js +2 -1
  134. package/dist/_internal/platform/providers/model-catalog-cache.d.ts.map +1 -1
  135. package/dist/_internal/platform/providers/model-catalog-cache.js +2 -1
  136. package/dist/_internal/platform/providers/model-limits.d.ts.map +1 -1
  137. package/dist/_internal/platform/providers/model-limits.js +2 -1
  138. package/dist/_internal/platform/providers/ollama.d.ts.map +1 -1
  139. package/dist/_internal/platform/providers/ollama.js +5 -3
  140. package/dist/_internal/platform/providers/openai-codex.d.ts.map +1 -1
  141. package/dist/_internal/platform/providers/openai-codex.js +4 -2
  142. package/dist/_internal/platform/providers/openai-compat.d.ts.map +1 -1
  143. package/dist/_internal/platform/providers/openai-compat.js +3 -2
  144. package/dist/_internal/platform/providers/provider-not-found-error.d.ts +3 -1
  145. package/dist/_internal/platform/providers/provider-not-found-error.d.ts.map +1 -1
  146. package/dist/_internal/platform/providers/provider-not-found-error.js +3 -4
  147. package/dist/_internal/platform/providers/well-known-endpoints.d.ts +53 -0
  148. package/dist/_internal/platform/providers/well-known-endpoints.d.ts.map +1 -0
  149. package/dist/_internal/platform/providers/well-known-endpoints.js +52 -0
  150. package/dist/_internal/platform/runtime/auth/oauth-core.d.ts.map +1 -1
  151. package/dist/_internal/platform/runtime/auth/oauth-core.js +2 -1
  152. package/dist/_internal/platform/runtime/contracts/index.d.ts.map +1 -1
  153. package/dist/_internal/platform/runtime/contracts/index.js +1 -5
  154. package/dist/_internal/platform/runtime/contracts/migrations/schemas.d.ts +57 -0
  155. package/dist/_internal/platform/runtime/contracts/migrations/schemas.d.ts.map +1 -0
  156. package/dist/_internal/platform/runtime/contracts/migrations/schemas.js +157 -0
  157. package/dist/_internal/platform/runtime/correlation.d.ts +44 -0
  158. package/dist/_internal/platform/runtime/correlation.d.ts.map +1 -0
  159. package/dist/_internal/platform/runtime/correlation.js +40 -0
  160. package/dist/_internal/platform/runtime/emitters/security.d.ts +32 -0
  161. package/dist/_internal/platform/runtime/emitters/security.d.ts.map +1 -1
  162. package/dist/_internal/platform/runtime/emitters/security.js +26 -0
  163. package/dist/_internal/platform/runtime/emitters/tools.d.ts +11 -2
  164. package/dist/_internal/platform/runtime/emitters/tools.d.ts.map +1 -1
  165. package/dist/_internal/platform/runtime/emitters/tools.js +27 -0
  166. package/dist/_internal/platform/runtime/emitters/transport.d.ts +27 -0
  167. package/dist/_internal/platform/runtime/emitters/transport.d.ts.map +1 -1
  168. package/dist/_internal/platform/runtime/emitters/transport.js +19 -0
  169. package/dist/_internal/platform/runtime/emitters/turn.d.ts +22 -1
  170. package/dist/_internal/platform/runtime/emitters/turn.d.ts.map +1 -1
  171. package/dist/_internal/platform/runtime/emitters/turn.js +9 -0
  172. package/dist/_internal/platform/runtime/events/index.d.ts +45 -0
  173. package/dist/_internal/platform/runtime/events/index.d.ts.map +1 -1
  174. package/dist/_internal/platform/runtime/events/index.js +108 -14
  175. package/dist/_internal/platform/runtime/events/ops.d.ts +8 -0
  176. package/dist/_internal/platform/runtime/events/ops.d.ts.map +1 -1
  177. package/dist/_internal/platform/runtime/events/security.d.ts +47 -0
  178. package/dist/_internal/platform/runtime/events/security.d.ts.map +1 -1
  179. package/dist/_internal/platform/runtime/events/tools.d.ts +14 -2
  180. package/dist/_internal/platform/runtime/events/tools.d.ts.map +1 -1
  181. package/dist/_internal/platform/runtime/events/transport.d.ts +31 -0
  182. package/dist/_internal/platform/runtime/events/transport.d.ts.map +1 -1
  183. package/dist/_internal/platform/runtime/events/turn.d.ts +25 -1
  184. package/dist/_internal/platform/runtime/events/turn.d.ts.map +1 -1
  185. package/dist/_internal/platform/runtime/events/workspace.d.ts +16 -0
  186. package/dist/_internal/platform/runtime/events/workspace.d.ts.map +1 -1
  187. package/dist/_internal/platform/runtime/llm-observability.d.ts +43 -0
  188. package/dist/_internal/platform/runtime/llm-observability.d.ts.map +1 -0
  189. package/dist/_internal/platform/runtime/llm-observability.js +107 -0
  190. package/dist/_internal/platform/runtime/metrics.d.ts +49 -0
  191. package/dist/_internal/platform/runtime/metrics.d.ts.map +1 -0
  192. package/dist/_internal/platform/runtime/metrics.js +114 -0
  193. package/dist/_internal/platform/runtime/ops/control-plane.d.ts +5 -2
  194. package/dist/_internal/platform/runtime/ops/control-plane.d.ts.map +1 -1
  195. package/dist/_internal/platform/runtime/ops/control-plane.js +5 -4
  196. package/dist/_internal/platform/runtime/permissions/divergence-dashboard.d.ts +3 -1
  197. package/dist/_internal/platform/runtime/permissions/divergence-dashboard.d.ts.map +1 -1
  198. package/dist/_internal/platform/runtime/permissions/divergence-dashboard.js +3 -2
  199. package/dist/_internal/platform/runtime/permissions/policy-loader.d.ts +3 -1
  200. package/dist/_internal/platform/runtime/permissions/policy-loader.d.ts.map +1 -1
  201. package/dist/_internal/platform/runtime/permissions/policy-loader.js +3 -2
  202. package/dist/_internal/platform/runtime/permissions/policy-signer.d.ts.map +1 -1
  203. package/dist/_internal/platform/runtime/permissions/policy-signer.js +7 -2
  204. package/dist/_internal/platform/runtime/permissions/simulation.d.ts +3 -1
  205. package/dist/_internal/platform/runtime/permissions/simulation.d.ts.map +1 -1
  206. package/dist/_internal/platform/runtime/permissions/simulation.js +3 -2
  207. package/dist/_internal/platform/runtime/remote/transport-contract.d.ts +14 -2
  208. package/dist/_internal/platform/runtime/remote/transport-contract.d.ts.map +1 -1
  209. package/dist/_internal/platform/runtime/remote/transport-contract.js +7 -5
  210. package/dist/_internal/platform/runtime/store/helpers/reducers/sync.d.ts.map +1 -1
  211. package/dist/_internal/platform/runtime/store/helpers/reducers/sync.js +12 -1
  212. package/dist/_internal/platform/runtime/tasks/manager.d.ts +7 -3
  213. package/dist/_internal/platform/runtime/tasks/manager.d.ts.map +1 -1
  214. package/dist/_internal/platform/runtime/tasks/manager.js +7 -6
  215. package/dist/_internal/platform/runtime/telemetry/api-helpers.d.ts +14 -0
  216. package/dist/_internal/platform/runtime/telemetry/api-helpers.d.ts.map +1 -1
  217. package/dist/_internal/platform/runtime/telemetry/api-helpers.js +59 -0
  218. package/dist/_internal/platform/runtime/telemetry/api.d.ts.map +1 -1
  219. package/dist/_internal/platform/runtime/telemetry/api.js +9 -2
  220. package/dist/_internal/platform/runtime/telemetry/exporters/otlp.d.ts.map +1 -1
  221. package/dist/_internal/platform/runtime/telemetry/exporters/otlp.js +19 -6
  222. package/dist/_internal/platform/runtime/telemetry/exporters/queue.d.ts.map +1 -1
  223. package/dist/_internal/platform/runtime/telemetry/exporters/queue.js +11 -4
  224. package/dist/_internal/platform/runtime/telemetry/meter.d.ts.map +1 -1
  225. package/dist/_internal/platform/runtime/telemetry/meter.js +7 -3
  226. package/dist/_internal/platform/runtime/telemetry/redaction-config.d.ts +9 -0
  227. package/dist/_internal/platform/runtime/telemetry/redaction-config.d.ts.map +1 -0
  228. package/dist/_internal/platform/runtime/telemetry/redaction-config.js +52 -0
  229. package/dist/_internal/platform/runtime/tools/phases/budget.d.ts.map +1 -1
  230. package/dist/_internal/platform/runtime/tools/phases/budget.js +3 -2
  231. package/dist/_internal/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
  232. package/dist/_internal/platform/runtime/transports/daemon-http-client.js +138 -17
  233. package/dist/_internal/platform/scheduler/scheduler.d.ts.map +1 -1
  234. package/dist/_internal/platform/scheduler/scheduler.js +6 -2
  235. package/dist/_internal/platform/sessions/manager.d.ts.map +1 -1
  236. package/dist/_internal/platform/sessions/manager.js +6 -2
  237. package/dist/_internal/platform/state/memory-embedding-http.d.ts.map +1 -1
  238. package/dist/_internal/platform/state/memory-embedding-http.js +3 -2
  239. package/dist/_internal/platform/state/project-index.d.ts.map +1 -1
  240. package/dist/_internal/platform/state/project-index.js +6 -4
  241. package/dist/_internal/platform/tools/agent/index.d.ts.map +1 -1
  242. package/dist/_internal/platform/tools/agent/index.js +2 -1
  243. package/dist/_internal/platform/tools/analyze/git-modes.d.ts.map +1 -1
  244. package/dist/_internal/platform/tools/analyze/git-modes.js +2 -1
  245. package/dist/_internal/platform/tools/edit/core.d.ts.map +1 -1
  246. package/dist/_internal/platform/tools/edit/core.js +2 -1
  247. package/dist/_internal/platform/tools/exec/runtime.d.ts.map +1 -1
  248. package/dist/_internal/platform/tools/exec/runtime.js +3 -2
  249. package/dist/_internal/platform/tools/fetch/runtime.d.ts.map +1 -1
  250. package/dist/_internal/platform/tools/fetch/runtime.js +4 -2
  251. package/dist/_internal/platform/tools/read/index.d.ts.map +1 -1
  252. package/dist/_internal/platform/tools/read/index.js +2 -1
  253. package/dist/_internal/platform/tools/registry-tool/index.d.ts.map +1 -1
  254. package/dist/_internal/platform/tools/registry-tool/index.js +2 -1
  255. package/dist/_internal/platform/tools/state/index.d.ts.map +1 -1
  256. package/dist/_internal/platform/tools/state/index.js +2 -1
  257. package/dist/_internal/platform/tools/task/index.d.ts.map +1 -1
  258. package/dist/_internal/platform/tools/task/index.js +2 -1
  259. package/dist/_internal/platform/tools/team/index.d.ts.map +1 -1
  260. package/dist/_internal/platform/tools/team/index.js +2 -1
  261. package/dist/_internal/platform/tools/web-search/index.d.ts.map +1 -1
  262. package/dist/_internal/platform/tools/web-search/index.js +2 -1
  263. package/dist/_internal/platform/tools/worklist/index.d.ts.map +1 -1
  264. package/dist/_internal/platform/tools/worklist/index.js +2 -1
  265. package/dist/_internal/platform/types/errors.d.ts +12 -10
  266. package/dist/_internal/platform/types/errors.d.ts.map +1 -1
  267. package/dist/_internal/platform/types/errors.js +21 -20
  268. package/dist/_internal/platform/utils/error-display.d.ts.map +1 -1
  269. package/dist/_internal/platform/utils/error-display.js +6 -4
  270. package/dist/_internal/platform/utils/fetch-with-timeout.d.ts +17 -0
  271. package/dist/_internal/platform/utils/fetch-with-timeout.d.ts.map +1 -1
  272. package/dist/_internal/platform/utils/fetch-with-timeout.js +59 -0
  273. package/dist/_internal/platform/utils/record-coerce.d.ts +11 -0
  274. package/dist/_internal/platform/utils/record-coerce.d.ts.map +1 -0
  275. package/dist/_internal/platform/utils/record-coerce.js +12 -0
  276. package/dist/_internal/platform/utils/redaction.js +1 -1
  277. package/dist/_internal/platform/utils/ring-buffer.d.ts +54 -0
  278. package/dist/_internal/platform/utils/ring-buffer.d.ts.map +1 -0
  279. package/dist/_internal/platform/utils/ring-buffer.js +96 -0
  280. package/dist/_internal/platform/utils/shell-split.d.ts +11 -0
  281. package/dist/_internal/platform/utils/shell-split.d.ts.map +1 -0
  282. package/dist/_internal/platform/utils/shell-split.js +83 -0
  283. package/dist/_internal/platform/version.js +1 -1
  284. package/dist/_internal/platform/voice/providers/deepgram.d.ts.map +1 -1
  285. package/dist/_internal/platform/voice/providers/deepgram.js +2 -1
  286. package/dist/_internal/platform/voice/providers/elevenlabs.d.ts.map +1 -1
  287. package/dist/_internal/platform/voice/providers/elevenlabs.js +5 -4
  288. package/dist/_internal/platform/voice/providers/google.d.ts.map +1 -1
  289. package/dist/_internal/platform/voice/providers/google.js +5 -4
  290. package/dist/_internal/platform/voice/providers/microsoft.d.ts.map +1 -1
  291. package/dist/_internal/platform/voice/providers/microsoft.js +2 -1
  292. package/dist/_internal/platform/voice/providers/openai.d.ts.map +1 -1
  293. package/dist/_internal/platform/voice/providers/openai.js +4 -3
  294. package/dist/_internal/platform/voice/providers/shared.d.ts.map +1 -1
  295. package/dist/_internal/platform/voice/providers/shared.js +2 -1
  296. package/dist/_internal/platform/voice/providers/vydra.d.ts.map +1 -1
  297. package/dist/_internal/platform/voice/providers/vydra.js +3 -2
  298. package/dist/_internal/platform/watchers/registry.d.ts.map +1 -1
  299. package/dist/_internal/platform/watchers/registry.js +3 -2
  300. package/dist/_internal/platform/workflow/trigger-executor.d.ts.map +1 -1
  301. package/dist/_internal/platform/workflow/trigger-executor.js +5 -3
  302. package/dist/_internal/platform/workspace/daemon-home.d.ts.map +1 -1
  303. package/dist/_internal/platform/workspace/daemon-home.js +6 -2
  304. package/dist/_internal/platform/workspace/workspace-swap-manager.d.ts +1 -0
  305. package/dist/_internal/platform/workspace/workspace-swap-manager.d.ts.map +1 -1
  306. package/dist/_internal/platform/workspace/workspace-swap-manager.js +14 -2
  307. package/package.json +1 -1
@@ -0,0 +1,49 @@
1
+ /**
2
+ * OBS-12: RuntimeMeter production wiring for the goodvibes-sdk platform.
3
+ *
4
+ * Exposes named metric instruments used across the platform:
5
+ * - HTTP request counters and histograms
6
+ * - LLM request counters and histograms
7
+ * - Auth success/failure counters
8
+ * - Session and SSE subscriber gauges
9
+ * - Telemetry buffer fill gauge
10
+ */
11
+ import { RuntimeMeter } from './telemetry/meter.js';
12
+ /** Singleton RuntimeMeter instance for the platform. */
13
+ export declare const platformMeter: RuntimeMeter;
14
+ /** Counter: total HTTP requests by method and status_class (2xx, 4xx, 5xx). */
15
+ export declare const httpRequestsTotal: import("./telemetry/types.js").Counter;
16
+ /** Histogram: HTTP request latency in ms by method, path_pattern, status_class. */
17
+ export declare const httpRequestDurationMs: import("./telemetry/types.js").Histogram;
18
+ /** Counter: total LLM requests started by provider, model (emitted on entry, before the call). */
19
+ export declare const llmRequestsStarted: import("./telemetry/types.js").Counter;
20
+ /** Counter: total LLM requests by provider, model, status (success/error). */
21
+ export declare const llmRequestsTotal: import("./telemetry/types.js").Counter;
22
+ /** Histogram: LLM request latency in ms by provider, model. */
23
+ export declare const llmRequestDurationMs: import("./telemetry/types.js").Histogram;
24
+ /** Histogram: LLM input token counts by provider, model. */
25
+ export declare const llmTokensInput: import("./telemetry/types.js").Histogram;
26
+ /** Histogram: LLM output token counts by provider, model. */
27
+ export declare const llmTokensOutput: import("./telemetry/types.js").Histogram;
28
+ /** Counter: successful auth events. */
29
+ export declare const authSuccessTotal: import("./telemetry/types.js").Counter;
30
+ /** Counter: failed auth events. */
31
+ export declare const authFailureTotal: import("./telemetry/types.js").Counter;
32
+ /** Gauge: currently active sessions. */
33
+ export declare const sessionsActive: import("./telemetry/types.js").Gauge;
34
+ /** Gauge: current SSE subscriber count per stream type. */
35
+ export declare const sseSubscribers: import("./telemetry/types.js").Gauge;
36
+ /** Counter: total transport retries by transport_type and reason. */
37
+ export declare const transportRetriesTotal: import("./telemetry/types.js").Counter;
38
+ /** Gauge: fill level of the telemetry buffer (0..1). */
39
+ export declare const telemetryBufferFill: import("./telemetry/types.js").Gauge;
40
+ /** Counter: total listener errors caught during event dispatch. */
41
+ export declare const listenerErrorsTotal: import("./telemetry/types.js").Counter;
42
+ /**
43
+ * OBS-12: Snapshot all metric instruments as a JSON-serialisable object.
44
+ * Used by the GET /api/runtime/metrics endpoint.
45
+ *
46
+ * C-3: includes histograms section with count/sum/min/max/mean per instrument.
47
+ */
48
+ export declare function snapshotMetrics(): Record<string, unknown>;
49
+ //# sourceMappingURL=metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/runtime/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,wDAAwD;AACxD,eAAO,MAAM,aAAa,cAA+C,CAAC;AAI1E,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB,wCAA+C,CAAC;AAC9E,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,0CAAsD,CAAC;AAIzF,kGAAkG;AAClG,eAAO,MAAM,kBAAkB,wCAAgD,CAAC;AAChF,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,wCAA8C,CAAC;AAC5E,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,0CAAqD,CAAC;AACvF,4DAA4D;AAC5D,eAAO,MAAM,cAAc,0CAA8C,CAAC;AAC1E,6DAA6D;AAC7D,eAAO,MAAM,eAAe,0CAA+C,CAAC;AAI5E,uCAAuC;AACvC,eAAO,MAAM,gBAAgB,wCAA8C,CAAC;AAC5E,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,wCAA8C,CAAC;AAI5E,wCAAwC;AACxC,eAAO,MAAM,cAAc,sCAAyC,CAAC;AACrE,2DAA2D;AAC3D,eAAO,MAAM,cAAc,sCAAyC,CAAC;AAIrE,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,wCAAmD,CAAC;AAItF,wDAAwD;AACxD,eAAO,MAAM,mBAAmB,sCAA+C,CAAC;AAIhF,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,wCAAiD,CAAC;AAElF;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2DzD"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * OBS-12: RuntimeMeter production wiring for the goodvibes-sdk platform.
3
+ *
4
+ * Exposes named metric instruments used across the platform:
5
+ * - HTTP request counters and histograms
6
+ * - LLM request counters and histograms
7
+ * - Auth success/failure counters
8
+ * - Session and SSE subscriber gauges
9
+ * - Telemetry buffer fill gauge
10
+ */
11
+ import { RuntimeMeter } from './telemetry/meter.js';
12
+ /** Singleton RuntimeMeter instance for the platform. */
13
+ export const platformMeter = new RuntimeMeter({ scope: 'goodvibes-sdk' });
14
+ // ── HTTP metrics ─────────────────────────────────────────────────────────────
15
+ /** Counter: total HTTP requests by method and status_class (2xx, 4xx, 5xx). */
16
+ export const httpRequestsTotal = platformMeter.counter('http.requests.total');
17
+ /** Histogram: HTTP request latency in ms by method, path_pattern, status_class. */
18
+ export const httpRequestDurationMs = platformMeter.histogram('http.request.duration_ms');
19
+ // ── LLM metrics ──────────────────────────────────────────────────────────────
20
+ /** Counter: total LLM requests started by provider, model (emitted on entry, before the call). */
21
+ export const llmRequestsStarted = platformMeter.counter('llm.requests.started');
22
+ /** Counter: total LLM requests by provider, model, status (success/error). */
23
+ export const llmRequestsTotal = platformMeter.counter('llm.requests.total');
24
+ /** Histogram: LLM request latency in ms by provider, model. */
25
+ export const llmRequestDurationMs = platformMeter.histogram('llm.request.duration_ms');
26
+ /** Histogram: LLM input token counts by provider, model. */
27
+ export const llmTokensInput = platformMeter.histogram('llm.tokens.input');
28
+ /** Histogram: LLM output token counts by provider, model. */
29
+ export const llmTokensOutput = platformMeter.histogram('llm.tokens.output');
30
+ // ── Auth metrics ─────────────────────────────────────────────────────────────
31
+ /** Counter: successful auth events. */
32
+ export const authSuccessTotal = platformMeter.counter('auth.success.total');
33
+ /** Counter: failed auth events. */
34
+ export const authFailureTotal = platformMeter.counter('auth.failure.total');
35
+ // ── Session and SSE metrics ───────────────────────────────────────────────────
36
+ /** Gauge: currently active sessions. */
37
+ export const sessionsActive = platformMeter.gauge('sessions.active');
38
+ /** Gauge: current SSE subscriber count per stream type. */
39
+ export const sseSubscribers = platformMeter.gauge('sse.subscribers');
40
+ // ── Transport metrics ─────────────────────────────────────────────────────────
41
+ /** Counter: total transport retries by transport_type and reason. */
42
+ export const transportRetriesTotal = platformMeter.counter('transport.retries_total');
43
+ // ── Telemetry buffer metrics ──────────────────────────────────────────────────
44
+ /** Gauge: fill level of the telemetry buffer (0..1). */
45
+ export const telemetryBufferFill = platformMeter.gauge('telemetry.buffer.fill');
46
+ // ── Listener error metrics (OBS-13) ──────────────────────────────────────────
47
+ /** Counter: total listener errors caught during event dispatch. */
48
+ export const listenerErrorsTotal = platformMeter.counter('listener_errors_total');
49
+ /**
50
+ * OBS-12: Snapshot all metric instruments as a JSON-serialisable object.
51
+ * Used by the GET /api/runtime/metrics endpoint.
52
+ *
53
+ * C-3: includes histograms section with count/sum/min/max/mean per instrument.
54
+ */
55
+ export function snapshotMetrics() {
56
+ return {
57
+ counters: {
58
+ 'http.requests.total': {
59
+ '2xx': httpRequestsTotal.value({ status_class: '2xx' }),
60
+ '4xx': httpRequestsTotal.value({ status_class: '4xx' }),
61
+ '5xx': httpRequestsTotal.value({ status_class: '5xx' }),
62
+ },
63
+ 'llm.requests.total': {
64
+ success: llmRequestsTotal.value({ status: 'success' }),
65
+ error: llmRequestsTotal.value({ status: 'error' }),
66
+ },
67
+ 'auth.success.total': authSuccessTotal.value(),
68
+ 'auth.failure.total': authFailureTotal.value(),
69
+ 'transport.retries_total': transportRetriesTotal.value(),
70
+ 'listener_errors_total': listenerErrorsTotal.value(),
71
+ },
72
+ gauges: {
73
+ 'sessions.active': sessionsActive.value(),
74
+ 'sse.subscribers': sseSubscribers.value(),
75
+ 'telemetry.buffer.fill': telemetryBufferFill.value(),
76
+ },
77
+ histograms: {
78
+ 'http.request.duration_ms': httpRequestDurationMs.snapshot(),
79
+ 'llm.request.duration_ms': llmRequestDurationMs.snapshot(),
80
+ 'llm.tokens.input': llmTokensInput.snapshot(),
81
+ 'llm.tokens.output': llmTokensOutput.snapshot(),
82
+ },
83
+ // Legacy shape — kept for backward compat with existing consumers
84
+ http: {
85
+ requests_total: {
86
+ '2xx': httpRequestsTotal.value({ status_class: '2xx' }),
87
+ '4xx': httpRequestsTotal.value({ status_class: '4xx' }),
88
+ '5xx': httpRequestsTotal.value({ status_class: '5xx' }),
89
+ },
90
+ },
91
+ llm: {
92
+ requests_total: {
93
+ success: llmRequestsTotal.value({ status: 'success' }),
94
+ error: llmRequestsTotal.value({ status: 'error' }),
95
+ },
96
+ },
97
+ auth: {
98
+ success_total: authSuccessTotal.value(),
99
+ failure_total: authFailureTotal.value(),
100
+ },
101
+ sessions: {
102
+ active: sessionsActive.value(),
103
+ },
104
+ sse: {
105
+ subscribers: sseSubscribers.value(),
106
+ },
107
+ transport: {
108
+ retries_total: transportRetriesTotal.value(),
109
+ },
110
+ telemetry: {
111
+ buffer_fill: telemetryBufferFill.value(),
112
+ },
113
+ };
114
+ }
@@ -1,15 +1,18 @@
1
+ import { GoodVibesSdkError } from '../../../errors/index.js';
1
2
  import type { TaskManager } from '../tasks/types.js';
2
3
  import type { RuntimeEventBus } from '../events/index.js';
3
4
  import type { RuntimeStore } from '../store/index.js';
4
5
  /** Thrown when an ops action is rejected because the state machine disallows it. */
5
- export declare class OpsIllegalActionError extends Error {
6
+ export declare class OpsIllegalActionError extends GoodVibesSdkError {
7
+ readonly code: 'OPS_ILLEGAL_ACTION';
6
8
  readonly targetId: string;
7
9
  readonly action: string;
8
10
  readonly currentState: string;
9
11
  constructor(targetId: string, action: string, currentState: string);
10
12
  }
11
13
  /** Thrown when the target task or agent is not found. */
12
- export declare class OpsTargetNotFoundError extends Error {
14
+ export declare class OpsTargetNotFoundError extends GoodVibesSdkError {
15
+ readonly code: 'OPS_TARGET_NOT_FOUND';
13
16
  readonly targetId: string;
14
17
  readonly targetKind: 'task' | 'agent';
15
18
  constructor(targetId: string, targetKind: 'task' | 'agent');
@@ -1 +1 @@
1
- {"version":3,"file":"control-plane.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/ops/control-plane.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAiBtE,oFAAoF;AACpF,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,YAAY,EAAE,MAAM,CAAC;gBAElB,QAAQ,EAAE,MAAM,EA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AAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAGlC,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,MAAM;IAWnB;;;;;;;OAOG;IACI,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IA4BtD;;;;;;;;;OASG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IA4BrD;;;;;;;;;OASG;IACI,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IA4BtD;;;;;;;;;;;OAWG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IA+BrD;;;;;;;;;;;;;;;OAeG;IACI,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAqCxD;;;OAGG;IACI,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAKtC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAKrC,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAKtC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAMrC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAQ/C,OAAO,CAAC,QAAQ;CASjB"}
@@ -9,6 +9,7 @@
9
9
  * This is the single integration point for the /ops commands and Ctrl+O panel.
10
10
  */
11
11
  import { randomUUID } from 'node:crypto';
12
+ import { GoodVibesSdkError } from '../../../errors/index.js';
12
13
  import { createDomainDispatch } from '../store/index.js';
13
14
  import { canTransition } from '../tasks/lifecycle.js';
14
15
  import { emitOpsTaskCancelled, emitOpsTaskPaused, emitOpsTaskResumed, emitOpsTaskRetried, emitOpsAgentCancelled, } from '../emitters/ops.js';
@@ -16,12 +17,12 @@ import { emitOpsTaskCancelled, emitOpsTaskPaused, emitOpsTaskResumed, emitOpsTas
16
17
  // Error types
17
18
  // ---------------------------------------------------------------------------
18
19
  /** Thrown when an ops action is rejected because the state machine disallows it. */
19
- export class OpsIllegalActionError extends Error {
20
+ export class OpsIllegalActionError extends GoodVibesSdkError {
20
21
  targetId;
21
22
  action;
22
23
  currentState;
23
24
  constructor(targetId, action, currentState) {
24
- super(`[OpsControlPlane] Action '${action}' is illegal for ${targetId} in state '${currentState}'`);
25
+ super(`[OpsControlPlane] Action '${action}' is illegal for ${targetId} in state '${currentState}'`, { code: 'OPS_ILLEGAL_ACTION', category: 'permission', source: 'runtime', recoverable: false });
25
26
  this.name = 'OpsIllegalActionError';
26
27
  this.targetId = targetId;
27
28
  this.action = action;
@@ -29,11 +30,11 @@ export class OpsIllegalActionError extends Error {
29
30
  }
30
31
  }
31
32
  /** Thrown when the target task or agent is not found. */
32
- export class OpsTargetNotFoundError extends Error {
33
+ export class OpsTargetNotFoundError extends GoodVibesSdkError {
33
34
  targetId;
34
35
  targetKind;
35
36
  constructor(targetId, targetKind) {
36
- super(`[OpsControlPlane] ${targetKind} not found: ${targetId}`);
37
+ super(`[OpsControlPlane] ${targetKind} not found: ${targetId}`, { code: 'OPS_TARGET_NOT_FOUND', category: 'not_found', source: 'runtime', recoverable: false });
37
38
  this.name = 'OpsTargetNotFoundError';
38
39
  this.targetId = targetId;
39
40
  this.targetKind = targetKind;
@@ -17,6 +17,7 @@
17
17
  * session emitters in GC-ARCH-002). Until that flag is active, this module
18
18
  * is exercised only via `DivergencePanel` in the diagnostics layer.
19
19
  */
20
+ import { GoodVibesSdkError } from '../../../errors/index.js';
20
21
  import type { DivergenceReport, SimulationMode } from './types.js';
21
22
  import type { PermissionSimulator } from './simulation.js';
22
23
  /**
@@ -197,7 +198,8 @@ export declare class DivergenceDashboard {
197
198
  * Thrown by `DivergenceDashboard.setMode('enforce')` when the divergence
198
199
  * gate is in `blocked` state.
199
200
  */
200
- export declare class DivergenceGateError extends Error {
201
+ export declare class DivergenceGateError extends GoodVibesSdkError {
202
+ readonly code: 'DIVERGENCE_GATE_BLOCKED';
201
203
  /** The full gate result at the time the error was thrown. */
202
204
  readonly gate: EnforceGateResult;
203
205
  constructor(message: string, gate: EnforceGateResult);
@@ -1 +1 @@
1
- {"version":3,"file":"divergence-dashboard.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/divergence-dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3D;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,mDAAmD;IACnD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,mDAAmD;IACnD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,gEAAgE;IAChE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,yEAAyE;IACzE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,kCAAkC;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,gDAAgD;IAChD,QAAQ,CA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,wGAAwG;IACxG,OAAO,CAAC,YAAY;IAoCpB;;;;;OAKG;IACH,gBAAgB,IAAI,oBAAoB;IAqBxC;;OAEG;IACH,QAAQ,IAAI,SAAS,oBAAoB,EAAE;IAI3C;;OAEG;IACH,WAAW,IAAI,2BAA2B;IAW1C;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAUnC;;OAEG;IACH,OAAO,IAAI,cAAc;IAIzB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,aAAa,IAAI,OAAO;CAGzB;AAID;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB;CAKrD"}
1
+ {"version":3,"file":"divergence-dashboard.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/divergence-dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3D;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,mDAAmD;IACnD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,mDAAmD;IACnD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,gEAAgE;IAChE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,MAAM,MAA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gB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IAErD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAQ;IACjD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAM;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAO;gBAG9C,SAAS,EAAE,mBAAmB,EAC9B,IAAI,EAAE,cAAc,EACpB,MAAM,GAAE,yBAA8B;IASxC;;;;;;;OAOG;IACH,gBAAgB,IAAI,iBAAiB;IAKrC,wGAAwG;IACxG,OAAO,CAAC,YAAY;IAoCpB;;;;;OAKG;IACH,gBAAgB,IAAI,oBAAoB;IAqBxC;;OAEG;IACH,QAAQ,IAAI,SAAS,oBAAoB,EAAE;IAI3C;;OAEG;IACH,WAAW,IAAI,2BAA2B;IAW1C;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAUnC;;OAEG;IACH,OAAO,IAAI,cAAc;IAIzB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,aAAa,IAAI,OAAO;CAGzB;AAID;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,SAAiB,IAAI,EAAE,yBAAyB,CAAC;IACjD,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB;CAKrD"}
@@ -17,6 +17,7 @@
17
17
  * session emitters in GC-ARCH-002). Until that flag is active, this module
18
18
  * is exercised only via `DivergencePanel` in the diagnostics layer.
19
19
  */
20
+ import { GoodVibesSdkError } from '../../../errors/index.js';
20
21
  // ── DivergenceDashboard ───────────────────────────────────────────────────────
21
22
  /**
22
23
  * DivergenceDashboard — divergence monitoring and enforce-mode gate.
@@ -196,11 +197,11 @@ export class DivergenceDashboard {
196
197
  * Thrown by `DivergenceDashboard.setMode('enforce')` when the divergence
197
198
  * gate is in `blocked` state.
198
199
  */
199
- export class DivergenceGateError extends Error {
200
+ export class DivergenceGateError extends GoodVibesSdkError {
200
201
  /** The full gate result at the time the error was thrown. */
201
202
  gate;
202
203
  constructor(message, gate) {
203
- super(message);
204
+ super(message, { code: 'DIVERGENCE_GATE_BLOCKED', category: 'permission', source: 'runtime', recoverable: false });
204
205
  this.name = 'DivergenceGateError';
205
206
  this.gate = gate;
206
207
  }
@@ -9,6 +9,7 @@
9
9
  * This module does NOT perform I/O itself — it accepts a pre-parsed
10
10
  * `SignedPolicyBundle` so callers control the loading strategy.
11
11
  */
12
+ import { GoodVibesSdkError } from '../../../errors/index.js';
12
13
  import type { PolicyRule } from './types.js';
13
14
  import type { PolicyBundleId, SignatureStatus, ProvenanceSource, SignedPolicyBundle } from './policy-signer.js';
14
15
  /**
@@ -59,11 +60,12 @@ export interface PolicyLoadResult {
59
60
  *
60
61
  * Managed mode MUST reject bundles with invalid or missing signatures.
61
62
  */
62
- export declare class PolicySignatureError extends Error {
63
+ export declare class PolicySignatureError extends GoodVibesSdkError {
63
64
  /** The bundle ID that failed validation. */
64
65
  readonly bundleId: PolicyBundleId;
65
66
  /** The validation outcome. */
66
67
  readonly signatureStatus: SignatureStatus;
68
+ readonly code: 'POLICY_SIGNATURE_INVALID';
67
69
  constructor(
68
70
  /** The bundle ID that failed validation. */
69
71
  bundleId: PolicyBundleId,
@@ -1 +1 @@
1
- {"version":3,"file":"policy-loader.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/policy-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAK5B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,OAA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BAAgB,CAC9B,MAAM,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,EAC/C,OAAO,GAAE,mBAAwB,GAChC,gBAAgB,CA8DlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAAC,mBAAmB,CAAC,CAOzC"}
1
+ {"version":3,"file":"policy-loader.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/policy-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAK5B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,cAAc,EAAE,cAAc,CAAC;IAC/B,qDAAqD;IACrD,eAAe,EAAE,eAAe,CAAC;IACjC,wCAAwC;IACxC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,EAAE,EAAE,OAAO,CAAC;IACZ,qEAAqE;IACrE,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,wCAAwC;IACxC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,iBAAiB;IAGvD,4CAA4C;aAC5B,QAAQ,EAAE,cAAc;IACxC,8BAA8B;aACd,eAAe,EAAE,eAAe;IALlD,SAAiB,IAAI,EAAE,0BAA0B,CAAC;;IAEhD,4CAA4C;IAC5B,QAAQ,EAAE,cAAc;IACxC,8BAA8B;IACd,eAAe,EAAE,eAAe,EAChD,OAAO,EAAE,MAAM;CAKlB;AAID;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE7B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAID;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,EAC/C,OAAO,GAAE,mBAAwB,GAChC,gBAAgB,CA8DlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAAC,mBAAmB,CAAC,CAOzC"}
@@ -9,6 +9,7 @@
9
9
  * This module does NOT perform I/O itself — it accepts a pre-parsed
10
10
  * `SignedPolicyBundle` so callers control the loading strategy.
11
11
  */
12
+ import { GoodVibesSdkError } from '../../../errors/index.js';
12
13
  import { verifyBundle } from './policy-signer.js';
13
14
  // ── Error class ───────────────────────────────────────────────────────────────
14
15
  /**
@@ -17,7 +18,7 @@ import { verifyBundle } from './policy-signer.js';
17
18
  *
18
19
  * Managed mode MUST reject bundles with invalid or missing signatures.
19
20
  */
20
- export class PolicySignatureError extends Error {
21
+ export class PolicySignatureError extends GoodVibesSdkError {
21
22
  bundleId;
22
23
  signatureStatus;
23
24
  constructor(
@@ -25,7 +26,7 @@ export class PolicySignatureError extends Error {
25
26
  bundleId,
26
27
  /** The validation outcome. */
27
28
  signatureStatus, message) {
28
- super(message);
29
+ super(message, { code: 'POLICY_SIGNATURE_INVALID', category: 'permission', source: 'runtime', recoverable: false });
29
30
  this.bundleId = bundleId;
30
31
  this.signatureStatus = signatureStatus;
31
32
  this.name = 'PolicySignatureError';
@@ -1 +1 @@
1
- {"version":3,"file":"policy-signer.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/policy-signer.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAiBrF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEvF;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,cAAc,CAAC;AAIvF;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC7C,uDAAuD;IACvD,QAAQ,EAAE,cAAc,CAAC;IACzB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,OAAO,EAAE,CAAC,CAAC;IACX;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,EAAE,EAAE,OAAO,CAAC;IACZ,iCAAiC;IACjC,MAAM,EAAE,eAAe,CAAC;IACxB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;CACjB;AAID;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAWnD;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,CAAC,EACV,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,kBAAkB,CAAC,CAAC,CAAC,CAiBvB;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC7B,GAAG,EAAE,MAAM,GAAG,MAAM,GACnB,YAAY,CAyEd"}
1
+ {"version":3,"file":"policy-signer.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/policy-signer.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAkBrF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEvF;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,cAAc,CAAC;AAIvF;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC7C,uDAAuD;IACvD,QAAQ,EAAE,cAAc,CAAC;IACzB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,OAAO,EAAE,CAAC,CAAC;IACX;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,EAAE,EAAE,OAAO,CAAC;IACZ,iCAAiC;IACjC,MAAM,EAAE,eAAe,CAAC;IACxB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;CACjB;AAID;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAWnD;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,CAAC,EACV,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,kBAAkB,CAAC,CAAC,CAAC,CAiBvB;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC7B,GAAG,EAAE,MAAM,GAAG,MAAM,GACnB,YAAY,CA6Ed"}
@@ -10,6 +10,7 @@
10
10
  * never stores keys in bundle payloads.
11
11
  */
12
12
  import { createHmac, timingSafeEqual } from 'node:crypto';
13
+ import { logger } from '../../utils/logger.js';
13
14
  // ── Canonical serialisation ───────────────────────────────────────────────────
14
15
  /**
15
16
  * canonicalise — Produces a deterministic JSON string for the given value.
@@ -97,8 +98,12 @@ export function verifyBundle(bundle, key) {
97
98
  .update(canonical, 'utf8')
98
99
  .digest();
99
100
  }
100
- catch {
101
- // Non-fatal: key is malformed; treat as invalid
101
+ catch (err) {
102
+ // OBS-11: Non-fatal key is malformed; treat as invalid
103
+ logger.warn('[PolicySigner] HMAC key error during signature computation', {
104
+ bundleId: bundle.bundleId,
105
+ error: String(err),
106
+ });
102
107
  return {
103
108
  ok: false,
104
109
  status: 'invalid',
@@ -18,6 +18,7 @@
18
18
  *
19
19
  * Feature flag: `permissions-simulation` must be enabled to use this module.
20
20
  */
21
+ import { GoodVibesSdkError } from '../../../errors/index.js';
21
22
  import type { DivergenceReport, PermissionSimulatorConfig, PermissionsConfig, SimulationMode, SimulationResult } from './types.js';
22
23
  import { LayeredPolicyEvaluator } from './evaluator.js';
23
24
  /**
@@ -103,7 +104,8 @@ export declare class PermissionSimulator {
103
104
  /**
104
105
  * Thrown when `enforce` mode is active and the divergence gate fails.
105
106
  */
106
- export declare class SimulationEnforcementError extends Error {
107
+ export declare class SimulationEnforcementError extends GoodVibesSdkError {
108
+ readonly code: 'SIMULATION_ENFORCEMENT_BLOCKED';
107
109
  /** Current divergence rate (0–1). */
108
110
  readonly divergenceRate: number;
109
111
  /** Configured divergence threshold (0–1). */
@@ -1 +1 @@
1
- {"version":3,"file":"simulation.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/simulation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAGV,gBAAgB,EAIhB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AA4DxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;IAChD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmD;IAE7E,kEAAkE;IAClE,OAAO,CAAC,OAAO,CAA0B;IAEzC,kEAAkE;IAClE,OAAO,CAAC,YAAY,CAAsD;IAE1E,4CAA4C;IAC5C,OAAO,CAAC,aAAa,CAA8B;IAEnD,kCAAkC;IAClC,OAAO,CAAC,WAAW,CAA+C;IAElE,0CAA0C;IAC1C,OAAO,CAAC,UAAU,CAAK;IAEvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAClD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAQ;gBAG/C,YAAY,EAAE,iBAAiB,EAC/B,eAAe,EAAE,iBAAiB,EAClC,cAAc,EAAE,cAAc,EAC9B,MAAM,GAAE,yBAA8B;IAYxC;;;;;;;;OAQG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,gBAAgB;IAoEnB;;;;;OAKG;IACH,mBAAmB,IAAI,gBAAgB;IA4DvC;;OAEG;IACH,kBAAkB,IAAI,sBAAsB;IAI5C;;OAEG;IACH,qBAAqB,IAAI,sBAAsB;IAI/C;;OAEG;IACH,iBAAiB,IAAI,cAAc;IAInC;;;OAGG;IACH,uBAAuB,IAAI,OAAO;IAQlC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;CAc7B;AAID;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,qCAAqC;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6CAA6C;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAMvE"}
1
+ {"version":3,"file":"simulation.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/permissions/simulation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAGV,gBAAgB,EAIhB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AA4DxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;I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A6C;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAMvE"}
@@ -18,6 +18,7 @@
18
18
  *
19
19
  * Feature flag: `permissions-simulation` must be enabled to use this module.
20
20
  */
21
+ import { GoodVibesSdkError } from '../../../errors/index.js';
21
22
  import { LayeredPolicyEvaluator } from './evaluator.js';
22
23
  // ── Private helpers ────────────────────────────────────────────────────────────
23
24
  /** Extracts the first meaningful token from the first string argument. */
@@ -276,13 +277,13 @@ export class PermissionSimulator {
276
277
  /**
277
278
  * Thrown when `enforce` mode is active and the divergence gate fails.
278
279
  */
279
- export class SimulationEnforcementError extends Error {
280
+ export class SimulationEnforcementError extends GoodVibesSdkError {
280
281
  /** Current divergence rate (0–1). */
281
282
  divergenceRate;
282
283
  /** Configured divergence threshold (0–1). */
283
284
  threshold;
284
285
  constructor(message, divergenceRate, threshold) {
285
- super(message);
286
+ super(message, { code: 'SIMULATION_ENFORCEMENT_BLOCKED', category: 'permission', source: 'runtime', recoverable: false });
286
287
  this.name = 'SimulationEnforcementError';
287
288
  this.divergenceRate = divergenceRate;
288
289
  this.threshold = threshold;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Remote Substrate — Transport Contract
3
+ *
4
+ * Defines typed message definitions for control/data/ack/failure
5
+ * message classes with retry/backoff policies per class.
6
+ *
7
+ * This module defines the full structural contract for all messages that cross
8
+ * the remote transport boundary. No raw strings — all messages are typed.
9
+ */
10
+ import { GoodVibesSdkError } from '../../../errors/index.js';
1
11
  import type { ControlMessage, DataMessage, AckMessage, FailureMessage, RetryPolicy, TransportErrorCategory, ProtocolVersion, CompatibilityMatrix, VersionNegotiationResult, NegotiatedProtocol } from './types.js';
2
12
  /**
3
13
  * Default retry policy for control plane messages.
@@ -48,11 +58,13 @@ export declare const TRANSPORT_COMPATIBILITY_MATRIX: CompatibilityMatrix;
48
58
  * Carries the structured incompatibility details so callers can log,
49
59
  * surface diagnostics, and produce a typed HANDSHAKE_REJECT payload.
50
60
  */
51
- export declare class VersionMismatchError extends Error {
61
+ export declare class VersionMismatchError extends GoodVibesSdkError {
52
62
  readonly code: 'major_version_mismatch' | 'peer_version_too_old' | 'peer_version_unsupported';
63
+ /** Structured mismatch code (distinct from the generic SDK error code string). */
64
+ readonly mismatchCode: 'major_version_mismatch' | 'peer_version_too_old' | 'peer_version_unsupported';
53
65
  readonly offeredVersion: Readonly<ProtocolVersion>;
54
66
  readonly peerVersion: Readonly<ProtocolVersion>;
55
- constructor(code: 'major_version_mismatch' | 'peer_version_too_old' | 'peer_version_unsupported', offeredVersion: Readonly<ProtocolVersion>, peerVersion: Readonly<ProtocolVersion>, message: string);
67
+ constructor(mismatchCode: 'major_version_mismatch' | 'peer_version_too_old' | 'peer_version_unsupported', offeredVersion: Readonly<ProtocolVersion>, peerVersion: Readonly<ProtocolVersion>, message: string);
56
68
  }
57
69
  /**
58
70
  * Negotiate a protocol version between this peer and a remote peer.
@@ -1 +1 @@
1
- {"version":3,"file":"transport-contract.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/remote/transport-contract.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,EAEd,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EAEnB,wBAAwB,EACxB,kBAAkB,EAEnB,MAAM,YAAY,CAAC;AAIpB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAO/B,CAAC;AAEzB;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAO5B,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAO3B,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAO/B,CAAC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AsB,EACrC,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,QAAQ,CAAC,cAAc,CAAC,CAS1B;AAID;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAAM,MAAoB,GAC9B,MAAM,CAKR;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,sBAAsB,GAC/B,OAAO,CAET"}
1
+ {"version":3,"file":"transport-contract.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/remote/transport-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI7D,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,EAEd,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EAEnB,wBAAwB,EACxB,kBAAkB,EAEnB,MAAM,YAAY,CAAC;AAIpB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAO/B,CAAC;AAEzB;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAO5B,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAO3B,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAO/B,CAAC;AAIzB;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,eAAe,CAK7D,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8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E,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,QAAQ,CAAC,cAAc,CAAC,CAS1B;AAID;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,MAAM,MAAoB,GAC9B,MAAM,CAKR;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,sBAAsB,GAC/B,OAAO,CAET"}
@@ -7,6 +7,7 @@
7
7
  * This module defines the full structural contract for all messages that cross
8
8
  * the remote transport boundary. No raw strings — all messages are typed.
9
9
  */
10
+ import { GoodVibesSdkError } from '../../../errors/index.js';
10
11
  import { logger } from '../../utils/logger.js';
11
12
  import { randomUUID } from 'node:crypto';
12
13
  // ── Default retry policies per message class ──────────────────────────────────
@@ -112,14 +113,15 @@ export const TRANSPORT_COMPATIBILITY_MATRIX = Object.freeze([
112
113
  * Carries the structured incompatibility details so callers can log,
113
114
  * surface diagnostics, and produce a typed HANDSHAKE_REJECT payload.
114
115
  */
115
- export class VersionMismatchError extends Error {
116
- code;
116
+ export class VersionMismatchError extends GoodVibesSdkError {
117
+ /** Structured mismatch code (distinct from the generic SDK error code string). */
118
+ mismatchCode;
117
119
  offeredVersion;
118
120
  peerVersion;
119
- constructor(code, offeredVersion, peerVersion, message) {
120
- super(message);
121
+ constructor(mismatchCode, offeredVersion, peerVersion, message) {
122
+ super(message, { code: mismatchCode, category: 'protocol', source: 'transport', recoverable: false });
121
123
  this.name = 'VersionMismatchError';
122
- this.code = code;
124
+ this.mismatchCode = mismatchCode;
123
125
  this.offeredVersion = offeredVersion;
124
126
  this.peerVersion = peerVersion;
125
127
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../../../../src/_internal/platform/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B,kCAAkC,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAiB7J;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,uBAAuB,EAAE,KAAK,EAAE,OAAO,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAMzJ;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAiBpJ;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAcnI;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAiBnI;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,CAAC,kBAAkB,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAExI"}
@@ -247,6 +247,7 @@ export function updateMcpState(domain, event) {
247
247
  (event.type === 'MCP_DEGRADED' || event.type === 'MCP_DISCONNECTED' || event.type === 'MCP_SCHEMA_QUARANTINED' ? 1 : 0),
248
248
  };
249
249
  }
250
+ /** Returns the transport state for lifecycle events that directly change state, or null for observability-only events. */
250
251
  function transportStateForEvent(event) {
251
252
  switch (event.type) {
252
253
  case 'TRANSPORT_INITIALIZING':
@@ -265,11 +266,21 @@ function transportStateForEvent(event) {
265
266
  return 'disconnected';
266
267
  case 'TRANSPORT_TERMINAL_FAILURE':
267
268
  return 'terminal_failure';
269
+ // OBS-18/OBS-19: observability-only events — no state change.
270
+ case 'TRANSPORT_RETRY_SCHEDULED':
271
+ case 'TRANSPORT_RETRY_EXECUTED':
272
+ case 'STREAM_SUBSCRIBER_CONNECTED':
273
+ case 'STREAM_SUBSCRIBER_DISCONNECTED':
274
+ return null;
268
275
  }
269
276
  }
270
277
  export function updateTransportState(acp, daemon, event) {
271
278
  const nextTransportState = transportStateForEvent(event);
272
- const isAcp = event.transportId.startsWith('acp');
279
+ // OBS-18/OBS-19: observability-only events have no transportId and no state to update.
280
+ if (nextTransportState === null)
281
+ return { acp, daemon };
282
+ const transportId = 'transportId' in event ? event.transportId : '';
283
+ const isAcp = transportId.startsWith('acp');
273
284
  const nextAcp = isAcp
274
285
  ? {
275
286
  ...updateDomainMetadata(acp, event.type),
@@ -11,24 +11,28 @@
11
11
  * - Track per-kind concurrency
12
12
  * - Support retry policies
13
13
  */
14
+ import { GoodVibesSdkError } from '../../../errors/index.js';
14
15
  import type { RuntimeStore } from '../store/index.js';
15
16
  import type { RuntimeEventBus } from '../events/index.js';
16
17
  import type { RuntimeTask, TaskKind, TaskLifecycleState } from '../store/domains/tasks.js';
17
18
  import type { TaskManager, TaskCreateParams, TaskUpdateParams, TaskCancelParams, TaskFailParams } from './types.js';
18
19
  /** Thrown when a requested task lifecycle transition is not permitted. */
19
- export declare class TaskTransitionError extends Error {
20
+ export declare class TaskTransitionError extends GoodVibesSdkError {
21
+ readonly code: 'TASK_TRANSITION_ERROR';
20
22
  readonly taskId: string;
21
23
  readonly from: TaskLifecycleState;
22
24
  readonly to: TaskLifecycleState;
23
25
  constructor(taskId: string, from: TaskLifecycleState, to: TaskLifecycleState);
24
26
  }
25
27
  /** Thrown when a task ID cannot be found in the registry. */
26
- export declare class TaskNotFoundError extends Error {
28
+ export declare class TaskNotFoundError extends GoodVibesSdkError {
29
+ readonly code: 'TASK_NOT_FOUND';
27
30
  readonly taskId: string;
28
31
  constructor(taskId: string);
29
32
  }
30
33
  /** Thrown when cancellation is attempted on a non-cancellable task. */
31
- export declare class TaskNotCancellableError extends Error {
34
+ export declare class TaskNotCancellableError extends GoodVibesSdkError {
35
+ readonly code: 'TASK_NOT_CANCELLABLE';
32
36
  readonly taskId: string;
33
37
  constructor(taskId: string);
34
38
  }