@deepraxis/cli 0.3.0-dev.e347fbb → 0.3.0-dev.f0d75b7
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/dist/praxis.js +37 -7
- package/package.json +1 -1
package/dist/praxis.js
CHANGED
|
@@ -29659,7 +29659,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
29659
29659
|
resource: "media.assets",
|
|
29660
29660
|
method: "edit",
|
|
29661
29661
|
summary: "Edit asset",
|
|
29662
|
-
description: "Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job
|
|
29662
|
+
description: "Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {\"operation\":{\"type\":\"variations\",\"strength\":\"subtle\"}}.",
|
|
29663
29663
|
http: "POST",
|
|
29664
29664
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
|
|
29665
29665
|
streaming: "no",
|
|
@@ -29927,7 +29927,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
29927
29927
|
resource: "media.speech",
|
|
29928
29928
|
method: "create",
|
|
29929
29929
|
summary: "Create speech",
|
|
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
|
|
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 reports the charge in usage (US dollars, six decimals, the sum over every segment) and the recording carries it in provenance.cost; a request refused before it starts costs nothing. When the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {\"input\":\"A red kite above a calm sea at sunrise.\"}, or with {\"input\":\"A red kite above a calm sea at sunrise.\",\"voice\":\"zh_female_wenroumama_uranus_bigtts\"} for a gentle female voice.",
|
|
29931
29931
|
http: "POST",
|
|
29932
29932
|
path: "/media/v1/libraries/{library_id}/audio/speech",
|
|
29933
29933
|
streaming: "no",
|
|
@@ -30159,7 +30159,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
30159
30159
|
resource: "media.images",
|
|
30160
30160
|
method: "generate",
|
|
30161
30161
|
summary: "Generate image",
|
|
30162
|
-
description: "Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job
|
|
30162
|
+
description: "Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals, final once the job is completed or failed) and each produced asset carries its own part in provenance.cost; nothing is charged for a request refused before it starts. When the job is done, tell the person the usage amount and give them each output’s viewer_url, which opens the asset in the Console. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {\"prompt\":\"A red kite above a calm sea at sunrise\",\"n\":1,\"output\":\"sticker\"}.",
|
|
30163
30163
|
http: "POST",
|
|
30164
30164
|
path: "/media/v1/libraries/{library_id}/images/generations",
|
|
30165
30165
|
streaming: "no",
|
|
@@ -30196,8 +30196,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
30196
30196
|
{
|
|
30197
30197
|
name: "size",
|
|
30198
30198
|
type: "string",
|
|
30199
|
+
enum: [
|
|
30200
|
+
"1024x1024",
|
|
30201
|
+
"1024x1536",
|
|
30202
|
+
"1536x1024"
|
|
30203
|
+
],
|
|
30199
30204
|
required: false,
|
|
30200
|
-
description: "Requested pixel size written as width x height. The
|
|
30205
|
+
description: "Requested pixel size written as width x height. The platform image models accept 1024x1024 (square, the default), 1024x1536 (portrait) and 1536x1024 (landscape); any other size is rejected with INVALID_PARAMS before anything is charged."
|
|
30201
30206
|
},
|
|
30202
30207
|
{
|
|
30203
30208
|
name: "background",
|
|
@@ -30736,7 +30741,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
30736
30741
|
resource: "media.videos",
|
|
30737
30742
|
method: "generate",
|
|
30738
30743
|
summary: "Generate video",
|
|
30739
|
-
description: "Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job
|
|
30744
|
+
description: "Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and each produced asset carries its own part in provenance.cost; a refused request costs nothing. When the job is done, tell the person the usage amount and give them each output’s viewer_url. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {\"prompt\":\"A red kite above a calm sea at sunrise\",\"mode\":\"text\",\"n\":1}.",
|
|
30740
30745
|
http: "POST",
|
|
30741
30746
|
path: "/media/v1/libraries/{library_id}/videos/generations",
|
|
30742
30747
|
streaming: "no",
|
|
@@ -58000,6 +58005,27 @@ function backendDocument(backend, target) {
|
|
|
58000
58005
|
|
|
58001
58006
|
// src/devops/tofu/run.ts
|
|
58002
58007
|
import { dirname as dirname4, isAbsolute, resolve as resolve3 } from "node:path";
|
|
58008
|
+
function plannedTargetsOf(summaryText) {
|
|
58009
|
+
if (summaryText === null)
|
|
58010
|
+
return;
|
|
58011
|
+
try {
|
|
58012
|
+
const summary = JSON.parse(summaryText);
|
|
58013
|
+
if (!Array.isArray(summary.targets))
|
|
58014
|
+
return;
|
|
58015
|
+
return summary.targets.filter((t) => t.status === "planned" && typeof t.target === "string").map((t) => t.target);
|
|
58016
|
+
} catch {
|
|
58017
|
+
return;
|
|
58018
|
+
}
|
|
58019
|
+
}
|
|
58020
|
+
function planReadyLine(summary) {
|
|
58021
|
+
const planned = new Set(summary.targets.filter((t) => t.status === "planned").map((t) => t.target));
|
|
58022
|
+
const layers = summary.layers.map((layer) => layer.filter((path) => planned.has(path))).filter((layer) => layer.length > 0);
|
|
58023
|
+
const migrations = summary.targets.flatMap((t) => {
|
|
58024
|
+
const files = t.status === "planned" ? t.pending.filter((line) => line.startsWith("d1 migrations ")) : [];
|
|
58025
|
+
return files.length === 0 ? [] : [{ targetPath: t.target, files }];
|
|
58026
|
+
});
|
|
58027
|
+
return { type: "plan.ready", layers, migrations };
|
|
58028
|
+
}
|
|
58003
58029
|
function failureDigest(summary) {
|
|
58004
58030
|
const count2 = (status) => summary.targets.filter((t) => t.status === status).length;
|
|
58005
58031
|
const lines = [`RESULT ${summary.finished} planned=${count2("planned")} succeeded=${count2("succeeded")} failed=${count2("failed")} blocked=${count2("blocked")}`];
|
|
@@ -58020,7 +58046,8 @@ async function runTofuDeploy(args, plan, ports) {
|
|
|
58020
58046
|
const applying = args.mode !== "plan-only";
|
|
58021
58047
|
const events = applying && args.eventsFile !== undefined ? ports.openEvents(args.eventsFile, startedAt) : undefined;
|
|
58022
58048
|
const reports = new Map;
|
|
58023
|
-
const
|
|
58049
|
+
const targets = args.targets ?? (args.mode === "apply-plans" ? plannedTargetsOf(await fs.read(`${planDir}/summary.json`)) : undefined);
|
|
58050
|
+
const selection = selectTargets(plan, args.environment, targets, new Set(Object.keys(ports.project.adapters)), ports.project.exclude ?? []);
|
|
58024
58051
|
const byPath = new Map(selection.targets.map((t) => [t.path, t]));
|
|
58025
58052
|
const redact = (line) => ports.state.password === "" ? line : line.split(ports.state.password).join("***");
|
|
58026
58053
|
for (const path of selection.excluded)
|
|
@@ -58040,6 +58067,9 @@ async function runTofuDeploy(args, plan, ports) {
|
|
|
58040
58067
|
};
|
|
58041
58068
|
const writeSummary = async (summary) => {
|
|
58042
58069
|
await fs.write(`${planDir}/summary.json`, `${JSON.stringify(summary, null, 2)}
|
|
58070
|
+
`);
|
|
58071
|
+
if (args.mode === "plan-only")
|
|
58072
|
+
await fs.write(`${planDir}/plan-ready.json`, `${JSON.stringify(planReadyLine(summary))}
|
|
58043
58073
|
`);
|
|
58044
58074
|
out(`SUMMARY ${JSON.stringify(summary)}`);
|
|
58045
58075
|
};
|
|
@@ -61750,7 +61780,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
61750
61780
|
}
|
|
61751
61781
|
|
|
61752
61782
|
// src/main.ts
|
|
61753
|
-
var version = "0.3.0-dev.
|
|
61783
|
+
var version = "0.3.0-dev.f0d75b7";
|
|
61754
61784
|
var commands = commandTree(operations);
|
|
61755
61785
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
61756
61786
|
function route(argv) {
|