@deepraxis/cli 0.3.0-dev.1133f97 → 0.3.0-dev.12045a7

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.
Files changed (3) hide show
  1. package/COMMANDS.md +17 -2
  2. package/dist/praxis.js +1154 -125
  3. package/package.json +1 -1
package/dist/praxis.js CHANGED
@@ -14059,7 +14059,7 @@ across all toolsets allowed.`
14059
14059
  name: "image_model",
14060
14060
  type: "string",
14061
14061
  required: false,
14062
- description: "Model used by the imagine image tool; defaults to gpt-image-2 when unset. Only models that can generate images are accepted. Omit to preserve; null clears the configured model. /agent/v1 only."
14062
+ description: "Retired (the imagine tool no longer exists): accepted and ignored, never stored. Image generation goes through the media library and the manage-media skill. /agent/v1 only."
14063
14063
  },
14064
14064
  {
14065
14065
  name: "subagents",
@@ -14286,7 +14286,7 @@ toolsets allowed.`
14286
14286
  name: "image_model",
14287
14287
  type: "string",
14288
14288
  required: false,
14289
- description: "Model used by the imagine image tool; defaults to gpt-image-2 when unset. Only models that can generate images are accepted. Omit to preserve; null clears the configured model. /agent/v1 only."
14289
+ description: "Retired (the imagine tool no longer exists): accepted and ignored, never stored. Image generation goes through the media library and the manage-media skill. /agent/v1 only."
14290
14290
  },
14291
14291
  {
14292
14292
  name: "subagents",
@@ -25680,6 +25680,118 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
25680
25680
  ]
25681
25681
  }
25682
25682
  },
25683
+ {
25684
+ resource: "devops.changes",
25685
+ method: "retrieve",
25686
+ summary: "Retrieve a change",
25687
+ description: "Read one change in full: its derived stage, its pull requests (one per slice, oldest first), its flag, its workspace, and one cell per environment showing the version it rode and how far its flag has been rolled out there. The id is the branch name and contains a slash, so it must be percent-encoded in the path: feat/run-page-v2 is sent as feat%2Frun-page-v2. The stage is derived, not stored — with several pull requests it shows the slice that is furthest behind, so a change already in production that opens a new slice goes back to reviewing. When suspectedIn is set, the latest verification in that environment failed and this change is listed among the suspects until a later verification succeeds.",
25688
+ http: "GET",
25689
+ path: "/devops/v1/changes/{id}",
25690
+ streaming: "no",
25691
+ pagination: false,
25692
+ pathParams: [
25693
+ {
25694
+ name: "id",
25695
+ sdkName: "id",
25696
+ description: "The change's id, which is its branch name <type>/<slug> from a change list or create answer; the slash must be percent-encoded, so feat/run-page-v2 is sent as feat%2Frun-page-v2."
25697
+ }
25698
+ ],
25699
+ query: []
25700
+ },
25701
+ {
25702
+ resource: "devops.changes",
25703
+ method: "abandon",
25704
+ summary: "Abandon a change",
25705
+ description: "Stop a change for good: it no longer moves forward and its stage becomes abandoned. reason is required and is kept with the change. Pull requests that were already merged are not undone — the system cleans them up, or a new change reverts them — so abandoning is a statement about the change, not a rollback of code. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2). A change that is already abandoned is refused with INVALID_ARGUMENT, which is how a caller tells an earlier abandon apart from a call that had no effect.",
25706
+ http: "POST",
25707
+ path: "/devops/v1/changes/{id}:abandon",
25708
+ streaming: "no",
25709
+ pagination: false,
25710
+ pathParams: [
25711
+ {
25712
+ name: "id",
25713
+ sdkName: "id",
25714
+ description: "The change's id, which is its branch name <type>/<slug> from a change list or create answer; the slash must be percent-encoded, so feat/run-page-v2 is sent as feat%2Frun-page-v2."
25715
+ }
25716
+ ],
25717
+ query: [],
25718
+ body: {
25719
+ required: true,
25720
+ fields: [
25721
+ {
25722
+ name: "reason",
25723
+ type: "string",
25724
+ required: true,
25725
+ description: "Why the change is abandoned, stored with it as the attribution of the act."
25726
+ }
25727
+ ]
25728
+ }
25729
+ },
25730
+ {
25731
+ resource: "devops.changes",
25732
+ method: "markLastSlice",
25733
+ summary: "Mark the last slice",
25734
+ description: "Say whether the pull request being merged is the last slice of the change. A change defaults to yes; until it is marked as the last slice it cannot reach rolling out or done, because rolling out a container that may still grow would roll out the wrong thing. Send lastSlice=false before merging a pull request when more slices will follow, and true again on the final one. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2).",
25735
+ http: "POST",
25736
+ path: "/devops/v1/changes/{id}:markLastSlice",
25737
+ streaming: "no",
25738
+ pagination: false,
25739
+ pathParams: [
25740
+ {
25741
+ name: "id",
25742
+ sdkName: "id",
25743
+ description: "The change's id, which is its branch name <type>/<slug> from a change list or create answer; the slash must be percent-encoded, so feat/run-page-v2 is sent as feat%2Frun-page-v2."
25744
+ }
25745
+ ],
25746
+ query: [],
25747
+ body: {
25748
+ required: true,
25749
+ fields: [
25750
+ {
25751
+ name: "lastSlice",
25752
+ type: "boolean",
25753
+ required: true,
25754
+ description: "True when no more pull requests will follow; false keeps the change from reaching rolling out or done."
25755
+ }
25756
+ ]
25757
+ }
25758
+ },
25759
+ {
25760
+ resource: "devops.environments",
25761
+ method: "update",
25762
+ summary: "Update an environment",
25763
+ description: "Change an environment's name, position, approval requirement, observation time, blocking behaviour or domain suffix. Send the new values inside environment and name the fields to write in updateMask (name, order, requireApproval, observeMinutes, blocksLater, domainSuffix); a field not named is left alone. requireApproval true makes every later promotion into this environment stop in awaiting_approval until promotions.approve lets it proceed; promotions already running are not stopped. order moves the environment within the promotion sequence and renumbers its neighbours, and a value that would break the 1..n sequence is refused with ENVIRONMENT_ORDER_INVALID. Read the environment list first to know what you are leaving unchanged.",
25764
+ http: "PATCH",
25765
+ path: "/devops/v1/environments/{id}",
25766
+ streaming: "no",
25767
+ pagination: false,
25768
+ pathParams: [
25769
+ {
25770
+ name: "id",
25771
+ sdkName: "id",
25772
+ description: "The environment identifier from a project's environment list; the tier or the display name is not an address."
25773
+ }
25774
+ ],
25775
+ query: [],
25776
+ body: {
25777
+ required: true,
25778
+ fields: [
25779
+ {
25780
+ name: "environment",
25781
+ type: "object",
25782
+ required: true,
25783
+ description: "The new values for the environment fields to change."
25784
+ },
25785
+ {
25786
+ name: "updateMask",
25787
+ type: "array",
25788
+ itemType: "string",
25789
+ required: false,
25790
+ description: "Which environment fields to write, by name: name, order, requireApproval, observeMinutes, blocksLater, domainSuffix. Omit it to write every field the environment object carries."
25791
+ }
25792
+ ]
25793
+ }
25794
+ },
25683
25795
  {
25684
25796
  resource: "devops.environments.checkpoints",
25685
25797
  method: "list",
@@ -26054,30 +26166,48 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
26054
26166
  query: []
26055
26167
  },
26056
26168
  {
26057
- resource: "devops.projects.environments",
26058
- method: "list",
26059
- summary: "List environments",
26060
- description: "List the project's environments in promotion order: development first, production last. order is the promotion sequence, so the environment before the one you are promoting into is the one that must have verified the release first. Each entry carries its tier, whether it requires approval, and whether its queue is idle or busy; a busy queue names the promotion holding it and how many wait behind. This collection is not paged: a project has few environments and the whole ordered list is the answer.",
26061
- http: "GET",
26062
- path: "/devops/v1/projects/{project}/environments",
26169
+ resource: "devops.projects",
26170
+ method: "update",
26171
+ summary: "Update a project",
26172
+ description: "Change a project's name, description, labels or delivery settings. Send the new values inside project and name the fields to write in updateMask (name, description, labels, settings); a field not named is left alone, and a mask naming a field this operation cannot change is refused. settings is merged into the current settings rather than replacing them, so a body naming one setting leaves the others as they were. settings.executor decides who publishes the project: absent or mise reads as the Mise pipeline, and devops means that, once the merge is done, the DevOps pipeline releases it. Changing executor changes which pipeline the next release uses, not what already ran. A new name must be kebab-case and unused in the organization, otherwise PROJECT_NAME_TAKEN. Read the project first to know what you are leaving unchanged.",
26173
+ http: "PATCH",
26174
+ path: "/devops/v1/projects/{id}",
26063
26175
  streaming: "no",
26064
26176
  pagination: false,
26065
26177
  pathParams: [
26066
26178
  {
26067
- name: "project",
26068
- sdkName: "project",
26069
- description: "Identifies the project whose data you are reading, from the project list or create answer."
26179
+ name: "id",
26180
+ sdkName: "id",
26181
+ description: "The project identifier returned by the project list, not the project's display name or its repository name."
26070
26182
  }
26071
26183
  ],
26072
- query: []
26184
+ query: [],
26185
+ body: {
26186
+ required: true,
26187
+ fields: [
26188
+ {
26189
+ name: "project",
26190
+ type: "object",
26191
+ required: true,
26192
+ description: "The new values. settings is merged into the current settings, so name only the settings to change."
26193
+ },
26194
+ {
26195
+ name: "updateMask",
26196
+ type: "array",
26197
+ itemType: "string",
26198
+ required: false,
26199
+ description: "Which project fields to write, by name: name, description, labels, settings. Omit it to write every field the project object carries."
26200
+ }
26201
+ ]
26202
+ }
26073
26203
  },
26074
26204
  {
26075
- resource: "devops.projects.environments.targets",
26076
- method: "deleteState",
26077
- summary: "Delete a target's OpenTofu state",
26078
- description: "Delete the current OpenTofu state of one deploy target, as OpenTofu does when a workspace is deleted. The kept versions of earlier writes stay. While a lock is held the call must carry its ID, otherwise it answers 409 LOCK_CONFLICT. Deleting a state that does not exist succeeds.",
26079
- http: "DELETE",
26080
- path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state",
26205
+ resource: "devops.projects.changes",
26206
+ method: "list",
26207
+ summary: "List changes",
26208
+ description: "List the project's changes, newest first, each with its derived stage and one cell per environment. Use it to see what is in flight before opening another change, or to find the id (the branch name) of a change you want to read. filter narrows the list: stage is derived from the facts, so it is applied after derivation, while type, owner and ended narrow on stored columns. Leaving a filter field out, or sending an empty array, does not narrow that field. ended=true lists changes that are done or abandoned, ended=false lists the rest. totalSize is answered on the first page only and counts what the filter leaves.",
26209
+ http: "GET",
26210
+ path: "/devops/v1/projects/{project}/changes",
26081
26211
  streaming: "no",
26082
26212
  pagination: false,
26083
26213
  pathParams: [
@@ -26085,62 +26215,36 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
26085
26215
  name: "project",
26086
26216
  sdkName: "project",
26087
26217
  description: "Identifies the project whose data you are reading, from the project list or create answer."
26088
- },
26089
- {
26090
- name: "environment",
26091
- sdkName: "environment",
26092
- description: "Identifies the DevOps environment (dve_…) whose deploy state you address, from the project's environment list."
26093
- },
26094
- {
26095
- name: "target",
26096
- sdkName: "target",
26097
- description: "The deploy target's repository path, URL-encoded as one segment: services/ontology is written services%2Fontology."
26098
26218
  }
26099
26219
  ],
