@alicloud/agentcore20260804 2.2.1 → 2.3.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/dist/client.d.ts +148 -2
- package/dist/client.js +281 -2
- package/dist/client.js.map +1 -1
- package/dist/models/CreateCustomAgentRequest.d.ts +765 -0
- package/dist/models/CreateCustomAgentRequest.js +591 -0
- package/dist/models/CreateCustomAgentRequest.js.map +1 -0
- package/dist/models/CreateCustomAgentResponse.d.ts +19 -0
- package/dist/models/CreateCustomAgentResponse.js +69 -0
- package/dist/models/CreateCustomAgentResponse.js.map +1 -0
- package/dist/models/CreateCustomAgentResponseBody.d.ts +923 -0
- package/dist/models/CreateCustomAgentResponseBody.js +652 -0
- package/dist/models/CreateCustomAgentResponseBody.js.map +1 -0
- package/dist/models/CreateCustomAgentShrinkRequest.d.ts +26 -0
- package/dist/models/CreateCustomAgentShrinkRequest.js +60 -0
- package/dist/models/CreateCustomAgentShrinkRequest.js.map +1 -0
- package/dist/models/DeleteCustomAgentRequest.d.ts +13 -0
- package/dist/models/DeleteCustomAgentRequest.js +54 -0
- package/dist/models/DeleteCustomAgentRequest.js.map +1 -0
- package/dist/models/DeleteCustomAgentResponse.d.ts +19 -0
- package/dist/models/DeleteCustomAgentResponse.js +69 -0
- package/dist/models/DeleteCustomAgentResponse.js.map +1 -0
- package/dist/models/DeleteCustomAgentResponseBody.d.ts +155 -0
- package/dist/models/DeleteCustomAgentResponseBody.js +110 -0
- package/dist/models/DeleteCustomAgentResponseBody.js.map +1 -0
- package/dist/models/GetCustomAgentRequest.d.ts +13 -0
- package/dist/models/GetCustomAgentRequest.js +54 -0
- package/dist/models/GetCustomAgentRequest.js.map +1 -0
- package/dist/models/GetCustomAgentResponse.d.ts +19 -0
- package/dist/models/GetCustomAgentResponse.js +69 -0
- package/dist/models/GetCustomAgentResponse.js.map +1 -0
- package/dist/models/GetCustomAgentResponseBody.d.ts +655 -0
- package/dist/models/GetCustomAgentResponseBody.js +652 -0
- package/dist/models/GetCustomAgentResponseBody.js.map +1 -0
- package/dist/models/ListCustomAgentsRequest.d.ts +29 -0
- package/dist/models/ListCustomAgentsRequest.js +60 -0
- package/dist/models/ListCustomAgentsRequest.js.map +1 -0
- package/dist/models/ListCustomAgentsResponse.d.ts +19 -0
- package/dist/models/ListCustomAgentsResponse.js +69 -0
- package/dist/models/ListCustomAgentsResponse.js.map +1 -0
- package/dist/models/ListCustomAgentsResponseBody.d.ts +248 -0
- package/dist/models/ListCustomAgentsResponseBody.js +171 -0
- package/dist/models/ListCustomAgentsResponseBody.js.map +1 -0
- package/dist/models/ListUsersRequest.d.ts +4 -4
- package/dist/models/ListUsersResponseBody.d.ts +15 -15
- package/dist/models/UpdateCustomAgentRequest.d.ts +757 -0
- package/dist/models/UpdateCustomAgentRequest.js +591 -0
- package/dist/models/UpdateCustomAgentRequest.js.map +1 -0
- package/dist/models/UpdateCustomAgentResponse.d.ts +19 -0
- package/dist/models/UpdateCustomAgentResponse.js +69 -0
- package/dist/models/UpdateCustomAgentResponse.js.map +1 -0
- package/dist/models/UpdateCustomAgentResponseBody.d.ts +910 -0
- package/dist/models/UpdateCustomAgentResponseBody.js +652 -0
- package/dist/models/UpdateCustomAgentResponseBody.js.map +1 -0
- package/dist/models/UpdateCustomAgentShrinkRequest.d.ts +26 -0
- package/dist/models/UpdateCustomAgentShrinkRequest.js +60 -0
- package/dist/models/UpdateCustomAgentShrinkRequest.js.map +1 -0
- package/dist/models/model.d.ts +124 -0
- package/dist/models/model.js +271 -21
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +299 -2
- package/src/models/CreateCustomAgentRequest.ts +1129 -0
- package/src/models/CreateCustomAgentResponse.ts +40 -0
- package/src/models/CreateCustomAgentResponseBody.ts +1337 -0
- package/src/models/CreateCustomAgentShrinkRequest.ts +41 -0
- package/src/models/DeleteCustomAgentRequest.ts +24 -0
- package/src/models/DeleteCustomAgentResponse.ts +40 -0
- package/src/models/DeleteCustomAgentResponseBody.ts +211 -0
- package/src/models/GetCustomAgentRequest.ts +24 -0
- package/src/models/GetCustomAgentResponse.ts +40 -0
- package/src/models/GetCustomAgentResponseBody.ts +1069 -0
- package/src/models/ListCustomAgentsRequest.ts +44 -0
- package/src/models/ListCustomAgentsResponse.ts +40 -0
- package/src/models/ListCustomAgentsResponseBody.ts +345 -0
- package/src/models/ListUsersRequest.ts +4 -4
- package/src/models/ListUsersResponseBody.ts +15 -15
- package/src/models/UpdateCustomAgentRequest.ts +1121 -0
- package/src/models/UpdateCustomAgentResponse.ts +40 -0
- package/src/models/UpdateCustomAgentResponseBody.ts +1324 -0
- package/src/models/UpdateCustomAgentShrinkRequest.ts +41 -0
- package/src/models/model.ts +124 -0
package/dist/client.d.ts
CHANGED
|
@@ -176,6 +176,36 @@ export default class Client extends OpenApi {
|
|
|
176
176
|
* @returns CreateCredentialResponse
|
|
177
177
|
*/
|
|
178
178
|
createCredential(workspaceId: string, request: $_model.CreateCredentialRequest): Promise<$_model.CreateCredentialResponse>;
|
|
179
|
+
/**
|
|
180
|
+
* Creates a custom agent in a specified workspace and submits the container image deployment configuration. The creation process is asynchronous. You can call the GetCustomAgent operation to query the deployment result.
|
|
181
|
+
*
|
|
182
|
+
* @remarks
|
|
183
|
+
* Before you call this operation, prepare a writable workspace, a RAM role ARN, an ACR container image, and the runtime configuration. You must specify name, artifact, roleArn, and runtime. The runtime parameter must include both compute and sessionPolicy.
|
|
184
|
+
* Currently, only ACR container image deployment is supported. Use artifact.container and specify the service listening port in artifact.port. Omit artifact.code. The image must have the required access permissions and be accessible over the network allowed by the workspace.
|
|
185
|
+
* The creation process is asynchronous. A successful response indicates that the request is accepted. Use the returned agentId to call GetCustomAgent and check latestVersionStatus, latestExecutionError, and status for the corresponding latestSpecVersion to confirm the deployment result. After the deployment is ready, you can call CreateServiceEndpoint to configure the access endpoint.
|
|
186
|
+
* The clientToken parameter does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold parameter for health checks does not take effect. Omit this parameter.
|
|
187
|
+
*
|
|
188
|
+
* @param tmpReq - CreateCustomAgentRequest
|
|
189
|
+
* @param headers - map
|
|
190
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
191
|
+
* @returns CreateCustomAgentResponse
|
|
192
|
+
*/
|
|
193
|
+
createCustomAgentWithOptions(workspaceId: string, tmpReq: $_model.CreateCustomAgentRequest, headers: {
|
|
194
|
+
[key: string]: string;
|
|
195
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.CreateCustomAgentResponse>;
|
|
196
|
+
/**
|
|
197
|
+
* Creates a custom agent in a specified workspace and submits the container image deployment configuration. The creation process is asynchronous. You can call the GetCustomAgent operation to query the deployment result.
|
|
198
|
+
*
|
|
199
|
+
* @remarks
|
|
200
|
+
* Before you call this operation, prepare a writable workspace, a RAM role ARN, an ACR container image, and the runtime configuration. You must specify name, artifact, roleArn, and runtime. The runtime parameter must include both compute and sessionPolicy.
|
|
201
|
+
* Currently, only ACR container image deployment is supported. Use artifact.container and specify the service listening port in artifact.port. Omit artifact.code. The image must have the required access permissions and be accessible over the network allowed by the workspace.
|
|
202
|
+
* The creation process is asynchronous. A successful response indicates that the request is accepted. Use the returned agentId to call GetCustomAgent and check latestVersionStatus, latestExecutionError, and status for the corresponding latestSpecVersion to confirm the deployment result. After the deployment is ready, you can call CreateServiceEndpoint to configure the access endpoint.
|
|
203
|
+
* The clientToken parameter does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold parameter for health checks does not take effect. Omit this parameter.
|
|
204
|
+
*
|
|
205
|
+
* @param request - CreateCustomAgentRequest
|
|
206
|
+
* @returns CreateCustomAgentResponse
|
|
207
|
+
*/
|
|
208
|
+
createCustomAgent(workspaceId: string, request: $_model.CreateCustomAgentRequest): Promise<$_model.CreateCustomAgentResponse>;
|
|
179
209
|
/**
|
|
180
210
|
* Creates an external agent in a specified workspace.
|
|
181
211
|
*
|
|
@@ -526,6 +556,34 @@ export default class Client extends OpenApi {
|
|
|
526
556
|
* @returns DeleteCredentialResponse
|
|
527
557
|
*/
|
|
528
558
|
deleteCredential(workspaceId: string, credentialId: string, request: $_model.DeleteCredentialRequest): Promise<$_model.DeleteCredentialResponse>;
|
|
559
|
+
/**
|
|
560
|
+
* Deletes a custom agent in a specified workspace. A successful request indicates that the deletion is accepted, and the runtime resources are subsequently cleaned up in the background.
|
|
561
|
+
*
|
|
562
|
+
* @remarks
|
|
563
|
+
* Before you call this operation, make sure that the workspace is writable. If the agent is still associated with a team, you must dissociate the team first.
|
|
564
|
+
* Deletion is an asynchronous process. After the request is accepted, the associated invocation endpoints become unavailable, and the runtime resources are subsequently cleaned up. The status in the response is typically Deleting. If the agent is already being deleted, a subsequent request returns the current summary.
|
|
565
|
+
* You can call GetCustomAgent to check the deletion progress. After the deletion is complete, a detail query returns a resource not found error.
|
|
566
|
+
*
|
|
567
|
+
* @param request - DeleteCustomAgentRequest
|
|
568
|
+
* @param headers - map
|
|
569
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
570
|
+
* @returns DeleteCustomAgentResponse
|
|
571
|
+
*/
|
|
572
|
+
deleteCustomAgentWithOptions(workspaceId: string, agentId: string, request: $_model.DeleteCustomAgentRequest, headers: {
|
|
573
|
+
[key: string]: string;
|
|
574
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteCustomAgentResponse>;
|
|
575
|
+
/**
|
|
576
|
+
* Deletes a custom agent in a specified workspace. A successful request indicates that the deletion is accepted, and the runtime resources are subsequently cleaned up in the background.
|
|
577
|
+
*
|
|
578
|
+
* @remarks
|
|
579
|
+
* Before you call this operation, make sure that the workspace is writable. If the agent is still associated with a team, you must dissociate the team first.
|
|
580
|
+
* Deletion is an asynchronous process. After the request is accepted, the associated invocation endpoints become unavailable, and the runtime resources are subsequently cleaned up. The status in the response is typically Deleting. If the agent is already being deleted, a subsequent request returns the current summary.
|
|
581
|
+
* You can call GetCustomAgent to check the deletion progress. After the deletion is complete, a detail query returns a resource not found error.
|
|
582
|
+
*
|
|
583
|
+
* @param request - DeleteCustomAgentRequest
|
|
584
|
+
* @returns DeleteCustomAgentResponse
|
|
585
|
+
*/
|
|
586
|
+
deleteCustomAgent(workspaceId: string, agentId: string, request: $_model.DeleteCustomAgentRequest): Promise<$_model.DeleteCustomAgentResponse>;
|
|
529
587
|
/**
|
|
530
588
|
* Deletes a specified external agent.
|
|
531
589
|
*
|
|
@@ -1038,6 +1096,34 @@ export default class Client extends OpenApi {
|
|
|
1038
1096
|
* @returns GetCredentialResponse
|
|
1039
1097
|
*/
|
|
1040
1098
|
getCredential(workspaceId: string, credentialId: string, request: $_model.GetCredentialRequest): Promise<$_model.GetCredentialResponse>;
|
|
1099
|
+
/**
|
|
1100
|
+
* 查询自定义智能体
|
|
1101
|
+
*
|
|
1102
|
+
* @remarks
|
|
1103
|
+
* 创建或更新后,可轮询本接口查询最新配置版本的执行结果。latestVersionStatus 与 latestSpecVersion 对应;latestExecutionError 表示该版本的等待或失败原因,retryable 为 true 时可稍后再次查询。
|
|
1104
|
+
* 返回的配置为最新提交的配置,可能尚未生效。请结合 latestVersionStatus、智能体整体状态 status 和运行实例统计 sandboxPhaseCounts 确认部署及运行情况。
|
|
1105
|
+
* 查询不存在、已完成删除或不属于指定工作空间的自定义智能体时,返回资源不存在错误。
|
|
1106
|
+
*
|
|
1107
|
+
* @param request - GetCustomAgentRequest
|
|
1108
|
+
* @param headers - map
|
|
1109
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1110
|
+
* @returns GetCustomAgentResponse
|
|
1111
|
+
*/
|
|
1112
|
+
getCustomAgentWithOptions(workspaceId: string, agentId: string, request: $_model.GetCustomAgentRequest, headers: {
|
|
1113
|
+
[key: string]: string;
|
|
1114
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.GetCustomAgentResponse>;
|
|
1115
|
+
/**
|
|
1116
|
+
* 查询自定义智能体
|
|
1117
|
+
*
|
|
1118
|
+
* @remarks
|
|
1119
|
+
* 创建或更新后,可轮询本接口查询最新配置版本的执行结果。latestVersionStatus 与 latestSpecVersion 对应;latestExecutionError 表示该版本的等待或失败原因,retryable 为 true 时可稍后再次查询。
|
|
1120
|
+
* 返回的配置为最新提交的配置,可能尚未生效。请结合 latestVersionStatus、智能体整体状态 status 和运行实例统计 sandboxPhaseCounts 确认部署及运行情况。
|
|
1121
|
+
* 查询不存在、已完成删除或不属于指定工作空间的自定义智能体时,返回资源不存在错误。
|
|
1122
|
+
*
|
|
1123
|
+
* @param request - GetCustomAgentRequest
|
|
1124
|
+
* @returns GetCustomAgentResponse
|
|
1125
|
+
*/
|
|
1126
|
+
getCustomAgent(workspaceId: string, agentId: string, request: $_model.GetCustomAgentRequest): Promise<$_model.GetCustomAgentResponse>;
|
|
1041
1127
|
/**
|
|
1042
1128
|
* Queries the details of a specified external agent.
|
|
1043
1129
|
*
|
|
@@ -1654,6 +1740,34 @@ export default class Client extends OpenApi {
|
|
|
1654
1740
|
* @returns ListCredentialsResponse
|
|
1655
1741
|
*/
|
|
1656
1742
|
listCredentials(workspaceId: string, request: $_model.ListCredentialsRequest): Promise<$_model.ListCredentialsResponse>;
|
|
1743
|
+
/**
|
|
1744
|
+
* Performs a paged query to retrieve the summary of custom agents in a specified workspace. For paging, the complete configuration, and the execute results of the latest version, call GetCustomAgent.
|
|
1745
|
+
*
|
|
1746
|
+
* @remarks
|
|
1747
|
+
* The default value of maxResults is 20, and the maximum value is 100. If this parameter is omitted or set to 0, the default value is used.
|
|
1748
|
+
* Omit nextToken in the first request. In subsequent requests, pass the nextToken value returned in the previous response as is, and keep the same workspace. The nextToken is an opaque token. Do not parse or construct it yourself. An empty token in the response indicates that there are no more pages.
|
|
1749
|
+
* This operation returns the summaries of the current page and does not return the complete deployment configuration or the execution errors of the latest version. To obtain this information, call GetCustomAgent by using the agentId in items.
|
|
1750
|
+
*
|
|
1751
|
+
* @param request - ListCustomAgentsRequest
|
|
1752
|
+
* @param headers - map
|
|
1753
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1754
|
+
* @returns ListCustomAgentsResponse
|
|
1755
|
+
*/
|
|
1756
|
+
listCustomAgentsWithOptions(workspaceId: string, request: $_model.ListCustomAgentsRequest, headers: {
|
|
1757
|
+
[key: string]: string;
|
|
1758
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.ListCustomAgentsResponse>;
|
|
1759
|
+
/**
|
|
1760
|
+
* Performs a paged query to retrieve the summary of custom agents in a specified workspace. For paging, the complete configuration, and the execute results of the latest version, call GetCustomAgent.
|
|
1761
|
+
*
|
|
1762
|
+
* @remarks
|
|
1763
|
+
* The default value of maxResults is 20, and the maximum value is 100. If this parameter is omitted or set to 0, the default value is used.
|
|
1764
|
+
* Omit nextToken in the first request. In subsequent requests, pass the nextToken value returned in the previous response as is, and keep the same workspace. The nextToken is an opaque token. Do not parse or construct it yourself. An empty token in the response indicates that there are no more pages.
|
|
1765
|
+
* This operation returns the summaries of the current page and does not return the complete deployment configuration or the execution errors of the latest version. To obtain this information, call GetCustomAgent by using the agentId in items.
|
|
1766
|
+
*
|
|
1767
|
+
* @param request - ListCustomAgentsRequest
|
|
1768
|
+
* @returns ListCustomAgentsResponse
|
|
1769
|
+
*/
|
|
1770
|
+
listCustomAgents(workspaceId: string, request: $_model.ListCustomAgentsRequest): Promise<$_model.ListCustomAgentsResponse>;
|
|
1657
1771
|
/**
|
|
1658
1772
|
* Queries the list of external agents in a specified workspace.
|
|
1659
1773
|
*
|
|
@@ -2009,7 +2123,7 @@ export default class Client extends OpenApi {
|
|
|
2009
2123
|
*/
|
|
2010
2124
|
listTeams(workspaceId: string, request: $_model.ListTeamsRequest): Promise<$_model.ListTeamsResponse>;
|
|
2011
2125
|
/**
|
|
2012
|
-
*
|
|
2126
|
+
* Performs a paged query of users in a specified workspace. You can filter users by fuzzy match on the username by using nameLike, specify the maximum number of records per page for paging by using maxResults, and obtain the next page by using nextToken. If maxResults is not specified, the server returns 10 records by default.
|
|
2013
2127
|
*
|
|
2014
2128
|
* @param request - ListUsersRequest
|
|
2015
2129
|
* @param headers - map
|
|
@@ -2020,7 +2134,7 @@ export default class Client extends OpenApi {
|
|
|
2020
2134
|
[key: string]: string;
|
|
2021
2135
|
}, runtime: $dara.RuntimeOptions): Promise<$_model.ListUsersResponse>;
|
|
2022
2136
|
/**
|
|
2023
|
-
*
|
|
2137
|
+
* Performs a paged query of users in a specified workspace. You can filter users by fuzzy match on the username by using nameLike, specify the maximum number of records per page for paging by using maxResults, and obtain the next page by using nextToken. If maxResults is not specified, the server returns 10 records by default.
|
|
2024
2138
|
*
|
|
2025
2139
|
* @param request - ListUsersRequest
|
|
2026
2140
|
* @returns ListUsersResponse
|
|
@@ -2372,6 +2486,38 @@ export default class Client extends OpenApi {
|
|
|
2372
2486
|
* @returns UpdateCredentialResponse
|
|
2373
2487
|
*/
|
|
2374
2488
|
updateCredential(workspaceId: string, credentialId: string, request: $_model.UpdateCredentialRequest): Promise<$_model.UpdateCredentialResponse>;
|
|
2489
|
+
/**
|
|
2490
|
+
* Updates the configuration of a specified custom agent in a workspace and executes the update asynchronously. Omitted top-level fields retain their original configurations. You can call the GetCustomAgent operation to query the update result.
|
|
2491
|
+
*
|
|
2492
|
+
* @remarks
|
|
2493
|
+
* Provide at least one top-level field to update. Omitted top-level fields retain their original configurations. When providing a configuration object, specify its required subfields and include any optional configurations that you want to retain. Arrays are replaced in their entirety. Pass an empty array [] to clear a list. The agenticFsMounts field does not accept null. Pass null for the description field to clear the description, and pass null for the healthCheck field to remove the health check.
|
|
2494
|
+
* When updating an image, you must specify artifact.port and the type, instanceId, namespace, repo, and tag fields of artifact.container. To retain a custom startup command, also provide the entrypoint field. Currently, only Alibaba Cloud Container Registry (ACR) container image deployment is supported. Omit the artifact.code field.
|
|
2495
|
+
* When providing the runtime field, both compute and sessionPolicy must be present. If you omit hpa or any of its fields, unspecified elastic configurations use default values. To retain the original elastic configurations, provide them together. When providing the network field, omitted access items are treated as allowed, but actual access is still subject to workspace network restrictions. To retain the original restrictions, provide both accessInternet and accessVpc. When providing healthCheck, you must specify the port field, and other unspecified items use default values. When providing logging.sls, you must specify both project and logstore.
|
|
2496
|
+
* The update is an asynchronous process. A successful response indicates that the request is accepted. Call the GetCustomAgent operation to query latestSpecVersion, latestVersionStatus, and latestExecutionError, and check the status field to confirm the update result.
|
|
2497
|
+
* The clientToken field currently does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold field for health checks currently does not take effect. Omit this field.
|
|
2498
|
+
*
|
|
2499
|
+
* @param tmpReq - UpdateCustomAgentRequest
|
|
2500
|
+
* @param headers - map
|
|
2501
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
2502
|
+
* @returns UpdateCustomAgentResponse
|
|
2503
|
+
*/
|
|
2504
|
+
updateCustomAgentWithOptions(workspaceId: string, agentId: string, tmpReq: $_model.UpdateCustomAgentRequest, headers: {
|
|
2505
|
+
[key: string]: string;
|
|
2506
|
+
}, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateCustomAgentResponse>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Updates the configuration of a specified custom agent in a workspace and executes the update asynchronously. Omitted top-level fields retain their original configurations. You can call the GetCustomAgent operation to query the update result.
|
|
2509
|
+
*
|
|
2510
|
+
* @remarks
|
|
2511
|
+
* Provide at least one top-level field to update. Omitted top-level fields retain their original configurations. When providing a configuration object, specify its required subfields and include any optional configurations that you want to retain. Arrays are replaced in their entirety. Pass an empty array [] to clear a list. The agenticFsMounts field does not accept null. Pass null for the description field to clear the description, and pass null for the healthCheck field to remove the health check.
|
|
2512
|
+
* When updating an image, you must specify artifact.port and the type, instanceId, namespace, repo, and tag fields of artifact.container. To retain a custom startup command, also provide the entrypoint field. Currently, only Alibaba Cloud Container Registry (ACR) container image deployment is supported. Omit the artifact.code field.
|
|
2513
|
+
* When providing the runtime field, both compute and sessionPolicy must be present. If you omit hpa or any of its fields, unspecified elastic configurations use default values. To retain the original elastic configurations, provide them together. When providing the network field, omitted access items are treated as allowed, but actual access is still subject to workspace network restrictions. To retain the original restrictions, provide both accessInternet and accessVpc. When providing healthCheck, you must specify the port field, and other unspecified items use default values. When providing logging.sls, you must specify both project and logstore.
|
|
2514
|
+
* The update is an asynchronous process. A successful response indicates that the request is accepted. Call the GetCustomAgent operation to query latestSpecVersion, latestVersionStatus, and latestExecutionError, and check the status field to confirm the update result.
|
|
2515
|
+
* The clientToken field currently does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold field for health checks currently does not take effect. Omit this field.
|
|
2516
|
+
*
|
|
2517
|
+
* @param request - UpdateCustomAgentRequest
|
|
2518
|
+
* @returns UpdateCustomAgentResponse
|
|
2519
|
+
*/
|
|
2520
|
+
updateCustomAgent(workspaceId: string, agentId: string, request: $_model.UpdateCustomAgentRequest): Promise<$_model.UpdateCustomAgentResponse>;
|
|
2375
2521
|
/**
|
|
2376
2522
|
* Updates the configuration of a specified external agent.
|
|
2377
2523
|
*
|
package/dist/client.js
CHANGED
|
@@ -442,6 +442,70 @@ class Client extends openapi_core_1.default {
|
|
|
442
442
|
let headers = {};
|
|
443
443
|
return await this.createCredentialWithOptions(workspaceId, request, headers, runtime);
|
|
444
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Creates a custom agent in a specified workspace and submits the container image deployment configuration. The creation process is asynchronous. You can call the GetCustomAgent operation to query the deployment result.
|
|
447
|
+
*
|
|
448
|
+
* @remarks
|
|
449
|
+
* Before you call this operation, prepare a writable workspace, a RAM role ARN, an ACR container image, and the runtime configuration. You must specify name, artifact, roleArn, and runtime. The runtime parameter must include both compute and sessionPolicy.
|
|
450
|
+
* Currently, only ACR container image deployment is supported. Use artifact.container and specify the service listening port in artifact.port. Omit artifact.code. The image must have the required access permissions and be accessible over the network allowed by the workspace.
|
|
451
|
+
* The creation process is asynchronous. A successful response indicates that the request is accepted. Use the returned agentId to call GetCustomAgent and check latestVersionStatus, latestExecutionError, and status for the corresponding latestSpecVersion to confirm the deployment result. After the deployment is ready, you can call CreateServiceEndpoint to configure the access endpoint.
|
|
452
|
+
* The clientToken parameter does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold parameter for health checks does not take effect. Omit this parameter.
|
|
453
|
+
*
|
|
454
|
+
* @param tmpReq - CreateCustomAgentRequest
|
|
455
|
+
* @param headers - map
|
|
456
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
457
|
+
* @returns CreateCustomAgentResponse
|
|
458
|
+
*/
|
|
459
|
+
async createCustomAgentWithOptions(workspaceId, tmpReq, headers, runtime) {
|
|
460
|
+
tmpReq.validate();
|
|
461
|
+
let request = new $_model.CreateCustomAgentShrinkRequest({});
|
|
462
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
463
|
+
if (!$dara.isNull(tmpReq.body)) {
|
|
464
|
+
request.bodyShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.body, "body", "json");
|
|
465
|
+
}
|
|
466
|
+
let query = {};
|
|
467
|
+
if (!$dara.isNull(request.clientToken)) {
|
|
468
|
+
query["clientToken"] = request.clientToken;
|
|
469
|
+
}
|
|
470
|
+
let body = {};
|
|
471
|
+
if (!$dara.isNull(request.bodyShrink)) {
|
|
472
|
+
body["body"] = request.bodyShrink;
|
|
473
|
+
}
|
|
474
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
475
|
+
headers: headers,
|
|
476
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
477
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
478
|
+
});
|
|
479
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
480
|
+
action: "CreateCustomAgent",
|
|
481
|
+
version: "2026-08-04",
|
|
482
|
+
protocol: "HTTPS",
|
|
483
|
+
pathname: `/workspaces/${$dara.URL.percentEncode(workspaceId)}/custom-agents`,
|
|
484
|
+
method: "POST",
|
|
485
|
+
authType: "AK",
|
|
486
|
+
style: "ROA",
|
|
487
|
+
reqBodyType: "formData",
|
|
488
|
+
bodyType: "json",
|
|
489
|
+
});
|
|
490
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.CreateCustomAgentResponse({}));
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Creates a custom agent in a specified workspace and submits the container image deployment configuration. The creation process is asynchronous. You can call the GetCustomAgent operation to query the deployment result.
|
|
494
|
+
*
|
|
495
|
+
* @remarks
|
|
496
|
+
* Before you call this operation, prepare a writable workspace, a RAM role ARN, an ACR container image, and the runtime configuration. You must specify name, artifact, roleArn, and runtime. The runtime parameter must include both compute and sessionPolicy.
|
|
497
|
+
* Currently, only ACR container image deployment is supported. Use artifact.container and specify the service listening port in artifact.port. Omit artifact.code. The image must have the required access permissions and be accessible over the network allowed by the workspace.
|
|
498
|
+
* The creation process is asynchronous. A successful response indicates that the request is accepted. Use the returned agentId to call GetCustomAgent and check latestVersionStatus, latestExecutionError, and status for the corresponding latestSpecVersion to confirm the deployment result. After the deployment is ready, you can call CreateServiceEndpoint to configure the access endpoint.
|
|
499
|
+
* The clientToken parameter does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold parameter for health checks does not take effect. Omit this parameter.
|
|
500
|
+
*
|
|
501
|
+
* @param request - CreateCustomAgentRequest
|
|
502
|
+
* @returns CreateCustomAgentResponse
|
|
503
|
+
*/
|
|
504
|
+
async createCustomAgent(workspaceId, request) {
|
|
505
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
506
|
+
let headers = {};
|
|
507
|
+
return await this.createCustomAgentWithOptions(workspaceId, request, headers, runtime);
|
|
508
|
+
}
|
|
445
509
|
/**
|
|
446
510
|
* Creates an external agent in a specified workspace.
|
|
447
511
|
*
|
|
@@ -1261,6 +1325,53 @@ class Client extends openapi_core_1.default {
|
|
|
1261
1325
|
let headers = {};
|
|
1262
1326
|
return await this.deleteCredentialWithOptions(workspaceId, credentialId, request, headers, runtime);
|
|
1263
1327
|
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Deletes a custom agent in a specified workspace. A successful request indicates that the deletion is accepted, and the runtime resources are subsequently cleaned up in the background.
|
|
1330
|
+
*
|
|
1331
|
+
* @remarks
|
|
1332
|
+
* Before you call this operation, make sure that the workspace is writable. If the agent is still associated with a team, you must dissociate the team first.
|
|
1333
|
+
* Deletion is an asynchronous process. After the request is accepted, the associated invocation endpoints become unavailable, and the runtime resources are subsequently cleaned up. The status in the response is typically Deleting. If the agent is already being deleted, a subsequent request returns the current summary.
|
|
1334
|
+
* You can call GetCustomAgent to check the deletion progress. After the deletion is complete, a detail query returns a resource not found error.
|
|
1335
|
+
*
|
|
1336
|
+
* @param request - DeleteCustomAgentRequest
|
|
1337
|
+
* @param headers - map
|
|
1338
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1339
|
+
* @returns DeleteCustomAgentResponse
|
|
1340
|
+
*/
|
|
1341
|
+
async deleteCustomAgentWithOptions(workspaceId, agentId, request, headers, runtime) {
|
|
1342
|
+
request.validate();
|
|
1343
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
1344
|
+
headers: headers,
|
|
1345
|
+
});
|
|
1346
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
1347
|
+
action: "DeleteCustomAgent",
|
|
1348
|
+
version: "2026-08-04",
|
|
1349
|
+
protocol: "HTTPS",
|
|
1350
|
+
pathname: `/workspaces/${$dara.URL.percentEncode(workspaceId)}/custom-agents/${$dara.URL.percentEncode(agentId)}`,
|
|
1351
|
+
method: "DELETE",
|
|
1352
|
+
authType: "AK",
|
|
1353
|
+
style: "ROA",
|
|
1354
|
+
reqBodyType: "json",
|
|
1355
|
+
bodyType: "json",
|
|
1356
|
+
});
|
|
1357
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.DeleteCustomAgentResponse({}));
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Deletes a custom agent in a specified workspace. A successful request indicates that the deletion is accepted, and the runtime resources are subsequently cleaned up in the background.
|
|
1361
|
+
*
|
|
1362
|
+
* @remarks
|
|
1363
|
+
* Before you call this operation, make sure that the workspace is writable. If the agent is still associated with a team, you must dissociate the team first.
|
|
1364
|
+
* Deletion is an asynchronous process. After the request is accepted, the associated invocation endpoints become unavailable, and the runtime resources are subsequently cleaned up. The status in the response is typically Deleting. If the agent is already being deleted, a subsequent request returns the current summary.
|
|
1365
|
+
* You can call GetCustomAgent to check the deletion progress. After the deletion is complete, a detail query returns a resource not found error.
|
|
1366
|
+
*
|
|
1367
|
+
* @param request - DeleteCustomAgentRequest
|
|
1368
|
+
* @returns DeleteCustomAgentResponse
|
|
1369
|
+
*/
|
|
1370
|
+
async deleteCustomAgent(workspaceId, agentId, request) {
|
|
1371
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
1372
|
+
let headers = {};
|
|
1373
|
+
return await this.deleteCustomAgentWithOptions(workspaceId, agentId, request, headers, runtime);
|
|
1374
|
+
}
|
|
1264
1375
|
/**
|
|
1265
1376
|
* Deletes a specified external agent.
|
|
1266
1377
|
*
|
|
@@ -2246,6 +2357,53 @@ class Client extends openapi_core_1.default {
|
|
|
2246
2357
|
let headers = {};
|
|
2247
2358
|
return await this.getCredentialWithOptions(workspaceId, credentialId, request, headers, runtime);
|
|
2248
2359
|
}
|
|
2360
|
+
/**
|
|
2361
|
+
* 查询自定义智能体
|
|
2362
|
+
*
|
|
2363
|
+
* @remarks
|
|
2364
|
+
* 创建或更新后,可轮询本接口查询最新配置版本的执行结果。latestVersionStatus 与 latestSpecVersion 对应;latestExecutionError 表示该版本的等待或失败原因,retryable 为 true 时可稍后再次查询。
|
|
2365
|
+
* 返回的配置为最新提交的配置,可能尚未生效。请结合 latestVersionStatus、智能体整体状态 status 和运行实例统计 sandboxPhaseCounts 确认部署及运行情况。
|
|
2366
|
+
* 查询不存在、已完成删除或不属于指定工作空间的自定义智能体时,返回资源不存在错误。
|
|
2367
|
+
*
|
|
2368
|
+
* @param request - GetCustomAgentRequest
|
|
2369
|
+
* @param headers - map
|
|
2370
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
2371
|
+
* @returns GetCustomAgentResponse
|
|
2372
|
+
*/
|
|
2373
|
+
async getCustomAgentWithOptions(workspaceId, agentId, request, headers, runtime) {
|
|
2374
|
+
request.validate();
|
|
2375
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
2376
|
+
headers: headers,
|
|
2377
|
+
});
|
|
2378
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
2379
|
+
action: "GetCustomAgent",
|
|
2380
|
+
version: "2026-08-04",
|
|
2381
|
+
protocol: "HTTPS",
|
|
2382
|
+
pathname: `/workspaces/${$dara.URL.percentEncode(workspaceId)}/custom-agents/${$dara.URL.percentEncode(agentId)}`,
|
|
2383
|
+
method: "GET",
|
|
2384
|
+
authType: "AK",
|
|
2385
|
+
style: "ROA",
|
|
2386
|
+
reqBodyType: "json",
|
|
2387
|
+
bodyType: "json",
|
|
2388
|
+
});
|
|
2389
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.GetCustomAgentResponse({}));
|
|
2390
|
+
}
|
|
2391
|
+
/**
|
|
2392
|
+
* 查询自定义智能体
|
|
2393
|
+
*
|
|
2394
|
+
* @remarks
|
|
2395
|
+
* 创建或更新后,可轮询本接口查询最新配置版本的执行结果。latestVersionStatus 与 latestSpecVersion 对应;latestExecutionError 表示该版本的等待或失败原因,retryable 为 true 时可稍后再次查询。
|
|
2396
|
+
* 返回的配置为最新提交的配置,可能尚未生效。请结合 latestVersionStatus、智能体整体状态 status 和运行实例统计 sandboxPhaseCounts 确认部署及运行情况。
|
|
2397
|
+
* 查询不存在、已完成删除或不属于指定工作空间的自定义智能体时,返回资源不存在错误。
|
|
2398
|
+
*
|
|
2399
|
+
* @param request - GetCustomAgentRequest
|
|
2400
|
+
* @returns GetCustomAgentResponse
|
|
2401
|
+
*/
|
|
2402
|
+
async getCustomAgent(workspaceId, agentId, request) {
|
|
2403
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
2404
|
+
let headers = {};
|
|
2405
|
+
return await this.getCustomAgentWithOptions(workspaceId, agentId, request, headers, runtime);
|
|
2406
|
+
}
|
|
2249
2407
|
/**
|
|
2250
2408
|
* Queries the details of a specified external agent.
|
|
2251
2409
|
*
|
|
@@ -3524,6 +3682,61 @@ class Client extends openapi_core_1.default {
|
|
|
3524
3682
|
let headers = {};
|
|
3525
3683
|
return await this.listCredentialsWithOptions(workspaceId, request, headers, runtime);
|
|
3526
3684
|
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Performs a paged query to retrieve the summary of custom agents in a specified workspace. For paging, the complete configuration, and the execute results of the latest version, call GetCustomAgent.
|
|
3687
|
+
*
|
|
3688
|
+
* @remarks
|
|
3689
|
+
* The default value of maxResults is 20, and the maximum value is 100. If this parameter is omitted or set to 0, the default value is used.
|
|
3690
|
+
* Omit nextToken in the first request. In subsequent requests, pass the nextToken value returned in the previous response as is, and keep the same workspace. The nextToken is an opaque token. Do not parse or construct it yourself. An empty token in the response indicates that there are no more pages.
|
|
3691
|
+
* This operation returns the summaries of the current page and does not return the complete deployment configuration or the execution errors of the latest version. To obtain this information, call GetCustomAgent by using the agentId in items.
|
|
3692
|
+
*
|
|
3693
|
+
* @param request - ListCustomAgentsRequest
|
|
3694
|
+
* @param headers - map
|
|
3695
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
3696
|
+
* @returns ListCustomAgentsResponse
|
|
3697
|
+
*/
|
|
3698
|
+
async listCustomAgentsWithOptions(workspaceId, request, headers, runtime) {
|
|
3699
|
+
request.validate();
|
|
3700
|
+
let query = {};
|
|
3701
|
+
if (!$dara.isNull(request.maxResults)) {
|
|
3702
|
+
query["maxResults"] = request.maxResults;
|
|
3703
|
+
}
|
|
3704
|
+
if (!$dara.isNull(request.nextToken)) {
|
|
3705
|
+
query["nextToken"] = request.nextToken;
|
|
3706
|
+
}
|
|
3707
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
3708
|
+
headers: headers,
|
|
3709
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
3710
|
+
});
|
|
3711
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
3712
|
+
action: "ListCustomAgents",
|
|
3713
|
+
version: "2026-08-04",
|
|
3714
|
+
protocol: "HTTPS",
|
|
3715
|
+
pathname: `/workspaces/${$dara.URL.percentEncode(workspaceId)}/custom-agents`,
|
|
3716
|
+
method: "GET",
|
|
3717
|
+
authType: "AK",
|
|
3718
|
+
style: "ROA",
|
|
3719
|
+
reqBodyType: "json",
|
|
3720
|
+
bodyType: "json",
|
|
3721
|
+
});
|
|
3722
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ListCustomAgentsResponse({}));
|
|
3723
|
+
}
|
|
3724
|
+
/**
|
|
3725
|
+
* Performs a paged query to retrieve the summary of custom agents in a specified workspace. For paging, the complete configuration, and the execute results of the latest version, call GetCustomAgent.
|
|
3726
|
+
*
|
|
3727
|
+
* @remarks
|
|
3728
|
+
* The default value of maxResults is 20, and the maximum value is 100. If this parameter is omitted or set to 0, the default value is used.
|
|
3729
|
+
* Omit nextToken in the first request. In subsequent requests, pass the nextToken value returned in the previous response as is, and keep the same workspace. The nextToken is an opaque token. Do not parse or construct it yourself. An empty token in the response indicates that there are no more pages.
|
|
3730
|
+
* This operation returns the summaries of the current page and does not return the complete deployment configuration or the execution errors of the latest version. To obtain this information, call GetCustomAgent by using the agentId in items.
|
|
3731
|
+
*
|
|
3732
|
+
* @param request - ListCustomAgentsRequest
|
|
3733
|
+
* @returns ListCustomAgentsResponse
|
|
3734
|
+
*/
|
|
3735
|
+
async listCustomAgents(workspaceId, request) {
|
|
3736
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
3737
|
+
let headers = {};
|
|
3738
|
+
return await this.listCustomAgentsWithOptions(workspaceId, request, headers, runtime);
|
|
3739
|
+
}
|
|
3527
3740
|
/**
|
|
3528
3741
|
* Queries the list of external agents in a specified workspace.
|
|
3529
3742
|
*
|
|
@@ -4394,7 +4607,7 @@ class Client extends openapi_core_1.default {
|
|
|
4394
4607
|
return await this.listTeamsWithOptions(workspaceId, request, headers, runtime);
|
|
4395
4608
|
}
|
|
4396
4609
|
/**
|
|
4397
|
-
*
|
|
4610
|
+
* Performs a paged query of users in a specified workspace. You can filter users by fuzzy match on the username by using nameLike, specify the maximum number of records per page for paging by using maxResults, and obtain the next page by using nextToken. If maxResults is not specified, the server returns 10 records by default.
|
|
4398
4611
|
*
|
|
4399
4612
|
* @param request - ListUsersRequest
|
|
4400
4613
|
* @param headers - map
|
|
@@ -4434,7 +4647,7 @@ class Client extends openapi_core_1.default {
|
|
|
4434
4647
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ListUsersResponse({}));
|
|
4435
4648
|
}
|
|
4436
4649
|
/**
|
|
4437
|
-
*
|
|
4650
|
+
* Performs a paged query of users in a specified workspace. You can filter users by fuzzy match on the username by using nameLike, specify the maximum number of records per page for paging by using maxResults, and obtain the next page by using nextToken. If maxResults is not specified, the server returns 10 records by default.
|
|
4438
4651
|
*
|
|
4439
4652
|
* @param request - ListUsersRequest
|
|
4440
4653
|
* @returns ListUsersResponse
|
|
@@ -5212,6 +5425,72 @@ class Client extends openapi_core_1.default {
|
|
|
5212
5425
|
let headers = {};
|
|
5213
5426
|
return await this.updateCredentialWithOptions(workspaceId, credentialId, request, headers, runtime);
|
|
5214
5427
|
}
|
|
5428
|
+
/**
|
|
5429
|
+
* Updates the configuration of a specified custom agent in a workspace and executes the update asynchronously. Omitted top-level fields retain their original configurations. You can call the GetCustomAgent operation to query the update result.
|
|
5430
|
+
*
|
|
5431
|
+
* @remarks
|
|
5432
|
+
* Provide at least one top-level field to update. Omitted top-level fields retain their original configurations. When providing a configuration object, specify its required subfields and include any optional configurations that you want to retain. Arrays are replaced in their entirety. Pass an empty array [] to clear a list. The agenticFsMounts field does not accept null. Pass null for the description field to clear the description, and pass null for the healthCheck field to remove the health check.
|
|
5433
|
+
* When updating an image, you must specify artifact.port and the type, instanceId, namespace, repo, and tag fields of artifact.container. To retain a custom startup command, also provide the entrypoint field. Currently, only Alibaba Cloud Container Registry (ACR) container image deployment is supported. Omit the artifact.code field.
|
|
5434
|
+
* When providing the runtime field, both compute and sessionPolicy must be present. If you omit hpa or any of its fields, unspecified elastic configurations use default values. To retain the original elastic configurations, provide them together. When providing the network field, omitted access items are treated as allowed, but actual access is still subject to workspace network restrictions. To retain the original restrictions, provide both accessInternet and accessVpc. When providing healthCheck, you must specify the port field, and other unspecified items use default values. When providing logging.sls, you must specify both project and logstore.
|
|
5435
|
+
* The update is an asynchronous process. A successful response indicates that the request is accepted. Call the GetCustomAgent operation to query latestSpecVersion, latestVersionStatus, and latestExecutionError, and check the status field to confirm the update result.
|
|
5436
|
+
* The clientToken field currently does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold field for health checks currently does not take effect. Omit this field.
|
|
5437
|
+
*
|
|
5438
|
+
* @param tmpReq - UpdateCustomAgentRequest
|
|
5439
|
+
* @param headers - map
|
|
5440
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
5441
|
+
* @returns UpdateCustomAgentResponse
|
|
5442
|
+
*/
|
|
5443
|
+
async updateCustomAgentWithOptions(workspaceId, agentId, tmpReq, headers, runtime) {
|
|
5444
|
+
tmpReq.validate();
|
|
5445
|
+
let request = new $_model.UpdateCustomAgentShrinkRequest({});
|
|
5446
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
5447
|
+
if (!$dara.isNull(tmpReq.body)) {
|
|
5448
|
+
request.bodyShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.body, "body", "json");
|
|
5449
|
+
}
|
|
5450
|
+
let query = {};
|
|
5451
|
+
if (!$dara.isNull(request.clientToken)) {
|
|
5452
|
+
query["clientToken"] = request.clientToken;
|
|
5453
|
+
}
|
|
5454
|
+
let body = {};
|
|
5455
|
+
if (!$dara.isNull(request.bodyShrink)) {
|
|
5456
|
+
body["body"] = request.bodyShrink;
|
|
5457
|
+
}
|
|
5458
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
5459
|
+
headers: headers,
|
|
5460
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
5461
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
5462
|
+
});
|
|
5463
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
5464
|
+
action: "UpdateCustomAgent",
|
|
5465
|
+
version: "2026-08-04",
|
|
5466
|
+
protocol: "HTTPS",
|
|
5467
|
+
pathname: `/workspaces/${$dara.URL.percentEncode(workspaceId)}/custom-agents/${$dara.URL.percentEncode(agentId)}`,
|
|
5468
|
+
method: "PUT",
|
|
5469
|
+
authType: "AK",
|
|
5470
|
+
style: "ROA",
|
|
5471
|
+
reqBodyType: "formData",
|
|
5472
|
+
bodyType: "json",
|
|
5473
|
+
});
|
|
5474
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.UpdateCustomAgentResponse({}));
|
|
5475
|
+
}
|
|
5476
|
+
/**
|
|
5477
|
+
* Updates the configuration of a specified custom agent in a workspace and executes the update asynchronously. Omitted top-level fields retain their original configurations. You can call the GetCustomAgent operation to query the update result.
|
|
5478
|
+
*
|
|
5479
|
+
* @remarks
|
|
5480
|
+
* Provide at least one top-level field to update. Omitted top-level fields retain their original configurations. When providing a configuration object, specify its required subfields and include any optional configurations that you want to retain. Arrays are replaced in their entirety. Pass an empty array [] to clear a list. The agenticFsMounts field does not accept null. Pass null for the description field to clear the description, and pass null for the healthCheck field to remove the health check.
|
|
5481
|
+
* When updating an image, you must specify artifact.port and the type, instanceId, namespace, repo, and tag fields of artifact.container. To retain a custom startup command, also provide the entrypoint field. Currently, only Alibaba Cloud Container Registry (ACR) container image deployment is supported. Omit the artifact.code field.
|
|
5482
|
+
* When providing the runtime field, both compute and sessionPolicy must be present. If you omit hpa or any of its fields, unspecified elastic configurations use default values. To retain the original elastic configurations, provide them together. When providing the network field, omitted access items are treated as allowed, but actual access is still subject to workspace network restrictions. To retain the original restrictions, provide both accessInternet and accessVpc. When providing healthCheck, you must specify the port field, and other unspecified items use default values. When providing logging.sls, you must specify both project and logstore.
|
|
5483
|
+
* The update is an asynchronous process. A successful response indicates that the request is accepted. Call the GetCustomAgent operation to query latestSpecVersion, latestVersionStatus, and latestExecutionError, and check the status field to confirm the update result.
|
|
5484
|
+
* The clientToken field currently does not provide idempotency guarantees. Do not rely on this parameter to prevent duplicate requests. The healthyThreshold field for health checks currently does not take effect. Omit this field.
|
|
5485
|
+
*
|
|
5486
|
+
* @param request - UpdateCustomAgentRequest
|
|
5487
|
+
* @returns UpdateCustomAgentResponse
|
|
5488
|
+
*/
|
|
5489
|
+
async updateCustomAgent(workspaceId, agentId, request) {
|
|
5490
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
5491
|
+
let headers = {};
|
|
5492
|
+
return await this.updateCustomAgentWithOptions(workspaceId, agentId, request, headers, runtime);
|
|
5493
|
+
}
|
|
5215
5494
|
/**
|
|
5216
5495
|
* Updates the configuration of a specified external agent.
|
|
5217
5496
|
*
|