@deepraxis/sdk 0.1.1-dev.a936efe → 0.1.1-dev.a9cc67b

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.
@@ -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 phone, or learn that it has none: use it before driving the phone or to show its state in a settings page. configured says whether a phone block is saved at all (false is not an error: the phone is off). A cloud phone's state is one of none, starting, booting, restoring, running, archiving or releasing — none means no instance exists (never built, already released, or gone), archiving means its app state is being packed, and releasing means a release was asked for and the cron has not finished. A BYOD phone (the organization's own device) has two states instead, online and offline, and reports byod_device as its byd_… id, sku null and no lease. sku and name come from the configuration when one exists. When a cloud phone is reachable, sandbox_id is the public sandbox id of its running instance; for a BYOD phone sandbox_id is the byd_… id itself: take either phone over through POST /sandbox/v1/sandboxes/{id}/act, or open the sandbox page's screen tab in the Console; lease_ends_at is when a cloud instance's lease runs out and the sandbox kills it, and is always null for a BYOD phone. archived_at and archive_error describe the last app-state archive, which a fresh instance restores on the next use; both are null for a BYOD phone, which is never archived. Reading never builds a phone. Only a general or assume agent may have one: a service agent, an agent of another organization and a missing agent all answer 404 AGENT_NOT_FOUND. This operation is for people and their tools — the model cannot call it; an agent drives its own phone only through its phone tool, which can act on the device but cannot read this state or release it.
364
+ */
365
+ export const agentsPhoneRetrieve = (options) => (options.client ?? client).get({
366
+ security: [{
367
+ key: 'BearerAuth',
368
+ scheme: 'bearer',
369
+ type: 'http'
370
+ }, {
371
+ key: 'ApiKeyAuth',
372
+ name: 'X-API-Key',
373
+ type: 'apiKey'
374
+ }],
375
+ url: '/agent/v1/agents/{agent_id}/phone',
376
+ ...options
377
+ });
378
+ /**
379
+ * Release agent phone
380
+ *
381
+ * Ask for the agent's cloud phone to go, and answer its state afterwards. The phone is not killed here: its app state is packed first (state archiving), then the instance is killed and the row cleared, so the state answers releasing until that sweep finishes and the next use builds a fresh instance and restores the archive. The configuration is never deleted — the phone block stays and turning the phone off is agents.update with phone null, a different door. With no phone configured, or one that was never built (state none), the call changes nothing and answers none, so it is safe to repeat; repeating it while a release is pending is idempotent. A BYOD phone (the organization's own device) is not the platform's to kill, so the call changes nothing and answers online or offline. Only a general or assume agent may have a phone: a service agent, an agent of another organization and a missing agent all answer 404 AGENT_NOT_FOUND. This operation is for people and their tools — the model cannot call it.
382
+ */
383
+ export const agentsPhoneRelease = (options) => (options.client ?? client).post({
384
+ security: [{
385
+ key: 'BearerAuth',
386
+ scheme: 'bearer',
387
+ type: 'http'
388
+ }, {
389
+ key: 'ApiKeyAuth',
390
+ name: 'X-API-Key',
391
+ type: 'apiKey'
392
+ }],
393
+ url: '/agent/v1/agents/{agent_id}/phone/release',
394
+ ...options
395
+ });
360
396
  /**
361
397
  * Get agent embed policy
362
398
  *
@@ -590,6 +626,24 @@ export const computersFilesContent = (options) => (options.client ?? client).get
590
626
  url: '/agent/v1/computers/{computer_id}/files/content',
591
627
  ...options
592
628
  });
629
+ /**
630
+ * Preview a computer file
631
+ *
632
+ * The preview product of one version of one computer file: an image becomes a 1600 px WebP, an Office document a linearized PDF, text and source the first 64 KiB, and PDF, xlsx, epub, GIF, SVG and unknown types their original bytes. Products live in the File service and are keyed by computer, path, size, mtime, variant and format version. A request that pins `v` answers from that registry without stat'ing or waking the computer; without `v` the file is read and the product generated once. A file over the size threshold, or a deployment without the File service, answers `fallback: "content"` so the caller keeps the ordinary content door.
633
+ */
634
+ export const previewComputerFile = (options) => (options.client ?? client).get({
635
+ security: [{
636
+ key: 'BearerAuth',
637
+ scheme: 'bearer',
638
+ type: 'http'
639
+ }, {
640
+ key: 'ApiKeyAuth',
641
+ name: 'X-API-Key',
642
+ type: 'apiKey'
643
+ }],
644
+ url: '/agent/v1/computers/{computer_id}/files/preview',
645
+ ...options
646
+ });
593
647
  /**
594
648
  * Convert a Computer Document to PDF
595
649
  *
@@ -679,7 +733,7 @@ export const releaseComputerLease = (options) => (options.client ?? client).dele
679
733
  /**
680
734
  * List Toolsets
681
735
  *
682
- * Discover tool names, input schemas, read-only status and default permission policies before configuring an agent. The catalog is read-only: enable tools through agents.create or agents.update. agent_toolset_20260401 includes bash, edit, glob, grep, read, write, web_search, web_fetch, task_output, task_stop, monitor, agent, send_message, codemode and skill, plus todo_write, ask_user_question and goal_read, which are listed so they can be switched off. Native additions require bash enabled; codemode requires bash (enabling it with bash disabled returns 400; keep bash enabled with permission_policy always_ask to restrict it); send_message also requires agent. To keep only some tools, set default_config.enabled to false and enable the wanted tools in configs; unlisted tools follow default_config. The catalog includes plugin names and versions. Sessions created through /anthropic/v1 expose only the eight official tools.
736
+ * Discover tool names, input schemas, read-only status and default permission policies before configuring an agent. The catalog is read-only: enable tools through agents.create or agents.update. agent_toolset_20260401 includes bash, edit, glob, grep, read, write, web_search, web_fetch, task_output, task_stop, monitor, agent, send_message, codemode and skill, plus todo_write and goal_read, which are listed so they can be switched off. Native additions require bash enabled; codemode requires bash (enabling it with bash disabled returns 400; keep bash enabled with permission_policy always_ask to restrict it); send_message also requires agent. To keep only some tools, set default_config.enabled to false and enable the wanted tools in configs; unlisted tools follow default_config. The catalog includes plugin names and versions. Sessions created through /anthropic/v1 expose only the eight official tools.
683
737
  */