26100
26220
  query: [
26101
26221
  {
26102
- name: "ID",
26103
- type: "string",
26222
+ name: "pageSize",
26223
+ type: "integer",
26104
26224
  required: false,
26105
- description: "The ID of the lock this call holds, exactly as OpenTofu received it from the lock call. Required while a lock is held; a missing or different ID answers 409 LOCK_CONFLICT."
26106
- }
26107
- ]
26108
- },
26109
- {
26110
- resource: "devops.projects.environments.targets",
26111
- method: "retrieveState",
26112
- summary: "Read a target's OpenTofu state",
26113
- description: "Read the current OpenTofu state of one deploy target in one DevOps environment. This is the read half of the OpenTofu HTTP backend that `praxis devops deploy --engine tofu` configures: OpenTofu sends HTTP Basic with any username and a Praxis API key as the password, and the route accepts the ordinary Bearer key too. The answer is the state document exactly as the last write stored it. A target never deployed in this environment answers 404, which OpenTofu reads as an empty state.",
26114
- http: "GET",
26115
- path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state",
26116
- streaming: "no",
26117
- pagination: false,
26118
- pathParams: [
26119
- {
26120
- name: "project",
26121
- sdkName: "project",
26122
- description: "Identifies the project whose data you are reading, from the project list or create answer."
26225
+ description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
26123
26226
  },
26124
26227
  {
26125
- name: "environment",
26126
- sdkName: "environment",
26127
- description: "Identifies the DevOps environment (dve_…) whose deploy state you address, from the project's environment list."
26228
+ name: "pageToken",
26229
+ type: "string",
26230
+ required: false,
26231
+ description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
26128
26232
  },
26129
26233
  {
26130
- name: "target",
26131
- sdkName: "target",
26132
- description: "The deploy target's repository path, URL-encoded as one segment: services/ontology is written services%2Fontology."
26234
+ name: "filter",
26235
+ type: "string",
26236
+ required: false,
26237
+ description: "JSON object with any of stage (array of stages), type (array of change types), owner (the requester's actor id) and ended (boolean). A stage or type that is not in the vocabulary is refused with INVALID_ARGUMENT rather than ignored."
26133
26238
  }
26134
- ],
26135
- query: []
26239
+ ]
26136
26240
  },
26137
26241
  {
26138
- resource: "devops.projects.environments.targets.state",
26242
+ resource: "devops.projects.changes",
26139
26243
  method: "create",
26140
- summary: "Write a target's OpenTofu state",
26141
- description: "Store a new OpenTofu state for one deploy target. OpenTofu calls this after every apply, passing the lock ID it holds as ID. Each accepted write also keeps an immutable version of that state (the latest 50 per target are kept), so a rollout's state change can be audited. A state document is at most 1 MiB. A write whose serial is lower than the stored serial of the same lineage is a stale write and answers 409 STALE_SERIAL; re-run so OpenTofu reads the newer state first.",
26244
+ summary: "Create a change",
26245
+ description: "Open a change: the unit that carries one piece of work from a branch to production. A change has no separate id — its id is its branch name, <type>/<slug> (for example feat/run-page-v2), and the branch is cut from main as part of this call. type says what the work is and slug names it; both together are the id, so the same pair sent again answers the change the first call made instead of creating a second. A change with a flag also creates a release flag whose key is the slug, off in every environment, so opening one changes no runtime behaviour; withFlag defaults to true for feat and false for every other type, and you may override it either way. Requesting a change opens it at once — there is no approval step — and the caller becomes its owner. A slug already used by another type in the project is refused with CHANGE_SLUG_TAKEN because both would need the same branch name. The stage in the answer is derived from facts such as pull requests and promotions; it is never something you set.",
26142
26246
  http: "POST",
26143
- path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state",
26247
+ path: "/devops/v1/projects/{project}/changes",
26144
26248
  streaming: "no",
26145
26249
  pagination: false,
26146
26250
  pathParams: [
@@ -26148,57 +26252,222 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
26148
26252
  name: "project",
26149
26253
  sdkName: "project",
26150
26254
  description: "Identifies the project whose data you are reading, from the project list or create answer."
26151
- },
26152
- {
26153
- name: "environment",
26154
- sdkName: "environment",
26155
- description: "Identifies the DevOps environment (dve_…) whose deploy state you address, from the project's environment list."
26156
- },
26157
- {
26158
- name: "target",
26159
- sdkName: "target",
26160
- description: "The deploy target's repository path, URL-encoded as one segment: services/ontology is written services%2Fontology."
26161
- }
26162
- ],
26163
- query: [
26164
- {
26165
- name: "ID",
26166
- type: "string",
26167
- required: false,
26168
- description: "The ID of the lock this call holds, exactly as OpenTofu received it from the lock call. Required while a lock is held; a missing or different ID answers 409 LOCK_CONFLICT."
26169
26255
  }
26170
26256
  ],
26257
+ query: [],
26171
26258
  body: {
26172
26259
  required: true,
26173
26260
  fields: [
26174
26261
  {
26175
- name: "version",
26176
- type: "integer",
26177
- required: false,
26178
- description: "The state format version OpenTofu wrote."
26262
+ name: "type",
26263
+ type: "string",
26264
+ enum: [
26265
+ "feat",
26266
+ "fix",
26267
+ "perf",
26268
+ "refactor",
26269
+ "docs",
26270
+ "test",
26271
+ "build",
26272
+ "ci",
26273
+ "chore",
26274
+ "revert"
26275
+ ],
26276
+ required: true,
26277
+ description: "What the work is, in commitlint vocabulary; together with slug it forms the change id <type>/<slug>."
26179
26278
  },
26180
26279
  {
26181
- name: "serial",
26182
- type: "integer",
26280
+ name: "slug",
26281
+ type: "string",
26183
26282
  required: true,
26184
- description: "Increases with every state change; a write lower than the stored serial of the same lineage is refused as stale."
26283
+ description: "Lower-case letters, digits and hyphens, 2 to 60 characters; it becomes the branch name after the type and the key of the change's flag."
26185
26284
  },
26186
26285
  {
26187
- name: "lineage",
26286
+ name: "title",
26188
26287
  type: "string",
26189
26288
  required: true,
26190
- description: "Identifies one state history; it does not change across writes."
26289
+ description: "One line saying what the change is for, shown wherever the change is listed and used as the flag's name."
26290
+ },
26291
+ {
26292
+ name: "tickets",
26293
+ type: "array",
26294
+ itemType: "string",
26295
+ required: false,
26296
+ description: "Ticket references the change belongs to, as a magic word or a #number; omit it when there is none."
26297
+ },
26298
+ {
26299
+ name: "withFlag",
26300
+ type: "boolean",
26301
+ required: false,
26302
+ description: "True to create a release flag keyed by the slug; omitted means true for feat and false for every other type."
26303
+ },
26304
+ {
26305
+ name: "urgent",
26306
+ type: "boolean",
26307
+ required: false,
26308
+ description: "True for an urgent fix that may take the patch path with a recorded authorization to skip develop; omitted means false."
26309
+ },
26310
+ {
26311
+ name: "observeUntil",
26312
+ type: "string",
26313
+ required: false,
26314
+ description: "RFC 3339 UTC deadline by which the flag's observation must be decided; only used when the change creates a flag."
26315
+ },
26316
+ {
26317
+ name: "requestId",
26318
+ type: "string",
26319
+ required: false,
26320
+ description: "Caller-chosen key that makes a retry answer the change the first call made instead of creating another."
26191
26321
  }
26192
26322
  ]
26193
26323
  }
26194
26324
  },
