@cerebriline/llms 4.100.246 → 4.100.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/catalog/catalog-cline-recommended.d.ts +6 -1
  2. package/dist/catalog/catalog-cline-recommended.d.ts.map +1 -1
  3. package/dist/catalog/catalog-live.d.ts +6 -1
  4. package/dist/catalog/catalog-live.d.ts.map +1 -1
  5. package/dist/catalog/catalog.generated.d.ts.map +1 -1
  6. package/dist/catalog/cline-recommended.generated.d.ts +4 -0
  7. package/dist/catalog/cline-recommended.generated.d.ts.map +1 -0
  8. package/dist/catalog/model-filters.d.ts +6 -1
  9. package/dist/catalog/model-filters.d.ts.map +1 -1
  10. package/dist/catalog/model-operation.d.ts +4 -3
  11. package/dist/catalog/model-operation.d.ts.map +1 -1
  12. package/dist/catalog/types.d.ts +19 -3
  13. package/dist/catalog/types.d.ts.map +1 -1
  14. package/dist/catalog/vercel-transcription-models.d.ts +9 -0
  15. package/dist/catalog/vercel-transcription-models.d.ts.map +1 -0
  16. package/dist/index.browser.d.ts +4 -2
  17. package/dist/index.browser.d.ts.map +1 -1
  18. package/dist/index.browser.js +4 -4
  19. package/dist/index.d.ts +8 -5
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +125 -109
  22. package/dist/models.d.ts +2 -0
  23. package/dist/models.d.ts.map +1 -1
  24. package/dist/models.js +70 -60
  25. package/dist/providers/ai-sdk.d.ts +7 -3
  26. package/dist/providers/ai-sdk.d.ts.map +1 -1
  27. package/dist/providers/builtins.d.ts +8 -1
  28. package/dist/providers/builtins.d.ts.map +1 -1
  29. package/dist/providers/cline-client-headers.d.ts +3 -0
  30. package/dist/providers/cline-client-headers.d.ts.map +1 -0
  31. package/dist/providers/compat.d.ts +14 -3
  32. package/dist/providers/compat.d.ts.map +1 -1
  33. package/dist/providers/config.d.ts +5 -0
  34. package/dist/providers/config.d.ts.map +1 -1
  35. package/dist/providers/error-classification.d.ts +22 -0
  36. package/dist/providers/error-classification.d.ts.map +1 -1
  37. package/dist/providers/gateway.d.ts +14 -0
  38. package/dist/providers/gateway.d.ts.map +1 -1
  39. package/dist/providers/ids.d.ts +2 -0
  40. package/dist/providers/ids.d.ts.map +1 -1
  41. package/dist/providers/middleware/retry-empty-response.d.ts.map +1 -1
  42. package/dist/providers/model-facts.d.ts +2 -0
  43. package/dist/providers/model-facts.d.ts.map +1 -1
  44. package/dist/providers/model-operations.d.ts +8 -4
  45. package/dist/providers/model-operations.d.ts.map +1 -1
  46. package/dist/providers/openai-codex-models.d.ts.map +1 -1
  47. package/dist/providers/provider-ids.generated.d.ts +1 -1
  48. package/dist/providers/provider-ids.generated.d.ts.map +1 -1
  49. package/dist/providers/provider-keys.d.ts.map +1 -1
  50. package/dist/providers/providers.generated.d.ts +1 -1
  51. package/dist/providers/providers.generated.d.ts.map +1 -1
  52. package/dist/providers/reasoning-history.d.ts +10 -0
  53. package/dist/providers/reasoning-history.d.ts.map +1 -1
  54. package/dist/providers/request-headers.d.ts +12 -1
  55. package/dist/providers/request-headers.d.ts.map +1 -1
  56. package/dist/providers/routing/anthropic-compatible.d.ts.map +1 -1
  57. package/dist/providers/routing/glm-thinking.d.ts +1 -1
  58. package/dist/providers/routing/glm-thinking.d.ts.map +1 -1
  59. package/dist/providers/routing/minimax-thinking.d.ts.map +1 -1
  60. package/dist/providers/routing/portable-reasoning.d.ts +28 -4
  61. package/dist/providers/routing/portable-reasoning.d.ts.map +1 -1
  62. package/dist/providers/routing/provider-option-rules.d.ts.map +1 -1
  63. package/dist/providers/routing/utils.d.ts +19 -2
  64. package/dist/providers/routing/utils.d.ts.map +1 -1
  65. package/dist/providers/stream-side-parts.d.ts +69 -0
  66. package/dist/providers/stream-side-parts.d.ts.map +1 -0
  67. package/dist/providers/url.d.ts +7 -0
  68. package/dist/providers/url.d.ts.map +1 -1
  69. package/dist/providers/vendors/bedrock.d.ts.map +1 -1
  70. package/dist/providers/vendors/community.d.ts.map +1 -1
  71. package/dist/providers/vendors/ollama.d.ts.map +1 -1
  72. package/dist/providers/vendors/types.d.ts +3 -0
  73. package/dist/providers/vendors/types.d.ts.map +1 -1
  74. package/dist/providers/vendors/xollama-tool-progress.d.ts +34 -0
  75. package/dist/providers/vendors/xollama-tool-progress.d.ts.map +1 -0
  76. package/dist/providers/vendors/xollama.d.ts +4 -1
  77. package/dist/providers/vendors/xollama.d.ts.map +1 -1
  78. package/dist/providers.browser.js +4 -4
  79. package/dist/providers.d.ts +3 -2
  80. package/dist/providers.d.ts.map +1 -1
  81. package/dist/providers.js +125 -109
  82. package/dist/services/LangfuseAttributesSpanProcessor.d.ts +10 -0
  83. package/dist/services/LangfuseAttributesSpanProcessor.d.ts.map +1 -0
  84. package/dist/services/langfuse-telemetry.d.ts +31 -2
  85. package/dist/services/langfuse-telemetry.d.ts.map +1 -1
  86. package/dist/transcription.d.ts +8 -7
  87. package/dist/transcription.d.ts.map +1 -1
  88. package/package.json +16 -14
@@ -5,10 +5,27 @@ export declare function createEphemeralCacheControl(): {
5
5
  type: "ephemeral";
6
6
  };
7
7
  };
8
+ /**
9
+ * Resolve the `providerOptions` bucket name the AI SDK reads for a provider
10
+ * id.
11
+ *
12
+ * Providers served by `@ai-sdk/openai-compatible` (the `openai-compatible`
13
+ * options target: the generic `openai-compatible` provider, gateways such as
14
+ * `vercel-ai-gateway`, and user-defined ids) read `providerOptions[<name>]`
15
+ * and its camelCase alias, and since `@ai-sdk/openai-compatible` 3.0.30 they
16
+ * log a deprecation warning on every stream chunk for a hyphenated raw name
17
+ * (`providerOptions key 'openai-compatible'`, `Use 'openaiCompatible'
18
+ * instead.`). Those providers are therefore written under the camelCase
19
+ * alias only; the SDK reads that alias for every provider name, so no
20
+ * request-body passthrough is lost. Every other target keeps its raw id so
21
+ * the native and community vendor packages see the buckets they expect.
22
+ */
23
+ export declare function toProviderOptionsBucket(providerId: string): string;
8
24
  /**
9
25
  * Target the AI SDK provider-name bucket for the provider id and, when
10
- * distinct, its camelCase alias bucket (e.g. `vercel-ai-gateway` +
11
- * `vercelAiGateway`).
26
+ * distinct, its camelCase alias bucket (e.g. `openai-codex` +
27
+ * `openaiCodex`). Hyphenated openai-compatible ids collapse to the alias
28
+ * alone (see `toProviderOptionsBucket`).
12
29
  *
13
30
  * The bucket name must match the AI SDK provider `name`, because the
14
31
  * openai-compatible model only applies request-body passthrough from
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE3E,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,wBAAgB,2BAA2B;;;;EAI1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GAAG,oBAAoB,CAcvB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC;CACrC,GAAG,oBAAoB,CAUvB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/utils.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE3E,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,wBAAgB,2BAA2B;;;;EAI1C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GAAG,oBAAoB,CAcvB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC;CACrC,GAAG,oBAAoB,CAUvB"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Stream parts that reach a request by a second road.
3
+ *
4
+ * The AI SDK's provider packages decide what a response chunk becomes, and a
5
+ * field they do not know becomes nothing. xOllama's `tool_call_progress` is
6
+ * such a field: the text of a tool call while the model is still writing it,
7
+ * which the ollama provider drops because upstream Ollama never sends it. The
8
+ * vendor's fetch wrapper can read it off the wire, but a fetch wrapper has no
9
+ * way to add to the stream the SDK builds from the response.
10
+ *
11
+ * So the two meet here. The vendor opens a queue when it builds the request's
12
+ * settings and names it in a request header; its fetch wrapper finds the queue
13
+ * by that header, strips the header, and pushes parts; the event loop in
14
+ * `ai-sdk.ts` reads the same queue beside the SDK's own stream. The parts are
15
+ * the SDK's own shapes (`tool-input-delta`), so nothing downstream knows they
16
+ * came another way.
17
+ */
18
+ /** Names the queue of a request. Never sent to a server. */
19
+ export declare const STREAM_SIDE_PARTS_HEADER = "x-cerebriline-stream-parts";
20
+ export type StreamSidePart = ({
21
+ type: "tool-input-delta";
22
+ id: string;
23
+ delta: string;
24
+ } | {
25
+ type: "tool-input-end";
26
+ id: string;
27
+ }) & {
28
+ /** Set on every part that came this way, never by a provider package. */
29
+ outOfBand?: true;
30
+ };
31
+ export declare class StreamSideParts {
32
+ readonly id: string;
33
+ private readonly parts;
34
+ private wake;
35
+ constructor(id: string);
36
+ /**
37
+ * Whether a call's text has come this way. The provider package then
38
+ * reports the same call a second time, whole, when it is complete -- under
39
+ * its own id and as JSON -- and a view of the stream showed both: the call
40
+ * as the model wrote it, then the call again (pandorum, 2026-10-12).
41
+ */
42
+ wroteCallText: boolean;
43
+ push(part: StreamSidePart): void;
44
+ take(): StreamSidePart[];
45
+ /** Resolves when there is something to take. */
46
+ arrived(): Promise<void>;
47
+ }
48
+ /**
49
+ * Whether a part of the provider's own stream repeats a call whose text the
50
+ * side road already delivered, and so is not to be reported again.
51
+ */
52
+ export declare function repeatsStreamSideParts(part: {
53
+ type?: string;
54
+ outOfBand?: boolean;
55
+ [key: string]: unknown;
56
+ }, side: StreamSideParts | undefined): boolean;
57
+ export declare function openStreamSideParts(): StreamSideParts;
58
+ export declare function streamSidePartsById(id: string | undefined): StreamSideParts | undefined;
59
+ export declare function closeStreamSideParts(queue: StreamSideParts | undefined): void;
60
+ /** The queue a request's headers name, if any. */
61
+ export declare function streamSidePartsOf(headers: Record<string, string | undefined> | undefined): StreamSideParts | undefined;
62
+ /**
63
+ * The SDK's stream with the side parts let in as they arrive.
64
+ *
65
+ * A side part is delivered at once, not at the next part of the main stream:
66
+ * the case this exists for is a main stream that says nothing for minutes.
67
+ */
68
+ export declare function withStreamSideParts<T>(main: AsyncIterable<T>, side: StreamSideParts | undefined): AsyncGenerator<T | StreamSidePart>;
69
+ //# sourceMappingURL=stream-side-parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-side-parts.d.ts","sourceRoot":"","sources":["../../src/providers/stream-side-parts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AAErE,MAAM,MAAM,cAAc,GAAG,CAC1B;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IA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,SAAS,GAC/B,cAAc,CAAC,CAAC,GAAG,cAAc,CAAC,CAoCpC"}
@@ -1,3 +1,10 @@
1
1
  export declare function trimTrailingSlashes(value: string): string;
2
2
  export declare function resolveVercelAiGatewayBaseUrl(configuredBaseUrl: string | undefined, defaultBaseUrl: string): string;
