@zyraxon-ai/llm 19.0.5 → 19.0.6

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 (218) hide show
  1. package/README.md +131 -131
  2. package/dist/cache-policy.js +1 -0
  3. package/dist/cache-policy.js.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/llm.js +1 -0
  7. package/dist/llm.js.map +1 -1
  8. package/dist/protocols/anthropic-messages.js +1 -0
  9. package/dist/protocols/anthropic-messages.js.map +1 -1
  10. package/dist/protocols/bedrock-converse.js +1 -0
  11. package/dist/protocols/bedrock-converse.js.map +1 -1
  12. package/dist/protocols/bedrock-event-stream.js +1 -0
  13. package/dist/protocols/bedrock-event-stream.js.map +1 -1
  14. package/dist/protocols/gemini.js +1 -0
  15. package/dist/protocols/gemini.js.map +1 -1
  16. package/dist/protocols/index.js +1 -0
  17. package/dist/protocols/index.js.map +1 -1
  18. package/dist/protocols/openai-chat.js +1 -0
  19. package/dist/protocols/openai-chat.js.map +1 -1
  20. package/dist/protocols/openai-compatible-chat.js +1 -0
  21. package/dist/protocols/openai-compatible-chat.js.map +1 -1
  22. package/dist/protocols/openai-responses.js +1 -0
  23. package/dist/protocols/openai-responses.js.map +1 -1
  24. package/dist/protocols/shared.js +1 -0
  25. package/dist/protocols/shared.js.map +1 -1
  26. package/dist/protocols/utils/bedrock-auth.js +1 -0
  27. package/dist/protocols/utils/bedrock-auth.js.map +1 -1
  28. package/dist/protocols/utils/bedrock-cache.js +1 -0
  29. package/dist/protocols/utils/bedrock-cache.js.map +1 -1
  30. package/dist/protocols/utils/bedrock-media.js +1 -0
  31. package/dist/protocols/utils/bedrock-media.js.map +1 -1
  32. package/dist/protocols/utils/cache.js +1 -3
  33. package/dist/protocols/utils/cache.js.map +1 -1
  34. package/dist/protocols/utils/gemini-tool-schema.js +1 -0
  35. package/dist/protocols/utils/gemini-tool-schema.js.map +1 -1
  36. package/dist/protocols/utils/lifecycle.js +1 -0
  37. package/dist/protocols/utils/lifecycle.js.map +1 -1
  38. package/dist/protocols/utils/openai-options.js +1 -0
  39. package/dist/protocols/utils/openai-options.js.map +1 -1
  40. package/dist/protocols/utils/tool-schema.js +1 -0
  41. package/dist/protocols/utils/tool-schema.js.map +1 -1
  42. package/dist/protocols/utils/tool-stream.js +1 -0
  43. package/dist/protocols/utils/tool-stream.js.map +1 -1
  44. package/dist/provider-error.js +1 -0
  45. package/dist/provider-error.js.map +1 -1
  46. package/dist/provider.js +1 -0
  47. package/dist/provider.js.map +1 -1
  48. package/dist/providers/amazon-bedrock.js +1 -0
  49. package/dist/providers/amazon-bedrock.js.map +1 -1
  50. package/dist/providers/anthropic.js +1 -0
  51. package/dist/providers/anthropic.js.map +1 -1
  52. package/dist/providers/azure.js +1 -0
  53. package/dist/providers/azure.js.map +1 -1
  54. package/dist/providers/cloudflare.js +1 -0
  55. package/dist/providers/cloudflare.js.map +1 -1
  56. package/dist/providers/github-copilot.js +1 -0
  57. package/dist/providers/github-copilot.js.map +1 -1
  58. package/dist/providers/google.js +1 -0
  59. package/dist/providers/google.js.map +1 -1
  60. package/dist/providers/index.js +1 -0
  61. package/dist/providers/index.js.map +1 -1
  62. package/dist/providers/openai-compatible-profile.js +1 -0
  63. package/dist/providers/openai-compatible-profile.js.map +1 -1
  64. package/dist/providers/openai-compatible.js +1 -0
  65. package/dist/providers/openai-compatible.js.map +1 -1
  66. package/dist/providers/openai-options.js +1 -0
  67. package/dist/providers/openai-options.js.map +1 -1
  68. package/dist/providers/openai.js +1 -0
  69. package/dist/providers/openai.js.map +1 -1
  70. package/dist/providers/openrouter.js +1 -0
  71. package/dist/providers/openrouter.js.map +1 -1
  72. package/dist/providers/xai.js +1 -0
  73. package/dist/providers/xai.js.map +1 -1
  74. package/dist/route/auth-options.js +1 -0
  75. package/dist/route/auth-options.js.map +1 -1
  76. package/dist/route/auth.js +1 -0
  77. package/dist/route/auth.js.map +1 -1
  78. package/dist/route/client.js +1 -0
  79. package/dist/route/client.js.map +1 -1
  80. package/dist/route/endpoint.js +1 -0
  81. package/dist/route/endpoint.js.map +1 -1
  82. package/dist/route/executor.js +1 -0
  83. package/dist/route/executor.js.map +1 -1
  84. package/dist/route/framing.js +1 -0
  85. package/dist/route/framing.js.map +1 -1
  86. package/dist/route/index.js +1 -0
  87. package/dist/route/index.js.map +1 -1
  88. package/dist/route/protocol.js +1 -0
  89. package/dist/route/protocol.js.map +1 -1
  90. package/dist/route/transport/http.js +1 -0
  91. package/dist/route/transport/http.js.map +1 -1
  92. package/dist/route/transport/index.js +1 -0
  93. package/dist/route/transport/index.js.map +1 -1
  94. package/dist/route/transport/websocket.js +1 -0
  95. package/dist/route/transport/websocket.js.map +1 -1
  96. package/dist/schema/errors.js +1 -0
  97. package/dist/schema/errors.js.map +1 -1
  98. package/dist/schema/events.js +1 -0
  99. package/dist/schema/events.js.map +1 -1
  100. package/dist/schema/ids.js +1 -0
  101. package/dist/schema/ids.js.map +1 -1
  102. package/dist/schema/index.js +1 -0
  103. package/dist/schema/index.js.map +1 -1
  104. package/dist/schema/messages.js +1 -0
  105. package/dist/schema/messages.js.map +1 -1
  106. package/dist/schema/options.js +1 -0
  107. package/dist/schema/options.js.map +1 -1
  108. package/dist/tool-runtime.js +1 -0
  109. package/dist/tool-runtime.js.map +1 -1
  110. package/dist/tool.js +1 -0
  111. package/dist/tool.js.map +1 -1
  112. package/dist/utils/record.js +1 -0
  113. package/dist/utils/record.js.map +1 -1
  114. package/package.json +107 -21
  115. package/dist/cache-policy.d.ts +0 -3
  116. package/dist/cache-policy.d.ts.map +0 -1
  117. package/dist/index.d.ts +0 -13
  118. package/dist/index.d.ts.map +0 -1
  119. package/dist/llm.d.ts +0 -205
  120. package/dist/llm.d.ts.map +0 -1
  121. package/dist/protocols/anthropic-messages.d.ts +0 -340
  122. package/dist/protocols/anthropic-messages.d.ts.map +0 -1
  123. package/dist/protocols/bedrock-converse.d.ts +0 -472
  124. package/dist/protocols/bedrock-converse.d.ts.map +0 -1
  125. package/dist/protocols/bedrock-event-stream.d.ts +0 -10
  126. package/dist/protocols/bedrock-event-stream.d.ts.map +0 -1
  127. package/dist/protocols/gemini.d.ts +0 -165
  128. package/dist/protocols/gemini.d.ts.map +0 -1
  129. package/dist/protocols/index.d.ts +0 -7
  130. package/dist/protocols/index.d.ts.map +0 -1
  131. package/dist/protocols/openai-chat.d.ts +0 -297
  132. package/dist/protocols/openai-chat.d.ts.map +0 -1
  133. package/dist/protocols/openai-compatible-chat.d.ts +0 -12
  134. package/dist/protocols/openai-compatible-chat.d.ts.map +0 -1
  135. package/dist/protocols/openai-responses.d.ts +0 -615
  136. package/dist/protocols/openai-responses.d.ts.map +0 -1
  137. package/dist/protocols/shared.d.ts +0 -193
  138. package/dist/protocols/shared.d.ts.map +0 -1
  139. package/dist/protocols/utils/bedrock-auth.d.ts +0 -19
  140. package/dist/protocols/utils/bedrock-auth.d.ts.map +0 -1
  141. package/dist/protocols/utils/bedrock-cache.d.ts +0 -16
  142. package/dist/protocols/utils/bedrock-cache.d.ts.map +0 -1
  143. package/dist/protocols/utils/bedrock-media.d.ts +0 -50
  144. package/dist/protocols/utils/bedrock-media.d.ts.map +0 -1
  145. package/dist/protocols/utils/cache.d.ts +0 -7
  146. package/dist/protocols/utils/cache.d.ts.map +0 -1
  147. package/dist/protocols/utils/gemini-tool-schema.d.ts +0 -3
  148. package/dist/protocols/utils/gemini-tool-schema.d.ts.map +0 -1
  149. package/dist/protocols/utils/lifecycle.d.ts +0 -20
  150. package/dist/protocols/utils/lifecycle.d.ts.map +0 -1
  151. package/dist/protocols/utils/openai-options.d.ts +0 -23
  152. package/dist/protocols/utils/openai-options.d.ts.map +0 -1
  153. package/dist/protocols/utils/tool-schema.d.ts +0 -8
  154. package/dist/protocols/utils/tool-schema.d.ts.map +0 -1
  155. package/dist/protocols/utils/tool-stream.d.ts +0 -156
  156. package/dist/protocols/utils/tool-stream.d.ts.map +0 -1
  157. package/dist/provider-error.d.ts +0 -3
  158. package/dist/provider-error.d.ts.map +0 -1
  159. package/dist/provider.d.ts +0 -24
  160. package/dist/provider.d.ts.map +0 -1
  161. package/dist/providers/amazon-bedrock.d.ts +0 -142
  162. package/dist/providers/amazon-bedrock.d.ts.map +0 -1
  163. package/dist/providers/anthropic.d.ts +0 -24
  164. package/dist/providers/anthropic.d.ts.map +0 -1
  165. package/dist/providers/azure.d.ts +0 -36
  166. package/dist/providers/azure.d.ts.map +0 -1
  167. package/dist/providers/cloudflare.d.ts +0 -47
  168. package/dist/providers/cloudflare.d.ts.map +0 -1
  169. package/dist/providers/github-copilot.d.ts +0 -30
  170. package/dist/providers/github-copilot.d.ts.map +0 -1
  171. package/dist/providers/google.d.ts +0 -24
  172. package/dist/providers/google.d.ts.map +0 -1
  173. package/dist/providers/index.d.ts +0 -12
  174. package/dist/providers/index.d.ts.map +0 -1
  175. package/dist/providers/openai-compatible-profile.d.ts +0 -44
  176. package/dist/providers/openai-compatible-profile.d.ts.map +0 -1
  177. package/dist/providers/openai-compatible.d.ts +0 -62
  178. package/dist/providers/openai-compatible.d.ts.map +0 -1
  179. package/dist/providers/openai-options.d.ts +0 -31
  180. package/dist/providers/openai-options.d.ts.map +0 -1
  181. package/dist/providers/openai.d.ts +0 -116
  182. package/dist/providers/openai.d.ts.map +0 -1
  183. package/dist/providers/openrouter.d.ts +0 -199
  184. package/dist/providers/openrouter.d.ts.map +0 -1
  185. package/dist/providers/xai.d.ts +0 -32
  186. package/dist/providers/xai.d.ts.map +0 -1
  187. package/dist/route/auth-options.d.ts +0 -35
  188. package/dist/route/auth-options.d.ts.map +0 -1
  189. package/dist/route/client.d.ts +0 -306
  190. package/dist/route/client.d.ts.map +0 -1
  191. package/dist/route/executor.d.ts +0 -13
  192. package/dist/route/executor.d.ts.map +0 -1
  193. package/dist/route/index.d.ts +0 -17
  194. package/dist/route/index.d.ts.map +0 -1
  195. package/dist/route/protocol.d.ts +0 -77
  196. package/dist/route/protocol.d.ts.map +0 -1
  197. package/dist/route/transport/http.d.ts +0 -34
  198. package/dist/route/transport/http.d.ts.map +0 -1
  199. package/dist/route/transport/index.d.ts +0 -28
  200. package/dist/route/transport/index.d.ts.map +0 -1
  201. package/dist/route/transport/websocket.d.ts +0 -57
  202. package/dist/route/transport/websocket.d.ts.map +0 -1
  203. package/dist/schema/errors.d.ts +0 -166
  204. package/dist/schema/errors.d.ts.map +0 -1
  205. package/dist/schema/events.d.ts +0 -3821
  206. package/dist/schema/events.d.ts.map +0 -1
  207. package/dist/schema/ids.d.ts +0 -31
  208. package/dist/schema/ids.d.ts.map +0 -1
  209. package/dist/schema/index.d.ts +0 -6
  210. package/dist/schema/index.d.ts.map +0 -1
  211. package/dist/schema/messages.d.ts +0 -294
  212. package/dist/schema/messages.d.ts.map +0 -1
  213. package/dist/schema/options.d.ts +0 -144
  214. package/dist/schema/options.d.ts.map +0 -1
  215. package/dist/tool-runtime.d.ts +0 -16
  216. package/dist/tool-runtime.d.ts.map +0 -1
  217. package/dist/utils/record.d.ts +0 -3
  218. package/dist/utils/record.d.ts.map +0 -1
