@moldea.ai/adapter-langchain 3.0.1 → 3.0.2

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 CHANGED
@@ -19,7 +19,7 @@ const core = createCore({ adapters: [langChainAdapter] });
19
19
 
20
20
  ## Verified target
21
21
 
22
- Version `3.0.1` supports Repository Format `1`, `@moldea.ai/core ^4.0.0`, and declared ranges that intersect `langchain >=1.5.9` with companion `@langchain/core >=1.2.8`. Those minimum versions are verified. Later stable releases are eligible for deterministic inspection on a best-effort basis and must still match the documented source patterns. Qualification evidence records the exact package versions and date used for each execution. The target recognizes:
22
+ Version `3.0.2` supports Repository Format `1`, `@moldea.ai/core ^4.0.0`, and declared ranges that intersect `langchain >=1.5.9` with companion `@langchain/core >=1.2.8`. Those minimum versions are verified. Later stable releases are eligible for deterministic inspection on a best-effort basis and must still match the documented source patterns. Qualification evidence records the exact package versions and date used for each execution. The target recognizes:
23
23
 
24
24
  - directly exported package-root `createAgent(...)` definitions
25
25
  - direct instruction-loader calls and `SystemMessage` construction
@@ -35,6 +35,8 @@ The package exports only `langChainAdapter`. It has no default export, configura
35
35
 
36
36
  ## Documentation
37
37
 
38
+ These guides are included in the installed package. Open only the page relevant to your task.
39
+
38
40
  - [Package overview](docs/index.md)
39
41
  - [Verified target](docs/verified-target.md)
