@agentrun/sdk 0.0.3 → 0.0.4

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 (130) hide show
  1. package/README.md +20 -15
  2. package/dist/agent-runtime/api/index.cjs +907 -0
  3. package/dist/agent-runtime/api/index.cjs.map +1 -0
  4. package/dist/agent-runtime/api/index.d.cts +193 -0
  5. package/dist/agent-runtime/api/index.d.ts +193 -0
  6. package/dist/agent-runtime/api/index.js +882 -0
  7. package/dist/agent-runtime/api/index.js.map +1 -0
  8. package/dist/agent-runtime/index.cjs +2528 -0
  9. package/dist/agent-runtime/index.cjs.map +1 -0
  10. package/dist/agent-runtime/index.d.cts +778 -0
  11. package/dist/agent-runtime/index.d.ts +778 -0
  12. package/dist/agent-runtime/index.js +2496 -0
  13. package/dist/agent-runtime/index.js.map +1 -0
  14. package/dist/base-K1GMfJbH.d.ts +59 -0
  15. package/dist/base-xcWt5bua.d.cts +59 -0
  16. package/dist/client-DHXxjuo3.d.ts +58 -0
  17. package/dist/client-DPUTs69s.d.cts +58 -0
  18. package/dist/config-07gMelJP.d.cts +125 -0
  19. package/dist/config-07gMelJP.d.ts +125 -0
  20. package/dist/control-api-BWD4eua5.d.cts +27 -0
  21. package/dist/control-api-d-82Sgpr.d.ts +27 -0
  22. package/dist/credential/api/index.cjs +655 -0
  23. package/dist/credential/api/index.cjs.map +1 -0
  24. package/dist/credential/api/index.d.cts +93 -0
  25. package/dist/credential/api/index.d.ts +93 -0
  26. package/dist/credential/api/index.js +630 -0
  27. package/dist/credential/api/index.js.map +1 -0
  28. package/dist/credential/index.cjs +1286 -0
  29. package/dist/credential/index.cjs.map +1 -0
  30. package/dist/credential/index.d.cts +246 -0
  31. package/dist/credential/index.d.ts +246 -0
  32. package/dist/credential/index.js +1263 -0
  33. package/dist/credential/index.js.map +1 -0
  34. package/dist/data-api-B-4h9_Vf.d.ts +166 -0
  35. package/dist/data-api-DsG-8JRQ.d.cts +166 -0
  36. package/dist/exception-DM9H2Rpo.d.cts +68 -0
  37. package/dist/exception-DM9H2Rpo.d.ts +68 -0
  38. package/dist/index.cjs +29281 -1427
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +38 -4485
  41. package/dist/index.d.ts +38 -4485
  42. package/dist/index.js +29259 -1426
  43. package/dist/index.js.map +1 -1
  44. package/dist/integration/builtin/index.cjs +9399 -0
  45. package/dist/integration/builtin/index.cjs.map +1 -0
  46. package/dist/integration/builtin/index.d.cts +692 -0
  47. package/dist/integration/builtin/index.d.ts +692 -0
  48. package/dist/integration/builtin/index.js +9363 -0
  49. package/dist/integration/builtin/index.js.map +1 -0
  50. package/dist/integration/index.cjs +9524 -0
  51. package/dist/integration/index.cjs.map +1 -0
  52. package/dist/integration/index.d.cts +98 -0
  53. package/dist/integration/index.d.ts +98 -0
  54. package/dist/integration/index.js +9481 -0
  55. package/dist/integration/index.js.map +1 -0
  56. package/dist/integration/mastra/index.cjs +9383 -0
  57. package/dist/integration/mastra/index.cjs.map +1 -0
  58. package/dist/integration/mastra/index.d.cts +186 -0
  59. package/dist/integration/mastra/index.d.ts +186 -0
  60. package/dist/integration/mastra/index.js +9348 -0
  61. package/dist/integration/mastra/index.js.map +1 -0
  62. package/dist/model/index.cjs +2392 -0
  63. package/dist/model/index.cjs.map +1 -0
  64. package/dist/model/index.d.cts +97 -0
  65. package/dist/model/index.d.ts +97 -0
  66. package/dist/model/index.js +2368 -0
  67. package/dist/model/index.js.map +1 -0
  68. package/dist/model--I90nCqy.d.cts +66 -0
  69. package/dist/model--I90nCqy.d.ts +66 -0
  70. package/dist/model-BV7A6Trb.d.cts +512 -0
  71. package/dist/model-DGBy-o_L.d.cts +176 -0
  72. package/dist/model-DGBy-o_L.d.ts +176 -0
  73. package/dist/model-RiiiZnou.d.ts +512 -0
  74. package/dist/model-service-D-P2FZNi.d.ts +540 -0
  75. package/dist/model-service-VpzBb7rV.d.cts +540 -0
  76. package/dist/resource-CQovFUeh.d.cts +44 -0
  77. package/dist/resource-DnE_DEka.d.ts +44 -0
  78. package/dist/sandbox/index.cjs +3557 -0
  79. package/dist/sandbox/index.cjs.map +1 -0
  80. package/dist/sandbox/index.d.cts +1598 -0
  81. package/dist/sandbox/index.d.ts +1598 -0
  82. package/dist/sandbox/index.js +3532 -0
  83. package/dist/sandbox/index.js.map +1 -0
  84. package/dist/server/adapter/index.cjs +24886 -0
  85. package/dist/server/adapter/index.cjs.map +1 -0
  86. package/dist/server/adapter/index.d.cts +68 -0
  87. package/dist/server/adapter/index.d.ts +68 -0
  88. package/dist/server/adapter/index.js +24883 -0
  89. package/dist/server/adapter/index.js.map +1 -0
  90. package/dist/server/core/index.cjs +313 -0
  91. package/dist/server/core/index.cjs.map +1 -0
  92. package/dist/server/core/index.d.cts +58 -0
  93. package/dist/server/core/index.d.ts +58 -0
  94. package/dist/server/core/index.js +309 -0
  95. package/dist/server/core/index.js.map +1 -0
  96. package/dist/server/index.cjs +25098 -0
  97. package/dist/server/index.cjs.map +1 -0
  98. package/dist/server/index.d.cts +73 -0
  99. package/dist/server/index.d.ts +73 -0
  100. package/dist/server/index.js +25067 -0
  101. package/dist/server/index.js.map +1 -0
  102. package/dist/server/protocol/index.cjs +1057 -0
  103. package/dist/server/protocol/index.cjs.map +1 -0
  104. package/dist/server/protocol/index.d.cts +135 -0
  105. package/dist/server/protocol/index.d.ts +135 -0
  106. package/dist/server/protocol/index.js +1053 -0
  107. package/dist/server/protocol/index.js.map +1 -0
  108. package/dist/tool-CG0LY-ov.d.cts +155 -0
  109. package/dist/tool-JJHam0ms.d.ts +155 -0
  110. package/dist/toolset/api/index.cjs +754 -0
  111. package/dist/toolset/api/index.cjs.map +1 -0
  112. package/dist/toolset/api/index.d.cts +207 -0
  113. package/dist/toolset/api/index.d.ts +207 -0
  114. package/dist/toolset/api/index.js +727 -0
  115. package/dist/toolset/api/index.js.map +1 -0
  116. package/dist/toolset/index.cjs +1945 -0
  117. package/dist/toolset/index.cjs.map +1 -0
  118. package/dist/toolset/index.d.cts +182 -0
  119. package/dist/toolset/index.d.ts +182 -0
  120. package/dist/toolset/index.js +1920 -0
  121. package/dist/toolset/index.js.map +1 -0
  122. package/dist/toolset-BYDvhwRp.d.cts +394 -0
  123. package/dist/toolset-CSRsJxCb.d.ts +394 -0
  124. package/dist/utils/index.cjs +994 -0
  125. package/dist/utils/index.cjs.map +1 -0
  126. package/dist/utils/index.d.cts +30 -0
  127. package/dist/utils/index.d.ts +30 -0
  128. package/dist/utils/index.js +951 -0
  129. package/dist/utils/index.js.map +1 -0
  130. package/package.json +65 -13
