@alicloud/agentcore20260804 2.2.0 → 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.
Files changed (119) hide show
  1. package/dist/client.d.ts +162 -16
  2. package/dist/client.js +295 -16
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/CreateCustomAgentRequest.d.ts +765 -0
  5. package/dist/models/CreateCustomAgentRequest.js +591 -0
  6. package/dist/models/CreateCustomAgentRequest.js.map +1 -0
  7. package/dist/models/CreateCustomAgentResponse.d.ts +19 -0
  8. package/dist/models/CreateCustomAgentResponse.js +69 -0
  9. package/dist/models/CreateCustomAgentResponse.js.map +1 -0
  10. package/dist/models/CreateCustomAgentResponseBody.d.ts +923 -0
  11. package/dist/models/CreateCustomAgentResponseBody.js +652 -0
  12. package/dist/models/CreateCustomAgentResponseBody.js.map +1 -0
  13. package/dist/models/CreateCustomAgentShrinkRequest.d.ts +26 -0
  14. package/dist/models/CreateCustomAgentShrinkRequest.js +60 -0
  15. package/dist/models/CreateCustomAgentShrinkRequest.js.map +1 -0
  16. package/dist/models/CreateManagedAgentRequest.d.ts +72 -22
  17. package/dist/models/CreateManagedAgentRequest.js +27 -1
  18. package/dist/models/CreateManagedAgentRequest.js.map +1 -1
  19. package/dist/models/CreateManagedAgentResponseBody.d.ts +109 -28
  20. package/dist/models/CreateManagedAgentResponseBody.js +27 -1
  21. package/dist/models/CreateManagedAgentResponseBody.js.map +1 -1
  22. package/dist/models/CreateManagedAgentShrinkRequest.d.ts +1 -1
  23. package/dist/models/CreateSkillDraftRequest.d.ts +1 -1
  24. package/dist/models/CreateSkillDraftResponseBody.d.ts +1 -1
  25. package/dist/models/DeleteCustomAgentRequest.d.ts +13 -0
  26. package/dist/models/DeleteCustomAgentRequest.js +54 -0
  27. package/dist/models/DeleteCustomAgentRequest.js.map +1 -0
  28. package/dist/models/DeleteCustomAgentResponse.d.ts +19 -0
  29. package/dist/models/DeleteCustomAgentResponse.js +69 -0
  30. package/dist/models/DeleteCustomAgentResponse.js.map +1 -0
  31. package/dist/models/DeleteCustomAgentResponseBody.d.ts +155 -0
  32. package/dist/models/DeleteCustomAgentResponseBody.js +110 -0
  33. package/dist/models/DeleteCustomAgentResponseBody.js.map +1 -0
  34. package/dist/models/DownloadSkillVersionViaOssResponseBody.d.ts +1 -1
  35. package/dist/models/GetAgentSpecLatestResponseBody.d.ts +19 -2
  36. package/dist/models/GetAgentSpecLatestResponseBody.js.map +1 -1
  37. package/dist/models/GetCustomAgentRequest.d.ts +13 -0
  38. package/dist/models/GetCustomAgentRequest.js +54 -0
  39. package/dist/models/GetCustomAgentRequest.js.map +1 -0
  40. package/dist/models/GetCustomAgentResponse.d.ts +19 -0
  41. package/dist/models/GetCustomAgentResponse.js +69 -0
  42. package/dist/models/GetCustomAgentResponse.js.map +1 -0
  43. package/dist/models/GetCustomAgentResponseBody.d.ts +655 -0
  44. package/dist/models/GetCustomAgentResponseBody.js +652 -0
  45. package/dist/models/GetCustomAgentResponseBody.js.map +1 -0
  46. package/dist/models/GetManagedAgentResponseBody.d.ts +115 -32
  47. package/dist/models/GetManagedAgentResponseBody.js +27 -1
  48. package/dist/models/GetManagedAgentResponseBody.js.map +1 -1
  49. package/dist/models/ListCustomAgentsRequest.d.ts +29 -0
  50. package/dist/models/ListCustomAgentsRequest.js +60 -0
  51. package/dist/models/ListCustomAgentsRequest.js.map +1 -0
  52. package/dist/models/ListCustomAgentsResponse.d.ts +19 -0
  53. package/dist/models/ListCustomAgentsResponse.js +69 -0
  54. package/dist/models/ListCustomAgentsResponse.js.map +1 -0
  55. package/dist/models/ListCustomAgentsResponseBody.d.ts +248 -0
  56. package/dist/models/ListCustomAgentsResponseBody.js +171 -0
  57. package/dist/models/ListCustomAgentsResponseBody.js.map +1 -0
  58. package/dist/models/ListSkillsRequest.d.ts +2 -2
  59. package/dist/models/ListSkillsResponseBody.d.ts +10 -3
  60. package/dist/models/ListSkillsResponseBody.js.map +1 -1
  61. package/dist/models/ListUsersRequest.d.ts +4 -4
  62. package/dist/models/ListUsersResponseBody.d.ts +15 -15
  63. package/dist/models/UpdateCustomAgentRequest.d.ts +757 -0
  64. package/dist/models/UpdateCustomAgentRequest.js +591 -0
  65. package/dist/models/UpdateCustomAgentRequest.js.map +1 -0
  66. package/dist/models/UpdateCustomAgentResponse.d.ts +19 -0
  67. package/dist/models/UpdateCustomAgentResponse.js +69 -0
  68. package/dist/models/UpdateCustomAgentResponse.js.map +1 -0
  69. package/dist/models/UpdateCustomAgentResponseBody.d.ts +910 -0
  70. package/dist/models/UpdateCustomAgentResponseBody.js +652 -0
  71. package/dist/models/UpdateCustomAgentResponseBody.js.map +1 -0
  72. package/dist/models/UpdateCustomAgentShrinkRequest.d.ts +26 -0
  73. package/dist/models/UpdateCustomAgentShrinkRequest.js +60 -0
  74. package/dist/models/UpdateCustomAgentShrinkRequest.js.map +1 -0
  75. package/dist/models/UpdateManagedAgentRequest.d.ts +61 -30
  76. package/dist/models/UpdateManagedAgentRequest.js +27 -1
  77. package/dist/models/UpdateManagedAgentRequest.js.map +1 -1
  78. package/dist/models/UpdateManagedAgentResponseBody.d.ts +61 -28
  79. package/dist/models/UpdateManagedAgentResponseBody.js +27 -1
  80. package/dist/models/UpdateManagedAgentResponseBody.js.map +1 -1
  81. package/dist/models/UpdateManagedAgentShrinkRequest.d.ts +1 -1
  82. package/dist/models/model.d.ts +129 -0
  83. package/dist/models/model.js +316 -56
  84. package/dist/models/model.js.map +1 -1
  85. package/package.json +1 -1
  86. package/src/client.ts +313 -16
  87. package/src/models/CreateCustomAgentRequest.ts +1129 -0
  88. package/src/models/CreateCustomAgentResponse.ts +40 -0
  89. package/src/models/CreateCustomAgentResponseBody.ts +1337 -0
  90. package/src/models/CreateCustomAgentShrinkRequest.ts +41 -0
  91. package/src/models/CreateManagedAgentRequest.ts +89 -22
  92. package/src/models/CreateManagedAgentResponseBody.ts +126 -28
  93. package/src/models/CreateManagedAgentShrinkRequest.ts +1 -1
  94. package/src/models/CreateSkillDraftRequest.ts +1 -1
  95. package/src/models/CreateSkillDraftResponseBody.ts +1 -1
  96. package/src/models/DeleteCustomAgentRequest.ts +24 -0
  97. package/src/models/DeleteCustomAgentResponse.ts +40 -0
  98. package/src/models/DeleteCustomAgentResponseBody.ts +211 -0
  99. package/src/models/DownloadSkillVersionViaOssResponseBody.ts +1 -1
  100. package/src/models/GetAgentSpecLatestResponseBody.ts +19 -2
  101. package/src/models/GetCustomAgentRequest.ts +24 -0
  102. package/src/models/GetCustomAgentResponse.ts +40 -0
  103. package/src/models/GetCustomAgentResponseBody.ts +1069 -0
  104. package/src/models/GetManagedAgentResponseBody.ts +132 -32
  105. package/src/models/ListCustomAgentsRequest.ts +44 -0
  106. package/src/models/ListCustomAgentsResponse.ts +40 -0
  107. package/src/models/ListCustomAgentsResponseBody.ts +345 -0
  108. package/src/models/ListSkillsRequest.ts +2 -2
  109. package/src/models/ListSkillsResponseBody.ts +10 -3
  110. package/src/models/ListUsersRequest.ts +4 -4
  111. package/src/models/ListUsersResponseBody.ts +15 -15
  112. package/src/models/UpdateCustomAgentRequest.ts +1121 -0
  113. package/src/models/UpdateCustomAgentResponse.ts +40 -0
  114. package/src/models/UpdateCustomAgentResponseBody.ts +1324 -0
  115. package/src/models/UpdateCustomAgentShrinkRequest.ts +41 -0
  116. package/src/models/UpdateManagedAgentRequest.ts +78 -30
  117. package/src/models/UpdateManagedAgentResponseBody.ts +78 -28
  118. package/src/models/UpdateManagedAgentShrinkRequest.ts +1 -1
  119. package/src/models/model.ts +129 -0
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
  *
