@deepraxis/sdk 0.1.1-dev.90f30ac → 0.1.1-dev.92000a0

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.
@@ -1429,9 +1429,10 @@ export const browserSeleniumUnsupported = (options) => (options?.client ?? clien
1429
1429
  /**
1430
1430
  * List files
1431
1431
  *
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.
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.
1433
1433
  */
1434
1434
  export const fileListFiles = (options) => (options?.client ?? client).get({
1435
+ querySerializer: { parameters: { ids: { array: { explode: false } } } },
1435
1436
  security: [{
1436
1437
  key: 'BearerAuth',
1437
1438
  scheme: 'bearer',
@@ -3592,6 +3593,220 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
3592
3593
  ...options.headers
3593
3594
  }
3594
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
+ });
3595
3810
  /**
3596
3811
  * Upgrade to a full sandbox
3597
3812
  *
@@ -3969,7 +4184,7 @@ export const createByodPairing = (options) => (options?.client ?? client).post({
3969
4184
  /**
3970
4185
  * List your organization's own devices
3971
4186
  *
3972
- * 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. Android is the only platform today. 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'}]}.
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:[]}]}.
3973
4188
  */
3974
4189
  export const listByodDevices = (options) => (options?.client ?? client).get({
3975
4190
  security: [{
@@ -4063,7 +4278,7 @@ export const getByodPairing = (options) => (options.client ?? client).get({
4063
4278
  /**
4064
4279
  * Claim a pairing and register the phone
4065
4280
  *
4066
- * 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--sbx-develop.praxisusercontent.com/'}.
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/'}.
4067
4282
  */
4068
4283
  export const claimByodPairing = (options) => (options.client ?? client).post({
4069
4284
  security: [{
@@ -9483,7 +9698,7 @@ export const devopsTestExecutionsGet = (options) => (options.client ?? client).g
9483
9698
  /**
9484
9699
  * Upload an external test report
9485
9700
  *
9486
- * 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.
9487
9702
  */
9488
9703
  export const devopsTestReportsUpload = (options) => (options.client ?? client).post({
9489
9704
  security: [{
@@ -9501,7 +9716,7 @@ export const devopsTestReportsUpload = (options) => (options.client ?? client).p
9501
9716
  /**
9502
9717
  * Retrieve the merge gate's test plan at a commit
9503
9718
  *
9504
- * 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.
9505
9720
  */
9506
9721
  export const devopsTestPlanGet = (options) => (options.client ?? client).get({
9507
9722
  security: [{
@@ -9526,6 +9741,42 @@ export const devopsProjectsList = (options) => (options?.client ?? client).get({
9526
9741
  url: '/devops/v1/projects',
9527
9742
  ...options
9528
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
+ });
9529
9780
  /**
9530
9781
  * Retrieve a project
9531
9782
  *
@@ -9736,6 +9987,20 @@ export const devopsPromotionsConclude = (options) => (options.client ?? client).
9736
9987
  ...options.headers
9737
9988
  }
9738
9989
  });
9990
+ /**
9991
+ * Get the checkout credential of a running promotion
9992
+ *
9993
+ * 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.
9994
+ */
9995
+ export const devopsPromotionsCheckoutCredential = (options) => (options.client ?? client).post({
9996
+ security: [{
9997
+ key: 'devops-bearerAuth',
9998
+ scheme: 'bearer',
9999
+ type: 'http'
10000
+ }],
10001
+ url: '/devops/v1/promotions/{id}:checkoutCredential',
10002
+ ...options
10003
+ });
9739
10004
  /**
9740
10005
  * List a promotion's rollouts
9741
10006
  *
@@ -10287,7 +10552,7 @@ export const devopsPullRequestsList = (options) => (options.client ?? client).ge
10287
10552
  /**
10288
10553
  * Retrieve a pull request
10289
10554
  *
10290
- * 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.
10555
+ * 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.
10291
10556
  */
10292
10557
  export const devopsPullRequestsGet = (options) => (options.client ?? client).get({
10293
10558
  security: [{
@@ -10301,7 +10566,7 @@ export const devopsPullRequestsGet = (options) => (options.client ?? client).get
10301
10566
  /**
10302
10567
  * Decide a pull request's merge gate again
10303
10568
  *
10304
- * 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.
10569
+ * 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.
10305
10570
  */
10306
10571
  export const devopsPullRequestsRerunGate = (options) => (options.client ?? client).post({
10307
10572
  security: [{
@@ -10315,7 +10580,7 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
10315
10580
  /**
10316
10581
  * Merge a pull request through its gate
10317
10582
  *
10318
- * 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.
10583
+ * 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.
10319
10584
  */
10320
10585
  export const devopsPullRequestsMerge = (options) => (options.client ?? client).post({
10321
10586
  security: [{
@@ -10331,9 +10596,9 @@ export const devopsPullRequestsMerge = (options) => (options.client ?? client).p
10331
10596
  }
10332
10597
  });
10333
10598
  /**
10334
- * Record a gatekeeper's verdict on a direct change
10599
+ * Record a review verdict on a pull request
10335
10600
  *
10336
- * 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.
10601
+ * 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.
10337
10602
  */
10338
10603
  export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? client).post({
10339
10604
  security: [{
@@ -10366,6 +10631,24 @@ export const devopsPullRequestsClose = (options) => (options.client ?? client).p
10366
10631
  ...options.headers
10367
10632
  }
10368
10633
  });
10634
+ /**
10635
+ * Review a pull request on our own Git
10636
+ *
10637
+ * 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.
10638
+ */
10639
+ export const devopsPullRequestsReviewsCreate = (options) => (options.client ?? client).post({
10640
+ security: [{
10641
+ key: 'devops-bearerAuth',
10642
+ scheme: 'bearer',
10643
+ type: 'http'
10644
+ }],
10645
+ url: '/devops/v1/pull-requests/{id}/reviews',
10646
+ ...options,
10647
+ headers: {
10648
+ 'Content-Type': 'application/json',
10649
+ ...options.headers
10650
+ }
10651
+ });
10369
10652
  /**
10370
10653
  * List connections
10371
10654
  *
@@ -10511,7 +10794,7 @@ export const devopsTestRunsRetryFailed = (options) => (options.client ?? client)
10511
10794
  /**
10512
10795
  * List a project's stage workspaces
10513
10796
  *
10514
- * 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.
10797
+ * 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.
10515
10798
  */
10516
10799
  export const devopsWorkspacesList = (options) => (options.client ?? client).get({
10517
10800
  security: [{
@@ -10586,6 +10869,20 @@ export const devopsUnitsCreate = (options) => (options.client ?? client).post({
10586
10869
  ...options.headers
10587
10870
  }
10588
10871
  });
10872
+ /**
10873
+ * List a project's cleanup ledger
10874
+ *
10875
+ * 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.
10876
+ */
10877
+ export const devopsCleanupsList = (options) => (options.client ?? client).get({
10878
+ security: [{
10879
+ key: 'devops-bearerAuth',
10880
+ scheme: 'bearer',
10881
+ type: 'http'
10882
+ }],
10883
+ url: '/devops/v1/projects/{project}/cleanups',
10884
+ ...options
10885
+ });
10589
10886
  /**
10590
10887
  * Delete a unit
10591
10888
  *
@@ -12083,7 +12380,7 @@ export const registryRepositoriesList = (options) => (options?.client ?? client)
12083
12380
  /**
12084
12381
  * Create repository
12085
12382
  *
12086
- * 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
12383
+ * 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。format 默认 oci,库里放技能和插件;要放 git 仓库就传 format=git,建库后 format 不能改。git 库需要这个组织已开放 git 功能,否则返回 409。
12087
12384
  */
12088
12385
  export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
12089
12386
  security: [{
@@ -12159,12 +12456,11 @@ export const registryRepositoriesPackagesList = (options) => (options.client ??
12159
12456
  ...options
12160
12457
  });
12161
12458
  /**
12162
- * Publish a package
12459
+ * Create a package
12163
12460
  *
12164
- * 把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 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 发布。
12461
+ * 在一个库里建新包,按库的 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 发布。
12165
12462
  */
12166
12463
  export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
12167
- ...formDataBodySerializer,
12168
12464
  security: [{
12169
12465
  key: 'registry-bearerAuth',
12170
12466
  scheme: 'bearer',
@@ -12173,7 +12469,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
12173
12469
  url: '/registry/v1/repositories/{repository_id}/packages',
12174
12470
  ...options,
12175
12471
  headers: {
12176
- 'Content-Type': null,
12472
+ 'Content-Type': 'application/json',
12177
12473
  ...options.headers
12178
12474
  }
12179
12475
  });
@@ -12224,6 +12520,24 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
12224
12520
  ...options.headers
12225
12521
  }
12226
12522
  });
12523
+ /**
12524
+ * Create a git credential
12525
+ *
12526
+ * 给一个 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 可以多次取,每次是一个新凭据,互不影响。
12527
+ */
12528
+ export const registryPackagesGitCredentialCreate = (options) => (options.client ?? client).post({
12529
+ security: [{
12530
+ key: 'registry-bearerAuth',
12531
+ scheme: 'bearer',
12532
+ type: 'http'
12533
+ }],
12534
+ url: '/registry/v1/packages/{package_id}/git-credential',
12535
+ ...options,
12536
+ headers: {
12537
+ 'Content-Type': 'application/json',
12538
+ ...options.headers
12539
+ }
12540
+ });
12227
12541
  /**
12228
12542
  * List commits
12229
12543
  *
@@ -12241,7 +12555,7 @@ export const registryGitLog = (options) => (options.client ?? client).get({
12241
12555
  /**
12242
12556
  * Read a commit
12243
12557
  *
12244
- * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
12558
+ * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交;changed_files=true 时再返回它相对第一个父提交改了哪些文件(根提交的全部文件算新增),文件列表被上限截断时 changed_files_truncated 为 true。仓库里没有这个对象返回 404。
12245
12559
  */
12246
12560
  export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
12247
12561
  security: [{
@@ -12266,6 +12580,62 @@ export const registryGitTreesRetrieve = (options) => (options.client ?? client).
12266
12580
  url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
12267
12581
  ...options
12268
12582
  });
12583
+ /**
12584
+ * List branches and tags
12585
+ *
12586
+ * 列出一个 git 包的分支和标签,按名字排序;prefix 只取 refs/heads/(分支)或 refs/tags/(标签),不给就两者都列。page 从 1 起,size 1 到 500,默认 100;has_more 为 true 表示还有下一页。带注解的标签返回它指向的提交 id,不是标签对象的 id。想把一个名字换成提交 id 用 git/resolve,不要自己在这个列表里找。只读;OCI 包返回 404。
12587
+ */
12588
+ export const registryGitRefs = (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/refs',
12595
+ ...options
12596
+ });
12597
+ /**
12598
+ * Resolve a ref
12599
+ *
12600
+ * 把一个引用换成它指向的提交 id:ref 可以是分支名、标签名、refs/… 全名、HEAD 或完整对象 id(40 或 64 位十六进制,缩写不解析)。名字既是标签又是分支时取标签。完整对象 id 只在仓库里真有这个提交时才返回。仓库没有这个引用或提交返回 404(GIT_OBJECT_NOT_FOUND),不会返回空值。要比较两个引用用 git/compare。
12601
+ */
12602
+ export const registryGitResolve = (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/resolve',
12609
+ ...options
12610
+ });
12611
+ /**
12612
+ * Compare two refs
12613
+ *
12614
+ * 比较 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。只读。
12615
+ */
12616
+ export const registryGitCompare = (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/compare',
12623
+ ...options
12624
+ });
12625
+ /**
12626
+ * List a tree recursively
12627
+ *
12628
+ * 读一个提交(或树对象)下的全部条目,递归,每个条目用相对根的完整路径命名,目录和子模块也是条目(子模块不展开)。适合要拿到整个仓库文件清单的场景(例如 DevOps 的构建判断);只想看一个目录用 git/trees/{sha}。相同的子树只读一次。条目上限 20000、树读取上限 1000 次,撞到上限时 truncated 为 true、entries 只是前一部分,不要当作全部。sha 通常来自 git/resolve。仓库里没有这个对象返回 404。只读。
12629
+ */
12630
+ export const registryGitTreesRecursive = (options) => (options.client ?? client).get({
12631
+ security: [{
12632
+ key: 'registry-bearerAuth',
12633
+ scheme: 'bearer',
12634
+ type: 'http'
12635
+ }],
12636
+ url: '/registry/v1/packages/{package_id}/git/trees/{sha}/recursive',
12637
+ ...options
12638
+ });
12269
12639
  /**
12270
12640
  * Download a file from a ref
12271
12641
  *
@@ -15329,7 +15699,7 @@ export const vaultListTemplates = (options) => (options?.client ?? client).get({
15329
15699
  /**
15330
15700
  * Create authorization
15331
15701
  *
15332
- * 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.
15702
+ * 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.
15333
15703
  */
15334
15704
  export const vaultCreateAuthorization = (options) => (options.client ?? client).post({
15335
15705
  security: [{