@reminix/sdk 0.9.0 → 0.11.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +53 -6
  3. package/client.d.mts +20 -11
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +20 -11
  6. package/client.d.ts.map +1 -1
  7. package/client.js +18 -6
  8. package/client.js.map +1 -1
  9. package/client.mjs +18 -6
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +57 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +57 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +108 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +102 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/package.json +11 -1
  28. package/pagination.d.mts +2 -0
  29. package/pagination.d.mts.map +1 -0
  30. package/pagination.d.ts +2 -0
  31. package/pagination.d.ts.map +1 -0
  32. package/pagination.js +6 -0
  33. package/pagination.js.map +1 -0
  34. package/pagination.mjs +2 -0
  35. package/pagination.mjs.map +1 -0
  36. package/resources/agents.d.mts +273 -148
  37. package/resources/agents.d.mts.map +1 -1
  38. package/resources/agents.d.ts +273 -148
  39. package/resources/agents.d.ts.map +1 -1
  40. package/resources/agents.js +29 -3
  41. package/resources/agents.js.map +1 -1
  42. package/resources/agents.mjs +29 -3
  43. package/resources/agents.mjs.map +1 -1
  44. package/resources/conversations.d.mts +107 -0
  45. package/resources/conversations.d.mts.map +1 -0
  46. package/resources/conversations.d.ts +107 -0
  47. package/resources/conversations.d.ts.map +1 -0
  48. package/resources/conversations.js +41 -0
  49. package/resources/conversations.js.map +1 -0
  50. package/resources/conversations.mjs +37 -0
  51. package/resources/conversations.mjs.map +1 -0
  52. package/resources/execution-logs.d.mts +93 -0
  53. package/resources/execution-logs.d.mts.map +1 -0
  54. package/resources/execution-logs.d.ts +93 -0
  55. package/resources/execution-logs.d.ts.map +1 -0
  56. package/resources/execution-logs.js +33 -0
  57. package/resources/execution-logs.js.map +1 -0
  58. package/resources/execution-logs.mjs +29 -0
  59. package/resources/execution-logs.mjs.map +1 -0
  60. package/resources/index.d.mts +5 -4
  61. package/resources/index.d.mts.map +1 -1
  62. package/resources/index.d.ts +5 -4
  63. package/resources/index.d.ts.map +1 -1
  64. package/resources/index.js +7 -5
  65. package/resources/index.js.map +1 -1
  66. package/resources/index.mjs +3 -2
  67. package/resources/index.mjs.map +1 -1
  68. package/resources/projects.d.mts +5 -5
  69. package/resources/projects.d.mts.map +1 -1
  70. package/resources/projects.d.ts +5 -5
  71. package/resources/projects.d.ts.map +1 -1
  72. package/resources/tools.d.mts +152 -0
  73. package/resources/tools.d.mts.map +1 -0
  74. package/resources/tools.d.ts +152 -0
  75. package/resources/tools.d.ts.map +1 -0
  76. package/resources/tools.js +59 -0
  77. package/resources/tools.js.map +1 -0
  78. package/resources/tools.mjs +55 -0
  79. package/resources/tools.mjs.map +1 -0
  80. package/src/client.ts +96 -22
  81. package/src/core/pagination.ts +165 -0
  82. package/src/index.ts +1 -0
  83. package/src/pagination.ts +2 -0
  84. package/src/resources/agents.ts +336 -165
  85. package/src/resources/conversations.ts +146 -0
  86. package/src/resources/execution-logs.ts +125 -0
  87. package/src/resources/index.ts +31 -8
  88. package/src/resources/projects.ts +5 -5
  89. package/src/resources/tools.ts +192 -0
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.mts.map +1 -1
  93. package/version.d.ts +1 -1
  94. package/version.d.ts.map +1 -1
  95. package/version.js +1 -1
  96. package/version.js.map +1 -1
  97. package/version.mjs +1 -1
  98. package/version.mjs.map +1 -1
  99. package/resources/deployments.d.mts +0 -4
  100. package/resources/deployments.d.mts.map +0 -1
  101. package/resources/deployments.d.ts +0 -4
  102. package/resources/deployments.d.ts.map +0 -1
  103. package/resources/deployments.js +0 -9
  104. package/resources/deployments.js.map +0 -1
  105. package/resources/deployments.mjs +0 -5
  106. package/resources/deployments.mjs.map +0 -1
  107. package/resources/secrets.d.mts +0 -4
  108. package/resources/secrets.d.mts.map +0 -1
  109. package/resources/secrets.d.ts +0 -4
  110. package/resources/secrets.d.ts.map +0 -1
  111. package/resources/secrets.js +0 -9
  112. package/resources/secrets.js.map +0 -1
  113. package/resources/secrets.mjs +0 -5
  114. package/resources/secrets.mjs.map +0 -1
  115. package/src/resources/deployments.ts +0 -5
  116. package/src/resources/secrets.ts +0 -5