@@ -1561,7 +1672,7 @@ class Client extends openapi_core_1.default {
1561
1672
  * Deletes the draft version currently being edited for a specified Skill.
1562
1673
  *
1563
1674
  * @remarks
1564
- * ## Request description
1675
+ * ## Operation description
1565
1676
  * Deletes the draft version currently being edited for a specified Skill.
1566
1677
  *
1567
1678
  * @param request - DeleteSkillDraftRequest
@@ -1591,7 +1702,7 @@ class Client extends openapi_core_1.default {
1591
1702
  * Deletes the draft version currently being edited for a specified Skill.
1592
1703
  *
1593
1704
  * @remarks
1594
- * ## Request description
1705
+ * ## Operation description
1595
1706
  * Deletes the draft version currently being edited for a specified Skill.
1596
1707
  *
1597
1708
  * @param request - DeleteSkillDraftRequest
@@ -1826,7 +1937,7 @@ class Client extends openapi_core_1.default {
1826
1937
  * Retrieves a pre-signed OSS download URL for a specified Skill version, which is used to download the corresponding Skill ZIP package.
1827
1938
  *
1828
1939
  * @remarks
1829
- * ## Request description
1940
+ * ## Operation description
1830
1941
  * Retrieves a pre-signed OSS download URL for a specified Skill version, which is used to download the corresponding Skill ZIP package.
1831
1942
  *
1832
1943
  * @param request - DownloadSkillVersionViaOssRequest
@@ -1856,7 +1967,7 @@ class Client extends openapi_core_1.default {
1856
1967
  * Retrieves a pre-signed OSS download URL for a specified Skill version, which is used to download the corresponding Skill ZIP package.
1857
1968
  *
1858
1969
  * @remarks
1859
- * ## Request description
1970
+ * ## Operation description
1860
1971
  * Retrieves a pre-signed OSS download URL for a specified Skill version, which is used to download the corresponding Skill ZIP package.
1861
1972
  *
1862
1973
  * @param request - DownloadSkillVersionViaOssRequest
@@ -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
  *
@@ -4272,11 +4485,11 @@ class Client extends openapi_core_1.default {
4272
4485
  return await this.listSkillReferencesWithOptions(workspaceId, skillName, request, headers, runtime);
4273
4486
  }
4274
4487
  /**
4275
- * Performs a paged query of Skills in a specified workspace, and returns basic Skill information, version status, and paging details.
4488
+ * Performs a paged query of Skills in a specified workspace and returns basic Skill information, version status, and paging information.
4276
4489
  *
4277
4490
  * @remarks
4278
4491
  * ## Operation description
4279
- * Performs a paged query of Skills in a specified workspace, and returns basic Skill information, version status, and paging details.
4492
+ * Performs a paged query of Skills in a specified workspace and returns basic Skill information, version status, and paging information.
4280
4493
  *
4281
4494
  * @param request - ListSkillsRequest
4282
4495
  * @param headers - map
@@ -4331,11 +4544,11 @@ class Client extends openapi_core_1.default {
4331
4544
  return $dara.cast(await this.callApi(params, req, runtime), new $_model.ListSkillsResponse({}));
4332
4545
  }
4333
4546
  /**
4334
- * Performs a paged query of Skills in a specified workspace, and returns basic Skill information, version status, and paging details.
4547
+ * Performs a paged query of Skills in a specified workspace and returns basic Skill information, version status, and paging information.
4335
4548
  *
4336
4549
  * @remarks
4337
4550
  * ## Operation description
4338
- * Performs a paged query of Skills in a specified workspace, and returns basic Skill information, version status, and paging details.
4551
+ * Performs a paged query of Skills in a specified workspace and returns basic Skill information, version status, and paging information.
4339
4552
  *
4340
4553
  * @param request - ListSkillsRequest
4341
4554
  * @returns ListSkillsResponse
@@ -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
- * Queries users in a specified workspace with paging. Use nameLike to filter by username with fuzzy match, maxResults to specify the maximum number of records per page, and nextToken to retrieve the next page. If maxResults is not specified, the server returns 10 records by default.
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
- * Queries users in a specified workspace with paging. Use nameLike to filter by username with fuzzy match, maxResults to specify the maximum number of records per page, and nextToken to retrieve the next page. If maxResults is not specified, the server returns 10 records by default.
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
@@ -4719,11 +4932,11 @@ class Client extends openapi_core_1.default {
4719
4932
  return await this.publishSkillVersionWithOptions(workspaceId, skillName, skillVersion, request, headers, runtime);
4720
4933
  }
4721
4934
  /**
4722
- * Converts a specified Skill version back into an editable draft for further modifications.
4935
+ * Converts a specified Skill version back to an editable draft so that you can continue to modify it.
4723
4936
  *
4724
4937
  * @remarks
4725
- * ## Operation description
4726
- * Converts a specified Skill version back into an editable draft for further modifications.
4938
+ * ## Request description
4939
+ * Converts a specified Skill version back to an editable draft so that you can continue to modify it.
4727
4940
  *
4728
4941
  * @param tmpReq - RedraftSkillVersionRequest
4729
4942
  * @param headers - map
@@ -4759,11 +4972,11 @@ class Client extends openapi_core_1.default {
4759
4972
  return $dara.cast(await this.callApi(params, req, runtime), new $_model.RedraftSkillVersionResponse({}));
4760
4973
  }
4761
4974
  /**
4762
- * Converts a specified Skill version back into an editable draft for further modifications.
4975
+ * Converts a specified Skill version back to an editable draft so that you can continue to modify it.
4763
4976
  *
4764
4977
  * @remarks
4765
- * ## Operation description
4766
- * Converts a specified Skill version back into an editable draft for further modifications.
4978
+ * ## Request description
4979
+ * Converts a specified Skill version back to an editable draft so that you can continue to modify it.
4767
4980
  *
4768
4981
  * @param request - RedraftSkillVersionRequest
4769
4982
  * @returns RedraftSkillVersionResponse
@@ -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
  *