40
42
  - [Evidence and diagnostics](docs/evidence-and-diagnostics.md)
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: Evidence and diagnostics
3
+ description: Source-grounded LangChain observations and stable adapter failures.
4
+ order: 20
5
+ ---
6
+
7
+ # Evidence and diagnostics
8
+
9
+ The adapter may emit `runtime-package`, `language`, `agent-definition`, `instruction-loader`, `schema`, and `tool-registration` evidence. Dynamic, middleware-influenced, multi-schema, or otherwise unresolved forms suppress optimistic evidence and contradiction diagnostics that would require guessing runtime behavior.
10
+
11
+ ## Stable diagnostics
12
+
13
+ | Code | Message |
14
+ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------- |
15
+ | `LANGCHAIN_PACKAGE_MANIFEST_INVALID` | The owning package manifest is invalid for LangChain dependency detection. |
16
+ | `LANGCHAIN_VERSION_UNSUPPORTED` | The observed LangChain package ranges are disjoint from the supported target. |
17
+ | `LANGCHAIN_SOURCE_TEXT_INVALID` | The referenced LangChain source file is not valid normalized text. |
18
+ | `LANGCHAIN_SOURCE_SYNTAX_INVALID` | The referenced LangChain source file contains invalid TypeScript syntax. |
19
+ | `LANGCHAIN_RUNTIME_AGENT_SYMBOL_NOT_FOUND` | The declared runtime-agent symbol was not found. |
20
+ | `LANGCHAIN_INSTRUCTION_LOADER_SYMBOL_NOT_FOUND` | The declared instruction-loader symbol was not found. |
21
+ | `LANGCHAIN_AGENT_OUTPUT_SCHEMA_SYMBOL_NOT_FOUND` | The declared agent output-schema symbol was not found. |
22
+ | `LANGCHAIN_TOOL_IMPLEMENTATION_SYMBOL_NOT_FOUND` | The declared tool-implementation symbol was not found. |
23
+ | `LANGCHAIN_TOOL_REGISTRATION_SYMBOL_NOT_FOUND` | The declared tool-registration symbol was not found. |
24
+ | `LANGCHAIN_TOOL_INPUT_SCHEMA_SYMBOL_NOT_FOUND` | The declared tool input-schema symbol was not found. |
25
+ | `LANGCHAIN_INSTRUCTION_LOADER_NOT_WIRED` | The declared instruction loader is not wired to the detected LangChain agent. |
26
+ | `LANGCHAIN_AGENT_OUTPUT_SCHEMA_NOT_WIRED` | The declared agent output schema is not wired to the detected LangChain structured-output configuration. |
27
+ | `LANGCHAIN_TOOL_IMPLEMENTATION_NOT_WIRED` | The declared tool implementation is not wired to the detected LangChain function tool. |
28
+ | `LANGCHAIN_TOOL_REGISTRATION_NOT_WIRED` | The declared tool registration is not available to the detected LangChain agent. |
29
+ | `LANGCHAIN_TOOL_NAME_MISMATCH` | The declared tool name does not match the detected LangChain tool name. |
30
+ | `LANGCHAIN_TOOL_INPUT_SCHEMA_NOT_WIRED` | The declared tool input schema is not wired to the detected LangChain function tool. |
31
+
32
+ Diagnostics never include source snippets, descriptions, instructions, schema contents, credentials, URLs, host paths, package declarations that are not valid SemVer ranges, or raw TypeScript diagnostic messages.
package/docs/index.md ADDED
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: LangChain adapter
3
+ description: Deterministic evidence for LangChain TypeScript createAgent applications.
4
+ order: 1
5
+ ---
6
+
7
+ # LangChain adapter
8
+
9
+ `@moldea.ai/adapter-langchain` connects Repository Format `1` declarations to static LangChain `createAgent` forms. `langchain` `1.5.9` and companion `@langchain/core` `1.2.8` are the verified minimums. Later stable releases are eligible for deterministic inspection on a best-effort basis and must still match the documented source patterns.
10
+
11
+ The adapter begins at each declared runtime-agent path, finds its nearest owning package, checks the primary and companion declarations together, and returns immutable evidence and stable diagnostics through Core. It does not execute the application or treat package presence as proof of an agent definition.
12
+
13
+ The package exports only `langChainAdapter`. The generated API reference derives that surface from the package export.
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Limitations
3
+ description: Conservative boundaries of the initial LangChain adapter target.
4
+ order: 30
5
+ ---
6
+
7
+ # Limitations
8
+
9
+ The initial target intentionally excludes JavaScript and CommonJS, configuration objects passed by reference, wrapper factories, re-exports, path aliases, package barrels, legacy agent executors, direct LangGraph graphs, Deep Agents, supervisor libraries, headless tools, custom tool classes, provider and server tools, toolkits, MCP conversions, and dynamic tool collections.
10
+
11
+ Non-empty or unresolved middleware suppresses instruction, agent output-schema, and tool-registration conclusions. Developer-authored response-format arrays are not mapped to the Repository Format's single agent output-schema binding. `stateSchema` and `contextSchema` do not become agent input-schema evidence, and implementation return types do not become tool output-schema evidence.
12
+
13
+ The adapter does not validate model availability, provider compatibility, schema semantics, tool safety, prompt quality, routing intent, or runtime execution. Direct LangGraph applications remain the responsibility of the separate `langgraph` runtime boundary.
14
+
15
+ Each invocation sees one declared agent and bounded logical repository operations, not a complete agent collection or project body index.
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Verified target
3
+ description: Static forms covered by the LangChain createAgent target from its verified minimums.
4
+ order: 10
5
+ ---
6
+
7
+ # Verified target
8
+
9
+ Technical target `typescript-create-agent-1-5` admits declared ranges that intersect `langchain >=1.5.9` with companion `@langchain/core >=1.2.8`. Those minimum versions are verified. Later stable releases are eligible for deterministic inspection on a best-effort basis and must still match the source patterns below. Qualification evidence records the exact package versions and date used for each execution.
10
+
11
+ Positive agent evidence requires a directly exported TypeScript `const` initialized by the named package-root `createAgent(...)` helper with one closed object-literal configuration and a `model` property. Named import aliases and `.ts`, `.tsx`, and `.mts` source are supported.
12
+
13
+ Instruction relationships require a direct loader call in `systemPrompt` or a direct `SystemMessage(loaderCall)` construction. Agent output schemas may be direct or wrapped by a supported one-schema `toolStrategy(...)` or `providerStrategy(...)` call. Normal function tools require the two-argument `tool(implementation, fields)` overload and an explicit manifest registration binding. Agent registration requires a closed tool array.
14
+
15
+ Middleware must be absent or a provably immutable empty array before instruction, agent output-schema, or tool-registration conclusions are produced. The adapter itself supports Node.js `>=22.11.0`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moldea.ai/adapter-langchain",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Deterministic runtime evidence and diagnostics for LangChain TypeScript agents.",
5
5
  "homepage": "https://github.com/moldea-ai/packages/tree/main/projects/adapter-langchain#readme",
6
6
  "bugs": {
@@ -18,6 +18,7 @@
18
18
  "files": [
19
19
  "cover.png",
20
20
  "dist",
21
+ "docs",
21
22
  "LICENSE",
22
23
  "README.md"
23
24
  ],