@deepraxis/sdk 0.1.1-dev.2efda8a → 0.1.1-dev.3266b68

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.
@@ -971,6 +971,20 @@ export const browserViewerHeartbeat = (options) => (options.client ?? client).po
971
971
  ...options.headers
972
972
  }
973
973
  });
974
+ /**
975
+ * 读取会话只读画面帧
976
+ *
977
+ * 读取会话的一张只读画面帧(JPEG 字节)。创建者可读,同组织其他成员只在该会话声明为组织可见时可读;其余情况一律返回 404 SESSION_NOT_FOUND,不提示会话是否存在。响应体没有任何可控制浏览器的凭据,且不接受任何动作参数。
978
+ */
979
+ export const browserGetSessionFrame = (options) => (options.client ?? client).get({
980
+ security: [{
981
+ key: 'BrowserBearer',
982
+ scheme: 'bearer',
983
+ type: 'http'
984
+ }],
985
+ url: '/browser/v1/sessions/{sessionId}/frame',
986
+ ...options
987
+ });
974
988
  /**
975
989
  * 列出浏览器上下文
976
990
  *
@@ -1099,6 +1113,20 @@ export const browserStreamSession = (options) => (options.client ?? client).sse.
1099
1113
  url: '/browser/v1/sessions/{sessionId}/stream',
1100
1114
  ...options
1101
1115
  });
1116
+ /**
1117
+ * 订阅会话只读画面
1118
+ *
1119
+ * SSE:只推送只读画面帧,event 为 frame 或 end,data 为帧的 JSON 或 null;帧 data 是 JPEG 的 base64 编码,ts 是浏览器产生该帧的时刻(epoch 毫秒),约每秒最多 5 帧。评论 ping 每 15 秒一次,end 后关闭。这条通道与 /sessions/{sessionId}/stream 相互独立:它的消息只含画面,绝不含 wsUrl、signingKey、connectUrl、debuggerUrl、debuggerFullscreenUrl。创建者可订阅,同组织其他成员只在该会话声明为组织可见时可订阅;其余情况一律返回 404 SESSION_NOT_FOUND。
1120
+ */
1121
+ export const browserStreamSessionFrames = (options) => (options.client ?? client).sse.get({
1122
+ security: [{
1123
+ key: 'BrowserBearer',
1124
+ scheme: 'bearer',
1125
+ type: 'http'
1126
+ }],
1127
+ url: '/browser/v1/sessions/{sessionId}/frames',
1128
+ ...options
1129
+ });
1102
1130
  /**
1103
1131
  * 读取 Selenium 不支持提示
1104
1132
  *
@@ -8494,7 +8522,7 @@ export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
8494
8522
  /**
8495
8523
  * List assets
8496
8524
  *
8497
- * Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.
8525
+ * Upload content into an active library and return the stored asset. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing asset. Chunk uploads require both chunk headers.
8498
8526
  */
