@deepraxis/sdk 0.1.1-dev.7b675c8 → 0.1.1-dev.7bd666d

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.
@@ -360,7 +360,7 @@ export const getAgentAppearance = (options) => (options.client ?? client).get({
360
360
  /**
361
361
  * Retrieve agent phone
362
362
  *
363
- * Read the agent's cloud phone, or learn that it has none: use it before driving the phone or to show its state in a settings page. configured says whether a phone block is saved at all (false is not an error: the phone is off), and state is one of none, starting, booting, restoring, running, archiving or releasing — none means no instance exists (never built, already released, or gone), archiving means its app state is being packed, and releasing means a release was asked for and the cron has not finished. sku and name come from the configuration when one exists. When the phone is reachable, sandbox_id is the public sandbox id of its running instance: take the phone over with it through POST /sandbox/v1/sandboxes/{id}/act, or open the sandbox page's screen tab in the Console; lease_ends_at is when that instance's lease runs out and the sandbox kills it. archived_at and archive_error describe the last app-state archive, which a fresh instance restores on the next use. Reading never builds a phone. Only a general or assume agent may have one: a service agent, an agent of another organization and a missing agent all answer 404 AGENT_NOT_FOUND. This operation is for people and their tools — the model cannot call it; an agent drives its own phone only through its phone tool, which can act on the device but cannot read this state or release it.
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
364
  */
365
365
  export const agentsPhoneRetrieve = (options) => (options.client ?? client).get({
366
366
  security: [{
@@ -378,7 +378,7 @@ export const agentsPhoneRetrieve = (options) => (options.client ?? client).get({
378
378
  /**
379
379
  * Release agent phone
380
380
  *
381
- * Ask for the agent's cloud phone to go, and answer its state afterwards. The phone is not killed here: its app state is packed first (state archiving), then the instance is killed and the row cleared, so the state answers releasing until that sweep finishes and the next use builds a fresh instance and restores the archive. The configuration is never deleted — the phone block stays and turning the phone off is agents.update with phone null, a different door. With no phone configured, or one that was never built (state none), the call changes nothing and answers none, so it is safe to repeat; repeating it while a release is pending is idempotent. Only a general or assume agent may have a phone: a service agent, an agent of another organization and a missing agent all answer 404 AGENT_NOT_FOUND. This operation is for people and their tools — the model cannot call it.
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
382
  */
383
383
  export const agentsPhoneRelease = (options) => (options.client ?? client).post({
384
384
  security: [{
@@ -626,6 +626,31 @@ export const computersFilesContent = (options) => (options.client ?? client).get
626
626
  url: '/agent/v1/computers/{computer_id}/files/content',
627
627
  ...options
628
628
  });
629
+ /**
630
+ * Write computer file content
631
+ *
632
+ * Write the bytes of one existing file on a computer, only if the file is still the version you read.
633
+ *
634
+ * Send the raw bytes as the body (at most 16 MiB) and the version you edited in `If-Match`: the `version` field of the file listing (`<size>-<mtimeMs>`). The file must already exist; the write replaces it whole and keeps its permissions. A request without `If-Match` answers 428 FILE_VERSION_REQUIRED and nothing is written. When the file has changed since that version, the answer is 412 FILE_VERSION_MISMATCH with `error.current_version`, and nothing is written: read the file again, redo the edit and write with the new version. The version is checked against the file's current size and modification time, then the content digest is bound into the write itself, so a change that lands while the bytes are being written is refused instead of overwritten. Paths under /attachments and /skills are read-only (403 READ_ONLY). A successful write answers the new path, size, mtime and version; use that version for the next write.
635
+ */
636
+ export const updateComputerFileContent = (options) => (options.client ?? client).put({
637
+ bodySerializer: null,
638
+ security: [{
639
+ key: 'BearerAuth',
640
+ scheme: 'bearer',
641
+ type: 'http'
642
+ }, {
643
+ key: 'ApiKeyAuth',
644
+ name: 'X-API-Key',
645
+ type: 'apiKey'
646
+ }],
647
+ url: '/agent/v1/computers/{computer_id}/files/content',
648
+ ...options,
649
+ headers: {
650
+ 'Content-Type': 'application/octet-stream',
651
+ ...options.headers
652
+ }
653
+ });
629
654
  /**
630
655
  * Preview a computer file
631
656
  *
@@ -733,7 +758,7 @@ export const releaseComputerLease = (options) => (options.client ?? client).dele
733
758
  /**
734
759
  * List Toolsets
735
760
  *
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, 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.
761
+ * 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.
737
762
  */
738
763
  export const listToolsets = (options) => (options?.client ?? client).get({
739
764
  security: [{
@@ -889,7 +914,7 @@ export const createSessionArtifactContentUrl = (options) => (options.client ?? c
889
914
  *
890
915
  * List the requests a session is waiting on; an end-customer token reads its own session.
891
916
  *
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 (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.
917
+ * 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.
893
918
  */
894
919
  export const listSessionRequests = (options) => (options.client ?? client).get({
895
920
  security: [{
@@ -1429,9 +1454,10 @@ export const browserSeleniumUnsupported = (options) => (options?.client ?? clien
1429
1454
  /**
1430
1455
  * List files
1431
1456
  *
1432
- * 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.
1457
+ * 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.
1433
1458
  */
1434
1459
  export const fileListFiles = (options) => (options?.client ?? client).get({
1460
+ querySerializer: { parameters: { ids: { array: { explode: false } } } },
1435
1461
  security: [{
1436
1462
  key: 'BearerAuth',
1437
1463
  scheme: 'bearer',
@@ -3592,6 +3618,220 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
3592
3618
  ...options.headers
3593
3619
  }
3594
3620
  });
3621
+ /**
3622
+ * List specs
3623
+ *
3624
+ * 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.
3625
+ */
3626
+ export const listOrganizationSpecs = (options) => (options?.client ?? client).get({
3627
+ security: [{
3628
+ key: 'BearerAuth',
3629
+ scheme: 'bearer',
3630
+ type: 'http'
3631
+ }, {
3632
+ key: 'ApiKeyAuth',
3633
+ name: 'X-API-Key',
3634
+ type: 'apiKey'
3635
+ }],
3636
+ url: '/organization/v1/specs',
3637
+ ...options
3638
+ });
3639
+ /**
3640
+ * Get a spec
3641
+ *
3642
+ * 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.
3643
+ */
3644
+ export const getOrganizationSpec = (options) => (options.client ?? client).get({
3645
+ security: [{
3646
+ key: 'BearerAuth',
3647
+ scheme: 'bearer',
3648
+ type: 'http'
3649
+ }, {
3650
+ key: 'ApiKeyAuth',
3651
+ name: 'X-API-Key',
3652
+ type: 'apiKey'
3653
+ }],
3654
+ url: '/organization/v1/specs/{kind}/{id}',
3655
+ ...options
3656
+ });
3657
+ /**
3658
+ * Revise a spec
3659
+ *
3660
+ * 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."}}.
3661
+ */
3662
+ export const reviseOrganizationSpec = (options) => (options.client ?? client).put({
3663
+ security: [{
3664
+ key: 'BearerAuth',
3665
+ scheme: 'bearer',
3666
+ type: 'http'
3667
+ }, {
3668
+ key: 'ApiKeyAuth',
3669
+ name: 'X-API-Key',
3670
+ type: 'apiKey'
3671
+ }],
3672
+ url: '/organization/v1/specs/{kind}/{id}',
3673
+ ...options,
3674
+ headers: {
3675
+ 'Content-Type': 'application/json',
3676
+ ...options.headers
3677
+ }
3678
+ });
3679
+ /**
3680
+ * List spec revisions
3681
+ *
3682
+ * 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.
3683
+ */
3684
+ export const listOrganizationSpecRevisions = (options) => (options.client ?? client).get({
3685
+ security: [{
3686
+ key: 'BearerAuth',
3687
+ scheme: 'bearer',
3688
+ type: 'http'
3689
+ }, {
3690
+ key: 'ApiKeyAuth',
3691
+ name: 'X-API-Key',
3692
+ type: 'apiKey'
3693
+ }],
3694
+ url: '/organization/v1/specs/{kind}/{id}/revisions',
3695
+ ...options
3696
+ });
3697
+ /**
3698
+ * Diff two spec revisions
3699
+ *
3700
+ * 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.
3701
+ */
3702
+ export const diffOrganizationSpec = (options) => (options.client ?? client).get({
3703
+ security: [{
3704
+ key: 'BearerAuth',
3705
+ scheme: 'bearer',
3706
+ type: 'http'
3707
+ }, {
3708
+ key: 'ApiKeyAuth',
3709
+ name: 'X-API-Key',
3710
+ type: 'apiKey'
3711
+ }],
3712
+ url: '/organization/v1/specs/{kind}/{id}/diff',
3713
+ ...options
3714
+ });
3715
+ /**
3716
+ * Read the effective spec
3717
+ *
3718
+ * 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.
3719
+ */
3720
+ export const getOrganizationEffectiveSpec = (options) => (options?.client ?? client).get({
3721
+ security: [{
3722
+ key: 'BearerAuth',
3723
+ scheme: 'bearer',
3724
+ type: 'http'
3725
+ }, {
3726
+ key: 'ApiKeyAuth',
3727
+ name: 'X-API-Key',
3728
+ type: 'apiKey'
3729
+ }],
3730
+ url: '/organization/v1/effective_spec',
3731
+ ...options
3732
+ });
3733
+ /**
3734
+ * Plan reconciliation
3735
+ *
3736
+ * 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.
3737
+ */
3738
+ export const planOrganizationReconcile = (options) => (options.client ?? client).get({
3739
+ security: [{
3740
+ key: 'BearerAuth',
3741
+ scheme: 'bearer',
3742
+ type: 'http'
3743
+ }, {
3744
+ key: 'ApiKeyAuth',
3745
+ name: 'X-API-Key',
3746
+ type: 'apiKey'
3747
+ }],
3748
+ url: '/organization/v1/reconcile/plan',
3749
+ ...options
3750
+ });
3751
+ /**
3752
+ * Read reconcile status
3753
+ *
3754
+ * 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.
3755
+ */
3756
+ export const getOrganizationReconcileStatus = (options) => (options.client ?? client).get({
3757
+ security: [{
3758
+ key: 'BearerAuth',
3759
+ scheme: 'bearer',
3760
+ type: 'http'
3761
+ }, {
3762
+ key: 'ApiKeyAuth',
3763
+ name: 'X-API-Key',
3764
+ type: 'apiKey'
3765
+ }],
3766
+ url: '/organization/v1/reconcile/status',
3767
+ ...options
3768
+ });
3769
+ /**
3770
+ * Run reconciliation now
3771
+ *
3772
+ * 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"}.
3773
+ */
3774
+ export const runOrganizationReconcile = (options) => (options.client ?? client).post({
3775
+ security: [{
3776
+ key: 'BearerAuth',
3777
+ scheme: 'bearer',
3778
+ type: 'http'
3779
+ }, {
3780
+ key: 'ApiKeyAuth',
3781
+ name: 'X-API-Key',
3782
+ type: 'apiKey'
3783
+ }],
3784
+ url: '/organization/v1/reconcile/run',
3785
+ ...options,
3786
+ headers: {
3787
+ 'Content-Type': 'application/json',
3788
+ ...options.headers
3789
+ }
3790
+ });
3791
+ /**
3792
+ * Pause reconciliation
3793
+ *
3794
+ * 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"}.
3795
+ */
3796
+ export const pauseOrganizationReconcile = (options) => (options.client ?? client).post({
3797
+ security: [{
3798
+ key: 'BearerAuth',
3799
+ scheme: 'bearer',
3800
+ type: 'http'
3801
+ }, {
3802
+ key: 'ApiKeyAuth',
3803
+ name: 'X-API-Key',
3804
+ type: 'apiKey'
3805
+ }],
3806
+ url: '/organization/v1/reconcile/pause',
3807
+ ...options,
3808
+ headers: {
3809
+ 'Content-Type': 'application/json',
3810
+ ...options.headers
3811
+ }
3812
+ });
3813
+ /**
3814
+ * Resume reconciliation
3815
+ *
3816
+ * 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"}.
3817
+ */
3818
+ export const resumeOrganizationReconcile = (options) => (options.client ?? client).post({
3819
+ security: [{
3820
+ key: 'BearerAuth',
3821
+ scheme: 'bearer',
3822
+ type: 'http'
3823
+ }, {
3824
+ key: 'ApiKeyAuth',
3825
+ name: 'X-API-Key',
3826
+ type: 'apiKey'
3827
+ }],
3828
+ url: '/organization/v1/reconcile/resume',
3829
+ ...options,
3830
+ headers: {
3831
+ 'Content-Type': 'application/json',
3832
+ ...options.headers
3833
+ }
3834
+ });
3595
3835
  /**
3596
3836
  * Upgrade to a full sandbox
3597
3837
  *
@@ -3948,6 +4188,140 @@ export const runSandboxCommand = (options) => (options.client ?? client).post({
3948
4188
  ...options.headers
3949
4189
  }
3950
4190
  });
4191
+ /**
4192
+ * Start adding a phone of your own
4193
+ *
4194
+ * 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'}.
4195
+ */
4196
+ export const createByodPairing = (options) => (options?.client ?? client).post({
4197
+ security: [{
4198
+ key: 'BearerAuth',
4199
+ scheme: 'bearer',
4200
+ type: 'http'
4201
+ }, {
4202
+ key: 'ApiKeyAuth',
4203
+ name: 'X-API-Key',
4204
+ type: 'apiKey'
4205
+ }],
4206
+ url: '/sandbox/v1/byod/pairings',
4207
+ ...options
4208
+ });
4209
+ /**
4210
+ * List your organization's own devices
4211
+ *
4212
+ * 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:[]}]}.
4213
+ */
4214
+ export const listByodDevices = (options) => (options?.client ?? client).get({
4215
+ security: [{
4216
+ key: 'BearerAuth',
4217
+ scheme: 'bearer',
4218
+ type: 'http'
4219
+ }, {
4220
+ key: 'ApiKeyAuth',
4221
+ name: 'X-API-Key',
4222
+ type: 'apiKey'
4223
+ }],
4224
+ url: '/sandbox/v1/byod/devices',
4225
+ ...options
4226
+ });
4227
+ /**
4228
+ * Read one of your organization's devices
4229
+ *
4230
+ * 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.
4231
+ */
4232
+ export const getByodDevice = (options) => (options.client ?? client).get({
4233
+ security: [{
4234
+ key: 'BearerAuth',
4235
+ scheme: 'bearer',
4236
+ type: 'http'
4237
+ }, {
4238
+ key: 'ApiKeyAuth',
4239
+ name: 'X-API-Key',
4240
+ type: 'apiKey'
4241
+ }],
4242
+ url: '/sandbox/v1/byod/devices/{deviceID}',
4243
+ ...options
4244
+ });
4245
+ /**
4246
+ * Rename one of your organization's devices
4247
+ *
4248
+ * 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.
4249
+ */
4250
+ export const updateByodDevice = (options) => (options.client ?? client).patch({
4251
+ security: [{
4252
+ key: 'BearerAuth',
4253
+ scheme: 'bearer',
4254
+ type: 'http'
4255
+ }, {
4256
+ key: 'ApiKeyAuth',
4257
+ name: 'X-API-Key',
4258
+ type: 'apiKey'
4259
+ }],
4260
+ url: '/sandbox/v1/byod/devices/{deviceID}',
4261
+ ...options,
4262
+ headers: {
4263
+ 'Content-Type': 'application/json',
4264
+ ...options.headers
4265
+ }
4266
+ });
4267
+ /**
4268
+ * Disconnect a device and revoke its credential
4269
+ *
4270
+ * 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}.
4271
+ */
4272
+ export const disconnectByodDevice = (options) => (options.client ?? client).post({
4273
+ security: [{
4274
+ key: 'BearerAuth',
4275
+ scheme: 'bearer',
4276
+ type: 'http'
4277
+ }, {
4278
+ key: 'ApiKeyAuth',
4279
+ name: 'X-API-Key',
4280
+ type: 'apiKey'
4281
+ }],
4282
+ url: '/sandbox/v1/byod/devices/{deviceID}/disconnect',
4283
+ ...options
4284
+ });
4285
+ /**
4286
+ * Read a pairing for the phone's Allow screen
4287
+ *
4288
+ * 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'}.
4289
+ */
4290
+ export const getByodPairing = (options) => (options.client ?? client).get({
4291
+ security: [{
4292
+ key: 'BearerAuth',
4293
+ scheme: 'bearer',
4294
+ type: 'http'
4295
+ }, {
4296
+ key: 'ApiKeyAuth',
4297
+ name: 'X-API-Key',
4298
+ type: 'apiKey'
4299
+ }],
4300
+ url: '/sandbox/v1/byod/pairings/{code}',
4301
+ ...options
4302
+ });
4303
+ /**
4304
+ * Claim a pairing and register the phone
4305
+ *
4306
+ * 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/'}.
4307
+ */
4308
+ export const claimByodPairing = (options) => (options.client ?? client).post({
4309
+ security: [{
4310
+ key: 'BearerAuth',
4311
+ scheme: 'bearer',
4312
+ type: 'http'
4313
+ }, {
4314
+ key: 'ApiKeyAuth',
4315
+ name: 'X-API-Key',
4316
+ type: 'apiKey'
4317
+ }],
4318
+ url: '/sandbox/v1/byod/pairings/{code}/claim',
4319
+ ...options,
4320
+ headers: {
4321
+ 'Content-Type': 'application/json',
4322
+ ...options.headers
4323
+ }
4324
+ });
3951
4325
  /**
3952
4326
  * Delete session
3953
4327
  *
@@ -4027,7 +4401,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
4027
4401
  /**
4028
4402
  * Create agent
4029
4403
  *
4030
- * Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. Omit kind to create a service agent (Managed Agents behaviour: a fresh environment per session). Pass kind: "general" for an employee-style agent with its own computer, created with it; size and template come from the agent's computers configuration. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. A general or assume agent created without computer_id gets a new computer registered in the same request, named after the agent; a service agent with computer_id returns 400. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
4404
+ * 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.
4031
4405
  */
4032
4406
  export const agentsCreate = (options) => (options.client ?? client).post({
4033
4407
  security: [{
@@ -4067,7 +4441,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
4067
4441
  /**
4068
4442
  * Update agent
4069
4443
  *
4070
- * 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.
4444
+ * 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.
4071
4445
  */
4072
4446
  export const agentsUpdate = (options) => (options.client ?? client).post({
4073
4447
  security: [{
@@ -5169,7 +5543,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
5169
5543
  /**
5170
5544
  * Create grant
5171
5545
  *
5172
- * Record access to an organization-owned database or knowledge base, all organization files (files, id *), or models (models, id *, read only). Each resource and optional alias must be unique within this Worker. Foreign and missing resources both return RESOURCE_NOT_FOUND (404); an unavailable resource service returns PROVIDER_CAPACITY (503, retryable).
5546
+ * Record access to an organization-owned database, knowledge base, file, media library, workflow, script, agent or another Worker, to models (id *, read only), or to a whole service (search, browser, ticket, crm, canvas, cut, studio, ontology, workspace: id *, read_write; feedback: read). The types are the ones a service agent can bind. The retired files type is refused; grant one file by its file-… id. Once a Worker has any grant, its platform calls reach only what its grants name; an agent grant at read_write is what lets it issue that agent's customer grant codes. Each resource and optional alias must be unique within this Worker. Foreign and missing resources both return RESOURCE_NOT_FOUND (404); an unavailable resource service returns PROVIDER_CAPACITY (503, retryable).
5173
5547
  */
5174
5548
  export const applicationCreateGrant = (options) => (options.client ?? client).post({
5175
5549
  security: [{
@@ -9349,7 +9723,7 @@ export const devopsTestExecutionsGet = (options) => (options.client ?? client).g
9349
9723
  /**
9350
9724
  * Upload an external test report
9351
9725
  *
9352
- * 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.
9726
+ * 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.
9353
9727
  */
9354
9728
  export const devopsTestReportsUpload = (options) => (options.client ?? client).post({
9355
9729
  security: [{
@@ -9367,7 +9741,7 @@ export const devopsTestReportsUpload = (options) => (options.client ?? client).p
9367
9741
  /**
9368
9742
  * Retrieve the merge gate's test plan at a commit
9369
9743
  *
9370
- * 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.
9744
+ * 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.
9371
9745
  */
9372
9746
  export const devopsTestPlanGet = (options) => (options.client ?? client).get({
9373
9747
  security: [{
@@ -9381,7 +9755,7 @@ export const devopsTestPlanGet = (options) => (options.client ?? client).get({
9381
9755
  /**
9382
9756
  * List projects
9383
9757
  *
9384
- * 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.
9758
+ * 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.
9385
9759
  */
9386
9760
  export const devopsProjectsList = (options) => (options?.client ?? client).get({
9387
9761
  security: [{
@@ -9392,6 +9766,42 @@ export const devopsProjectsList = (options) => (options?.client ?? client).get({
9392
9766
  url: '/devops/v1/projects',
9393
9767
  ...options
9394
9768
  });
9769
+ /**
9770
+ * Create a project
9771
+ *
9772
+ * 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).
9773
+ */
9774
+ export const devopsProjectsCreate = (options) => (options.client ?? client).post({
9775
+ security: [{
9776
+ key: 'devops-bearerAuth',
9777
+ scheme: 'bearer',
9778
+ type: 'http'
9779
+ }],
9780
+ url: '/devops/v1/projects',
9781
+ ...options,
9782
+ headers: {
9783
+ 'Content-Type': 'application/json',
9784
+ ...options.headers
9785
+ }
9786
+ });
9787
+ /**
9788
+ * Create a project's default branch
9789
+ *
9790
+ * 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.
9791
+ */
9792
+ export const devopsProjectsInitializeDefaultBranch = (options) => (options.client ?? client).post({
9793
+ security: [{
9794
+ key: 'devops-bearerAuth',
9795
+ scheme: 'bearer',
9796
+ type: 'http'
9797
+ }],
9798
+ url: '/devops/v1/projects/{id}/default-branch:initialize',
9799
+ ...options,
9800
+ headers: {
9801
+ 'Content-Type': 'application/json',
9802
+ ...options.headers
9803
+ }
9804
+ });
9395
9805
  /**
9396
9806
  * Retrieve a project
9397
9807
  *
@@ -9491,7 +9901,7 @@ export const devopsReleasesAbandon = (options) => (options.client ?? client).pos
9491
9901
  /**
9492
9902
  * Create a promotion
9493
9903
  *
9494
- * Promote a release into one environment: this is the operation that actually schedules a deployment. Name the release and the environment; path is regular for an ordinary promotion, targeted to deploy only the targets you list, patch to carry a patch release, and rollback to return the environment to an earlier release. A regular promotion promotes EVERY target the release changed in that environment and refuses a targets list (to promote a subset use path targeted, so a narrowing is never silently ignored). A targeted promotion requires targets: each item is a target id from the target list or the workspace path the console shows (services/devops), and the call resolves the path to the id. A target the release does not carry is refused with the targets the release does deploy; so is a target this environment never runs. Naming a target also deploys the targets it depends on, which come first and are reported in plan.addedDependencies. The targets that changed but were not named are listed in plan.skipped with reason not_requested, so a reader sees what the promotion left behind. Callees upgrade first by default: naming a target brings the targets it depends on, because a caller cannot run on a callee it did not deploy. To leave one of those callees behind, pass withoutCallees, a list of { target, reason } on a targeted promotion. Each entry names a callee the named targets depend on — by target id or workspace path, as in targets — and carries a required, non-empty reason, because an exception nobody can justify afterwards is indistinguishable from a mistake. An excluded callee is subtracted rather than deferred: it is not deployed, and a target that entered the plan only through it leaves the plan too, so nothing is deployed that would have needed it. The exclusion is visible in the plan (plan.skipped with reason callee_excluded, carrying the reason in message) and on the promotion (withoutCallees), and a retry repeats it. Excluding a target you named is refused (take it out of targets instead), as is excluding a target the named ones do not depend on; a regular promotion refuses withoutCallees the same way it refuses targets. A targeted promotion's success verifies only the targets it deployed, not the whole release, so the upstream gate still requires the untouched targets before a later environment may take them. The service reads the environment's promotion order and refuses when an upstream environment has not verified this release yet, unless a bypass carries the authorization for that gate. An environment takes one promotion at a time, so a create while another is running is queued behind it rather than refused; only a regular promotion supersedes waiting regular ones, and a targeted promotion neither overtakes another ride nor is overtaken. Set validateOnly to read the plan and its refusals — layers, skipped targets, pending migrations, missing configuration keys — without scheduling anything, which is the safe way to find out what a promotion will do; the same plan is on the promotion this call answers and on `praxis api devops promotion get`, which reads it again with the promotion's progress as the rollout advances. patch and rollback are not creatable here yet and are refused with NOT_IMPLEMENTED. The answer is the promotion: the plan it will execute is in its plan field (layers, skipped, refusals, pending migrations) and its progress is in state; `praxis api devops promotion get <id>` shows both again at any time. With an environment that requires approval the promotion waits in awaiting_approval until `praxis api devops promotion approve`.
9904
+ * Promote a release into one environment: this is the operation that actually schedules a deployment. Name the release and the environment; path is regular for an ordinary promotion, targeted to deploy only the targets you list, patch to carry a patch release, and rollback to return the environment to an earlier release. A regular promotion promotes EVERY target the release changed in that environment and refuses a targets list (to promote a subset use path targeted, so a narrowing is never silently ignored). A targeted promotion requires targets: each item is a target id from the target list or the workspace path the console shows (services/devops), and the call resolves the path to the id. A target the release does not carry is refused with the targets the release does deploy; so is a target this environment never runs. Naming a target also deploys the targets it depends on, which come first and are reported in plan.addedDependencies. The targets that changed but were not named are listed in plan.skipped with reason not_requested, so a reader sees what the promotion left behind. Callees upgrade first by default: naming a target brings the targets it depends on, because a caller cannot run on a callee it did not deploy. To skip that on purpose, pass dependencies skip, a forced express that deploys only the named targets and records that it did so (see dependencies). To leave one of those callees behind, pass withoutCallees, a list of { target, reason } on a targeted promotion. Each entry names a callee the named targets depend on — by target id or workspace path, as in targets — and carries a required, non-empty reason, because an exception nobody can justify afterwards is indistinguishable from a mistake. An excluded callee is subtracted rather than deferred: it is not deployed, and a target that entered the plan only through it leaves the plan too, so nothing is deployed that would have needed it. The exclusion is visible in the plan (plan.skipped with reason callee_excluded, carrying the reason in message) and on the promotion (withoutCallees), and a retry repeats it. Excluding a target you named is refused (take it out of targets instead), as is excluding a target the named ones do not depend on; a regular promotion refuses withoutCallees the same way it refuses targets. A targeted promotion's success verifies only the targets it deployed, not the whole release, so the upstream gate still requires the untouched targets before a later environment may take them. The service reads the environment's promotion order and refuses when an upstream environment has not verified this release yet, unless a bypass carries the authorization for that gate. An environment takes one promotion at a time, so a create while another is running is queued behind it rather than refused; only a regular promotion supersedes waiting regular ones, and a targeted promotion neither overtakes another ride nor is overtaken. Set validateOnly to read the plan and its refusals — layers, skipped targets, pending migrations, missing configuration keys — without scheduling anything, which is the safe way to find out what a promotion will do; the same plan is on the promotion this call answers and on `praxis api devops promotion get`, which reads it again with the promotion's progress as the rollout advances. patch and rollback are not creatable here yet and are refused with NOT_IMPLEMENTED. The answer is the promotion: the plan it will execute is in its plan field (layers, skipped, refusals, pending migrations) and its progress is in state; `praxis api devops promotion get <id>` shows both again at any time. With an environment that requires approval the promotion waits in awaiting_approval until `praxis api devops promotion approve`.
9495
9905
  */
9496
9906
  export const devopsPromotionsCreate = (options) => (options.client ?? client).post({
9497
9907
  security: [{
@@ -9602,6 +10012,20 @@ export const devopsPromotionsConclude = (options) => (options.client ?? client).
9602
10012
  ...options.headers
9603
10013
  }
9604
10014
  });
10015
+ /**
10016
+ * Get the checkout credential of a running promotion
10017
+ *
10018
+ * Issue the credential the deploy machine fetches a platform-Git project's code with. The caller is the deploy machine itself, during a run: its `devops/prepare` step sends the API key it already holds and receives the clone URL of the project's repository plus a pull-only credential for exactly that one repository. The credential lives 15 minutes and is issued again on every request, so it never sits in the run's stored input or log, and a leaked copy is useless almost at once. A run that needs the code later, such as an engine checkout after a long install, asks again. It answers only while the promotion is deploying (a rollback is a promotion and deploys too) or halted; a promotion that is queued, waiting for approval, observing or finished is refused with PROMOTION_NOT_RUNNING, because no machine should be fetching code for it. A project whose code is on GitHub is refused with SOURCE_NOT_PLATFORM: its checkout uses the GitHub App token, not this. The key must belong to the promotion's organization, the same check as reading the promotion with `praxis api devops promotion get <id>`. People do not need this call: to read a platform project's code use the code browser calls instead.
10019
+ */
10020
+ export const devopsPromotionsCheckoutCredential = (options) => (options.client ?? client).post({
10021
+ security: [{
10022
+ key: 'devops-bearerAuth',
10023
+ scheme: 'bearer',
10024
+ type: 'http'
10025
+ }],
10026
+ url: '/devops/v1/promotions/{id}:checkoutCredential',
10027
+ ...options
10028
+ });
9605
10029
  /**
9606
10030
  * List a promotion's rollouts
9607
10031
  *
@@ -10153,7 +10577,7 @@ export const devopsPullRequestsList = (options) => (options.client ?? client).ge
10153
10577
  /**
10154
10578
  * Retrieve a pull request
10155
10579
  *
10156
- * 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.
10580
+ * 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.
10157
10581
  */
10158
10582
  export const devopsPullRequestsGet = (options) => (options.client ?? client).get({
10159
10583
  security: [{
@@ -10167,7 +10591,7 @@ export const devopsPullRequestsGet = (options) => (options.client ?? client).get
10167
10591
  /**
10168
10592
  * Decide a pull request's merge gate again
10169
10593
  *
10170
- * 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.
10594
+ * 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.
10171
10595
  */
10172
10596
  export const devopsPullRequestsRerunGate = (options) => (options.client ?? client).post({
10173
10597
  security: [{
@@ -10181,7 +10605,7 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
10181
10605
  /**
10182
10606
  * Merge a pull request through its gate
10183
10607
  *
10184
- * 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.
10608
+ * 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.
10185
10609
  */
10186
10610
  export const devopsPullRequestsMerge = (options) => (options.client ?? client).post({
10187
10611
  security: [{
@@ -10197,9 +10621,9 @@ export const devopsPullRequestsMerge = (options) => (options.client ?? client).p
10197
10621
  }
10198
10622
  });
10199
10623
  /**
10200
- * Record a gatekeeper's verdict on a direct change
10624
+ * Record a review verdict on a pull request
10201
10625
  *
10202
- * 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.
10626
+ * 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.
10203
10627
  */
10204
10628
  export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? client).post({
10205
10629
  security: [{
@@ -10232,6 +10656,24 @@ export const devopsPullRequestsClose = (options) => (options.client ?? client).p
10232
10656
  ...options.headers
10233
10657
  }
10234
10658
  });
10659
+ /**
10660
+ * Review a pull request on our own Git
10661
+ *
10662
+ * 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.
10663
+ */
10664
+ export const devopsPullRequestsReviewsCreate = (options) => (options.client ?? client).post({
10665
+ security: [{
10666
+ key: 'devops-bearerAuth',
10667
+ scheme: 'bearer',
10668
+ type: 'http'
10669
+ }],
10670
+ url: '/devops/v1/pull-requests/{id}/reviews',
10671
+ ...options,
10672
+ headers: {
10673
+ 'Content-Type': 'application/json',
10674
+ ...options.headers
10675
+ }
10676
+ });
10235
10677
  /**
10236
10678
  * List connections
10237
10679
  *
@@ -10377,7 +10819,7 @@ export const devopsTestRunsRetryFailed = (options) => (options.client ?? client)
10377
10819
  /**
10378
10820
  * List a project's stage workspaces
10379
10821
  *
10380
- * 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.
10822
+ * 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.
10381
10823
  */
10382
10824
  export const devopsWorkspacesList = (options) => (options.client ?? client).get({
10383
10825
  security: [{
@@ -10452,6 +10894,20 @@ export const devopsUnitsCreate = (options) => (options.client ?? client).post({
10452
10894
  ...options.headers
10453
10895
  }
10454
10896
  });
10897
+ /**
10898
+ * List a project's cleanup ledger
10899
+ *
10900
+ * 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.
10901
+ */
10902
+ export const devopsCleanupsList = (options) => (options.client ?? client).get({
10903
+ security: [{
10904
+ key: 'devops-bearerAuth',
10905
+ scheme: 'bearer',
10906
+ type: 'http'
10907
+ }],
10908
+ url: '/devops/v1/projects/{project}/cleanups',
10909
+ ...options
10910
+ });
10455
10911
  /**
10456
10912
  * Delete a unit
10457
10913
  *
@@ -11949,7 +12405,7 @@ export const registryRepositoriesList = (options) => (options?.client ?? client)
11949
12405
  /**
11950
12406
  * Create repository
11951
12407
  *
11952
- * 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
12408
+ * 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。format 默认 oci,库里放技能和插件;要放 git 仓库就传 format=git,建库后 format 不能改。git 库需要这个组织已开放 git 功能,否则返回 409。
11953
12409
  */
11954
12410
  export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
11955
12411
  security: [{
@@ -12025,12 +12481,11 @@ export const registryRepositoriesPackagesList = (options) => (options.client ??
12025
12481
  ...options
12026
12482
  });
12027
12483
  /**
12028
- * Publish a package
12484
+ * Create a package
12029
12485
  *
12030
- * 把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 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 发布。
12486
+ * 在一个库里建新包,按库的 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 发布。
12031
12487
  */
12032
12488
  export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
12033
- ...formDataBodySerializer,
12034
12489
  security: [{
12035
12490
  key: 'registry-bearerAuth',
12036
12491
  scheme: 'bearer',
@@ -12039,7 +12494,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
12039
12494
  url: '/registry/v1/repositories/{repository_id}/packages',
12040
12495
  ...options,
12041
12496
  headers: {
12042
- 'Content-Type': null,
12497
+ 'Content-Type': 'application/json',
12043
12498
  ...options.headers
12044
12499
  }
12045
12500
  });
@@ -12090,6 +12545,24 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
12090
12545
  ...options.headers
12091
12546
  }
12092
12547
  });
12548
+ /**
12549
+ * Create a git credential
12550
+ *
12551
+ * 给一个 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 可以多次取,每次是一个新凭据,互不影响。
12552
+ */
12553
+ export const registryPackagesGitCredentialCreate = (options) => (options.client ?? client).post({
12554
+ security: [{
12555
+ key: 'registry-bearerAuth',
12556
+ scheme: 'bearer',
12557
+ type: 'http'
12558
+ }],
12559
+ url: '/registry/v1/packages/{package_id}/git-credential',
12560
+ ...options,
12561
+ headers: {
12562
+ 'Content-Type': 'application/json',
12563
+ ...options.headers
12564
+ }
12565
+ });
12093
12566
  /**
12094
12567
  * List commits
12095
12568
  *
@@ -12107,7 +12580,7 @@ export const registryGitLog = (options) => (options.client ?? client).get({
12107
12580
  /**
12108
12581
  * Read a commit
12109
12582
  *
12110
- * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
12583
+ * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交;changed_files=true 时再返回它相对第一个父提交改了哪些文件(根提交的全部文件算新增),文件列表被上限截断时 changed_files_truncated 为 true。仓库里没有这个对象返回 404。
12111
12584
  */
12112
12585
  export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
12113
12586
  security: [{
@@ -12132,6 +12605,62 @@ export const registryGitTreesRetrieve = (options) => (options.client ?? client).
12132
12605
  url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
12133
12606
  ...options
12134
12607
  });
12608
+ /**
12609
+ * List branches and tags
12610
+ *
12611
+ * 列出一个 git 包的分支和标签,按名字排序;prefix 只取 refs/heads/(分支)或 refs/tags/(标签),不给就两者都列。page 从 1 起,size 1 到 500,默认 100;has_more 为 true 表示还有下一页。带注解的标签返回它指向的提交 id,不是标签对象的 id。想把一个名字换成提交 id 用 git/resolve,不要自己在这个列表里找。只读;OCI 包返回 404。
12612
+ */
12613
+ export const registryGitRefs = (options) => (options.client ?? client).get({
12614
+ security: [{
12615
+ key: 'registry-bearerAuth',
12616
+ scheme: 'bearer',
12617
+ type: 'http'
12618
+ }],
12619
+ url: '/registry/v1/packages/{package_id}/git/refs',
12620
+ ...options
12621
+ });
12622
+ /**
12623
+ * Resolve a ref
12624
+ *
12625
+ * 把一个引用换成它指向的提交 id:ref 可以是分支名、标签名、refs/… 全名、HEAD 或完整对象 id(40 或 64 位十六进制,缩写不解析)。名字既是标签又是分支时取标签。完整对象 id 只在仓库里真有这个提交时才返回。仓库没有这个引用或提交返回 404(GIT_OBJECT_NOT_FOUND),不会返回空值。要比较两个引用用 git/compare。
12626
+ */
12627
+ export const registryGitResolve = (options) => (options.client ?? client).get({
12628
+ security: [{
12629
+ key: 'registry-bearerAuth',
12630
+ scheme: 'bearer',
12631
+ type: 'http'
12632
+ }],
12633
+ url: '/registry/v1/packages/{package_id}/git/resolve',
12634
+ ...options
12635
+ });
12636
+ /**
12637
+ * Compare two refs
12638
+ *
12639
+ * 比较 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。只读。
12640
+ */
12641
+ export const registryGitCompare = (options) => (options.client ?? client).get({
12642
+ security: [{
12643
+ key: 'registry-bearerAuth',
12644
+ scheme: 'bearer',
12645
+ type: 'http'
12646
+ }],
12647
+ url: '/registry/v1/packages/{package_id}/git/compare',
12648
+ ...options
12649
+ });
12650
+ /**
12651
+ * List a tree recursively
12652
+ *
12653
+ * 读一个提交(或树对象)下的全部条目,递归,每个条目用相对根的完整路径命名,目录和子模块也是条目(子模块不展开)。适合要拿到整个仓库文件清单的场景(例如 DevOps 的构建判断);只想看一个目录用 git/trees/{sha}。相同的子树只读一次。条目上限 20000、树读取上限 1000 次,撞到上限时 truncated 为 true、entries 只是前一部分,不要当作全部。sha 通常来自 git/resolve。仓库里没有这个对象返回 404。只读。
12654
+ */
12655
+ export const registryGitTreesRecursive = (options) => (options.client ?? client).get({
12656
+ security: [{
12657
+ key: 'registry-bearerAuth',
12658
+ scheme: 'bearer',
12659
+ type: 'http'
12660
+ }],
12661
+ url: '/registry/v1/packages/{package_id}/git/trees/{sha}/recursive',
12662
+ ...options
12663
+ });
12135
12664
  /**
12136
12665
  * Download a file from a ref
12137
12666
  *
@@ -15195,7 +15724,7 @@ export const vaultListTemplates = (options) => (options?.client ?? client).get({
15195
15724
  /**
15196
15725
  * Create authorization
15197
15726
  *
15198
- * 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.
15727
+ * 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.
15199
15728
  */
15200
15729
  export const vaultCreateAuthorization = (options) => (options.client ?? client).post({
15201
15730
  security: [{