@effect/ai-anthropic 4.0.0-beta.69 → 4.0.0-beta.70

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.
@@ -13,25 +13,19 @@ import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
13
13
  import type * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
14
14
  import * as Generated from "./Generated.ts";
15
15
  /**
16
- * The Anthropic client service interface.
17
- *
18
- * Provides methods for interacting with Anthropic's Messages API, including
19
- * both synchronous and streaming message creation.
16
+ * Represents the Anthropic client service with methods for the Messages API, including regular and streaming message
17
+ * creation.
20
18
  *
21
19
  * @category models
22
20
  * @since 4.0.0
23
21
  */
24
22
  export interface Service {
25
23
  /**
26
- * The underlying generated Anthropic client providing access to all API
27
- * endpoints.
24
+ * The underlying generated Anthropic client that exposes all API endpoints.
28
25
  */
29
26
  readonly client: Generated.AnthropicClient;
30
27
  /**
31
- * Low-level streaming request helper for custom SSE endpoints.
32
- *
33
- * Executes an HTTP request and decodes the Server-Sent Events response
34
- * using the provided schema.
28
+ * Executes a low-level streaming HTTP request and decodes the Server-Sent Events response using the provided schema.
35
29
  */
36
30
  readonly streamRequest: <Type extends {
37
31
  readonly id?: string | undefined;
@@ -39,10 +33,7 @@ export interface Service {
39
33
  readonly data: string;
40
34
  }, DecodingServices>(schema: Schema.Decoder<Type, DecodingServices>) => (request: HttpClientRequest.HttpClientRequest) => Stream.Stream<Type, HttpClientError.HttpClientError | Schema.SchemaError | Sse.Retry, DecodingServices>;
41
35
  /**
42
- * Creates a message using the Anthropic Messages API.
43
- *
44
- * Sends a structured list of input messages and returns the model's
45
- * generated response. All errors are mapped to the unified `AiError` type.
36
+ * Creates a message using the Anthropic Messages API and maps all errors to the unified `AiError` type.
46
37
  */
47
38
  readonly createMessage: (options: {
48
39
  readonly payload: typeof Generated.BetaCreateMessageParams.Encoded;
@@ -52,12 +43,12 @@ export interface Service {
52
43
  response: HttpClientResponse.HttpClientResponse
53
44
  ], AiError.AiError>;
54
45
  /**
55
- * Creates a streaming message using the Anthropic Messages API.
46
+ * Creates a streaming message using the Anthropic Messages API and maps all errors to the unified `AiError` type.
47
+ *
48
+ * **Details**
56
49
  *
57
- * Returns an Effect that yields the HTTP response and a stream of events
58
- * as the model generates its response. The stream automatically terminates
59
- * when a `message_stop` event is received. All errors are mapped to the
60
- * unified `AiError` type.
50
+ * The returned Effect yields the HTTP response and a stream of events as the model generates its response. The stream
51
+ * automatically terminates when a `message_stop` event is received.
61
52
  */
62
53
  readonly createMessageStream: (options: {
63
54
  readonly payload: Omit<typeof Generated.BetaCreateMessageParams.Encoded, "stream">;
@@ -68,8 +59,9 @@ export interface Service {
68
59
  ], AiError.AiError>;
69
60
  }
70
61
  /**
71
- * Represents an event received from the Anthropic Messages API during a
72
- * streaming request.
62
+ * Represents an event received from the Anthropic Messages API during a streaming request.
63
+ *
64
+ * **Details**
73
65
  *
74
66
  * Events include:
75
67
  * - `message_start`: Initial event containing message metadata
@@ -101,46 +93,36 @@ export declare class AnthropicClient extends AnthropicClient_base {
101
93
  */
102
94
  export type Options = {
103
95
  /**
104
- * The Anthropic API key for authentication.
105
- *
106
- * If not provided, requests will be made without authentication (useful for
107
- * proxied setups or testing).
96
+ * The Anthropic API key for authentication. Requests are made without authentication when this is omitted, which is
97
+ * useful for proxied setups or testing.
108
98
  */
109
99
  readonly apiKey?: Redacted.Redacted<string> | undefined;
110
100
  /**
111
- * The base URL for the Anthropic API.
112
- *
113
- * Override this to use a proxy or a different API-compatible endpoint.
101
+ * The base URL for the Anthropic API. Override this to use a proxy or a different API-compatible endpoint.
114
102
  *
115
103
  * @default "https://api.anthropic.com"
116
104
  */
117
105
  readonly apiUrl?: string | undefined;
118
106
  /**
119
- * The Anthropic API version header value.
120
- *
121
- * Controls which version of the API to use. See Anthropic's versioning
122
- * documentation for available versions and their features.
107
+ * The Anthropic API version header value. This controls which version of the API to use.
123
108
  *
124
109
  * @default "2023-06-01"
125
110
  */
126
111
  readonly apiVersion?: string | undefined;
127
112
  /**
128
- * Optional transformer for the underlying HTTP client.
129
- *
130
- * Use this to add middleware, logging, or custom request/response handling.
113
+ * Optional transformer for the underlying HTTP client, such as middleware, logging, or custom request/response
114
+ * handling.
131
115
  */
132
116
  readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined;
133
117
  };
134
118
  /**
135
119
  * Creates an Anthropic client service with the given options.
136
120
  *
137
- * The client automatically handles:
138
- * - API key authentication via the `x-api-key` header
139
- * - API versioning via the `anthropic-version` header
140
- * - Error mapping to the unified `AiError` type
141
- * - Request/response transformations via `AnthropicConfig`
121
+ * **Details**
142
122
  *
143
- * Requires an `HttpClient` in the context.
123
+ * The client handles API key authentication via the `x-api-key` header, API versioning via the `anthropic-version`
124
+ * header, error mapping to the unified `AiError` type, and request/response transformations via `AnthropicConfig`. It
125
+ * requires an `HttpClient` in the context.
144
126
  *
145
127
  * @category constructors
146
128
  * @since 4.0.0
@@ -162,33 +144,25 @@ export declare const layer: (options: Options) => Layer.Layer<AnthropicClient, n
162
144
  */
163
145
  export declare const layerConfig: (options?: {
164
146
  /**
165
- * The Anthropic API key for authentication.
166
- *
167
- * If not provided, requests will be made without authentication (useful for
168
- * proxied setups or testing).
147
+ * The Anthropic API key for authentication. Requests are made without authentication when this is omitted, which is
148
+ * useful for proxied setups or testing.
169
149
  */
170
150
  readonly apiKey?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
171
151
  /**
172
- * The base URL for the Anthropic API.
173
- *
174
- * Override this to use a proxy or a different API-compatible endpoint.
152
+ * The base URL for the Anthropic API. Override this to use a proxy or a different API-compatible endpoint.
175
153
  *
176
154
  * @default "https://api.anthropic.com"
177
155
  */
178
156
  readonly apiUrl?: Config.Config<string> | undefined;
179
157
  /**
180
- * The Anthropic API version header value.
181
- *
182
- * Controls which version of the API to use. See Anthropic's versioning
183
- * documentation for available versions and their features.
158
+ * The Anthropic API version header value. This controls which version of the API to use.
184
159
  *
185
160
  * @default "2023-06-01"
186
161
  */
187
162
  readonly apiVersion?: Config.Config<string> | undefined;
188
163
  /**
189
- * Optional transformer for the underlying HTTP client.
190
- *
191
- * Use this to add middleware, logging, or custom request/response handling.
164
+ * Optional transformer for the underlying HTTP client, such as middleware, logging, or custom request/response
165
+ * handling.
192
166
  */
193
167
  readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined;
194
168
  }) => Layer.Layer<AnthropicClient, Config.ConfigError, HttpClient.HttpClient>;
@@ -1 +1 @@
1
- {"version":3,"file":"AnthropicClient.d.ts","sourceRoot":"","sources":["../src/AnthropicClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,OAAO,MAAM,4BAA4B,CAAA;AAC1D,OAAO,KAAK,GAAG,MAAM,8BAA8B,CAAA;AAGnD,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,KAAK,eAAe,MAAM,sCAAsC,CAAA;AAC5E,OAAO,KAAK,iBAAiB,MAAM,wCAAwC,CAAA;AAC3E,OAAO,KAAK,KAAK,kBAAkB,MAAM,yCAAyC,CAAA;AAElF,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAO3C;;;;;;;;GAQG;AACH,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAA;IAE1C;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,EAAE,CACtB,IA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,CAAC,UAAU,CAAC,GAAG,SAAS,CAAA;CAClG,CAAA;AAUD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,4EAwIhB,CAAA;AAMD;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,OAAO,KAAG,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CACpD,CAAA;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU;IACpC;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,CAAA;IAElF;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAEnD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAEvD;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,KAAK,UAAU,CAAC,UAAU,CAAC,GAAG,SAAS,CAAA;CAClG,KAAG,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,UAAU,CAoBvE,CAAA"}
@@ -42,13 +42,11 @@ const RedactedAnthropicHeaders = {
42
42
  /**
43
43
  * Creates an Anthropic client service with the given options.
44
44
  *
45
- * The client automatically handles:
46
- * - API key authentication via the `x-api-key` header
47
- * - API versioning via the `anthropic-version` header
48
- * - Error mapping to the unified `AiError` type
49
- * - Request/response transformations via `AnthropicConfig`
45
+ * **Details**
50
46
  *
51
- * Requires an `HttpClient` in the context.
47
+ * The client handles API key authentication via the `x-api-key` header, API versioning via the `anthropic-version`
48
+ * header, error mapping to the unified `AiError` type, and request/response transformations via `AnthropicConfig`. It
49
+ * requires an `HttpClient` in the context.
52
50
  *
53
51
  * @category constructors
54
52
  * @since 4.0.0
@@ -1 +1 @@
1
- {"version":3,"file":"AnthropicClient.js","names":["Array","Context","Effect","identity","Layer","Predicate","Redacted","Schema","Stream","Sse","Headers","HttpBody","HttpClient","HttpClientRequest","AnthropicConfig","Generated","Errors","AnthropicClient","Service","RedactedAnthropicHeaders","AnthropicApiKey","make","fnUntraced","options","baseClient","apiVersion","httpClient","pipe","mapRequest","request","prependUrl","apiUrl","isNotUndefined","apiKey","setHeader","value","acceptJson","transformClient","client","config","getOrUndefined","httpClientOk","filterStatusOk","streamRequest","schema","execute","map","response","stream","unwrap","decodeText","pipeThroughChannel","decodeSchema","createMessage","betaMessagesPost","includeResponse","catchTags","BetaMessagesPost4XX","error","fail","mapClientError","HttpClientError","mapHttpClientError","SchemaError","mapSchemaError","PingEvent","Struct","type","Literal","MessageEvent","Union","BetaMessageStartEvent","BetaMessageDeltaEvent","BetaMessageStopEvent","BetaContentBlockStartEvent","BetaContentBlockDeltaEvent","BetaContentBlockStopEvent","BetaErrorResponse","buildMessageStream","decodeDataSchema","takeUntil","event","data","filter","Retry","die","fromEffect","createMessageStream","post","headers","fromInput","params","undefined","body","jsonUnsafe","payload","catchTag","of","updateService","CurrentRedactedNames","appendAll","Object","values","layer","effect","layerConfig","gen"],"sources":["../src/AnthropicClient.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;AAQA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAErC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,SAAS,MAAM,kBAAkB;AAC7C,OAAO,KAAKC,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAKC,MAAM,MAAM,eAAe;A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;;;AAMA,OAAO,MAAMoF,KAAK,GAAIhF,OAAgB,IACpCnB,KAAK,CAACoG,MAAM,CAACvF,eAAe,EAAEI,IAAI,CAACE,OAAO,CAAC,CAAC;AAE9C;;;;;;;AAOA,OAAO,MAAMkF,WAAW,GAAIlF,OAkC3B,IACCnB,KAAK,CAACoG,MAAM,CACVvF,eAAe,EACff,MAAM,CAACwG,GAAG,CAAC,aAAS;EAClB,MAAMzE,MAAM,GAAG5B,SAAS,CAAC2B,cAAc,CAACT,OAAO,EAAEU,MAAM,CAAC,GACpD,OAAOV,OAAO,CAACU,MAAM,GACvB2D,SAAS;EACX,MAAM7D,MAAM,GAAG1B,SAAS,CAAC2B,cAAc,CAACT,OAAO,EAAEQ,MAAM,CAAC,GACpD,OAAOR,OAAO,CAACQ,MAAM,GACvB6D,SAAS;EACX,MAAMnE,UAAU,GAAGpB,SAAS,CAAC2B,cAAc,CAACT,OAAO,EAAEE,UAAU,CAAC,GAC5D,OAAOF,OAAO,CAACE,UAAU,GAC3BmE,SAAS;EACX,OAAO,OAAOvE,IAAI,CAAC;IACjBY,MAAM;IACNF,MAAM;IACNN,UAAU;IACVY,eAAe,EAAEd,OAAO,EAAEc;GAC3B,CAAC;AACJ,CAAC,CAAC,CACH","ignoreList":[]}
1
+ {"version":3,"file":"AnthropicClient.js","names":["Array","Context","Effect","identity","Layer","Predicate","Redacted","Schema","Stream","Sse","Headers","HttpBody","HttpClient","HttpClientRequest","AnthropicConfig","Generated","Errors","AnthropicClient","Service","RedactedAnthropicHeaders","AnthropicApiKey","make","fnUntraced","options","baseClient","apiVersion","httpClient","pipe","mapRequest","request","prependUrl","apiUrl","isNotUndefined","apiKey","setHeader","value","acceptJson","transformClient","client","config","getOrUndefined","httpClientOk","filterStatusOk","streamRequest","schema","execute","map","response","stream","unwrap","decodeText","pipeThroughChannel","decodeSchema","createMessage","betaMessagesPost","includeResponse","catchTags","BetaMessagesPost4XX","error","fail","mapClientError","HttpClientError","mapHttpClientError","SchemaError","mapSchemaError","PingEvent","Struct","type","Literal","MessageEvent","Union","BetaMessageStartEvent","BetaMessageDeltaEvent","BetaMessageStopEvent","BetaContentBlockStartEvent","BetaContentBlockDeltaEvent","BetaContentBlockStopEvent","BetaErrorResponse","buildMessageStream","decodeDataSchema","takeUntil","event","data","filter","Retry","die","fromEffect","createMessageStream","post","headers","fromInput","params","undefined","body","jsonUnsafe","payload","catchTag","of","updateService","CurrentRedactedNames","appendAll","Object","values","layer","effect","layerConfig","gen"],"sources":["../src/AnthropicClient.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;AAQA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAErC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,SAAS,MAAM,kBAAkB;AAC7C,OAAO,KAAKC,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAEvC,OAAO,KAAKC,GAAG,MAAM,8BAA8B;AACnD,OAAO,KAAKC,OAAO,MAAM,8BAA8B;AACvD,OAAO,KAAKC,QAAQ,MAAM,+BAA+B;AACzD,OAAO,KAAKC,UAAU,MAAM,iCAAiC;AAE7D,OAAO,KAAKC,iBAAiB,MAAM,wCAAwC;AAE3E,SAASC,eAAe,QAAQ,sBAAsB;AACtD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AA2F9C;AACA;AACA;AAEA;;;;;;AAMA,OAAM,MAAOC,eAAgB,sBAAQhB,OAAO,CAACiB,OAAO,EAA4B,CAC9E,sCAAsC,CACvC;AAwCD;AACA;AACA;AAEA,MAAMC,wBAAwB,GAAG;EAC/BC,eAAe,EAAE;CAClB;AAED;;;;;;;;;;;;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ACT,OAAO,EAAEE,UAAU,CAAC,GAC5D,OAAOF,OAAO,CAACE,UAAU,GAC3BmE,SAAS;EACX,OAAO,OAAOvE,IAAI,CAAC;IACjBY,MAAM;IACNF,MAAM;IACNN,UAAU;IACVY,eAAe,EAAEd,OAAO,EAAEc;GAC3B,CAAC;AACJ,CAAC,CAAC,CACH","ignoreList":[]}
@@ -47,6 +47,7 @@ export declare namespace AnthropicConfig {
47
47
  * Configuration provided through `AnthropicConfig`.
48
48
  *
49
49
  * **Details**
50
+ *
50
51
  * Use `transformClient` to wrap or replace the `HttpClient` used by generated Anthropic API requests.
51
52
  *
52
53
  * @category models
@@ -1 +1 @@
1
- {"version":3,"file":"AnthropicConfig.d.ts","sourceRoot":"","sources":["../src/AnthropicConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;;AAEjE;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,oBAGM;IACzC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,OAAO,GAAG,SAAS,CAAC,CAGxF;CACF;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC;;;;;;;;OAQG;IACH,UAAiB,OAAO;QACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC,GAAG,SAAS,CAAA;KAC5E;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE;IAChC;;;;;OAKG;IACH,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC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AAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAClH;;;;;OAKG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACN,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,GAC5C,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAQvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnthropicConfig.js","names":["Context","Effect","dual","AnthropicConfig","Service","getOrUndefined","map","context","services","mapUnsafe","get","key","withClientTransform","self","transformClient","flatMap","config","provideService"],"sources":["../src/AnthropicConfig.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,IAAI,QAAQ,iBAAiB;AAGtC;;;;;;AAMA,OAAM,MAAOC,eAAgB,sBAAQH,OAAO,CAACI,OAAO,EAGjD,CAAC,sCAAsC,CAAC;EACzC;;;;;EAKA,OAAgBC,cAAc,gBAA8DJ,MAAM,CAACK,GAAG,cACpGL,MAAM,CAACM,OAAO,EAAS,EACtBC,QAAQ,IAAKA,QAAQ,CAACC,SAAS,CAACC,GAAG,CAACP,eAAe,CAACQ,GAAG,CAAC,CAC1D;;AAuBH;;;;;;AAMA,OAAO,MAAMC,mBAAmB,gBAkB5BV,IAAI,CAAC,CAAC,EAAE,CACVW,IAA4B,EAC5BC,eAAmD,KAEnDb,MAAM,CAACc,OAAO,CACZZ,eAAe,CAACE,cAAc,EAC7BW,MAAM,IAAKf,MAAM,CAACgB,cAAc,CAACJ,IAAI,EAAEV,eAAe,EAAE;EAAE,GAAGa,MAAM;EAAEF;AAAe,CAAE,CAAC,CACzF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"AnthropicConfig.js","names":["Context","Effect","dual","AnthropicConfig","Service","getOrUndefined","map","context","services","mapUnsafe","get","key","withClientTransform","self","transformClient","flatMap","config","provideService"],"sources":["../src/AnthropicConfig.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,IAAI,QAAQ,iBAAiB;AAGtC;;;;;;AAMA,OAAM,MAAOC,eAAgB,sBAAQH,OAAO,CAACI,OAAO,EAGjD,CAAC,sCAAsC,CAAC;EACzC;;;;;EAKA,OAAgBC,cAAc,gBAA8DJ,MAAM,CAACK,GAAG,cACpGL,MAAM,CAACM,OAAO,EAAS,EACtBC,QAAQ,IAAKA,QAAQ,CAACC,SAAS,CAACC,GAAG,CAACP,eAAe,CAACQ,GAAG,CAAC,CAC1D;;AAwBH;;;;;;AAMA,OAAO,MAAMC,mBAAmB,gBAkB5BV,IAAI,CAAC,CAAC,EAAE,CACVW,IAA4B,EAC5BC,eAAmD,KAEnDb,MAAM,CAACc,OAAO,CACZZ,eAAe,CAACE,cAAc,EAC7BW,MAAM,IAAKf,MAAM,CAACgB,cAAc,CAACJ,IAAI,EAAEV,eAAe,EAAE;EAAE,GAAGa,MAAM;EAAEF;AAAe,CAAE,CAAC,CACzF,CAAC","ignoreList":[]}
@@ -25,8 +25,9 @@ export type AnthropicErrorMetadata = {
25
25
  /**
26
26
  * Anthropic-specific rate limit metadata fields.
27
27
  *
28
- * Extends base error metadata with rate limit specific information from
29
- * Anthropic's rate limit headers.
28
+ * **Details**
29
+ *
30
+ * Extends base error metadata with rate limit-specific information from Anthropic's rate limit headers.
30
31
  *
31
32
  * @category models
32
33
  * @since 4.0.0
@@ -61,8 +62,9 @@ declare module "effect/unstable/ai/AiError" {
61
62
  /**
62
63
  * Anthropic metadata attached to `RateLimitError` values.
63
64
  *
64
- * Includes request identifiers, Anthropic error types, and parsed request or
65
- * token limit headers when the provider rejects a request due to rate limits.
65
+ * **Details**
66
+ *
67
+ * Includes request identifiers, Anthropic error types, and parsed request or token limit headers when the provider rejects a request due to rate limits.
66
68
  *
67
69
  * @category configuration
68
70
  * @since 4.0.0
@@ -73,8 +75,9 @@ declare module "effect/unstable/ai/AiError" {
73
75
  /**
74
76
  * Anthropic metadata attached to `QuotaExhaustedError` values.
75
77
  *
76
- * Captures the Anthropic error type and request identifier for failures where
77
- * the account or workspace has exhausted its available quota.
78
+ * **Details**
79
+ *
80
+ * Captures the Anthropic error type and request identifier for failures where the account or workspace has exhausted its available quota.
78
81
  *
79
82
  * @category configuration
80
83
  * @since 4.0.0
@@ -85,8 +88,9 @@ declare module "effect/unstable/ai/AiError" {
85
88
  /**
86
89
  * Anthropic metadata attached to `AuthenticationError` values.
87
90
  *
88
- * Preserves Anthropic error details for missing, invalid, or unauthorized API
89
- * credentials while keeping the error in the shared AI error model.
91
+ * **Details**
92
+ *
93
+ * Preserves Anthropic error details for missing, invalid, or unauthorized API credentials while keeping the error in the shared AI error model.
90
94
  *
91
95
  * @category configuration
92
96
  * @since 4.0.0
@@ -97,8 +101,9 @@ declare module "effect/unstable/ai/AiError" {
97
101
  /**
98
102
  * Anthropic metadata attached to `ContentPolicyError` values.
99
103
  *
100
- * Records Anthropic error details returned when a request or response is
101
- * rejected by Anthropic safety or content policy enforcement.
104
+ * **Details**
105
+ *
106
+ * Records Anthropic error details returned when a request or response is rejected by Anthropic safety or content policy enforcement.
102
107
  *
103
108
  * @category configuration
104
109
  * @since 4.0.0
@@ -109,8 +114,9 @@ declare module "effect/unstable/ai/AiError" {
109
114
  /**
110
115
  * Anthropic metadata attached to `InvalidRequestError` values.
111
116
  *
112
- * Provides the Anthropic error type and request identifier for malformed or
113
- * unsupported requests rejected before model execution.
117
+ * **Details**
118
+ *
119
+ * Provides the Anthropic error type and request identifier for malformed or unsupported requests rejected before model execution.
114
120
  *
115
121
  * @category configuration
116
122
  * @since 4.0.0
@@ -121,8 +127,9 @@ declare module "effect/unstable/ai/AiError" {
121
127
  /**
122
128
  * Anthropic metadata attached to `InternalProviderError` values.
123
129
  *
124
- * Preserves Anthropic request correlation data for provider-side failures
125
- * that should be reported or investigated with Anthropic support.
130
+ * **Details**
131
+ *
132
+ * Preserves Anthropic request correlation data for provider-side failures that should be reported or investigated with Anthropic support.
126
133
  *
127
134
  * @category configuration
128
135
  * @since 4.0.0
@@ -133,8 +140,9 @@ declare module "effect/unstable/ai/AiError" {
133
140
  /**
134
141
  * Anthropic metadata attached to `InvalidOutputError` values.
135
142
  *
136
- * Describes Anthropic-specific context for responses that could not be
137
- * decoded or interpreted as valid AI output.
143
+ * **Details**
144
+ *
145
+ * Describes Anthropic-specific context for responses that could not be decoded or interpreted as valid AI output.
138
146
  *
139
147
  * @category configuration
140
148
  * @since 4.0.0
@@ -145,8 +153,9 @@ declare module "effect/unstable/ai/AiError" {
145
153
  /**
146
154
  * Anthropic metadata attached to `StructuredOutputError` values.
147
155
  *
148
- * Captures Anthropic error details for structured-output failures, including
149
- * request correlation data useful when diagnosing schema-related responses.
156
+ * **Details**
157
+ *
158
+ * Captures Anthropic error details for structured-output failures, including request correlation data useful when diagnosing schema-related responses.
150
159
  *
151
160
  * @category configuration
152
161
  * @since 4.0.0
@@ -157,8 +166,9 @@ declare module "effect/unstable/ai/AiError" {
157
166
  /**
158
167
  * Anthropic metadata attached to `UnsupportedSchemaError` values.
159
168
  *
160
- * Provides Anthropic error details for schemas that cannot be represented by
161
- * or submitted to the Anthropic API.
169
+ * **Details**
170
+ *
171
+ * Provides Anthropic error details for schemas that cannot be represented by or submitted to the Anthropic API.
162
172
  *
163
173
  * @category configuration
164
174
  * @since 4.0.0
@@ -169,8 +179,9 @@ declare module "effect/unstable/ai/AiError" {
169
179
  /**
170
180
  * Anthropic metadata attached to `UnknownError` values.
171
181
  *
172
- * Retains the Anthropic error type and request identifier when a provider
173
- * response cannot be classified as a more specific AI error.
182
+ * **Details**
183
+ *
184
+ * Retains the Anthropic error type and request identifier when a provider response cannot be classified as a more specific AI error.
174
185
  *
175
186
  * @category configuration
176
187
  * @since 4.0.0
@@ -1 +1 @@
1
- {"version":3,"file":"AnthropicError.d.ts","sourceRoot":"","sources":["../src/AnthropicError.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,GAAG;IAChE;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC;;OAEG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IACzC;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC,CAAA;AAED,OAAO,QAAQ,4BAA4B,CAAC;IAC1C;;;;;;;;OAQG;IACH,UAAiB,sBAAsB;QACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAA;KACvD;IAED;;;;;;;;OAQG;IACH,UAAiB,2BAA2B;QAC1C,QAAQ,CAAC,SAAS,CAAC,EA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AC,EAAE,sBAAsB,GAAG,IAAI,CAAA;KACnD;IAED;;;;;;;;;OASG;IACH,UAAiB,6BAA6B;QAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;KACnD;IAED;;;;;;;;;OASG;IACH,UAAiB,8BAA8B;QAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;KACnD;IAED;;;;;;;;;OASG;IACH,UAAiB,oBAAoB;QACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;KACnD;CACF"}
@@ -151,6 +151,8 @@ declare const Config_base: Context.ServiceClass<Config, "@effect/ai-anthropic/An
151
151
  /**
152
152
  * Whether to use strict JSON schema validation for tool calls.
153
153
  *
154
+ * **Details**
155
+ *
154
156
  * Only applies to models that support structured outputs. Defaults to
155
157
  * `true` when structured outputs are supported.
156
158
  */
@@ -160,6 +162,8 @@ declare const Config_base: Context.ServiceClass<Config, "@effect/ai-anthropic/An
160
162
  /**
161
163
  * Configuration options for the Anthropic language model.
162
164
  *
165
+ * **Details**
166
+ *
163
167
  * This service can be used to provide default configuration values or to
164
168
  * override configuration on a per-request basis.
165
169
  *
@@ -172,6 +176,8 @@ declare module "effect/unstable/ai/Prompt" {
172
176
  /**
173
177
  * Anthropic-specific options for system messages.
174
178
  *
179
+ * **Details**
180
+ *
175
181
  * These options are used when translating system messages into Anthropic
176
182
  * request content.
177
183
  *
@@ -189,6 +195,8 @@ declare module "effect/unstable/ai/Prompt" {
189
195
  /**
190
196
  * Anthropic-specific options for user messages.
191
197
  *
198
+ * **Details**
199
+ *
192
200
  * These options are used when translating user messages into Anthropic
193
201
  * request content.
194
202
  *
@@ -206,6 +214,8 @@ declare module "effect/unstable/ai/Prompt" {
206
214
  /**
207
215
  * Anthropic-specific options for assistant messages.
208
216
  *
217
+ * **Details**
218
+ *
209
219
  * These options are used when replaying assistant messages in Anthropic
210
220
  * conversation history.
211
221
  *
@@ -223,6 +233,8 @@ declare module "effect/unstable/ai/Prompt" {
223
233
  /**
224
234
  * Anthropic-specific options for tool messages.
225
235
  *
236
+ * **Details**
237
+ *
226
238
  * These options are used when converting tool results into Anthropic user
227
239
  * content blocks.
228
240
  *
@@ -240,6 +252,8 @@ declare module "effect/unstable/ai/Prompt" {
240
252
  /**
241
253
  * Anthropic-specific options for text prompt parts.
242
254
  *
255
+ * **When to use**
256
+ *
243
257
  * Use these options to control how text blocks are sent to Anthropic.
244
258
  *
245
259
  * @category request
@@ -256,6 +270,8 @@ declare module "effect/unstable/ai/Prompt" {
256
270
  /**
257
271
  * Anthropic-specific options for reasoning prompt parts.
258
272
  *
273
+ * **Details**
274
+ *
259
275
  * Preserves Claude thinking metadata when reasoning content is sent back to
260
276
  * Anthropic in later turns.
261
277
  *
@@ -288,6 +304,8 @@ declare module "effect/unstable/ai/Prompt" {
288
304
  /**
289
305
  * Anthropic-specific options for file prompt parts.
290
306
  *
307
+ * **Details**
308
+ *
291
309
  * Controls document metadata, citations, and prompt caching for files sent to
292
310
  * Anthropic.
293
311
  *
@@ -313,6 +331,8 @@ declare module "effect/unstable/ai/Prompt" {
313
331
  * Additional context about the document that will be forwarded to the
314
332
  * large language model, but will not be used towards cited content.
315
333
  *
334
+ * **When to use**
335
+ *
316
336
  * Useful for storing additional document metadata as text or stringified JSON.
317
337
  */
318
338
  readonly documentContext?: string | null;
@@ -321,6 +341,8 @@ declare module "effect/unstable/ai/Prompt" {
321
341
  /**
322
342
  * Anthropic-specific options for tool call prompt parts.
323
343
  *
344
+ * **Details**
345
+ *
324
346
  * Carries Anthropic tool caller metadata, MCP metadata, and cache control for
325
347
  * tool use blocks.
326
348
  *
@@ -351,6 +373,8 @@ declare module "effect/unstable/ai/Prompt" {
351
373
  /**
352
374
  * Anthropic-specific options for tool result prompt parts.
353
375
  *
376
+ * **Details**
377
+ *
354
378
  * Controls Anthropic prompt caching for tool result content.
355
379
  *
356
380
  * @category request
@@ -367,6 +391,8 @@ declare module "effect/unstable/ai/Prompt" {
367
391
  /**
368
392
  * Anthropic-specific options for tool approval request prompt parts.
369
393
  *
394
+ * **Details**
395
+ *
370
396
  * Controls prompt caching for human approval requests in conversations.
371
397
  *
372
398
  * @category request
@@ -383,6 +409,8 @@ declare module "effect/unstable/ai/Prompt" {
383
409
  /**
384
410
  * Anthropic-specific options for tool approval response prompt parts.
385
411
  *
412
+ * **Details**
413
+ *
386
414
  * Controls prompt caching for human approval responses in conversations.
387
415
  *
388
416
  * @category request
@@ -401,6 +429,8 @@ declare module "effect/unstable/ai/Response" {
401
429
  /**
402
430
  * Anthropic metadata attached when a reasoning block begins.
403
431
  *
432
+ * **Details**
433
+ *
404
434
  * Includes Claude thinking metadata needed to continue reasoning-aware
405
435
  * conversations.
406
436
  *
@@ -429,6 +459,8 @@ declare module "effect/unstable/ai/Response" {
429
459
  /**
430
460
  * Anthropic metadata attached to streaming reasoning deltas.
431
461
  *
462
+ * **Details**
463
+ *
432
464
  * Includes the signature for streamed Claude thinking content when available.
433
465
  *
434
466
  * @category response
@@ -449,6 +481,8 @@ declare module "effect/unstable/ai/Response" {
449
481
  /**
450
482
  * Anthropic metadata attached to completed reasoning parts.
451
483
  *
484
+ * **Details**
485
+ *
452
486
  * Preserves Claude thinking or redacted thinking information for later turns.
453
487
  *
454
488
  * @category response
@@ -476,6 +510,8 @@ declare module "effect/unstable/ai/Response" {
476
510
  /**
477
511
  * Anthropic metadata attached to tool call response parts.
478
512
  *
513
+ * **Details**
514
+ *
479
515
  * Identifies Anthropic caller details and MCP tool metadata emitted by the
480
516
  * provider.
481
517
  *
@@ -502,6 +538,8 @@ declare module "effect/unstable/ai/Response" {
502
538
  /**
503
539
  * Anthropic metadata attached to tool result response parts.
504
540
  *
541
+ * **Details**
542
+ *
505
543
  * Identifies MCP tool metadata associated with provider-executed tool
506
544
  * results.
507
545
  *
@@ -524,6 +562,8 @@ declare module "effect/unstable/ai/Response" {
524
562
  /**
525
563
  * Anthropic metadata for document citations in model responses.
526
564
  *
565
+ * **Details**
566
+ *
527
567
  * Records the cited document span by character position or page number.
528
568
  *
529
569
  * @category response
@@ -565,6 +605,8 @@ declare module "effect/unstable/ai/Response" {
565
605
  /**
566
606
  * Anthropic metadata for URL and web citations in model responses.
567
607
  *
608
+ * **Details**
609
+ *
568
610
  * Records cited URL text or web-search source freshness information.
569
611
  *
570
612
  * @category response
@@ -591,6 +633,8 @@ declare module "effect/unstable/ai/Response" {
591
633
  /**
592
634
  * Anthropic metadata attached to the finish part of a response.
593
635
  *
636
+ * **Details**
637
+ *
594
638
  * Includes container state, context management information, stop details, and
595
639
  * token usage reported by Anthropic.
596
640
  *
@@ -608,6 +652,8 @@ declare module "effect/unstable/ai/Response" {
608
652
  /**
609
653
  * Anthropic metadata attached to error response parts.
610
654
  *
655
+ * **Details**
656
+ *
611
657
  * Includes the provider request identifier when Anthropic returns one.
612
658
  *
613
659
  * @category response
@@ -678,6 +724,8 @@ export type AnthropicUserDefinedTool = typeof Generated.BetaTool.Encoded;
678
724
  /**
679
725
  * Represents a provider-defined tool that can be passed to the Anthropic API.
680
726
  *
727
+ * **Details**
728
+ *
681
729
  * These include Anthropic's built-in tools like computer use, code execution,
682
730
  * web search, and text editing.
683
731
  *