@deepraxis/cli 0.3.0-dev.5ff83b8 → 0.3.0-dev.6c28f93

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 +19 -4
  2. package/dist/praxis.js +1262 -216
  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",
@@ -28864,7 +29133,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
28864
29133
  resource: "media.generation.capabilities",
28865
29134
  method: "list",
28866
29135
  summary: "Get generation capabilities",
28867
- description: 'Read what Praxis offers for each kind of generation — image, video and speech — before asking for one, and read a speech model’s voices here before naming one. Every type answers the models available for it, the model it uses when a request names none, and what each model costs per unit; a speech model the platform publishes voices for also carries default_voice and voices there, each voice with an id, a name, a gender, a language and a style — so a request for "a gentle female voice" is answered by matching the style and gender rather than by guessing an identifier. Pass a voice id back verbatim as voice, or omit voice to take default_voice; a voice that is neither one of those nor a voice material of the library is refused with INVALID_PARAMS before any job is created. OpenAI voice names such as alloy and aura are not valid here. The video fields beside the types keep their original meaning (intents, default model, duration and aspect-ratio limits, per-library concurrency). The models come from the platform model catalogue, and an id listed here is accepted verbatim as the model field of that type’s generation request. price.amount is a decimal string with its currency; video models that charge by resolution also carry price.by_resolution, whose amount is then the cheapest tier. A model the catalogue cannot route right now is still listed, with available false, so a caller can show it as temporarily unavailable instead of hiding it. When the catalogue cannot be read the endpoint still answers: every type comes back with an empty models list and its real default_model, and the voices a speech model carries are absent rather than empty, because the voices come from the platform and not from the catalogue. Generation is charged per unit and every output is stored in the library.',
29136
+ description: 'Read what Praxis offers for each kind of generation — image, video and speech — before asking for one, and read a speech model’s voices here before naming one. Every type answers the models available for it, the model it uses when a request names none, and what each model costs per unit; a speech model the platform publishes voices for also carries default_voice and voices there, each voice with an id, a name, a gender, a language and a style — so a request for "a gentle female voice" is answered by matching the style and gender rather than by guessing an identifier. Pass a voice id back verbatim as voice, or omit voice to take default_voice; a voice that is neither one of those nor a voice material of the library is refused with INVALID_PARAMS before any job is created. OpenAI voice names such as alloy and aura are not valid here. The video fields beside the types keep their original meaning (intents, default model, duration and aspect-ratio limits, per-library concurrency). The models come from the platform model catalogue, and an id listed here is accepted verbatim as the model field of that type’s generation request. A video model additionally carries the modes it can be driven in and the durations, aspect ratios and resolutions the catalogue has registered for it — modes, duration_seconds, aspect_ratios and resolutions — so read them before requesting video and choose a mode and a value this model lists; an empty list means the platform has not registered that option yet, and then omit the field rather than assume a value. price.amount is a decimal string with its currency; video models that charge by resolution also carry price.by_resolution, whose amount is then the cheapest tier. A model the catalogue cannot route right now is still listed, with available false, so a caller can show it as temporarily unavailable instead of hiding it. When the catalogue cannot be read the endpoint still answers: every type comes back with an empty models list and its real default_model, and the voices a speech model carries are absent rather than empty, because the voices come from the platform and not from the catalogue. Generation is charged per unit and every output is stored in the library.',
28868
29137
  http: "GET",
28869
29138
  path: "/media/v1/generation/capabilities",
28870
29139
  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/generations/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",
@@ -29756,7 +30025,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
29756
30025
  name: "voice",
29757
30026
  type: "string",
29758
30027
  required: false,
29759
- description: "Voice to synthesize with. Omit it to use the model’s default voice. The available values are the ids in the types.speech list of GET /media/v1/generations/capabilities, beside the voices of the model you are using, plus a voice material id of this same library. A voice that is neither is refused with INVALID_PARAMS before any job is created, so a wrong name costs nothing — read the capabilities first instead of guessing. Example ids for the platform speech model: zh_female_vv_uranus_bigtts (the default), zh_female_wenroumama_uranus_bigtts (a gentle female voice), zh_male_m191_uranus_bigtts. OpenAI voice names such as alloy are not valid here."
30028
+ description: "Voice to synthesize with. Omit it to use the model’s default voice. The available values are the ids in the types.speech list of GET /media/v1/generation/capabilities, beside the voices of the model you are using, plus a voice material id of this same library. A voice that is neither is refused with INVALID_PARAMS before any job is created, so a wrong name costs nothing — read the capabilities first instead of guessing. Example ids for the platform speech model: zh_female_vv_uranus_bigtts (the default), zh_female_wenroumama_uranus_bigtts (a gentle female voice), zh_male_m191_uranus_bigtts. OpenAI voice names such as alloy are not valid here."
29760
30029
  },