@@ -1,6 +1,7 @@
1
- export { Agents, type Context, type StreamChunk, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentInvokeParams, type AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming, } from "./agents.js";
1
+ export { Agents, type Agent, type AgentConfig, type ChatMessage, type StreamChunk, type AgentChatResponse, type AgentExecuteResponse, type AgentListParams, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentExecuteParams, type AgentExecuteParamsNonStreaming, type AgentExecuteParamsStreaming, type AgentsCursor, } from "./agents.js";
2
2
  export { ClientTokens, type ClientTokenCreateResponse, type ClientTokenCreateParams } from "./client-tokens.js";
3
- export { Deployments } from "./deployments.js";
4
- export { Projects, type ProjectRetrieveCurrentResponse } from "./projects.js";
5
- export { Secrets } from "./secrets.js";
3
+ export { Conversations, type Conversation, type ConversationRetrieveResponse, type ConversationListParams, type ConversationsCursor, } from "./conversations.js";
4
+ export { ExecutionLogs, type ExecutionLog, type ExecutionLogListParams, type ExecutionLogsCursor, } from "./execution-logs.js";
5
+ export { Projects, type Project } from "./projects.js";
6
+ export { Tools, type Tool, type ToolExecuteResponse, type ToolListParams, type ToolExecuteParams, type ToolsCursor, } from "./tools.js";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC;OACM,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EAAE,WAAW,EAAE;OACf,EAAE,QAAQ,EAAE,KAAK,8BAA8B,EAAE;OACjD,EAAE,OAAO,EAAE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,YAAY,GAClB;OACM,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GACzB;OACM,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GACzB;OACM,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE;OAC1B,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB"}
@@ -1,15 +1,17 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Secrets = exports.Projects = exports.Deployments = exports.ClientTokens = exports.Agents = void 0;
4
+ exports.Tools = exports.Projects = exports.ExecutionLogs = exports.Conversations = exports.ClientTokens = exports.Agents = void 0;
5
5
  var agents_1 = require("./agents.js");
6
6
  Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return agents_1.Agents; } });
7
7
  var client_tokens_1 = require("./client-tokens.js");
8
8
  Object.defineProperty(exports, "ClientTokens", { enumerable: true, get: function () { return client_tokens_1.ClientTokens; } });
9
- var deployments_1 = require("./deployments.js");
10
- Object.defineProperty(exports, "Deployments", { enumerable: true, get: function () { return deployments_1.Deployments; } });
9
+ var conversations_1 = require("./conversations.js");
10
+ Object.defineProperty(exports, "Conversations", { enumerable: true, get: function () { return conversations_1.Conversations; } });
11
+ var execution_logs_1 = require("./execution-logs.js");
12
+ Object.defineProperty(exports, "ExecutionLogs", { enumerable: true, get: function () { return execution_logs_1.ExecutionLogs; } });
11
13
  var projects_1 = require("./projects.js");
12
14
  Object.defineProperty(exports, "Projects", { enumerable: true, get: function () { return projects_1.Projects; } });
13
- var secrets_1 = require("./secrets.js");
14
- Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return secrets_1.Secrets; } });
15
+ var tools_1 = require("./tools.js");
16
+ Object.defineProperty(exports, "Tools", { enumerable: true, get: function () { return tools_1.Tools; } });
15
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAYkB;AAXhB,gGAAA,MAAM,OAAA;AAYR,oDAA6G;AAApG,6GAAA,YAAY,OAAA;AACrB,gDAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,0CAA2E;AAAlE,oGAAA,QAAQ,OAAA;AACjB,wCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAgBkB;AAfhB,gGAAA,MAAM,OAAA;AAgBR,oDAA6G;AAApG,6GAAA,YAAY,OAAA;AACrB,oDAMyB;AALvB,8GAAA,aAAa,OAAA;AAMf,sDAK0B;AAJxB,+GAAA,aAAa,OAAA;AAKf,0CAAoD;AAA3C,oGAAA,QAAQ,OAAA;AACjB,oCAOiB;AANf,8FAAA,KAAK,OAAA"}
@@ -1,7 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export { Agents, } from "./agents.mjs";
3
3
  export { ClientTokens } from "./client-tokens.mjs";
