@mondaydotcomorg/atp-client 0.19.18 → 0.19.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/atp-client",
3
- "version": "0.19.18",
3
+ "version": "0.19.19",
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.17",
52
- "@mondaydotcomorg/atp-runtime": "0.19.16",
51
+ "@mondaydotcomorg/atp-protocol": "0.19.18",
52
+ "@mondaydotcomorg/atp-runtime": "0.19.17",
53
53
  "undici": "*",
54
54
  "zod-to-json-schema": "^3.24.6"
55
55
  },
package/src/client.ts CHANGED
@@ -7,6 +7,7 @@ import type {
7
7
  ClientToolDefinition,
8
8
  ExploreResult,
9
9
  ATPEvent,
10
+ ApiGroupRules,
10
11
  } from '@mondaydotcomorg/atp-protocol';
11
12
  import type { RuntimeAPIName } from '@mondaydotcomorg/atp-runtime';
12
13
  import { CallbackType } from '@mondaydotcomorg/atp-protocol';
@@ -246,8 +247,8 @@ export class AgentToolProtocolClient {
246
247
  /**
247
248
  * Explores the API filesystem at the given path.
248
249
  */
249
- async exploreAPI(path: string): Promise<ExploreResult> {
250
- return await this.apiOps.exploreAPI(path);
250
+ async exploreAPI(path: string, options?: { toolRules?: ApiGroupRules }): Promise<ExploreResult> {
251
+ return await this.apiOps.exploreAPI(path, options);
251
252
  }
252
253
 
253
254
  /**
@@ -1,4 +1,4 @@
1
- import type { SearchOptions, SearchResult, ExploreResult } from '@mondaydotcomorg/atp-protocol';
1
+ import type { SearchOptions, SearchResult, ExploreResult, ApiGroupRules } from '@mondaydotcomorg/atp-protocol';
2
2
  import type { RuntimeAPIName } from '@mondaydotcomorg/atp-runtime';
3
3
  import type { ISession } from './session.js';
4
4
  import type { InProcessSession } from './in-process-session.js';
@@ -106,15 +106,15 @@ export class APIOperations {
106
106
  /**
107
107
  * Explores the API filesystem at the given path.
108
108
  */
109
- async exploreAPI(path: string): Promise<ExploreResult> {
109
+ async exploreAPI(path: string, options?: { toolRules?: ApiGroupRules }): Promise<ExploreResult> {
110
110
  await this.session.ensureInitialized();
111
111
 
112
112
  if (this.inProcessSession) {
113
- return (await this.inProcessSession.explore(path)) as ExploreResult;
113
+ return (await this.inProcessSession.explore(path, options)) as ExploreResult;
114
114
  }
115
115
 
116
116
  const url = `${this.session.getBaseUrl()}/api/explore`;
117
- const body = JSON.stringify({ path });
117
+ const body = JSON.stringify({ path, ...options });
118
118
  const headers = await this.session.prepareHeaders('POST', url, body);
119
119
 
120
120
  const response = await fetch(url, {
@@ -202,13 +202,13 @@ export class InProcessSession implements ISession {
202
202
  return (await this.server.handleSearch(ctx)) as { results: unknown[] };
203
203
  }
204
204
 
205
- async explore(path: string): Promise<unknown> {
205
+ async explore(path: string, options?: Record<string, unknown>): Promise<unknown> {
206
206
  await this.ensureInitialized();
207
207
 
208
208
  const ctx = this.createContext({
209
209
  method: 'POST',
210
210
  path: '/api/explore',
211
- body: { path },
211
+ body: { path, ...options },
212
212
  });
213
213
 
214
214
  return await this.server.handleExplore(ctx);