qca-sdk 0.1.0-dev.1
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/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/core/api-promise.d.ts +19 -0
- package/dist/core/api-promise.d.ts.map +1 -0
- package/dist/core/api-promise.js +30 -0
- package/dist/core/api-promise.js.map +1 -0
- package/dist/core/client.d.ts +52 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js +312 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/credentials.d.ts +11 -0
- package/dist/core/credentials.d.ts.map +1 -0
- package/dist/core/credentials.js +21 -0
- package/dist/core/credentials.js.map +1 -0
- package/dist/core/error.d.ts +39 -0
- package/dist/core/error.d.ts.map +1 -0
- package/dist/core/error.js +76 -0
- package/dist/core/error.js.map +1 -0
- package/dist/core/pagination.d.ts +40 -0
- package/dist/core/pagination.d.ts.map +1 -0
- package/dist/core/pagination.js +101 -0
- package/dist/core/pagination.js.map +1 -0
- package/dist/core/resource.d.ts +7 -0
- package/dist/core/resource.d.ts.map +1 -0
- package/dist/core/resource.js +12 -0
- package/dist/core/resource.js.map +1 -0
- package/dist/core/streaming.d.ts +20 -0
- package/dist/core/streaming.d.ts.map +1 -0
- package/dist/core/streaming.js +140 -0
- package/dist/core/streaming.js.map +1 -0
- package/dist/core/uploads.d.ts +9 -0
- package/dist/core/uploads.d.ts.map +1 -0
- package/dist/core/uploads.js +60 -0
- package/dist/core/uploads.js.map +1 -0
- package/dist/esm/core/api-promise.d.ts +19 -0
- package/dist/esm/core/api-promise.d.ts.map +1 -0
- package/dist/esm/core/api-promise.js +26 -0
- package/dist/esm/core/api-promise.js.map +1 -0
- package/dist/esm/core/client.d.ts +52 -0
- package/dist/esm/core/client.d.ts.map +1 -0
- package/dist/esm/core/client.js +306 -0
- package/dist/esm/core/client.js.map +1 -0
- package/dist/esm/core/credentials.d.ts +11 -0
- package/dist/esm/core/credentials.d.ts.map +1 -0
- package/dist/esm/core/credentials.js +16 -0
- package/dist/esm/core/credentials.js.map +1 -0
- package/dist/esm/core/error.d.ts +39 -0
- package/dist/esm/core/error.d.ts.map +1 -0
- package/dist/esm/core/error.js +60 -0
- package/dist/esm/core/error.js.map +1 -0
- package/dist/esm/core/pagination.d.ts +40 -0
- package/dist/esm/core/pagination.d.ts.map +1 -0
- package/dist/esm/core/pagination.js +96 -0
- package/dist/esm/core/pagination.js.map +1 -0
- package/dist/esm/core/resource.d.ts +7 -0
- package/dist/esm/core/resource.d.ts.map +1 -0
- package/dist/esm/core/resource.js +8 -0
- package/dist/esm/core/resource.js.map +1 -0
- package/dist/esm/core/streaming.d.ts +20 -0
- package/dist/esm/core/streaming.d.ts.map +1 -0
- package/dist/esm/core/streaming.js +135 -0
- package/dist/esm/core/streaming.js.map +1 -0
- package/dist/esm/core/uploads.d.ts +9 -0
- package/dist/esm/core/uploads.d.ts.map +1 -0
- package/dist/esm/core/uploads.js +56 -0
- package/dist/esm/core/uploads.js.map +1 -0
- package/dist/esm/forward/_utils.d.ts +6 -0
- package/dist/esm/forward/_utils.d.ts.map +1 -0
- package/dist/esm/forward/_utils.js +31 -0
- package/dist/esm/forward/_utils.js.map +1 -0
- package/dist/esm/forward/batch-task.d.ts +15 -0
- package/dist/esm/forward/batch-task.d.ts.map +1 -0
- package/dist/esm/forward/batch-task.js +16 -0
- package/dist/esm/forward/batch-task.js.map +1 -0
- package/dist/esm/forward/batch.d.ts +53 -0
- package/dist/esm/forward/batch.d.ts.map +1 -0
- package/dist/esm/forward/batch.js +93 -0
- package/dist/esm/forward/batch.js.map +1 -0
- package/dist/esm/forward/channel-pairing.d.ts +22 -0
- package/dist/esm/forward/channel-pairing.d.ts.map +1 -0
- package/dist/esm/forward/channel-pairing.js +37 -0
- package/dist/esm/forward/channel-pairing.js.map +1 -0
- package/dist/esm/forward/channel-qr-session.d.ts +22 -0
- package/dist/esm/forward/channel-qr-session.d.ts.map +1 -0
- package/dist/esm/forward/channel-qr-session.js +36 -0
- package/dist/esm/forward/channel-qr-session.js.map +1 -0
- package/dist/esm/forward/channel.d.ts +46 -0
- package/dist/esm/forward/channel.d.ts.map +1 -0
- package/dist/esm/forward/channel.js +80 -0
- package/dist/esm/forward/channel.js.map +1 -0
- package/dist/esm/forward/environment.d.ts +51 -0
- package/dist/esm/forward/environment.d.ts.map +1 -0
- package/dist/esm/forward/environment.js +91 -0
- package/dist/esm/forward/environment.js.map +1 -0
- package/dist/esm/forward/file.d.ts +44 -0
- package/dist/esm/forward/file.d.ts.map +1 -0
- package/dist/esm/forward/file.js +73 -0
- package/dist/esm/forward/file.js.map +1 -0
- package/dist/esm/forward/forwardClient.d.ts +35 -0
- package/dist/esm/forward/forwardClient.d.ts.map +1 -0
- package/dist/esm/forward/forwardClient.js +37 -0
- package/dist/esm/forward/forwardClient.js.map +1 -0
- package/dist/esm/forward/identity-config.d.ts +37 -0
- package/dist/esm/forward/identity-config.d.ts.map +1 -0
- package/dist/esm/forward/identity-config.js +61 -0
- package/dist/esm/forward/identity-config.js.map +1 -0
- package/dist/esm/forward/identity-memory-store.d.ts +29 -0
- package/dist/esm/forward/identity-memory-store.d.ts.map +1 -0
- package/dist/esm/forward/identity-memory-store.js +49 -0
- package/dist/esm/forward/identity-memory-store.js.map +1 -0
- package/dist/esm/forward/identity.d.ts +90 -0
- package/dist/esm/forward/identity.d.ts.map +1 -0
- package/dist/esm/forward/identity.js +167 -0
- package/dist/esm/forward/identity.js.map +1 -0
- package/dist/esm/forward/index.d.ts +39 -0
- package/dist/esm/forward/index.d.ts.map +1 -0
- package/dist/esm/forward/index.js +35 -0
- package/dist/esm/forward/index.js.map +1 -0
- package/dist/esm/forward/memory-store-memory-version.d.ts +30 -0
- package/dist/esm/forward/memory-store-memory-version.d.ts.map +1 -0
- package/dist/esm/forward/memory-store-memory-version.js +44 -0
- package/dist/esm/forward/memory-store-memory-version.js.map +1 -0
- package/dist/esm/forward/memory-store-memory.d.ts +44 -0
- package/dist/esm/forward/memory-store-memory.d.ts.map +1 -0
- package/dist/esm/forward/memory-store-memory.js +74 -0
- package/dist/esm/forward/memory-store-memory.js.map +1 -0
- package/dist/esm/forward/memory-store.d.ts +55 -0
- package/dist/esm/forward/memory-store.d.ts.map +1 -0
- package/dist/esm/forward/memory-store.js +94 -0
- package/dist/esm/forward/memory-store.js.map +1 -0
- package/dist/esm/forward/model.d.ts +15 -0
- package/dist/esm/forward/model.d.ts.map +1 -0
- package/dist/esm/forward/model.js +19 -0
- package/dist/esm/forward/model.js.map +1 -0
- package/dist/esm/forward/schedule-run.d.ts +23 -0
- package/dist/esm/forward/schedule-run.d.ts.map +1 -0
- package/dist/esm/forward/schedule-run.js +31 -0
- package/dist/esm/forward/schedule-run.js.map +1 -0
- package/dist/esm/forward/schedule.d.ts +72 -0
- package/dist/esm/forward/schedule.d.ts.map +1 -0
- package/dist/esm/forward/schedule.js +145 -0
- package/dist/esm/forward/schedule.js.map +1 -0
- package/dist/esm/forward/session-event.d.ts +31 -0
- package/dist/esm/forward/session-event.d.ts.map +1 -0
- package/dist/esm/forward/session-event.js +51 -0
- package/dist/esm/forward/session-event.js.map +1 -0
- package/dist/esm/forward/session-resource.d.ts +15 -0
- package/dist/esm/forward/session-resource.d.ts.map +1 -0
- package/dist/esm/forward/session-resource.js +21 -0
- package/dist/esm/forward/session-resource.js.map +1 -0
- package/dist/esm/forward/session-thread-event.d.ts +24 -0
- package/dist/esm/forward/session-thread-event.d.ts.map +1 -0
- package/dist/esm/forward/session-thread-event.js +33 -0
- package/dist/esm/forward/session-thread-event.js.map +1 -0
- package/dist/esm/forward/session-thread.d.ts +32 -0
- package/dist/esm/forward/session-thread.d.ts.map +1 -0
- package/dist/esm/forward/session-thread.js +48 -0
- package/dist/esm/forward/session-thread.js.map +1 -0
- package/dist/esm/forward/session.d.ts +57 -0
- package/dist/esm/forward/session.d.ts.map +1 -0
- package/dist/esm/forward/session.js +102 -0
- package/dist/esm/forward/session.js.map +1 -0
- package/dist/esm/forward/skill-version.d.ts +44 -0
- package/dist/esm/forward/skill-version.d.ts.map +1 -0
- package/dist/esm/forward/skill-version.js +75 -0
- package/dist/esm/forward/skill-version.js.map +1 -0
- package/dist/esm/forward/skill.d.ts +46 -0
- package/dist/esm/forward/skill.d.ts.map +1 -0
- package/dist/esm/forward/skill.js +81 -0
- package/dist/esm/forward/skill.js.map +1 -0
- package/dist/esm/forward/template.d.ts +51 -0
- package/dist/esm/forward/template.d.ts.map +1 -0
- package/dist/esm/forward/template.js +97 -0
- package/dist/esm/forward/template.js.map +1 -0
- package/dist/esm/forward/types.d.ts +3153 -0
- package/dist/esm/forward/types.d.ts.map +1 -0
- package/dist/esm/forward/types.js +2 -0
- package/dist/esm/forward/types.js.map +1 -0
- package/dist/esm/forward/vault-credential.d.ts +37 -0
- package/dist/esm/forward/vault-credential.d.ts.map +1 -0
- package/dist/esm/forward/vault-credential.js +62 -0
- package/dist/esm/forward/vault-credential.js.map +1 -0
- package/dist/esm/forward/vault.d.ts +39 -0
- package/dist/esm/forward/vault.d.ts.map +1 -0
- package/dist/esm/forward/vault.js +64 -0
- package/dist/esm/forward/vault.js.map +1 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/managed/client.d.ts +30 -0
- package/dist/esm/managed/client.d.ts.map +1 -0
- package/dist/esm/managed/client.js +29 -0
- package/dist/esm/managed/client.js.map +1 -0
- package/dist/esm/managed/index.d.ts +12 -0
- package/dist/esm/managed/index.d.ts.map +1 -0
- package/dist/esm/managed/index.js +10 -0
- package/dist/esm/managed/index.js.map +1 -0
- package/dist/esm/managed/internal.d.ts +11 -0
- package/dist/esm/managed/internal.d.ts.map +1 -0
- package/dist/esm/managed/internal.js +53 -0
- package/dist/esm/managed/internal.js.map +1 -0
- package/dist/esm/managed/managedClient.d.ts +3 -0
- package/dist/esm/managed/managedClient.d.ts.map +1 -0
- package/dist/esm/managed/managedClient.js +2 -0
- package/dist/esm/managed/managedClient.js.map +1 -0
- package/dist/esm/managed/resources/agent-version.d.ts +13 -0
- package/dist/esm/managed/resources/agent-version.d.ts.map +1 -0
- package/dist/esm/managed/resources/agent-version.js +14 -0
- package/dist/esm/managed/resources/agent-version.js.map +1 -0
- package/dist/esm/managed/resources/agent.d.ts +32 -0
- package/dist/esm/managed/resources/agent.d.ts.map +1 -0
- package/dist/esm/managed/resources/agent.js +44 -0
- package/dist/esm/managed/resources/agent.js.map +1 -0
- package/dist/esm/managed/resources/deployment-run.d.ts +18 -0
- package/dist/esm/managed/resources/deployment-run.d.ts.map +1 -0
- package/dist/esm/managed/resources/deployment-run.js +21 -0
- package/dist/esm/managed/resources/deployment-run.js.map +1 -0
- package/dist/esm/managed/resources/deployment.d.ts +42 -0
- package/dist/esm/managed/resources/deployment.d.ts.map +1 -0
- package/dist/esm/managed/resources/deployment.js +63 -0
- package/dist/esm/managed/resources/deployment.js.map +1 -0
- package/dist/esm/managed/resources/dream.d.ts +30 -0
- package/dist/esm/managed/resources/dream.d.ts.map +1 -0
- package/dist/esm/managed/resources/dream.js +42 -0
- package/dist/esm/managed/resources/dream.js.map +1 -0
- package/dist/esm/managed/resources/environment-work.d.ts +78 -0
- package/dist/esm/managed/resources/environment-work.d.ts.map +1 -0
- package/dist/esm/managed/resources/environment-work.js +99 -0
- package/dist/esm/managed/resources/environment-work.js.map +1 -0
- package/dist/esm/managed/resources/environment.d.ts +37 -0
- package/dist/esm/managed/resources/environment.d.ts.map +1 -0
- package/dist/esm/managed/resources/environment.js +52 -0
- package/dist/esm/managed/resources/environment.js.map +1 -0
- package/dist/esm/managed/resources/file.d.ts +30 -0
- package/dist/esm/managed/resources/file.d.ts.map +1 -0
- package/dist/esm/managed/resources/file.js +44 -0
- package/dist/esm/managed/resources/file.js.map +1 -0
- package/dist/esm/managed/resources/index.d.ts +22 -0
- package/dist/esm/managed/resources/index.d.ts.map +1 -0
- package/dist/esm/managed/resources/index.js +22 -0
- package/dist/esm/managed/resources/index.js.map +1 -0
- package/dist/esm/managed/resources/memory-store-memory-version.d.ts +22 -0
- package/dist/esm/managed/resources/memory-store-memory-version.d.ts.map +1 -0
- package/dist/esm/managed/resources/memory-store-memory-version.js +28 -0
- package/dist/esm/managed/resources/memory-store-memory-version.js.map +1 -0
- package/dist/esm/managed/resources/memory-store-memory.d.ts +30 -0
- package/dist/esm/managed/resources/memory-store-memory.d.ts.map +1 -0
- package/dist/esm/managed/resources/memory-store-memory.js +42 -0
- package/dist/esm/managed/resources/memory-store-memory.js.map +1 -0
- package/dist/esm/managed/resources/memory-store.d.ts +38 -0
- package/dist/esm/managed/resources/memory-store.d.ts.map +1 -0
- package/dist/esm/managed/resources/memory-store.js +53 -0
- package/dist/esm/managed/resources/memory-store.js.map +1 -0
- package/dist/esm/managed/resources/model.d.ts +16 -0
- package/dist/esm/managed/resources/model.d.ts.map +1 -0
- package/dist/esm/managed/resources/model.js +17 -0
- package/dist/esm/managed/resources/model.js.map +1 -0
- package/dist/esm/managed/resources/session-event.d.ts +23 -0
- package/dist/esm/managed/resources/session-event.d.ts.map +1 -0
- package/dist/esm/managed/resources/session-event.js +30 -0
- package/dist/esm/managed/resources/session-event.js.map +1 -0
- package/dist/esm/managed/resources/session-resource.d.ts +30 -0
- package/dist/esm/managed/resources/session-resource.d.ts.map +1 -0
- package/dist/esm/managed/resources/session-resource.js +42 -0
- package/dist/esm/managed/resources/session-resource.js.map +1 -0
- package/dist/esm/managed/resources/session-thread-event.d.ts +19 -0
- package/dist/esm/managed/resources/session-thread-event.d.ts.map +1 -0
- package/dist/esm/managed/resources/session-thread-event.js +23 -0
- package/dist/esm/managed/resources/session-thread-event.js.map +1 -0
- package/dist/esm/managed/resources/session-thread.d.ts +24 -0
- package/dist/esm/managed/resources/session-thread.d.ts.map +1 -0
- package/dist/esm/managed/resources/session-thread.js +30 -0
- package/dist/esm/managed/resources/session-thread.js.map +1 -0
- package/dist/esm/managed/resources/session.d.ts +40 -0
- package/dist/esm/managed/resources/session.d.ts.map +1 -0
- package/dist/esm/managed/resources/session.js +55 -0
- package/dist/esm/managed/resources/session.js.map +1 -0
- package/dist/esm/managed/resources/skill-version.d.ts +30 -0
- package/dist/esm/managed/resources/skill-version.d.ts.map +1 -0
- package/dist/esm/managed/resources/skill-version.js +44 -0
- package/dist/esm/managed/resources/skill-version.js.map +1 -0
- package/dist/esm/managed/resources/skill.d.ts +28 -0
- package/dist/esm/managed/resources/skill.d.ts.map +1 -0
- package/dist/esm/managed/resources/skill.js +37 -0
- package/dist/esm/managed/resources/skill.js.map +1 -0
- package/dist/esm/managed/resources/vault-credential.d.ts +38 -0
- package/dist/esm/managed/resources/vault-credential.d.ts.map +1 -0
- package/dist/esm/managed/resources/vault-credential.js +56 -0
- package/dist/esm/managed/resources/vault-credential.js.map +1 -0
- package/dist/esm/managed/resources/vault.d.ts +32 -0
- package/dist/esm/managed/resources/vault.d.ts.map +1 -0
- package/dist/esm/managed/resources/vault.js +44 -0
- package/dist/esm/managed/resources/vault.js.map +1 -0
- package/dist/esm/managed/types.d.ts +10612 -0
- package/dist/esm/managed/types.d.ts.map +1 -0
- package/dist/esm/managed/types.js +3 -0
- package/dist/esm/managed/types.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/forward/_utils.d.ts +6 -0
- package/dist/forward/_utils.d.ts.map +1 -0
- package/dist/forward/_utils.js +35 -0
- package/dist/forward/_utils.js.map +1 -0
- package/dist/forward/batch-task.d.ts +15 -0
- package/dist/forward/batch-task.d.ts.map +1 -0
- package/dist/forward/batch-task.js +20 -0
- package/dist/forward/batch-task.js.map +1 -0
- package/dist/forward/batch.d.ts +53 -0
- package/dist/forward/batch.d.ts.map +1 -0
- package/dist/forward/batch.js +97 -0
- package/dist/forward/batch.js.map +1 -0
- package/dist/forward/channel-pairing.d.ts +22 -0
- package/dist/forward/channel-pairing.d.ts.map +1 -0
- package/dist/forward/channel-pairing.js +41 -0
- package/dist/forward/channel-pairing.js.map +1 -0
- package/dist/forward/channel-qr-session.d.ts +22 -0
- package/dist/forward/channel-qr-session.d.ts.map +1 -0
- package/dist/forward/channel-qr-session.js +40 -0
- package/dist/forward/channel-qr-session.js.map +1 -0
- package/dist/forward/channel.d.ts +46 -0
- package/dist/forward/channel.d.ts.map +1 -0
- package/dist/forward/channel.js +84 -0
- package/dist/forward/channel.js.map +1 -0
- package/dist/forward/environment.d.ts +51 -0
- package/dist/forward/environment.d.ts.map +1 -0
- package/dist/forward/environment.js +95 -0
- package/dist/forward/environment.js.map +1 -0
- package/dist/forward/file.d.ts +44 -0
- package/dist/forward/file.d.ts.map +1 -0
- package/dist/forward/file.js +77 -0
- package/dist/forward/file.js.map +1 -0
- package/dist/forward/forwardClient.d.ts +35 -0
- package/dist/forward/forwardClient.d.ts.map +1 -0
- package/dist/forward/forwardClient.js +41 -0
- package/dist/forward/forwardClient.js.map +1 -0
- package/dist/forward/identity-config.d.ts +37 -0
- package/dist/forward/identity-config.d.ts.map +1 -0
- package/dist/forward/identity-config.js +65 -0
- package/dist/forward/identity-config.js.map +1 -0
- package/dist/forward/identity-memory-store.d.ts +29 -0
- package/dist/forward/identity-memory-store.d.ts.map +1 -0
- package/dist/forward/identity-memory-store.js +53 -0
- package/dist/forward/identity-memory-store.js.map +1 -0
- package/dist/forward/identity.d.ts +90 -0
- package/dist/forward/identity.d.ts.map +1 -0
- package/dist/forward/identity.js +171 -0
- package/dist/forward/identity.js.map +1 -0
- package/dist/forward/index.d.ts +39 -0
- package/dist/forward/index.d.ts.map +1 -0
- package/dist/forward/index.js +86 -0
- package/dist/forward/index.js.map +1 -0
- package/dist/forward/memory-store-memory-version.d.ts +30 -0
- package/dist/forward/memory-store-memory-version.d.ts.map +1 -0
- package/dist/forward/memory-store-memory-version.js +48 -0
- package/dist/forward/memory-store-memory-version.js.map +1 -0
- package/dist/forward/memory-store-memory.d.ts +44 -0
- package/dist/forward/memory-store-memory.d.ts.map +1 -0
- package/dist/forward/memory-store-memory.js +78 -0
- package/dist/forward/memory-store-memory.js.map +1 -0
- package/dist/forward/memory-store.d.ts +55 -0
- package/dist/forward/memory-store.d.ts.map +1 -0
- package/dist/forward/memory-store.js +98 -0
- package/dist/forward/memory-store.js.map +1 -0
- package/dist/forward/model.d.ts +15 -0
- package/dist/forward/model.d.ts.map +1 -0
- package/dist/forward/model.js +23 -0
- package/dist/forward/model.js.map +1 -0
- package/dist/forward/schedule-run.d.ts +23 -0
- package/dist/forward/schedule-run.d.ts.map +1 -0
- package/dist/forward/schedule-run.js +35 -0
- package/dist/forward/schedule-run.js.map +1 -0
- package/dist/forward/schedule.d.ts +72 -0
- package/dist/forward/schedule.d.ts.map +1 -0
- package/dist/forward/schedule.js +149 -0
- package/dist/forward/schedule.js.map +1 -0
- package/dist/forward/session-event.d.ts +31 -0
- package/dist/forward/session-event.d.ts.map +1 -0
- package/dist/forward/session-event.js +55 -0
- package/dist/forward/session-event.js.map +1 -0
- package/dist/forward/session-resource.d.ts +15 -0
- package/dist/forward/session-resource.d.ts.map +1 -0
- package/dist/forward/session-resource.js +25 -0
- package/dist/forward/session-resource.js.map +1 -0
- package/dist/forward/session-thread-event.d.ts +24 -0
- package/dist/forward/session-thread-event.d.ts.map +1 -0
- package/dist/forward/session-thread-event.js +37 -0
- package/dist/forward/session-thread-event.js.map +1 -0
- package/dist/forward/session-thread.d.ts +32 -0
- package/dist/forward/session-thread.d.ts.map +1 -0
- package/dist/forward/session-thread.js +52 -0
- package/dist/forward/session-thread.js.map +1 -0
- package/dist/forward/session.d.ts +57 -0
- package/dist/forward/session.d.ts.map +1 -0
- package/dist/forward/session.js +106 -0
- package/dist/forward/session.js.map +1 -0
- package/dist/forward/skill-version.d.ts +44 -0
- package/dist/forward/skill-version.d.ts.map +1 -0
- package/dist/forward/skill-version.js +79 -0
- package/dist/forward/skill-version.js.map +1 -0
- package/dist/forward/skill.d.ts +46 -0
- package/dist/forward/skill.d.ts.map +1 -0
- package/dist/forward/skill.js +85 -0
- package/dist/forward/skill.js.map +1 -0
- package/dist/forward/template.d.ts +51 -0
- package/dist/forward/template.d.ts.map +1 -0
- package/dist/forward/template.js +101 -0
- package/dist/forward/template.js.map +1 -0
- package/dist/forward/types.d.ts +3153 -0
- package/dist/forward/types.d.ts.map +1 -0
- package/dist/forward/types.js +3 -0
- package/dist/forward/types.js.map +1 -0
- package/dist/forward/vault-credential.d.ts +37 -0
- package/dist/forward/vault-credential.d.ts.map +1 -0
- package/dist/forward/vault-credential.js +66 -0
- package/dist/forward/vault-credential.js.map +1 -0
- package/dist/forward/vault.d.ts +39 -0
- package/dist/forward/vault.d.ts.map +1 -0
- package/dist/forward/vault.js +68 -0
- package/dist/forward/vault.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/managed/client.d.ts +30 -0
- package/dist/managed/client.d.ts.map +1 -0
- package/dist/managed/client.js +33 -0
- package/dist/managed/client.js.map +1 -0
- package/dist/managed/index.d.ts +12 -0
- package/dist/managed/index.d.ts.map +1 -0
- package/dist/managed/index.js +34 -0
- package/dist/managed/index.js.map +1 -0
- package/dist/managed/internal.d.ts +11 -0
- package/dist/managed/internal.d.ts.map +1 -0
- package/dist/managed/internal.js +58 -0
- package/dist/managed/internal.js.map +1 -0
- package/dist/managed/managedClient.d.ts +3 -0
- package/dist/managed/managedClient.d.ts.map +1 -0
- package/dist/managed/managedClient.js +7 -0
- package/dist/managed/managedClient.js.map +1 -0
- package/dist/managed/resources/agent-version.d.ts +13 -0
- package/dist/managed/resources/agent-version.d.ts.map +1 -0
- package/dist/managed/resources/agent-version.js +18 -0
- package/dist/managed/resources/agent-version.js.map +1 -0
- package/dist/managed/resources/agent.d.ts +32 -0
- package/dist/managed/resources/agent.d.ts.map +1 -0
- package/dist/managed/resources/agent.js +48 -0
- package/dist/managed/resources/agent.js.map +1 -0
- package/dist/managed/resources/deployment-run.d.ts +18 -0
- package/dist/managed/resources/deployment-run.d.ts.map +1 -0
- package/dist/managed/resources/deployment-run.js +25 -0
- package/dist/managed/resources/deployment-run.js.map +1 -0
- package/dist/managed/resources/deployment.d.ts +42 -0
- package/dist/managed/resources/deployment.d.ts.map +1 -0
- package/dist/managed/resources/deployment.js +67 -0
- package/dist/managed/resources/deployment.js.map +1 -0
- package/dist/managed/resources/dream.d.ts +30 -0
- package/dist/managed/resources/dream.d.ts.map +1 -0
- package/dist/managed/resources/dream.js +46 -0
- package/dist/managed/resources/dream.js.map +1 -0
- package/dist/managed/resources/environment-work.d.ts +78 -0
- package/dist/managed/resources/environment-work.d.ts.map +1 -0
- package/dist/managed/resources/environment-work.js +103 -0
- package/dist/managed/resources/environment-work.js.map +1 -0
- package/dist/managed/resources/environment.d.ts +37 -0
- package/dist/managed/resources/environment.d.ts.map +1 -0
- package/dist/managed/resources/environment.js +56 -0
- package/dist/managed/resources/environment.js.map +1 -0
- package/dist/managed/resources/file.d.ts +30 -0
- package/dist/managed/resources/file.d.ts.map +1 -0
- package/dist/managed/resources/file.js +48 -0
- package/dist/managed/resources/file.js.map +1 -0
- package/dist/managed/resources/index.d.ts +22 -0
- package/dist/managed/resources/index.d.ts.map +1 -0
- package/dist/managed/resources/index.js +46 -0
- package/dist/managed/resources/index.js.map +1 -0
- package/dist/managed/resources/memory-store-memory-version.d.ts +22 -0
- package/dist/managed/resources/memory-store-memory-version.d.ts.map +1 -0
- package/dist/managed/resources/memory-store-memory-version.js +32 -0
- package/dist/managed/resources/memory-store-memory-version.js.map +1 -0
- package/dist/managed/resources/memory-store-memory.d.ts +30 -0
- package/dist/managed/resources/memory-store-memory.d.ts.map +1 -0
- package/dist/managed/resources/memory-store-memory.js +46 -0
- package/dist/managed/resources/memory-store-memory.js.map +1 -0
- package/dist/managed/resources/memory-store.d.ts +38 -0
- package/dist/managed/resources/memory-store.d.ts.map +1 -0
- package/dist/managed/resources/memory-store.js +57 -0
- package/dist/managed/resources/memory-store.js.map +1 -0
- package/dist/managed/resources/model.d.ts +16 -0
- package/dist/managed/resources/model.d.ts.map +1 -0
- package/dist/managed/resources/model.js +21 -0
- package/dist/managed/resources/model.js.map +1 -0
- package/dist/managed/resources/session-event.d.ts +23 -0
- package/dist/managed/resources/session-event.d.ts.map +1 -0
- package/dist/managed/resources/session-event.js +34 -0
- package/dist/managed/resources/session-event.js.map +1 -0
- package/dist/managed/resources/session-resource.d.ts +30 -0
- package/dist/managed/resources/session-resource.d.ts.map +1 -0
- package/dist/managed/resources/session-resource.js +46 -0
- package/dist/managed/resources/session-resource.js.map +1 -0
- package/dist/managed/resources/session-thread-event.d.ts +19 -0
- package/dist/managed/resources/session-thread-event.d.ts.map +1 -0
- package/dist/managed/resources/session-thread-event.js +27 -0
- package/dist/managed/resources/session-thread-event.js.map +1 -0
- package/dist/managed/resources/session-thread.d.ts +24 -0
- package/dist/managed/resources/session-thread.d.ts.map +1 -0
- package/dist/managed/resources/session-thread.js +34 -0
- package/dist/managed/resources/session-thread.js.map +1 -0
- package/dist/managed/resources/session.d.ts +40 -0
- package/dist/managed/resources/session.d.ts.map +1 -0
- package/dist/managed/resources/session.js +59 -0
- package/dist/managed/resources/session.js.map +1 -0
- package/dist/managed/resources/skill-version.d.ts +30 -0
- package/dist/managed/resources/skill-version.d.ts.map +1 -0
- package/dist/managed/resources/skill-version.js +48 -0
- package/dist/managed/resources/skill-version.js.map +1 -0
- package/dist/managed/resources/skill.d.ts +28 -0
- package/dist/managed/resources/skill.d.ts.map +1 -0
- package/dist/managed/resources/skill.js +41 -0
- package/dist/managed/resources/skill.js.map +1 -0
- package/dist/managed/resources/vault-credential.d.ts +38 -0
- package/dist/managed/resources/vault-credential.d.ts.map +1 -0
- package/dist/managed/resources/vault-credential.js +60 -0
- package/dist/managed/resources/vault-credential.js.map +1 -0
- package/dist/managed/resources/vault.d.ts +32 -0
- package/dist/managed/resources/vault.d.ts.map +1 -0
- package/dist/managed/resources/vault.js +48 -0
- package/dist/managed/resources/vault.js.map +1 -0
- package/dist/managed/types.d.ts +10612 -0
- package/dist/managed/types.d.ts.map +1 -0
- package/dist/managed/types.js +4 -0
- package/dist/managed/types.js.map +1 -0
- package/docs/forward-api.md +2346 -0
- package/docs/managed-api.md +2306 -0
- package/package.json +88 -0
|
@@ -0,0 +1,2306 @@
|
|
|
1
|
+
# Managed API(TypeScript)
|
|
2
|
+
|
|
3
|
+
Managed 模式直接管理 Agent、Environment、Session,以及 Deployment 和 Dream。当前 SDK 提供 **95 个操作**,覆盖智能体、会话、部署、记忆整理、环境、技能、凭据、文件、记忆和模型。
|
|
4
|
+
|
|
5
|
+
本文以本仓库当前 TypeScript 实现为准。另一种模式见 [Forward API](forward-api.md)。SDK 要求 Node.js **20.12 或更高版本**,支持 ESM 与 CommonJS。
|
|
6
|
+
|
|
7
|
+
## 安装和客户端
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install qca-sdk
|
|
11
|
+
export QODER_ACCESS_TOKEN='你的 PAT'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import ManagedClient, { PATCredential } from 'qca-sdk/managed';
|
|
16
|
+
|
|
17
|
+
const client = new ManagedClient({
|
|
18
|
+
credential: PATCredential.fromEnv(),
|
|
19
|
+
baseURL: 'https://api.qoder.com/api/v1/cloud',
|
|
20
|
+
timeout: 30_000,
|
|
21
|
+
maxRetries: 2,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
for await (const model of client.models.list()) {
|
|
25
|
+
console.log(model.id);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
CommonJS 可使用 `const { ManagedClient } = require('qca-sdk')`。客户端与所有业务类型也可从 `qca-sdk/managed` 导入;包根导出客户端和通用类型,业务类型使用模式入口。
|
|
30
|
+
|
|
31
|
+
`credential` 接受实现 `getToken(): string | Promise<string>` 的对象。也可设置 `accessToken` 为 PAT 字符串或返回字符串的同步/异步函数;同时传入时 `credential` 优先。省略二者时,请求读取 `QODER_ACCESS_TOKEN`。`PATCredential.fromEnv('自定义变量名')` 支持自定义变量,未找到或值为空会立即报错。SDK 发送 `Authorization: Bearer <PAT>`,不会自动加载 `.env` 文件。
|
|
32
|
+
|
|
33
|
+
默认 `baseURL` 为 `https://api.qoder.com/api/v1/cloud`,环境变量 `QODER_BASE_URL` 可覆盖,构造参数 `baseURL` 优先于环境变量。中国站可显式设置 `https://api.qoder.com.cn/api/v1/cloud`,凭据须属于对应站点。
|
|
34
|
+
|
|
35
|
+
## 客户端与请求选项
|
|
36
|
+
|
|
37
|
+
配置定义见 [ClientOptions / RequestOptions](../src/core/client.ts)。所有时间单位均为毫秒。
|
|
38
|
+
|
|
39
|
+
| 构造选项 | 用途 / 默认值 |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `credential` / `accessToken` | PAT 或动态凭据提供者,见上文 |
|
|
42
|
+
| `baseURL` | 包含 `/api/v1/cloud` 的 API 基地址 |
|
|
43
|
+
| `timeout` | 单次尝试的超时,含响应体读取;默认 `600_000`,`0` 关闭 |
|
|
44
|
+
| `maxRetries` | 初次请求之外的重试次数,默认 `2` |
|
|
45
|
+
| `defaultHeaders` / `defaultQuery` | 每个 API 请求的默认请求头 / 查询参数 |
|
|
46
|
+
| `fetch` | 自定义 Fetch 实现,默认 `globalThis.fetch` |
|
|
47
|
+
| `middleware` | `(request, next) => Promise<Response>` 中间件数组,按数组顺序进入 |
|
|
48
|
+
|
|
49
|
+
每个资源方法的最后一个 `options` 支持 `signal`、`timeout`、`maxRetries`、`idempotencyKey`、`headers`、`query` 和 `body`。常规业务数据应使用方法自己的 `params`;方法组装的业务请求体以源码为准。`headers` 中值为 `null` 可删除默认请求头。Managed 方法常在 `params` 中接受 `workspace_id`(发送为 `qoder-workspace-id`)和 `betas`(以逗号连接发送为 `x-qoder-beta`),二者不会进入 JSON body;并非每个接口都有相同字段,见具体参数表。`options.headers` 优先于类型参数生成的请求头。
|
|
50
|
+
|
|
51
|
+
默认重试网络错误及符合条件的 `408`、`429`、`5xx`:GET/HEAD 或携带幂等键的可重放请求可重试;无幂等键的可重放写请求仅重试 `429`;`409` 不重试。`x-should-retry` 在这些条件内参与判断,`Retry-After` / `retry-after-ms` 控制等待时间。每次重试重新读取凭据,发送 `X-Qoder-Retry-Count`。流式请求体不可重放。需要停用重试时设置 `maxRetries: 0`。
|
|
52
|
+
|
|
53
|
+
## 响应、分页和错误
|
|
54
|
+
|
|
55
|
+
普通资源方法返回 [APIPromise](../src/core/api-promise.ts):调用方法即启动请求,`await` 解析数据。`.withResponse()` 同时取得解析结果、原始 `Response` 和响应头中的 `request_id`;`.asResponse()` 直接取得原始响应,由调用方消费或取消响应体。读取 `.withResponse()` 后不要再次对同一响应调用 `.json()`。
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
const { data, response, request_id } = await client.agents
|
|
59
|
+
.retrieve('agent_id', {}, { signal: AbortSignal.timeout(5_000) })
|
|
60
|
+
.withResponse();
|
|
61
|
+
console.log(data.id, response.status, request_id);
|
|
62
|
+
|
|
63
|
+
const raw = await client.agents.retrieve('agent_id').asResponse();
|
|
64
|
+
console.log(await raw.json());
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Managed 的 `params` 与 `options` 是不同参数,所以上例为传入请求选项先填入 `{}`。嵌套资源通常将子资源 ID 作为位置参数,将父资源 ID 放在 `params` 中,不能直接套用 Forward 的位置参数顺序:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
const version = await client.skills.versions.retrieve('version_id', { skill_id: 'skill_id' });
|
|
71
|
+
const memory = await client.memoryStores.memories.retrieve('memory_id', { memory_store_id: 'store_id' });
|
|
72
|
+
console.log(version, memory);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
返回 `PagePromise<T>` 的方法支持直接异步迭代;`await` 后得到 [Page](../src/core/pagination.ts),包含 `data`、`next_page`、`hasNextPage()`、`getNextPage()`、`iterPages()` 和 `toJSON()`。分页将响应 `next_page` 作为下一次请求的 `page`,保留初次请求的过滤条件和请求选项;游标不前进时抛出 `QoderError`。`getNextPage()` 无下一页时返回 `null`。
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
for await (const agent of client.agents.list({ limit: 20 })) {
|
|
79
|
+
console.log(agent.id);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const page = await client.agents.list({ limit: 20 });
|
|
83
|
+
console.log(page.data);
|
|
84
|
+
if (page.hasNextPage()) console.log((await page.getNextPage())?.data);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import { APIError, APIUserAbortError } from 'qca-sdk/managed';
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
await client.agents.retrieve('agent_id', {}, { maxRetries: 0 });
|
|
92
|
+
} catch (error) {
|
|
93
|
+
if (error instanceof APIError) {
|
|
94
|
+
console.error(error.status, error.code, error.request_id, error.message);
|
|
95
|
+
} else if (error instanceof APIUserAbortError) {
|
|
96
|
+
console.error('请求已取消');
|
|
97
|
+
} else {
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
[APIError](../src/core/error.ts) 包含 `status`、`type`、`code`、`request_id`(别名 `requestID`)、`headers`、`request`、`response`、`error`。错误体中的 `request_id` 优先于响应头。HTTP `400/401/403/404/409/422/429/5xx` 分别对应 `BadRequestError`、`AuthenticationError`、`PermissionDeniedError`、`NotFoundError`、`ConflictError`、`UnprocessableEntityError`、`RateLimitError`、`InternalServerError`;其他状态返回 `APIError`。连接错误为 `APIConnectionError`,超时为其子类 `APIConnectionTimeoutError`,主动取消为 `APIUserAbortError`。
|
|
104
|
+
|
|
105
|
+
## 创建会话并读取 SSE
|
|
106
|
+
|
|
107
|
+
以下示例先创建环境和 Agent,再发送一条消息。`auto` 需在当前账号模型列表中可用。示例创建的资源 ID 应保存供后续复用或清理;完整的清理流程见 [Managed 场景实现](../examples/managed-scenarios.mjs) 和 [资源清理实现](../examples/managed-support.mjs)。
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
const environment = await client.environments.create({ name: `sdk-env-${Date.now()}`, config: { type: 'cloud' } });
|
|
111
|
+
const agent = await client.agents.create({ name: `sdk-agent-${Date.now()}`, model: 'auto' });
|
|
112
|
+
const session = await client.sessions.create({ agent: agent.id, environment_id: environment.id });
|
|
113
|
+
|
|
114
|
+
const sent = await client.sessions.events.send(session.id, {
|
|
115
|
+
events: [{ type: 'user.message', content: [{ type: 'text', text: '请简单介绍你能提供什么帮助。' }] }],
|
|
116
|
+
});
|
|
117
|
+
const userEventID = sent.data?.[0]?.id;
|
|
118
|
+
if (!userEventID) throw new Error('发送结果缺少用户事件 ID');
|
|
119
|
+
|
|
120
|
+
const stream = await client.sessions.events.streamEvents(session.id, {
|
|
121
|
+
event_deltas: ['agent.message'],
|
|
122
|
+
}, { headers: { 'Last-Event-ID': userEventID }, signal: AbortSignal.timeout(120_000) });
|
|
123
|
+
let sawAssistant = false;
|
|
124
|
+
try {
|
|
125
|
+
for await (const event of stream) {
|
|
126
|
+
console.log(event);
|
|
127
|
+
if (event.type === 'agent.message') sawAssistant = true;
|
|
128
|
+
if (event.type === 'session.error' || event.type === 'session.status_terminated') {
|
|
129
|
+
throw new Error(`会话未正常完成:${event.type}`);
|
|
130
|
+
}
|
|
131
|
+
if (sawAssistant && event.type === 'session.status_idle') break;
|
|
132
|
+
}
|
|
133
|
+
} finally {
|
|
134
|
+
await stream.close();
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
[Stream](../src/core/streaming.ts) 为单次消费的 `AsyncIterable`,保留重复 ID 的增量事件和未知事件,跳过 ping,遇到 `[DONE]` 正常结束,SSE `error` 帧抛出 `APIError`。业务事件 `session.error` 仍作为数据交给调用方处理。上例用发送结果中的用户事件 ID 作为游标,读取该消息之后的事件,避免漏掉订阅前已经产生的回复。流不会自动重连。可读取 `stream.lastEventID` 保存游标,重连时通过最后一个 `options.headers` 传入 `{ 'Last-Event-ID': lastID }`;Managed 的流参数没有 `last_event_id` 字段。线程流调用形式为 `sessions.threads.events.streamEvents(threadID, { session_id: sessionID }, options)`。
|
|
139
|
+
|
|
140
|
+
## 文件与技能上传
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
import { toFile } from 'qca-sdk/managed';
|
|
144
|
+
|
|
145
|
+
const file = await client.files.upload({
|
|
146
|
+
file: await toFile(new TextEncoder().encode('Hello'), 'hello.txt'),
|
|
147
|
+
});
|
|
148
|
+
try {
|
|
149
|
+
const response = await client.files.download(file.id);
|
|
150
|
+
console.log(await response.text());
|
|
151
|
+
} finally {
|
|
152
|
+
await client.files.delete(file.id);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const skill = await client.skills.create({
|
|
156
|
+
files: [await toFile('---\nname: hello\ndescription: A greeting skill.\n---\nSay hello.\n', 'hello/SKILL.md')],
|
|
157
|
+
});
|
|
158
|
+
console.log(skill.id, skill.latest_version);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
[toFile](../src/core/uploads.ts) 接受字符串、Blob/File、字节数组、Response、ReadableStream 和异步可迭代输入(包括 Node.js 文件流)。技能的 `files` 可重复,文件名保留相对目录。上传使用 multipart,由 SDK 设置 boundary;不要自行指定 Content-Type。`files.download()` 先从 API 获取临时链接,再以独立请求下载,不向存储服务传递 API PAT、默认请求头或中间件。
|
|
162
|
+
|
|
163
|
+
## 资源目录
|
|
164
|
+
|
|
165
|
+
以下 21 个资源组包含 **95 个 HTTP 操作**,与当前 [API inventory](../src/managed/api-inventory.json) 和源码逐项核对。表中的路径相对于客户端的 `baseURL`;`{…}` 表示路径参数。
|
|
166
|
+
|
|
167
|
+
| 资源组 | 用途 | 操作数 |
|
|
168
|
+
| --- | --- | --- |
|
|
169
|
+
| [`client.agents`](#agents) | 智能体 | 5 |
|
|
170
|
+
| [`client.agents.versions`](#agents-versions) | 智能体版本 | 1 |
|
|
171
|
+
| [`client.sessions`](#sessions) | 会话 | 6 |
|
|
172
|
+
| [`client.sessions.events`](#sessions-events) | 会话事件 | 3 |
|
|
173
|
+
| [`client.sessions.resources`](#sessions-resources) | 会话资源 | 5 |
|
|
174
|
+
| [`client.sessions.threads`](#sessions-threads) | 会话线程 | 3 |
|
|
175
|
+
| [`client.sessions.threads.events`](#sessions-threads-events) | 线程事件 | 2 |
|
|
176
|
+
| [`client.deployments`](#deployments) | 部署 | 8 |
|
|
177
|
+
| [`client.deploymentRuns`](#deploymentRuns) | 部署运行 | 2 |
|
|
178
|
+
| [`client.dreams`](#dreams) | 记忆整理任务 | 5 |
|
|
179
|
+
| [`client.environments`](#environments) | 运行环境 | 6 |
|
|
180
|
+
| [`client.environments.work`](#environments-work) | 环境工作负载 | 8 |
|
|
181
|
+
| [`client.skills`](#skills) | 技能 | 4 |
|
|
182
|
+
| [`client.skills.versions`](#skills-versions) | 技能版本 | 5 |
|
|
183
|
+
| [`client.vaults`](#vaults) | 凭据库 | 5 |
|
|
184
|
+
| [`client.vaults.credentials`](#vaults-credentials) | 凭据 | 7 |
|
|
185
|
+
| [`client.files`](#files) | 文件 | 5 |
|
|
186
|
+
| [`client.memoryStores`](#memoryStores) | 记忆库 | 6 |
|
|
187
|
+
| [`client.memoryStores.memories`](#memoryStores-memories) | 记忆条目 | 5 |
|
|
188
|
+
| [`client.memoryStores.memoryVersions`](#memoryStores-memoryVersions) | 记忆版本 | 3 |
|
|
189
|
+
| [`client.models`](#models) | 模型 | 1 |
|
|
190
|
+
|
|
191
|
+
## 参数和返回值约定
|
|
192
|
+
|
|
193
|
+
下列签名保留实际参数顺序。`params = {}`、`params?` 或 `options?` 表示可省略;未标可选的参数必须提供。要单独传最后的 `options`,先按签名补齐前面的 `params`(通常传 `{}`)。表中的“必填”指 SDK 类型的必填字段;服务端可能还有组合约束,见字段说明及链接中的完整类型。所有 `options` 均为 [RequestOptions](../src/core/client.ts#L20)。
|
|
194
|
+
|
|
195
|
+
类型名从 `qca-sdk/managed` 导入;签名中的 `APIPromise`、`PagePromise`、`Stream` 为 SDK 通用类型。类型链接可以查看响应的全部字段、枚举、联合类型和请求中的嵌套结构。位置参数与 `params` 中标为 path 的字段会做 URL 编码;header 字段不会进入 JSON body。
|
|
196
|
+
|
|
197
|
+
JSON 的 `undefined` 字段省略,`null` 显式发送,空数组、空字符串和 `false` 保留。multipart 的 `null`/`undefined` 字段省略。HTTP 响应的未知字段会保留;TypeScript 类型不等同于服务端运行时校验。
|
|
198
|
+
|
|
199
|
+
<a id="agents"></a>
|
|
200
|
+
|
|
201
|
+
## 智能体:`client.agents`
|
|
202
|
+
|
|
203
|
+
### `agents.create`
|
|
204
|
+
|
|
205
|
+
创建智能体。HTTP:`POST /agents`。
|
|
206
|
+
|
|
207
|
+
```text
|
|
208
|
+
client.agents.create(params: AgentCreateParams, options?: RequestOptions): APIPromise<ManagedAgentsAgent>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
[方法源码](../src/managed/resources/agent.ts#L17);返回:`APIPromise<ManagedAgentsAgent>`([ManagedAgentsAgent](../src/managed/types.ts#L25))。
|
|
212
|
+
|
|
213
|
+
参数对象:[AgentCreateParams](../src/managed/types.ts#L11534)。
|
|
214
|
+
|
|
215
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
216
|
+
| --- | --- | --- | --- | --- |
|
|
217
|
+
| `params.model` | 是 | `ManagedAgentsModelConfigParams`([ManagedAgentsModelConfigParams](../src/managed/types.ts#L967)) | body / `model` | Model identifier. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object for additional configuration control |
|
|
218
|
+
| `params.name` | 是 | `string` | body / `name` | Human-readable name for the agent. |
|
|
219
|
+
| `params.description` | 否 | `string \| null` | body / `description` | Description of what the agent does. |
|
|
220
|
+
| `params.system` | 否 | `string \| null` | body / `system` | System prompt for the agent. |
|
|
221
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
222
|
+
| `params.mcp_servers` | 否 | `Array<ManagedAgentsURLMCPServerParams> \| null`([ManagedAgentsURLMCPServerParams](../src/managed/types.ts#L1133)) | body / `mcp_servers` | MCP servers this agent connects to. Maximum 20. Names must be unique within the array. Every server must be referenced by an `mcp_toolset` in `tools`; unreferenced servers are rejected. See the MCP connector guide. |
|
|
223
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. |
|
|
224
|
+
| `params.multiagent` | 否 | `ManagedAgentsMultiagentParams \| null`([ManagedAgentsMultiagentParams](../src/managed/types.ts#L6749)) | body / `multiagent` | A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the `agents` roster. |
|
|
225
|
+
| `params.skills` | 否 | `Array<ManagedAgentsSkillParamsUnion> \| null`([ManagedAgentsSkillParamsUnion](../src/managed/types.ts#L1128)) | body / `skills` | Skills available to the agent. |
|
|
226
|
+
| `params.tools` | 否 | `Array<AgentNewParamsToolUnion> \| null`([AgentNewParamsToolUnion](../src/managed/types.ts#L1451)) | body / `tools` | Tool configurations available to the agent. Maximum of 128 tools across all toolsets allowed. |
|
|
227
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
228
|
+
|
|
229
|
+
### `agents.retrieve`
|
|
230
|
+
|
|
231
|
+
获取智能体。HTTP:`GET /agents/{agent_id}`。
|
|
232
|
+
|
|
233
|
+
```text
|
|
234
|
+
client.agents.retrieve(agentID: string, params: AgentRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsAgent>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
[方法源码](../src/managed/resources/agent.ts#L25);返回:`APIPromise<ManagedAgentsAgent>`([ManagedAgentsAgent](../src/managed/types.ts#L25))。
|
|
238
|
+
|
|
239
|
+
参数对象:[AgentRetrieveParams](../src/managed/types.ts#L11536)。
|
|
240
|
+
|
|
241
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
242
|
+
| --- | --- | --- | --- | --- |
|
|
243
|
+
| `agentID` | 是 | `string` | path / `agent_id` | 按签名顺序传入的路径参数。 |
|
|
244
|
+
| `params.version` | 否 | `number` | query / `version` | Agent version. Omit for the most recent version. Must be at least 1 if specified. |
|
|
245
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
246
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
247
|
+
|
|
248
|
+
### `agents.update`
|
|
249
|
+
|
|
250
|
+
更新智能体。HTTP:`POST /agents/{agent_id}`。
|
|
251
|
+
|
|
252
|
+
```text
|
|
253
|
+
client.agents.update(agentID: string, params: AgentUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsAgent>
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
[方法源码](../src/managed/resources/agent.ts#L33);返回:`APIPromise<ManagedAgentsAgent>`([ManagedAgentsAgent](../src/managed/types.ts#L25))。
|
|
257
|
+
|
|
258
|
+
参数对象:[AgentUpdateParams](../src/managed/types.ts#L1466)。
|
|
259
|
+
|
|
260
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
261
|
+
| --- | --- | --- | --- | --- |
|
|
262
|
+
| `agentID` | 是 | `string` | path / `agent_id` | 按签名顺序传入的路径参数。 |
|
|
263
|
+
| `params.description` | 否 | `string \| null` | body / `description` | Description. Omit to preserve; send empty string or null to clear. |
|
|
264
|
+
| `params.system` | 否 | `string \| null` | body / `system` | System prompt. Omit to preserve; send empty string or null to clear. |
|
|
265
|
+
| `params.name` | 否 | `string` | body / `name` | Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared. |
|
|
266
|
+
| `params.version` | 否 | `number \| null` | body / `version` | The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. Must be at least 1 if specified. When supplied, the request fails if it does not match the server's current version; omit to apply the update unconditionally. |
|
|
267
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
268
|
+
| `params.mcp_servers` | 否 | `Array<ManagedAgentsURLMCPServerParams> \| null`([ManagedAgentsURLMCPServerParams](../src/managed/types.ts#L1133)) | body / `mcp_servers` | MCP servers. Full replacement. Omit to preserve; send empty array or `null` to clear. Names must be unique. Maximum 20. Every server must be referenced by an `mcp_toolset` in the agent's resulting `tools`; unreferenced servers are rejected. See the MCP connector guide. |
|
|
269
|
+
| `params.metadata` | 否 | `Record<string, unknown> \| null` | body / `metadata` | Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars. |
|
|
270
|
+
| `params.skills` | 否 | `Array<ManagedAgentsSkillParamsUnion> \| null`([ManagedAgentsSkillParamsUnion](../src/managed/types.ts#L1128)) | body / `skills` | Skills. Full replacement. Omit to preserve; send empty array or null to clear. |
|
|
271
|
+
| `params.tools` | 否 | `Array<AgentUpdateParamsToolUnion> \| null`([AgentUpdateParamsToolUnion](../src/managed/types.ts#L1529)) | body / `tools` | Tool configurations available to the agent. Full replacement. Omit to preserve; send empty array or null to clear. Maximum of 128 tools across all toolsets allowed. |
|
|
272
|
+
| `params.model` | 否 | `ManagedAgentsModelConfigParams`([ManagedAgentsModelConfigParams](../src/managed/types.ts#L967)) | body / `model` | Model identifier. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. |
|
|
273
|
+
| `params.multiagent` | 否 | `ManagedAgentsMultiagentParams \| null`([ManagedAgentsMultiagentParams](../src/managed/types.ts#L6749)) | body / `multiagent` | A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the `agents` roster. |
|
|
274
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
275
|
+
|
|
276
|
+
### `agents.list`
|
|
277
|
+
|
|
278
|
+
列出智能体。HTTP:`GET /agents`。
|
|
279
|
+
|
|
280
|
+
```text
|
|
281
|
+
client.agents.list(params: AgentListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsAgent>
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
[方法源码](../src/managed/resources/agent.ts#L41);返回:`PagePromise<ManagedAgentsAgent>`([ManagedAgentsAgent](../src/managed/types.ts#L25))。
|
|
285
|
+
|
|
286
|
+
参数对象:[AgentListParams](../src/managed/types.ts#L1531)。
|
|
287
|
+
|
|
288
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
289
|
+
| --- | --- | --- | --- | --- |
|
|
290
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | Return agents created at or after this time (inclusive). |
|
|
291
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | Return agents created at or before this time (inclusive). |
|
|
292
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | Include archived agents in results. Defaults to false. |
|
|
293
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum results per page. Default 20, maximum 100. |
|
|
294
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor from a previous response. |
|
|
295
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
296
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
297
|
+
|
|
298
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
299
|
+
|
|
300
|
+
### `agents.archive`
|
|
301
|
+
|
|
302
|
+
归档智能体。HTTP:`POST /agents/{agent_id}/archive`。
|
|
303
|
+
|
|
304
|
+
```text
|
|
305
|
+
client.agents.archive(agentID: string, params: AgentArchiveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsAgent>
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
[方法源码](../src/managed/resources/agent.ts#L49);返回:`APIPromise<ManagedAgentsAgent>`([ManagedAgentsAgent](../src/managed/types.ts#L25))。
|
|
309
|
+
|
|
310
|
+
参数对象:[AgentArchiveParams](../src/managed/types.ts#L1559)。
|
|
311
|
+
|
|
312
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
313
|
+
| --- | --- | --- | --- | --- |
|
|
314
|
+
| `agentID` | 是 | `string` | path / `agent_id` | 按签名顺序传入的路径参数。 |
|
|
315
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
316
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
317
|
+
|
|
318
|
+
<a id="agents-versions"></a>
|
|
319
|
+
|
|
320
|
+
## 智能体版本:`client.agents.versions`
|
|
321
|
+
|
|
322
|
+
### `agents.versions.list`
|
|
323
|
+
|
|
324
|
+
列出智能体版本。HTTP:`GET /agents/{agent_id}/versions`。
|
|
325
|
+
|
|
326
|
+
```text
|
|
327
|
+
client.agents.versions.list(agentID: string, params: AgentVersionListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsAgent>
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
[方法源码](../src/managed/resources/agent-version.ts#L15);返回:`PagePromise<ManagedAgentsAgent>`([ManagedAgentsAgent](../src/managed/types.ts#L25))。
|
|
331
|
+
|
|
332
|
+
参数对象:[AgentVersionListParams](../src/managed/types.ts#L1567)。
|
|
333
|
+
|
|
334
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
335
|
+
| --- | --- | --- | --- | --- |
|
|
336
|
+
| `agentID` | 是 | `string` | path / `agent_id` | 按签名顺序传入的路径参数。 |
|
|
337
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum results per page. Default 20, maximum 100. |
|
|
338
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor. |
|
|
339
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
340
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
341
|
+
|
|
342
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
343
|
+
|
|
344
|
+
<a id="sessions"></a>
|
|
345
|
+
|
|
346
|
+
## 会话:`client.sessions`
|
|
347
|
+
|
|
348
|
+
### `sessions.create`
|
|
349
|
+
|
|
350
|
+
创建会话。HTTP:`POST /sessions`。
|
|
351
|
+
|
|
352
|
+
```text
|
|
353
|
+
client.sessions.create(params: SessionCreateParams, options?: RequestOptions): APIPromise<ManagedAgentsSession>
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
[方法源码](../src/managed/resources/session.ts#L21);返回:`APIPromise<ManagedAgentsSession>`([ManagedAgentsSession](../src/managed/types.ts#L6826))。
|
|
357
|
+
|
|
358
|
+
参数对象:[SessionCreateParams](../src/managed/types.ts#L11564)。
|
|
359
|
+
|
|
360
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
361
|
+
| --- | --- | --- | --- | --- |
|
|
362
|
+
| `params.environment_variables` | 否 | `Record<string, string> \| null` | body / `environment_variables` | 字段结构见类型链接。 |
|
|
363
|
+
| `params.agent` | 是 | `SessionNewParamsAgentUnion`([SessionNewParamsAgentUnion](../src/managed/types.ts#L7326)) | body / `agent` | Agent identifier. Accepts the `agent` ID string, which pins the latest version for the session, or an `agent` object with both id and version specified. |
|
|
364
|
+
| `params.environment_id` | 是 | `string` | body / `environment_id` | ID of the `environment` defining the container configuration for this session. |
|
|
365
|
+
| `params.title` | 否 | `string \| null` | body / `title` | Human-readable session title. |
|
|
366
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
367
|
+
| `params.budget` | 否 | `ManagedAgentsBudgetLimitParam \| null`([ManagedAgentsBudgetLimitParam](../src/managed/types.ts#L6526)) | body / `budget` | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
|
|
368
|
+
| `params.initial_events` | 否 | `Array<SessionNewParamsInitialEventUnion> \| null`([SessionNewParamsInitialEventUnion](../src/managed/types.ts#L7328)) | body / `initial_events` | Initial events to send to the `session` at creation, processed in order. Supports `user.message` and `user.define_outcome` events. Maximum 50 events. |
|
|
369
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. |
|
|
370
|
+
| `params.resources` | 否 | `Array<SessionNewParamsResourceUnion> \| null`([SessionNewParamsResourceUnion](../src/managed/types.ts#L7330)) | body / `resources` | Resources (e.g. repositories, files) to mount into the session's container. |
|
|
371
|
+
| `params.vault_ids` | 否 | `Array<string> \| null` | body / `vault_ids` | Vault IDs for stored credentials the agent can use during the session. |
|
|
372
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
373
|
+
|
|
374
|
+
### `sessions.retrieve`
|
|
375
|
+
|
|
376
|
+
获取会话。HTTP:`GET /sessions/{session_id}`。
|
|
377
|
+
|
|
378
|
+
```text
|
|
379
|
+
client.sessions.retrieve(sessionID: string, params: SessionRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsSession>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
[方法源码](../src/managed/resources/session.ts#L29);返回:`APIPromise<ManagedAgentsSession>`([ManagedAgentsSession](../src/managed/types.ts#L6826))。
|
|
383
|
+
|
|
384
|
+
参数对象:[SessionRetrieveParams](../src/managed/types.ts#L11566)。
|
|
385
|
+
|
|
386
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
387
|
+
| --- | --- | --- | --- | --- |
|
|
388
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
389
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
390
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
391
|
+
|
|
392
|
+
### `sessions.update`
|
|
393
|
+
|
|
394
|
+
更新会话。HTTP:`POST /sessions/{session_id}`。
|
|
395
|
+
|
|
396
|
+
```text
|
|
397
|
+
client.sessions.update(sessionID: string, params: SessionUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsSession>
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
[方法源码](../src/managed/resources/session.ts#L37);返回:`APIPromise<ManagedAgentsSession>`([ManagedAgentsSession](../src/managed/types.ts#L6826))。
|
|
401
|
+
|
|
402
|
+
参数对象:[SessionUpdateParams](../src/managed/types.ts#L7340)。
|
|
403
|
+
|
|
404
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
405
|
+
| --- | --- | --- | --- | --- |
|
|
406
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
407
|
+
| `params.environment_variables` | 否 | `Record<string, string> \| null` | body / `environment_variables` | 字段结构见类型链接。 |
|
|
408
|
+
| `params.title` | 否 | `string \| null` | body / `title` | Human-readable session title. |
|
|
409
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
410
|
+
| `params.metadata` | 否 | `Record<string, unknown> \| null` | body / `metadata` | Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. |
|
|
411
|
+
| `params.agent` | 否 | `ManagedAgentsSessionAgentUpdateParam \| null`([ManagedAgentsSessionAgentUpdateParam](../src/managed/types.ts#L6952)) | body / `agent` | Mid-session agent configuration update. Only `tools` and `mcp_servers` are updatable. Full replacement: the provided array becomes the new value. To preserve existing entries, GET the session, modify the array, and POST it back. |
|
|
412
|
+
| `params.budget` | 否 | `ManagedAgentsBudgetLimitParam \| null`([ManagedAgentsBudgetLimitParam](../src/managed/types.ts#L6526)) | body / `budget` | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
|
|
413
|
+
| `params.vault_ids` | 否 | `Array<string> \| null` | body / `vault_ids` | Vault IDs (`vlt_*`) to attach to the session. Not yet supported; requests setting this field are rejected. Reserved for future use. |
|
|
414
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
415
|
+
|
|
416
|
+
### `sessions.list`
|
|
417
|
+
|
|
418
|
+
列出会话。HTTP:`GET /sessions`。
|
|
419
|
+
|
|
420
|
+
```text
|
|
421
|
+
client.sessions.list(params: SessionListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsSession>
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
[方法源码](../src/managed/resources/session.ts#L45);返回:`PagePromise<ManagedAgentsSession>`([ManagedAgentsSession](../src/managed/types.ts#L6826))。
|
|
425
|
+
|
|
426
|
+
参数对象:[SessionListParams](../src/managed/types.ts#L7374)。
|
|
427
|
+
|
|
428
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
429
|
+
| --- | --- | --- | --- | --- |
|
|
430
|
+
| `params.agent_id` | 否 | `string` | query / `agent_id` | Filter sessions created with this agent ID. |
|
|
431
|
+
| `params.agent_version` | 否 | `number` | query / `agent_version` | Filter by agent version. Only applies when `agent_id` is also set. |
|
|
432
|
+
| `params["created_at[gt]"]` | 否 | `string` | query / `created_at[gt]` | Return sessions created after this time (exclusive). |
|
|
433
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | Return sessions created at or after this time (inclusive). |
|
|
434
|
+
| `params["created_at[lt]"]` | 否 | `string` | query / `created_at[lt]` | Return sessions created before this time (exclusive). |
|
|
435
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | Return sessions created at or before this time (inclusive). |
|
|
436
|
+
| `params.deployment_id` | 否 | `string` | query / `deployment_id` | Filter sessions created by this deployment ID. |
|
|
437
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | When true, includes archived sessions. Default: false (exclude archived). |
|
|
438
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of results to return. |
|
|
439
|
+
| `params.memory_store_id` | 否 | `string` | query / `memory_store_id` | Filter sessions whose resources contain a `memory_store` with this memory store ID. |
|
|
440
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor from a previous response. |
|
|
441
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
442
|
+
| `params.order` | 否 | `SessionListParamsOrder`([SessionListParamsOrder](../src/managed/types.ts#L7445)) | query / `order` | Sort direction for results, ordered by `created_at`. Defaults to `desc` (newest first). Any of "asc", "desc". |
|
|
443
|
+
| `params.statuses` | 否 | `Array<string>` | query / `statuses` | Filter by session status. Repeat the parameter to match any of multiple statuses. Any of "rescheduling", "running", "idle", "terminated". |
|
|
444
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
445
|
+
|
|
446
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
447
|
+
|
|
448
|
+
### `sessions.delete`
|
|
449
|
+
|
|
450
|
+
删除会话。HTTP:`DELETE /sessions/{session_id}`。
|
|
451
|
+
|
|
452
|
+
```text
|
|
453
|
+
client.sessions.delete(sessionID: string, params: SessionDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeletedSession>
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
[方法源码](../src/managed/resources/session.ts#L53);返回:`APIPromise<ManagedAgentsDeletedSession>`([ManagedAgentsDeletedSession](../src/managed/types.ts#L6581))。
|
|
457
|
+
|
|
458
|
+
参数对象:[SessionDeleteParams](../src/managed/types.ts#L7447)。
|
|
459
|
+
|
|
460
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
461
|
+
| --- | --- | --- | --- | --- |
|
|
462
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
463
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
464
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
465
|
+
|
|
466
|
+
### `sessions.archive`
|
|
467
|
+
|
|
468
|
+
归档会话。HTTP:`POST /sessions/{session_id}/archive`。
|
|
469
|
+
|
|
470
|
+
```text
|
|
471
|
+
client.sessions.archive(sessionID: string, params: SessionArchiveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsSession>
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
[方法源码](../src/managed/resources/session.ts#L61);返回:`APIPromise<ManagedAgentsSession>`([ManagedAgentsSession](../src/managed/types.ts#L6826))。
|
|
475
|
+
|
|
476
|
+
参数对象:[SessionArchiveParams](../src/managed/types.ts#L7455)。
|
|
477
|
+
|
|
478
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
479
|
+
| --- | --- | --- | --- | --- |
|
|
480
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
481
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
482
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
483
|
+
|
|
484
|
+
<a id="sessions-events"></a>
|
|
485
|
+
|
|
486
|
+
## 会话事件:`client.sessions.events`
|
|
487
|
+
|
|
488
|
+
### `sessions.events.list`
|
|
489
|
+
|
|
490
|
+
列出会话事件。HTTP:`GET /sessions/{session_id}/events`。
|
|
491
|
+
|
|
492
|
+
```text
|
|
493
|
+
client.sessions.events.list(sessionID: string, params: SessionEventListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsSessionEventUnion>
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
[方法源码](../src/managed/resources/session-event.ts#L15);返回:`PagePromise<ManagedAgentsSessionEventUnion>`([ManagedAgentsSessionEventUnion](../src/managed/types.ts#L8638))。
|
|
497
|
+
|
|
498
|
+
参数对象:[SessionEventListParams](../src/managed/types.ts#L9794)。
|
|
499
|
+
|
|
500
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
501
|
+
| --- | --- | --- | --- | --- |
|
|
502
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
503
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
504
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
505
|
+
| `params["created_at[gt]"]` | 否 | `string` | query / `created_at[gt]` | Return events created after this time (exclusive). Compared against the event's `processed_at` value. |
|
|
506
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | Return events created at or after this time (inclusive). Compared against the event's `processed_at` value. |
|
|
507
|
+
| `params["created_at[lt]"]` | 否 | `string` | query / `created_at[lt]` | Return events created before this time (exclusive). Compared against the event's `processed_at` value. |
|
|
508
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | Return events created at or before this time (inclusive). Compared against the event's `processed_at` value. |
|
|
509
|
+
| `params.limit` | 否 | `number` | query / `limit` | Query parameter for limit |
|
|
510
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor from a previous response's `next_page`. |
|
|
511
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
512
|
+
| `params.order` | 否 | `SessionEventListParamsOrder`([SessionEventListParamsOrder](../src/managed/types.ts#L9848)) | query / `order` | Sort direction for results, ordered by the event's `processed_at`. Defaults to `asc` (chronological). Any of "asc", "desc". |
|
|
513
|
+
| `params.types` | 否 | `Array<string>` | query / `types` | Filter by event type. Values match the `type` field on returned events (for example, `user.message` or `agent.tool_use`). Omit to return all event types. |
|
|
514
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
515
|
+
|
|
516
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
517
|
+
|
|
518
|
+
### `sessions.events.send`
|
|
519
|
+
|
|
520
|
+
发送会话事件。HTTP:`POST /sessions/{session_id}/events`。
|
|
521
|
+
|
|
522
|
+
```text
|
|
523
|
+
client.sessions.events.send(sessionID: string, params: SessionEventSendParams, options?: RequestOptions): APIPromise<ManagedAgentsSendSessionEvents>
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
[方法源码](../src/managed/resources/session-event.ts#L23);返回:`APIPromise<ManagedAgentsSendSessionEvents>`([ManagedAgentsSendSessionEvents](../src/managed/types.ts#L8547))。
|
|
527
|
+
|
|
528
|
+
参数对象:[SessionEventSendParams](../src/managed/types.ts#L9850)。
|
|
529
|
+
|
|
530
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
531
|
+
| --- | --- | --- | --- | --- |
|
|
532
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
533
|
+
| `params.events` | 是 | `Array<ManagedAgentsEventParamsUnion>`([ManagedAgentsEventParamsUnion](../src/managed/types.ts#L8059)) | body / `events` | Events to send to the `session`. |
|
|
534
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
535
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
536
|
+
|
|
537
|
+
### `sessions.events.streamEvents`
|
|
538
|
+
|
|
539
|
+
订阅会话事件 SSE 流。HTTP:`GET /sessions/{session_id}/events/stream`。
|
|
540
|
+
|
|
541
|
+
```text
|
|
542
|
+
client.sessions.events.streamEvents(sessionID: string, params: SessionEventStreamParams | null | undefined = {}, options?: RequestOptions): APIPromise<Stream<ManagedAgentsStreamSessionEventsUnion>>
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
[方法源码](../src/managed/resources/session-event.ts#L31);返回:`APIPromise<Stream<ManagedAgentsStreamSessionEventsUnion>>`([ManagedAgentsStreamSessionEventsUnion](../src/managed/types.ts#L9208))。
|
|
546
|
+
|
|
547
|
+
参数对象:[SessionEventStreamParams](../src/managed/types.ts#L9862)。
|
|
548
|
+
|
|
549
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
550
|
+
| --- | --- | --- | --- | --- |
|
|
551
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
552
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
553
|
+
| `params.event_deltas` | 否 | `Array<ManagedAgentsDeltaType>`([ManagedAgentsDeltaType](../src/managed/types.ts#L6641)) | query / `event_deltas` | When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent. |
|
|
554
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
555
|
+
|
|
556
|
+
返回可异步迭代的 SSE 流;使用完毕调用 `await stream.close()`。连接结束不会自动重连。
|
|
557
|
+
|
|
558
|
+
<a id="sessions-resources"></a>
|
|
559
|
+
|
|
560
|
+
## 会话资源:`client.sessions.resources`
|
|
561
|
+
|
|
562
|
+
### `sessions.resources.retrieve`
|
|
563
|
+
|
|
564
|
+
获取会话资源。HTTP:`GET /sessions/{session_id}/resources/{resource_id}`。
|
|
565
|
+
|
|
566
|
+
```text
|
|
567
|
+
client.sessions.resources.retrieve(resourceID: string, params: SessionResourceRetrieveParams, options?: RequestOptions): APIPromise<SessionResourceGetResponseUnion>
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
[方法源码](../src/managed/resources/session-resource.ts#L15);返回:`APIPromise<SessionResourceGetResponseUnion>`([SessionResourceGetResponseUnion](../src/managed/types.ts#L9994))。
|
|
571
|
+
|
|
572
|
+
参数对象:[SessionResourceRetrieveParams](../src/managed/types.ts#L11568)。
|
|
573
|
+
|
|
574
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
575
|
+
| --- | --- | --- | --- | --- |
|
|
576
|
+
| `resourceID` | 是 | `string` | path / `resource_id` | 按签名顺序传入的路径参数。 |
|
|
577
|
+
| `params.session_id` | 是 | `string` | path / `session_id` | 字段结构见类型链接。 |
|
|
578
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
579
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
580
|
+
|
|
581
|
+
### `sessions.resources.update`
|
|
582
|
+
|
|
583
|
+
更新会话资源。HTTP:`POST /sessions/{session_id}/resources/{resource_id}`。
|
|
584
|
+
|
|
585
|
+
```text
|
|
586
|
+
client.sessions.resources.update(resourceID: string, params: SessionResourceUpdateParams, options?: RequestOptions): APIPromise<SessionResourceUpdateResponseUnion>
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
[方法源码](../src/managed/resources/session-resource.ts#L23);返回:`APIPromise<SessionResourceUpdateResponseUnion>`([SessionResourceUpdateResponseUnion](../src/managed/types.ts#L9996))。
|
|
590
|
+
|
|
591
|
+
参数对象:[SessionResourceUpdateParams](../src/managed/types.ts#L10007)。
|
|
592
|
+
|
|
593
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
594
|
+
| --- | --- | --- | --- | --- |
|
|
595
|
+
| `resourceID` | 是 | `string` | path / `resource_id` | 按签名顺序传入的路径参数。 |
|
|
596
|
+
| `params.password` | 否 | `string \| null` | body / `password` | 字段结构见类型链接。 |
|
|
597
|
+
| `params.session_id` | 是 | `string` | path / `session_id` | 字段结构见类型链接。 |
|
|
598
|
+
| `params.authorization_token` | 否 | `string \| null` | body / `authorization_token` | New authorization token for the resource. Currently only `github_repository` resources support token rotation. |
|
|
599
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
600
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
601
|
+
|
|
602
|
+
### `sessions.resources.list`
|
|
603
|
+
|
|
604
|
+
列出会话资源。HTTP:`GET /sessions/{session_id}/resources`。
|
|
605
|
+
|
|
606
|
+
```text
|
|
607
|
+
client.sessions.resources.list(sessionID: string, params: SessionResourceListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsSessionResourceUnion>
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
[方法源码](../src/managed/resources/session-resource.ts#L31);返回:`PagePromise<ManagedAgentsSessionResourceUnion>`([ManagedAgentsSessionResourceUnion](../src/managed/types.ts#L9992))。
|
|
611
|
+
|
|
612
|
+
参数对象:[SessionResourceListParams](../src/managed/types.ts#L10022)。
|
|
613
|
+
|
|
614
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
615
|
+
| --- | --- | --- | --- | --- |
|
|
616
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
617
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
618
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
619
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of resources to return per page (max 1000). If omitted, returns all resources. |
|
|
620
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque cursor from a previous response's `next_page` field. |
|
|
621
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
622
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
623
|
+
|
|
624
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
625
|
+
|
|
626
|
+
### `sessions.resources.delete`
|
|
627
|
+
|
|
628
|
+
删除会话资源。HTTP:`DELETE /sessions/{session_id}/resources/{resource_id}`。
|
|
629
|
+
|
|
630
|
+
```text
|
|
631
|
+
client.sessions.resources.delete(resourceID: string, params: SessionResourceDeleteParams, options?: RequestOptions): APIPromise<ManagedAgentsDeleteSessionResource>
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
[方法源码](../src/managed/resources/session-resource.ts#L39);返回:`APIPromise<ManagedAgentsDeleteSessionResource>`([ManagedAgentsDeleteSessionResource](../src/managed/types.ts#L9886))。
|
|
635
|
+
|
|
636
|
+
参数对象:[SessionResourceDeleteParams](../src/managed/types.ts#L10041)。
|
|
637
|
+
|
|
638
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
639
|
+
| --- | --- | --- | --- | --- |
|
|
640
|
+
| `resourceID` | 是 | `string` | path / `resource_id` | 按签名顺序传入的路径参数。 |
|
|
641
|
+
| `params.session_id` | 是 | `string` | path / `session_id` | 字段结构见类型链接。 |
|
|
642
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
643
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
644
|
+
|
|
645
|
+
### `sessions.resources.add`
|
|
646
|
+
|
|
647
|
+
添加会话资源。HTTP:`POST /sessions/{session_id}/resources`。
|
|
648
|
+
|
|
649
|
+
```text
|
|
650
|
+
client.sessions.resources.add(sessionID: string, params: SessionResourceAddParams, options?: RequestOptions): APIPromise<ManagedAgentsFileResource>
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
[方法源码](../src/managed/resources/session-resource.ts#L47);返回:`APIPromise<ManagedAgentsFileResource>`([ManagedAgentsFileResource](../src/managed/types.ts#L9896))。
|
|
654
|
+
|
|
655
|
+
参数对象:[SessionResourceAddParams](../src/managed/types.ts#L10050)。
|
|
656
|
+
|
|
657
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
658
|
+
| --- | --- | --- | --- | --- |
|
|
659
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
660
|
+
| `params.file_id` | 是 | `string` | body / `file_id` | ID of a previously uploaded file. |
|
|
661
|
+
| `params.type` | 是 | `ManagedAgentsFileResourceParamsType`([ManagedAgentsFileResourceParamsType](../src/managed/types.ts#L6661)) | body / `type` | Any of "file". |
|
|
662
|
+
| `params.mount_path` | 否 | `string \| null` | body / `mount_path` | Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. |
|
|
663
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
664
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
665
|
+
|
|
666
|
+
<a id="sessions-threads"></a>
|
|
667
|
+
|
|
668
|
+
## 会话线程:`client.sessions.threads`
|
|
669
|
+
|
|
670
|
+
### `sessions.threads.retrieve`
|
|
671
|
+
|
|
672
|
+
获取会话线程。HTTP:`GET /sessions/{session_id}/threads/{thread_id}`。
|
|
673
|
+
|
|
674
|
+
```text
|
|
675
|
+
client.sessions.threads.retrieve(threadID: string, params: SessionThreadRetrieveParams, options?: RequestOptions): APIPromise<ManagedAgentsSessionThread>
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
[方法源码](../src/managed/resources/session-thread.ts#L17);返回:`APIPromise<ManagedAgentsSessionThread>`([ManagedAgentsSessionThread](../src/managed/types.ts#L10074))。
|
|
679
|
+
|
|
680
|
+
参数对象:[SessionThreadRetrieveParams](../src/managed/types.ts#L11570)。
|
|
681
|
+
|
|
682
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
683
|
+
| --- | --- | --- | --- | --- |
|
|
684
|
+
| `threadID` | 是 | `string` | path / `thread_id` | 按签名顺序传入的路径参数。 |
|
|
685
|
+
| `params.session_id` | 是 | `string` | path / `session_id` | 字段结构见类型链接。 |
|
|
686
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
687
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
688
|
+
|
|
689
|
+
### `sessions.threads.list`
|
|
690
|
+
|
|
691
|
+
列出会话线程。HTTP:`GET /sessions/{session_id}/threads`。
|
|
692
|
+
|
|
693
|
+
```text
|
|
694
|
+
client.sessions.threads.list(sessionID: string, params: SessionThreadListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsSessionThread>
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
[方法源码](../src/managed/resources/session-thread.ts#L25);返回:`PagePromise<ManagedAgentsSessionThread>`([ManagedAgentsSessionThread](../src/managed/types.ts#L10074))。
|
|
698
|
+
|
|
699
|
+
参数对象:[SessionThreadListParams](../src/managed/types.ts#L10268)。
|
|
700
|
+
|
|
701
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
702
|
+
| --- | --- | --- | --- | --- |
|
|
703
|
+
| `sessionID` | 是 | `string` | path / `session_id` | 按签名顺序传入的路径参数。 |
|
|
704
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum results per page. Defaults to 1000. |
|
|
705
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor from a previous response's `next_page`. Forward-only. |
|
|
706
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
707
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
708
|
+
|
|
709
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
710
|
+
|
|
711
|
+
### `sessions.threads.archive`
|
|
712
|
+
|
|
713
|
+
归档会话线程。HTTP:`POST /sessions/{session_id}/threads/{thread_id}/archive`。
|
|
714
|
+
|
|
715
|
+
```text
|
|
716
|
+
client.sessions.threads.archive(threadID: string, params: SessionThreadArchiveParams, options?: RequestOptions): APIPromise<ManagedAgentsSessionThread>
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
[方法源码](../src/managed/resources/session-thread.ts#L33);返回:`APIPromise<ManagedAgentsSessionThread>`([ManagedAgentsSessionThread](../src/managed/types.ts#L10074))。
|
|
720
|
+
|
|
721
|
+
参数对象:[SessionThreadArchiveParams](../src/managed/types.ts#L10284)。
|
|
722
|
+
|
|
723
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
724
|
+
| --- | --- | --- | --- | --- |
|
|
725
|
+
| `threadID` | 是 | `string` | path / `thread_id` | 按签名顺序传入的路径参数。 |
|
|
726
|
+
| `params.session_id` | 是 | `string` | path / `session_id` | 字段结构见类型链接。 |
|
|
727
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
728
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
729
|
+
|
|
730
|
+
<a id="sessions-threads-events"></a>
|
|
731
|
+
|
|
732
|
+
## 线程事件:`client.sessions.threads.events`
|
|
733
|
+
|
|
734
|
+
### `sessions.threads.events.list`
|
|
735
|
+
|
|
736
|
+
列出线程事件。HTTP:`GET /sessions/{session_id}/threads/{thread_id}/events`。
|
|
737
|
+
|
|
738
|
+
```text
|
|
739
|
+
client.sessions.threads.events.list(threadID: string, params: SessionThreadEventListParams, options?: RequestOptions): PagePromise<ManagedAgentsSessionEventUnion>
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
[方法源码](../src/managed/resources/session-thread-event.ts#L15);返回:`PagePromise<ManagedAgentsSessionEventUnion>`([ManagedAgentsSessionEventUnion](../src/managed/types.ts#L8638))。
|
|
743
|
+
|
|
744
|
+
参数对象:[SessionThreadEventListParams](../src/managed/types.ts#L10293)。
|
|
745
|
+
|
|
746
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
747
|
+
| --- | --- | --- | --- | --- |
|
|
748
|
+
| `threadID` | 是 | `string` | path / `thread_id` | 按签名顺序传入的路径参数。 |
|
|
749
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
750
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
751
|
+
| `params.session_id` | 是 | `string` | path / `session_id` | 字段结构见类型链接。 |
|
|
752
|
+
| `params.limit` | 否 | `number` | query / `limit` | Query parameter for limit |
|
|
753
|
+
| `params.page` | 否 | `string` | query / `page` | Query parameter for page |
|
|
754
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
755
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
756
|
+
|
|
757
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
758
|
+
|
|
759
|
+
### `sessions.threads.events.streamEvents`
|
|
760
|
+
|
|
761
|
+
订阅线程事件 SSE 流。HTTP:`GET /sessions/{session_id}/threads/{thread_id}/stream`。
|
|
762
|
+
|
|
763
|
+
```text
|
|
764
|
+
client.sessions.threads.events.streamEvents(threadID: string, params: SessionThreadEventStreamParams, options?: RequestOptions): APIPromise<Stream<ManagedAgentsStreamSessionThreadEventsUnion>>
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
[方法源码](../src/managed/resources/session-thread-event.ts#L23);返回:`APIPromise<Stream<ManagedAgentsStreamSessionThreadEventsUnion>>`([ManagedAgentsStreamSessionThreadEventsUnion](../src/managed/types.ts#L10209))。
|
|
768
|
+
|
|
769
|
+
参数对象:[SessionThreadEventStreamParams](../src/managed/types.ts#L10312)。
|
|
770
|
+
|
|
771
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
772
|
+
| --- | --- | --- | --- | --- |
|
|
773
|
+
| `threadID` | 是 | `string` | path / `thread_id` | 按签名顺序传入的路径参数。 |
|
|
774
|
+
| `params.session_id` | 是 | `string` | path / `session_id` | 字段结构见类型链接。 |
|
|
775
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
776
|
+
| `params.event_deltas` | 否 | `Array<ManagedAgentsDeltaType>`([ManagedAgentsDeltaType](../src/managed/types.ts#L6641)) | query / `event_deltas` | When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent. |
|
|
777
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
778
|
+
|
|
779
|
+
返回可异步迭代的 SSE 流;使用完毕调用 `await stream.close()`。连接结束不会自动重连。
|
|
780
|
+
|
|
781
|
+
<a id="deployments"></a>
|
|
782
|
+
|
|
783
|
+
## 部署:`client.deployments`
|
|
784
|
+
|
|
785
|
+
### `deployments.create`
|
|
786
|
+
|
|
787
|
+
创建部署。HTTP:`POST /deployments`。
|
|
788
|
+
|
|
789
|
+
```text
|
|
790
|
+
client.deployments.create(params: DeploymentCreateParams, options?: RequestOptions): APIPromise<ManagedAgentsDeployment>
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
[方法源码](../src/managed/resources/deployment.ts#L15);返回:`APIPromise<ManagedAgentsDeployment>`([ManagedAgentsDeployment](../src/managed/types.ts#L1600))。
|
|
794
|
+
|
|
795
|
+
参数对象:[DeploymentCreateParams](../src/managed/types.ts#L11538)。
|
|
796
|
+
|
|
797
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
798
|
+
| --- | --- | --- | --- | --- |
|
|
799
|
+
| `params.environment_variables` | 否 | `string \| null` | body / `environment_variables` | 字段结构见类型链接。 |
|
|
800
|
+
| `params.agent` | 是 | `DeploymentNewParamsAgentUnion`([DeploymentNewParamsAgentUnion](../src/managed/types.ts#L2193)) | body / `agent` | Agent to deploy. Accepts the `agent` ID string, which pins the latest version, or an `agent` object with both id and version specified. The agent must exist and not be archived. |
|
|
801
|
+
| `params.environment_id` | 是 | `string` | body / `environment_id` | ID of the `environment` defining the container configuration for sessions created from this deployment. |
|
|
802
|
+
| `params.initial_events` | 是 | `Array<ManagedAgentsDeploymentInitialEventParamsUnion>`([ManagedAgentsDeploymentInitialEventParamsUnion](../src/managed/types.ts#L1683)) | body / `initial_events` | Events to send to each session immediately after creation. At least 1, maximum 50. |
|
|
803
|
+
| `params.name` | 是 | `string` | body / `name` | Human-readable name for the deployment. |
|
|
804
|
+
| `params.description` | 否 | `string \| null` | body / `description` | Description of what the deployment does. |
|
|
805
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
806
|
+
| `params.budget` | 否 | `ManagedAgentsBudgetLimitParam \| null`([ManagedAgentsBudgetLimitParam](../src/managed/types.ts#L6526)) | body / `budget` | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
|
|
807
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. |
|
|
808
|
+
| `params.resources` | 否 | `Array<DeploymentNewParamsResourceUnion> \| null`([DeploymentNewParamsResourceUnion](../src/managed/types.ts#L2195)) | body / `resources` | Resources (e.g. repositories, files) to mount into each session's container. Maximum 500. |
|
|
809
|
+
| `params.schedule` | 否 | `ManagedAgentsScheduleParams \| null`([ManagedAgentsScheduleParams](../src/managed/types.ts#L2025)) | body / `schedule` | 5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone. |
|
|
810
|
+
| `params.vault_ids` | 否 | `Array<string> \| null` | body / `vault_ids` | Vault IDs for stored credentials the agent can use during sessions created from this deployment. Maximum 50. |
|
|
811
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
812
|
+
|
|
813
|
+
### `deployments.retrieve`
|
|
814
|
+
|
|
815
|
+
获取部署。HTTP:`GET /deployments/{id}`。
|
|
816
|
+
|
|
817
|
+
```text
|
|
818
|
+
client.deployments.retrieve(deploymentID: string, params: DeploymentRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeployment>
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
[方法源码](../src/managed/resources/deployment.ts#L23);返回:`APIPromise<ManagedAgentsDeployment>`([ManagedAgentsDeployment](../src/managed/types.ts#L1600))。
|
|
822
|
+
|
|
823
|
+
参数对象:[DeploymentRetrieveParams](../src/managed/types.ts#L11540)。
|
|
824
|
+
|
|
825
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
826
|
+
| --- | --- | --- | --- | --- |
|
|
827
|
+
| `deploymentID` | 是 | `string` | path / `deploymentID` | 按签名顺序传入的路径参数。 |
|
|
828
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
829
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
830
|
+
|
|
831
|
+
### `deployments.update`
|
|
832
|
+
|
|
833
|
+
更新部署。HTTP:`POST /deployments/{id}`。
|
|
834
|
+
|
|
835
|
+
```text
|
|
836
|
+
client.deployments.update(deploymentID: string, params: DeploymentUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeployment>
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
[方法源码](../src/managed/resources/deployment.ts#L31);返回:`APIPromise<ManagedAgentsDeployment>`([ManagedAgentsDeployment](../src/managed/types.ts#L1600))。
|
|
840
|
+
|
|
841
|
+
参数对象:[DeploymentUpdateParams](../src/managed/types.ts#L2205)。
|
|
842
|
+
|
|
843
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
844
|
+
| --- | --- | --- | --- | --- |
|
|
845
|
+
| `deploymentID` | 是 | `string` | path / `deploymentID` | 按签名顺序传入的路径参数。 |
|
|
846
|
+
| `params.environment_variables` | 否 | `string \| null` | body / `environment_variables` | 字段结构见类型链接。 |
|
|
847
|
+
| `params.description` | 否 | `string \| null` | body / `description` | Description. Omit to preserve; send empty string or null to clear. |
|
|
848
|
+
| `params.environment_id` | 否 | `string` | body / `environment_id` | ID of the `environment` where sessions run. Omit to preserve. Cannot be cleared. |
|
|
849
|
+
| `params.name` | 否 | `string` | body / `name` | Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared. |
|
|
850
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
851
|
+
| `params.metadata` | 否 | `Record<string, unknown> \| null` | body / `metadata` | Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars. |
|
|
852
|
+
| `params.resources` | 否 | `Array<DeploymentUpdateParamsResourceUnion> \| null`([DeploymentUpdateParamsResourceUnion](../src/managed/types.ts#L2265)) | body / `resources` | Session resources. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 500. |
|
|
853
|
+
| `params.vault_ids` | 否 | `Array<string> \| null` | body / `vault_ids` | Vault IDs. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 50. |
|
|
854
|
+
| `params.agent` | 否 | `DeploymentUpdateParamsAgentUnion`([DeploymentUpdateParamsAgentUnion](../src/managed/types.ts#L2263)) | body / `agent` | Agent to deploy. Accepts the `agent` ID string, which re-pins to the latest version, or an `agent` object with both id and version specified. Omit to preserve. Cannot be cleared. |
|
|
855
|
+
| `params.budget` | 否 | `ManagedAgentsBudgetLimitParam \| null`([ManagedAgentsBudgetLimitParam](../src/managed/types.ts#L6526)) | body / `budget` | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
|
|
856
|
+
| `params.initial_events` | 否 | `Array<ManagedAgentsDeploymentInitialEventParamsUnion>`([ManagedAgentsDeploymentInitialEventParamsUnion](../src/managed/types.ts#L1683)) | body / `initial_events` | Initial events. Full replacement. Omit to preserve. Cannot be cleared. At least 1, maximum 50. |
|
|
857
|
+
| `params.schedule` | 否 | `ManagedAgentsScheduleParams \| null`([ManagedAgentsScheduleParams](../src/managed/types.ts#L2025)) | body / `schedule` | 5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone. |
|
|
858
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
859
|
+
|
|
860
|
+
### `deployments.list`
|
|
861
|
+
|
|
862
|
+
列出部署。HTTP:`GET /deployments`。
|
|
863
|
+
|
|
864
|
+
```text
|
|
865
|
+
client.deployments.list(params: DeploymentListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsDeployment>
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
[方法源码](../src/managed/resources/deployment.ts#L39);返回:`PagePromise<ManagedAgentsDeployment>`([ManagedAgentsDeployment](../src/managed/types.ts#L1600))。
|
|
869
|
+
|
|
870
|
+
参数对象:[DeploymentListParams](../src/managed/types.ts#L2267)。
|
|
871
|
+
|
|
872
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
873
|
+
| --- | --- | --- | --- | --- |
|
|
874
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
875
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
876
|
+
| `params.agent_id` | 否 | `string` | query / `agent_id` | Filter by agent ID. |
|
|
877
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | Return deployments created at or after this time (inclusive). |
|
|
878
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | Return deployments created at or before this time (inclusive). |
|
|
879
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | When true, includes archived deployments. Default: false (exclude archived). |
|
|
880
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum results per page. Default 20, maximum 100. |
|
|
881
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor. |
|
|
882
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
883
|
+
| `params.status` | 否 | `ManagedAgentsDeploymentStatus`([ManagedAgentsDeploymentStatus](../src/managed/types.ts#L1710)) | query / `status` | Filter by status: `active` or `paused`. Omit for both. To include archived deployments, use `include_archived` instead; the two cannot be combined. Any of "active", "paused". |
|
|
884
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
885
|
+
|
|
886
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
887
|
+
|
|
888
|
+
### `deployments.archive`
|
|
889
|
+
|
|
890
|
+
归档部署。HTTP:`POST /deployments/{id}/archive`。
|
|
891
|
+
|
|
892
|
+
```text
|
|
893
|
+
client.deployments.archive(deploymentID: string, params: DeploymentArchiveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeployment>
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
[方法源码](../src/managed/resources/deployment.ts#L47);返回:`APIPromise<ManagedAgentsDeployment>`([ManagedAgentsDeployment](../src/managed/types.ts#L1600))。
|
|
897
|
+
|
|
898
|
+
参数对象:[DeploymentArchiveParams](../src/managed/types.ts#L2308)。
|
|
899
|
+
|
|
900
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
901
|
+
| --- | --- | --- | --- | --- |
|
|
902
|
+
| `deploymentID` | 是 | `string` | path / `deploymentID` | 按签名顺序传入的路径参数。 |
|
|
903
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
904
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
905
|
+
|
|
906
|
+
### `deployments.pause`
|
|
907
|
+
|
|
908
|
+
暂停部署。HTTP:`POST /deployments/{id}/pause`。
|
|
909
|
+
|
|
910
|
+
```text
|
|
911
|
+
client.deployments.pause(deploymentID: string, params: DeploymentPauseParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeployment>
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
[方法源码](../src/managed/resources/deployment.ts#L55);返回:`APIPromise<ManagedAgentsDeployment>`([ManagedAgentsDeployment](../src/managed/types.ts#L1600))。
|
|
915
|
+
|
|
916
|
+
参数对象:[DeploymentPauseParams](../src/managed/types.ts#L2316)。
|
|
917
|
+
|
|
918
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
919
|
+
| --- | --- | --- | --- | --- |
|
|
920
|
+
| `deploymentID` | 是 | `string` | path / `deploymentID` | 按签名顺序传入的路径参数。 |
|
|
921
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
922
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
923
|
+
|
|
924
|
+
### `deployments.run`
|
|
925
|
+
|
|
926
|
+
手动触发部署。HTTP:`POST /deployments/{id}/run`。
|
|
927
|
+
|
|
928
|
+
```text
|
|
929
|
+
client.deployments.run(deploymentID: string, params: DeploymentRunParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeploymentRun>
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
[方法源码](../src/managed/resources/deployment.ts#L63);返回:`APIPromise<ManagedAgentsDeploymentRun>`([ManagedAgentsDeploymentRun](../src/managed/types.ts#L2360))。
|
|
933
|
+
|
|
934
|
+
参数对象:[DeploymentRunParams](../src/managed/types.ts#L2324)。
|
|
935
|
+
|
|
936
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
937
|
+
| --- | --- | --- | --- | --- |
|
|
938
|
+
| `deploymentID` | 是 | `string` | path / `deploymentID` | 按签名顺序传入的路径参数。 |
|
|
939
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
940
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
941
|
+
|
|
942
|
+
### `deployments.unpause`
|
|
943
|
+
|
|
944
|
+
恢复部署运行。HTTP:`POST /deployments/{id}/unpause`。
|
|
945
|
+
|
|
946
|
+
```text
|
|
947
|
+
client.deployments.unpause(deploymentID: string, params: DeploymentUnpauseParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeployment>
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
[方法源码](../src/managed/resources/deployment.ts#L71);返回:`APIPromise<ManagedAgentsDeployment>`([ManagedAgentsDeployment](../src/managed/types.ts#L1600))。
|
|
951
|
+
|
|
952
|
+
参数对象:[DeploymentUnpauseParams](../src/managed/types.ts#L2332)。
|
|
953
|
+
|
|
954
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
955
|
+
| --- | --- | --- | --- | --- |
|
|
956
|
+
| `deploymentID` | 是 | `string` | path / `deploymentID` | 按签名顺序传入的路径参数。 |
|
|
957
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
958
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
959
|
+
|
|
960
|
+
<a id="deploymentRuns"></a>
|
|
961
|
+
|
|
962
|
+
## 部署运行:`client.deploymentRuns`
|
|
963
|
+
|
|
964
|
+
### `deploymentRuns.retrieve`
|
|
965
|
+
|
|
966
|
+
获取部署运行。HTTP:`GET /deployment_runs/{run_id}`。
|
|
967
|
+
|
|
968
|
+
```text
|
|
969
|
+
client.deploymentRuns.retrieve(deploymentRunID: string, params: DeploymentRunRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeploymentRun>
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
[方法源码](../src/managed/resources/deployment-run.ts#L15);返回:`APIPromise<ManagedAgentsDeploymentRun>`([ManagedAgentsDeploymentRun](../src/managed/types.ts#L2360))。
|
|
973
|
+
|
|
974
|
+
参数对象:[DeploymentRunRetrieveParams](../src/managed/types.ts#L11542)。
|
|
975
|
+
|
|
976
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
977
|
+
| --- | --- | --- | --- | --- |
|
|
978
|
+
| `deploymentRunID` | 是 | `string` | path / `deploymentRunID` | 按签名顺序传入的路径参数。 |
|
|
979
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
980
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
981
|
+
|
|
982
|
+
### `deploymentRuns.list`
|
|
983
|
+
|
|
984
|
+
列出部署运行。HTTP:`GET /deployment_runs`。
|
|
985
|
+
|
|
986
|
+
```text
|
|
987
|
+
client.deploymentRuns.list(params: DeploymentRunListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsDeploymentRun>
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
[方法源码](../src/managed/resources/deployment-run.ts#L23);返回:`PagePromise<ManagedAgentsDeploymentRun>`([ManagedAgentsDeploymentRun](../src/managed/types.ts#L2360))。
|
|
991
|
+
|
|
992
|
+
参数对象:[DeploymentRunListParams](../src/managed/types.ts#L2689)。
|
|
993
|
+
|
|
994
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
995
|
+
| --- | --- | --- | --- | --- |
|
|
996
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
997
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
998
|
+
| `params["created_at[gt]"]` | 否 | `string` | query / `created_at[gt]` | Return runs created strictly after this time (exclusive). |
|
|
999
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | Return runs created at or after this time (inclusive). |
|
|
1000
|
+
| `params["created_at[lt]"]` | 否 | `string` | query / `created_at[lt]` | Return runs created strictly before this time (exclusive). |
|
|
1001
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | Return runs created at or before this time (inclusive). |
|
|
1002
|
+
| `params.deployment_id` | 否 | `string` | query / `deployment_id` | Filter to a specific deployment. Omit to list across all deployments in the workspace. Filtering by a non-existent `deployment_id` returns 200 with empty data. |
|
|
1003
|
+
| `params.has_error` | 否 | `boolean` | query / `has_error` | Filter: true for runs with non-null `error`, false for runs with non-null `session_id`. Omit for all. |
|
|
1004
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum results per page. Default 20, maximum 1000. |
|
|
1005
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor. Pass `next_page` from the previous response. Invalid or expired cursors return 400. |
|
|
1006
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1007
|
+
| `params.trigger_type` | 否 | `ManagedAgentsTriggerType`([ManagedAgentsTriggerType](../src/managed/types.ts#L2614)) | query / `trigger_type` | Filter runs by what triggered them. Omit to return all runs. Any of "schedule", "manual". |
|
|
1008
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1009
|
+
|
|
1010
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1011
|
+
|
|
1012
|
+
<a id="dreams"></a>
|
|
1013
|
+
|
|
1014
|
+
## 记忆整理任务:`client.dreams`
|
|
1015
|
+
|
|
1016
|
+
### `dreams.create`
|
|
1017
|
+
|
|
1018
|
+
创建记忆整理任务。HTTP:`POST /dreams`。
|
|
1019
|
+
|
|
1020
|
+
```text
|
|
1021
|
+
client.dreams.create(params: DreamCreateParams, options?: RequestOptions): APIPromise<Dream>
|
|
1022
|
+
```
|
|
1023
|
+
|
|
1024
|
+
[方法源码](../src/managed/resources/dream.ts#L15);返回:`APIPromise<Dream>`([Dream](../src/managed/types.ts#L2749))。
|
|
1025
|
+
|
|
1026
|
+
参数对象:[DreamCreateParams](../src/managed/types.ts#L11544)。
|
|
1027
|
+
|
|
1028
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1029
|
+
| --- | --- | --- | --- | --- |
|
|
1030
|
+
| `params.inputs` | 是 | `Array<DreamInputUnionParam>`([DreamInputUnionParam](../src/managed/types.ts#L2810)) | body / `inputs` | 字段结构见类型链接。 |
|
|
1031
|
+
| `params.model` | 是 | `DreamNewParamsModelUnion`([DreamNewParamsModelUnion](../src/managed/types.ts#L3033)) | body / `model` | Model identifier and configuration applied to every pipeline stage. |
|
|
1032
|
+
| `params.instructions` | 否 | `string \| null` | body / `instructions` | 字段结构见类型链接。 |
|
|
1033
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1034
|
+
| `params.output_behavior` | 否 | `OutputBehaviorUnionParam \| null`([OutputBehaviorUnionParam](../src/managed/types.ts#L2957)) | body / `output_behavior` | The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. |
|
|
1035
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1036
|
+
|
|
1037
|
+
### `dreams.retrieve`
|
|
1038
|
+
|
|
1039
|
+
获取记忆整理任务。HTTP:`GET /dreams/{id}`。
|
|
1040
|
+
|
|
1041
|
+
```text
|
|
1042
|
+
client.dreams.retrieve(dreamID: string, params: DreamRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<Dream>
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
[方法源码](../src/managed/resources/dream.ts#L23);返回:`APIPromise<Dream>`([Dream](../src/managed/types.ts#L2749))。
|
|
1046
|
+
|
|
1047
|
+
参数对象:[DreamRetrieveParams](../src/managed/types.ts#L11546)。
|
|
1048
|
+
|
|
1049
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1050
|
+
| --- | --- | --- | --- | --- |
|
|
1051
|
+
| `dreamID` | 是 | `string` | path / `dreamID` | 按签名顺序传入的路径参数。 |
|
|
1052
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1053
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1054
|
+
|
|
1055
|
+
### `dreams.list`
|
|
1056
|
+
|
|
1057
|
+
列出记忆整理任务。HTTP:`GET /dreams`。
|
|
1058
|
+
|
|
1059
|
+
```text
|
|
1060
|
+
client.dreams.list(params: DreamListParams | null | undefined = {}, options?: RequestOptions): PagePromise<Dream>
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
[方法源码](../src/managed/resources/dream.ts#L31);返回:`PagePromise<Dream>`([Dream](../src/managed/types.ts#L2749))。
|
|
1064
|
+
|
|
1065
|
+
参数对象:[DreamListParams](../src/managed/types.ts#L3043)。
|
|
1066
|
+
|
|
1067
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1068
|
+
| --- | --- | --- | --- | --- |
|
|
1069
|
+
| `params["created_at[gt]"]` | 否 | `string` | query / `created_at[gt]` | Return dreams with `created_at` strictly after this timestamp (exclusive lower bound, RFC 3339). Unset applies no lower bound. |
|
|
1070
|
+
| `params["created_at[lt]"]` | 否 | `string` | query / `created_at[lt]` | Return dreams with `created_at` strictly before this timestamp (exclusive upper bound, RFC 3339). Unset applies no upper bound. |
|
|
1071
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | Query parameter for include_archived |
|
|
1072
|
+
| `params.limit` | 否 | `number` | query / `limit` | Query parameter for limit |
|
|
1073
|
+
| `params.page` | 否 | `string` | query / `page` | Query parameter for page |
|
|
1074
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1075
|
+
| `params.statuses` | 否 | `Array<DreamStatus>`([DreamStatus](../src/managed/types.ts#L2931)) | query / `statuses` | Filter by lifecycle status. Repeat the parameter to match any of multiple statuses. Empty applies no status filter. |
|
|
1076
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1077
|
+
|
|
1078
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1079
|
+
|
|
1080
|
+
### `dreams.archive`
|
|
1081
|
+
|
|
1082
|
+
归档记忆整理任务。HTTP:`POST /dreams/{id}/archive`。
|
|
1083
|
+
|
|
1084
|
+
```text
|
|
1085
|
+
client.dreams.archive(dreamID: string, params: DreamArchiveParams | null | undefined = {}, options?: RequestOptions): APIPromise<Dream>
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1088
|
+
[方法源码](../src/managed/resources/dream.ts#L39);返回:`APIPromise<Dream>`([Dream](../src/managed/types.ts#L2749))。
|
|
1089
|
+
|
|
1090
|
+
参数对象:[DreamArchiveParams](../src/managed/types.ts#L3078)。
|
|
1091
|
+
|
|
1092
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1093
|
+
| --- | --- | --- | --- | --- |
|
|
1094
|
+
| `dreamID` | 是 | `string` | path / `dreamID` | 按签名顺序传入的路径参数。 |
|
|
1095
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1096
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1097
|
+
|
|
1098
|
+
### `dreams.cancel`
|
|
1099
|
+
|
|
1100
|
+
取消记忆整理任务。HTTP:`POST /dreams/{id}/cancel`。
|
|
1101
|
+
|
|
1102
|
+
```text
|
|
1103
|
+
client.dreams.cancel(dreamID: string, params: DreamCancelParams | null | undefined = {}, options?: RequestOptions): APIPromise<Dream>
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
[方法源码](../src/managed/resources/dream.ts#L47);返回:`APIPromise<Dream>`([Dream](../src/managed/types.ts#L2749))。
|
|
1107
|
+
|
|
1108
|
+
参数对象:[DreamCancelParams](../src/managed/types.ts#L3086)。
|
|
1109
|
+
|
|
1110
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1111
|
+
| --- | --- | --- | --- | --- |
|
|
1112
|
+
| `dreamID` | 是 | `string` | path / `dreamID` | 按签名顺序传入的路径参数。 |
|
|
1113
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1114
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1115
|
+
|
|
1116
|
+
<a id="environments"></a>
|
|
1117
|
+
|
|
1118
|
+
## 运行环境:`client.environments`
|
|
1119
|
+
|
|
1120
|
+
### `environments.create`
|
|
1121
|
+
|
|
1122
|
+
创建运行环境。HTTP:`POST /environments`。
|
|
1123
|
+
|
|
1124
|
+
```text
|
|
1125
|
+
client.environments.create(params: EnvironmentCreateParams, options?: RequestOptions): APIPromise<Environment>
|
|
1126
|
+
```
|
|
1127
|
+
|
|
1128
|
+
[方法源码](../src/managed/resources/environment.ts#L17);返回:`APIPromise<Environment>`([Environment](../src/managed/types.ts#L3150))。
|
|
1129
|
+
|
|
1130
|
+
参数对象:[EnvironmentCreateParams](../src/managed/types.ts#L11548)。
|
|
1131
|
+
|
|
1132
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1133
|
+
| --- | --- | --- | --- | --- |
|
|
1134
|
+
| `params.name` | 是 | `string` | body / `name` | Human-readable name for the environment |
|
|
1135
|
+
| `params.description` | 否 | `string \| null` | body / `description` | Optional description of the environment |
|
|
1136
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1137
|
+
| `params.config` | 否 | `EnvironmentNewParamsConfigUnion \| null`([EnvironmentNewParamsConfigUnion](../src/managed/types.ts#L3446)) | body / `config` | Environment configuration |
|
|
1138
|
+
| `params.scope` | 否 | `EnvironmentNewParamsScope \| null`([EnvironmentNewParamsScope](../src/managed/types.ts#L3454)) | body / `scope` | The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Only applicable for self-hosted environments. If not specified, defaults based on organization type. Any of "organization", "account". |
|
|
1139
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | User-provided metadata key-value pairs |
|
|
1140
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1141
|
+
|
|
1142
|
+
### `environments.retrieve`
|
|
1143
|
+
|
|
1144
|
+
获取运行环境。HTTP:`GET /environments/{environment_id}`。
|
|
1145
|
+
|
|
1146
|
+
```text
|
|
1147
|
+
client.environments.retrieve(environmentID: string, params: EnvironmentRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<Environment>
|
|
1148
|
+
```
|
|
1149
|
+
|
|
1150
|
+
[方法源码](../src/managed/resources/environment.ts#L25);返回:`APIPromise<Environment>`([Environment](../src/managed/types.ts#L3150))。
|
|
1151
|
+
|
|
1152
|
+
参数对象:[EnvironmentRetrieveParams](../src/managed/types.ts#L11550)。
|
|
1153
|
+
|
|
1154
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1155
|
+
| --- | --- | --- | --- | --- |
|
|
1156
|
+
| `environmentID` | 是 | `string` | path / `environment_id` | 按签名顺序传入的路径参数。 |
|
|
1157
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1158
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1159
|
+
|
|
1160
|
+
### `environments.update`
|
|
1161
|
+
|
|
1162
|
+
更新运行环境。HTTP:`POST /environments/{environment_id}`。
|
|
1163
|
+
|
|
1164
|
+
```text
|
|
1165
|
+
client.environments.update(environmentID: string, params: EnvironmentUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise<Environment>
|
|
1166
|
+
```
|
|
1167
|
+
|
|
1168
|
+
[方法源码](../src/managed/resources/environment.ts#L33);返回:`APIPromise<Environment>`([Environment](../src/managed/types.ts#L3150))。
|
|
1169
|
+
|
|
1170
|
+
参数对象:[EnvironmentUpdateParams](../src/managed/types.ts#L3464)。
|
|
1171
|
+
|
|
1172
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1173
|
+
| --- | --- | --- | --- | --- |
|
|
1174
|
+
| `environmentID` | 是 | `string` | path / `environment_id` | 按签名顺序传入的路径参数。 |
|
|
1175
|
+
| `params.description` | 否 | `string \| null` | body / `description` | Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string. |
|
|
1176
|
+
| `params.name` | 否 | `string \| null` | body / `name` | Updated name for the environment |
|
|
1177
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1178
|
+
| `params.config` | 否 | `EnvironmentUpdateParamsConfigUnion \| null`([EnvironmentUpdateParamsConfigUnion](../src/managed/types.ts#L3498)) | body / `config` | Updated environment configuration |
|
|
1179
|
+
| `params.scope` | 否 | `EnvironmentUpdateParamsScope \| null`([EnvironmentUpdateParamsScope](../src/managed/types.ts#L3505)) | body / `scope` | The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Any of "organization", "account". |
|
|
1180
|
+
| `params.metadata` | 否 | `Record<string, unknown> \| null` | body / `metadata` | User-provided metadata key-value pairs. Set a value to null or empty string to delete the key. |
|
|
1181
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1182
|
+
|
|
1183
|
+
### `environments.list`
|
|
1184
|
+
|
|
1185
|
+
列出运行环境。HTTP:`GET /environments`。
|
|
1186
|
+
|
|
1187
|
+
```text
|
|
1188
|
+
client.environments.list(params: EnvironmentListParams | null | undefined = {}, options?: RequestOptions): PagePromise<Environment>
|
|
1189
|
+
```
|
|
1190
|
+
|
|
1191
|
+
[方法源码](../src/managed/resources/environment.ts#L41);返回:`PagePromise<Environment>`([Environment](../src/managed/types.ts#L3150))。
|
|
1192
|
+
|
|
1193
|
+
参数对象:[EnvironmentListParams](../src/managed/types.ts#L3507)。
|
|
1194
|
+
|
|
1195
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1196
|
+
| --- | --- | --- | --- | --- |
|
|
1197
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | 字段结构见类型链接。 |
|
|
1198
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | 字段结构见类型链接。 |
|
|
1199
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque cursor from previous response for pagination. Pass the `next_page` value from the previous response. |
|
|
1200
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | Include archived environments in the response |
|
|
1201
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of environments to return |
|
|
1202
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1203
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1204
|
+
|
|
1205
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1206
|
+
|
|
1207
|
+
### `environments.delete`
|
|
1208
|
+
|
|
1209
|
+
删除运行环境。HTTP:`DELETE /environments/{environment_id}`。
|
|
1210
|
+
|
|
1211
|
+
```text
|
|
1212
|
+
client.environments.delete(environmentID: string, params: EnvironmentDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise<EnvironmentDeleteResponse>
|
|
1213
|
+
```
|
|
1214
|
+
|
|
1215
|
+
[方法源码](../src/managed/resources/environment.ts#L49);返回:`APIPromise<EnvironmentDeleteResponse>`([EnvironmentDeleteResponse](../src/managed/types.ts#L3207))。
|
|
1216
|
+
|
|
1217
|
+
参数对象:[EnvironmentDeleteParams](../src/managed/types.ts#L3530)。
|
|
1218
|
+
|
|
1219
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1220
|
+
| --- | --- | --- | --- | --- |
|
|
1221
|
+
| `environmentID` | 是 | `string` | path / `environment_id` | 按签名顺序传入的路径参数。 |
|
|
1222
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1223
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1224
|
+
|
|
1225
|
+
### `environments.archive`
|
|
1226
|
+
|
|
1227
|
+
归档运行环境。HTTP:`POST /environments/{environment_id}/archive`。
|
|
1228
|
+
|
|
1229
|
+
```text
|
|
1230
|
+
client.environments.archive(environmentID: string, params: EnvironmentArchiveParams | null | undefined = {}, options?: RequestOptions): APIPromise<Environment>
|
|
1231
|
+
```
|
|
1232
|
+
|
|
1233
|
+
[方法源码](../src/managed/resources/environment.ts#L58);返回:`APIPromise<Environment>`([Environment](../src/managed/types.ts#L3150))。
|
|
1234
|
+
|
|
1235
|
+
参数对象:[EnvironmentArchiveParams](../src/managed/types.ts#L3538)。
|
|
1236
|
+
|
|
1237
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1238
|
+
| --- | --- | --- | --- | --- |
|
|
1239
|
+
| `environmentID` | 是 | `string` | path / `environment_id` | 按签名顺序传入的路径参数。 |
|
|
1240
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1241
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1242
|
+
|
|
1243
|
+
<a id="environments-work"></a>
|
|
1244
|
+
|
|
1245
|
+
## 环境工作负载:`client.environments.work`
|
|
1246
|
+
|
|
1247
|
+
### `environments.work.retrieve`
|
|
1248
|
+
|
|
1249
|
+
获取环境工作负载。HTTP:`GET /environments/{environment_id}/work/{work_id}`。
|
|
1250
|
+
|
|
1251
|
+
```text
|
|
1252
|
+
client.environments.work.retrieve(workID: string, params: EnvironmentWorkRetrieveParams, options?: RequestOptions): APIPromise<SelfHostedWork>
|
|
1253
|
+
```
|
|
1254
|
+
|
|
1255
|
+
[方法源码](../src/managed/resources/environment-work.ts#L20);返回:`APIPromise<SelfHostedWork>`([SelfHostedWork](../src/managed/types.ts#L3578))。
|
|
1256
|
+
|
|
1257
|
+
参数对象:[EnvironmentWorkRetrieveParams](../src/managed/types.ts#L11552)。
|
|
1258
|
+
|
|
1259
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1260
|
+
| --- | --- | --- | --- | --- |
|
|
1261
|
+
| `workID` | 是 | `string` | path / `work_id` | 按签名顺序传入的路径参数。 |
|
|
1262
|
+
| `params.environment_id` | 是 | `string` | path / `environment_id` | 字段结构见类型链接。 |
|
|
1263
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1264
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1265
|
+
|
|
1266
|
+
### `environments.work.update`
|
|
1267
|
+
|
|
1268
|
+
更新环境工作负载。HTTP:`POST /environments/{environment_id}/work/{work_id}`。
|
|
1269
|
+
|
|
1270
|
+
```text
|
|
1271
|
+
client.environments.work.update(workID: string, params: EnvironmentWorkUpdateParams, options?: RequestOptions): APIPromise<SelfHostedWork>
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
[方法源码](../src/managed/resources/environment-work.ts#L33);返回:`APIPromise<SelfHostedWork>`([SelfHostedWork](../src/managed/types.ts#L3578))。
|
|
1275
|
+
|
|
1276
|
+
参数对象:[EnvironmentWorkUpdateParams](../src/managed/types.ts#L3765)。
|
|
1277
|
+
|
|
1278
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1279
|
+
| --- | --- | --- | --- | --- |
|
|
1280
|
+
| `workID` | 是 | `string` | path / `work_id` | 按签名顺序传入的路径参数。 |
|
|
1281
|
+
| `params.environment_id` | 是 | `string` | path / `environment_id` | 字段结构见类型链接。 |
|
|
1282
|
+
| `params.metadata` | 是 | `Record<string, unknown>` | body / `metadata` | Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve existing metadata. |
|
|
1283
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1284
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1285
|
+
|
|
1286
|
+
### `environments.work.list`
|
|
1287
|
+
|
|
1288
|
+
列出环境工作负载。HTTP:`GET /environments/{environment_id}/work`。
|
|
1289
|
+
|
|
1290
|
+
```text
|
|
1291
|
+
client.environments.work.list(environmentID: string, params: EnvironmentWorkListParams | null | undefined = {}, options?: RequestOptions): PagePromise<SelfHostedWork>
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
[方法源码](../src/managed/resources/environment-work.ts#L46);返回:`PagePromise<SelfHostedWork>`([SelfHostedWork](../src/managed/types.ts#L3578))。
|
|
1295
|
+
|
|
1296
|
+
参数对象:[EnvironmentWorkListParams](../src/managed/types.ts#L3779)。
|
|
1297
|
+
|
|
1298
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1299
|
+
| --- | --- | --- | --- | --- |
|
|
1300
|
+
| `environmentID` | 是 | `string` | path / `environment_id` | 按签名顺序传入的路径参数。 |
|
|
1301
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
1302
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
1303
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque cursor from previous response for pagination |
|
|
1304
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of work items to return |
|
|
1305
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1306
|
+
|
|
1307
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1308
|
+
|
|
1309
|
+
### `environments.work.ack`
|
|
1310
|
+
|
|
1311
|
+
确认已领取的环境工作负载。HTTP:`POST /environments/{environment_id}/work/{work_id}/ack`。
|
|
1312
|
+
|
|
1313
|
+
```text
|
|
1314
|
+
client.environments.work.ack(workID: string, params: EnvironmentWorkAckParams, options?: RequestOptions): APIPromise<SelfHostedWork>
|
|
1315
|
+
```
|
|
1316
|
+
|
|
1317
|
+
[方法源码](../src/managed/resources/environment-work.ts#L60);返回:`APIPromise<SelfHostedWork>`([SelfHostedWork](../src/managed/types.ts#L3578))。
|
|
1318
|
+
|
|
1319
|
+
参数对象:[EnvironmentWorkAckParams](../src/managed/types.ts#L3796)。
|
|
1320
|
+
|
|
1321
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1322
|
+
| --- | --- | --- | --- | --- |
|
|
1323
|
+
| `workID` | 是 | `string` | path / `work_id` | 按签名顺序传入的路径参数。 |
|
|
1324
|
+
| `params.environment_id` | 是 | `string` | path / `environment_id` | 字段结构见类型链接。 |
|
|
1325
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1326
|
+
|
|
1327
|
+
### `environments.work.heartbeat`
|
|
1328
|
+
|
|
1329
|
+
续租环境工作负载并记录心跳。HTTP:`POST /environments/{environment_id}/work/{work_id}/heartbeat`。
|
|
1330
|
+
|
|
1331
|
+
```text
|
|
1332
|
+
client.environments.work.heartbeat(workID: string, params: EnvironmentWorkHeartbeatParams, options?: RequestOptions): APIPromise<SelfHostedWorkHeartbeatResponse>
|
|
1333
|
+
```
|
|
1334
|
+
|
|
1335
|
+
[方法源码](../src/managed/resources/environment-work.ts#L73);返回:`APIPromise<SelfHostedWorkHeartbeatResponse>`([SelfHostedWorkHeartbeatResponse](../src/managed/types.ts#L3644))。
|
|
1336
|
+
|
|
1337
|
+
参数对象:[EnvironmentWorkHeartbeatParams](../src/managed/types.ts#L3804)。
|
|
1338
|
+
|
|
1339
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1340
|
+
| --- | --- | --- | --- | --- |
|
|
1341
|
+
| `workID` | 是 | `string` | path / `work_id` | 按签名顺序传入的路径参数。 |
|
|
1342
|
+
| `params.environment_id` | 是 | `string` | path / `environment_id` | 字段结构见类型链接。 |
|
|
1343
|
+
| `params.desired_ttl_seconds` | 否 | `number` | query / `desired_ttl_seconds` | Desired TTL in seconds |
|
|
1344
|
+
| `params.expected_last_heartbeat` | 否 | `string` | query / `expected_last_heartbeat` | Expected last_heartbeat for conditional update (optimistic concurrency). Use literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For subsequent heartbeats, echo the server's previous last_heartbeat value exactly. Returns 412 Precondition Failed if the actual value doesn't match. |
|
|
1345
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1346
|
+
|
|
1347
|
+
### `environments.work.poll`
|
|
1348
|
+
|
|
1349
|
+
长轮询领取环境工作负载。HTTP:`GET /environments/{environment_id}/work/poll`。
|
|
1350
|
+
|
|
1351
|
+
```text
|
|
1352
|
+
client.environments.work.poll(environmentID: string, params: EnvironmentWorkPollParams | null | undefined = {}, options?: RequestOptions): APIPromise<SelfHostedWork>
|
|
1353
|
+
```
|
|
1354
|
+
|
|
1355
|
+
[方法源码](../src/managed/resources/environment-work.ts#L86);返回:`APIPromise<SelfHostedWork>`([SelfHostedWork](../src/managed/types.ts#L3578))。
|
|
1356
|
+
|
|
1357
|
+
参数对象:[EnvironmentWorkPollParams](../src/managed/types.ts#L3823)。
|
|
1358
|
+
|
|
1359
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1360
|
+
| --- | --- | --- | --- | --- |
|
|
1361
|
+
| `environmentID` | 是 | `string` | path / `environment_id` | 按签名顺序传入的路径参数。 |
|
|
1362
|
+
| `params.block_ms` | 否 | `number` | query / `block_ms` | How long to wait for work to arrive before returning. Must be 1-999 in milliseconds. Defaults to non-blocking (returns immediately if no work is available). |
|
|
1363
|
+
| `params.reclaim_older_than_ms` | 否 | `number` | query / `reclaim_older_than_ms` | Reclaim unacknowledged work items older than this many milliseconds. If omitted, uses the default (5000ms). |
|
|
1364
|
+
| `params.qoder_worker_id` | 否 | `string` | header / `Worker-ID` | Unique identifier for the specific worker polling, used to track aggregated environment-level work metrics in Console |
|
|
1365
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1366
|
+
|
|
1367
|
+
### `environments.work.stats`
|
|
1368
|
+
|
|
1369
|
+
获取环境工作负载统计。HTTP:`GET /environments/{environment_id}/work/stats`。
|
|
1370
|
+
|
|
1371
|
+
```text
|
|
1372
|
+
client.environments.work.stats(environmentID: string, params: EnvironmentWorkStatsParams | null | undefined = {}, options?: RequestOptions): APIPromise<SelfHostedWorkQueueStats>
|
|
1373
|
+
```
|
|
1374
|
+
|
|
1375
|
+
[方法源码](../src/managed/resources/environment-work.ts#L94);返回:`APIPromise<SelfHostedWorkQueueStats>`([SelfHostedWorkQueueStats](../src/managed/types.ts#L3693))。
|
|
1376
|
+
|
|
1377
|
+
参数对象:[EnvironmentWorkStatsParams](../src/managed/types.ts#L3846)。
|
|
1378
|
+
|
|
1379
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1380
|
+
| --- | --- | --- | --- | --- |
|
|
1381
|
+
| `environmentID` | 是 | `string` | path / `environment_id` | 按签名顺序传入的路径参数。 |
|
|
1382
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1383
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1384
|
+
|
|
1385
|
+
### `environments.work.stop`
|
|
1386
|
+
|
|
1387
|
+
停止环境工作负载。HTTP:`POST /environments/{environment_id}/work/{work_id}/stop`。
|
|
1388
|
+
|
|
1389
|
+
```text
|
|
1390
|
+
client.environments.work.stop(workID: string, params: EnvironmentWorkStopParams, options?: RequestOptions): APIPromise<SelfHostedWork>
|
|
1391
|
+
```
|
|
1392
|
+
|
|
1393
|
+
[方法源码](../src/managed/resources/environment-work.ts#L107);返回:`APIPromise<SelfHostedWork>`([SelfHostedWork](../src/managed/types.ts#L3578))。
|
|
1394
|
+
|
|
1395
|
+
参数对象:[EnvironmentWorkStopParams](../src/managed/types.ts#L3854)。
|
|
1396
|
+
|
|
1397
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1398
|
+
| --- | --- | --- | --- | --- |
|
|
1399
|
+
| `workID` | 是 | `string` | path / `work_id` | 按签名顺序传入的路径参数。 |
|
|
1400
|
+
| `params.environment_id` | 是 | `string` | path / `environment_id` | 字段结构见类型链接。 |
|
|
1401
|
+
| `params.force` | 否 | `boolean \| null` | body / `force` | If true, immediately stop work without graceful shutdown |
|
|
1402
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1403
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1404
|
+
|
|
1405
|
+
<a id="skills"></a>
|
|
1406
|
+
|
|
1407
|
+
## 技能:`client.skills`
|
|
1408
|
+
|
|
1409
|
+
### `skills.create`
|
|
1410
|
+
|
|
1411
|
+
创建技能。HTTP:`POST /skills`。
|
|
1412
|
+
|
|
1413
|
+
```text
|
|
1414
|
+
client.skills.create(params: SkillCreateParams, options?: RequestOptions): APIPromise<Skill>
|
|
1415
|
+
```
|
|
1416
|
+
|
|
1417
|
+
[方法源码](../src/managed/resources/skill.ts#L17);返回:`APIPromise<Skill>`([Skill](../src/managed/types.ts#L10349))。
|
|
1418
|
+
|
|
1419
|
+
参数对象:[SkillCreateParams](../src/managed/types.ts#L11572)。
|
|
1420
|
+
|
|
1421
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1422
|
+
| --- | --- | --- | --- | --- |
|
|
1423
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | 字段结构见类型链接。 |
|
|
1424
|
+
| `params.files` | 是 | `Array<Uploadable>` | body / `files` | Files to upload for the skill. All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory. |
|
|
1425
|
+
| `params.display_title` | 否 | `string \| null` | body / `display_title` | Human-readable, single-line label for the Skill. Maximum 255 characters. Always set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not unique. |
|
|
1426
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1427
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1428
|
+
|
|
1429
|
+
请求使用 `multipart/form-data`;由 SDK 生成 boundary,不要手工设置 Content-Type。
|
|
1430
|
+
|
|
1431
|
+
### `skills.retrieve`
|
|
1432
|
+
|
|
1433
|
+
获取技能。HTTP:`GET /skills/{skill_id}`。
|
|
1434
|
+
|
|
1435
|
+
```text
|
|
1436
|
+
client.skills.retrieve(skillID: string, params: SkillRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<Skill>
|
|
1437
|
+
```
|
|
1438
|
+
|
|
1439
|
+
[方法源码](../src/managed/resources/skill.ts#L25);返回:`APIPromise<Skill>`([Skill](../src/managed/types.ts#L10349))。
|
|
1440
|
+
|
|
1441
|
+
参数对象:[SkillRetrieveParams](../src/managed/types.ts#L11574)。
|
|
1442
|
+
|
|
1443
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1444
|
+
| --- | --- | --- | --- | --- |
|
|
1445
|
+
| `skillID` | 是 | `string` | path / `skill_id` | 按签名顺序传入的路径参数。 |
|
|
1446
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1447
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1448
|
+
|
|
1449
|
+
### `skills.list`
|
|
1450
|
+
|
|
1451
|
+
列出技能。HTTP:`GET /skills`。
|
|
1452
|
+
|
|
1453
|
+
```text
|
|
1454
|
+
client.skills.list(params: SkillListParams | null | undefined = {}, options?: RequestOptions): PagePromise<Skill>
|
|
1455
|
+
```
|
|
1456
|
+
|
|
1457
|
+
[方法源码](../src/managed/resources/skill.ts#L33);返回:`PagePromise<Skill>`([Skill](../src/managed/types.ts#L10349))。
|
|
1458
|
+
|
|
1459
|
+
参数对象:[SkillListParams](../src/managed/types.ts#L10453)。
|
|
1460
|
+
|
|
1461
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1462
|
+
| --- | --- | --- | --- | --- |
|
|
1463
|
+
| `params.display_title` | 否 | `string` | query / `display_title` | 字段结构见类型链接。 |
|
|
1464
|
+
| `params.name` | 否 | `string` | query / `name` | 字段结构见类型链接。 |
|
|
1465
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
1466
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
1467
|
+
| `params.page` | 否 | `string` | query / `page` | Pagination token for fetching a specific page of results. Pass the value from a previous response's `next_page` field to get the next page of results. |
|
|
1468
|
+
| `params.source` | 否 | `string` | query / `source` | Filter skills by source. If provided, only skills from the specified source will be returned: - `"custom"`: only return user-created skills - `"qoder"`: only return Qoder-created skills |
|
|
1469
|
+
| `params.limit` | 否 | `number` | query / `limit` | Number of results to return per page. Ranges from `1` to `1000`. Defaults to `20`. |
|
|
1470
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1471
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1472
|
+
|
|
1473
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1474
|
+
|
|
1475
|
+
### `skills.delete`
|
|
1476
|
+
|
|
1477
|
+
删除技能。HTTP:`DELETE /skills/{skill_id}`。
|
|
1478
|
+
|
|
1479
|
+
```text
|
|
1480
|
+
client.skills.delete(skillID: string, params: SkillDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise<DeletedSkill>
|
|
1481
|
+
```
|
|
1482
|
+
|
|
1483
|
+
[方法源码](../src/managed/resources/skill.ts#L41);返回:`APIPromise<DeletedSkill>`([DeletedSkill](../src/managed/types.ts#L10334))。
|
|
1484
|
+
|
|
1485
|
+
参数对象:[SkillDeleteParams](../src/managed/types.ts#L10487)。
|
|
1486
|
+
|
|
1487
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1488
|
+
| --- | --- | --- | --- | --- |
|
|
1489
|
+
| `skillID` | 是 | `string` | path / `skill_id` | 按签名顺序传入的路径参数。 |
|
|
1490
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1491
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1492
|
+
|
|
1493
|
+
<a id="skills-versions"></a>
|
|
1494
|
+
|
|
1495
|
+
## 技能版本:`client.skills.versions`
|
|
1496
|
+
|
|
1497
|
+
### `skills.versions.create`
|
|
1498
|
+
|
|
1499
|
+
创建技能版本。HTTP:`POST /skills/{skill_id}/versions`。
|
|
1500
|
+
|
|
1501
|
+
```text
|
|
1502
|
+
client.skills.versions.create(skillID: string, params: SkillVersionCreateParams, options?: RequestOptions): APIPromise<SkillVersion>
|
|
1503
|
+
```
|
|
1504
|
+
|
|
1505
|
+
[方法源码](../src/managed/resources/skill-version.ts#L15);返回:`APIPromise<SkillVersion>`([SkillVersion](../src/managed/types.ts#L10509))。
|
|
1506
|
+
|
|
1507
|
+
参数对象:[SkillVersionCreateParams](../src/managed/types.ts#L11576)。
|
|
1508
|
+
|
|
1509
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1510
|
+
| --- | --- | --- | --- | --- |
|
|
1511
|
+
| `skillID` | 是 | `string` | path / `skill_id` | 按签名顺序传入的路径参数。 |
|
|
1512
|
+
| `params.files` | 是 | `Array<Uploadable>` | body / `files` | Files to upload for the skill. All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory. |
|
|
1513
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1514
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1515
|
+
|
|
1516
|
+
请求使用 `multipart/form-data`;由 SDK 生成 boundary,不要手工设置 Content-Type。
|
|
1517
|
+
|
|
1518
|
+
### `skills.versions.retrieve`
|
|
1519
|
+
|
|
1520
|
+
获取技能版本。HTTP:`GET /skills/{skill_id}/versions/{version}`。
|
|
1521
|
+
|
|
1522
|
+
```text
|
|
1523
|
+
client.skills.versions.retrieve(version: string, params: SkillVersionRetrieveParams, options?: RequestOptions): APIPromise<SkillVersion>
|
|
1524
|
+
```
|
|
1525
|
+
|
|
1526
|
+
[方法源码](../src/managed/resources/skill-version.ts#L23);返回:`APIPromise<SkillVersion>`([SkillVersion](../src/managed/types.ts#L10509))。
|
|
1527
|
+
|
|
1528
|
+
参数对象:[SkillVersionRetrieveParams](../src/managed/types.ts#L11578)。
|
|
1529
|
+
|
|
1530
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1531
|
+
| --- | --- | --- | --- | --- |
|
|
1532
|
+
| `version` | 是 | `string` | path / `version` | 按签名顺序传入的路径参数。 |
|
|
1533
|
+
| `params.skill_id` | 是 | `string` | path / `skill_id` | Unique identifier for the skill. The format and length of IDs may change over time. |
|
|
1534
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1535
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1536
|
+
|
|
1537
|
+
### `skills.versions.list`
|
|
1538
|
+
|
|
1539
|
+
列出技能版本。HTTP:`GET /skills/{skill_id}/versions`。
|
|
1540
|
+
|
|
1541
|
+
```text
|
|
1542
|
+
client.skills.versions.list(skillID: string, params: SkillVersionListParams | null | undefined = {}, options?: RequestOptions): PagePromise<SkillVersion>
|
|
1543
|
+
```
|
|
1544
|
+
|
|
1545
|
+
[方法源码](../src/managed/resources/skill-version.ts#L31);返回:`PagePromise<SkillVersion>`([SkillVersion](../src/managed/types.ts#L10509))。
|
|
1546
|
+
|
|
1547
|
+
参数对象:[SkillVersionListParams](../src/managed/types.ts#L10577)。
|
|
1548
|
+
|
|
1549
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1550
|
+
| --- | --- | --- | --- | --- |
|
|
1551
|
+
| `skillID` | 是 | `string` | path / `skill_id` | 按签名顺序传入的路径参数。 |
|
|
1552
|
+
| `params.limit` | 否 | `number` | query / `limit` | Number of results to return per page. Ranges from `1` to `1000`. Defaults to `20`. |
|
|
1553
|
+
| `params.page` | 否 | `string` | query / `page` | Optionally set to the `next_page` token from the previous response. |
|
|
1554
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1555
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1556
|
+
|
|
1557
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1558
|
+
|
|
1559
|
+
### `skills.versions.delete`
|
|
1560
|
+
|
|
1561
|
+
删除技能版本。HTTP:`DELETE /skills/{skill_id}/versions/{version}`。
|
|
1562
|
+
|
|
1563
|
+
```text
|
|
1564
|
+
client.skills.versions.delete(version: string, params: SkillVersionDeleteParams, options?: RequestOptions): APIPromise<DeletedSkillVersion>
|
|
1565
|
+
```
|
|
1566
|
+
|
|
1567
|
+
[方法源码](../src/managed/resources/skill-version.ts#L39);返回:`APIPromise<DeletedSkillVersion>`([DeletedSkillVersion](../src/managed/types.ts#L10495))。
|
|
1568
|
+
|
|
1569
|
+
参数对象:[SkillVersionDeleteParams](../src/managed/types.ts#L10595)。
|
|
1570
|
+
|
|
1571
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1572
|
+
| --- | --- | --- | --- | --- |
|
|
1573
|
+
| `version` | 是 | `string` | path / `version` | 按签名顺序传入的路径参数。 |
|
|
1574
|
+
| `params.skill_id` | 是 | `string` | path / `skill_id` | Unique identifier for the skill. The format and length of IDs may change over time. |
|
|
1575
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1576
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1577
|
+
|
|
1578
|
+
### `skills.versions.download`
|
|
1579
|
+
|
|
1580
|
+
下载技能版本。HTTP:`GET /skills/{skill_id}/versions/{version}/content`。
|
|
1581
|
+
|
|
1582
|
+
```text
|
|
1583
|
+
client.skills.versions.download(version: string, params: SkillVersionDownloadParams, options?: RequestOptions): APIPromise<Response>
|
|
1584
|
+
```
|
|
1585
|
+
|
|
1586
|
+
[方法源码](../src/managed/resources/skill-version.ts#L47);返回:`APIPromise<Response>`。
|
|
1587
|
+
|
|
1588
|
+
参数对象:[SkillVersionDownloadParams](../src/managed/types.ts#L10609)。
|
|
1589
|
+
|
|
1590
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1591
|
+
| --- | --- | --- | --- | --- |
|
|
1592
|
+
| `version` | 是 | `string` | path / `version` | 按签名顺序传入的路径参数。 |
|
|
1593
|
+
| `params.skill_id` | 是 | `string` | path / `skill_id` | Unique identifier for the skill. The format and length of IDs may change over time. |
|
|
1594
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1595
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1596
|
+
|
|
1597
|
+
返回下载请求的原生 `Response`,调用 `arrayBuffer()` / `text()` / `body` 读取内容;不是 JSON 对象。
|
|
1598
|
+
|
|
1599
|
+
<a id="vaults"></a>
|
|
1600
|
+
|
|
1601
|
+
## 凭据库:`client.vaults`
|
|
1602
|
+
|
|
1603
|
+
### `vaults.create`
|
|
1604
|
+
|
|
1605
|
+
创建凭据库。HTTP:`POST /vaults`。
|
|
1606
|
+
|
|
1607
|
+
```text
|
|
1608
|
+
client.vaults.create(params: VaultCreateParams, options?: RequestOptions): APIPromise<ManagedAgentsVault>
|
|
1609
|
+
```
|
|
1610
|
+
|
|
1611
|
+
[方法源码](../src/managed/resources/vault.ts#L17);返回:`APIPromise<ManagedAgentsVault>`([ManagedAgentsVault](../src/managed/types.ts#L10642))。
|
|
1612
|
+
|
|
1613
|
+
参数对象:[VaultCreateParams](../src/managed/types.ts#L11580)。
|
|
1614
|
+
|
|
1615
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1616
|
+
| --- | --- | --- | --- | --- |
|
|
1617
|
+
| `params.display_name` | 是 | `string` | body / `display_name` | Human-readable name for the vault. 1-255 characters. |
|
|
1618
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1619
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | Arbitrary key-value metadata to attach to the vault. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. |
|
|
1620
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1621
|
+
|
|
1622
|
+
### `vaults.retrieve`
|
|
1623
|
+
|
|
1624
|
+
获取凭据库。HTTP:`GET /vaults/{vault_id}`。
|
|
1625
|
+
|
|
1626
|
+
```text
|
|
1627
|
+
client.vaults.retrieve(vaultID: string, params: VaultRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsVault>
|
|
1628
|
+
```
|
|
1629
|
+
|
|
1630
|
+
[方法源码](../src/managed/resources/vault.ts#L25);返回:`APIPromise<ManagedAgentsVault>`([ManagedAgentsVault](../src/managed/types.ts#L10642))。
|
|
1631
|
+
|
|
1632
|
+
参数对象:[VaultRetrieveParams](../src/managed/types.ts#L11582)。
|
|
1633
|
+
|
|
1634
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1635
|
+
| --- | --- | --- | --- | --- |
|
|
1636
|
+
| `vaultID` | 是 | `string` | path / `vault_id` | 按签名顺序传入的路径参数。 |
|
|
1637
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1638
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1639
|
+
|
|
1640
|
+
### `vaults.list`
|
|
1641
|
+
|
|
1642
|
+
列出凭据库。HTTP:`GET /vaults`。
|
|
1643
|
+
|
|
1644
|
+
```text
|
|
1645
|
+
client.vaults.list(params: VaultListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsVault>
|
|
1646
|
+
```
|
|
1647
|
+
|
|
1648
|
+
[方法源码](../src/managed/resources/vault.ts#L33);返回:`PagePromise<ManagedAgentsVault>`([ManagedAgentsVault](../src/managed/types.ts#L10642))。
|
|
1649
|
+
|
|
1650
|
+
参数对象:[VaultListParams](../src/managed/types.ts#L10700)。
|
|
1651
|
+
|
|
1652
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1653
|
+
| --- | --- | --- | --- | --- |
|
|
1654
|
+
| `params.name` | 否 | `string` | query / `name` | 字段结构见类型链接。 |
|
|
1655
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
1656
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
1657
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | Whether to include archived vaults in the results. |
|
|
1658
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of vaults to return per page. Defaults to 20, maximum 100. |
|
|
1659
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination token from a previous `list_vaults` response. |
|
|
1660
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1661
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1662
|
+
|
|
1663
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1664
|
+
|
|
1665
|
+
### `vaults.delete`
|
|
1666
|
+
|
|
1667
|
+
删除凭据库。HTTP:`DELETE /vaults/{vault_id}`。
|
|
1668
|
+
|
|
1669
|
+
```text
|
|
1670
|
+
client.vaults.delete(vaultID: string, params: VaultDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeletedVault>
|
|
1671
|
+
```
|
|
1672
|
+
|
|
1673
|
+
[方法源码](../src/managed/resources/vault.ts#L41);返回:`APIPromise<ManagedAgentsDeletedVault>`([ManagedAgentsDeletedVault](../src/managed/types.ts#L10626))。
|
|
1674
|
+
|
|
1675
|
+
参数对象:[VaultDeleteParams](../src/managed/types.ts#L10723)。
|
|
1676
|
+
|
|
1677
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1678
|
+
| --- | --- | --- | --- | --- |
|
|
1679
|
+
| `vaultID` | 是 | `string` | path / `vault_id` | 按签名顺序传入的路径参数。 |
|
|
1680
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1681
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1682
|
+
|
|
1683
|
+
### `vaults.archive`
|
|
1684
|
+
|
|
1685
|
+
归档凭据库。HTTP:`POST /vaults/{vault_id}/archive`。
|
|
1686
|
+
|
|
1687
|
+
```text
|
|
1688
|
+
client.vaults.archive(vaultID: string, params: VaultArchiveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsVault>
|
|
1689
|
+
```
|
|
1690
|
+
|
|
1691
|
+
[方法源码](../src/managed/resources/vault.ts#L49);返回:`APIPromise<ManagedAgentsVault>`([ManagedAgentsVault](../src/managed/types.ts#L10642))。
|
|
1692
|
+
|
|
1693
|
+
参数对象:[VaultArchiveParams](../src/managed/types.ts#L10731)。
|
|
1694
|
+
|
|
1695
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1696
|
+
| --- | --- | --- | --- | --- |
|
|
1697
|
+
| `vaultID` | 是 | `string` | path / `vault_id` | 按签名顺序传入的路径参数。 |
|
|
1698
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1699
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1700
|
+
|
|
1701
|
+
<a id="vaults-credentials"></a>
|
|
1702
|
+
|
|
1703
|
+
## 凭据:`client.vaults.credentials`
|
|
1704
|
+
|
|
1705
|
+
### `vaults.credentials.create`
|
|
1706
|
+
|
|
1707
|
+
创建凭据。HTTP:`POST /vaults/{vault_id}/credentials`。
|
|
1708
|
+
|
|
1709
|
+
```text
|
|
1710
|
+
client.vaults.credentials.create(vaultID: string, params: VaultCredentialCreateParams, options?: RequestOptions): APIPromise<ManagedAgentsCredential>
|
|
1711
|
+
```
|
|
1712
|
+
|
|
1713
|
+
[方法源码](../src/managed/resources/vault-credential.ts#L15);返回:`APIPromise<ManagedAgentsCredential>`([ManagedAgentsCredential](../src/managed/types.ts#L10743))。
|
|
1714
|
+
|
|
1715
|
+
参数对象:[VaultCredentialCreateParams](../src/managed/types.ts#L11584)。
|
|
1716
|
+
|
|
1717
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1718
|
+
| --- | --- | --- | --- | --- |
|
|
1719
|
+
| `vaultID` | 是 | `string` | path / `vault_id` | 按签名顺序传入的路径参数。 |
|
|
1720
|
+
| `params.auth` | 是 | `VaultCredentialNewParamsAuthUnion`([VaultCredentialNewParamsAuthUnion](../src/managed/types.ts#L11449)) | body / `auth` | Authentication details for creating a credential. |
|
|
1721
|
+
| `params.display_name` | 否 | `string \| null` | body / `display_name` | Human-readable name for the credential. Up to 255 characters. |
|
|
1722
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1723
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | Arbitrary key-value metadata to attach to the credential. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. |
|
|
1724
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1725
|
+
|
|
1726
|
+
### `vaults.credentials.retrieve`
|
|
1727
|
+
|
|
1728
|
+
获取凭据。HTTP:`GET /vaults/{vault_id}/credentials/{credential_id}`。
|
|
1729
|
+
|
|
1730
|
+
```text
|
|
1731
|
+
client.vaults.credentials.retrieve(credentialID: string, params: VaultCredentialRetrieveParams, options?: RequestOptions): APIPromise<ManagedAgentsCredential>
|
|
1732
|
+
```
|
|
1733
|
+
|
|
1734
|
+
[方法源码](../src/managed/resources/vault-credential.ts#L23);返回:`APIPromise<ManagedAgentsCredential>`([ManagedAgentsCredential](../src/managed/types.ts#L10743))。
|
|
1735
|
+
|
|
1736
|
+
参数对象:[VaultCredentialRetrieveParams](../src/managed/types.ts#L11586)。
|
|
1737
|
+
|
|
1738
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1739
|
+
| --- | --- | --- | --- | --- |
|
|
1740
|
+
| `credentialID` | 是 | `string` | path / `credential_id` | 按签名顺序传入的路径参数。 |
|
|
1741
|
+
| `params.vault_id` | 是 | `string` | path / `vault_id` | 字段结构见类型链接。 |
|
|
1742
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1743
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1744
|
+
|
|
1745
|
+
### `vaults.credentials.update`
|
|
1746
|
+
|
|
1747
|
+
更新凭据。HTTP:`POST /vaults/{vault_id}/credentials/{credential_id}`。
|
|
1748
|
+
|
|
1749
|
+
```text
|
|
1750
|
+
client.vaults.credentials.update(credentialID: string, params: VaultCredentialUpdateParams, options?: RequestOptions): APIPromise<ManagedAgentsCredential>
|
|
1751
|
+
```
|
|
1752
|
+
|
|
1753
|
+
[方法源码](../src/managed/resources/vault-credential.ts#L31);返回:`APIPromise<ManagedAgentsCredential>`([ManagedAgentsCredential](../src/managed/types.ts#L10743))。
|
|
1754
|
+
|
|
1755
|
+
参数对象:[VaultCredentialUpdateParams](../src/managed/types.ts#L11460)。
|
|
1756
|
+
|
|
1757
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1758
|
+
| --- | --- | --- | --- | --- |
|
|
1759
|
+
| `credentialID` | 是 | `string` | path / `credential_id` | 按签名顺序传入的路径参数。 |
|
|
1760
|
+
| `params.vault_id` | 是 | `string` | path / `vault_id` | 字段结构见类型链接。 |
|
|
1761
|
+
| `params.display_name` | 否 | `string \| null` | body / `display_name` | Updated human-readable name for the credential. 1-255 characters. |
|
|
1762
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1763
|
+
| `params.metadata` | 否 | `Record<string, unknown> \| null` | body / `metadata` | Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved. |
|
|
1764
|
+
| `params.auth` | 否 | `VaultCredentialUpdateParamsAuthUnion \| null`([VaultCredentialUpdateParamsAuthUnion](../src/managed/types.ts#L11482)) | body / `auth` | Updated authentication details for a credential. |
|
|
1765
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1766
|
+
|
|
1767
|
+
### `vaults.credentials.list`
|
|
1768
|
+
|
|
1769
|
+
列出凭据。HTTP:`GET /vaults/{vault_id}/credentials`。
|
|
1770
|
+
|
|
1771
|
+
```text
|
|
1772
|
+
client.vaults.credentials.list(vaultID: string, params: VaultCredentialListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsCredential>
|
|
1773
|
+
```
|
|
1774
|
+
|
|
1775
|
+
[方法源码](../src/managed/resources/vault-credential.ts#L39);返回:`PagePromise<ManagedAgentsCredential>`([ManagedAgentsCredential](../src/managed/types.ts#L10743))。
|
|
1776
|
+
|
|
1777
|
+
参数对象:[VaultCredentialListParams](../src/managed/types.ts#L11484)。
|
|
1778
|
+
|
|
1779
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1780
|
+
| --- | --- | --- | --- | --- |
|
|
1781
|
+
| `vaultID` | 是 | `string` | path / `vault_id` | 按签名顺序传入的路径参数。 |
|
|
1782
|
+
| `params.name` | 否 | `string` | query / `name` | 字段结构见类型链接。 |
|
|
1783
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
1784
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
1785
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | Whether to include archived credentials in the results. |
|
|
1786
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of credentials to return per page. Defaults to 20, maximum 100. |
|
|
1787
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination token from a previous `list_credentials` response. |
|
|
1788
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1789
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1790
|
+
|
|
1791
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1792
|
+
|
|
1793
|
+
### `vaults.credentials.delete`
|
|
1794
|
+
|
|
1795
|
+
删除凭据。HTTP:`DELETE /vaults/{vault_id}/credentials/{credential_id}`。
|
|
1796
|
+
|
|
1797
|
+
```text
|
|
1798
|
+
client.vaults.credentials.delete(credentialID: string, params: VaultCredentialDeleteParams, options?: RequestOptions): APIPromise<ManagedAgentsDeletedCredential>
|
|
1799
|
+
```
|
|
1800
|
+
|
|
1801
|
+
[方法源码](../src/managed/resources/vault-credential.ts#L47);返回:`APIPromise<ManagedAgentsDeletedCredential>`([ManagedAgentsDeletedCredential](../src/managed/types.ts#L10838))。
|
|
1802
|
+
|
|
1803
|
+
参数对象:[VaultCredentialDeleteParams](../src/managed/types.ts#L11507)。
|
|
1804
|
+
|
|
1805
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1806
|
+
| --- | --- | --- | --- | --- |
|
|
1807
|
+
| `credentialID` | 是 | `string` | path / `credential_id` | 按签名顺序传入的路径参数。 |
|
|
1808
|
+
| `params.vault_id` | 是 | `string` | path / `vault_id` | 字段结构见类型链接。 |
|
|
1809
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1810
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1811
|
+
|
|
1812
|
+
### `vaults.credentials.archive`
|
|
1813
|
+
|
|
1814
|
+
归档凭据。HTTP:`POST /vaults/{vault_id}/credentials/{credential_id}/archive`。
|
|
1815
|
+
|
|
1816
|
+
```text
|
|
1817
|
+
client.vaults.credentials.archive(credentialID: string, params: VaultCredentialArchiveParams, options?: RequestOptions): APIPromise<ManagedAgentsCredential>
|
|
1818
|
+
```
|
|
1819
|
+
|
|
1820
|
+
[方法源码](../src/managed/resources/vault-credential.ts#L55);返回:`APIPromise<ManagedAgentsCredential>`([ManagedAgentsCredential](../src/managed/types.ts#L10743))。
|
|
1821
|
+
|
|
1822
|
+
参数对象:[VaultCredentialArchiveParams](../src/managed/types.ts#L11516)。
|
|
1823
|
+
|
|
1824
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1825
|
+
| --- | --- | --- | --- | --- |
|
|
1826
|
+
| `credentialID` | 是 | `string` | path / `credential_id` | 按签名顺序传入的路径参数。 |
|
|
1827
|
+
| `params.vault_id` | 是 | `string` | path / `vault_id` | 字段结构见类型链接。 |
|
|
1828
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1829
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1830
|
+
|
|
1831
|
+
### `vaults.credentials.mcpOAuthValidate`
|
|
1832
|
+
|
|
1833
|
+
校验 MCP OAuth 凭据。HTTP:`POST /vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate`。
|
|
1834
|
+
|
|
1835
|
+
```text
|
|
1836
|
+
client.vaults.credentials.mcpOAuthValidate(credentialID: string, params: VaultCredentialMCPOAuthValidateParams, options?: RequestOptions): APIPromise<ManagedAgentsCredentialValidation>
|
|
1837
|
+
```
|
|
1838
|
+
|
|
1839
|
+
[方法源码](../src/managed/resources/vault-credential.ts#L63);返回:`APIPromise<ManagedAgentsCredentialValidation>`([ManagedAgentsCredentialValidation](../src/managed/types.ts#L10791))。
|
|
1840
|
+
|
|
1841
|
+
参数对象:[VaultCredentialMCPOAuthValidateParams](../src/managed/types.ts#L11525)。
|
|
1842
|
+
|
|
1843
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1844
|
+
| --- | --- | --- | --- | --- |
|
|
1845
|
+
| `credentialID` | 是 | `string` | path / `credential_id` | 按签名顺序传入的路径参数。 |
|
|
1846
|
+
| `params.vault_id` | 是 | `string` | path / `vault_id` | 字段结构见类型链接。 |
|
|
1847
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1848
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1849
|
+
|
|
1850
|
+
<a id="files"></a>
|
|
1851
|
+
|
|
1852
|
+
## 文件:`client.files`
|
|
1853
|
+
|
|
1854
|
+
### `files.list`
|
|
1855
|
+
|
|
1856
|
+
列出文件。HTTP:`GET /files`。
|
|
1857
|
+
|
|
1858
|
+
```text
|
|
1859
|
+
client.files.list(params: FileListParams | null | undefined = {}, options?: RequestOptions): PagePromise<FileMetadata>
|
|
1860
|
+
```
|
|
1861
|
+
|
|
1862
|
+
[方法源码](../src/managed/resources/file.ts#L15);返回:`PagePromise<FileMetadata>`([FileMetadata](../src/managed/types.ts#L3889))。
|
|
1863
|
+
|
|
1864
|
+
参数对象:[FileListParams](../src/managed/types.ts#L3948)。
|
|
1865
|
+
|
|
1866
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1867
|
+
| --- | --- | --- | --- | --- |
|
|
1868
|
+
| `params.name` | 否 | `string` | query / `name` | 字段结构见类型链接。 |
|
|
1869
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | 字段结构见类型链接。 |
|
|
1870
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | 字段结构见类型链接。 |
|
|
1871
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque page cursor returned in a prior list response's `next_page`. Prefixed `page_`. |
|
|
1872
|
+
| `params.limit` | 否 | `number` | query / `limit` | Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`. |
|
|
1873
|
+
| `params.scope_id` | 否 | `string` | query / `scope_id` | Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID). |
|
|
1874
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1875
|
+
| `params.ids` | 否 | `Array<string>` | query / `ids` | Restrict the result set to Files whose `id` is in this list. At most 100 entries (after de-duplication). Mutually exclusive with `page` and `limit`. When supplied, the response is always a single page (`next_page` is null). IDs that do not resolve to a visible File — including deleted Files — are silently omitted. |
|
|
1876
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1877
|
+
|
|
1878
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
1879
|
+
|
|
1880
|
+
### `files.delete`
|
|
1881
|
+
|
|
1882
|
+
删除文件。HTTP:`DELETE /files/{file_id}`。
|
|
1883
|
+
|
|
1884
|
+
```text
|
|
1885
|
+
client.files.delete(fileID: string, params: FileDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise<DeletedFile>
|
|
1886
|
+
```
|
|
1887
|
+
|
|
1888
|
+
[方法源码](../src/managed/resources/file.ts#L23);返回:`APIPromise<DeletedFile>`([DeletedFile](../src/managed/types.ts#L3867))。
|
|
1889
|
+
|
|
1890
|
+
参数对象:[FileDeleteParams](../src/managed/types.ts#L3983)。
|
|
1891
|
+
|
|
1892
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1893
|
+
| --- | --- | --- | --- | --- |
|
|
1894
|
+
| `fileID` | 是 | `string` | path / `file_id` | 按签名顺序传入的路径参数。 |
|
|
1895
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1896
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1897
|
+
|
|
1898
|
+
### `files.download`
|
|
1899
|
+
|
|
1900
|
+
下载文件。HTTP:`GET /files/{file_id}/content`。
|
|
1901
|
+
|
|
1902
|
+
```text
|
|
1903
|
+
client.files.download(fileID: string, params: FileDownloadParams | null | undefined = {}, options?: RequestOptions): APIPromise<Response>
|
|
1904
|
+
```
|
|
1905
|
+
|
|
1906
|
+
[方法源码](../src/managed/resources/file.ts#L31);返回:`APIPromise<Response>`。
|
|
1907
|
+
|
|
1908
|
+
参数对象:[FileDownloadParams](../src/managed/types.ts#L3991)。
|
|
1909
|
+
|
|
1910
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1911
|
+
| --- | --- | --- | --- | --- |
|
|
1912
|
+
| `fileID` | 是 | `string` | path / `file_id` | 按签名顺序传入的路径参数。 |
|
|
1913
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1914
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1915
|
+
|
|
1916
|
+
返回下载请求的原生 `Response`,调用 `arrayBuffer()` / `text()` / `body` 读取内容;不是 JSON 对象。
|
|
1917
|
+
|
|
1918
|
+
### `files.getMetadata`
|
|
1919
|
+
|
|
1920
|
+
获取文件元数据。HTTP:`GET /files/{file_id}`。
|
|
1921
|
+
|
|
1922
|
+
```text
|
|
1923
|
+
client.files.getMetadata(fileID: string, params: FileGetMetadataParams | null | undefined = {}, options?: RequestOptions): APIPromise<FileMetadata>
|
|
1924
|
+
```
|
|
1925
|
+
|
|
1926
|
+
[方法源码](../src/managed/resources/file.ts#L40);返回:`APIPromise<FileMetadata>`([FileMetadata](../src/managed/types.ts#L3889))。
|
|
1927
|
+
|
|
1928
|
+
参数对象:[FileGetMetadataParams](../src/managed/types.ts#L3999)。
|
|
1929
|
+
|
|
1930
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1931
|
+
| --- | --- | --- | --- | --- |
|
|
1932
|
+
| `fileID` | 是 | `string` | path / `file_id` | 按签名顺序传入的路径参数。 |
|
|
1933
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1934
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1935
|
+
|
|
1936
|
+
### `files.upload`
|
|
1937
|
+
|
|
1938
|
+
上传文件。HTTP:`POST /files`。
|
|
1939
|
+
|
|
1940
|
+
```text
|
|
1941
|
+
client.files.upload(params: FileUploadParams, options?: RequestOptions): APIPromise<FileMetadata>
|
|
1942
|
+
```
|
|
1943
|
+
|
|
1944
|
+
[方法源码](../src/managed/resources/file.ts#L48);返回:`APIPromise<FileMetadata>`([FileMetadata](../src/managed/types.ts#L3889))。
|
|
1945
|
+
|
|
1946
|
+
参数对象:[FileUploadParams](../src/managed/types.ts#L4007)。
|
|
1947
|
+
|
|
1948
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1949
|
+
| --- | --- | --- | --- | --- |
|
|
1950
|
+
| `params.name` | 否 | `string \| null` | body / `name` | 字段结构见类型链接。 |
|
|
1951
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | 字段结构见类型链接。 |
|
|
1952
|
+
| `params.file` | 是 | `Uploadable` | body / `file` | The file to upload. Only the final path component of the part's `filename` is kept; an absent or empty `filename` is replaced with `unnamed` plus the extension for the file's stored `mime_type`, when known. |
|
|
1953
|
+
| `params.expires_in_seconds` | 否 | `number \| null` | body / `expires_in_seconds` | Seconds from upload until the file expires and its bytes become permanently unavailable. Must be between 3600 (one hour) and 7776000 (ninety days). |
|
|
1954
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1955
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1956
|
+
|
|
1957
|
+
请求使用 `multipart/form-data`;由 SDK 生成 boundary,不要手工设置 Content-Type。
|
|
1958
|
+
|
|
1959
|
+
<a id="memoryStores"></a>
|
|
1960
|
+
|
|
1961
|
+
## 记忆库:`client.memoryStores`
|
|
1962
|
+
|
|
1963
|
+
### `memoryStores.create`
|
|
1964
|
+
|
|
1965
|
+
创建记忆库。HTTP:`POST /memory_stores`。
|
|
1966
|
+
|
|
1967
|
+
```text
|
|
1968
|
+
client.memoryStores.create(params: MemoryStoreCreateParams, options?: RequestOptions): APIPromise<ManagedAgentsMemoryStore>
|
|
1969
|
+
```
|
|
1970
|
+
|
|
1971
|
+
[方法源码](../src/managed/resources/memory-store.ts#L19);返回:`APIPromise<ManagedAgentsMemoryStore>`([ManagedAgentsMemoryStore](../src/managed/types.ts#L4050))。
|
|
1972
|
+
|
|
1973
|
+
参数对象:[MemoryStoreCreateParams](../src/managed/types.ts#L11554)。
|
|
1974
|
+
|
|
1975
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1976
|
+
| --- | --- | --- | --- | --- |
|
|
1977
|
+
| `params.name` | 是 | `string` | body / `name` | Human-readable name for the store. Required; 1–255 characters; no control characters. The mount-path slug under `/mnt/memory/` is derived from this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need not be unique within a workspace. |
|
|
1978
|
+
| `params.description` | 否 | `string \| null` | body / `description` | Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. |
|
|
1979
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1980
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Not visible to the agent. |
|
|
1981
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
1982
|
+
|
|
1983
|
+
### `memoryStores.retrieve`
|
|
1984
|
+
|
|
1985
|
+
获取记忆库。HTTP:`GET /memory_stores/{memory_store_id}`。
|
|
1986
|
+
|
|
1987
|
+
```text
|
|
1988
|
+
client.memoryStores.retrieve(memoryStoreID: string, params: MemoryStoreRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsMemoryStore>
|
|
1989
|
+
```
|
|
1990
|
+
|
|
1991
|
+
[方法源码](../src/managed/resources/memory-store.ts#L27);返回:`APIPromise<ManagedAgentsMemoryStore>`([ManagedAgentsMemoryStore](../src/managed/types.ts#L4050))。
|
|
1992
|
+
|
|
1993
|
+
参数对象:[MemoryStoreRetrieveParams](../src/managed/types.ts#L11556)。
|
|
1994
|
+
|
|
1995
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
1996
|
+
| --- | --- | --- | --- | --- |
|
|
1997
|
+
| `memoryStoreID` | 是 | `string` | path / `memory_store_id` | 按签名顺序传入的路径参数。 |
|
|
1998
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
1999
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2000
|
+
|
|
2001
|
+
### `memoryStores.update`
|
|
2002
|
+
|
|
2003
|
+
更新记忆库。HTTP:`POST /memory_stores/{memory_store_id}`。
|
|
2004
|
+
|
|
2005
|
+
```text
|
|
2006
|
+
client.memoryStores.update(memoryStoreID: string, params: MemoryStoreUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsMemoryStore>
|
|
2007
|
+
```
|
|
2008
|
+
|
|
2009
|
+
[方法源码](../src/managed/resources/memory-store.ts#L35);返回:`APIPromise<ManagedAgentsMemoryStore>`([ManagedAgentsMemoryStore](../src/managed/types.ts#L4050))。
|
|
2010
|
+
|
|
2011
|
+
参数对象:[MemoryStoreUpdateParams](../src/managed/types.ts#L4129)。
|
|
2012
|
+
|
|
2013
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2014
|
+
| --- | --- | --- | --- | --- |
|
|
2015
|
+
| `memoryStoreID` | 是 | `string` | path / `memory_store_id` | 按签名顺序传入的路径参数。 |
|
|
2016
|
+
| `params.description` | 否 | `string \| null` | body / `description` | New description for the store, up to 1024 characters. Pass an empty string to clear it. |
|
|
2017
|
+
| `params.name` | 否 | `string \| null` | body / `name` | New human-readable name for the store. 1–255 characters; no control characters. Renaming changes the slug used for the store's `mount_path` in sessions created after the update. |
|
|
2018
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2019
|
+
| `params.metadata` | 否 | `Record<string, unknown> \| null` | body / `metadata` | Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars. |
|
|
2020
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2021
|
+
|
|
2022
|
+
### `memoryStores.list`
|
|
2023
|
+
|
|
2024
|
+
列出记忆库。HTTP:`GET /memory_stores`。
|
|
2025
|
+
|
|
2026
|
+
```text
|
|
2027
|
+
client.memoryStores.list(params: MemoryStoreListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsMemoryStore>
|
|
2028
|
+
```
|
|
2029
|
+
|
|
2030
|
+
[方法源码](../src/managed/resources/memory-store.ts#L43);返回:`PagePromise<ManagedAgentsMemoryStore>`([ManagedAgentsMemoryStore](../src/managed/types.ts#L4050))。
|
|
2031
|
+
|
|
2032
|
+
参数对象:[MemoryStoreListParams](../src/managed/types.ts#L4154)。
|
|
2033
|
+
|
|
2034
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2035
|
+
| --- | --- | --- | --- | --- |
|
|
2036
|
+
| `params.name` | 否 | `string` | query / `name` | 字段结构见类型链接。 |
|
|
2037
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | Return only stores whose `created_at` is at or after this time (inclusive). Sent on the wire as `created_at`gte``. |
|
|
2038
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | Return only stores whose `created_at` is at or before this time (inclusive). Sent on the wire as `created_at`lte``. |
|
|
2039
|
+
| `params.include_archived` | 否 | `boolean` | query / `include_archived` | When `true`, archived stores are included in the results. Defaults to `false` (archived stores are excluded). |
|
|
2040
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of stores to return per page. Must be between 1 and 100. Defaults to 20 when omitted. |
|
|
2041
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a previous response to fetch the next page; omit for the first page. |
|
|
2042
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2043
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2044
|
+
|
|
2045
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
2046
|
+
|
|
2047
|
+
### `memoryStores.delete`
|
|
2048
|
+
|
|
2049
|
+
删除记忆库。HTTP:`DELETE /memory_stores/{memory_store_id}`。
|
|
2050
|
+
|
|
2051
|
+
```text
|
|
2052
|
+
client.memoryStores.delete(memoryStoreID: string, params: MemoryStoreDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsDeletedMemoryStore>
|
|
2053
|
+
```
|
|
2054
|
+
|
|
2055
|
+
[方法源码](../src/managed/resources/memory-store.ts#L51);返回:`APIPromise<ManagedAgentsDeletedMemoryStore>`([ManagedAgentsDeletedMemoryStore](../src/managed/types.ts#L4031))。
|
|
2056
|
+
|
|
2057
|
+
参数对象:[MemoryStoreDeleteParams](../src/managed/types.ts#L4188)。
|
|
2058
|
+
|
|
2059
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2060
|
+
| --- | --- | --- | --- | --- |
|
|
2061
|
+
| `memoryStoreID` | 是 | `string` | path / `memory_store_id` | 按签名顺序传入的路径参数。 |
|
|
2062
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2063
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2064
|
+
|
|
2065
|
+
### `memoryStores.archive`
|
|
2066
|
+
|
|
2067
|
+
归档记忆库。HTTP:`POST /memory_stores/{memory_store_id}/archive`。
|
|
2068
|
+
|
|
2069
|
+
```text
|
|
2070
|
+
client.memoryStores.archive(memoryStoreID: string, params: MemoryStoreArchiveParams | null | undefined = {}, options?: RequestOptions): APIPromise<ManagedAgentsMemoryStore>
|
|
2071
|
+
```
|
|
2072
|
+
|
|
2073
|
+
[方法源码](../src/managed/resources/memory-store.ts#L59);返回:`APIPromise<ManagedAgentsMemoryStore>`([ManagedAgentsMemoryStore](../src/managed/types.ts#L4050))。
|
|
2074
|
+
|
|
2075
|
+
参数对象:[MemoryStoreArchiveParams](../src/managed/types.ts#L4196)。
|
|
2076
|
+
|
|
2077
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2078
|
+
| --- | --- | --- | --- | --- |
|
|
2079
|
+
| `memoryStoreID` | 是 | `string` | path / `memory_store_id` | 按签名顺序传入的路径参数。 |
|
|
2080
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2081
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2082
|
+
|
|
2083
|
+
<a id="memoryStores-memories"></a>
|
|
2084
|
+
|
|
2085
|
+
## 记忆条目:`client.memoryStores.memories`
|
|
2086
|
+
|
|
2087
|
+
### `memoryStores.memories.create`
|
|
2088
|
+
|
|
2089
|
+
创建记忆条目。HTTP:`POST /memory_stores/{memory_store_id}/memories`。
|
|
2090
|
+
|
|
2091
|
+
```text
|
|
2092
|
+
client.memoryStores.memories.create(memoryStoreID: string, params: MemoryStoreMemoryCreateParams, options?: RequestOptions): APIPromise<ManagedAgentsMemory>
|
|
2093
|
+
```
|
|
2094
|
+
|
|
2095
|
+
[方法源码](../src/managed/resources/memory-store-memory.ts#L15);返回:`APIPromise<ManagedAgentsMemory>`([ManagedAgentsMemory](../src/managed/types.ts#L4233))。
|
|
2096
|
+
|
|
2097
|
+
参数对象:[MemoryStoreMemoryCreateParams](../src/managed/types.ts#L11558)。
|
|
2098
|
+
|
|
2099
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2100
|
+
| --- | --- | --- | --- | --- |
|
|
2101
|
+
| `memoryStoreID` | 是 | `string` | path / `memory_store_id` | 按签名顺序传入的路径参数。 |
|
|
2102
|
+
| `params.metadata` | 否 | `Record<string, string> \| null` | body / `metadata` | 字段结构见类型链接。 |
|
|
2103
|
+
| `params.content` | 是 | `string` | body / `content` | UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required; pass `""` explicitly to create an empty memory. |
|
|
2104
|
+
| `params.path` | 是 | `string` | body / `path` | Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive. |
|
|
2105
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2106
|
+
| `params.view` | 否 | `ManagedAgentsMemoryView`([ManagedAgentsMemoryView](../src/managed/types.ts#L4323)) | query / `view` | Query parameter for view Any of "basic", "full". |
|
|
2107
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2108
|
+
|
|
2109
|
+
### `memoryStores.memories.retrieve`
|
|
2110
|
+
|
|
2111
|
+
获取记忆条目。HTTP:`GET /memory_stores/{memory_store_id}/memories/{memory_id}`。
|
|
2112
|
+
|
|
2113
|
+
```text
|
|
2114
|
+
client.memoryStores.memories.retrieve(memoryID: string, params: MemoryStoreMemoryRetrieveParams, options?: RequestOptions): APIPromise<ManagedAgentsMemory>
|
|
2115
|
+
```
|
|
2116
|
+
|
|
2117
|
+
[方法源码](../src/managed/resources/memory-store-memory.ts#L23);返回:`APIPromise<ManagedAgentsMemory>`([ManagedAgentsMemory](../src/managed/types.ts#L4233))。
|
|
2118
|
+
|
|
2119
|
+
参数对象:[MemoryStoreMemoryRetrieveParams](../src/managed/types.ts#L11560)。
|
|
2120
|
+
|
|
2121
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2122
|
+
| --- | --- | --- | --- | --- |
|
|
2123
|
+
| `memoryID` | 是 | `string` | path / `memory_id` | 按签名顺序传入的路径参数。 |
|
|
2124
|
+
| `params.memory_store_id` | 是 | `string` | path / `memory_store_id` | 字段结构见类型链接。 |
|
|
2125
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2126
|
+
| `params.view` | 否 | `ManagedAgentsMemoryView`([ManagedAgentsMemoryView](../src/managed/types.ts#L4323)) | query / `view` | Query parameter for view Any of "basic", "full". |
|
|
2127
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2128
|
+
|
|
2129
|
+
### `memoryStores.memories.update`
|
|
2130
|
+
|
|
2131
|
+
更新记忆条目。HTTP:`POST /memory_stores/{memory_store_id}/memories/{memory_id}`。
|
|
2132
|
+
|
|
2133
|
+
```text
|
|
2134
|
+
client.memoryStores.memories.update(memoryID: string, params: MemoryStoreMemoryUpdateParams, options?: RequestOptions): APIPromise<ManagedAgentsMemory>
|
|
2135
|
+
```
|
|
2136
|
+
|
|
2137
|
+
[方法源码](../src/managed/resources/memory-store-memory.ts#L31);返回:`APIPromise<ManagedAgentsMemory>`([ManagedAgentsMemory](../src/managed/types.ts#L4233))。
|
|
2138
|
+
|
|
2139
|
+
参数对象:[MemoryStoreMemoryUpdateParams](../src/managed/types.ts#L4392)。
|
|
2140
|
+
|
|
2141
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2142
|
+
| --- | --- | --- | --- | --- |
|
|
2143
|
+
| `memoryID` | 是 | `string` | path / `memory_id` | 按签名顺序传入的路径参数。 |
|
|
2144
|
+
| `params.content_sha256` | 否 | `string \| null` | body / `content_sha256` | 字段结构见类型链接。 |
|
|
2145
|
+
| `params.metadata` | 否 | `Record<string, unknown> \| null` | body / `metadata` | 字段结构见类型链接。 |
|
|
2146
|
+
| `params.memory_store_id` | 是 | `string` | path / `memory_store_id` | 字段结构见类型链接。 |
|
|
2147
|
+
| `params.content` | 否 | `string \| null` | body / `content` | New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to leave the content unchanged (e.g., for a rename-only update). |
|
|
2148
|
+
| `params.path` | 否 | `string \| null` | body / `path` | New path for the memory (a rename). Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged. |
|
|
2149
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2150
|
+
| `params.view` | 否 | `ManagedAgentsMemoryView`([ManagedAgentsMemoryView](../src/managed/types.ts#L4323)) | query / `view` | Query parameter for view Any of "basic", "full". |
|
|
2151
|
+
| `params.precondition` | 否 | `ManagedAgentsPreconditionParam \| null`([ManagedAgentsPreconditionParam](../src/managed/types.ts#L4333)) | body / `precondition` | Optimistic-concurrency precondition: the update applies only if the memory's stored `content_sha256` equals the supplied value. On mismatch, the request returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested `content` and `path`, the server returns 200 instead of 409. |
|
|
2152
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2153
|
+
|
|
2154
|
+
### `memoryStores.memories.list`
|
|
2155
|
+
|
|
2156
|
+
列出记忆条目。HTTP:`GET /memory_stores/{memory_store_id}/memories`。
|
|
2157
|
+
|
|
2158
|
+
```text
|
|
2159
|
+
client.memoryStores.memories.list(memoryStoreID: string, params: MemoryStoreMemoryListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsMemoryListItemUnion>
|
|
2160
|
+
```
|
|
2161
|
+
|
|
2162
|
+
[方法源码](../src/managed/resources/memory-store-memory.ts#L39);返回:`PagePromise<ManagedAgentsMemoryListItemUnion>`([ManagedAgentsMemoryListItemUnion](../src/managed/types.ts#L4291))。
|
|
2163
|
+
|
|
2164
|
+
参数对象:[MemoryStoreMemoryListParams](../src/managed/types.ts#L4432)。
|
|
2165
|
+
|
|
2166
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2167
|
+
| --- | --- | --- | --- | --- |
|
|
2168
|
+
| `memoryStoreID` | 是 | `string` | path / `memory_store_id` | 按签名顺序传入的路径参数。 |
|
|
2169
|
+
| `params.depth` | 否 | `number` | query / `depth` | `0` (or omitted) returns all descendants below `path_prefix` (recursive). `1` returns immediate children only; deeper entries roll up as `memory_prefix` items. `depth=1` behaves like `ls`; omitting `depth` behaves like `find`. |
|
|
2170
|
+
| `params.limit` | 否 | `number` | query / `limit` | Maximum number of items to return per page. Must be between 1 and 100. Defaults to 20 when omitted. Capped at 20 when `view=full`. Both `memory` and `memory_prefix` items count toward the limit. |
|
|
2171
|
+
| `params.page` | 否 | `string` | query / `page` | Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a previous response to fetch the next page; omit for the first page. |
|
|
2172
|
+
| `params.path_prefix` | 否 | `string` | query / `path_prefix` | Optional path prefix filter. Must end with `/` (segment-aligned), e.g., `/notes/`. This value appears in request URLs. Do not include secrets or personally identifiable information. |
|
|
2173
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2174
|
+
| `params.view` | 否 | `ManagedAgentsMemoryView`([ManagedAgentsMemoryView](../src/managed/types.ts#L4323)) | query / `view` | Which projection of each `memory` to return. Defaults to `basic` (content omitted). `full` populates `content` on each item and caps `limit` at 20; use this as the bulk-read path for export and sync. Any of "basic", "full". |
|
|
2175
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2176
|
+
|
|
2177
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
2178
|
+
|
|
2179
|
+
### `memoryStores.memories.delete`
|
|
2180
|
+
|
|
2181
|
+
删除记忆条目。HTTP:`DELETE /memory_stores/{memory_store_id}/memories/{memory_id}`。
|
|
2182
|
+
|
|
2183
|
+
```text
|
|
2184
|
+
client.memoryStores.memories.delete(memoryID: string, params: MemoryStoreMemoryDeleteParams, options?: RequestOptions): APIPromise<ManagedAgentsDeletedMemory>
|
|
2185
|
+
```
|
|
2186
|
+
|
|
2187
|
+
[方法源码](../src/managed/resources/memory-store-memory.ts#L47);返回:`APIPromise<ManagedAgentsDeletedMemory>`([ManagedAgentsDeletedMemory](../src/managed/types.ts#L4212))。
|
|
2188
|
+
|
|
2189
|
+
参数对象:[MemoryStoreMemoryDeleteParams](../src/managed/types.ts#L4471)。
|
|
2190
|
+
|
|
2191
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2192
|
+
| --- | --- | --- | --- | --- |
|
|
2193
|
+
| `memoryID` | 是 | `string` | path / `memory_id` | 按签名顺序传入的路径参数。 |
|
|
2194
|
+
| `params.memory_store_id` | 是 | `string` | path / `memory_store_id` | 字段结构见类型链接。 |
|
|
2195
|
+
| `params.expected_content_sha256` | 否 | `string` | query / `expected_content_sha256` | Query parameter for expected_content_sha256 |
|
|
2196
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2197
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2198
|
+
|
|
2199
|
+
<a id="memoryStores-memoryVersions"></a>
|
|
2200
|
+
|
|
2201
|
+
## 记忆版本:`client.memoryStores.memoryVersions`
|
|
2202
|
+
|
|
2203
|
+
### `memoryStores.memoryVersions.retrieve`
|
|
2204
|
+
|
|
2205
|
+
获取记忆版本。HTTP:`GET /memory_stores/{memory_store_id}/memory_versions/{memory_version_id}`。
|
|
2206
|
+
|
|
2207
|
+
```text
|
|
2208
|
+
client.memoryStores.memoryVersions.retrieve(memoryVersionID: string, params: MemoryStoreMemoryVersionRetrieveParams, options?: RequestOptions): APIPromise<ManagedAgentsMemoryVersion>
|
|
2209
|
+
```
|
|
2210
|
+
|
|
2211
|
+
[方法源码](../src/managed/resources/memory-store-memory-version.ts#L15);返回:`APIPromise<ManagedAgentsMemoryVersion>`([ManagedAgentsMemoryVersion](../src/managed/types.ts#L4514))。
|
|
2212
|
+
|
|
2213
|
+
参数对象:[MemoryStoreMemoryVersionRetrieveParams](../src/managed/types.ts#L11562)。
|
|
2214
|
+
|
|
2215
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2216
|
+
| --- | --- | --- | --- | --- |
|
|
2217
|
+
| `memoryVersionID` | 是 | `string` | path / `memory_version_id` | 按签名顺序传入的路径参数。 |
|
|
2218
|
+
| `params.memory_store_id` | 是 | `string` | path / `memory_store_id` | 字段结构见类型链接。 |
|
|
2219
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2220
|
+
| `params.view` | 否 | `ManagedAgentsMemoryView`([ManagedAgentsMemoryView](../src/managed/types.ts#L4323)) | query / `view` | Query parameter for view Any of "basic", "full". |
|
|
2221
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2222
|
+
|
|
2223
|
+
### `memoryStores.memoryVersions.list`
|
|
2224
|
+
|
|
2225
|
+
列出记忆版本。HTTP:`GET /memory_stores/{memory_store_id}/memory_versions`。
|
|
2226
|
+
|
|
2227
|
+
```text
|
|
2228
|
+
client.memoryStores.memoryVersions.list(memoryStoreID: string, params: MemoryStoreMemoryVersionListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ManagedAgentsMemoryVersion>
|
|
2229
|
+
```
|
|
2230
|
+
|
|
2231
|
+
[方法源码](../src/managed/resources/memory-store-memory-version.ts#L23);返回:`PagePromise<ManagedAgentsMemoryVersion>`([ManagedAgentsMemoryVersion](../src/managed/types.ts#L4514))。
|
|
2232
|
+
|
|
2233
|
+
参数对象:[MemoryStoreMemoryVersionListParams](../src/managed/types.ts#L4659)。
|
|
2234
|
+
|
|
2235
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2236
|
+
| --- | --- | --- | --- | --- |
|
|
2237
|
+
| `memoryStoreID` | 是 | `string` | path / `memory_store_id` | 按签名顺序传入的路径参数。 |
|
|
2238
|
+
| `params.api_key_id` | 否 | `string` | query / `api_key_id` | Query parameter for api_key_id |
|
|
2239
|
+
| `params["created_at[gte]"]` | 否 | `string` | query / `created_at[gte]` | Return versions created at or after this time (inclusive). |
|
|
2240
|
+
| `params["created_at[lte]"]` | 否 | `string` | query / `created_at[lte]` | Return versions created at or before this time (inclusive). |
|
|
2241
|
+
| `params.limit` | 否 | `number` | query / `limit` | Query parameter for limit |
|
|
2242
|
+
| `params.memory_id` | 否 | `string` | query / `memory_id` | Query parameter for memory_id |
|
|
2243
|
+
| `params.page` | 否 | `string` | query / `page` | Query parameter for page |
|
|
2244
|
+
| `params.service_account_id` | 否 | `string` | query / `service_account_id` | Query parameter for service_account_id |
|
|
2245
|
+
| `params.session_id` | 否 | `string` | query / `session_id` | Query parameter for session_id |
|
|
2246
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2247
|
+
| `params.operation` | 否 | `ManagedAgentsMemoryVersionOperation`([ManagedAgentsMemoryVersionOperation](../src/managed/types.ts#L4595)) | query / `operation` | Query parameter for operation Any of "created", "modified", "deleted". |
|
|
2248
|
+
| `params.view` | 否 | `ManagedAgentsMemoryView`([ManagedAgentsMemoryView](../src/managed/types.ts#L4323)) | query / `view` | Query parameter for view Any of "basic", "full". |
|
|
2249
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2250
|
+
|
|
2251
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
2252
|
+
|
|
2253
|
+
### `memoryStores.memoryVersions.redact`
|
|
2254
|
+
|
|
2255
|
+
清除记忆版本中的正文。HTTP:`POST /memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact`。
|
|
2256
|
+
|
|
2257
|
+
```text
|
|
2258
|
+
client.memoryStores.memoryVersions.redact(memoryVersionID: string, params: MemoryStoreMemoryVersionRedactParams, options?: RequestOptions): APIPromise<ManagedAgentsMemoryVersion>
|
|
2259
|
+
```
|
|
2260
|
+
|
|
2261
|
+
[方法源码](../src/managed/resources/memory-store-memory-version.ts#L31);返回:`APIPromise<ManagedAgentsMemoryVersion>`([ManagedAgentsMemoryVersion](../src/managed/types.ts#L4514))。
|
|
2262
|
+
|
|
2263
|
+
参数对象:[MemoryStoreMemoryVersionRedactParams](../src/managed/types.ts#L4711)。
|
|
2264
|
+
|
|
2265
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2266
|
+
| --- | --- | --- | --- | --- |
|
|
2267
|
+
| `memoryVersionID` | 是 | `string` | path / `memory_version_id` | 按签名顺序传入的路径参数。 |
|
|
2268
|
+
| `params.memory_store_id` | 是 | `string` | path / `memory_store_id` | 字段结构见类型链接。 |
|
|
2269
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2270
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2271
|
+
|
|
2272
|
+
<a id="models"></a>
|
|
2273
|
+
|
|
2274
|
+
## 模型:`client.models`
|
|
2275
|
+
|
|
2276
|
+
### `models.list`
|
|
2277
|
+
|
|
2278
|
+
列出模型。HTTP:`GET /models`。
|
|
2279
|
+
|
|
2280
|
+
```text
|
|
2281
|
+
client.models.list(params: ModelListParams | null | undefined = {}, options?: RequestOptions): PagePromise<ModelInfo>
|
|
2282
|
+
```
|
|
2283
|
+
|
|
2284
|
+
[方法源码](../src/managed/resources/model.ts#L18);返回:`PagePromise<ModelInfo>`([ModelInfo](../src/managed/types.ts#L6216))。
|
|
2285
|
+
|
|
2286
|
+
参数对象:[ModelListParams](../src/managed/types.ts#L6292)。
|
|
2287
|
+
|
|
2288
|
+
| 参数 | 必填 | 类型 | 位置 / 协议字段 | 说明 |
|
|
2289
|
+
| --- | --- | --- | --- | --- |
|
|
2290
|
+
| `params.after_id` | 否 | `string` | query / `after_id` | ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. |
|
|
2291
|
+
| `params.before_id` | 否 | `string` | query / `before_id` | ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. |
|
|
2292
|
+
| `params.limit` | 否 | `number` | query / `limit` | Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`. |
|
|
2293
|
+
| `params.workspace_id` | 否 | `string` | header / `qoder-workspace-id` | 字段结构见类型链接。 |
|
|
2294
|
+
| `params.betas` | 否 | `Array<QoderBeta>`([QoderBeta](../src/managed/types.ts#L6316)) | header / `x-qoder-beta` | Optional header to specify the beta version(s) you want to use. |
|
|
2295
|
+
|
|
2296
|
+
分页从响应 `next_page` 读取下一页的 `page`;直接 `for await` 自动续页。
|
|
2297
|
+
|
|
2298
|
+
## 验证与场景示例
|
|
2299
|
+
|
|
2300
|
+
完整的模型、会话、文件和技能、记忆等可运行场景见 [示例说明](../examples/README.md)。运行全量真实场景:
|
|
2301
|
+
|
|
2302
|
+
```sh
|
|
2303
|
+
npm run example -- -mode managed -scenario all -region international -model auto
|
|
2304
|
+
```
|
|
2305
|
+
|
|
2306
|
+
`-region` 应与 PAT 所属站点一致;示例程序读取 `.env.live`,执行后清理本轮创建的资源。文档中的资源方法不会自动执行这类清理。
|