8499
8527
  export const mediaListAssets = (options) => (options.client ?? client).get({
8500
8528
  security: [{
@@ -8850,7 +8878,7 @@ export const mediaGetAssetLineage = (options) => (options.client ?? client).get(
8850
8878
  /**
8851
8879
  * Generate image
8852
8880
  *
8853
- * Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is charged through Router and the job records the charge in usage; nothing is charged for a request refused before it starts. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {"prompt":"A red kite above a calm sea at sunrise","n":1,"output":"sticker"}.
8881
+ * Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage; nothing is charged for a request refused before it starts. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {"prompt":"A red kite above a calm sea at sunrise","n":1,"output":"sticker"}.
8854
8882
  */
8855
8883
  export const mediaGenerateImage = (options) => (options.client ?? client).post({
8856
8884
  security: [{
@@ -8868,7 +8896,7 @@ export const mediaGenerateImage = (options) => (options.client ?? client).post({
8868
8896
  /**
8869
8897
  * Generate video
8870
8898
  *
8871
- * Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; Router is sent a fetchable URL for each, recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is charged per second through Router and the job records the charge in usage; a refused request costs nothing. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {"prompt":"A red kite above a calm sea at sunrise","mode":"text","n":1}.
8899
+ * Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage; a refused request costs nothing. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {"prompt":"A red kite above a calm sea at sunrise","mode":"text","n":1}.
8872
8900
  */
8873
8901
  export const mediaGenerateVideo = (options) => (options.client ?? client).post({
8874
8902
  security: [{
@@ -8886,7 +8914,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
8886
8914
  /**
8887
8915
  * Edit asset
8888
8916
  *
8889
- * Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is charged through Router and the job records the charge in usage. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
8917
+ * Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
8890
8918
  */
8891
8919
  export const mediaEditAsset = (options) => (options.client ?? client).post({
8892
8920
  security: [{
@@ -8904,7 +8932,7 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
8904
8932
  /**
8905
8933
  * Create speech
8906
8934
  *
8907
- * Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak and voice is required; speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. A voice that names a voice material of this library is refused the same way — voice cloning opens with voices.create. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is charged through Router and the job records the charge in usage; a request refused before it starts costs nothing. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {"input":"A red kite above a calm sea at sunrise.","voice":"alloy"}.
8935
+ * Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak and voice is required; speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. A voice that names a voice material of this library is refused the same way — voice cloning opens with voices.create. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is billed by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage; a request refused before it starts costs nothing. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {"input":"A red kite above a calm sea at sunrise.","voice":"alloy"}.
8908
8936
  */
8909
8937
  export const mediaCreateSpeech = (options) => (options.client ?? client).post({
8910
8938
  security: [{
@@ -9934,6 +9962,43 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
9934
9962
  url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
9935
9963
  ...options
9936
9964
  });
9965
+ /**
9966
+ * Get sandbox events
9967
+ *
9968
+ * Read one sandbox's lifecycle events, newest first by default. Unlike every other read on this face, it answers for a sandbox whose machine has ENDED (killed or failed) — a sandbox's cause of death is readable here even after its files are gone. The killed event carries eventData.terminationReason (the platform's own reason: requested, lease_expired, max_running, provider_lost, start_failed, retention, admin, unknown) and eventData.kill_reason (the E2B-shaped bucket: request, timeout, admin, orphaned, unknown); the updated event carries expiresAt. Page with offset, limit (1–100, default 10), orderAsc and repeatable types. An ended sandbox that is never going to come back also answers SANDBOX_EXPIRED (410) with terminationReason on its files and commands.
9969
+ */
9970
+ export const getSandboxEvents = (options) => (options.client ?? client).get({
9971
+ security: [
9972
+ {
9973
+ key: 'sandbox-ApiKeyAuth',
9974
+ name: 'X-API-Key',
9975
+ type: 'apiKey'
9976
+ },
9977
+ {
9978
+ key: 'sandbox-AuthProviderBearerAuth',
9979
+ scheme: 'bearer',
9980
+ type: 'http'
9981
+ },
9982
+ {
9983
+ key: 'sandbox-AuthProviderTeamAuth',
9984
+ name: 'X-Team-ID',
9985
+ type: 'apiKey'
9986
+ },
9987
+ { name: 'X-Admin-Token', type: 'apiKey' },
9988
+ {
9989
+ key: 'sandbox-AdminTeamAuth',
9990
+ name: 'X-Team-ID',
9991
+ type: 'apiKey'
9992
+ },
9993
+ {
9994
+ key: 'sandbox-AdminJWTAuth',
9995
+ scheme: 'bearer',
9996
+ type: 'http'
9997
+ }
9998
+ ],
9999
+ url: '/sandbox/v1/events/sandboxes/{sandboxID}',
10000
+ ...options
10001
+ });
9937
10002
  /**
9938
10003
  * Start template build (v2)
9939
10004
  *
@@ -12796,3 +12861,21 @@ export const ticketGetRepositories = (options) => (options?.client ?? client).ge
12796
12861
  url: '/ticket/v1/repositories',
12797
12862
  ...options
12798
12863
  });
12864
+ /**
12865
+ * Update repositories
12866
+ *
12867
+ * Update repositories within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
12868
+ */
12869
+ export const ticketPatchRepositoriesId = (options) => (options.client ?? client).patch({
12870
+ security: [{
12871
+ key: 'BearerAuth',
12872
+ scheme: 'bearer',
12873
+ type: 'http'
12874
+ }, {
12875
+ key: 'ApiKeyAuth',
12876
+ name: 'X-API-Key',
12877
+ type: 'apiKey'
12878
+ }],
12879
+ url: '/ticket/v1/repositories/{id}',
12880
+ ...options
12881
+ });