4
- export { Deployments } from "./deployments.mjs";
4
+ export { Conversations, } from "./conversations.mjs";
5
+ export { ExecutionLogs, } from "./execution-logs.mjs";
5
6
  export { Projects } from "./projects.mjs";
6
- export { Secrets } from "./secrets.mjs";
7
+ export { Tools, } from "./tools.mjs";
7
8
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAWP;OACM,EAAE,YAAY,EAAgE;OAC9E,EAAE,WAAW,EAAE;OACf,EAAE,QAAQ,EAAuC;OACjD,EAAE,OAAO,EAAE"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAeP;OACM,EAAE,YAAY,EAAgE;OAC9E,EACL,aAAa,GAKd;OACM,EACL,aAAa,GAId;OACM,EAAE,QAAQ,EAAgB;OAC1B,EACL,KAAK,GAMN"}
@@ -16,9 +16,9 @@ export declare class Projects extends APIResource {
16
16
  * This endpoint is useful for verifying your API key is valid and retrieving
17
17
  * project details.
18
18
  */
19
- retrieveCurrent(options?: RequestOptions): APIPromise<ProjectRetrieveCurrentResponse>;
19
+ retrieveCurrent(options?: RequestOptions): APIPromise<Project>;
20
20
  }
21
- export interface ProjectRetrieveCurrentResponse {
21
+ export interface Project {
22
22
  /**
23
23
  * Unique identifier for the project
24
24
  */
@@ -34,7 +34,7 @@ export interface ProjectRetrieveCurrentResponse {
34
34
  /**
35
35
  * Organization that owns this project
36
36
  */
37
- organization: ProjectRetrieveCurrentResponse.Organization;
37
+ organization: Project.Organization;
38
38
  /**
39
39
  * ID of the organization that owns this project
40
40
  */
@@ -48,7 +48,7 @@ export interface ProjectRetrieveCurrentResponse {
48
48
  */
49
49
  updatedAt: string;
50
50
  }
51
- export declare namespace ProjectRetrieveCurrentResponse {
51
+ export declare namespace Project {
52
52
  /**
53
53
  * Organization that owns this project
54
54
  */
@@ -68,6 +68,6 @@ export declare namespace ProjectRetrieveCurrentResponse {
68
68
  }
69
69
  }
70
70
  export declare namespace Projects {
71
- export { type ProjectRetrieveCurrentResponse as ProjectRetrieveCurrentResponse };
71
+ export { type Project as Project };
72
72
  }
73
73
  //# sourceMappingURL=projects.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;CAGtF;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IA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AAC;QAEX;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAE,CAAC;CACpC"}
@@ -16,9 +16,9 @@ export declare class Projects extends APIResource {
16
16
  * This endpoint is useful for verifying your API key is valid and retrieving
17
17
  * project details.
18
18
  */
19
- retrieveCurrent(options?: RequestOptions): APIPromise<ProjectRetrieveCurrentResponse>;
19
+ retrieveCurrent(options?: RequestOptions): APIPromise<Project>;
20
20
  }
21
- export interface ProjectRetrieveCurrentResponse {
21
+ export interface Project {
22
22
  /**
23
23
  * Unique identifier for the project
24
24
  */
@@ -34,7 +34,7 @@ export interface ProjectRetrieveCurrentResponse {
34
34
  /**
35
35
  * Organization that owns this project
36
36
  */
37
- organization: ProjectRetrieveCurrentResponse.Organization;
37
+ organization: Project.Organization;
38
38
  /**
39
39
  * ID of the organization that owns this project
40
40
  */
@@ -48,7 +48,7 @@ export interface ProjectRetrieveCurrentResponse {
48
48
  */
49
49
  updatedAt: string;
50
50
  }
51
- export declare namespace ProjectRetrieveCurrentResponse {
51
+ export declare namespace Project {
52
52
  /**
53
53
  * Organization that owns this project
54
54
  */
@@ -68,6 +68,6 @@ export declare namespace ProjectRetrieveCurrentResponse {
68
68
  }
69
69
  }
70
70
  export declare namespace Projects {
71
- export { type ProjectRetrieveCurrentResponse as ProjectRetrieveCurrentResponse };
71
+ export { type Project as Project };
72
72
  }
73
73
  //# sourceMappingURL=projects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe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AE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,OAAO,CAAC;IACvB;;OAEG;IACH,UAAiB,YAAY;QAC3B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAE,CAAC;CACpC"}
@@ -0,0 +1,152 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
4
+ import { RequestOptions } from "../internal/request-options.mjs";
5
+ export declare class Tools extends APIResource {
6
+ /**
7
+ * Get details of a specific tool by name.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const tool = await client.tools.retrieve('x');
12
+ * ```
13
+ */
14
+ retrieve(name: string, options?: RequestOptions): APIPromise<Tool>;
15
+ /**
16
+ * List all tools in the project with optional filtering by type and status. Tools
17
+ * are automatically discovered from deployments.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // Automatically fetches more pages as needed.
22
+ * for await (const tool of client.tools.list()) {
23
+ * // ...
24
+ * }
25
+ * ```
26
+ */
27
+ list(query?: ToolListParams | null | undefined, options?: RequestOptions): PagePromise<ToolsCursor, Tool>;
28
+ /**
29
+ * Execute a tool with the provided input parameters.
30
+ *
31
+ * **Timeout:** Tool executions have a 60-second timeout. If the tool takes longer
32
+ * to respond, you will receive a 504 Gateway Timeout error.
33
+ *
34
+ * **Use cases:**
35
+ *
36
+ * - Calling custom tools from your deployment
37
+ * - Executing utility functions
38
+ * - Integrating with external services via tools
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const response = await client.tools.execute('x', {
43
+ * input: { name: 'World', greeting: 'Hello' },
44
+ * });
45
+ * ```
46
+ */
47
+ execute(name: string, body: ToolExecuteParams, options?: RequestOptions): APIPromise<ToolExecuteResponse>;
48
+ }
49
+ export type ToolsCursor = Cursor<Tool>;
50
+ export interface Tool {
51
+ /**
52
+ * Unique tool ID
53
+ */
54
+ id: string;
55
+ /**
56
+ * Creation timestamp
57
+ */
58
+ createdAt: string;
59
+ /**
60
+ * User who created the tool (for managed tools)
61
+ */
62
+ createdBy: string | null;
63
+ /**
64
+ * Tool description
65
+ */
66
+ description: string | null;
67
+ /**
68
+ * When the tool was discovered
69
+ */
70
+ discoveredAt: string | null;
71
+ /**
72
+ * Tool name
73
+ */
74
+ name: string;
75
+ /**
76
+ * JSON Schema for agent input parameters
77
+ */
78
+ output: Tool.Output | null;
79
+ /**
80
+ * JSON Schema for agent input parameters
81
+ */
82
+ parameters: Tool.Parameters | null;
83
+ /**
84
+ * Project ID
85
+ */
86
+ projectId: string;
87
+ /**
88
+ * Tool status
89
+ */
90
+ status: 'active' | 'inactive';
91
+ /**
92
+ * Tool type: "managed" for platform-provided, or "{language}" for custom tools
93
+ * (e.g., "python", "typescript")
94
+ */
95
+ type: string;
96
+ /**
97
+ * Last update timestamp
98
+ */
99
+ updatedAt: string;
100
+ }
101
+ export declare namespace Tool {
102
+ /**
103
+ * JSON Schema for agent input parameters
104
+ */
105
+ interface Output {
106
+ type: string;
107
+ properties?: {
108
+ [key: string]: unknown;
109
+ };
110
+ required?: Array<string>;
111
+ [k: string]: unknown;
112
+ }
113
+ /**
114
+ * JSON Schema for agent input parameters
115
+ */
116
+ interface Parameters {
117
+ type: string;
118
+ properties?: {
119
+ [key: string]: unknown;
120
+ };
121
+ required?: Array<string>;
122
+ [k: string]: unknown;
123
+ }
124
+ }
125
+ export interface ToolExecuteResponse {
126
+ /**
127
+ * Output from the tool execution.
128
+ */
129
+ output?: unknown;
130
+ }
131
+ export interface ToolListParams extends CursorParams {
132
+ /**
133
+ * Filter by tool status
134
+ */
135
+ status?: 'active' | 'inactive';
136
+ /**
137
+ * Filter by tool type (python, typescript)
138
+ */
139
+ type?: string;
140
+ }
141
+ export interface ToolExecuteParams {
142
+ /**
143
+ * Input parameters for the tool. Structure depends on tool definition.
144
+ */
145
+ input: {
146
+ [key: string]: unknown;
147
+ };
148
+ }
149
+ export declare namespace Tools {
150
+ export { type Tool as Tool, type ToolExecuteResponse as ToolExecuteResponse, type ToolsCursor as ToolsCursor, type ToolListParams as ToolListParams, type ToolExecuteParams as ToolExecuteParams, };
151
+ }
152
+ //# sourceMappingURL=tools.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.mts","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAIlE;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC;IAIjC;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG1G;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAEvC,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;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,GAAG,UAAU,CAAC;IAE/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,152 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
4
+ import { RequestOptions } from "../internal/request-options.js";
5
+ export declare class Tools extends APIResource {
6
+ /**
7
+ * Get details of a specific tool by name.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const tool = await client.tools.retrieve('x');
12
+ * ```
13
+ */
14
+ retrieve(name: string, options?: RequestOptions): APIPromise<Tool>;
15
+ /**
16
+ * List all tools in the project with optional filtering by type and status. Tools
17
+ * are automatically discovered from deployments.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // Automatically fetches more pages as needed.
22
+ * for await (const tool of client.tools.list()) {
23
+ * // ...
24
+ * }
25
+ * ```
26
+ */
27
+ list(query?: ToolListParams | null | undefined, options?: RequestOptions): PagePromise<ToolsCursor, Tool>;
28
+ /**
29
+ * Execute a tool with the provided input parameters.
30
+ *
31
+ * **Timeout:** Tool executions have a 60-second timeout. If the tool takes longer
32
+ * to respond, you will receive a 504 Gateway Timeout error.
33
+ *
34
+ * **Use cases:**
35
+ *
36
+ * - Calling custom tools from your deployment
37
+ * - Executing utility functions
38
+ * - Integrating with external services via tools
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const response = await client.tools.execute('x', {
43
+ * input: { name: 'World', greeting: 'Hello' },
44
+ * });
45
+ * ```
46
+ */
47
+ execute(name: string, body: ToolExecuteParams, options?: RequestOptions): APIPromise<ToolExecuteResponse>;
48
+ }
49
+ export type ToolsCursor = Cursor<Tool>;
50
+ export interface Tool {
51
+ /**
52
+ * Unique tool ID
53
+ */
54
+ id: string;
55
+ /**
56
+ * Creation timestamp
57
+ */
58
+ createdAt: string;
59
+ /**
60
+ * User who created the tool (for managed tools)
61
+ */
62
+ createdBy: string | null;
63
+ /**
64
+ * Tool description
65
+ */
66
+ description: string | null;
67
+ /**
68
+ * When the tool was discovered
69
+ */
70
+ discoveredAt: string | null;
71
+ /**
72
+ * Tool name
73
+ */
74
+ name: string;
75
+ /**
76
+ * JSON Schema for agent input parameters
77
+ */
78
+ output: Tool.Output | null;
79
+ /**
80
+ * JSON Schema for agent input parameters
81
+ */
82
+ parameters: Tool.Parameters | null;
83
+ /**
84
+ * Project ID
85
+ */
86
+ projectId: string;
87
+ /**
88
+ * Tool status
89
+ */
90
+ status: 'active' | 'inactive';
91
+ /**
92
+ * Tool type: "managed" for platform-provided, or "{language}" for custom tools
93
+ * (e.g., "python", "typescript")
94
+ */
95
+ type: string;
96
+ /**
97
+ * Last update timestamp
98
+ */
99
+ updatedAt: string;
100
+ }
101
+ export declare namespace Tool {
102
+ /**
103
+ * JSON Schema for agent input parameters
104
+ */
105
+ interface Output {
106
+ type: string;
107
+ properties?: {
108
+ [key: string]: unknown;
109
+ };
110
+ required?: Array<string>;
111
+ [k: string]: unknown;
112
+ }
113
+ /**
114
+ * JSON Schema for agent input parameters
115
+ */
116
+ interface Parameters {
117
+ type: string;
118
+ properties?: {
119
+ [key: string]: unknown;
120
+ };
121
+ required?: Array<string>;
122
+ [k: string]: unknown;
123
+ }
124
+ }
125
+ export interface ToolExecuteResponse {
126
+ /**
127
+ * Output from the tool execution.
128
+ */
129
+ output?: unknown;
130
+ }
131
+ export interface ToolListParams extends CursorParams {
132
+ /**
133
+ * Filter by tool status
134
+ */
135
+ status?: 'active' | 'inactive';
136
+ /**
137
+ * Filter by tool type (python, typescript)
138
+ */
139
+ type?: string;
140
+ }
141
+ export interface ToolExecuteParams {
142
+ /**
143
+ * Input parameters for the tool. Structure depends on tool definition.
144
+ */
145
+ input: {
146
+ [key: string]: unknown;
147
+ };
148
+ }
149
+ export declare namespace Tools {
150
+ export { type Tool as Tool, type ToolExecuteResponse as ToolExecuteResponse, type ToolsCursor as ToolsCursor, type ToolListParams as ToolListParams, type ToolExecuteParams as ToolExecuteParams, };
151
+ }
152
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAIlE;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC;IAIjC;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG1G;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAEvC,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EA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AC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Tools = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const pagination_1 = require("../core/pagination.js");
7
+ const path_1 = require("../internal/utils/path.js");
8
+ class Tools extends resource_1.APIResource {
9
+ /**
10
+ * Get details of a specific tool by name.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const tool = await client.tools.retrieve('x');
15
+ * ```
16
+ */
17
+ retrieve(name, options) {
18
+ return this._client.get((0, path_1.path) `/tools/${name}`, options);
19
+ }
20
+ /**
21
+ * List all tools in the project with optional filtering by type and status. Tools
22
+ * are automatically discovered from deployments.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * // Automatically fetches more pages as needed.
27
+ * for await (const tool of client.tools.list()) {
28
+ * // ...
29
+ * }
30
+ * ```
31
+ */
32
+ list(query = {}, options) {
33
+ return this._client.getAPIList('/tools', (pagination_1.Cursor), { query, ...options });
34
+ }
35
+ /**
36
+ * Execute a tool with the provided input parameters.
37
+ *
38
+ * **Timeout:** Tool executions have a 60-second timeout. If the tool takes longer
39
+ * to respond, you will receive a 504 Gateway Timeout error.
40
+ *
41
+ * **Use cases:**
42
+ *
43
+ * - Calling custom tools from your deployment
44
+ * - Executing utility functions
45
+ * - Integrating with external services via tools
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const response = await client.tools.execute('x', {
50
+ * input: { name: 'World', greeting: 'Hello' },
51
+ * });
52
+ * ```
53
+ */
54
+ execute(name, body, options) {
55
+ return this._client.post((0, path_1.path) `/tools/${name}/execute`, { body, ...options });
56
+ }
57
+ }
58
+ exports.Tools = Tools;
59
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,mBAAY,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,IAAY,EAAE,IAAuB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,UAAU,IAAI,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAtDD,sBAsDC"}
@@ -0,0 +1,55 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { Cursor } from "../core/pagination.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class Tools extends APIResource {
6
+ /**
7
+ * Get details of a specific tool by name.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const tool = await client.tools.retrieve('x');
12
+ * ```
13
+ */
14
+ retrieve(name, options) {
15
+ return this._client.get(path `/tools/${name}`, options);
16
+ }
17
+ /**
18
+ * List all tools in the project with optional filtering by type and status. Tools
19
+ * are automatically discovered from deployments.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * // Automatically fetches more pages as needed.
24
+ * for await (const tool of client.tools.list()) {
25
+ * // ...
26
+ * }
27
+ * ```
28
+ */
29
+ list(query = {}, options) {
30
+ return this._client.getAPIList('/tools', (Cursor), { query, ...options });
31
+ }
32
+ /**
33
+ * Execute a tool with the provided input parameters.
34
+ *
35
+ * **Timeout:** Tool executions have a 60-second timeout. If the tool takes longer
36
+ * to respond, you will receive a 504 Gateway Timeout error.
37
+ *
38
+ * **Use cases:**
39
+ *
40
+ * - Calling custom tools from your deployment
41
+ * - Executing utility functions
42
+ * - Integrating with external services via tools
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const response = await client.tools.execute('x', {
47
+ * input: { name: 'World', greeting: 'Hello' },
48
+ * });
49
+ * ```
50
+ */
51
+ execute(name, body, options) {
52
+ return this._client.post(path `/tools/${name}/execute`, { body, ...options });
53
+ }
54
+ }
55
+ //# sourceMappingURL=tools.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,MAAY,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,IAAY,EAAE,IAAuB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,UAAU,IAAI,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}