@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.
- package/dist/_internal/contracts/zod-schemas/accounts.d.ts +9 -9
- package/dist/_internal/contracts/zod-schemas/auth.d.ts +1 -1
- package/dist/_internal/daemon/context.d.ts +1 -0
- package/dist/_internal/daemon/context.d.ts.map +1 -1
- package/dist/_internal/daemon/error-response.js +22 -22
- package/dist/_internal/daemon/integration-route-types.d.ts +2 -1
- package/dist/_internal/daemon/integration-route-types.d.ts.map +1 -1
- package/dist/_internal/daemon/knowledge-routes.js +5 -5
- package/dist/_internal/daemon/media-routes.d.ts.map +1 -1
- package/dist/_internal/daemon/media-routes.js +4 -3
- package/dist/_internal/daemon/operator.d.ts +1 -1
- package/dist/_internal/daemon/operator.d.ts.map +1 -1
- package/dist/_internal/daemon/operator.js +2 -0
- package/dist/_internal/daemon/runtime-route-types.d.ts +2 -1
- package/dist/_internal/daemon/runtime-route-types.d.ts.map +1 -1
- package/dist/_internal/daemon/runtime-routes.d.ts +1 -1
- package/dist/_internal/daemon/runtime-routes.d.ts.map +1 -1
- package/dist/_internal/daemon/runtime-routes.js +1 -0
- package/dist/_internal/daemon/telemetry-routes.d.ts.map +1 -1
- package/dist/_internal/daemon/telemetry-routes.js +13 -12
- package/dist/_internal/errors/daemon-error-contract.d.ts +17 -0
- package/dist/_internal/errors/daemon-error-contract.d.ts.map +1 -1
- package/dist/_internal/errors/daemon-error-contract.js +17 -1
- package/dist/_internal/errors/index.d.ts +2 -1
- package/dist/_internal/errors/index.d.ts.map +1 -1
- package/dist/_internal/errors/index.js +1 -0
- package/dist/_internal/platform/artifacts/store.d.ts.map +1 -1
- package/dist/_internal/platform/artifacts/store.js +2 -1
- package/dist/_internal/platform/automation/scheduler-capacity.d.ts +29 -0
- package/dist/_internal/platform/automation/scheduler-capacity.d.ts.map +1 -0
- package/dist/_internal/platform/automation/scheduler-capacity.js +31 -0
- package/dist/_internal/platform/channels/delivery/shared.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery/shared.js +3 -2
- package/dist/_internal/platform/channels/delivery/strategies-bridge.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery/strategies-bridge.js +3 -2
- package/dist/_internal/platform/channels/delivery/strategies-core.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery/strategies-core.js +5 -4
- package/dist/_internal/platform/channels/delivery/strategies-enterprise.d.ts.map +1 -1
- package/dist/_internal/platform/channels/delivery/strategies-enterprise.js +4 -3
- package/dist/_internal/platform/companion/companion-chat-rate-limiter.d.ts +7 -0
- package/dist/_internal/platform/companion/companion-chat-rate-limiter.d.ts.map +1 -1
- package/dist/_internal/platform/companion/companion-chat-rate-limiter.js +16 -0
- package/dist/_internal/platform/config/manager.d.ts.map +1 -1
- package/dist/_internal/platform/config/manager.js +2 -1
- package/dist/_internal/platform/config/schema-domain-runtime.d.ts +6 -0
- package/dist/_internal/platform/config/schema-domain-runtime.d.ts.map +1 -1
- package/dist/_internal/platform/config/schema-domain-runtime.js +22 -0
- package/dist/_internal/platform/config/schema-types.d.ts +16 -2
- package/dist/_internal/platform/config/schema-types.d.ts.map +1 -1
- package/dist/_internal/platform/config/schema.d.ts.map +1 -1
- package/dist/_internal/platform/config/schema.js +1 -0
- package/dist/_internal/platform/config/service-registry.d.ts.map +1 -1
- package/dist/_internal/platform/config/service-registry.js +2 -1
- package/dist/_internal/platform/control-plane/gateway-web-ui.d.ts +0 -1
- package/dist/_internal/platform/control-plane/gateway-web-ui.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/gateway-web-ui.js +7 -6
- package/dist/_internal/platform/control-plane/gateway.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/gateway.js +7 -0
- package/dist/_internal/platform/control-plane/session-broker.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/session-broker.js +38 -5
- package/dist/_internal/platform/core/orchestrator-tool-runtime.d.ts.map +1 -1
- package/dist/_internal/platform/core/orchestrator-tool-runtime.js +6 -6
- package/dist/_internal/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
- package/dist/_internal/platform/core/orchestrator-turn-loop.js +10 -2
- package/dist/_internal/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/_internal/platform/core/orchestrator.js +2 -0
- package/dist/_internal/platform/daemon/facade-composition.d.ts +4 -131
- package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade-composition.js +9 -10
- package/dist/_internal/platform/daemon/facade-types.d.ts +141 -0
- package/dist/_internal/platform/daemon/facade-types.d.ts.map +1 -0
- package/dist/_internal/platform/daemon/facade-types.js +1 -0
- package/dist/_internal/platform/daemon/http/rate-limiter.d.ts +23 -0
- package/dist/_internal/platform/daemon/http/rate-limiter.d.ts.map +1 -0
- package/dist/_internal/platform/daemon/http/rate-limiter.js +71 -0
- package/dist/_internal/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/router-route-contexts.js +2 -1
- package/dist/_internal/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/router.js +90 -66
- package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http-listener.d.ts +14 -0
- package/dist/_internal/platform/daemon/http-listener.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http-listener.js +92 -86
- package/dist/_internal/platform/daemon/surface-delivery.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/surface-delivery.js +6 -5
- package/dist/_internal/platform/discovery/mcp-scanner.d.ts.map +1 -1
- package/dist/_internal/platform/discovery/mcp-scanner.js +28 -22
- package/dist/_internal/platform/discovery/scanner.d.ts.map +1 -1
- package/dist/_internal/platform/discovery/scanner.js +38 -22
- package/dist/_internal/platform/export/session-export.d.ts +0 -1
- package/dist/_internal/platform/export/session-export.d.ts.map +1 -1
- package/dist/_internal/platform/export/session-export.js +1 -33
- package/dist/_internal/platform/hooks/runners/http.d.ts.map +1 -1
- package/dist/_internal/platform/hooks/runners/http.js +15 -1
- package/dist/_internal/platform/hooks/types.d.ts +7 -0
- package/dist/_internal/platform/hooks/types.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/delivery.d.ts +3 -1
- package/dist/_internal/platform/integrations/delivery.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/delivery.js +3 -2
- package/dist/_internal/platform/integrations/discord.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/discord.js +6 -5
- package/dist/_internal/platform/integrations/ntfy.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/ntfy.js +3 -2
- package/dist/_internal/platform/integrations/webhooks.d.ts.map +1 -1
- package/dist/_internal/platform/integrations/webhooks.js +12 -1
- package/dist/_internal/platform/intelligence/lsp/binary-downloader.d.ts.map +1 -1
- package/dist/_internal/platform/intelligence/lsp/binary-downloader.js +4 -3
- package/dist/_internal/platform/knowledge/store.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/store.js +50 -25
- package/dist/_internal/platform/mcp/client.d.ts.map +1 -1
- package/dist/_internal/platform/mcp/client.js +3 -2
- package/dist/_internal/platform/media/builtin-generation-providers.d.ts.map +1 -1
- package/dist/_internal/platform/media/builtin-generation-providers.js +4 -3
- package/dist/_internal/platform/media/builtin-image-understanding.d.ts.map +1 -1
- package/dist/_internal/platform/media/builtin-image-understanding.js +5 -4
- package/dist/_internal/platform/providers/anthropic-compat.d.ts.map +1 -1
- package/dist/_internal/platform/providers/anthropic-compat.js +5 -3
- package/dist/_internal/platform/providers/anthropic.d.ts.map +1 -1
- package/dist/_internal/platform/providers/anthropic.js +10 -7
- package/dist/_internal/platform/providers/builtin-catalog.d.ts.map +1 -1
- package/dist/_internal/platform/providers/builtin-catalog.js +3 -2
- package/dist/_internal/platform/providers/catalogue.d.ts +56 -0
- package/dist/_internal/platform/providers/catalogue.d.ts.map +1 -0
- package/dist/_internal/platform/providers/catalogue.js +111 -0
- package/dist/_internal/platform/providers/context-discovery.d.ts.map +1 -1
- package/dist/_internal/platform/providers/context-discovery.js +2 -1
- package/dist/_internal/platform/providers/credentials.d.ts +12 -0
- package/dist/_internal/platform/providers/credentials.d.ts.map +1 -0
- package/dist/_internal/platform/providers/credentials.js +54 -0
- package/dist/_internal/platform/providers/gemini.d.ts.map +1 -1
- package/dist/_internal/platform/providers/gemini.js +6 -5
- package/dist/_internal/platform/providers/github-copilot.d.ts.map +1 -1
- package/dist/_internal/platform/providers/github-copilot.js +2 -1
- package/dist/_internal/platform/providers/health.d.ts +15 -0
- package/dist/_internal/platform/providers/health.d.ts.map +1 -0
- package/dist/_internal/platform/providers/health.js +32 -0
- package/dist/_internal/platform/providers/llama-cpp.d.ts.map +1 -1
- package/dist/_internal/platform/providers/llama-cpp.js +5 -3
- package/dist/_internal/platform/providers/lm-studio.d.ts.map +1 -1
- package/dist/_internal/platform/providers/lm-studio.js +5 -3
- package/dist/_internal/platform/providers/model-benchmarks.d.ts.map +1 -1
- package/dist/_internal/platform/providers/model-benchmarks.js +2 -1
- package/dist/_internal/platform/providers/model-catalog-cache.d.ts.map +1 -1
- package/dist/_internal/platform/providers/model-catalog-cache.js +2 -1
- package/dist/_internal/platform/providers/model-limits.d.ts.map +1 -1
- package/dist/_internal/platform/providers/model-limits.js +2 -1
- package/dist/_internal/platform/providers/ollama.d.ts.map +1 -1
- package/dist/_internal/platform/providers/ollama.js +5 -3
- package/dist/_internal/platform/providers/openai-codex.d.ts.map +1 -1
- package/dist/_internal/platform/providers/openai-codex.js +4 -2
- package/dist/_internal/platform/providers/openai-compat.d.ts.map +1 -1
- package/dist/_internal/platform/providers/openai-compat.js +3 -2
- package/dist/_internal/platform/providers/provider-not-found-error.d.ts +3 -1
- package/dist/_internal/platform/providers/provider-not-found-error.d.ts.map +1 -1
- package/dist/_internal/platform/providers/provider-not-found-error.js +3 -4
- package/dist/_internal/platform/providers/well-known-endpoints.d.ts +53 -0
- package/dist/_internal/platform/providers/well-known-endpoints.d.ts.map +1 -0
- package/dist/_internal/platform/providers/well-known-endpoints.js +52 -0
- package/dist/_internal/platform/runtime/auth/oauth-core.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/auth/oauth-core.js +2 -1
- package/dist/_internal/platform/runtime/bootstrap-runtime-events.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/bootstrap-runtime-events.js +2 -0
- package/dist/_internal/platform/runtime/contracts/index.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/contracts/index.js +1 -5
- package/dist/_internal/platform/runtime/contracts/migrations/schemas.d.ts +57 -0
- package/dist/_internal/platform/runtime/contracts/migrations/schemas.d.ts.map +1 -0
- package/dist/_internal/platform/runtime/contracts/migrations/schemas.js +157 -0
- package/dist/_internal/platform/runtime/correlation.d.ts +44 -0
- package/dist/_internal/platform/runtime/correlation.d.ts.map +1 -0
- package/dist/_internal/platform/runtime/correlation.js +40 -0
- package/dist/_internal/platform/runtime/emitters/security.d.ts +32 -0
- package/dist/_internal/platform/runtime/emitters/security.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/emitters/security.js +26 -0
- package/dist/_internal/platform/runtime/emitters/tools.d.ts +11 -2
- package/dist/_internal/platform/runtime/emitters/tools.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/emitters/tools.js +27 -0
- package/dist/_internal/platform/runtime/emitters/transport.d.ts +27 -0
- package/dist/_internal/platform/runtime/emitters/transport.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/emitters/transport.js +19 -0
- package/dist/_internal/platform/runtime/emitters/turn.d.ts +22 -1
- package/dist/_internal/platform/runtime/emitters/turn.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/emitters/turn.js +9 -0
- package/dist/_internal/platform/runtime/events/index.d.ts +45 -0
- package/dist/_internal/platform/runtime/events/index.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/index.js +130 -22
- package/dist/_internal/platform/runtime/events/ops.d.ts +8 -0
- package/dist/_internal/platform/runtime/events/ops.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/security.d.ts +47 -0
- package/dist/_internal/platform/runtime/events/security.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/tools.d.ts +14 -2
- package/dist/_internal/platform/runtime/events/tools.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/transport.d.ts +31 -0
- package/dist/_internal/platform/runtime/events/transport.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/turn.d.ts +25 -1
- package/dist/_internal/platform/runtime/events/turn.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/events/workspace.d.ts +16 -0
- package/dist/_internal/platform/runtime/events/workspace.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/integration/helpers.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/integration/helpers.js +5 -0
- package/dist/_internal/platform/runtime/llm-observability.d.ts +43 -0
- package/dist/_internal/platform/runtime/llm-observability.d.ts.map +1 -0
- package/dist/_internal/platform/runtime/llm-observability.js +107 -0
- package/dist/_internal/platform/runtime/metrics.d.ts +49 -0
- package/dist/_internal/platform/runtime/metrics.d.ts.map +1 -0
- package/dist/_internal/platform/runtime/metrics.js +114 -0
- package/dist/_internal/platform/runtime/ops/control-plane.d.ts +5 -2
- package/dist/_internal/platform/runtime/ops/control-plane.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/ops/control-plane.js +5 -4
- package/dist/_internal/platform/runtime/perf/slo-collector.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/perf/slo-collector.js +2 -0
- package/dist/_internal/platform/runtime/permissions/divergence-dashboard.d.ts +3 -1
- package/dist/_internal/platform/runtime/permissions/divergence-dashboard.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/permissions/divergence-dashboard.js +3 -2
- package/dist/_internal/platform/runtime/permissions/policy-loader.d.ts +3 -1
- package/dist/_internal/platform/runtime/permissions/policy-loader.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/permissions/policy-loader.js +3 -2
- package/dist/_internal/platform/runtime/permissions/policy-signer.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/permissions/policy-signer.js +7 -2
- package/dist/_internal/platform/runtime/permissions/simulation.d.ts +3 -1
- package/dist/_internal/platform/runtime/permissions/simulation.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/permissions/simulation.js +3 -2
- package/dist/_internal/platform/runtime/remote/transport-contract.d.ts +14 -2
- package/dist/_internal/platform/runtime/remote/transport-contract.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/remote/transport-contract.js +7 -5
- package/dist/_internal/platform/runtime/store/helpers/reducers/sync.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/store/helpers/reducers/sync.js +12 -1
- package/dist/_internal/platform/runtime/tasks/manager.d.ts +7 -3
- package/dist/_internal/platform/runtime/tasks/manager.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/tasks/manager.js +7 -6
- package/dist/_internal/platform/runtime/telemetry/api-helpers.d.ts +14 -0
- package/dist/_internal/platform/runtime/telemetry/api-helpers.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/telemetry/api-helpers.js +59 -0
- package/dist/_internal/platform/runtime/telemetry/api.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/telemetry/api.js +19 -4
- package/dist/_internal/platform/runtime/telemetry/exporters/otlp.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/telemetry/exporters/otlp.js +19 -6
- package/dist/_internal/platform/runtime/telemetry/exporters/queue.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/telemetry/exporters/queue.js +11 -4
- package/dist/_internal/platform/runtime/telemetry/meter.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/telemetry/meter.js +7 -3
- package/dist/_internal/platform/runtime/telemetry/redaction-config.d.ts +9 -0
- package/dist/_internal/platform/runtime/telemetry/redaction-config.d.ts.map +1 -0
- package/dist/_internal/platform/runtime/telemetry/redaction-config.js +52 -0
- package/dist/_internal/platform/runtime/tools/phases/budget.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/tools/phases/budget.js +3 -2
- package/dist/_internal/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/transports/daemon-http-client.js +138 -17
- package/dist/_internal/platform/scheduler/scheduler.d.ts +19 -2
- package/dist/_internal/platform/scheduler/scheduler.d.ts.map +1 -1
- package/dist/_internal/platform/scheduler/scheduler.js +65 -25
- package/dist/_internal/platform/sessions/manager.d.ts.map +1 -1
- package/dist/_internal/platform/sessions/manager.js +6 -2
- package/dist/_internal/platform/state/memory-embedding-http.d.ts.map +1 -1
- package/dist/_internal/platform/state/memory-embedding-http.js +3 -2
- package/dist/_internal/platform/state/project-index.d.ts.map +1 -1
- package/dist/_internal/platform/state/project-index.js +6 -4
- package/dist/_internal/platform/tools/agent/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/agent/index.js +2 -1
- package/dist/_internal/platform/tools/analyze/git-modes.d.ts.map +1 -1
- package/dist/_internal/platform/tools/analyze/git-modes.js +2 -1
- package/dist/_internal/platform/tools/edit/core.d.ts.map +1 -1
- package/dist/_internal/platform/tools/edit/core.js +2 -1
- package/dist/_internal/platform/tools/exec/runtime.d.ts.map +1 -1
- package/dist/_internal/platform/tools/exec/runtime.js +3 -2
- package/dist/_internal/platform/tools/fetch/runtime.d.ts.map +1 -1
- package/dist/_internal/platform/tools/fetch/runtime.js +4 -2
- package/dist/_internal/platform/tools/read/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/read/index.js +2 -1
- package/dist/_internal/platform/tools/registry-tool/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/registry-tool/index.js +2 -1
- package/dist/_internal/platform/tools/state/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/state/index.js +2 -1
- package/dist/_internal/platform/tools/task/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/task/index.js +2 -1
- package/dist/_internal/platform/tools/team/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/team/index.js +2 -1
- package/dist/_internal/platform/tools/web-search/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/web-search/index.js +2 -1
- package/dist/_internal/platform/tools/worklist/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/worklist/index.js +2 -1
- package/dist/_internal/platform/types/errors.d.ts +12 -10
- package/dist/_internal/platform/types/errors.d.ts.map +1 -1
- package/dist/_internal/platform/types/errors.js +21 -20
- package/dist/_internal/platform/utils/error-display.d.ts.map +1 -1
- package/dist/_internal/platform/utils/error-display.js +6 -4
- package/dist/_internal/platform/utils/fetch-with-timeout.d.ts +17 -0
- package/dist/_internal/platform/utils/fetch-with-timeout.d.ts.map +1 -1
- package/dist/_internal/platform/utils/fetch-with-timeout.js +59 -0
- package/dist/_internal/platform/utils/record-coerce.d.ts +11 -0
- package/dist/_internal/platform/utils/record-coerce.d.ts.map +1 -0
- package/dist/_internal/platform/utils/record-coerce.js +12 -0
- package/dist/_internal/platform/utils/redaction.js +1 -1
- package/dist/_internal/platform/utils/ring-buffer.d.ts +54 -0
- package/dist/_internal/platform/utils/ring-buffer.d.ts.map +1 -0
- package/dist/_internal/platform/utils/ring-buffer.js +96 -0
- package/dist/_internal/platform/utils/shell-split.d.ts +11 -0
- package/dist/_internal/platform/utils/shell-split.d.ts.map +1 -0
- package/dist/_internal/platform/utils/shell-split.js +83 -0
- package/dist/_internal/platform/version.js +1 -1
- package/dist/_internal/platform/voice/providers/deepgram.d.ts.map +1 -1
- package/dist/_internal/platform/voice/providers/deepgram.js +2 -1
- package/dist/_internal/platform/voice/providers/elevenlabs.d.ts.map +1 -1
- package/dist/_internal/platform/voice/providers/elevenlabs.js +5 -4
- package/dist/_internal/platform/voice/providers/google.d.ts.map +1 -1
- package/dist/_internal/platform/voice/providers/google.js +5 -4
- package/dist/_internal/platform/voice/providers/microsoft.d.ts.map +1 -1
- package/dist/_internal/platform/voice/providers/microsoft.js +2 -1
- package/dist/_internal/platform/voice/providers/openai.d.ts.map +1 -1
- package/dist/_internal/platform/voice/providers/openai.js +4 -3
- package/dist/_internal/platform/voice/providers/shared.d.ts.map +1 -1
- package/dist/_internal/platform/voice/providers/shared.js +2 -1
- package/dist/_internal/platform/voice/providers/vydra.d.ts.map +1 -1
- package/dist/_internal/platform/voice/providers/vydra.js +3 -2
- package/dist/_internal/platform/watchers/registry.d.ts.map +1 -1
- package/dist/_internal/platform/watchers/registry.js +3 -2
- package/dist/_internal/platform/workflow/trigger-executor.d.ts.map +1 -1
- package/dist/_internal/platform/workflow/trigger-executor.js +5 -3
- package/dist/_internal/platform/workspace/daemon-home.d.ts.map +1 -1
- package/dist/_internal/platform/workspace/daemon-home.js +6 -2
- package/dist/_internal/platform/workspace/workspace-swap-manager.d.ts +1 -0
- package/dist/_internal/platform/workspace/workspace-swap-manager.d.ts.map +1 -1
- package/dist/_internal/platform/workspace/workspace-swap-manager.js +14 -2
- package/package.json +1 -1
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Covers tool execution lifecycle events for the runtime event bus.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* OBS-05: Structured summary of a tool result — avoids leaking raw `unknown` payloads
|
|
9
|
+
* into the event stream while still providing enough context for observability.
|
|
10
|
+
*/
|
|
11
|
+
export interface ToolResultSummary {
|
|
12
|
+
/** Discriminant for the result shape (e.g. 'text', 'json', 'error', 'binary'). */
|
|
13
|
+
kind: string;
|
|
14
|
+
/** Approximate byte size of the raw result. */
|
|
15
|
+
byteSize: number;
|
|
16
|
+
/** Optional short preview (first N chars, no credentials). */
|
|
17
|
+
preview?: string;
|
|
18
|
+
}
|
|
7
19
|
export type ToolEvent =
|
|
8
20
|
/** A tool call request was received from the LLM. */
|
|
9
21
|
{
|
|
@@ -64,7 +76,7 @@ export type ToolEvent =
|
|
|
64
76
|
turnId: string;
|
|
65
77
|
tool: string;
|
|
66
78
|
durationMs: number;
|
|
67
|
-
result?:
|
|
79
|
+
result?: ToolResultSummary;
|
|
68
80
|
}
|
|
69
81
|
/** Tool call failed with an error. */
|
|
70
82
|
| {
|
|
@@ -74,7 +86,7 @@ export type ToolEvent =
|
|
|
74
86
|
tool: string;
|
|
75
87
|
error: string;
|
|
76
88
|
durationMs: number;
|
|
77
|
-
result?:
|
|
89
|
+
result?: ToolResultSummary;
|
|
78
90
|
}
|
|
79
91
|
/** Tool results were synthesized to reconcile unresolved calls. */
|
|
80
92
|
| {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/events/tools.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;GAIG;AAEH,MAAM,MAAM,SAAS;AACnB,qDAAqD;AACnD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE;AACxG,oDAAoD;GAClD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAC1E,uDAAuD;GACrD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAC1E,oDAAoD;GAClD;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE;AAChG,kCAAkC;GAChC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AAC7F,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52,6 +52,37 @@ export type TransportEvent =
|
|
|
52
52
|
type: 'TRANSPORT_TERMINAL_FAILURE';
|
|
53
53
|
transportId: string;
|
|
54
54
|
error: string;
|
|
55
|
+
}
|
|
56
|
+
/** OBS-18: A retry has been scheduled after a transient failure. */
|
|
57
|
+
| {
|
|
58
|
+
type: 'TRANSPORT_RETRY_SCHEDULED';
|
|
59
|
+
transportId: string;
|
|
60
|
+
attempt: number;
|
|
61
|
+
maxAttempts: number;
|
|
62
|
+
backoffMs: number;
|
|
63
|
+
reason: string;
|
|
64
|
+
}
|
|
65
|
+
/** OBS-18: A scheduled retry is now being executed. */
|
|
66
|
+
| {
|
|
67
|
+
type: 'TRANSPORT_RETRY_EXECUTED';
|
|
68
|
+
transportId: string;
|
|
69
|
+
attempt: number;
|
|
70
|
+
maxAttempts: number;
|
|
71
|
+
}
|
|
72
|
+
/** OBS-19: An SSE subscriber connected to the event stream. */
|
|
73
|
+
| {
|
|
74
|
+
type: 'STREAM_SUBSCRIBER_CONNECTED';
|
|
75
|
+
streamId: string;
|
|
76
|
+
subscriberId: string;
|
|
77
|
+
streamType: string;
|
|
78
|
+
}
|
|
79
|
+
/** OBS-19: An SSE subscriber disconnected from the event stream. */
|
|
80
|
+
| {
|
|
81
|
+
type: 'STREAM_SUBSCRIBER_DISCONNECTED';
|
|
82
|
+
streamId: string;
|
|
83
|
+
subscriberId: string;
|
|
84
|
+
streamType: string;
|
|
85
|
+
reason?: string;
|
|
55
86
|
};
|
|
56
87
|
/** All transport event type literals as a union. */
|
|
57
88
|
export type TransportEventType = TransportEvent['type'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/events/transport.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;GAIG;AAEH,MAAM,MAAM,cAAc;AACxB,4CAA4C;AAC1C;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,WAAW,EAAE,MAAM,CA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;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE;AACrG,oEAAoE;GAClE;IAAE,IAAI,EAAE,gCAAgC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5H,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -43,18 +43,42 @@ export type TurnEvent =
|
|
|
43
43
|
type: 'STREAM_END';
|
|
44
44
|
turnId: string;
|
|
45
45
|
}
|
|
46
|
+
/** OBS-04: An LLM request is about to be dispatched to the provider. */
|
|
47
|
+
| {
|
|
48
|
+
type: 'LLM_REQUEST_STARTED';
|
|
49
|
+
turnId: string;
|
|
50
|
+
provider: string;
|
|
51
|
+
model: string;
|
|
52
|
+
/** Redacted prompt summary: {length, sha256, first100chars} unless telemetry.includeRawPrompts is true. */
|
|
53
|
+
promptSummary: {
|
|
54
|
+
length: number;
|
|
55
|
+
sha256: string;
|
|
56
|
+
first100chars: string;
|
|
57
|
+
} | string;
|
|
58
|
+
}
|
|
46
59
|
/** A provider chat call completed within the current turn iteration. */
|
|
47
60
|
| {
|
|
48
61
|
type: 'LLM_RESPONSE_RECEIVED';
|
|
49
62
|
turnId: string;
|
|
50
63
|
provider: string;
|
|
51
64
|
model: string;
|
|
52
|
-
|
|
65
|
+
/** Redacted response summary: {length, sha256, first100chars} unless telemetry.includeRawPrompts is true. */
|
|
66
|
+
contentSummary: {
|
|
67
|
+
length: number;
|
|
68
|
+
sha256: string;
|
|
69
|
+
first100chars: string;
|
|
70
|
+
} | string;
|
|
53
71
|
toolCallCount: number;
|
|
54
72
|
inputTokens: number;
|
|
55
73
|
outputTokens: number;
|
|
56
74
|
cacheReadTokens?: number;
|
|
57
75
|
cacheWriteTokens?: number;
|
|
76
|
+
/** OBS-04 enrichments */
|
|
77
|
+
durationMs?: number;
|
|
78
|
+
retries?: number;
|
|
79
|
+
costUsdCents?: number;
|
|
80
|
+
finishReason?: string;
|
|
81
|
+
providerRequestId?: string;
|
|
58
82
|
}
|
|
59
83
|
/** A batch of tool calls is ready for execution. */
|
|
60
84
|
| {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/events/turn.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,aAAa,GACb,2BAA2B,GAC3B,WAAW,GACX,kBAAkB,CAAC;AAEvB,MAAM,MAAM,SAAS;AACnB,qDAAqD;AACnD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC5D,4DAA4D;GAC1D;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC1C,sDAAsD;GACpD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,cAAc,EAAE,kBAAkB,GAAG,kBAAkB,CAAC,CAAA;CAAE;AAC1I,oCAAoC;GAClC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC1C,8DAA8D;GAC5D;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,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,kBAAkB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE;AACnE,0DAA0D;GACxD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACxC,qEAAqE;GACnE;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC7C,yDAAyD;GACvD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,cAAc,EAAE,WAAW,GAAG,gBAAgB,CAAC,CAAA;CAAE;AACnI,iCAAiC;GAC/B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,cAAc,EAAE,WAAW,GAAG,gBAAgB,GAAG,WAAW,CAAC,CAAA;CAAE;AAC1I,gDAAgD;GAC9C;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC,CAAA;CAAE,CAAC;AAE/G,+CAA+C;AAC/C,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -51,6 +51,22 @@ export type WorkspaceEvent =
|
|
|
51
51
|
sourcePath: string;
|
|
52
52
|
/** Human-readable reason (e.g. JSON parse error message). */
|
|
53
53
|
reason: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Emitted when a workspace swap fails (mkdir or rerootStores threw).
|
|
57
|
+
* Any subscriber that saw WORKSPACE_SWAP_STARTED without a subsequent
|
|
58
|
+
* WORKSPACE_SWAP_COMPLETED should watch for this event. (OBS-08)
|
|
59
|
+
*/
|
|
60
|
+
| {
|
|
61
|
+
type: 'WORKSPACE_SWAP_FAILED';
|
|
62
|
+
/** Original working directory (swap source). */
|
|
63
|
+
from: string;
|
|
64
|
+
/** Target path that was attempted. */
|
|
65
|
+
to: string;
|
|
66
|
+
/** Machine-readable failure code. */
|
|
67
|
+
code: 'INVALID_PATH' | 'REROOT_FAILED' | 'UNKNOWN';
|
|
68
|
+
/** Human-readable reason. */
|
|
69
|
+
reason: string;
|
|
54
70
|
};
|
|
55
71
|
export type WorkspaceEventType = WorkspaceEvent['type'];
|
|
56
72
|
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/events/workspace.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;GAKG;AAEH,MAAM,MAAM,cAAc;AACxB,4DAA4D;AAC1D;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AACH,iFAAiF;GAC/E;IACE,IAAI,EAAE,0BAA0B,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,yBAAyB,EAAE,OAAO,CAAC;CACpC;AACH,sFAAsF;GACpF;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AACH;;;GAGG;GACD;IACE,IAAI,EAAE,6BAA6B,CAAC;IACpC,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;CACZ;AACH;;;GAGG;GACD;IACE,IAAI,EAAE,qCAAqC,CAAC;IAC5C,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/events/workspace.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;GAKG;AAEH,MAAM,MAAM,cAAc;AACxB,4DAA4D;AAC1D;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AACH,iFAAiF;GAC/E;IACE,IAAI,EAAE,0BAA0B,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,yBAAyB,EAAE,OAAO,CAAC;CACpC;AACH,sFAAsF;GACpF;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AACH;;;GAGG;GACD;IACE,IAAI,EAAE,6BAA6B,CAAC;IACpC,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;CACZ;AACH;;;GAGG;GACD;IACE,IAAI,EAAE,qCAAqC,CAAC;IAC5C,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;CAChB;AACH;;;;GAIG;GACD;IACE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;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AAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAiB9C,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IA0E5C,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAqCtC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAiC7D,mBAAmB,IAAI,gBAAgB;IAkBvC,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAa/C,qBAAqB,IAAI,kBAAkB;IAmB3C,mBAAmB,IAAI,gBAAgB;IAQvC,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAclD,UAAU,IAAI,aAAa,EAAE;IAkB7B,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO;IASvD,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,QAAQ;CAwCtF"}
|
|
@@ -509,11 +509,16 @@ export class IntegrationHelperService {
|
|
|
509
509
|
const stream = new ReadableStream({
|
|
510
510
|
start: (controller) => {
|
|
511
511
|
const unsubs = selectedDomains.map((domain) => this.context.runtimeBus.onDomain(domain, (envelope) => {
|
|
512
|
+
// PERF-06: Drop event if the stream buffer is full (backpressure guard).
|
|
513
|
+
if ((controller.desiredSize ?? 1) <= 0)
|
|
514
|
+
return;
|
|
512
515
|
controller.enqueue(encoder.encode(`event: ${domain}\ndata: ${JSON.stringify(serializeEnvelope(envelope))}\n\n`));
|
|
513
516
|
}));
|
|
514
517
|
const heartbeat = setInterval(() => {
|
|
515
518
|
controller.enqueue(encoder.encode(': heartbeat\n\n'));
|
|
516
519
|
}, 15_000);
|
|
520
|
+
// Don't block clean process exit (PERF-07).
|
|
521
|
+
heartbeat.unref?.();
|
|
517
522
|
teardown = () => {
|
|
518
523
|
clearInterval(heartbeat);
|
|
519
524
|
for (const unsub of unsubs)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Structured prompt summary emitted in telemetry events (default: redacted). */
|
|
2
|
+
export interface PromptSummary {
|
|
3
|
+
/** Byte length of the raw content. */
|
|
4
|
+
length: number;
|
|
5
|
+
/** SHA-256 hex digest of the raw content (for deduplication without exposure). */
|
|
6
|
+
sha256: string;
|
|
7
|
+
/** First 100 chars of the raw content (safe preview). */
|
|
8
|
+
first100chars: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* OBS-06: Summarize prompt/response content for telemetry emission.
|
|
12
|
+
* When includeRawPrompts is true, returns the raw string.
|
|
13
|
+
* Default (false): returns a PromptSummary with length, sha256, first100chars.
|
|
14
|
+
*/
|
|
15
|
+
export declare function summarizePromptContent(content: string, includeRaw: boolean): PromptSummary | string;
|
|
16
|
+
/**
|
|
17
|
+
* OBS-04: Result from an instrumented LLM call.
|
|
18
|
+
* Adds durationMs and retries tracking to the provider response.
|
|
19
|
+
*/
|
|
20
|
+
export interface InstrumentedLlmResult<T> {
|
|
21
|
+
result: T;
|
|
22
|
+
durationMs: number;
|
|
23
|
+
retries: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function instrumentedLlmCall<T>(fn: () => Promise<T>, opts?: {
|
|
26
|
+
maxRetries?: number;
|
|
27
|
+
retryDelayMs?: number;
|
|
28
|
+
/** Provider name for metric labels (e.g. 'anthropic'). */
|
|
29
|
+
provider?: string;
|
|
30
|
+
/** Model name for metric labels (e.g. 'claude-opus-4-5'). */
|
|
31
|
+
model?: string;
|
|
32
|
+
/** Extract token usage from a successful result to record histogram instruments. */
|
|
33
|
+
extractTokens?: (result: T) => {
|
|
34
|
+
inputTokens?: number;
|
|
35
|
+
outputTokens?: number;
|
|
36
|
+
} | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* M-2: Optional callback invoked on entry before the first attempt.
|
|
39
|
+
* Callers that have bus/ctx access can wire emitLlmRequestStarted here.
|
|
40
|
+
*/
|
|
41
|
+
onStarted?: () => void;
|
|
42
|
+
}): Promise<InstrumentedLlmResult<T>>;
|
|
43
|
+
//# sourceMappingURL=llm-observability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-observability.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/runtime/llm-observability.ts"],"names":[],"mappings":"AAiBA,iFAAiF;AACjF,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,OAAO,GAClB,aAAa,GAAG,MAAM,CAOxB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,MAAM,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AA+BD,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,CAAC,EAAE;IACL,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC3F;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,GACA,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAkDnC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OBS-04/OBS-06: LLM observability utilities.
|
|
3
|
+
*
|
|
4
|
+
* Provides:
|
|
5
|
+
* - Prompt/response content summarization for redaction-by-default telemetry
|
|
6
|
+
* - instrumentedLlmCall() wrapper that emits LLM_REQUEST_STARTED + enriched LLM_RESPONSE_RECEIVED
|
|
7
|
+
* - includeRawPrompts config awareness
|
|
8
|
+
*/
|
|
9
|
+
import { createHash } from 'node:crypto';
|
|
10
|
+
import { llmRequestsTotal, llmRequestDurationMs, llmTokensInput, llmTokensOutput, llmRequestsStarted, } from './metrics.js';
|
|
11
|
+
/**
|
|
12
|
+
* OBS-06: Summarize prompt/response content for telemetry emission.
|
|
13
|
+
* When includeRawPrompts is true, returns the raw string.
|
|
14
|
+
* Default (false): returns a PromptSummary with length, sha256, first100chars.
|
|
15
|
+
*/
|
|
16
|
+
export function summarizePromptContent(content, includeRaw) {
|
|
17
|
+
if (includeRaw)
|
|
18
|
+
return content;
|
|
19
|
+
return {
|
|
20
|
+
length: content.length,
|
|
21
|
+
sha256: createHash('sha256').update(content).digest('hex'),
|
|
22
|
+
first100chars: content.slice(0, 100),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* OBS-04: Wrap any LLM provider call to track duration, retry count, and
|
|
27
|
+
* record platformMeter instruments (llmRequestsTotal, llmRequestDurationMs,
|
|
28
|
+
* llmTokensInput, llmTokensOutput).
|
|
29
|
+
*
|
|
30
|
+
* Providers wrap their .chat() / .generate() calls with this helper.
|
|
31
|
+
*
|
|
32
|
+
* Usage:
|
|
33
|
+
* ```ts
|
|
34
|
+
* const { result, durationMs, retries } = await instrumentedLlmCall(
|
|
35
|
+
* async () => await this.chat(params),
|
|
36
|
+
* { provider: this.name, model: params.model ?? this.defaultModel },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* OBS-04: Emit LLM_REQUEST_STARTED metric at the llm-observability layer.
|
|
42
|
+
*
|
|
43
|
+
* Records the llmRequestsStarted counter so callers without bus access still
|
|
44
|
+
* get per-provider/model observability. Callers that also hold a RuntimeEventBus
|
|
45
|
+
* should additionally call emitLlmRequestStarted(bus, ctx, data) from emitters/turn.
|
|
46
|
+
*/
|
|
47
|
+
function recordLlmRequestStartedMetric(opts) {
|
|
48
|
+
const labels = {};
|
|
49
|
+
if (opts.provider)
|
|
50
|
+
labels.provider = opts.provider;
|
|
51
|
+
if (opts.model)
|
|
52
|
+
labels.model = opts.model;
|
|
53
|
+
llmRequestsStarted.add(1, labels);
|
|
54
|
+
}
|
|
55
|
+
export async function instrumentedLlmCall(fn, opts) {
|
|
56
|
+
const maxRetries = opts?.maxRetries ?? 0;
|
|
57
|
+
const retryDelayMs = opts?.retryDelayMs ?? 0;
|
|
58
|
+
const startedAt = Date.now();
|
|
59
|
+
// Auto-emit LLM_REQUEST_STARTED metric on entry (no bus required)
|
|
60
|
+
recordLlmRequestStartedMetric({ provider: opts?.provider, model: opts?.model });
|
|
61
|
+
// M-2: fire onStarted callback if provided (e.g. to emit LLM_REQUEST_STARTED on the event bus)
|
|
62
|
+
opts?.onStarted?.();
|
|
63
|
+
let lastError;
|
|
64
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
65
|
+
try {
|
|
66
|
+
const result = await fn();
|
|
67
|
+
const durationMs = Date.now() - startedAt;
|
|
68
|
+
// C-1: record LLM metric instruments
|
|
69
|
+
if (opts?.provider !== undefined || opts?.model !== undefined) {
|
|
70
|
+
const labels = {};
|
|
71
|
+
if (opts.provider)
|
|
72
|
+
labels.provider = opts.provider;
|
|
73
|
+
if (opts.model)
|
|
74
|
+
labels.model = opts.model;
|
|
75
|
+
llmRequestsTotal.add(1, { ...labels, status: 'success' });
|
|
76
|
+
llmRequestDurationMs.record(durationMs, labels);
|
|
77
|
+
if (opts.extractTokens) {
|
|
78
|
+
const tokens = opts.extractTokens(result);
|
|
79
|
+
if (tokens?.inputTokens !== undefined && tokens.inputTokens > 0) {
|
|
80
|
+
llmTokensInput.record(tokens.inputTokens, labels);
|
|
81
|
+
}
|
|
82
|
+
if (tokens?.outputTokens !== undefined && tokens.outputTokens > 0) {
|
|
83
|
+
llmTokensOutput.record(tokens.outputTokens, labels);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return { result, durationMs, retries: attempt };
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
lastError = err;
|
|
91
|
+
if (attempt < maxRetries && retryDelayMs > 0) {
|
|
92
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// Record error metric on final failure
|
|
97
|
+
if (opts?.provider !== undefined || opts?.model !== undefined) {
|
|
98
|
+
const labels = {};
|
|
99
|
+
if (opts?.provider)
|
|
100
|
+
labels.provider = opts.provider;
|
|
101
|
+
if (opts?.model)
|
|
102
|
+
labels.model = opts.model;
|
|
103
|
+
llmRequestsTotal.add(1, { ...labels, status: 'error' });
|
|
104
|
+
llmRequestDurationMs.record(Date.now() - startedAt, labels);
|
|
105
|
+
}
|
|
106
|
+
throw lastError;
|
|
107
|
+
}
|
|
@@ -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
|
|
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
|
|
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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OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;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
|
|
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
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slo-collector.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/perf/slo-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAyC,MAAM,oBAAoB,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,qDAAqD;AACrD,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AA8DX;;;;;;;;;;;;;;GAcG;AACH,qBAAa,YAAY;IACvB,qFAAqF;IACrF,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAgB;IAClD,gFAAgF;IAChF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAC/C,sGAAsG;IACtG,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAgB;IAClD,kGAAkG;IAClG,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAgB;IAEnD,qDAAqD;IACrD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA6B;IAC/D,mEAAmE;IACnE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqB;IACrD,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6B;IAC5D,4FAA4F;IAC5F,OAAO,CAAC,mBAAmB,CAAuB;IAClD,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;IAEhE,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IAEjD,uDAAuD;IACvD,OAAO,CAAC,WAAW,CAA+C;gBAEtD,GAAG,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"slo-collector.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/perf/slo-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAyC,MAAM,oBAAoB,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY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