@cadenya/cadenya 0.66.0 → 0.68.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/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/client.d.mts +42 -81
- package/client.d.mts.map +1 -1
- package/client.d.ts +42 -81
- package/client.d.ts.map +1 -1
- package/client.js +24 -63
- package/client.js.map +1 -1
- package/client.mjs +24 -63
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +18 -22
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +18 -22
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +2 -6
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +2 -6
- package/resources/account.mjs.map +1 -1
- package/resources/agents/agents.d.mts +34 -21
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +34 -21
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +17 -16
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +17 -16
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/feedback.d.mts +15 -15
- package/resources/agents/feedback.d.mts.map +1 -1
- package/resources/agents/feedback.d.ts +15 -15
- package/resources/agents/feedback.d.ts.map +1 -1
- package/resources/agents/feedback.js +4 -8
- package/resources/agents/feedback.js.map +1 -1
- package/resources/agents/feedback.mjs +4 -8
- package/resources/agents/feedback.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/schedules.d.mts +44 -26
- package/resources/agents/schedules.d.mts.map +1 -1
- package/resources/agents/schedules.d.ts +44 -26
- package/resources/agents/schedules.d.ts.map +1 -1
- package/resources/agents/schedules.js +20 -19
- package/resources/agents/schedules.js.map +1 -1
- package/resources/agents/schedules.mjs +20 -19
- package/resources/agents/schedules.mjs.map +1 -1
- package/resources/agents/variations.d.mts +88 -43
- package/resources/agents/variations.d.mts.map +1 -1
- package/resources/agents/variations.d.ts +88 -43
- package/resources/agents/variations.d.ts.map +1 -1
- package/resources/agents/variations.js +31 -32
- package/resources/agents/variations.js.map +1 -1
- package/resources/agents/variations.mjs +31 -32
- package/resources/agents/variations.mjs.map +1 -1
- package/resources/agents/webhook-deliveries.d.mts +10 -11
- package/resources/agents/webhook-deliveries.d.mts.map +1 -1
- package/resources/agents/webhook-deliveries.d.ts +10 -11
- package/resources/agents/webhook-deliveries.d.ts.map +1 -1
- package/resources/agents/webhook-deliveries.js +4 -8
- package/resources/agents/webhook-deliveries.js.map +1 -1
- package/resources/agents/webhook-deliveries.mjs +4 -8
- package/resources/agents/webhook-deliveries.mjs.map +1 -1
- package/resources/api-keys.d.mts +48 -28
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +48 -28
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +21 -17
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +21 -17
- package/resources/api-keys.mjs.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +20 -21
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +20 -21
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js +13 -17
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +13 -17
- package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
- package/resources/bulk-workspace-resources/index.d.mts +1 -1
- package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/index.d.ts +1 -1
- package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/index.js.map +1 -1
- package/resources/bulk-workspace-resources/index.mjs.map +1 -1
- package/resources/bulk-workspace-resources/results.d.mts +30 -35
- package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/results.d.ts +30 -35
- package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/results.js +6 -10
- package/resources/bulk-workspace-resources/results.js.map +1 -1
- package/resources/bulk-workspace-resources/results.mjs +6 -10
- package/resources/bulk-workspace-resources/results.mjs.map +1 -1
- package/resources/index.d.mts +9 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/memory-layers/entries.d.mts +40 -33
- package/resources/memory-layers/entries.d.mts.map +1 -1
- package/resources/memory-layers/entries.d.ts +40 -33
- package/resources/memory-layers/entries.d.ts.map +1 -1
- package/resources/memory-layers/entries.js +19 -23
- package/resources/memory-layers/entries.js.map +1 -1
- package/resources/memory-layers/entries.mjs +19 -23
- package/resources/memory-layers/entries.mjs.map +1 -1
- package/resources/memory-layers/index.d.mts +1 -1
- package/resources/memory-layers/index.d.mts.map +1 -1
- package/resources/memory-layers/index.d.ts +1 -1
- package/resources/memory-layers/index.d.ts.map +1 -1
- package/resources/memory-layers/index.js.map +1 -1
- package/resources/memory-layers/index.mjs.map +1 -1
- package/resources/memory-layers/memory-layers.d.mts +33 -22
- package/resources/memory-layers/memory-layers.d.mts.map +1 -1
- package/resources/memory-layers/memory-layers.d.ts +33 -22
- package/resources/memory-layers/memory-layers.d.ts.map +1 -1
- package/resources/memory-layers/memory-layers.js +17 -20
- package/resources/memory-layers/memory-layers.js.map +1 -1
- package/resources/memory-layers/memory-layers.mjs +17 -20
- package/resources/memory-layers/memory-layers.mjs.map +1 -1
- package/resources/models.d.mts +18 -12
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +18 -12
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +14 -13
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +14 -13
- package/resources/models.mjs.map +1 -1
- package/resources/objectives/feedback.d.mts +19 -8
- package/resources/objectives/feedback.d.mts.map +1 -1
- package/resources/objectives/feedback.d.ts +19 -8
- package/resources/objectives/feedback.d.ts.map +1 -1
- package/resources/objectives/feedback.js +9 -4
- package/resources/objectives/feedback.js.map +1 -1
- package/resources/objectives/feedback.mjs +9 -4
- package/resources/objectives/feedback.mjs.map +1 -1
- package/resources/objectives/index.d.mts +1 -1
- package/resources/objectives/index.d.mts.map +1 -1
- package/resources/objectives/index.d.ts +1 -1
- package/resources/objectives/index.d.ts.map +1 -1
- package/resources/objectives/index.js.map +1 -1
- package/resources/objectives/index.mjs.map +1 -1
- package/resources/objectives/objectives.d.mts +63 -44
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +63 -44
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js +31 -16
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs +31 -16
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tasks.d.mts +7 -2
- package/resources/objectives/tasks.d.mts.map +1 -1
- package/resources/objectives/tasks.d.ts +7 -2
- package/resources/objectives/tasks.d.ts.map +1 -1
- package/resources/objectives/tasks.js +5 -4
- package/resources/objectives/tasks.js.map +1 -1
- package/resources/objectives/tasks.mjs +5 -4
- package/resources/objectives/tasks.mjs.map +1 -1
- package/resources/objectives/tool-calls.d.mts +18 -9
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +18 -9
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/objectives/tool-calls.js +7 -12
- package/resources/objectives/tool-calls.js.map +1 -1
- package/resources/objectives/tool-calls.mjs +7 -12
- package/resources/objectives/tool-calls.mjs.map +1 -1
- package/resources/objectives/tools.d.mts +5 -1
- package/resources/objectives/tools.d.mts.map +1 -1
- package/resources/objectives/tools.d.ts +5 -1
- package/resources/objectives/tools.d.ts.map +1 -1
- package/resources/objectives/tools.js +3 -2
- package/resources/objectives/tools.js.map +1 -1
- package/resources/objectives/tools.mjs +3 -2
- package/resources/objectives/tools.mjs.map +1 -1
- package/resources/search.d.mts +1 -1
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +1 -1
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +6 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +6 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tool-sets/index.d.mts +1 -1
- package/resources/tool-sets/index.d.mts.map +1 -1
- package/resources/tool-sets/index.d.ts +1 -1
- package/resources/tool-sets/index.d.ts.map +1 -1
- package/resources/tool-sets/index.js.map +1 -1
- package/resources/tool-sets/index.mjs.map +1 -1
- package/resources/tool-sets/tool-sets.d.mts +66 -43
- package/resources/tool-sets/tool-sets.d.mts.map +1 -1
- package/resources/tool-sets/tool-sets.d.ts +66 -43
- package/resources/tool-sets/tool-sets.d.ts.map +1 -1
- package/resources/tool-sets/tool-sets.js +23 -23
- package/resources/tool-sets/tool-sets.js.map +1 -1
- package/resources/tool-sets/tool-sets.mjs +23 -23
- package/resources/tool-sets/tool-sets.mjs.map +1 -1
- package/resources/tool-sets/tools.d.mts +50 -31
- package/resources/tool-sets/tools.d.mts.map +1 -1
- package/resources/tool-sets/tools.d.ts +50 -31
- package/resources/tool-sets/tools.d.ts.map +1 -1
- package/resources/tool-sets/tools.js +22 -21
- package/resources/tool-sets/tools.js.map +1 -1
- package/resources/tool-sets/tools.mjs +22 -21
- package/resources/tool-sets/tools.mjs.map +1 -1
- package/resources/uploads.d.mts +21 -19
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +21 -19
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +8 -11
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +8 -11
- package/resources/uploads.mjs.map +1 -1
- package/resources/workspace-secrets.d.mts +33 -13
- package/resources/workspace-secrets.d.mts.map +1 -1
- package/resources/workspace-secrets.d.ts +33 -13
- package/resources/workspace-secrets.d.ts.map +1 -1
- package/resources/workspace-secrets.js +16 -13
- package/resources/workspace-secrets.js.map +1 -1
- package/resources/workspace-secrets.mjs +16 -13
- package/resources/workspace-secrets.mjs.map +1 -1
- package/resources/workspaces.d.mts +2 -6
- package/resources/workspaces.d.mts.map +1 -1
- package/resources/workspaces.d.ts +2 -6
- package/resources/workspaces.d.ts.map +1 -1
- package/resources/workspaces.js +2 -6
- package/resources/workspaces.js.map +1 -1
- package/resources/workspaces.mjs +2 -6
- package/resources/workspaces.mjs.map +1 -1
- package/src/client.ts +54 -63
- package/src/resources/account.ts +18 -22
- package/src/resources/agents/agents.ts +49 -24
- package/src/resources/agents/feedback.ts +18 -16
- package/src/resources/agents/index.ts +2 -0
- package/src/resources/agents/schedules.ts +69 -37
- package/src/resources/agents/variations.ts +141 -73
- package/src/resources/agents/webhook-deliveries.ts +13 -12
- package/src/resources/api-keys.ts +67 -32
- package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +40 -25
- package/src/resources/bulk-workspace-resources/index.ts +1 -0
- package/src/resources/bulk-workspace-resources/results.ts +33 -36
- package/src/resources/index.ts +22 -1
- package/src/resources/memory-layers/entries.ts +67 -44
- package/src/resources/memory-layers/index.ts +2 -0
- package/src/resources/memory-layers/memory-layers.ts +53 -25
- package/src/resources/models.ts +28 -13
- package/src/resources/objectives/feedback.ts +29 -11
- package/src/resources/objectives/index.ts +1 -0
- package/src/resources/objectives/objectives.ts +100 -50
- package/src/resources/objectives/tasks.ts +16 -5
- package/src/resources/objectives/tool-calls.ts +33 -20
- package/src/resources/objectives/tools.ts +9 -3
- package/src/resources/search.ts +6 -1
- package/src/resources/tool-sets/index.ts +2 -0
- package/src/resources/tool-sets/tool-sets.ts +88 -50
- package/src/resources/tool-sets/tools.ts +75 -42
- package/src/resources/uploads.ts +25 -20
- package/src/resources/workspace-secrets.ts +60 -19
- package/src/resources/workspaces.ts +2 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-sets.js","sourceRoot":"","sources":["../../src/resources/tool-sets/tool-sets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAIlD,6DAAoC;AACpC,sCAciB;AAEjB,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD
|
|
1
|
+
{"version":3,"file":"tool-sets.js","sourceRoot":"","sources":["../../src/resources/tool-sets/tool-sets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAIlD,6DAAoC;AACpC,sCAciB;AAEjB,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;GAMG;AACH,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiE3D,CAAC;IA/DC;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAyB,EAAE,OAAwB;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,MAA6B,EAAE,OAAwB;QAC1E,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC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CAAC;IACJ,CAAC;CACF;AAlED,4BAkEC;AA+UD,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -6,15 +6,11 @@ import { CursorPagination } from "../../core/pagination.mjs";
|
|
|
6
6
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
7
7
|
import { path } from "../../internal/utils/path.mjs";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
9
|
+
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
10
|
+
* and tools define specific capabilities available to agents.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* Authentication: Bearer token (JWT)
|
|
17
|
-
* Scope: Workspace-level operations
|
|
12
|
+
* When a tool set is managed, only API key actors can modify its tools; human
|
|
13
|
+
* (profile) actors cannot.
|
|
18
14
|
*/
|
|
19
15
|
export class ToolSets extends APIResource {
|
|
20
16
|
constructor() {
|
|
@@ -24,32 +20,38 @@ export class ToolSets extends APIResource {
|
|
|
24
20
|
/**
|
|
25
21
|
* Creates a new tool set in the workspace
|
|
26
22
|
*/
|
|
27
|
-
create(body, options) {
|
|
28
|
-
return this._client.post(
|
|
23
|
+
create(workspaceID, body, options) {
|
|
24
|
+
return this._client.post(path `/v1/workspaces/${workspaceID}/tool_sets`, { body, ...options });
|
|
29
25
|
}
|
|
30
26
|
/**
|
|
31
27
|
* Retrieves a tool set by ID from the workspace
|
|
32
28
|
*/
|
|
33
|
-
retrieve(id, options) {
|
|
34
|
-
|
|
29
|
+
retrieve(id, params, options) {
|
|
30
|
+
const { workspaceId } = params;
|
|
31
|
+
return this._client.get(path `/v1/workspaces/${workspaceId}/tool_sets/${id}`, options);
|
|
35
32
|
}
|
|
36
33
|
/**
|
|
37
34
|
* Updates a tool set in the workspace
|
|
38
35
|
*/
|
|
39
|
-
update(id,
|
|
40
|
-
|
|
36
|
+
update(id, params, options) {
|
|
37
|
+
const { workspaceId, ...body } = params;
|
|
38
|
+
return this._client.put(path `/v1/workspaces/${workspaceId}/tool_sets/${id}`, { body, ...options });
|
|
41
39
|
}
|
|
42
40
|
/**
|
|
43
41
|
* Lists all tool sets in the workspace
|
|
44
42
|
*/
|
|
45
|
-
list(query = {}, options) {
|
|
46
|
-
return this._client.getAPIList(
|
|
43
|
+
list(workspaceID, query = {}, options) {
|
|
44
|
+
return this._client.getAPIList(path `/v1/workspaces/${workspaceID}/tool_sets`, (CursorPagination), {
|
|
45
|
+
query,
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
49
50
|
* Deletes a tool set in the workspace
|
|
50
51
|
*/
|
|
51
|
-
delete(id, options) {
|
|
52
|
-
|
|
52
|
+
delete(id, params, options) {
|
|
53
|
+
const { workspaceId } = params;
|
|
54
|
+
return this._client.delete(path `/v1/workspaces/${workspaceId}/tool_sets/${id}`, {
|
|
53
55
|
...options,
|
|
54
56
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
55
57
|
});
|
|
@@ -57,11 +59,9 @@ export class ToolSets extends APIResource {
|
|
|
57
59
|
/**
|
|
58
60
|
* Lists all events (including sync status) for a tool set
|
|
59
61
|
*/
|
|
60
|
-
listEvents(toolSetID,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
...options,
|
|
64
|
-
});
|
|
62
|
+
listEvents(toolSetID, params, options) {
|
|
63
|
+
const { workspaceId, ...query } = params;
|
|
64
|
+
return this._client.getAPIList(path `/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/events`, (CursorPagination), { query, ...options });
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
ToolSets.Tools = Tools;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-sets.mjs","sourceRoot":"","sources":["../../src/resources/tool-sets/tool-sets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EA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EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,kBAAkB,WAAW,YAAY,EAAE,CAAA,gBAAyB,CAAA,EAAE;YACvG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,MAA2B,EAAE,OAAwB;QACtE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,WAAW,cAAc,EAAE,EAAE,EAAE;YAC9E,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,UAAU,CACR,SAAiB,EACjB,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,kBAAkB,WAAW,cAAc,SAAS,SAAS,EACjE,CAAA,gBAA8B,CAAA,EAC9B,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AA+UD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -5,21 +5,17 @@ import { APIPromise } from "../../core/api-promise.mjs";
|
|
|
5
5
|
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
8
|
+
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
9
|
+
* and tools define specific capabilities available to agents.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* Authentication: Bearer token (JWT)
|
|
16
|
-
* Scope: Workspace-level operations
|
|
11
|
+
* When a tool set is managed, only API key actors can modify its tools; human
|
|
12
|
+
* (profile) actors cannot.
|
|
17
13
|
*/
|
|
18
14
|
export declare class Tools extends APIResource {
|
|
19
15
|
/**
|
|
20
16
|
* Creates a new tool in the tool set
|
|
21
17
|
*/
|
|
22
|
-
create(toolSetID: string,
|
|
18
|
+
create(toolSetID: string, params: ToolCreateParams, options?: RequestOptions): APIPromise<Tool>;
|
|
23
19
|
/**
|
|
24
20
|
* Retrieves a tool by ID from the workspace
|
|
25
21
|
*/
|
|
@@ -31,7 +27,7 @@ export declare class Tools extends APIResource {
|
|
|
31
27
|
/**
|
|
32
28
|
* Lists all tools in the tool set
|
|
33
29
|
*/
|
|
34
|
-
list(toolSetID: string,
|
|
30
|
+
list(toolSetID: string, params: ToolListParams, options?: RequestOptions): PagePromise<ToolsCursorPagination, Tool>;
|
|
35
31
|
/**
|
|
36
32
|
* Deletes a tool in the tool set
|
|
37
33
|
*/
|
|
@@ -72,9 +68,9 @@ export interface Tool {
|
|
|
72
68
|
}
|
|
73
69
|
export interface ToolInfo {
|
|
74
70
|
/**
|
|
75
|
-
*
|
|
76
|
-
* account-scoped
|
|
77
|
-
*
|
|
71
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
72
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
73
|
+
* workspaces.
|
|
78
74
|
*/
|
|
79
75
|
createdBy?: AccountAPI.Profile;
|
|
80
76
|
/**
|
|
@@ -107,24 +103,39 @@ export interface ToolSpecConfig {
|
|
|
107
103
|
}
|
|
108
104
|
export interface ToolCreateParams {
|
|
109
105
|
/**
|
|
110
|
-
*
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
* Path param: Workspace ID.
|
|
107
|
+
*/
|
|
108
|
+
workspaceId: string;
|
|
109
|
+
/**
|
|
110
|
+
* Body param: CreateResourceMetadata contains the user-provided fields for
|
|
111
|
+
* creating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
112
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
113
|
+
* server.
|
|
113
114
|
*/
|
|
114
115
|
metadata: Shared.CreateResourceMetadata;
|
|
116
|
+
/**
|
|
117
|
+
* Body param
|
|
118
|
+
*/
|
|
115
119
|
spec: ToolSpec;
|
|
116
120
|
}
|
|
117
121
|
export interface ToolRetrieveParams {
|
|
118
122
|
/**
|
|
119
|
-
*
|
|
120
|
-
|
|
123
|
+
* Workspace ID.
|
|
124
|
+
*/
|
|
125
|
+
workspaceId: string;
|
|
126
|
+
/**
|
|
127
|
+
* Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
|
|
121
128
|
*/
|
|
122
129
|
toolSetId: string;
|
|
123
130
|
}
|
|
124
131
|
export interface ToolUpdateParams {
|
|
125
132
|
/**
|
|
126
|
-
* Path param:
|
|
127
|
-
|
|
133
|
+
* Path param: Workspace ID.
|
|
134
|
+
*/
|
|
135
|
+
workspaceId: string;
|
|
136
|
+
/**
|
|
137
|
+
* Path param: Tool set ID. Accepts the canonical ts\_… form or the
|
|
138
|
+
* external_id:<value> form.
|
|
128
139
|
*/
|
|
129
140
|
toolSetId: string;
|
|
130
141
|
/**
|
|
@@ -145,43 +156,51 @@ export interface ToolUpdateParams {
|
|
|
145
156
|
}
|
|
146
157
|
export interface ToolListParams extends CursorPaginationParams {
|
|
147
158
|
/**
|
|
148
|
-
*
|
|
159
|
+
* Path param: Workspace ID.
|
|
160
|
+
*/
|
|
161
|
+
workspaceId: string;
|
|
162
|
+
/**
|
|
163
|
+
* Query param: Filter by bundle_key — return only resources owned by this bundle.
|
|
149
164
|
*/
|
|
150
165
|
bundleKey?: string;
|
|
151
166
|
/**
|
|
152
|
-
* When set to true you may use more of your alloted API rate-limit
|
|
167
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
153
168
|
*/
|
|
154
169
|
includeInfo?: boolean;
|
|
155
170
|
/**
|
|
156
|
-
* Filter by tool name (exact match). Multiple values are OR'd
|
|
171
|
+
* Query param: Filter by tool name (exact match). Multiple values are OR'd
|
|
172
|
+
* together.
|
|
157
173
|
*/
|
|
158
174
|
names?: Array<string>;
|
|
159
175
|
/**
|
|
160
|
-
* Filter expression (query param: prefix)
|
|
176
|
+
* Query param: Filter expression (query param: prefix)
|
|
161
177
|
*/
|
|
162
178
|
prefix?: string;
|
|
163
179
|
/**
|
|
164
|
-
* Free-form search query
|
|
180
|
+
* Query param: Free-form search query
|
|
165
181
|
*/
|
|
166
182
|
query?: string;
|
|
167
183
|
/**
|
|
168
|
-
* Filter by approval requirement. Omitted = no filter; true = only
|
|
169
|
-
* approval; false = only tools not requiring approval.
|
|
184
|
+
* Query param: Filter by approval requirement. Omitted = no filter; true = only
|
|
185
|
+
* tools requiring approval; false = only tools not requiring approval.
|
|
170
186
|
*/
|
|
171
187
|
requiresApproval?: boolean;
|
|
172
188
|
/**
|
|
173
|
-
* Sort order for results (asc or desc by creation time)
|
|
189
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
174
190
|
*/
|
|
175
191
|
sortOrder?: string;
|
|
176
192
|
/**
|
|
177
|
-
* Filter by tool status. Multiple values are OR'd together.
|
|
193
|
+
* Query param: Filter by tool status. Multiple values are OR'd together.
|
|
178
194
|
*/
|
|
179
195
|
statuses?: Array<'TOOL_STATUS_UNSPECIFIED' | 'TOOL_STATUS_AVAILABLE' | 'TOOL_STATUS_OMITTED' | 'TOOL_STATUS_ARCHIVED'>;
|
|
180
196
|
}
|
|
181
197
|
export interface ToolDeleteParams {
|
|
182
198
|
/**
|
|
183
|
-
*
|
|
184
|
-
|
|
199
|
+
* Workspace ID.
|
|
200
|
+
*/
|
|
201
|
+
workspaceId: string;
|
|
202
|
+
/**
|
|
203
|
+
* Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
|
|
185
204
|
*/
|
|
186
205
|
toolSetId: string;
|
|
187
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../src/resources/tool-sets/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB
|
|
1
|
+
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../../src/resources/tool-sets/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;;GAMG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ/F;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAK5F;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQxF;;OAEG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,G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E,MAAM,CAAC;IAEf;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CACd,yBAAyB,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,sBAAsB,CACrG,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -5,21 +5,17 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
5
5
|
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
8
|
+
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
9
|
+
* and tools define specific capabilities available to agents.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* Authentication: Bearer token (JWT)
|
|
16
|
-
* Scope: Workspace-level operations
|
|
11
|
+
* When a tool set is managed, only API key actors can modify its tools; human
|
|
12
|
+
* (profile) actors cannot.
|
|
17
13
|
*/
|
|
18
14
|
export declare class Tools extends APIResource {
|
|
19
15
|
/**
|
|
20
16
|
* Creates a new tool in the tool set
|
|
21
17
|
*/
|
|
22
|
-
create(toolSetID: string,
|
|
18
|
+
create(toolSetID: string, params: ToolCreateParams, options?: RequestOptions): APIPromise<Tool>;
|
|
23
19
|
/**
|
|
24
20
|
* Retrieves a tool by ID from the workspace
|
|
25
21
|
*/
|
|
@@ -31,7 +27,7 @@ export declare class Tools extends APIResource {
|
|
|
31
27
|
/**
|
|
32
28
|
* Lists all tools in the tool set
|
|
33
29
|
*/
|
|
34
|
-
list(toolSetID: string,
|
|
30
|
+
list(toolSetID: string, params: ToolListParams, options?: RequestOptions): PagePromise<ToolsCursorPagination, Tool>;
|
|
35
31
|
/**
|
|
36
32
|
* Deletes a tool in the tool set
|
|
37
33
|
*/
|
|
@@ -72,9 +68,9 @@ export interface Tool {
|
|
|
72
68
|
}
|
|
73
69
|
export interface ToolInfo {
|
|
74
70
|
/**
|
|
75
|
-
*
|
|
76
|
-
* account-scoped
|
|
77
|
-
*
|
|
71
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
72
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
73
|
+
* workspaces.
|
|
78
74
|
*/
|
|
79
75
|
createdBy?: AccountAPI.Profile;
|
|
80
76
|
/**
|
|
@@ -107,24 +103,39 @@ export interface ToolSpecConfig {
|
|
|
107
103
|
}
|
|
108
104
|
export interface ToolCreateParams {
|
|
109
105
|
/**
|
|
110
|
-
*
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
* Path param: Workspace ID.
|
|
107
|
+
*/
|
|
108
|
+
workspaceId: string;
|
|
109
|
+
/**
|
|
110
|
+
* Body param: CreateResourceMetadata contains the user-provided fields for
|
|
111
|
+
* creating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
112
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
113
|
+
* server.
|
|
113
114
|
*/
|
|
114
115
|
metadata: Shared.CreateResourceMetadata;
|
|
116
|
+
/**
|
|
117
|
+
* Body param
|
|
118
|
+
*/
|
|
115
119
|
spec: ToolSpec;
|
|
116
120
|
}
|
|
117
121
|
export interface ToolRetrieveParams {
|
|
118
122
|
/**
|
|
119
|
-
*
|
|
120
|
-
|
|
123
|
+
* Workspace ID.
|
|
124
|
+
*/
|
|
125
|
+
workspaceId: string;
|
|
126
|
+
/**
|
|
127
|
+
* Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
|
|
121
128
|
*/
|
|
122
129
|
toolSetId: string;
|
|
123
130
|
}
|
|
124
131
|
export interface ToolUpdateParams {
|
|
125
132
|
/**
|
|
126
|
-
* Path param:
|
|
127
|
-
|
|
133
|
+
* Path param: Workspace ID.
|
|
134
|
+
*/
|
|
135
|
+
workspaceId: string;
|
|
136
|
+
/**
|
|
137
|
+
* Path param: Tool set ID. Accepts the canonical ts\_… form or the
|
|
138
|
+
* external_id:<value> form.
|
|
128
139
|
*/
|
|
129
140
|
toolSetId: string;
|
|
130
141
|
/**
|
|
@@ -145,43 +156,51 @@ export interface ToolUpdateParams {
|
|
|
145
156
|
}
|
|
146
157
|
export interface ToolListParams extends CursorPaginationParams {
|
|
147
158
|
/**
|
|
148
|
-
*
|
|
159
|
+
* Path param: Workspace ID.
|
|
160
|
+
*/
|
|
161
|
+
workspaceId: string;
|
|
162
|
+
/**
|
|
163
|
+
* Query param: Filter by bundle_key — return only resources owned by this bundle.
|
|
149
164
|
*/
|
|
150
165
|
bundleKey?: string;
|
|
151
166
|
/**
|
|
152
|
-
* When set to true you may use more of your alloted API rate-limit
|
|
167
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
153
168
|
*/
|
|
154
169
|
includeInfo?: boolean;
|
|
155
170
|
/**
|
|
156
|
-
* Filter by tool name (exact match). Multiple values are OR'd
|
|
171
|
+
* Query param: Filter by tool name (exact match). Multiple values are OR'd
|
|
172
|
+
* together.
|
|
157
173
|
*/
|
|
158
174
|
names?: Array<string>;
|
|
159
175
|
/**
|
|
160
|
-
* Filter expression (query param: prefix)
|
|
176
|
+
* Query param: Filter expression (query param: prefix)
|
|
161
177
|
*/
|
|
162
178
|
prefix?: string;
|
|
163
179
|
/**
|
|
164
|
-
* Free-form search query
|
|
180
|
+
* Query param: Free-form search query
|
|
165
181
|
*/
|
|
166
182
|
query?: string;
|
|
167
183
|
/**
|
|
168
|
-
* Filter by approval requirement. Omitted = no filter; true = only
|
|
169
|
-
* approval; false = only tools not requiring approval.
|
|
184
|
+
* Query param: Filter by approval requirement. Omitted = no filter; true = only
|
|
185
|
+
* tools requiring approval; false = only tools not requiring approval.
|
|
170
186
|
*/
|
|
171
187
|
requiresApproval?: boolean;
|
|
172
188
|
/**
|
|
173
|
-
* Sort order for results (asc or desc by creation time)
|
|
189
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
174
190
|
*/
|
|
175
191
|
sortOrder?: string;
|
|
176
192
|
/**
|
|
177
|
-
* Filter by tool status. Multiple values are OR'd together.
|
|
193
|
+
* Query param: Filter by tool status. Multiple values are OR'd together.
|
|
178
194
|
*/
|
|
179
195
|
statuses?: Array<'TOOL_STATUS_UNSPECIFIED' | 'TOOL_STATUS_AVAILABLE' | 'TOOL_STATUS_OMITTED' | 'TOOL_STATUS_ARCHIVED'>;
|
|
180
196
|
}
|
|
181
197
|
export interface ToolDeleteParams {
|
|
182
198
|
/**
|
|
183
|
-
*
|
|
184
|
-
|
|
199
|
+
* Workspace ID.
|
|
200
|
+
*/
|
|
201
|
+
workspaceId: string;
|
|
202
|
+
/**
|
|
203
|
+
* Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
|
|
185
204
|
*/
|
|
186
205
|
toolSetId: string;
|
|
187
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/resources/tool-sets/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/resources/tool-sets/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;;GAMG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ/F;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAK5F;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQxF;;OAEG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC;IAS3C;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAOzF;AAED,MAAM,MAAM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GAAG,sBAAsB,CACrG,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -7,52 +7,53 @@ const pagination_1 = require("../../core/pagination.js");
|
|
|
7
7
|
const headers_1 = require("../../internal/headers.js");
|
|
8
8
|
const path_1 = require("../../internal/utils/path.js");
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
10
|
+
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
11
|
+
* and tools define specific capabilities available to agents.
|
|
13
12
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* Authentication: Bearer token (JWT)
|
|
18
|
-
* Scope: Workspace-level operations
|
|
13
|
+
* When a tool set is managed, only API key actors can modify its tools; human
|
|
14
|
+
* (profile) actors cannot.
|
|
19
15
|
*/
|
|
20
16
|
class Tools extends resource_1.APIResource {
|
|
21
17
|
/**
|
|
22
18
|
* Creates a new tool in the tool set
|
|
23
19
|
*/
|
|
24
|
-
create(toolSetID,
|
|
25
|
-
|
|
20
|
+
create(toolSetID, params, options) {
|
|
21
|
+
const { workspaceId, ...body } = params;
|
|
22
|
+
return this._client.post((0, path_1.path) `/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`, {
|
|
23
|
+
body,
|
|
24
|
+
...options,
|
|
25
|
+
});
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Retrieves a tool by ID from the workspace
|
|
29
29
|
*/
|
|
30
30
|
retrieve(id, params, options) {
|
|
31
|
-
const { toolSetId } = params;
|
|
32
|
-
return this._client.get((0, path_1.path) `/v1/tool_sets/${toolSetId}/tools/${id}`, options);
|
|
31
|
+
const { workspaceId, toolSetId } = params;
|
|
32
|
+
return this._client.get((0, path_1.path) `/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, options);
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Updates a tool in the tool set
|
|
36
36
|
*/
|
|
37
37
|
update(id, params, options) {
|
|
38
|
-
const { toolSetId, ...body } = params;
|
|
39
|
-
return this._client.put((0, path_1.path) `/v1/tool_sets/${toolSetId}/tools/${id}`, {
|
|
38
|
+
const { workspaceId, toolSetId, ...body } = params;
|
|
39
|
+
return this._client.put((0, path_1.path) `/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
|
|
40
|
+
body,
|
|
41
|
+
...options,
|
|
42
|
+
});
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
45
|
* Lists all tools in the tool set
|
|
43
46
|
*/
|
|
44
|
-
list(toolSetID,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
...options,
|
|
48
|
-
});
|
|
47
|
+
list(toolSetID, params, options) {
|
|
48
|
+
const { workspaceId, ...query } = params;
|
|
49
|
+
return this._client.getAPIList((0, path_1.path) `/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`, (pagination_1.CursorPagination), { query, ...options });
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
52
|
* Deletes a tool in the tool set
|
|
52
53
|
*/
|
|
53
54
|
delete(id, params, options) {
|
|
54
|
-
const { toolSetId } = params;
|
|
55
|
-
return this._client.delete((0, path_1.path) `/v1/tool_sets/${toolSetId}/tools/${id}`, {
|
|
55
|
+
const { workspaceId, toolSetId } = params;
|
|
56
|
+
return this._client.delete((0, path_1.path) `/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
|
|
56
57
|
...options,
|
|
57
58
|
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
58
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/resources/tool-sets/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/resources/tool-sets/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;GAMG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,MAAM,CAAC,SAAiB,EAAE,MAAwB,EAAE,OAAwB;QAC1E,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,cAAc,SAAS,QAAQ,EAAE;YACzF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,MAA0B,EAAE,OAAwB;QACvE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA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";
|
|
5
5
|
import { path } from "../../internal/utils/path.mjs";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
7
|
+
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
8
|
+
* and tools define specific capabilities available to agents.
|
|
10
9
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Authentication: Bearer token (JWT)
|
|
15
|
-
* Scope: Workspace-level operations
|
|
10
|
+
* When a tool set is managed, only API key actors can modify its tools; human
|
|
11
|
+
* (profile) actors cannot.
|
|
16
12
|
*/
|
|
17
13
|
export class Tools extends APIResource {
|
|
18
14
|
/**
|
|
19
15
|
* Creates a new tool in the tool set
|
|
20
16
|
*/
|
|
21
|
-
create(toolSetID,
|
|
22
|
-
|
|
17
|
+
create(toolSetID, params, options) {
|
|
18
|
+
const { workspaceId, ...body } = params;
|
|
19
|
+
return this._client.post(path `/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`, {
|
|
20
|
+
body,
|
|
21
|
+
...options,
|
|
22
|
+
});
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Retrieves a tool by ID from the workspace
|
|
26
26
|
*/
|
|
27
27
|
retrieve(id, params, options) {
|
|
28
|
-
const { toolSetId } = params;
|
|
29
|
-
return this._client.get(path `/v1/tool_sets/${toolSetId}/tools/${id}`, options);
|
|
28
|
+
const { workspaceId, toolSetId } = params;
|
|
29
|
+
return this._client.get(path `/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, options);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Updates a tool in the tool set
|
|
33
33
|
*/
|
|
34
34
|
update(id, params, options) {
|
|
35
|
-
const { toolSetId, ...body } = params;
|
|
36
|
-
return this._client.put(path `/v1/tool_sets/${toolSetId}/tools/${id}`, {
|
|
35
|
+
const { workspaceId, toolSetId, ...body } = params;
|
|
36
|
+
return this._client.put(path `/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
|
|
37
|
+
body,
|
|
38
|
+
...options,
|
|
39
|
+
});
|
|
37
40
|
}
|
|
38
41
|
/**
|
|
39
42
|
* Lists all tools in the tool set
|
|
40
43
|
*/
|
|
41
|
-
list(toolSetID,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
...options,
|
|
45
|
-
});
|
|
44
|
+
list(toolSetID, params, options) {
|
|
45
|
+
const { workspaceId, ...query } = params;
|
|
46
|
+
return this._client.getAPIList(path `/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`, (CursorPagination), { query, ...options });
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* Deletes a tool in the tool set
|
|
49
50
|
*/
|
|
50
51
|
delete(id, params, options) {
|
|
51
|
-
const { toolSetId } = params;
|
|
52
|
-
return this._client.delete(path `/v1/tool_sets/${toolSetId}/tools/${id}`, {
|
|
52
|
+
const { workspaceId, toolSetId } = params;
|
|
53
|
+
return this._client.delete(path `/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
|
|
53
54
|
...options,
|
|
54
55
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
55
56
|
});
|