@deepraxis/sdk 0.1.1-dev.1571058 → 0.1.1-dev.161a576

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.
@@ -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
  *
@@ -3596,7 +3621,7 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
3596
3621
  /**
3597
3622
  * List specs
3598
3623
  *
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.
3624
+ * Lists the specs (规定) of the organization in the organization/v1 envelope (api_version, kind, metadata, spec; status is null in a list); 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
3625
  */
3601
3626
  export const listOrganizationSpecs = (options) => (options?.client ?? client).get({
3602
3627
  security: [{
@@ -3614,7 +3639,7 @@ export const listOrganizationSpecs = (options) => (options?.client ?? client).ge
3614
3639
  /**
3615
3640
  * Get a spec
3616
3641
  *
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.
3642
+ * Reads one subject's spec in the organization/v1 envelope: metadata (id, name, revision, labels, annotations, change_note, update_time, updated_by), spec ({ document, provision }) and status (how many holders last reconciled on it, how many are ready and how many have a failed block). revision reads one historical revision instead, with status null. A subject never written answers revision 0 with an empty spec, so a first revise sends metadata.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
3643
  */
3619
3644
  export const getOrganizationSpec = (options) => (options.client ?? client).get({
3620
3645
  security: [{
@@ -3632,7 +3657,7 @@ export const getOrganizationSpec = (options) => (options.client ?? client).get({
3632
3657
  /**
3633
3658
  * Revise a spec
3634
3659
  *
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."}}.
3660
+ * Replaces the whole spec of a subject: metadata.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 is { document, provision }: document is Markdown text injected into the holder's memory and never merged, provision holds the capability blocks and remove; GET /organization/v1/spec_schema returns the JSON Schema of every block, and a block outside it is refused with its path. labels and annotations carry over from the previous revision when omitted; change_note belongs to this revision only. Other metadata fields you read back (id, name, update_time, updated_by) are accepted and ignored. dry_run=true checks everything and writes nothing: it answers the spec that would be written, the changes against the live one and the reconcile plan of every affected holder in office (at most 50, plans_truncated says more exist). Requires an organization owner or admin, or the head of the subject's department. Errors: 400 INVALID_PARAMS for a missing spec or metadata.revision, an api_version other than organization/v1, labels or annotations over their limits, 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: {"metadata":{"revision":0,"change_note":"first charter"},"spec":{"document":"Deliver reliably.","provision":{"computer":{"template":"base"}}}}.
3636
3661
  */
3637
3662
  export const reviseOrganizationSpec = (options) => (options.client ?? client).put({
3638
3663
  security: [{
@@ -3705,6 +3730,24 @@ export const getOrganizationEffectiveSpec = (options) => (options?.client ?? cli
3705
3730
  url: '/organization/v1/effective_spec',
3706
3731
  ...options
3707
3732
  });
3733
+ /**
3734
+ * Read the spec schema
3735
+ *
3736
+ * Returns the JSON Schema (draft 2020-12) of a spec body, generated from the block registry: document, provision, every block and field under provision, and remove. Each field carries x-praxis-merge (single, set, keyed or layered), x-praxis-merge-key for a set, x-praxis-holders on a block (agent, human), and x-praxis-applied (whether reconcile applies it today), plus a Chinese title and an English description. Read it before writing a spec so a block or field is never guessed. The body is the schema itself, returned without any key renamed. Read-only. Errors: 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /organization/v1/spec_schema.
3737
+ */
3738
+ export const getOrganizationSpecSchema = (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/spec_schema',
3749
+ ...options
3750
+ });
3708
3751
  /**
3709
3752
  * Plan reconciliation
3710
3753
  *
@@ -4278,7 +4321,7 @@ export const getByodPairing = (options) => (options.client ?? client).get({
4278
4321
  /**
4279
4322
  * Claim a pairing and register the phone
4280
4323
  *
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--sbx-develop.praxisusercontent.com/'}.
4324
+ * 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.praxisusercontent.com/'}.
4282
4325
  */
4283
4326
  export const claimByodPairing = (options) => (options.client ?? client).post({
4284
4327
  security: [{
@@ -5518,7 +5561,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
5518
5561
  /**
5519
5562
  * Create grant
5520
5563
  *
5521
- * 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).
5564
+ * 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), or to full authority (organization: id *, read_write), which excludes every other grant. The types are the ones a service agent can bind. The retired files type is refused; grant one file by its file-… id. A Worker's platform calls reach only what its grants name, and nothing with no grant; 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).
5522
5565
  */
5523
5566
  export const applicationCreateGrant = (options) => (options.client ?? client).post({
5524
5567
  security: [{
@@ -6106,7 +6149,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
6106
6149
  /**
6107
6150
  * Create a workflow
6108
6151
  *
6109
- * Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 5 min (run-sandbox 6 h), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /docs/developers/automation/guides/approvals Guide: /docs/developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
6152
+ * Workflow syntax reference: https://docs.deepraxis.com/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 5 min (run-sandbox 6 h), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /developers/automation/guides/approvals Guide: /developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
6110
6153
  */
6111
6154
  export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
6112
6155
  security: [{
@@ -6146,7 +6189,7 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
6146
6189
  /**
6147
6190
  * Update a workflow draft
6148
6191
  *
6149
- * Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://deepraxis.com/docs/developers/automation/reference/workflow-syntax.
6192
+ * Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
6150
6193
  */
6151
6194
  export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
6152
6195
  security: [{
@@ -6350,7 +6393,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
6350
6393
  /**
6351
6394
  * Validate a definition
6352
6395
  *
6353
- * Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax.
6396
+ * Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
6354
6397
  */
6355
6398
  export const automationValidateValidate = (options) => (options.client ?? client).post({
6356
6399
  security: [{
@@ -8593,7 +8636,7 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
8593
8636
  * codemode.describe("praxis.cut.script") // names, one page at a time
8594
8637
  * ```
8595
8638
  *
8596
- * Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
8639
+ * Published at https://docs.deepraxis.com/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
8597
8640
  *
8598
8641
  * #### Script functions (script)
8599
8642
  *
@@ -9741,6 +9784,42 @@ export const devopsProjectsList = (options) => (options?.client ?? client).get({
9741
9784
  url: '/devops/v1/projects',
9742
9785
  ...options
9743
9786
  });
9787
+ /**
9788
+ * Create a project
9789
+ *
9790
+ * 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).
9791
+ */
9792
+ export const devopsProjectsCreate = (options) => (options.client ?? client).post({
9793
+ security: [{
9794
+ key: 'devops-bearerAuth',
9795
+ scheme: 'bearer',
9796
+ type: 'http'
9797
+ }],
9798
+ url: '/devops/v1/projects',
9799
+ ...options,
9800
+ headers: {
9801
+ 'Content-Type': 'application/json',
9802
+ ...options.headers
9803
+ }
9804
+ });
9805
+ /**
9806
+ * Create a project's default branch
9807
+ *
9808
+ * 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.
9809
+ */
9810
+ export const devopsProjectsInitializeDefaultBranch = (options) => (options.client ?? client).post({
9811
+ security: [{
9812
+ key: 'devops-bearerAuth',
9813
+ scheme: 'bearer',
9814
+ type: 'http'
9815
+ }],
9816
+ url: '/devops/v1/projects/{id}/default-branch:initialize',
9817
+ ...options,
9818
+ headers: {
9819
+ 'Content-Type': 'application/json',
9820
+ ...options.headers
9821
+ }
9822
+ });
9744
9823
  /**
9745
9824
  * Retrieve a project
9746
9825
  *
@@ -9840,7 +9919,7 @@ export const devopsReleasesAbandon = (options) => (options.client ?? client).pos
9840
9919
  /**
9841
9920
  * Create a promotion
9842
9921
  *
9843
- * 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`.
9922
+ * 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). Every promotion runs one version of the deploy engine, resolved from the project's settings.deploy.engine when the promotion is created and recorded as engineVersion; a request that engine version cannot serve is refused with ENGINE_TOO_OLD, which names the option and the first version that has it. 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 answer then carries validateOnly true and the placeholder id prm_validate_only, because nothing was stored and there is no promotion to read again; the same plan is on the promotion a real 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: a rollback is created with environments.rollback, not with path rollback on this call. An environment whose blocksLater is true stays held during its observation window: a promotion created for it waits queued (its stateDescription names the promotion it waits for) until promotions.conclude ends the window, and the environment list shows the queue as busy with that promotion as active. A promotion in which every rollout was skipped as artifact_identical (the change did not alter the built artifact, such as a comment) succeeds and moves the checkpoints but deploys nothing; promotions.retrieve counts it in summary.identical. 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`.
9844
9923
  */
9845
9924
  export const devopsPromotionsCreate = (options) => (options.client ?? client).post({
9846
9925
  security: [{
@@ -9858,7 +9937,7 @@ export const devopsPromotionsCreate = (options) => (options.client ?? client).po
9858
9937
  /**
9859
9938
  * List promotions
9860
9939
  *
9861
- * List the project's promotions, newest first, across every environment. Use it to see what is queued, what is observing, and what finished recently, without reading each environment separately. A promotion in a terminal state stays in this list, which is how a caller tells "never promoted" apart from "promoted and then rolled back". Neither filter nor orderBy is accepted yet, so page through with pageToken instead of narrowing the query.
9940
+ * List the project's promotions, newest first, across every environment. Use it to see what is queued, what is observing, and what finished recently, without reading each environment separately. A promotion in a terminal state stays in this list, which is how a caller tells "never promoted" apart from "promoted and then rolled back". The one filter is the forced query parameter (true or false, sent as text in the query string); a filter expression and orderBy are not accepted yet, so page through with pageToken instead of narrowing further.
9862
9941
  */
9863
9942
  export const devopsPromotionsList = (options) => (options.client ?? client).get({
9864
9943
  security: [{
@@ -9872,7 +9951,7 @@ export const devopsPromotionsList = (options) => (options.client ?? client).get(
9872
9951
  /**
9873
9952
  * Retrieve a promotion
9874
9953
  *
9875
- * Read one promotion: its state, its approval, its plan, and the failure that stopped it when there is one. Poll this after creating a promotion to follow it to a terminal state, or read it to find out why a deployment stopped — failure.cause tells plan refusal apart from a failed deploy, and executor names the runs involved. Pass expand=rollouts to receive the per-target rollouts in the same answer instead of listing them separately. state observing means the environment is deployed and the observation window is running, so the promotion is not finished and conclude is still to come. The plan is in the plan field of the answer (null until one is made) and the promotion's state is in state, so this is where to read both before approve (needs awaiting_approval) or conclude (needs observing).
9954
+ * Read one promotion: its state, its approval, its plan, and the failure that stopped it when there is one. Poll this after creating a promotion to follow it to a terminal state, or read it to find out why a deployment stopped — failure.cause tells plan refusal apart from a failed deploy, and executor names the runs involved. Pass expand=rollouts to receive the per-target rollouts in the same answer instead of listing them separately. state observing means the environment is deployed and the observation window is running, so the promotion is not finished and conclude is still to come; the window holds the environment, so a promotion queued behind it waits until conclude. Once a rollout has ended, summary says how many targets were really deployed (deployed), how many were skipped as artifact_identical (identical: the change did not alter the built artifact, such as a comment, so nothing was deployed although the promotion succeeds and its checkpoints advance) and how many ended any other way (other). The plan is in the plan field of the answer (null until one is made) and the promotion's state is in state, so this is where to read both before approve (needs awaiting_approval) or conclude (needs observing).
9876
9955
  */
9877
9956
  export const devopsPromotionsGet = (options) => (options.client ?? client).get({
9878
9957
  security: [{
@@ -9951,6 +10030,20 @@ export const devopsPromotionsConclude = (options) => (options.client ?? client).
9951
10030
  ...options.headers
9952
10031
  }
9953
10032
  });
10033
+ /**
10034
+ * Get the checkout credential of a running promotion
10035
+ *
10036
+ * 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.
10037
+ */
10038
+ export const devopsPromotionsCheckoutCredential = (options) => (options.client ?? client).post({
10039
+ security: [{
10040
+ key: 'devops-bearerAuth',
10041
+ scheme: 'bearer',
10042
+ type: 'http'
10043
+ }],
10044
+ url: '/devops/v1/promotions/{id}:checkoutCredential',
10045
+ ...options
10046
+ });
9954
10047
  /**
9955
10048
  * List a promotion's rollouts
9956
10049
  *
@@ -10028,7 +10121,7 @@ export const devopsEnvironmentsCheckpointsList = (options) => (options.client ??
10028
10121
  /**
10029
10122
  * Roll an environment back
10030
10123
  *
10031
- * Put targets of an environment back on the versions they ran before, the way Cloud Deploy rolls a target back: the earlier release is deployed again, and the live version and the deployment state move back together, so the next promotion does not quietly undo it. With no targets it undoes the environment's latest successful promotion, every target that promotion deployed; targets narrows that to some of them, by target id or workspace path such as services/agent. Each target returns to the version it ran just before that promotion; toRelease names an older release instead, which must be one every target has already run in this environment. Callers go back before their callees, and a caller that the undone promotion deployed together with a callee you roll back is brought along (listed in plan.addedDependencies). The request is the approval: reason is recorded as the approval comment, so the rollback does not wait in awaiting_approval, and a promotion still in its observation window is concluded as rolled back. Database migrations are not reversed. Send validateOnly true to see the plan without creating anything. Refusals: ROLLBACK_NOTHING_TO_ROLL_BACK when no promotion has succeeded here, ROLLBACK_NO_PREVIOUS when a target has no earlier version, ROLLBACK_AMBIGUOUS when the targets ran different earlier releases (roll them back separately or name toRelease), ROLLBACK_NOT_RUN_HERE when toRelease carries a version a target never ran here.
10124
+ * Put targets of an environment back on the versions they ran before, the way Cloud Deploy rolls a target back: the earlier release is deployed again, and the live version and the deployment state move back together, so the next promotion does not quietly undo it. With no targets it undoes the environment's latest successful promotion, every target that promotion deployed; targets narrows that to some of them, by target id or workspace path such as services/agent. Each target returns to the version it ran just before that promotion; toRelease names an older release instead, which must be one every target has already run in this environment. Callers go back before their callees, and a caller that the undone promotion deployed together with a callee you roll back is brought along (listed in plan.addedDependencies). The request is the approval: reason is recorded as the approval comment, so the rollback does not wait in awaiting_approval, and a promotion still in its observation window is concluded as rolled back. Database migrations are not reversed. Send validateOnly true to see the plan without creating anything; the answer then carries validateOnly true and the placeholder id prm_validate_only, because no promotion was stored. This is the way to create a rollback; promotions.create does not take path rollback. Refusals: ROLLBACK_NOTHING_TO_ROLL_BACK when no promotion has succeeded here, ROLLBACK_NO_PREVIOUS when a target has no earlier version, ROLLBACK_AMBIGUOUS when the targets ran different earlier releases (roll them back separately or name toRelease), ROLLBACK_NOT_RUN_HERE when toRelease carries a version a target never ran here.
10032
10125
  */
10033
10126
  export const devopsEnvironmentsRollback = (options) => (options.client ?? client).post({
10034
10127
  security: [{
@@ -10530,7 +10623,7 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
10530
10623
  /**
10531
10624
  * Merge a pull request through its gate
10532
10625
  *
10533
- * 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.
10626
+ * 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.
10534
10627
  */
10535
10628
  export const devopsPullRequestsMerge = (options) => (options.client ?? client).post({
10536
10629
  security: [{
@@ -10546,9 +10639,9 @@ export const devopsPullRequestsMerge = (options) => (options.client ?? client).p
10546
10639
  }
10547
10640
  });
10548
10641
  /**
10549
- * Record a gatekeeper's verdict on a direct change
10642
+ * Record a review verdict on a pull request
10550
10643
  *
10551
- * 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.
10644
+ * 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.
10552
10645
  */
10553
10646
  export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? client).post({
10554
10647
  security: [{
@@ -10581,6 +10674,24 @@ export const devopsPullRequestsClose = (options) => (options.client ?? client).p
10581
10674
  ...options.headers
10582
10675
  }
10583
10676
  });
10677
+ /**
10678
+ * Review a pull request on our own Git
10679
+ *
10680
+ * 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.
10681
+ */
10682
+ export const devopsPullRequestsReviewsCreate = (options) => (options.client ?? client).post({
10683
+ security: [{
10684
+ key: 'devops-bearerAuth',
10685
+ scheme: 'bearer',
10686
+ type: 'http'
10687
+ }],
10688
+ url: '/devops/v1/pull-requests/{id}/reviews',
10689
+ ...options,
10690
+ headers: {
10691
+ 'Content-Type': 'application/json',
10692
+ ...options.headers
10693
+ }
10694
+ });
10584
10695
  /**
10585
10696
  * List connections
10586
10697
  *
@@ -10726,7 +10837,7 @@ export const devopsTestRunsRetryFailed = (options) => (options.client ?? client)
10726
10837
  /**
10727
10838
  * List a project's stage workspaces
10728
10839
  *
10729
- * 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.
10840
+ * 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.
10730
10841
  */
10731
10842
  export const devopsWorkspacesList = (options) => (options.client ?? client).get({
10732
10843
  security: [{
@@ -10801,6 +10912,20 @@ export const devopsUnitsCreate = (options) => (options.client ?? client).post({
10801
10912
  ...options.headers
10802
10913
  }
10803
10914
  });
10915
+ /**
10916
+ * List a project's cleanup ledger
10917
+ *
10918
+ * 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.
10919
+ */
10920
+ export const devopsCleanupsList = (options) => (options.client ?? client).get({
10921
+ security: [{
10922
+ key: 'devops-bearerAuth',
10923
+ scheme: 'bearer',
10924
+ type: 'http'
10925
+ }],
10926
+ url: '/devops/v1/projects/{project}/cleanups',
10927
+ ...options
10928
+ });
10804
10929
  /**
10805
10930
  * Delete a unit
10806
10931
  *
@@ -12441,7 +12566,7 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
12441
12566
  /**
12442
12567
  * Create a git credential
12443
12568
  *
12444
- * 给一个 git 包换一个短期的 git 凭据,用来 git clone / git push。access 选 pull(只读,用来克隆和拉取)或 push(推分支);一个 push 凭据只能推,克隆要另取 pull 凭据。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 可以多次取,每次是一个新凭据,互不影响。
12569
+ * 给一个 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 可以多次取,每次是一个新凭据,互不影响。
12445
12570
  */
12446
12571
  export const registryPackagesGitCredentialCreate = (options) => (options.client ?? client).post({
12447
12572
  security: [{
@@ -12473,7 +12598,7 @@ export const registryGitLog = (options) => (options.client ?? client).get({
12473
12598
  /**
12474
12599
  * Read a commit
12475
12600
  *
12476
- * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
12601
+ * 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交;changed_files=true 时再返回它相对第一个父提交改了哪些文件(根提交的全部文件算新增),文件列表被上限截断时 changed_files_truncated 为 true。仓库里没有这个对象返回 404。
12477
12602
  */
12478
12603
  export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
12479
12604
  security: [{
@@ -12498,6 +12623,62 @@ export const registryGitTreesRetrieve = (options) => (options.client ?? client).
12498
12623
  url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
12499
12624
  ...options
12500
12625
  });
12626
+ /**
12627
+ * List branches and tags
12628
+ *
12629
+ * 列出一个 git 包的分支和标签,按名字排序;prefix 只取 refs/heads/(分支)或 refs/tags/(标签),不给就两者都列。page 从 1 起,size 1 到 500,默认 100;has_more 为 true 表示还有下一页。带注解的标签返回它指向的提交 id,不是标签对象的 id。想把一个名字换成提交 id 用 git/resolve,不要自己在这个列表里找。只读;OCI 包返回 404。
12630
+ */
12631
+ export const registryGitRefs = (options) => (options.client ?? client).get({
12632
+ security: [{
12633
+ key: 'registry-bearerAuth',
12634
+ scheme: 'bearer',
12635
+ type: 'http'
12636
+ }],
12637
+ url: '/registry/v1/packages/{package_id}/git/refs',
12638
+ ...options
12639
+ });
12640
+ /**
12641
+ * Resolve a ref
12642
+ *
12643
+ * 把一个引用换成它指向的提交 id:ref 可以是分支名、标签名、refs/… 全名、HEAD 或完整对象 id(40 或 64 位十六进制,缩写不解析)。名字既是标签又是分支时取标签。完整对象 id 只在仓库里真有这个提交时才返回。仓库没有这个引用或提交返回 404(GIT_OBJECT_NOT_FOUND),不会返回空值。要比较两个引用用 git/compare。
12644
+ */
12645
+ export const registryGitResolve = (options) => (options.client ?? client).get({
12646
+ security: [{
12647
+ key: 'registry-bearerAuth',
12648
+ scheme: 'bearer',
12649
+ type: 'http'
12650
+ }],
12651
+ url: '/registry/v1/packages/{package_id}/git/resolve',
12652
+ ...options
12653
+ });
12654
+ /**
12655
+ * Compare two refs
12656
+ *
12657
+ * 比较 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。只读。
12658
+ */
12659
+ export const registryGitCompare = (options) => (options.client ?? client).get({
12660
+ security: [{
12661
+ key: 'registry-bearerAuth',
12662
+ scheme: 'bearer',
12663
+ type: 'http'
12664
+ }],
12665
+ url: '/registry/v1/packages/{package_id}/git/compare',
12666
+ ...options
12667
+ });
12668
+ /**
12669
+ * List a tree recursively
12670
+ *
12671
+ * 读一个提交(或树对象)下的全部条目,递归,每个条目用相对根的完整路径命名,目录和子模块也是条目(子模块不展开)。适合要拿到整个仓库文件清单的场景(例如 DevOps 的构建判断);只想看一个目录用 git/trees/{sha}。相同的子树只读一次。条目上限 20000、树读取上限 1000 次,撞到上限时 truncated 为 true、entries 只是前一部分,不要当作全部。sha 通常来自 git/resolve。仓库里没有这个对象返回 404。只读。
12672
+ */
12673
+ export const registryGitTreesRecursive = (options) => (options.client ?? client).get({
12674
+ security: [{
12675
+ key: 'registry-bearerAuth',
12676
+ scheme: 'bearer',
12677
+ type: 'http'
12678
+ }],
12679
+ url: '/registry/v1/packages/{package_id}/git/trees/{sha}/recursive',
12680
+ ...options
12681
+ });
12501
12682
  /**
12502
12683
  * Download a file from a ref
12503
12684
  *
@@ -15561,7 +15742,7 @@ export const vaultListTemplates = (options) => (options?.client ?? client).get({
15561
15742
  /**
15562
15743
  * Create authorization
15563
15744
  *
15564
- * 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.
15745
+ * 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.
15565
15746
  */
15566
15747
  export const vaultCreateAuthorization = (options) => (options.client ?? client).post({
15567
15748
  security: [{