@struct-ai/sdk 0.2.0 → 0.3.0

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 (194) hide show
  1. package/README.md +46 -3
  2. package/dist/commonjs/core.d.ts +2 -0
  3. package/dist/commonjs/core.js +53 -7
  4. package/dist/esm/core.d.ts +2 -0
  5. package/dist/esm/core.js +54 -8
  6. package/package.json +21 -21
  7. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/content-capture.d.ts +0 -10
  8. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/context.d.ts +0 -30
  9. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/core.d.ts +0 -120
  10. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/events.d.ts +0 -12
  11. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/index.d.ts +0 -6
  12. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/anthropic-content.d.ts +0 -24
  13. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/anthropic.d.ts +0 -34
  14. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/index.d.ts +0 -5
  15. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/langchain-callback.d.ts +0 -134
  16. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/langchain-content.d.ts +0 -35
  17. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/langchain.d.ts +0 -11
  18. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/package.json +0 -3
  19. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/semconv.d.ts +0 -54
  20. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/truncation.d.ts +0 -10
  21. package/dist/node_modules/@struct-ai/sdk/dist/esm/content-capture.d.ts +0 -10
  22. package/dist/node_modules/@struct-ai/sdk/dist/esm/context.d.ts +0 -30
  23. package/dist/node_modules/@struct-ai/sdk/dist/esm/core.d.ts +0 -120
  24. package/dist/node_modules/@struct-ai/sdk/dist/esm/events.d.ts +0 -12
  25. package/dist/node_modules/@struct-ai/sdk/dist/esm/index.d.ts +0 -6
  26. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/anthropic-content.d.ts +0 -24
  27. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/anthropic.d.ts +0 -34
  28. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/index.d.ts +0 -5
  29. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/langchain-callback.d.ts +0 -134
  30. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/langchain-content.d.ts +0 -35
  31. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/langchain.d.ts +0 -11
  32. package/dist/node_modules/@struct-ai/sdk/dist/esm/package.json +0 -3
  33. package/dist/node_modules/@struct-ai/sdk/dist/esm/semconv.d.ts +0 -54
  34. package/dist/node_modules/@struct-ai/sdk/dist/esm/truncation.d.ts +0 -10
  35. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/dist/commonjs/package.json +0 -3
  36. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/dist/esm/package.json +0 -3
  37. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/package.json +0 -103
  38. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/package.json +0 -103
  39. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/package.json +0 -118
  40. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/package.json +0 -916
  41. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/package.json +0 -188
  42. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/openai/package.json +0 -105
  43. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api/package.json +0 -96
  44. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api-logs/package.json +0 -91
  45. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/core/package.json +0 -96
  46. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json +0 -108
  47. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json +0 -105
  48. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/resources/package.json +0 -100
  49. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-logs/package.json +0 -109
  50. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-base/package.json +0 -100
  51. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-node/package.json +0 -76
  52. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/package.json +0 -140
  53. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/nock/package.json +0 -89
  54. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/tshy/package.json +0 -81
  55. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/tsx/package.json +0 -68
  56. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/typescript/package.json +0 -120
  57. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/vitest/package.json +0 -239
  58. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/zod/package.json +0 -135
  59. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/package.json +0 -103
  60. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/core.d.ts +0 -244
  61. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/error.d.ts +0 -54
  62. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/index.d.ts +0 -188
  63. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/package.json +0 -103
  64. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/pagination.d.ts +0 -26
  65. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -6
  66. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -41
  67. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -75
  68. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
  69. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/experimental.d.ts +0 -1
  70. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/index.d.ts +0 -1
  71. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/package.json +0 -118
  72. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/agents.d.ts +0 -1
  73. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/caches.d.ts +0 -1
  74. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/chat_history.d.ts +0 -1
  75. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/context.d.ts +0 -1
  76. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/documents.d.ts +0 -1
  77. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/embeddings.d.ts +0 -1
  78. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/example_selectors.d.ts +0 -1
  79. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/index.d.ts +0 -1
  80. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/indexing.d.ts +0 -1
  81. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/load.d.ts +0 -1
  82. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/memory.d.ts +0 -1
  83. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/messages.d.ts +0 -1
  84. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/output_parsers.d.ts +0 -1
  85. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/outputs.d.ts +0 -1
  86. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/package.json +0 -916
  87. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/prompt_values.d.ts +0 -1
  88. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/prompts.d.ts +0 -1
  89. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/retrievers.d.ts +0 -1
  90. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/runnables.d.ts +0 -1
  91. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/singletons.d.ts +0 -1
  92. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/stores.d.ts +0 -1
  93. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/structured_query.d.ts +0 -1
  94. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/tools.d.ts +0 -1
  95. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/vectorstores.d.ts +0 -1
  96. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/index.d.ts +0 -1
  97. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/package.json +0 -188
  98. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/prebuilt.d.ts +0 -1
  99. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/pregel.d.ts +0 -1
  100. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/remote.d.ts +0 -1
  101. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/web.d.ts +0 -1
  102. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/zod.d.ts +0 -1
  103. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/openai/index.d.ts +0 -1
  104. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/openai/package.json +0 -105
  105. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api/package.json +0 -96
  106. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api-logs/package.json +0 -91
  107. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/core/package.json +0 -96
  108. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json +0 -108
  109. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json +0 -105
  110. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/resources/package.json +0 -100
  111. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-logs/package.json +0 -109
  112. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-base/package.json +0 -100
  113. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-node/package.json +0 -76
  114. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/assert.d.ts +0 -1062
  115. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/async_hooks.d.ts +0 -605
  116. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/buffer.buffer.d.ts +0 -471
  117. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/buffer.d.ts +0 -1936
  118. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/child_process.d.ts +0 -1475
  119. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/cluster.d.ts +0 -577
  120. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/console.d.ts +0 -452
  121. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/constants.d.ts +0 -21
  122. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/crypto.d.ts +0 -4590
  123. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/dgram.d.ts +0 -597
  124. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  125. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/dns.d.ts +0 -871
  126. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/domain.d.ts +0 -170
  127. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/events.d.ts +0 -977
  128. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/fs.d.ts +0 -4375
  129. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/globals.d.ts +0 -172
  130. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  131. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/http.d.ts +0 -2049
  132. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/http2.d.ts +0 -2631
  133. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/https.d.ts +0 -578
  134. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/index.d.ts +0 -93
  135. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  136. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/module.d.ts +0 -539
  137. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/net.d.ts +0 -1031
  138. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/os.d.ts +0 -506
  139. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/package.json +0 -140
  140. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/path.d.ts +0 -200
  141. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/perf_hooks.d.ts +0 -961
  142. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/process.d.ts +0 -1961
  143. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/punycode.d.ts +0 -117
  144. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/querystring.d.ts +0 -152
  145. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/readline.d.ts +0 -589
  146. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/repl.d.ts +0 -430
  147. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/sea.d.ts +0 -153
  148. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/stream.d.ts +0 -1698
  149. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/string_decoder.d.ts +0 -67
  150. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/test.d.ts +0 -1787
  151. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/timers.d.ts +0 -286
  152. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/tls.d.ts +0 -1259
  153. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/trace_events.d.ts +0 -197
  154. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/tty.d.ts +0 -208
  155. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/url.d.ts +0 -964
  156. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/util.d.ts +0 -2331
  157. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/v8.d.ts +0 -809
  158. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/vm.d.ts +0 -1001
  159. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/wasi.d.ts +0 -181
  160. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/worker_threads.d.ts +0 -715
  161. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/zlib.d.ts +0 -598
  162. package/dist/node_modules/@struct-ai/sdk/node_modules/nock/package.json +0 -89
  163. package/dist/node_modules/@struct-ai/sdk/node_modules/tshy/package.json +0 -81
  164. package/dist/node_modules/@struct-ai/sdk/node_modules/tsx/package.json +0 -68
  165. package/dist/node_modules/@struct-ai/sdk/node_modules/typescript/package.json +0 -120
  166. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/config.d.ts +0 -3
  167. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/coverage.d.ts +0 -1
  168. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/environments.d.ts +0 -1
  169. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/globals.d.ts +0 -22
  170. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/import-meta.d.ts +0 -5
  171. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/importMeta.d.ts +0 -4
  172. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/jsdom.d.ts +0 -6
  173. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/mocker.d.ts +0 -1
  174. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/node.d.ts +0 -1
  175. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/optional-runtime-types.d.ts +0 -6
  176. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/optional-types.d.ts +0 -7
  177. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/package.json +0 -239
  178. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/reporters.d.ts +0 -1
  179. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/runners.d.ts +0 -1
  180. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/snapshot.d.ts +0 -1
  181. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/suite.d.ts +0 -1
  182. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/worker.d.ts +0 -1
  183. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/index.d.ts +0 -4
  184. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/locales/package.json +0 -7
  185. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/mini/package.json +0 -7
  186. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/package.json +0 -135
  187. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/v3/package.json +0 -7
  188. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/v4/classic/package.json +0 -7
  189. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/v4/core/package.json +0 -7
  190. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/v4/locales/package.json +0 -7
  191. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/v4/mini/package.json +0 -7
  192. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/v4/package.json +0 -7
  193. package/dist/node_modules/@struct-ai/sdk/node_modules/zod/v4-mini/package.json +0 -7
  194. package/dist/node_modules/@struct-ai/sdk/package.json +0 -103
