@deepraxis/sdk 0.1.1-dev.1016953 → 0.1.1-dev.1048c59
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 +74 -20
- 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 +131 -53
- package/dist/generated/sdk.gen.js +286 -67
- package/dist/generated/types.gen.d.ts +9533 -3349
- 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 +721 -203
- package/dist/resources.generated.d.ts +1664 -200
- package/dist/resources.generated.js +42 -12
- package/package.json +1 -1
|
@@ -358,13 +358,11 @@ export const getAgentAppearance = (options) => (options.client ?? client).get({
|
|
|
358
358
|
...options
|
|
359
359
|
});
|
|
360
360
|
/**
|
|
361
|
-
*
|
|
361
|
+
* Retrieve agent phone
|
|
362
362
|
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
* Call this from your backend with your API key after your own login succeeds, then pass the returned code to Agent Kit in the browser; never call it from the browser. Customer authorization follows Shopify Storefront customer access tokens (Multipass-style sign-in, a short-lived token, renewal and logout), so that experience applies. customer_id is your own identifier for the customer: use an opaque id such as your database user id, not an email address or phone number. The value auth is reserved, and ids starting with anon_ are reserved for anonymous customers. The code works once and expires after expires_in seconds (default 900). The sign-in it starts lasts max_session_seconds (default 7 days); version, budget (US dollars, at most 2 decimals), system_message, agent_override and metadata apply to every token of the sign-in. Unlike Shopify, origin binds the whole sign-in to one page origin, and anonymous_access_token merges the conversations of the anonymous visitor who chatted before signing in into this customer. Example body: {"customer_id":"cus_8f2a91","origin":"https://shop.example.com"}.
|
|
363
|
+
* Read the agent's cloud 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), and 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. sku and name come from the configuration when one exists. When the phone is reachable, sandbox_id is the public sandbox id of its running instance: take the phone over with it through POST /sandbox/v1/sandboxes/{id}/act, or open the sandbox page's screen tab in the Console; lease_ends_at is when that instance's lease runs out and the sandbox kills it. archived_at and archive_error describe the last app-state archive, which a fresh instance restores on the next use. 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.
|
|
366
364
|
*/
|
|
367
|
-
export const
|
|
365
|
+
export const agentsPhoneRetrieve = (options) => (options.client ?? client).get({
|
|
368
366
|
security: [{
|
|
369
367
|
key: 'BearerAuth',
|
|
370
368
|
scheme: 'bearer',
|
|
@@ -374,36 +372,33 @@ export const createCustomerGrantCode = (options) => (options.client ?? client).p
|
|
|
374
372
|
name: 'X-API-Key',
|
|
375
373
|
type: 'apiKey'
|
|
376
374
|
}],
|
|
377
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
378
|
-
...options
|
|
379
|
-
headers: {
|
|
380
|
-
'Content-Type': 'application/json',
|
|
381
|
-
...options.headers
|
|
382
|
-
}
|
|
375
|
+
url: '/agent/v1/agents/{agent_id}/phone',
|
|
376
|
+
...options
|
|
383
377
|
});
|
|
384
378
|
/**
|
|
385
|
-
*
|
|
379
|
+
* Release agent phone
|
|
386
380
|
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
* No Authorization header is required: the grant code or the publishable key is the credential. Agent Kit calls this from the browser, so send the page Origin. With grant_code, the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, used, expired and other-agent codes all return the same 401 GRANT_CODE_INVALID. The sign-in starts now and lasts the code's max_session_seconds. Unlike Shopify, a visitor without an account gets a token too: send publishable_key instead and a new anonymous customer (anon_…) is created, bound to the request Origin, for 7 days. The access token lasts at most two hours and never outlives the sign-in; renew it with access_tokens/renew before expires_at. Both forms share the per-IP minute limit of anonymous issuance (default 20). Example body: {"grant_code":"cgc_…"}.
|
|
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. 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.
|
|
390
382
|
*/
|
|
391
|
-
export const
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
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
|
|
398
395
|
});
|
|
399
396
|
/**
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
* Get a fresh customer access token in the same sign-in, authenticated with the current one.
|
|
397
|
+
* Get agent embed policy
|
|
403
398
|
*
|
|
404
|
-
*
|
|
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.
|
|
405
400
|
*/
|
|
406
|
-
export const
|
|
401
|
+
export const getAgentEmbedPolicy = (options) => (options.client ?? client).get({
|
|
407
402
|
security: [{
|
|
408
403
|
key: 'BearerAuth',
|
|
409
404
|
scheme: 'bearer',
|
|
@@ -413,17 +408,15 @@ export const renewCustomerAccessToken = (options) => (options.client ?? client).
|
|
|
413
408
|
name: 'X-API-Key',
|
|
414
409
|
type: 'apiKey'
|
|
415
410
|
}],
|
|
416
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
411
|
+
url: '/agent/v1/agents/{agent_id}/embed_policy',
|
|
417
412
|
...options
|
|
418
413
|
});
|
|
419
414
|
/**
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
* Log the customer out by revoking the sign-in of the presented access token and every token issued in it.
|
|
415
|
+
* Update agent embed policy
|
|
423
416
|
*
|
|
424
|
-
*
|
|
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"]}.
|
|
425
418
|
*/
|
|
426
|
-
export const
|
|
419
|
+
export const updateAgentEmbedPolicy = (options) => (options.client ?? client).post({
|
|
427
420
|
security: [{
|
|
428
421
|
key: 'BearerAuth',
|
|
429
422
|
scheme: 'bearer',
|
|
@@ -433,15 +426,19 @@ export const deleteCurrentCustomerAccessToken = (options) => (options.client ??
|
|
|
433
426
|
name: 'X-API-Key',
|
|
434
427
|
type: 'apiKey'
|
|
435
428
|
}],
|
|
436
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
437
|
-
...options
|
|
429
|
+
url: '/agent/v1/agents/{agent_id}/embed_policy',
|
|
430
|
+
...options,
|
|
431
|
+
headers: {
|
|
432
|
+
'Content-Type': 'application/json',
|
|
433
|
+
...options.headers
|
|
434
|
+
}
|
|
438
435
|
});
|
|
439
436
|
/**
|
|
440
437
|
* List Computers
|
|
441
438
|
*
|
|
442
439
|
* List the computers of your organization, archived ones included.
|
|
443
440
|
*
|
|
444
|
-
* 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.
|
|
445
442
|
*/
|
|
446
443
|
export const computersList = (options) => (options?.client ?? client).get({
|
|
447
444
|
security: [{
|
|
@@ -461,7 +458,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
461
458
|
*
|
|
462
459
|
* Create a durable computer: a named machine whose files outlive sessions, for general agents.
|
|
463
460
|
*
|
|
464
|
-
* 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.
|
|
465
462
|
*/
|
|
466
463
|
export const computersCreate = (options) => (options.client ?? client).post({
|
|
467
464
|
security: [{
|
|
@@ -505,7 +502,7 @@ export const computersDelete = (options) => (options.client ?? client).delete({
|
|
|
505
502
|
*
|
|
506
503
|
* Read one computer's status, storage use and sandbox id.
|
|
507
504
|
*
|
|
508
|
-
* 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.
|
|
509
506
|
*/
|
|
510
507
|
export const computersRetrieve = (options) => (options.client ?? client).get({
|
|
511
508
|
security: [{
|
|
@@ -525,7 +522,7 @@ export const computersRetrieve = (options) => (options.client ?? client).get({
|
|
|
525
522
|
*
|
|
526
523
|
* Rename a computer.
|
|
527
524
|
*
|
|
528
|
-
* 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.
|
|
529
526
|
*/
|
|
530
527
|
export const computersUpdate = (options) => (options.client ?? client).post({
|
|
531
528
|
security: [{
|
|
@@ -549,7 +546,7 @@ export const computersUpdate = (options) => (options.client ?? client).post({
|
|
|
549
546
|
*
|
|
550
547
|
* Archive a computer: its files stay readable but new sessions cannot use it.
|
|
551
548
|
*
|
|
552
|
-
* 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.
|
|
553
550
|
*/
|
|
554
551
|
export const computersArchive = (options) => (options.client ?? client).post({
|
|
555
552
|
security: [{
|
|
@@ -594,7 +591,7 @@ export const computersAttachmentsCreate = (options) => (options.client ?? client
|
|
|
594
591
|
*
|
|
595
592
|
* List the entries of one directory on a computer.
|
|
596
593
|
*
|
|
597
|
-
* 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.
|
|
598
595
|
*/
|
|
599
596
|
export const computersFilesList = (options) => (options.client ?? client).get({
|
|
600
597
|
security: [{
|
|
@@ -614,7 +611,7 @@ export const computersFilesList = (options) => (options.client ?? client).get({
|
|
|
614
611
|
*
|
|
615
612
|
* Download the bytes of one file on a computer, up to 16 MiB, with single-range support.
|
|
616
613
|
*
|
|
617
|
-
* 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.
|
|
618
615
|
*/
|
|
619
616
|
export const computersFilesContent = (options) => (options.client ?? client).get({
|
|
620
617
|
security: [{
|
|
@@ -629,6 +626,24 @@ export const computersFilesContent = (options) => (options.client ?? client).get
|
|
|
629
626
|
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
630
627
|
...options
|
|
631
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
|
+
});
|
|
632
647
|
/**
|
|
633
648
|
* Convert a Computer Document to PDF
|
|
634
649
|
*
|
|
@@ -777,6 +792,54 @@ export const forkSession = (options) => (options.client ?? client).post({
|
|
|
777
792
|
...options.headers
|
|
778
793
|
}
|
|
779
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
|
+
});
|
|
819
|
+
/**
|
|
820
|
+
* Update session agent version
|
|
821
|
+
*
|
|
822
|
+
* Move one session to a version of its agent
|
|
823
|
+
*
|
|
824
|
+
* Without `version`, the session moves to the agent's active version — the version new sessions get now, which is not necessarily the newest saved one. With `version`, it moves to that existing version. The change is idempotent: asking for the version the session is already on answers the session and writes nothing, so the call may be repeated freely. A session that is running a turn answers 409 SESSION_CONFLICT and changes nothing, because a turn finishes on the version it started with; ask again once it is idle. The move writes a `session.updated` event carrying the agent version and the caller as its actor, so every version change is attributable. Main sessions additionally follow their agent's active version at the start of a person-started turn; this endpoint is the same move made explicitly, and it works on every kind of session, including worker sessions that never follow on their own.
|
|
825
|
+
*/
|
|
826
|
+
export const updateSessionAgentVersion = (options) => (options.client ?? client).post({
|
|
827
|
+
security: [{
|
|
828
|
+
key: 'BearerAuth',
|
|
829
|
+
scheme: 'bearer',
|
|
830
|
+
type: 'http'
|
|
831
|
+
}, {
|
|
832
|
+
key: 'ApiKeyAuth',
|
|
833
|
+
name: 'X-API-Key',
|
|
834
|
+
type: 'apiKey'
|
|
835
|
+
}],
|
|
836
|
+
url: '/agent/v1/sessions/{session_id}/agent_version',
|
|
837
|
+
...options,
|
|
838
|
+
headers: {
|
|
839
|
+
'Content-Type': 'application/json',
|
|
840
|
+
...options.headers
|
|
841
|
+
}
|
|
842
|
+
});
|
|
780
843
|
/**
|
|
781
844
|
* List Session Artifacts (Extension)
|
|
782
845
|
*
|
|
@@ -1027,6 +1090,12 @@ export const createAudioSpeech = (options) => (options.client ?? client).post({
|
|
|
1027
1090
|
...options.headers
|
|
1028
1091
|
}
|
|
1029
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 });
|
|
1030
1099
|
/**
|
|
1031
1100
|
* 列出浏览器会话
|
|
1032
1101
|
*
|
|
@@ -2517,7 +2586,7 @@ export const listOrganizationUsage = (options) => (options.client ?? client).get
|
|
|
2517
2586
|
/**
|
|
2518
2587
|
* List Organization Usage Events
|
|
2519
2588
|
*
|
|
2520
|
-
* 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.
|
|
2521
2590
|
*
|
|
2522
2591
|
*/
|
|
2523
2592
|
export const listOrganizationEvents = (options) => (options.client ?? client).get({
|
|
@@ -3068,7 +3137,7 @@ export const designateOrganizationPositionHead = (options) => (options.client ??
|
|
|
3068
3137
|
/**
|
|
3069
3138
|
* Hire into a position
|
|
3070
3139
|
*
|
|
3071
|
-
* Seats an existing member or agent in a vacant position; use it to fill a position that nobody holds, and use replace_holder to swap the current holder in one step. An actor is a person (human:usr_...) or an agent (agent:agent_...), treated identically, and must exist in your organization and not be archived. The position must be active and vacant, and a position has at most one active assignment. An actor may hold several positions, and exactly one of its active assignments is primary: omit primary to make the first assignment primary and later ones concurrent; primary true makes this one primary and turns the previous primary into a concurrent one; primary false for an actor that holds nothing is refused. request_id makes the call idempotent: repeating it returns the first assignment and seats nobody else. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing request_id, a candidate.kind other than member, an empty candidate.actor, a non-boolean primary or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND when the actor is not an active member or agent of your organization; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED; 409 PRIMARY_ASSIGNMENT_REQUIRED for primary false on an actor that holds nothing. Example body: {"candidate":{"kind":"member","actor":"human:usr_123"},"request_id":"hire-support-1"}.
|
|
3140
|
+
* Seats an existing member or agent in a vacant position; use it to fill a position that nobody holds, and use replace_holder to swap the current holder in one step. An actor is a person (human:usr_...) or an agent (agent:agent_...), treated identically, and must exist in your organization and not be archived. An agent created moments ago may not be in the organization roster yet (agents enter it asynchronously): that answers 503 ACTOR_SYNCING with a Retry-After header and retryable true, and the same call succeeds after that wait. The position must be active and vacant, and a position has at most one active assignment. An actor may hold several positions, and exactly one of its active assignments is primary: omit primary to make the first assignment primary and later ones concurrent; primary true makes this one primary and turns the previous primary into a concurrent one; primary false for an actor that holds nothing is refused. request_id makes the call idempotent: repeating it returns the first assignment and seats nobody else. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing request_id, a candidate.kind other than member, an empty candidate.actor, a non-boolean primary or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND when the actor is not an active member or agent of your organization; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED; 409 PRIMARY_ASSIGNMENT_REQUIRED for primary false on an actor that holds nothing. Example body: {"candidate":{"kind":"member","actor":"human:usr_123"},"request_id":"hire-support-1"}.
|
|
3072
3141
|
*/
|
|
3073
3142
|
export const hireOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3074
3143
|
security: [{
|
|
@@ -3739,6 +3808,30 @@ export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
|
3739
3808
|
...options.headers
|
|
3740
3809
|
}
|
|
3741
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
|
+
});
|
|
3742
3835
|
/**
|
|
3743
3836
|
* Remove a file or directory in the sandbox
|
|
3744
3837
|
*
|
|
@@ -3836,7 +3929,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
3836
3929
|
/**
|
|
3837
3930
|
* Run a command in the sandbox
|
|
3838
3931
|
*
|
|
3839
|
-
* 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"}.
|
|
3840
3933
|
*/
|
|
3841
3934
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
3842
3935
|
security: [{
|
|
@@ -3876,7 +3969,7 @@ export const sessionsDelete = (options) => (options.client ?? client).delete({
|
|
|
3876
3969
|
/**
|
|
3877
3970
|
* Get session
|
|
3878
3971
|
*
|
|
3879
|
-
* Read one session by id: its agent snapshot, status, model and thinking selection, resources, title, metadata and, for a fork, forked_from. Use it to poll status; to read what happened use sessions.events.list. This response does not include a machine object or sandbox id. With no environment_id or Computer selected at creation, the session starts on
|
|
3972
|
+
* Read one session by id: its agent snapshot, status, model and thinking selection, resources, title, metadata and, for a fork, forked_from. Use it to poll status; to read what happened use sessions.events.list. This response does not include a machine object or sandbox id. With no environment_id or Computer selected at creation, the session starts on the agent version's default environment, node22.
|
|
3880
3973
|
*/
|
|
3881
3974
|
export const sessionsRetrieve = (options) => (options.client ?? client).get({
|
|
3882
3975
|
security: [{
|
|
@@ -3934,7 +4027,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
3934
4027
|
/**
|
|
3935
4028
|
* Create agent
|
|
3936
4029
|
*
|
|
3937
|
-
* 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"}]}.
|
|
4030
|
+
* 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. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
|
|
3938
4031
|
*/
|
|
3939
4032
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
3940
4033
|
security: [{
|
|
@@ -4050,7 +4143,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
4050
4143
|
/**
|
|
4051
4144
|
* Create session
|
|
4052
4145
|
*
|
|
4053
|
-
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (
|
|
4146
|
+
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (node22 for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. The retired "light" returns 400 naming the two forms that work: "node22", or null for no machine. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
|
|
4054
4147
|
*/
|
|
4055
4148
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
4056
4149
|
security: [{
|
|
@@ -4430,7 +4523,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4430
4523
|
/**
|
|
4431
4524
|
* Create deployment
|
|
4432
4525
|
*
|
|
4433
|
-
* 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.
|
|
4526
|
+
* 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"}}.
|
|
4434
4527
|
*/
|
|
4435
4528
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4436
4529
|
security: [{
|
|
@@ -4910,7 +5003,7 @@ export const applicationListVersions = (options) => (options.client ?? client).g
|
|
|
4910
5003
|
/**
|
|
4911
5004
|
* Create version
|
|
4912
5005
|
*
|
|
4913
|
-
* 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.
|
|
5006
|
+
* 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.
|
|
4914
5007
|
*/
|
|
4915
5008
|
export const applicationCreateVersion = (options) => (options.client ?? client).post({
|
|
4916
5009
|
security: [{
|
|
@@ -8220,8 +8313,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8220
8313
|
* - `transform` — Position, scale, rotation, opacity, crop, blur.
|
|
8221
8314
|
* - `fit` — contain, cover, fill or none.
|
|
8222
8315
|
* - `blend` — Layer blend mode; null clears.
|
|
8223
|
-
* - `style` — Text styling: font,
|
|
8224
|
-
* - `style.
|
|
8316
|
+
* - `style` — Text styling in Shotstack's rich shape: font, gradient, stroke, shadow, box, border, align, per-word animation.
|
|
8317
|
+
* - `style.align.vertical` — top, middle or bottom; omit it, never null.
|
|
8225
8318
|
* - `playback` — Rate, direction, audio policy, or freeze.
|
|
8226
8319
|
* - `volumeDb` — Audio level in dB; 0 is source level.
|
|
8227
8320
|
* - `gain` — Keyframed audio level in dB.
|
|
@@ -8242,6 +8335,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8242
8335
|
* - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
|
|
8243
8336
|
* - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
|
|
8244
8337
|
* - `INVALID_STYLE` — A style value is out of range.
|
|
8338
|
+
* - `UNSUPPORTED_STYLE_FIELD` — A Shotstack style field this platform cannot render yet.
|
|
8339
|
+
* - `STYLE_LEGACY_FIELDS` — A style written in the old flat shape; it still works.
|
|
8245
8340
|
* - `INVALID_MASK` — A mask definition is malformed.
|
|
8246
8341
|
* - `MASK_IN_USE` — The edit would break a live mask.
|
|
8247
8342
|
* - `TOO_MANY_MASKS` — At most 16 masks per project.
|
|
@@ -9478,7 +9573,7 @@ export const devopsPromotionsCancel = (options) => (options.client ?? client).po
|
|
|
9478
9573
|
/**
|
|
9479
9574
|
* Retry a promotion
|
|
9480
9575
|
*
|
|
9481
|
-
* Continue a promotion that stopped part-way
|
|
9576
|
+
* 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.
|
|
9482
9577
|
*/
|
|
9483
9578
|
export const devopsPromotionsRetry = (options) => (options.client ?? client).post({
|
|
9484
9579
|
security: [{
|
|
@@ -9976,7 +10071,7 @@ export const devopsChangesGet = (options) => (options.client ?? client).get({
|
|
|
9976
10071
|
/**
|
|
9977
10072
|
* Abandon a change
|
|
9978
10073
|
*
|
|
9979
|
-
* 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).
|
|
10074
|
+
* 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.
|
|
9980
10075
|
*/
|
|
9981
10076
|
export const devopsChangesAbandon = (options) => (options.client ?? client).post({
|
|
9982
10077
|
security: [{
|
|
@@ -10012,7 +10107,7 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
|
|
|
10012
10107
|
/**
|
|
10013
10108
|
* Open a change's pull request
|
|
10014
10109
|
*
|
|
10015
|
-
* 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. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and
|
|
10110
|
+
* 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.
|
|
10016
10111
|
*/
|
|
10017
10112
|
export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
|
|
10018
10113
|
security: [{
|
|
@@ -10027,6 +10122,20 @@ export const devopsChangesOpenPullRequest = (options) => (options.client ?? clie
|
|
|
10027
10122
|
...options.headers
|
|
10028
10123
|
}
|
|
10029
10124
|
});
|
|
10125
|
+
/**
|
|
10126
|
+
* Get a change workspace's read-only git credential
|
|
10127
|
+
*
|
|
10128
|
+
* A read-only git credential for the repository a change's project is bound to: a GitHub App installation token limited to that one repository with contents read, which GitHub expires within an hour. It exists for git's credential helper inside the change's cloud workspace (`praxis devops change git-credential`, installed by DevOps when it clones the repository), so `git fetch`, history and lazily fetched file contents work there; the helper hands the token to that one git request and keeps nothing. Writing is never possible with it: commits reach the branch only through the unit push. You do not need to call this yourself. Anyone who can read the change can read its repository already through the code reads, so this grants no new access. An abandoned change is refused with INVALID_ARGUMENT and a project without a repository with SOURCE_NOT_CONFIGURED. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
10129
|
+
*/
|
|
10130
|
+
export const devopsChangesGitCredential = (options) => (options.client ?? client).post({
|
|
10131
|
+
security: [{
|
|
10132
|
+
key: 'devops-bearerAuth',
|
|
10133
|
+
scheme: 'bearer',
|
|
10134
|
+
type: 'http'
|
|
10135
|
+
}],
|
|
10136
|
+
url: '/devops/v1/changes/{id}:gitCredential',
|
|
10137
|
+
...options
|
|
10138
|
+
});
|
|
10030
10139
|
/**
|
|
10031
10140
|
* List a project's pull requests
|
|
10032
10141
|
*
|
|
@@ -10105,6 +10214,24 @@ export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? c
|
|
|
10105
10214
|
...options.headers
|
|
10106
10215
|
}
|
|
10107
10216
|
});
|
|
10217
|
+
/**
|
|
10218
|
+
* Close a pull request without merging it
|
|
10219
|
+
*
|
|
10220
|
+
* 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.
|
|
10221
|
+
*/
|
|
10222
|
+
export const devopsPullRequestsClose = (options) => (options.client ?? client).post({
|
|
10223
|
+
security: [{
|
|
10224
|
+
key: 'devops-bearerAuth',
|
|
10225
|
+
scheme: 'bearer',
|
|
10226
|
+
type: 'http'
|
|
10227
|
+
}],
|
|
10228
|
+
url: '/devops/v1/pull-requests/{id}:close',
|
|
10229
|
+
...options,
|
|
10230
|
+
headers: {
|
|
10231
|
+
'Content-Type': 'application/json',
|
|
10232
|
+
...options.headers
|
|
10233
|
+
}
|
|
10234
|
+
});
|
|
10108
10235
|
/**
|
|
10109
10236
|
* List connections
|
|
10110
10237
|
*
|
|
@@ -11196,7 +11323,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
11196
11323
|
/**
|
|
11197
11324
|
* Get job
|
|
11198
11325
|
*
|
|
11199
|
-
* Read
|
|
11326
|
+
* 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.
|
|
11200
11327
|
*/
|
|
11201
11328
|
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
11202
11329
|
security: [{
|
|
@@ -11288,7 +11415,7 @@ export const mediaGetAssetLineage = (options) => (options.client ?? client).get(
|
|
|
11288
11415
|
/**
|
|
11289
11416
|
* Generate image
|
|
11290
11417
|
*
|
|
11291
|
-
* Generate
|
|
11418
|
+
* Generate images into a library from a prompt, optionally guided by existing pictures. {library_id} also accepts default, the organization’s default library. prompt is required; n (1 to 10), size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Name size, not an aspect ratio. Set output to sticker for a cut-out with a transparent background. references attach pictures of the same library with a role: subject keeps a person, product or scene consistent (several subjects put several characters in one picture), edit_target is the picture to change, style is the look to follow, structure the composition. Only a model whose modes in GET /media/v1/generation/capabilities include image takes references; any other answers INVALID_PARAMS naming the models that do, and a role a model cannot honour answers REFERENCE_TYPE_MISMATCH, both before anything is charged. A reference may be an element id (a character, product, scene or brand from the materials endpoints), which expands into its pictures and appends its description to the prompt. To draw several candidates of one key frame, send n and keep the ones you want; delete the rest. Charges are per image at the model API prices and appear in the Job’s usage; a refused or failed image costs nothing. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.
|
|
11292
11419
|
*/
|
|
11293
11420
|
export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
11294
11421
|
security: [{
|
|
@@ -11306,7 +11433,7 @@ export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
|
11306
11433
|
/**
|
|
11307
11434
|
* Generate video
|
|
11308
11435
|
*
|
|
11309
|
-
* Generate
|
|
11436
|
+
* Generate videos into a library: from a prompt, from frames, from reference pictures or videos, or by editing an existing video. {library_id} also accepts default, the organization’s default library. mode picks the anchor: text (prompt only); image (animates first_frame); first_last (between first_frame and last_frame); reference (1 to 9 references: pictures with role subject or style keep a person, product or look consistent, and video assets with role video give the camera and motion to follow; an element id expands into its pictures and description); edit (keeps the video named by source, at least 4 s, and changes what the prompt says, such as replacing its person with a subject picture; the output is as long as the source). Frames and references are assets of the same library; in the prompt call them @video1 and @image1, @image2… in request order. Read GET /media/v1/generation/capabilities first: a model takes only the modes it lists. To draw several takes of one shot and keep the best, send n (1 to 4); 480p is the cheapest way to compare takes. Charges are per output second at the model API prices and appear in the Job’s usage; a job with an input video is metered on input plus output seconds, so it costs more than the output length suggests (a 5 s edit of a 5 s source bills about 6 s); a refused or failed output costs nothing, and so does a request refused before the job starts. A real human face in a source or reference is refused by the model with CONTENT_REJECTED. Refused before any charge: output gif (OPERATION_NOT_SUPPORTED), negative_prompt, references outside reference and edit, and an unknown mode. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.
|
|
11310
11437
|
*/
|
|
11311
11438
|
export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
11312
11439
|
security: [{
|
|
@@ -11324,7 +11451,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
11324
11451
|
/**
|
|
11325
11452
|
* Edit asset
|
|
11326
11453
|
*
|
|
11327
|
-
*
|
|
11454
|
+
* 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.
|
|
11328
11455
|
*/
|
|
11329
11456
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
11330
11457
|
security: [{
|
|
@@ -11342,7 +11469,7 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
|
11342
11469
|
/**
|
|
11343
11470
|
* Create speech
|
|
11344
11471
|
*
|
|
11345
|
-
* 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.
|
|
11472
|
+
* 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.
|
|
11346
11473
|
*/
|
|
11347
11474
|
export const mediaCreateSpeech = (options) => (options.client ?? client).post({
|
|
11348
11475
|
security: [{
|
|
@@ -11438,7 +11565,7 @@ export const mediaListUnderstandingsByLibrary = (options) => (options.client ??
|
|
|
11438
11565
|
/**
|
|
11439
11566
|
* List jobs
|
|
11440
11567
|
*
|
|
11441
|
-
* List batch and generation jobs
|
|
11568
|
+
* List the batch and generation jobs of a library, newest first, to find a job whose id you lost or to watch several takes at once. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Each entry is the same Job that GET /media/v1/libraries/{library_id}/jobs/{job_id} returns, with outputs, failures and usage.
|
|
11442
11569
|
*/
|
|
11443
11570
|
export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
11444
11571
|
security: [{
|
|
@@ -11452,7 +11579,7 @@ export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
|
11452
11579
|
/**
|
|
11453
11580
|
* Cancel job
|
|
11454
11581
|
*
|
|
11455
|
-
*
|
|
11582
|
+
* Stop a generation job you no longer need, for example after the first takes of a draw show the prompt is wrong. Outputs that are queued are cancelled and never charged; outputs already produced stay in the library and stay charged. A video cannot be stopped once the provider has started generating it: the call answers 409 JOB_INVALID_STATE (details VIDEO_ALREADY_RUNNING), and that output still finishes, is saved to the library and is charged. Read the returned Job, or poll it, to see which outputs ended.
|
|
11456
11583
|
*/
|
|
11457
11584
|
export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
11458
11585
|
security: [{
|
|
@@ -11527,6 +11654,42 @@ export const mediaRequestHlsRenditions = (options) => (options.client ?? client)
|
|
|
11527
11654
|
...options.headers
|
|
11528
11655
|
}
|
|
11529
11656
|
});
|
|
11657
|
+
/**
|
|
11658
|
+
* Create voice
|
|
11659
|
+
*
|
|
11660
|
+
* 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.
|
|
11661
|
+
*/
|
|
11662
|
+
export const mediaCreateVoice = (options) => (options.client ?? client).post({
|
|
11663
|
+
security: [{
|
|
11664
|
+
key: 'media-BearerAuth',
|
|
11665
|
+
scheme: 'bearer',
|
|
11666
|
+
type: 'http'
|
|
11667
|
+
}],
|
|
11668
|
+
url: '/media/v1/libraries/{library_id}/voices',
|
|
11669
|
+
...options,
|
|
11670
|
+
headers: {
|
|
11671
|
+
'Content-Type': 'application/json',
|
|
11672
|
+
...options.headers
|
|
11673
|
+
}
|
|
11674
|
+
});
|
|
11675
|
+
/**
|
|
11676
|
+
* Design a voice
|
|
11677
|
+
*
|
|
11678
|
+
* 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.
|
|
11679
|
+
*/
|
|
11680
|
+
export const mediaDesignVoice = (options) => (options.client ?? client).post({
|
|
11681
|
+
security: [{
|
|
11682
|
+
key: 'media-BearerAuth',
|
|
11683
|
+
scheme: 'bearer',
|
|
11684
|
+
type: 'http'
|
|
11685
|
+
}],
|
|
11686
|
+
url: '/media/v1/libraries/{library_id}/voices/designs',
|
|
11687
|
+
...options,
|
|
11688
|
+
headers: {
|
|
11689
|
+
'Content-Type': 'application/json',
|
|
11690
|
+
...options.headers
|
|
11691
|
+
}
|
|
11692
|
+
});
|
|
11530
11693
|
/**
|
|
11531
11694
|
* List types
|
|
11532
11695
|
*
|
|
@@ -11883,7 +12046,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
|
|
|
11883
12046
|
/**
|
|
11884
12047
|
* Retrieve package
|
|
11885
12048
|
*
|
|
11886
|
-
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404
|
|
12049
|
+
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。软删期间这个包一律 404,恢复后才重新出现。
|
|
11887
12050
|
*/
|
|
11888
12051
|
export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
|
|
11889
12052
|
security: [{
|
|
@@ -11927,6 +12090,62 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
|
|
|
11927
12090
|
...options.headers
|
|
11928
12091
|
}
|
|
11929
12092
|
});
|
|
12093
|
+
/**
|
|
12094
|
+
* List commits
|
|
12095
|
+
*
|
|
12096
|
+
* 列出一个 git 包的提交历史,最新的在前。ref 不给就是包的默认分支;limit 与 offset 分页,has_more 为 true 表示还有下一页。只读:提交只能通过 git 协议推送(clone 地址在包的 clone_url)。OCI 包没有 git 读接口,返回 404。
|
|
12097
|
+
*/
|
|
12098
|
+
export const registryGitLog = (options) => (options.client ?? client).get({
|
|
12099
|
+
security: [{
|
|
12100
|
+
key: 'registry-bearerAuth',
|
|
12101
|
+
scheme: 'bearer',
|
|
12102
|
+
type: 'http'
|
|
12103
|
+
}],
|
|
12104
|
+
url: '/registry/v1/packages/{package_id}/git/log',
|
|
12105
|
+
...options
|
|
12106
|
+
});
|
|
12107
|
+
/**
|
|
12108
|
+
* Read a commit
|
|
12109
|
+
*
|
|
12110
|
+
* 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
|
|
12111
|
+
*/
|
|
12112
|
+
export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
|
|
12113
|
+
security: [{
|
|
12114
|
+
key: 'registry-bearerAuth',
|
|
12115
|
+
scheme: 'bearer',
|
|
12116
|
+
type: 'http'
|
|
12117
|
+
}],
|
|
12118
|
+
url: '/registry/v1/packages/{package_id}/git/commits/{sha}',
|
|
12119
|
+
...options
|
|
12120
|
+
});
|
|
12121
|
+
/**
|
|
12122
|
+
* List a tree
|
|
12123
|
+
*
|
|
12124
|
+
* 读一个树对象(或一个提交的根树)的条目:名字、类型(blob / tree / commit)、模式、对象 id,以及已知时的大小。只列这一层,不递归。
|
|
12125
|
+
*/
|
|
12126
|
+
export const registryGitTreesRetrieve = (options) => (options.client ?? client).get({
|
|
12127
|
+
security: [{
|
|
12128
|
+
key: 'registry-bearerAuth',
|
|
12129
|
+
scheme: 'bearer',
|
|
12130
|
+
type: 'http'
|
|
12131
|
+
}],
|
|
12132
|
+
url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
|
|
12133
|
+
...options
|
|
12134
|
+
});
|
|
12135
|
+
/**
|
|
12136
|
+
* Download a file from a ref
|
|
12137
|
+
*
|
|
12138
|
+
* 按引用读一个文件的原始字节,边读边发(流式),没有大小上限。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。路径不是文件或引用不存在返回 404。
|
|
12139
|
+
*/
|
|
12140
|
+
export const registryGitFilesRetrieve = (options) => (options.client ?? client).get({
|
|
12141
|
+
security: [{
|
|
12142
|
+
key: 'registry-bearerAuth',
|
|
12143
|
+
scheme: 'bearer',
|
|
12144
|
+
type: 'http'
|
|
12145
|
+
}],
|
|
12146
|
+
url: '/registry/v1/packages/{package_id}/git/files/{path}',
|
|
12147
|
+
...options
|
|
12148
|
+
});
|
|
11930
12149
|
/**
|
|
11931
12150
|
* List version contents
|
|
11932
12151
|
*
|
|
@@ -12088,7 +12307,7 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
12088
12307
|
/**
|
|
12089
12308
|
* Create sandbox (v2)
|
|
12090
12309
|
*
|
|
12091
|
-
* 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.
|
|
12310
|
+
* 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.
|
|
12092
12311
|
*/
|
|
12093
12312
|
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
12094
12313
|
security: [
|
|
@@ -13184,7 +13403,7 @@ export const shareListPermissions = (options) => (options?.client ?? client).get
|
|
|
13184
13403
|
/**
|
|
13185
13404
|
* Create share
|
|
13186
13405
|
*
|
|
13187
|
-
* Make one
|
|
13406
|
+
* 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.
|
|
13188
13407
|
*/
|
|
13189
13408
|
export const shareCreatePermission = (options) => (options.client ?? client).post({
|
|
13190
13409
|
security: [{
|
|
@@ -14834,7 +15053,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
14834
15053
|
/**
|
|
14835
15054
|
* Create secret
|
|
14836
15055
|
*
|
|
14837
|
-
* Store a manually supplied token in an active vault.
|
|
15056
|
+
* 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.
|
|
14838
15057
|
*/
|
|
14839
15058
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
14840
15059
|
security: [{
|
|
@@ -14852,7 +15071,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
14852
15071
|
/**
|
|
14853
15072
|
* Import secrets
|
|
14854
15073
|
*
|
|
14855
|
-
* 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
|
|
15074
|
+
* 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.
|
|
14856
15075
|
*/
|
|
14857
15076
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
14858
15077
|
security: [{
|