@deepraxis/sdk 0.1.1-dev.ea5b65f → 0.1.1-dev.ea6154a
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/METHODS.md +91 -1
- package/dist/core/binary-operations.d.ts +3 -0
- package/dist/core/binary-operations.js +14 -0
- package/dist/core/transport.js +8 -4
- package/dist/generated/binary-operations.gen.d.ts +3 -0
- package/dist/generated/binary-operations.gen.js +14 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +157 -31
- package/dist/generated/sdk.gen.js +384 -30
- package/dist/generated/types.gen.d.ts +4665 -625
- package/dist/helpers/application-publish.js +16 -2
- package/dist/helpers/browser-connect-error.d.ts +28 -0
- package/dist/helpers/browser-connect-error.js +74 -0
- package/dist/helpers/browser-connect.d.ts +2 -0
- package/dist/helpers/browser-connect.js +36 -42
- package/dist/helpers/browser-decisions.d.ts +13 -0
- package/dist/helpers/browser-decisions.js +11 -0
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +4 -2
- package/dist/operations.generated.js +726 -48
- package/dist/resources.generated.d.ts +965 -218
- package/dist/resources.generated.js +53 -0
- package/package.json +1 -1
|
@@ -357,10 +357,46 @@ export const getAgentAppearance = (options) => (options.client ?? client).get({
|
|
|
357
357
|
url: '/agent/v1/agents/{agent_id}/appearance',
|
|
358
358
|
...options
|
|
359
359
|
});
|
|
360
|
+
/**
|
|
361
|
+
* Retrieve agent phone
|
|
362
|
+
*
|
|
363
|
+
* Read the agent's phone, or learn that it has none: use it before driving the phone or to show its state in a settings page. configured says whether a phone block is saved at all (false is not an error: the phone is off). A cloud phone's state is one of none, starting, booting, restoring, running, archiving or releasing — none means no instance exists (never built, already released, or gone), archiving means its app state is being packed, and releasing means a release was asked for and the cron has not finished. A BYOD phone (the organization's own device) has two states instead, online and offline, and reports byod_device as its byd_… id, sku null and no lease. sku and name come from the configuration when one exists. When a cloud phone is reachable, sandbox_id is the public sandbox id of its running instance; for a BYOD phone sandbox_id is the byd_… id itself: take either phone over through POST /sandbox/v1/sandboxes/{id}/act, or open the sandbox page's screen tab in the Console; lease_ends_at is when a cloud instance's lease runs out and the sandbox kills it, and is always null for a BYOD phone. archived_at and archive_error describe the last app-state archive, which a fresh instance restores on the next use; both are null for a BYOD phone, which is never archived. Reading never builds a phone. Only a general or assume agent may have one: a service agent, an agent of another organization and a missing agent all answer 404 AGENT_NOT_FOUND. This operation is for people and their tools — the model cannot call it; an agent drives its own phone only through its phone tool, which can act on the device but cannot read this state or release it.
|
|
364
|
+
*/
|
|
365
|
+
export const agentsPhoneRetrieve = (options) => (options.client ?? client).get({
|
|
366
|
+
security: [{
|
|
367
|
+
key: 'BearerAuth',
|
|
368
|
+
scheme: 'bearer',
|
|
369
|
+
type: 'http'
|
|
370
|
+
}, {
|
|
371
|
+
key: 'ApiKeyAuth',
|
|
372
|
+
name: 'X-API-Key',
|
|
373
|
+
type: 'apiKey'
|
|
374
|
+
}],
|
|
375
|
+
url: '/agent/v1/agents/{agent_id}/phone',
|
|
376
|
+
...options
|
|
377
|
+
});
|
|
378
|
+
/**
|
|
379
|
+
* Release agent phone
|
|
380
|
+
*
|
|
381
|
+
* Ask for the agent's cloud phone to go, and answer its state afterwards. The phone is not killed here: its app state is packed first (state archiving), then the instance is killed and the row cleared, so the state answers releasing until that sweep finishes and the next use builds a fresh instance and restores the archive. The configuration is never deleted — the phone block stays and turning the phone off is agents.update with phone null, a different door. With no phone configured, or one that was never built (state none), the call changes nothing and answers none, so it is safe to repeat; repeating it while a release is pending is idempotent. A BYOD phone (the organization's own device) is not the platform's to kill, so the call changes nothing and answers online or offline. Only a general or assume agent may have a phone: a service agent, an agent of another organization and a missing agent all answer 404 AGENT_NOT_FOUND. This operation is for people and their tools — the model cannot call it.
|
|
382
|
+
*/
|
|
383
|
+
export const agentsPhoneRelease = (options) => (options.client ?? client).post({
|
|
384
|
+
security: [{
|
|
385
|
+
key: 'BearerAuth',
|
|
386
|
+
scheme: 'bearer',
|
|
387
|
+
type: 'http'
|
|
388
|
+
}, {
|
|
389
|
+
key: 'ApiKeyAuth',
|
|
390
|
+
name: 'X-API-Key',
|
|
391
|
+
type: 'apiKey'
|
|
392
|
+
}],
|
|
393
|
+
url: '/agent/v1/agents/{agent_id}/phone/release',
|
|
394
|
+
...options
|
|
395
|
+
});
|
|
360
396
|
/**
|
|
361
397
|
* Get agent embed policy
|
|
362
398
|
*
|
|
363
|
-
* Read a service agent's embed settings: the pages allowed to open its Kit chat (allowed_origins), the development switch (allow_localhost)
|
|
399
|
+
* Read a service agent's embed settings: the pages allowed to open its Kit chat (allowed_origins), the development switch (allow_localhost), what an embedded end user may upload (uploads) and whether the agent may be shared by link with the daily caps its visitors count against (share_links). The allow list decides where the agent can be embedded at all, so after deploying an application, add that application's URL origin here (scheme, host and port, never a path) before the page loads the agent — otherwise its Kit chat answers ORIGIN_NOT_ALLOWED. Budgets, monthly caps and token lifetime are set in the console and are not part of this API. An agent of another organization answers 404; an agent that is not a service agent answers 400.
|
|
364
400
|
*/
|
|
365
401
|
export const getAgentEmbedPolicy = (options) => (options.client ?? client).get({
|
|
366
402
|
security: [{
|
|
@@ -378,7 +414,7 @@ export const getAgentEmbedPolicy = (options) => (options.client ?? client).get({
|
|
|
378
414
|
/**
|
|
379
415
|
* Update agent embed policy
|
|
380
416
|
*
|
|
381
|
-
* Change some of a service agent's embed settings. Only the fields you send change: everything you leave out, including the budgets and the token lifetime set in the console, is kept exactly as it was. Send allowed_origins so the pages that load the agent are allowed — an application's URL origin must be in the list before the application can embed the agent, or its Kit chat answers ORIGIN_NOT_ALLOWED. Send allow_localhost while developing on http://localhost, and uploads to open, close or bound file attachments for the embedded end user. Values are checked by the service: an origin is normalized and must be https, and at most one leading wildcard label may match a single subdomain level. max_file_bytes is 1 to 104857600 bytes and max_files_per_session is 1 to 100. Example: POST /agent/v1/agents/{agent_id}/embed_policy with {"allowed_origins": ["https://my-app.example.com"]}.
|
|
417
|
+
* Change some of a service agent's embed settings. Only the fields you send change: everything you leave out, including the budgets and the token lifetime set in the console, is kept exactly as it was. Send allowed_origins so the pages that load the agent are allowed — an application's URL origin must be in the list before the application can embed the agent, or its Kit chat answers ORIGIN_NOT_ALLOWED. Send allow_localhost while developing on http://localhost, and uploads to open, close or bound file attachments for the embedded end user. Send share_links to let the agent be shared by link and to set the daily session and spending caps its share links count against; turning it on is refused unless the agent has an identity number. Values are checked by the service: an origin is normalized and must be https, and at most one leading wildcard label may match a single subdomain level. max_file_bytes is 1 to 104857600 bytes and max_files_per_session is 1 to 100. Example: POST /agent/v1/agents/{agent_id}/embed_policy with {"allowed_origins": ["https://my-app.example.com"]}.
|
|
382
418
|
*/
|
|
383
419
|
export const updateAgentEmbedPolicy = (options) => (options.client ?? client).post({
|
|
384
420
|
security: [{
|
|
@@ -402,7 +438,7 @@ export const updateAgentEmbedPolicy = (options) => (options.client ?? client).po
|
|
|
402
438
|
*
|
|
403
439
|
* List the computers of your organization, archived ones included.
|
|
404
440
|
*
|
|
405
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
441
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
406
442
|
*/
|
|
407
443
|
export const computersList = (options) => (options?.client ?? client).get({
|
|
408
444
|
security: [{
|
|
@@ -422,7 +458,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
422
458
|
*
|
|
423
459
|
* Create a durable computer: a named machine whose files outlive sessions, for general agents.
|
|
424
460
|
*
|
|
425
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
461
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
426
462
|
*/
|
|
427
463
|
export const computersCreate = (options) => (options.client ?? client).post({
|
|
428
464
|
security: [{
|
|
@@ -466,7 +502,7 @@ export const computersDelete = (options) => (options.client ?? client).delete({
|
|
|
466
502
|
*
|
|
467
503
|
* Read one computer's status, storage use and sandbox id.
|
|
468
504
|
*
|
|
469
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
505
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
470
506
|
*/
|
|
471
507
|
export const computersRetrieve = (options) => (options.client ?? client).get({
|
|
472
508
|
security: [{
|
|
@@ -486,7 +522,7 @@ export const computersRetrieve = (options) => (options.client ?? client).get({
|
|
|
486
522
|
*
|
|
487
523
|
* Rename a computer.
|
|
488
524
|
*
|
|
489
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
525
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
490
526
|
*/
|
|
491
527
|
export const computersUpdate = (options) => (options.client ?? client).post({
|
|
492
528
|
security: [{
|
|
@@ -510,7 +546,7 @@ export const computersUpdate = (options) => (options.client ?? client).post({
|
|
|
510
546
|
*
|
|
511
547
|
* Archive a computer: its files stay readable but new sessions cannot use it.
|
|
512
548
|
*
|
|
513
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
549
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers. A computer an active agent holds is refused with 409 COMPUTER_IN_USE; archive the agent first.
|
|
514
550
|
*/
|
|
515
551
|
export const computersArchive = (options) => (options.client ?? client).post({
|
|
516
552
|
security: [{
|
|
@@ -555,7 +591,7 @@ export const computersAttachmentsCreate = (options) => (options.client ?? client
|
|
|
555
591
|
*
|
|
556
592
|
* List the entries of one directory on a computer.
|
|
557
593
|
*
|
|
558
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
594
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
559
595
|
*/
|
|
560
596
|
export const computersFilesList = (options) => (options.client ?? client).get({
|
|
561
597
|
security: [{
|
|
@@ -575,7 +611,7 @@ export const computersFilesList = (options) => (options.client ?? client).get({
|
|
|
575
611
|
*
|
|
576
612
|
* Download the bytes of one file on a computer, up to 16 MiB, with single-range support.
|
|
577
613
|
*
|
|
578
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
614
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
579
615
|
*/
|
|
580
616
|
export const computersFilesContent = (options) => (options.client ?? client).get({
|
|
581
617
|
security: [{
|
|
@@ -590,6 +626,24 @@ export const computersFilesContent = (options) => (options.client ?? client).get
|
|
|
590
626
|
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
591
627
|
...options
|
|
592
628
|
});
|
|
629
|
+
/**
|
|
630
|
+
* Preview a computer file
|
|
631
|
+
*
|
|
632
|
+
* The preview product of one version of one computer file: an image becomes a 1600 px WebP, an Office document a linearized PDF, text and source the first 64 KiB, and PDF, xlsx, epub, GIF, SVG and unknown types their original bytes. Products live in the File service and are keyed by computer, path, size, mtime, variant and format version. A request that pins `v` answers from that registry without stat'ing or waking the computer; without `v` the file is read and the product generated once. A file over the size threshold, or a deployment without the File service, answers `fallback: "content"` so the caller keeps the ordinary content door.
|
|
633
|
+
*/
|
|
634
|
+
export const previewComputerFile = (options) => (options.client ?? client).get({
|
|
635
|
+
security: [{
|
|
636
|
+
key: 'BearerAuth',
|
|
637
|
+
scheme: 'bearer',
|
|
638
|
+
type: 'http'
|
|
639
|
+
}, {
|
|
640
|
+
key: 'ApiKeyAuth',
|
|
641
|
+
name: 'X-API-Key',
|
|
642
|
+
type: 'apiKey'
|
|
643
|
+
}],
|
|
644
|
+
url: '/agent/v1/computers/{computer_id}/files/preview',
|
|
645
|
+
...options
|
|
646
|
+
});
|
|
593
647
|
/**
|
|
594
648
|
* Convert a Computer Document to PDF
|
|
595
649
|
*
|
|
@@ -679,7 +733,7 @@ export const releaseComputerLease = (options) => (options.client ?? client).dele
|
|
|
679
733
|
/**
|
|
680
734
|
* List Toolsets
|
|
681
735
|
*
|
|
682
|
-
* Discover tool names, input schemas, read-only status and default permission policies before configuring an agent. The catalog is read-only: enable tools through agents.create or agents.update. agent_toolset_20260401 includes bash, edit, glob, grep, read, write, web_search, web_fetch, task_output, task_stop, monitor, agent, send_message, codemode and skill, plus todo_write
|
|
736
|
+
* Discover tool names, input schemas, read-only status and default permission policies before configuring an agent. The catalog is read-only: enable tools through agents.create or agents.update. agent_toolset_20260401 includes bash, edit, glob, grep, read, write, web_search, web_fetch, task_output, task_stop, monitor, agent, send_message, codemode and skill, plus todo_write and goal_read, which are listed so they can be switched off. Native additions require bash enabled; codemode requires bash (enabling it with bash disabled returns 400; keep bash enabled with permission_policy always_ask to restrict it); send_message also requires agent. To keep only some tools, set default_config.enabled to false and enable the wanted tools in configs; unlisted tools follow default_config. The catalog includes plugin names and versions. Sessions created through /anthropic/v1 expose only the eight official tools.
|
|
683
737
|
*/
|
|
684
738
|
export const listToolsets = (options) => (options?.client ?? client).get({
|
|
685
739
|
security: [{
|
|
@@ -738,6 +792,30 @@ export const forkSession = (options) => (options.client ?? client).post({
|
|
|
738
792
|
...options.headers
|
|
739
793
|
}
|
|
740
794
|
});
|
|
795
|
+
/**
|
|
796
|
+
* Rename Session (Extension)
|
|
797
|
+
*
|
|
798
|
+
* Give a session a short, branch-like name; the main session is always main and cannot be renamed.
|
|
799
|
+
*
|
|
800
|
+
* Available only on /agent/v1. The name is normalized first (surrounding whitespace trimmed, upper case folded to lowercase, runs of whitespace become one hyphen, characters the rule does not admit dropped, and no hyphen left hanging at either end) and then validated: non-empty, at most 32 display columns wide (a Han character counts as two), made only of Han characters, lowercase ASCII letters, digits and hyphens, and never the reserved word main. A name another of the caller's own sessions already holds is not an error: the answer carries a numeric suffix (base-2, base-3, …). Renaming the main session returns 400; a missing session, one that belongs to another caller, or one the caller cannot write returns 404. Returns 200 with the same Session shape as retrieval, name set to the new name; one rename writes a session.renamed event. Example: POST /agent/v1/sessions/sesn_login/name with body {"name":"login-fix"}.
|
|
801
|
+
*/
|
|
802
|
+
export const renameSession = (options) => (options.client ?? client).post({
|
|
803
|
+
security: [{
|
|
804
|
+
key: 'BearerAuth',
|
|
805
|
+
scheme: 'bearer',
|
|
806
|
+
type: 'http'
|
|
807
|
+
}, {
|
|
808
|
+
key: 'ApiKeyAuth',
|
|
809
|
+
name: 'X-API-Key',
|
|
810
|
+
type: 'apiKey'
|
|
811
|
+
}],
|
|
812
|
+
url: '/agent/v1/sessions/{session_id}/name',
|
|
813
|
+
...options,
|
|
814
|
+
headers: {
|
|
815
|
+
'Content-Type': 'application/json',
|
|
816
|
+
...options.headers
|
|
817
|
+
}
|
|
818
|
+
});
|
|
741
819
|
/**
|
|
742
820
|
* Update session agent version
|
|
743
821
|
*
|
|
@@ -811,7 +889,7 @@ export const createSessionArtifactContentUrl = (options) => (options.client ?? c
|
|
|
811
889
|
*
|
|
812
890
|
* List the requests a session is waiting on; an end-customer token reads its own session.
|
|
813
891
|
*
|
|
814
|
-
* Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (
|
|
892
|
+
* Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (always approval, a tool waiting for permission; question is kept for compatibility and is never returned), status (pending), tool_name, input (the same input the agent.tool_use event shows), create_time and expire_time. Answer a request as before: send a user.tool_confirmation event for its id. expire_time is set only for a session with no collaboration mode while the requests-v1 release is on (create_time plus 24 hours; an expired request counts as declined), otherwise null. Answered, expired and superseded requests are not listed, and neither are pending custom tool results (user.custom_tool_result). Whoever may read the session may read its requests; a session that is missing or not yours returns 404.
|
|
815
893
|
*/
|
|
816
894
|
export const listSessionRequests = (options) => (options.client ?? client).get({
|
|
817
895
|
security: [{
|
|
@@ -1012,6 +1090,12 @@ export const createAudioSpeech = (options) => (options.client ?? client).post({
|
|
|
1012
1090
|
...options.headers
|
|
1013
1091
|
}
|
|
1014
1092
|
});
|
|
1093
|
+
/**
|
|
1094
|
+
* List current prices
|
|
1095
|
+
*
|
|
1096
|
+
* Read every open price item with the amount in force now, in USD and CNY, for example to show a pricing page or check what a meter costs before using it. No credential: the response is the public price book, not an organization's prices, so customer-specific prices and cost floors are not part of it (the source does not carry them). Each entry names the item id, the product (the id's namespace such as router, sandbox or search), the meter's unit and how many units one amount covers (per is 1000000 for per-million-token meters). A model with one amount has one entry; a price that varies by tier or by dimensions has one entry per tier or cell, told apart by variant: tier carries up_to, cell carries when, and a matrix default is kind default. Only versions already in force are shown, so an announced price never appears before its effective_from. usd and cny are decimal strings of major units copied from the price book; a currency the item does not price is null and must be shown as "—", never as 0. pricing_version and effective_at identify the catalog this body came from, and the ETag is derived from both: send it as If-None-Match to get 304 until either changes. Cache-Control is public, max-age=60, so revalidate rather than keeping a copy longer. Reading is free.
|
|
1097
|
+
*/
|
|
1098
|
+
export const listPublicPrices = (options) => (options?.client ?? client).get({ url: '/billing/v1/prices', ...options });
|
|
1015
1099
|
/**
|
|
1016
1100
|
* 列出浏览器会话
|
|
1017
1101
|
*
|
|
@@ -2502,7 +2586,7 @@ export const listOrganizationUsage = (options) => (options.client ?? client).get
|
|
|
2502
2586
|
/**
|
|
2503
2587
|
* List Organization Usage Events
|
|
2504
2588
|
*
|
|
2505
|
-
* Usage events newest first, one opaque cursor page at a time; a page never duplicates or skips an event. Every item carries its metering lines (meter, display name, consumed quantity and unit, mapped from the billing measurements); the per-line price split (list unit price, pricing unit, billed cost) rides only the single event — fetch /organization/v1/events/{id} for it.
|
|
2589
|
+
* Usage events newest first by occurrence time (occurred_at, when the usage happened), one opaque cursor page at a time; a page never duplicates or skips an event. Every item carries its metering lines (meter, display name, consumed quantity and unit, mapped from the billing measurements); the per-line price split (list unit price, pricing unit, billed cost) rides only the single event — fetch /organization/v1/events/{id} for it. A cursor belongs to the order it was issued under: one obtained before this occurrence-time ordering, or used under the other sort direction, is refused with 400 INVALID_PARAMS instead of being reused — restart the listing.
|
|
2506
2590
|
*
|
|
2507
2591
|
*/
|
|
2508
2592
|
export const listOrganizationEvents = (options) => (options.client ?? client).get({
|
|
@@ -3724,6 +3808,30 @@ export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
|
3724
3808
|
...options.headers
|
|
3725
3809
|
}
|
|
3726
3810
|
});
|
|
3811
|
+
/**
|
|
3812
|
+
* Act on a phone sandbox's screen
|
|
3813
|
+
*
|
|
3814
|
+
* See and operate an android sandbox's phone screen: take a screenshot, read the UI hierarchy to get a ref for each node, then tap a node or a screen point, long-press, swipe, scroll, type text, press a key, open or close an app, open a URL, or wait. Use it to drive and automate a mobile app on a phone sandbox created with templateID "android"; those machines have no terminal or file API, so drive the screen with this operation and run shell commands with commands.run. Start with a snapshot to learn what is on screen and to mint the refs the tap-like actions use; a ref names a node in the latest snapshot only, so after a newer snapshot, or after an action that changed the screen, take a fresh snapshot — a stale ref is refused with INVALID_PARAMS. The phone runs one action at a time, so actions on one sandbox are serial: send the next only after the previous call returns. A phone that has just been created may not have connected yet and answers 503 SERVICE_UNAVAILABLE with Retry-After: 2; retry after that delay (measured on develop: the sandbox is created in about 45 s and the phone program connects about 15 s later). Text is entered through the phone's own input, which supports ASCII only, so typing non-ASCII text into a Chinese app is not supported and answers INVALID_PARAMS. A linux sandbox has no screen and answers CAPABILITY_UNSUPPORTED.
|
|
3815
|
+
*
|
|
3816
|
+
* The same path is the caller's action socket: send GET with the standard WebSocket upgrade headers instead of POST and drive many actions over one connection. The server answers {"type":"ready","instanceId":"<id>"} first, then every frame {"id":"<your correlation id>","action":{…}} (an action of the same shape as this operation's body, at most 64 characters of id) is answered by its own id, in submission order, as {"id":"…","result":{…}} or {"id":"…","error":{"code":"…","message":"…","retryable":true}}. At most 8 actions may be in flight on one connection (the next answers RATE_LIMITED), and 10 malformed frames in a row close the connection 1008. Authentication is the caller's own (an organization API key), never the phone's token. Closing the connection ends only that client's view: actions already accepted are answered, and the phone stays connected. Before the handshake, a phone that is still being built or has not connected yet answers 503 DEVICE_NOT_READY with the state it is in and Retry-After: 2.
|
|
3817
|
+
*/
|
|
3818
|
+
export const actOnSandboxDisplay = (options) => (options.client ?? client).post({
|
|
3819
|
+
security: [{
|
|
3820
|
+
key: 'BearerAuth',
|
|
3821
|
+
scheme: 'bearer',
|
|
3822
|
+
type: 'http'
|
|
3823
|
+
}, {
|
|
3824
|
+
key: 'ApiKeyAuth',
|
|
3825
|
+
name: 'X-API-Key',
|
|
3826
|
+
type: 'apiKey'
|
|
3827
|
+
}],
|
|
3828
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/act',
|
|
3829
|
+
...options,
|
|
3830
|
+
headers: {
|
|
3831
|
+
'Content-Type': 'application/json',
|
|
3832
|
+
...options.headers
|
|
3833
|
+
}
|
|
3834
|
+
});
|
|
3727
3835
|
/**
|
|
3728
3836
|
* Remove a file or directory in the sandbox
|
|
3729
3837
|
*
|
|
@@ -3821,7 +3929,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
3821
3929
|
/**
|
|
3822
3930
|
* Run a command in the sandbox
|
|
3823
3931
|
*
|
|
3824
|
-
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {"cmd":"echo hi"}.
|
|
3932
|
+
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. On an android sandbox the command runs in the phone's root shell, its stderr is merged into stdout (read stdout and expect stderr to come back empty), and background mode is unavailable. Example body: {"cmd":"echo hi"}.
|
|
3825
3933
|
*/
|
|
3826
3934
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
3827
3935
|
security: [{
|
|
@@ -3840,6 +3948,140 @@ export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
|
3840
3948
|
...options.headers
|
|
3841
3949
|
}
|
|
3842
3950
|
});
|
|
3951
|
+
/**
|
|
3952
|
+
* Start adding a phone of your own
|
|
3953
|
+
*
|
|
3954
|
+
* Begin bringing your own device (BYOD): the platform answers an 8-character code, its ten-minute deadline and the QR payload your phone's app scans, and nothing is registered until the owner taps Allow on the phone. Show the QR payload (or the code) in your app; the phone opens GET /sandbox/v1/byod/pairings/{code} — with no credential — to show the organization and the deadline, then posts the claim once. The pairing stores the organization's display name, which the phone shows on its Allow screen, so create the pairing from a session or key that carries one. A code is spent by the first successful claim and cannot be reused; create a new pairing for another device. BYOD devices are separate from sandboxes: they never appear in listSandboxes and have no template, size or expiry. Example: POST /sandbox/v1/byod/pairings with no body returns {code:'K7M4PQRS',expires_at:'2026-11-22T13:10:00.000Z',qr:'praxis://byod/pair?code=K7M4PQRS&api=https%3A%2F%2Fapi.deepraxis.com'}.
|
|
3955
|
+
*/
|
|
3956
|
+
export const createByodPairing = (options) => (options?.client ?? client).post({
|
|
3957
|
+
security: [{
|
|
3958
|
+
key: 'BearerAuth',
|
|
3959
|
+
scheme: 'bearer',
|
|
3960
|
+
type: 'http'
|
|
3961
|
+
}, {
|
|
3962
|
+
key: 'ApiKeyAuth',
|
|
3963
|
+
name: 'X-API-Key',
|
|
3964
|
+
type: 'apiKey'
|
|
3965
|
+
}],
|
|
3966
|
+
url: '/sandbox/v1/byod/pairings',
|
|
3967
|
+
...options
|
|
3968
|
+
});
|
|
3969
|
+
/**
|
|
3970
|
+
* List your organization's own devices
|
|
3971
|
+
*
|
|
3972
|
+
* List the devices your organization has paired, oldest first, with each one's platform, name, model, OS version, live online fact and when it was last seen. Use it to find a device id before you act on it, rename it or disconnect it, or to show the BYOD page. A revoked device is not listed, so a device that disappears from this answer was disconnected; there is no paging because an organization's own devices are few. Android is the only platform today. Example: GET /sandbox/v1/byod/devices returns {data:[{object:'byod_device',id:'byd_0123456789abcdefghijklmno',platform:'android',name:'Shelf phone',model:'23127PN0CC',os_version:'16',online:true,last_seen_at:'2026-11-22T12:58:00.000Z',created_at:'2026-11-22T12:40:00.000Z'}]}.
|
|
3973
|
+
*/
|
|
3974
|
+
export const listByodDevices = (options) => (options?.client ?? client).get({
|
|
3975
|
+
security: [{
|
|
3976
|
+
key: 'BearerAuth',
|
|
3977
|
+
scheme: 'bearer',
|
|
3978
|
+
type: 'http'
|
|
3979
|
+
}, {
|
|
3980
|
+
key: 'ApiKeyAuth',
|
|
3981
|
+
name: 'X-API-Key',
|
|
3982
|
+
type: 'apiKey'
|
|
3983
|
+
}],
|
|
3984
|
+
url: '/sandbox/v1/byod/devices',
|
|
3985
|
+
...options
|
|
3986
|
+
});
|
|
3987
|
+
/**
|
|
3988
|
+
* Read one of your organization's devices
|
|
3989
|
+
*
|
|
3990
|
+
* Read one BYOD device: the same fields listByodDevices returns, for a single device. Use it to poll whether a device is online before acting on it, or to refresh one row of the BYOD page after a rename. An unknown id and another organization's device both answer 404, so the answer never reveals that a foreign device exists. Example: GET /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno.
|
|
3991
|
+
*/
|
|
3992
|
+
export const getByodDevice = (options) => (options.client ?? client).get({
|
|
3993
|
+
security: [{
|
|
3994
|
+
key: 'BearerAuth',
|
|
3995
|
+
scheme: 'bearer',
|
|
3996
|
+
type: 'http'
|
|
3997
|
+
}, {
|
|
3998
|
+
key: 'ApiKeyAuth',
|
|
3999
|
+
name: 'X-API-Key',
|
|
4000
|
+
type: 'apiKey'
|
|
4001
|
+
}],
|
|
4002
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
4003
|
+
...options
|
|
4004
|
+
});
|
|
4005
|
+
/**
|
|
4006
|
+
* Rename one of your organization's devices
|
|
4007
|
+
*
|
|
4008
|
+
* Change a device's display name, and nothing else: pairing, credential, platform and connection are untouched. Use it to give a shared phone a name your team recognises. The body takes exactly one field, name, 1 to 64 characters after trimming; a missing, extra or wrongly typed field answers INVALID_PARAMS. An unknown id and another organization's device both answer 404. Example: PATCH /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno with {name:'Shelf phone'} returns the updated device.
|
|
4009
|
+
*/
|
|
4010
|
+
export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
4011
|
+
security: [{
|
|
4012
|
+
key: 'BearerAuth',
|
|
4013
|
+
scheme: 'bearer',
|
|
4014
|
+
type: 'http'
|
|
4015
|
+
}, {
|
|
4016
|
+
key: 'ApiKeyAuth',
|
|
4017
|
+
name: 'X-API-Key',
|
|
4018
|
+
type: 'apiKey'
|
|
4019
|
+
}],
|
|
4020
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
4021
|
+
...options,
|
|
4022
|
+
headers: {
|
|
4023
|
+
'Content-Type': 'application/json',
|
|
4024
|
+
...options.headers
|
|
4025
|
+
}
|
|
4026
|
+
});
|
|
4027
|
+
/**
|
|
4028
|
+
* Disconnect a device and revoke its credential
|
|
4029
|
+
*
|
|
4030
|
+
* Disconnect a paired device: the device's credential is revoked, its control connection is closed, and it stops appearing in listByodDevices. Use it when the phone is lost, lent or no longer wanted; the same disconnect is offered as one tap on the device itself. The operation is idempotent — disconnecting an already-disconnected device answers the same 200 — so a retry after a lost response is safe. The device is untouched: nothing is erased on the phone, and it can be paired again with a new pairing. Because a revoked device is not listed, a later listByodDevices no longer shows it. An unknown id and another organization's device both answer 404. Example: POST /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno/disconnect returns {id:'byd_0123456789abcdefghijklmno',object:'byod_device',disconnected:true}.
|
|
4031
|
+
*/
|
|
4032
|
+
export const disconnectByodDevice = (options) => (options.client ?? client).post({
|
|
4033
|
+
security: [{
|
|
4034
|
+
key: 'BearerAuth',
|
|
4035
|
+
scheme: 'bearer',
|
|
4036
|
+
type: 'http'
|
|
4037
|
+
}, {
|
|
4038
|
+
key: 'ApiKeyAuth',
|
|
4039
|
+
name: 'X-API-Key',
|
|
4040
|
+
type: 'apiKey'
|
|
4041
|
+
}],
|
|
4042
|
+
url: '/sandbox/v1/byod/devices/{deviceID}/disconnect',
|
|
4043
|
+
...options
|
|
4044
|
+
});
|
|
4045
|
+
/**
|
|
4046
|
+
* Read a pairing for the phone's Allow screen
|
|
4047
|
+
*
|
|
4048
|
+
* The phone's own read, called by the app that scanned the QR code or the code was typed into: it answers the organization's display name and the code's deadline, which the owner sees before tapping Allow. This path carries no Praxis credential — the one-time code is what it is addressed by — so do not send an API key and do not call it from server code. An unknown, spent or expired code answers 404, with nothing said about which of the three it is; that also covers a code another organization created. The read is a preview only: it registers nothing, and the claim is what spends the code. Example: GET /sandbox/v1/byod/pairings/K7M4PQRS returns {organization_name:'烟火测试团队',expires_at:'2026-11-22T13:10:00.000Z'}.
|
|
4049
|
+
*/
|
|
4050
|
+
export const getByodPairing = (options) => (options.client ?? client).get({
|
|
4051
|
+
security: [{
|
|
4052
|
+
key: 'BearerAuth',
|
|
4053
|
+
scheme: 'bearer',
|
|
4054
|
+
type: 'http'
|
|
4055
|
+
}, {
|
|
4056
|
+
key: 'ApiKeyAuth',
|
|
4057
|
+
name: 'X-API-Key',
|
|
4058
|
+
type: 'apiKey'
|
|
4059
|
+
}],
|
|
4060
|
+
url: '/sandbox/v1/byod/pairings/{code}',
|
|
4061
|
+
...options
|
|
4062
|
+
});
|
|
4063
|
+
/**
|
|
4064
|
+
* Claim a pairing and register the phone
|
|
4065
|
+
*
|
|
4066
|
+
* The phone's own final step after the owner taps Allow: it registers the device and answers the device id, a one-time credential and the control socket url the app dials. This path carries no Praxis credential — the one-time code is what it is addressed by — so do not send an API key and never call it from server code. The claim is single use: the first successful call spends the code and a second call answers 404, as does an unknown or expired code, so the app must store the credential the moment it arrives because it is never shown again. Connect to socket_url with Authorization: Bearer <credential>; the socket speaks the phone channel (hello, ping/pong, act, result/error) and the device's one connection is replaced if the app reconnects. Example: POST /sandbox/v1/byod/pairings/K7M4PQRS/claim with {platform:'android',name:'Shelf phone',model:'23127PN0CC',os_version:'16'} returns {device_id:'byd_0123456789abcdefghijklmno',credential:'…',socket_url:'wss://49982-byd0123456789abcdefghijklmno--sbx-develop.praxisusercontent.com/'}.
|
|
4067
|
+
*/
|
|
4068
|
+
export const claimByodPairing = (options) => (options.client ?? client).post({
|
|
4069
|
+
security: [{
|
|
4070
|
+
key: 'BearerAuth',
|
|
4071
|
+
scheme: 'bearer',
|
|
4072
|
+
type: 'http'
|
|
4073
|
+
}, {
|
|
4074
|
+
key: 'ApiKeyAuth',
|
|
4075
|
+
name: 'X-API-Key',
|
|
4076
|
+
type: 'apiKey'
|
|
4077
|
+
}],
|
|
4078
|
+
url: '/sandbox/v1/byod/pairings/{code}/claim',
|
|
4079
|
+
...options,
|
|
4080
|
+
headers: {
|
|
4081
|
+
'Content-Type': 'application/json',
|
|
4082
|
+
...options.headers
|
|
4083
|
+
}
|
|
4084
|
+
});
|
|
3843
4085
|
/**
|
|
3844
4086
|
* Delete session
|
|
3845
4087
|
*
|
|
@@ -3919,7 +4161,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
3919
4161
|
/**
|
|
3920
4162
|
* Create agent
|
|
3921
4163
|
*
|
|
3922
|
-
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. For kind assume, provide name without model, models, subagent_model, subagents or multiagent;
|
|
4164
|
+
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. Omit kind to create a service agent (Managed Agents behaviour: a fresh environment per session). Pass kind: "general" for an employee-style agent with its own computer, created with it; size and template come from the agent's computers configuration. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. A general or assume agent created without computer_id gets a new computer registered in the same request, named after the agent; a service agent with computer_id returns 400. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; vault_ids are accepted, bindings and environment_id are refused. phone gives the agent one phone, in one of two mutually exclusive forms: {sku, name?, archive: {exclude}} is a cloud Android device the platform builds on demand from that Sandbox SKU, and {byod, name?} is your organization's own device, named by a byd_… id it already owns (Brought Your Own Device), which the platform drives but never builds. A body naming both sku and byod returns 400, and a byd_… id this organization does not own returns 400 INVALID_PARAMS. Only a general or assume agent may have a phone: a service agent with phone returns 400. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
|
|
3923
4165
|
*/
|
|
3924
4166
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
3925
4167
|
security: [{
|
|
@@ -3959,7 +4201,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
3959
4201
|
/**
|
|
3960
4202
|
* Update agent
|
|
3961
4203
|
*
|
|
3962
|
-
* Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Assume agents reject model, models, subagent_model, subagents and multiagent on every update; other fields follow the general agent rules, with vault_ids also accepted.
|
|
4204
|
+
* Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. phone takes the same two mutually exclusive forms as agents.create: {sku, name?, archive} for a cloud device, or {byod, name?} for your organization's own device (a byd_… id); naming both returns 400, and a byd_… id this organization does not own returns 400 INVALID_PARAMS. phone: null turns the phone off and releases a cloud device; a BYOD phone is the organization's and is never killed. Assume agents reject model, models, subagent_model, subagents and multiagent on every update; other fields follow the general agent rules, with vault_ids also accepted.
|
|
3963
4205
|
*/
|
|
3964
4206
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
3965
4207
|
security: [{
|
|
@@ -4415,7 +4657,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4415
4657
|
/**
|
|
4416
4658
|
* Create deployment
|
|
4417
4659
|
*
|
|
4418
|
-
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
|
|
4660
|
+
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
|
|
4419
4661
|
*/
|
|
4420
4662
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4421
4663
|
security: [{
|
|
@@ -4895,7 +5137,7 @@ export const applicationListVersions = (options) => (options.client ?? client).g
|
|
|
4895
5137
|
/**
|
|
4896
5138
|
* Create version
|
|
4897
5139
|
*
|
|
4898
|
-
* Upload code and bindings as a new version; a version serves nothing until deployed. Set deploy true to create the pending deployment in the same call. Rejected binding types return UNSUPPORTED.
|
|
5140
|
+
* Upload code and bindings as a new version; a version serves nothing until deployed. Set deploy true to create the pending deployment in the same call. Rejected binding types return UNSUPPORTED. Send an Idempotency-Key to make a create safe to retry: within 24 hours the same key with the same body answers the first version (and its deployment) again instead of creating a second one, and the same key with a different body is refused.
|
|
4899
5141
|
*/
|
|
4900
5142
|
export const applicationCreateVersion = (options) => (options.client ?? client).post({
|
|
4901
5143
|
security: [{
|
|
@@ -8205,8 +8447,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8205
8447
|
* - `transform` — Position, scale, rotation, opacity, crop, blur.
|
|
8206
8448
|
* - `fit` — contain, cover, fill or none.
|
|
8207
8449
|
* - `blend` — Layer blend mode; null clears.
|
|
8208
|
-
* - `style` — Text styling: font,
|
|
8209
|
-
* - `style.
|
|
8450
|
+
* - `style` — Text styling in Shotstack's rich shape: font, gradient, stroke, shadow, box, border, align, per-word animation.
|
|
8451
|
+
* - `style.align.vertical` — top, middle or bottom; omit it, never null.
|
|
8210
8452
|
* - `playback` — Rate, direction, audio policy, or freeze.
|
|
8211
8453
|
* - `volumeDb` — Audio level in dB; 0 is source level.
|
|
8212
8454
|
* - `gain` — Keyframed audio level in dB.
|
|
@@ -8227,6 +8469,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8227
8469
|
* - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
|
|
8228
8470
|
* - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
|
|
8229
8471
|
* - `INVALID_STYLE` — A style value is out of range.
|
|
8472
|
+
* - `UNSUPPORTED_STYLE_FIELD` — A Shotstack style field this platform cannot render yet.
|
|
8473
|
+
* - `STYLE_LEGACY_FIELDS` — A style written in the old flat shape; it still works.
|
|
8230
8474
|
* - `INVALID_MASK` — A mask definition is malformed.
|
|
8231
8475
|
* - `MASK_IN_USE` — The edit would break a live mask.
|
|
8232
8476
|
* - `TOO_MANY_MASKS` — At most 16 masks per project.
|
|
@@ -9463,7 +9707,7 @@ export const devopsPromotionsCancel = (options) => (options.client ?? client).po
|
|
|
9463
9707
|
/**
|
|
9464
9708
|
* Retry a promotion
|
|
9465
9709
|
*
|
|
9466
|
-
* Continue a promotion that stopped part-way
|
|
9710
|
+
* Continue a promotion that stopped part-way: one in halted (some targets deployed, some failed, some never started) or one in failed. The answer is a NEW promotion whose plan names only the targets that did not reach the release, so a partially deployed environment is completed rather than redeployed from the start. A halted promotion is stopped first — its run is asked to cancel and the executor is read back until the run is no longer running — because a new plan that starts while the old run still deploys the same targets would deploy them twice; when the run will not stop, the call is refused with PROMOTION_RUN_STILL_RUNNING and creates nothing. Once that run is over the halt is closed as the partial deploy it is (the targets that really deployed move their checkpoints) and the new promotion is planned from those checkpoints. Any other state is refused with PROMOTION_NOT_RETRYABLE, whose message names the state and what to do instead: a promotion that is still deploying has nothing to continue (cancel it to stop it), and a succeeded, cancelled or superseded one has nothing left — promote the release again if this environment must take it. The retry is attributed to the credential that sends it and is recorded on the promotion.
|
|
9467
9711
|
*/
|
|
9468
9712
|
export const devopsPromotionsRetry = (options) => (options.client ?? client).post({
|
|
9469
9713
|
security: [{
|
|
@@ -9961,7 +10205,7 @@ export const devopsChangesGet = (options) => (options.client ?? client).get({
|
|
|
9961
10205
|
/**
|
|
9962
10206
|
* Abandon a change
|
|
9963
10207
|
*
|
|
9964
|
-
* Stop a change for good: it no longer moves forward and its stage becomes abandoned. reason is required and is kept with the change. Pull requests that were already merged are not undone — the system cleans them up, or a new change reverts them — so abandoning is a statement about the change, not a rollback of code. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2).
|
|
10208
|
+
* Stop a change for good: it no longer moves forward and its stage becomes abandoned. reason is required and is kept with the change. Pull requests it has not merged are closed with it: each one is closed on GitHub with a note naming the change and this reason, so an abandoned change never leaves an open pull request behind for someone else to clean up — a change with no open pull request makes no GitHub call at all. That close happens BEFORE the change is marked, so an abandon that cannot close them is refused with GITHUB_UNAVAILABLE and nothing has changed; send it again. Pull requests that were already merged are not undone — the system cleans them up, or a new change reverts them — so abandoning is a statement about the change, not a rollback of code. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2). Repeating the call on a change that is already abandoned answers the change as it stands instead of refusing it: the first abandon is the fact, and a caller that lost the answer gets it back.
|
|
9965
10209
|
*/
|
|
9966
10210
|
export const devopsChangesAbandon = (options) => (options.client ?? client).post({
|
|
9967
10211
|
security: [{
|
|
@@ -9997,7 +10241,7 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
|
|
|
9997
10241
|
/**
|
|
9998
10242
|
* Open a change's pull request
|
|
9999
10243
|
*
|
|
10000
|
-
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and
|
|
10244
|
+
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.
|
|
10001
10245
|
*/
|
|
10002
10246
|
export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
|
|
10003
10247
|
security: [{
|
|
@@ -10104,6 +10348,24 @@ export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? c
|
|
|
10104
10348
|
...options.headers
|
|
10105
10349
|
}
|
|
10106
10350
|
});
|
|
10351
|
+
/**
|
|
10352
|
+
* Close a pull request without merging it
|
|
10353
|
+
*
|
|
10354
|
+
* End a pull request that will never land, without abandoning the change it belongs to. DevOps closes it on GitHub through the project's own App installation, after writing this reason on the pull request, so it leaves the review queue instead of waiting for a merge that is not coming and whoever finds it later sees who ended it and why. Use it when one slice of a change is dropped while the change continues; abandoning the CHANGE closes its unmerged pull requests on its own and needs no second call. Only an open pull request can be closed: a merged one is refused with PULL_REQUEST_NOT_OPEN, because closing does not undo a merge and GitHub will not move a merged pull request back to closed, and one that is already closed answers itself unchanged, so repeating the call is safe. A pull request GitHub no longer has open is refused the same way — nothing was closed, and the platform's record catches up with GitHub on its next delivery.
|
|
10355
|
+
*/
|
|
10356
|
+
export const devopsPullRequestsClose = (options) => (options.client ?? client).post({
|
|
10357
|
+
security: [{
|
|
10358
|
+
key: 'devops-bearerAuth',
|
|
10359
|
+
scheme: 'bearer',
|
|
10360
|
+
type: 'http'
|
|
10361
|
+
}],
|
|
10362
|
+
url: '/devops/v1/pull-requests/{id}:close',
|
|
10363
|
+
...options,
|
|
10364
|
+
headers: {
|
|
10365
|
+
'Content-Type': 'application/json',
|
|
10366
|
+
...options.headers
|
|
10367
|
+
}
|
|
10368
|
+
});
|
|
10107
10369
|
/**
|
|
10108
10370
|
* List connections
|
|
10109
10371
|
*
|
|
@@ -11195,7 +11457,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
11195
11457
|
/**
|
|
11196
11458
|
* Get job
|
|
11197
11459
|
*
|
|
11198
|
-
* Read a generation, edit or batch Job; poll it after every generation or edit until status is terminal, every few seconds (an image takes seconds, a video a few minutes; an edit of a video took about four). status: queued is waiting (queue_reason says why, queue_position its place in line); in_progress or running is generating; completed means every output succeeded; completed_with_errors means some did; failed means none did; canceled or cancelled means it was stopped. Read the result output by output. A succeeded entry of outputs[] has asset_id and viewer_url, because the output is already a library asset: give viewer_url to the person. Its seed is present only when the model reports one (Doubao Seedance 2.x neither takes nor reports a seed); where present, send it back as seed with an adjusted prompt to vary that take. A failed entry has its reason in the failures[] entry with the same index: code is the error to branch on, for example CONTENT_REJECTED when the model's moderation refused an input or the result (a real human face in a reference is one cause; change the prompt or the reference, because retrying unchanged fails again) or GENERATION_FAILED when the model call failed (retrying may succeed); detail_code is the model's finer reason and model_request_id the model call to trace. usage is what the job has cost so far and is final at a terminal status; failed and refused outputs are not charged, so usage counts succeeded outputs only, and it is absent when nothing was charged.
|
|
11460
|
+
* Read a generation, edit or batch Job; poll it after every generation or edit until status is terminal, every few seconds (an image takes seconds, a video a few minutes; an edit of a video took about four). status: queued is waiting (queue_reason says why, queue_position its place in line; provider_queue means the model’s supplier holds the task in its own queue, which can take hours when it is busy — the job keeps waiting for as long as the supplier keeps the task, and only past the supplier’s own task lifetime fails with detail_code UPSTREAM_WAIT_EXCEEDED, uncharged); in_progress or running is generating; completed means every output succeeded; completed_with_errors means some did; failed means none did; canceled or cancelled means it was stopped. Read the result output by output. A succeeded entry of outputs[] has asset_id and viewer_url, because the output is already a library asset: give viewer_url to the person. Its seed is present only when the model reports one (Doubao Seedance 2.x neither takes nor reports a seed); where present, send it back as seed with an adjusted prompt to vary that take. A failed entry has its reason in the failures[] entry with the same index: code is the error to branch on, for example CONTENT_REJECTED when the model's moderation refused an input or the result (a real human face in a reference is one cause; change the prompt or the reference, because retrying unchanged fails again) or GENERATION_FAILED when the model call failed (retrying may succeed); detail_code is the model's finer reason and model_request_id the model call to trace. usage is what the job has cost so far and is final at a terminal status; failed and refused outputs are not charged, so usage counts succeeded outputs only, and it is absent when nothing was charged.
|
|
11199
11461
|
*/
|
|
11200
11462
|
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
11201
11463
|
security: [{
|
|
@@ -11323,7 +11585,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
11323
11585
|
/**
|
|
11324
11586
|
* Edit asset
|
|
11325
11587
|
*
|
|
11326
|
-
* Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background and
|
|
11588
|
+
* Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background, upscale and talking_avatar (the portrait speaks a recording of the same library); on a video, upscale, reframe, redact, trim, mute, crop, extract_audio (pulls the sound out of a video as its own audio asset), erase (removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given), replace_person (puts the person of an image of the same library in place of the video’s person), lip_sync (re-syncs the lips to a recording of the same library), animate_person (an image of the same library performs the video’s motion), edit_video (the video changed by a one-line instruction, optionally guided by one image of the same library) and remove_background; on a recording or a video’s audio, enhance_voice; and to_video, frame and resynthesize on the material each takes. Any other type answers OPERATION_NOT_SUPPORTED, and an edit that does not fit the source’s material answers REFERENCE_TYPE_MISMATCH. Video and audio edits take their model from the platform catalogue (override with operation.model; extract_audio takes no model, it has exactly one function); an edit whose catalogue is empty answers OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video makes a portrait matte: output mask is a small black-and-white video to use as a Cut track mask (the choice for compositing), output alpha (the default) a transparent ProRes 4444 file of about 870 MB per 15 s of 1080p, for when the transparent file itself is the deliverable; pick model from types.matting.models of the generation capabilities. output and model on an image source answer INVALID_PARAMS. The new asset records the source in derived_from; assets.lineage reads the whole edit chain. Charges are at the model API prices (video and audio edits per second of input) and appear in the Job’s usage; repeating the same edit of the same source answers the asset already made instead of paying again. The response is 202 with a queued Job whose source_asset_id is the edited asset; poll GET /media/v1/libraries/{library_id}/jobs/{job_id}, give the output’s viewer_url to the person and tell them usage.
|
|
11327
11589
|
*/
|
|
11328
11590
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
11329
11591
|
security: [{
|
|
@@ -11341,7 +11603,7 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
|
11341
11603
|
/**
|
|
11342
11604
|
* Create speech
|
|
11343
11605
|
*
|
|
11344
|
-
* 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. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. 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 reports the charge in usage (US dollars, six decimals, the sum over every segment) and the recording carries it in provenance.cost; a request refused before it starts costs nothing. When the job is done, tell the person the usage amount and give them the output’s viewer_url. 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."}, or with {"input":"A red kite above a calm sea at sunrise.","voice":"zh_female_wenroumama_uranus_bigtts"} for a gentle female voice.
|
|
11606
|
+
* 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. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. tier chooses which speech model speaks, instead of naming one: economy is the cheapest and fastest, balanced the best value and quality the best result, and the tier picks among the models that carry the voice you name — a voice a model does not offer is never selected and then refused. model is the transition-window parameter and names the same choice, so send only one of the two; omitting both speaks with the library’s speech model, or by its default tier once the platform turns the media-tier-defaults switch on. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. 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 reports the charge in usage (US dollars, six decimals, the sum over every segment) and the recording carries it in provenance.cost; a request refused before it starts costs nothing. When the job is done, tell the person the usage amount and give them the output’s viewer_url. 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."}, or with {"input":"A red kite above a calm sea at sunrise.","voice":"zh_female_wenroumama_uranus_bigtts"} for a gentle female voice.
|
|
11345
11607
|
*/
|
|
11346
11608
|
export const mediaCreateSpeech = (options) => (options.client ?? client).post({
|
|
11347
11609
|
security: [{
|
|
@@ -11526,6 +11788,42 @@ export const mediaRequestHlsRenditions = (options) => (options.client ?? client)
|
|
|
11526
11788
|
...options.headers
|
|
11527
11789
|
}
|
|
11528
11790
|
});
|
|
11791
|
+
/**
|
|
11792
|
+
* Create voice
|
|
11793
|
+
*
|
|
11794
|
+
* Create a voice for this library. Send exactly one of the two shapes: consent_id with samples (a real person’s recordings, a consented voice, cloned before it can speak) or design_asset_id (a preview the voice-design run produced in this library, a generated voice). A generated voice is not cloned: it is ready when the call answers, its job already completed, and it speaks only through the speech model recorded on it, so speech naming another model is refused with INVALID_PARAMS. Each preview builds at most one voice, and building one gives back the design’s other previews, which then cannot be used. Sending both shapes, or neither, is refused with INVALID_PARAMS, and origin is written by the platform only. Answers 202 with a job.
|
|
11795
|
+
*/
|
|
11796
|
+
export const mediaCreateVoice = (options) => (options.client ?? client).post({
|
|
11797
|
+
security: [{
|
|
11798
|
+
key: 'media-BearerAuth',
|
|
11799
|
+
scheme: 'bearer',
|
|
11800
|
+
type: 'http'
|
|
11801
|
+
}],
|
|
11802
|
+
url: '/media/v1/libraries/{library_id}/voices',
|
|
11803
|
+
...options,
|
|
11804
|
+
headers: {
|
|
11805
|
+
'Content-Type': 'application/json',
|
|
11806
|
+
...options.headers
|
|
11807
|
+
}
|
|
11808
|
+
});
|
|
11809
|
+
/**
|
|
11810
|
+
* Design a voice
|
|
11811
|
+
*
|
|
11812
|
+
* Design a voice from a text description. The model makes count preview recordings (default 3), each stored in this library as an audio asset; listen, then create a voice whose design_asset_id names the preview you chose. Send description (1 to 500 characters), preview_text (15 to 200 characters, the line each preview speaks), language (zh or en) and optionally count (1 to 3). A description that fails review fails the slot with CONTENT_REJECTED and is never retried, so changing the words is the fix. Answers 202 with a job to poll.
|
|
11813
|
+
*/
|
|
11814
|
+
export const mediaDesignVoice = (options) => (options.client ?? client).post({
|
|
11815
|
+
security: [{
|
|
11816
|
+
key: 'media-BearerAuth',
|
|
11817
|
+
scheme: 'bearer',
|
|
11818
|
+
type: 'http'
|
|
11819
|
+
}],
|
|
11820
|
+
url: '/media/v1/libraries/{library_id}/voices/designs',
|
|
11821
|
+
...options,
|
|
11822
|
+
headers: {
|
|
11823
|
+
'Content-Type': 'application/json',
|
|
11824
|
+
...options.headers
|
|
11825
|
+
}
|
|
11826
|
+
});
|
|
11529
11827
|
/**
|
|
11530
11828
|
* List types
|
|
11531
11829
|
*
|
|
@@ -11882,7 +12180,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
|
|
|
11882
12180
|
/**
|
|
11883
12181
|
* Retrieve package
|
|
11884
12182
|
*
|
|
11885
|
-
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404
|
|
12183
|
+
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。软删期间这个包一律 404,恢复后才重新出现。
|
|
11886
12184
|
*/
|
|
11887
12185
|
export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
|
|
11888
12186
|
security: [{
|
|
@@ -11926,6 +12224,62 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
|
|
|
11926
12224
|
...options.headers
|
|
11927
12225
|
}
|
|
11928
12226
|
});
|
|
12227
|
+
/**
|
|
12228
|
+
* List commits
|
|
12229
|
+
*
|
|
12230
|
+
* 列出一个 git 包的提交历史,最新的在前。ref 不给就是包的默认分支;limit 与 offset 分页,has_more 为 true 表示还有下一页。只读:提交只能通过 git 协议推送(clone 地址在包的 clone_url)。OCI 包没有 git 读接口,返回 404。
|
|
12231
|
+
*/
|
|
12232
|
+
export const registryGitLog = (options) => (options.client ?? client).get({
|
|
12233
|
+
security: [{
|
|
12234
|
+
key: 'registry-bearerAuth',
|
|
12235
|
+
scheme: 'bearer',
|
|
12236
|
+
type: 'http'
|
|
12237
|
+
}],
|
|
12238
|
+
url: '/registry/v1/packages/{package_id}/git/log',
|
|
12239
|
+
...options
|
|
12240
|
+
});
|
|
12241
|
+
/**
|
|
12242
|
+
* Read a commit
|
|
12243
|
+
*
|
|
12244
|
+
* 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
|
|
12245
|
+
*/
|
|
12246
|
+
export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
|
|
12247
|
+
security: [{
|
|
12248
|
+
key: 'registry-bearerAuth',
|
|
12249
|
+
scheme: 'bearer',
|
|
12250
|
+
type: 'http'
|
|
12251
|
+
}],
|
|
12252
|
+
url: '/registry/v1/packages/{package_id}/git/commits/{sha}',
|
|
12253
|
+
...options
|
|
12254
|
+
});
|
|
12255
|
+
/**
|
|
12256
|
+
* List a tree
|
|
12257
|
+
*
|
|
12258
|
+
* 读一个树对象(或一个提交的根树)的条目:名字、类型(blob / tree / commit)、模式、对象 id,以及已知时的大小。只列这一层,不递归。
|
|
12259
|
+
*/
|
|
12260
|
+
export const registryGitTreesRetrieve = (options) => (options.client ?? client).get({
|
|
12261
|
+
security: [{
|
|
12262
|
+
key: 'registry-bearerAuth',
|
|
12263
|
+
scheme: 'bearer',
|
|
12264
|
+
type: 'http'
|
|
12265
|
+
}],
|
|
12266
|
+
url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
|
|
12267
|
+
...options
|
|
12268
|
+
});
|
|
12269
|
+
/**
|
|
12270
|
+
* Download a file from a ref
|
|
12271
|
+
*
|
|
12272
|
+
* 按引用读一个文件的原始字节,边读边发(流式),没有大小上限。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。路径不是文件或引用不存在返回 404。
|
|
12273
|
+
*/
|
|
12274
|
+
export const registryGitFilesRetrieve = (options) => (options.client ?? client).get({
|
|
12275
|
+
security: [{
|
|
12276
|
+
key: 'registry-bearerAuth',
|
|
12277
|
+
scheme: 'bearer',
|
|
12278
|
+
type: 'http'
|
|
12279
|
+
}],
|
|
12280
|
+
url: '/registry/v1/packages/{package_id}/git/files/{path}',
|
|
12281
|
+
...options
|
|
12282
|
+
});
|
|
11929
12283
|
/**
|
|
11930
12284
|
* List version contents
|
|
11931
12285
|
*
|
|
@@ -12087,7 +12441,7 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
12087
12441
|
/**
|
|
12088
12442
|
* Create sandbox (v2)
|
|
12089
12443
|
*
|
|
12090
|
-
* Create a sandbox from a template. Every sandbox declares its lifecycle at creation. On the own face (X-Praxis-Face: own-v1) send ephemeral: true for an ephemeral sandbox (never pauses, cannot be snapshotted, deleted when it ends; for jobs such as transcodes, scripts and builds) or ephemeral: false for a persistent one (pauses and resumes, snapshots, mounts volumes, kept after it stops; for long-lived computers). Leaving ephemeral out returns INVALID_PARAMS. autoPause: true, onExpire: pause, autoPauseMemory, autoResume, idleTimeout, retention and volumes belong to persistent sandboxes and need ephemeral: false. Choose persistent only for long-lived computers. On the E2B-compatible face autoPause is the declaration: true is persistent, false or absent is ephemeral and ends at its timeout. Responses carry ephemeral. When a sandbox's machine has ended (timeout, kill, retention, provider loss), reaching it returns SANDBOX_EXPIRED (410) with terminationReason in the message: its files are gone, create a new sandbox. To keep results, declare outputs: [{ path }] on the own face (up to eight absolute paths, a directory or a file): when the sandbox ends for any reason except provider loss or a failed start, each path is packed as .tar.gz and stored in File, and the killed event of GET /sandbox/v1/events/sandboxes/{sandboxID} lists each fileId or the reason it was not kept. Paths not declared are not kept. The E2B face refuses outputs.
|
|
12444
|
+
* Create a sandbox from a template. Every sandbox declares its lifecycle at creation. On the own face (X-Praxis-Face: own-v1) send ephemeral: true for an ephemeral sandbox (never pauses, cannot be snapshotted, deleted when it ends; for jobs such as transcodes, scripts and builds) or ephemeral: false for a persistent one (pauses and resumes, snapshots, mounts volumes, kept after it stops; for long-lived computers). Leaving ephemeral out returns INVALID_PARAMS. autoPause: true, onExpire: pause, autoPauseMemory, autoResume, idleTimeout, retention and volumes belong to persistent sandboxes and need ephemeral: false. Choose persistent only for long-lived computers. On the E2B-compatible face autoPause is the declaration: true is persistent, false or absent is ephemeral and ends at its timeout. Responses carry ephemeral. When a sandbox's machine has ended (timeout, kill, retention, provider loss), reaching it returns SANDBOX_EXPIRED (410) with terminationReason in the message: its files are gone, create a new sandbox. To keep results, declare outputs: [{ path }] on the own face (up to eight absolute paths, a directory or a file): when the sandbox ends for any reason except provider loss or a failed start, each path is packed as .tar.gz and stored in File, and the killed event of GET /sandbox/v1/events/sandboxes/{sandboxID} lists each fileId or the reason it was not kept. Paths not declared are not kept. The E2B face refuses outputs. On the own face an android phone accepts waitForReady: true, an own-face-only option: the create then waits until the phone program has connected (state running) or 55 seconds have passed since the request arrived (the vendor create itself takes about 48 s, so this is often not enough), and answers with the state it reached — a timeout is not an error; omit it (the default) and the create answers at once, before the phone connects, with state starting or booting, which you follow with the detail read or the act socket.
|
|
12091
12445
|
*/
|
|
12092
12446
|
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
12093
12447
|
security: [
|
|
@@ -13183,7 +13537,7 @@ export const shareListPermissions = (options) => (options?.client ?? client).get
|
|
|
13183
13537
|
/**
|
|
13184
13538
|
* Create share
|
|
13185
13539
|
*
|
|
13186
|
-
* Make one
|
|
13540
|
+
* Make one object readable by anyone holding a link, before sending the link to a person or embedding it. Name the object as resource {type, id} — a file id from the File API, a canvas id, a media asset's library_id/asset_id, or an agent id (agent_...) of a service agent whose owner turned share links on. The response is 201 and is the only time link.web_url is returned; store it, because later reads omit it and a lost address means creating another share (the old one keeps working until you delete it). Opening a file or media link signs a short-lived read address; opening a canvas link shows a snapshot rendered at that moment; opening an agent link starts a Hosted conversation with that agent as the visitor, so each browser keeps its own history. The link is anonymous, and for every type so far read-only. A type that cannot be shared answers 400 RESOURCE_TYPE_UNSUPPORTED; an agent whose share links are switched off answers 400 RESOURCE_NOT_SHAREABLE and its owner turns them on in the agent's embed settings (share_links), which also requires the agent to have a short number; an object that is missing or outside your organization answers 404 RESOURCE_NOT_FOUND.
|
|
13187
13541
|
*/
|
|
13188
13542
|
export const shareCreatePermission = (options) => (options.client ?? client).post({
|
|
13189
13543
|
security: [{
|
|
@@ -14833,7 +15187,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
14833
15187
|
/**
|
|
14834
15188
|
* Create secret
|
|
14835
15189
|
*
|
|
14836
|
-
* Store a manually supplied token in an active vault.
|
|
15190
|
+
* Store a manually supplied token in an active vault. Declare allowed_hosts (1–16 domains) to let the value be redeemed for those destinations; omit it to store an empty list, which name-based resolution still returns but no destination can redeem, and which a service agent's session environment never receives either way. MCP credential matching reads the same declarations, so a `*.` entry covers subdomains there too. Unlike Anthropic credentials, this native operation takes name and value directly and creates only static secrets; use praxis.vault.authorizations.create for OAuth. Its name must be unused by any non-archived secret in that vault; the response contains metadata but never the supplied value. Application praxis_vault_ref bindings declare vault_id and secret (the secret name), but currently return 501; do not copy the value into a plain-text binding or metadata as a substitute.
|
|
14837
15191
|
*/
|
|
14838
15192
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
14839
15193
|
security: [{
|
|
@@ -14851,7 +15205,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
14851
15205
|
/**
|
|
14852
15206
|
* Import secrets
|
|
14853
15207
|
*
|
|
14854
|
-
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets; if neither shared nor per-line hosts are supplied, new secrets
|
|
15208
|
+
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets; if neither shared nor per-line hosts are supplied, new secrets get an empty host list, which name-based resolution still returns but no destination can redeem. Imported entries carry the same host rules as Create secret, and a service agent's session environment never receives a credential that declares hosts.
|
|
14855
15209
|
*/
|
|
14856
15210
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
14857
15211
|
security: [{
|