@moldea.ai/adapter-langchain 1.0.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.
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/cover.png +0 -0
- package/dist/adapter/index.d.ts +3 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/contracts/index.d.ts +192 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/diagnostics/index.d.ts +23 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2023 -0
- package/dist/inspection/common.d.ts +21 -0
- package/dist/inspection/common.d.ts.map +1 -0
- package/dist/inspection/index.d.ts +2 -0
- package/dist/inspection/index.d.ts.map +1 -0
- package/dist/inspection/inspection.d.ts +18 -0
- package/dist/inspection/inspection.d.ts.map +1 -0
- package/dist/inspection/instruction-inspection.d.ts +6 -0
- package/dist/inspection/instruction-inspection.d.ts.map +1 -0
- package/dist/inspection/middleware-inspection.d.ts +5 -0
- package/dist/inspection/middleware-inspection.d.ts.map +1 -0
- package/dist/inspection/package-inspection.d.ts +7 -0
- package/dist/inspection/package-inspection.d.ts.map +1 -0
- package/dist/inspection/resolution.d.ts +7 -0
- package/dist/inspection/resolution.d.ts.map +1 -0
- package/dist/inspection/schema-inspection.d.ts +6 -0
- package/dist/inspection/schema-inspection.d.ts.map +1 -0
- package/dist/inspection/session.d.ts +5 -0
- package/dist/inspection/session.d.ts.map +1 -0
- package/dist/inspection/tool-inspection.d.ts +6 -0
- package/dist/inspection/tool-inspection.d.ts.map +1 -0
- package/dist/package-discovery/index.d.ts +5 -0
- package/dist/package-discovery/index.d.ts.map +1 -0
- package/dist/source-analysis/agent-definitions.d.ts +4 -0
- package/dist/source-analysis/agent-definitions.d.ts.map +1 -0
- package/dist/source-analysis/bindings.d.ts +20 -0
- package/dist/source-analysis/bindings.d.ts.map +1 -0
- package/dist/source-analysis/function-tools.d.ts +7 -0
- package/dist/source-analysis/function-tools.d.ts.map +1 -0
- package/dist/source-analysis/index.d.ts +7 -0
- package/dist/source-analysis/index.d.ts.map +1 -0
- package/dist/source-analysis/source-analysis.d.ts +5 -0
- package/dist/source-analysis/source-analysis.d.ts.map +1 -0
- package/dist/source-analysis/static-strings.d.ts +5 -0
- package/dist/source-analysis/static-strings.d.ts.map +1 -0
- package/dist/source-analysis/structured-output.d.ts +12 -0
- package/dist/source-analysis/structured-output.d.ts.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jesus Graterol
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# `@moldea.ai/adapter-langchain`
|
|
2
|
+
|
|
3
|
+
Deterministic runtime evidence and diagnostics for LangChain `1.5.x` TypeScript `createAgent` applications declared by `moldea` agents.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @moldea.ai/adapter-langchain @moldea.ai/core @moldea.ai/repository
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The package exports one immutable adapter:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { langChainAdapter } from '@moldea.ai/adapter-langchain';
|
|
15
|
+
import { createCore } from '@moldea.ai/core';
|
|
16
|
+
|
|
17
|
+
const core = createCore({ adapters: [langChainAdapter] });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Verified target
|
|
21
|
+
|
|
22
|
+
Version `1.0.0` supports Repository Format `1`, `langchain >=1.5.9 <1.6.0`, and companion `@langchain/core >=1.2.8 <1.3.0`. The experimental target recognizes:
|
|
23
|
+
|
|
24
|
+
- directly exported package-root `createAgent(...)` definitions
|
|
25
|
+
- direct instruction-loader calls and `SystemMessage` construction
|
|
26
|
+
- direct, `toolStrategy(...)`, and `providerStrategy(...)` output-schema relationships
|
|
27
|
+
- normal two-argument `tool(implementation, fields)` declarations
|
|
28
|
+
- closed inline, module-local, and relative-imported tool arrays
|
|
29
|
+
|
|
30
|
+
The adapter reads source through the Repository contract. It does not execute LangChain, import inspected modules, inspect lockfiles or installed packages, contact LangSmith or model providers, or write to the repository.
|
|
31
|
+
|
|
32
|
+
## Public API
|
|
33
|
+
|
|
34
|
+
The package exports only `langChainAdapter`. It has no default export, configuration factory, LangChain or LangGraph facade, parser export, or public diagnostic registry.
|
|
35
|
+
|
|
36
|
+
## Documentation
|
|
37
|
+
|
|
38
|
+
- [Package overview](docs/index.md)
|
|
39
|
+
- [Verified target](docs/verified-target.md)
|
|
40
|
+
- [Evidence and diagnostics](docs/evidence-and-diagnostics.md)
|
|
41
|
+
- [Limitations](docs/limitations.md)
|
package/cover.png
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAS/D,eAAO,MAAM,gBAAgB,EAAE,eAI7B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const LANGCHAIN_ADAPTER_ID = "langchain";
|
|
2
|
+
export declare const LANGCHAIN_PACKAGE_NAME = "langchain";
|
|
3
|
+
export declare const LANGCHAIN_CORE_PACKAGE_NAME = "@langchain/core";
|
|
4
|
+
export declare const LANGCHAIN_SUPPORTED_PACKAGE_RANGE = ">=1.5.9 <1.6.0";
|
|
5
|
+
export declare const LANGCHAIN_CORE_SUPPORTED_PACKAGE_RANGE = ">=1.2.8 <1.3.0";
|
|
6
|
+
export declare const LANGCHAIN_TARGET_ID = "typescript-create-agent-1-5";
|
|
7
|
+
export declare const LANGCHAIN_SUPPORTED_REPOSITORY_FORMAT_VERSIONS: readonly [1];
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAChD,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAClD,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,iCAAiC,mBAAmB,CAAC;AAClE,eAAO,MAAM,sCAAsC,mBAAmB,CAAC;AACvE,eAAO,MAAM,mBAAmB,gCAAgC,CAAC;AACjE,eAAO,MAAM,8CAA8C,cAA8B,CAAC"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type ts from 'typescript';
|
|
2
|
+
import type { IIndexedAgent, ISourceRange } from '@moldea.ai/core';
|
|
3
|
+
import type { IAdapterDiagnostic } from '@moldea.ai/core/adapter';
|
|
4
|
+
import type { IRepositoryEntry, IRepositoryPath } from '@moldea.ai/repository';
|
|
5
|
+
export type ILangChainAdapterDiagnosticCode = 'LANGCHAIN_PACKAGE_MANIFEST_INVALID' | 'LANGCHAIN_VERSION_UNSUPPORTED' | 'LANGCHAIN_SOURCE_TEXT_INVALID' | 'LANGCHAIN_SOURCE_SYNTAX_INVALID' | 'LANGCHAIN_RUNTIME_AGENT_SYMBOL_NOT_FOUND' | 'LANGCHAIN_INSTRUCTION_LOADER_SYMBOL_NOT_FOUND' | 'LANGCHAIN_AGENT_OUTPUT_SCHEMA_SYMBOL_NOT_FOUND' | 'LANGCHAIN_TOOL_IMPLEMENTATION_SYMBOL_NOT_FOUND' | 'LANGCHAIN_TOOL_REGISTRATION_SYMBOL_NOT_FOUND' | 'LANGCHAIN_TOOL_INPUT_SCHEMA_SYMBOL_NOT_FOUND' | 'LANGCHAIN_INSTRUCTION_LOADER_NOT_WIRED' | 'LANGCHAIN_AGENT_OUTPUT_SCHEMA_NOT_WIRED' | 'LANGCHAIN_TOOL_IMPLEMENTATION_NOT_WIRED' | 'LANGCHAIN_TOOL_REGISTRATION_NOT_WIRED' | 'LANGCHAIN_TOOL_NAME_MISMATCH' | 'LANGCHAIN_TOOL_INPUT_SCHEMA_NOT_WIRED';
|
|
6
|
+
export type ILangChainDiagnosticInput = Omit<IAdapterDiagnostic, 'message' | 'source'> & {
|
|
7
|
+
readonly code: ILangChainAdapterDiagnosticCode;
|
|
8
|
+
};
|
|
9
|
+
export type ILangChainTargetPackageClassification = 'absent' | 'ambiguous' | 'incomplete' | 'supported' | 'unsupported';
|
|
10
|
+
export type ILangChainPackageCompatibility = 'absent' | 'ambiguous' | 'supported' | 'unsupported';
|
|
11
|
+
export interface ILangChainPackageDeclaration {
|
|
12
|
+
readonly declaredRange: string;
|
|
13
|
+
readonly dependencyKind: 'dependencies' | 'optionalDependencies' | 'peerDependencies' | 'devDependencies';
|
|
14
|
+
}
|
|
15
|
+
export interface ILangChainDiscoveredPackage {
|
|
16
|
+
readonly compatibility: ILangChainPackageCompatibility;
|
|
17
|
+
readonly declarations: readonly ILangChainPackageDeclaration[];
|
|
18
|
+
readonly packageName: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ILangChainPackageObservation {
|
|
21
|
+
readonly packages: readonly ILangChainDiscoveredPackage[];
|
|
22
|
+
readonly path: IRepositoryPath;
|
|
23
|
+
readonly targetClassification: ILangChainTargetPackageClassification;
|
|
24
|
+
}
|
|
25
|
+
export type ILangChainPackageDiscoveryResult = {
|
|
26
|
+
readonly kind: 'absent';
|
|
27
|
+
} | {
|
|
28
|
+
readonly kind: 'invalid';
|
|
29
|
+
readonly path: IRepositoryPath;
|
|
30
|
+
} | {
|
|
31
|
+
readonly kind: 'observed';
|
|
32
|
+
readonly observation: ILangChainPackageObservation;
|
|
33
|
+
};
|
|
34
|
+
export interface ILangChainImports {
|
|
35
|
+
readonly createAgentNames: ReadonlySet<string>;
|
|
36
|
+
readonly providerStrategyNames: ReadonlySet<string>;
|
|
37
|
+
readonly systemMessageNames: ReadonlySet<string>;
|
|
38
|
+
readonly toolNames: ReadonlyMap<string, string>;
|
|
39
|
+
readonly toolStrategyNames: ReadonlySet<string>;
|
|
40
|
+
}
|
|
41
|
+
export interface ILangChainSourceAnalysis {
|
|
42
|
+
readonly clientNames: ReadonlySet<string>;
|
|
43
|
+
readonly constructorNames: ReadonlySet<string>;
|
|
44
|
+
readonly exports: ReadonlyMap<string, {
|
|
45
|
+
readonly declaration: ts.Node;
|
|
46
|
+
readonly kind: 'absent';
|
|
47
|
+
} | {
|
|
48
|
+
readonly declaration: ts.Node;
|
|
49
|
+
readonly kind: 'present-supported';
|
|
50
|
+
} | {
|
|
51
|
+
readonly declaration: ts.Node;
|
|
52
|
+
readonly kind: 'present-unsupported';
|
|
53
|
+
}>;
|
|
54
|
+
readonly identifierUses: ReadonlyMap<string, readonly ts.Identifier[]>;
|
|
55
|
+
readonly imports: ILangChainImports;
|
|
56
|
+
readonly localBindingNames: ReadonlyMap<ts.Node, ReadonlySet<string>>;
|
|
57
|
+
readonly moduleArrays: ReadonlyMap<string, {
|
|
58
|
+
readonly declaration: ts.VariableDeclaration;
|
|
59
|
+
readonly expression: ts.ArrayLiteralExpression;
|
|
60
|
+
}>;
|
|
61
|
+
readonly moduleConstDeclarations: ReadonlyMap<string, ts.VariableDeclaration>;
|
|
62
|
+
readonly namedImports: ReadonlyMap<string, {
|
|
63
|
+
readonly importedName: string;
|
|
64
|
+
readonly moduleSpecifier: string;
|
|
65
|
+
}>;
|
|
66
|
+
readonly path: IRepositoryPath;
|
|
67
|
+
readonly safeModuleArrayNames: ReadonlySet<string>;
|
|
68
|
+
readonly sourceFile: ts.SourceFile;
|
|
69
|
+
readonly text: {
|
|
70
|
+
readonly locator: {
|
|
71
|
+
locateRange(startOffset: number, endOffset: number): ISourceRange;
|
|
72
|
+
};
|
|
73
|
+
readonly valid: true;
|
|
74
|
+
readonly value: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export type ILangChainSourceAnalysisResult = {
|
|
78
|
+
readonly kind: 'invalid-syntax';
|
|
79
|
+
readonly range: ISourceRange | null;
|
|
80
|
+
} | {
|
|
81
|
+
readonly kind: 'invalid-text';
|
|
82
|
+
} | {
|
|
83
|
+
readonly analysis: ILangChainSourceAnalysis;
|
|
84
|
+
readonly kind: 'valid';
|
|
85
|
+
};
|
|
86
|
+
export type ILangChainSourceFailure = {
|
|
87
|
+
readonly kind: 'invalid-syntax';
|
|
88
|
+
readonly path: IRepositoryPath;
|
|
89
|
+
readonly range: ISourceRange | null;
|
|
90
|
+
} | {
|
|
91
|
+
readonly kind: 'invalid-text';
|
|
92
|
+
readonly path: IRepositoryPath;
|
|
93
|
+
};
|
|
94
|
+
export type ILangChainStaticStringResult = {
|
|
95
|
+
readonly expression: ts.Expression;
|
|
96
|
+
readonly kind: 'supported';
|
|
97
|
+
readonly value: string;
|
|
98
|
+
} | {
|
|
99
|
+
readonly kind: 'unsupported';
|
|
100
|
+
};
|
|
101
|
+
export type ILangChainRelationship = {
|
|
102
|
+
readonly expression: ts.Expression | null;
|
|
103
|
+
readonly kind: 'absent';
|
|
104
|
+
} | {
|
|
105
|
+
readonly kind: 'unresolved';
|
|
106
|
+
} | {
|
|
107
|
+
readonly expression: ts.Expression;
|
|
108
|
+
readonly kind: 'present';
|
|
109
|
+
};
|
|
110
|
+
export interface ILangChainRequiredRelationship {
|
|
111
|
+
readonly expression: ts.Expression;
|
|
112
|
+
readonly kind: 'present' | 'unresolved';
|
|
113
|
+
}
|
|
114
|
+
export type ILangChainMiddlewareState = 'active' | 'inactive' | 'unresolved';
|
|
115
|
+
export interface ILangChainAgentDefinition {
|
|
116
|
+
readonly configuredTools: ILangChainRelationship;
|
|
117
|
+
readonly declaration: ts.VariableDeclaration;
|
|
118
|
+
readonly middleware: ILangChainRelationship;
|
|
119
|
+
readonly name: ILangChainRelationship;
|
|
120
|
+
readonly object: ts.ObjectLiteralExpression;
|
|
121
|
+
readonly responseFormat: ILangChainRelationship;
|
|
122
|
+
readonly systemPrompt: ILangChainRelationship;
|
|
123
|
+
readonly tools: ILangChainRelationship;
|
|
124
|
+
}
|
|
125
|
+
export type ILangChainAgentDefinitionResult = {
|
|
126
|
+
readonly kind: 'absent';
|
|
127
|
+
} | {
|
|
128
|
+
readonly declaration: ts.Node;
|
|
129
|
+
readonly kind: 'present-unsupported';
|
|
130
|
+
} | {
|
|
131
|
+
readonly definition: ILangChainAgentDefinition;
|
|
132
|
+
readonly kind: 'present-supported';
|
|
133
|
+
};
|
|
134
|
+
export interface ILangChainFunctionToolShape {
|
|
135
|
+
readonly description: ILangChainRelationship;
|
|
136
|
+
readonly fields: ts.ObjectLiteralExpression;
|
|
137
|
+
readonly helperSource: string;
|
|
138
|
+
readonly implementation: ILangChainRequiredRelationship;
|
|
139
|
+
readonly name: ILangChainRequiredRelationship;
|
|
140
|
+
readonly schema: ILangChainRelationship;
|
|
141
|
+
}
|
|
142
|
+
export interface ILangChainFunctionTool extends ILangChainFunctionToolShape {
|
|
143
|
+
readonly declaration: ts.VariableDeclaration;
|
|
144
|
+
}
|
|
145
|
+
export type ILangChainFunctionToolResult = {
|
|
146
|
+
readonly kind: 'absent';
|
|
147
|
+
} | {
|
|
148
|
+
readonly declaration: ts.Node;
|
|
149
|
+
readonly kind: 'present-unsupported';
|
|
150
|
+
} | {
|
|
151
|
+
readonly kind: 'present-supported';
|
|
152
|
+
readonly tool: ILangChainFunctionTool;
|
|
153
|
+
};
|
|
154
|
+
export interface ILangChainInspectionSession {
|
|
155
|
+
readonly signal?: AbortSignal;
|
|
156
|
+
analyzeSource(path: IRepositoryPath): Promise<ILangChainSourceAnalysisResult>;
|
|
157
|
+
discoverPackage(path: IRepositoryPath): Promise<ILangChainPackageDiscoveryResult>;
|
|
158
|
+
getEntry(path: IRepositoryPath): Promise<IRepositoryEntry | null>;
|
|
159
|
+
}
|
|
160
|
+
export interface ILangChainInspectedAgent {
|
|
161
|
+
readonly agent: IIndexedAgent;
|
|
162
|
+
readonly analysis: ILangChainSourceAnalysis;
|
|
163
|
+
readonly definition: ILangChainAgentDefinition;
|
|
164
|
+
readonly middlewareState: ILangChainMiddlewareState;
|
|
165
|
+
}
|
|
166
|
+
export interface ILangChainResolvedArray {
|
|
167
|
+
readonly analysis: ILangChainSourceAnalysis;
|
|
168
|
+
readonly expression: ts.ArrayLiteralExpression;
|
|
169
|
+
readonly reference: {
|
|
170
|
+
readonly path: IRepositoryPath;
|
|
171
|
+
readonly symbol: string;
|
|
172
|
+
} | null;
|
|
173
|
+
}
|
|
174
|
+
export type ILangChainResolvedArrayResult = {
|
|
175
|
+
readonly failure: ILangChainSourceFailure;
|
|
176
|
+
readonly kind: 'source-failure';
|
|
177
|
+
} | {
|
|
178
|
+
readonly kind: 'resolved';
|
|
179
|
+
readonly value: ILangChainResolvedArray;
|
|
180
|
+
} | {
|
|
181
|
+
readonly kind: 'unresolved';
|
|
182
|
+
};
|
|
183
|
+
export type ILangChainBindingResult = {
|
|
184
|
+
readonly expression: ts.Expression | null;
|
|
185
|
+
readonly kind: 'different';
|
|
186
|
+
} | {
|
|
187
|
+
readonly kind: 'unresolved';
|
|
188
|
+
} | {
|
|
189
|
+
readonly expression: ts.Expression;
|
|
190
|
+
readonly kind: 'wired';
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE/E,MAAM,MAAM,+BAA+B,GACvC,oCAAoC,GACpC,+BAA+B,GAC/B,+BAA+B,GAC/B,iCAAiC,GACjC,0CAA0C,GAC1C,+CAA+C,GAC/C,gDAAgD,GAChD,gDAAgD,GAChD,8CAA8C,GAC9C,8CAA8C,GAC9C,wCAAwC,GACxC,yCAAyC,GACzC,yCAAyC,GACzC,uCAAuC,GACvC,8BAA8B,GAC9B,uCAAuC,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,QAAQ,CAAC,GAAG;IACvF,QAAQ,CAAC,IAAI,EAAE,+BAA+B,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAC/C,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,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S: Readonly<{
|
|
4
|
+
readonly LANGCHAIN_PACKAGE_MANIFEST_INVALID: "The owning package manifest is invalid for LangChain dependency detection.";
|
|
5
|
+
readonly LANGCHAIN_VERSION_UNSUPPORTED: "The observed LangChain package ranges are disjoint from the supported target.";
|
|
6
|
+
readonly LANGCHAIN_SOURCE_TEXT_INVALID: "The referenced LangChain source file is not valid normalized text.";
|
|
7
|
+
readonly LANGCHAIN_SOURCE_SYNTAX_INVALID: "The referenced LangChain source file contains invalid TypeScript syntax.";
|
|
8
|
+
readonly LANGCHAIN_RUNTIME_AGENT_SYMBOL_NOT_FOUND: "The declared runtime-agent symbol was not found.";
|
|
9
|
+
readonly LANGCHAIN_INSTRUCTION_LOADER_SYMBOL_NOT_FOUND: "The declared instruction-loader symbol was not found.";
|
|
10
|
+
readonly LANGCHAIN_AGENT_OUTPUT_SCHEMA_SYMBOL_NOT_FOUND: "The declared agent output-schema symbol was not found.";
|
|
11
|
+
readonly LANGCHAIN_TOOL_IMPLEMENTATION_SYMBOL_NOT_FOUND: "The declared tool-implementation symbol was not found.";
|
|
12
|
+
readonly LANGCHAIN_TOOL_REGISTRATION_SYMBOL_NOT_FOUND: "The declared tool-registration symbol was not found.";
|
|
13
|
+
readonly LANGCHAIN_TOOL_INPUT_SCHEMA_SYMBOL_NOT_FOUND: "The declared tool input-schema symbol was not found.";
|
|
14
|
+
readonly LANGCHAIN_INSTRUCTION_LOADER_NOT_WIRED: "The declared instruction loader is not wired to the detected LangChain agent.";
|
|
15
|
+
readonly LANGCHAIN_AGENT_OUTPUT_SCHEMA_NOT_WIRED: "The declared agent output schema is not wired to the detected LangChain structured-output configuration.";
|
|
16
|
+
readonly LANGCHAIN_TOOL_IMPLEMENTATION_NOT_WIRED: "The declared tool implementation is not wired to the detected LangChain function tool.";
|
|
17
|
+
readonly LANGCHAIN_TOOL_REGISTRATION_NOT_WIRED: "The declared tool registration is not available to the detected LangChain agent.";
|
|
18
|
+
readonly LANGCHAIN_TOOL_NAME_MISMATCH: "The declared tool name does not match the detected LangChain tool name.";
|
|
19
|
+
readonly LANGCHAIN_TOOL_INPUT_SCHEMA_NOT_WIRED: "The declared tool input schema is not wired to the detected LangChain function tool.";
|
|
20
|
+
}>;
|
|
21
|
+
/** Creates one frozen, safely namespaced LangChain adapter diagnostic. */
|
|
22
|
+
export declare const createLangChainDiagnostic: (input: ILangChainDiagnosticInput) => IAdapterDiagnostic;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/diagnostics/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,KAAK,EAEV,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;EAgCqC,CAAC;AAEhF,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,GAAI,OAAO,yBAAyB,KAAG,kBAOzE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|