langchain 1.1.5 → 1.1.6-dev-1765431816670
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/agents/ReactAgent.d.cts +0 -2
- package/dist/agents/ReactAgent.d.cts.map +1 -0
- package/dist/agents/ReactAgent.d.ts +0 -2
- package/dist/agents/ReactAgent.d.ts.map +1 -0
- package/dist/agents/constants.d.cts.map +1 -0
- package/dist/agents/constants.d.ts.map +1 -0
- package/dist/agents/errors.d.cts.map +1 -0
- package/dist/agents/errors.d.ts.map +1 -0
- package/dist/agents/index.d.cts +0 -11
- package/dist/agents/index.d.cts.map +1 -0
- package/dist/agents/index.d.ts +0 -11
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/middleware/contextEditing.d.cts.map +1 -0
- package/dist/agents/middleware/contextEditing.d.ts.map +1 -0
- package/dist/agents/middleware/dynamicSystemPrompt.d.cts.map +1 -0
- package/dist/agents/middleware/dynamicSystemPrompt.d.ts.map +1 -0
- package/dist/agents/middleware/hitl.d.cts.map +1 -0
- package/dist/agents/middleware/hitl.d.ts.map +1 -0
- package/dist/agents/middleware/llmToolSelector.d.cts.map +1 -0
- package/dist/agents/middleware/llmToolSelector.d.ts.map +1 -0
- package/dist/agents/middleware/modelCallLimit.d.cts.map +1 -0
- package/dist/agents/middleware/modelCallLimit.d.ts.map +1 -0
- package/dist/agents/middleware/modelFallback.d.cts.map +1 -0
- package/dist/agents/middleware/modelFallback.d.ts.map +1 -0
- package/dist/agents/middleware/modelRetry.d.cts.map +1 -0
- package/dist/agents/middleware/modelRetry.d.ts.map +1 -0
- package/dist/agents/middleware/pii.d.cts.map +1 -0
- package/dist/agents/middleware/pii.d.ts.map +1 -0
- package/dist/agents/middleware/piiRedaction.d.cts.map +1 -0
- package/dist/agents/middleware/piiRedaction.d.ts.map +1 -0
- package/dist/agents/middleware/provider/anthropic/promptCaching.d.cts.map +1 -0
- package/dist/agents/middleware/provider/anthropic/promptCaching.d.ts.map +1 -0
- package/dist/agents/middleware/provider/openai/moderation.d.cts.map +1 -0
- package/dist/agents/middleware/provider/openai/moderation.d.ts.map +1 -0
- package/dist/agents/middleware/summarization.d.cts.map +1 -0
- package/dist/agents/middleware/summarization.d.ts.map +1 -0
- package/dist/agents/middleware/todoListMiddleware.d.cts.map +1 -0
- package/dist/agents/middleware/todoListMiddleware.d.ts.map +1 -0
- package/dist/agents/middleware/toolCallLimit.d.cts.map +1 -0
- package/dist/agents/middleware/toolCallLimit.d.ts.map +1 -0
- package/dist/agents/middleware/toolEmulator.d.cts.map +1 -0
- package/dist/agents/middleware/toolEmulator.d.ts.map +1 -0
- package/dist/agents/middleware/toolRetry.d.cts.map +1 -0
- package/dist/agents/middleware/toolRetry.d.ts.map +1 -0
- package/dist/agents/middleware/types.d.cts.map +1 -0
- package/dist/agents/middleware/types.d.ts.map +1 -0
- package/dist/agents/middleware/utils.d.cts.map +1 -0
- package/dist/agents/middleware/utils.d.ts.map +1 -0
- package/dist/agents/middleware.d.cts.map +1 -0
- package/dist/agents/middleware.d.ts.map +1 -0
- package/dist/agents/nodes/types.d.cts.map +1 -0
- package/dist/agents/nodes/types.d.ts.map +1 -0
- package/dist/agents/responses.d.cts +0 -2
- package/dist/agents/responses.d.cts.map +1 -0
- package/dist/agents/responses.d.ts +0 -2
- package/dist/agents/responses.d.ts.map +1 -0
- package/dist/agents/runtime.d.cts +1 -3
- package/dist/agents/runtime.d.cts.map +1 -0
- package/dist/agents/runtime.d.ts +1 -3
- package/dist/agents/runtime.d.ts.map +1 -0
- package/dist/agents/tests/utils.d.cts +0 -4
- package/dist/agents/tests/utils.d.cts.map +1 -0
- package/dist/agents/tests/utils.d.ts +0 -4
- package/dist/agents/tests/utils.d.ts.map +1 -0
- package/dist/agents/types.d.cts.map +1 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/chat_models/universal.d.cts +4 -21
- package/dist/chat_models/universal.d.cts.map +1 -0
- package/dist/chat_models/universal.d.ts +4 -21
- package/dist/chat_models/universal.d.ts.map +1 -0
- package/dist/hub/base.d.cts.map +1 -0
- package/dist/hub/base.d.ts.map +1 -0
- package/dist/hub/index.d.cts +0 -1
- package/dist/hub/index.d.cts.map +1 -0
- package/dist/hub/index.d.ts +0 -1
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/node.cjs +22 -2
- package/dist/hub/node.cjs.map +1 -1
- package/dist/hub/node.d.cts.map +1 -0
- package/dist/hub/node.d.ts.map +1 -0
- package/dist/hub/node.js +22 -2
- package/dist/hub/node.js.map +1 -1
- package/dist/load/import_type.d.cts +0 -1
- package/dist/load/import_type.d.cts.map +1 -0
- package/dist/load/import_type.d.ts +0 -1
- package/dist/load/import_type.d.ts.map +1 -0
- package/dist/load/index.d.cts +1 -7
- package/dist/load/index.d.cts.map +1 -0
- package/dist/load/index.d.ts +1 -7
- package/dist/load/index.d.ts.map +1 -0
- package/dist/storage/encoder_backed.d.cts +0 -1
- package/dist/storage/encoder_backed.d.cts.map +1 -0
- package/dist/storage/encoder_backed.d.ts +0 -1
- package/dist/storage/encoder_backed.d.ts.map +1 -0
- package/dist/storage/file_system.d.cts.map +1 -0
- package/dist/storage/file_system.d.ts.map +1 -0
- package/package.json +8 -7
- package/chat_models/universal.cjs +0 -1
- package/chat_models/universal.d.cts +0 -1
- package/chat_models/universal.d.ts +0 -1
- package/chat_models/universal.js +0 -1
- package/hub/node.cjs +0 -1
- package/hub/node.d.cts +0 -1
- package/hub/node.d.ts +0 -1
- package/hub/node.js +0 -1
- package/hub.cjs +0 -1
- package/hub.d.cts +0 -1
- package/hub.d.ts +0 -1
- package/hub.js +0 -1
- package/load/serializable.cjs +0 -1
- package/load/serializable.d.cts +0 -1
- package/load/serializable.d.ts +0 -1
- package/load/serializable.js +0 -1
- package/load.cjs +0 -1
- package/load.d.cts +0 -1
- package/load.d.ts +0 -1
- package/load.js +0 -1
- package/storage/encoder_backed.cjs +0 -1
- package/storage/encoder_backed.d.cts +0 -1
- package/storage/encoder_backed.d.ts +0 -1
- package/storage/encoder_backed.js +0 -1
- package/storage/file_system.cjs +0 -1
- package/storage/file_system.d.cts +0 -1
- package/storage/file_system.d.ts +0 -1
- package/storage/file_system.js +0 -1
- package/storage/in_memory.cjs +0 -1
- package/storage/in_memory.d.cts +0 -1
- package/storage/in_memory.d.ts +0 -1
- package/storage/in_memory.js +0 -1
package/dist/hub/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","names":["ownerRepoCommit: string","options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n }"],"sources":["../../src/hub/node.ts"],"sourcesContent":["import { Runnable } from \"@langchain/core/runnables\";\nimport {\n basePull,\n generateModelImportMap,\n generateOptionalImportMap,\n bindOutputSchema,\n} from \"./base.js\";\nimport { load } from \"../load/index.js\";\nimport { getChatModelByClassName } from \"../chat_models/universal.js\";\n\n
|
|
1
|
+
{"version":3,"file":"node.js","names":["a: string[]","b: string[]","ownerRepoCommit: string","options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n }"],"sources":["../../src/hub/node.ts"],"sourcesContent":["import { Runnable } from \"@langchain/core/runnables\";\nimport {\n basePull,\n generateModelImportMap,\n generateOptionalImportMap,\n bindOutputSchema,\n} from \"./base.js\";\nimport { load } from \"../load/index.js\";\nimport { getChatModelByClassName } from \"../chat_models/universal.js\";\n\nexport { basePush as push } from \"./base.js\";\n\nfunction _idEquals(a: string[], b: string[]): boolean {\n if (!Array.isArray(a) || !Array.isArray(b)) {\n return false;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n\nfunction isRunnableBinding(a: string[]): boolean {\n const wellKnownIds = [\n [\"langchain_core\", \"runnables\", \"RunnableBinding\"],\n [\"langchain\", \"schema\", \"runnable\", \"RunnableBinding\"],\n ];\n return wellKnownIds.some((id) => _idEquals(a, id));\n}\n\n/**\n * Pull a prompt from the hub.\n * @param ownerRepoCommit The name of the repo containing the prompt, as well as an optional commit hash separated by a slash.\n * @param options.apiKey LangSmith API key to use when pulling the prompt\n * @param options.apiUrl LangSmith API URL to use when pulling the prompt\n * @param options.includeModel Whether to also instantiate and attach a model instance to the prompt,\n * if the prompt has associated model metadata. If set to true, invoking the resulting pulled prompt will\n * also invoke the instantiated model. You must have the appropriate LangChain integration package installed.\n * @returns\n */\nexport async function pull<T extends Runnable>(\n ownerRepoCommit: string,\n options?: {\n apiKey?: string;\n apiUrl?: string;\n includeModel?: boolean;\n }\n) {\n const promptObject = await basePull(ownerRepoCommit, options);\n let modelClass;\n if (options?.includeModel) {\n const chatModelObject = isRunnableBinding(\n promptObject.manifest.kwargs?.last?.id\n )\n ? promptObject.manifest.kwargs?.last?.kwargs?.bound\n : promptObject.manifest.kwargs?.last;\n\n if (Array.isArray(chatModelObject?.id)) {\n const modelName = chatModelObject?.id.at(-1);\n\n if (modelName) {\n modelClass = await getChatModelByClassName(modelName);\n if (!modelClass) {\n console.warn(\n `Received unknown model name from prompt hub: \"${modelName}\"`\n );\n }\n }\n }\n }\n const loadedPrompt = await load<T>(\n JSON.stringify(promptObject.manifest),\n undefined,\n generateOptionalImportMap(modelClass),\n generateModelImportMap(modelClass)\n );\n return bindOutputSchema(loadedPrompt);\n}\n"],"mappings":";;;;;AAYA,SAAS,UAAUA,GAAaC,GAAsB;AACpD,KAAI,CAAC,MAAM,QAAQ,EAAE,IAAI,CAAC,MAAM,QAAQ,EAAE,CACxC,QAAO;AAET,KAAI,EAAE,WAAW,EAAE,OACjB,QAAO;AAET,MAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,IAC5B,KAAI,EAAE,OAAO,EAAE,GACb,QAAO;AAGX,QAAO;AACR;AAED,SAAS,kBAAkBD,GAAsB;CAC/C,MAAM,eAAe,CACnB;EAAC;EAAkB;EAAa;CAAkB,GAClD;EAAC;EAAa;EAAU;EAAY;CAAkB,CACvD;AACD,QAAO,aAAa,KAAK,CAAC,OAAO,UAAU,GAAG,GAAG,CAAC;AACnD;;;;;;;;;;;AAYD,eAAsB,KACpBE,iBACAC,SAKA;CACA,MAAM,eAAe,MAAM,SAAS,iBAAiB,QAAQ;CAC7D,IAAI;AACJ,KAAI,SAAS,cAAc;EACzB,MAAM,kBAAkB,kBACtB,aAAa,SAAS,QAAQ,MAAM,GACrC,GACG,aAAa,SAAS,QAAQ,MAAM,QAAQ,QAC5C,aAAa,SAAS,QAAQ;AAElC,MAAI,MAAM,QAAQ,iBAAiB,GAAG,EAAE;GACtC,MAAM,YAAY,iBAAiB,GAAG,GAAG,GAAG;AAE5C,OAAI,WAAW;IACb,aAAa,MAAM,wBAAwB,UAAU;AACrD,QAAI,CAAC,YACH,QAAQ,KACN,CAAC,8CAA8C,EAAE,UAAU,CAAC,CAAC,CAC9D;GAEJ;EACF;CACF;CACD,MAAM,eAAe,MAAM,KACzB,KAAK,UAAU,aAAa,SAAS,EACrC,QACA,0BAA0B,WAAW,EACrC,uBAAuB,WAAW,CACnC;AACD,QAAO,iBAAiB,aAAa;AACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import_type.d.cts","names":["OptionalImportMap","SecretMap"],"sources":["../../src/load/import_type.d.ts"],"sourcesContent":["export interface OptionalImportMap {\n}\nexport interface SecretMap {\n OPENAI_API_KEY?: string;\n}\n//# sourceMappingURL=import_type.d.ts.map"],"mappings":";UAAiBA,iBAAAA,EAAjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import_type.d.ts","names":["OptionalImportMap","SecretMap"],"sources":["../../src/load/import_type.d.ts"],"sourcesContent":["export interface OptionalImportMap {\n}\nexport interface SecretMap {\n OPENAI_API_KEY?: string;\n}\n//# sourceMappingURL=import_type.d.ts.map"],"mappings":";UAAiBA,iBAAAA,EAAjB"}
|
package/dist/load/index.d.cts
CHANGED
|
@@ -11,13 +11,7 @@ import { OptionalImportMap } from "./import_type.cjs";
|
|
|
11
11
|
* @param optionalImportsMap
|
|
12
12
|
* @returns A loaded instance of a LangChain module.
|
|
13
13
|
*/
|
|
14
|
-
declare function load<T>(text: string,
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
secretsMap?: Record<string, any>,
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
-
optionalImportsMap?: OptionalImportMap & Record<string, any>,
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
additionalImportsMap?: Record<string, any>): Promise<T>;
|
|
14
|
+
declare function load<T>(text: string, secretsMap?: Record<string, any>, optionalImportsMap?: OptionalImportMap & Record<string, any>, additionalImportsMap?: Record<string, any>): Promise<T>;
|
|
21
15
|
//#endregion
|
|
22
16
|
export { load };
|
|
23
17
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["OptionalImportMap","load","T","Record","Promise"],"sources":["../../src/load/index.d.ts"],"sourcesContent":["import { OptionalImportMap } from \"./import_type.js\";\n/**\n * Load a LangChain module from a serialized text representation.\n * NOTE: This functionality is currently in beta.\n * Loaded classes may change independently of semver.\n * @param text Serialized text representation of the module.\n * @param secretsMap\n * @param optionalImportsMap\n * @returns A loaded instance of a LangChain module.\n */\nexport declare function load<T>(text: string, secretsMap?: Record<string, any>, optionalImportsMap?: OptionalImportMap & Record<string, any>, additionalImportsMap?: Record<string, any>): Promise<T>;\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;AAUA;;;;;;;AAAkM,iBAA1KC,IAA0K,CAAA,CAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAvIE,MAAuI,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,kBAAA,CAAA,EAA7FH,iBAA6F,GAAzEG,MAAyE,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,oBAAA,CAAA,EAA7BA,MAA6B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,EAAPC,OAAO,CAACF,CAAD,CAAA"}
|
package/dist/load/index.d.ts
CHANGED
|
@@ -11,13 +11,7 @@ import { OptionalImportMap } from "./import_type.js";
|
|
|
11
11
|
* @param optionalImportsMap
|
|
12
12
|
* @returns A loaded instance of a LangChain module.
|
|
13
13
|
*/
|
|
14
|
-
declare function load<T>(text: string,
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
secretsMap?: Record<string, any>,
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
-
optionalImportsMap?: OptionalImportMap & Record<string, any>,
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
additionalImportsMap?: Record<string, any>): Promise<T>;
|
|
14
|
+
declare function load<T>(text: string, secretsMap?: Record<string, any>, optionalImportsMap?: OptionalImportMap & Record<string, any>, additionalImportsMap?: Record<string, any>): Promise<T>;
|
|
21
15
|
//#endregion
|
|
22
16
|
export { load };
|
|
23
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["OptionalImportMap","load","T","Record","Promise"],"sources":["../../src/load/index.d.ts"],"sourcesContent":["import { OptionalImportMap } from \"./import_type.js\";\n/**\n * Load a LangChain module from a serialized text representation.\n * NOTE: This functionality is currently in beta.\n * Loaded classes may change independently of semver.\n * @param text Serialized text representation of the module.\n * @param secretsMap\n * @param optionalImportsMap\n * @returns A loaded instance of a LangChain module.\n */\nexport declare function load<T>(text: string, secretsMap?: Record<string, any>, optionalImportsMap?: OptionalImportMap & Record<string, any>, additionalImportsMap?: Record<string, any>): Promise<T>;\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;AAUA;;;;;;;AAAkM,iBAA1KC,IAA0K,CAAA,CAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAvIE,MAAuI,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,kBAAA,CAAA,EAA7FH,iBAA6F,GAAzEG,MAAyE,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,oBAAA,CAAA,EAA7BA,MAA6B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,EAAPC,OAAO,CAACF,CAAD,CAAA"}
|
|
@@ -8,7 +8,6 @@ import { Document } from "@langchain/core/documents";
|
|
|
8
8
|
* allowing for the encoding and decoding of keys and values. It extends
|
|
9
9
|
* the BaseStore class.
|
|
10
10
|
*/
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
11
|
declare class EncoderBackedStore<K, V, SerializedType = any> extends BaseStore<K, V> {
|
|
13
12
|
lc_namespace: string[];
|
|
14
13
|
store: BaseStore<string, SerializedType>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoder_backed.d.cts","names":["Document","BaseStore","EncoderBackedStore","K","V","SerializedType","Promise","AsyncGenerator","createDocumentStoreFromByteStore","Uint8Array","Record","ArrayBufferLike"],"sources":["../../src/storage/encoder_backed.d.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStore } from \"@langchain/core/stores\";\n/**\n * Class that provides a layer of abstraction over the base storage,\n * allowing for the encoding and decoding of keys and values. It extends\n * the BaseStore class.\n */\nexport declare class EncoderBackedStore<K, V, SerializedType = any> extends BaseStore<K, V> {\n lc_namespace: string[];\n store: BaseStore<string, SerializedType>;\n keyEncoder: (key: K) => string;\n valueSerializer: (value: V) => SerializedType;\n valueDeserializer: (value: SerializedType) => V;\n constructor(fields: {\n store: BaseStore<string, SerializedType>;\n keyEncoder: (key: K) => string;\n valueSerializer: (value: V) => SerializedType;\n valueDeserializer: (value: SerializedType) => V;\n });\n /**\n * Method to get multiple keys at once. It works with the encoded keys and\n * serialized values.\n * @param keys Array of keys to get\n * @returns Promise that resolves with an array of values or undefined for each key\n */\n mget(keys: K[]): Promise<(V | undefined)[]>;\n /**\n * Method to set multiple keys at once. It works with the encoded keys and\n * serialized values.\n * @param keyValuePairs Array of key-value pairs to set\n * @returns Promise that resolves when the operation is complete\n */\n mset(keyValuePairs: [K, V][]): Promise<void>;\n /**\n * Method to delete multiple keys at once. It works with the encoded keys.\n * @param keys Array of keys to delete\n * @returns Promise that resolves when the operation is complete\n */\n mdelete(keys: K[]): Promise<void>;\n /**\n * Method to yield keys. It works with the encoded keys.\n * @param prefix Optional prefix to filter keys\n * @returns AsyncGenerator that yields keys\n */\n yieldKeys(prefix?: string | undefined): AsyncGenerator<string | K>;\n}\nexport declare function createDocumentStoreFromByteStore(store: BaseStore<string, Uint8Array>): EncoderBackedStore<string, Document<Record<string, any>>, Uint8Array<ArrayBufferLike>>;\n//# sourceMappingURL=encoder_backed.d.ts.map"],"mappings":";;;;;;;AAOA;;;AAE6BK,cAFRH,kBAEQG,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,iBAAAA,GAAAA,CAAAA,SAF+CJ,SAE/CI,CAFyDF,CAEzDE,EAF4DD,CAE5DC,CAAAA,CAAAA;EAAlBJ,YAAAA,EAAAA,MAAAA,EAAAA;EACWE,KAAAA,EADXF,SACWE,CAAAA,MAAAA,EADOE,cACPF,CAAAA;EACOC,UAAAA,EAAAA,CAAAA,GAAAA,EADPD,CACOC,EAAAA,GAAAA,MAAAA;EAAMC,eAAAA,EAAAA,CAAAA,KAAAA,EAAND,CAAMC,EAAAA,GAAAA,cAAAA;EACJA,iBAAAA,EAAAA,CAAAA,KAAAA,EAAAA,cAAAA,EAAAA,GAAmBD,CAAnBC;EAAmBD,WAAAA,CAAAA,MAAAA,EAAAA;IAEjBC,KAAAA,EAAlBJ,SAAkBI,CAAAA,MAAAA,EAAAA,cAAAA,CAAAA;IAAlBJ,UAAAA,EAAAA,CAAAA,GAAAA,EACWE,CADXF,EAAAA,GAAAA,MAAAA;IACWE,eAAAA,EAAAA,CAAAA,KAAAA,EACOC,CADPD,EAAAA,GACaE,cADbF;IACOC,iBAAAA,EAAAA,CAAAA,KAAAA,EACEC,cADFD,EAAAA,GACqBA,CADrBA;EAAMC,CAAAA;EACJA;;;;;;EAePD,IAAAA,CAAAA,IAAAA,EAPbD,CAOaC,EAAAA,CAAAA,EAPPE,OAOOF,CAAAA,CAPEA,CAOFA,GAAAA,SAAAA,CAAAA,EAAAA,CAAAA;EAAOE;;;;;;EAzBkD,IAAA,CAAA,aAAA,EAAA,CAyB5DH,CAzB4D,EAyBzDC,CAzByD,CAAA,EAAA,CAAA,EAyBlDE,OAzBkD,CAAA,IAAA,CAAA;EAuC7DE;;;;;EAA6IG,OAAAA,CAAAA,IAAAA,EARnJR,CAQmJQ,EAAAA,CAAAA,EAR7IL,OAQ6IK,CAAAA,IAAAA,CAAAA;EAAXF;;AAAxC;;;0CAFtEF,wBAAwBJ;;iBAE5CK,gCAAAA,QAAwCP,kBAAkBQ,cAAcP,2BAA2BF,SAASU,sBAAsBD,WAAWE"}
|
|
@@ -8,7 +8,6 @@ import { Document } from "@langchain/core/documents";
|
|
|
8
8
|
* allowing for the encoding and decoding of keys and values. It extends
|
|
9
9
|
* the BaseStore class.
|
|
10
10
|
*/
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
11
|
declare class EncoderBackedStore<K, V, SerializedType = any> extends BaseStore<K, V> {
|
|
13
12
|
lc_namespace: string[];
|
|
14
13
|
store: BaseStore<string, SerializedType>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoder_backed.d.ts","names":["Document","BaseStore","EncoderBackedStore","K","V","SerializedType","Promise","AsyncGenerator","createDocumentStoreFromByteStore","Uint8Array","Record","ArrayBufferLike"],"sources":["../../src/storage/encoder_backed.d.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseStore } from \"@langchain/core/stores\";\n/**\n * Class that provides a layer of abstraction over the base storage,\n * allowing for the encoding and decoding of keys and values. It extends\n * the BaseStore class.\n */\nexport declare class EncoderBackedStore<K, V, SerializedType = any> extends BaseStore<K, V> {\n lc_namespace: string[];\n store: BaseStore<string, SerializedType>;\n keyEncoder: (key: K) => string;\n valueSerializer: (value: V) => SerializedType;\n valueDeserializer: (value: SerializedType) => V;\n constructor(fields: {\n store: BaseStore<string, SerializedType>;\n keyEncoder: (key: K) => string;\n valueSerializer: (value: V) => SerializedType;\n valueDeserializer: (value: SerializedType) => V;\n });\n /**\n * Method to get multiple keys at once. It works with the encoded keys and\n * serialized values.\n * @param keys Array of keys to get\n * @returns Promise that resolves with an array of values or undefined for each key\n */\n mget(keys: K[]): Promise<(V | undefined)[]>;\n /**\n * Method to set multiple keys at once. It works with the encoded keys and\n * serialized values.\n * @param keyValuePairs Array of key-value pairs to set\n * @returns Promise that resolves when the operation is complete\n */\n mset(keyValuePairs: [K, V][]): Promise<void>;\n /**\n * Method to delete multiple keys at once. It works with the encoded keys.\n * @param keys Array of keys to delete\n * @returns Promise that resolves when the operation is complete\n */\n mdelete(keys: K[]): Promise<void>;\n /**\n * Method to yield keys. It works with the encoded keys.\n * @param prefix Optional prefix to filter keys\n * @returns AsyncGenerator that yields keys\n */\n yieldKeys(prefix?: string | undefined): AsyncGenerator<string | K>;\n}\nexport declare function createDocumentStoreFromByteStore(store: BaseStore<string, Uint8Array>): EncoderBackedStore<string, Document<Record<string, any>>, Uint8Array<ArrayBufferLike>>;\n//# sourceMappingURL=encoder_backed.d.ts.map"],"mappings":";;;;;;;AAOA;;;AAE6BK,cAFRH,kBAEQG,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,iBAAAA,GAAAA,CAAAA,SAF+CJ,SAE/CI,CAFyDF,CAEzDE,EAF4DD,CAE5DC,CAAAA,CAAAA;EAAlBJ,YAAAA,EAAAA,MAAAA,EAAAA;EACWE,KAAAA,EADXF,SACWE,CAAAA,MAAAA,EADOE,cACPF,CAAAA;EACOC,UAAAA,EAAAA,CAAAA,GAAAA,EADPD,CACOC,EAAAA,GAAAA,MAAAA;EAAMC,eAAAA,EAAAA,CAAAA,KAAAA,EAAND,CAAMC,EAAAA,GAAAA,cAAAA;EACJA,iBAAAA,EAAAA,CAAAA,KAAAA,EAAAA,cAAAA,EAAAA,GAAmBD,CAAnBC;EAAmBD,WAAAA,CAAAA,MAAAA,EAAAA;IAEjBC,KAAAA,EAAlBJ,SAAkBI,CAAAA,MAAAA,EAAAA,cAAAA,CAAAA;IAAlBJ,UAAAA,EAAAA,CAAAA,GAAAA,EACWE,CADXF,EAAAA,GAAAA,MAAAA;IACWE,eAAAA,EAAAA,CAAAA,KAAAA,EACOC,CADPD,EAAAA,GACaE,cADbF;IACOC,iBAAAA,EAAAA,CAAAA,KAAAA,EACEC,cADFD,EAAAA,GACqBA,CADrBA;EAAMC,CAAAA;EACJA;;;;;;EAePD,IAAAA,CAAAA,IAAAA,EAPbD,CAOaC,EAAAA,CAAAA,EAPPE,OAOOF,CAAAA,CAPEA,CAOFA,GAAAA,SAAAA,CAAAA,EAAAA,CAAAA;EAAOE;;;;;;EAzBkD,IAAA,CAAA,aAAA,EAAA,CAyB5DH,CAzB4D,EAyBzDC,CAzByD,CAAA,EAAA,CAAA,EAyBlDE,OAzBkD,CAAA,IAAA,CAAA;EAuC7DE;;;;;EAA6IG,OAAAA,CAAAA,IAAAA,EARnJR,CAQmJQ,EAAAA,CAAAA,EAR7IL,OAQ6IK,CAAAA,IAAAA,CAAAA;EAAXF;;AAAxC;;;0CAFtEF,wBAAwBJ;;iBAE5CK,gCAAAA,QAAwCP,kBAAkBQ,cAAcP,2BAA2BF,SAASU,sBAAsBD,WAAWE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file_system.d.cts","names":["BaseStore","LocalFileStore","Uint8Array","ArrayBufferLike","Promise","AsyncGenerator"],"sources":["../../src/storage/file_system.d.ts"],"sourcesContent":["import { BaseStore } from \"@langchain/core/stores\";\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport declare class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace: string[];\n rootPath: string;\n constructor(fields: {\n rootPath: string;\n });\n private getParsedFile;\n private setFileContent;\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath;\n /**\n * Retrieves the values associated with the given keys from the store.\n * @param keys Keys to retrieve values for.\n * @returns Array of values associated with the given keys.\n */\n mget(keys: string[]): Promise<(Uint8Array<ArrayBufferLike> | undefined)[]>;\n /**\n * Sets the values for the given keys in the store.\n * @param keyValuePairs Array of key-value pairs to set in the store.\n * @returns Promise that resolves when all key-value pairs have been set.\n */\n mset(keyValuePairs: [string, Uint8Array][]): Promise<void>;\n /**\n * Deletes the given keys and their associated values from the store.\n * @param keys Keys to delete from the store.\n * @returns Promise that resolves when all keys have been deleted.\n */\n mdelete(keys: string[]): Promise<void>;\n /**\n * Asynchronous generator that yields keys from the store. If a prefix is\n * provided, it only yields keys that start with the prefix.\n * @param prefix Optional prefix to filter keys.\n * @returns AsyncGenerator that yields keys from the store.\n */\n yieldKeys(prefix?: string): AsyncGenerator<string>;\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static fromPath(rootPath: string): Promise<LocalFileStore>;\n}\n//# sourceMappingURL=file_system.d.ts.map"],"mappings":";;;;;;AA+BA;;;;;;;;;;;;AAAqD;;;;;;;;;;;;;;;;cAAhCC,cAAAA,SAAuBD,kBAAkBE;;;;;;;;;;;;;;;;;;wBAkBpCE,SAASF,WAAWC;;;;;;+BAMbD,gBAAgBE;;;;;;2BAMpBA;;;;;;;8BAOGC;;;;;;;qCAOOD,QAAQH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file_system.d.ts","names":["BaseStore","LocalFileStore","Uint8Array","ArrayBufferLike","Promise","AsyncGenerator"],"sources":["../../src/storage/file_system.d.ts"],"sourcesContent":["import { BaseStore } from \"@langchain/core/stores\";\n/**\n * File system implementation of the BaseStore using a dictionary. Used for\n * storing key-value pairs in the file system.\n * @example\n * ```typescript\n * const store = await LocalFileStore.fromPath(\"./messages\");\n * await store.mset(\n * Array.from({ length: 5 }).map((_, index) => [\n * `message:id:${index}`,\n * new TextEncoder().encode(\n * JSON.stringify(\n * index % 2 === 0\n * ? new AIMessage(\"ai stuff...\")\n * : new HumanMessage(\"human stuff...\"),\n * ),\n * ),\n * ]),\n * );\n * const retrievedMessages = await store.mget([\"message:id:0\", \"message:id:1\"]);\n * console.log(retrievedMessages.map((v) => new TextDecoder().decode(v)));\n * for await (const key of store.yieldKeys(\"message:id:\")) {\n * await store.mdelete([key]);\n * }\n * ```\n *\n * @security **Security Notice** This file store\n * can alter any text file in the provided directory and any subfolders.\n * Make sure that the path you specify when initializing the store is free\n * of other files.\n */\nexport declare class LocalFileStore extends BaseStore<string, Uint8Array> {\n lc_namespace: string[];\n rootPath: string;\n constructor(fields: {\n rootPath: string;\n });\n private getParsedFile;\n private setFileContent;\n /**\n * Returns the full path of the file where the value of the given key is stored.\n * @param key the key to get the full path for\n */\n private getFullPath;\n /**\n * Retrieves the values associated with the given keys from the store.\n * @param keys Keys to retrieve values for.\n * @returns Array of values associated with the given keys.\n */\n mget(keys: string[]): Promise<(Uint8Array<ArrayBufferLike> | undefined)[]>;\n /**\n * Sets the values for the given keys in the store.\n * @param keyValuePairs Array of key-value pairs to set in the store.\n * @returns Promise that resolves when all key-value pairs have been set.\n */\n mset(keyValuePairs: [string, Uint8Array][]): Promise<void>;\n /**\n * Deletes the given keys and their associated values from the store.\n * @param keys Keys to delete from the store.\n * @returns Promise that resolves when all keys have been deleted.\n */\n mdelete(keys: string[]): Promise<void>;\n /**\n * Asynchronous generator that yields keys from the store. If a prefix is\n * provided, it only yields keys that start with the prefix.\n * @param prefix Optional prefix to filter keys.\n * @returns AsyncGenerator that yields keys from the store.\n */\n yieldKeys(prefix?: string): AsyncGenerator<string>;\n /**\n * Static method for initializing the class.\n * Preforms a check to see if the directory exists, and if not, creates it.\n * @param path Path to the directory.\n * @returns Promise that resolves to an instance of the class.\n */\n static fromPath(rootPath: string): Promise<LocalFileStore>;\n}\n//# sourceMappingURL=file_system.d.ts.map"],"mappings":";;;;;;AA+BA;;;;;;;;;;;;AAAqD;;;;;;;;;;;;;;;;cAAhCC,cAAAA,SAAuBD,kBAAkBE;;;;;;;;;;;;;;;;;;wBAkBpCE,SAASF,WAAWC;;;;;;+BAMbD,gBAAgBE;;;;;;2BAMpBA;;;;;;;8BAOGC;;;;;;;qCAOOD,QAAQH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langchain",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6-dev-1765431816670",
|
|
4
4
|
"description": "Typescript bindings for langchain",
|
|
5
5
|
"author": "LangChain",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,14 +53,15 @@
|
|
|
53
53
|
"typescript": "~5.8.3",
|
|
54
54
|
"vitest": "^3.2.4",
|
|
55
55
|
"yaml": "^2.8.1",
|
|
56
|
-
"@langchain/anthropic": "1.
|
|
56
|
+
"@langchain/anthropic": "1.3.0-dev-1765431816670",
|
|
57
57
|
"@langchain/cohere": "1.0.1",
|
|
58
|
-
"@langchain/core": "1.1.
|
|
58
|
+
"@langchain/core": "1.1.5-dev-1765431816670",
|
|
59
59
|
"@langchain/eslint": "0.1.1",
|
|
60
|
-
"@langchain/openai": "1.
|
|
60
|
+
"@langchain/openai": "1.2.0-dev-1765431816670",
|
|
61
|
+
"@langchain/tsconfig": "0.0.1"
|
|
61
62
|
},
|
|
62
63
|
"peerDependencies": {
|
|
63
|
-
"@langchain/core": "1.1.
|
|
64
|
+
"@langchain/core": "1.1.5-dev-1765431816670"
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
66
67
|
"@langchain/langgraph": "^1.0.0",
|
|
@@ -204,7 +205,7 @@
|
|
|
204
205
|
"test:watch": "vitest --watch",
|
|
205
206
|
"test:bench": "vitest --mode bench --run",
|
|
206
207
|
"test:integration": "vitest --mode int",
|
|
207
|
-
"format": "prettier --
|
|
208
|
-
"format:check": "prettier --
|
|
208
|
+
"format": "prettier --write \"src\"",
|
|
209
|
+
"format:check": "prettier --check \"src\""
|
|
209
210
|
}
|
|
210
211
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../dist/chat_models/universal.cjs");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/chat_models/universal.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/chat_models/universal.js";
|
package/chat_models/universal.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/chat_models/universal.js";
|
package/hub/node.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../dist/hub/node.cjs");
|
package/hub/node.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/hub/node.js";
|
package/hub/node.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/hub/node.js";
|
package/hub/node.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/hub/node.js";
|
package/hub.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./dist/hub/index.cjs");
|
package/hub.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/hub/index.js";
|
package/hub.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/hub/index.js";
|
package/hub.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/hub/index.js";
|
package/load/serializable.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../dist/load/serializable.cjs");
|
package/load/serializable.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/load/serializable.js";
|
package/load/serializable.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/load/serializable.js";
|
package/load/serializable.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/load/serializable.js";
|
package/load.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./dist/load/index.cjs");
|
package/load.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/load/index.js";
|
package/load.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/load/index.js";
|
package/load.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/load/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../dist/storage/encoder_backed.cjs");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/encoder_backed.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/encoder_backed.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/encoder_backed.js";
|
package/storage/file_system.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../dist/storage/file_system.cjs");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/file_system.js";
|
package/storage/file_system.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/file_system.js";
|
package/storage/file_system.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/file_system.js";
|
package/storage/in_memory.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../dist/storage/in_memory.cjs");
|
package/storage/in_memory.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/in_memory.js";
|
package/storage/in_memory.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/in_memory.js";
|
package/storage/in_memory.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../dist/storage/in_memory.js";
|