@deepraxis/sdk 0.1.1-dev.a9f73d6 → 0.1.1-dev.ab0271b
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 +21 -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 +45 -13
- package/dist/generated/sdk.gen.js +96 -12
- package/dist/generated/types.gen.d.ts +814 -13
- 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 +208 -15
- package/dist/resources.generated.d.ts +93 -0
- package/dist/resources.generated.js +14 -0
- package/package.json +1 -1
|
@@ -357,6 +357,42 @@ 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 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.
|
|
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. 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
|
*
|
|
@@ -1054,6 +1090,12 @@ export const createAudioSpeech = (options) => (options.client ?? client).post({
|
|
|
1054
1090
|
...options.headers
|
|
1055
1091
|
}
|
|
1056
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 });
|
|
1057
1099
|
/**
|
|
1058
1100
|
* 列出浏览器会话
|
|
1059
1101
|
*
|
|
@@ -2544,7 +2586,7 @@ export const listOrganizationUsage = (options) => (options.client ?? client).get
|
|
|
2544
2586
|
/**
|
|
2545
2587
|
* List Organization Usage Events
|
|
2546
2588
|
*
|
|
2547
|
-
* 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.
|
|
2548
2590
|
*
|
|
2549
2591
|
*/
|
|
2550
2592
|
export const listOrganizationEvents = (options) => (options.client ?? client).get({
|
|
@@ -3766,6 +3808,30 @@ export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
|
3766
3808
|
...options.headers
|
|
3767
3809
|
}
|
|
3768
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
|
+
});
|
|
3769
3835
|
/**
|
|
3770
3836
|
* Remove a file or directory in the sandbox
|
|
3771
3837
|
*
|
|
@@ -3863,7 +3929,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
3863
3929
|
/**
|
|
3864
3930
|
* Run a command in the sandbox
|
|
3865
3931
|
*
|
|
3866
|
-
* 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"}.
|
|
3867
3933
|
*/
|
|
3868
3934
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
3869
3935
|
security: [{
|
|
@@ -4457,7 +4523,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4457
4523
|
/**
|
|
4458
4524
|
* Create deployment
|
|
4459
4525
|
*
|
|
4460
|
-
* 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"}}.
|
|
4461
4527
|
*/
|
|
4462
4528
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4463
4529
|
security: [{
|
|
@@ -4937,7 +5003,7 @@ export const applicationListVersions = (options) => (options.client ?? client).g
|
|
|
4937
5003
|
/**
|
|
4938
5004
|
* Create version
|
|
4939
5005
|
*
|
|
4940
|
-
* 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.
|
|
4941
5007
|
*/
|
|
4942
5008
|
export const applicationCreateVersion = (options) => (options.client ?? client).post({
|
|
4943
5009
|
security: [{
|
|
@@ -9507,7 +9573,7 @@ export const devopsPromotionsCancel = (options) => (options.client ?? client).po
|
|
|
9507
9573
|
/**
|
|
9508
9574
|
* Retry a promotion
|
|
9509
9575
|
*
|
|
9510
|
-
* 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.
|
|
9511
9577
|
*/
|
|
9512
9578
|
export const devopsPromotionsRetry = (options) => (options.client ?? client).post({
|
|
9513
9579
|
security: [{
|
|
@@ -10005,7 +10071,7 @@ export const devopsChangesGet = (options) => (options.client ?? client).get({
|
|
|
10005
10071
|
/**
|
|
10006
10072
|
* Abandon a change
|
|
10007
10073
|
*
|
|
10008
|
-
* 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.
|
|
10009
10075
|
*/
|
|
10010
10076
|
export const devopsChangesAbandon = (options) => (options.client ?? client).post({
|
|
10011
10077
|
security: [{
|
|
@@ -10148,6 +10214,24 @@ export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? c
|
|
|
10148
10214
|
...options.headers
|
|
10149
10215
|
}
|
|
10150
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
|
+
});
|
|
10151
10235
|
/**
|
|
10152
10236
|
* List connections
|
|
10153
10237
|
*
|
|
@@ -11385,7 +11469,7 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
|
11385
11469
|
/**
|
|
11386
11470
|
* Create speech
|
|
11387
11471
|
*
|
|
11388
|
-
* 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.
|
|
11389
11473
|
*/
|
|
11390
11474
|
export const mediaCreateSpeech = (options) => (options.client ?? client).post({
|
|
11391
11475
|
security: [{
|
|
@@ -11573,7 +11657,7 @@ export const mediaRequestHlsRenditions = (options) => (options.client ?? client)
|
|
|
11573
11657
|
/**
|
|
11574
11658
|
* Create voice
|
|
11575
11659
|
*
|
|
11576
|
-
* Create a voice for this library
|
|
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.
|
|
11577
11661
|
*/
|
|
11578
11662
|
export const mediaCreateVoice = (options) => (options.client ?? client).post({
|
|
11579
11663
|
security: [{
|
|
@@ -12051,7 +12135,7 @@ export const registryGitTreesRetrieve = (options) => (options.client ?? client).
|
|
|
12051
12135
|
/**
|
|
12052
12136
|
* Download a file from a ref
|
|
12053
12137
|
*
|
|
12054
|
-
*
|
|
12138
|
+
* 按引用读一个文件的原始字节,边读边发(流式),没有大小上限。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。路径不是文件或引用不存在返回 404。
|
|
12055
12139
|
*/
|
|
12056
12140
|
export const registryGitFilesRetrieve = (options) => (options.client ?? client).get({
|
|
12057
12141
|
security: [{
|
|
@@ -12223,7 +12307,7 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
12223
12307
|
/**
|
|
12224
12308
|
* Create sandbox (v2)
|
|
12225
12309
|
*
|
|
12226
|
-
* 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.
|
|
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.
|
|
12227
12311
|
*/
|
|
12228
12312
|
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
12229
12313
|
security: [
|
|
@@ -14969,7 +15053,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
14969
15053
|
/**
|
|
14970
15054
|
* Create secret
|
|
14971
15055
|
*
|
|
14972
|
-
* 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.
|
|
14973
15057
|
*/
|
|
14974
15058
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
14975
15059
|
security: [{
|
|
@@ -14987,7 +15071,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
14987
15071
|
/**
|
|
14988
15072
|
* Import secrets
|
|
14989
15073
|
*
|
|
14990
|
-
* 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.
|
|
14991
15075
|
*/
|
|
14992
15076
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
14993
15077
|
security: [{
|