3
+ /**
4
+ * Whether a base URL targets Anthropic's own Claude API rather than a gateway
5
+ * or proxy that serves Claude models (Azure AI Foundry, corporate gateways).
6
+ * An unset URL means the provider default, which is the official endpoint.
7
+ * Malformed URLs are treated as custom so official-only options stay off.
8
+ */
9
+ export declare function isOfficialAnthropicEndpoint(baseUrl: string | undefined): boolean;
3
10
  //# sourceMappingURL=url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/providers/url.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMzD;AAeD,wBAAgB,6BAA6B,CAC5C,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,cAAc,EAAE,MAAM,GACpB,MAAM,CAkBR"}
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/providers/url.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMzD;AAeD,wBAAgB,6BAA6B,CAC5C,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,cAAc,EAAE,MAAM,GACpB,MAAM,CAkBR;AAID;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAST"}
@@ -1 +1 @@
1
- {"version":3,"file":"bedrock.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/bedrock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA4ErD,UAAU,qBAAqB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sDAAsD;IACtD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC/C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,qBAAqB,GAC5B,MAAM,CAsCR;AAmCD,wBAAsB,2BAA2B,CAChD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgEhC"}
1
+ {"version":3,"file":"bedrock.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/bedrock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAkFrD,UAAU,qBAAqB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sDAAsD;IACtD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC/C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,qBAAqB,GAC5B,MAAM,CAsCR;AAsCD,wBAAsB,2BAA2B,CAChD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgEhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/community.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAQnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAsErD,wBAAsB,8BAA8B,CACnD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAyDhC;AAED,wBAAsB,+BAA+B,CACpD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAmBhC;AA+BD,wBAAsB,4BAA4B,CACjD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgBhC;AAED,wBAAsB,wBAAwB,CAC7C,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgBhC;AAuID,wBAAsB,6BAA6B,CAClD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CA+BhC"}
1
+ {"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/community.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAiHrD,wBAAsB,8BAA8B,CACnD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAyDhC;AAED,wBAAsB,+BAA+B,CACpD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAmBhC;AA+BD,wBAAsB,4BAA4B,CACjD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgBhC;AAED,wBAAsB,wBAAwB,CAC7C,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgBhC;AAuID,wBAAsB,6BAA6B,CAClD,MAAM,EAAE,6BAA6B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/ollama.ts"],"names":[],"mappings":"AAmBA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QG;AACH,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,OAAO,CAAC,CAErE;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,IAAI,OAAO,KAAK,GAAG,SAAS,CAE3D;AAmCD,wBAAgB,yBAAyB,CACxC,SAAS,EAAE,OAAO,KAAK,EACvB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,OAAO,EACpB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,GAChC,OAAO,KAAK,CA+Fd;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACzC,QAAQ,EAAE,uBAAuB,GAAG,SAAS,GAC3C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2BzB;AAED,4EAA4E;AAC5E,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,6BAA6B,GACnC,uBAAuB,GAAG,SAAS,CAKrC;AAED,wBAAsB,0BAA0B,CAC/C,MAAM,EAAE,6BAA6B,EACrC,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CA8KhC;AAwFD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,EAAG,QAAiB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,YAAY,CAAC,CA6BvB"}
@@ -42,6 +42,9 @@ export interface ProviderFactoryResult {
42
42
  }
43
43
  export interface AiSdkStreamPart {
44
44
  type?: string;
45
+ response?: {
46
+ headers?: Record<string, string>;
47
+ };
45
48
  [key: string]: unknown;
46
49
  }