29761
30030
  {
29762
30031
  name: "instructions",
@@ -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",
@@ -30152,7 +30432,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
30152
30432
  resource: "media.libraries.jobs",
30153
30433
  method: "cancel",
30154
30434
  summary: "Cancel job",
30155
- description: "Cancel a queued or running generation job. Outputs already produced remain in the library; poll or read the returned Job to confirm its status.",
30435
+ description: "Cancel a queued or running generation job. Outputs already produced remain in the library; poll or read the returned Job to confirm its status. A video cannot be cancelled once the provider has started generating it: the call answers 409 JOB_INVALID_STATE (details VIDEO_ALREADY_RUNNING), and the task still finishes, is saved to the library and is charged.",
30156
30436
  http: "POST",
30157
30437
  path: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
30158
30438
  streaming: "no",
@@ -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",
@@ -37365,7 +37735,7 @@ for more details.`
37365
37735
  resource: "studio.works",
37366
37736
  method: "create",
37367
37737
  summary: "Create a work with its goal",
37368
- description: "Create a work: one deliverable piece plus everything around it. Pass the goal the writing serves — the reader, what that reader should get or do, the one-sentence message and the constraints — and the original brief the person gave in their own words. A slug is derived from the title unless you pass one. The work starts with no drafts; create the first one with the drafts create call, because the genre decides the structure. A reference library belongs to the work and is created with it, so the setting written later stays this work's own; pass based_on to start from another work and have its setting and styles copied in as your own.",
37738
+ description: "Create a work: one deliverable piece plus everything around it. Pass the goal the writing serves: the reader, what that reader should get or do, and the one-sentence message. The work holds the goal only; the requirement for one piece (the person's text, its points, a length, banned wording) belongs to that draft and is given with the drafts create call, so a novel's plot points and length never bind the promotion derived from it. A slug is derived from the title unless you pass one. The work starts with no drafts; create the first one with the drafts create call, because the genre decides the structure. A reference library belongs to the work and is created with it, so the setting written later stays this work's own; pass based_on to start from another work and have its setting and styles copied in as your own.",
37369
37739
  http: "POST",
37370
37740
  path: "/studio/v1/works",
37371
37741
  streaming: "no",
@@ -37391,13 +37761,7 @@ for more details.`
37391
37761
  name: "goal",
37392
37762
  type: "object",
37393
37763
  required: true,
37394
- description: "What this work is for: who reads it, what that reader should get or do, the one message it carries, and the limits it is written under."
37395
- },
37396
- {
37397
- name: "brief",
37398
- type: "object",
37399
- required: false,
37400
- description: "The original requirement as it arrives with a new work: the person's text, any attached source files, and the points split from it."
37764
+ description: "What this work is for: who reads it, what that reader should get or do, and the one message it carries. Limits such as a length belong to a draft's brief, not to the goal; a goal with constraints or any other unknown field answers INVALID_PARAMS."
37401
37765
  },
37402
37766
  {
37403
37767
  name: "codexes",
@@ -37532,7 +37896,7 @@ for more details.`
37532
37896
  name: "goal",
37533
37897
  type: "object",
37534
37898
  required: false,
37535
- description: "What this work is for: who reads it, what that reader should get or do, the one message it carries, and the limits it is written under."
37899
+ description: "What this work is for: who reads it, what that reader should get or do, and the one message it carries. Limits such as a length belong to a draft's brief, not to the goal; a goal with constraints or any other unknown field answers INVALID_PARAMS."
37536
37900
  },
37537
37901
  {
37538
37902
  name: "codexes",
@@ -37568,69 +37932,6 @@ for more details.`
37568
37932
  ]
37569
37933
  }
37570
37934
  },
37571
- {
37572
- resource: "studio.works",
37573
- method: "updateBrief",
37574
- summary: "Add to or correct the original brief",
37575
- description: "Extend the original brief: append text, attach files, add points taken from an outline, edit one point, or drop a point. Points are how the software checks that every requirement landed in a written unit, so split the person's outline into points here rather than burying them in prose. The brief carries its own revision, separate from the work and from each draft.",
37576
- http: "PATCH",
37577
- path: "/studio/v1/works/{work}/brief",
37578
- streaming: "no",
37579
- pagination: false,
37580
- pathParams: [
37581
- {
37582
- name: "work",
37583
- sdkName: "work",
37584
- 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."
37585
- }
37586
- ],
37587
- query: [],
37588
- body: {
37589
- required: true,
37590
- fields: [
37591
- {
37592
- name: "expected_revision",
37593
- type: "integer",
37594
- required: false,
37595
- description: "Brief revision the caller read; a mismatch is refused with REVISION_CONFLICT rather than merged."
37596
- },
37597
- {
37598
- name: "text",
37599
- type: "string",
37600
- required: false,
37601
- description: "Text to append to the stored brief, added after what is already there and never replacing it."
37602
- },
37603
- {
37604
- name: "attachments",
37605
- type: "array",
37606
- itemType: "string",
37607
- required: false,
37608
- description: "Source files to keep with the brief, added to the ones already attached."
37609
- },
37610
- {
37611
- name: "add_points",
37612
- type: "array",
37613
- itemType: "object",
37614
- required: false,
37615
- description: "New requirement points to split out of the brief; each receives the next free key in order. A plain string is a unit point; pass { text, scope: work } for a constraint on the whole piece (period, voice, point of view, cast, words to avoid)."
37616
- },
37617
- {
37618
- name: "edit_points",
37619
- type: "array",
37620
- itemType: "object",
37621
- required: false,
37622
- description: "Existing points to reword, each naming the key it keeps and the text that replaces it."
37623
- },
37624
- {
37625
- name: "remove_points",
37626
- type: "array",
37627
- itemType: "string",
37628
- required: false,
37629
- description: "Keys of points to drop; a dropped key is never reused, so later points keep their own keys."
37630
- }
37631
- ]
37632
- }
37633
- },
37634
37935
  {
37635
37936
  resource: "studio.works.drafts",
37636
37937
  method: "list",
@@ -37675,6 +37976,12 @@ for more details.`
37675
37976
  required: true,
37676
37977
  description: "Genre key the draft is written in, taken from the genre list; it decides the unit kinds, the properties and the checks."
37677
37978
  },
37979
+ {
37980
+ name: "key",
37981
+ type: "string",
37982
+ required: false,
37983
+ description: "Short name of the draft inside the work, used in every later path in place of its id; omit it and the genre gives one (novel, xiaohongshu, a numbered one when taken). Lowercase letters, digits and hyphens."
37984
+ },
37678
37985
  {
37679
37986
  name: "title",
37680
37987
  type: "string",
@@ -37710,6 +38017,12 @@ for more details.`
37710
38017
  required: false,
37711
38018
  description: "What the new draft should be derived from, so the service can record the source revision for later staleness checks."
37712
38019
  },