26195
26325
  {
26196
- resource: "devops.projects.environments.targets.state",
26197
- method: "deleteLock",
26198
- summary: "Unlock a target's OpenTofu state",
26199
- description: "Release the lock on one target's state; this is the DELETE that `praxis devops deploy` configures as OpenTofu's unlock_method (the default UNLOCK verb on the state path works too). The lock ID is read from the lock info body, or from the ID query value. Releasing a lock that is not held succeeds; releasing it under a different ID answers 409 LOCK_CONFLICT.",
26326
+ resource: "devops.projects.environments",
26327
+ method: "list",
26328
+ summary: "List environments",
26329
+ description: "List the project's environments in promotion order: development first, production last. order is the promotion sequence, so the environment before the one you are promoting into is the one that must have verified the release first. Each entry carries its tier, whether it requires approval, and whether its queue is idle or busy; a busy queue names the promotion holding it and how many wait behind. This collection is not paged: a project has few environments and the whole ordered list is the answer.",
26330
+ http: "GET",
26331
+ path: "/devops/v1/projects/{project}/environments",
26332
+ streaming: "no",
26333
+ pagination: false,
26334
+ pathParams: [
26335
+ {
26336
+ name: "project",
26337
+ sdkName: "project",
26338
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
26339
+ }
26340
+ ],
26341
+ query: []
26342
+ },
26343
+ {
26344
+ resource: "devops.projects.environments.targets",
26345
+ method: "deleteState",
26346
+ summary: "Delete a target's OpenTofu state",
26347
+ description: "Delete the current OpenTofu state of one deploy target, as OpenTofu does when a workspace is deleted. The kept versions of earlier writes stay. While a lock is held the call must carry its ID, otherwise it answers 409 LOCK_CONFLICT. Deleting a state that does not exist succeeds.",
26200
26348
  http: "DELETE",
26201
- path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state/lock",
26349
+ path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state",
26350
+ streaming: "no",
26351
+ pagination: false,
26352
+ pathParams: [
26353
+ {
26354
+ name: "project",
26355
+ sdkName: "project",
26356
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
26357
+ },
26358
+ {
26359
+ name: "environment",
26360
+ sdkName: "environment",
26361
+ description: "Identifies the DevOps environment (dve_…) whose deploy state you address, from the project's environment list."
26362
+ },
26363
+ {
26364
+ name: "target",
26365
+ sdkName: "target",
26366
+ description: "The deploy target's repository path, URL-encoded as one segment: services/ontology is written services%2Fontology."
26367
+ }
26368
+ ],
26369
+ query: [
26370
+ {
26371
+ name: "ID",
26372
+ type: "string",
26373
+ required: false,
26374
+ description: "The ID of the lock this call holds, exactly as OpenTofu received it from the lock call. Required while a lock is held; a missing or different ID answers 409 LOCK_CONFLICT."
26375
+ }
26376
+ ]
26377
+ },
26378
+ {
26379
+ resource: "devops.projects.environments.targets",
26380
+ method: "retrieveState",
26381
+ summary: "Read a target's OpenTofu state",
26382
+ description: "Read the current OpenTofu state of one deploy target in one DevOps environment. This is the read half of the OpenTofu HTTP backend that `praxis devops deploy --engine tofu` configures: OpenTofu sends HTTP Basic with any username and a Praxis API key as the password, and the route accepts the ordinary Bearer key too. The answer is the state document exactly as the last write stored it. A target never deployed in this environment answers 404, which OpenTofu reads as an empty state.",
26383
+ http: "GET",
26384
+ path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state",
26385
+ streaming: "no",
26386
+ pagination: false,
26387
+ pathParams: [
26388
+ {
26389
+ name: "project",
26390
+ sdkName: "project",
26391
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
26392
+ },
26393
+ {
26394
+ name: "environment",
26395
+ sdkName: "environment",
26396
+ description: "Identifies the DevOps environment (dve_…) whose deploy state you address, from the project's environment list."
26397
+ },
26398
+ {
26399
+ name: "target",
26400
+ sdkName: "target",
26401
+ description: "The deploy target's repository path, URL-encoded as one segment: services/ontology is written services%2Fontology."
26402
+ }
26403
+ ],
26404
+ query: []
26405
+ },
26406
+ {
26407
+ resource: "devops.projects.environments.targets.state",
26408
+ method: "create",
26409
+ summary: "Write a target's OpenTofu state",
26410
+ description: "Store a new OpenTofu state for one deploy target. OpenTofu calls this after every apply, passing the lock ID it holds as ID. Each accepted write also keeps an immutable version of that state (the latest 50 per target are kept), so a rollout's state change can be audited. A state document is at most 1 MiB. A write whose serial is lower than the stored serial of the same lineage is a stale write and answers 409 STALE_SERIAL; re-run so OpenTofu reads the newer state first.",
26411
+ http: "POST",
26412
+ path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state",
26413
+ streaming: "no",
26414
+ pagination: false,
26415
+ pathParams: [
26416
+ {
26417
+ name: "project",
26418
+ sdkName: "project",
26419
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
26420
+ },
26421
+ {
26422
+ name: "environment",
26423
+ sdkName: "environment",
26424
+ description: "Identifies the DevOps environment (dve_…) whose deploy state you address, from the project's environment list."
26425
+ },
26426
+ {
26427
+ name: "target",
26428
+ sdkName: "target",
26429
+ description: "The deploy target's repository path, URL-encoded as one segment: services/ontology is written services%2Fontology."
26430
+ }
26431
+ ],
26432
+ query: [
26433
+ {
26434
+ name: "ID",
26435
+ type: "string",
26436
+ required: false,
26437
+ description: "The ID of the lock this call holds, exactly as OpenTofu received it from the lock call. Required while a lock is held; a missing or different ID answers 409 LOCK_CONFLICT."
26438
+ }
26439
+ ],
26440
+ body: {
26441
+ required: true,
26442
+ fields: [
26443
+ {
26444
+ name: "version",
26445
+ type: "integer",
26446
+ required: false,
26447
+ description: "The state format version OpenTofu wrote."
26448
+ },
26449
+ {
26450
+ name: "serial",
26451
+ type: "integer",
26452
+ required: true,
26453
+ description: "Increases with every state change; a write lower than the stored serial of the same lineage is refused as stale."
26454
+ },
26455
+ {
26456
+ name: "lineage",
26457
+ type: "string",
26458
+ required: true,
26459
+ description: "Identifies one state history; it does not change across writes."
26460
+ }
26461
+ ]
26462
+ }
26463
+ },
26464
+ {
26465
+ resource: "devops.projects.environments.targets.state",
26466
+ method: "deleteLock",
26467
+ summary: "Unlock a target's OpenTofu state",
26468
+ description: "Release the lock on one target's state; this is the DELETE that `praxis devops deploy` configures as OpenTofu's unlock_method (the default UNLOCK verb on the state path works too). The lock ID is read from the lock info body, or from the ID query value. Releasing a lock that is not held succeeds; releasing it under a different ID answers 409 LOCK_CONFLICT.",
26469
+ http: "DELETE",
26470
+ path: "/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state/lock",
26202
26471
  streaming: "no",
26203
26472
  pagination: false,
26204
26473
  pathParams: [
@@ -27917,7 +28186,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
27917
28186
  resource: "file.uploads",
27918
28187
  method: "createSigned",
27919
28188
  summary: "Create a one-time upload URL",
27920
- description: "Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {\"filename\":\"photo.png\",\"bytes\":2048,\"content_type\":\"image/png\"}.",
28189
+ description: "Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {\"filename\":\"photo.png\",\"bytes\":2048,\"content_type\":\"image/png\"}.",
27921
28190
  http: "POST",
27922
28191
  path: "/file/v1/uploads/signed",
27923
28192
  streaming: "no",
@@ -29462,7 +29731,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
29462
29731
  resource: "media.assets",
29463
29732
  method: "edit",
29464
29733
  summary: "Edit asset",
29465
- description: "Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {\"operation\":{\"type\":\"variations\",\"strength\":\"subtle\"}}.",
29734
+ description: "Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {\"operation\":{\"type\":\"variations\",\"strength\":\"subtle\"}}.",
29466
29735
  http: "POST",
29467
29736
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
29468
29737
  streaming: "no",
@@ -29730,7 +29999,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
29730
29999
  resource: "media.speech",
29731
30000
  method: "create",
29732
30001
  summary: "Create speech",
29733
- description: "Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is billed by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage; a request refused before it starts costs nothing. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {\"input\":\"A red kite above a calm sea at sunrise.\"}, or with {\"input\":\"A red kite above a calm sea at sunrise.\",\"voice\":\"zh_female_wenroumama_uranus_bigtts\"} for a gentle female voice.",
30002
+ description: "Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals, the sum over every segment) and the recording carries it in provenance.cost; a request refused before it starts costs nothing. When the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {\"input\":\"A red kite above a calm sea at sunrise.\"}, or with {\"input\":\"A red kite above a calm sea at sunrise.\",\"voice\":\"zh_female_wenroumama_uranus_bigtts\"} for a gentle female voice.",
29734
30003
  http: "POST",
29735
30004
  path: "/media/v1/libraries/{library_id}/audio/speech",
29736
30005
  streaming: "no",
@@ -29962,7 +30231,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
29962
30231
  resource: "media.images",
29963
30232
  method: "generate",
29964
30233
  summary: "Generate image",
29965
- description: "Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage; nothing is charged for a request refused before it starts. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {\"prompt\":\"A red kite above a calm sea at sunrise\",\"n\":1,\"output\":\"sticker\"}.",
30234
+ description: "Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals, final once the job is completed or failed) and each produced asset carries its own part in provenance.cost; nothing is charged for a request refused before it starts. When the job is done, tell the person the usage amount and give them each output’s viewer_url, which opens the asset in the Console. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {\"prompt\":\"A red kite above a calm sea at sunrise\",\"n\":1,\"output\":\"sticker\"}.",
29966
30235
  http: "POST",
29967
30236
  path: "/media/v1/libraries/{library_id}/images/generations",
29968
30237
  streaming: "no",
@@ -29999,8 +30268,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
29999
30268
  {
30000
30269
  name: "size",
30001
30270
  type: "string",
30271
+ enum: [
30272
+ "1024x1024",
30273
+ "1024x1536",
30274
+ "1536x1024"
30275
+ ],
30002
30276
  required: false,
30003
- description: "Requested pixel size written as width x height. The chosen model is validated against it and an unsupported size is rejected with INVALID_PARAMS."
30277
+ description: "Requested pixel size written as width x height. The platform image models accept 1024x1024 (square, the default), 1024x1536 (portrait) and 1536x1024 (landscape); any other size is rejected with INVALID_PARAMS before anything is charged."
30004
30278
  },
30005
30279
  {
30006
30280
  name: "background",
@@ -30082,7 +30356,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
30082
30356
  resource: "media.libraries.jobs",
30083
30357
  method: "list",
30084
30358
  summary: "List jobs",
30085
- description: "List batch and generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal; every produced output is already a library asset.",
30359
+ description: "List batch and generation jobs in a library. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Poll a generation Job until terminal; every produced output is already a library asset.",
30086
30360
  http: "GET",
30087
30361
  path: "/media/v1/libraries/{library_id}/jobs",
30088
30362
  streaming: "no",
@@ -30111,6 +30385,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
30111
30385
  required: false,
30112
30386
  description: "Filter jobs by their current status."
30113
30387
  },
30388
+ {
30389
+ name: "pipeline_run_id",
30390
+ type: "string",
30391
+ required: false,
30392
+ description: "Return only the jobs started by this automation run (its root run), so one pipeline run reads as one batch."
30393
+ },
30114
30394
  {
30115
30395
  name: "limit",
30116
30396
  type: "integer",
@@ -30533,7 +30813,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
30533
30813
  resource: "media.videos",
30534
30814
  method: "generate",
30535
30815
  summary: "Generate video",
30536
- description: "Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage; a refused request costs nothing. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {\"prompt\":\"A red kite above a calm sea at sunrise\",\"mode\":\"text\",\"n\":1}.",
30816
+ description: "Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and each produced asset carries its own part in provenance.cost; a refused request costs nothing. When the job is done, tell the person the usage amount and give them each output’s viewer_url. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {\"prompt\":\"A red kite above a calm sea at sunrise\",\"mode\":\"text\",\"n\":1}.",
30537
30817
  http: "POST",
30538
30818
  path: "/media/v1/libraries/{library_id}/videos/generations",
30539
30819
  streaming: "no",
@@ -34832,6 +35112,96 @@ for more details.`
34832
35112
  ]
34833
35113
  }
34834
35114
  },
35115
+ {
35116
+ resource: "sandbox.sandboxes.tasks",
35117
+ method: "create",
35118
+ summary: "Start a task whose output is pushed off the machine while it runs",
35119
+ description: "Run a long command whose output you will read back afterwards, including after the sandbox is deleted, instead of holding one connection open. Use this for builds, test runs and batch jobs; use commands.run for a short command whose output you want inline. The machine's resident daemon pushes the task's stdout/stderr to Praxis storage as it is produced, so the log survives the sandbox (seven days) and can be read in ranges with sandboxes.tasks.log; no vendor exec channel is involved. The command and the shipping credential travel to the daemon in its process environment, never in argv, so neither appears in the machine's process list. Only a full sandbox whose daemon advertises log-ship can run a task; any other machine returns PROVIDER_UNSUPPORTED with the reason. Returns 201 with the task id; starting is not waiting — poll the log to follow the task, and the final marker's exitCode for how it ended.",
35120
+ http: "POST",
35121
+ path: "/sandbox/v1/sandboxes/{sandboxID}/tasks",
35122
+ streaming: "no",
35123
+ pagination: false,
35124
+ pathParams: [
35125
+ {
35126
+ name: "sandboxID",
35127
+ sdkName: "sandboxID",
35128
+ description: "Id of the sandbox, the `sandboxID` returned by the create call (or listed by listSandboxes). Another team's sandbox and an unknown id both answer 404."
35129
+ }
35130
+ ],
35131
+ query: [],
35132
+ body: {
35133
+ required: true,
35134
+ fields: [
35135
+ {
35136
+ name: "command",
35137
+ type: "string",
35138
+ required: true,
35139
+ description: "The shell command to run. It is handed to the sandbox's daemon in an environment variable, never in argv, so it stays out of the machine's process list; at most 64 KiB of UTF-8."
35140
+ },
35141
+ {
35142
+ name: "cwd",
35143
+ type: "string",
35144
+ required: false,
35145
+ description: "Absolute working directory inside the sandbox. Omit to run where the daemon starts; a relative path is rejected rather than resolved against a home directory you did not choose."
35146
+ },
35147
+ {
35148
+ name: "maxLifetimeSecs",
35149
+ type: "integer",
35150
+ required: false,
35151
+ description: "How long the task may run, in seconds; omit for 7200, the ceiling is 86400 (a day). The pushing credential lives 30 minutes past this, so the daemon can still deliver a task that ran to its limit."
35152
+ },
35153
+ {
35154
+ name: "files",
35155
+ type: "array",
35156
+ itemType: "object",
35157
+ required: false,
35158
+ description: "Up to eight extra files to ship alongside the task's own output, for example a structured events log the task appends to. Each gets its own stream, read with name on sandboxes.tasks.log."
35159
+ }
35160
+ ]
35161
+ }
35162
+ },
35163
+ {
35164
+ resource: "sandbox.sandboxes.tasks",
35165
+ method: "retrieveLog",
35166
+ summary: "Read a range of a task's pushed output",
35167
+ description: "Follow a task started with sandboxes.tasks.start, or read it long after its sandbox is gone. This reads Praxis storage and never the machine, so the answer is the same whether the sandbox is running, paused or deleted; the log is kept for seven days. Read in ranges: pass the previous answer's nextOffset as offset to continue, and stop when done is true. done means the final marker exists and the whole stream has been read, and only then do exitCode and size carry the task's outcome. text is UTF-8 decoded by bytes and backs up to a whole character when a cut would split one, so a page never ends mid-character; size, offset and nextOffset all count bytes. Ownership comes from the sandbox's index row while it exists and from the record written when the task started once it does not, so a sandbox id you own keeps answering after the sandbox is deleted. A task that was never started, or one belonging to another organization, returns NOT_FOUND.",
35168
+ http: "GET",
35169
+ path: "/sandbox/v1/sandboxes/{sandboxID}/tasks/{taskID}/log",
35170
+ streaming: "no",
35171
+ pagination: false,
35172
+ pathParams: [
35173
+ {
35174
+ name: "sandboxID",
35175
+ sdkName: "sandboxID",
35176
+ description: "Id of the sandbox, the `sandboxID` returned by the create call (or listed by listSandboxes). Another team's sandbox and an unknown id both answer 404."
35177
+ },
35178
+ {
35179
+ name: "taskID",
35180
+ sdkName: "taskID",
35181
+ description: "Task id returned by sandboxes.tasks.start; a task id is opaque and is not the sandbox id."
35182
+ }
35183
+ ],
35184
+ query: [
35185
+ {
35186
+ name: "name",
35187
+ type: "string",
35188
+ required: false,
35189
+ description: "Which stream to read: output is the task's own stdout and stderr and is the default; any other value must be one of the file names passed to sandboxes.tasks.start. 1 to 32 characters of a-z, 0-9 or a hyphen."
35190
+ },
35191
+ {
35192
+ name: "offset",
35193
+ type: "integer",
35194
+ required: false,
35195
+ description: "First byte of the range, counted from the start of the stream. Omit to start at 0; resume with the previous answer's nextOffset."
35196
+ },
35197
+ {
35198
+ name: "limit",
35199
+ type: "integer",
35200
+ required: false,
35201
+ description: "How many bytes to return, at most 4 MiB; omit for 1 MiB. A smaller limit follows a running task with less data per call."
35202
+ }
35203
+ ]
35204
+ },
34835
35205
  {
34836
35206
  resource: "sandbox.sandboxes",
34837
35207
  method: "timeout",
@@ -36518,7 +36888,7 @@ for more details.`
36518
36888
  name: "time",
36519
36889
  type: "string",
36520
36890
  required: false,
36521
- description: "When this entry happens in the story, such as 2037 or 民国二十四年冬; at most 40 characters, and an empty string records no time. It is shown beside the entry and reaches the writer with it."
36891
+ description: "When this entry happens in the story, such as 2037, 1931 年 4 月 or 第 3 天; at most 40 characters, and an empty string records no time. The 脉络 timeline orders entries by the first and last number in it, so a time without a digit (民国二十四年冬) sits in 未定时间. It is shown beside the entry and reaches the writer with it."
36522
36892
  },
36523
36893
  {
36524
36894
  name: "tracking",
@@ -36536,7 +36906,7 @@ for more details.`
36536
36906
  type: "array",
36537
36907
  itemType: "object",
36538
36908
  required: false,
36539
- description: "Entries this one relates to at creation, each naming the target and the label that reads from this entry to it."
36909
+ description: "Entries this one relates to at creation, each naming the target and the label that reads from this entry to it. Between two events the cause holds the relation to its effect (label such as 导致); 参与 marks a participant."
36540
36910
  },
36541
36911
  {
36542
36912
  name: "images",
@@ -37886,6 +38256,108 @@ for more details.`
37886
38256
  }
37887
38257
  ]
37888
38258
  },