@@ -1,199 +0,0 @@
1
- import { Schema } from "effect";
2
- import { Route, type RouteDefaultsInput } from "../route/client";
3
- import { Protocol } from "../route/protocol";
4
- import { type ProviderAuthOption } from "../route/auth-options";
5
- import { type ModelID, type ProviderOptions } from "../schema";
6
- export declare const profile: {
7
- readonly provider: "openrouter";
8
- readonly baseURL: "https://openrouter.ai/api/v1";
9
- };
10
- export declare const id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
11
- export interface OpenRouterOptions {
12
- readonly [key: string]: unknown;
13
- readonly usage?: boolean | Record<string, unknown>;
14
- readonly reasoning?: Record<string, unknown>;
15
- readonly promptCacheKey?: string;
16
- }
17
- export type OpenRouterProviderOptionsInput = ProviderOptions & {
18
- readonly openrouter?: OpenRouterOptions;
19
- };
20
- export type ModelOptions = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
21
- readonly baseURL?: string;
22
- readonly providerOptions?: OpenRouterProviderOptionsInput;
23
- };
24
- declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
25
- model: Schema.String;
26
- messages: Schema.$Array<Schema.toTaggedUnion<"role", readonly [Schema.Struct<{
27
- readonly role: Schema.Literal<"system">;
28
- readonly content: Schema.String;
29
- }>, Schema.Struct<{
30
- readonly role: Schema.Literal<"user">;
31
- readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
32
- readonly type: Schema.Literal<"text">;
33
- readonly text: Schema.String;
34
- }>, Schema.Struct<{
35
- readonly type: Schema.Literal<"image_url">;
36
- readonly image_url: Schema.Struct<{
37
- readonly url: Schema.String;
38
- }>;
39
- }>]>>]>;
40
- }>, Schema.Struct<{
41
- readonly role: Schema.Literal<"assistant">;
42
- readonly content: Schema.NullOr<Schema.String>;
43
- readonly tool_calls: Schema.optional<Schema.$Array<Schema.Struct<{
44
- readonly id: Schema.String;
45
- readonly type: Schema.tag<"function">;
46
- readonly function: Schema.Struct<{
47
- readonly name: Schema.String;
48
- readonly arguments: Schema.String;
49
- }>;
50
- }>>>;
51
- readonly reasoning_content: Schema.optional<Schema.String>;
52
- }>, Schema.Struct<{
53
- readonly role: Schema.Literal<"tool">;
54
- readonly tool_call_id: Schema.String;
55
- readonly content: Schema.String;
56
- }>]>>;
57
- tools: Schema.optional<Schema.$Array<Schema.Struct<{
58
- readonly type: Schema.tag<"function">;
59
- readonly function: Schema.Struct<{
60
- readonly name: Schema.String;
61
- readonly description: Schema.String;
62
- readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
63
- }>;
64
- }>>>;
65
- tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
66
- readonly type: Schema.tag<"function">;
67
- readonly function: Schema.Struct<{
68
- readonly name: Schema.String;
69
- }>;
70
- }>]>>;
71
- stream: Schema.Literal<true>;
72
- stream_options: Schema.optional<Schema.Struct<{
73
- readonly include_usage: Schema.Boolean;
74
- }>>;
75
- store: Schema.optional<Schema.Boolean>;
76
- reasoning_effort: Schema.optional<Schema.Literals<("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[]>>;
77
- max_tokens: Schema.optional<Schema.Number>;
78
- temperature: Schema.optional<Schema.Number>;
79
- top_p: Schema.optional<Schema.Number>;
80
- frequency_penalty: Schema.optional<Schema.Number>;
81
- presence_penalty: Schema.optional<Schema.Number>;
82
- seed: Schema.optional<Schema.Number>;
83
- stop: Schema.optional<Schema.$Array<Schema.String>>;
84
- }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>;
85
- export type OpenRouterBody = Schema.Schema.Type<typeof OpenRouterBody>;
86
- export declare const protocol: Protocol<{
87
- readonly [x: string]: any;
88
- readonly model: string;
89
- readonly messages: readonly ({
90
- readonly role: "system";
91
- readonly content: string;
92
- } | {
93
- readonly role: "user";
94
- readonly content: string | readonly ({
95
- readonly type: "text";
96
- readonly text: string;
97
- } | {
98
- readonly type: "image_url";
99
- readonly image_url: {
100
- readonly url: string;
101
- };
102
- })[];
103
- } | {
104
- readonly role: "assistant";
105
- readonly content: string;
106
- readonly tool_calls?: readonly {
107
- readonly id: string;
108
- readonly type: "function";
109
- readonly function: {
110
- readonly name: string;
111
- readonly arguments: string;
112
- };
113
- }[];
114
- readonly reasoning_content?: string;
115
- } | {
116
- readonly role: "tool";
117
- readonly tool_call_id: string;
118
- readonly content: string;
119
- })[];
120
- readonly stream: true;
121
- readonly tools?: readonly {
122
- readonly type: "function";
123
- readonly function: {
124
- readonly name: string;
125
- readonly description: string;
126
- readonly parameters: {
127
- readonly [x: string]: unknown;
128
- };
129
- };
130
- }[];
131
- readonly tool_choice?: "required" | "none" | "auto" | {
132
- readonly type: "function";
133
- readonly function: {
134
- readonly name: string;
135
- };
136
- };
137
- readonly stream_options?: {
138
- readonly include_usage: boolean;
139
- };
140
- readonly store?: boolean;
141
- readonly reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
142
- readonly max_tokens?: number;
143
- readonly temperature?: number;
144
- readonly top_p?: number;
145
- readonly frequency_penalty?: number;
146
- readonly presence_penalty?: number;
147
- readonly seed?: number;
148
- readonly stop?: readonly string[];
149
- }, string, {
150
- readonly choices: readonly {
151
- readonly delta?: {
152
- readonly content?: string;
153
- readonly reasoning_content?: string;
154
- readonly tool_calls?: readonly {
155
- readonly index: number;
156
- readonly id?: string;
157
- readonly function?: {
158
- readonly name?: string;
159
- readonly arguments?: string;
160
- };
161
- }[];
162
- };
163
- readonly finish_reason?: string;
164
- }[];
165
- readonly usage?: {
166
- readonly prompt_tokens?: number;
167
- readonly completion_tokens?: number;
168
- readonly total_tokens?: number;
169
- readonly prompt_tokens_details?: {
170
- readonly cached_tokens?: number;
171
- };
172
- readonly completion_tokens_details?: {
173
- readonly reasoning_tokens?: number;
174
- };
175
- };
176
- }, {
177
- tools: Partial<Record<number, import("../protocols/utils/tool-stream").PendingTool>>;
178
- toolCallEvents: any[];
179
- lifecycle: import("../protocols/utils/lifecycle").State;
180
- }>;
181
- export declare const route: Route<unknown, import("../route/transport/http").HttpPrepared<string>>;
182
- export declare const routes: Route<unknown, import("../route/transport/http").HttpPrepared<string>>[];
183
- export declare const configure: (input?: ModelOptions) => {
184
- id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
185
- model: (modelID: string | ModelID) => import("..").Model;
186
- configure: (input?: ModelOptions) => /*elided*/ any;
187
- };
188
- export declare const provider: {
189
- id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
190
- model: (modelID: string | ModelID) => import("..").Model;
191
- configure: (input?: ModelOptions) => {
192
- id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
193
- model: (modelID: string | ModelID) => import("..").Model;
194
- configure: /*elided*/ any;
195
- };
196
- };
197
- export declare const model: (modelID: string | ModelID) => import("..").Model;
198
- export {};
199
- //# sourceMappingURL=openrouter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"openrouter.d.ts","sourceRoot":"","sources":["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AC,OAAO,cAAc,CAAC,CAAA;AAEtE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBnB,CAAA;AAeF,eAAO,MAAM,KAAK,wEAMhB,CAAA;AAEF,eAAO,MAAM,MAAM,0EAAU,CAAA;AAW7B,eAAO,MAAM,SAAS,GAAI,QAAO,YAAiB;;qBAI7B,MAAM,GAAG,OAAO;wBAJJ,YAAY;CAO5C,CAAA;AAED,eAAO,MAAM,QAAQ;;qBALA,MAAM,GAAG,OAAO;wBAJJ,YAAY;;yBAIxB,MAAM,GAAG,OAAO;;;CAKF,CAAA;AACnC,eAAO,MAAM,KAAK,YANG,MAAM,GAAG,OAAO,uBAMF,CAAA"}
@@ -1,32 +0,0 @@
1
- import { type ProviderAuthOption } from "../route/auth-options";
2
- import type { RouteDefaultsInput } from "../route/client";
3
- import { type ModelID } from "../schema";
4
- export declare const id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
5
- export type ModelOptions = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
6
- readonly baseURL?: string;
7
- };
8
- export declare const routes: import("../route").Route<unknown, import("../route/transport/http").HttpPrepared<string>>[];
9
- export declare const configure: (input?: ModelOptions) => {
10
- id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
11
- model: (modelID: string | ModelID) => import("..").Model;
12
- responses: (modelID: string | ModelID) => import("..").Model;
13
- chat: (modelID: string | ModelID) => import("..").Model;
14
- configure: (input?: ModelOptions) => /*elided*/ any;
15
- };
16
- export declare const provider: {
17
- id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
18
- model: (modelID: string | ModelID) => import("..").Model;
19
- responses: (modelID: string | ModelID) => import("..").Model;
20
- chat: (modelID: string | ModelID) => import("..").Model;
21
- configure: (input?: ModelOptions) => {
22
- id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
23
- model: (modelID: string | ModelID) => import("..").Model;
24
- responses: (modelID: string | ModelID) => import("..").Model;
25
- chat: (modelID: string | ModelID) => import("..").Model;
26
- configure: /*elided*/ any;
27
- };
28
- };
29
- export declare const model: (modelID: string | ModelID) => import("..").Model;
30
- export declare const responses: (modelID: string | ModelID) => import("..").Model;
31
- export declare const chat: (modelID: string | ModelID) => import("..").Model;
32
- //# sourceMappingURL=xai.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"xai.d.ts","sourceRoot":"","sources":["../../src/providers/xai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,WAAW,CAAA;AAKpD,eAAO,MAAM,EAAE,yDAAyB,CAAA;AAExC,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAC3C,kBAAkB,CAAC,UAAU,CAAC,GAAG;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAEH,eAAO,MAAM,MAAM,6FAAsD,CAAA;AAwBzE,eAAO,MAAM,SAAS,GAAI,QAAO,YAAiB;;qBAGpB,MAAM,GAAG,OAAO;yBAAhB,MAAM,GAAG,OAAO;oBACrB,MAAM,GAAG,OAAO;wBAJR,YAAY;CAY5C,CAAA;AAED,eAAO,MAAM,QAAQ;;qBAXS,MAAM,GAAG,OAAO;yBAAhB,MAAM,GAAG,OAAO;oBACrB,MAAM,GAAG,OAAO;wBAJR,YAAY;;yBAGf,MAAM,GAAG,OAAO;6BAAhB,MAAM,GAAG,OAAO;wBACrB,MAAM,GAAG,OAAO;;;CAUN,CAAA;AACnC,eAAO,MAAM,KAAK,YAZY,MAAM,GAAG,OAAO,uBAYX,CAAA;AACnC,eAAO,MAAM,SAAS,YAbQ,MAAM,GAAG,OAAO,uBAaH,CAAA;AAC3C,eAAO,MAAM,IAAI,YAbQ,MAAM,GAAG,OAAO,uBAaR,CAAA"}
@@ -1,35 +0,0 @@
1
- import type { Config, Redacted } from "effect";
2
- import { Auth } from "./auth";
3
- export type ApiKeyMode = "optional" | "required";
4
- export type AuthOverride = {
5
- readonly auth: Auth;
6
- readonly apiKey?: never;
7
- };
8
- export type OptionalApiKeyAuth = {
9
- readonly apiKey?: string | Redacted.Redacted<string> | Config.Config<string | Redacted.Redacted<string>>;
10
- readonly auth?: never;
11
- };
12
- export type RequiredApiKeyAuth = {
13
- readonly apiKey: string | Redacted.Redacted<string> | Config.Config<string | Redacted.Redacted<string>>;
14
- readonly auth?: never;
15
- };
16
- export type ProviderAuthOption<Mode extends ApiKeyMode> = AuthOverride | (Mode extends "optional" ? OptionalApiKeyAuth : RequiredApiKeyAuth);
17
- export type ModelOptions<Base, Mode extends ApiKeyMode> = Omit<Base, "apiKey" | "auth"> & ProviderAuthOption<Mode>;
18
- export type ModelArgs<Base, Mode extends ApiKeyMode> = Mode extends "optional" ? readonly [options?: ModelOptions<Base, Mode>] : readonly [options: ModelOptions<Base, Mode>];
19
- export type ModelFactory<Base, Mode extends ApiKeyMode, Model> = (id: string, ...args: ModelArgs<Base, Mode>) => Model;
20
- /**
21
- * Require at least one of the keys in `T`. Use for option shapes where any
22
- * subset of fields is acceptable but at least one must be present (e.g. Azure
23
- * accepts `resourceName` or `baseURL`).
24
- */
25
- export type AtLeastOne<T> = {
26
- [K in keyof T]: Required<Pick<T, K>> & Partial<Omit<T, K>>;
27
- }[keyof T];
28
- /**
29
- * Standard bearer-auth resolution for providers: honor an explicit `auth`
30
- * override, otherwise resolve `apiKey` (option > config var) and apply it as
31
- * a bearer token.
32
- */
33
- export declare const bearer: (options: ProviderAuthOption<"optional">, envVar: string | ReadonlyArray<string>) => Auth;
34
- export * as AuthOptions from "./auth-options";
35
- //# sourceMappingURL=auth-options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-options.d.ts","sourceRoot":"","s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AU,IAAI,IAAI,SAAS,UAAU,GAC1E,SAAS,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAC7C,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAEhD,MAAM,MAAM,YAAY,CAAC,IAAI,EAAE,IAAI,SAAS,UAAU,EAAE,KAAK,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,KAAK,CAAA;AAEtH;;;;GAIG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;KACzB,CAAC,IAAI,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3D,CAAC,MAAM,CAAC,CAAC,CAAA;AAEV;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,SAAS,kBAAkB,CAAC,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,KAAG,IAQxG,CAAA;AAED,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAA"}
@@ -1,306 +0,0 @@
1
- import { Context, Effect, Layer, Schema, Stream } from "effect";
2
- import { type Auth as AuthDef } from "./auth";
3
- import { Endpoint, type EndpointPatch } from "./endpoint";
4
- import { RequestExecutor } from "./executor";
5
- import type { Framing } from "./framing";
6
- import { HttpTransport } from "./transport";
7
- import type { Transport, TransportRuntime } from "./transport";
8
- import type { Protocol } from "./protocol";
9
- import type { LLMError, LLMEvent, PreparedRequestOf, ProtocolID, ProviderOptions } from "../schema";
10
- import { GenerationOptions, HttpOptions, LLMRequest, LLMResponse, Model, ModelLimits, ProviderID } from "../schema";
11
- export interface RouteBody<Body> {
12
- /** Schema for the validated provider-native body sent as the JSON request. */
13
- readonly schema: Schema.Codec<Body, unknown>;
14
- /** Build the provider-native body from a common `LLMRequest`. */
15
- readonly from: (request: LLMRequest) => Effect.Effect<Body, LLMError>;
16
- }
17
- export interface Route<Body, Prepared = unknown> {
18
- readonly id: string;
19
- readonly provider?: ProviderID;
20
- readonly protocol: ProtocolID;
21
- readonly endpoint: Endpoint<Body>;
22
- readonly auth: AuthDef;
23
- readonly transport: Transport<Body, Prepared, unknown>;
24
- readonly defaults: RouteDefaults;
25
- readonly body: RouteBody<Body>;
26
- readonly with: (patch: RoutePatch<Body, Prepared>) => Route<Body, Prepared>;
27
- readonly model: (input: RouteMappedModelInput) => Model;
28
- readonly prepareTransport: (body: Body, request: LLMRequest) => Effect.Effect<Prepared, LLMError>;
29
- readonly streamPrepared: (prepared: Prepared, request: LLMRequest, runtime: TransportRuntime) => Stream.Stream<LLMEvent, LLMError>;
30
- }
31
- export type AnyRoute = Route<any, any>;
32
- export type HttpOptionsInput = HttpOptions.Input;
33
- export type RouteModelInput = Omit<Model.Input, "provider" | "route">;
34
- export type RouteRoutedModelInput = Omit<Model.Input, "route">;
35
- export interface RouteDefaults {
36
- readonly headers?: Record<string, string>;
37
- readonly limits?: ModelLimits;
38
- readonly generation?: GenerationOptions;
39
- readonly providerOptions?: ProviderOptions;
40
- readonly http?: HttpOptions;
41
- }
42
- export interface RouteDefaultsInput {
43
- readonly headers?: Record<string, string>;
44
- readonly limits?: ModelLimits.Input;
45
- readonly generation?: GenerationOptions.Input;
46
- readonly providerOptions?: ProviderOptions;
47
- readonly http?: HttpOptions.Input;
48
- }
49
- export interface RoutePatch<Body, Prepared> extends RouteDefaultsInput {
50
- readonly id?: string;
51
- readonly provider?: string | ProviderID;
52
- readonly auth?: AuthDef;
53
- readonly transport?: Transport<Body, Prepared, unknown>;
54
- readonly endpoint?: EndpointPatch<Body>;
55
- }
56
- type RouteMappedModelInput = RouteModelInput | RouteRoutedModelInput;
57
- export declare const generationOptions: (input: GenerationOptions.Input | undefined) => GenerationOptions;
58
- export declare const httpOptions: (input: HttpOptionsInput | undefined) => HttpOptions.Input;
59
- export interface Interface {
60
- /**
61
- * Compile a request through protocol body construction, validation, and HTTP
62
- * preparation without sending it. Returns the prepared request including the
63
- * provider-native body.
64
- *
65
- * Pass a `Body` type argument to statically expose the route's body
66
- * shape (e.g. `prepare<OpenAIChatBody>(...)`) — the runtime body is
67
- * identical, so this is a type-level assertion the caller makes about which
68
- * route the request will resolve to.
69
- */
70
- readonly prepare: <Body = unknown>(request: LLMRequest) => Effect.Effect<PreparedRequestOf<Body>, LLMError>;
71
- readonly stream: StreamMethod;
72
- readonly generate: GenerateMethod;
73
- }
74
- export interface StreamMethod {
75
- (request: LLMRequest): Stream.Stream<LLMEvent, LLMError>;
76
- }
77
- export interface GenerateMethod {
78
- (request: LLMRequest): Effect.Effect<LLMResponse, LLMError>;
79
- }
80
- declare const Service_base: Context.ServiceClass<Service, "@zyraxon/LLMClient", Interface>;
81
- export declare class Service extends Service_base {
82
- }
83
- export interface MakeInput<Body, Frame, Event, State> {
84
- /** Route id used in diagnostics and prepared request metadata. */
85
- readonly id: string;
86
- /** Provider identity for route-owned model construction. */
87
- readonly provider?: string | ProviderID;
88
- /** Semantic API contract — owns body construction, body schema, and parsing. */
89
- readonly protocol: Protocol<Body, Frame, Event, State>;
90
- /** Where the request is sent. */
91
- readonly endpoint: Endpoint<Body>;
92
- /** Per-request transport auth. Provider facades override this via `route.with(...)`. */
93
- readonly auth?: AuthDef;
94
- /** Stream framing — bytes -> frames before `protocol.stream.event` decoding. */
95
- readonly framing: Framing<Frame>;
96
- /** Static / per-request headers added before `auth` runs. */
97
- readonly headers?: (input: {
98
- readonly request: LLMRequest;
99
- }) => Record<string, string>;
100
- /** Route/request defaults used when compiling requests for this route. */
101
- readonly defaults?: RouteDefaultsInput;
102
- }
103
- export interface MakeTransportInput<Body, Prepared, Frame, Event, State> {
104
- /** Route id used in diagnostics and prepared request metadata. */
105
- readonly id: string;
106
- /** Provider identity for route-owned model construction. */
107
- readonly provider?: string | ProviderID;
108
- /** Semantic API contract — owns body construction, body schema, and parsing. */
109
- readonly protocol: Protocol<Body, Frame, Event, State>;
110
- /** Where the request is sent. */
111
- readonly endpoint: Endpoint<Body>;
112
- /** Per-request transport auth. Provider facades override this via `route.with(...)`. */
113
- readonly auth?: AuthDef;
114
- /** Static / per-request headers added before `auth` runs. */
115
- readonly headers?: (input: {
116
- readonly request: LLMRequest;
117
- }) => Record<string, string>;
118
- /** Runnable transport route. */
119
- readonly transport: Transport<Body, Prepared, Frame>;
120
- /** Route/request defaults used when compiling requests for this route. */
121
- readonly defaults?: RouteDefaultsInput;
122
- }
123
- export declare function make<Body, Prepared, Frame, Event, State>(input: MakeTransportInput<Body, Prepared, Frame, Event, State>): Route<Body, Prepared>;
124
- /**
125
- * Build a `Route` by composing the four orthogonal pieces of a deployment:
126
- *
127
- * - `Protocol` — what is the API I'm speaking?
128
- * - `Endpoint` — where do I send the request?
129
- * - `Auth` — how do I authenticate it?
130
- * - `Framing` — how do I cut the response stream into protocol frames?
131
- *
132
- * Plus optional `headers` for cross-cutting deployment concerns (provider
133
- * version pins, per-deployment quirks).
134
- *
135
- * This is the canonical route constructor. If a new route does not fit
136
- * this four-axis model, add a purpose-built constructor rather than widening
137
- * the public surface preemptively.
138
- */
139
- export declare function make<Body, Frame, Event, State>(input: MakeInput<Body, Frame, Event, State>): Route<Body, HttpTransport.HttpPrepared<Frame>>;
140
- export declare const prepare: <Body = unknown>(request: LLMRequest) => Effect.Effect<PreparedRequestOf<Body>, LLMError>;
141
- export declare function stream(request: LLMRequest): Stream.Stream<LLMEvent, LLMError>;
142
- export declare function generate(request: LLMRequest): Effect.Effect<LLMResponse, LLMError>;
143
- export declare const streamRequest: (request: LLMRequest) => Stream.Stream<{
144
- readonly type: "step-start";
145
- readonly index: number;
146
- } | {
147
- readonly type: "text-start";
148
- readonly id: string;
149
- readonly providerMetadata?: {
150
- readonly [x: string]: {
151
- readonly [x: string]: unknown;
152
- };
153
- };
154
- } | {
155
- readonly type: "text-delta";
156
- readonly id: string;
157
- readonly text: string;
158
- readonly providerMetadata?: {
159
- readonly [x: string]: {
160
- readonly [x: string]: unknown;
161
- };
162
- };
163
- } | {
164
- readonly type: "text-end";
165
- readonly id: string;
166
- readonly providerMetadata?: {
167
- readonly [x: string]: {
168
- readonly [x: string]: unknown;
169
- };
170
- };
171
- } | {
172
- readonly type: "reasoning-start";
173
- readonly id: string;
174
- readonly providerMetadata?: {
175
- readonly [x: string]: {
176
- readonly [x: string]: unknown;
177
- };
178
- };
179
- } | {
180
- readonly type: "reasoning-delta";
181
- readonly id: string;
182
- readonly text: string;
183
- readonly providerMetadata?: {
184
- readonly [x: string]: {
185
- readonly [x: string]: unknown;
186
- };
187
- };
188
- } | {
189
- readonly type: "reasoning-end";
190
- readonly id: string;
191
- readonly providerMetadata?: {
192
- readonly [x: string]: {
193
- readonly [x: string]: unknown;
194
- };
195
- };
196
- } | {
197
- readonly type: "tool-input-start";
198
- readonly id: string;
199
- readonly name: string;
200
- readonly providerMetadata?: {
201
- readonly [x: string]: {
202
- readonly [x: string]: unknown;
203
- };
204
- };
205
- } | {
206
- readonly type: "tool-input-delta";
207
- readonly id: string;
208
- readonly name: string;
209
- readonly text: string;
210
- } | {
211
- readonly type: "tool-input-end";
212
- readonly id: string;
213
- readonly name: string;
214
- readonly providerMetadata?: {
215
- readonly [x: string]: {
216
- readonly [x: string]: unknown;
217
- };
218
- };
219
- } | {
220
- readonly type: "tool-call";
221
- readonly id: string;
222
- readonly name: string;
223
- readonly input: unknown;
224
- readonly providerExecuted?: boolean;
225
- readonly providerMetadata?: {
226
- readonly [x: string]: {
227
- readonly [x: string]: unknown;
228
- };
229
- };
230
- } | {
231
- readonly type: "tool-result";
232
- readonly id: string;
233
- readonly name: string;
234
- readonly output?: {
235
- readonly structured: unknown;
236
- readonly content: readonly ({
237
- readonly type: "text";
238
- readonly text: string;
239
- } | {
240
- readonly type: "file";
241
- readonly uri: string;
242
- readonly mime: string;
243
- readonly name?: string;
244
- })[];
245
- };
246
- readonly providerExecuted?: boolean;
247
- readonly providerMetadata?: {
248
- readonly [x: string]: {
249
- readonly [x: string]: unknown;
250
- };
251
- };
252
- result?: any;
253
- } | {
254
- readonly type: "tool-error";
255
- readonly id: string;
256
- readonly name: string;
257
- readonly message: string;
258
- readonly error?: unknown;
259
- readonly providerMetadata?: {
260
- readonly [x: string]: {
261
- readonly [x: string]: unknown;
262
- };
263
- };
264
- } | {
265
- readonly type: "step-finish";
266
- readonly index: number;
267
- readonly reason: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
268
- readonly usage?: import("..").Usage;
269
- readonly providerMetadata?: {
270
- readonly [x: string]: {
271
- readonly [x: string]: unknown;
272
- };
273
- };
274
- } | {
275
- readonly type: "finish";
276
- readonly reason: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
277
- readonly usage?: import("..").Usage;
278
- readonly providerMetadata?: {
279
- readonly [x: string]: {
280
- readonly [x: string]: unknown;
281
- };
282
- };
283
- } | {
284
- readonly type: "provider-error";
285
- readonly message: string;
286
- readonly classification?: "context-overflow";
287
- readonly retryable?: boolean;
288
- readonly providerMetadata?: {
289
- readonly [x: string]: {
290
- readonly [x: string]: unknown;
291
- };
292
- };
293
- }, LLMError, Service>;
294
- export declare const layer: Layer.Layer<Service, never, RequestExecutor.Service>;
295
- export declare const Route: {
296
- readonly make: typeof make;
297
- };
298
- export declare const LLMClient: {
299
- readonly Service: typeof Service;
300
- readonly layer: Layer.Layer<Service, never, RequestExecutor.Service>;
301
- readonly prepare: <Body = unknown>(request: LLMRequest) => Effect.Effect<PreparedRequestOf<Body>, LLMError>;
302
- readonly stream: typeof stream;
303
- readonly generate: typeof generate;
304
- };
305
- export {};
306
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/route/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAE,MAAM,EA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KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAC1C,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;AAsEjD,eAAO,MAAM,OAAO,GAAI,IAAI,GAAG,OAAO,EAAE,SAAS,UAAU,KACjC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA;AAE1E,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAM7E;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAIlF;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAK9C,CAAA;AAEH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAStE,CAAA;AAED,eAAO,MAAM,KAAK;;CAAoB,CAAA;AAEtC,eAAO,MAAM,SAAS;;;uBArCE,IAAI,qBAAqB,UAAU,KACjC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;;;CA0ChE,CAAA"}
@@ -1,13 +0,0 @@
1
- import { Context, Effect, Layer } from "effect";
2
- import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http";
3
- import { LLMError } from "../schema";
4
- export interface Interface {
5
- readonly execute: (request: HttpClientRequest.HttpClientRequest) => Effect.Effect<HttpClientResponse.HttpClientResponse, LLMError>;
6
- }
7
- declare const Service_base: Context.ServiceClass<Service, "@zyraxon/LLM/RequestExecutor", Interface>;
8
- export declare class Service extends Service_base {
9
- }
10
- export declare const layer: Layer.Layer<Service, never, HttpClient.HttpClient>;
11
- export declare const fetchLayer: Layer.Layer<Service, never, never>;
12
- export * as RequestExecutor from "./executor";
13
- //# sourceMappingURL=executor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/route/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAE,MAAM,EAAE,KAAK,EAAU,MAAM,QAAQ,CAAA;AAC9D,OAAO,EAGL,UAAU,EAEV,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAQL,QAAQ,EAMT,MAAM,WAAW,CAAA;AAGlB,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,CAChB,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,KACzC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAA;CACpE;;AAED,qBAAa,OAAQ,SAAQ,YAAqE;CAAG;AA6UrG,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAepE,CAAA;AAED,eAAO,MAAM,UAAU,oCAAmD,CAAA;AAE1E,OAAO,KAAK,eAAe,MAAM,YAAY,CAAA"}
@@ -1,17 +0,0 @@
1
- export { Route, LLMClient } from "./client";
2
- export type { Route as RouteShape, RouteModelInput, RouteRoutedModelInput, RouteDefaults, RouteDefaultsInput, AnyRoute, Interface as LLMClientShape, Service as LLMClientService, } from "./client";
3
- export * from "./executor";
4
- export { Auth } from "./auth";
5
- export { AuthOptions } from "./auth-options";
6
- export { Endpoint } from "./endpoint";
7
- export { Framing } from "./framing";
8
- export { Protocol } from "./protocol";
9
- export { HttpTransport, WebSocketExecutor, WebSocketTransport } from "./transport";
10
- export * as Transport from "./transport";
11
- export type { Auth as AuthShape, AuthInput, Credential, CredentialError } from "./auth";
12
- export type { ApiKeyMode, AuthOverride, ProviderAuthOption } from "./auth-options";
13
- export type { Endpoint as EndpointFn, EndpointInput } from "./endpoint";
14
- export type { Framing as FramingDef } from "./framing";
15
- export type { Protocol as ProtocolDef } from "./protocol";
16
- export type { Transport as TransportDef, TransportRuntime } from "./transport";
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/route/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC3C,YAAY,EACV,KAAK,IAAI,UAAU,EACnB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,SAAS,IAAI,cAAc,EAC3B,OAAO,IAAI,gBAAgB,GAC5B,MAAM,UAAU,CAAA;AACjB,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,YAAY,EAAE,IAAI,IAAI,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACvF,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAClF,YAAY,EAAE,QAAQ,IAAI,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AACvE,YAAY,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,WAAW,CAAA;AACtD,YAAY,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,YAAY,CAAA;AACzD,YAAY,EAAE,SAAS,IAAI,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}