684
738
  export const listToolsets = (options) => (options?.client ?? client).get({
685
739
  security: [{
@@ -835,7 +889,7 @@ export const createSessionArtifactContentUrl = (options) => (options.client ?? c
835
889
  *
836
890
  * List the requests a session is waiting on; an end-customer token reads its own session.
837
891
  *
838
- * Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (question for the ask_user_question tool, approval for any other tool that waits for permission), status (pending), tool_name, input (the same input the agent.tool_use event shows), create_time and expire_time. Answer a request as before: send a user.tool_confirmation event for its id. expire_time is set only for a session with no collaboration mode while the requests-v1 release is on (create_time plus 24 hours; an expired request counts as declined), otherwise null. Answered, expired and superseded requests are not listed, and neither are pending custom tool results (user.custom_tool_result). Whoever may read the session may read its requests; a session that is missing or not yours returns 404.
892
+ * Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (always approval, a tool waiting for permission; question is kept for compatibility and is never returned), status (pending), tool_name, input (the same input the agent.tool_use event shows), create_time and expire_time. Answer a request as before: send a user.tool_confirmation event for its id. expire_time is set only for a session with no collaboration mode while the requests-v1 release is on (create_time plus 24 hours; an expired request counts as declined), otherwise null. Answered, expired and superseded requests are not listed, and neither are pending custom tool results (user.custom_tool_result). Whoever may read the session may read its requests; a session that is missing or not yours returns 404.
839
893
  */
840
894
  export const listSessionRequests = (options) => (options.client ?? client).get({
841
895
  security: [{
@@ -1036,6 +1090,12 @@ export const createAudioSpeech = (options) => (options.client ?? client).post({
1036
1090
  ...options.headers
1037
1091
  }
1038
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 });
1039
1099
  /**
1040
1100
  * 列出浏览器会话
1041
1101
  *
@@ -1369,9 +1429,10 @@ export const browserSeleniumUnsupported = (options) => (options?.client ?? clien
1369
1429
  /**
1370
1430
  * List files
1371
1431
  *
1372
- * List live files owned by your tenant, optionally filtered by purpose or session scope_id. Results default to descending creation order with a limit of 10000. Page using after or before with a file ID from the list; these cursors are mutually exclusive. Deleted and expired files are excluded.
1432
+ * List live files owned by your tenant, optionally filtered by purpose, session scope_id or up to 100 file ids. Results default to descending creation order with a limit of 10000. Page using after or before with a file ID from the list; these cursors are mutually exclusive. Deleted and expired files are excluded.
1373
1433
  */
1374
1434
  export const fileListFiles = (options) => (options?.client ?? client).get({
1435
+ querySerializer: { parameters: { ids: { array: { explode: false } } } },
1375
1436
  security: [{
1376
1437
  key: 'BearerAuth',
1377
1438
  scheme: 'bearer',
@@ -2526,7 +2587,7 @@ export const listOrganizationUsage = (options) => (options.client ?? client).get
2526
2587
  /**
2527
2588
  * List Organization Usage Events
2528
2589
  *
2529
- * 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.
2590
+ * 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.
2530
2591
  *
2531
2592
  */
2532
2593
  export const listOrganizationEvents = (options) => (options.client ?? client).get({
@@ -3532,6 +3593,220 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
3532
3593
  ...options.headers
3533
3594
  }
3534
3595
  });
3596
+ /**
3597
+ * List specs
3598
+ *
3599
+ * Lists the specs (规定) of the organization, most recently updated first; use it to find which subject already has a spec before reading or revising one. Narrow it with kind. Filters combine with AND. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, an unknown kind, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /organization/v1/specs?kind=job.
3600
+ */
3601
+ export const listOrganizationSpecs = (options) => (options?.client ?? client).get({
3602
+ security: [{
3603
+ key: 'BearerAuth',
3604
+ scheme: 'bearer',
3605
+ type: 'http'
3606
+ }, {
3607
+ key: 'ApiKeyAuth',
3608
+ name: 'X-API-Key',
3609
+ type: 'apiKey'
3610
+ }],
3611
+ url: '/organization/v1/specs',
3612
+ ...options
3613
+ });
3614
+ /**
3615
+ * Get a spec
3616
+ *
3617
+ * Reads one subject's live spec, or one historical revision with revision; a subject never written answers revision 0 with an empty spec, so a first revise sends expected_revision 0. Read-only. Errors: 400 INVALID_PARAMS for a non-integer revision; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 when the subject, or the named SPEC_REVISION_NOT_FOUND, does not exist. Example: GET /organization/v1/specs/job/jpr_123?revision=2.
3618
+ */
3619
+ export const getOrganizationSpec = (options) => (options.client ?? client).get({
3620
+ security: [{
3621
+ key: 'BearerAuth',
3622
+ scheme: 'bearer',
3623
+ type: 'http'
3624
+ }, {
3625
+ key: 'ApiKeyAuth',
3626
+ name: 'X-API-Key',
3627
+ type: 'apiKey'
3628
+ }],
3629
+ url: '/organization/v1/specs/{kind}/{id}',
3630
+ ...options
3631
+ });
3632
+ /**
3633
+ * Revise a spec
3634
+ *
3635
+ * Replaces the whole spec of a subject: expected_revision is the revision you last read (0 when none was written) and each success raises it by one, so a mismatch returns REVISION_CONFLICT and you must read again, merge and retry. The spec body is stored and returned verbatim; its blocks are document, agent, computer, phone, roles, grants, repositories, schedules, browser and remove, and it is validated against the block registry. Requires an organization owner or admin, or the head of the subject's department. Errors: 400 INVALID_PARAMS for a missing spec or expected_revision, a block outside the registry or an unknown body field; 403 PERMISSION_DENIED; 404 when the subject does not exist; 409 REVISION_CONFLICT. Example body: {"expected_revision":0,"spec":{"document":"Deliver reliably."}}.
3636
+ */
3637
+ export const reviseOrganizationSpec = (options) => (options.client ?? client).put({
3638
+ security: [{
3639
+ key: 'BearerAuth',
3640
+ scheme: 'bearer',
3641
+ type: 'http'
3642
+ }, {
3643
+ key: 'ApiKeyAuth',
3644
+ name: 'X-API-Key',
3645
+ type: 'apiKey'
3646
+ }],
3647
+ url: '/organization/v1/specs/{kind}/{id}',
3648
+ ...options,
3649
+ headers: {
3650
+ 'Content-Type': 'application/json',
3651
+ ...options.headers
3652
+ }
3653
+ });
3654
+ /**
3655
+ * List spec revisions
3656
+ *
3657
+ * Lists every stored revision of one subject's spec, newest first, each with its body, author and creation instant; use it to see what changed over time or to pick a revision to read or diff. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 when the subject does not exist.
3658
+ */
3659
+ export const listOrganizationSpecRevisions = (options) => (options.client ?? client).get({
3660
+ security: [{
3661
+ key: 'BearerAuth',
3662
+ scheme: 'bearer',
3663
+ type: 'http'
3664
+ }, {
3665
+ key: 'ApiKeyAuth',
3666
+ name: 'X-API-Key',
3667
+ type: 'apiKey'
3668
+ }],
3669
+ url: '/organization/v1/specs/{kind}/{id}/revisions',
3670
+ ...options
3671
+ });
3672
+ /**
3673
+ * Diff two spec revisions
3674
+ *
3675
+ * Compares two revisions of one subject's spec and lists the changes between them, each with its path and, for a change, the value before and after; revision 0 is the empty spec, so diffing 0 against 1 shows the first write. Read-only. Errors: 400 INVALID_PARAMS when from or to is missing or not an integer; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 when the subject does not exist, or SPEC_REVISION_NOT_FOUND when from or to was never written. Example: GET /organization/v1/specs/job/jpr_123/diff?from=1&to=2.
3676
+ */
3677
+ export const diffOrganizationSpec = (options) => (options.client ?? client).get({
3678
+ security: [{
3679
+ key: 'BearerAuth',
3680
+ scheme: 'bearer',
3681
+ type: 'http'
3682
+ }, {
3683
+ key: 'ApiKeyAuth',
3684
+ name: 'X-API-Key',
3685
+ type: 'apiKey'
3686
+ }],
3687
+ url: '/organization/v1/specs/{kind}/{id}/diff',
3688
+ ...options
3689
+ });
3690
+ /**
3691
+ * Read the effective spec
3692
+ *
3693
+ * Merges the spec chain of a seat or an actor and returns the one effective configuration: the merged capability blocks, the document of every layer, where each merged value came from, and anything only the merged result shows to be wrong. Give exactly one of actor (every seat the actor holds) or position_id (one seat, held or vacant, a preview before hiring); holder_kind defaults from the seat's holder. Read-only; nothing is changed. Errors: 400 INVALID_PARAMS when neither or both of actor and position_id are given, the actor address is malformed, holder_kind is neither agent nor human, or a query parameter is unknown; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 POSITION_NOT_FOUND. Example: GET /organization/v1/effective_spec?actor=agent:agent_123.
3694
+ */
3695
+ export const getOrganizationEffectiveSpec = (options) => (options?.client ?? client).get({
3696
+ security: [{
3697
+ key: 'BearerAuth',
3698
+ scheme: 'bearer',
3699
+ type: 'http'
3700
+ }, {
3701
+ key: 'ApiKeyAuth',
3702
+ name: 'X-API-Key',
3703
+ type: 'apiKey'
3704
+ }],
3705
+ url: '/organization/v1/effective_spec',
3706
+ ...options
3707
+ });
3708
+ /**
3709
+ * Plan reconciliation
3710
+ *
3711
+ * Dry-runs the reconciler for one holder and returns what it would change: an action per block (hold, update, none, pending, blocked) with the value it would write, and the violations only the merged result shows. It changes nothing - no state, no agent and no memory. Give the holder as actor. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a query parameter is unknown; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /organization/v1/reconcile/plan?actor=agent:agent_123.
3712
+ */
3713
+ export const planOrganizationReconcile = (options) => (options.client ?? client).get({
3714
+ security: [{
3715
+ key: 'BearerAuth',
3716
+ scheme: 'bearer',
3717
+ type: 'http'
3718
+ }, {
3719
+ key: 'ApiKeyAuth',
3720
+ name: 'X-API-Key',
3721
+ type: 'apiKey'
3722
+ }],
3723
+ url: '/organization/v1/reconcile/plan',
3724
+ ...options
3725
+ });
3726
+ /**
3727
+ * Read reconcile status
3728
+ *
3729
+ * Reads the reconciler's last result for one holder: whether the sweep is paused, the seats and layer revisions of the last applied run, each block's state (ready, pending, failed, waiting_human or paused), the drift between what is applied and what the specs want, and when it last applied. Read-only; it changes nothing. Give the holder as actor. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a query parameter is unknown; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /organization/v1/reconcile/status?actor=agent:agent_123.
3730
+ */
3731
+ export const getOrganizationReconcileStatus = (options) => (options.client ?? client).get({
3732
+ security: [{
3733
+ key: 'BearerAuth',
3734
+ scheme: 'bearer',
3735
+ type: 'http'
3736
+ }, {
3737
+ key: 'ApiKeyAuth',
3738
+ name: 'X-API-Key',
3739
+ type: 'apiKey'
3740
+ }],
3741
+ url: '/organization/v1/reconcile/status',
3742
+ ...options
3743
+ });
3744
+ /**
3745
+ * Run reconciliation now
3746
+ *
3747
+ * Reconciles one holder now instead of waiting for the sweep: it plans, applies every update and returns the new status. Run plan first to see the changes without applying them. Requires an organization owner or admin. A block that cannot be applied now stays pending, waiting_human or failed, and the returned status says so. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a body field is unknown; 403 PERMISSION_DENIED. Example body: {"actor":"agent:agent_123"}.
3748
+ */
3749
+ export const runOrganizationReconcile = (options) => (options.client ?? client).post({
3750
+ security: [{
3751
+ key: 'BearerAuth',
3752
+ scheme: 'bearer',
3753
+ type: 'http'
3754
+ }, {
3755
+ key: 'ApiKeyAuth',
3756
+ name: 'X-API-Key',
3757
+ type: 'apiKey'
3758
+ }],
3759
+ url: '/organization/v1/reconcile/run',
3760
+ ...options,
3761
+ headers: {
3762
+ 'Content-Type': 'application/json',
3763
+ ...options.headers
3764
+ }
3765
+ });
3766
+ /**
3767
+ * Pause reconciliation
3768
+ *
3769
+ * Stops the sweep from reconciling one holder until it is resumed: the holder's blocks keep their state and no further update is applied. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a body field is unknown; 403 PERMISSION_DENIED. Example body: {"actor":"agent:agent_123"}.
3770
+ */
3771
+ export const pauseOrganizationReconcile = (options) => (options.client ?? client).post({
3772
+ security: [{
3773
+ key: 'BearerAuth',
3774
+ scheme: 'bearer',
3775
+ type: 'http'
3776
+ }, {
3777
+ key: 'ApiKeyAuth',
3778
+ name: 'X-API-Key',
3779
+ type: 'apiKey'
3780
+ }],
3781
+ url: '/organization/v1/reconcile/pause',
3782
+ ...options,
3783
+ headers: {
3784
+ 'Content-Type': 'application/json',
3785
+ ...options.headers
3786
+ }
3787
+ });
3788
+ /**
3789
+ * Resume reconciliation
3790
+ *
3791
+ * Restarts the sweep for a paused holder and reconciles it now, returning the new status. Requires an organization owner or admin. Errors: 400 INVALID_PARAMS when actor is missing or is not an actor address, or a body field is unknown; 403 PERMISSION_DENIED. Example body: {"actor":"agent:agent_123"}.
3792
+ */
3793
+ export const resumeOrganizationReconcile = (options) => (options.client ?? client).post({
3794
+ security: [{
3795
+ key: 'BearerAuth',
3796
+ scheme: 'bearer',
3797
+ type: 'http'
3798
+ }, {
3799
+ key: 'ApiKeyAuth',
3800
+ name: 'X-API-Key',
3801
+ type: 'apiKey'
3802
+ }],
3803
+ url: '/organization/v1/reconcile/resume',
3804
+ ...options,
3805
+ headers: {
3806
+ 'Content-Type': 'application/json',
3807
+ ...options.headers
3808
+ }
3809
+ });
3535
3810
  /**
3536
3811
  * Upgrade to a full sandbox
3537
3812
  *
@@ -3748,6 +4023,30 @@ export const renameSandbox = (options) => (options.client ?? client).patch({
3748
4023
  ...options.headers
3749
4024
  }
3750
4025
  });
4026
+ /**
4027
+ * Act on a phone sandbox's screen
4028
+ *
4029
+ * 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.
4030
+ *
4031
+ * 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.
4032
+ */
4033
+ export const actOnSandboxDisplay = (options) => (options.client ?? client).post({
4034
+ security: [{
4035
+ key: 'BearerAuth',
4036
+ scheme: 'bearer',
4037
+ type: 'http'
4038
+ }, {
4039
+ key: 'ApiKeyAuth',
4040
+ name: 'X-API-Key',
4041
+ type: 'apiKey'
4042
+ }],
4043
+ url: '/sandbox/v1/sandboxes/{sandboxID}/act',
4044
+ ...options,
4045
+ headers: {
4046
+ 'Content-Type': 'application/json',
4047
+ ...options.headers
4048
+ }
4049
+ });
3751
4050
  /**
3752
4051
  * Remove a file or directory in the sandbox
3753
4052
  *
@@ -3845,7 +4144,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
3845
4144
  /**
3846
4145
  * Run a command in the sandbox
3847
4146
  *
3848
- * 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"}.
4147
+ * 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"}.
3849
4148
  */
3850
4149
  export const runSandboxCommand = (options) => (options.client ?? client).post({
3851
4150
  security: [{
@@ -3864,6 +4163,140 @@ export const runSandboxCommand = (options) => (options.client ?? client).post({
3864
4163
  ...options.headers
3865
4164
  }
3866
4165
  });
4166
+ /**
4167
+ * Start adding a phone of your own
4168
+ *
4169
+ * Begin bringing your own device (BYOD): the platform answers an 8-character code, its ten-minute deadline and the QR payload your phone's app scans, and nothing is registered until the owner taps Allow on the phone. Show the QR payload (or the code) in your app; the phone opens GET /sandbox/v1/byod/pairings/{code} — with no credential — to show the organization and the deadline, then posts the claim once. The pairing stores the organization's display name, which the phone shows on its Allow screen, so create the pairing from a session or key that carries one. A code is spent by the first successful claim and cannot be reused; create a new pairing for another device. BYOD devices are separate from sandboxes: they never appear in listSandboxes and have no template, size or expiry. Example: POST /sandbox/v1/byod/pairings with no body returns {code:'K7M4PQRS',expires_at:'2026-11-22T13:10:00.000Z',qr:'praxis://byod/pair?code=K7M4PQRS&api=https%3A%2F%2Fapi.deepraxis.com'}.
4170
+ */
4171
+ export const createByodPairing = (options) => (options?.client ?? client).post({
4172
+ security: [{
4173
+ key: 'BearerAuth',
4174
+ scheme: 'bearer',
4175
+ type: 'http'
4176
+ }, {
4177
+ key: 'ApiKeyAuth',
4178
+ name: 'X-API-Key',
4179
+ type: 'apiKey'
4180
+ }],
4181
+ url: '/sandbox/v1/byod/pairings',
4182
+ ...options
4183
+ });
4184
+ /**
4185
+ * List your organization's own devices
4186
+ *
4187
+ * List the devices your organization has paired, oldest first, with each one's platform, name, model, OS version, live online fact and when it was last seen. Use it to find a device id before you act on it, rename it or disconnect it, or to show the BYOD page. A revoked device is not listed, so a device that disappears from this answer was disconnected; there is no paging because an organization's own devices are few. Each row carries capabilities and, for a desktop, the agent_dirs it registered. Example: GET /sandbox/v1/byod/devices returns {data:[{object:'byod_device',id:'byd_0123456789abcdefghijklmno',platform:'android',name:'Shelf phone',model:'23127PN0CC',os_version:'16',online:true,last_seen_at:'2026-11-22T12:58:00.000Z',created_at:'2026-11-22T12:40:00.000Z',capabilities:['display'],agent_dirs:[]}]}.
4188
+ */
4189
+ export const listByodDevices = (options) => (options?.client ?? client).get({
4190
+ security: [{
4191
+ key: 'BearerAuth',
4192
+ scheme: 'bearer',
4193
+ type: 'http'
4194
+ }, {
4195
+ key: 'ApiKeyAuth',
4196
+ name: 'X-API-Key',
4197
+ type: 'apiKey'
4198
+ }],
4199
+ url: '/sandbox/v1/byod/devices',
4200
+ ...options
4201
+ });
4202
+ /**
4203
+ * Read one of your organization's devices
4204
+ *
4205
+ * Read one BYOD device: the same fields listByodDevices returns, for a single device. Use it to poll whether a device is online before acting on it, or to refresh one row of the BYOD page after a rename. An unknown id and another organization's device both answer 404, so the answer never reveals that a foreign device exists. Example: GET /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno.
4206
+ */
4207
+ export const getByodDevice = (options) => (options.client ?? client).get({
4208
+ security: [{
4209
+ key: 'BearerAuth',
4210
+ scheme: 'bearer',
4211
+ type: 'http'
4212
+ }, {
4213
+ key: 'ApiKeyAuth',
4214
+ name: 'X-API-Key',
4215
+ type: 'apiKey'
4216
+ }],
4217
+ url: '/sandbox/v1/byod/devices/{deviceID}',
4218
+ ...options
4219
+ });
4220
+ /**
4221
+ * Rename one of your organization's devices
4222
+ *
4223
+ * Change a device's display name, and nothing else: pairing, credential, platform and connection are untouched. Use it to give a shared phone a name your team recognises. The body takes exactly one field, name, 1 to 64 characters after trimming; a missing, extra or wrongly typed field answers INVALID_PARAMS. An unknown id and another organization's device both answer 404. Example: PATCH /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno with {name:'Shelf phone'} returns the updated device.
4224
+ */
4225
+ export const updateByodDevice = (options) => (options.client ?? client).patch({
4226
+ security: [{
4227
+ key: 'BearerAuth',
4228
+ scheme: 'bearer',
4229
+ type: 'http'
4230
+ }, {
4231
+ key: 'ApiKeyAuth',
4232
+ name: 'X-API-Key',
4233
+ type: 'apiKey'
4234
+ }],
4235
+ url: '/sandbox/v1/byod/devices/{deviceID}',
4236
+ ...options,
4237
+ headers: {
4238
+ 'Content-Type': 'application/json',
4239
+ ...options.headers
4240
+ }
4241
+ });
4242
+ /**
4243
+ * Disconnect a device and revoke its credential
4244
+ *
4245
+ * Disconnect a paired device: the device's credential is revoked, its control connection is closed, and it stops appearing in listByodDevices. Use it when the phone is lost, lent or no longer wanted; the same disconnect is offered as one tap on the device itself. The operation is idempotent — disconnecting an already-disconnected device answers the same 200 — so a retry after a lost response is safe. The device is untouched: nothing is erased on the phone, and it can be paired again with a new pairing. Because a revoked device is not listed, a later listByodDevices no longer shows it. An unknown id and another organization's device both answer 404. Example: POST /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno/disconnect returns {id:'byd_0123456789abcdefghijklmno',object:'byod_device',disconnected:true}.
4246
+ */
4247
+ export const disconnectByodDevice = (options) => (options.client ?? client).post({
4248
+ security: [{
4249
+ key: 'BearerAuth',
4250
+ scheme: 'bearer',
4251
+ type: 'http'
4252
+ }, {
4253
+ key: 'ApiKeyAuth',
4254
+ name: 'X-API-Key',
4255
+ type: 'apiKey'
4256
+ }],
4257
+ url: '/sandbox/v1/byod/devices/{deviceID}/disconnect',
4258
+ ...options
4259
+ });
4260
+ /**
4261
+ * Read a pairing for the phone's Allow screen
4262
+ *
4263
+ * The phone's own read, called by the app that scanned the QR code or the code was typed into: it answers the organization's display name and the code's deadline, which the owner sees before tapping Allow. This path carries no Praxis credential — the one-time code is what it is addressed by — so do not send an API key and do not call it from server code. An unknown, spent or expired code answers 404, with nothing said about which of the three it is; that also covers a code another organization created. The read is a preview only: it registers nothing, and the claim is what spends the code. Example: GET /sandbox/v1/byod/pairings/K7M4PQRS returns {organization_name:'烟火测试团队',expires_at:'2026-11-22T13:10:00.000Z'}.
4264
+ */
4265
+ export const getByodPairing = (options) => (options.client ?? client).get({
4266
+ security: [{
4267
+ key: 'BearerAuth',
4268
+ scheme: 'bearer',
4269
+ type: 'http'
4270
+ }, {
4271
+ key: 'ApiKeyAuth',
4272
+ name: 'X-API-Key',
4273
+ type: 'apiKey'
4274
+ }],
4275
+ url: '/sandbox/v1/byod/pairings/{code}',
4276
+ ...options
4277
+ });
4278
+ /**
4279
+ * Claim a pairing and register the phone
4280
+ *
4281
+ * The phone's own final step after the owner taps Allow: it registers the device and answers the device id, a one-time credential and the control socket url the app dials. This path carries no Praxis credential — the one-time code is what it is addressed by — so do not send an API key and never call it from server code. The claim is single use: the first successful call spends the code and a second call answers 404, as does an unknown or expired code, so the app must store the credential the moment it arrives because it is never shown again. Connect to socket_url with Authorization: Bearer <credential>; the socket speaks the phone channel (hello, ping/pong, act, result/error) and the device's one connection is replaced if the app reconnects. Example: POST /sandbox/v1/byod/pairings/K7M4PQRS/claim with {platform:'android',name:'Shelf phone',model:'23127PN0CC',os_version:'16'} returns {device_id:'byd_0123456789abcdefghijklmno',credential:'…',socket_url:'wss://49982-byd0123456789abcdefghijklmno.sandbox-develop.praxisusercontent.com/'}.
4282
+ */
4283
+ export const claimByodPairing = (options) => (options.client ?? client).post({
4284
+ security: [{
4285
+ key: 'BearerAuth',
4286
+ scheme: 'bearer',
4287
+ type: 'http'
4288
+ }, {
4289
+ key: 'ApiKeyAuth',
4290
+ name: 'X-API-Key',
4291
+ type: 'apiKey'
4292
+ }],
4293
+ url: '/sandbox/v1/byod/pairings/{code}/claim',
4294
+ ...options,
4295
+ headers: {
4296
+ 'Content-Type': 'application/json',
4297
+ ...options.headers
4298
+ }
4299
+ });
3867
4300
  /**
3868
4301
  * Delete session
3869
4302
  *
@@ -3943,7 +4376,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
3943
4376
  /**
3944
4377
  * Create agent
3945
4378
  *
3946
- * 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.
4379
+ * 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 and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. A general or assume agent created without computer_id gets a new computer registered in the same request, named after the agent; a service agent with computer_id returns 400. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; vault_ids are accepted, bindings and environment_id are refused. phone gives the agent one phone, in one of two mutually exclusive forms: {sku, name?, archive: {exclude}} is a cloud Android device the platform builds on demand from that Sandbox SKU, and {byod, name?} is your organization's own device, named by a byd_… id it already owns (Brought Your Own Device), which the platform drives but never builds. A body naming both sku and byod returns 400, and a byd_… id this organization does not own returns 400 INVALID_PARAMS. Only a general or assume agent may have a phone: a service agent with phone returns 400. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
3947
4380
  */
3948
4381
  export const agentsCreate = (options) => (options.client ?? client).post({
3949
4382
  security: [{
@@ -3983,7 +4416,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
3983
4416
  /**
3984
4417
  * Update agent
3985
4418
  *
3986
- * Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Assume agents reject model, models, subagent_model, subagents and multiagent on every update; other fields follow the general agent rules, with vault_ids also accepted.
4419
+ * Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. phone takes the same two mutually exclusive forms as agents.create: {sku, name?, archive} for a cloud device, or {byod, name?} for your organization's own device (a byd_… id); naming both returns 400, and a byd_… id this organization does not own returns 400 INVALID_PARAMS. phone: null turns the phone off and releases a cloud device; a BYOD phone is the organization's and is never killed. Assume agents reject model, models, subagent_model, subagents and multiagent on every update; other fields follow the general agent rules, with vault_ids also accepted.
3987
4420
  */
3988
4421
  export const agentsUpdate = (options) => (options.client ?? client).post({
3989
4422
  security: [{
@@ -4439,7 +4872,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
4439
4872
  /**
4440
4873
  * Create deployment
4441
4874
  *
4442
- * 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.
4875
+ * 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"}}.
4443
4876
  */
4444
4877
  export const deploymentsCreate = (options) => (options.client ?? client).post({
4445
4878
  security: [{
@@ -4919,7 +5352,7 @@ export const applicationListVersions = (options) => (options.client ?? client).g
4919
5352
  /**
4920
5353
  * Create version
4921
5354
  *
4922
- * 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.
5355
+ * 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.
4923
5356
  */
4924
5357
  export const applicationCreateVersion = (options) => (options.client ?? client).post({
4925
5358
  security: [{
@@ -9265,7 +9698,7 @@ export const devopsTestExecutionsGet = (options) => (options.client ?? client).g
9265
9698
  /**
9266
9699
  * Upload an external test report
9267
9700
  *
9268
- * Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable. Send purpose feedback instead when the report is your own local run rather than evidence: the document is stored as an organization-private file and nothing else happens — no run is created or joined, no case state changes and the merge gate never reads it — so a developer's machine can publish what it ran without any commit being credited as tested.
9701
+ * Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable. Send purpose feedback instead when the report is your own local run rather than evidence: the document is stored as an organization-private file and nothing else happens — no run is created or joined, no case state changes and the merge gate never reads it — so a developer's machine can publish what it ran without any commit being credited as tested. With purpose evidence the report is also filed as test evidence, package by package: DevOps recomputes each package's input hash from ref.commit (so the commit must already be pushed; an unreadable commit records the run but no evidence), and writes passed or failed only for a package whose every case at the gate's sizes the report carries — a report of a few files leaves that package without evidence. Pass ref.branch and ref.pullRequest so the run says where it came from; devops.projects.retrieveTestPlan at the commit then shows what the gate will read.
9269
9702
  */
9270
9703
  export const devopsTestReportsUpload = (options) => (options.client ?? client).post({
9271
9704
  security: [{
@@ -9283,7 +9716,7 @@ export const devopsTestReportsUpload = (options) => (options.client ?? client).p
9283
9716
  /**
9284
9717
  * Retrieve the merge gate's test plan at a commit
9285
9718
  *
9286
- * Ask what the merge gate would require at one commit before running anything: the packages the base...commit diff affects, each package's input hash at that commit's own tree, and whether evidence already answers it. Read a package as passed when a recorded run covered every case the package has at the gate's sizes and they passed, failed when the newest evidence at its input hash failed, and missing when no run has a row for that (package, input hash). Use it before running tests — `praxis devops test --gate` asks this and runs exactly the missing and failed packages — or to explain a gate verdict, because it is the same required set and the same (package, input hash) lookup the gate itself decides on. The call is read-only: it starts no run, runs no case and writes nothing. The commit must already be pushed, since the hashes are recomputed from the tree GitHub holds; a commit whose tree cannot be read answers COMMIT_NOT_FOUND instead of an empty plan. A selection of nothing means every changed path belongs to no test package, which is a pass and not a failure.
9719
+ * Ask what the merge gate would require at one commit before running anything: the packages the base...commit diff affects, each package's input hash at that commit's own tree, and whether evidence already answers it. The answer also carries cases: every feature scenario of the affected packages at the gate's sizes, each with required (whether this diff can affect it, chosen by the files the scenario was recorded running), the reason, the deps hash it is judged at and its own evidence. A merge needs evidence only for the required cases; run `praxis devops test <package> --record-impact` to record coverage and results. Read a package as passed when a recorded run covered every case the package has at the gate's sizes and they passed, failed when the newest evidence at its input hash failed, and missing when no run has a row for that (package, input hash). Use it before running tests — run `praxis devops test <package>` for each missing or failed package on a clean, pushed commit and the run files the evidence itself — or to explain a gate verdict, because it is the same required set and the same (package, input hash) lookup the gate itself decides on. The call is read-only: it starts no run, runs no case and writes nothing. The commit must already be pushed, since the hashes are recomputed from the tree GitHub holds; a commit whose tree cannot be read answers COMMIT_NOT_FOUND instead of an empty plan. A selection of nothing means every changed path belongs to no test package, which is a pass and not a failure.
9287
9720
  */
9288
9721
  export const devopsTestPlanGet = (options) => (options.client ?? client).get({
9289
9722
  security: [{
@@ -9297,7 +9730,7 @@ export const devopsTestPlanGet = (options) => (options.client ?? client).get({
9297
9730
  /**
9298
9731
  * List projects
9299
9732
  *
9300
- * List the delivery projects this organization has, newest first, with each project's repository binding and settings. Call this first when you do not already hold a project id: every other operation in this domain is addressed by one. A project from another organization is never listed, so an empty page means this organization has none rather than that they are hidden. The order is by creation time descending; follow nextPageToken until it is empty to see them all.
9733
+ * List the delivery projects this organization has, newest first, with each project's repository binding and settings. Call this first when you do not already hold a project id: every other operation in this domain is addressed by one. A project from another organization is never listed, so an empty page means this organization has none rather than that they are hidden. The order is by creation time descending; follow nextPageToken until it is empty to see them all. The page always carries visibleProjects: how many projects the caller's own organization has in total, deleted ones excluded. Those are the projects visible to the credential's organization — the count filters by organization_id and is not a permission check — so an empty items array reads as "this organization has none yet" instead of leaving you to guess whether the read was lost or the credential points at another organization. It is the organization's total across all pages, not this page's length.
9301
9734
  */
9302
9735
  export const devopsProjectsList = (options) => (options?.client ?? client).get({
9303
9736
  security: [{
@@ -9308,6 +9741,42 @@ export const devopsProjectsList = (options) => (options?.client ?? client).get({
9308
9741
  url: '/devops/v1/projects',
9309
9742
  ...options
9310
9743
  });
9744
+ /**
9745
+ * Create a project
9746
+ *
9747
+ * Create a delivery project and its two default environments (develop, production). The code lives in one of two places. Our own Git: pass provider platform and package, the id (pkg_...) of a git package in your organization's registry (the registry domain lists packages and creates git libraries); there is no install flow and no connection, the project records the provider, the package and the package's default branch, and from then on pull requests, the merge gate, changes and cloud workspaces use that package and DevOps merges a pull request itself. A package backs at most one project (REPOSITORY_ALREADY_BOUND) and a package that is not a git package of your organization is INVALID_ARGUMENT. If the package has no default branch yet, which is usual for a library imported from elsewhere, pass initialRef, an existing branch such as import: the default branch is created at its head while the project is created, and no change can be opened before it exists. If the default branch already exists the call is refused with DEFAULT_BRANCH_EXISTS, and a missing initialRef branch with REF_NOT_FOUND; neither leaves a project behind. For a package whose project already exists, use devops.projects.initializeDefaultBranch instead. GitHub (the default): pass the connection of a completed GitHub App install and the repository (owner/name) it can see; leave both out to create a project with no repository yet. A name must be kebab-case and unused in the organization (PROJECT_NAME_TAKEN).
9748
+ */
9749
+ export const devopsProjectsCreate = (options) => (options.client ?? client).post({
9750
+ security: [{
9751
+ key: 'devops-bearerAuth',
9752
+ scheme: 'bearer',
9753
+ type: 'http'
9754
+ }],
9755
+ url: '/devops/v1/projects',
9756
+ ...options,
9757
+ headers: {
9758
+ 'Content-Type': 'application/json',
9759
+ ...options.headers
9760
+ }
9761
+ });
9762
+ /**
9763
+ * Create a project's default branch
9764
+ *
9765
+ * Create the default branch of a project on our own Git, once. A git package imported from elsewhere can hold branches and no default branch, and every change is cut from the default branch, so until it exists no change can be opened. The default branch is protected and only DevOps holds the credential that may write it, so this call is the one way to create it: it points the default branch at the head of the existing branch named in from (for example import). It only creates: a default branch that already exists is refused with DEFAULT_BRANCH_EXISTS and is never moved, a from that is not a branch of the repository is REF_NOT_FOUND, and a GitHub project is INVALID_ARGUMENT because GitHub's branches are GitHub's. The push reaches the project like any other push to its default branch. Read the project first (devops.projects.retrieve) for the package's default branch name.
9766
+ */
9767
+ export const devopsProjectsInitializeDefaultBranch = (options) => (options.client ?? client).post({
9768
+ security: [{
9769
+ key: 'devops-bearerAuth',
9770
+ scheme: 'bearer',
9771
+ type: 'http'
9772
+ }],
9773
+ url: '/devops/v1/projects/{id}/default-branch:initialize',
9774
+ ...options,
9775
+ headers: {
9776
+ 'Content-Type': 'application/json',
9777
+ ...options.headers
9778
+ }
9779
+ });
9311
9780
  /**
9312
9781
  * Retrieve a project
9313
9782
  *
@@ -9489,7 +9958,7 @@ export const devopsPromotionsCancel = (options) => (options.client ?? client).po
9489
9958
  /**
9490
9959
  * Retry a promotion
9491
9960
  *
9492
- * Continue a promotion that stopped part-way, such as one in halted where some targets succeeded and others failed. The retry re-runs the targets that did not succeed and leaves the ones that did alone, so a partially deployed environment is completed rather than redeployed from the start. A promotion that is still running is refused, and so is one that already reached a terminal state; read the promotion first and retry only a halted or errored one. The retry is attributed to the credential that sends it and is recorded on the promotion.
9961
+ * 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.
9493
9962
  */
9494
9963
  export const devopsPromotionsRetry = (options) => (options.client ?? client).post({
9495
9964
  security: [{
@@ -9987,7 +10456,7 @@ export const devopsChangesGet = (options) => (options.client ?? client).get({
9987
10456
  /**
9988
10457
  * Abandon a change
9989
10458
  *
9990
- * 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.
10459
+ * 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.
9991
10460
  */
9992
10461
  export const devopsChangesAbandon = (options) => (options.client ?? client).post({
9993
10462
  security: [{
@@ -10069,7 +10538,7 @@ export const devopsPullRequestsList = (options) => (options.client ?? client).ge
10069
10538
  /**
10070
10539
  * Retrieve a pull request
10071
10540
  *
10072
- * Read one pull request in full: its state, its head and base, its changed paths, the exposure its description declares, and — the part this call exists for — its gate. The gate is a list of named checks (the declaration, the flag duties, the affected tests, and the one judgement only a person makes), each with a result and, when it failed or is pending, the sentence saying what is missing; the gate's own state is passed only when no check failed and none is still pending. Read the gate here before merging or before recording a verdict, and read it again after a rerun: the checks are facts about the current head, and a new head starts a new gate. Add expand=runs to also get the affected test runs reported at the head commit, newest first, which is how you see why the tests check came out the way it did.
10541
+ * Read one pull request in full: its state, its head and base, its changed paths, the exposure its description declares, and — the part this call exists for — its gate. The gate is a list of named checks (the declaration, the flag duties, the affected tests, and the one judgement only a person makes), each with a result and, when it failed or is pending, the sentence saying what is missing; the tests check is never pending, because DevOps runs no tests for a pull request: it is passed, or failed naming the missing or failed cases and the command `praxis devops test <package> --record-impact` the author runs on the pushed head; the gate's own state is passed only when no check failed and none is still pending. Read the gate here before merging or before recording a verdict, and read it again after a rerun: the checks are facts about the current head, and a new head starts a new gate. Add expand=runs to also get the test runs reported at the head commit (uploaded by the author, never started by DevOps), newest first.
10073
10542
  */
10074
10543
  export const devopsPullRequestsGet = (options) => (options.client ?? client).get({
10075
10544
  security: [{
@@ -10083,7 +10552,7 @@ export const devopsPullRequestsGet = (options) => (options.client ?? client).get
10083
10552
  /**
10084
10553
  * Decide a pull request's merge gate again
10085
10554
  *
10086
- * Decide the merge gate again at the pull request's current head and report the result on GitHub as the "Praxis DevOps / gate" check run. Use it when a fact the gate reads has changed without a new push — a test run finished, a flag was registered, or a check that had no evidence now has some — so nobody has to push an empty commit to make the check move. The answer is the pull request with the gate it now reaches. A head whose earlier gate already had a verdict and comes back pending opens a NEW check run, because GitHub will not reopen a completed one; while the same head is still deciding, the run it already owns is updated in place. Nothing else on the pull request changes, and repeating the call is safe: the same facts decide the same gate.
10555
+ * Decide the merge gate again at the pull request's current head and report the result on GitHub as the "Praxis DevOps / gate" check run. Use it when a fact the gate reads has changed without a new push — a flag was registered, or a check that had no evidence now has some (test evidence uploaded for the head already decides the gate again by itself) — so nobody has to push an empty commit to make the check move. The answer is the pull request with the gate it now reaches. A head whose earlier gate already had a verdict and comes back pending opens a NEW check run, because GitHub will not reopen a completed one; while the same head is still deciding, the run it already owns is updated in place. Nothing else on the pull request changes, and repeating the call is safe: the same facts decide the same gate.
10087
10556
  */
10088
10557
  export const devopsPullRequestsRerunGate = (options) => (options.client ?? client).post({
10089
10558
  security: [{
@@ -10097,7 +10566,7 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
10097
10566
  /**
10098
10567
  * Merge a pull request through its gate
10099
10568
  *
10100
- * Land a pull request by having DevOps call GitHub, so the merge goes through the platform's own merge gate instead of around it. The gate is the permission: while the gate is pending or failed the merge is refused with GATE_NOT_PASSED, and a pull request that is already merged or closed is refused with PULL_REQUEST_NOT_OPEN. Only the commit the gate decided on may land — that commit is sent to GitHub as the merge sha, so a head that moved underneath is refused with HEAD_MOVED rather than merged untested — and GitHub's own refusal, such as a conflict, comes back as MERGE_REFUSED carrying its words. method picks the merge shape and defaults to merge. queue true does not merge now: it puts the pull request into its (project, base) merge queue, where the commit that eventually lands is one GitHub built from the current base and a test run proved. Send requestId to make a retry safe — a retry that reaches a pull request DevOps itself already merged answers that merge without calling GitHub again; it does not make the merge wait. Merging something already merged by somebody else stays a refusal rather than a replay.
10569
+ * Land a pull request by having DevOps call GitHub, so the merge goes through the platform's own merge gate instead of around it. The gate is the permission: while the gate is pending or failed the merge is refused with GATE_NOT_PASSED, and a pull request that is already merged or closed is refused with PULL_REQUEST_NOT_OPEN. Only the commit the gate decided on may land — that commit is sent to GitHub as the merge sha, so a head that moved underneath is refused with HEAD_MOVED rather than merged untested — and GitHub's own refusal, such as a conflict, comes back as MERGE_REFUSED carrying its words. method picks the merge shape; on GitHub it defaults to rebase. A project on our own Git (provider platform) merges by squash only: no method means squash, and rebase or merge is refused with INVALID_ARGUMENT naming squash. queue true does not merge now: it puts the pull request into its (project, base) merge queue, where the commit that eventually lands is one GitHub built from the current base and a test run proved. Send requestId to make a retry safe — a retry that reaches a pull request DevOps itself already merged answers that merge without calling GitHub again; it does not make the merge wait. Merging something already merged by somebody else stays a refusal rather than a replay.
10101
10570
  */
10102
10571
  export const devopsPullRequestsMerge = (options) => (options.client ?? client).post({
10103
10572
  security: [{
@@ -10113,9 +10582,9 @@ export const devopsPullRequestsMerge = (options) => (options.client ?? client).p
10113
10582
  }
10114
10583
  });
10115
10584
  /**
10116
- * Record a gatekeeper's verdict on a direct change
10585
+ * Record a review verdict on a pull request
10117
10586
  *
10118
- * A gatekeeper's judgement of a change declared direct — the one gate check a person answers, because a direct change has no flag to hold it back. Send result passed to let it through, or failed to hold it, with reason saying in a sentence a reviewer can act on why; the reason becomes the message of the gate's exposure-judged check. The verdict is about ONE commit: headSha must be the pull request's current head, and a verdict for any other commit is refused with INVALID_ARGUMENT rather than applied, because a judgement of a version nobody reviewed must never pass the version that is there now — so a recorded verdict stops applying the moment the head moves, and the new head must be judged on its own. Recording it decides the gate again, so a passed verdict makes the gate passed once every other check has too, and the answer is the pull request with the gate it now reaches. A passed verdict for a change whose tests have not run leaves the gate pending: a person's judgement never outvotes a missing test.
10587
+ * Record a reviewer's verdict on a pull request, after the fact (Sean 2026-11-24). The merge gate no longer waits for it: exposure-judged is decided by machine from the declaration for every kind of exposure, so a pull request merges without any verdict. This call is the review record — send result passed or failed with reason saying in a sentence a reviewer can act on why. It is stored on the pull request as review and announced with the event devops.pullRequest.reviewed. A failed verdict on an already merged pull request is a finding for follow-up (the event says finding true): the merge stands, nothing is un-merged, and a rollback or a fix is asked for on the ticket. headSha must be the pull request's head, and a verdict for another commit is refused with INVALID_ARGUMENT. List the merged pull requests nobody reviewed with pullRequests.list reviewed=false.
10119
10588
  */
10120
10589
  export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? client).post({
10121
10590
  security: [{
@@ -10130,6 +10599,42 @@ export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? c
10130
10599
  ...options.headers
10131
10600
  }
10132
10601
  });
10602
+ /**
10603
+ * Close a pull request without merging it
10604
+ *
10605
+ * 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.
10606
+ */
10607
+ export const devopsPullRequestsClose = (options) => (options.client ?? client).post({
10608
+ security: [{
10609
+ key: 'devops-bearerAuth',
10610
+ scheme: 'bearer',
10611
+ type: 'http'
10612
+ }],
10613
+ url: '/devops/v1/pull-requests/{id}:close',
10614
+ ...options,
10615
+ headers: {
10616
+ 'Content-Type': 'application/json',
10617
+ ...options.headers
10618
+ }
10619
+ });
10620
+ /**
10621
+ * Review a pull request on our own Git
10622
+ *
10623
+ * Give your verdict on a pull request whose project keeps its code on the platform's own Git, where there is no GitHub to hold reviews. The reviewer is you — the user or agent the credential names, never a name in the body — and the platform stores your verdict on the pull request's reviewers under your id, so an ownership rule that lists principal ids reads it. Send approved to approve, changes_requested to hold it with changes you want, or commented to say something without a verdict. A second review from you replaces your first, and the gate is decided again so a rule that reads reviews sees it at once. Only an open pull request is reviewed: a merged or closed one is refused with PULL_REQUEST_NOT_OPEN. A project connected to GitHub is refused with INVALID_ARGUMENT, because its reviews belong to GitHub and the platform projects them from there, so a verdict is never recorded in two places that can disagree.
10624
+ */
10625
+ export const devopsPullRequestsReviewsCreate = (options) => (options.client ?? client).post({
10626
+ security: [{
10627
+ key: 'devops-bearerAuth',
10628
+ scheme: 'bearer',
10629
+ type: 'http'
10630
+ }],
10631
+ url: '/devops/v1/pull-requests/{id}/reviews',
10632
+ ...options,
10633
+ headers: {
10634
+ 'Content-Type': 'application/json',
10635
+ ...options.headers
10636
+ }
10637
+ });
10133
10638
  /**
10134
10639
  * List connections
10135
10640
  *
@@ -10275,7 +10780,7 @@ export const devopsTestRunsRetryFailed = (options) => (options.client ?? client)
10275
10780
  /**
10276
10781
  * List a project's stage workspaces
10277
10782
  *
10278
- * List the project's three stage workspaces — development, integration and runtime — in that order. Each row says how a machine of that stage is built and how long it lives; it is configuration, not a machine, so listing never opens one. A project whose rows do not exist yet gets all three materialized on this call with the defaults (size medium, prebuild on, idle timeout 30 minutes, retention 7 days), and a later call reads those same rows back rather than replacing them. Read one stage with the workspace retrieve; the machines actually running are units.
10783
+ * List the project's three stage workspaces — development, integration and release — in that order. Each row says how a machine of that stage is built and how long it lives; it is configuration, not a machine, so listing never opens one. A project whose rows do not exist yet gets all three materialized on this call with the defaults (size medium, prebuild on, idle timeout 30 minutes, retention 7 days), and a later call reads those same rows back rather than replacing them. Read one stage with the workspace retrieve; the machines actually running are units.
10279
10784
  */
10280
10785
  export const devopsWorkspacesList = (options) => (options.client ?? client).get({
10281
10786
  security: [{
@@ -10350,6 +10855,20 @@ export const devopsUnitsCreate = (options) => (options.client ?? client).post({
10350
10855
  ...options.headers
10351
10856
  }
10352
10857
  });
10858
+ /**
10859
+ * List a project's cleanup ledger
10860
+ *
10861
+ * List what the daily cleanup job removed or archived for the project, newest decision first: merged branches deleted when their pull request merged, stopped units deleted after the project's window, test evidence past its age, and prebuilds beyond the kept versions. Each row names the kind of thing, which one, whether it was archived (the record stays, the heavy content goes) or deleted, the reason and when it was decided and done; error is set while the last attempt failed and the job will try again. The ledger is read-only: the job is its only writer, and a project changes what is kept through settings.retention on devops.projects.update. A project with no row has had nothing cleaned.
10862
+ */
10863
+ export const devopsCleanupsList = (options) => (options.client ?? client).get({
10864
+ security: [{
10865
+ key: 'devops-bearerAuth',
10866
+ scheme: 'bearer',
10867
+ type: 'http'
10868
+ }],
10869
+ url: '/devops/v1/projects/{project}/cleanups',
10870
+ ...options
10871
+ });
10353
10872
  /**
10354
10873
  * Delete a unit
10355
10874
  *
@@ -11367,7 +11886,7 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
11367
11886
  /**
11368
11887
  * Create speech
11369
11888
  *
11370
- * 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.
11889
+ * 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.
11371
11890
  */
11372
11891
  export const mediaCreateSpeech = (options) => (options.client ?? client).post({
11373
11892
  security: [{
@@ -11555,7 +12074,7 @@ export const mediaRequestHlsRenditions = (options) => (options.client ?? client)
11555
12074
  /**
11556
12075
  * Create voice
11557
12076
  *
11558
- * Create a voice for this library and start the clone that makes it speakable. Send exactly one of the two shapes: consent_id with samples (a real person’s recordings, a consented voice) or design_asset_id (a preview the voice-design run produced in this library, a generated voice). Sending both, or neither, is refused with INVALID_PARAMS, and origin is written by the platform only. Answers 202 with a job to poll; the voice exists as soon as the job is created and its clone follows.
12077
+ * 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.
11559
12078
  */
11560
12079
  export const mediaCreateVoice = (options) => (options.client ?? client).post({
11561
12080
  security: [{
@@ -11847,7 +12366,7 @@ export const registryRepositoriesList = (options) => (options?.client ?? client)
11847
12366
  /**
11848
12367
  * Create repository
11849
12368
  *
11850
- * 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
12369
+ * 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。format 默认 oci,库里放技能和插件;要放 git 仓库就传 format=git,建库后 format 不能改。git 库需要这个组织已开放 git 功能,否则返回 409。
11851
12370
  */
11852
12371
  export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
11853
12372
  security: [{
@@ -11923,12 +12442,11 @@ export const registryRepositoriesPackagesList = (options) => (options.client ??
11923
12442
  ...options
11924
12443
  });
11925
12444
  /**
11926
- * Publish a package
12445
+ * Create a package
11927
12446
  *
11928
- * 把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 multipart:version 必填,archive 给一个 zip,或者 files 给一组文件(每个文件的 filename 是相对上传根的路径,例如 pdf/SKILL.md)。单个顶层目录会被剥掉。种类按根上有什么判:有 SKILL.md 就是 skill,有 .claude-plugin/plugin.json 就是 plugin;两者都没有、或都有,会被拒。名字从 SKILL.md 或 plugin.json 里读,不从路径或 query 猜。限额:上传 ≤25 MiB,解压后 ≤50 MiB,≤1000 个文件。版本必须是 semver 且严格递增;第一个版本可以是任意合法 semver,之后每个新版本都要比已发布的最高版本高。把已有智能体的技能搬过来时,先用 GET /agent/v1/skills/{id}/versions/{v}/content 导出 zip,再在这里作为 archive 发布。
12447
+ * 在一个库里建新包,按库的 format 走两条路。git 库(format=git):Content-Type 用 application/json,请求体 {name, format:"git", default_branch?, description?, import?},建一个空的 git 仓库,或者用 import.url(公开 https 仓库)从现有仓库导入;成功返回的包带 clone_url、default_branch 和 protected_refs(默认只保护默认分支),接着调用 packages.git-credential 取推拉凭据;组织未开放 git 功能返回 409,往 oci 库里用 JSON 建包也是 409。oci 库(技能和插件):把一个新包发布进这个库,一次调用建立包并上传它的第一个版本,Content-Type 用 multipart/form-data。发布内容是 multipart:version 必填,archive 给一个 zip,或者 files 给一组文件(每个文件的 filename 是相对上传根的路径,例如 pdf/SKILL.md)。单个顶层目录会被剥掉。种类按根上有什么判:有 SKILL.md 就是 skill,有 .claude-plugin/plugin.json 就是 plugin;两者都没有、或都有,会被拒。名字从 SKILL.md 或 plugin.json 里读,不从路径或 query 猜。限额:上传 ≤25 MiB,解压后 ≤50 MiB,≤1000 个文件。版本必须是 semver 且严格递增;第一个版本可以是任意合法 semver,之后每个新版本都要比已发布的最高版本高。把已有智能体的技能搬过来时,先用 GET /agent/v1/skills/{id}/versions/{v}/content 导出 zip,再在这里作为 archive 发布。
11929
12448
  */
11930
12449
  export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
11931
- ...formDataBodySerializer,
11932
12450
  security: [{
11933
12451
  key: 'registry-bearerAuth',
11934
12452
  scheme: 'bearer',
@@ -11937,7 +12455,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
11937
12455
  url: '/registry/v1/repositories/{repository_id}/packages',
11938
12456
  ...options,
11939
12457
  headers: {
11940
- 'Content-Type': null,
12458
+ 'Content-Type': 'application/json',
11941
12459
  ...options.headers
11942
12460
  }
11943
12461
  });
@@ -11988,6 +12506,24 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
11988
12506
  ...options.headers
11989
12507
  }
11990
12508
  });
12509
+ /**
12510
+ * Create a git credential
12511
+ *
12512
+ * 给一个 git 包换一个短期的 git 凭据,用来 git clone / git push。access 选 pull(只读,用来克隆和拉取)或 push(推分支,同时可以克隆和拉取)。push-protected(更新受保护分支)暂不发放,请推到别的分支再合并,请求它返回 400。ttl_seconds 是有效秒数,1-3600,默认 3600;到期后重新调用本接口,不要缓存过期的凭据。返回的 password 是敏感信息,只出现这一次,不要写进日志或提交。用法:git clone https://x-access-token:$PASSWORD@host/git/组织/库/包.git,或把 url 里的地址配上 http.extraHeader。组织未开放 git 功能返回 409;另一个组织的包、已被删除的包和 oci 包都返回 404。同一个 package_id 可以多次取,每次是一个新凭据,互不影响。
12513
+ */
12514
+ export const registryPackagesGitCredentialCreate = (options) => (options.client ?? client).post({
12515
+ security: [{
12516
+ key: 'registry-bearerAuth',
12517
+ scheme: 'bearer',
12518
+ type: 'http'
12519
+ }],
12520
+ url: '/registry/v1/packages/{package_id}/git-credential',
12521
+ ...options,
12522
+ headers: {
12523
+ 'Content-Type': 'application/json',
12524
+ ...options.headers
12525
+ }
12526
+ });
11991
12527
  /**
11992
12528
  * List commits
11993
12529
  *
@@ -12005,7 +12541,7 @@ export const registryGitLog = (options) => (options.client ?? client).get({
12005
12541
  /**
12006
12542
  * Read a commit
12007
12543
  *
12008
- * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
12544
+ * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交;changed_files=true 时再返回它相对第一个父提交改了哪些文件(根提交的全部文件算新增),文件列表被上限截断时 changed_files_truncated 为 true。仓库里没有这个对象返回 404。
12009
12545
  */
12010
12546
  export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
12011
12547
  security: [{
@@ -12030,10 +12566,66 @@ export const registryGitTreesRetrieve = (options) => (options.client ?? client).
12030
12566
  url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
12031
12567
  ...options
12032
12568
  });
12569
+ /**
12570
+ * List branches and tags
12571
+ *
12572
+ * 列出一个 git 包的分支和标签,按名字排序;prefix 只取 refs/heads/(分支)或 refs/tags/(标签),不给就两者都列。page 从 1 起,size 1 到 500,默认 100;has_more 为 true 表示还有下一页。带注解的标签返回它指向的提交 id,不是标签对象的 id。想把一个名字换成提交 id 用 git/resolve,不要自己在这个列表里找。只读;OCI 包返回 404。
12573
+ */
12574
+ export const registryGitRefs = (options) => (options.client ?? client).get({
12575
+ security: [{
12576
+ key: 'registry-bearerAuth',
12577
+ scheme: 'bearer',
12578
+ type: 'http'
12579
+ }],
12580
+ url: '/registry/v1/packages/{package_id}/git/refs',
12581
+ ...options
12582
+ });
12583
+ /**
12584
+ * Resolve a ref
12585
+ *
12586
+ * 把一个引用换成它指向的提交 id:ref 可以是分支名、标签名、refs/… 全名、HEAD 或完整对象 id(40 或 64 位十六进制,缩写不解析)。名字既是标签又是分支时取标签。完整对象 id 只在仓库里真有这个提交时才返回。仓库没有这个引用或提交返回 404(GIT_OBJECT_NOT_FOUND),不会返回空值。要比较两个引用用 git/compare。
12587
+ */
12588
+ export const registryGitResolve = (options) => (options.client ?? client).get({
12589
+ security: [{
12590
+ key: 'registry-bearerAuth',
12591
+ scheme: 'bearer',
12592
+ type: 'http'
12593
+ }],
12594
+ url: '/registry/v1/packages/{package_id}/git/resolve',
12595
+ ...options
12596
+ });
12597
+ /**
12598
+ * Compare two refs
12599
+ *
12600
+ * 比较 base 与 head(引用名或完整对象 id):status 是 identical、ahead(head 在 base 之上有新提交)、behind(head 已包含在 base 里)或 diverged(两边各有提交);merge_base 是找到的最近共同祖先;files 是 head 相对 merge_base 改了哪些文件(added、modified、removed、renamed,renamed 带 previous_path),commits 是 head 比 base 多出的提交,最新的在前。Artifacts 无法低成本回答祖先关系,所以这里只沿两边的第一父链各走最多 300 个提交,并在有界读取下比对树:找不到共同祖先时返回 diverged、merge_base 为 null;files 被上限(3000 个文件、1000 次树读取)截断时 truncated 为 true;commits 被截断、或合并提交藏起了被合并分支上的提交时 commits_truncated 为 true。truncated 或 commits_truncated 为 true 时不要把列表当作完整结果。引用不存在返回 404。只读。
12601
+ */
12602
+ export const registryGitCompare = (options) => (options.client ?? client).get({
12603
+ security: [{
12604
+ key: 'registry-bearerAuth',
12605
+ scheme: 'bearer',
12606
+ type: 'http'
12607
+ }],
12608
+ url: '/registry/v1/packages/{package_id}/git/compare',
12609
+ ...options
12610
+ });
12611
+ /**
12612
+ * List a tree recursively
12613
+ *
12614
+ * 读一个提交(或树对象)下的全部条目,递归,每个条目用相对根的完整路径命名,目录和子模块也是条目(子模块不展开)。适合要拿到整个仓库文件清单的场景(例如 DevOps 的构建判断);只想看一个目录用 git/trees/{sha}。相同的子树只读一次。条目上限 20000、树读取上限 1000 次,撞到上限时 truncated 为 true、entries 只是前一部分,不要当作全部。sha 通常来自 git/resolve。仓库里没有这个对象返回 404。只读。
12615
+ */
12616
+ export const registryGitTreesRecursive = (options) => (options.client ?? client).get({
12617
+ security: [{
12618
+ key: 'registry-bearerAuth',
12619
+ scheme: 'bearer',
12620
+ type: 'http'
12621
+ }],
12622
+ url: '/registry/v1/packages/{package_id}/git/trees/{sha}/recursive',
12623
+ ...options
12624
+ });
12033
12625
  /**
12034
12626
  * Download a file from a ref
12035
12627
  *
12036
- * 按引用读一个文件的原始字节。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。文件超过 4 MiB 返回 413,改用 git 协议取。路径不是文件或引用不存在返回 404。
12628
+ * 按引用读一个文件的原始字节,边读边发(流式),没有大小上限。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。路径不是文件或引用不存在返回 404。
12037
12629
  */
12038
12630
  export const registryGitFilesRetrieve = (options) => (options.client ?? client).get({
12039
12631
  security: [{
@@ -12205,7 +12797,7 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
12205
12797
  /**
12206
12798
  * Create sandbox (v2)
12207
12799
  *
12208
- * 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.
12800
+ * 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.
12209
12801
  */
12210
12802
  export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
12211
12803
  security: [
@@ -14951,7 +15543,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
14951
15543
  /**
14952
15544
  * Create secret
14953
15545
  *
14954
- * Store a manually supplied token in an active vault. Omit allowed_hosts for name-based resolution only; host-based redemption never matches an empty host list. Unlike Anthropic credentials, this native operation takes name and value directly, with optional allowed_hosts 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.
15546
+ * 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.
14955
15547
  */
14956
15548
  export const vaultCreateSecret = (options) => (options.client ?? client).post({
14957
15549
  security: [{
@@ -14969,7 +15561,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
14969
15561
  /**
14970
15562
  * Import secrets
14971
15563
  *
14972
- * 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 use an empty host list for name-based resolution only.
15564
+ * 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.
14973
15565
  */
14974
15566
  export const vaultImportSecrets = (options) => (options.client ?? client).post({
14975
15567
  security: [{
@@ -15093,7 +15685,7 @@ export const vaultListTemplates = (options) => (options?.client ?? client).get({
15093
15685
  /**
15094
15686
  * Create authorization
15095
15687
  *
15096
- * Connect an OAuth service to an active vault using either an OAuth template or a resource URL. Unlike Anthropic mcp_oauth credential creation, this flow obtains tokens through user consent rather than accepting an auth token bundle; compatible mcp_oauth creation and updates return 501. Open connect_url, then poll praxis.vault.authorizations.retrieve until completed, failed or expired; only completed supplies the resulting secret_id. This stores a credential but does not enable vault-backed MCP authentication in Agent sessions.
15688
+ * Connect an OAuth service to an active vault using either an OAuth template or a resource URL. Unlike Anthropic mcp_oauth credential creation, this flow obtains tokens through user consent rather than accepting an auth token bundle; compatible mcp_oauth creation and updates return 501. Open connect_url, then poll praxis.vault.authorizations.retrieve until completed, failed or expired; only completed supplies the resulting secret_id. The resulting oauth secret serves vault-backed MCP authentication — an Agent session or deployment whose vault_ids include this vault sends it to the MCP server whose URL equals this authorization's resource URL (normalized), and the platform refreshes the token once when that server answers 401.
15097
15689
  */
15098
15690
  export const vaultCreateAuthorization = (options) => (options.client ?? client).post({
15099
15691
  security: [{