38259
+ {
38260
+ resource: "studio.works.drafts.foreshadows",
38261
+ method: "list",
38262
+ summary: "List the foreshadows of a draft",
38263
+ description: "List the threads this draft sets up and pays off: each foreshadow names the unit that plants it, the unit that pays it off (or null while it is still open) and a note on what was planted. The foreshadow_paid check reports every open one in the draft's status and review, so a mystery or serial that plants a clue in chapter 2 is reminded until a later chapter answers it.",
38264
+ http: "GET",
38265
+ path: "/studio/v1/works/{work}/drafts/{draft}/foreshadows",
38266
+ streaming: "no",
38267
+ pagination: false,
38268
+ pathParams: [
38269
+ {
38270
+ name: "work",
38271
+ sdkName: "work",
38272
+ description: "The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value."
38273
+ },
38274
+ {
38275
+ name: "draft",
38276
+ sdkName: "draft",
38277
+ description: "Draft being addressed, either its in-work key such as novel or its drf_ identifier; a key renamed earlier still resolves through its previous value."
38278
+ }
38279
+ ],
38280
+ query: []
38281
+ },
38282
+ {
38283
+ resource: "studio.works.drafts.foreshadows",
38284
+ method: "delete",
38285
+ summary: "Drop a foreshadow",
38286
+ description: "Remove a thread that is no longer in the story. Deleting a key that does not exist answers the same as deleting one that did.",
38287
+ http: "DELETE",
38288
+ path: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
38289
+ streaming: "no",
38290
+ pagination: false,
38291
+ pathParams: [
38292
+ {
38293
+ name: "work",
38294
+ sdkName: "work",
38295
+ description: "The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value."
38296
+ },
38297
+ {
38298
+ name: "draft",
38299
+ sdkName: "draft",
38300
+ description: "Draft being addressed, either its in-work key such as novel or its drf_ identifier; a key renamed earlier still resolves through its previous value."
38301
+ },
38302
+ {
38303
+ name: "key",
38304
+ sdkName: "key",
38305
+ description: "Your name for the thread inside this work, such as 改造告示 or the-photo; the same key updates the same foreshadow."
38306
+ }
38307
+ ],
38308
+ query: []
38309
+ },
38310
+ {
38311
+ resource: "studio.works.drafts.foreshadows",
38312
+ method: "update",
38313
+ summary: "Plant or pay off a foreshadow",
38314
+ description: "Record a thread under a key of your choice: the unit that plants it and, once written, the unit that pays it off. Call it when you write the setup (payoff left out or null) and again with the same key when a later unit answers it. Both units must belong to this draft. An open foreshadow is reported by the foreshadow_paid check until it has a payoff, and a unit's context pack does not need to be asked for it.",
38315
+ http: "PUT",
38316
+ path: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
38317
+ streaming: "no",
38318
+ pagination: false,
38319
+ pathParams: [
38320
+ {
38321
+ name: "work",
38322
+ sdkName: "work",
38323
+ description: "The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value."
38324
+ },
38325
+ {
38326
+ name: "draft",
38327
+ sdkName: "draft",
38328
+ description: "Draft being addressed, either its in-work key such as novel or its drf_ identifier; a key renamed earlier still resolves through its previous value."
38329
+ },
38330
+ {
38331
+ name: "key",
38332
+ sdkName: "key",
38333
+ description: "Your name for the thread inside this work, such as 改造告示 or the-photo; the same key updates the same foreshadow."
38334
+ }
38335
+ ],
38336
+ query: [],
38337
+ body: {
38338
+ required: true,
38339
+ fields: [
38340
+ {
38341
+ name: "setup",
38342
+ type: "string",
38343
+ required: true,
38344
+ description: "Unit that plants the thread, by number such as 1 or by unt_ identifier; it must belong to this draft."
38345
+ },
38346
+ {
38347
+ name: "payoff",
38348
+ type: "string",
38349
+ required: false,
38350
+ description: "Unit that pays it off, by number or identifier, in this draft; leave it out or null while it is still open."
38351
+ },
38352
+ {
38353
+ name: "note",
38354
+ type: "string",
38355
+ required: false,
38356
+ description: "What was planted, in a sentence."
38357
+ }
38358
+ ]
38359
+ }
38360
+ },
37889
38361
  {
37890
38362
  resource: "studio.works.drafts",
37891
38363
  method: "retrieveOutline",
@@ -38220,6 +38692,95 @@ for more details.`
38220
38692
  ]
38221
38693
  }
38222
38694
  },
38695
+ {
38696
+ resource: "studio.works.progressions",
38697
+ method: "list",
38698
+ summary: "List the setting changes of a work",
38699
+ description: "List the recorded changes, all of them or those of one entry. Use it to check what a character has been through before writing the next unit, or to find a progression to delete.",
38700
+ http: "GET",
38701
+ path: "/studio/v1/works/{work}/progressions",
38702
+ streaming: "no",
38703
+ pagination: false,
38704
+ pathParams: [
38705
+ {
38706
+ name: "work",
38707
+ sdkName: "work",
38708
+ description: "The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value."
38709
+ }
38710
+ ],
38711
+ query: [
38712
+ {
38713
+ name: "entry",
38714
+ type: "string",
38715
+ required: false,
38716
+ description: "Only the changes of this entry, by name, alias or ent_ identifier."
38717
+ }
38718
+ ]
38719
+ },
38720
+ {
38721
+ resource: "studio.works.progressions",
38722
+ method: "create",
38723
+ summary: "Record how a setting entry changes at a unit",
38724
+ description: "Record that an entry changes as of one unit: a character is injured in chapter 6, a shop moves in chapter 9, a secret becomes known. The library keeps what an entry is from the start; a progression keeps what becomes true later. A unit's context pack shows an entry's changes up to and including that unit (截至本单元的设定变化) and withholds the later ones, so chapter 3 is not written with chapter 6's injury. Name the entry by its name, an alias or its ent_ identifier, and the unit by its number.",
38725
+ http: "POST",
38726
+ path: "/studio/v1/works/{work}/progressions",
38727
+ streaming: "no",
38728
+ pagination: false,
38729
+ pathParams: [
38730
+ {
38731
+ name: "work",
38732
+ sdkName: "work",
38733
+ description: "The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value."
38734
+ }
38735
+ ],
38736
+ query: [],
38737
+ body: {
38738
+ required: true,
38739
+ fields: [
38740
+ {
38741
+ name: "entry",
38742
+ type: "string",
38743
+ required: true,
38744
+ description: "Entry that changes, by name, alias or ent_ identifier; it must be in a library this work mounts."
38745
+ },
38746
+ {
38747
+ name: "unit",
38748
+ type: "string",
38749
+ required: true,
38750
+ description: "Unit from which the change is true, by number such as 3 or by unt_ identifier."
38751
+ },
38752
+ {
38753
+ name: "change",
38754
+ type: "string",
38755
+ required: true,
38756
+ description: "What changes, in a sentence a writer can respect."
38757
+ }
38758
+ ]
38759
+ }
38760
+ },
38761
+ {
38762
+ resource: "studio.works.progressions",
38763
+ method: "delete",
38764
+ summary: "Delete a setting change",
38765
+ description: "Remove one recorded change, by the prg_ identifier the list returns; to correct a change, delete it and record the new one.",
38766
+ http: "DELETE",
38767
+ path: "/studio/v1/works/{work}/progressions/{id}",
38768
+ streaming: "no",
38769
+ pagination: false,
38770
+ pathParams: [
38771
+ {
38772
+ name: "work",
38773
+ sdkName: "work",
38774
+ description: "The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value."
38775
+ },
38776
+ {
38777
+ name: "id",
38778
+ sdkName: "id",
38779
+ description: "The progression to delete, by its identifier from the list."
38780
+ }
38781
+ ],
38782
+ query: []
38783
+ },
38223
38784
  {
38224
38785
  resource: "studio.works.renditions",
38225
38786
  method: "list",
@@ -38973,7 +39534,7 @@ for more details.`
38973
39534
  name: "budget_tokens",
38974
39535
  type: "integer",
38975
39536
  required: false,
38976
- description: "Token budget the pack must fit into; the reference and previous sections are cut to fit it while the genre, brief and unit sections always arrive whole. Omit it to use the service default."
39537
+ description: "Token budget the pack must fit into; the reference, timeline and previous sections are cut to fit it while the genre, brief and unit sections always arrive whole. Omit it to use the service default."
38977
39538
  }