@@ -1,75 +0,0 @@
1
- import { type RequestOptions } from "./core.js";
2
- import { FormData, type Blob, type FilePropertyBag, type FsReadStream } from "./_shims/index.js";
3
- import { MultipartBody } from "./_shims/MultipartBody.js";
4
- export { fileFromPath } from "./_shims/index.js";
5
- type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | Uint8Array | DataView;
6
- export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | Uint8Array | DataView;
7
- /**
8
- * Typically, this is a native "File" class.
9
- *
10
- * We provide the {@link toFile} utility to convert a variety of objects
11
- * into the File class.
12
- *
13
- * For convenience, you can also pass a fetch Response, or in Node,
14
- * the result of fs.createReadStream().
15
- */
16
- export type Uploadable = FileLike | ResponseLike | FsReadStream;
17
- /**
18
- * Intended to match web.Blob, node.Blob, node-fetch.Blob, etc.
19
- */
20
- export interface BlobLike {
21
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
22
- readonly size: number;
23
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
24
- readonly type: string;
25
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
26
- text(): Promise<string>;
27
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
28
- slice(start?: number, end?: number): BlobLike;
29
- }
30
- /**
31
- * Intended to match web.File, node.File, node-fetch.File, etc.
32
- */
33
- export interface FileLike extends BlobLike {
34
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
35
- readonly lastModified: number;
36
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
37
- readonly name: string;
38
- }
39
- /**
40
- * Intended to match web.Response, node.Response, node-fetch.Response, etc.
41
- */
42
- export interface ResponseLike {
43
- url: string;
44
- blob(): Promise<BlobLike>;
45
- }
46
- export declare const isResponseLike: (value: any) => value is ResponseLike;
47
- export declare const isFileLike: (value: any) => value is FileLike;
48
- /**
49
- * The BlobLike type omits arrayBuffer() because @types/node-fetch@^2.6.4 lacks it; but this check
50
- * adds the arrayBuffer() method type because it is available and used at runtime
51
- */
52
- export declare const isBlobLike: (value: any) => value is BlobLike & {
53
- arrayBuffer(): Promise<ArrayBuffer>;
54
- };
55
- export declare const isUploadable: (value: any) => value is Uploadable;
56
- export type ToFileInput = Uploadable | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
57
- /**
58
- * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
59
- * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
60
- * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
61
- * @param {Object=} options additional properties
62
- * @param {string=} options.type the MIME type of the content
63
- * @param {number=} options.lastModified the last modified timestamp
64
- * @returns a {@link File} with the given properties
65
- */
66
- export declare function toFile(value: ToFileInput | PromiseLike<ToFileInput>, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise<FileLike>;
67
- export declare const isMultipartBody: (body: any) => body is MultipartBody;
68
- /**
69
- * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
70
- * Otherwise returns the request as is.
71
- */
72
- export declare const maybeMultipartFormRequestOptions: <T = Record<string, unknown>>(opts: RequestOptions<T>) => Promise<RequestOptions<MultipartBody | T>>;
73
- export declare const multipartFormRequestOptions: <T = Record<string, unknown>>(opts: RequestOptions<T>) => Promise<RequestOptions<MultipartBody | T>>;
74
- export declare const createForm: <T = Record<string, unknown>>(body: T | undefined) => Promise<FormData>;
75
- //# sourceMappingURL=uploads.d.ts.map
@@ -1,2 +0,0 @@
1
- export declare const VERSION = "0.30.1";
2
- //# sourceMappingURL=version.d.ts.map
@@ -1 +0,0 @@
1
- export * from './dist/experimental/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/index.js'
@@ -1,118 +0,0 @@
1
- {
2
- "name": "@langchain/anthropic",
3
- "version": "0.3.34",
4
- "description": "Anthropic integrations for LangChain.js",
5
- "type": "module",
6
- "engines": {
7
- "node": ">=18"
8
- },
9
- "main": "./index.js",
10
- "types": "./index.d.ts",
11
- "repository": {
12
- "type": "git",
13
- "url": "git@github.com:langchain-ai/langchainjs.git"
14
- },
15
- "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic/",
16
- "scripts": {
17
- "build": "yarn turbo:command build:internal --filter=@langchain/anthropic",
18
- "build:internal": "yarn lc_build --create-entrypoints --pre --tree-shaking --gen-maps",
19
- "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
20
- "lint:dpdm": "dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
21
- "lint": "yarn lint:eslint && yarn lint:dpdm",
22
- "lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
23
- "clean": "rm -rf .turbo dist/",
24
- "prepack": "yarn build",
25
- "test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
26
- "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
27
- "test:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --config jest.config.cjs --testTimeout 100000",
28
- "test:int": "NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.int\\.test.ts --testTimeout 100000 --maxWorkers=50%",
29
- "test:standard:unit": "NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.standard\\.test.ts --testTimeout 100000 --maxWorkers=50%",
30
- "test:standard:int": "NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.standard\\.int\\.test.ts --testTimeout 100000 --maxWorkers=50%",
31
- "test:standard": "yarn test:standard:unit && yarn test:standard:int",
32
- "format": "prettier --config .prettierrc --write \"src\"",
33
- "format:check": "prettier --config .prettierrc --check \"src\""
34
- },
35
- "author": "LangChain",
36
- "license": "MIT",
37
- "dependencies": {
38
- "@anthropic-ai/sdk": "^0.65.0",
39
- "fast-xml-parser": "^4.4.1"
40
- },
41
- "peerDependencies": {
42
- "@langchain/core": ">=0.3.58 <0.4.0"
43
- },
44
- "devDependencies": {
45
- "@anthropic-ai/vertex-sdk": "^0.11.5",
46
- "@jest/globals": "^29.5.0",
47
- "@langchain/core": "workspace:*",
48
- "@langchain/scripts": ">=0.1.0 <0.2.0",
49
- "@langchain/standard-tests": "0.0.0",
50
- "@swc/core": "^1.3.90",
51
- "@swc/jest": "^0.2.29",
52
- "dpdm": "^3.14.0",
53
- "eslint": "^8.33.0",
54
- "eslint-config-airbnb-base": "^15.0.0",
55
- "eslint-config-prettier": "^8.6.0",
56
- "eslint-plugin-import": "^2.27.5",
57
- "eslint-plugin-jest": "^27.6.0",
58
- "eslint-plugin-no-instanceof": "^1.0.1",
59
- "eslint-plugin-prettier": "^4.2.1",
60
- "jest": "^29.5.0",
61
- "jest-environment-node": "^29.6.4",
62
- "prettier": "^2.8.3",
63
- "release-it": "^18.1.2",
64
- "rimraf": "^5.0.1",
65
- "ts-jest": "^29.1.0",
66
- "typescript": "~5.8.3",
67
- "zod": "^3.25.32"
68
- },
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
- "keywords": [
73
- "llm",
74
- "ai",
75
- "gpt3",
76
- "chain",
77
- "prompt",
78
- "prompt engineering",
79
- "chatgpt",
80
- "machine learning",
81
- "ml",
82
- "anthropic",
83
- "embeddings",
84
- "vectorstores"
85
- ],
86
- "exports": {
87
- ".": {
88
- "types": {
89
- "import": "./index.d.ts",
90
- "require": "./index.d.cts",
91
- "default": "./index.d.ts"
92
- },
93
- "import": "./index.js",
94
- "require": "./index.cjs"
95
- },
96
- "./experimental": {
97
- "types": {
98
- "import": "./experimental.d.ts",
99
- "require": "./experimental.d.cts",
100
- "default": "./experimental.d.ts"
101
- },
102
- "import": "./experimental.js",
103
- "require": "./experimental.cjs"
104
- },
105
- "./package.json": "./package.json"
106
- },
107
- "files": [
108
- "dist/",
109
- "index.cjs",
110
- "index.js",
111
- "index.d.ts",
112
- "index.d.cts",
113
- "experimental.cjs",
114
- "experimental.js",
115
- "experimental.d.ts",
116
- "experimental.d.cts"
117
- ]
118
- }
@@ -1 +0,0 @@
1
- export * from './dist/agents.js'
@@ -1 +0,0 @@
1
- export * from './dist/caches/base.js'
@@ -1 +0,0 @@
1
- export * from './dist/chat_history.js'
@@ -1 +0,0 @@
1
- export * from './dist/context.js'
@@ -1 +0,0 @@
1
- export * from './dist/documents/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/embeddings.js'
@@ -1 +0,0 @@
1
- export * from './dist/example_selectors/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/indexing/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/load/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/memory.js'
@@ -1 +0,0 @@
1
- export * from './dist/messages/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/output_parsers/index.js'
@@ -1 +0,0 @@
1
- export * from './dist/outputs.js'