@deepraxis/cli 0.3.0-dev.9119988 → 0.3.0-dev.9fc067f
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.
- package/COMMANDS.md +14 -3
- package/dist/praxis.js +778 -136
- package/package.json +1 -1
package/dist/praxis.js
CHANGED
|
@@ -25680,6 +25680,82 @@ 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
|
+
},
|
|
25683
25759
|
{
|
|
25684
25760
|
resource: "devops.environments.checkpoints",
|
|
25685
25761
|
method: "list",
|
|
@@ -26053,6 +26129,127 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
26053
26129
|
],
|
|
26054
26130
|
query: []
|
|
26055
26131
|
},
|
|
26132
|
+
{
|
|
26133
|
+
resource: "devops.projects.changes",
|
|
26134
|
+
method: "list",
|
|
26135
|
+
summary: "List changes",
|
|
26136
|
+
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.",
|
|
26137
|
+
http: "GET",
|
|
26138
|
+
path: "/devops/v1/projects/{project}/changes",
|
|
26139
|
+
streaming: "no",
|
|
26140
|
+
pagination: false,
|
|
26141
|
+
pathParams: [
|
|
26142
|
+
{
|
|
26143
|
+
name: "project",
|
|
26144
|
+
sdkName: "project",
|
|
26145
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
26146
|
+
}
|
|
26147
|
+
],
|
|
26148
|
+
query: [
|
|
26149
|
+
{
|
|
26150
|
+
name: "pageSize",
|
|
26151
|
+
type: "integer",
|
|
26152
|
+
required: false,
|
|
26153
|
+
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."
|
|
26154
|
+
},
|
|
26155
|
+
{
|
|
26156
|
+
name: "pageToken",
|
|
26157
|
+
type: "string",
|
|
26158
|
+
required: false,
|
|
26159
|
+
description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
|
|
26160
|
+
},
|
|
26161
|
+
{
|
|
26162
|
+
name: "filter",
|
|
26163
|
+
type: "string",
|
|
26164
|
+
required: false,
|
|
26165
|
+
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."
|
|
26166
|
+
}
|
|
26167
|
+
]
|
|
26168
|
+
},
|
|
26169
|
+
{
|
|
26170
|
+
resource: "devops.projects.changes",
|
|
26171
|
+
method: "create",
|
|
26172
|
+
summary: "Create a change",
|
|
26173
|
+
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.",
|
|
26174
|
+
http: "POST",
|
|
26175
|
+
path: "/devops/v1/projects/{project}/changes",
|
|
26176
|
+
streaming: "no",
|
|
26177
|
+
pagination: false,
|
|
26178
|
+
pathParams: [
|
|
26179
|
+
{
|
|
26180
|
+
name: "project",
|
|
26181
|
+
sdkName: "project",
|
|
26182
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
26183
|
+
}
|
|
26184
|
+
],
|
|
26185
|
+
query: [],
|
|
26186
|
+
body: {
|
|
26187
|
+
required: true,
|
|
26188
|
+
fields: [
|
|
26189
|
+
{
|
|
26190
|
+
name: "type",
|
|
26191
|
+
type: "string",
|
|
26192
|
+
enum: [
|
|
26193
|
+
"feat",
|
|
26194
|
+
"fix",
|
|
26195
|
+
"perf",
|
|
26196
|
+
"refactor",
|
|
26197
|
+
"docs",
|
|
26198
|
+
"test",
|
|
26199
|
+
"build",
|
|
26200
|
+
"ci",
|
|
26201
|
+
"chore",
|
|
26202
|
+
"revert"
|
|
26203
|
+
],
|
|
26204
|
+
required: true,
|
|
26205
|
+
description: "What the work is, in commitlint vocabulary; together with slug it forms the change id <type>/<slug>."
|
|
26206
|
+
},
|
|
26207
|
+
{
|
|
26208
|
+
name: "slug",
|
|
26209
|
+
type: "string",
|
|
26210
|
+
required: true,
|
|
26211
|
+
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."
|
|
26212
|
+
},
|
|
26213
|
+
{
|
|
26214
|
+
name: "title",
|
|
26215
|
+
type: "string",
|
|
26216
|
+
required: true,
|
|
26217
|
+
description: "One line saying what the change is for, shown wherever the change is listed and used as the flag's name."
|
|
26218
|
+
},
|
|
26219
|
+
{
|
|
26220
|
+
name: "tickets",
|
|
26221
|
+
type: "array",
|
|
26222
|
+
itemType: "string",
|
|
26223
|
+
required: false,
|
|
26224
|
+
description: "Ticket references the change belongs to, as a magic word or a #number; omit it when there is none."
|
|
26225
|
+
},
|
|
26226
|
+
{
|
|
26227
|
+
name: "withFlag",
|
|
26228
|
+
type: "boolean",
|
|
26229
|
+
required: false,
|
|
26230
|
+
description: "True to create a release flag keyed by the slug; omitted means true for feat and false for every other type."
|
|
26231
|
+
},
|
|
26232
|
+
{
|
|
26233
|
+
name: "urgent",
|
|
26234
|
+
type: "boolean",
|
|
26235
|
+
required: false,
|
|
26236
|
+
description: "True for an urgent fix that may take the patch path with a recorded authorization to skip develop; omitted means false."
|
|
26237
|
+
},
|
|
26238
|
+
{
|
|
26239
|
+
name: "observeUntil",
|
|
26240
|
+
type: "string",
|
|
26241
|
+
required: false,
|
|
26242
|
+
description: "RFC 3339 UTC deadline by which the flag's observation must be decided; only used when the change creates a flag."
|
|
26243
|
+
},
|
|
26244
|
+
{
|
|
26245
|
+
name: "requestId",
|
|
26246
|
+
type: "string",
|
|
26247
|
+
required: false,
|
|
26248
|
+
description: "Caller-chosen key that makes a retry answer the change the first call made instead of creating another."
|
|
26249
|
+
}
|
|
26250
|
+
]
|
|
26251
|
+
}
|
|
26252
|
+
},
|
|
26056
26253
|
{
|
|
26057
26254
|
resource: "devops.projects.environments",
|
|
26058
26255
|
method: "list",
|
|
@@ -28864,7 +29061,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
28864
29061
|
resource: "media.generation.capabilities",
|
|
28865
29062
|
method: "list",
|
|
28866
29063
|
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.',
|
|
29064
|
+
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
29065
|
http: "GET",
|
|
28869
29066
|
path: "/media/v1/generation/capabilities",
|
|
28870
29067
|
streaming: "no",
|
|
@@ -30082,7 +30279,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
30082
30279
|
resource: "media.libraries.jobs",
|
|
30083
30280
|
method: "list",
|
|
30084
30281
|
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.",
|
|
30282
|
+
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
30283
|
http: "GET",
|
|
30087
30284
|
path: "/media/v1/libraries/{library_id}/jobs",
|
|
30088
30285
|
streaming: "no",
|
|
@@ -30111,6 +30308,12 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
30111
30308
|
required: false,
|
|
30112
30309
|
description: "Filter jobs by their current status."
|
|
30113
30310
|
},
|
|
30311
|
+
{
|
|
30312
|
+
name: "pipeline_run_id",
|
|
30313
|
+
type: "string",
|
|
30314
|
+
required: false,
|
|
30315
|
+
description: "Return only the jobs started by this automation run (its root run), so one pipeline run reads as one batch."
|
|
30316
|
+
},
|
|
30114
30317
|
{
|
|
30115
30318
|
name: "limit",
|
|
30116
30319
|
type: "integer",
|
|
@@ -36518,7 +36721,7 @@ for more details.`
|
|
|
36518
36721
|
name: "time",
|
|
36519
36722
|
type: "string",
|
|
36520
36723
|
required: false,
|
|
36521
|
-
description: "When this entry happens in the story, such as 2037 or
|
|
36724
|
+
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
36725
|
},
|
|
36523
36726
|
{
|
|
36524
36727
|
name: "tracking",
|
|
@@ -36536,7 +36739,7 @@ for more details.`
|
|
|
36536
36739
|
type: "array",
|
|
36537
36740
|
itemType: "object",
|
|
36538
36741
|
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."
|
|
36742
|
+
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
36743
|
},
|
|
36541
36744
|
{
|
|
36542
36745
|
name: "images",
|
|
@@ -37365,7 +37568,7 @@ for more details.`
|
|
|
37365
37568
|
resource: "studio.works",
|
|
37366
37569
|
method: "create",
|
|
37367
37570
|
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
|
|
37571
|
+
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
37572
|
http: "POST",
|
|
37370
37573
|
path: "/studio/v1/works",
|
|
37371
37574
|
streaming: "no",
|
|
@@ -37391,13 +37594,7 @@ for more details.`
|
|
|
37391
37594
|
name: "goal",
|
|
37392
37595
|
type: "object",
|
|
37393
37596
|
required: true,
|
|
37394
|
-
description: "What this work is for: who reads it, what that reader should get or do, the one message it carries,
|
|
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."
|
|
37597
|
+
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
37598
|
},
|
|
37402
37599
|
{
|
|
37403
37600
|
name: "codexes",
|
|
@@ -37532,7 +37729,7 @@ for more details.`
|
|
|
37532
37729
|
name: "goal",
|
|
37533
37730
|
type: "object",
|
|
37534
37731
|
required: false,
|
|
37535
|
-
description: "What this work is for: who reads it, what that reader should get or do, the one message it carries,
|
|
37732
|
+
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
37733
|
},
|
|
37537
37734
|
{
|
|
37538
37735
|
name: "codexes",
|
|
@@ -37568,69 +37765,6 @@ for more details.`
|
|
|
37568
37765
|
]
|
|
37569
37766
|
}
|
|
37570
37767
|
},
|
|
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
37768
|
{
|
|
37635
37769
|
resource: "studio.works.drafts",
|
|
37636
37770
|
method: "list",
|
|
@@ -37716,6 +37850,12 @@ for more details.`
|
|
|
37716
37850
|
required: false,
|
|
37717
37851
|
description: "What the new draft should be derived from, so the service can record the source revision for later staleness checks."
|
|
37718
37852
|
},
|
|
37853
|
+
{
|
|
37854
|
+
name: "brief",
|
|
37855
|
+
type: "object",
|
|
37856
|
+
required: false,
|
|
37857
|
+
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."
|
|
37858
|
+
},
|
|
37719
37859
|
{
|
|
37720
37860
|
name: "props",
|
|
37721
37861
|
type: "object",
|
|
@@ -37841,6 +37981,80 @@ for more details.`
|
|
|
37841
37981
|
]
|
|
37842
37982
|
}
|
|
37843
37983
|
},
|
|
37984
|
+
{
|
|
37985
|
+
resource: "studio.works.drafts",
|
|
37986
|
+
method: "updateBrief",
|
|
37987
|
+
summary: "Add to or correct a draft's brief",
|
|
37988
|
+
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.",
|
|
37989
|
+
http: "PATCH",
|
|
37990
|
+
path: "/studio/v1/works/{work}/drafts/{draft}/brief",
|
|
37991
|
+
streaming: "no",
|
|
37992
|
+
pagination: false,
|
|
37993
|
+
pathParams: [
|
|
37994
|
+
{
|
|
37995
|
+
name: "work",
|
|
37996
|
+
sdkName: "work",
|
|
37997
|
+
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."
|
|
37998
|
+
},
|
|
37999
|
+
{
|
|
38000
|
+
name: "draft",
|
|
38001
|
+
sdkName: "draft",
|
|
38002
|
+
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."
|
|
38003
|
+
}
|
|
38004
|
+
],
|
|
38005
|
+
query: [],
|
|
38006
|
+
body: {
|
|
38007
|
+
required: true,
|
|
38008
|
+
fields: [
|
|
38009
|
+
{
|
|
38010
|
+
name: "expected_revision",
|
|
38011
|
+
type: "integer",
|
|
38012
|
+
required: false,
|
|
38013
|
+
description: "Brief revision the caller read; a mismatch is refused with REVISION_CONFLICT rather than merged."
|
|
38014
|
+
},
|
|
38015
|
+
{
|
|
38016
|
+
name: "text",
|
|
38017
|
+
type: "string",
|
|
38018
|
+
required: false,
|
|
38019
|
+
description: "Text to append to the stored brief, added after what is already there and never replacing it."
|
|
38020
|
+
},
|
|
38021
|
+
{
|
|
38022
|
+
name: "constraints",
|
|
38023
|
+
type: "string",
|
|
38024
|
+
required: false,
|
|
38025
|
+
description: "The draft's constraints as one text, replacing what is there; pass an empty string to clear them."
|
|
38026
|
+
},
|
|
38027
|
+
{
|
|
38028
|
+
name: "attachments",
|
|
38029
|
+
type: "array",
|
|
38030
|
+
itemType: "string",
|
|
38031
|
+
required: false,
|
|
38032
|
+
description: "Source files to keep with the brief, added to the ones already attached."
|
|
38033
|
+
},
|
|
38034
|
+
{
|
|
38035
|
+
name: "add_points",
|
|
38036
|
+
type: "array",
|
|
38037
|
+
itemType: "object",
|
|
38038
|
+
required: false,
|
|
38039
|
+
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)."
|
|
38040
|
+
},
|
|
38041
|
+
{
|
|
38042
|
+
name: "edit_points",
|
|
38043
|
+
type: "array",
|
|
38044
|
+
itemType: "object",
|
|
38045
|
+
required: false,
|
|
38046
|
+
description: "Existing points to reword, each naming the key it keeps and the text that replaces it."
|
|
38047
|
+
},
|
|
38048
|
+
{
|
|
38049
|
+
name: "remove_points",
|
|
38050
|
+
type: "array",
|
|
38051
|
+
itemType: "string",
|
|
38052
|
+
required: false,
|
|
38053
|
+
description: "Keys of points to drop; a dropped key is never reused, so later points keep their own keys."
|
|
38054
|
+
}
|
|
38055
|
+
]
|
|
38056
|
+
}
|
|
38057
|
+
},
|
|
37844
38058
|
{
|
|
37845
38059
|
resource: "studio.works.drafts",
|
|
37846
38060
|
method: "retrieveExport",
|
|
@@ -37875,6 +38089,108 @@ for more details.`
|
|
|
37875
38089
|
}
|
|
37876
38090
|
]
|
|
37877
38091
|
},
|
|
38092
|
+
{
|
|
38093
|
+
resource: "studio.works.drafts.foreshadows",
|
|
38094
|
+
method: "list",
|
|
38095
|
+
summary: "List the foreshadows of a draft",
|
|
38096
|
+
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.",
|
|
38097
|
+
http: "GET",
|
|
38098
|
+
path: "/studio/v1/works/{work}/drafts/{draft}/foreshadows",
|
|
38099
|
+
streaming: "no",
|
|
38100
|
+
pagination: false,
|
|
38101
|
+
pathParams: [
|
|
38102
|
+
{
|
|
38103
|
+
name: "work",
|
|
38104
|
+
sdkName: "work",
|
|
38105
|
+
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."
|
|
38106
|
+
},
|
|
38107
|
+
{
|
|
38108
|
+
name: "draft",
|
|
38109
|
+
sdkName: "draft",
|
|
38110
|
+
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."
|
|
38111
|
+
}
|
|
38112
|
+
],
|
|
38113
|
+
query: []
|
|
38114
|
+
},
|
|
38115
|
+
{
|
|
38116
|
+
resource: "studio.works.drafts.foreshadows",
|
|
38117
|
+
method: "delete",
|
|
38118
|
+
summary: "Drop a foreshadow",
|
|
38119
|
+
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.",
|
|
38120
|
+
http: "DELETE",
|
|
38121
|
+
path: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
|
|
38122
|
+
streaming: "no",
|
|
38123
|
+
pagination: false,
|
|
38124
|
+
pathParams: [
|
|
38125
|
+
{
|
|
38126
|
+
name: "work",
|
|
38127
|
+
sdkName: "work",
|
|
38128
|
+
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."
|
|
38129
|
+
},
|
|
38130
|
+
{
|
|
38131
|
+
name: "draft",
|
|
38132
|
+
sdkName: "draft",
|
|
38133
|
+
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."
|
|
38134
|
+
},
|
|
38135
|
+
{
|
|
38136
|
+
name: "key",
|
|
38137
|
+
sdkName: "key",
|
|
38138
|
+
description: "Your name for the thread inside this work, such as 改造告示 or the-photo; the same key updates the same foreshadow."
|
|
38139
|
+
}
|
|
38140
|
+
],
|
|
38141
|
+
query: []
|
|
38142
|
+
},
|
|
38143
|
+
{
|
|
38144
|
+
resource: "studio.works.drafts.foreshadows",
|
|
38145
|
+
method: "update",
|
|
38146
|
+
summary: "Plant or pay off a foreshadow",
|
|
38147
|
+
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.",
|
|
38148
|
+
http: "PUT",
|
|
38149
|
+
path: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
|
|
38150
|
+
streaming: "no",
|
|
38151
|
+
pagination: false,
|
|
38152
|
+
pathParams: [
|
|
38153
|
+
{
|
|
38154
|
+
name: "work",
|
|
38155
|
+
sdkName: "work",
|
|
38156
|
+
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."
|
|
38157
|
+
},
|
|
38158
|
+
{
|
|
38159
|
+
name: "draft",
|
|
38160
|
+
sdkName: "draft",
|
|
38161
|
+
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."
|
|
38162
|
+
},
|
|
38163
|
+
{
|
|
38164
|
+
name: "key",
|
|
38165
|
+
sdkName: "key",
|
|
38166
|
+
description: "Your name for the thread inside this work, such as 改造告示 or the-photo; the same key updates the same foreshadow."
|
|
38167
|
+
}
|
|
38168
|
+
],
|
|
38169
|
+
query: [],
|
|
38170
|
+
body: {
|
|
38171
|
+
required: true,
|
|
38172
|
+
fields: [
|
|
38173
|
+
{
|
|
38174
|
+
name: "setup",
|
|
38175
|
+
type: "string",
|
|
38176
|
+
required: true,
|
|
38177
|
+
description: "Unit that plants the thread, by number such as 1 or by unt_ identifier; it must belong to this draft."
|
|
38178
|
+
},
|
|
38179
|
+
{
|
|
38180
|
+
name: "payoff",
|
|
38181
|
+
type: "string",
|
|
38182
|
+
required: false,
|
|
38183
|
+
description: "Unit that pays it off, by number or identifier, in this draft; leave it out or null while it is still open."
|
|
38184
|
+
},
|
|
38185
|
+
{
|
|
38186
|
+
name: "note",
|
|
38187
|
+
type: "string",
|
|
38188
|
+
required: false,
|
|
38189
|
+
description: "What was planted, in a sentence."
|
|
38190
|
+
}
|
|
38191
|
+
]
|
|
38192
|
+
}
|
|
38193
|
+
},
|
|
37878
38194
|
{
|
|
37879
38195
|
resource: "studio.works.drafts",
|
|
37880
38196
|
method: "retrieveOutline",
|
|
@@ -38116,31 +38432,72 @@ for more details.`
|
|
|
38116
38432
|
name: "expected_revision",
|
|
38117
38433
|
type: "integer",
|
|
38118
38434
|
required: false,
|
|
38119
|
-
description: "Draft revision the caller read; a mismatch is refused, which is what stops a repeated batch from duplicating a structure."
|
|
38120
|
-
},
|
|
38121
|
-
{
|
|
38122
|
-
name: "parent",
|
|
38123
|
-
type: "string",
|
|
38124
|
-
required: false,
|
|
38125
|
-
description: "Unit the whole outline should hang under, by number or identifier; null or omitted builds it at the top level."
|
|
38435
|
+
description: "Draft revision the caller read; a mismatch is refused, which is what stops a repeated batch from duplicating a structure."
|
|
38436
|
+
},
|
|
38437
|
+
{
|
|
38438
|
+
name: "parent",
|
|
38439
|
+
type: "string",
|
|
38440
|
+
required: false,
|
|
38441
|
+
description: "Unit the whole outline should hang under, by number or identifier; null or omitted builds it at the top level."
|
|
38442
|
+
},
|
|
38443
|
+
{
|
|
38444
|
+
name: "outline",
|
|
38445
|
+
type: "array",
|
|
38446
|
+
itemType: "object",
|
|
38447
|
+
required: true,
|
|
38448
|
+
description: "Units to create in order, with children nested inside their parent; the nesting becomes the parent chain of the created units."
|
|
38449
|
+
}
|
|
38450
|
+
]
|
|
38451
|
+
}
|
|
38452
|
+
},
|
|
38453
|
+
{
|
|
38454
|
+
resource: "studio.works.drafts.units",
|
|
38455
|
+
method: "batchUpdate",
|
|
38456
|
+
summary: "Write intents for many units in one call",
|
|
38457
|
+
description: "Change the intent of several units in one write: the synopsis, the points and the brief points each of them claims. Bodies are not part of this call, because a body is written one unit at a time with its own revision; here the whole batch shares the draft revision you read. Use it to lay out a plan across the tree, then write bodies one by one.",
|
|
38458
|
+
http: "POST",
|
|
38459
|
+
path: "/studio/v1/works/{work}/drafts/{draft}/units:batchUpdate",
|
|
38460
|
+
streaming: "no",
|
|
38461
|
+
pagination: false,
|
|
38462
|
+
pathParams: [
|
|
38463
|
+
{
|
|
38464
|
+
name: "work",
|
|
38465
|
+
sdkName: "work",
|
|
38466
|
+
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."
|
|
38467
|
+
},
|
|
38468
|
+
{
|
|
38469
|
+
name: "draft",
|
|
38470
|
+
sdkName: "draft",
|
|
38471
|
+
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."
|
|
38472
|
+
}
|
|
38473
|
+
],
|
|
38474
|
+
query: [],
|
|
38475
|
+
body: {
|
|
38476
|
+
required: true,
|
|
38477
|
+
fields: [
|
|
38478
|
+
{
|
|
38479
|
+
name: "expected_revision",
|
|
38480
|
+
type: "integer",
|
|
38481
|
+
required: false,
|
|
38482
|
+
description: "Draft revision the caller read; a mismatch is refused, so a plan written from a stale outline cannot land."
|
|
38126
38483
|
},
|
|
38127
38484
|
{
|
|
38128
|
-
name: "
|
|
38485
|
+
name: "updates",
|
|
38129
38486
|
type: "array",
|
|
38130
38487
|
itemType: "object",
|
|
38131
38488
|
required: true,
|
|
38132
|
-
description: "Units to
|
|
38489
|
+
description: "Units to change, each naming the unit and the intent fields it takes; a body is never part of a batch, because bodies are written one unit at a time."
|
|
38133
38490
|
}
|
|
38134
38491
|
]
|
|
38135
38492
|
}
|
|
38136
38493
|
},
|
|
38137
38494
|
{
|
|
38138
|
-
resource: "studio.works.drafts
|
|
38139
|
-
method: "
|
|
38140
|
-
summary: "
|
|
38141
|
-
description: "
|
|
38495
|
+
resource: "studio.works.drafts",
|
|
38496
|
+
method: "rebase",
|
|
38497
|
+
summary: "Confirm a draft already follows its source",
|
|
38498
|
+
description: "Clear the stale flag after checking that the draft still matches what it was derived from: the recorded source revision moves to the source current revision without touching any unit. Call it after the source moved and you have brought this draft up to date, not to make the flag disappear while the text is still behind. It answers the same shape as a draft write, and the draft revision does not move.",
|
|
38142
38499
|
http: "POST",
|
|
38143
|
-
path: "/studio/v1/works/{work}/drafts/{draft}
|
|
38500
|
+
path: "/studio/v1/works/{work}/drafts/{draft}:rebase",
|
|
38144
38501
|
streaming: "no",
|
|
38145
38502
|
pagination: false,
|
|
38146
38503
|
pathParams: [
|
|
@@ -38157,31 +38514,24 @@ for more details.`
|
|
|
38157
38514
|
],
|
|
38158
38515
|
query: [],
|
|
38159
38516
|
body: {
|
|
38160
|
-
required:
|
|
38517
|
+
required: false,
|
|
38161
38518
|
fields: [
|
|
38162
38519
|
{
|
|
38163
38520
|
name: "expected_revision",
|
|
38164
38521
|
type: "integer",
|
|
38165
38522
|
required: false,
|
|
38166
|
-
description: "Draft revision the caller read; a mismatch is refused
|
|
38167
|
-
},
|
|
38168
|
-
{
|
|
38169
|
-
name: "updates",
|
|
38170
|
-
type: "array",
|
|
38171
|
-
itemType: "object",
|
|
38172
|
-
required: true,
|
|
38173
|
-
description: "Units to change, each naming the unit and the intent fields it takes; a body is never part of a batch, because bodies are written one unit at a time."
|
|
38523
|
+
description: "Draft revision the caller read; a mismatch is refused rather than confirming a draft that changed under the caller."
|
|
38174
38524
|
}
|
|
38175
38525
|
]
|
|
38176
38526
|
}
|
|
38177
38527
|
},
|
|
38178
38528
|
{
|
|
38179
|
-
resource: "studio.works.
|
|
38180
|
-
method: "
|
|
38181
|
-
summary: "
|
|
38182
|
-
description: "
|
|
38183
|
-
http: "
|
|
38184
|
-
path: "/studio/v1/works/{work}/
|
|
38529
|
+
resource: "studio.works.progressions",
|
|
38530
|
+
method: "list",
|
|
38531
|
+
summary: "List the setting changes of a work",
|
|
38532
|
+
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.",
|
|
38533
|
+
http: "GET",
|
|
38534
|
+
path: "/studio/v1/works/{work}/progressions",
|
|
38185
38535
|
streaming: "no",
|
|
38186
38536
|
pagination: false,
|
|
38187
38537
|
pathParams: [
|
|
@@ -38189,26 +38539,81 @@ for more details.`
|
|
|
38189
38539
|
name: "work",
|
|
38190
38540
|
sdkName: "work",
|
|
38191
38541
|
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."
|
|
38192
|
-
}
|
|
38542
|
+
}
|
|
38543
|
+
],
|
|
38544
|
+
query: [
|
|
38193
38545
|
{
|
|
38194
|
-
name: "
|
|
38195
|
-
|
|
38196
|
-
|
|
38546
|
+
name: "entry",
|
|
38547
|
+
type: "string",
|
|
38548
|
+
required: false,
|
|
38549
|
+
description: "Only the changes of this entry, by name, alias or ent_ identifier."
|
|
38550
|
+
}
|
|
38551
|
+
]
|
|
38552
|
+
},
|
|
38553
|
+
{
|
|
38554
|
+
resource: "studio.works.progressions",
|
|
38555
|
+
method: "create",
|
|
38556
|
+
summary: "Record how a setting entry changes at a unit",
|
|
38557
|
+
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.",
|
|
38558
|
+
http: "POST",
|
|
38559
|
+
path: "/studio/v1/works/{work}/progressions",
|
|
38560
|
+
streaming: "no",
|
|
38561
|
+
pagination: false,
|
|
38562
|
+
pathParams: [
|
|
38563
|
+
{
|
|
38564
|
+
name: "work",
|
|
38565
|
+
sdkName: "work",
|
|
38566
|
+
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."
|
|
38197
38567
|
}
|
|
38198
38568
|
],
|
|
38199
38569
|
query: [],
|
|
38200
38570
|
body: {
|
|
38201
|
-
required:
|
|
38571
|
+
required: true,
|
|
38202
38572
|
fields: [
|
|
38203
38573
|
{
|
|
38204
|
-
name: "
|
|
38205
|
-
type: "
|
|
38206
|
-
required:
|
|
38207
|
-
description: "
|
|
38574
|
+
name: "entry",
|
|
38575
|
+
type: "string",
|
|
38576
|
+
required: true,
|
|
38577
|
+
description: "Entry that changes, by name, alias or ent_ identifier; it must be in a library this work mounts."
|
|
38578
|
+
},
|
|
38579
|
+
{
|
|
38580
|
+
name: "unit",
|
|
38581
|
+
type: "string",
|
|
38582
|
+
required: true,
|
|
38583
|
+
description: "Unit from which the change is true, by number such as 3 or by unt_ identifier."
|
|
38584
|
+
},
|
|
38585
|
+
{
|
|
38586
|
+
name: "change",
|
|
38587
|
+
type: "string",
|
|
38588
|
+
required: true,
|
|
38589
|
+
description: "What changes, in a sentence a writer can respect."
|
|
38208
38590
|
}
|
|
38209
38591
|
]
|
|
38210
38592
|
}
|
|
38211
38593
|
},
|
|
38594
|
+
{
|
|
38595
|
+
resource: "studio.works.progressions",
|
|
38596
|
+
method: "delete",
|
|
38597
|
+
summary: "Delete a setting change",
|
|
38598
|
+
description: "Remove one recorded change, by the prg_ identifier the list returns; to correct a change, delete it and record the new one.",
|
|
38599
|
+
http: "DELETE",
|
|
38600
|
+
path: "/studio/v1/works/{work}/progressions/{id}",
|
|
38601
|
+
streaming: "no",
|
|
38602
|
+
pagination: false,
|
|
38603
|
+
pathParams: [
|
|
38604
|
+
{
|
|
38605
|
+
name: "work",
|
|
38606
|
+
sdkName: "work",
|
|
38607
|
+
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."
|
|
38608
|
+
},
|
|
38609
|
+
{
|
|
38610
|
+
name: "id",
|
|
38611
|
+
sdkName: "id",
|
|
38612
|
+
description: "The progression to delete, by its identifier from the list."
|
|
38613
|
+
}
|
|
38614
|
+
],
|
|
38615
|
+
query: []
|
|
38616
|
+
},
|
|
38212
38617
|
{
|
|
38213
38618
|
resource: "studio.works.renditions",
|
|
38214
38619
|
method: "list",
|
|
@@ -38962,7 +39367,7 @@ for more details.`
|
|
|
38962
39367
|
name: "budget_tokens",
|
|
38963
39368
|
type: "integer",
|
|
38964
39369
|
required: false,
|
|
38965
|
-
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."
|
|
39370
|
+
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."
|
|
38966
39371
|
}
|
|
38967
39372
|
]
|
|
38968
39373
|
},
|
|
@@ -48108,6 +48513,63 @@ var devopsTofuStateLock = (options) => (options.client ?? client).post({
|
|
|
48108
48513
|
...options.headers
|
|
48109
48514
|
}
|
|
48110
48515
|
});
|
|
48516
|
+
var devopsChangesList = (options) => (options.client ?? client).get({
|
|
48517
|
+
security: [{
|
|
48518
|
+
key: "devops-bearerAuth",
|
|
48519
|
+
scheme: "bearer",
|
|
48520
|
+
type: "http"
|
|
48521
|
+
}],
|
|
48522
|
+
url: "/devops/v1/projects/{project}/changes",
|
|
48523
|
+
...options
|
|
48524
|
+
});
|
|
48525
|
+
var devopsChangesCreate = (options) => (options.client ?? client).post({
|
|
48526
|
+
security: [{
|
|
48527
|
+
key: "devops-bearerAuth",
|
|
48528
|
+
scheme: "bearer",
|
|
48529
|
+
type: "http"
|
|
48530
|
+
}],
|
|
48531
|
+
url: "/devops/v1/projects/{project}/changes",
|
|
48532
|
+
...options,
|
|
48533
|
+
headers: {
|
|
48534
|
+
"Content-Type": "application/json",
|
|
48535
|
+
...options.headers
|
|
48536
|
+
}
|
|
48537
|
+
});
|
|
48538
|
+
var devopsChangesGet = (options) => (options.client ?? client).get({
|
|
48539
|
+
security: [{
|
|
48540
|
+
key: "devops-bearerAuth",
|
|
48541
|
+
scheme: "bearer",
|
|
48542
|
+
type: "http"
|
|
48543
|
+
}],
|
|
48544
|
+
url: "/devops/v1/changes/{id}",
|
|
48545
|
+
...options
|
|
48546
|
+
});
|
|
48547
|
+
var devopsChangesAbandon = (options) => (options.client ?? client).post({
|
|
48548
|
+
security: [{
|
|
48549
|
+
key: "devops-bearerAuth",
|
|
48550
|
+
scheme: "bearer",
|
|
48551
|
+
type: "http"
|
|
48552
|
+
}],
|
|
48553
|
+
url: "/devops/v1/changes/{id}:abandon",
|
|
48554
|
+
...options,
|
|
48555
|
+
headers: {
|
|
48556
|
+
"Content-Type": "application/json",
|
|
48557
|
+
...options.headers
|
|
48558
|
+
}
|
|
48559
|
+
});
|
|
48560
|
+
var devopsChangesMarkLastSlice = (options) => (options.client ?? client).post({
|
|
48561
|
+
security: [{
|
|
48562
|
+
key: "devops-bearerAuth",
|
|
48563
|
+
scheme: "bearer",
|
|
48564
|
+
type: "http"
|
|
48565
|
+
}],
|
|
48566
|
+
url: "/devops/v1/changes/{id}:markLastSlice",
|
|
48567
|
+
...options,
|
|
48568
|
+
headers: {
|
|
48569
|
+
"Content-Type": "application/json",
|
|
48570
|
+
...options.headers
|
|
48571
|
+
}
|
|
48572
|
+
});
|
|
48111
48573
|
var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
48112
48574
|
security: [{
|
|
48113
48575
|
key: "knowledge-bearerAuth",
|
|
@@ -50014,7 +50476,20 @@ var studioWorksUpdate = (options) => (options.client ?? client).patch({
|
|
|
50014
50476
|
...options.headers
|
|
50015
50477
|
}
|
|
50016
50478
|
});
|
|
50017
|
-
var
|
|
50479
|
+
var studioDraftsList = (options) => (options.client ?? client).get({
|
|
50480
|
+
security: [{
|
|
50481
|
+
key: "BearerAuth",
|
|
50482
|
+
scheme: "bearer",
|
|
50483
|
+
type: "http"
|
|
50484
|
+
}, {
|
|
50485
|
+
key: "ApiKeyAuth",
|
|
50486
|
+
name: "X-API-Key",
|
|
50487
|
+
type: "apiKey"
|
|
50488
|
+
}],
|
|
50489
|
+
url: "/studio/v1/works/{work}/drafts",
|
|
50490
|
+
...options
|
|
50491
|
+
});
|
|
50492
|
+
var studioDraftsCreate = (options) => (options.client ?? client).post({
|
|
50018
50493
|
security: [{
|
|
50019
50494
|
key: "BearerAuth",
|
|
50020
50495
|
scheme: "bearer",
|
|
@@ -50024,14 +50499,14 @@ var studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
|
|
|
50024
50499
|
name: "X-API-Key",
|
|
50025
50500
|
type: "apiKey"
|
|
50026
50501
|
}],
|
|
50027
|
-
url: "/studio/v1/works/{work}/
|
|
50502
|
+
url: "/studio/v1/works/{work}/drafts",
|
|
50028
50503
|
...options,
|
|
50029
50504
|
headers: {
|
|
50030
50505
|
"Content-Type": "application/json",
|
|
50031
50506
|
...options.headers
|
|
50032
50507
|
}
|
|
50033
50508
|
});
|
|
50034
|
-
var
|
|
50509
|
+
var studioDraftsGet = (options) => (options.client ?? client).get({
|
|
50035
50510
|
security: [{
|
|
50036
50511
|
key: "BearerAuth",
|
|
50037
50512
|
scheme: "bearer",
|
|
@@ -50041,10 +50516,10 @@ var studioDraftsList = (options) => (options.client ?? client).get({
|
|
|
50041
50516
|
name: "X-API-Key",
|
|
50042
50517
|
type: "apiKey"
|
|
50043
50518
|
}],
|
|
50044
|
-
url: "/studio/v1/works/{work}/drafts",
|
|
50519
|
+
url: "/studio/v1/works/{work}/drafts/{draft}",
|
|
50045
50520
|
...options
|
|
50046
50521
|
});
|
|
50047
|
-
var
|
|
50522
|
+
var studioDraftsUpdate = (options) => (options.client ?? client).patch({
|
|
50048
50523
|
security: [{
|
|
50049
50524
|
key: "BearerAuth",
|
|
50050
50525
|
scheme: "bearer",
|
|
@@ -50054,14 +50529,14 @@ var studioDraftsCreate = (options) => (options.client ?? client).post({
|
|
|
50054
50529
|
name: "X-API-Key",
|
|
50055
50530
|
type: "apiKey"
|
|
50056
50531
|
}],
|
|
50057
|
-
url: "/studio/v1/works/{work}/drafts",
|
|
50532
|
+
url: "/studio/v1/works/{work}/drafts/{draft}",
|
|
50058
50533
|
...options,
|
|
50059
50534
|
headers: {
|
|
50060
50535
|
"Content-Type": "application/json",
|
|
50061
50536
|
...options.headers
|
|
50062
50537
|
}
|
|
50063
50538
|
});
|
|
50064
|
-
var
|
|
50539
|
+
var studioDraftsUpdateBrief = (options) => (options.client ?? client).patch({
|
|
50065
50540
|
security: [{
|
|
50066
50541
|
key: "BearerAuth",
|
|
50067
50542
|
scheme: "bearer",
|
|
@@ -50071,10 +50546,27 @@ var studioDraftsGet = (options) => (options.client ?? client).get({
|
|
|
50071
50546
|
name: "X-API-Key",
|
|
50072
50547
|
type: "apiKey"
|
|
50073
50548
|
}],
|
|
50074
|
-
url: "/studio/v1/works/{work}/drafts/{draft}",
|
|
50549
|
+
url: "/studio/v1/works/{work}/drafts/{draft}/brief",
|
|
50550
|
+
...options,
|
|
50551
|
+
headers: {
|
|
50552
|
+
"Content-Type": "application/json",
|
|
50553
|
+
...options.headers
|
|
50554
|
+
}
|
|
50555
|
+
});
|
|
50556
|
+
var studioDraftsOutline = (options) => (options.client ?? client).get({
|
|
50557
|
+
security: [{
|
|
50558
|
+
key: "BearerAuth",
|
|
50559
|
+
scheme: "bearer",
|
|
50560
|
+
type: "http"
|
|
50561
|
+
}, {
|
|
50562
|
+
key: "ApiKeyAuth",
|
|
50563
|
+
name: "X-API-Key",
|
|
50564
|
+
type: "apiKey"
|
|
50565
|
+
}],
|
|
50566
|
+
url: "/studio/v1/works/{work}/drafts/{draft}/outline",
|
|
50075
50567
|
...options
|
|
50076
50568
|
});
|
|
50077
|
-
var
|
|
50569
|
+
var studioForeshadowsList = (options) => (options.client ?? client).get({
|
|
50078
50570
|
security: [{
|
|
50079
50571
|
key: "BearerAuth",
|
|
50080
50572
|
scheme: "bearer",
|
|
@@ -50084,14 +50576,40 @@ var studioDraftsUpdate = (options) => (options.client ?? client).patch({
|
|
|
50084
50576
|
name: "X-API-Key",
|
|
50085
50577
|
type: "apiKey"
|
|
50086
50578
|
}],
|
|
50087
|
-
url: "/studio/v1/works/{work}/drafts/{draft}",
|
|
50579
|
+
url: "/studio/v1/works/{work}/drafts/{draft}/foreshadows",
|
|
50580
|
+
...options
|
|
50581
|
+
});
|
|
50582
|
+
var studioForeshadowsDelete = (options) => (options.client ?? client).delete({
|
|
50583
|
+
security: [{
|
|
50584
|
+
key: "BearerAuth",
|
|
50585
|
+
scheme: "bearer",
|
|
50586
|
+
type: "http"
|
|
50587
|
+
}, {
|
|
50588
|
+
key: "ApiKeyAuth",
|
|
50589
|
+
name: "X-API-Key",
|
|
50590
|
+
type: "apiKey"
|
|
50591
|
+
}],
|
|
50592
|
+
url: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
|
|
50593
|
+
...options
|
|
50594
|
+
});
|
|
50595
|
+
var studioForeshadowsUpsert = (options) => (options.client ?? client).put({
|
|
50596
|
+
security: [{
|
|
50597
|
+
key: "BearerAuth",
|
|
50598
|
+
scheme: "bearer",
|
|
50599
|
+
type: "http"
|
|
50600
|
+
}, {
|
|
50601
|
+
key: "ApiKeyAuth",
|
|
50602
|
+
name: "X-API-Key",
|
|
50603
|
+
type: "apiKey"
|
|
50604
|
+
}],
|
|
50605
|
+
url: "/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}",
|
|
50088
50606
|
...options,
|
|
50089
50607
|
headers: {
|
|
50090
50608
|
"Content-Type": "application/json",
|
|
50091
50609
|
...options.headers
|
|
50092
50610
|
}
|
|
50093
50611
|
});
|
|
50094
|
-
var
|
|
50612
|
+
var studioProgressionsList = (options) => (options.client ?? client).get({
|
|
50095
50613
|
security: [{
|
|
50096
50614
|
key: "BearerAuth",
|
|
50097
50615
|
scheme: "bearer",
|
|
@@ -50101,7 +50619,37 @@ var studioDraftsOutline = (options) => (options.client ?? client).get({
|
|
|
50101
50619
|
name: "X-API-Key",
|
|
50102
50620
|
type: "apiKey"
|
|
50103
50621
|
}],
|
|
50104
|
-
url: "/studio/v1/works/{work}/
|
|
50622
|
+
url: "/studio/v1/works/{work}/progressions",
|
|
50623
|
+
...options
|
|
50624
|
+
});
|
|
50625
|
+
var studioProgressionsCreate = (options) => (options.client ?? client).post({
|
|
50626
|
+
security: [{
|
|
50627
|
+
key: "BearerAuth",
|
|
50628
|
+
scheme: "bearer",
|
|
50629
|
+
type: "http"
|
|
50630
|
+
}, {
|
|
50631
|
+
key: "ApiKeyAuth",
|
|
50632
|
+
name: "X-API-Key",
|
|
50633
|
+
type: "apiKey"
|
|
50634
|
+
}],
|
|
50635
|
+
url: "/studio/v1/works/{work}/progressions",
|
|
50636
|
+
...options,
|
|
50637
|
+
headers: {
|
|
50638
|
+
"Content-Type": "application/json",
|
|
50639
|
+
...options.headers
|
|
50640
|
+
}
|
|
50641
|
+
});
|
|
50642
|
+
var studioProgressionsDelete = (options) => (options.client ?? client).delete({
|
|
50643
|
+
security: [{
|
|
50644
|
+
key: "BearerAuth",
|
|
50645
|
+
scheme: "bearer",
|
|
50646
|
+
type: "http"
|
|
50647
|
+
}, {
|
|
50648
|
+
key: "ApiKeyAuth",
|
|
50649
|
+
name: "X-API-Key",
|
|
50650
|
+
type: "apiKey"
|
|
50651
|
+
}],
|
|
50652
|
+
url: "/studio/v1/works/{work}/progressions/{id}",
|
|
50105
50653
|
...options
|
|
50106
50654
|
});
|
|
50107
50655
|
var studioDraftsStatus = (options) => (options.client ?? client).get({
|
|
@@ -52366,6 +52914,11 @@ function createDatabase(transport) {
|
|
|
52366
52914
|
}
|
|
52367
52915
|
function createDevops(transport) {
|
|
52368
52916
|
return {
|
|
52917
|
+
changes: {
|
|
52918
|
+
abandon: bind(transport, devopsChangesAbandon),
|
|
52919
|
+
markLastSlice: bind(transport, devopsChangesMarkLastSlice),
|
|
52920
|
+
retrieve: bind(transport, devopsChangesGet)
|
|
52921
|
+
},
|
|
52369
52922
|
environments: {
|
|
52370
52923
|
checkpoints: {
|
|
52371
52924
|
list: bind(transport, devopsEnvironmentsCheckpointsList)
|
|
@@ -52388,6 +52941,10 @@ function createDevops(transport) {
|
|
|
52388
52941
|
rollback: bind(transport, devopsProgressiveRolloutsRollback)
|
|
52389
52942
|
},
|
|
52390
52943
|
projects: {
|
|
52944
|
+
changes: {
|
|
52945
|
+
create: bind(transport, devopsChangesCreate),
|
|
52946
|
+
list: bind(transport, devopsChangesList)
|
|
52947
|
+
},
|
|
52391
52948
|
environments: {
|
|
52392
52949
|
list: bind(transport, devopsEnvironmentsList),
|
|
52393
52950
|
targets: {
|
|
@@ -52944,6 +53501,11 @@ function createStudio(transport) {
|
|
|
52944
53501
|
create: bind(transport, studioWorksCreate),
|
|
52945
53502
|
drafts: {
|
|
52946
53503
|
create: bind(transport, studioDraftsCreate),
|
|
53504
|
+
foreshadows: {
|
|
53505
|
+
delete: bind(transport, studioForeshadowsDelete),
|
|
53506
|
+
list: bind(transport, studioForeshadowsList),
|
|
53507
|
+
update: bind(transport, studioForeshadowsUpsert)
|
|
53508
|
+
},
|
|
52947
53509
|
list: bind(transport, studioDraftsList),
|
|
52948
53510
|
rebase: bind(transport, studioDraftsRebase),
|
|
52949
53511
|
renditions: {
|
|
@@ -52961,9 +53523,15 @@ function createStudio(transport) {
|
|
|
52961
53523
|
batchUpdate: bind(transport, studioUnitsBatchUpdate),
|
|
52962
53524
|
create: bind(transport, studioUnitsCreate)
|
|
52963
53525
|
},
|
|
52964
|
-
update: bind(transport, studioDraftsUpdate)
|
|
53526
|
+
update: bind(transport, studioDraftsUpdate),
|
|
53527
|
+
updateBrief: bind(transport, studioDraftsUpdateBrief)
|
|
52965
53528
|
},
|
|
52966
53529
|
list: bind(transport, studioWorksList),
|
|
53530
|
+
progressions: {
|
|
53531
|
+
create: bind(transport, studioProgressionsCreate),
|
|
53532
|
+
delete: bind(transport, studioProgressionsDelete),
|
|
53533
|
+
list: bind(transport, studioProgressionsList)
|
|
53534
|
+
},
|
|
52967
53535
|
renditions: {
|
|
52968
53536
|
delete: bind(transport, studioRenditionsDelete),
|
|
52969
53537
|
list: bind(transport, studioRenditionsList),
|
|
@@ -53000,8 +53568,7 @@ function createStudio(transport) {
|
|
|
53000
53568
|
retrieveContext: bind(transport, studioUnitsContext),
|
|
53001
53569
|
update: bind(transport, studioUnitsUpdate)
|
|
53002
53570
|
},
|
|
53003
|
-
update: bind(transport, studioWorksUpdate)
|
|
53004
|
-
updateBrief: bind(transport, studioWorksUpdateBrief)
|
|
53571
|
+
update: bind(transport, studioWorksUpdate)
|
|
53005
53572
|
}
|
|
53006
53573
|
};
|
|
53007
53574
|
}
|
|
@@ -57245,21 +57812,48 @@ function parseTofuDeployArgs(flags) {
|
|
|
57245
57812
|
...flags.workdir ? { workdir: flags.workdir } : {}
|
|
57246
57813
|
};
|
|
57247
57814
|
}
|
|
57248
|
-
function
|
|
57815
|
+
function isExcludedPath(path, exclude) {
|
|
57816
|
+
return exclude.some((pattern) => matchesPattern(pattern, path));
|
|
57817
|
+
}
|
|
57818
|
+
function excludedTargets(plan, environment2, adapters, exclude) {
|
|
57819
|
+
if (exclude.length === 0)
|
|
57820
|
+
return [];
|
|
57821
|
+
return targetsFor(plan, environment2).filter((t) => adapters.has(t.destination) && deploysTo(t, environment2, { named: false }) && isExcludedPath(t.path, exclude)).map((t) => t.path).sort();
|
|
57822
|
+
}
|
|
57823
|
+
function excludedDependencies(targets, excluded) {
|
|
57824
|
+
const dropped = new Set(excluded);
|
|
57825
|
+
const found = [];
|
|
57826
|
+
for (const t of targets)
|
|
57827
|
+
for (const dependency of t.dependsOn) {
|
|
57828
|
+
if (dropped.has(dependency))
|
|
57829
|
+
found.push({ target: t.path, dependency });
|
|
57830
|
+
}
|
|
57831
|
+
return found;
|
|
57832
|
+
}
|
|
57833
|
+
function selectTargets(plan, environment2, requested, adapters, exclude = []) {
|
|
57249
57834
|
const named = requested !== undefined;
|
|
57250
|
-
|
|
57835
|
+
const dropped = excludedTargets(plan, environment2, adapters, exclude);
|
|
57836
|
+
let targets = targetsFor(plan, environment2).filter((t) => adapters.has(t.destination) && deploysTo(t, environment2, { named }) && !isExcludedPath(t.path, exclude));
|
|
57251
57837
|
if (requested !== undefined) {
|
|
57252
57838
|
const known = new Set(plan.targets.map((t) => t.path));
|
|
57253
57839
|
const missing = requested.filter((r) => !known.has(r));
|
|
57254
57840
|
if (missing.length > 0)
|
|
57255
57841
|
throw new UsageError(`unknown target(s): ${missing.join(", ")}`, "Run `praxis devops deploy plan` to list the targets.");
|
|
57842
|
+
const excludedNamed = requested.filter((r) => isExcludedPath(r, exclude));
|
|
57843
|
+
if (excludedNamed.length > 0) {
|
|
57844
|
+
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.");
|
|
57845
|
+
}
|
|
57256
57846
|
const refused = requested.filter((r) => !targets.some((t) => t.path === r));
|
|
57257
57847
|
if (refused.length > 0)
|
|
57258
57848
|
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.");
|
|
57259
57849
|
targets = targets.filter((t) => requested.includes(t.path));
|
|
57260
57850
|
}
|
|
57851
|
+
const orphaned = excludedDependencies(targets, dropped);
|
|
57852
|
+
if (orphaned.length > 0) {
|
|
57853
|
+
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.");
|
|
57854
|
+
}
|
|
57261
57855
|
const selected = { commit: plan.commit, targets };
|
|
57262
|
-
return { targets, layers: layersOf(selected).map((layer) => [...layer]) };
|
|
57856
|
+
return { targets, layers: layersOf(selected).map((layer) => [...layer]), excluded: dropped };
|
|
57263
57857
|
}
|
|
57264
57858
|
function blockedBy(targets, broken) {
|
|
57265
57859
|
const blocked = new Set;
|
|
@@ -57294,6 +57888,7 @@ var DEPLOY_SHAPE = `devops:
|
|
|
57294
57888
|
deploy:
|
|
57295
57889
|
adapters:
|
|
57296
57890
|
cloudflare: bun tofu/adapter.ts
|
|
57891
|
+
exclude: ["**/spec/features/*"] # optional
|
|
57297
57892
|
policy:
|
|
57298
57893
|
forbiddenNames: <path> # optional`;
|
|
57299
57894
|
function parseDeployProject(file) {
|
|
@@ -57323,7 +57918,16 @@ ${DEPLOY_SHAPE}`);
|
|
|
57323
57918
|
const forbiddenNames = object(policy) ? policy.forbiddenNames : undefined;
|
|
57324
57919
|
if (forbiddenNames !== undefined && (typeof forbiddenNames !== "string" || forbiddenNames.trim() === ""))
|
|
57325
57920
|
refuse("devops.deploy.policy.forbiddenNames must be a repository path");
|
|
57326
|
-
|
|
57921
|
+
const declaredExclude = deploy.exclude;
|
|
57922
|
+
if (declaredExclude !== undefined && (!Array.isArray(declaredExclude) || declaredExclude.some((e) => typeof e !== "string" || e.trim() === ""))) {
|
|
57923
|
+
refuse("devops.deploy.exclude must be a list of non-empty workspace globs");
|
|
57924
|
+
}
|
|
57925
|
+
const exclude = Array.isArray(declaredExclude) ? declaredExclude.map((e) => e.trim().replace(/^\.\//, "").replace(/\/+$/, "")) : [];
|
|
57926
|
+
return {
|
|
57927
|
+
adapters,
|
|
57928
|
+
...typeof forbiddenNames === "string" ? { forbiddenNames: forbiddenNames.trim() } : {},
|
|
57929
|
+
...exclude.length > 0 ? { exclude } : {}
|
|
57930
|
+
};
|
|
57327
57931
|
}
|
|
57328
57932
|
function adapterEnv(input) {
|
|
57329
57933
|
return {
|
|
@@ -57396,6 +58000,36 @@ function backendDocument(backend, target) {
|
|
|
57396
58000
|
|
|
57397
58001
|
// src/devops/tofu/run.ts
|
|
57398
58002
|
import { dirname as dirname4, isAbsolute, resolve as resolve3 } from "node:path";
|
|
58003
|
+
function plannedTargetsOf(summaryText) {
|
|
58004
|
+
if (summaryText === null)
|
|
58005
|
+
return;
|
|
58006
|
+
try {
|
|
58007
|
+
const summary = JSON.parse(summaryText);
|
|
58008
|
+
if (!Array.isArray(summary.targets))
|
|
58009
|
+
return;
|
|
58010
|
+
return summary.targets.filter((t) => t.status === "planned" && typeof t.target === "string").map((t) => t.target);
|
|
58011
|
+
} catch {
|
|
58012
|
+
return;
|
|
58013
|
+
}
|
|
58014
|
+
}
|
|
58015
|
+
function planReadyLine(summary) {
|
|
58016
|
+
const planned = new Set(summary.targets.filter((t) => t.status === "planned").map((t) => t.target));
|
|
58017
|
+
const layers = summary.layers.map((layer) => layer.filter((path) => planned.has(path))).filter((layer) => layer.length > 0);
|
|
58018
|
+
const migrations = summary.targets.flatMap((t) => {
|
|
58019
|
+
const files = t.status === "planned" ? t.pending.filter((line) => line.startsWith("d1 migrations ")) : [];
|
|
58020
|
+
return files.length === 0 ? [] : [{ targetPath: t.target, files }];
|
|
58021
|
+
});
|
|
58022
|
+
return { type: "plan.ready", layers, migrations };
|
|
58023
|
+
}
|
|
58024
|
+
function failureDigest(summary) {
|
|
58025
|
+
const count2 = (status) => summary.targets.filter((t) => t.status === status).length;
|
|
58026
|
+
const lines = [`RESULT ${summary.finished} planned=${count2("planned")} succeeded=${count2("succeeded")} failed=${count2("failed")} blocked=${count2("blocked")}`];
|
|
58027
|
+
for (const t of summary.targets) {
|
|
58028
|
+
if (t.status === "failed" || t.status === "blocked" && t.message !== "a target it depends on did not finish")
|
|
58029
|
+
lines.push(`FAILED ${t.target}: ${t.message ?? t.status}`);
|
|
58030
|
+
}
|
|
58031
|
+
return lines;
|
|
58032
|
+
}
|
|
57399
58033
|
var BACKEND_FILE = "praxis_backend.tf.json";
|
|
57400
58034
|
async function runTofuDeploy(args, plan, ports) {
|
|
57401
58035
|
const { fs, exec, out } = ports;
|
|
@@ -57407,9 +58041,12 @@ async function runTofuDeploy(args, plan, ports) {
|
|
|
57407
58041
|
const applying = args.mode !== "plan-only";
|
|
57408
58042
|
const events = applying && args.eventsFile !== undefined ? ports.openEvents(args.eventsFile, startedAt) : undefined;
|
|
57409
58043
|
const reports = new Map;
|
|
57410
|
-
const
|
|
58044
|
+
const targets = args.targets ?? (args.mode === "apply-plans" ? plannedTargetsOf(await fs.read(`${planDir}/summary.json`)) : undefined);
|
|
58045
|
+
const selection = selectTargets(plan, args.environment, targets, new Set(Object.keys(ports.project.adapters)), ports.project.exclude ?? []);
|
|
57411
58046
|
const byPath = new Map(selection.targets.map((t) => [t.path, t]));
|
|
57412
58047
|
const redact = (line) => ports.state.password === "" ? line : line.split(ports.state.password).join("***");
|
|
58048
|
+
for (const path of selection.excluded)
|
|
58049
|
+
out(`excluded by praxis.yaml: ${path}`);
|
|
57413
58050
|
const finish = (finished2, message2) => {
|
|
57414
58051
|
if (events)
|
|
57415
58052
|
events.finish(message2 === undefined ? {} : { message: message2 });
|
|
@@ -57425,6 +58062,9 @@ async function runTofuDeploy(args, plan, ports) {
|
|
|
57425
58062
|
};
|
|
57426
58063
|
const writeSummary = async (summary) => {
|
|
57427
58064
|
await fs.write(`${planDir}/summary.json`, `${JSON.stringify(summary, null, 2)}
|
|
58065
|
+
`);
|
|
58066
|
+
if (args.mode === "plan-only")
|
|
58067
|
+
await fs.write(`${planDir}/plan-ready.json`, `${JSON.stringify(planReadyLine(summary))}
|
|
57428
58068
|
`);
|
|
57429
58069
|
out(`SUMMARY ${JSON.stringify(summary)}`);
|
|
57430
58070
|
};
|
|
@@ -57909,6 +58549,8 @@ async function devopsDeployTofu(flags, ports) {
|
|
|
57909
58549
|
out: ports.stdout
|
|
57910
58550
|
});
|
|
57911
58551
|
ports.emit({ kind: "object", data: result.summary });
|
|
58552
|
+
for (const line of failureDigest(result.summary))
|
|
58553
|
+
ports.stdout(line);
|
|
57912
58554
|
return result.exitCode;
|
|
57913
58555
|
}
|
|
57914
58556
|
|
|
@@ -61133,7 +61775,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
61133
61775
|
}
|
|
61134
61776
|
|
|
61135
61777
|
// src/main.ts
|
|
61136
|
-
var version = "0.3.0-dev.
|
|
61778
|
+
var version = "0.3.0-dev.9fc067f";
|
|
61137
61779
|
var commands = commandTree(operations);
|
|
61138
61780
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
61139
61781
|
function route(argv) {
|