38978
39539
  ]
38979
39540
  },
@@ -44087,6 +44648,36 @@ var getObservedProcessOutput = (options) => (options.client ?? client).get({
44087
44648
  url: "/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output",
44088
44649
  ...options
44089
44650
  });
44651
+ var startSandboxTask = (options) => (options.client ?? client).post({
44652
+ security: [{
44653
+ key: "BearerAuth",
44654
+ scheme: "bearer",
44655
+ type: "http"
44656
+ }, {
44657
+ key: "ApiKeyAuth",
44658
+ name: "X-API-Key",
44659
+ type: "apiKey"
44660
+ }],
44661
+ url: "/sandbox/v1/sandboxes/{sandboxID}/tasks",
44662
+ ...options,
44663
+ headers: {
44664
+ "Content-Type": "application/json",
44665
+ ...options.headers
44666
+ }
44667
+ });
44668
+ var getSandboxTaskLog = (options) => (options.client ?? client).get({
44669
+ security: [{
44670
+ key: "BearerAuth",
44671
+ scheme: "bearer",
44672
+ type: "http"
44673
+ }, {
44674
+ key: "ApiKeyAuth",
44675
+ name: "X-API-Key",
44676
+ type: "apiKey"
44677
+ }],
44678
+ url: "/sandbox/v1/sandboxes/{sandboxID}/tasks/{taskID}/log",
44679
+ ...options
44680
+ });
44090
44681
  var deleteSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).delete({
44091
44682
  security: [
44092
44683
  {
@@ -47745,6 +48336,19 @@ var devopsProjectsGet = (options) => (options.client ?? client).get({
47745
48336
  url: "/devops/v1/projects/{id}",
47746
48337
  ...options
47747
48338
  });
48339
+ var devopsProjectsUpdate = (options) => (options.client ?? client).patch({
48340
+ security: [{
48341
+ key: "devops-bearerAuth",
48342
+ scheme: "bearer",
48343
+ type: "http"
48344
+ }],
48345
+ url: "/devops/v1/projects/{id}",
48346
+ ...options,
48347
+ headers: {
48348
+ "Content-Type": "application/json",
48349
+ ...options.headers
48350
+ }
48351
+ });
47748
48352
  var devopsReleasesList = (options) => (options.client ?? client).get({
47749
48353
  security: [{
47750
48354
  key: "devops-bearerAuth",
@@ -47895,6 +48499,19 @@ var devopsEnvironmentsList = (options) => (options.client ?? client).get({
47895
48499
  url: "/devops/v1/projects/{project}/environments",
47896
48500
  ...options
47897
48501
  });
48502
+ var devopsEnvironmentsUpdate = (options) => (options.client ?? client).patch({
48503
+ security: [{
48504
+ key: "devops-bearerAuth",
48505
+ scheme: "bearer",
48506
+ type: "http"
48507
+ }],
48508
+ url: "/devops/v1/environments/{id}",
48509
+ ...options,
48510
+ headers: {
48511
+ "Content-Type": "application/json",
48512
+ ...options.headers
48513
+ }
48514
+ });
47898
48515
  var devopsEnvironmentsCheckpointsList = (options) => (options.client ?? client).get({
47899
48516
  security: [{
47900
48517
  key: "devops-bearerAuth",
@@ -48119,6 +48736,63 @@ var devopsTofuStateLock = (options) => (options.client ?? client).post({
48119
48736
  ...options.headers
48120
48737
  }
48121
48738
  });
48739
+ var devopsChangesList = (options) => (options.client ?? client).get({
48740
+ security: [{
48741
+ key: "devops-bearerAuth",
48742
+ scheme: "bearer",
48743
+ type: "http"
48744
+ }],
48745
+ url: "/devops/v1/projects/{project}/changes",
48746
+ ...options
48747
+ });
48748
+ var devopsChangesCreate = (options) => (options.client ?? client).post({
48749
+ security: [{
48750
+ key: "devops-bearerAuth",
48751
+ scheme: "bearer",
48752
+ type: "http"
48753
+ }],
48754
+ url: "/devops/v1/projects/{project}/changes",
48755
+ ...options,
48756
+ headers: {
48757
+ "Content-Type": "application/json",
48758
+ ...options.headers
48759
+ }
48760
+ });
48761
+ var devopsChangesGet = (options) => (options.client ?? client).get({
48762
+ security: [{
48763
+ key: "devops-bearerAuth",
48764
+ scheme: "bearer",
48765
+ type: "http"
48766
+ }],
48767
+ url: "/devops/v1/changes/{id}",
48768
+ ...options
48769
+ });
48770
+ var devopsChangesAbandon = (options) => (options.client ?? client).post({
48771
+ security: [{
48772
+ key: "devops-bearerAuth",
48773
+ scheme: "bearer",
48774
+ type: "http"
48775
+ }],
48776
+ url: "/devops/v1/changes/{id}:abandon",
48777
+ ...options,
48778
+ headers: {
48779
+ "Content-Type": "application/json",
48780
+ ...options.headers
48781
+ }
48782
+ });
48783
+ var devopsChangesMarkLastSlice = (options) => (options.client ?? client).post({
48784
+ security: [{
48785
+ key: "devops-bearerAuth",
48786
+ scheme: "bearer",
48787
+ type: "http"
48788
+ }],
48789
+ url: "/devops/v1/changes/{id}:markLastSlice",
48790
+ ...options,
48791
+ headers: {
48792
+ "Content-Type": "application/json",
48793
+ ...options.headers
48794
+ }
48795
+ });
48122
48796
  var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
48123
48797
  security: [{
48124
48798
  key: "knowledge-bearerAuth",
@@ -50115,6 +50789,92 @@ var studioDraftsOutline = (options) => (options.client ?? client).get({
50115
50789
  url: "/studio/v1/works/{work}/drafts/{draft}/outline",
50116
50790
  ...options
50117
50791
  });
50792
+ var studioForeshadowsList = (options) => (options.client ?? client).get({
50793
+ security: [{
50794
+ key: "BearerAuth",
50795
+ scheme: "bearer",
50796
+ type: "http"
50797
+ }, {
50798
+ key: "ApiKeyAuth",
50799
+ name: "X-API-Key",
50800
+ type: "apiKey"
50801
+ }],
50802
+ url: "/studio/v1/works/{work}/drafts/{draft}/foreshadows",
50803
+ ...options
50804
+ });
50805
+ var studioForeshadowsDelete = (options) => (options.client ?? client).delete({
50806
+ security: [{
50807
+ key: "BearerAuth",
50808
+ scheme: "bearer",
50809
+ type: "http"
50810
+ }, {
50811
+ key: "ApiKeyAuth",
50812
+ name: "X-API-Key",
50813
+ type: "apiKey"
50814
+ }],
50815
+ url: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
50816
+ ...options
50817
+ });
50818
+ var studioForeshadowsUpsert = (options) => (options.client ?? client).put({
50819
+ security: [{
50820
+ key: "BearerAuth",
50821
+ scheme: "bearer",
50822
+ type: "http"
50823
+ }, {
50824
+ key: "ApiKeyAuth",
50825
+ name: "X-API-Key",
50826
+ type: "apiKey"
50827
+ }],
50828
+ url: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
50829
+ ...options,
50830
+ headers: {
50831
+ "Content-Type": "application/json",
50832
+ ...options.headers
50833
+ }
50834
+ });
50835
+ var studioProgressionsList = (options) => (options.client ?? client).get({
50836
+ security: [{
50837
+ key: "BearerAuth",
50838
+ scheme: "bearer",
50839
+ type: "http"
50840
+ }, {
50841
+ key: "ApiKeyAuth",
50842
+ name: "X-API-Key",
50843
+ type: "apiKey"
50844
+ }],
50845
+ url: "/studio/v1/works/{work}/progressions",
50846
+ ...options
50847
+ });
50848
+ var studioProgressionsCreate = (options) => (options.client ?? client).post({
50849
+ security: [{
50850
+ key: "BearerAuth",
50851
+ scheme: "bearer",
50852
+ type: "http"
50853
+ }, {
50854
+ key: "ApiKeyAuth",
50855
+ name: "X-API-Key",
50856
+ type: "apiKey"
50857
+ }],
50858
+ url: "/studio/v1/works/{work}/progressions",
50859
+ ...options,
50860
+ headers: {
50861
+ "Content-Type": "application/json",
50862
+ ...options.headers
50863
+ }
50864
+ });
50865
+ var studioProgressionsDelete = (options) => (options.client ?? client).delete({
50866
+ security: [{
50867
+ key: "BearerAuth",
50868
+ scheme: "bearer",
50869
+ type: "http"
50870
+ }, {
50871
+ key: "ApiKeyAuth",
50872
+ name: "X-API-Key",
50873
+ type: "apiKey"
50874
+ }],
50875
+ url: "/studio/v1/works/{work}/progressions/{id}",
50876
+ ...options
50877
+ });
50118
50878
  var studioDraftsStatus = (options) => (options.client ?? client).get({
50119
50879
  security: [{
50120
50880
  key: "BearerAuth",
@@ -52377,10 +53137,16 @@ function createDatabase(transport) {
52377
53137
  }
52378
53138
  function createDevops(transport) {
52379
53139
  return {
53140
+ changes: {
53141
+ abandon: bind(transport, devopsChangesAbandon),
53142
+ markLastSlice: bind(transport, devopsChangesMarkLastSlice),
53143
+ retrieve: bind(transport, devopsChangesGet)
53144
+ },
52380
53145
  environments: {
52381
53146
  checkpoints: {
52382
53147
  list: bind(transport, devopsEnvironmentsCheckpointsList)
52383
- }
53148
+ },
53149
+ update: bind(transport, devopsEnvironmentsUpdate)
52384
53150
  },
52385
53151
  flags: {
52386
53152
  archive: bind(transport, devopsFlagsArchive),
@@ -52399,6 +53165,10 @@ function createDevops(transport) {
52399
53165
  rollback: bind(transport, devopsProgressiveRolloutsRollback)
52400
53166
  },
52401
53167
  projects: {
53168
+ changes: {
53169
+ create: bind(transport, devopsChangesCreate),
53170
+ list: bind(transport, devopsChangesList)
53171
+ },
52402
53172
  environments: {
52403
53173
  list: bind(transport, devopsEnvironmentsList),
52404
53174
  targets: {
@@ -52447,7 +53217,8 @@ function createDevops(transport) {
52447
53217
  },
52448
53218
  testSuites: {
52449
53219
  list: bind(transport, devopsTestSuitesList)
52450
- }
53220
+ },
53221
+ update: bind(transport, devopsProjectsUpdate)
52451
53222
  },
52452
53223
  promotions: {
52453
53224
  approve: bind(transport, devopsPromotionsApprove),
@@ -52852,6 +53623,10 @@ function createSandbox(transport) {
52852
53623
  snapshots: {
52853
53624
  create: bind(transport, postSandboxV1SandboxesBySandboxIdSnapshots)
52854
53625
  },
53626
+ tasks: {
53627
+ create: bind(transport, startSandboxTask),
53628
+ retrieveLog: bind(transport, getSandboxTaskLog)
53629
+ },
52855
53630
  timeout: bind(transport, postSandboxV1SandboxesBySandboxIdTimeout),
52856
53631
  update: bind(transport, renameSandbox),
52857
53632
  updateNetwork: bind(transport, putSandboxV1SandboxesBySandboxIdNetwork),
@@ -52955,6 +53730,11 @@ function createStudio(transport) {
52955
53730
  create: bind(transport, studioWorksCreate),
52956
53731
  drafts: {
52957
53732
  create: bind(transport, studioDraftsCreate),
53733
+ foreshadows: {
53734
+ delete: bind(transport, studioForeshadowsDelete),
53735
+ list: bind(transport, studioForeshadowsList),
53736
+ update: bind(transport, studioForeshadowsUpsert)
53737
+ },
52958
53738
  list: bind(transport, studioDraftsList),
52959
53739
  rebase: bind(transport, studioDraftsRebase),
52960
53740
  renditions: {
@@ -52976,6 +53756,11 @@ function createStudio(transport) {
52976
53756
  updateBrief: bind(transport, studioDraftsUpdateBrief)
52977
53757
  },
52978
53758
  list: bind(transport, studioWorksList),
53759
+ progressions: {
53760
+ create: bind(transport, studioProgressionsCreate),
53761
+ delete: bind(transport, studioProgressionsDelete),
53762
+ list: bind(transport, studioProgressionsList)
53763
+ },
52979
53764
  renditions: {
52980
53765
  delete: bind(transport, studioRenditionsDelete),
52981
53766
  list: bind(transport, studioRenditionsList),
@@ -57214,6 +57999,7 @@ function nodeToolchainPorts(env, fetchImpl = fetch, home = homedir2()) {
57214
57999
  }
57215
58000
 
57216
58001
  // src/devops/tofu/pure.ts
58002
+ import { isAbsolute, relative } from "node:path";
57217
58003
  var ENVIRONMENT_ID = /^dve_[A-Za-z0-9]+$/;
57218
58004
  function parseEnvironmentId(value) {
57219
58005
  const id = value?.trim();
@@ -57256,21 +58042,48 @@ function parseTofuDeployArgs(flags) {
57256
58042
  ...flags.workdir ? { workdir: flags.workdir } : {}
57257
58043
  };
57258
58044
  }
57259
- function selectTargets(plan, environment2, requested, adapters) {
58045
+ function isExcludedPath(path, exclude) {
58046
+ return exclude.some((pattern) => matchesPattern(pattern, path));
58047
+ }
58048
+ function excludedTargets(plan, environment2, adapters, exclude) {
58049
+ if (exclude.length === 0)
58050
+ return [];
58051
+ return targetsFor(plan, environment2).filter((t) => adapters.has(t.destination) && deploysTo(t, environment2, { named: false }) && isExcludedPath(t.path, exclude)).map((t) => t.path).sort();
58052
+ }
58053
+ function excludedDependencies(targets, excluded) {
58054
+ const dropped = new Set(excluded);
58055
+ const found = [];
58056
+ for (const t of targets)
58057
+ for (const dependency of t.dependsOn) {
58058
+ if (dropped.has(dependency))
58059
+ found.push({ target: t.path, dependency });
58060
+ }
58061
+ return found;
58062
+ }
58063
+ function selectTargets(plan, environment2, requested, adapters, exclude = []) {
57260
58064
  const named = requested !== undefined;
57261
- let targets = targetsFor(plan, environment2).filter((t) => adapters.has(t.destination) && deploysTo(t, environment2, { named }));
58065
+ const dropped = excludedTargets(plan, environment2, adapters, exclude);
58066
+ let targets = targetsFor(plan, environment2).filter((t) => adapters.has(t.destination) && deploysTo(t, environment2, { named }) && !isExcludedPath(t.path, exclude));
57262
58067
  if (requested !== undefined) {
57263
58068
  const known = new Set(plan.targets.map((t) => t.path));
57264
58069
  const missing = requested.filter((r) => !known.has(r));
57265
58070
  if (missing.length > 0)
57266
58071
  throw new UsageError(`unknown target(s): ${missing.join(", ")}`, "Run `praxis devops deploy plan` to list the targets.");
58072
+ const excludedNamed = requested.filter((r) => isExcludedPath(r, exclude));
58073
+ if (excludedNamed.length > 0) {
58074
+ throw new UsageError(`${excludedNamed.join(", ")} is excluded by praxis.yaml`, "devops.deploy.exclude in praxis.yaml removes it from every run: it is not a delivery target. Name another target, or take its path out of that list.");
58075
+ }
57267
58076
  const refused = requested.filter((r) => !targets.some((t) => t.path === r));
57268
58077
  if (refused.length > 0)
57269
58078
  throw new UsageError(`${refused.join(", ")} does not deploy to ${environment2}, or praxis.yaml names no adapter for its destination`, "Check the target's environments, and devops.deploy.adapters in praxis.yaml.");
57270
58079
  targets = targets.filter((t) => requested.includes(t.path));
57271
58080
  }
58081
+ const orphaned = excludedDependencies(targets, dropped);
58082
+ if (orphaned.length > 0) {
58083
+ throw new UsageError(`excluded target(s) still depended on: ${orphaned.map((o) => `${o.target} depends on ${o.dependency}`).join("; ")}`, "devops.deploy.exclude in praxis.yaml must not cover a directory another target binds: remove that path from the exclude list, or keep the dependent out of this run.");
58084
+ }
57272
58085
  const selected = { commit: plan.commit, targets };
57273
- return { targets, layers: layersOf(selected).map((layer) => [...layer]) };
58086
+ return { targets, layers: layersOf(selected).map((layer) => [...layer]), excluded: dropped };
57274
58087
  }
57275
58088
  function blockedBy(targets, broken) {
57276
58089
  const blocked = new Set;
@@ -57305,6 +58118,7 @@ var DEPLOY_SHAPE = `devops:
57305
58118
  deploy:
57306
58119
  adapters:
57307
58120
  cloudflare: bun tofu/adapter.ts
58121
+ exclude: ["**/spec/features/*"] # optional
57308
58122
  policy:
57309
58123
  forbiddenNames: <path> # optional`;
57310
58124
  function parseDeployProject(file) {
@@ -57334,7 +58148,43 @@ ${DEPLOY_SHAPE}`);
57334
58148
  const forbiddenNames = object(policy) ? policy.forbiddenNames : undefined;
57335
58149
  if (forbiddenNames !== undefined && (typeof forbiddenNames !== "string" || forbiddenNames.trim() === ""))
57336
58150
  refuse("devops.deploy.policy.forbiddenNames must be a repository path");
57337
- return { adapters, ...typeof forbiddenNames === "string" ? { forbiddenNames: forbiddenNames.trim() } : {} };
58151
+ const declaredExclude = deploy.exclude;
58152
+ if (declaredExclude !== undefined && (!Array.isArray(declaredExclude) || declaredExclude.some((e) => typeof e !== "string" || e.trim() === ""))) {
58153
+ refuse("devops.deploy.exclude must be a list of non-empty workspace globs");
58154
+ }
58155
+ const declaredAllow = object(policy) ? policy.allowDeletes : undefined;
58156
+ if (declaredAllow !== undefined && (!Array.isArray(declaredAllow) || declaredAllow.some((e) => typeof e !== "string" || e.trim() === ""))) {
58157
+ refuse("devops.deploy.policy.allowDeletes must be a list of resource-address prefixes");
58158
+ }
58159
+ const allowDeletes = Array.isArray(declaredAllow) ? declaredAllow.map((e) => e.trim()) : [];
58160
+ const exclude = Array.isArray(declaredExclude) ? declaredExclude.map((e) => e.trim().replace(/^\.\//, "").replace(/\/+$/, "")) : [];
58161
+ return {
58162
+ adapters,
58163
+ ...typeof forbiddenNames === "string" ? { forbiddenNames: forbiddenNames.trim() } : {},
58164
+ ...exclude.length > 0 ? { exclude } : {},
58165
+ ...allowDeletes.length > 0 ? { allowDeletes } : {}
58166
+ };
58167
+ }
58168
+ function forbiddenDeletes(showJson, allow = []) {
58169
+ let doc;
58170
+ try {
58171
+ doc = JSON.parse(showJson);
58172
+ } catch {
58173
+ return { ok: false, reason: "tofu show -json did not answer a JSON plan" };
58174
+ }
58175
+ const changes = doc.resource_changes;
58176
+ if (changes === undefined)
58177
+ return { ok: true, deletes: [] };
58178
+ if (!Array.isArray(changes))
58179
+ return { ok: false, reason: "the plan document has no resource_changes list" };
58180
+ const deletes = [];
58181
+ for (const change of changes) {
58182
+ const actions = Array.isArray(change.change?.actions) ? change.change.actions : [];
58183
+ const address = typeof change.address === "string" ? change.address : "?";
58184
+ if (actions.includes("delete") && !allow.some((prefix) => address.startsWith(prefix)))
58185
+ deletes.push(address);
58186
+ }
58187
+ return { ok: true, deletes };
57338
58188
  }
57339
58189
  function adapterEnv(input) {
57340
58190
  return {
@@ -57382,6 +58232,66 @@ function forbiddenHits(names, entries) {
57382
58232
  }
57383
58233
  var targetDir = (workdir, target) => `${workdir}/${target}`;
57384
58234
  var planFileOf = (planDir, target) => `${planDir}/${target.replaceAll("/", "__")}.bin`;
58235
+ var renderArchiveOf = (planDir, target) => `${planDir}/${target.replaceAll("/", "__")}.render.tar.gz`;
58236
+ var RENDER_ASSETS_DIR = "__render_assets";
58237
+ var RENDER_EXCLUDES = [".terraform", ".terraform.lock.hcl", "*.tfstate*", "praxis_backend.tf.json"];
58238
+ function underReservedDir(rel) {
58239
+ const d = [",", "|", "#", "%"].find((c) => !rel.includes(c)) ?? ",";
58240
+ return `s${d}^${rel}${d}${RENDER_ASSETS_DIR}/${rel}${d}`;
58241
+ }
58242
+ function renderArchiveArgs(input) {
58243
+ const { archive, targetDir: dir, repoRoot, assetsRel } = input;
58244
+ return [
58245
+ "-czf",
58246
+ archive,
58247
+ "-C",
58248
+ dir,
58249
+ ...RENDER_EXCLUDES.map((name) => `--exclude=./${name}`),
58250
+ ".",
58251
+ ...assetsRel === null ? [] : ["-C", repoRoot, `--transform=${underReservedDir(assetsRel)}`, assetsRel]
58252
+ ];
58253
+ }
58254
+ var renderExtractWorkdirArgs = (archive) => ["-xzf", archive, `--exclude=${RENDER_ASSETS_DIR}`];
58255
+ function renderExtractAssetsArgs(archive) {
58256
+ return ["-xzf", archive, "--wildcards", `--transform=s,^${RENDER_ASSETS_DIR}/,,`, `${RENDER_ASSETS_DIR}/*`];
58257
+ }
58258
+ function renderArchiveAssetsRel(listing) {
58259
+ for (const line of listing) {
58260
+ const rel = line.trim().replace(/^\.\//, "");
58261
+ if (!rel.startsWith(`${RENDER_ASSETS_DIR}/`))
58262
+ continue;
58263
+ const rest = rel.slice(RENDER_ASSETS_DIR.length + 1).replace(/\/+$/, "");
58264
+ if (rest !== "")
58265
+ return rest;
58266
+ }
58267
+ return null;
58268
+ }
58269
+ function clientDirOf(text) {
58270
+ if (text === null)
58271
+ return null;
58272
+ try {
58273
+ const value = JSON.parse(text);
58274
+ return typeof value?.clientDir === "string" && value.clientDir !== "" ? value.clientDir : null;
58275
+ } catch {
58276
+ return null;
58277
+ }
58278
+ }
58279
+ function renderAssetsRel(repoRoot, clientDir) {
58280
+ if (clientDir === null)
58281
+ return null;
58282
+ const rel = relative(repoRoot, clientDir);
58283
+ return rel === "" || rel === ".." || rel.startsWith("../") || isAbsolute(rel) ? null : rel;
58284
+ }
58285
+ function withClientDir(text, clientDir) {
58286
+ let value;
58287
+ try {
58288
+ value = JSON.parse(text);
58289
+ } catch {
58290
+ return null;
58291
+ }
58292
+ return `${JSON.stringify({ ...value, clientDir }, null, 2)}
58293
+ `;
58294
+ }
57385
58295
  var STATE_USERNAME = "praxis";
57386
58296
  var STATE_PASSWORD_ENV = "TF_HTTP_PASSWORD";
57387
58297
  function stateAddress(backend, target) {
@@ -57406,21 +58316,56 @@ function backendDocument(backend, target) {
57406
58316
  }
57407
58317
 
57408
58318
  // src/devops/tofu/run.ts
57409
- import { dirname as dirname4, isAbsolute, resolve as resolve3 } from "node:path";
58319
+ import { dirname as dirname4, isAbsolute as isAbsolute2, resolve as resolve3 } from "node:path";
58320
+ function plannedTargetsOf(summaryText) {
58321
+ if (summaryText === null)
58322
+ return;
58323
+ try {
58324
+ const summary = JSON.parse(summaryText);
58325
+ if (!Array.isArray(summary.targets))
58326
+ return;
58327
+ return summary.targets.filter((t) => t.status === "planned" && typeof t.target === "string").map((t) => t.target);
58328
+ } catch {
58329
+ return;
58330
+ }
58331
+ }
58332
+ function planReadyLine(summary) {
58333
+ const planned = new Set(summary.targets.filter((t) => t.status === "planned").map((t) => t.target));
58334
+ const layers = summary.layers.map((layer) => layer.filter((path) => planned.has(path))).filter((layer) => layer.length > 0);
58335
+ const migrations = summary.targets.flatMap((t) => {
58336
+ const files = t.status === "planned" ? t.pending.filter((line) => line.startsWith("d1 migrations ")) : [];
58337
+ return files.length === 0 ? [] : [{ targetPath: t.target, files }];
58338
+ });
58339
+ return { type: "plan.ready", layers, migrations };
58340
+ }
58341
+ function failureDigest(summary) {
58342
+ const count2 = (status) => summary.targets.filter((t) => t.status === status).length;
58343
+ const lines = [`RESULT ${summary.finished} planned=${count2("planned")} succeeded=${count2("succeeded")} failed=${count2("failed")} blocked=${count2("blocked")}`];
58344
+ for (const t of summary.targets) {
58345
+ if (t.status === "failed" || t.status === "blocked" && t.message !== "a target it depends on did not finish")
58346
+ lines.push(`FAILED ${t.target}: ${t.message ?? t.status}`);
58347
+ }
58348
+ return lines;
58349
+ }
57410
58350
  var BACKEND_FILE = "praxis_backend.tf.json";
58351
+ var NATIVE_PLAN = `praxis-native-target: deployed by wrangler after approval; no OpenTofu plan
58352
+ `;
57411
58353
  async function runTofuDeploy(args, plan, ports) {
57412
58354
  const { fs, exec, out } = ports;
57413
58355
  const startedAt = ports.clock.iso();
57414
58356
  const root = resolve3(ports.repoRoot);
57415
- const absolute = (p) => isAbsolute(p) ? p : resolve3(p);
58357
+ const absolute = (p) => isAbsolute2(p) ? p : resolve3(p);
57416
58358
  const workdir = absolute(args.workdir ?? `${root}/.tofu-work`);
57417
58359
  const planDir = absolute(args.planDir ?? `${workdir}/plans`);
57418
58360
  const applying = args.mode !== "plan-only";
57419
58361
  const events = applying && args.eventsFile !== undefined ? ports.openEvents(args.eventsFile, startedAt) : undefined;
57420
58362
  const reports = new Map;
57421
- const selection = selectTargets(plan, args.environment, args.targets, new Set(Object.keys(ports.project.adapters)));
58363
+ const targets = args.targets ?? (args.mode === "apply-plans" ? plannedTargetsOf(await fs.read(`${planDir}/summary.json`)) : undefined);
58364
+ const selection = selectTargets(plan, args.environment, targets, new Set(Object.keys(ports.project.adapters)), ports.project.exclude ?? []);
57422
58365
  const byPath = new Map(selection.targets.map((t) => [t.path, t]));
57423
58366
  const redact = (line) => ports.state.password === "" ? line : line.split(ports.state.password).join("***");
58367
+ for (const path of selection.excluded)
58368
+ out(`excluded by praxis.yaml: ${path}`);
57424
58369
  const finish = (finished2, message2) => {
57425
58370
  if (events)
57426
58371
  events.finish(message2 === undefined ? {} : { message: message2 });
@@ -57436,6 +58381,9 @@ async function runTofuDeploy(args, plan, ports) {
57436
58381
  };
57437
58382
  const writeSummary = async (summary) => {
57438
58383
  await fs.write(`${planDir}/summary.json`, `${JSON.stringify(summary, null, 2)}
58384
+ `);
58385
+ if (args.mode === "plan-only")
58386
+ await fs.write(`${planDir}/plan-ready.json`, `${JSON.stringify(planReadyLine(summary))}
57439
58387
  `);
57440
58388
  out(`SUMMARY ${JSON.stringify(summary)}`);
57441
58389
  };
@@ -57471,7 +58419,55 @@ async function runTofuDeploy(args, plan, ports) {
57471
58419
  if (code !== 0)
57472
58420
  throw new StepFailed(kind === "engine" ? `rollout step ${cmdArgs[0]} exited ${code}` : `adapter ${cmdArgs[0]} exited ${code}`);
57473
58421
  };
58422
+ const deletesOf = async (t, planFile, cwd, env) => {
58423
+ const resolved = await ports.toolchain.ensure();
58424
+ const lines = [];
58425
+ const code = await exec.run(resolved.binary, ["show", "-json", "-no-color", planFile], { cwd, env: { ...resolved.env, ...env }, onLine: (line) => {
58426
+ lines.push(line);
58427
+ } });
58428
+ if (code !== 0)
58429
+ throw new StepFailed(`rollout step show exited ${code}`);
58430
+ const verdict = forbiddenDeletes(lines.join(`
58431
+ `), ports.project.allowDeletes ?? []);
58432
+ if (!verdict.ok)
58433
+ throw new StepFailed(verdict.reason);
58434
+ if (verdict.deletes.length > 0) {
58435
+ throw new StepFailed(`the plan deletes or replaces ${verdict.deletes.join(", ")}; refused (praxis.yaml devops.deploy.policy.allowDeletes allows none of them)`);
58436
+ }
58437
+ };
57474
58438
  const adapter = (t, phase) => step(t, "adapter", [phase], root, adapterEnv({ target: t.path, environment: args.environment, mode: args.mode, commit: args.commit, dir: targetDir(workdir, t.path) }));
58439
+ const tarStep = async (t, cmdArgs, cwd, lines) => {
58440
+ const say = (line) => {
58441
+ out(`[${t.path}] ${redact(line)}`);
58442
+ lines?.push(line);
58443
+ };
58444
+ const code = await exec.run("tar", cmdArgs, { cwd, onLine: say });
58445
+ if (code !== 0)
58446
+ throw new StepFailed(`render archive tar ${cmdArgs[0]} exited ${code}`);
58447
+ };
58448
+ const packRender = async (t, dir) => {
58449
+ const archive = renderArchiveOf(planDir, t.path);
58450
+ const assetsRel = renderAssetsRel(root, clientDirOf(await fs.read(`${dir}/frontend.json`)));
58451
+ await tarStep(t, renderArchiveArgs({ archive, targetDir: dir, repoRoot: root, assetsRel }), root);
58452
+ out(`[${t.path}] render archive ${archive}${assetsRel === null ? "" : ` (+ ${assetsRel})`}`);
58453
+ };
58454
+ const unpackRender = async (t, dir) => {
58455
+ const archive = renderArchiveOf(planDir, t.path);
58456
+ await fs.mkdirp(dir);
58457
+ await tarStep(t, renderExtractWorkdirArgs(archive), dir);
58458
+ const listing = [];
58459
+ await tarStep(t, ["-tzf", archive], root, listing);
58460
+ const assetsRel = renderArchiveAssetsRel(listing);
58461
+ if (assetsRel === null)
58462
+ return;
58463
+ await tarStep(t, renderExtractAssetsArgs(archive), root);
58464
+ const frontend = await fs.read(`${dir}/frontend.json`);
58465
+ const rewritten = frontend === null ? null : withClientDir(frontend, `${root}/${assetsRel}`);
58466
+ if (rewritten === null)
58467
+ throw new StepFailed(`render archive ${archive} carries ${assetsRel} but ${dir}/frontend.json is missing or not JSON`);
58468
+ await fs.write(`${dir}/frontend.json`, rewritten);
58469
+ out(`[${t.path}] static assets restored to ${root}/${assetsRel}`);
58470
+ };
57475
58471
  const broken = new Set;
57476
58472
  const manifests = new Map;
57477
58473
  const fail = (t, message2, began, extra = {}) => {
@@ -57490,15 +58486,26 @@ async function runTofuDeploy(args, plan, ports) {
57490
58486
  return await refuseAll(`policy.forbiddenNames ${ports.project.forbiddenNames} is missing; the policy check cannot run`);
57491
58487
  forbidden = parseNameList(text);
57492
58488
  }
58489
+ const rendered = new Set;
57493
58490
  await pool(selection.targets, LAYER_CONCURRENCY, async (t) => {
57494
58491
  const began = ports.clock.now();
57495
58492
  const dir = targetDir(workdir, t.path);
57496
58493
  try {
57497
- if (args.mode === "apply-plans" && !await fs.exists(planFileOf(planDir, t.path))) {
57498
- throw new StepFailed(`plan file ${planFileOf(planDir, t.path)} is missing; refusing to apply without it`);
58494
+ const planFile = planFileOf(planDir, t.path);
58495
+ if (args.mode === "apply-plans" && !await fs.exists(planFile)) {
58496
+ throw new StepFailed(`plan file ${planFile} is missing; refusing to apply without it`);
58497
+ }
58498
+ const nativeApply = args.mode === "apply-plans" && await fs.read(planFile) === NATIVE_PLAN;
58499
+ const archive = renderArchiveOf(planDir, t.path);
58500
+ if (args.mode === "apply-plans" && !nativeApply && await fs.exists(archive)) {
58501
+ await unpackRender(t, dir);
58502
+ rendered.add(t.path);
58503
+ } else {
58504
+ if (args.mode === "apply-plans" && !nativeApply)
58505
+ out(`[${t.path}] no render archive in the plan; rebuilding`);
58506
+ await fs.mkdirp(dir);
58507
+ await adapter(t, "generate");
57499
58508
  }
57500
- await fs.mkdirp(dir);
57501
- await adapter(t, "generate");
57502
58509
  const manifest = parseTargetManifest(await fs.read(`${dir}/target.json`));
57503
58510
  if (typeof manifest === "string")
57504
58511
  throw new StepFailed(`adapter generate: ${manifest}`);
@@ -57539,6 +58546,23 @@ async function runTofuDeploy(args, plan, ports) {
57539
58546
  out(`[${target}] pending until an approved apply: ${p}`);
57540
58547
  const engineEnv = { [STATE_PASSWORD_ENV]: ports.state.password };
57541
58548
  try {
58549
+ if (await fs.exists(`${dir}/native.json`)) {
58550
+ if (args.mode !== "apply-plans") {
58551
+ await adapter(t, "before-plan");
58552
+ await fs.mkdirp(dirname4(planFile));
58553
+ await fs.write(planFile, NATIVE_PLAN);
58554
+ out(`[${target}] native: no OpenTofu plan; wrangler deploys it after approval`);
58555
+ }
58556
+ if (applying) {
58557
+ if (await fs.read(planFile) !== NATIVE_PLAN)
58558
+ throw new StepFailed(`plan file ${planFile} is not the native marker this target's plan wrote`);
58559
+ await adapter(t, "before-apply");
58560
+ }
58561
+ reports.set(target, { target, status: applying ? "succeeded" : "planned", planFile, pending: manifest.pending, warnings: manifest.warnings, ...rendered.has(target) ? { rendered: true } : {} });
58562
+ if (events)
58563
+ events.end(target, "deploy", { kind: "succeeded", durationMs: ports.clock.now() - began });
58564
+ return;
58565
+ }
57542
58566
  if (args.mode !== "apply-plans")
57543
58567
  await adapter(t, "before-plan");
57544
58568
  await step(t, "engine", ["init", "-input=false"], dir, engineEnv);
@@ -57546,12 +58570,15 @@ async function runTofuDeploy(args, plan, ports) {
57546
58570
  await fs.mkdirp(dirname4(planFile));
57547
58571
  await step(t, "engine", ["plan", "-input=false", "-no-color", `-out=${planFile}`], dir, engineEnv);
57548
58572
  }
58573
+ await deletesOf(t, planFile, dir, engineEnv);
58574
+ if (args.mode === "plan-only")
58575
+ await packRender(t, dir);
57549
58576
  if (applying) {
57550
58577
  await adapter(t, "before-apply");
57551
58578
  await step(t, "engine", ["apply", "-input=false", "-no-color", planFile], dir, engineEnv);
57552
58579
  await adapter(t, "after-apply");
57553
58580
  }
57554
- reports.set(target, { target, status: applying ? "succeeded" : "planned", planFile, pending: manifest.pending, warnings: manifest.warnings });
58581
+ reports.set(target, { target, status: applying ? "succeeded" : "planned", planFile, pending: manifest.pending, warnings: manifest.warnings, ...rendered.has(target) ? { rendered: true } : {} });
57555
58582
  if (events)
57556
58583
  events.end(target, "deploy", { kind: "succeeded", durationMs: ports.clock.now() - began });
57557
58584
  } catch (error) {
@@ -57920,6 +58947,8 @@ async function devopsDeployTofu(flags, ports) {
57920
58947
  out: ports.stdout
57921
58948
  });
57922
58949
  ports.emit({ kind: "object", data: result.summary });
58950
+ for (const line of failureDigest(result.summary))
58951
+ ports.stdout(line);
57923
58952
  return result.exitCode;
57924
58953
  }
57925
58954
 
@@ -58656,7 +59685,7 @@ function pathLineBounds(geometry) {
58656
59685
  }
58657
59686
  if (command === null)
58658
59687
  return null;
58659
- const relative = command === command.toLowerCase();
59688
+ const relative2 = command === command.toLowerCase();
58660
59689
  const upper = command.toUpperCase();
58661
59690
  if (upper === "H" || upper === "V") {
58662
59691
  const value = tokens[i];
@@ -58664,9 +59693,9 @@ function pathLineBounds(geometry) {
58664
59693
  return null;
58665
59694
  i++;
58666
59695
  if (upper === "H")
58667
- x = relative ? x + value : value;
59696
+ x = relative2 ? x + value : value;
58668
59697
  else
58669
- y = relative ? y + value : value;
59698
+ y = relative2 ? y + value : value;
58670
59699
  add(x, y);
58671
59700
  continue;
58672
59701
  }
@@ -58674,8 +59703,8 @@ function pathLineBounds(geometry) {
58674
59703
  if (typeof nx !== "number" || typeof ny !== "number")
58675
59704
  return null;
58676
59705
  i += 2;
58677
- x = relative ? x + nx : nx;
58678
- y = relative ? y + ny : ny;
59706
+ x = relative2 ? x + nx : nx;
59707
+ y = relative2 ? y + ny : ny;
58679
59708
  if (upper === "M") {
58680
59709
  startX = x;
58681
59710
  startY = y;
@@ -60585,7 +61614,7 @@ function timestamp(key, value) {
60585
61614
  const time = typeof value === "number" ? Math.abs(value) < 100000000000 ? value * 1000 : value : typeof value === "string" && /^\d{4}-\d\d-\d\d[T ]/.test(value) ? Date.parse(value) : NaN;
60586
61615
  return Number.isFinite(time) ? new Date(time).toISOString() : undefined;
60587
61616
  }
60588
- function relative(iso, now) {
61617
+ function relative2(iso, now) {
60589
61618
  const delta = now - Date.parse(iso), seconds = Math.floor(Math.abs(delta) / 1000);
60590
61619
  if (Math.abs(delta) < 60000)
60591
61620
  return "just now";
@@ -60724,7 +61753,7 @@ function table(items, ctx, paint) {
60724
61753
  const now = ctx.now ?? Date.now();
60725
61754
  let rows = items.map((item) => columns.map((key) => {
60726
61755
  const v = record(item)[key], iso = timestamp(key, v);
60727
- return plain(iso ? relative(iso, now) : scalar(v));
61756
+ return plain(iso ? relative2(iso, now) : scalar(v));
60728
61757
  }));
60729
61758
  let headers = columns.map((key) => key.toUpperCase());
60730
61759
  let sizes = columns.map((_, i) => Math.max(width(headers[i]), ...rows.map((row) => width(row[i]))));
@@ -60764,7 +61793,7 @@ function objectView(data, resource, id, ctx, paint) {
60764
61793
  function value(key, v, depth) {
60765
61794
  const iso = timestamp(key, v);
60766
61795
  if (iso)
60767
- return `${iso} (${relative(iso, now)})`;
61796
+ return `${iso} (${relative2(iso, now)})`;
60768
61797
  if (Array.isArray(v)) {
60769
61798
  if (v.every((x) => x === null || typeof x !== "object"))
60770
61799
  return v.map(scalar).map(plain).join(", ");
@@ -61144,7 +62173,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
61144
62173
  }
61145
62174
 
61146
62175
  // src/main.ts
61147
- var version = "0.3.0-dev.1133f97";
62176
+ var version = "0.3.0-dev.12045a7";
61148
62177
  var commands = commandTree(operations);
61149
62178
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
61150
62179
  function route(argv) {