@deepraxis/cli 0.3.0-dev.47e949a → 0.3.0-dev.4e5fc1f
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 +15 -4
- package/dist/praxis.js +775 -140
- 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:
|
|
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",
|
|
@@ -29730,7 +29927,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
29730
29927
|
resource: "media.speech",
|
|
29731
29928
|
method: "create",
|
|
29732
29929
|
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 and voice is
|
|
29930
|
+
description: "Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is billed by the model usage it consumes, at the same prices as the model API, and the job records the charge in usage; a request refused before it starts costs nothing. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {\"input\":\"A red kite above a calm sea at sunrise.\"}, or with {\"input\":\"A red kite above a calm sea at sunrise.\",\"voice\":\"zh_female_wenroumama_uranus_bigtts\"} for a gentle female voice.",
|
|
29734
29931
|
http: "POST",
|
|
29735
29932
|
path: "/media/v1/libraries/{library_id}/audio/speech",
|
|
29736
29933
|
streaming: "no",
|
|
@@ -29755,8 +29952,8 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
29755
29952
|
{
|
|
29756
29953
|
name: "voice",
|
|
29757
29954
|
type: "string",
|
|
29758
|
-
required:
|
|
29759
|
-
description: "Voice
|
|
29955
|
+
required: false,
|
|
29956
|
+
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
29957
|
},
|
|
29761
29958
|
{
|
|
29762
29959
|
name: "instructions",
|
|
@@ -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",
|
|
@@ -37675,6 +37809,12 @@ for more details.`
|
|
|
37675
37809
|
required: true,
|
|
37676
37810
|
description: "Genre key the draft is written in, taken from the genre list; it decides the unit kinds, the properties and the checks."
|
|
37677
37811
|
},
|
|
37812
|
+
{
|
|
37813
|
+
name: "key",
|
|
37814
|
+
type: "string",
|
|
37815
|
+
required: false,
|
|
37816
|
+
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."
|
|
37817
|
+
},
|
|
37678
37818
|
{
|
|
37679
37819
|
name: "title",
|
|
37680
37820
|
type: "string",
|
|
@@ -37710,6 +37850,12 @@ for more details.`
|
|
|
37710
37850
|
required: false,
|
|
37711
37851
|
description: "What the new draft should be derived from, so the service can record the source revision for later staleness checks."
|
|
37712
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
|
+
},
|
|
37713
37859
|
{
|
|
37714
37860
|
name: "props",
|
|
37715
37861
|
type: "object",
|
|
@@ -37835,6 +37981,80 @@ for more details.`
|
|
|
37835
37981
|
]
|
|
37836
37982
|
}
|
|
37837
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
|
+
},
|
|
37838
38058
|
{
|
|
37839
38059
|
resource: "studio.works.drafts",
|
|
37840
38060
|
method: "retrieveExport",
|
|
@@ -37869,6 +38089,108 @@ for more details.`
|
|
|
37869
38089
|
}
|
|
37870
38090
|
]
|
|
37871
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
|
+
},
|
|
37872
38194
|
{
|
|
37873
38195
|
resource: "studio.works.drafts",
|
|
37874
38196
|
method: "retrieveOutline",
|
|
@@ -38110,31 +38432,72 @@ for more details.`
|
|
|
38110
38432
|
name: "expected_revision",
|
|
38111
38433
|
type: "integer",
|
|
38112
38434
|
required: false,
|
|
38113
|
-
description: "Draft revision the caller read; a mismatch is refused, which is what stops a repeated batch from duplicating a structure."
|
|
38114
|
-
},
|
|
38115
|
-
{
|
|
38116
|
-
name: "parent",
|
|
38117
|
-
type: "string",
|
|
38118
|
-
required: false,
|
|
38119
|
-
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."
|
|
38120
38483
|
},
|
|
38121
38484
|
{
|
|
38122
|
-
name: "
|
|
38485
|
+
name: "updates",
|
|
38123
38486
|
type: "array",
|
|
38124
38487
|
itemType: "object",
|
|
38125
38488
|
required: true,
|
|
38126
|
-
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."
|
|
38127
38490
|
}
|
|
38128
38491
|
]
|
|
38129
38492
|
}
|
|
38130
38493
|
},
|
|
38131
38494
|
{
|
|
38132
|
-
resource: "studio.works.drafts
|
|
38133
|
-
method: "
|
|
38134
|
-
summary: "
|
|
38135
|
-
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.",
|
|
38136
38499
|
http: "POST",
|
|
38137
|
-
path: "/studio/v1/works/{work}/drafts/{draft}
|
|
38500
|
+
path: "/studio/v1/works/{work}/drafts/{draft}:rebase",
|
|
38138
38501
|
streaming: "no",
|
|
38139
38502
|
pagination: false,
|
|
38140
38503
|
pathParams: [
|
|
@@ -38151,31 +38514,24 @@ for more details.`
|
|
|
38151
38514
|
],
|
|
38152
38515
|
query: [],
|
|
38153
38516
|
body: {
|
|
38154
|
-
required:
|
|
38517
|
+
required: false,
|
|
38155
38518
|
fields: [
|
|
38156
38519
|
{
|
|
38157
38520
|
name: "expected_revision",
|
|
38158
38521
|
type: "integer",
|
|
38159
38522
|
required: false,
|
|
38160
|
-
description: "Draft revision the caller read; a mismatch is refused
|
|
38161
|
-
},
|
|
38162
|
-
{
|
|
38163
|
-
name: "updates",
|
|
38164
|
-
type: "array",
|
|
38165
|
-
itemType: "object",
|
|
38166
|
-
required: true,
|
|
38167
|
-
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."
|
|
38168
38524
|
}
|
|
38169
38525
|
]
|
|
38170
38526
|
}
|
|
38171
38527
|
},
|
|
38172
38528
|
{
|
|
38173
|
-
resource: "studio.works.
|
|
38174
|
-
method: "
|
|
38175
|
-
summary: "
|
|
38176
|
-
description: "
|
|
38177
|
-
http: "
|
|
38178
|
-
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",
|
|
38179
38535
|
streaming: "no",
|
|
38180
38536
|
pagination: false,
|
|
38181
38537
|
pathParams: [
|
|
@@ -38183,26 +38539,81 @@ for more details.`
|
|
|
38183
38539
|
name: "work",
|
|
38184
38540
|
sdkName: "work",
|
|
38185
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."
|
|
38186
|
-
}
|
|
38542
|
+
}
|
|
38543
|
+
],
|
|
38544
|
+
query: [
|
|
38187
38545
|
{
|
|
38188
|
-
name: "
|
|
38189
|
-
|
|
38190
|
-
|
|
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."
|
|
38191
38567
|
}
|
|
38192
38568
|
],
|
|
38193
38569
|
query: [],
|
|
38194
38570
|
body: {
|
|
38195
|
-
required:
|
|
38571
|
+
required: true,
|
|
38196
38572
|
fields: [
|
|
38197
38573
|
{
|
|
38198
|
-
name: "
|
|
38199
|
-
type: "
|
|
38200
|
-
required:
|
|
38201
|
-
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."
|
|
38202
38590
|
}
|
|
38203
38591
|
]
|
|
38204
38592
|
}
|
|
38205
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
|
+
},
|
|
38206
38617
|
{
|
|
38207
38618
|
resource: "studio.works.renditions",
|
|
38208
38619
|
method: "list",
|
|
@@ -38956,7 +39367,7 @@ for more details.`
|
|
|
38956
39367
|
name: "budget_tokens",
|
|
38957
39368
|
type: "integer",
|
|
38958
39369
|
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."
|
|
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."
|
|
38960
39371
|
}
|
|
38961
39372
|
]
|
|
38962
39373
|
},
|
|
@@ -48102,6 +48513,63 @@ var devopsTofuStateLock = (options) => (options.client ?? client).post({
|
|
|
48102
48513
|
...options.headers
|
|
48103
48514
|
}
|
|
48104
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
|
+
});
|
|
48105
48573
|
var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
48106
48574
|
security: [{
|
|
48107
48575
|
key: "knowledge-bearerAuth",
|
|
@@ -50008,7 +50476,7 @@ var studioWorksUpdate = (options) => (options.client ?? client).patch({
|
|
|
50008
50476
|
...options.headers
|
|
50009
50477
|
}
|
|
50010
50478
|
});
|
|
50011
|
-
var
|
|
50479
|
+
var studioDraftsList = (options) => (options.client ?? client).get({
|
|
50012
50480
|
security: [{
|
|
50013
50481
|
key: "BearerAuth",
|
|
50014
50482
|
scheme: "bearer",
|
|
@@ -50018,14 +50486,27 @@ var studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
|
|
|
50018
50486
|
name: "X-API-Key",
|
|
50019
50487
|
type: "apiKey"
|
|
50020
50488
|
}],
|
|
50021
|
-
url: "/studio/v1/works/{work}/
|
|
50489
|
+
url: "/studio/v1/works/{work}/drafts",
|
|
50490
|
+
...options
|
|
50491
|
+
});
|
|
50492
|
+
var studioDraftsCreate = (options) => (options.client ?? client).post({
|
|
50493
|
+
security: [{
|
|
50494
|
+
key: "BearerAuth",
|
|
50495
|
+
scheme: "bearer",
|
|
50496
|
+
type: "http"
|
|
50497
|
+
}, {
|
|
50498
|
+
key: "ApiKeyAuth",
|
|
50499
|
+
name: "X-API-Key",
|
|
50500
|
+
type: "apiKey"
|
|
50501
|
+
}],
|
|
50502
|
+
url: "/studio/v1/works/{work}/drafts",
|
|
50022
50503
|
...options,
|
|
50023
50504
|
headers: {
|
|
50024
50505
|
"Content-Type": "application/json",
|
|
50025
50506
|
...options.headers
|
|
50026
50507
|
}
|
|
50027
50508
|
});
|
|
50028
|
-
var
|
|
50509
|
+
var studioDraftsGet = (options) => (options.client ?? client).get({
|
|
50029
50510
|
security: [{
|
|
50030
50511
|
key: "BearerAuth",
|
|
50031
50512
|
scheme: "bearer",
|
|
@@ -50035,10 +50516,10 @@ var studioDraftsList = (options) => (options.client ?? client).get({
|
|
|
50035
50516
|
name: "X-API-Key",
|
|
50036
50517
|
type: "apiKey"
|
|
50037
50518
|
}],
|
|
50038
|
-
url: "/studio/v1/works/{work}/drafts",
|
|
50519
|
+
url: "/studio/v1/works/{work}/drafts/{draft}",
|
|
50039
50520
|
...options
|
|
50040
50521
|
});
|
|
50041
|
-
var
|
|
50522
|
+
var studioDraftsUpdate = (options) => (options.client ?? client).patch({
|
|
50042
50523
|
security: [{
|
|
50043
50524
|
key: "BearerAuth",
|
|
50044
50525
|
scheme: "bearer",
|
|
@@ -50048,14 +50529,14 @@ var studioDraftsCreate = (options) => (options.client ?? client).post({
|
|
|
50048
50529
|
name: "X-API-Key",
|
|
50049
50530
|
type: "apiKey"
|
|
50050
50531
|
}],
|
|
50051
|
-
url: "/studio/v1/works/{work}/drafts",
|
|
50532
|
+
url: "/studio/v1/works/{work}/drafts/{draft}",
|
|
50052
50533
|
...options,
|
|
50053
50534
|
headers: {
|
|
50054
50535
|
"Content-Type": "application/json",
|
|
50055
50536
|
...options.headers
|
|
50056
50537
|
}
|
|
50057
50538
|
});
|
|
50058
|
-
var
|
|
50539
|
+
var studioDraftsUpdateBrief = (options) => (options.client ?? client).patch({
|
|
50059
50540
|
security: [{
|
|
50060
50541
|
key: "BearerAuth",
|
|
50061
50542
|
scheme: "bearer",
|
|
@@ -50065,10 +50546,27 @@ var studioDraftsGet = (options) => (options.client ?? client).get({
|
|
|
50065
50546
|
name: "X-API-Key",
|
|
50066
50547
|
type: "apiKey"
|
|
50067
50548
|
}],
|
|
50068
|
-
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",
|
|
50069
50567
|
...options
|
|
50070
50568
|
});
|
|
50071
|
-
var
|
|
50569
|
+
var studioForeshadowsList = (options) => (options.client ?? client).get({
|
|
50072
50570
|
security: [{
|
|
50073
50571
|
key: "BearerAuth",
|
|
50074
50572
|
scheme: "bearer",
|
|
@@ -50078,14 +50576,40 @@ var studioDraftsUpdate = (options) => (options.client ?? client).patch({
|
|
|
50078
50576
|
name: "X-API-Key",
|
|
50079
50577
|
type: "apiKey"
|
|
50080
50578
|
}],
|
|
50081
|
-
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}",
|
|
50082
50606
|
...options,
|
|
50083
50607
|
headers: {
|
|
50084
50608
|
"Content-Type": "application/json",
|
|
50085
50609
|
...options.headers
|
|
50086
50610
|
}
|
|
50087
50611
|
});
|
|
50088
|
-
var
|
|
50612
|
+
var studioProgressionsList = (options) => (options.client ?? client).get({
|
|
50089
50613
|
security: [{
|
|
50090
50614
|
key: "BearerAuth",
|
|
50091
50615
|
scheme: "bearer",
|
|
@@ -50095,7 +50619,37 @@ var studioDraftsOutline = (options) => (options.client ?? client).get({
|
|
|
50095
50619
|
name: "X-API-Key",
|
|
50096
50620
|
type: "apiKey"
|
|
50097
50621
|
}],
|
|
50098
|
-
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}",
|
|
50099
50653
|
...options
|
|
50100
50654
|
});
|
|
50101
50655
|
var studioDraftsStatus = (options) => (options.client ?? client).get({
|
|
@@ -52360,6 +52914,11 @@ function createDatabase(transport) {
|
|
|
52360
52914
|
}
|
|
52361
52915
|
function createDevops(transport) {
|
|
52362
52916
|
return {
|
|
52917
|
+
changes: {
|
|
52918
|
+
abandon: bind(transport, devopsChangesAbandon),
|
|
52919
|
+
markLastSlice: bind(transport, devopsChangesMarkLastSlice),
|
|
52920
|
+
retrieve: bind(transport, devopsChangesGet)
|
|
52921
|
+
},
|
|
52363
52922
|
environments: {
|
|
52364
52923
|
checkpoints: {
|
|
52365
52924
|
list: bind(transport, devopsEnvironmentsCheckpointsList)
|
|
@@ -52382,6 +52941,10 @@ function createDevops(transport) {
|
|
|
52382
52941
|
rollback: bind(transport, devopsProgressiveRolloutsRollback)
|
|
52383
52942
|
},
|
|
52384
52943
|
projects: {
|
|
52944
|
+
changes: {
|
|
52945
|
+
create: bind(transport, devopsChangesCreate),
|
|
52946
|
+
list: bind(transport, devopsChangesList)
|
|
52947
|
+
},
|
|
52385
52948
|
environments: {
|
|
52386
52949
|
list: bind(transport, devopsEnvironmentsList),
|
|
52387
52950
|
targets: {
|
|
@@ -52938,6 +53501,11 @@ function createStudio(transport) {
|
|
|
52938
53501
|
create: bind(transport, studioWorksCreate),
|
|
52939
53502
|
drafts: {
|
|
52940
53503
|
create: bind(transport, studioDraftsCreate),
|
|
53504
|
+
foreshadows: {
|
|
53505
|
+
delete: bind(transport, studioForeshadowsDelete),
|
|
53506
|
+
list: bind(transport, studioForeshadowsList),
|
|
53507
|
+
update: bind(transport, studioForeshadowsUpsert)
|
|
53508
|
+
},
|
|
52941
53509
|
list: bind(transport, studioDraftsList),
|
|
52942
53510
|
rebase: bind(transport, studioDraftsRebase),
|
|
52943
53511
|
renditions: {
|
|
@@ -52955,9 +53523,15 @@ function createStudio(transport) {
|
|
|
52955
53523
|
batchUpdate: bind(transport, studioUnitsBatchUpdate),
|
|
52956
53524
|
create: bind(transport, studioUnitsCreate)
|
|
52957
53525
|
},
|
|
52958
|
-
update: bind(transport, studioDraftsUpdate)
|
|
53526
|
+
update: bind(transport, studioDraftsUpdate),
|
|
53527
|
+
updateBrief: bind(transport, studioDraftsUpdateBrief)
|
|
52959
53528
|
},
|
|
52960
53529
|
list: bind(transport, studioWorksList),
|
|
53530
|
+
progressions: {
|
|
53531
|
+
create: bind(transport, studioProgressionsCreate),
|
|
53532
|
+
delete: bind(transport, studioProgressionsDelete),
|
|
53533
|
+
list: bind(transport, studioProgressionsList)
|
|
53534
|
+
},
|
|
52961
53535
|
renditions: {
|
|
52962
53536
|
delete: bind(transport, studioRenditionsDelete),
|
|
52963
53537
|
list: bind(transport, studioRenditionsList),
|
|
@@ -52994,8 +53568,7 @@ function createStudio(transport) {
|
|
|
52994
53568
|
retrieveContext: bind(transport, studioUnitsContext),
|
|
52995
53569
|
update: bind(transport, studioUnitsUpdate)
|
|
52996
53570
|
},
|
|
52997
|
-
update: bind(transport, studioWorksUpdate)
|
|
52998
|
-
updateBrief: bind(transport, studioWorksUpdateBrief)
|
|
53571
|
+
update: bind(transport, studioWorksUpdate)
|
|
52999
53572
|
}
|
|
53000
53573
|
};
|
|
53001
53574
|
}
|
|
@@ -57239,21 +57812,48 @@ function parseTofuDeployArgs(flags) {
|
|
|
57239
57812
|
...flags.workdir ? { workdir: flags.workdir } : {}
|
|
57240
57813
|
};
|
|
57241
57814
|
}
|
|
57242
|
-
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 = []) {
|
|
57243
57834
|
const named = requested !== undefined;
|
|
57244
|
-
|
|
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));
|
|
57245
57837
|
if (requested !== undefined) {
|
|
57246
57838
|
const known = new Set(plan.targets.map((t) => t.path));
|
|
57247
57839
|
const missing = requested.filter((r) => !known.has(r));
|
|
57248
57840
|
if (missing.length > 0)
|
|
57249
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
|
+
}
|
|
57250
57846
|
const refused = requested.filter((r) => !targets.some((t) => t.path === r));
|
|
57251
57847
|
if (refused.length > 0)
|
|
57252
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.");
|
|
57253
57849
|
targets = targets.filter((t) => requested.includes(t.path));
|
|
57254
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
|
+
}
|
|
57255
57855
|
const selected = { commit: plan.commit, targets };
|
|
57256
|
-
return { targets, layers: layersOf(selected).map((layer) => [...layer]) };
|
|
57856
|
+
return { targets, layers: layersOf(selected).map((layer) => [...layer]), excluded: dropped };
|
|
57257
57857
|
}
|
|
57258
57858
|
function blockedBy(targets, broken) {
|
|
57259
57859
|
const blocked = new Set;
|
|
@@ -57288,6 +57888,7 @@ var DEPLOY_SHAPE = `devops:
|
|
|
57288
57888
|
deploy:
|
|
57289
57889
|
adapters:
|
|
57290
57890
|
cloudflare: bun tofu/adapter.ts
|
|
57891
|
+
exclude: ["**/spec/features/*"] # optional
|
|
57291
57892
|
policy:
|
|
57292
57893
|
forbiddenNames: <path> # optional`;
|
|
57293
57894
|
function parseDeployProject(file) {
|
|
@@ -57317,7 +57918,16 @@ ${DEPLOY_SHAPE}`);
|
|
|
57317
57918
|
const forbiddenNames = object(policy) ? policy.forbiddenNames : undefined;
|
|
57318
57919
|
if (forbiddenNames !== undefined && (typeof forbiddenNames !== "string" || forbiddenNames.trim() === ""))
|
|
57319
57920
|
refuse("devops.deploy.policy.forbiddenNames must be a repository path");
|
|
57320
|
-
|
|
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
|
+
};
|
|
57321
57931
|
}
|
|
57322
57932
|
function adapterEnv(input) {
|
|
57323
57933
|
return {
|
|
@@ -57364,7 +57974,7 @@ function forbiddenHits(names, entries) {
|
|
|
57364
57974
|
return hits;
|
|
57365
57975
|
}
|
|
57366
57976
|
var targetDir = (workdir, target) => `${workdir}/${target}`;
|
|
57367
|
-
var planFileOf = (planDir, target) => `${planDir}/${target}.bin`;
|
|
57977
|
+
var planFileOf = (planDir, target) => `${planDir}/${target.replaceAll("/", "__")}.bin`;
|
|
57368
57978
|
var STATE_USERNAME = "praxis";
|
|
57369
57979
|
var STATE_PASSWORD_ENV = "TF_HTTP_PASSWORD";
|
|
57370
57980
|
function stateAddress(backend, target) {
|
|
@@ -57390,6 +58000,24 @@ function backendDocument(backend, target) {
|
|
|
57390
58000
|
|
|
57391
58001
|
// src/devops/tofu/run.ts
|
|
57392
58002
|
import { dirname as dirname4, isAbsolute, resolve as resolve3 } from "node:path";
|
|
58003
|
+
function planReadyLine(summary) {
|
|
58004
|
+
const planned = new Set(summary.targets.filter((t) => t.status === "planned").map((t) => t.target));
|
|
58005
|
+
const layers = summary.layers.map((layer) => layer.filter((path) => planned.has(path))).filter((layer) => layer.length > 0);
|
|
58006
|
+
const migrations = summary.targets.flatMap((t) => {
|
|
58007
|
+
const files = t.status === "planned" ? t.pending.filter((line) => line.startsWith("d1 migrations ")) : [];
|
|
58008
|
+
return files.length === 0 ? [] : [{ targetPath: t.target, files }];
|
|
58009
|
+
});
|
|
58010
|
+
return { type: "plan.ready", layers, migrations };
|
|
58011
|
+
}
|
|
58012
|
+
function failureDigest(summary) {
|
|
58013
|
+
const count2 = (status) => summary.targets.filter((t) => t.status === status).length;
|
|
58014
|
+
const lines = [`RESULT ${summary.finished} planned=${count2("planned")} succeeded=${count2("succeeded")} failed=${count2("failed")} blocked=${count2("blocked")}`];
|
|
58015
|
+
for (const t of summary.targets) {
|
|
58016
|
+
if (t.status === "failed" || t.status === "blocked" && t.message !== "a target it depends on did not finish")
|
|
58017
|
+
lines.push(`FAILED ${t.target}: ${t.message ?? t.status}`);
|
|
58018
|
+
}
|
|
58019
|
+
return lines;
|
|
58020
|
+
}
|
|
57393
58021
|
var BACKEND_FILE = "praxis_backend.tf.json";
|
|
57394
58022
|
async function runTofuDeploy(args, plan, ports) {
|
|
57395
58023
|
const { fs, exec, out } = ports;
|
|
@@ -57401,9 +58029,11 @@ async function runTofuDeploy(args, plan, ports) {
|
|
|
57401
58029
|
const applying = args.mode !== "plan-only";
|
|
57402
58030
|
const events = applying && args.eventsFile !== undefined ? ports.openEvents(args.eventsFile, startedAt) : undefined;
|
|
57403
58031
|
const reports = new Map;
|
|
57404
|
-
const selection = selectTargets(plan, args.environment, args.targets, new Set(Object.keys(ports.project.adapters)));
|
|
58032
|
+
const selection = selectTargets(plan, args.environment, args.targets, new Set(Object.keys(ports.project.adapters)), ports.project.exclude ?? []);
|
|
57405
58033
|
const byPath = new Map(selection.targets.map((t) => [t.path, t]));
|
|
57406
58034
|
const redact = (line) => ports.state.password === "" ? line : line.split(ports.state.password).join("***");
|
|
58035
|
+
for (const path of selection.excluded)
|
|
58036
|
+
out(`excluded by praxis.yaml: ${path}`);
|
|
57407
58037
|
const finish = (finished2, message2) => {
|
|
57408
58038
|
if (events)
|
|
57409
58039
|
events.finish(message2 === undefined ? {} : { message: message2 });
|
|
@@ -57419,6 +58049,9 @@ async function runTofuDeploy(args, plan, ports) {
|
|
|
57419
58049
|
};
|
|
57420
58050
|
const writeSummary = async (summary) => {
|
|
57421
58051
|
await fs.write(`${planDir}/summary.json`, `${JSON.stringify(summary, null, 2)}
|
|
58052
|
+
`);
|
|
58053
|
+
if (args.mode === "plan-only")
|
|
58054
|
+
await fs.write(`${planDir}/plan-ready.json`, `${JSON.stringify(planReadyLine(summary))}
|
|
57422
58055
|
`);
|
|
57423
58056
|
out(`SUMMARY ${JSON.stringify(summary)}`);
|
|
57424
58057
|
};
|
|
@@ -57903,6 +58536,8 @@ async function devopsDeployTofu(flags, ports) {
|
|
|
57903
58536
|
out: ports.stdout
|
|
57904
58537
|
});
|
|
57905
58538
|
ports.emit({ kind: "object", data: result.summary });
|
|
58539
|
+
for (const line of failureDigest(result.summary))
|
|
58540
|
+
ports.stdout(line);
|
|
57906
58541
|
return result.exitCode;
|
|
57907
58542
|
}
|
|
57908
58543
|
|
|
@@ -61127,7 +61762,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
61127
61762
|
}
|
|
61128
61763
|
|
|
61129
61764
|
// src/main.ts
|
|
61130
|
-
var version = "0.3.0-dev.
|
|
61765
|
+
var version = "0.3.0-dev.4e5fc1f";
|
|
61131
61766
|
var commands = commandTree(operations);
|
|
61132
61767
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
61133
61768
|
function route(argv) {
|