38020
+ {
38021
+ name: "brief",
38022
+ type: "object",
38023
+ required: false,
38024
+ description: "The requirement as it arrives with a new draft: the person's text, any attached source files, the constraints and the points split from it."
38025
+ },
37713
38026
  {
37714
38027
  name: "props",
37715
38028
  type: "object",
@@ -37835,6 +38148,80 @@ for more details.`
37835
38148
  ]
37836
38149
  }
37837
38150
  },
38151
+ {
38152
+ resource: "studio.works.drafts",
38153
+ method: "updateBrief",
38154
+ summary: "Add to or correct a draft's brief",
38155
+ description: "Extend the brief of one draft: append text, attach files, replace its constraints, add points taken from an outline, edit one point, or drop a point. The brief belongs to the draft, not the work: the length and plot points of a novel do not bind the promotion derived from it. Points are how the software checks that every requirement landed in a written unit, so split the person's outline into points here rather than burying them in prose; the constraints (a length such as 3000 字以内, banned wording) are what the length check and the context pack read. The brief carries its own revision, separate from the draft's.",
38156
+ http: "PATCH",
38157
+ path: "/studio/v1/works/{work}/drafts/{draft}/brief",
38158
+ streaming: "no",
38159
+ pagination: false,
38160
+ pathParams: [
38161
+ {
38162
+ name: "work",
38163
+ sdkName: "work",
38164
+ 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."
38165
+ },
38166
+ {
38167
+ name: "draft",
38168
+ sdkName: "draft",
38169
+ 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."
38170
+ }
38171
+ ],
38172
+ query: [],
38173
+ body: {
38174
+ required: true,
38175
+ fields: [
38176
+ {
38177
+ name: "expected_revision",
38178
+ type: "integer",
38179
+ required: false,
38180
+ description: "Brief revision the caller read; a mismatch is refused with REVISION_CONFLICT rather than merged."
38181
+ },
38182
+ {
38183
+ name: "text",
38184
+ type: "string",
38185
+ required: false,
38186
+ description: "Text to append to the stored brief, added after what is already there and never replacing it."
38187
+ },
38188
+ {
38189
+ name: "constraints",
38190
+ type: "string",
38191
+ required: false,
38192
+ description: "The draft's constraints as one text, replacing what is there; pass an empty string to clear them."
38193
+ },
38194
+ {
38195
+ name: "attachments",
38196
+ type: "array",
38197
+ itemType: "string",
38198
+ required: false,
38199
+ description: "Source files to keep with the brief, added to the ones already attached."
38200
+ },
38201
+ {
38202
+ name: "add_points",
38203
+ type: "array",
38204
+ itemType: "object",
38205
+ required: false,
38206
+ description: "New requirement points to split out of the brief; each receives the next free key in order. A plain string is a unit point; pass { text, scope: work } for a constraint on the whole piece (period, voice, point of view, cast, words to avoid)."
38207
+ },
38208
+ {
38209
+ name: "edit_points",
38210
+ type: "array",
38211
+ itemType: "object",
38212
+ required: false,
38213
+ description: "Existing points to reword, each naming the key it keeps and the text that replaces it."
38214
+ },
38215
+ {
38216
+ name: "remove_points",
38217
+ type: "array",
38218
+ itemType: "string",
38219
+ required: false,
38220
+ description: "Keys of points to drop; a dropped key is never reused, so later points keep their own keys."
38221
+ }
38222
+ ]
38223
+ }
38224
+ },
37838
38225
  {
37839
38226
  resource: "studio.works.drafts",
37840
38227
  method: "retrieveExport",
@@ -37869,6 +38256,108 @@ for more details.`
37869
38256
  }