@@ -0,0 +1,394 @@
1
+ import { C as Config } from './config-07gMelJP.cjs';
2
+ import { S as Status } from './model--I90nCqy.cjs';
3
+
4
+ /**
5
+ * ToolSet Models
6
+ *
7
+ * ToolSet 相关的数据模型。
8
+ * Data models for ToolSet.
9
+ */
10
+
11
+ /**
12
+ * ToolSet schema type
13
+ */
14
+ declare enum ToolSetSchemaType {
15
+ OPENAPI = "OpenAPI",
16
+ MCP = "MCP"
17
+ }
18
+ /**
19
+ * ToolSet schema
20
+ */
21
+ interface ToolSetSchema {
22
+ /**
23
+ * Schema type (OpenAPI, MCP)
24
+ */
25
+ type?: ToolSetSchemaType;
26
+ /**
27
+ * Schema detail (URL or inline definition)
28
+ */
29
+ detail?: string;
30
+ }
31
+ /**
32
+ * ToolSet authorization configuration
33
+ */
34
+ interface ToolSetAuthorization {
35
+ /**
36
+ * Authorization type
37
+ */
38
+ type?: string;
39
+ /**
40
+ * API Key header name
41
+ */
42
+ apiKeyHeaderName?: string;
43
+ /**
44
+ * API Key value
45
+ */
46
+ apiKeyValue?: string;
47
+ }
48
+ /**
49
+ * ToolSet specification
50
+ */
51
+ interface ToolSetSpec {
52
+ /**
53
+ * Schema configuration
54
+ */
55
+ schema?: ToolSetSchema;
56
+ /**
57
+ * Authorization configuration
58
+ */
59
+ authConfig?: ToolSetAuthorization;
60
+ }
61
+ /**
62
+ * MCP Tool meta
63
+ */
64
+ interface MCPToolMeta {
65
+ /**
66
+ * Tool name
67
+ */
68
+ name?: string;
69
+ /**
70
+ * Tool description
71
+ */
72
+ description?: string;
73
+ inputSchema?: Record<string, any>;
74
+ }
75
+ /**
76
+ * ToolSet status outputs
77
+ */
78
+ interface ToolSetStatusOutputs {
79
+ /**
80
+ * MCP server configuration
81
+ */
82
+ mcpServerConfig?: {
83
+ url?: string;
84
+ transport?: string;
85
+ };
86
+ /**
87
+ * Tools list
88
+ */
89
+ tools?: MCPToolMeta[];
90
+ /**
91
+ * URLs
92
+ */
93
+ urls?: {
94
+ cdpUrl?: string;
95
+ liveViewUrl?: string;
96
+ streamUrl?: string;
97
+ };
98
+ }
99
+ /**
100
+ * ToolSet status
101
+ */
102
+ interface ToolSetStatus {
103
+ /**
104
+ * Current status
105
+ */
106
+ status?: Status;
107
+ /**
108
+ * Status reason
109
+ */
110
+ statusReason?: string;
111
+ /**
112
+ * Outputs
113
+ */
114
+ outputs?: ToolSetStatusOutputs;
115
+ }
116
+ /**
117
+ * ToolSet data interface
118
+ */
119
+ interface ToolSetData {
120
+ name?: string;
121
+ uid?: string;
122
+ kind?: string;
123
+ description?: string;
124
+ createdTime?: string;
125
+ generation?: number;
126
+ labels?: Record<string, string>;
127
+ spec?: ToolSetSpec;
128
+ status?: ToolSetStatus;
129
+ }
130
+ /**
131
+ * ToolSet create input
132
+ */
133
+ interface ToolSetCreateInput {
134
+ /**
135
+ * ToolSet name (required)
136
+ */
137
+ name: string;
138
+ /**
139
+ * Description
140
+ */
141
+ description?: string;
142
+ /**
143
+ * Labels
144
+ */
145
+ labels?: Record<string, string>;
146
+ /**
147
+ * Spec configuration
148
+ */
149
+ spec?: ToolSetSpec;
150
+ }
151
+ /**
152
+ * ToolSet update input
153
+ */
154
+ interface ToolSetUpdateInput {
155
+ /**
156
+ * Description
157
+ */
158
+ description?: string;
159
+ /**
160
+ * Labels
161
+ */
162
+ labels?: Record<string, string>;
163
+ /**
164
+ * Spec configuration
165
+ */
166
+ spec?: ToolSetSpec;
167
+ }
168
+ /**
169
+ * ToolSet list input
170
+ */
171
+ interface ToolSetListInput {
172
+ /**
173
+ * Prefix filter
174
+ */
175
+ prefix?: string;
176
+ /**
177
+ * Page size
178
+ */
179
+ pageSize?: number;
180
+ /**
181
+ * Next token for pagination
182
+ */
183
+ nextToken?: string;
184
+ /**
185
+ * Labels filter
186
+ */
187
+ labels?: Record<string, string>;
188
+ }
189
+ /**
190
+ * JSON Schema compatible tool parameter description
191
+ *
192
+ * Supports complete JSON Schema fields for describing complex nested data structures.
193
+ * JSON Schema 兼容的工具参数描述
194
+ *
195
+ * 支持完整的 JSON Schema 字段,能够描述复杂的嵌套数据结构。
196
+ */
197
+ declare class ToolSchema {
198
+ type?: string;
199
+ description?: string;
200
+ title?: string;
201
+ properties?: Record<string, ToolSchema>;
202
+ required?: string[];
203
+ additionalProperties?: boolean;
204
+ items?: ToolSchema;
205
+ minItems?: number;
206
+ maxItems?: number;
207
+ pattern?: string;
208
+ minLength?: number;
209
+ maxLength?: number;
210
+ format?: string;
211
+ enum?: unknown[];
212
+ minimum?: number;
213
+ maximum?: number;
214
+ exclusiveMinimum?: number;
215
+ exclusiveMaximum?: number;
216
+ anyOf?: ToolSchema[];
217
+ oneOf?: ToolSchema[];
218
+ allOf?: ToolSchema[];
219
+ default?: unknown;
220
+ constructor(data?: Partial<ToolSchema>);
221
+ /**
222
+ * Create ToolSchema from any OpenAPI/JSON Schema
223
+ * 从任意 OpenAPI/JSON Schema 创建 ToolSchema
224
+ *
225
+ * Recursively parses all nested structures, preserving complete schema information.
226
+ * 递归解析所有嵌套结构,保留完整的 schema 信息。
227
+ */
228
+ static fromAnyOpenAPISchema(schema: unknown): ToolSchema;
229
+ /**
230
+ * Convert to standard JSON Schema format
231
+ * 转换为标准 JSON Schema 格式
232
+ */
233
+ toJSONSchema(): Record<string, unknown>;
234
+ }
235
+ /**
236
+ * Tool information
237
+ * 工具信息
238
+ */
239
+ declare class ToolInfo {
240
+ name?: string;
241
+ description?: string;
242
+ parameters?: ToolSchema;
243
+ constructor(data?: Partial<ToolInfo>);
244
+ /**
245
+ * Create ToolInfo from MCP tool
246
+ * 从 MCP tool 创建 ToolInfo
247
+ */
248
+ static fromMCPTool(tool: unknown): ToolInfo;
249
+ }
250
+
251
+ /**
252
+ * ToolSet Resource Class
253
+ *
254
+ * ToolSet 资源类,用于管理 ToolSet 资源。
255
+ * Resource class for managing ToolSet resources.
256
+ */
257
+
258
+ /**
259
+ * ToolSet resource class
260
+ */
261
+ declare class ToolSet implements ToolSetData {
262
+ name?: string;
263
+ uid?: string;
264
+ kind?: string;
265
+ description?: string;
266
+ createdTime?: string;
267
+ generation?: number;
268
+ labels?: Record<string, string>;
269
+ spec?: ToolSetSpec;
270
+ status?: ToolSetStatus;
271
+ private _config?;
272
+ constructor(data?: any, config?: Config);
273
+ /**
274
+ * Get DevS client
275
+ */
276
+ private static getClient;
277
+ uniqIdCallback: () => string | undefined;
278
+ /**
279
+ * Create a new ToolSet
280
+ */
281
+ static create(params: {
282
+ input: ToolSetCreateInput;
283
+ config?: Config;
284
+ }): Promise<ToolSet>;
285
+ /**
286
+ * Delete a ToolSet by Name
287
+ */
288
+ static delete(params: {
289
+ name: string;
290
+ config?: Config;
291
+ }): Promise<ToolSet>;
292
+ /**
293
+ * Get a ToolSet by Name
294
+ */
295
+ static get(params: {
296
+ name: string;
297
+ config?: Config;
298
+ }): Promise<ToolSet>;
299
+ /**
300
+ * List ToolSets
301
+ */
302
+ static list: ((input?: ToolSetListInput, config?: Config) => Promise<ToolSet[]>)
303
+ /**
304
+ * 枚举 ToolSet 列表 / List ToolSet list
305
+ */
306
+ | ((params?: {
307
+ input?: ToolSetListInput;
308
+ config?: Config;
309
+ }) => Promise<ToolSet[]>);
310
+ static listAll: ((options?: {
311
+ prefix?: string;
312
+ labels?: Record<string, string>;
313
+ }, config?: Config) => Promise<ToolSet[]>)
314
+ /**
315
+ * 枚举 ToolSet 列表 / List ToolSet list
316
+ */
317
+ | ((params?: {
318
+ input?: ToolSetListInput;
319
+ config?: Config;
320
+ }) => Promise<ToolSet[]>);
321
+ /**
322
+ * Update a ToolSet by Name
323
+ */
324
+ static update(params: {
325
+ name: string;
326
+ input: ToolSetUpdateInput;
327
+ config?: Config;
328
+ }): Promise<ToolSet>;
329
+ /**
330
+ * Delete this toolset
331
+ */
332
+ delete: (params?: {
333
+ config?: Config;
334
+ }) => Promise<ToolSet>;
335
+ /**
336
+ * Update this toolset
337
+ */
338
+ update: (params: {
339
+ input: ToolSetUpdateInput;
340
+ config?: Config;
341
+ }) => Promise<ToolSet>;
342
+ /**
343
+ * Refresh this toolset's data
344
+ */
345
+ refresh: (params?: {
346
+ config?: Config;
347
+ }) => Promise<ToolSet>;
348
+ /**
349
+ * Get toolset type
350
+ * 获取工具集类型
351
+ */
352
+ type(): string | undefined;
353
+ /**
354
+ * List tools (async)
355
+ * 异步获取工具列表,返回统一的 ToolInfo 列表
356
+ */
357
+ listToolsAsync: (params?: {
358
+ config?: Config;
359
+ }) => Promise<any[]>;
360
+ /**
361
+ * List tools (sync wrapper)
362
+ * 同步获取工具列表,返回统一的 ToolInfo 列表
363
+ */
364
+ listTools: (config?: Config) => Promise<any[]>;
365
+ /**
366
+ * Call tool (async)
367
+ * 异步调用工具,统一使用 ApiSet 实现
368
+ */
369
+ callToolAsync: (name: string, args?: Record<string, unknown>, config?: Config) => Promise<any>;
370
+ /**
371
+ * Call tool (sync wrapper)
372
+ * 同步调用工具,统一使用 ApiSet 实现
373
+ */
374
+ callTool: (name: string, args?: Record<string, unknown>, config?: Config) => Promise<any>;
375
+ /**
376
+ * Convert ToolSet to unified ApiSet object
377
+ * 将 ToolSet 转换为统一的 ApiSet 对象
378
+ */
379
+ toApiSet: (params?: {
380
+ config?: Config;
381
+ }) => Promise<any>;
382
+ /**
383
+ * Get OpenAPI authentication defaults
384
+ * 获取 OpenAPI 认证默认值
385
+ */
386
+ private _getOpenAPIAuthDefaults;
387
+ /**
388
+ * Get OpenAPI base URL
389
+ * 获取 OpenAPI 基础 URL
390
+ */
391
+ private _getOpenAPIBaseUrl;
392
+ }
393
+
394
+ export { type MCPToolMeta as M, ToolSet as T, type ToolSetAuthorization as a, type ToolSetCreateInput as b, type ToolSetData as c, type ToolSetListInput as d, type ToolSetSchema as e, ToolSetSchemaType as f, type ToolSetSpec as g, type ToolSetStatus as h, type ToolSetStatusOutputs as i, type ToolSetUpdateInput as j, ToolInfo as k, ToolSchema as l };