@deepraxis/sdk 0.1.1-dev.218780d → 0.1.1-dev.22936b5

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.
@@ -402,7 +402,7 @@ export const updateAgentEmbedPolicy = (options) => (options.client ?? client).po
402
402
  *
403
403
  * List the computers of your organization, archived ones included.
404
404
  *
405
- * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
405
+ * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
406
406
  */
407
407
  export const computersList = (options) => (options?.client ?? client).get({
408
408
  security: [{
@@ -422,7 +422,7 @@ export const computersList = (options) => (options?.client ?? client).get({
422
422
  *
423
423
  * Create a durable computer: a named machine whose files outlive sessions, for general agents.
424
424
  *
425
- * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
425
+ * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
426
426
  */
427
427
  export const computersCreate = (options) => (options.client ?? client).post({
428
428
  security: [{
@@ -466,7 +466,7 @@ export const computersDelete = (options) => (options.client ?? client).delete({
466
466
  *
467
467
  * Read one computer's status, storage use and sandbox id.
468
468
  *
469
- * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
469
+ * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
470
470
  */
471
471
  export const computersRetrieve = (options) => (options.client ?? client).get({
472
472
  security: [{
@@ -486,7 +486,7 @@ export const computersRetrieve = (options) => (options.client ?? client).get({
486
486
  *
487
487
  * Rename a computer.
488
488
  *
489
- * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
489
+ * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
490
490
  */
491
491
  export const computersUpdate = (options) => (options.client ?? client).post({
492
492
  security: [{
@@ -510,7 +510,7 @@ export const computersUpdate = (options) => (options.client ?? client).post({
510
510
  *
511
511
  * Archive a computer: its files stay readable but new sessions cannot use it.
512
512
  *
513
- * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
513
+ * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers. A computer an active agent holds is refused with 409 COMPUTER_IN_USE; archive the agent first.
514
514
  */
515
515
  export const computersArchive = (options) => (options.client ?? client).post({
516
516
  security: [{
@@ -555,7 +555,7 @@ export const computersAttachmentsCreate = (options) => (options.client ?? client
555
555
  *
556
556
  * List the entries of one directory on a computer.
557
557
  *
558
- * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
558
+ * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
559
559
  */
560
560
  export const computersFilesList = (options) => (options.client ?? client).get({
561
561
  security: [{
@@ -575,7 +575,7 @@ export const computersFilesList = (options) => (options.client ?? client).get({
575
575
  *
576
576
  * Download the bytes of one file on a computer, up to 16 MiB, with single-range support.
577
577
  *
578
- * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
578
+ * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
579
579
  */
580
580
  export const computersFilesContent = (options) => (options.client ?? client).get({
581
581
  security: [{
@@ -590,6 +590,24 @@ export const computersFilesContent = (options) => (options.client ?? client).get
590
590
  url: '/agent/v1/computers/{computer_id}/files/content',
591
591
  ...options
592
592
  });
593
+ /**
594
+ * Preview a computer file
595
+ *
596
+ * 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.
597
+ */
598
+ export const previewComputerFile = (options) => (options.client ?? client).get({
599
+ security: [{
600
+ key: 'BearerAuth',
601
+ scheme: 'bearer',
602
+ type: 'http'
603
+ }, {
604
+ key: 'ApiKeyAuth',
605
+ name: 'X-API-Key',
606
+ type: 'apiKey'
607
+ }],
608
+ url: '/agent/v1/computers/{computer_id}/files/preview',
609
+ ...options
610
+ });
593
611
  /**
594
612
  * Convert a Computer Document to PDF
595
613
  *
@@ -738,6 +756,30 @@ export const forkSession = (options) => (options.client ?? client).post({
738
756
  ...options.headers
739
757
  }
740
758
  });
759
+ /**
760
+ * Rename Session (Extension)
761
+ *
762
+ * Give a session a short, branch-like name; the main session is always main and cannot be renamed.
763
+ *
764
+ * 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"}.
765
+ */
766
+ export const renameSession = (options) => (options.client ?? client).post({
767
+ security: [{
768
+ key: 'BearerAuth',
769
+ scheme: 'bearer',
770
+ type: 'http'
771
+ }, {
772
+ key: 'ApiKeyAuth',
773
+ name: 'X-API-Key',
774
+ type: 'apiKey'
775
+ }],
776
+ url: '/agent/v1/sessions/{session_id}/name',
777
+ ...options,
778
+ headers: {
779
+ 'Content-Type': 'application/json',
780
+ ...options.headers
781
+ }
782
+ });
741
783
  /**
742
784
  * Update session agent version
743
785
  *
@@ -2502,7 +2544,7 @@ export const listOrganizationUsage = (options) => (options.client ?? client).get
2502
2544
  /**
2503
2545
  * List Organization Usage Events
2504
2546
  *
2505
- * Usage events newest first, one opaque cursor page at a time; a page never duplicates or skips an event. Every item carries its metering lines (meter, display name, consumed quantity and unit, mapped from the billing measurements); the per-line price split (list unit price, pricing unit, billed cost) rides only the single event — fetch /organization/v1/events/{id} for it.
2547
+ * Usage events newest first by occurrence time (occurred_at, when the usage happened), one opaque cursor page at a time; a page never duplicates or skips an event. Every item carries its metering lines (meter, display name, consumed quantity and unit, mapped from the billing measurements); the per-line price split (list unit price, pricing unit, billed cost) rides only the single event — fetch /organization/v1/events/{id} for it. A cursor belongs to the order it was issued under: one obtained before this occurrence-time ordering, or used under the other sort direction, is refused with 400 INVALID_PARAMS instead of being reused — restart the listing.
2506
2548
  *
2507
2549
  */
2508
2550
  export const listOrganizationEvents = (options) => (options.client ?? client).get({
@@ -3724,6 +3766,30 @@ export const renameSandbox = (options) => (options.client ?? client).patch({
3724
3766
  ...options.headers
3725
3767
  }
3726
3768
  });
3769
+ /**
3770
+ * Act on a phone sandbox's screen
3771
+ *
3772
+ * 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.
3773
+ *
3774
+ * 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.
3775
+ */
3776
+ export const actOnSandboxDisplay = (options) => (options.client ?? client).post({
3777
+ security: [{
3778
+ key: 'BearerAuth',
3779
+ scheme: 'bearer',
3780
+ type: 'http'
3781
+ }, {
3782
+ key: 'ApiKeyAuth',
3783
+ name: 'X-API-Key',
3784
+ type: 'apiKey'
3785
+ }],
3786
+ url: '/sandbox/v1/sandboxes/{sandboxID}/act',
3787
+ ...options,
3788
+ headers: {
3789
+ 'Content-Type': 'application/json',
3790
+ ...options.headers
3791
+ }
3792
+ });
3727
3793
  /**
3728
3794
  * Remove a file or directory in the sandbox
3729
3795
  *
@@ -3821,7 +3887,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
3821
3887
  /**
3822
3888
  * Run a command in the sandbox
3823
3889
  *
3824
- * Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {"cmd":"echo hi"}.
3890
+ * Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. On an android sandbox the command runs in the phone's root shell, its stderr is merged into stdout (read stdout and expect stderr to come back empty), and background mode is unavailable. Example body: {"cmd":"echo hi"}.
3825
3891
  */
3826
3892
  export const runSandboxCommand = (options) => (options.client ?? client).post({
3827
3893
  security: [{
@@ -3919,7 +3985,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
3919
3985
  /**
3920
3986
  * Create agent
3921
3987
  *
3922
- * Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
3988
+ * 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.
3923
3989
  */
3924
3990
  export const agentsCreate = (options) => (options.client ?? client).post({
3925
3991
  security: [{
@@ -4415,7 +4481,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
4415
4481
  /**
4416
4482
  * Create deployment
4417
4483
  *
4418
- * Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
4484
+ * Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
4419
4485
  */
4420
4486
  export const deploymentsCreate = (options) => (options.client ?? client).post({
4421
4487
  security: [{
@@ -4895,7 +4961,7 @@ export const applicationListVersions = (options) => (options.client ?? client).g
4895
4961
  /**
4896
4962
  * Create version
4897
4963
  *
4898
- * Upload code and bindings as a new version; a version serves nothing until deployed. Set deploy true to create the pending deployment in the same call. Rejected binding types return UNSUPPORTED.
4964
+ * Upload code and bindings as a new version; a version serves nothing until deployed. Set deploy true to create the pending deployment in the same call. Rejected binding types return UNSUPPORTED. Send an Idempotency-Key to make a create safe to retry: within 24 hours the same key with the same body answers the first version (and its deployment) again instead of creating a second one, and the same key with a different body is refused.
4899
4965
  */
4900
4966
  export const applicationCreateVersion = (options) => (options.client ?? client).post({
4901
4967
  security: [{
@@ -9963,7 +10029,7 @@ export const devopsChangesGet = (options) => (options.client ?? client).get({
9963
10029
  /**
9964
10030
  * Abandon a change
9965
10031
  *
9966
- * 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). A change that is already abandoned is refused with INVALID_ARGUMENT, which is how a caller tells an earlier abandon apart from a call that had no effect.
10032
+ * 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.
9967
10033
  */
9968
10034
  export const devopsChangesAbandon = (options) => (options.client ?? client).post({
9969
10035
  security: [{
@@ -10106,6 +10172,24 @@ export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? c
10106
10172
  ...options.headers
10107
10173
  }
10108
10174
  });
10175
+ /**
10176
+ * Close a pull request without merging it
10177
+ *
10178
+ * 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.
10179
+ */
10180
+ export const devopsPullRequestsClose = (options) => (options.client ?? client).post({
10181
+ security: [{
10182
+ key: 'devops-bearerAuth',
10183
+ scheme: 'bearer',
10184
+ type: 'http'
10185
+ }],
10186
+ url: '/devops/v1/pull-requests/{id}:close',
10187
+ ...options,
10188
+ headers: {
10189
+ 'Content-Type': 'application/json',
10190
+ ...options.headers
10191
+ }
10192
+ });
10109
10193
  /**
10110
10194
  * List connections
10111
10195
  *
@@ -11325,7 +11409,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
11325
11409
  /**
11326
11410
  * Edit asset
11327
11411
  *
11328
- * 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, 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) 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); 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.
11412
+ * 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.
11329
11413
  */
11330
11414
  export const mediaEditAsset = (options) => (options.client ?? client).post({
11331
11415
  security: [{
@@ -11528,6 +11612,42 @@ export const mediaRequestHlsRenditions = (options) => (options.client ?? client)
11528
11612
  ...options.headers
11529
11613
  }
11530
11614
  });
11615
+ /**
11616
+ * Create voice
11617
+ *
11618
+ * 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.
11619
+ */
11620
+ export const mediaCreateVoice = (options) => (options.client ?? client).post({
11621
+ security: [{
11622
+ key: 'media-BearerAuth',
11623
+ scheme: 'bearer',
11624
+ type: 'http'
11625
+ }],
11626
+ url: '/media/v1/libraries/{library_id}/voices',
11627
+ ...options,
11628
+ headers: {
11629
+ 'Content-Type': 'application/json',
11630
+ ...options.headers
11631
+ }
11632
+ });
11633
+ /**
11634
+ * Design a voice
11635
+ *
11636
+ * 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.
11637
+ */
11638
+ export const mediaDesignVoice = (options) => (options.client ?? client).post({
11639
+ security: [{
11640
+ key: 'media-BearerAuth',
11641
+ scheme: 'bearer',
11642
+ type: 'http'
11643
+ }],
11644
+ url: '/media/v1/libraries/{library_id}/voices/designs',
11645
+ ...options,
11646
+ headers: {
11647
+ 'Content-Type': 'application/json',
11648
+ ...options.headers
11649
+ }
11650
+ });
11531
11651
  /**
11532
11652
  * List types
11533
11653
  *
@@ -11884,7 +12004,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
11884
12004
  /**
11885
12005
  * Retrieve package
11886
12006
  *
11887
- * 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。
12007
+ * 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。软删期间这个包一律 404,恢复后才重新出现。
11888
12008
  */
11889
12009
  export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
11890
12010
  security: [{
@@ -11928,6 +12048,62 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
11928
12048
  ...options.headers
11929
12049
  }
11930
12050
  });
12051
+ /**
12052
+ * List commits
12053
+ *
12054
+ * 列出一个 git 包的提交历史,最新的在前。ref 不给就是包的默认分支;limit 与 offset 分页,has_more 为 true 表示还有下一页。只读:提交只能通过 git 协议推送(clone 地址在包的 clone_url)。OCI 包没有 git 读接口,返回 404。
12055
+ */
12056
+ export const registryGitLog = (options) => (options.client ?? client).get({
12057
+ security: [{
12058
+ key: 'registry-bearerAuth',
12059
+ scheme: 'bearer',
12060
+ type: 'http'
12061
+ }],
12062
+ url: '/registry/v1/packages/{package_id}/git/log',
12063
+ ...options
12064
+ });
12065
+ /**
12066
+ * Read a commit
12067
+ *
12068
+ * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
12069
+ */
12070
+ export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
12071
+ security: [{
12072
+ key: 'registry-bearerAuth',
12073
+ scheme: 'bearer',
12074
+ type: 'http'
12075
+ }],
12076
+ url: '/registry/v1/packages/{package_id}/git/commits/{sha}',
12077
+ ...options
12078
+ });
12079
+ /**
12080
+ * List a tree
12081
+ *
12082
+ * 读一个树对象(或一个提交的根树)的条目:名字、类型(blob / tree / commit)、模式、对象 id,以及已知时的大小。只列这一层,不递归。
12083
+ */
12084
+ export const registryGitTreesRetrieve = (options) => (options.client ?? client).get({
12085
+ security: [{
12086
+ key: 'registry-bearerAuth',
12087
+ scheme: 'bearer',
12088
+ type: 'http'
12089
+ }],
12090
+ url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
12091
+ ...options
12092
+ });
12093
+ /**
12094
+ * Download a file from a ref
12095
+ *
12096
+ * 按引用读一个文件的原始字节,边读边发(流式),没有大小上限。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。路径不是文件或引用不存在返回 404。
12097
+ */
12098
+ export const registryGitFilesRetrieve = (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/files/{path}',
12105
+ ...options
12106
+ });
11931
12107
  /**
11932
12108
  * List version contents
11933
12109
  *
@@ -12089,7 +12265,7 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
12089
12265
  /**
12090
12266
  * Create sandbox (v2)
12091
12267
  *
12092
- * 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.
12268
+ * 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.
12093
12269
  */
12094
12270
  export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
12095
12271
  security: [