47
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,c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CAAC;SAC5B,CAAC;QACF,yBAAyB,CAAC,EAAE;YAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;SAC1B,CAAC;QACF,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,YAAY,CAAC,EAAE;YACd,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACxC,8BAA8B,CAAC,EAAE,MAAM,CAAC;YACxC,mCAAmC,CAAC,EAAE,MAAM,CAAC;SAC7C,CAAC;QACF,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7D;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IACjC,UAAU,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5D"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * xOllama's `tool_call_progress_v1`: a tool call's text while it is written.
3
+ *
4
+ * `/api/chat` holds a tool call back until the model has closed it, so a call
5
+ * that takes six minutes to write is six minutes of nothing, and a client
6
+ * guard has nothing to read until there is nothing left to save (session
7
+ * x8yap, pandorum, 2026-10-12: `stream-open iter=12 after=348258ms`). Asked
8
+ * with `"tool_call_progress": true`, a server that announces the feature adds
9
+ *
10
+ * message.tool_call_progress = { index, syntax, text, tokens, done? }
11
+ *
12
+ * to the streamed chunks: `text` is the raw output of one step the server
13
+ * held back, delimiters included, in the model's own notation. `index` counts
14
+ * runs of held output; a run that ends with `done` was a call, and a short
15
+ * one that does not was a parser deciding about a tag. The parsed call still
16
+ * arrives whole.
17
+ *
18
+ * This wrapper asks for it, lifts it off the response, and hands it on as the
19
+ * `tool-input-delta` parts every other provider's streamed arguments already
20
+ * are. What reads them does not read a notation (see `tool-intent-guard` in
21
+ * `@cerebriline/agents`), so `syntax` is only logged.
22
+ */
23
+ import type { BasicLogger } from "@cerebriline/shared";
24
+ export declare const XOLLAMA_TOOL_CALL_PROGRESS_FEATURE = "tool_call_progress_v1";
25
+ /**
26
+ * Ask a streamed chat for its tool-call progress and route it to the queue
27
+ * the request names. A request that names none, a server that does not
28
+ * announce the feature, and a request that does not stream all go out and
29
+ * come back untouched.
30
+ */
31
+ export declare function withXollamaToolCallProgress(baseFetch: typeof fetch, options?: {
32
+ logger?: BasicLogger;
33
+ }): typeof fetch;
34
+ //# sourceMappingURL=xollama-tool-progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xollama-tool-progress.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/xollama-tool-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQjD,eAAO,MAAM,kCAAkC,0BAA0B,CAAC;AA+F1E;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAC1C,SAAS,EAAE,OAAO,KAAK,EACvB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,GAChC,OAAO,KAAK,CAwEd"}
@@ -185,6 +185,8 @@ export declare function onXollamaSideCall(conversation: string, listener: (event
185
185
  export declare function xollamaConversationBusy(key: string): boolean;
186
186
  /** Test seam: forget every running request. */
187
187
  export declare function resetXollamaConversationRequests(): void;
188
+ /** The conversation an engine session belongs to: the lead's own id. */
189
+ export declare function xollamaConversationOf(session: string): string;
188
190
  /**
189
191
  * The largest window the engine would admit now, from a refusal's
190
192
  * `X-Context-Largest-Admissible` (the engine's own number, on every 429 a
@@ -195,7 +197,8 @@ export declare function largestAdmissible(response: Response): number | undefine
195
197
  /**
196
198
  * Whether a refused side call is the one case its conversation is closed for:
197
199
  * it does not fit now, it fits with the conversation's booking returned, and
198
- * the conversation is idle.
200
+ * the conversation is idle. A refusal that names no figure is taken as
201
+ * nothing free.
199
202
  */
200
203
  export declare function sideCallBlockedByOwnConversation(options: {
201
204
  need: number;
@@ -1 +1 @@
1
- {"version":3,"file":"xollama.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/xollama.ts"],"names":[],"mappings":"AAsCA,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEN,KAAK,mBAAmB,EAExB,MAAM,yBAAyB,CAAC;AAmBjC,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,2BAA2B,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AAErE,mEAAmE;AACnE,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AAExE,wEAAwE;AACxE,eAAO,MAAM,6BAA6B,0BAA0B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,oBAAoB;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,mBAAmB,CAAC;CAClC;AAED,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,QAAQ,C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AAM,GAAG,MAAM,CAG7D;AA8KD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAIxE;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,OAAO,EAAE;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAeV;AA8LD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,OAAO,KAAK,EACvB,OAAO,CAAC,EAAE;IACT,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qDAAqD;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,oBAAoB,CAAC;CACpC,GACC,OAAO,KAAK,CAgXd"}
@@ -1,4 +1,4 @@
1
- import{z as t}from"zod";import{z as l}from"zod";import{z as m}from"zod";import{z as f}from"zod";import{z as s}from"zod";import{z as o}from"zod";import{z as d}from"zod";import{z as Kt}from"zod";import{z as n}from"zod";import S from"zod";import{z as p}from"zod";import{z as e}from"zod";import{z as Jn}from"zod";var j=["none","minimal","low","medium","high","xhigh","max"],V=m.enum(j),Z=V.exclude(["none"]),$=m.enum([...j,"default"]).nullable(),ee=m.discriminatedUnion("type",[m.object({type:m.literal("toggle")}).strict(),m.object({type:m.literal("effort"),values:m.array($)}).strict(),m.object({type:m.literal("budget_tokens"),min:m.number().min(-1).optional(),max:m.number().min(0).optional()}).strict().refine((r)=>r.min===void 0||r.max===void 0||r.min<=r.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),te=l.enum(["default","openai-responses","r1"]);var ne=l.enum(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),re=l.enum(["active","preview","deprecated","legacy"]),oe=l.object({input:l.number().optional(),output:l.number().optional(),cacheWrite:l.number().optional(),cacheRead:l.number().optional()}),ie=l.object({maxBudget:l.number().optional(),outputPrice:l.number().optional(),thinkingLevel:l.enum(["low","high"]).optional()}),ae=l.object({reasoningDefaultOn:l.boolean().optional()}).catchall(l.unknown()),O=l.enum(["text","image","audio","video","pdf"]),se=l.object({input:l.array(O),output:l.array(O)});function le(r){return(r?.input===void 0||r.input.includes("text"))&&(r?.output===void 0||r.output.includes("text"))}var ue=l.enum(["language","image-generation","speech-generation","video-generation","transcription"]);function Mt(r){return(r.operation===void 0||r.operation==="language")&&le(r.modalities)}var ce=l.enum(["batch","streaming"]);var L=l.object({id:l.string(),name:l.string().optional(),description:l.string().optional(),maxTokens:l.number().optional(),contextWindow:l.number().optional(),maxInputTokens:l.number().optional(),capabilities:l.array(ne).optional(),operation:ue.optional(),operationModes:l.array(ce).optional(),modalities:se.optional(),reasoningOptions:l.array(ee).optional(),apiFormat:te.optional(),systemRole:l.enum(["system","developer"]).optional(),temperature:l.number().optional(),pricing:oe.optional(),thinkingConfig:ie.optional(),status:re.optional(),deprecationNotice:l.string().optional(),replacedBy:l.string().optional(),releaseDate:l.string().optional(),deprecationDate:l.string().optional(),family:l.string().optional(),metadata:ae.optional()});var de=f.object({id:f.string(),name:f.string(),execution:f.enum(["client","provider"]).optional(),input:f.unknown(),output:f.unknown(),error:f.string().optional(),durationMs:f.number(),startedAt:f.date(),endedAt:f.date()}),me=t.enum(["completed","max_iterations","aborted","mistake_limit","error"]),pe=t.object({inputTokens:t.number(),outputTokens:t.number(),cacheReadTokens:t.number().optional(),cacheWriteTokens:t.number().optional(),totalCost:t.number().optional()}),Ot=t.object({text:t.string(),usage:pe,messages:t.array(t.custom()),toolCalls:t.array(de),iterations:t.number(),finishReason:me,model:t.object({id:t.string(),provider:t.string(),info:L.optional()}),startedAt:t.date(),endedAt:t.date(),durationMs:t.number()}),Rt=t.object({distinctId:t.string().optional(),sessionId:t.string().optional(),providerId:t.string(),modelId:t.string(),apiKey:t.string().optional(),baseUrl:t.string().url().optional(),headers:t.record(t.string(),t.string()).optional(),knownModels:t.record(t.string(),L).optional(),providerConfig:t.unknown().optional(),initialMessages:t.array(t.custom()).optional(),systemPrompt:t.string(),tools:t.array(t.custom()),modelTools:t.array(t.custom()).optional(),maxIterations:t.number().positive().optional(),maxParallelToolCalls:t.number().int().positive().default(8),maxTokensPerTurn:t.number().positive().optional(),maxToolResultChars:t.number().int().positive().optional(),temperature:t.number().nonnegative().optional(),apiTimeoutMs:t.number().positive().default(180000),userFileContentLoader:t.function().input([t.string()]).output(t.promise(t.string())).optional(),toolContextMetadata:t.record(t.string(),t.unknown()).optional(),execution:t.object({maxConsecutiveMistakes:t.number().int().positive().optional(),reminderAfterIterations:t.number().nonnegative().optional(),reminderText:t.string().optional(),loopDetection:t.union([t.literal(!1),t.object({softThreshold:t.number().int().positive().optional(),hardThreshold:t.number().int().positive().optional()})]).optional(),reasoningLoopDetection:t.union([t.literal(!1),t.object({minChars:t.number().int().positive().optional(),window:t.number().int().positive().optional(),maxPeriod:t.number().int().positive().optional(),minCycles:t.number().int().positive().optional(),maxUniqueInWindow:t.number().int().positive().optional(),minLineChars:t.number().int().positive().optional(),phraseMaxPeriod:t.number().int().positive().optional(),phraseMinCycles:t.number().int().positive().optional(),maxConsecutiveTrips:t.number().int().positive().optional()})]).optional(),reasoningRepetition:t.union([t.literal(!1),t.object({minChars:t.number().int().positive().optional(),minParagraphChars:t.number().int().positive().optional(),minStopwords:t.number().int().nonnegative().optional(),maxRepeatTrip:t.number().int().positive().optional(),duplicateFractionTrip:t.number().min(0).max(1).optional(),cooldownTurns:t.number().int().nonnegative().optional(),maxNudges:t.number().int().nonnegative().optional(),recoveryTokens:t.number().int().nonnegative().optional()})]).optional()}).optional(),reasoningEffort:Z.optional(),thinkingBudgetTokens:t.number().positive().optional(),thinking:t.boolean().optional(),onEvent:t.function().input([t.custom()]).output(t.void()).optional(),hooks:t.custom().optional(),parentAgentId:t.string().optional(),extensions:t.array(t.custom()).optional(),hookErrorMode:t.enum(["ignore","throw"]).default("ignore"),toolPolicies:t.record(t.string(),t.object({enabled:t.boolean().optional(),autoApprove:t.boolean().optional()})).optional(),unavailableToolReasons:t.record(t.string(),t.string()).optional(),requestToolApproval:t.function().input([t.object({sessionId:t.string(),agentId:t.string(),conversationId:t.string(),iteration:t.number(),toolCallId:t.string(),toolName:t.string(),input:t.unknown(),policy:t.object({enabled:t.boolean().optional(),autoApprove:t.boolean().optional()}).default({})})]).output(t.union([t.object({approved:t.boolean(),reason:t.string().optional()}),t.promise(t.object({approved:t.boolean(),reason:t.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:t.function().input([t.object({iteration:t.number().int().positive(),consecutiveMistakes:t.number().int().positive(),maxConsecutiveMistakes:t.number().int().positive(),reason:t.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:t.string().optional()})]).output(t.union([t.object({action:t.literal("continue"),guidance:t.string().optional()}),t.object({action:t.literal("stop"),reason:t.string().optional()}),t.promise(t.union([t.object({action:t.literal("continue"),guidance:t.string().optional()}),t.object({action:t.literal("stop"),reason:t.string().optional()})]))])).optional(),logger:t.custom().optional(),extensionContext:t.custom().optional(),abortSignal:t.custom().optional()}),he=s.enum(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),fe=s.object({id:s.string().optional(),label:s.string().optional(),role:s.string().optional(),participantKey:s.string().optional(),participantLabel:s.string().optional(),platformUserId:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),ge=s.object({source:s.string(),sourceEvent:s.string(),threadId:s.string(),channelId:s.string(),isDM:s.boolean(),sessionId:s.string().optional(),workspaceRoot:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),Pt=s.object({actor:fe,context:ge,payload:s.record(s.string(),s.unknown()).optional()}),jt=s.object({action:s.enum(["allow","deny"]).default("allow"),message:s.string().optional(),reason:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),Lt=s.object({adapter:s.string(),botUserName:s.string().optional(),event:he,payload:s.record(s.string(),s.unknown()),ts:s.string()});var be=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],qt=new Set(be);var E={CLINE_PASS:"ext-cline-pass",CODE_ONBOARDING_GITHUB:"code-onboarding-github"},Dt={[E.CLINE_PASS]:!1,[E.CODE_ONBOARDING_GITHUB]:!1},Bt=Object.values(E),ye=o.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),b=o.record(o.string(),o.string()),ve=o.object({toolName:o.string(),parameters:b}),ke=o.object({toolName:o.string(),parameters:b,result:o.string(),success:o.boolean(),executionTimeMs:o.number()}),Te=o.object({prompt:o.string(),attachments:o.array(o.string())}),we=o.object({taskMetadata:b}),Ee=o.object({taskMetadata:b,previousState:b}),Se=o.object({taskMetadata:b}),Ce=o.object({taskMetadata:b}),Ae=o.object({taskId:o.string(),ulid:o.string(),contextSize:o.number(),compactionStrategy:o.string(),previousApiReqIndex:o.number(),tokensIn:o.number(),tokensOut:o.number(),tokensInCache:o.number(),tokensOutCache:o.number(),deletedRangeStart:o.number(),deletedRangeEnd:o.number(),contextJsonPath:o.string(),contextRawPath:o.string()}),Ut=o.object({clineVersion:o.string(),hookName:ye,timestamp:o.string(),taskId:o.string(),sessionContext:o.object({rootSessionId:o.string().optional(),hookLogPath:o.string().optional()}).optional(),workspaceRoots:o.array(o.string()),workspaceInfo:o.custom().optional(),userId:o.string(),agent_id:o.string(),parent_agent_id:o.string().nullable(),iteration:o.number().optional(),reason:o.string().optional(),tool_call:o.object({id:o.string(),name:o.string(),input:o.unknown()}).optional(),tool_result:o.custom().optional(),turn:o.unknown().optional(),error:o.object({name:o.string(),message:o.string(),stack:o.string().optional()}).optional(),preToolUse:ve.optional(),postToolUse:ke.optional(),userPromptSubmit:Te.optional(),taskStart:we.optional(),taskResume:Ee.optional(),taskCancel:Se.optional(),taskComplete:Ce.optional(),preCompact:Ae.optional()}).passthrough();var xe=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Ht=new Set(xe);var _e=d.enum(["image","audio","video","file"]),Me=d.discriminatedUnion("type",[d.object({type:d.literal("base64"),data:d.string().min(1)}),d.object({type:d.literal("url"),url:d.string().url().refine((r)=>{let a=new URL(r).protocol;return a==="http:"||a==="https:"},"Generated media URLs must use HTTP or HTTPS")}),d.object({type:d.literal("artifact"),artifactId:d.string().min(1)})]);function Ie(r){if(r.startsWith("image/"))return"image";if(r.startsWith("audio/"))return"audio";if(r.startsWith("video/"))return"video";return"file"}var zt=d.object({id:d.string().min(1),modality:_e,mediaType:d.string().min(1),source:Me,name:d.string().min(1).optional(),sizeBytes:d.number().int().nonnegative().optional()}).refine((r)=>Ie(r.mediaType)===r.modality,{message:"Generated media modality must match its media type",path:["modality"]});var Gt=["show","hide","subscription"];function Oe(r){if(typeof globalThis.atob==="function")try{let a=globalThis.atob(r),c=Uint8Array.from(a,(g)=>g.charCodeAt(0));return new TextDecoder().decode(c)}catch{return null}if(typeof Buffer<"u")try{return Buffer.from(r,"base64").toString("utf8")}catch{return null}return null}function Xt(r){let a=r?.trim();if(!a)return null;try{let c=a.split(".");if(c.length!==3)return null;let g=c[1];if(!g)return null;let y=g.replace(/-/g,"+").replace(/_/g,"/"),Q=y.padEnd(y.length+(4-y.length%4)%4,"="),I=Oe(Q);return I?JSON.parse(I):null}catch{return null}}var Yt=new RegExp(`${"⁣⟦"}([^${"⟧"}]*)${"⟧"}([\\s\\S]*?)${"⟦/⟧⁣"}`,"g");var q=`# Plan Mode
1
+ import{z as t}from"zod";import{z as l}from"zod";import{z as m}from"zod";import{z as h}from"zod";import{z as s}from"zod";import{z as o}from"zod";import{z as d}from"zod";import{z as Qt}from"zod";import{z as n}from"zod";import S from"zod";import{z as p}from"zod";import{z as e}from"zod";import{z as Vn}from"zod";var j=["none","minimal","low","medium","high","xhigh","max"],V=m.enum(j),Z=V.exclude(["none"]),$=m.enum([...j,"default"]).nullable(),ee=m.discriminatedUnion("type",[m.object({type:m.literal("toggle")}).strict(),m.object({type:m.literal("effort"),values:m.array($)}).strict(),m.object({type:m.literal("budget_tokens"),min:m.number().min(-1).optional(),max:m.number().min(0).optional()}).strict().refine((r)=>r.min===void 0||r.max===void 0||r.min<=r.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),te=l.enum(["default","openai-responses","r1"]);var ne=l.enum(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),re=l.enum(["active","preview","deprecated","legacy"]),oe=l.object({input:l.number().optional(),output:l.number().optional(),cacheWrite:l.number().optional(),cacheRead:l.number().optional()}),ie=l.object({maxBudget:l.number().optional(),outputPrice:l.number().optional(),thinkingLevel:l.enum(["low","high"]).optional()}),ae=l.object({reasoningDefaultOn:l.boolean().optional(),apiProtocol:l.enum(["openai-chat","openai-responses","anthropic","gemini"]).optional()}).catchall(l.unknown()),I=l.enum(["text","image","audio","video","pdf"]),se=l.object({input:l.array(I),output:l.array(I)});function le(r){return(r?.input===void 0||r.input.includes("text"))&&(r?.output===void 0||r.output.includes("text"))}var ue=l.enum(["language","image-generation","speech-generation","video-generation","transcription","realtime"]);function Ot(r){let a=r.modalities?.input,c=r.modalities?.output;return a?.length===1&&a[0]==="audio"&&c?.length===1&&c[0]==="text"}function It(r){return(r.operation===void 0||r.operation==="language")&&le(r.modalities)}var ce=l.enum(["batch","streaming"]);var L=l.object({id:l.string(),name:l.string().optional(),description:l.string().optional(),maxTokens:l.number().optional(),contextWindow:l.number().optional(),maxInputTokens:l.number().optional(),capabilities:l.array(ne).optional(),operation:ue.optional(),operationModes:l.array(ce).optional(),modalities:se.optional(),reasoningOptions:l.array(ee).optional(),apiFormat:te.optional(),systemRole:l.enum(["system","developer"]).optional(),temperature:l.number().optional(),pricing:oe.optional(),thinkingConfig:ie.optional(),status:re.optional(),deprecationNotice:l.string().optional(),replacedBy:l.string().optional(),releaseDate:l.string().optional(),deprecationDate:l.string().optional(),family:l.string().optional(),metadata:ae.optional()});var de=h.object({id:h.string(),name:h.string(),execution:h.enum(["client","provider"]).optional(),input:h.unknown(),output:h.unknown(),error:h.string().optional(),durationMs:h.number(),startedAt:h.date(),endedAt:h.date()}),me=t.enum(["completed","max_iterations","aborted","mistake_limit","error"]),pe=t.object({inputTokens:t.number(),outputTokens:t.number(),cacheReadTokens:t.number().optional(),cacheWriteTokens:t.number().optional(),totalCost:t.number().optional()}),Nt=t.object({text:t.string(),usage:pe,messages:t.array(t.custom()),toolCalls:t.array(de),iterations:t.number(),finishReason:me,model:t.object({id:t.string(),provider:t.string(),info:L.optional()}),startedAt:t.date(),endedAt:t.date(),durationMs:t.number()}),Pt=t.object({distinctId:t.string().optional(),sessionId:t.string().optional(),providerId:t.string(),modelId:t.string(),apiKey:t.string().optional(),baseUrl:t.string().url().optional(),headers:t.record(t.string(),t.string()).optional(),knownModels:t.record(t.string(),L).optional(),providerConfig:t.unknown().optional(),initialMessages:t.array(t.custom()).optional(),systemPrompt:t.string(),tools:t.array(t.custom()),modelTools:t.array(t.custom()).optional(),maxIterations:t.number().positive().optional(),maxParallelToolCalls:t.number().int().positive().default(8),maxTokensPerTurn:t.number().positive().optional(),maxToolResultChars:t.number().int().positive().optional(),temperature:t.number().nonnegative().optional(),apiTimeoutMs:t.number().positive().default(180000),userFileContentLoader:t.function().input([t.string()]).output(t.promise(t.string())).optional(),toolContextMetadata:t.record(t.string(),t.unknown()).optional(),execution:t.object({maxConsecutiveMistakes:t.number().int().positive().optional(),reminderAfterIterations:t.number().nonnegative().optional(),reminderText:t.string().optional(),loopDetection:t.union([t.literal(!1),t.object({softThreshold:t.number().int().positive().optional(),hardThreshold:t.number().int().positive().optional()})]).optional(),reasoningLoopDetection:t.union([t.literal(!1),t.object({minChars:t.number().int().positive().optional(),window:t.number().int().positive().optional(),maxPeriod:t.number().int().positive().optional(),minCycles:t.number().int().positive().optional(),maxUniqueInWindow:t.number().int().positive().optional(),minLineChars:t.number().int().positive().optional(),phraseMaxPeriod:t.number().int().positive().optional(),phraseMinCycles:t.number().int().positive().optional(),maxConsecutiveTrips:t.number().int().positive().optional()})]).optional(),reasoningRepetition:t.union([t.literal(!1),t.object({minChars:t.number().int().positive().optional(),minParagraphChars:t.number().int().positive().optional(),minStopwords:t.number().int().nonnegative().optional(),maxRepeatTrip:t.number().int().positive().optional(),duplicateFractionTrip:t.number().min(0).max(1).optional(),cooldownTurns:t.number().int().nonnegative().optional(),maxNudges:t.number().int().nonnegative().optional(),recoveryTokens:t.number().int().nonnegative().optional()})]).optional()}).optional(),reasoningEffort:Z.optional(),thinkingBudgetTokens:t.number().positive().optional(),thinking:t.boolean().optional(),onEvent:t.function().input([t.custom()]).output(t.void()).optional(),hooks:t.custom().optional(),parentAgentId:t.string().optional(),extensions:t.array(t.custom()).optional(),hookErrorMode:t.enum(["ignore","throw"]).default("ignore"),toolPolicies:t.record(t.string(),t.object({enabled:t.boolean().optional(),autoApprove:t.boolean().optional()})).optional(),unavailableToolReasons:t.record(t.string(),t.string()).optional(),requestToolApproval:t.function().input([t.object({sessionId:t.string(),agentId:t.string(),conversationId:t.string(),iteration:t.number(),toolCallId:t.string(),toolName:t.string(),input:t.unknown(),policy:t.object({enabled:t.boolean().optional(),autoApprove:t.boolean().optional()}).default({})})]).output(t.union([t.object({approved:t.boolean(),reason:t.string().optional()}),t.promise(t.object({approved:t.boolean(),reason:t.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:t.function().input([t.object({iteration:t.number().int().positive(),consecutiveMistakes:t.number().int().positive(),maxConsecutiveMistakes:t.number().int().positive(),reason:t.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:t.string().optional()})]).output(t.union([t.object({action:t.literal("continue"),guidance:t.string().optional()}),t.object({action:t.literal("stop"),reason:t.string().optional()}),t.promise(t.union([t.object({action:t.literal("continue"),guidance:t.string().optional()}),t.object({action:t.literal("stop"),reason:t.string().optional()})]))])).optional(),logger:t.custom().optional(),extensionContext:t.custom().optional(),abortSignal:t.custom().optional()}),fe=s.enum(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),he=s.object({id:s.string().optional(),label:s.string().optional(),role:s.string().optional(),participantKey:s.string().optional(),participantLabel:s.string().optional(),platformUserId:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),ge=s.object({source:s.string(),sourceEvent:s.string(),threadId:s.string(),channelId:s.string(),isDM:s.boolean(),sessionId:s.string().optional(),workspaceRoot:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),Lt=s.object({actor:he,context:ge,payload:s.record(s.string(),s.unknown()).optional()}),Dt=s.object({action:s.enum(["allow","deny"]).default("allow"),message:s.string().optional(),reason:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),Bt=s.object({adapter:s.string(),botUserName:s.string().optional(),event:fe,payload:s.record(s.string(),s.unknown()),ts:s.string()});var be=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],Ft=new Set(be);var k={CLINE_PASS:"ext-cline-pass",CODE_CLOUD_AGENTS:"code-cloud-agents",CODE_ONBOARDING_GITHUB:"code-onboarding-github",CLINE_COMPOSIO_BETA:"CLINE_COMPOSIO_BETA"},Ut={[k.CLINE_PASS]:!1,[k.CODE_CLOUD_AGENTS]:!1,[k.CODE_ONBOARDING_GITHUB]:!1,[k.CLINE_COMPOSIO_BETA]:!1},qt=Object.values(k),ye=o.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),b=o.record(o.string(),o.string()),ve=o.object({toolName:o.string(),parameters:b}),ke=o.object({toolName:o.string(),parameters:b,result:o.string(),success:o.boolean(),executionTimeMs:o.number()}),Te=o.object({prompt:o.string(),attachments:o.array(o.string())}),we=o.object({taskMetadata:b}),Ee=o.object({taskMetadata:b,previousState:b}),Se=o.object({taskMetadata:b}),Ce=o.object({taskMetadata:b}),xe=o.object({taskId:o.string(),ulid:o.string(),contextSize:o.number(),compactionStrategy:o.string(),previousApiReqIndex:o.number(),tokensIn:o.number(),tokensOut:o.number(),tokensInCache:o.number(),tokensOutCache:o.number(),deletedRangeStart:o.number(),deletedRangeEnd:o.number(),contextJsonPath:o.string(),contextRawPath:o.string()}),Wt=o.object({clineVersion:o.string(),hookName:ye,timestamp:o.string(),taskId:o.string(),sessionContext:o.object({rootSessionId:o.string().optional(),hookLogPath:o.string().optional()}).optional(),workspaceRoots:o.array(o.string()),workspaceInfo:o.custom().optional(),userId:o.string(),agent_id:o.string(),parent_agent_id:o.string().nullable(),iteration:o.number().optional(),reason:o.string().optional(),tool_call:o.object({id:o.string(),name:o.string(),input:o.unknown()}).optional(),tool_result:o.custom().optional(),turn:o.unknown().optional(),error:o.object({name:o.string(),message:o.string(),stack:o.string().optional()}).optional(),preToolUse:ve.optional(),postToolUse:ke.optional(),userPromptSubmit:Te.optional(),taskStart:we.optional(),taskResume:Ee.optional(),taskCancel:Se.optional(),taskComplete:Ce.optional(),preCompact:xe.optional()}).passthrough();var Ae=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Gt=new Set(Ae);var _e=d.enum(["image","audio","video","file"]),Me=d.discriminatedUnion("type",[d.object({type:d.literal("base64"),data:d.string().min(1)}),d.object({type:d.literal("url"),url:d.string().url().refine((r)=>{let a=new URL(r).protocol;return a==="http:"||a==="https:"},"Generated media URLs must use HTTP or HTTPS")}),d.object({type:d.literal("artifact"),artifactId:d.string().min(1)})]);function Oe(r){if(r.startsWith("image/"))return"image";if(r.startsWith("audio/"))return"audio";if(r.startsWith("video/"))return"video";return"file"}var Jt=d.object({id:d.string().min(1),modality:_e,mediaType:d.string().min(1),source:Me,name:d.string().min(1).optional(),sizeBytes:d.number().int().nonnegative().optional()}).refine((r)=>Oe(r.mediaType)===r.modality,{message:"Generated media modality must match its media type",path:["modality"]});var zt=["show","hide","subscription"];function Ie(r){if(typeof globalThis.atob==="function")try{let a=globalThis.atob(r),c=Uint8Array.from(a,(g)=>g.charCodeAt(0));return new TextDecoder().decode(c)}catch{return null}if(typeof Buffer<"u")try{return Buffer.from(r,"base64").toString("utf8")}catch{return null}return null}function Xt(r){let a=r?.trim();if(!a)return null;try{let c=a.split(".");if(c.length!==3)return null;let g=c[1];if(!g)return null;let y=g.replace(/-/g,"+").replace(/_/g,"/"),Q=y.padEnd(y.length+(4-y.length%4)%4,"="),O=Ie(Q);return O?JSON.parse(O):null}catch{return null}}var Vt=new RegExp(`${"⁣⟦"}([^${"⟧"}]*)${"⟧"}([\\s\\S]*?)${"⟦/⟧⁣"}`,"g");var D=`# Plan Mode
2
2
 
3
3
  You are in Plan mode. Your role is to explore, analyze, and plan -- not to execute.
4
4
 
@@ -9,8 +9,8 @@ You are in Plan mode. Your role is to explore, analyze, and plan -- not to execu
9
9
  - Do NOT edit files, write code, run destructive commands, or make any changes
10
10
  - Do NOT implement anything -- focus on understanding and alignment first
11
11
 
12
- The run_commands tool remains available in plan mode strictly for read-only inspection -- listing files, reading configs, inspecting git history and diffs, checking tool versions, and the like. Searching is not among them: search_codebase and grep are tools of their own and neither goes through the shell. Never use it to change anything: no creating, modifying, or deleting files, no writing scripts that make changes, and no state-changing commands (installs, migrations, database or schema changes, container commands that mutate state, etc.). File-editing commands (rm/mv/cp, in-place edits like sed -i, output redirection to files outside /tmp, git commands that change the working tree, package installs) are hard-blocked in plan mode: they are not executed and return a tool error instead, so do not attempt them. The sed tool is blocked the same way when in_place is true, and for the same reason; without it the tool only prints what the script would produce, which is read-only and allowed. If the task requires a mutation, put it in the plan; it happens only after the user switches to act mode.`,Qt=`${q}
12
+ The run_commands tool remains available in plan mode strictly for read-only inspection -- listing files, reading configs, inspecting git history and diffs, checking tool versions, and the like. Searching is not among them: search_codebase and grep are tools of their own and neither goes through the shell. Never use it to change anything: no creating, modifying, or deleting files, no writing scripts that make changes, and no state-changing commands (installs, migrations, database or schema changes, container commands that mutate state, etc.). File-editing commands (rm/mv/cp, in-place edits like sed -i, output redirection to files outside /tmp, git commands that change the working tree, package installs) are hard-blocked in plan mode: they are not executed and return a tool error instead, so do not attempt them. The sed tool is blocked the same way when in_place is true, and for the same reason; without it the tool only prints what the script would produce, which is read-only and allowed. If the task requires a mutation, put it in the plan; it happens only after the user switches to act mode.`,Zt=`${D}
13
13
 
14
- Once the user has reviewed your plan and explicitly approved it in a follow-up message, use the switch_to_act_mode tool to switch to act mode and begin implementation. Calling switch_to_act_mode immediately starts execution, so never call it in the same turn you present a plan and never treat the original task request as approval -- end your turn after presenting the plan and wait for the user's response.`,Vt=`${q}
14
+ Once the user has reviewed your plan and explicitly approved it in a follow-up message, use the switch_to_act_mode tool to switch to act mode and begin implementation. Calling switch_to_act_mode immediately starts execution, so never call it in the same turn you present a plan and never treat the original task request as approval -- end your turn after presenting the plan and wait for the user's response.`,$t=`${D}
15
15
 
16
- Once you have presented your plan, end your turn and wait for the user's response. You do NOT have the ability to switch to act mode yourself -- the user must do it manually with the Plan/Act toggle once they are satisfied with the plan. If the task requires tools that are only available in act mode, ask the user to "toggle to Act mode" (use those words).`;var Zt="anthropic/claude-sonnet-5";var Re=n.object({id:n.string(),temperature:n.number().optional(),maxTokens:n.number().optional(),contextWindow:n.number().optional(),inputPrice:n.number().optional(),outputPrice:n.number().optional(),supportsImages:n.boolean().optional()}),Ne=n.object({models:n.array(Re).optional(),openAiBaseUrl:n.string().optional(),openAiHeaders:n.record(n.string(),n.string()).optional(),azureApiVersion:n.string().optional(),azureIdentity:n.boolean().optional()}),Pe=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional()}),je=n.object({name:n.string(),baseModelId:n.string(),thinkingBudgetTokens:n.number().optional()}),Le=n.object({models:n.array(Pe).optional(),customModels:n.array(je).optional(),awsRegion:n.string().optional(),awsUseCrossRegionInference:n.boolean().optional(),awsUseGlobalInference:n.boolean().optional(),awsBedrockUsePromptCache:n.boolean().optional(),awsBedrockEndpoint:n.string().optional()}),qe=n.object({id:n.string()}),De=n.object({models:n.array(qe).optional()}),Be=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional()}),Fe=n.object({models:n.array(Be).optional(),vertexProjectId:n.string().optional(),vertexRegion:n.string().optional()}),Ue=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional(),promptCachingEnabled:n.boolean().optional()}),He=n.object({models:n.array(Ue).optional(),baseUrl:n.string().optional()}),We=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional()}),ze=n.object({models:n.array(We).optional(),baseUrl:n.string().optional()}),Ge=n.object({OpenAiCompatible:Ne.optional(),AwsBedrock:Le.optional(),Cline:De.optional(),Vertex:Fe.optional(),LiteLLM:He.optional(),Anthropic:ze.optional()}),Xe=n.object({id:n.string()}),Je=n.object({name:n.string(),url:n.string(),alwaysEnabled:n.boolean().optional(),headers:n.record(n.string(),n.string()).optional()}),R=n.object({alwaysEnabled:n.boolean(),name:n.string(),contents:n.string()}),w=n.object({bucket:n.string(),accessKeyId:n.string(),secretAccessKey:n.string(),region:n.string().optional(),endpoint:n.string().optional(),accountId:n.string().optional()}),Ke=n.object({enabled:n.boolean().optional(),type:n.union([n.literal("s3_access_keys"),n.literal("r2_access_keys"),n.literal("azure_access_keys")]).optional(),s3AccessSettings:w.optional(),r2AccessSettings:w.optional(),azureAccessSettings:w.optional()}),Ye=n.object({promptUploading:Ke.optional()}),en=n.object({version:n.string(),providerSettings:Ge.optional(),telemetryEnabled:n.boolean().optional(),kanbanEnabled:n.boolean().optional(),mcpMarketplaceEnabled:n.boolean().optional(),allowedMCPServers:n.array(Xe).optional(),remoteMCPServers:n.array(Je).optional(),blockPersonalRemoteMCPServers:n.boolean().optional(),yoloModeAllowed:n.boolean().optional(),openTelemetryEnabled:n.boolean().optional(),openTelemetryMetricsExporter:n.string().optional(),openTelemetryLogsExporter:n.string().optional(),openTelemetryOtlpProtocol:n.string().optional(),openTelemetryOtlpEndpoint:n.string().optional(),openTelemetryOtlpHeaders:n.record(n.string(),n.string()).optional(),openTelemetryOtlpMetricsProtocol:n.string().optional(),openTelemetryOtlpMetricsEndpoint:n.string().optional(),openTelemetryOtlpMetricsHeaders:n.record(n.string(),n.string()).optional(),openTelemetryOtlpLogsProtocol:n.string().optional(),openTelemetryOtlpLogsEndpoint:n.string().optional(),openTelemetryOtlpLogsHeaders:n.record(n.string(),n.string()).optional(),openTelemetryMetricExportInterval:n.number().optional(),openTelemetryOtlpInsecure:n.boolean().optional(),openTelemetryLogBatchSize:n.number().optional(),openTelemetryLogBatchTimeout:n.number().optional(),openTelemetryLogMaxQueueSize:n.number().optional(),enterpriseTelemetry:Ye.optional(),globalRules:n.array(R).optional(),globalWorkflows:n.array(R).optional()}),tn=n.record(n.string(),n.string());var rn=S.enum(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),on=S.enum(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),an=S.enum(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]);var N={production:{environment:"production",appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",mcpBaseUrl:"https://api.cline.bot/v1/mcp",workOsClientId:"client_01K3A541FN8TA3EPPHTD2325AR"},staging:{environment:"staging",appBaseUrl:"https://staging-app.cline.bot",apiBaseUrl:"https://core-api.staging.int.cline.bot",mcpBaseUrl:"https://core-api.staging.int.cline.bot/v1/mcp",workOsClientId:"client_01K3A5415VF6QBQBG3XYCW91G6"},local:{environment:"local",appBaseUrl:"http://localhost:3000",apiBaseUrl:"http://localhost:7777",mcpBaseUrl:"http://localhost:7777/v1/mcp",workOsClientId:"client_01K6XQAY7JK6T5HXVSZW2S5VYK"}};function P(r){let a=r?.trim().toLowerCase();if(a==="production"||a==="staging"||a==="local")return a;return}function D(){if(typeof process>"u"||!process?.env)return{};return process.env}function Qe(){let r=D();return P(r.CLINE_ENVIRONMENT_OVERRIDE)??P(r.CLINE_ENVIRONMENT)??"production"}function Ve(r){if(typeof r==="string")return N[r];return N[Qe()]}function Ze(r,a){if(a.CLINE_API_BASE_URL)r={...r,apiBaseUrl:a.CLINE_API_BASE_URL,mcpBaseUrl:`${a.CLINE_API_BASE_URL}/v1/mcp`};return r}function B(r){let a=Ve(r);return Ze(a,D())}var $e=["rules","skills","workflows","plugins","hooks"];var sn=new Set($e);var et=p.object({rootPath:p.string().min(1),hint:p.string().min(1).optional(),associatedRemoteUrls:p.array(p.string().min(1)).optional(),latestGitCommitHash:p.string().min(1).optional(),latestGitBranchName:p.string().min(1).optional()}),un=p.object({currentWorkspacePath:p.string().min(1).optional(),workspaces:p.record(p.string().min(1),et)});var tt=["current_state","boundary_analysis","interface_proposal"];var h=e.preprocess((r)=>r instanceof Date?r.toISOString():r,e.string().datetime()),v=e.enum(["pending","in_progress","blocked","completed"]),F=e.enum(["queued","running","completed","failed","cancelled","interrupted"]),k=e.enum(["draft","in_review","finalized"]),nt=e.object({agentId:e.string(),role:e.enum(["lead","teammate"]),description:e.string().optional(),status:e.enum(["idle","running","stopped"])}),dn=e.object({agentId:e.string(),rolePrompt:e.string(),modelId:e.string().optional(),maxIterations:e.number().optional(),temperature:e.number().nonnegative().optional(),seed:e.number().int().optional(),seedRandom:e.boolean().optional(),temperatureBase:e.number().nonnegative().optional(),temperatureRange:e.number().min(0).max(100).optional()});function u(r){return e.preprocess((a)=>a===null?void 0:a,r.optional())}var mn=e.object({agentId:e.string().min(1).describe("Teammate identifier"),rolePrompt:e.string().min(1).describe("System prompt describing teammate role"),temperature:u(e.union([e.number().nonnegative(),e.string()])).describe(`Sampling temperature for this teammate, over its model's own. "random": a draw within 2% of the model's own temperature (a model at 1.0 gets 0.98 to 1.02); that narrow band is the intended variation. Omit to keep the model's.`),seed:u(e.union([e.number().int(),e.string()])).describe('Sampling seed for this teammate. "random" draws one. Omit to leave it unset.'),temperature_range:u(e.union([e.number().min(0).max(100),e.string()])).describe("Percent the temperature is randomized by, around `temperature` or the model's own. Set it only when the user states a number; left out, 2 applies. Held to 10 at most.")}).strict(),pn=e.object({agentId:e.string().min(1).describe("Teammate identifier"),reason:u(e.string().min(1)).describe("Optional shutdown reason")}),hn=e.object({}),U={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var fn=e.object({action:e.enum(["create","list","claim","complete","block"]),title:u(e.string().min(1)).describe("Task title"),description:u(e.string().min(1)).describe("Task details"),dependsOn:u(e.array(e.string().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:u(e.string().min(1)).describe("Optional assignee"),status:u(e.enum(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:u(e.string()).describe("Task ID"),summary:u(e.string().min(1)).describe("Completion summary"),reason:u(e.string().min(1)).describe("Blocking reason")}).superRefine((r,a)=>{for(let c of U[r.action]){if(r[c]!==void 0)continue;a.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${r.action}`})}}),gn=e.object({action:e.enum(["list","claim","complete","block"]),status:u(e.enum(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),assignee:u(e.string().min(1)).describe("Optional assignee filter"),taskId:u(e.string()).describe("Task ID"),summary:u(e.string().min(1)).describe("Completion summary"),reason:u(e.string().min(1)).describe("Blocking reason")}).superRefine((r,a)=>{for(let c of U[r.action]){if(r[c]!==void 0)continue;a.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${r.action}`})}}),bn=e.object({agentId:e.string().describe("Teammate agent ID"),task:e.string().min(1).describe("Task instructions for the teammate"),taskId:u(e.string()).describe("Optional shared task list ID"),runMode:u(e.enum(["sync","async"])).describe("Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later."),continueConversation:u(e.boolean()).describe("If true, continue the teammate conversation; otherwise start fresh")}),yn=e.object({status:u(e.enum(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:u(e.string().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:u(e.boolean()).describe("Include completed/failed runs (default true)")}),vn=e.object({runId:e.string().min(1).describe("Run ID"),reason:u(e.string().min(1)).describe("Optional cancellation reason")}),kn=e.object({runId:u(e.string().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),Tn=e.object({toAgentId:e.string().min(1).describe("Recipient agent ID"),subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),wn=e.object({subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),En=e.object({unreadOnly:u(e.boolean()).describe("Only unread messages for read action (default true)")}),Sn=e.object({kind:e.enum(["progress","handoff","blocked","decision","done","error"]),summary:e.string().min(1).describe("Update summary"),taskId:u(e.string().min(1)).describe("Optional task ID context"),evidence:u(e.array(e.string().min(1))).describe("Optional evidence links/snippets"),nextAction:u(e.string().min(1)).describe("Planned next step")}),Cn=e.object({}),An=e.object({title:e.string().describe("Outcome title"),requiredSections:e.array(e.string()).default(tt).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),xn=e.object({outcomeId:e.string().describe("Outcome ID"),section:e.string().describe("Section name"),sourceRunId:u(e.string()).describe("Optional source run ID"),content:e.string().describe("Section fragment content")}),_n=e.object({fragmentId:e.string().describe("Fragment ID"),approved:e.boolean().describe("Review decision")}),Mn=e.object({outcomeId:e.string().describe("Outcome ID")}),In=e.object({}),On=e.object({teamId:e.string(),teamName:e.string(),members:e.array(nt),taskCounts:e.record(v,e.number()),unreadMessages:e.number(),missionLogEntries:e.number(),activeRuns:e.number(),queuedRuns:e.number(),outcomeCounts:e.record(k,e.number())}),rt=e.object({id:e.string(),title:e.string(),description:e.string(),status:v,createdAt:h,updatedAt:h,createdBy:e.string(),assignee:e.string().optional(),dependsOn:e.array(e.string()),summary:e.string().optional(),isReady:e.boolean(),blockedBy:e.array(e.string())}),Rn=e.discriminatedUnion("action",[e.object({action:e.literal("create"),taskId:e.string(),status:v,ignoredFields:e.array(e.string()).optional(),note:e.string().optional()}),e.object({action:e.literal("list"),tasks:e.array(rt)}),e.object({action:e.literal("claim"),taskId:e.string(),status:v,nextStep:e.string()}),e.object({action:e.literal("complete"),taskId:e.string(),status:v}),e.object({action:e.literal("block"),taskId:e.string(),status:v})]),Nn=e.object({agentId:e.string(),mode:e.enum(["sync","async"]),status:e.enum(["dispatched","running","queued","joined"]),dispatched:e.boolean(),message:e.string(),deduped:e.boolean().optional(),runId:e.string().optional(),text:e.string().optional(),iterations:e.number().optional(),maxIterations:e.number().optional(),finishReason:e.string().optional(),stopReason:e.literal("iteration_cap").optional()}),ot=e.object({textPreview:e.string(),text:e.string().optional(),iterations:e.number(),finishReason:e.string(),durationMs:e.number(),usage:e.object({inputTokens:e.number(),outputTokens:e.number(),cacheReadTokens:e.number().optional(),cacheWriteTokens:e.number().optional(),totalCost:e.number().optional()})}),Pn=e.object({id:e.string(),agentId:e.string(),taskId:e.string().optional(),status:F,messagePreview:e.string(),priority:e.number(),retryCount:e.number(),maxRetries:e.number(),nextAttemptAt:h.optional(),continueConversation:e.boolean().optional(),startedAt:h,endedAt:h.optional(),leaseOwner:e.string().optional(),heartbeatAt:h.optional(),lastProgressAt:h.optional(),lastProgressMessage:e.string().optional(),currentActivity:e.string().optional(),error:e.string().optional(),resultSummary:ot.optional()}),jn=e.object({id:e.string(),teamId:e.string(),fromAgentId:e.string(),toAgentId:e.string(),subject:e.string(),body:e.string(),taskId:e.string().optional(),sentAt:h,readAt:h.optional()}),Ln=e.object({id:e.string(),teamId:e.string(),title:e.string(),status:k,requiredSections:e.array(e.string()),createdBy:e.string(),createdAt:h,finalizedAt:h.optional()}),qn=e.object({outcomeId:e.string(),status:k,requiredSections:e.array(e.string())}),Dn=e.object({agentId:e.string(),status:e.string()}),Bn=e.object({runId:e.string(),status:F}),Fn=e.object({id:e.string(),toAgentId:e.string()}),Un=e.object({delivered:e.number()}),Hn=e.object({id:e.string()}),Wn=e.object({status:e.string()}),zn=e.object({fragmentId:e.string(),status:e.string()}),Gn=e.object({outcomeId:e.string(),status:k}),it;((r)=>{r.TaskStart="task_start",r.TaskEnd="task_end",r.AgentEvent="agent_event",r.TeammateSpawned="teammate_spawned",r.TeammateShutdown="teammate_shutdown",r.TeamTaskUpdated="team_task_updated",r.TeamMessage="team_message",r.TeamMissionLog="team_mission_log",r.TeamTaskCompleted="team_task_completed",r.RunStarted="run_started",r.RunQueued="run_queued",r.RunProgress="run_progress",r.RunCompleted="run_completed",r.RunFailed="run_failed",r.RunCancelled="run_cancelled",r.RunInterrupted="run_interrupted",r.OutcomeCreated="outcome_created",r.OutcomeFragmentAttached="outcome_fragment_attached",r.OutcomeFragmentReviewed="outcome_fragment_reviewed",r.OutcomeFinalized="outcome_finalized",r.TeamCleaned="team_cleaned"})(it||={});var at="the user is not subscribed to required model plan",st="no access to clinepass subscription models yet. subscribe to clinepass",lt="organization accounts cannot use individual model inference subscriptions",ut="you have reached your",ct="clinepass limit",H="please try again later.",dt="free limit reached on model",W="try again in ",mt="model not found";function z(r){let a=r.toLowerCase(),c=a.indexOf(ut);if(c===-1)return;let g=a.indexOf(H,c);if(g===-1)return;let y=g+H.length;if(!a.slice(c,y).includes(ct))return;return{start:c,end:y}}function G(){return`${new URL("/dashboard/subscription?personal=true",B().appBaseUrl).toString()}`}function X(){return`No access to ClinePass subscription models yet. Subscribe to ClinePass, the low cost open weights model coding plan: ${G()}`}class C extends Error{providerId;constructor(r){super(X());this.name="ClineNotSubscribedError",this.providerId=r}}function J(){return"Organization accounts cannot use ClinePass subscriptions. Go to /account -> change account to switch to your personal account for ClinePass"}class A extends Error{providerId;constructor(r){super(J());this.name="ClineOrgIndividualInferenceSubscriptionError",this.providerId=r}}class x extends Error{providerId;constructor(r,a){super(r);this.name="ClinePassLimitError",this.providerId=a}}class _ extends Error{providerId;constructor(r,a){super(r);this.name="ClineFreeModelLimitError",this.providerId=a}}function pt(r){return r instanceof C}function ht(r){return r instanceof A}function ft(r){return r instanceof x}function gt(r){return r instanceof _}function bt(r){let a=r.trim().toLowerCase();return a.includes(at)||a.includes(st)}function yt(r){return r.toLowerCase().includes(lt)}function vt(r){return z(r)!==void 0}function kt(r){let a=z(r);return a?r.slice(a.start,a.end):void 0}function Tt(r){return r.toLowerCase().includes(dt)}function wt(r){return r.toLowerCase().includes(mt)}function Et(r){let a=r.toLowerCase(),c=a.indexOf(W);if(c===-1)return;return a.slice(c+W.length).trim()||void 0}var K=["302ai","abacus","abliteration-ai","above","agentrouter","agnes","ai-router","aiand","aihubmix","aixy","aki-io","alibaba","alibaba-cn","alibaba-coding-plan","alibaba-coding-plan-cn","alibaba-token-plan","alibaba-token-plan-cn","ambient","amd","anthropic","anyapi","arcee","atomic-chat","auriko","bailing","baseten","bedrock","berget","blueclaw","bothub","cerebras","chutes","clarifai","claudinio","cline-pass","cloudferro-sherlock","cloudflare-workers-ai","coralbricks","cortecs","crof","crossmodel","crusoe","daoxe","databricks","deepseek","digitalocean","dinference","drun","ebcloud","echo","edenai","empiriolabs","evroc","fastrouter","fireworks","freemodel","friendli","frogbot","gemini","github-copilot","gmicloud","greenpt","groq","helicone","hetzner","hpc-ai","huggingface","hyper","iflowcn","impossibl","inception","inceptron","inference","inferx","infomaniak","io-net","iteracompute","jalapeno","jiekou","kenari","kilo","kimi-for-coding","klokintegration","kosmik","kuae-cloud-coding-plan","lilac","llama","llmgateway","llmgateway-providers","llmtech","llmtr","lmstudio","longcat","lucidquery","lynkr","meganova","meta","minimax","minimax-cn","minimax-cn-coding-plan","minimax-coding-plan","mistral","mixlayer","moark","modal","model-oracle-ai","modelis","modelscope","moonshot","moonshotai-cn","morph","nano-gpt","nearai","nebius","neon","neosmith","neuralwatt","nova","novita-ai","nvidia","ofox","ollama","openai-native","opencode","opencode-go","openreason","openrouter","opper","orcarouter","ovhcloud","pendra","perplexity-agent","pioneer","poe","poolside","privatemode-ai","qihang-ai","qiniu-ai","regolo-ai","requesty","routing-run","runinfra","sakana","sapaicore","sarvam","scaleway","scnet-token-plan","scx-ai","sensenova","siliconflow","siliconflow-cn","snowflake-cortex","stackit","standardcompute","stepfun","stepfun-ai","stepfun-ai-step-plan","stepfun-step-plan","subconscious","submodel","synthetic","tencent-coding-plan","tencent-token-plan","tencent-tokenhub","tensorx","the-grid-ai","thinkingmachines","tinfoil","together","tokengo","tokenrouter","trustedrouter","umans-ai","umans-ai-coding-plan","unorouter","upstage","v0","vancine","vercel-ai-gateway","vertex","vivgrid","volcengine","volcengine-coding-plan","vultr","wafer.ai","wandb","xai","xiaomi","xiaomi-token-plan-ams","xiaomi-token-plan-cn","xiaomi-token-plan-sgp","xpersona","zai","zai-coding-plan","zeldoc","zenifra","zenmux","zhipuai","zhipuai-coding-plan"];var T;((i)=>{i.ANTHROPIC="anthropic";i.CLAUDE_CODE="claude-code";i.CLINE="cline";i.CLINE_PASS="cline-pass";i.ELEVENLABS="elevenlabs";i.OPENAI_COMPATIBLE="openai-compatible";i.OPENAI_NATIVE="openai-native";i.OPENAI_CODEX="openai-codex";i.OPENAI_CODEX_CLI="openai-codex-cli";i.OPENCODE="opencode";i.BEDROCK="bedrock";i.VERTEX="vertex";i.GEMINI="gemini";i.OLLAMA="ollama";i.XOLLAMA="xollama";i.OPENCOTI="opencoti";i.LMSTUDIO="lmstudio";i.DEEPSEEK="deepseek";i.XAI="xai";i.TOGETHER="together";i.FIREWORKS="fireworks";i.GROQ="groq";i.POOLSIDE="poolside";i.CEREBRAS="cerebras";i.SAMBANOVA="sambanova";i.NEBIUS="nebius";i.BASETEN="baseten";i.REQUESTY="requesty";i.LITELLM="litellm";i.HUGGINGFACE="huggingface";i.VERCEL_AI_GATEWAY="vercel-ai-gateway";i.V0="v0";i.AIHUBMIX="aihubmix";i.HICAP="hicap";i.NOUS_RESEARCH="nousResearch";i.HUAWEI_CLOUD_MAAS="huawei-cloud-maas";i.WANDB="wandb";i.XIAOMI="xiaomi";i.TENCENT_TOKENHUB="tencent-tokenhub";i.KILO="kilo";i.ZAI="zai";i.ZAI_CODING_PLAN="zai-coding-plan";i.QWEN="qwen";i.QWEN_CODE="qwen-code";i.DOUBAO="doubao";i.MISTRAL="mistral";i.MOONSHOT="moonshot";i.ASKSAGE="asksage";i.MINIMAX="minimax";i.DIFY="dify";i.OCA="oca";i.SAPAICORE="sapaicore";i.OPENROUTER="openrouter"})(T||={});var St={openai:"openai-compatible",togetherai:"together","sap-ai-core":"sapaicore"},Y=[...new Set([...Object.values(T),...K])];function M(r){let a=r.trim();return St[a]??a}export{M as normalizeProviderId,vt as isClinePassLimitMessage,ft as isClinePassLimitError,yt as isClineOrgIndividualInferenceSubscriptionMessage,ht as isClineOrgIndividualInferenceSubscriptionError,bt as isClineNotSubscribedMessage,pt as isClineNotSubscribedError,wt as isClineModelNotFoundMessage,Tt as isClineFreeModelLimitMessage,gt as isClineFreeModelLimitError,G as getClinePassSubscriptionUrl,J as getClineOrgIndividualInferenceSubscriptionMessage,X as getClineNotSubscribedMessage,kt as extractClinePassLimitMessage,Et as extractClineFreeModelLimitResetTime,x as ClinePassLimitError,A as ClineOrgIndividualInferenceSubscriptionError,C as ClineNotSubscribedError,_ as ClineFreeModelLimitError};
16
+ Once you have presented your plan, end your turn and wait for the user's response. You do NOT have the ability to switch to act mode yourself -- the user must do it manually with the Plan/Act toggle once they are satisfied with the plan. If the task requires tools that are only available in act mode, ask the user to "toggle to Act mode" (use those words).`;function en(r){let a=r?.metadata?.localCliCommand;if(typeof a!=="string"||!a.trim())return;return{command:a.trim(),docsUrl:r?.docsUrl}}var tn="anthropic/claude-sonnet-5.5";var Re=n.object({id:n.string(),temperature:n.number().optional(),maxTokens:n.number().optional(),contextWindow:n.number().optional(),inputPrice:n.number().optional(),outputPrice:n.number().optional(),supportsImages:n.boolean().optional()}),Ne=n.object({models:n.array(Re).optional(),openAiBaseUrl:n.string().optional(),openAiHeaders:n.record(n.string(),n.string()).optional(),azureApiVersion:n.string().optional(),azureIdentity:n.boolean().optional()}),Pe=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional()}),je=n.object({name:n.string(),baseModelId:n.string(),thinkingBudgetTokens:n.number().optional()}),Le=n.object({models:n.array(Pe).optional(),customModels:n.array(je).optional(),awsRegion:n.string().optional(),awsUseCrossRegionInference:n.boolean().optional(),awsUseGlobalInference:n.boolean().optional(),awsBedrockUsePromptCache:n.boolean().optional(),awsBedrockEndpoint:n.string().optional()}),De=n.object({id:n.string()}),Be=n.object({models:n.array(De).optional()}),Fe=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional()}),Ue=n.object({models:n.array(Fe).optional(),vertexProjectId:n.string().optional(),vertexRegion:n.string().optional()}),qe=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional(),promptCachingEnabled:n.boolean().optional()}),Ye=n.object({models:n.array(qe).optional(),baseUrl:n.string().optional()}),We=n.object({id:n.string(),thinkingBudgetTokens:n.number().optional()}),Ge=n.object({models:n.array(We).optional(),baseUrl:n.string().optional()}),He=n.object({OpenAiCompatible:Ne.optional(),AwsBedrock:Le.optional(),Cline:Be.optional(),Vertex:Ue.optional(),LiteLLM:Ye.optional(),Anthropic:Ge.optional()}),Je=n.object({id:n.string()}),ze=n.object({name:n.string(),url:n.string(),alwaysEnabled:n.boolean().optional(),headers:n.record(n.string(),n.string()).optional()}),R=n.object({alwaysEnabled:n.boolean(),name:n.string(),contents:n.string()}),E=n.object({bucket:n.string(),accessKeyId:n.string(),secretAccessKey:n.string(),region:n.string().optional(),endpoint:n.string().optional(),accountId:n.string().optional()}),Xe=n.object({enabled:n.boolean().optional(),type:n.union([n.literal("s3_access_keys"),n.literal("r2_access_keys"),n.literal("azure_access_keys")]).optional(),s3AccessSettings:E.optional(),r2AccessSettings:E.optional(),azureAccessSettings:E.optional()}),Ke=n.object({promptUploading:Xe.optional()}),rn=n.object({version:n.string(),providerSettings:He.optional(),telemetryEnabled:n.boolean().optional(),kanbanEnabled:n.boolean().optional(),mcpMarketplaceEnabled:n.boolean().optional(),allowedMCPServers:n.array(Je).optional(),remoteMCPServers:n.array(ze).optional(),blockPersonalRemoteMCPServers:n.boolean().optional(),yoloModeAllowed:n.boolean().optional(),openTelemetryEnabled:n.boolean().optional(),openTelemetryMetricsExporter:n.string().optional(),openTelemetryLogsExporter:n.string().optional(),openTelemetryOtlpProtocol:n.string().optional(),openTelemetryOtlpEndpoint:n.string().optional(),openTelemetryOtlpHeaders:n.record(n.string(),n.string()).optional(),openTelemetryOtlpMetricsProtocol:n.string().optional(),openTelemetryOtlpMetricsEndpoint:n.string().optional(),openTelemetryOtlpMetricsHeaders:n.record(n.string(),n.string()).optional(),openTelemetryOtlpLogsProtocol:n.string().optional(),openTelemetryOtlpLogsEndpoint:n.string().optional(),openTelemetryOtlpLogsHeaders:n.record(n.string(),n.string()).optional(),openTelemetryMetricExportInterval:n.number().optional(),openTelemetryOtlpInsecure:n.boolean().optional(),openTelemetryLogBatchSize:n.number().optional(),openTelemetryLogBatchTimeout:n.number().optional(),openTelemetryLogMaxQueueSize:n.number().optional(),enterpriseTelemetry:Ke.optional(),globalRules:n.array(R).optional(),globalWorkflows:n.array(R).optional()}),on=n.record(n.string(),n.string());var sn=S.enum(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),ln=S.enum(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),un=S.enum(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]);function Qe(){return globalThis}function cn(){return Qe().__clineClientIdentity}var N={production:{environment:"production",appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",mcpBaseUrl:"https://api.cline.bot/v1/mcp",workOsClientId:"client_01K3A541FN8TA3EPPHTD2325AR"},staging:{environment:"staging",appBaseUrl:"https://staging-app.cline.bot",apiBaseUrl:"https://core-api.staging.int.cline.bot",mcpBaseUrl:"https://core-api.staging.int.cline.bot/v1/mcp",workOsClientId:"client_01K3A5415VF6QBQBG3XYCW91G6"},local:{environment:"local",appBaseUrl:"http://localhost:3000",apiBaseUrl:"http://localhost:7777",mcpBaseUrl:"http://localhost:7777/v1/mcp",workOsClientId:"client_01K6XQAY7JK6T5HXVSZW2S5VYK"}};function P(r){let a=r?.trim().toLowerCase();if(a==="production"||a==="staging"||a==="local")return a;return}function B(){if(typeof process>"u"||!process?.env)return{};return process.env}function Ve(){let r=B();return P(r.CLINE_ENVIRONMENT_OVERRIDE)??P(r.CLINE_ENVIRONMENT)??"production"}function Ze(r){if(typeof r==="string")return N[r];return N[Ve()]}function $e(r,a){if(a.CLINE_API_BASE_URL)r={...r,apiBaseUrl:a.CLINE_API_BASE_URL,mcpBaseUrl:`${a.CLINE_API_BASE_URL}/v1/mcp`};return r}function F(r){let a=Ze(r);return $e(a,B())}var et=["rules","skills","workflows","plugins","hooks"];var dn=new Set(et);var tt=p.object({rootPath:p.string().min(1),hint:p.string().min(1).optional(),associatedRemoteUrls:p.array(p.string().min(1)).optional(),latestGitCommitHash:p.string().min(1).optional(),latestGitBranchName:p.string().min(1).optional()}),pn=p.object({currentWorkspacePath:p.string().min(1).optional(),workspaces:p.record(p.string().min(1),tt)});var nt=["current_state","boundary_analysis","interface_proposal"];var f=e.preprocess((r)=>r instanceof Date?r.toISOString():r,e.string().datetime()),v=e.enum(["pending","in_progress","blocked","completed"]),U=e.enum(["queued","running","completed","failed","cancelled","interrupted"]),T=e.enum(["draft","in_review","finalized"]),rt=e.object({agentId:e.string(),role:e.enum(["lead","teammate"]),description:e.string().optional(),status:e.enum(["idle","running","stopped"])}),hn=e.object({agentId:e.string(),rolePrompt:e.string(),modelId:e.string().optional(),maxIterations:e.number().optional(),temperature:e.number().nonnegative().optional(),seed:e.number().int().optional(),seedRandom:e.boolean().optional(),temperatureBase:e.number().nonnegative().optional(),temperatureRange:e.number().min(0).max(100).optional()});function u(r){return e.preprocess((a)=>a===null?void 0:a,r.optional())}var gn=e.object({agentId:e.string().min(1).describe("Teammate identifier"),rolePrompt:e.string().min(1).describe("System prompt describing teammate role"),temperature:u(e.union([e.number().nonnegative(),e.string()])).describe(`Sampling temperature for this teammate, over its model's own. "random": a draw within 2% of the model's own temperature (a model at 1.0 gets 0.98 to 1.02); that narrow band is the intended variation. Omit to keep the model's.`),seed:u(e.union([e.number().int(),e.string()])).describe('Sampling seed for this teammate. "random" draws one. Omit to leave it unset.'),temperature_range:u(e.union([e.number().min(0).max(100),e.string()])).describe("Percent the temperature is randomized by, around `temperature` or the model's own. Set it only when the user states a number; left out, 2 applies. Held to 10 at most.")}).strict(),bn=e.object({agentId:e.string().min(1).describe("Teammate identifier"),reason:u(e.string().min(1)).describe("Optional shutdown reason")}),yn=e.object({}),q={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var vn=e.object({action:e.enum(["create","list","claim","complete","block"]),title:u(e.string().min(1)).describe("Task title"),description:u(e.string().min(1)).describe("Task details"),dependsOn:u(e.array(e.string().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:u(e.string().min(1)).describe("Optional assignee"),status:u(e.enum(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:u(e.string()).describe("Task ID"),summary:u(e.string().min(1)).describe("Completion summary"),reason:u(e.string().min(1)).describe("Blocking reason")}).superRefine((r,a)=>{for(let c of q[r.action]){if(r[c]!==void 0)continue;a.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${r.action}`})}}),kn=e.object({action:e.enum(["list","claim","complete","block"]),status:u(e.enum(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),assignee:u(e.string().min(1)).describe("Optional assignee filter"),taskId:u(e.string()).describe("Task ID"),summary:u(e.string().min(1)).describe("Completion summary"),reason:u(e.string().min(1)).describe("Blocking reason")}).superRefine((r,a)=>{for(let c of q[r.action]){if(r[c]!==void 0)continue;a.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${r.action}`})}}),Tn=e.object({agentId:e.string().describe("Teammate agent ID"),task:e.string().min(1).describe("Task instructions for the teammate"),taskId:u(e.string()).describe("Optional shared task list ID"),runMode:u(e.enum(["sync","async"])).describe("Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later."),continueConversation:u(e.boolean()).describe("If true, continue the teammate conversation; otherwise start fresh")}),wn=e.object({status:u(e.enum(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:u(e.string().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:u(e.boolean()).describe("Include completed/failed runs (default true)")}),En=e.object({runId:e.string().min(1).describe("Run ID"),reason:u(e.string().min(1)).describe("Optional cancellation reason")}),Sn=e.object({runId:u(e.string().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),Cn=e.object({toAgentId:e.string().min(1).describe("Recipient agent ID"),subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),xn=e.object({subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),An=e.object({unreadOnly:u(e.boolean()).describe("Only unread messages for read action (default true)")}),_n=e.object({kind:e.enum(["progress","handoff","blocked","decision","done","error"]),summary:e.string().min(1).describe("Update summary"),taskId:u(e.string().min(1)).describe("Optional task ID context"),evidence:u(e.array(e.string().min(1))).describe("Optional evidence links/snippets"),nextAction:u(e.string().min(1)).describe("Planned next step")}),Mn=e.object({}),On=e.object({title:e.string().describe("Outcome title"),requiredSections:e.array(e.string()).default(nt).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),In=e.object({outcomeId:e.string().describe("Outcome ID"),section:e.string().describe("Section name"),sourceRunId:u(e.string()).describe("Optional source run ID"),content:e.string().describe("Section fragment content")}),Rn=e.object({fragmentId:e.string().describe("Fragment ID"),approved:e.boolean().describe("Review decision")}),Nn=e.object({outcomeId:e.string().describe("Outcome ID")}),Pn=e.object({}),jn=e.object({teamId:e.string(),teamName:e.string(),members:e.array(rt),taskCounts:e.record(v,e.number()),unreadMessages:e.number(),missionLogEntries:e.number(),activeRuns:e.number(),queuedRuns:e.number(),outcomeCounts:e.record(T,e.number())}),ot=e.object({id:e.string(),title:e.string(),description:e.string(),status:v,createdAt:f,updatedAt:f,createdBy:e.string(),assignee:e.string().optional(),dependsOn:e.array(e.string()),summary:e.string().optional(),isReady:e.boolean(),blockedBy:e.array(e.string())}),Ln=e.discriminatedUnion("action",[e.object({action:e.literal("create"),taskId:e.string(),status:v,ignoredFields:e.array(e.string()).optional(),note:e.string().optional()}),e.object({action:e.literal("list"),tasks:e.array(ot)}),e.object({action:e.literal("claim"),taskId:e.string(),status:v,nextStep:e.string()}),e.object({action:e.literal("complete"),taskId:e.string(),status:v}),e.object({action:e.literal("block"),taskId:e.string(),status:v})]),Dn=e.object({agentId:e.string(),mode:e.enum(["sync","async"]),status:e.enum(["dispatched","running","queued","joined"]),dispatched:e.boolean(),message:e.string(),deduped:e.boolean().optional(),runId:e.string().optional(),text:e.string().optional(),iterations:e.number().optional(),maxIterations:e.number().optional(),finishReason:e.string().optional(),stopReason:e.literal("iteration_cap").optional()}),it=e.object({textPreview:e.string(),text:e.string().optional(),iterations:e.number(),finishReason:e.string(),durationMs:e.number(),usage:e.object({inputTokens:e.number(),outputTokens:e.number(),cacheReadTokens:e.number().optional(),cacheWriteTokens:e.number().optional(),totalCost:e.number().optional()})}),Bn=e.object({id:e.string(),agentId:e.string(),taskId:e.string().optional(),status:U,messagePreview:e.string(),priority:e.number(),retryCount:e.number(),maxRetries:e.number(),nextAttemptAt:f.optional(),continueConversation:e.boolean().optional(),startedAt:f,endedAt:f.optional(),leaseOwner:e.string().optional(),heartbeatAt:f.optional(),lastProgressAt:f.optional(),lastProgressMessage:e.string().optional(),currentActivity:e.string().optional(),error:e.string().optional(),resultSummary:it.optional()}),Fn=e.object({id:e.string(),teamId:e.string(),fromAgentId:e.string(),toAgentId:e.string(),subject:e.string(),body:e.string(),taskId:e.string().optional(),sentAt:f,readAt:f.optional()}),Un=e.object({id:e.string(),teamId:e.string(),title:e.string(),status:T,requiredSections:e.array(e.string()),createdBy:e.string(),createdAt:f,finalizedAt:f.optional()}),qn=e.object({outcomeId:e.string(),status:T,requiredSections:e.array(e.string())}),Yn=e.object({agentId:e.string(),status:e.string()}),Wn=e.object({runId:e.string(),status:U}),Gn=e.object({id:e.string(),toAgentId:e.string()}),Hn=e.object({delivered:e.number()}),Jn=e.object({id:e.string()}),zn=e.object({status:e.string()}),Xn=e.object({fragmentId:e.string(),status:e.string()}),Kn=e.object({outcomeId:e.string(),status:T}),at;((r)=>{r.TaskStart="task_start",r.TaskEnd="task_end",r.AgentEvent="agent_event",r.TeammateSpawned="teammate_spawned",r.TeammateShutdown="teammate_shutdown",r.TeamTaskUpdated="team_task_updated",r.TeamMessage="team_message",r.TeamMissionLog="team_mission_log",r.TeamTaskCompleted="team_task_completed",r.RunStarted="run_started",r.RunQueued="run_queued",r.RunProgress="run_progress",r.RunCompleted="run_completed",r.RunFailed="run_failed",r.RunCancelled="run_cancelled",r.RunInterrupted="run_interrupted",r.OutcomeCreated="outcome_created",r.OutcomeFragmentAttached="outcome_fragment_attached",r.OutcomeFragmentReviewed="outcome_fragment_reviewed",r.OutcomeFinalized="outcome_finalized",r.TeamCleaned="team_cleaned"})(at||={});var st="the user is not subscribed to required model plan",lt="no access to clinepass subscription models yet. subscribe to clinepass",ut="organization accounts cannot use individual model inference subscriptions",ct="you have reached your",dt="clinepass limit",Y="please try again later.",mt="free limit reached on model",W="try again in ",pt="model not found";function G(r){let a=r.toLowerCase(),c=a.indexOf(ct);if(c===-1)return;let g=a.indexOf(Y,c);if(g===-1)return;let y=g+Y.length;if(!a.slice(c,y).includes(dt))return;return{start:c,end:y}}function H(){return`${new URL("/dashboard/subscription?personal=true",F().appBaseUrl).toString()}`}function J(){return`No access to ClinePass subscription models yet. Subscribe to ClinePass, the low cost open weights model coding plan: ${H()}`}class C extends Error{providerId;constructor(r){super(J());this.name="ClineNotSubscribedError",this.providerId=r}}function z(){return"Organization accounts cannot use ClinePass subscriptions. Go to /account -> change account to switch to your personal account for ClinePass"}class x extends Error{providerId;constructor(r){super(z());this.name="ClineOrgIndividualInferenceSubscriptionError",this.providerId=r}}class A extends Error{providerId;constructor(r,a){super(r);this.name="ClinePassLimitError",this.providerId=a}}class _ extends Error{providerId;constructor(r,a){super(r);this.name="ClineFreeModelLimitError",this.providerId=a}}function ft(r){return r instanceof C}function ht(r){return r instanceof x}function gt(r){return r instanceof A}function bt(r){return r instanceof _}function yt(r){let a=r.trim().toLowerCase();return a.includes(st)||a.includes(lt)}function vt(r){return r.toLowerCase().includes(ut)}function kt(r){return G(r)!==void 0}function Tt(r){let a=G(r);return a?r.slice(a.start,a.end):void 0}function wt(r){return r.toLowerCase().includes(mt)}function Et(r){return r.toLowerCase().includes(pt)}function St(r){let a=r.toLowerCase(),c=a.indexOf(W);if(c===-1)return;return a.slice(c+W.length).trim()||void 0}var X=["302ai","abacus","abliteration-ai","above","agentrouter","agnes","ai-router","ai21","aiand","aihubmix","ainetcafe","aixy","aki-io","alibaba","alibaba-cn","alibaba-coding-plan","alibaba-coding-plan-cn","alibaba-token-plan","alibaba-token-plan-cn","ambient","amd","anthropic","anyapi","arcee","atomic-chat","auriko","bailing","baseten","bedrock","bee","berget","blueclaw","bothub","cerebras","chutes","clarifai","claudinio","cline-pass","cloudferro-sherlock","cloudflare-workers-ai","coralbricks","cortecs","crof","crossmodel","crusoe","daoxe","databricks","deepseek","digitalocean","dinference","drun","ebcloud","echo","edenai","empiriolabs","engy","evroc","fastrouter","fireworks","freemodel","friendli","frogbot","gemini","github-copilot","gmicloud","greenpt","groq","helicone","hetzner","hpc-ai","huggingface","hyper","iflowcn","impossibl","inception","inceptron","inco","infer","inference","inferx","infomaniak","io-net","iteracompute","jalapeno","jiekou","kenari","kilo","kimi-code-plan-cn","kimi-code-plan-global","klokintegration","kosmik","kuae-cloud-coding-plan","lilac","llama","llmgateway","llmgateway-providers","llmtech","llmtr","lmstudio","longcat","lucidquery","lynkr","meganova","melious","meta","minimax","minimax-cn","minimax-cn-coding-plan","minimax-coding-plan","mistral","mixlayer","moark","modal","model-oracle-ai","modelis","modelscope","moonshot","moonshotai-cn","morph","nan","nano-gpt","nearai","nebius","neon","neosmith","neuralwatt","nova","novita-ai","nvidia","oci","ofox","ollama","openai-native","opencode","opencode-go","openreason","openrouter","opper","orcarouter","ovhcloud","pareto","pendra","perplexity-agent","pioneer","poe","poolside","privatemode-ai","qihang-ai","qiniu-ai","regolo-ai","requesty","routing-run","runinfra","sakana","sapaicore","sarvam","scaleway","scnet-token-plan","scx-ai","sensenova","siliconflow","siliconflow-cn","snowflake-cortex","stackit","stepfun","stepfun-ai","stepfun-ai-step-plan","stepfun-step-plan","subconscious","submodel","synthetic","tempr","tencent-coding-plan","tencent-token-plan","tencent-tokenhub","tensorx","the-grid-ai","thinkingmachines","tinfoil","together","tokengo","tokenrouter","trustedrouter","umans-ai","umans-ai-coding-plan","unorouter","upstage","v0","vancine","vercel-ai-gateway","vertex","vispark","vivgrid","volcengine","volcengine-coding-plan","vultr","wafer.ai","wallaby","wandb","xai","xiaomi","xiaomi-token-plan-ams","xiaomi-token-plan-cn","xiaomi-token-plan-sgp","xpersona","zai","zai-coding-plan","zeldoc","zenifra","zenmux","zhipuai","zhipuai-coding-plan"];var w;((i)=>{i.ANTHROPIC="anthropic";i.CLAUDE_CODE="claude-code";i.CLINE="cline";i.CLINE_PASS="cline-pass";i.ELEVENLABS="elevenlabs";i.OPENAI_COMPATIBLE="openai-compatible";i.OPENAI_NATIVE="openai-native";i.OPENAI_CODEX="openai-codex";i.OPENAI_CODEX_CLI="openai-codex-cli";i.OPENCODE="opencode";i.BEDROCK="bedrock";i.VERTEX="vertex";i.GEMINI="gemini";i.OLLAMA="ollama";i.XOLLAMA="xollama";i.OPENCOTI="opencoti";i.LMSTUDIO="lmstudio";i.DEEPSEEK="deepseek";i.XAI="xai";i.TOGETHER="together";i.FIREWORKS="fireworks";i.GROQ="groq";i.POOLSIDE="poolside";i.CEREBRAS="cerebras";i.SAMBANOVA="sambanova";i.NEBIUS="nebius";i.CRUSOE="crusoe";i.BASETEN="baseten";i.REQUESTY="requesty";i.LITELLM="litellm";i.HUGGINGFACE="huggingface";i.VERCEL_AI_GATEWAY="vercel-ai-gateway";i.V0="v0";i.AIAND="aiand";i.AIHUBMIX="aihubmix";i.HICAP="hicap";i.NOUS_RESEARCH="nousResearch";i.HUAWEI_CLOUD_MAAS="huawei-cloud-maas";i.WANDB="wandb";i.XIAOMI="xiaomi";i.TENCENT_TOKENHUB="tencent-tokenhub";i.KILO="kilo";i.ZAI="zai";i.ZAI_CODING_PLAN="zai-coding-plan";i.QWEN="qwen";i.QWEN_CODE="qwen-code";i.DOUBAO="doubao";i.MISTRAL="mistral";i.MOONSHOT="moonshot";i.ASKSAGE="asksage";i.MINIMAX="minimax";i.DIFY="dify";i.OCA="oca";i.SAPAICORE="sapaicore";i.OPENROUTER="openrouter"})(w||={});var Ct={openai:"openai-compatible",togetherai:"together","sap-ai-core":"sapaicore"},K=[...new Set([...Object.values(w),...X])];function M(r){let a=r.trim();return Ct[a]??a}export{M as normalizeProviderId,kt as isClinePassLimitMessage,gt as isClinePassLimitError,vt as isClineOrgIndividualInferenceSubscriptionMessage,ht as isClineOrgIndividualInferenceSubscriptionError,yt as isClineNotSubscribedMessage,ft as isClineNotSubscribedError,Et as isClineModelNotFoundMessage,wt as isClineFreeModelLimitMessage,bt as isClineFreeModelLimitError,H as getClinePassSubscriptionUrl,z as getClineOrgIndividualInferenceSubscriptionMessage,J as getClineNotSubscribedMessage,Tt as extractClinePassLimitMessage,St as extractClineFreeModelLimitResetTime,A as ClinePassLimitError,x as ClineOrgIndividualInferenceSubscriptionError,C as ClineNotSubscribedError,_ as ClineFreeModelLimitError};
@@ -1,7 +1,8 @@
1
- export { isProviderApiLine, OLLAMA_DEFAULT_CONTEXT_WINDOW, type ProviderApiLine, resolveProviderApiLineBaseUrl, } from "./providers/builtins";
1
+ export { getGeneratedModelsForRuntimeProvider, isProviderApiLine, OLLAMA_DEFAULT_CONTEXT_WINDOW, type ProviderApiLine, resolveProviderApiLineBaseUrl, } from "./providers/builtins";
2
2
  export { type ApiHandler, BUILT_IN_PROVIDER, BUILT_IN_PROVIDER_IDS, type BuiltInProviderId, type HandlerFactory, isBuiltInProviderId, type LazyHandlerFactory, normalizeProviderId, type PolykvOptions, type ProviderCapability, type ProviderConfig, type ProviderId, type ProviderSamplingOptions, } from "./providers/types";
3
+ export { resolveGatewayProviderRegistration, resolveGatewayProviderRegistrationSync, } from "./providers/compat";
3
4
  import { type ApiHandler, type ProviderConfig } from "./providers/types";
4
- export { classifyProviderError } from "./providers/error-classification";
5
+ export { classifyProviderError, isRetryableProviderError, } from "./providers/error-classification";
5
6
  export { ClineFreeModelLimitError, ClineNotSubscribedError, ClineOrgIndividualInferenceSubscriptionError, ClinePassLimitError, extractClineFreeModelLimitResetTime, extractClinePassLimitMessage, getClineNotSubscribedMessage, getClineOrgIndividualInferenceSubscriptionMessage, getClinePassSubscriptionUrl, isClineFreeModelLimitError, isClineFreeModelLimitMessage, isClineModelNotFoundMessage, isClineNotSubscribedError, isClineNotSubscribedMessage, isClineOrgIndividualInferenceSubscriptionError, isClineOrgIndividualInferenceSubscriptionMessage, isClinePassLimitError, isClinePassLimitMessage, } from "./providers/errors";
6
7
  export { getRegisteredHandler, getRegisteredHandlerAsync, hasRegisteredHandler, isRegisteredHandlerAsync, registerAsyncHandler, registerHandler, } from "./providers/factory-registry";
7
8
  export type { ApiStreamChunk, ContentBlock, FileContent, HandlerModelInfo, ImageContent, Message, MessageRole, MessageWithMetadata, RedactedThinkingContent, TextContent, ThinkingContent, ToolDefinition, ToolResultContent, ToolUseContent, } from "./providers/types";
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,6BAA6B,EAC7B,KAAK,eAAe,EACpB,6BAA6B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,UAAU,EACf,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,uBAAuB,GAC5B,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EACN,KAAK,UAAU,EAEf,KAAK,cAAc,EACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EACN,wBAAwB,EACxB,uBAAuB,EACvB,4CAA4C,EAC5C,mBAAmB,EACnB,mCAAmC,EACnC,4BAA4B,EAC5B,4BAA4B,EAC5B,iDAAiD,EACjD,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,8CAA8C,EAC9C,gDAAgD,EAChD,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAgB3B,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAiBhE;AAED,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,cAAc,GACpB,OAAO,CAAC,UAAU,CAAC,CAerB;AAID,OAAO,EACN,cAAc,EACd,kCAAkC,EAClC,+BAA+B,EAC/B,KAAK,iBAAiB,EACtB,+BAA+B,EAG/B,mBAAmB,EACnB,sBAAsB,EAGtB,kBAAkB,EAClB,kBAAkB,EAGlB,uBAAuB,EACvB,8BAA8B,EAI9B,wBAAwB,EAGxB,cAAc,EAGd,kCAAkC,GAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC"}
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oCAAoC,EACpC,iBAAiB,EACjB,6BAA6B,EAC7B,KAAK,eAAe,EACpB,6BAA6B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,UAAU,EACf,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,uBAAuB,GAC5B,MAAM,mBAAmB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