@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,246 @@
1
+ import { C as Config } from '../config-07gMelJP.js';
2
+ import { P as PageableInput } from '../model--I90nCqy.js';
3
+ import { R as ResourceBase } from '../resource-DnE_DEka.js';
4
+ export { CredentialControlAPI } from './api/index.js';
5
+ import '@alicloud/agentrun20250910';
6
+ import '../control-api-d-82Sgpr.js';
7
+
8
+ /** 凭证认证类型 / Credential Authentication Types */
9
+ type CredentialAuthType = 'jwt' | 'api_key' | 'basic' | 'aksk' | 'custom_header';
10
+ /** 凭证来源类型 / Credential Source Types */
11
+ type CredentialSourceType = 'external_llm' | 'external_tool' | 'internal';
12
+ /**
13
+ * Credential basic authentication configuration
14
+ */
15
+ interface CredentialBasicAuth {
16
+ /** Username */
17
+ username?: string;
18
+ /** Password */
19
+ password?: string;
20
+ }
21
+ /**
22
+ * Related resource for credential
23
+ */
24
+ interface RelatedResource {
25
+ /** 资源 IDj*/
26
+ resourceId?: string;
27
+ /** 资源名称j*/
28
+ resourceName?: string;
29
+ /** 资源类型j*/
30
+ resourceType?: string;
31
+ }
32
+ interface CredentialConfigInterface {
33
+ /** 凭证认证类型 */
34
+ credentialAuthType?: CredentialAuthType;
35
+ /** 凭证来源类型 */
36
+ credentialSourceType?: CredentialSourceType;
37
+ /** 凭证公共配置 */
38
+ credentialPublicConfig?: Record<string, any>;
39
+ /** 凭证密钥 */
40
+ credentialSecret?: string;
41
+ }
42
+ /**
43
+ * 凭证配置 / Credential configuration
44
+ */
45
+ declare class CredentialConfig implements CredentialConfigInterface {
46
+ constructor(data?: CredentialConfigInterface);
47
+ /** 配置访问 AgentRun 的 api key 凭证 */
48
+ static inboundApiKey(params: {
49
+ apiKey: string;
50
+ headerKey?: string;
51
+ }): CredentialConfig;
52
+ /** 配置访问 AgentRun 的静态 JWKS 凭证 */
53
+ static inboundStaticJwt(params: {
54
+ jwks: string;
55
+ }): CredentialConfig;
56
+ /** 配置访问 AgentRun 的远程 JWT 凭证 */
57
+ static inboundRemoteJwt(uri: string, timeout?: number, ttl?: number, publicConfig?: Record<string, any>): CredentialConfig;
58
+ /** 配置访问 AgentRun 的 Basic 凭证 */
59
+ static inboundBasic(params: {
60
+ users: CredentialBasicAuth[];
61
+ }): CredentialConfig;
62
+ /** 配置访问第三方工具的 api key 凭证 */
63
+ static outboundLLMApiKey(params: {
64
+ apiKey: string;
65
+ provider: string;
66
+ }): CredentialConfig;
67
+ /** 配置访问第三方工具的 ak/sk 凭证 */
68
+ static outboundLLMAKSK(provider: string, accessKeyId: string, accessKeySecret: string, accountId: string): CredentialConfig;
69
+ /** 配置访问第三方工具的自定义凭证 */
70
+ static outboundToolAKSKCustom(params: {
71
+ authConfig: Record<string, string>;
72
+ }): CredentialConfig;
73
+ /** 配置访问第三方工具的自定义 Header 凭证 */
74
+ static outboundToolCustomHeader(params: {
75
+ headers: Record<string, string>;
76
+ }): CredentialConfig;
77
+ }
78
+ /** 凭证公共配置 */
79
+ interface CredentialMutableProps {
80
+ /** 描述 */
81
+ description?: string;
82
+ /** 是否启用 */
83
+ enabled?: boolean;
84
+ }
85
+ interface CredentialImmutableProps {
86
+ credentialName?: string;
87
+ }
88
+ interface CredentialSystemProps {
89
+ credentialId?: string;
90
+ createdAt?: string;
91
+ updatedAt?: string;
92
+ relatedResources?: RelatedResource[];
93
+ }
94
+ interface CredentialCreateInput extends CredentialMutableProps, CredentialImmutableProps {
95
+ credentialConfig?: CredentialConfig;
96
+ }
97
+ /**
98
+ * Credential update input
99
+ */
100
+ interface CredentialUpdateInput extends CredentialMutableProps {
101
+ credentialConfig?: CredentialConfig;
102
+ }
103
+ /**
104
+ * Credential list input
105
+ */
106
+ interface CredentialListInput extends PageableInput {
107
+ credentialAuthType?: CredentialAuthType;
108
+ credentialName?: string;
109
+ credentialSourceType?: CredentialSourceType;
110
+ provider?: string;
111
+ }
112
+ declare class CredentialListOutput {
113
+ createdAt?: string;
114
+ credentialAuthType?: CredentialAuthType;
115
+ credentialId?: string;
116
+ credentialName?: string;
117
+ credentialSourceType?: CredentialSourceType;
118
+ enabled?: boolean;
119
+ relatedResourceCount?: number;
120
+ updatedAt?: string;
121
+ constructor(data?: any);
122
+ uniqIdCallback: () => string | undefined;
123
+ toCredential: (params?: {
124
+ config?: Config;
125
+ }) => Promise<Credential>;
126
+ }
127
+ /**
128
+ * Credential resource class
129
+ */
130
+ interface CredentialInterface extends CredentialMutableProps, CredentialImmutableProps, CredentialSystemProps, CredentialConfigInterface {
131
+ }
132
+
133
+ declare class Credential extends ResourceBase implements CredentialInterface {
134
+ credentialName?: string;
135
+ /** 描述 */
136
+ description?: string;
137
+ /** 是否启用 */
138
+ enabled?: boolean;
139
+ credentialId?: string;
140
+ createdAt?: string;
141
+ updatedAt?: string;
142
+ relatedResources?: RelatedResource[];
143
+ /** 凭证认证类型 */
144
+ credentialAuthType?: CredentialAuthType;
145
+ /** 凭证来源类型 */
146
+ credentialSourceType?: CredentialSourceType;
147
+ /** 凭证公共配置 */
148
+ credentialPublicConfig?: Record<string, any>;
149
+ /** 凭证密钥 */
150
+ credentialSecret?: string;
151
+ protected _config?: Config;
152
+ constructor(data?: any, config?: Config);
153
+ private static getClient;
154
+ /**
155
+ * Create a new Credential
156
+ */
157
+ static create: (paramsOrInput: any) => Promise<Credential>;
158
+ /**
159
+ * Delete a Credential by name
160
+ */
161
+ static delete: (paramsOrName: any) => Promise<Credential>;
162
+ /**
163
+ * Update a Credential by name
164
+ */
165
+ static update: (paramsOrName: any) => Promise<Credential>;
166
+ /**
167
+ * Get a Credential by name
168
+ */
169
+ static get: (paramsOrName: any) => Promise<Credential>;
170
+ /**
171
+ * List all Credentials (with pagination)
172
+ */
173
+ static list: (paramsOrUndefined?: any) => Promise<CredentialListOutput[]>;
174
+ static listAll: (params?: (Omit<any, "pageNumber" | "pageSize"> & {
175
+ config?: Config;
176
+ }) | undefined) => Promise<any[]>;
177
+ /**
178
+ * Delete this credential
179
+ */
180
+ delete: (params?: any) => Promise<this>;
181
+ /**
182
+ * Update this credential
183
+ */
184
+ update: (params: any) => Promise<this>;
185
+ /**
186
+ * Refresh this credential's data
187
+ */
188
+ get: (params?: any) => Promise<Credential>;
189
+ }
190
+
191
+ /**
192
+ * Credential Client
193
+ *
194
+ * 此模块提供 Credential 的客户端 API。
195
+ * This module provides the client API for Credential.
196
+ */
197
+
198
+ /**
199
+ * Credential Client
200
+ *
201
+ * 提供 Credential 的创建、删除、更新、查询功能。
202
+ * Provides create, delete, update, query functions for Credential.
203
+ */
204
+ declare class CredentialClient {
205
+ private config?;
206
+ private controlApi;
207
+ constructor(config?: Config);
208
+ /**
209
+ * Create a Credential
210
+ */
211
+ create: (params: {
212
+ input: CredentialCreateInput;
213
+ config?: Config;
214
+ }) => Promise<Credential>;
215
+ /**
216
+ * Delete a Credential
217
+ */
218
+ delete: (params: {
219
+ name: string;
220
+ config?: Config;
221
+ }) => Promise<Credential>;
222
+ /**
223
+ * Update a Credential
224
+ */
225
+ update: (params: {
226
+ name: string;
227
+ input: CredentialUpdateInput;
228
+ config?: Config;
229
+ }) => Promise<Credential>;
230
+ /**
231
+ * Get a Credential
232
+ */
233
+ get: (params: {
234
+ name: string;
235
+ config?: Config;
236
+ }) => Promise<Credential>;
237
+ /**
238
+ * List Credentials
239
+ */
240
+ list: (params?: {
241
+ input?: CredentialListInput;
242
+ config?: Config;
243
+ }) => Promise<CredentialListOutput[]>;
244
+ }
245
+
246
+ export { Credential, type CredentialBasicAuth, CredentialClient, CredentialConfig, type CredentialCreateInput, type CredentialListInput, CredentialListOutput, type CredentialUpdateInput, type RelatedResource };