@rox-one/sdk 0.0.0-stage → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CALLS.md +82 -0
- package/README.md +1259 -2
- package/dist/chunk-AOHK5YXC.js +5585 -0
- package/dist/chunk-CATFKTFD.js +80 -0
- package/dist/chunk-FQGPXWPJ.js +1491 -0
- package/dist/chunk-G43PLP2U.js +1087 -0
- package/dist/chunk-LMJW65ML.js +836 -0
- package/dist/chunk-MCSQNZ4E.js +836 -0
- package/dist/chunk-NSJ3GKUC.js +1552 -0
- package/dist/chunk-OGFKJOK7.js +2068 -0
- package/dist/chunk-RDEJZJBZ.js +1351 -0
- package/dist/chunk-TMTYN2UK.js +1128 -0
- package/dist/chunk-V45LUJDI.js +838 -0
- package/dist/chunk-YRUXFEZM.js +1044 -0
- package/dist/chunk-ZYBAKW25.js +994 -0
- package/dist/generated/agent-fold/index.d.ts +4520 -0
- package/dist/generated/agent-fold/index.js +0 -0
- package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
- package/dist/generated/agent-harness/client/index.d.ts +10 -0
- package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
- package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
- package/dist/generated/agent-harness/client.gen.d.ts +12 -0
- package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
- package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
- package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
- package/dist/generated/agent-harness/index.d.ts +2 -0
- package/dist/generated/agent-harness/index.js +6 -0
- package/dist/generated/agent-harness/sdk.gen.d.ts +375 -0
- package/dist/generated/agent-harness/types.gen.d.ts +4725 -0
- package/dist/generated/agent-reviews/index.d.ts +895 -0
- package/dist/generated/agent-reviews/index.js +0 -0
- package/dist/generated/auth/client/client.gen.d.ts +2 -0
- package/dist/generated/auth/client/index.d.ts +10 -0
- package/dist/generated/auth/client/types.gen.d.ts +120 -0
- package/dist/generated/auth/client/utils.gen.d.ts +37 -0
- package/dist/generated/auth/client.gen.d.ts +12 -0
- package/dist/generated/auth/core/auth.gen.d.ts +25 -0
- package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/auth/core/params.gen.d.ts +43 -0
- package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/auth/core/types.gen.d.ts +83 -0
- package/dist/generated/auth/core/utils.gen.d.ts +19 -0
- package/dist/generated/auth/index.d.ts +2 -0
- package/dist/generated/auth/index.js +6 -0
- package/dist/generated/auth/sdk.gen.d.ts +674 -0
- package/dist/generated/auth/types.gen.d.ts +5233 -0
- package/dist/generated/calendar/client/client.gen.d.ts +2 -0
- package/dist/generated/calendar/client/index.d.ts +10 -0
- package/dist/generated/calendar/client/types.gen.d.ts +120 -0
- package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
- package/dist/generated/calendar/client.gen.d.ts +12 -0
- package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
- package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/calendar/core/params.gen.d.ts +43 -0
- package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/calendar/core/types.gen.d.ts +83 -0
- package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
- package/dist/generated/calendar/index.d.ts +2 -0
- package/dist/generated/calendar/index.js +6 -0
- package/dist/generated/calendar/sdk.gen.d.ts +157 -0
- package/dist/generated/calendar/types.gen.d.ts +2333 -0
- package/dist/generated/cognition/client/client.gen.d.ts +2 -0
- package/dist/generated/cognition/client/index.d.ts +10 -0
- package/dist/generated/cognition/client/types.gen.d.ts +120 -0
- package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
- package/dist/generated/cognition/client.gen.d.ts +12 -0
- package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
- package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/cognition/core/params.gen.d.ts +43 -0
- package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/cognition/core/types.gen.d.ts +83 -0
- package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
- package/dist/generated/cognition/index.d.ts +2 -0
- package/dist/generated/cognition/index.js +6 -0
- package/dist/generated/cognition/sdk.gen.d.ts +348 -0
- package/dist/generated/cognition/types.gen.d.ts +4228 -0
- package/dist/generated/connection/client/client.gen.d.ts +2 -0
- package/dist/generated/connection/client/index.d.ts +10 -0
- package/dist/generated/connection/client/types.gen.d.ts +120 -0
- package/dist/generated/connection/client/utils.gen.d.ts +37 -0
- package/dist/generated/connection/client.gen.d.ts +12 -0
- package/dist/generated/connection/core/auth.gen.d.ts +25 -0
- package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/connection/core/params.gen.d.ts +43 -0
- package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/connection/core/types.gen.d.ts +83 -0
- package/dist/generated/connection/core/utils.gen.d.ts +19 -0
- package/dist/generated/connection/index.d.ts +2 -0
- package/dist/generated/connection/index.js +854 -0
- package/dist/generated/connection/sdk.gen.d.ts +43 -0
- package/dist/generated/connection/types.gen.d.ts +252 -0
- package/dist/generated/contacts/client/client.gen.d.ts +2 -0
- package/dist/generated/contacts/client/index.d.ts +10 -0
- package/dist/generated/contacts/client/types.gen.d.ts +120 -0
- package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
- package/dist/generated/contacts/client.gen.d.ts +12 -0
- package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
- package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/contacts/core/params.gen.d.ts +43 -0
- package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/contacts/core/types.gen.d.ts +83 -0
- package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
- package/dist/generated/contacts/index.d.ts +2 -0
- package/dist/generated/contacts/index.js +6 -0
- package/dist/generated/contacts/sdk.gen.d.ts +47 -0
- package/dist/generated/contacts/types.gen.d.ts +108 -0
- package/dist/generated/email/client/client.gen.d.ts +2 -0
- package/dist/generated/email/client/index.d.ts +10 -0
- package/dist/generated/email/client/types.gen.d.ts +120 -0
- package/dist/generated/email/client/utils.gen.d.ts +37 -0
- package/dist/generated/email/client.gen.d.ts +12 -0
- package/dist/generated/email/core/auth.gen.d.ts +25 -0
- package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/email/core/params.gen.d.ts +43 -0
- package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/email/core/types.gen.d.ts +83 -0
- package/dist/generated/email/core/utils.gen.d.ts +19 -0
- package/dist/generated/email/index.d.ts +2 -0
- package/dist/generated/email/index.js +6 -0
- package/dist/generated/email/sdk.gen.d.ts +301 -0
- package/dist/generated/email/types.gen.d.ts +3262 -0
- package/dist/generated/notification/client/client.gen.d.ts +2 -0
- package/dist/generated/notification/client/index.d.ts +10 -0
- package/dist/generated/notification/client/types.gen.d.ts +120 -0
- package/dist/generated/notification/client/utils.gen.d.ts +37 -0
- package/dist/generated/notification/client.gen.d.ts +12 -0
- package/dist/generated/notification/core/auth.gen.d.ts +25 -0
- package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/notification/core/params.gen.d.ts +43 -0
- package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/notification/core/types.gen.d.ts +83 -0
- package/dist/generated/notification/core/utils.gen.d.ts +19 -0
- package/dist/generated/notification/index.d.ts +2 -0
- package/dist/generated/notification/index.js +6 -0
- package/dist/generated/notification/sdk.gen.d.ts +127 -0
- package/dist/generated/notification/types.gen.d.ts +2084 -0
- package/dist/generated/properties/client/client.gen.d.ts +2 -0
- package/dist/generated/properties/client/index.d.ts +10 -0
- package/dist/generated/properties/client/types.gen.d.ts +120 -0
- package/dist/generated/properties/client/utils.gen.d.ts +37 -0
- package/dist/generated/properties/client.gen.d.ts +12 -0
- package/dist/generated/properties/core/auth.gen.d.ts +25 -0
- package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/properties/core/params.gen.d.ts +43 -0
- package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/properties/core/types.gen.d.ts +83 -0
- package/dist/generated/properties/core/utils.gen.d.ts +19 -0
- package/dist/generated/properties/index.d.ts +2 -0
- package/dist/generated/properties/index.js +6 -0
- package/dist/generated/properties/sdk.gen.d.ts +158 -0
- package/dist/generated/properties/types.gen.d.ts +1311 -0
- package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
- package/dist/generated/scheduled-action/client/index.d.ts +10 -0
- package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
- package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
- package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
- package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
- package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
- package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
- package/dist/generated/scheduled-action/index.d.ts +2 -0
- package/dist/generated/scheduled-action/index.js +6 -0
- package/dist/generated/scheduled-action/sdk.gen.d.ts +156 -0
- package/dist/generated/scheduled-action/types.gen.d.ts +3099 -0
- package/dist/generated/search/client/client.gen.d.ts +2 -0
- package/dist/generated/search/client/index.d.ts +10 -0
- package/dist/generated/search/client/types.gen.d.ts +120 -0
- package/dist/generated/search/client/utils.gen.d.ts +37 -0
- package/dist/generated/search/client.gen.d.ts +12 -0
- package/dist/generated/search/core/auth.gen.d.ts +25 -0
- package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/search/core/params.gen.d.ts +43 -0
- package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/search/core/types.gen.d.ts +83 -0
- package/dist/generated/search/core/utils.gen.d.ts +19 -0
- package/dist/generated/search/index.d.ts +2 -0
- package/dist/generated/search/index.js +6 -0
- package/dist/generated/search/sdk.gen.d.ts +44 -0
- package/dist/generated/search/types.gen.d.ts +2532 -0
- package/dist/generated/static-files/client/client.gen.d.ts +2 -0
- package/dist/generated/static-files/client/index.d.ts +10 -0
- package/dist/generated/static-files/client/types.gen.d.ts +120 -0
- package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
- package/dist/generated/static-files/client.gen.d.ts +12 -0
- package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
- package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/static-files/core/params.gen.d.ts +43 -0
- package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/static-files/core/types.gen.d.ts +83 -0
- package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
- package/dist/generated/static-files/index.d.ts +2 -0
- package/dist/generated/static-files/index.js +842 -0
- package/dist/generated/static-files/sdk.gen.d.ts +43 -0
- package/dist/generated/static-files/types.gen.d.ts +220 -0
- package/dist/generated/storage/client/client.gen.d.ts +2 -0
- package/dist/generated/storage/client/index.d.ts +10 -0
- package/dist/generated/storage/client/types.gen.d.ts +120 -0
- package/dist/generated/storage/client/utils.gen.d.ts +37 -0
- package/dist/generated/storage/client.gen.d.ts +12 -0
- package/dist/generated/storage/core/auth.gen.d.ts +25 -0
- package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/storage/core/params.gen.d.ts +43 -0
- package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/storage/core/types.gen.d.ts +83 -0
- package/dist/generated/storage/core/utils.gen.d.ts +19 -0
- package/dist/generated/storage/index.d.ts +2 -0
- package/dist/generated/storage/index.js +6 -0
- package/dist/generated/storage/sdk.gen.d.ts +2285 -0
- package/dist/generated/storage/types.gen.d.ts +34546 -0
- package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
- package/dist/generated/unfurl/client/index.d.ts +10 -0
- package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
- package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
- package/dist/generated/unfurl/client.gen.d.ts +12 -0
- package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
- package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
- package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
- package/dist/generated/unfurl/index.d.ts +2 -0
- package/dist/generated/unfurl/index.js +6 -0
- package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
- package/dist/generated/unfurl/types.gen.d.ts +145 -0
- package/dist/src/calls/browser.d.ts +14 -0
- package/dist/src/calls/browser.js +102 -0
- package/dist/src/calls/common.d.ts +18 -0
- package/dist/src/calls/node.d.ts +24 -0
- package/dist/src/calls/node.js +145 -0
- package/dist/src/calls/telemetry.d.ts +5 -0
- package/dist/src/config.d.ts +71 -0
- package/dist/src/entities/account-managers/grant.d.ts +62 -0
- package/dist/src/entities/account-managers/namespace.d.ts +29 -0
- package/dist/src/entities/activity/entity.d.ts +7 -0
- package/dist/src/entities/activity/namespace.d.ts +58 -0
- package/dist/src/entities/activity/namespace.test.d.ts +1 -0
- package/dist/src/entities/agent-sessions/activity.d.ts +48 -0
- package/dist/src/entities/agent-sessions/agent-session.d.ts +518 -0
- package/dist/src/entities/agent-sessions/code-execution.d.ts +60 -0
- package/dist/src/entities/agent-sessions/conversation.d.ts +91 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +142 -0
- package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
- package/dist/src/entities/agent-sessions/queued-action.d.ts +60 -0
- package/dist/src/entities/agent-sessions/review.d.ts +114 -0
- package/dist/src/entities/agent-sessions/tool-approval.d.ts +25 -0
- package/dist/src/entities/agent-sessions/view.d.ts +11 -0
- package/dist/src/entities/agents/agent.d.ts +142 -0
- package/dist/src/entities/agents/namespace.d.ts +66 -0
- package/dist/src/entities/ai/namespace.d.ts +36 -0
- package/dist/src/entities/api-keys/api-key.d.ts +22 -0
- package/dist/src/entities/api-keys/namespace.d.ts +37 -0
- package/dist/src/entities/bots/bot.d.ts +143 -0
- package/dist/src/entities/bots/namespace.d.ts +50 -0
- package/dist/src/entities/bots/token.d.ts +39 -0
- package/dist/src/entities/calendar/booking-link.d.ts +55 -0
- package/dist/src/entities/calendar/booking-namespace.d.ts +143 -0
- package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
- package/dist/src/entities/calendar/booking.d.ts +97 -0
- package/dist/src/entities/calendar/calendar.d.ts +49 -0
- package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
- package/dist/src/entities/calendar/event.d.ts +283 -0
- package/dist/src/entities/calendar/event.test.d.ts +1 -0
- package/dist/src/entities/calendar/namespace.d.ts +334 -0
- package/dist/src/entities/calendar/namespace.test.d.ts +1 -0
- package/dist/src/entities/calendar/replacement.d.ts +31 -0
- package/dist/src/entities/calls/call-record.d.ts +231 -0
- package/dist/src/entities/calls/connection.d.ts +59 -0
- package/dist/src/entities/calls/errors.d.ts +15 -0
- package/dist/src/entities/calls/message.d.ts +55 -0
- package/dist/src/entities/calls/namespace.d.ts +41 -0
- package/dist/src/entities/calls/participant.d.ts +22 -0
- package/dist/src/entities/canvases/canvas.d.ts +329 -0
- package/dist/src/entities/channels/access-request.d.ts +42 -0
- package/dist/src/entities/channels/activity.d.ts +40 -0
- package/dist/src/entities/channels/channel.d.ts +302 -0
- package/dist/src/entities/channels/labels.d.ts +73 -0
- package/dist/src/entities/channels/message.d.ts +153 -0
- package/dist/src/entities/channels/message.test.d.ts +1 -0
- package/dist/src/entities/channels/namespace.d.ts +82 -0
- package/dist/src/entities/channels/namespace.test.d.ts +1 -0
- package/dist/src/entities/channels/picture.d.ts +11 -0
- package/dist/src/entities/channels/post.d.ts +37 -0
- package/dist/src/entities/channels/post.test.d.ts +1 -0
- package/dist/src/entities/channels/share.d.ts +9 -0
- package/dist/src/entities/channels/share.test.d.ts +1 -0
- package/dist/src/entities/channels/thread.d.ts +64 -0
- package/dist/src/entities/chats/chat.d.ts +121 -0
- package/dist/src/entities/chats/generation.d.ts +55 -0
- package/dist/src/entities/chats/namespace.d.ts +35 -0
- package/dist/src/entities/connected-apps/connected-app.d.ts +121 -0
- package/dist/src/entities/connected-apps/connector.d.ts +59 -0
- package/dist/src/entities/connected-apps/namespace.d.ts +92 -0
- package/dist/src/entities/crm/company.d.ts +154 -0
- package/dist/src/entities/crm/contact.d.ts +168 -0
- package/dist/src/entities/crm/namespace.d.ts +163 -0
- package/dist/src/entities/crm/pipeline-entry.d.ts +109 -0
- package/dist/src/entities/crm/pipeline.d.ts +426 -0
- package/dist/src/entities/crm/pipelines.d.ts +79 -0
- package/dist/src/entities/crm-email-privacy/email-privacy.d.ts +238 -0
- package/dist/src/entities/crm-email-privacy/email-rule-preview.d.ts +55 -0
- package/dist/src/entities/crm-email-privacy/email-rule-revision.d.ts +27 -0
- package/dist/src/entities/crm-email-privacy/email-rules.d.ts +32 -0
- package/dist/src/entities/databases/column.d.ts +122 -0
- package/dist/src/entities/databases/database.d.ts +431 -0
- package/dist/src/entities/databases/namespace.d.ts +109 -0
- package/dist/src/entities/databases/query.d.ts +86 -0
- package/dist/src/entities/databases/row.d.ts +29 -0
- package/dist/src/entities/databases/saved-query.d.ts +151 -0
- package/dist/src/entities/databases/table.d.ts +124 -0
- package/dist/src/entities/databases/view.d.ts +72 -0
- package/dist/src/entities/databases/webhook.d.ts +39 -0
- package/dist/src/entities/documents/ai-edit.d.ts +54 -0
- package/dist/src/entities/documents/anchor.d.ts +39 -0
- package/dist/src/entities/documents/comment.d.ts +68 -0
- package/dist/src/entities/documents/create.test.d.ts +1 -0
- package/dist/src/entities/documents/document.d.ts +675 -0
- package/dist/src/entities/documents/markdown.d.ts +25 -0
- package/dist/src/entities/documents/namespace.d.ts +291 -0
- package/dist/src/entities/documents/office-files.d.ts +47 -0
- package/dist/src/entities/documents/skills.test.d.ts +1 -0
- package/dist/src/entities/documents/system-skill.d.ts +36 -0
- package/dist/src/entities/documents/text-comment.d.ts +41 -0
- package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
- package/dist/src/entities/documents/version.d.ts +26 -0
- package/dist/src/entities/email/attachment.d.ts +39 -0
- package/dist/src/entities/email/draft.d.ts +160 -0
- package/dist/src/entities/email/filter.d.ts +44 -0
- package/dist/src/entities/email/label.d.ts +37 -0
- package/dist/src/entities/email/link.d.ts +35 -0
- package/dist/src/entities/email/message.d.ts +223 -0
- package/dist/src/entities/email/namespace.d.ts +235 -0
- package/dist/src/entities/email/namespace.test.d.ts +1 -0
- package/dist/src/entities/email/thread.d.ts +268 -0
- package/dist/src/entities/entity-mentions/mention.d.ts +21 -0
- package/dist/src/entities/entity-mentions/namespace.d.ts +20 -0
- package/dist/src/entities/entity.d.ts +167 -0
- package/dist/src/entities/external-chat/chat.d.ts +173 -0
- package/dist/src/entities/external-chat/message.d.ts +54 -0
- package/dist/src/entities/external-chat/namespace.d.ts +22 -0
- package/dist/src/entities/external-chat/participant.d.ts +28 -0
- package/dist/src/entities/external-chat/send.d.ts +40 -0
- package/dist/src/entities/external-chat/upload.d.ts +25 -0
- package/dist/src/entities/favorites/namespace.d.ts +52 -0
- package/dist/src/entities/foreign/foreign-entity.d.ts +36 -0
- package/dist/src/entities/foreign/namespace.d.ts +54 -0
- package/dist/src/entities/forms/form.d.ts +319 -0
- package/dist/src/entities/forms/namespace.d.ts +30 -0
- package/dist/src/entities/forms/question.d.ts +65 -0
- package/dist/src/entities/forms/response.d.ts +52 -0
- package/dist/src/entities/forms/section.d.ts +31 -0
- package/dist/src/entities/github-pull-requests/namespace.d.ts +20 -0
- package/dist/src/entities/github-pull-requests/pull-request.d.ts +64 -0
- package/dist/src/entities/harnesses/harness.d.ts +76 -0
- package/dist/src/entities/harnesses/namespace.d.ts +83 -0
- package/dist/src/entities/harnesses/pairing.d.ts +50 -0
- package/dist/src/entities/images/image.d.ts +88 -0
- package/dist/src/entities/images/namespace.d.ts +55 -0
- package/dist/src/entities/images/namespace.test.d.ts +1 -0
- package/dist/src/entities/imports/entry.d.ts +65 -0
- package/dist/src/entities/imports/namespace.d.ts +103 -0
- package/dist/src/entities/imports/namespace.test.d.ts +1 -0
- package/dist/src/entities/initiatives/initiative.d.ts +185 -0
- package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
- package/dist/src/entities/initiatives/namespace.d.ts +90 -0
- package/dist/src/entities/me/namespace.d.ts +68 -0
- package/dist/src/entities/meetings/meeting.d.ts +81 -0
- package/dist/src/entities/meetings/namespace.d.ts +38 -0
- package/dist/src/entities/memory/namespace.d.ts +49 -0
- package/dist/src/entities/memory/namespace.test.d.ts +1 -0
- package/dist/src/entities/messages/discussion.d.ts +84 -0
- package/dist/src/entities/messages/thread.d.ts +115 -0
- package/dist/src/entities/notifications/namespace.d.ts +66 -0
- package/dist/src/entities/notifications/notification.d.ts +78 -0
- package/dist/src/entities/notifications/notification.test.d.ts +1 -0
- package/dist/src/entities/passwords/item.d.ts +118 -0
- package/dist/src/entities/passwords/namespace.d.ts +45 -0
- package/dist/src/entities/pins/namespace.d.ts +42 -0
- package/dist/src/entities/projects/namespace.d.ts +45 -0
- package/dist/src/entities/projects/project.d.ts +108 -0
- package/dist/src/entities/properties/namespace.d.ts +105 -0
- package/dist/src/entities/properties/namespace.test.d.ts +1 -0
- package/dist/src/entities/properties/property-definition.d.ts +70 -0
- package/dist/src/entities/properties/property-option.d.ts +44 -0
- package/dist/src/entities/reference.d.ts +82 -0
- package/dist/src/entities/referrals/namespace.d.ts +40 -0
- package/dist/src/entities/routines/namespace.d.ts +239 -0
- package/dist/src/entities/routines/routine.d.ts +341 -0
- package/dist/src/entities/routines/suggestion.d.ts +38 -0
- package/dist/src/entities/saved-views/namespace.d.ts +58 -0
- package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
- package/dist/src/entities/search/exclusions.d.ts +6 -0
- package/dist/src/entities/search/namespace.d.ts +71 -0
- package/dist/src/entities/search/options.d.ts +30 -0
- package/dist/src/entities/search/types.d.ts +90 -0
- package/dist/src/entities/sharing/access.d.ts +120 -0
- package/dist/src/entities/sharing/permissions.d.ts +13 -0
- package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
- package/dist/src/entities/suggestions/namespace.d.ts +118 -0
- package/dist/src/entities/suggestions/suggestion.d.ts +172 -0
- package/dist/src/entities/suggestions/suggestion.test.d.ts +1 -0
- package/dist/src/entities/tasks/namespace.d.ts +77 -0
- package/dist/src/entities/tasks/task.d.ts +99 -0
- package/dist/src/entities/teams/invite.d.ts +33 -0
- package/dist/src/entities/teams/namespace.d.ts +23 -0
- package/dist/src/entities/teams/team.d.ts +129 -0
- package/dist/src/entities/ui/app-link.d.ts +24 -0
- package/dist/src/entities/ui/namespace.d.ts +75 -0
- package/dist/src/entities/unfurls/namespace.d.ts +24 -0
- package/dist/src/entities/users/namespace.d.ts +41 -0
- package/dist/src/entities/users/profile-picture.d.ts +29 -0
- package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
- package/dist/src/entities/users/user.d.ts +102 -0
- package/dist/src/entities/web/namespace.d.ts +67 -0
- package/dist/src/entities/web/namespace.test.d.ts +1 -0
- package/dist/src/entities/webhooks/namespace.d.ts +38 -0
- package/dist/src/entities/webhooks/webhook.d.ts +130 -0
- package/dist/src/entities/whatsapp/account.d.ts +24 -0
- package/dist/src/entities/whatsapp/chat.d.ts +62 -0
- package/dist/src/entities/whatsapp/namespace.d.ts +29 -0
- package/dist/src/entities/workspace/items.d.ts +14 -0
- package/dist/src/entities/workspace/namespace.d.ts +96 -0
- package/dist/src/entities/workspace/query.d.ts +39 -0
- package/dist/src/entities/workspace/query.test.d.ts +1 -0
- package/dist/src/entities/workspace/types.d.ts +99 -0
- package/dist/src/events/hydrate/agentSession.d.ts +192 -0
- package/dist/src/events/hydrate/call.d.ts +101 -0
- package/dist/src/events/hydrate/channel.d.ts +55 -0
- package/dist/src/events/hydrate/document.d.ts +59 -0
- package/dist/src/events/hydrate/message.d.ts +70 -0
- package/dist/src/events/hydrate/user.d.ts +14 -0
- package/dist/src/events/receiver.d.ts +91 -0
- package/dist/src/events/types.d.ts +44 -0
- package/dist/src/events/verify.d.ts +13 -0
- package/dist/src/local-portmap.d.ts +8 -0
- package/dist/src/mentions.d.ts +42 -0
- package/dist/src/raw.d.ts +12 -0
- package/dist/src/rox.d.ts +267 -0
- package/dist/src/rox.js +23217 -0
- package/dist/src/utils/activity.d.ts +34 -0
- package/dist/src/utils/activity.test.d.ts +1 -0
- package/dist/src/utils/client.d.ts +62 -0
- package/dist/src/utils/concurrency.d.ts +5 -0
- package/dist/src/utils/index.d.ts +5 -0
- package/dist/src/utils/lazy.d.ts +37 -0
- package/dist/src/utils/options.d.ts +7 -0
- package/dist/src/utils/pagination.d.ts +28 -0
- package/dist/src/utils/unwrap.d.ts +48 -0
- package/dist/src/utils/verbs.d.ts +3 -0
- package/package.json +82 -4
|
@@ -0,0 +1,1552 @@
|
|
|
1
|
+
// generated/agent-harness/core/bodySerializer.gen.ts
|
|
2
|
+
var jsonBodySerializer = {
|
|
3
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// generated/agent-harness/core/serverSentEvents.gen.ts
|
|
7
|
+
function createSseClient({
|
|
8
|
+
onRequest,
|
|
9
|
+
onSseError,
|
|
10
|
+
onSseEvent,
|
|
11
|
+
responseTransformer,
|
|
12
|
+
responseValidator,
|
|
13
|
+
sseDefaultRetryDelay,
|
|
14
|
+
sseMaxRetryAttempts,
|
|
15
|
+
sseMaxRetryDelay,
|
|
16
|
+
sseSleepFn,
|
|
17
|
+
url,
|
|
18
|
+
...options
|
|
19
|
+
}) {
|
|
20
|
+
let lastEventId;
|
|
21
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
22
|
+
const createStream = async function* () {
|
|
23
|
+
let retryDelay = sseDefaultRetryDelay ?? 3e3;
|
|
24
|
+
let attempt = 0;
|
|
25
|
+
const signal = options.signal ?? new AbortController().signal;
|
|
26
|
+
while (true) {
|
|
27
|
+
if (signal.aborted) break;
|
|
28
|
+
attempt++;
|
|
29
|
+
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
30
|
+
if (lastEventId !== void 0) {
|
|
31
|
+
headers.set("Last-Event-ID", lastEventId);
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const requestInit = {
|
|
35
|
+
redirect: "follow",
|
|
36
|
+
...options,
|
|
37
|
+
body: options.serializedBody,
|
|
38
|
+
headers,
|
|
39
|
+
signal
|
|
40
|
+
};
|
|
41
|
+
let request = new Request(url, requestInit);
|
|
42
|
+
if (onRequest) {
|
|
43
|
+
request = await onRequest(url, requestInit);
|
|
44
|
+
}
|
|
45
|
+
const _fetch = options.fetch ?? globalThis.fetch;
|
|
46
|
+
const response = await _fetch(request);
|
|
47
|
+
if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
48
|
+
if (!response.body) throw new Error("No body in SSE response");
|
|
49
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
50
|
+
let buffer = "";
|
|
51
|
+
const abortHandler = () => {
|
|
52
|
+
try {
|
|
53
|
+
reader.cancel();
|
|
54
|
+
} catch {
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
signal.addEventListener("abort", abortHandler);
|
|
58
|
+
try {
|
|
59
|
+
while (true) {
|
|
60
|
+
const { done, value } = await reader.read();
|
|
61
|
+
if (done) break;
|
|
62
|
+
buffer += value;
|
|
63
|
+
buffer = buffer.replace(/\r\n?/g, "\n");
|
|
64
|
+
const chunks = buffer.split("\n\n");
|
|
65
|
+
buffer = chunks.pop() ?? "";
|
|
66
|
+
for (const chunk of chunks) {
|
|
67
|
+
const lines = chunk.split("\n");
|
|
68
|
+
const dataLines = [];
|
|
69
|
+
let eventName;
|
|
70
|
+
for (const line of lines) {
|
|
71
|
+
if (line.startsWith("data:")) {
|
|
72
|
+
dataLines.push(line.replace(/^data:\s*/, ""));
|
|
73
|
+
} else if (line.startsWith("event:")) {
|
|
74
|
+
eventName = line.replace(/^event:\s*/, "");
|
|
75
|
+
} else if (line.startsWith("id:")) {
|
|
76
|
+
lastEventId = line.replace(/^id:\s*/, "");
|
|
77
|
+
} else if (line.startsWith("retry:")) {
|
|
78
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
|
|
79
|
+
if (!Number.isNaN(parsed)) {
|
|
80
|
+
retryDelay = parsed;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
let data;
|
|
85
|
+
let parsedJson = false;
|
|
86
|
+
if (dataLines.length) {
|
|
87
|
+
const rawData = dataLines.join("\n");
|
|
88
|
+
try {
|
|
89
|
+
data = JSON.parse(rawData);
|
|
90
|
+
parsedJson = true;
|
|
91
|
+
} catch {
|
|
92
|
+
data = rawData;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (parsedJson) {
|
|
96
|
+
if (responseValidator) {
|
|
97
|
+
await responseValidator(data);
|
|
98
|
+
}
|
|
99
|
+
if (responseTransformer) {
|
|
100
|
+
data = await responseTransformer(data);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
onSseEvent?.({
|
|
104
|
+
data,
|
|
105
|
+
event: eventName,
|
|
106
|
+
id: lastEventId,
|
|
107
|
+
retry: retryDelay
|
|
108
|
+
});
|
|
109
|
+
if (dataLines.length) {
|
|
110
|
+
yield data;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} finally {
|
|
115
|
+
signal.removeEventListener("abort", abortHandler);
|
|
116
|
+
reader.releaseLock();
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
} catch (error) {
|
|
120
|
+
onSseError?.(error);
|
|
121
|
+
if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
|
|
125
|
+
await sleep(backoff);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const stream = createStream();
|
|
130
|
+
return { stream };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// generated/agent-harness/core/pathSerializer.gen.ts
|
|
134
|
+
var separatorArrayExplode = (style) => {
|
|
135
|
+
switch (style) {
|
|
136
|
+
case "label":
|
|
137
|
+
return ".";
|
|
138
|
+
case "matrix":
|
|
139
|
+
return ";";
|
|
140
|
+
case "simple":
|
|
141
|
+
return ",";
|
|
142
|
+
default:
|
|
143
|
+
return "&";
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var separatorArrayNoExplode = (style) => {
|
|
147
|
+
switch (style) {
|
|
148
|
+
case "form":
|
|
149
|
+
return ",";
|
|
150
|
+
case "pipeDelimited":
|
|
151
|
+
return "|";
|
|
152
|
+
case "spaceDelimited":
|
|
153
|
+
return "%20";
|
|
154
|
+
default:
|
|
155
|
+
return ",";
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
var separatorObjectExplode = (style) => {
|
|
159
|
+
switch (style) {
|
|
160
|
+
case "label":
|
|
161
|
+
return ".";
|
|
162
|
+
case "matrix":
|
|
163
|
+
return ";";
|
|
164
|
+
case "simple":
|
|
165
|
+
return ",";
|
|
166
|
+
default:
|
|
167
|
+
return "&";
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
var serializeArrayParam = ({
|
|
171
|
+
allowReserved,
|
|
172
|
+
explode,
|
|
173
|
+
name,
|
|
174
|
+
style,
|
|
175
|
+
value
|
|
176
|
+
}) => {
|
|
177
|
+
if (!explode) {
|
|
178
|
+
const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
|
|
179
|
+
switch (style) {
|
|
180
|
+
case "label":
|
|
181
|
+
return `.${joinedValues2}`;
|
|
182
|
+
case "matrix":
|
|
183
|
+
return `;${name}=${joinedValues2}`;
|
|
184
|
+
case "simple":
|
|
185
|
+
return joinedValues2;
|
|
186
|
+
default:
|
|
187
|
+
return `${name}=${joinedValues2}`;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const separator = separatorArrayExplode(style);
|
|
191
|
+
const joinedValues = value.map((v) => {
|
|
192
|
+
if (style === "label" || style === "simple") {
|
|
193
|
+
return allowReserved ? v : encodeURIComponent(v);
|
|
194
|
+
}
|
|
195
|
+
return serializePrimitiveParam({
|
|
196
|
+
allowReserved,
|
|
197
|
+
name,
|
|
198
|
+
value: v
|
|
199
|
+
});
|
|
200
|
+
}).join(separator);
|
|
201
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
202
|
+
};
|
|
203
|
+
var serializePrimitiveParam = ({
|
|
204
|
+
allowReserved,
|
|
205
|
+
name,
|
|
206
|
+
value
|
|
207
|
+
}) => {
|
|
208
|
+
if (value === void 0 || value === null) {
|
|
209
|
+
return "";
|
|
210
|
+
}
|
|
211
|
+
if (typeof value === "object") {
|
|
212
|
+
throw new Error(
|
|
213
|
+
"Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
|
|
217
|
+
};
|
|
218
|
+
var serializeObjectParam = ({
|
|
219
|
+
allowReserved,
|
|
220
|
+
explode,
|
|
221
|
+
name,
|
|
222
|
+
style,
|
|
223
|
+
value,
|
|
224
|
+
valueOnly
|
|
225
|
+
}) => {
|
|
226
|
+
if (value instanceof Date) {
|
|
227
|
+
return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
|
|
228
|
+
}
|
|
229
|
+
if (style !== "deepObject" && !explode) {
|
|
230
|
+
let values = [];
|
|
231
|
+
Object.entries(value).forEach(([key, v]) => {
|
|
232
|
+
values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
|
|
233
|
+
});
|
|
234
|
+
const joinedValues2 = values.join(",");
|
|
235
|
+
switch (style) {
|
|
236
|
+
case "form":
|
|
237
|
+
return `${name}=${joinedValues2}`;
|
|
238
|
+
case "label":
|
|
239
|
+
return `.${joinedValues2}`;
|
|
240
|
+
case "matrix":
|
|
241
|
+
return `;${name}=${joinedValues2}`;
|
|
242
|
+
default:
|
|
243
|
+
return joinedValues2;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
const separator = separatorObjectExplode(style);
|
|
247
|
+
const joinedValues = Object.entries(value).map(
|
|
248
|
+
([key, v]) => serializePrimitiveParam({
|
|
249
|
+
allowReserved,
|
|
250
|
+
name: style === "deepObject" ? `${name}[${key}]` : key,
|
|
251
|
+
value: v
|
|
252
|
+
})
|
|
253
|
+
).join(separator);
|
|
254
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// generated/agent-harness/core/utils.gen.ts
|
|
258
|
+
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
259
|
+
var defaultPathSerializer = ({ path, url: _url }) => {
|
|
260
|
+
let url = _url;
|
|
261
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
262
|
+
if (matches) {
|
|
263
|
+
for (const match of matches) {
|
|
264
|
+
let explode = false;
|
|
265
|
+
let name = match.substring(1, match.length - 1);
|
|
266
|
+
let style = "simple";
|
|
267
|
+
if (name.endsWith("*")) {
|
|
268
|
+
explode = true;
|
|
269
|
+
name = name.substring(0, name.length - 1);
|
|
270
|
+
}
|
|
271
|
+
if (name.startsWith(".")) {
|
|
272
|
+
name = name.substring(1);
|
|
273
|
+
style = "label";
|
|
274
|
+
} else if (name.startsWith(";")) {
|
|
275
|
+
name = name.substring(1);
|
|
276
|
+
style = "matrix";
|
|
277
|
+
}
|
|
278
|
+
const value = path[name];
|
|
279
|
+
if (value === void 0 || value === null) {
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
if (Array.isArray(value)) {
|
|
283
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
if (typeof value === "object") {
|
|
287
|
+
url = url.replace(
|
|
288
|
+
match,
|
|
289
|
+
serializeObjectParam({
|
|
290
|
+
explode,
|
|
291
|
+
name,
|
|
292
|
+
style,
|
|
293
|
+
value,
|
|
294
|
+
valueOnly: true
|
|
295
|
+
})
|
|
296
|
+
);
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
if (style === "matrix") {
|
|
300
|
+
url = url.replace(
|
|
301
|
+
match,
|
|
302
|
+
`;${serializePrimitiveParam({
|
|
303
|
+
name,
|
|
304
|
+
value
|
|
305
|
+
})}`
|
|
306
|
+
);
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
const replaceValue = encodeURIComponent(
|
|
310
|
+
style === "label" ? `.${value}` : value
|
|
311
|
+
);
|
|
312
|
+
url = url.replace(match, replaceValue);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return url;
|
|
316
|
+
};
|
|
317
|
+
var getUrl = ({
|
|
318
|
+
baseUrl,
|
|
319
|
+
path,
|
|
320
|
+
query,
|
|
321
|
+
querySerializer,
|
|
322
|
+
url: _url
|
|
323
|
+
}) => {
|
|
324
|
+
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
325
|
+
let url = (baseUrl ?? "") + pathUrl;
|
|
326
|
+
if (path) {
|
|
327
|
+
url = defaultPathSerializer({ path, url });
|
|
328
|
+
}
|
|
329
|
+
let search = query ? querySerializer(query) : "";
|
|
330
|
+
if (search.startsWith("?")) {
|
|
331
|
+
search = search.substring(1);
|
|
332
|
+
}
|
|
333
|
+
if (search) {
|
|
334
|
+
url += `?${search}`;
|
|
335
|
+
}
|
|
336
|
+
return url;
|
|
337
|
+
};
|
|
338
|
+
function getValidRequestBody(options) {
|
|
339
|
+
const hasBody = options.body !== void 0;
|
|
340
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
341
|
+
if (isSerializedBody) {
|
|
342
|
+
if ("serializedBody" in options) {
|
|
343
|
+
const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
|
|
344
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
345
|
+
}
|
|
346
|
+
return options.body !== "" ? options.body : null;
|
|
347
|
+
}
|
|
348
|
+
if (hasBody) {
|
|
349
|
+
return options.body;
|
|
350
|
+
}
|
|
351
|
+
return void 0;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// generated/agent-harness/core/auth.gen.ts
|
|
355
|
+
var getAuthToken = async (auth, callback) => {
|
|
356
|
+
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
357
|
+
if (!token) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
if (auth.scheme === "bearer") {
|
|
361
|
+
return `Bearer ${token}`;
|
|
362
|
+
}
|
|
363
|
+
if (auth.scheme === "basic") {
|
|
364
|
+
return `Basic ${btoa(token)}`;
|
|
365
|
+
}
|
|
366
|
+
return token;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// generated/agent-harness/client/utils.gen.ts
|
|
370
|
+
var createQuerySerializer = ({
|
|
371
|
+
parameters = {},
|
|
372
|
+
...args
|
|
373
|
+
} = {}) => {
|
|
374
|
+
const querySerializer = (queryParams) => {
|
|
375
|
+
const search = [];
|
|
376
|
+
if (queryParams && typeof queryParams === "object") {
|
|
377
|
+
for (const name in queryParams) {
|
|
378
|
+
const value = queryParams[name];
|
|
379
|
+
if (value === void 0 || value === null) {
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
const options = parameters[name] || args;
|
|
383
|
+
if (Array.isArray(value)) {
|
|
384
|
+
const serializedArray = serializeArrayParam({
|
|
385
|
+
allowReserved: options.allowReserved,
|
|
386
|
+
explode: true,
|
|
387
|
+
name,
|
|
388
|
+
style: "form",
|
|
389
|
+
value,
|
|
390
|
+
...options.array
|
|
391
|
+
});
|
|
392
|
+
if (serializedArray) search.push(serializedArray);
|
|
393
|
+
} else if (typeof value === "object") {
|
|
394
|
+
const serializedObject = serializeObjectParam({
|
|
395
|
+
allowReserved: options.allowReserved,
|
|
396
|
+
explode: true,
|
|
397
|
+
name,
|
|
398
|
+
style: "deepObject",
|
|
399
|
+
value,
|
|
400
|
+
...options.object
|
|
401
|
+
});
|
|
402
|
+
if (serializedObject) search.push(serializedObject);
|
|
403
|
+
} else {
|
|
404
|
+
const serializedPrimitive = serializePrimitiveParam({
|
|
405
|
+
allowReserved: options.allowReserved,
|
|
406
|
+
name,
|
|
407
|
+
value
|
|
408
|
+
});
|
|
409
|
+
if (serializedPrimitive) search.push(serializedPrimitive);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return search.join("&");
|
|
414
|
+
};
|
|
415
|
+
return querySerializer;
|
|
416
|
+
};
|
|
417
|
+
var getParseAs = (contentType) => {
|
|
418
|
+
if (!contentType) {
|
|
419
|
+
return "stream";
|
|
420
|
+
}
|
|
421
|
+
const cleanContent = contentType.split(";")[0]?.trim();
|
|
422
|
+
if (!cleanContent) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
|
|
426
|
+
return "json";
|
|
427
|
+
}
|
|
428
|
+
if (cleanContent === "multipart/form-data") {
|
|
429
|
+
return "formData";
|
|
430
|
+
}
|
|
431
|
+
if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
|
|
432
|
+
return "blob";
|
|
433
|
+
}
|
|
434
|
+
if (cleanContent.startsWith("text/")) {
|
|
435
|
+
return "text";
|
|
436
|
+
}
|
|
437
|
+
return;
|
|
438
|
+
};
|
|
439
|
+
var checkForExistence = (options, name) => {
|
|
440
|
+
if (!name) {
|
|
441
|
+
return false;
|
|
442
|
+
}
|
|
443
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
444
|
+
return true;
|
|
445
|
+
}
|
|
446
|
+
return false;
|
|
447
|
+
};
|
|
448
|
+
async function setAuthParams(options) {
|
|
449
|
+
for (const auth of options.security ?? []) {
|
|
450
|
+
if (checkForExistence(options, auth.name)) {
|
|
451
|
+
continue;
|
|
452
|
+
}
|
|
453
|
+
const token = await getAuthToken(auth, options.auth);
|
|
454
|
+
if (!token) {
|
|
455
|
+
continue;
|
|
456
|
+
}
|
|
457
|
+
const name = auth.name ?? "Authorization";
|
|
458
|
+
switch (auth.in) {
|
|
459
|
+
case "query":
|
|
460
|
+
if (!options.query) {
|
|
461
|
+
options.query = {};
|
|
462
|
+
}
|
|
463
|
+
options.query[name] = token;
|
|
464
|
+
break;
|
|
465
|
+
case "cookie":
|
|
466
|
+
options.headers.append("Cookie", `${name}=${token}`);
|
|
467
|
+
break;
|
|
468
|
+
case "header":
|
|
469
|
+
default:
|
|
470
|
+
options.headers.set(name, token);
|
|
471
|
+
break;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
var buildUrl = (options) => getUrl({
|
|
476
|
+
baseUrl: options.baseUrl,
|
|
477
|
+
path: options.path,
|
|
478
|
+
query: options.query,
|
|
479
|
+
querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
|
|
480
|
+
url: options.url
|
|
481
|
+
});
|
|
482
|
+
var mergeConfigs = (a, b) => {
|
|
483
|
+
const config = { ...a, ...b };
|
|
484
|
+
if (config.baseUrl?.endsWith("/")) {
|
|
485
|
+
config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
486
|
+
}
|
|
487
|
+
config.headers = mergeHeaders(a.headers, b.headers);
|
|
488
|
+
return config;
|
|
489
|
+
};
|
|
490
|
+
var headersEntries = (headers) => {
|
|
491
|
+
const entries = [];
|
|
492
|
+
headers.forEach((value, key) => {
|
|
493
|
+
entries.push([key, value]);
|
|
494
|
+
});
|
|
495
|
+
return entries;
|
|
496
|
+
};
|
|
497
|
+
var mergeHeaders = (...headers) => {
|
|
498
|
+
const mergedHeaders = new Headers();
|
|
499
|
+
for (const header of headers) {
|
|
500
|
+
if (!header) {
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
504
|
+
for (const [key, value] of iterator) {
|
|
505
|
+
if (value === null) {
|
|
506
|
+
mergedHeaders.delete(key);
|
|
507
|
+
} else if (Array.isArray(value)) {
|
|
508
|
+
for (const v of value) {
|
|
509
|
+
mergedHeaders.append(key, v);
|
|
510
|
+
}
|
|
511
|
+
} else if (value !== void 0) {
|
|
512
|
+
mergedHeaders.set(
|
|
513
|
+
key,
|
|
514
|
+
typeof value === "object" ? JSON.stringify(value) : value
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
return mergedHeaders;
|
|
520
|
+
};
|
|
521
|
+
var Interceptors = class {
|
|
522
|
+
fns = [];
|
|
523
|
+
clear() {
|
|
524
|
+
this.fns = [];
|
|
525
|
+
}
|
|
526
|
+
eject(id) {
|
|
527
|
+
const index = this.getInterceptorIndex(id);
|
|
528
|
+
if (this.fns[index]) {
|
|
529
|
+
this.fns[index] = null;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
exists(id) {
|
|
533
|
+
const index = this.getInterceptorIndex(id);
|
|
534
|
+
return Boolean(this.fns[index]);
|
|
535
|
+
}
|
|
536
|
+
getInterceptorIndex(id) {
|
|
537
|
+
if (typeof id === "number") {
|
|
538
|
+
return this.fns[id] ? id : -1;
|
|
539
|
+
}
|
|
540
|
+
return this.fns.indexOf(id);
|
|
541
|
+
}
|
|
542
|
+
update(id, fn) {
|
|
543
|
+
const index = this.getInterceptorIndex(id);
|
|
544
|
+
if (this.fns[index]) {
|
|
545
|
+
this.fns[index] = fn;
|
|
546
|
+
return id;
|
|
547
|
+
}
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
use(fn) {
|
|
551
|
+
this.fns.push(fn);
|
|
552
|
+
return this.fns.length - 1;
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
var createInterceptors = () => ({
|
|
556
|
+
error: new Interceptors(),
|
|
557
|
+
request: new Interceptors(),
|
|
558
|
+
response: new Interceptors()
|
|
559
|
+
});
|
|
560
|
+
var defaultQuerySerializer = createQuerySerializer({
|
|
561
|
+
allowReserved: false,
|
|
562
|
+
array: {
|
|
563
|
+
explode: true,
|
|
564
|
+
style: "form"
|
|
565
|
+
},
|
|
566
|
+
object: {
|
|
567
|
+
explode: true,
|
|
568
|
+
style: "deepObject"
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
var defaultHeaders = {
|
|
572
|
+
"Content-Type": "application/json"
|
|
573
|
+
};
|
|
574
|
+
var createConfig = (override = {}) => ({
|
|
575
|
+
...jsonBodySerializer,
|
|
576
|
+
headers: defaultHeaders,
|
|
577
|
+
parseAs: "auto",
|
|
578
|
+
querySerializer: defaultQuerySerializer,
|
|
579
|
+
...override
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
// generated/agent-harness/client/client.gen.ts
|
|
583
|
+
var createClient = (config = {}) => {
|
|
584
|
+
let _config = mergeConfigs(createConfig(), config);
|
|
585
|
+
const getConfig = () => ({ ..._config });
|
|
586
|
+
const setConfig = (config2) => {
|
|
587
|
+
_config = mergeConfigs(_config, config2);
|
|
588
|
+
return getConfig();
|
|
589
|
+
};
|
|
590
|
+
const interceptors = createInterceptors();
|
|
591
|
+
const beforeRequest = async (options) => {
|
|
592
|
+
const opts = {
|
|
593
|
+
..._config,
|
|
594
|
+
...options,
|
|
595
|
+
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
596
|
+
headers: mergeHeaders(_config.headers, options.headers),
|
|
597
|
+
serializedBody: void 0
|
|
598
|
+
};
|
|
599
|
+
if (opts.security) {
|
|
600
|
+
await setAuthParams(opts);
|
|
601
|
+
}
|
|
602
|
+
if (opts.requestValidator) {
|
|
603
|
+
await opts.requestValidator(opts);
|
|
604
|
+
}
|
|
605
|
+
if (opts.body !== void 0 && opts.bodySerializer) {
|
|
606
|
+
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
607
|
+
}
|
|
608
|
+
if (opts.body === void 0 || opts.serializedBody === "") {
|
|
609
|
+
opts.headers.delete("Content-Type");
|
|
610
|
+
}
|
|
611
|
+
const resolvedOpts = opts;
|
|
612
|
+
const url = buildUrl(resolvedOpts);
|
|
613
|
+
return { opts: resolvedOpts, url };
|
|
614
|
+
};
|
|
615
|
+
const request = async (options) => {
|
|
616
|
+
const throwOnError = options.throwOnError ?? _config.throwOnError;
|
|
617
|
+
const responseStyle = options.responseStyle ?? _config.responseStyle;
|
|
618
|
+
let request2;
|
|
619
|
+
let response;
|
|
620
|
+
try {
|
|
621
|
+
const { opts, url } = await beforeRequest(options);
|
|
622
|
+
const requestInit = {
|
|
623
|
+
redirect: "follow",
|
|
624
|
+
...opts,
|
|
625
|
+
body: getValidRequestBody(opts)
|
|
626
|
+
};
|
|
627
|
+
request2 = new Request(url, requestInit);
|
|
628
|
+
for (const fn of interceptors.request.fns) {
|
|
629
|
+
if (fn) {
|
|
630
|
+
request2 = await fn(request2, opts);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
const _fetch = opts.fetch;
|
|
634
|
+
response = await _fetch(request2);
|
|
635
|
+
for (const fn of interceptors.response.fns) {
|
|
636
|
+
if (fn) {
|
|
637
|
+
response = await fn(response, request2, opts);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
const result = {
|
|
641
|
+
request: request2,
|
|
642
|
+
response
|
|
643
|
+
};
|
|
644
|
+
if (response.ok) {
|
|
645
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
646
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
647
|
+
let emptyData;
|
|
648
|
+
switch (parseAs) {
|
|
649
|
+
case "arrayBuffer":
|
|
650
|
+
case "blob":
|
|
651
|
+
case "text":
|
|
652
|
+
emptyData = await response[parseAs]();
|
|
653
|
+
break;
|
|
654
|
+
case "formData":
|
|
655
|
+
emptyData = new FormData();
|
|
656
|
+
break;
|
|
657
|
+
case "stream":
|
|
658
|
+
emptyData = response.body;
|
|
659
|
+
break;
|
|
660
|
+
case "json":
|
|
661
|
+
default:
|
|
662
|
+
emptyData = {};
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
return opts.responseStyle === "data" ? emptyData : {
|
|
666
|
+
data: emptyData,
|
|
667
|
+
...result
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
let data;
|
|
671
|
+
switch (parseAs) {
|
|
672
|
+
case "arrayBuffer":
|
|
673
|
+
case "blob":
|
|
674
|
+
case "formData":
|
|
675
|
+
case "text":
|
|
676
|
+
data = await response[parseAs]();
|
|
677
|
+
break;
|
|
678
|
+
case "json": {
|
|
679
|
+
const text = await response.text();
|
|
680
|
+
data = text ? JSON.parse(text) : {};
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
case "stream":
|
|
684
|
+
return opts.responseStyle === "data" ? response.body : {
|
|
685
|
+
data: response.body,
|
|
686
|
+
...result
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
if (parseAs === "json") {
|
|
690
|
+
if (opts.responseValidator) {
|
|
691
|
+
await opts.responseValidator(data);
|
|
692
|
+
}
|
|
693
|
+
if (opts.responseTransformer) {
|
|
694
|
+
data = await opts.responseTransformer(data);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
return opts.responseStyle === "data" ? data : {
|
|
698
|
+
data,
|
|
699
|
+
...result
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
const textError = await response.text();
|
|
703
|
+
let jsonError;
|
|
704
|
+
try {
|
|
705
|
+
jsonError = JSON.parse(textError);
|
|
706
|
+
} catch {
|
|
707
|
+
}
|
|
708
|
+
throw jsonError ?? textError;
|
|
709
|
+
} catch (error) {
|
|
710
|
+
let finalError = error;
|
|
711
|
+
for (const fn of interceptors.error.fns) {
|
|
712
|
+
if (fn) {
|
|
713
|
+
finalError = await fn(finalError, response, request2, options);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
finalError = finalError || {};
|
|
717
|
+
if (throwOnError) {
|
|
718
|
+
throw finalError;
|
|
719
|
+
}
|
|
720
|
+
return responseStyle === "data" ? void 0 : {
|
|
721
|
+
error: finalError,
|
|
722
|
+
request: request2,
|
|
723
|
+
response
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
728
|
+
const makeSseFn = (method) => async (options) => {
|
|
729
|
+
const { opts, url } = await beforeRequest(options);
|
|
730
|
+
return createSseClient({
|
|
731
|
+
...opts,
|
|
732
|
+
body: opts.body,
|
|
733
|
+
method,
|
|
734
|
+
onRequest: async (url2, init) => {
|
|
735
|
+
let request2 = new Request(url2, init);
|
|
736
|
+
for (const fn of interceptors.request.fns) {
|
|
737
|
+
if (fn) {
|
|
738
|
+
request2 = await fn(request2, opts);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return request2;
|
|
742
|
+
},
|
|
743
|
+
serializedBody: getValidRequestBody(opts),
|
|
744
|
+
url
|
|
745
|
+
});
|
|
746
|
+
};
|
|
747
|
+
const _buildUrl = (options) => buildUrl({ ..._config, ...options });
|
|
748
|
+
return {
|
|
749
|
+
buildUrl: _buildUrl,
|
|
750
|
+
connect: makeMethodFn("CONNECT"),
|
|
751
|
+
delete: makeMethodFn("DELETE"),
|
|
752
|
+
get: makeMethodFn("GET"),
|
|
753
|
+
getConfig,
|
|
754
|
+
head: makeMethodFn("HEAD"),
|
|
755
|
+
interceptors,
|
|
756
|
+
options: makeMethodFn("OPTIONS"),
|
|
757
|
+
patch: makeMethodFn("PATCH"),
|
|
758
|
+
post: makeMethodFn("POST"),
|
|
759
|
+
put: makeMethodFn("PUT"),
|
|
760
|
+
request,
|
|
761
|
+
setConfig,
|
|
762
|
+
sse: {
|
|
763
|
+
connect: makeSseFn("CONNECT"),
|
|
764
|
+
delete: makeSseFn("DELETE"),
|
|
765
|
+
get: makeSseFn("GET"),
|
|
766
|
+
head: makeSseFn("HEAD"),
|
|
767
|
+
options: makeSseFn("OPTIONS"),
|
|
768
|
+
patch: makeSseFn("PATCH"),
|
|
769
|
+
post: makeSseFn("POST"),
|
|
770
|
+
put: makeSseFn("PUT"),
|
|
771
|
+
trace: makeSseFn("TRACE")
|
|
772
|
+
},
|
|
773
|
+
trace: makeMethodFn("TRACE")
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
// generated/agent-harness/client.gen.ts
|
|
778
|
+
var client = createClient(createConfig());
|
|
779
|
+
|
|
780
|
+
// generated/agent-harness/sdk.gen.ts
|
|
781
|
+
var HeyApiClient = class {
|
|
782
|
+
client;
|
|
783
|
+
constructor(args) {
|
|
784
|
+
this.client = args?.client ?? client;
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
var HeyApiRegistry = class {
|
|
788
|
+
defaultKey = "default";
|
|
789
|
+
instances = /* @__PURE__ */ new Map();
|
|
790
|
+
get(key) {
|
|
791
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
792
|
+
if (!instance) {
|
|
793
|
+
throw new Error(`No SDK client found. Create one with "new Sdk()" to fix this error.`);
|
|
794
|
+
}
|
|
795
|
+
return instance;
|
|
796
|
+
}
|
|
797
|
+
set(value, key) {
|
|
798
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
var Sdk = class _Sdk extends HeyApiClient {
|
|
802
|
+
static __registry = new HeyApiRegistry();
|
|
803
|
+
constructor(args) {
|
|
804
|
+
super(args);
|
|
805
|
+
_Sdk.__registry.set(this, args?.key);
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Read which triggers archive the caller's sessions by default.
|
|
809
|
+
*/
|
|
810
|
+
getAgentAutoArchivePreferences(options) {
|
|
811
|
+
return (options?.client ?? this.client).get({ url: "/agent-auto-archive-preferences", ...options });
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Replace which triggers archive the caller's sessions by default.
|
|
815
|
+
*/
|
|
816
|
+
putAgentAutoArchivePreferences(options) {
|
|
817
|
+
return (options.client ?? this.client).put({
|
|
818
|
+
url: "/agent-auto-archive-preferences",
|
|
819
|
+
...options,
|
|
820
|
+
headers: {
|
|
821
|
+
"Content-Type": "application/json",
|
|
822
|
+
...options.headers
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Probe one provider's ACP session configuration without persisting a session.
|
|
828
|
+
*/
|
|
829
|
+
discoverAgentCapabilitiesHandler(options) {
|
|
830
|
+
return (options.client ?? this.client).post({
|
|
831
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
832
|
+
url: "/agent-capabilities/discover",
|
|
833
|
+
...options,
|
|
834
|
+
headers: {
|
|
835
|
+
"Content-Type": "application/json",
|
|
836
|
+
...options.headers
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Read what the caller's new coding sessions are told to do beyond their assignment.
|
|
842
|
+
*/
|
|
843
|
+
getAgentCodingPreferences(options) {
|
|
844
|
+
return (options?.client ?? this.client).get({ url: "/agent-coding-preferences", ...options });
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Replace the caller's coding preferences.
|
|
848
|
+
*/
|
|
849
|
+
putAgentCodingPreferences(options) {
|
|
850
|
+
return (options.client ?? this.client).put({
|
|
851
|
+
url: "/agent-coding-preferences",
|
|
852
|
+
...options,
|
|
853
|
+
headers: {
|
|
854
|
+
"Content-Type": "application/json",
|
|
855
|
+
...options.headers
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* The agent conversations in a channel the caller may see. Ordinary channels
|
|
861
|
+
* and other people's conversations list none.
|
|
862
|
+
*/
|
|
863
|
+
listAgentConversations(options) {
|
|
864
|
+
return (options.client ?? this.client).get({
|
|
865
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
866
|
+
url: "/agent-conversations/{channel_id}",
|
|
867
|
+
...options
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Start a fresh agent context, retaining the channel transcript.
|
|
872
|
+
*/
|
|
873
|
+
startFreshAgentConversation(options) {
|
|
874
|
+
return (options.client ?? this.client).post({
|
|
875
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
876
|
+
url: "/agent-conversations/{channel_id}/{bot_id}/start-fresh",
|
|
877
|
+
...options,
|
|
878
|
+
headers: {
|
|
879
|
+
"Content-Type": "application/json",
|
|
880
|
+
...options.headers
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Explicitly retry a failed message in the conversation's current session.
|
|
886
|
+
*/
|
|
887
|
+
retryAgentConversationTurn(options) {
|
|
888
|
+
return (options.client ?? this.client).post({
|
|
889
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
890
|
+
url: "/agent-conversations/{channel_id}/{bot_id}/turns/{source}/retry",
|
|
891
|
+
...options,
|
|
892
|
+
headers: {
|
|
893
|
+
"Content-Type": "application/json",
|
|
894
|
+
...options.headers
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Choose whether a composer prompt goes to a chat or a coding agent.
|
|
900
|
+
*/
|
|
901
|
+
chooseAgentMode(options) {
|
|
902
|
+
return (options.client ?? this.client).post({
|
|
903
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
904
|
+
url: "/agent-mode-choice",
|
|
905
|
+
...options,
|
|
906
|
+
headers: {
|
|
907
|
+
"Content-Type": "application/json",
|
|
908
|
+
...options.headers
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Probe one provider's model catalog without creating an agent session.
|
|
914
|
+
*/
|
|
915
|
+
loadAgentModelsHandler(options) {
|
|
916
|
+
return (options.client ?? this.client).post({
|
|
917
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
918
|
+
url: "/agent-models/load",
|
|
919
|
+
...options,
|
|
920
|
+
headers: {
|
|
921
|
+
"Content-Type": "application/json",
|
|
922
|
+
...options.headers
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* List the GitHub repositories the caller can select for a coding session.
|
|
928
|
+
*/
|
|
929
|
+
listAgentRepositories(options) {
|
|
930
|
+
return (options?.client ?? this.client).get({
|
|
931
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
932
|
+
url: "/agent-repositories",
|
|
933
|
+
...options
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* List the branches on one repository the caller can start a session from.
|
|
938
|
+
*/
|
|
939
|
+
listAgentRepositoryBranches(options) {
|
|
940
|
+
return (options.client ?? this.client).get({
|
|
941
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
942
|
+
url: "/agent-repositories/branches",
|
|
943
|
+
...options
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Read the caller's default sandbox size for new `@coder` sessions.
|
|
948
|
+
*/
|
|
949
|
+
getAgentSandboxSize(options) {
|
|
950
|
+
return (options?.client ?? this.client).get({ url: "/agent-sandbox-size", ...options });
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Set the caller's default sandbox size for the next `@coder` mention.
|
|
954
|
+
*/
|
|
955
|
+
putAgentSandboxSize(options) {
|
|
956
|
+
return (options.client ?? this.client).put({
|
|
957
|
+
url: "/agent-sandbox-size",
|
|
958
|
+
...options,
|
|
959
|
+
headers: {
|
|
960
|
+
"Content-Type": "application/json",
|
|
961
|
+
...options.headers
|
|
962
|
+
}
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Open an agent session served by an external runtime.
|
|
967
|
+
*
|
|
968
|
+
* Nothing here tells the runtime where to dial: one connection per bot
|
|
969
|
+
* carries every session it runs, so a runtime that has already dialed serves
|
|
970
|
+
* this session too, and one that has not dials the gateway its own
|
|
971
|
+
* configuration names. The triggering mention reaches the session as its
|
|
972
|
+
* first prompt through the control endpoint.
|
|
973
|
+
*/
|
|
974
|
+
createAgentSession(options) {
|
|
975
|
+
return (options.client ?? this.client).post({
|
|
976
|
+
url: "/agent-sessions",
|
|
977
|
+
...options,
|
|
978
|
+
headers: {
|
|
979
|
+
"Content-Type": "application/json",
|
|
980
|
+
...options.headers
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* List the sessions associated with a pull request that the caller can view.
|
|
986
|
+
*/
|
|
987
|
+
agentSessionsForPullRequest(options) {
|
|
988
|
+
return (options.client ?? this.client).post({
|
|
989
|
+
url: "/agent-sessions/by-pull-request",
|
|
990
|
+
...options,
|
|
991
|
+
headers: {
|
|
992
|
+
"Content-Type": "application/json",
|
|
993
|
+
...options.headers
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* List the sessions associated with each of up to 100 pull requests that the caller can view,
|
|
999
|
+
* with the thread each session was started from.
|
|
1000
|
+
*/
|
|
1001
|
+
agentSessionsForPullRequests(options) {
|
|
1002
|
+
return (options.client ?? this.client).post({
|
|
1003
|
+
url: "/agent-sessions/by-pull-requests",
|
|
1004
|
+
...options,
|
|
1005
|
+
headers: {
|
|
1006
|
+
"Content-Type": "application/json",
|
|
1007
|
+
...options.headers
|
|
1008
|
+
}
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Preview a batch of agent sessions for rendering chips.
|
|
1013
|
+
*
|
|
1014
|
+
* No per-id access extractor: a chip has to render for a session the caller
|
|
1015
|
+
* cannot open, so access is answered per id in the body rather than
|
|
1016
|
+
* enforced on the request. The caller learns the fields a chip shows for
|
|
1017
|
+
* sessions they may view, and only existence for the rest.
|
|
1018
|
+
*/
|
|
1019
|
+
previewAgentSessions(options) {
|
|
1020
|
+
return (options.client ?? this.client).post({
|
|
1021
|
+
url: "/agent-sessions/preview",
|
|
1022
|
+
...options,
|
|
1023
|
+
headers: {
|
|
1024
|
+
"Content-Type": "application/json",
|
|
1025
|
+
...options.headers
|
|
1026
|
+
}
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* The caller's coding sessions waiting for their answer, or stalled for over 20 minutes,
|
|
1031
|
+
* newest activity first.
|
|
1032
|
+
*/
|
|
1033
|
+
listAgentSessionUpdates(options) {
|
|
1034
|
+
return (options?.client ?? this.client).get({ url: "/agent-sessions/updates", ...options });
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Prepare MCP connections without sending a prompt or creating a visible list row.
|
|
1038
|
+
*/
|
|
1039
|
+
warmAgentSessionHandler(options) {
|
|
1040
|
+
return (options.client ?? this.client).post({
|
|
1041
|
+
url: "/agent-sessions/warm",
|
|
1042
|
+
...options,
|
|
1043
|
+
headers: {
|
|
1044
|
+
"Content-Type": "application/json",
|
|
1045
|
+
...options.headers
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Delete an agent session and its live resources.
|
|
1051
|
+
*/
|
|
1052
|
+
deleteAgentSession(options) {
|
|
1053
|
+
return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}", ...options });
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Get an agent session by id.
|
|
1057
|
+
*
|
|
1058
|
+
* A caller holding no grant is answered 401; an id with no session behind it
|
|
1059
|
+
* at all is answered 404. They used to be the same answer, which left a
|
|
1060
|
+
* client that read a session before its create had landed unable to tell a
|
|
1061
|
+
* race it should retry from a refusal it should not.
|
|
1062
|
+
*/
|
|
1063
|
+
getAgentSession(options) {
|
|
1064
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}", ...options });
|
|
1065
|
+
}
|
|
1066
|
+
/**
|
|
1067
|
+
* Read activity using the same visibility capability as the session transcript.
|
|
1068
|
+
*/
|
|
1069
|
+
getAgentSessionActivity(options) {
|
|
1070
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/activity", ...options });
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Continue the session now that its owner connected an app it asked for.
|
|
1074
|
+
*
|
|
1075
|
+
* The harness produces an `app.connected` system event, which the transcript
|
|
1076
|
+
* shows as no prompt; it starts a turn once the session is idle.
|
|
1077
|
+
*/
|
|
1078
|
+
reportAgentSessionAppConnected(options) {
|
|
1079
|
+
return (options.client ?? this.client).post({
|
|
1080
|
+
url: "/agent-sessions/{session_id}/app-connections",
|
|
1081
|
+
...options,
|
|
1082
|
+
headers: {
|
|
1083
|
+
"Content-Type": "application/json",
|
|
1084
|
+
...options.headers
|
|
1085
|
+
}
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Archive or unarchive an agent session.
|
|
1090
|
+
*/
|
|
1091
|
+
setAgentSessionArchived(options) {
|
|
1092
|
+
return (options.client ?? this.client).put({
|
|
1093
|
+
url: "/agent-sessions/{session_id}/archived",
|
|
1094
|
+
...options,
|
|
1095
|
+
headers: {
|
|
1096
|
+
"Content-Type": "application/json",
|
|
1097
|
+
...options.headers
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Read a session's auto-archive settings and whether a trigger archived it.
|
|
1103
|
+
*/
|
|
1104
|
+
getAgentSessionAutoArchive(options) {
|
|
1105
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/auto-archive", ...options });
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Replace a session's own auto-archive choices. Owner only.
|
|
1109
|
+
*/
|
|
1110
|
+
putAgentSessionAutoArchive(options) {
|
|
1111
|
+
return (options.client ?? this.client).put({
|
|
1112
|
+
url: "/agent-sessions/{session_id}/auto-archive",
|
|
1113
|
+
...options,
|
|
1114
|
+
headers: {
|
|
1115
|
+
"Content-Type": "application/json",
|
|
1116
|
+
...options.headers
|
|
1117
|
+
}
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* The latest captured changes of an agent session: the changed files with
|
|
1122
|
+
* statuses and line counts, and how the latest capture attempt went.
|
|
1123
|
+
*/
|
|
1124
|
+
getAgentSessionChanges(options) {
|
|
1125
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/changes", ...options });
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* The unified diff behind the session's latest changeset.
|
|
1129
|
+
*/
|
|
1130
|
+
getAgentSessionChangesPatch(options) {
|
|
1131
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/changes/patch", ...options });
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Capture the session's changes again now. Answers at once with the state
|
|
1135
|
+
* as it stands; the capture runs on and viewers are told when it lands.
|
|
1136
|
+
*/
|
|
1137
|
+
refreshAgentSessionChanges(options) {
|
|
1138
|
+
return (options.client ?? this.client).post({ url: "/agent-sessions/{session_id}/changes/refresh", ...options });
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Fetch one execution only after the caller has obtained view access to its session.
|
|
1142
|
+
*/
|
|
1143
|
+
getCodeExecution(options) {
|
|
1144
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}", ...options });
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* List the connected apps and custom MCP servers the session's agent may use.
|
|
1148
|
+
*/
|
|
1149
|
+
listExecutionConnectedApps(options) {
|
|
1150
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps", ...options });
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Search the connectable app catalog, or inspect one app's tools and connection status.
|
|
1154
|
+
*/
|
|
1155
|
+
discoverConnectedApps(options) {
|
|
1156
|
+
return (options.client ?? this.client).post({
|
|
1157
|
+
url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/discover",
|
|
1158
|
+
...options,
|
|
1159
|
+
headers: {
|
|
1160
|
+
"Content-Type": "application/json",
|
|
1161
|
+
...options.headers
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Add a custom MCP server to the execution account's connections.
|
|
1167
|
+
*/
|
|
1168
|
+
addConnectedMcpServer(options) {
|
|
1169
|
+
return (options.client ?? this.client).post({
|
|
1170
|
+
url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/servers",
|
|
1171
|
+
...options,
|
|
1172
|
+
headers: {
|
|
1173
|
+
"Content-Type": "application/json",
|
|
1174
|
+
...options.headers
|
|
1175
|
+
}
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Find tools across the agent's connected apps by keywords.
|
|
1180
|
+
*/
|
|
1181
|
+
searchConnectedAppTools(options) {
|
|
1182
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/tools", ...options });
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Call one tool of a connected app as the execution's account.
|
|
1186
|
+
*/
|
|
1187
|
+
callConnectedAppTool(options) {
|
|
1188
|
+
return (options.client ?? this.client).post({
|
|
1189
|
+
url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/{kind}/{key}/calls",
|
|
1190
|
+
...options,
|
|
1191
|
+
headers: {
|
|
1192
|
+
"Content-Type": "application/json",
|
|
1193
|
+
...options.headers
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* List the tools one connected app serves.
|
|
1199
|
+
*/
|
|
1200
|
+
listConnectedAppTools(options) {
|
|
1201
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/{kind}/{key}/tools", ...options });
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* List blocks created during an execution, including interrupted executions.
|
|
1205
|
+
*/
|
|
1206
|
+
listExecutionReviews(options) {
|
|
1207
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/reviews", ...options });
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Perform a control operation on a live agent session.
|
|
1211
|
+
*
|
|
1212
|
+
* Edit access suffices: whoever can prompt the bot through its thread can
|
|
1213
|
+
* prompt it here.
|
|
1214
|
+
*
|
|
1215
|
+
* A caller may name the action with `actionId`; the response echoes it.
|
|
1216
|
+
* Re-posting an id the session still holds queued or in flight reports that
|
|
1217
|
+
* action's status rather than accepting a duplicate.
|
|
1218
|
+
*/
|
|
1219
|
+
controlAgentSession(options) {
|
|
1220
|
+
return (options.client ?? this.client).post({
|
|
1221
|
+
url: "/agent-sessions/{session_id}/control",
|
|
1222
|
+
...options,
|
|
1223
|
+
headers: {
|
|
1224
|
+
"Content-Type": "application/json",
|
|
1225
|
+
...options.headers
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* The raw protocol log of one agent session.
|
|
1231
|
+
*
|
|
1232
|
+
* Served unfolded from the latest successful load initialization, or the
|
|
1233
|
+
* beginning when no load succeeded. Consumers stage load attempts so failed
|
|
1234
|
+
* or interrupted replay does not become visible conversation content.
|
|
1235
|
+
*
|
|
1236
|
+
* An unknown session is an error: the response has to name the session's
|
|
1237
|
+
* agent, and a session that never existed has none to name.
|
|
1238
|
+
*/
|
|
1239
|
+
getAgentSessionLog(options) {
|
|
1240
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/log", ...options });
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* One agent session's history folded into renderable messages: the same
|
|
1244
|
+
* fold the web client runs over [`get_agent_session_log_handler`]'s frames.
|
|
1245
|
+
*
|
|
1246
|
+
* For readers that do not run the fold themselves, such as SDK programs and
|
|
1247
|
+
* agents reading another session's history.
|
|
1248
|
+
*/
|
|
1249
|
+
getAgentSessionFoldedLog(options) {
|
|
1250
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/log/folded", ...options });
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* Rename an agent session.
|
|
1254
|
+
*/
|
|
1255
|
+
renameAgentSession(options) {
|
|
1256
|
+
return (options.client ?? this.client).put({
|
|
1257
|
+
url: "/agent-sessions/{session_id}/name",
|
|
1258
|
+
...options,
|
|
1259
|
+
headers: {
|
|
1260
|
+
"Content-Type": "application/json",
|
|
1261
|
+
...options.headers
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Read sharing settings for a session the caller can view.
|
|
1267
|
+
*/
|
|
1268
|
+
getAgentSessionPermissions(options) {
|
|
1269
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/permissions", ...options });
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Update link, channel, or team sharing after owner authorization.
|
|
1273
|
+
*/
|
|
1274
|
+
updateAgentSessionPermissions(options) {
|
|
1275
|
+
return (options.client ?? this.client).patch({
|
|
1276
|
+
url: "/agent-sessions/{session_id}/permissions",
|
|
1277
|
+
...options,
|
|
1278
|
+
headers: {
|
|
1279
|
+
"Content-Type": "application/json",
|
|
1280
|
+
...options.headers
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Unlink a pull request a person linked to a session the caller can edit. The pull request
|
|
1286
|
+
* the session's agent opened stays linked.
|
|
1287
|
+
*/
|
|
1288
|
+
unlinkAgentSessionPullRequest(options) {
|
|
1289
|
+
return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}/pull-requests", ...options });
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* List the pull requests associated with a session the caller can view.
|
|
1293
|
+
*/
|
|
1294
|
+
listAgentSessionPullRequests(options) {
|
|
1295
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/pull-requests", ...options });
|
|
1296
|
+
}
|
|
1297
|
+
/**
|
|
1298
|
+
* Link a pull request to a session the caller can edit.
|
|
1299
|
+
*/
|
|
1300
|
+
linkAgentSessionPullRequest(options) {
|
|
1301
|
+
return (options.client ?? this.client).put({
|
|
1302
|
+
url: "/agent-sessions/{session_id}/pull-requests",
|
|
1303
|
+
...options,
|
|
1304
|
+
headers: {
|
|
1305
|
+
"Content-Type": "application/json",
|
|
1306
|
+
...options.headers
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* The actions waiting to dispatch in this session, oldest first.
|
|
1312
|
+
*/
|
|
1313
|
+
getAgentSessionQueue(options) {
|
|
1314
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/queue", ...options });
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Remove a queued action before it dispatches. There is no un-sending: an
|
|
1318
|
+
* action that already went out answers 404.
|
|
1319
|
+
*/
|
|
1320
|
+
removeQueuedAction(options) {
|
|
1321
|
+
return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}/queue/{action_id}", ...options });
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* Replace a queued prompt's text before it dispatches.
|
|
1325
|
+
*/
|
|
1326
|
+
editQueuedAction(options) {
|
|
1327
|
+
return (options.client ?? this.client).put({
|
|
1328
|
+
url: "/agent-sessions/{session_id}/queue/{action_id}",
|
|
1329
|
+
...options,
|
|
1330
|
+
headers: {
|
|
1331
|
+
"Content-Type": "application/json",
|
|
1332
|
+
...options.headers
|
|
1333
|
+
}
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Run a queued action next. Moves it ahead of the rest of the queue and
|
|
1338
|
+
* cancels the turn in flight, so this entry dispatches when that turn ends.
|
|
1339
|
+
*/
|
|
1340
|
+
steerQueuedAction(options) {
|
|
1341
|
+
return (options.client ?? this.client).post({ url: "/agent-sessions/{session_id}/queue/{action_id}/steer", ...options });
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Persist a review without keeping the agent turn blocked.
|
|
1345
|
+
*/
|
|
1346
|
+
createSessionReview(options) {
|
|
1347
|
+
return (options.client ?? this.client).post({
|
|
1348
|
+
url: "/agent-sessions/{session_id}/reviews",
|
|
1349
|
+
...options,
|
|
1350
|
+
headers: {
|
|
1351
|
+
"Content-Type": "application/json",
|
|
1352
|
+
...options.headers
|
|
1353
|
+
}
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* Read a persisted interactive block.
|
|
1358
|
+
*/
|
|
1359
|
+
getSessionReview(options) {
|
|
1360
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/reviews/{review_id}", ...options });
|
|
1361
|
+
}
|
|
1362
|
+
/**
|
|
1363
|
+
* Save edits or atomically claim the exact draft revision the user submitted.
|
|
1364
|
+
*/
|
|
1365
|
+
decideSessionReview(options) {
|
|
1366
|
+
return (options.client ?? this.client).post({
|
|
1367
|
+
url: "/agent-sessions/{session_id}/reviews/{review_id}",
|
|
1368
|
+
...options,
|
|
1369
|
+
headers: {
|
|
1370
|
+
"Content-Type": "application/json",
|
|
1371
|
+
...options.headers
|
|
1372
|
+
}
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Resize this session's sandbox and remember the size as the owner's default.
|
|
1377
|
+
*/
|
|
1378
|
+
putAgentSessionSandboxSize(options) {
|
|
1379
|
+
return (options.client ?? this.client).put({
|
|
1380
|
+
url: "/agent-sessions/{session_id}/sandbox-size",
|
|
1381
|
+
...options,
|
|
1382
|
+
headers: {
|
|
1383
|
+
"Content-Type": "application/json",
|
|
1384
|
+
...options.headers
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Link a session the caller owns to a task they can view, replacing any earlier link. The
|
|
1390
|
+
* session's pull request, now or later, is linked to the task.
|
|
1391
|
+
*/
|
|
1392
|
+
linkAgentSessionTask(options) {
|
|
1393
|
+
return (options.client ?? this.client).put({
|
|
1394
|
+
url: "/agent-sessions/{session_id}/task",
|
|
1395
|
+
...options,
|
|
1396
|
+
headers: {
|
|
1397
|
+
"Content-Type": "application/json",
|
|
1398
|
+
...options.headers
|
|
1399
|
+
}
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* Answer a tool call the agent made in a turn somebody other than the
|
|
1404
|
+
* session's owner prompted. Approve and deny are the owner's; cancel is
|
|
1405
|
+
* anyone's with edit access. Agent runs may deny or cancel, but never approve.
|
|
1406
|
+
*/
|
|
1407
|
+
answerAgentSessionToolApproval(options) {
|
|
1408
|
+
return (options.client ?? this.client).post({
|
|
1409
|
+
url: "/agent-sessions/{session_id}/tool-approvals/{approval_id}",
|
|
1410
|
+
...options,
|
|
1411
|
+
headers: {
|
|
1412
|
+
"Content-Type": "application/json",
|
|
1413
|
+
...options.headers
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Open an item in a new pane of the app tab the person who prompted the
|
|
1419
|
+
* running turn typed in. Only a running execution of the session's current
|
|
1420
|
+
* turn may send, as the account it acts as.
|
|
1421
|
+
*/
|
|
1422
|
+
openInApp(options) {
|
|
1423
|
+
return (options.client ?? this.client).post({
|
|
1424
|
+
url: "/agent-sessions/{session_id}/ui-commands",
|
|
1425
|
+
...options,
|
|
1426
|
+
headers: {
|
|
1427
|
+
"Content-Type": "application/json",
|
|
1428
|
+
...options.headers
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Present a view in the session: a review with nothing saved.
|
|
1434
|
+
*/
|
|
1435
|
+
presentSessionView(options) {
|
|
1436
|
+
return (options.client ?? this.client).post({
|
|
1437
|
+
url: "/agent-sessions/{session_id}/views",
|
|
1438
|
+
...options,
|
|
1439
|
+
headers: {
|
|
1440
|
+
"Content-Type": "application/json",
|
|
1441
|
+
...options.headers
|
|
1442
|
+
}
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* End the caller's own registration of a session. Repeating does nothing. It touches only the
|
|
1447
|
+
* caller's own row, so it needs no access to the session: losing access must not strand it.
|
|
1448
|
+
*/
|
|
1449
|
+
unregisterAgentSessionWork(options) {
|
|
1450
|
+
return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}/work-registration", ...options });
|
|
1451
|
+
}
|
|
1452
|
+
/**
|
|
1453
|
+
* Register a session as the caller's work. Requires edit access. Repeating returns the active
|
|
1454
|
+
* registration. Registering does not share the session: viewers who cannot open it do not see
|
|
1455
|
+
* it, so share it too.
|
|
1456
|
+
*/
|
|
1457
|
+
registerAgentSessionWork(options) {
|
|
1458
|
+
return (options.client ?? this.client).put({ url: "/agent-sessions/{session_id}/work-registration", ...options });
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
* List the caller's active registrations of sessions they can still view, newest first.
|
|
1462
|
+
*/
|
|
1463
|
+
listAgentWorkRegistrations(options) {
|
|
1464
|
+
return (options?.client ?? this.client).get({ url: "/agent-work-registrations", ...options });
|
|
1465
|
+
}
|
|
1466
|
+
/**
|
|
1467
|
+
* List the coding agents the caller can start a session as: the same
|
|
1468
|
+
* personas the `ListCodingAgents` tool offers, including built-in ones whose
|
|
1469
|
+
* runtime the caller has connected (Cursor once its key is saved).
|
|
1470
|
+
*/
|
|
1471
|
+
listCodingAgents(options) {
|
|
1472
|
+
return (options?.client ?? this.client).get({
|
|
1473
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1474
|
+
url: "/coding-agents",
|
|
1475
|
+
...options
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* How Claude Code on the computer is paid for.
|
|
1480
|
+
*/
|
|
1481
|
+
getClaudeMode(options) {
|
|
1482
|
+
return (options.client ?? this.client).get({ url: "/harnesses/{harness_id}/claude-mode", ...options });
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Start a Claude sign-in on the computer and return its URL.
|
|
1486
|
+
*/
|
|
1487
|
+
startClaudeSignIn(options) {
|
|
1488
|
+
return (options.client ?? this.client).post({ url: "/harnesses/{harness_id}/claude-sign-in", ...options });
|
|
1489
|
+
}
|
|
1490
|
+
/**
|
|
1491
|
+
* Finish the Claude sign-in with what the user pasted.
|
|
1492
|
+
*/
|
|
1493
|
+
completeClaudeSignIn(options) {
|
|
1494
|
+
return (options.client ?? this.client).post({
|
|
1495
|
+
url: "/harnesses/{harness_id}/claude-sign-in/complete",
|
|
1496
|
+
...options,
|
|
1497
|
+
headers: {
|
|
1498
|
+
"Content-Type": "application/json",
|
|
1499
|
+
...options.headers
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
/**
|
|
1504
|
+
* Forget the computer's Claude credential and return it to Rox credits.
|
|
1505
|
+
*/
|
|
1506
|
+
claudeSignOut(options) {
|
|
1507
|
+
return (options.client ?? this.client).post({ url: "/harnesses/{harness_id}/claude-sign-out", ...options });
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Classify a draft for the authenticated user.
|
|
1511
|
+
*/
|
|
1512
|
+
classify(options) {
|
|
1513
|
+
return (options.client ?? this.client).post({
|
|
1514
|
+
url: "/universal_input/classify",
|
|
1515
|
+
...options,
|
|
1516
|
+
headers: {
|
|
1517
|
+
"Content-Type": "application/json",
|
|
1518
|
+
...options.headers
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Extract editable fields for the authenticated user.
|
|
1524
|
+
*/
|
|
1525
|
+
extract(options) {
|
|
1526
|
+
return (options.client ?? this.client).post({
|
|
1527
|
+
url: "/universal_input/extract",
|
|
1528
|
+
...options,
|
|
1529
|
+
headers: {
|
|
1530
|
+
"Content-Type": "application/json",
|
|
1531
|
+
...options.headers
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
/**
|
|
1536
|
+
* The voices an agent teammate can speak with on calls. Team admins only.
|
|
1537
|
+
*/
|
|
1538
|
+
getAgentVoices(options) {
|
|
1539
|
+
return (options?.client ?? this.client).get({ url: "/voices", ...options });
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
* A catalog voice saying a fixed line, as WAV. Team admins only; the first
|
|
1543
|
+
* play of each voice is billed to the admin's team.
|
|
1544
|
+
*/
|
|
1545
|
+
getAgentVoiceSample(options) {
|
|
1546
|
+
return (options.client ?? this.client).get({ url: "/voices/{model}/sample", ...options });
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
export {
|
|
1551
|
+
Sdk
|
|
1552
|
+
};
|