@mondaydotcomorg/atp-client 0.19.14 → 0.19.16
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/dist/client.d.ts +21 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +21 -3
- package/dist/client.js.map +1 -1
- package/dist/core/execution-operations.d.ts +8 -3
- package/dist/core/execution-operations.d.ts.map +1 -1
- package/dist/core/execution-operations.js +19 -6
- package/dist/core/execution-operations.js.map +1 -1
- package/dist/core/index.cjs +19 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +19 -6
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +44 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -10
- package/dist/index.js.map +1 -1
- package/dist/tools/execute-code.d.ts +1 -1
- package/dist/tools/execute-code.d.ts.map +1 -1
- package/dist/tools/execute-code.js +1 -1
- package/dist/tools/execute-code.js.map +1 -1
- package/dist/tools/explore-api.d.ts +1 -1
- package/dist/tools/explore-api.d.ts.map +1 -1
- package/dist/tools/explore-api.js +1 -1
- package/dist/tools/explore-api.js.map +1 -1
- package/dist/tools/fetch-all-apis.d.ts +1 -1
- package/dist/tools/fetch-all-apis.d.ts.map +1 -1
- package/dist/tools/fetch-all-apis.js +1 -1
- package/dist/tools/fetch-all-apis.js.map +1 -1
- package/dist/tools/search-api.d.ts +1 -1
- package/dist/tools/search-api.d.ts.map +1 -1
- package/dist/tools/search-api.js +1 -1
- package/dist/tools/search-api.js.map +1 -1
- package/package.json +3 -3
- package/src/client.ts +22 -2
- package/src/core/execution-operations.ts +21 -6
- package/src/index.ts +6 -0
- package/src/tools/execute-code.ts +1 -1
- package/src/tools/explore-api.ts +1 -1
- package/src/tools/fetch-all-apis.ts +1 -1
- package/src/tools/search-api.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-code.d.ts","sourceRoot":"","sources":["../../src/tools/execute-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,
|
|
1
|
+
{"version":3,"file":"execute-code.d.ts","sourceRoot":"","sources":["../../src/tools/execute-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAEH,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE/D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CA8D7F"}
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
3
|
import { ExecutionStatus } from '@mondaydotcomorg/atp-protocol';
|
|
4
4
|
import { ToolNames } from './types.js';
|
|
5
|
-
const executeCodeInputSchema = z.object({
|
|
5
|
+
export const executeCodeInputSchema = z.object({
|
|
6
6
|
code: z.string().describe('The JavaScript/TypeScript code to execute'),
|
|
7
7
|
timeout: z.number().optional().describe('Execution timeout in milliseconds (default: 30000)'),
|
|
8
8
|
maxMemory: z.number().optional().describe('Maximum memory in bytes (default: 128MB)'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-code.js","sourceRoot":"","sources":["../../src/tools/execute-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC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{ type Tool } from './types.js';
|
|
4
|
-
declare const exploreApiInputSchema: z.ZodObject<{
|
|
4
|
+
export declare const exploreApiInputSchema: z.ZodObject<{
|
|
5
5
|
path: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
7
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explore-api.d.ts","sourceRoot":"","sources":["../../src/tools/explore-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,
|
|
1
|
+
{"version":3,"file":"explore-api.d.ts","sourceRoot":"","sources":["../../src/tools/explore-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,qBAAqB;;;;;;EAIhC,CAAC;AAEH,KAAK,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE7D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC,eAAe,CAAC,CAiD3F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
3
|
import { ToolNames } from './types.js';
|
|
4
|
-
const exploreApiInputSchema = z.object({
|
|
4
|
+
export const exploreApiInputSchema = z.object({
|
|
5
5
|
path: z
|
|
6
6
|
.string()
|
|
7
7
|
.describe('Path to explore (e.g., "/", "/openapi/github", "/mcp/filesystem/read_file")'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explore-api.js","sourceRoot":"","sources":["../../src/tools/explore-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAElD,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"explore-api.js","sourceRoot":"","sources":["../../src/tools/explore-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,CAAC,6EAA6E,CAAC;CACzF,CAAC,CAAC;AAIH,MAAM,UAAU,oBAAoB,CAAC,MAA+B;IACnE,OAAO;QACN,IAAI,EAAE,SAAS,CAAC,WAAW;QAC3B,WAAW,EACV,sOAAsO;QACvO,WAAW,EAAE,eAAe,CAAC,qBAAqB,CAAQ;QAC1D,SAAS,EAAE,qBAAqB;QAChC,IAAI,EAAE,KAAK,EAAE,KAAsB,EAAE,EAAE;YACtC,IAAI,CAAC;gBACJ,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAEnD,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;oBACjC,OAAO,IAAI,CAAC,SAAS,CACpB;wBACC,OAAO,EAAE,IAAI;wBACb,IAAI,EAAE,WAAW;wBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;wBACjB,KAAK,EAAE,MAAM,CAAC,KAAK;qBACnB,EACD,IAAI,EACJ,CAAC,CACD,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACP,OAAO,IAAI,CAAC,SAAS,CACpB;wBACC,OAAO,EAAE,IAAI;wBACb,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,MAAM,CAAC,IAAI;wBACjB,WAAW,EAAE,MAAM,CAAC,WAAW;wBAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;wBAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,IAAI,EAAE,MAAM,CAAC,IAAI;qBACjB,EACD,IAAI,EACJ,CAAC,CACD,CAAC;gBACH,CAAC;YACF,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACrB,OAAO,IAAI,CAAC,SAAS,CACpB;oBACC,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,KAAK,CAAC,OAAO;iBACpB,EACD,IAAI,EACJ,CAAC,CACD,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { AgentToolProtocolClient } from '../client.js';
|
|
3
3
|
import { type Tool } from './types.js';
|
|
4
|
-
declare const fetchAllApisInputSchema: z.ZodObject<{
|
|
4
|
+
export declare const fetchAllApisInputSchema: z.ZodObject<{
|
|
5
5
|
apiGroups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
7
|
apiGroups?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-all-apis.d.ts","sourceRoot":"","sources":["../../src/tools/fetch-all-apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,
|
|
1
|
+
{"version":3,"file":"fetch-all-apis.d.ts","sourceRoot":"","sources":["../../src/tools/fetch-all-apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,KAAK,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEjE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC,iBAAiB,CAAC,CA+B/F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
3
|
import { ToolNames } from './types.js';
|
|
4
|
-
const fetchAllApisInputSchema = z.object({
|
|
4
|
+
export const fetchAllApisInputSchema = z.object({
|
|
5
5
|
apiGroups: z.array(z.string()).optional().describe('Optional: Specific API groups to include'),
|
|
6
6
|
});
|
|
7
7
|
export function createFetchAllApisTool(client) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-all-apis.js","sourceRoot":"","sources":["../../src/tools/fetch-all-apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAElD,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch-all-apis.js","sourceRoot":"","sources":["../../src/tools/fetch-all-apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAC9F,CAAC,CAAC;AAIH,MAAM,UAAU,sBAAsB,CAAC,MAA+B;IACrE,OAAO;QACN,IAAI,EAAE,SAAS,CAAC,cAAc;QAC9B,WAAW,EACV,mGAAmG;QACpG,WAAW,EAAE,eAAe,CAAC,uBAAuB,CAAQ;QAC5D,SAAS,EAAE,uBAAuB;QAClC,IAAI,EAAE,KAAK,EAAE,MAAyB,EAAE,EAAE;YACzC,IAAI,CAAC;gBACJ,MAAM,UAAU,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBAC/C,OAAO,IAAI,CAAC,SAAS,CACpB;oBACC,OAAO,EAAE,IAAI;oBACb,UAAU;oBACV,OAAO,EAAE,6DAA6D;iBACtE,EACD,IAAI,EACJ,CAAC,CACD,CAAC;YACH,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACrB,OAAO,IAAI,CAAC,SAAS,CACpB;oBACC,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,KAAK,CAAC,OAAO;iBACpB,EACD,IAAI,EACJ,CAAC,CACD,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { AgentToolProtocolClient } from '../client.js';
|
|
3
3
|
import { type Tool } from './types.js';
|
|
4
|
-
declare const searchApiInputSchema: z.ZodObject<{
|
|
4
|
+
export declare const searchApiInputSchema: z.ZodObject<{
|
|
5
5
|
query: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
7
|
query: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-api.d.ts","sourceRoot":"","sources":["../../src/tools/search-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,
|
|
1
|
+
{"version":3,"file":"search-api.d.ts","sourceRoot":"","sources":["../../src/tools/search-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAEH,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE3D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC,cAAc,CAAC,CAoCzF"}
|
package/dist/tools/search-api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
3
|
import { ToolNames } from './types.js';
|
|
4
|
-
const searchApiInputSchema = z.object({
|
|
4
|
+
export const searchApiInputSchema = z.object({
|
|
5
5
|
query: z.string().describe('Search query string'),
|
|
6
6
|
});
|
|
7
7
|
export function createSearchApiTool(client) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-api.js","sourceRoot":"","sources":["../../src/tools/search-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAa,MAAM,YA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AI,CAAC,SAAS,CACpB;oBACC,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,KAAK,CAAC,OAAO;iBACpB,EACD,IAAI,EACJ,CAAC,CACD,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/atp-client",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.16",
|
|
4
4
|
"description": "Client SDK for Agent Tool Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@mondaydotcomorg/atp-protocol": "0.19.
|
|
52
|
-
"@mondaydotcomorg/atp-runtime": "0.19.
|
|
51
|
+
"@mondaydotcomorg/atp-protocol": "0.19.15",
|
|
52
|
+
"@mondaydotcomorg/atp-runtime": "0.19.14",
|
|
53
53
|
"undici": "*",
|
|
54
54
|
"zod-to-json-schema": "^3.24.6"
|
|
55
55
|
},
|
package/src/client.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
ClientTool,
|
|
7
7
|
ClientToolDefinition,
|
|
8
8
|
ExploreResult,
|
|
9
|
+
ATPEvent,
|
|
9
10
|
} from '@mondaydotcomorg/atp-protocol';
|
|
10
11
|
import type { RuntimeAPIName } from '@mondaydotcomorg/atp-runtime';
|
|
11
12
|
import { CallbackType } from '@mondaydotcomorg/atp-protocol';
|
|
@@ -250,14 +251,33 @@ export class AgentToolProtocolClient {
|
|
|
250
251
|
}
|
|
251
252
|
|
|
252
253
|
/**
|
|
253
|
-
* Executes code on the server with real-time
|
|
254
|
+
* Executes code on the server with real-time streaming events via SSE.
|
|
255
|
+
*
|
|
256
|
+
* @param code - TypeScript code to execute
|
|
257
|
+
* @param config - Optional execution configuration
|
|
258
|
+
* @param onEvent - Callback for all streaming events (thinking, tool_start, tool_end, text, source, etc.)
|
|
259
|
+
* @param onProgress - Legacy callback for progress events only (deprecated, use onEvent instead)
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```typescript
|
|
263
|
+
* const result = await client.executeStream(
|
|
264
|
+
* code,
|
|
265
|
+
* {},
|
|
266
|
+
* (event) => {
|
|
267
|
+
* if (event.type === 'thinking') console.log('Thinking:', event.data.content);
|
|
268
|
+
* if (event.type === 'text') console.log('Text:', event.data.text);
|
|
269
|
+
* if (event.type === 'tool_start') console.log('Tool started:', event.data.toolName);
|
|
270
|
+
* }
|
|
271
|
+
* );
|
|
272
|
+
* ```
|
|
254
273
|
*/
|
|
255
274
|
async executeStream(
|
|
256
275
|
code: string,
|
|
257
276
|
config?: Partial<ExecutionConfig>,
|
|
277
|
+
onEvent?: (event: ATPEvent) => void,
|
|
258
278
|
onProgress?: (message: string, fraction: number) => void
|
|
259
279
|
): Promise<ExecutionResult> {
|
|
260
|
-
return await this.execOps.executeStream(code, config, onProgress);
|
|
280
|
+
return await this.execOps.executeStream(code, config, onEvent, onProgress);
|
|
261
281
|
}
|
|
262
282
|
|
|
263
283
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExecutionResult, ExecutionConfig } from '@mondaydotcomorg/atp-protocol';
|
|
1
|
+
import type { ExecutionResult, ExecutionConfig, ATPEvent } from '@mondaydotcomorg/atp-protocol';
|
|
2
2
|
import { ExecutionStatus, CallbackType } from '@mondaydotcomorg/atp-protocol';
|
|
3
3
|
import { log } from '@mondaydotcomorg/atp-runtime';
|
|
4
4
|
import type { ISession } from './session.js';
|
|
@@ -26,11 +26,17 @@ export class ExecutionOperations {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Executes code on the server with real-time
|
|
29
|
+
* Executes code on the server with real-time streaming events via SSE.
|
|
30
|
+
*
|
|
31
|
+
* @param code - TypeScript code to execute
|
|
32
|
+
* @param config - Optional execution configuration
|
|
33
|
+
* @param onEvent - Callback for all streaming events (thinking, tool_start, tool_end, text, source, etc.)
|
|
34
|
+
* @param onProgress - Legacy callback for progress events only (deprecated, use onEvent instead)
|
|
30
35
|
*/
|
|
31
36
|
async executeStream(
|
|
32
37
|
code: string,
|
|
33
38
|
config?: Partial<ExecutionConfig>,
|
|
39
|
+
onEvent?: (event: ATPEvent) => void,
|
|
34
40
|
onProgress?: (message: string, fraction: number) => void
|
|
35
41
|
): Promise<ExecutionResult> {
|
|
36
42
|
await this.session.ensureInitialized();
|
|
@@ -74,7 +80,7 @@ export class ExecutionOperations {
|
|
|
74
80
|
const line = lines[i];
|
|
75
81
|
|
|
76
82
|
if (line && line.startsWith('event:')) {
|
|
77
|
-
const
|
|
83
|
+
const eventType = line.substring(6).trim();
|
|
78
84
|
|
|
79
85
|
for (let j = i + 1; j < lines.length; j++) {
|
|
80
86
|
const dataLine = lines[j];
|
|
@@ -84,11 +90,20 @@ export class ExecutionOperations {
|
|
|
84
90
|
try {
|
|
85
91
|
const data = JSON.parse(dataStr);
|
|
86
92
|
|
|
87
|
-
if (
|
|
93
|
+
if (onEvent) {
|
|
94
|
+
const event: ATPEvent = {
|
|
95
|
+
type: eventType,
|
|
96
|
+
data,
|
|
97
|
+
timestamp: Date.now(),
|
|
98
|
+
};
|
|
99
|
+
onEvent(event);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (eventType === 'progress' && onProgress) {
|
|
88
103
|
onProgress(data.message, data.fraction);
|
|
89
|
-
} else if (
|
|
104
|
+
} else if (eventType === 'result') {
|
|
90
105
|
result = data as ExecutionResult;
|
|
91
|
-
} else if (
|
|
106
|
+
} else if (eventType === 'error') {
|
|
92
107
|
reject(new Error(data.message));
|
|
93
108
|
return;
|
|
94
109
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,12 @@ export { ExecutionStatus } from '@mondaydotcomorg/atp-protocol';
|
|
|
8
8
|
export type { RuntimeAPIName } from '@mondaydotcomorg/atp-runtime';
|
|
9
9
|
export type { Tool, ToolName } from './tools/types.js';
|
|
10
10
|
export { ToolNames } from './tools/types.js';
|
|
11
|
+
export {
|
|
12
|
+
searchApiInputSchema,
|
|
13
|
+
executeCodeInputSchema,
|
|
14
|
+
exploreApiInputSchema,
|
|
15
|
+
fetchAllApisInputSchema,
|
|
16
|
+
} from './tools/index.js';
|
|
11
17
|
export type { AgentToolProtocolClientOptions } from './client.js';
|
|
12
18
|
export { InProcessSession } from './core/in-process-session.js';
|
|
13
19
|
export type { ISession } from './core/session.js';
|
|
@@ -4,7 +4,7 @@ import { ExecutionStatus } from '@mondaydotcomorg/atp-protocol';
|
|
|
4
4
|
import type { AgentToolProtocolClient } from '../client.js';
|
|
5
5
|
import { ToolNames, type Tool } from './types.js';
|
|
6
6
|
|
|
7
|
-
const executeCodeInputSchema = z.object({
|
|
7
|
+
export const executeCodeInputSchema = z.object({
|
|
8
8
|
code: z.string().describe('The JavaScript/TypeScript code to execute'),
|
|
9
9
|
timeout: z.number().optional().describe('Execution timeout in milliseconds (default: 30000)'),
|
|
10
10
|
maxMemory: z.number().optional().describe('Maximum memory in bytes (default: 128MB)'),
|
package/src/tools/explore-api.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
|
3
3
|
import type { AgentToolProtocolClient } from '../client.js';
|
|
4
4
|
import { ToolNames, type Tool } from './types.js';
|
|
5
5
|
|
|
6
|
-
const exploreApiInputSchema = z.object({
|
|
6
|
+
export const exploreApiInputSchema = z.object({
|
|
7
7
|
path: z
|
|
8
8
|
.string()
|
|
9
9
|
.describe('Path to explore (e.g., "/", "/openapi/github", "/mcp/filesystem/read_file")'),
|
|
@@ -3,7 +3,7 @@ import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
|
3
3
|
import type { AgentToolProtocolClient } from '../client.js';
|
|
4
4
|
import { ToolNames, type Tool } from './types.js';
|
|
5
5
|
|
|
6
|
-
const fetchAllApisInputSchema = z.object({
|
|
6
|
+
export const fetchAllApisInputSchema = z.object({
|
|
7
7
|
apiGroups: z.array(z.string()).optional().describe('Optional: Specific API groups to include'),
|
|
8
8
|
});
|
|
9
9
|
|
package/src/tools/search-api.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
|
3
3
|
import type { AgentToolProtocolClient } from '../client.js';
|
|
4
4
|
import { ToolNames, type Tool } from './types.js';
|
|
5
5
|
|
|
6
|
-
const searchApiInputSchema = z.object({
|
|
6
|
+
export const searchApiInputSchema = z.object({
|
|
7
7
|
query: z.string().describe('Search query string'),
|
|
8
8
|
});
|
|
9
9
|
|