@pellux/goodvibes-sdk 0.21.30 → 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/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/session-broker.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/session-broker.js +12 -4
- 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/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 +70 -65
- package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http-listener.d.ts +1 -0
- package/dist/_internal/platform/daemon/http-listener.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http-listener.js +53 -73
- 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 +2 -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 +2 -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/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 +108 -14
- 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/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/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 +9 -2
- 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.map +1 -1
- package/dist/_internal/platform/scheduler/scheduler.js +6 -2
- 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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GoodVibesSdkError } from '../../errors/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* The three possible outcomes for a single integration delivery attempt.
|
|
3
4
|
*
|
|
@@ -26,9 +27,10 @@ export type DeliveryFailureClass = 'retryable' | 'terminal';
|
|
|
26
27
|
*/
|
|
27
28
|
export declare function classifyDeliveryError(error: unknown): DeliveryFailureClass;
|
|
28
29
|
/** Typed delivery error that carries an explicit failure classification. */
|
|
29
|
-
export declare class DeliveryError extends
|
|
30
|
+
export declare class DeliveryError extends GoodVibesSdkError {
|
|
30
31
|
readonly failureClass: DeliveryFailureClass;
|
|
31
32
|
readonly statusCode?: number | undefined;
|
|
33
|
+
readonly code: 'DELIVERY_ERROR';
|
|
32
34
|
constructor(message: string, failureClass: DeliveryFailureClass, statusCode?: number | undefined);
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/delivery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAQ1D;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,UAAU,CAAC;AAS5D;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CA6B1E;AAMD,4EAA4E;AAC5E,qBAAa,aAAc,SAAQ,iBAAiB;aAIhC,YAAY,EAAE,oBAAoB;aAClC,UAAU,CAAC,EAAE,MAAM;IAJrC,SAAiB,IAAI,EAAE,gBAAgB,CAAC;gBAEtC,OAAO,EAAE,MAAM,EACC,YAAY,EAAE,oBAAoB,EAClC,UAAU,CAAC,EAAE,MAAM,YAAA;CAKtC;AAMD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAA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AAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,iCAAiC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,OAAO,GACnB,sBAAsB,CASxB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { logger } from '../utils/logger.js';
|
|
2
|
+
import { GoodVibesSdkError } from '../../errors/index.js';
|
|
2
3
|
import { summarizeError } from '../utils/error-display.js';
|
|
3
4
|
// ---------------------------------------------------------------------------
|
|
4
5
|
// Failure classification
|
|
@@ -46,11 +47,11 @@ export function classifyDeliveryError(error) {
|
|
|
46
47
|
// DeliveryError — typed error with explicit classification
|
|
47
48
|
// ---------------------------------------------------------------------------
|
|
48
49
|
/** Typed delivery error that carries an explicit failure classification. */
|
|
49
|
-
export class DeliveryError extends
|
|
50
|
+
export class DeliveryError extends GoodVibesSdkError {
|
|
50
51
|
failureClass;
|
|
51
52
|
statusCode;
|
|
52
53
|
constructor(message, failureClass, statusCode) {
|
|
53
|
-
super(message);
|
|
54
|
+
super(message, { code: 'DELIVERY_ERROR', category: 'internal', source: 'runtime', recoverable: false });
|
|
54
55
|
this.failureClass = failureClass;
|
|
55
56
|
this.statusCode = statusCode;
|
|
56
57
|
this.name = 'DeliveryError';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discord.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/discord.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discord.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/discord.ts"],"names":[],"mappings":"AAQA,mDAAmD;AACnD,eAAO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AE,MAAM,EAAE,MAAM,GAAG,OAAO;IAezE;;OAEG;IACH,oBAAoB,CAClB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,OAAO;IAiBV,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,iBAAiB;CAK1B;AAED,qBAAa,oBAAoB;IAOnB,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,SAAS,CAA+C;IAChE,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;gBAEpB,OAAO,EAAE,2BAA2B;IAI3D,KAAK,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAqBjD,IAAI,IAAI,IAAI;IAMZ,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,GAAG,IAAI;IAKlC,IAAI,SAAS,IAAI,OAAO,CAEvB;YAEa,aAAa;IAwB3B,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,OAAO;CAOhB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { logger } from '../utils/logger.js';
|
|
2
2
|
import { summarizeError } from '../utils/error-display.js';
|
|
3
|
+
import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
|
|
3
4
|
// ---------------------------------------------------------------------------
|
|
4
5
|
// Types
|
|
5
6
|
// ---------------------------------------------------------------------------
|
|
@@ -198,7 +199,7 @@ export class DiscordIntegration {
|
|
|
198
199
|
payload.content = content;
|
|
199
200
|
if (embeds && embeds.length > 0)
|
|
200
201
|
payload.embeds = embeds;
|
|
201
|
-
const res = await
|
|
202
|
+
const res = await instrumentedFetch(target, {
|
|
202
203
|
method: 'POST',
|
|
203
204
|
headers: { 'Content-Type': 'application/json' },
|
|
204
205
|
body: JSON.stringify(payload),
|
|
@@ -222,7 +223,7 @@ export class DiscordIntegration {
|
|
|
222
223
|
payload.content = content;
|
|
223
224
|
if (embeds && embeds.length > 0)
|
|
224
225
|
payload.embeds = embeds;
|
|
225
|
-
const res = await
|
|
226
|
+
const res = await instrumentedFetch(`https://discord.com/api/v10/channels/${channelId}/messages`, {
|
|
226
227
|
method: 'POST',
|
|
227
228
|
headers: {
|
|
228
229
|
'Content-Type': 'application/json',
|
|
@@ -244,7 +245,7 @@ export class DiscordIntegration {
|
|
|
244
245
|
const payload = { type };
|
|
245
246
|
if (data)
|
|
246
247
|
payload.data = data;
|
|
247
|
-
const res = await
|
|
248
|
+
const res = await instrumentedFetch(`https://discord.com/api/v10/interactions/${interactionId}/${interactionToken}/callback`, {
|
|
248
249
|
method: 'POST',
|
|
249
250
|
headers: { 'Content-Type': 'application/json' },
|
|
250
251
|
body: JSON.stringify(payload),
|
|
@@ -263,7 +264,7 @@ export class DiscordIntegration {
|
|
|
263
264
|
const payload = { content };
|
|
264
265
|
if (embeds && embeds.length > 0)
|
|
265
266
|
payload.embeds = embeds;
|
|
266
|
-
const res = await
|
|
267
|
+
const res = await instrumentedFetch(`https://discord.com/api/v10/webhooks/${applicationId}/${interactionToken}/messages/@original`, {
|
|
267
268
|
method: 'PATCH',
|
|
268
269
|
headers: { 'Content-Type': 'application/json' },
|
|
269
270
|
body: JSON.stringify(payload),
|
|
@@ -278,7 +279,7 @@ export class DiscordIntegration {
|
|
|
278
279
|
if (!token) {
|
|
279
280
|
throw new Error(`DiscordIntegration: botToken is required for ${path}`);
|
|
280
281
|
}
|
|
281
|
-
const res = await
|
|
282
|
+
const res = await instrumentedFetch(`https://discord.com/api/v10${path}`, {
|
|
282
283
|
method: options.method ?? 'GET',
|
|
283
284
|
headers: {
|
|
284
285
|
Authorization: `Bot ${token}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ntfy.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/ntfy.ts"],"names":[],"mapp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,CAAC,IAAI,CAAC,EACzD,OAAO,GAAE,oBAAyB,GACjC,SAAS;IAiBZ,OAAO,CAAC,gBAAgB;CAKzB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
|
|
2
2
|
import { fetchWithTimeout } from '../utils/fetch-with-timeout.js';
|
|
3
|
+
import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
|
|
3
4
|
export class NtfyIntegration {
|
|
4
5
|
baseUrl;
|
|
5
6
|
token;
|
|
@@ -56,7 +57,7 @@ export class NtfyIntegration {
|
|
|
56
57
|
async poll(topic, options = {}) {
|
|
57
58
|
const url = this.buildSubscribeUrl(topic, 'json', { ...options, poll: true });
|
|
58
59
|
const headers = this.buildAuthHeaders();
|
|
59
|
-
const response = await
|
|
60
|
+
const response = await instrumentedFetch(url, {
|
|
60
61
|
method: 'GET',
|
|
61
62
|
headers,
|
|
62
63
|
signal: options.signal,
|
|
@@ -74,7 +75,7 @@ export class NtfyIntegration {
|
|
|
74
75
|
}
|
|
75
76
|
async subscribeJsonStream(topic, onMessage, options = {}) {
|
|
76
77
|
const url = this.buildSubscribeUrl(topic, 'json', options);
|
|
77
|
-
const response = await
|
|
78
|
+
const response = await instrumentedFetch(url, {
|
|
78
79
|
method: 'GET',
|
|
79
80
|
headers: this.buildAuthHeaders(),
|
|
80
81
|
signal: options.signal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/webhooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/integrations/webhooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,4BAA4B,CAAC;AAQ7F;;;;;;;;;;GAUG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,aAAa,CAAyB;gBAElC,IAAI,GAAE,MAAM,EAAO;IAI/B;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,eAAe;IAQlD,oEAAoE;IACpE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQzB,4BAA4B;IAC5B,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAQ/B,gCAAgC;IAChC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAI7B,iDAAiD;IACjD,OAAO,IAAI,MAAM,EAAE;IAInB,sDAAsD;IACtD,YAAY,IAAI,OAAO;IAQvB;;;;;;OAMG;IACG,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBvC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAsBrE,kBAAkB,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IA8B9C,wCAAwC;IACxC,MAAM,IAAI,IAAI;YAWA,OAAO;CAsBtB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { logger } from '../utils/logger.js';
|
|
2
2
|
import { classifyHostTrustTier, extractHostname, emitSsrfDeny } from '../tools/fetch/trust-tiers.js';
|
|
3
|
+
import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
|
|
3
4
|
// ---------------------------------------------------------------------------
|
|
4
5
|
// WebhookNotifier
|
|
5
6
|
// ---------------------------------------------------------------------------
|
|
@@ -137,7 +138,7 @@ export class WebhookNotifier {
|
|
|
137
138
|
throw new Error(`WebhookNotifier: blocked URL — ${trustResult.reason}`);
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
|
-
const res = await
|
|
141
|
+
const res = await instrumentedFetch(url, {
|
|
141
142
|
method: 'POST',
|
|
142
143
|
headers: { 'Content-Type': 'text/plain' },
|
|
143
144
|
body: text,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-downloader.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/intelligence/lsp/binary-downloader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"binary-downloader.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/intelligence/lsp/binary-downloader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0DH;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAErE;AAsMD;;;GAGG;AACH,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAY1F"}
|
|
@@ -9,6 +9,7 @@ import { existsSync, mkdirSync, chmodSync, unlinkSync, renameSync } from 'fs';
|
|
|
9
9
|
import { join } from 'path';
|
|
10
10
|
import { logger } from '../../utils/logger.js';
|
|
11
11
|
import { summarizeError } from '../../utils/error-display.js';
|
|
12
|
+
import { instrumentedFetch } from '../../utils/fetch-with-timeout.js';
|
|
12
13
|
function getPlatformKey() {
|
|
13
14
|
const platform = process.platform;
|
|
14
15
|
const arch = process.arch;
|
|
@@ -86,7 +87,7 @@ async function downloadBinary(binaryDir, name) {
|
|
|
86
87
|
try {
|
|
87
88
|
// Fetch latest release from GitHub API
|
|
88
89
|
const releaseUrl = `https://api.github.com/repos/${spec.repo}/releases/latest`;
|
|
89
|
-
const releaseRes = await
|
|
90
|
+
const releaseRes = await instrumentedFetch(releaseUrl, {
|
|
90
91
|
headers: { 'Accept': 'application/vnd.github.v3+json', 'User-Agent': 'goodvibes-sdk' },
|
|
91
92
|
signal: AbortSignal.timeout(15000),
|
|
92
93
|
});
|
|
@@ -110,7 +111,7 @@ async function downloadBinary(binaryDir, name) {
|
|
|
110
111
|
return null;
|
|
111
112
|
}
|
|
112
113
|
// Download the asset
|
|
113
|
-
const downloadRes = await
|
|
114
|
+
const downloadRes = await instrumentedFetch(asset.browser_download_url, {
|
|
114
115
|
signal: AbortSignal.timeout(120000), // 2 min for large binaries
|
|
115
116
|
headers: { 'User-Agent': 'goodvibes-sdk' },
|
|
116
117
|
});
|
|
@@ -123,7 +124,7 @@ async function downloadBinary(binaryDir, name) {
|
|
|
123
124
|
// SHA256 verification — rust-analyzer publishes .sha256 sidecar files
|
|
124
125
|
const sha256Asset = release.assets?.find(a => a.name === assetName + '.sha256');
|
|
125
126
|
if (sha256Asset) {
|
|
126
|
-
const sha256Res = await
|
|
127
|
+
const sha256Res = await instrumentedFetch(sha256Asset.browser_download_url, {
|
|
127
128
|
signal: AbortSignal.timeout(10000),
|
|
128
129
|
headers: { 'User-Agent': 'goodvibes-sdk' },
|
|
129
130
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/knowledge/store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qCAAqC,EACrC,0CAA0C,EAC1C,kCAAkC,EAClC,uCAAuC,EACvC,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAuCpB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE;QACvB,wBAAw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AyB,CAC7B,KAAK,EAAE,uCAAuC,GAC7C,OAAO,CAAC,kCAAkC,CAAC;IAyCxC,cAAc,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAwCrF,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;YAUpC,UAAU;CAyBzB"}
|
|
@@ -142,23 +142,33 @@ export class KnowledgeStore {
|
|
|
142
142
|
? this.getSourceByCanonicalUri(input.canonicalUri)
|
|
143
143
|
: null;
|
|
144
144
|
const now = nowMs();
|
|
145
|
+
const _title = stableText(input.title);
|
|
146
|
+
const _sourceUri = stableText(input.sourceUri);
|
|
147
|
+
const _canonicalUri = stableText(input.canonicalUri);
|
|
148
|
+
const _summary = stableText(input.summary);
|
|
149
|
+
const _description = stableText(input.description);
|
|
150
|
+
const _folderPath = stableText(input.folderPath);
|
|
151
|
+
const _artifactId = stableText(input.artifactId);
|
|
152
|
+
const _contentHash = stableText(input.contentHash);
|
|
153
|
+
const _crawlError = stableText(input.crawlError);
|
|
154
|
+
const _sessionId = stableText(input.sessionId);
|
|
145
155
|
const record = {
|
|
146
156
|
id: existing?.id ?? input.id ?? `source-${randomUUID().slice(0, 8)}`,
|
|
147
157
|
connectorId: input.connectorId,
|
|
148
158
|
sourceType: input.sourceType,
|
|
149
|
-
...(
|
|
150
|
-
...(
|
|
151
|
-
...(
|
|
152
|
-
...(
|
|
153
|
-
...(
|
|
159
|
+
...(_title !== null ? { title: _title } : {}),
|
|
160
|
+
...(_sourceUri !== null ? { sourceUri: _sourceUri } : {}),
|
|
161
|
+
...(_canonicalUri !== null ? { canonicalUri: _canonicalUri } : {}),
|
|
162
|
+
...(_summary !== null ? { summary: _summary } : {}),
|
|
163
|
+
...(_description !== null ? { description: _description } : {}),
|
|
154
164
|
tags: uniq(input.tags ?? existing?.tags),
|
|
155
|
-
...(
|
|
165
|
+
...(_folderPath !== null ? { folderPath: _folderPath } : existing?.folderPath ? { folderPath: existing.folderPath } : {}),
|
|
156
166
|
status: input.status,
|
|
157
|
-
...(
|
|
158
|
-
...(
|
|
167
|
+
...(_artifactId !== null ? { artifactId: _artifactId } : existing?.artifactId ? { artifactId: existing.artifactId } : {}),
|
|
168
|
+
...(_contentHash !== null ? { contentHash: _contentHash } : existing?.contentHash ? { contentHash: existing.contentHash } : {}),
|
|
159
169
|
...(typeof input.lastCrawledAt === 'number' ? { lastCrawledAt: input.lastCrawledAt } : existing?.lastCrawledAt ? { lastCrawledAt: existing.lastCrawledAt } : {}),
|
|
160
|
-
...(
|
|
161
|
-
...(
|
|
170
|
+
...(_crawlError !== null ? { crawlError: _crawlError } : existing?.crawlError && input.status !== 'indexed' ? { crawlError: existing.crawlError } : {}),
|
|
171
|
+
...(_sessionId !== null ? { sessionId: _sessionId } : existing?.sessionId ? { sessionId: existing.sessionId } : {}),
|
|
162
172
|
metadata: {
|
|
163
173
|
...(existing?.metadata ?? {}),
|
|
164
174
|
...(input.metadata ?? {}),
|
|
@@ -203,16 +213,18 @@ export class KnowledgeStore {
|
|
|
203
213
|
? this.nodes.get(input.id)
|
|
204
214
|
: this.getNodeByKindAndSlug(input.kind, input.slug);
|
|
205
215
|
const now = nowMs();
|
|
216
|
+
const _summary = stableText(input.summary);
|
|
217
|
+
const _sourceId = stableText(input.sourceId);
|
|
206
218
|
const record = {
|
|
207
219
|
id: existing?.id ?? input.id ?? `node-${randomUUID().slice(0, 8)}`,
|
|
208
220
|
kind: input.kind,
|
|
209
221
|
slug: input.slug,
|
|
210
222
|
title: input.title.trim(),
|
|
211
|
-
...(
|
|
223
|
+
...(_summary !== null ? { summary: _summary } : existing?.summary ? { summary: existing.summary } : {}),
|
|
212
224
|
aliases: uniq(input.aliases ?? existing?.aliases),
|
|
213
225
|
status: input.status ?? existing?.status ?? 'active',
|
|
214
226
|
confidence: Math.max(0, Math.min(100, input.confidence ?? existing?.confidence ?? 70)),
|
|
215
|
-
...(
|
|
227
|
+
...(_sourceId !== null ? { sourceId: _sourceId } : existing?.sourceId ? { sourceId: existing.sourceId } : {}),
|
|
216
228
|
metadata: {
|
|
217
229
|
...(existing?.metadata ?? {}),
|
|
218
230
|
...(input.metadata ?? {}),
|
|
@@ -307,14 +319,16 @@ export class KnowledgeStore {
|
|
|
307
319
|
await this.init();
|
|
308
320
|
const existing = input.id ? this.issues.get(input.id) : null;
|
|
309
321
|
const now = nowMs();
|
|
322
|
+
const _sourceId = stableText(input.sourceId);
|
|
323
|
+
const _nodeId = stableText(input.nodeId);
|
|
310
324
|
const record = {
|
|
311
325
|
id: existing?.id ?? input.id ?? `issue-${randomUUID().slice(0, 8)}`,
|
|
312
326
|
severity: input.severity,
|
|
313
327
|
code: input.code,
|
|
314
328
|
message: input.message.trim(),
|
|
315
329
|
status: input.status ?? existing?.status ?? 'open',
|
|
316
|
-
...(
|
|
317
|
-
...(
|
|
330
|
+
...(_sourceId !== null ? { sourceId: _sourceId } : {}),
|
|
331
|
+
...(_nodeId !== null ? { nodeId: _nodeId } : {}),
|
|
318
332
|
metadata: {
|
|
319
333
|
...(existing?.metadata ?? {}),
|
|
320
334
|
...(input.metadata ?? {}),
|
|
@@ -348,15 +362,19 @@ export class KnowledgeStore {
|
|
|
348
362
|
? this.extractions.get(input.id)
|
|
349
363
|
: this.getExtractionBySourceId(input.sourceId);
|
|
350
364
|
const now = nowMs();
|
|
365
|
+
const _artifactId = stableText(input.artifactId);
|
|
366
|
+
const _title = stableText(input.title);
|
|
367
|
+
const _summary = stableText(input.summary);
|
|
368
|
+
const _excerpt = stableText(input.excerpt);
|
|
351
369
|
const record = {
|
|
352
370
|
id: existing?.id ?? input.id ?? `extract-${randomUUID().slice(0, 8)}`,
|
|
353
371
|
sourceId: input.sourceId,
|
|
354
|
-
...(
|
|
372
|
+
...(_artifactId !== null ? { artifactId: _artifactId } : existing?.artifactId ? { artifactId: existing.artifactId } : {}),
|
|
355
373
|
extractorId: input.extractorId,
|
|
356
374
|
format: input.format,
|
|
357
|
-
...(
|
|
358
|
-
...(
|
|
359
|
-
...(
|
|
375
|
+
...(_title !== null ? { title: _title } : existing?.title ? { title: existing.title } : {}),
|
|
376
|
+
...(_summary !== null ? { summary: _summary } : existing?.summary ? { summary: existing.summary } : {}),
|
|
377
|
+
...(_excerpt !== null ? { excerpt: _excerpt } : existing?.excerpt ? { excerpt: existing.excerpt } : {}),
|
|
360
378
|
sections: uniq(input.sections ?? existing?.sections),
|
|
361
379
|
links: uniq(input.links ?? existing?.links),
|
|
362
380
|
estimatedTokens: Math.max(0, Number(input.estimatedTokens ?? existing?.estimatedTokens ?? 0)),
|
|
@@ -401,6 +419,7 @@ export class KnowledgeStore {
|
|
|
401
419
|
await this.init();
|
|
402
420
|
const existing = input.id ? this.jobRuns.get(input.id) : null;
|
|
403
421
|
const now = nowMs();
|
|
422
|
+
const _error = stableText(input.error);
|
|
404
423
|
const record = {
|
|
405
424
|
id: existing?.id ?? input.id ?? `kjr-${randomUUID().slice(0, 8)}`,
|
|
406
425
|
jobId: input.jobId,
|
|
@@ -409,7 +428,7 @@ export class KnowledgeStore {
|
|
|
409
428
|
requestedAt: input.requestedAt ?? existing?.requestedAt ?? now,
|
|
410
429
|
...(typeof input.startedAt === 'number' ? { startedAt: input.startedAt } : existing?.startedAt ? { startedAt: existing.startedAt } : {}),
|
|
411
430
|
...(typeof input.completedAt === 'number' ? { completedAt: input.completedAt } : existing?.completedAt ? { completedAt: existing.completedAt } : {}),
|
|
412
|
-
...(
|
|
431
|
+
...(_error !== null ? { error: _error } : existing?.error ? { error: existing.error } : {}),
|
|
413
432
|
result: {
|
|
414
433
|
...(existing?.result ?? {}),
|
|
415
434
|
...(input.result ?? {}),
|
|
@@ -445,13 +464,15 @@ export class KnowledgeStore {
|
|
|
445
464
|
}
|
|
446
465
|
async upsertUsageRecord(input) {
|
|
447
466
|
await this.init();
|
|
467
|
+
const _task = stableText(input.task);
|
|
468
|
+
const _sessionId = stableText(input.sessionId);
|
|
448
469
|
const record = {
|
|
449
470
|
id: input.id ?? `kuse-${randomUUID().slice(0, 8)}`,
|
|
450
471
|
targetKind: input.targetKind,
|
|
451
472
|
targetId: input.targetId,
|
|
452
473
|
usageKind: input.usageKind,
|
|
453
|
-
...(
|
|
454
|
-
...(
|
|
474
|
+
...(_task !== null ? { task: _task } : {}),
|
|
475
|
+
...(_sessionId !== null ? { sessionId: _sessionId } : {}),
|
|
455
476
|
...(typeof input.score === 'number' && Number.isFinite(input.score) ? { score: Number(input.score) } : {}),
|
|
456
477
|
metadata: { ...(input.metadata ?? {}) },
|
|
457
478
|
createdAt: nowMs(),
|
|
@@ -481,6 +502,10 @@ export class KnowledgeStore {
|
|
|
481
502
|
? this.consolidationCandidates.get(input.id)
|
|
482
503
|
: this.getConsolidationCandidateBySubject(input.subjectKind, input.subjectId, input.candidateType);
|
|
483
504
|
const now = nowMs();
|
|
505
|
+
const _summary = stableText(input.summary);
|
|
506
|
+
const _suggestedMemoryClass = stableText(input.suggestedMemoryClass);
|
|
507
|
+
const _suggestedScope = stableText(input.suggestedScope);
|
|
508
|
+
const _decidedBy = stableText(input.decidedBy);
|
|
484
509
|
const record = {
|
|
485
510
|
id: existing?.id ?? input.id ?? `kcand-${randomUUID().slice(0, 8)}`,
|
|
486
511
|
candidateType: input.candidateType,
|
|
@@ -488,13 +513,13 @@ export class KnowledgeStore {
|
|
|
488
513
|
subjectKind: input.subjectKind,
|
|
489
514
|
subjectId: input.subjectId,
|
|
490
515
|
title: input.title.trim(),
|
|
491
|
-
...(
|
|
516
|
+
...(_summary !== null ? { summary: _summary } : existing?.summary ? { summary: existing.summary } : {}),
|
|
492
517
|
score: Number(input.score),
|
|
493
518
|
evidence: uniq(input.evidence ?? existing?.evidence),
|
|
494
|
-
...(
|
|
495
|
-
...(
|
|
519
|
+
...(_suggestedMemoryClass !== null ? { suggestedMemoryClass: _suggestedMemoryClass } : existing?.suggestedMemoryClass ? { suggestedMemoryClass: existing.suggestedMemoryClass } : {}),
|
|
520
|
+
...(_suggestedScope !== null ? { suggestedScope: _suggestedScope } : existing?.suggestedScope ? { suggestedScope: existing.suggestedScope } : {}),
|
|
496
521
|
...(typeof input.decidedAt === 'number' ? { decidedAt: input.decidedAt } : existing?.decidedAt ? { decidedAt: existing.decidedAt } : {}),
|
|
497
|
-
...(
|
|
522
|
+
...(_decidedBy !== null ? { decidedBy: _decidedBy } : existing?.decidedBy ? { decidedBy: existing.decidedBy } : {}),
|
|
498
523
|
metadata: {
|
|
499
524
|
...(existing?.metadata ?? {}),
|
|
500
525
|
...(input.metadata ?? {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/mcp/client.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AA2BD,qBAAa,SAAS;IAgBlB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO,CAAC;IAhBlB,OAAO,CAAC,IAAI,CAA6C;IACzD,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,eAAe,CAAqC;IAC5D,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,YAAY,CAAK;IACz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O,CAAC,OAAO;IAUf,OAAO,CAAC,cAAc;IAqCtB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,aAAa;IA2BrB,OAAO,CAAC,gBAAgB;IAmBxB;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;CAS/B"}
|
|
@@ -123,8 +123,9 @@ export class McpClient {
|
|
|
123
123
|
this.proc.kill();
|
|
124
124
|
await this.proc.exited;
|
|
125
125
|
}
|
|
126
|
-
catch {
|
|
127
|
-
//
|
|
126
|
+
catch (err) {
|
|
127
|
+
// OBS-11: Non-fatal — process may already be gone; log at debug for ops
|
|
128
|
+
logger.debug('[McpClient] error during process shutdown (non-fatal)', { error: String(err) });
|
|
128
129
|
}
|
|
129
130
|
finally {
|
|
130
131
|
this.proc = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-generation-providers.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/media/builtin-generation-providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"builtin-generation-providers.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/media/builtin-generation-providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AA4iBhC,wBAAgB,0BAA0B,IAAI,SAAS,aAAa,EAAE,CAQrE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
|
|
1
2
|
function readFirstEnv(envVars) {
|
|
2
3
|
for (const envVar of envVars) {
|
|
3
4
|
const value = process.env[envVar];
|
|
@@ -62,7 +63,7 @@ function resolveReferenceUrl(request) {
|
|
|
62
63
|
return artifact ? toDataUrl(artifact) : undefined;
|
|
63
64
|
}
|
|
64
65
|
async function fetchJson(url, init, timeoutMs = 120_000) {
|
|
65
|
-
const response = await
|
|
66
|
+
const response = await instrumentedFetch(url, { ...init, signal: AbortSignal.timeout(timeoutMs) });
|
|
66
67
|
if (!response.ok) {
|
|
67
68
|
const text = await response.text().catch(() => '');
|
|
68
69
|
throw new Error(`Request failed (${response.status}) ${url}: ${text || response.statusText}`);
|
|
@@ -70,7 +71,7 @@ async function fetchJson(url, init, timeoutMs = 120_000) {
|
|
|
70
71
|
return response.json();
|
|
71
72
|
}
|
|
72
73
|
async function fetchResponse(url, init, timeoutMs = 120_000) {
|
|
73
|
-
const response = await
|
|
74
|
+
const response = await instrumentedFetch(url, { ...init, signal: AbortSignal.timeout(timeoutMs) });
|
|
74
75
|
if (!response.ok) {
|
|
75
76
|
const text = await response.text().catch(() => '');
|
|
76
77
|
throw new Error(`Request failed (${response.status}) ${url}: ${text || response.statusText}`);
|
|
@@ -86,7 +87,7 @@ function buildArtifactFromRemote(url, mimeType = 'application/octet-stream', fil
|
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
async function maybeInlineArtifact(url, fallbackMimeType, filename, maxInlineBytes = 5_000_000) {
|
|
89
|
-
const head = await
|
|
90
|
+
const head = await instrumentedFetch(url, { method: 'HEAD', signal: AbortSignal.timeout(20_000) }).catch(() => null);
|
|
90
91
|
const contentLength = Number.parseInt(head?.headers.get('content-length') ?? '', 10);
|
|
91
92
|
const contentType = head?.headers.get('content-type')?.trim() || fallbackMimeType;
|
|
92
93
|
if (Number.isFinite(contentLength) && contentLength > maxInlineBytes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-image-understanding.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/media/builtin-image-understanding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,KAAK,EAGV,aAAa,EAEd,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"builtin-image-understanding.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/media/builtin-image-understanding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,KAAK,EAGV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAiBhC,KAAK,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,aAAa,GAAG,YAAY,GAAG,iBAAiB,CAAC,CAAC;AAkOvH,wBAAgB,uCAAuC,CACrD,gBAAgB,EAAE,kBAAkB,EACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,GAChD,aAAa,CAKf;AAED,wBAAgB,sCAAsC,CACpD,gBAAgB,EAAE,kBAAkB,EACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,GAChD,aAAa,CAMf;AAED,wBAAgB,sCAAsC,CACpD,gBAAgB,EAAE,kBAAkB,EACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,GAChD,aAAa,CAMf;AAED,wBAAgB,yCAAyC,CACvD,gBAAgB,EAAE,kBAAkB,EACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,GAChD,aAAa,CAMf;AAED,wBAAgB,qCAAqC,CACnD,gBAAgB,EAAE,kBAAkB,EACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,GAChD,aAAa,CAMf"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ArtifactStore } from '../artifacts/index.js';
|
|
2
|
+
import { toRecord } from '../utils/record-coerce.js';
|
|
2
3
|
function buildAnalysisPrompt(prompt) {
|
|
3
4
|
const task = prompt?.trim().length
|
|
4
5
|
? prompt.trim()
|
|
@@ -62,19 +63,19 @@ async function resolveModel(providerRegistry, scope, modelId) {
|
|
|
62
63
|
if (!explicit.capabilities.multimodal) {
|
|
63
64
|
throw new Error(`Model does not support image input: ${explicit.displayName}`);
|
|
64
65
|
}
|
|
65
|
-
if (!await modelMatchesScope(providerRegistry, explicit, scope)) {
|
|
66
|
+
if (!await modelMatchesScope(providerRegistry, toRecord(explicit), scope)) {
|
|
66
67
|
throw new Error(`Model does not match media provider scope ${scope.label}: ${explicit.displayName}`);
|
|
67
68
|
}
|
|
68
69
|
return explicit;
|
|
69
70
|
}
|
|
70
71
|
const current = providerRegistry.getCurrentModel();
|
|
71
|
-
if (current.capabilities.multimodal && await modelMatchesScope(providerRegistry, current, scope)) {
|
|
72
|
+
if (current.capabilities.multimodal && await modelMatchesScope(providerRegistry, toRecord(current), scope)) {
|
|
72
73
|
return current;
|
|
73
74
|
}
|
|
74
75
|
for (const candidate of models) {
|
|
75
76
|
if (!candidate.selectable || !candidate.capabilities.multimodal)
|
|
76
77
|
continue;
|
|
77
|
-
if (await modelMatchesScope(providerRegistry, candidate, scope)) {
|
|
78
|
+
if (await modelMatchesScope(providerRegistry, toRecord(candidate), scope)) {
|
|
78
79
|
return candidate;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
@@ -170,7 +171,7 @@ function createScopedImageUnderstandingProvider(providerRegistry, scope, artifac
|
|
|
170
171
|
for (const model of providerRegistry.listModels()) {
|
|
171
172
|
if (!model.selectable || !model.capabilities.multimodal)
|
|
172
173
|
continue;
|
|
173
|
-
if (await modelMatchesScope(providerRegistry, model, scope)) {
|
|
174
|
+
if (await modelMatchesScope(providerRegistry, toRecord(model), scope)) {
|
|
174
175
|
available = true;
|
|
175
176
|
break;
|
|
176
177
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic-compat.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/providers/anthropic-compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,YAAY,EAEZ,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"anthropic-compat.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/providers/anthropic-compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,YAAY,EAEZ,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAgDxB,MAAM,WAAW,sBAAsB;IACrC,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,gFAAgF;IAChF,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,gFAAgF;IAChF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,uEAAuE;IACvE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,iGAAiG;IACjG,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,cAAc,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IACxC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,qBAAa,uBAAwB,YAAW,WAAW;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAE1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,cAAc,CAAyB;IAC/C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IACjD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAS;IACjD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyB;IACxD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAU;IAC9C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAS;gBAE9B,IAAI,EAAE,sBAAsB;IAkBxC,YAAY,IAAI,OAAO;IAIjB,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IA6MhD,eAAe,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,uBAAuB,CAAC;CA6C3F"}
|
|
@@ -3,8 +3,10 @@ import { ProviderError } from '../types/errors.js';
|
|
|
3
3
|
import { mapAnthropicStopReason } from './stop-reason-maps.js';
|
|
4
4
|
import { withRetry } from '../utils/retry.js';
|
|
5
5
|
import { logger } from '../utils/logger.js';
|
|
6
|
+
import { instrumentedLlmCall } from '../runtime/llm-observability.js';
|
|
6
7
|
import { toAnthropicTools, toAnthropicMessages, fromAnthropicContent, } from './tool-formats.js';
|
|
7
8
|
import { toProviderError } from '../utils/error-display.js';
|
|
9
|
+
import { instrumentedFetch } from '../utils/fetch-with-timeout.js';
|
|
8
10
|
const ANTHROPIC_API_VERSION = '2023-06-01';
|
|
9
11
|
/**
|
|
10
12
|
* AnthropicCompatProvider — generic provider for endpoints that speak the
|
|
@@ -53,7 +55,7 @@ export class AnthropicCompatProvider {
|
|
|
53
55
|
}
|
|
54
56
|
async chat(params) {
|
|
55
57
|
const { messages, tools, model, maxTokens, signal, systemPrompt, onDelta, reasoningEffort } = params;
|
|
56
|
-
return withRetry(async () => {
|
|
58
|
+
return (await instrumentedLlmCall(() => withRetry(async () => {
|
|
57
59
|
const resolvedModel = model ?? this.defaultModel;
|
|
58
60
|
const body = {
|
|
59
61
|
model: resolvedModel,
|
|
@@ -95,7 +97,7 @@ export class AnthropicCompatProvider {
|
|
|
95
97
|
}
|
|
96
98
|
let res;
|
|
97
99
|
try {
|
|
98
|
-
res = await
|
|
100
|
+
res = await instrumentedFetch(`${this.baseURL}/messages`, {
|
|
99
101
|
method: 'POST',
|
|
100
102
|
headers,
|
|
101
103
|
body: JSON.stringify(body),
|
|
@@ -247,7 +249,7 @@ export class AnthropicCompatProvider {
|
|
|
247
249
|
stopReason: stopReason === 'unknown' && text ? 'completed' : stopReason,
|
|
248
250
|
...(rawStopReason !== undefined ? { providerStopReason: rawStopReason } : {}),
|
|
249
251
|
};
|
|
250
|
-
});
|
|
252
|
+
}), { provider: this.name, model: model ?? this.defaultModel })).result;
|
|
251
253
|
}
|
|
252
254
|
async describeRuntime(deps) {
|
|
253
255
|
const { buildStandardProviderAuthRoutes } = await import('./runtime-metadata.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/providers/anthropic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAkB,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAKnJ,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/providers/anthropic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAkB,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAKnJ,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA2EzE;;;;;GAKG;AACH,qBAAa,iBAAkB,YAAW,WAAW;IACnD,QAAQ,CAAC,IAAI,eAAe;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAM;IAE/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqD;gBAGnF,MAAM,EAAE,MAAM,EACd,eAAe,GAAE,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,YAAY,CAA0B;IAMxF,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAsUhD,eAAe,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAkC3F"}
|