Skip to content

Commit d37eb95

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/odedgo/atp-client-opt-in-refresh-token-behaviour
2 parents af6433e + e788c6e commit d37eb95

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

packages/langchain/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mondaydotcomorg/atp-langchain",
3-
"version": "0.23.0",
3+
"version": "0.24.0",
44
"description": "LangChain integration for Agent Tool Protocol",
55
"type": "module",
66
"main": "./dist/index.cjs",

packages/langchain/src/langgraph-client.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type { BaseChatModel } from '@langchain/core/language_models/chat_models'
2020
import type { BaseMessage } from '@langchain/core/messages';
2121
import { HumanMessage, SystemMessage } from '@langchain/core/messages';
2222
import type { Embeddings } from '@langchain/core/embeddings';
23+
import { AgentToolProtocolServer } from '@mondaydotcomorg/atp-server';
2324

2425
/**
2526
* Approval request that needs human decision
@@ -44,8 +45,10 @@ export interface ApprovalResponse {
4445
* Options for creating the LangGraph ATP client
4546
*/
4647
export interface LangGraphATPClientOptions {
47-
/** Base URL of ATP server */
48-
serverUrl: string;
48+
/** ATP server instance */
49+
server?: AgentToolProtocolServer;
50+
/** Base URL of ATP server used for http server (not inProcess) */
51+
serverUrl?: string;
4952
/** Custom headers for authentication (e.g., { Authorization: 'Bearer token' }) */
5053
headers?: Record<string, string>;
5154
/** LangChain LLM for atp.llm.call() sampling */
@@ -121,6 +124,7 @@ export class LangGraphATPClient {
121124

122125
constructor(options: LangGraphATPClientOptions) {
123126
const {
127+
server,
124128
serverUrl,
125129
headers,
126130
llm,
@@ -132,7 +136,8 @@ export class LangGraphATPClient {
132136
} = options;
133137

134138
this.client = new AgentToolProtocolClient({
135-
baseUrl: serverUrl,
139+
server,
140+
baseUrl: serverUrl,
136141
headers,
137142
hooks,
138143
serviceProviders: tools ? { tools } : undefined,

packages/langchain/src/langgraph-tools.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ import { ExecutionStatus, type ExecutionConfig } from '@mondaydotcomorg/atp-prot
2424
/**
2525
* Options for creating ATP tools with LangGraph integration
2626
*/
27-
export interface CreateATPToolsOptions extends Omit<LangGraphATPClientOptions, 'serverUrl'> {
28-
/** ATP server URL */
29-
serverUrl: string;
27+
export interface CreateATPToolsOptions extends LangGraphATPClientOptions {
3028
/**
3129
* Default execution config for all ATP code executions
3230
*/
@@ -83,11 +81,12 @@ export interface ATPToolsResult {
8381
* ```
8482
*/
8583
export async function createATPTools(options: CreateATPToolsOptions): Promise<ATPToolsResult> {
86-
const { serverUrl, defaultExecutionConfig, ...clientOptions } = options;
84+
const { serverUrl, server, defaultExecutionConfig, ...clientOptions } = options;
8785

8886
const client = new LangGraphATPClient({
89-
serverUrl,
90-
...clientOptions,
87+
server,
88+
serverUrl,
89+
...clientOptions,
9190
});
9291

9392
await client.connect();

packages/langchain/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
},
2020
"include": ["src/**/*"],
2121
"exclude": ["node_modules", "dist", "**/*.test.ts"],
22-
"references": [{ "path": "../protocol" }, { "path": "../client" }, { "path": "../runtime" }]
22+
"references": [{ "path": "../protocol" }, { "path": "../client" }, { "path": "../runtime" }, { "path": "../server" }]
2323
}

0 commit comments

Comments
 (0)