37870
38257
  ]
37871
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
+ },
37872
38361
  {
37873
38362
  resource: "studio.works.drafts",
37874
38363
  method: "retrieveOutline",
@@ -38203,6 +38692,95 @@ for more details.`
38203
38692
  ]
38204
38693
  }
38205
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
+ },
38206
38784
  {
38207
38785
  resource: "studio.works.renditions",
38208
38786
  method: "list",
@@ -38956,7 +39534,7 @@ for more details.`
38956
39534
  name: "budget_tokens",
38957
39535
  type: "integer",
38958
39536
  required: false,
38959
- 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."
38960
39538
  }
38961
39539
  ]
38962
39540
  },
@@ -44070,6 +44648,36 @@ var getObservedProcessOutput = (options) => (options.client ?? client).get({
44070
44648
  url: "/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output",
44071
44649
  ...options
44072
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
+ });
44073
44681
  var deleteSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).delete({
44074
44682
  security: [
44075
44683
  {
@@ -47728,6 +48336,19 @@ var devopsProjectsGet = (options) => (options.client ?? client).get({
47728
48336
  url: "/devops/v1/projects/{id}",
47729
48337
  ...options
47730
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
+ });
47731
48352
  var devopsReleasesList = (options) => (options.client ?? client).get({
47732
48353
  security: [{
47733
48354
  key: "devops-bearerAuth",
@@ -47878,6 +48499,19 @@ var devopsEnvironmentsList = (options) => (options.client ?? client).get({
47878
48499
  url: "/devops/v1/projects/{project}/environments",
47879
48500
  ...options
47880
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
+ });
47881
48515
  var devopsEnvironmentsCheckpointsList = (options) => (options.client ?? client).get({
47882
48516
  security: [{
47883
48517
  key: "devops-bearerAuth",
@@ -48102,6 +48736,63 @@ var devopsTofuStateLock = (options) => (options.client ?? client).post({
48102
48736
  ...options.headers
48103
48737
  }
48104
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
+ });
48105
48796
  var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
48106
48797
  security: [{
48107
48798
  key: "knowledge-bearerAuth",
@@ -50008,7 +50699,7 @@ var studioWorksUpdate = (options) => (options.client ?? client).patch({
50008
50699
  ...options.headers
50009
50700
  }
50010
50701
  });
50011
- var studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
50702
+ var studioDraftsList = (options) => (options.client ?? client).get({
50012
50703
  security: [{
50013
50704
  key: "BearerAuth",
50014
50705
  scheme: "bearer",
@@ -50018,14 +50709,27 @@ var studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
50018
50709
  name: "X-API-Key",
50019
50710
  type: "apiKey"
50020
50711
  }],
50021
- url: "/studio/v1/works/{work}/brief",
50712
+ url: "/studio/v1/works/{work}/drafts",
50713
+ ...options
50714
+ });
50715
+ var studioDraftsCreate = (options) => (options.client ?? client).post({
50716
+ security: [{
50717
+ key: "BearerAuth",
50718
+ scheme: "bearer",
50719
+ type: "http"
50720
+ }, {
50721
+ key: "ApiKeyAuth",
50722
+ name: "X-API-Key",
50723
+ type: "apiKey"
50724
+ }],
50725
+ url: "/studio/v1/works/{work}/drafts",
50022
50726
  ...options,
50023
50727
  headers: {
50024
50728
  "Content-Type": "application/json",
50025
50729
  ...options.headers
50026
50730
  }
50027
50731
  });
50028
- var studioDraftsList = (options) => (options.client ?? client).get({
50732
+ var studioDraftsGet = (options) => (options.client ?? client).get({
50029
50733
  security: [{
50030
50734
  key: "BearerAuth",
50031
50735
  scheme: "bearer",
@@ -50035,10 +50739,10 @@ var studioDraftsList = (options) => (options.client ?? client).get({
50035
50739
  name: "X-API-Key",
50036
50740
  type: "apiKey"
50037
50741
  }],
50038
- url: "/studio/v1/works/{work}/drafts",
50742
+ url: "/studio/v1/works/{work}/drafts/{draft}",
50039
50743
  ...options
50040
50744
  });
50041
- var studioDraftsCreate = (options) => (options.client ?? client).post({
50745
+ var studioDraftsUpdate = (options) => (options.client ?? client).patch({
50042
50746
  security: [{
50043
50747
  key: "BearerAuth",
50044
50748
  scheme: "bearer",
@@ -50048,14 +50752,14 @@ var studioDraftsCreate = (options) => (options.client ?? client).post({
50048
50752
  name: "X-API-Key",
50049
50753
  type: "apiKey"
50050
50754
  }],
50051
- url: "/studio/v1/works/{work}/drafts",
50755
+ url: "/studio/v1/works/{work}/drafts/{draft}",
50052
50756
  ...options,
50053
50757
  headers: {
50054
50758
  "Content-Type": "application/json",
50055
50759
  ...options.headers
50056
50760
  }
50057
50761
  });
50058
- var studioDraftsGet = (options) => (options.client ?? client).get({
50762
+ var studioDraftsUpdateBrief = (options) => (options.client ?? client).patch({
50059
50763
  security: [{
50060
50764
  key: "BearerAuth",
50061
50765
  scheme: "bearer",
@@ -50065,10 +50769,27 @@ var studioDraftsGet = (options) => (options.client ?? client).get({
50065
50769
  name: "X-API-Key",
50066
50770
  type: "apiKey"
50067
50771
  }],
50068
- url: "/studio/v1/works/{work}/drafts/{draft}",
50772
+ url: "/studio/v1/works/{work}/drafts/{draft}/brief",
50773
+ ...options,
50774
+ headers: {
50775
+ "Content-Type": "application/json",
50776
+ ...options.headers
50777
+ }
50778
+ });
50779
+ var studioDraftsOutline = (options) => (options.client ?? client).get({
50780
+ security: [{
50781
+ key: "BearerAuth",
50782
+ scheme: "bearer",
50783
+ type: "http"
50784
+ }, {
50785
+ key: "ApiKeyAuth",
50786
+ name: "X-API-Key",
50787
+ type: "apiKey"
50788
+ }],
50789
+ url: "/studio/v1/works/{work}/drafts/{draft}/outline",
50069
50790
  ...options
50070
50791
  });
50071
- var studioDraftsUpdate = (options) => (options.client ?? client).patch({
50792
+ var studioForeshadowsList = (options) => (options.client ?? client).get({
50072
50793
  security: [{
50073
50794
  key: "BearerAuth",
50074
50795
  scheme: "bearer",
@@ -50078,14 +50799,40 @@ var studioDraftsUpdate = (options) => (options.client ?? client).patch({
50078
50799
  name: "X-API-Key",
50079
50800
  type: "apiKey"
50080
50801
  }],
50081
- url: "/studio/v1/works/{work}/drafts/{draft}",
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}",
50082
50829
  ...options,
50083
50830
  headers: {
50084
50831
  "Content-Type": "application/json",
50085
50832
  ...options.headers
50086
50833
  }
50087
50834
  });
50088
- var studioDraftsOutline = (options) => (options.client ?? client).get({
50835
+ var studioProgressionsList = (options) => (options.client ?? client).get({
50089
50836
  security: [{
50090
50837
  key: "BearerAuth",
50091
50838
  scheme: "bearer",
@@ -50095,7 +50842,37 @@ var studioDraftsOutline = (options) => (options.client ?? client).get({
50095
50842
  name: "X-API-Key",
50096
50843
  type: "apiKey"
50097
50844
  }],
50098
- url: "/studio/v1/works/{work}/drafts/{draft}/outline",
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}",
50099
50876
  ...options
50100
50877
  });
50101
50878
  var studioDraftsStatus = (options) => (options.client ?? client).get({
@@ -52360,10 +53137,16 @@ function createDatabase(transport) {
52360
53137
  }
52361
53138
  function createDevops(transport) {
52362
53139
  return {
53140
+ changes: {
53141
+ abandon: bind(transport, devopsChangesAbandon),
53142
+ markLastSlice: bind(transport, devopsChangesMarkLastSlice),
53143
+ retrieve: bind(transport, devopsChangesGet)
53144
+ },
52363
53145
  environments: {
52364
53146
  checkpoints: {
52365
53147
  list: bind(transport, devopsEnvironmentsCheckpointsList)
52366
- }
53148
+ },
53149
+ update: bind(transport, devopsEnvironmentsUpdate)
52367
53150
  },
52368
53151
  flags: {
52369
53152
  archive: bind(transport, devopsFlagsArchive),
@@ -52382,6 +53165,10 @@ function createDevops(transport) {
52382
53165
  rollback: bind(transport, devopsProgressiveRolloutsRollback)
52383
53166
  },
52384
53167
  projects: {
53168
+ changes: {
53169
+ create: bind(transport, devopsChangesCreate),
53170
+ list: bind(transport, devopsChangesList)
53171
+ },
52385
53172
  environments: {
52386
53173
  list: bind(transport, devopsEnvironmentsList),
52387
53174
  targets: {
@@ -52430,7 +53217,8 @@ function createDevops(transport) {
52430
53217
  },
52431
53218
  testSuites: {
52432
53219
  list: bind(transport, devopsTestSuitesList)
52433
- }
53220
+ },
53221
+ update: bind(transport, devopsProjectsUpdate)
52434
53222
  },
52435
53223
  promotions: {
52436
53224
  approve: bind(transport, devopsPromotionsApprove),
@@ -52835,6 +53623,10 @@ function createSandbox(transport) {
52835
53623
  snapshots: {
52836
53624
  create: bind(transport, postSandboxV1SandboxesBySandboxIdSnapshots)
52837
53625
  },
53626
+ tasks: {
53627
+ create: bind(transport, startSandboxTask),
53628
+ retrieveLog: bind(transport, getSandboxTaskLog)
53629
+ },
52838
53630
  timeout: bind(transport, postSandboxV1SandboxesBySandboxIdTimeout),
52839
53631
  update: bind(transport, renameSandbox),
52840
53632
  updateNetwork: bind(transport, putSandboxV1SandboxesBySandboxIdNetwork),
@@ -52938,6 +53730,11 @@ function createStudio(transport) {
52938
53730
  create: bind(transport, studioWorksCreate),
52939
53731
  drafts: {
52940
53732
  create: bind(transport, studioDraftsCreate),
53733
+ foreshadows: {
53734
+ delete: bind(transport, studioForeshadowsDelete),
53735
+ list: bind(transport, studioForeshadowsList),
53736
+ update: bind(transport, studioForeshadowsUpsert)
53737
+ },
52941
53738
  list: bind(transport, studioDraftsList),
52942
53739
  rebase: bind(transport, studioDraftsRebase),
52943
53740
  renditions: {
@@ -52955,9 +53752,15 @@ function createStudio(transport) {
52955
53752
  batchUpdate: bind(transport, studioUnitsBatchUpdate),
52956
53753
  create: bind(transport, studioUnitsCreate)
52957
53754
  },
52958
- update: bind(transport, studioDraftsUpdate)
53755
+ update: bind(transport, studioDraftsUpdate),
53756
+ updateBrief: bind(transport, studioDraftsUpdateBrief)
52959
53757
  },
52960
53758
  list: bind(transport, studioWorksList),
53759
+ progressions: {
53760
+ create: bind(transport, studioProgressionsCreate),
53761
+ delete: bind(transport, studioProgressionsDelete),
53762
+ list: bind(transport, studioProgressionsList)
53763
+ },
52961
53764
  renditions: {
52962
53765
  delete: bind(transport, studioRenditionsDelete),
52963
53766
  list: bind(transport, studioRenditionsList),
@@ -52994,8 +53797,7 @@ function createStudio(transport) {
52994
53797
  retrieveContext: bind(transport, studioUnitsContext),
52995
53798
  update: bind(transport, studioUnitsUpdate)
52996
53799
  },
52997
- update: bind(transport, studioWorksUpdate),
52998
- updateBrief: bind(transport, studioWorksUpdateBrief)
53800
+ update: bind(transport, studioWorksUpdate)
52999
53801
  }
53000
53802
  };
53001
53803
  }
@@ -53637,7 +54439,7 @@ with your tabs and sign-ins. disconnect() only drops the connection and never re
53637
54439
  - browser.open(url, { reuseTab = true }) -> Tab: navigates an open tab of the same hostname in place, else opens a new tab
53638
54440
  - Tab: id, url(), title(), goto(url) (waits for domcontentloaded), back(), forward(), reload(), close()
53639
54441
  - Tab: snapshot() -> string, the page as an ARIA tree with [ref=eN] marks
53640
- - Tab: click(ref) / fill(ref, text) / press(key) / scroll(direction, pixels) / evaluate(expression): act on an element from the latest snapshot's ref, or on the page
54442
+ - Tab: click(ref) / fill(ref, text) / press(key) / scroll(direction, pixels) / evaluate(expression): act on an element from the latest snapshot's ref, or on the page. expression is an expression or a function (e.g. "() => document.title"); a function is called and its result returned.
53641
54443
  - Tab: screenshot({ fullPage }) -> { path, hint }; a PNG file you view with the Read tool
53642
54444
  - Tab: playwright -> the Playwright Page (getByRole, getByText, getByLabel, getByPlaceholder, locator, waitForURL, evaluate ...). Only available where Playwright is; reading it elsewhere throws and names the methods that work.
53643
54445
 
@@ -57197,6 +57999,7 @@ function nodeToolchainPorts(env, fetchImpl = fetch, home = homedir2()) {
57197
57999
  }
57198
58000
 
57199
58001
  // src/devops/tofu/pure.ts
58002
+ import { isAbsolute, relative } from "node:path";
57200
58003
  var ENVIRONMENT_ID = /^dve_[A-Za-z0-9]+$/;
57201
58004
  function parseEnvironmentId(value) {
57202
58005
  const id = value?.trim();
@@ -57239,21 +58042,48 @@ function parseTofuDeployArgs(flags) {
57239
58042
  ...flags.workdir ? { workdir: flags.workdir } : {}
57240
58043
  };
57241
58044
  }
57242
- 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 = []) {
57243
58064
  const named = requested !== undefined;
57244
- 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));
57245
58067
  if (requested !== undefined) {
57246
58068
  const known = new Set(plan.targets.map((t) => t.path));
57247
58069
  const missing = requested.filter((r) => !known.has(r));
57248
58070
  if (missing.length > 0)
57249
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
+ }
57250
58076
  const refused = requested.filter((r) => !targets.some((t) => t.path === r));
57251
58077
  if (refused.length > 0)
57252
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.");
57253
58079
  targets = targets.filter((t) => requested.includes(t.path));
57254
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
+ }
57255
58085
  const selected = { commit: plan.commit, targets };
57256
- return { targets, layers: layersOf(selected).map((layer) => [...layer]) };
58086
+ return { targets, layers: layersOf(selected).map((layer) => [...layer]), excluded: dropped };
57257
58087
  }
57258
58088
  function blockedBy(targets, broken) {
57259
58089
  const blocked = new Set;
@@ -57288,6 +58118,7 @@ var DEPLOY_SHAPE = `devops:
57288
58118
  deploy:
57289
58119
  adapters:
57290
58120
  cloudflare: bun tofu/adapter.ts
58121
+ exclude: ["**/spec/features/*"] # optional
57291
58122
  policy:
57292
58123
  forbiddenNames: <path> # optional`;
57293
58124
  function parseDeployProject(file) {
@@ -57317,7 +58148,43 @@ ${DEPLOY_SHAPE}`);
57317
58148
  const forbiddenNames = object(policy) ? policy.forbiddenNames : undefined;
57318
58149
  if (forbiddenNames !== undefined && (typeof forbiddenNames !== "string" || forbiddenNames.trim() === ""))
57319
58150
  refuse("devops.deploy.policy.forbiddenNames must be a repository path");
57320
- 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 };
57321
58188
  }
57322
58189
  function adapterEnv(input) {
57323
58190
  return {
@@ -57365,6 +58232,66 @@ function forbiddenHits(names, entries) {
57365
58232
  }
57366
58233
  var targetDir = (workdir, target) => `${workdir}/${target}`;
57367
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
+ }
57368
58295
  var STATE_USERNAME = "praxis";
57369
58296
  var STATE_PASSWORD_ENV = "TF_HTTP_PASSWORD";
57370
58297
  function stateAddress(backend, target) {
@@ -57389,21 +58316,56 @@ function backendDocument(backend, target) {
57389
58316
  }
57390
58317
 
57391
58318
  // src/devops/tofu/run.ts
57392
- 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
+ }
57393
58350
  var BACKEND_FILE = "praxis_backend.tf.json";
58351
+ var NATIVE_PLAN = `praxis-native-target: deployed by wrangler after approval; no OpenTofu plan
58352
+ `;
57394
58353
  async function runTofuDeploy(args, plan, ports) {
57395
58354
  const { fs, exec, out } = ports;
57396
58355
  const startedAt = ports.clock.iso();
57397
58356
  const root = resolve3(ports.repoRoot);
57398
- const absolute = (p) => isAbsolute(p) ? p : resolve3(p);
58357
+ const absolute = (p) => isAbsolute2(p) ? p : resolve3(p);
57399
58358
  const workdir = absolute(args.workdir ?? `${root}/.tofu-work`);
57400
58359
  const planDir = absolute(args.planDir ?? `${workdir}/plans`);
57401
58360
  const applying = args.mode !== "plan-only";
57402
58361
  const events = applying && args.eventsFile !== undefined ? ports.openEvents(args.eventsFile, startedAt) : undefined;
57403
58362
  const reports = new Map;
57404
- 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 ?? []);
57405
58365
  const byPath = new Map(selection.targets.map((t) => [t.path, t]));
57406
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}`);
57407
58369
  const finish = (finished2, message2) => {
57408
58370
  if (events)
57409
58371
  events.finish(message2 === undefined ? {} : { message: message2 });
@@ -57419,6 +58381,9 @@ async function runTofuDeploy(args, plan, ports) {
57419
58381
  };
57420
58382
  const writeSummary = async (summary) => {
57421
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))}
57422
58387
  `);
57423
58388
  out(`SUMMARY ${JSON.stringify(summary)}`);
57424
58389
  };
@@ -57454,7 +58419,55 @@ async function runTofuDeploy(args, plan, ports) {
57454
58419
  if (code !== 0)
57455
58420
  throw new StepFailed(kind === "engine" ? `rollout step ${cmdArgs[0]} exited ${code}` : `adapter ${cmdArgs[0]} exited ${code}`);
57456
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
+ };
57457
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
+ };
57458
58471
  const broken = new Set;
57459
58472
  const manifests = new Map;
57460
58473
  const fail = (t, message2, began, extra = {}) => {
@@ -57473,15 +58486,26 @@ async function runTofuDeploy(args, plan, ports) {
57473
58486
  return await refuseAll(`policy.forbiddenNames ${ports.project.forbiddenNames} is missing; the policy check cannot run`);
57474
58487
  forbidden = parseNameList(text);
57475
58488
  }
58489
+ const rendered = new Set;
57476
58490
  await pool(selection.targets, LAYER_CONCURRENCY, async (t) => {
57477
58491
  const began = ports.clock.now();
57478
58492
  const dir = targetDir(workdir, t.path);
57479
58493
  try {
57480
- if (args.mode === "apply-plans" && !await fs.exists(planFileOf(planDir, t.path))) {
57481
- 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");
57482
58508
  }
57483
- await fs.mkdirp(dir);
57484
- await adapter(t, "generate");
57485
58509
  const manifest = parseTargetManifest(await fs.read(`${dir}/target.json`));
57486
58510
  if (typeof manifest === "string")
57487
58511
  throw new StepFailed(`adapter generate: ${manifest}`);
@@ -57522,6 +58546,23 @@ async function runTofuDeploy(args, plan, ports) {
57522
58546
  out(`[${target}] pending until an approved apply: ${p}`);
57523
58547
  const engineEnv = { [STATE_PASSWORD_ENV]: ports.state.password };
57524
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
+ }
57525
58566
  if (args.mode !== "apply-plans")
57526
58567
  await adapter(t, "before-plan");
57527
58568
  await step(t, "engine", ["init", "-input=false"], dir, engineEnv);
@@ -57529,12 +58570,15 @@ async function runTofuDeploy(args, plan, ports) {
57529
58570
  await fs.mkdirp(dirname4(planFile));
57530
58571
  await step(t, "engine", ["plan", "-input=false", "-no-color", `-out=${planFile}`], dir, engineEnv);
57531
58572
  }
58573
+ await deletesOf(t, planFile, dir, engineEnv);
58574
+ if (args.mode === "plan-only")
58575
+ await packRender(t, dir);
57532
58576
  if (applying) {
57533
58577
  await adapter(t, "before-apply");
57534
58578
  await step(t, "engine", ["apply", "-input=false", "-no-color", planFile], dir, engineEnv);
57535
58579
  await adapter(t, "after-apply");
57536
58580
  }
57537
- 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 } : {} });
57538
58582
  if (events)
57539
58583
  events.end(target, "deploy", { kind: "succeeded", durationMs: ports.clock.now() - began });
57540
58584
  } catch (error) {
@@ -57903,6 +58947,8 @@ async function devopsDeployTofu(flags, ports) {
57903
58947
  out: ports.stdout
57904
58948
  });
57905
58949
  ports.emit({ kind: "object", data: result.summary });
58950
+ for (const line of failureDigest(result.summary))
58951
+ ports.stdout(line);
57906
58952
  return result.exitCode;
57907
58953
  }
57908
58954
 
@@ -58639,7 +59685,7 @@ function pathLineBounds(geometry) {
58639
59685
  }
58640
59686
  if (command === null)
58641
59687
  return null;
58642
- const relative = command === command.toLowerCase();
59688
+ const relative2 = command === command.toLowerCase();
58643
59689
  const upper = command.toUpperCase();
58644
59690
  if (upper === "H" || upper === "V") {
58645
59691
  const value = tokens[i];
@@ -58647,9 +59693,9 @@ function pathLineBounds(geometry) {
58647
59693
  return null;
58648
59694
  i++;
58649
59695
  if (upper === "H")
58650
- x = relative ? x + value : value;
59696
+ x = relative2 ? x + value : value;
58651
59697
  else
58652
- y = relative ? y + value : value;
59698
+ y = relative2 ? y + value : value;
58653
59699
  add(x, y);
58654
59700
  continue;
58655
59701
  }
@@ -58657,8 +59703,8 @@ function pathLineBounds(geometry) {
58657
59703
  if (typeof nx !== "number" || typeof ny !== "number")
58658
59704
  return null;
58659
59705
  i += 2;
58660
- x = relative ? x + nx : nx;
58661
- y = relative ? y + ny : ny;
59706
+ x = relative2 ? x + nx : nx;
59707
+ y = relative2 ? y + ny : ny;
58662
59708
  if (upper === "M") {
58663
59709
  startX = x;
58664
59710
  startY = y;
@@ -60568,7 +61614,7 @@ function timestamp(key, value) {
60568
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;
60569
61615
  return Number.isFinite(time) ? new Date(time).toISOString() : undefined;
60570
61616
  }
60571
- function relative(iso, now) {
61617
+ function relative2(iso, now) {
60572
61618
  const delta = now - Date.parse(iso), seconds = Math.floor(Math.abs(delta) / 1000);
60573
61619
  if (Math.abs(delta) < 60000)
60574
61620
  return "just now";
@@ -60707,7 +61753,7 @@ function table(items, ctx, paint) {
60707
61753
  const now = ctx.now ?? Date.now();
60708
61754
  let rows = items.map((item) => columns.map((key) => {
60709
61755
  const v = record(item)[key], iso = timestamp(key, v);
60710
- return plain(iso ? relative(iso, now) : scalar(v));
61756
+ return plain(iso ? relative2(iso, now) : scalar(v));
60711
61757
  }));
60712
61758
  let headers = columns.map((key) => key.toUpperCase());
60713
61759
  let sizes = columns.map((_, i) => Math.max(width(headers[i]), ...rows.map((row) => width(row[i]))));
@@ -60747,7 +61793,7 @@ function objectView(data, resource, id, ctx, paint) {
60747
61793
  function value(key, v, depth) {
60748
61794
  const iso = timestamp(key, v);
60749
61795
  if (iso)
60750
- return `${iso} (${relative(iso, now)})`;
61796
+ return `${iso} (${relative2(iso, now)})`;
60751
61797
  if (Array.isArray(v)) {
60752
61798
  if (v.every((x) => x === null || typeof x !== "object"))
60753
61799
  return v.map(scalar).map(plain).join(", ");
@@ -61127,7 +62173,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
61127
62173
  }
61128
62174
 
61129
62175
  // src/main.ts
61130
- var version = "0.3.0-dev.5ff83b8";
62176
+ var version = "0.3.0-dev.6c28f93";
61131
62177
  var commands = commandTree(operations);
61132
62178
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
61133
62179
  function route(argv) {