@loopman/langchain-sdk 1.7.0 → 1.12.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/README.md +78 -5
- package/dist/agents/loopman-agent.d.ts.map +1 -1
- package/dist/agents/loopman-agent.js +51 -92
- package/dist/agents/loopman-agent.js.map +1 -1
- package/dist/client/loopman-api.d.ts +19 -64
- package/dist/client/loopman-api.d.ts.map +1 -1
- package/dist/client/loopman-api.js +85 -248
- package/dist/client/loopman-api.js.map +1 -1
- package/dist/helpers/prompt-orchestrator.js +17 -17
- package/dist/helpers/prompt-orchestrator.js.map +1 -1
- package/dist/helpers/template-generator-static.d.ts +27 -0
- package/dist/helpers/template-generator-static.d.ts.map +1 -0
- package/dist/helpers/template-generator-static.js +52 -0
- package/dist/helpers/template-generator-static.js.map +1 -0
- package/dist/helpers/template-generator.d.ts +50 -0
- package/dist/helpers/template-generator.d.ts.map +1 -0
- package/dist/helpers/template-generator.js +85 -0
- package/dist/helpers/template-generator.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/langgraph/helpers.d.ts +171 -0
- package/dist/langgraph/helpers.d.ts.map +1 -0
- package/dist/langgraph/helpers.js +216 -0
- package/dist/langgraph/helpers.js.map +1 -0
- package/dist/langgraph/index.d.ts +16 -0
- package/dist/langgraph/index.d.ts.map +1 -0
- package/dist/langgraph/index.js +17 -0
- package/dist/langgraph/index.js.map +1 -0
- package/dist/langgraph/loopman-conditional-edge.d.ts +58 -0
- package/dist/langgraph/loopman-conditional-edge.d.ts.map +1 -0
- package/dist/langgraph/loopman-conditional-edge.js +77 -0
- package/dist/langgraph/loopman-conditional-edge.js.map +1 -0
- package/dist/langgraph/loopman-context-node.d.ts +74 -0
- package/dist/langgraph/loopman-context-node.d.ts.map +1 -0
- package/dist/langgraph/loopman-context-node.js +143 -0
- package/dist/langgraph/loopman-context-node.js.map +1 -0
- package/dist/langgraph/loopman-validation-node.d.ts +119 -0
- package/dist/langgraph/loopman-validation-node.d.ts.map +1 -0
- package/dist/langgraph/loopman-validation-node.js +420 -0
- package/dist/langgraph/loopman-validation-node.js.map +1 -0
- package/dist/langgraph/types.d.ts +75 -0
- package/dist/langgraph/types.d.ts.map +1 -0
- package/dist/langgraph/types.js +74 -0
- package/dist/langgraph/types.js.map +1 -0
- package/dist/loopman-agent-wrapper.d.ts +18 -0
- package/dist/loopman-agent-wrapper.d.ts.map +1 -1
- package/dist/loopman-agent-wrapper.js +31 -21
- package/dist/loopman-agent-wrapper.js.map +1 -1
- package/dist/loopman-middleware.d.ts +0 -5
- package/dist/loopman-middleware.d.ts.map +1 -1
- package/dist/loopman-middleware.js +22 -23
- package/dist/loopman-middleware.js.map +1 -1
- package/dist/mcp/loopman-mcp-client.d.ts.map +1 -1
- package/dist/mcp/loopman-mcp-client.js +5 -0
- package/dist/mcp/loopman-mcp-client.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts +7 -1
- package/dist/mcp/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tool-registry.js +23 -16
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/services/logger.service.d.ts.map +1 -1
- package/dist/services/logger.service.js +4 -12
- package/dist/services/logger.service.js.map +1 -1
- package/dist/services/loopman.service.d.ts +25 -11
- package/dist/services/loopman.service.d.ts.map +1 -1
- package/dist/services/loopman.service.js +74 -45
- package/dist/services/loopman.service.js.map +1 -1
- package/dist/services/polling.service.d.ts +7 -3
- package/dist/services/polling.service.d.ts.map +1 -1
- package/dist/services/polling.service.js +61 -47
- package/dist/services/polling.service.js.map +1 -1
- package/dist/templates.json +20 -0
- package/dist/types.d.ts +9 -35
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/examples/README.md +346 -0
- package/examples/templates/README.md +285 -0
- package/examples/templates/langchain-full-review/.env.example +3 -0
- package/examples/templates/langchain-full-review/README.md +165 -0
- package/examples/templates/langchain-full-review/index.ts +54 -0
- package/examples/templates/langchain-full-review/package.json +29 -0
- package/examples/templates/langchain-full-review/tsconfig.json +22 -0
- package/examples/templates/langchain-tool-validation/.env.example +3 -0
- package/examples/templates/langchain-tool-validation/README.md +137 -0
- package/examples/templates/langchain-tool-validation/index.ts +65 -0
- package/examples/templates/langchain-tool-validation/package.json +29 -0
- package/examples/templates/langchain-tool-validation/tsconfig.json +22 -0
- package/examples/templates/langgraph-hello-world/.env.example +3 -0
- package/examples/templates/langgraph-hello-world/README.md +71 -0
- package/examples/templates/langgraph-hello-world/index.ts +147 -0
- package/examples/templates/langgraph-hello-world/package.json +27 -0
- package/examples/templates/langgraph-hello-world/tsconfig.json +22 -0
- package/package.json +12 -7
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { MemorySaver } from "@langchain/langgraph";
|
|
2
|
+
import { config } from "dotenv";
|
|
3
|
+
import { createAgent, tool } from "langchain";
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { loopmanMiddleware } from "@loopman/langchain-sdk";
|
|
6
|
+
|
|
7
|
+
// Load environment variables
|
|
8
|
+
config();
|
|
9
|
+
|
|
10
|
+
// Simple hello world tool
|
|
11
|
+
const sayHello = tool(
|
|
12
|
+
({ name }) => {
|
|
13
|
+
console.log(`Hello, ${name}!`);
|
|
14
|
+
return `Hello, ${name}! Welcome to Loopman.`;
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "say_hello",
|
|
18
|
+
description: "Say hello to someone",
|
|
19
|
+
schema: z.object({
|
|
20
|
+
name: z.string().describe("The name of the person to greet"),
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
// Create agent with Loopman middleware
|
|
26
|
+
const checkpointer = new MemorySaver();
|
|
27
|
+
|
|
28
|
+
const agent = createAgent({
|
|
29
|
+
model: "openai:gpt-4o-mini",
|
|
30
|
+
systemPrompt: "You are a helpful assistant that greets people.",
|
|
31
|
+
tools: [sayHello],
|
|
32
|
+
middleware: [
|
|
33
|
+
loopmanMiddleware({
|
|
34
|
+
apiKey: process.env.LOOPMAN_API_KEY!,
|
|
35
|
+
workflowId: process.env.LOOPMAN_WORKFLOW_ID!,
|
|
36
|
+
interruptOn: {
|
|
37
|
+
say_hello: true, // Requires human validation
|
|
38
|
+
},
|
|
39
|
+
debug: true,
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
checkpointer,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Run the agent
|
|
46
|
+
async function main() {
|
|
47
|
+
const config = { configurable: { thread_id: "hello-world-thread" } };
|
|
48
|
+
|
|
49
|
+
const result = await agent.invoke(
|
|
50
|
+
{
|
|
51
|
+
messages: [
|
|
52
|
+
{
|
|
53
|
+
role: "user",
|
|
54
|
+
content: "Say hello to Alice",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
config
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
console.log("Agent response:", result.messages[result.messages.length - 1].content);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
main().catch(console.error);
|
|
65
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "loopman-langchain-tool-validation",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Loopman LangChain Tool Validation Example",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "tsx index.ts",
|
|
9
|
+
"dev": "tsx index.ts",
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"run": "node dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@langchain/core": "^1.0.2",
|
|
15
|
+
"@langchain/mcp-adapters": "^1.0.0",
|
|
16
|
+
"@langchain/langgraph": "^1.0.1",
|
|
17
|
+
"@langchain/openai": "^1.0.0",
|
|
18
|
+
"@loopman/langchain-sdk": "^1.12.0",
|
|
19
|
+
"dotenv": "^17.2.3",
|
|
20
|
+
"langchain": "^1.0.2",
|
|
21
|
+
"tsx": "^4.20.6",
|
|
22
|
+
"typescript": "^5.9.3",
|
|
23
|
+
"zod": "^3.25.76"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^24.9.2"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"outDir": "./dist",
|
|
10
|
+
"rootDir": "./",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"declarationMap": true,
|
|
17
|
+
"sourceMap": true
|
|
18
|
+
},
|
|
19
|
+
"include": ["**/*.ts"],
|
|
20
|
+
"exclude": ["node_modules", "dist"]
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Loopman LangGraph Hello World
|
|
2
|
+
|
|
3
|
+
This project demonstrates how to integrate Loopman with LangGraph using Context Enrichment / Feedback Loop mode.
|
|
4
|
+
|
|
5
|
+
## About LangGraph
|
|
6
|
+
|
|
7
|
+
LangGraph is LangChain's official framework for building stateful, multi-actor applications with LLMs. It provides:
|
|
8
|
+
|
|
9
|
+
- **Stateful workflows**: Explicit state management across nodes
|
|
10
|
+
- **Conditional routing**: Dynamic edges based on state
|
|
11
|
+
- **Streaming support**: Real-time updates during execution
|
|
12
|
+
- **Visual debugging**: Graph visualization and inspection
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
1. Install dependencies:
|
|
17
|
+
```bash
|
|
18
|
+
npm install
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
2. Copy .env.example to .env and configure your keys:
|
|
22
|
+
```bash
|
|
23
|
+
cp .env.example .env
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Edit the .env file and replace the placeholders with your actual values:
|
|
27
|
+
- `OPENAI_API_KEY`: Your OpenAI API key
|
|
28
|
+
- `LOOPMAN_API_KEY`: Your Loopman API key
|
|
29
|
+
- `LOOPMAN_WORKFLOW_ID`: Your workflow ID from Loopman
|
|
30
|
+
|
|
31
|
+
3. Run the example:
|
|
32
|
+
```bash
|
|
33
|
+
npm start
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Graph Architecture
|
|
37
|
+
|
|
38
|
+
The workflow follows this pattern:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
START
|
|
42
|
+
↓
|
|
43
|
+
load_context (load guidelines and decision history)
|
|
44
|
+
↓
|
|
45
|
+
agent (LLM decides action)
|
|
46
|
+
↓
|
|
47
|
+
loopman_validation (create task + poll)
|
|
48
|
+
↓
|
|
49
|
+
[conditional edge based on status]
|
|
50
|
+
↓
|
|
51
|
+
├─→ tools (APPROVED: execute)
|
|
52
|
+
├─→ agent (NEEDS_CHANGES: retry)
|
|
53
|
+
└─→ END (REJECTED/TIMEOUT/ERROR: end)
|
|
54
|
+
↓
|
|
55
|
+
END
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Key Features
|
|
59
|
+
|
|
60
|
+
- **Context Enrichment**: Loads validation guidelines and historical decisions
|
|
61
|
+
- **Prompt Enhancement**: Automatically enriches system prompts with context
|
|
62
|
+
- **Learning from History**: Agent learns from past human decisions
|
|
63
|
+
- **Category Filtering**: Guidelines filtered by category for relevance
|
|
64
|
+
- **Feedback Loop**: Human feedback is stored and used to improve future decisions
|
|
65
|
+
|
|
66
|
+
## Learn More
|
|
67
|
+
|
|
68
|
+
- [LangGraph Documentation](https://js.langchain.com/docs/langgraph/)
|
|
69
|
+
- [Loopman LangGraph Integration Guide](https://github.com/loopman/loopman-langchain-sdk/blob/main/docs/LANGGRAPH_INTEGRATION.md)
|
|
70
|
+
- [Loopman Documentation](https://loopman.dev/docs)
|
|
71
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { HumanMessage, ToolMessage } from "@langchain/core/messages";
|
|
2
|
+
import { END, MemorySaver, START, StateGraph } from "@langchain/langgraph";
|
|
3
|
+
import { ChatOpenAI } from "@langchain/openai";
|
|
4
|
+
import { config } from "dotenv";
|
|
5
|
+
import { tool } from "langchain";
|
|
6
|
+
import * as z from "zod";
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
LoopmanGraphState,
|
|
10
|
+
createLoopmanConditionalEdge,
|
|
11
|
+
createLoopmanContextNode,
|
|
12
|
+
createLoopmanValidationNode,
|
|
13
|
+
enrichSystemPrompt,
|
|
14
|
+
} from "@loopman/langchain-sdk";
|
|
15
|
+
|
|
16
|
+
config();
|
|
17
|
+
|
|
18
|
+
// Define your tools
|
|
19
|
+
const sayHello = tool(
|
|
20
|
+
({ name }) => {
|
|
21
|
+
console.log(`Hello, ${name}!`);
|
|
22
|
+
return `Hello, ${name}! Welcome to Loopman.`;
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "say_hello",
|
|
26
|
+
description: "Say hello to someone",
|
|
27
|
+
schema: z.object({
|
|
28
|
+
name: z.string().describe("The name of the person to greet"),
|
|
29
|
+
}),
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
// Agent node with context enrichment
|
|
34
|
+
async function agentNode(state: any) {
|
|
35
|
+
const { messages, guidelines, decisionContext } = state;
|
|
36
|
+
|
|
37
|
+
// Enrich system prompt with guidelines and decision history
|
|
38
|
+
const systemPrompt = enrichSystemPrompt(
|
|
39
|
+
"You are a helpful assistant that greets people ....",
|
|
40
|
+
{ guidelines, decisionContext },
|
|
41
|
+
{ maxDecisions: 3 }
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const model = new ChatOpenAI({ model: "gpt-4o-mini" });
|
|
45
|
+
const modelWithTools = model.bindTools([sayHello]);
|
|
46
|
+
|
|
47
|
+
const messagesWithContext =
|
|
48
|
+
(guidelines && guidelines.length > 0) ||
|
|
49
|
+
(decisionContext && decisionContext.length > 0)
|
|
50
|
+
? [{ role: "system", content: systemPrompt }, ...messages]
|
|
51
|
+
: messages;
|
|
52
|
+
|
|
53
|
+
const response = await modelWithTools.invoke(messagesWithContext);
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
messages: [response],
|
|
57
|
+
requiresValidation: response.tool_calls && response.tool_calls.length > 0,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Tool execution node
|
|
62
|
+
async function toolNode(state: any) {
|
|
63
|
+
const { messages } = state;
|
|
64
|
+
const lastMessage = messages[messages.length - 1];
|
|
65
|
+
|
|
66
|
+
if (!lastMessage.tool_calls || lastMessage.tool_calls.length === 0) {
|
|
67
|
+
return {};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const toolCall = lastMessage.tool_calls[0];
|
|
71
|
+
const result = await sayHello.invoke(toolCall.args);
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
messages: [
|
|
75
|
+
new ToolMessage({
|
|
76
|
+
content: result,
|
|
77
|
+
tool_call_id: toolCall.id,
|
|
78
|
+
}),
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Build the graph with context loading
|
|
84
|
+
const workflow = new StateGraph(LoopmanGraphState)
|
|
85
|
+
.addNode(
|
|
86
|
+
"load_context",
|
|
87
|
+
createLoopmanContextNode({
|
|
88
|
+
apiKey: process.env.LOOPMAN_API_KEY!,
|
|
89
|
+
workflowId: process.env.LOOPMAN_WORKFLOW_ID!,
|
|
90
|
+
category: "hello-world",
|
|
91
|
+
debug: true,
|
|
92
|
+
})
|
|
93
|
+
)
|
|
94
|
+
.addNode("agent", agentNode)
|
|
95
|
+
.addNode(
|
|
96
|
+
"loopman_validation",
|
|
97
|
+
createLoopmanValidationNode({
|
|
98
|
+
apiKey: process.env.LOOPMAN_API_KEY!,
|
|
99
|
+
workflowId: process.env.LOOPMAN_WORKFLOW_ID!,
|
|
100
|
+
debug: true,
|
|
101
|
+
})
|
|
102
|
+
)
|
|
103
|
+
.addNode("tools", toolNode)
|
|
104
|
+
.addEdge(START, "load_context")
|
|
105
|
+
.addEdge("load_context", "agent")
|
|
106
|
+
.addEdge("agent", "loopman_validation")
|
|
107
|
+
.addConditionalEdges(
|
|
108
|
+
"loopman_validation",
|
|
109
|
+
createLoopmanConditionalEdge({ debug: true }),
|
|
110
|
+
{
|
|
111
|
+
execute: "tools",
|
|
112
|
+
rejected: END,
|
|
113
|
+
retry: "agent",
|
|
114
|
+
timeout: END,
|
|
115
|
+
error: END,
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
.addEdge("tools", END);
|
|
119
|
+
|
|
120
|
+
// Compile and run
|
|
121
|
+
const checkpointer = new MemorySaver();
|
|
122
|
+
const app = workflow.compile({ checkpointer });
|
|
123
|
+
|
|
124
|
+
async function main() {
|
|
125
|
+
const config = { configurable: { thread_id: "hello-world-thread" } };
|
|
126
|
+
const inputs = {
|
|
127
|
+
messages: [new HumanMessage("Say hello to Alice")],
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
console.log("Starting LangGraph workflow with context enrichment...");
|
|
131
|
+
|
|
132
|
+
for await (const output of await app.stream(inputs, config)) {
|
|
133
|
+
const nodeName = Object.keys(output)[0];
|
|
134
|
+
console.log(`Step: ${nodeName}`);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const finalState = await app.getState(config);
|
|
138
|
+
console.log("Final status:", finalState.values.loopmanTaskStatus);
|
|
139
|
+
console.log("Guidelines loaded:", finalState.values.guidelines?.length || 0);
|
|
140
|
+
console.log(
|
|
141
|
+
"Decision context loaded:",
|
|
142
|
+
finalState.values.decisionContext?.length || 0
|
|
143
|
+
);
|
|
144
|
+
console.log("Workflow completed!");
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "loopman-langgraph-hello-world",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Loopman LangGraph Hello World Example",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "tsx index.ts",
|
|
9
|
+
"dev": "tsx index.ts",
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"run": "node dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@langchain/core": "^1.0.2",
|
|
15
|
+
"@langchain/langgraph": "^1.0.1",
|
|
16
|
+
"@langchain/openai": "^1.0.0",
|
|
17
|
+
"@loopman/langchain-sdk": "^1.12.0",
|
|
18
|
+
"dotenv": "^17.2.3",
|
|
19
|
+
"langchain": "^1.0.2",
|
|
20
|
+
"tsx": "^4.20.6",
|
|
21
|
+
"typescript": "^5.9.3",
|
|
22
|
+
"zod": "^3.25.76"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "^24.9.2"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"outDir": "./dist",
|
|
10
|
+
"rootDir": "./",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"declarationMap": true,
|
|
17
|
+
"sourceMap": true
|
|
18
|
+
},
|
|
19
|
+
"include": ["**/*.ts"],
|
|
20
|
+
"exclude": ["node_modules", "dist"]
|
|
21
|
+
}
|
|
22
|
+
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopman/langchain-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "LangChain TypeScript SDK - Human-in-the-Loop validation via Loopman platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
8
|
+
"build": "npm run export-templates && tsc",
|
|
9
9
|
"clean": "rm -rf dist",
|
|
10
|
-
"release": "./scripts/release.sh"
|
|
10
|
+
"release": "./scripts/release.sh",
|
|
11
|
+
"export-templates": "mkdir -p dist && node scripts/export-templates.js",
|
|
12
|
+
"example:langgraph-full-state": "tsx examples/5-langgraph-integration/full-state-example.ts"
|
|
11
13
|
},
|
|
12
14
|
"keywords": [
|
|
13
15
|
"langchain",
|
|
@@ -41,18 +43,21 @@
|
|
|
41
43
|
"files": [
|
|
42
44
|
"dist",
|
|
43
45
|
"README.md",
|
|
44
|
-
"LICENSE"
|
|
46
|
+
"LICENSE",
|
|
47
|
+
"examples/templates"
|
|
45
48
|
],
|
|
46
49
|
"dependencies": {
|
|
47
50
|
"@langchain/core": "^1.0.2",
|
|
48
51
|
"@langchain/mcp-adapters": "^1.0.0",
|
|
49
52
|
"@langchain/langgraph": "^1.0.1",
|
|
50
53
|
"@langchain/openai": "^1.0.0",
|
|
54
|
+
"langchain": "^1.0.2",
|
|
55
|
+
"zod": "^3.25.76"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
51
58
|
"@types/node": "^24.9.2",
|
|
52
59
|
"dotenv": "^17.2.3",
|
|
53
|
-
"langchain": "^1.0.2",
|
|
54
60
|
"tsx": "^4.20.6",
|
|
55
|
-
"typescript": "^5.9.3"
|
|
56
|
-
"zod": "^3.25.76"
|
|
61
|
+
"typescript": "^5.9.3"
|
|
57
62
|
}
|
|
58
63
|
}
|