@deepraxis/cli 0.3.0-dev.c070526 → 0.3.0-dev.c811f1a
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 +12 -3
- package/dist/praxis.js +620 -41
- package/package.json +1 -1
package/COMMANDS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Generated by `bun run commands`. DO NOT EDIT.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
796 HTTP operations; 798 commands including aliases.
|
|
6
6
|
|
|
7
7
|
Environment: `PRAXIS_ENV=develop|production` (dev package defaults to `develop`; stable package defaults to `production`). No `--env` option.
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ Other lists use global `--limit` only for client-side display truncation, even i
|
|
|
16
16
|
|
|
17
17
|
Every generated command below is typed after `praxis api` (the `Command` column shows the full path); the word after `api` decides the form: an uppercase HTTP method is a raw request, anything else a generated command path.
|
|
18
18
|
|
|
19
|
-
Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`, `org list`, `org switch <organization_id>`, `app create <name> [--dir <path>] [--template <dir>] [--no-install]`, `app publish [--dir <path>] [--no-build]`, `app rollback [--dir <path>] [--to <version_id>]`, `devops deploy plan [--env <name>] [--since <commit>]`, `devops engine deploy --env <develop|production> --environment-id <dve_…> [--project <dvp_…>] --commit <sha> [--targets a,b] [--plan-only] [--plan-dir <dir>] [--apply-plans <dir>] [--events-file <path>] [--engine-root <dir>] [--order callers-first]`, `devops deploy --env <develop|production> --environment-id <dve_…> [--project <dvp_…>] --commit <sha> [--targets a,b] [--plan-only] [--plan-dir <dir>] [--apply-plans <dir>] [--events-file <path>] [--engine-root <dir>] [--order callers-first]`, `devops test run --remote [--project <dvp_…>] [--no-wait] [--repeat <n>] [--select <kind:value>]`, `devops test [path…] [--size <small|medium|large|all>] [--tags <@tag…>] [--feature <title>] [--case <title>] [--e2e] [--all] [--affected [--since <commit>]] [--list] [--dry-run] [--retries <n>] [--ctrf <file>]`, `devops test report [path…] [--id <run>] [--upload [--project <dvp_…>]]`, `devops test new <file> [--e2e] [--port <n>]`, `devops test inspect <feature title> [--headed]`, `devops check [path] [--targets <a,b>]`, `devops check migrations [path]`, `devops check deprecations [path]`, `devops context [path] [--feature <topic>]`, `devops context topology [path]`, `devops context impact`, `devops context deps <path>`, `devops plan [--env <name>] [--since <commit>]`, `devops fmt [paths…] [--all]`, `devops install`, `devops build [path]`, `devops scaffold <package path>`, `devops refactor rename|check|apply`, `devops refactor rename --at <file:line:column> --to <identifier>`, `devops refactor check <digest>`, `devops refactor apply <digest>`, `devops flag sync [--check]`, `devops flag check`, `devops flag scaffold <key> [--out <dir>]`, `devops flag refs [key]`, `devops flag remove <key>`, `devops change checkout <change>`, `canvas import <file.pen> [--name <name>] [--canvas <cvs_…> --yes] [--frames <id,id>] [--image-root <dir>] [--dry-run]`, `skill [--install <dir>]`, `completion <bash|zsh|fish>`, `api <METHOD> <path> [--data …]`.
|
|
19
|
+
Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`, `org list`, `org switch <organization_id>`, `app create <name> [--dir <path>] [--template <dir>] [--no-install]`, `app publish [--dir <path>] [--no-build]`, `app rollback [--dir <path>] [--to <version_id>]`, `devops deploy plan [--env <name>] [--since <commit>]`, `devops engine deploy --env <develop|production> --environment-id <dve_…> [--project <dvp_…>] --commit <sha> [--targets a,b] [--plan-only] [--plan-dir <dir>] [--apply-plans <dir>] [--events-file <path>] [--engine-root <dir>] [--order callers-first]`, `devops deploy --env <develop|production> --environment-id <dve_…> [--project <dvp_…>] --commit <sha> [--targets a,b] [--plan-only] [--plan-dir <dir>] [--apply-plans <dir>] [--events-file <path>] [--engine-root <dir>] [--order callers-first]`, `devops test run --remote [--project <dvp_…>] [--no-wait] [--repeat <n>] [--select <kind:value>]`, `devops test [path…] [--size <small|medium|large|all>] [--tags <@tag…>] [--feature <title>] [--case <title>] [--e2e] [--all] [--affected [--since <commit>]] [--list] [--dry-run] [--retries <n>] [--ctrf <file>]`, `devops test report [path…] [--id <run>] [--upload [--project <dvp_…>]]`, `devops test new <file> [--e2e] [--port <n>]`, `devops test inspect <feature title> [--headed]`, `devops check [path] [--targets <a,b>]`, `devops check migrations [path]`, `devops check deprecations [path]`, `devops context [path] [--feature <topic>]`, `devops context topology [path]`, `devops context impact`, `devops context deps <path>`, `devops plan [--env <name>] [--since <commit>]`, `devops fmt [paths…] [--all]`, `devops install`, `devops build [path]`, `devops scaffold <package path>`, `devops refactor rename|check|apply`, `devops refactor rename --at <file:line:column> --to <identifier>`, `devops refactor check <digest>`, `devops refactor apply <digest>`, `devops flag sync [--check]`, `devops flag check`, `devops flag scaffold <key> [--out <dir>]`, `devops flag refs [key] [--report --project <dvp_…>]`, `devops flag remove <key>`, `devops change checkout <change>`, `canvas import <file.pen> [--name <name>] [--canvas <cvs_…> --yes] [--frames <id,id>] [--image-root <dir>] [--dry-run]`, `skill [--install <dir>]`, `completion <bash|zsh|fish>`, `api <METHOD> <path> [--data …]`.
|
|
20
20
|
|
|
21
21
|
| Command | SDK method | HTTP | Parameter options |
|
|
22
22
|
|---|---|---|---|
|
|
@@ -26,7 +26,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
|
|
|
26
26
|
| `praxis api agent computer connect <computer_id>` | `agent.computers.connect` | POST `/agent/v1/computers/{computer_id}/connect` | `--need` |
|
|
27
27
|
| `praxis api agent computer create` | `agent.computers.create` | POST `/agent/v1/computers` | `--name`, `--environment-id` |
|
|
28
28
|
| `praxis api agent computer delete <computer_id>` | `agent.computers.delete` | DELETE `/agent/v1/computers/{computer_id}` | |
|
|
29
|
-
| `praxis api agent computer file convert create` | `agent.computers.files.convert.create` | POST `/agent/v1/computers/{computer_id}/files/convert` | `--computer`, `--
|
|
29
|
+
| `praxis api agent computer file convert create` | `agent.computers.files.convert.create` | POST `/agent/v1/computers/{computer_id}/files/convert` | `--computer`, `--path` |
|
|
30
30
|
| `praxis api agent computer file get-content` | `agent.computers.files.retrieveContent` | GET `/agent/v1/computers/{computer_id}/files/content` | `--computer`, `--path` |
|
|
31
31
|
| `praxis api agent computer file list` | `agent.computers.files.list` | GET `/agent/v1/computers/{computer_id}/files` | `--computer`, `--path` |
|
|
32
32
|
| `praxis api agent computer get <computer_id>` | `agent.computers.retrieve` | GET `/agent/v1/computers/{computer_id}` | |
|
|
@@ -70,6 +70,8 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
|
|
|
70
70
|
| `praxis api agent get-appearance <agent_id>` | `agent.agents.retrieveAppearance` | GET `/agent/v1/agents/{agent_id}/appearance` | |
|
|
71
71
|
| `praxis api agent list` | `agent.agents.list` | GET `/agent/v1/agents` | `--created-at-gte`, `--created-at-lte`, `--include-archived`, `--param-limit`, `--page`, `--kind` |
|
|
72
72
|
| `praxis api agent session archive <session_id>` | `agent.sessions.archive` | POST `/agent/v1/sessions/{session_id}/archive` | |
|
|
73
|
+
| `praxis api agent session artifact content-url create` | `agent.sessions.artifacts.contentUrl.create` | POST `/agent/v1/sessions/{session_id}/artifacts/{artifact_id}/content_url` | `--session`, `--artifact`, `--part`, `--ttl-seconds` |
|
|
74
|
+
| `praxis api agent session artifact list` | `agent.sessions.artifacts.list` | GET `/agent/v1/sessions/{session_id}/artifacts` | `--session` |
|
|
73
75
|
| `praxis api agent session background-task get-output <task_id>` | `agent.sessions.backgroundTasks.retrieveOutput` | GET `/agent/v1/sessions/{session_id}/background_tasks/{task_id}/output` | `--session`, `--offset`, `--max-bytes` |
|
|
74
76
|
| `praxis api agent session background-task list` | `agent.sessions.backgroundTasks.list` | GET `/agent/v1/sessions/{session_id}/background_tasks` | `--session` |
|
|
75
77
|
| `praxis api agent session background-task stop <task_id>` | `agent.sessions.backgroundTasks.stop` | POST `/agent/v1/sessions/{session_id}/background_tasks/{task_id}/stop` | `--session` |
|
|
@@ -85,6 +87,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
|
|
|
85
87
|
| `praxis api agent session get-compact <operation_id>` | `agent.sessions.retrieveCompact` | GET `/agent/v1/sessions/{session_id}/compact/{operation_id}` | `--session` |
|
|
86
88
|
| `praxis api agent session get-context <session_id>` | `agent.sessions.retrieveContext` | GET `/agent/v1/sessions/{session_id}/context` | |
|
|
87
89
|
| `praxis api agent session list` | `agent.sessions.list` | GET `/agent/v1/sessions` | `--agent-id`, `--agent-version`, `--created-at-gt`, `--created-at-gte`, `--created-at-lt`, `--created-at-lte`, `--deployment-id`, `--include-archived`, `--memory-store-id`, `--order`, `--statuses`, `--param-limit`, `--page`, `--external-user-id`, `--source` |
|
|
90
|
+
| `praxis api agent session request list` | `agent.sessions.requests.list` | GET `/agent/v1/sessions/{session_id}/requests` | `--session` |
|
|
88
91
|
| `praxis api agent session resource create` | `agent.sessions.resources.create` | POST `/agent/v1/sessions/{session_id}/resources` | `--session`, `--type`, `--file-id`, `--mount-path` |
|
|
89
92
|
| `praxis api agent session resource delete <resource_id>` | `agent.sessions.resources.delete` | DELETE `/agent/v1/sessions/{session_id}/resources/{resource_id}` | `--session`, `--query-session-id` |
|
|
90
93
|
| `praxis api agent session resource get <resource_id>` | `agent.sessions.resources.retrieve` | GET `/agent/v1/sessions/{session_id}/resources/{resource_id}` | `--session`, `--query-session-id` |
|
|
@@ -364,6 +367,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
|
|
|
364
367
|
| `praxis api devops project environment target state lock create` | `devops.projects.environments.targets.state.lock.create` | POST `/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state/lock` | `--project`, `--environment`, `--target`, `--id`, `--operation`, `--who`, `--created`, `--path` |
|
|
365
368
|
| `praxis api devops project flag create` | `devops.projects.flags.create` | POST `/devops/v1/projects/{project}/flags` | `--project`, `--key`, `--name`, `--description`, `--kind`, `--value-type`, `--observe-until`, `--removal-ticket`, `--pull-request`, `--request-id` |
|
|
366
369
|
| `praxis api devops project flag list` | `devops.projects.flags.list` | GET `/devops/v1/projects/{project}/flags` | `--project`, `--page-size`, `--page-token`, `--filter` |
|
|
370
|
+
| `praxis api devops project flag report-code-refs` | `devops.projects.flags.reportCodeRefs` | POST `/devops/v1/projects/{project}/flags/code-refs` | `--project`, `--scanned-commit` |
|
|
367
371
|
| `praxis api devops project get <id>` | `devops.projects.retrieve` | GET `/devops/v1/projects/{id}` | |
|
|
368
372
|
| `praxis api devops project get-test-catalog <project>` | `devops.projects.retrieveTestCatalog` | GET `/devops/v1/projects/{project}/test-catalog` | `--commit` |
|
|
369
373
|
| `praxis api devops project list` | `devops.projects.list` | GET `/devops/v1/projects` | `--page-size`, `--page-token` |
|
|
@@ -463,6 +467,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
|
|
|
463
467
|
| `praxis api media asset lineage <asset_id>` | `media.assets.lineage` | GET `/media/v1/libraries/{library_id}/assets/{asset_id}/lineage` | `--library` |
|
|
464
468
|
| `praxis api media generation capability list` | `media.generation.capabilities.list` | GET `/media/v1/generation/capabilities` | |
|
|
465
469
|
| `praxis api media image generate` | `media.images.generate` | POST `/media/v1/libraries/{library_id}/images/generations` | `--library`, `--prompt`, `--negative-prompt`, `--n`, `--size`, `--background`, `--output-format`, `--output`, `--seed`, `--model`, `--asset-folder`, `--understanding`, `--idempotency-key` |
|
|
470
|
+
| `praxis api media library asset align create` | `media.libraries.assets.align.create` | POST `/media/v1/libraries/{library_id}/assets/{asset_id}/align` | `--library`, `--asset`, `--reference-asset-id`, `--max-offset-seconds`, `--idempotency-key` |
|
|
466
471
|
| `praxis api media library asset batch <library_id>` | `media.libraries.assets.batch` | POST `/media/v1/libraries/{library_id}/assets:batch` | `--reason` |
|
|
467
472
|
| `praxis api media library asset create` | `media.libraries.assets.create` | POST `/media/v1/libraries/{library_id}/assets` | `--library`, `--file`, `--public-id`, `--public-id-prefix`, `--display-name`, `--asset-folder`, `--use-filename`, `--unique-filename`, `--use-filename-as-display-name`, `--filename-override`, `--overwrite`, `--auto-tagging`, `--type` |
|
|
468
473
|
| `praxis api media library asset delete <asset_id>` | `media.libraries.assets.delete` | DELETE `/media/v1/libraries/{library_id}/assets/{asset_id}` | `--library` |
|
|
@@ -666,6 +671,10 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
|
|
|
666
671
|
| `praxis api search create` | `search.search.create` | POST `/search/v1/search` | `--query`, `--search-depth`, `--chunks-per-source`, `--max-results`, `--topic`, `--time-range`, `--start-date`, `--end-date`, `--include-published-date`, `--filter-by-published-date`, `--include-images`, `--include-image-descriptions`, `--include-favicon`, `--include-domains`, `--exclude-domains`, `--include-domains-mode`, `--country`, `--language`, `--filter-by-language`, `--auto-parameters`, `--exact-match`, `--include-usage`, `--safe-search` |
|
|
667
672
|
| `praxis api search extract` | `search.extract.create` | POST `/search/v1/extract` | `--query`, `--chunks-per-source`, `--extract-depth`, `--include-images`, `--include-favicon`, `--param-format`, `--timeout`, `--include-usage` |
|
|
668
673
|
| `praxis api search map` | `search.map.create` | POST `/search/v1/map` | `--url`, `--instructions`, `--max-depth`, `--max-breadth`, `--param-limit`, `--select-paths`, `--select-domains`, `--exclude-paths`, `--exclude-domains`, `--allow-external`, `--timeout`, `--include-usage` |
|
|
674
|
+
| `praxis api share permission create` | `share.permissions.create` | POST `/share/v1/permissions` | `--expire-time`, `--prevents-download` |
|
|
675
|
+
| `praxis api share permission delete <id>` | `share.permissions.delete` | DELETE `/share/v1/permissions/{id}` | |
|
|
676
|
+
| `praxis api share permission get <id>` | `share.permissions.retrieve` | GET `/share/v1/permissions/{id}` | |
|
|
677
|
+
| `praxis api share permission list` | `share.permissions.list` | GET `/share/v1/permissions` | `--resource-type`, `--resource-id`, `--status`, `--page-size`, `--page-token` |
|
|
669
678
|
| `praxis api studio codex create` | `studio.codexes.create` | POST `/studio/v1/codexes` | `--name`, `--description` |
|
|
670
679
|
| `praxis api studio codex delete <codex>` | `studio.codexes.delete` | DELETE `/studio/v1/codexes/{codex}` | |
|
|
671
680
|
| `praxis api studio codex entry create` | `studio.codexes.entries.create` | POST `/studio/v1/codexes/{codex}/entries` | `--codex`, `--type`, `--name`, `--group`, `--aliases`, `--case-sensitive`, `--exclude-phrases`, `--description`, `--notes`, `--time`, `--tracking` |
|
package/dist/praxis.js
CHANGED
|
@@ -13984,8 +13984,11 @@ var init_flag_registry_generated = __esm(() => {
|
|
|
13984
13984
|
FLAGS = {
|
|
13985
13985
|
"agent-cognition-idle-wake": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "genius", ticket: 540, expires: "2026-11-30", system: "flagship" },
|
|
13986
13986
|
"cognition-weight-driven": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "praxis-bd", ticket: 1760, expires: "2026-12-05", system: "devops" },
|
|
13987
|
+
"delivery-rules-v2": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2048, expires: "2026-11-28", system: "devops" },
|
|
13987
13988
|
"model-access-gate": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 1933, expires: "2026-12-15", system: "devops" },
|
|
13988
13989
|
"open-project": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "praxis-51", ticket: 1488, expires: "2026-11-25", system: "devops" },
|
|
13990
|
+
"requests-v1": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2057, expires: "2026-11-28", system: "devops" },
|
|
13991
|
+
"router-precommit-hedge": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2052, expires: "2026-11-28", system: "devops" },
|
|
13989
13992
|
"search-provider-routing": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "praxis-98", ticket: 716, expires: "2026-12-31", system: "devops" },
|
|
13990
13993
|
"unit-live-probe": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: null, expires: "2026-11-19", system: "devops" }
|
|
13991
13994
|
};
|
|
@@ -14031,6 +14034,8 @@ function checkFlags(files, registry, today = new Date().toISOString().slice(0, 1
|
|
|
14031
14034
|
add(f, browserList.index + entry.index, `unregistered browser flag key "${entry[1]}"`);
|
|
14032
14035
|
}
|
|
14033
14036
|
}
|
|
14037
|
+
if (/\.generated\.[cm]?[jt]sx?$/.test(f.path))
|
|
14038
|
+
continue;
|
|
14034
14039
|
const calls = /(\.bool|\breadBrowserFlag|\buseBrowserFlag)\s*\(\s*([^,)\n]+)/g;
|
|
14035
14040
|
for (const m of f.text.matchAll(calls)) {
|
|
14036
14041
|
if (/function\s*$/.test(f.text.slice(Math.max(0, m.index - 20), m.index)))
|
|
@@ -15983,18 +15988,14 @@ Praxis extension: the preview conversion endpoint. The browser never parses an u
|
|
|
15983
15988
|
description: "Computer id (cmp_...), as returned by computers.create or computers.list."
|
|
15984
15989
|
}
|
|
15985
15990
|
],
|
|
15986
|
-
query: [
|
|
15987
|
-
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
|
|
15991
|
-
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
description: "Name of the entry or object."
|
|
15995
|
-
}
|
|
15996
|
-
]
|
|
15997
|
-
}
|
|
15991
|
+
query: [
|
|
15992
|
+
{
|
|
15993
|
+
name: "path",
|
|
15994
|
+
type: "string",
|
|
15995
|
+
required: true,
|
|
15996
|
+
description: "Absolute path of the document on the computer, for example /home/user/workspace/deck.pptx. The request has no body."
|
|
15997
|
+
}
|
|
15998
|
+
]
|
|
15998
15999
|
},
|
|
15999
16000
|
{
|
|
16000
16001
|
resource: "agent.computers.leases",
|
|
@@ -16986,6 +16987,68 @@ delete it. Omit the field to preserve.`
|
|
|
16986
16987
|
],
|
|
16987
16988
|
query: []
|
|
16988
16989
|
},
|
|
16990
|
+
{
|
|
16991
|
+
resource: "agent.sessions.artifacts",
|
|
16992
|
+
method: "list",
|
|
16993
|
+
summary: "List Session Artifacts (Extension)",
|
|
16994
|
+
description: `List the files this session delivered; an end-customer token reads its own session.
|
|
16995
|
+
|
|
16996
|
+
Own-face extension. Returns { data: Artifact[] } ordered by create_time. Each artifact is one file in the session outputs directory with id, name, version, parts, source_hrefs, create_time and update_time. Delivering the same path again keeps the id and adds one to version. Files are captured seconds after the turn ends, so artifacts appear after session.status_idle; also watch the agent.artifact_delivered event. Whoever may read the session may read its artifacts; a session that is missing or not yours returns 404.`,
|
|
16997
|
+
http: "GET",
|
|
16998
|
+
path: "/agent/v1/sessions/{session_id}/artifacts",
|
|
16999
|
+
streaming: "no",
|
|
17000
|
+
pagination: false,
|
|
17001
|
+
pathParams: [
|
|
17002
|
+
{
|
|
17003
|
+
name: "session_id",
|
|
17004
|
+
sdkName: "session_id",
|
|
17005
|
+
description: "Session id from session creation or listing."
|
|
17006
|
+
}
|
|
17007
|
+
],
|
|
17008
|
+
query: []
|
|
17009
|
+
},
|
|
17010
|
+
{
|
|
17011
|
+
resource: "agent.sessions.artifacts.contentUrl",
|
|
17012
|
+
method: "create",
|
|
17013
|
+
summary: "Create Artifact Content URL (Extension)",
|
|
17014
|
+
description: `Mint a short-lived download address for one file of an artifact.
|
|
17015
|
+
|
|
17016
|
+
Own-face extension. The body is optional: part (index into the artifact parts, default 0) and ttl_seconds (60 to 300, default 300). Returns { url, expire_time }. The address works for minutes; do not store or log it. An unknown artifact or an out-of-range part returns 404 ARTIFACT_NOT_FOUND, a session that is missing or not yours returns 404, and a ttl_seconds outside 60 to 300 returns 400.`,
|
|
17017
|
+
http: "POST",
|
|
17018
|
+
path: "/agent/v1/sessions/{session_id}/artifacts/{artifact_id}/content_url",
|
|
17019
|
+
streaming: "no",
|
|
17020
|
+
pagination: false,
|
|
17021
|
+
pathParams: [
|
|
17022
|
+
{
|
|
17023
|
+
name: "session_id",
|
|
17024
|
+
sdkName: "session_id",
|
|
17025
|
+
description: "Session id from session creation or listing."
|
|
17026
|
+
},
|
|
17027
|
+
{
|
|
17028
|
+
name: "artifact_id",
|
|
17029
|
+
sdkName: "artifact_id",
|
|
17030
|
+
description: "Artifact id (art_...) from the artifact list or an agent.artifact_delivered event."
|
|
17031
|
+
}
|
|
17032
|
+
],
|
|
17033
|
+
query: [],
|
|
17034
|
+
body: {
|
|
17035
|
+
required: false,
|
|
17036
|
+
fields: [
|
|
17037
|
+
{
|
|
17038
|
+
name: "part",
|
|
17039
|
+
type: "integer",
|
|
17040
|
+
required: false,
|
|
17041
|
+
description: "Index into the artifact's parts; defaults to 0."
|
|
17042
|
+
},
|
|
17043
|
+
{
|
|
17044
|
+
name: "ttl_seconds",
|
|
17045
|
+
type: "integer",
|
|
17046
|
+
required: false,
|
|
17047
|
+
description: "How long the address works, 60 to 300 seconds; defaults to 300."
|
|
17048
|
+
}
|
|
17049
|
+
]
|
|
17050
|
+
}
|
|
17051
|
+
},
|
|
16989
17052
|
{
|
|
16990
17053
|
resource: "agent.sessions.backgroundTasks",
|
|
16991
17054
|
method: "list",
|
|
@@ -17169,7 +17232,7 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
|
|
|
17169
17232
|
resource: "agent.sessions.events",
|
|
17170
17233
|
method: "list",
|
|
17171
17234
|
summary: "List session events",
|
|
17172
|
-
description: "Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter. This operation addresses one session — normally a worker session an agent dispatched; to talk to a personal or general agent itself, use agents.events.list instead. In the path, session_id may also be `main` (your own main session with that agent) or a short session name, and either alias then requires agent_id with the agent_… id, the eight character identity number or the handle; only the own face /agent/v1 accepts an alias, /anthropic/v1 requires a real sesn_… id.",
|
|
17235
|
+
description: "Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids; a request nobody answered within 24 hours is settled as unanswered and the session goes idle with stop_reason request_expired, which the /anthropic/v1 face shows as end_turn), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter. This operation addresses one session — normally a worker session an agent dispatched; to talk to a personal or general agent itself, use agents.events.list instead. In the path, session_id may also be `main` (your own main session with that agent) or a short session name, and either alias then requires agent_id with the agent_… id, the eight character identity number or the handle; only the own face /agent/v1 accepts an alias, /anthropic/v1 requires a real sesn_… id.",
|
|
17173
17236
|
http: "GET",
|
|
17174
17237
|
path: "/agent/v1/sessions/{session_id}/events",
|
|
17175
17238
|
streaming: "no",
|
|
@@ -17328,6 +17391,26 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
17328
17391
|
]
|
|
17329
17392
|
}
|
|
17330
17393
|
},
|
|
17394
|
+
{
|
|
17395
|
+
resource: "agent.sessions.requests",
|
|
17396
|
+
method: "list",
|
|
17397
|
+
summary: "List Session Requests (Extension)",
|
|
17398
|
+
description: `List the requests a session is waiting on; an end-customer token reads its own session.
|
|
17399
|
+
|
|
17400
|
+
Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (question for the ask_user_question tool, approval for any other tool that waits for permission), status (pending), tool_name, input (the same input the agent.tool_use event shows), create_time and expire_time. Answer a request as before: send a user.tool_confirmation event for its id. expire_time is set only for a session with no collaboration mode while the requests-v1 release is on (create_time plus 24 hours; an expired request counts as declined), otherwise null. Answered, expired and superseded requests are not listed, and neither are pending custom tool results (user.custom_tool_result). Whoever may read the session may read its requests; a session that is missing or not yours returns 404.`,
|
|
17401
|
+
http: "GET",
|
|
17402
|
+
path: "/agent/v1/sessions/{session_id}/requests",
|
|
17403
|
+
streaming: "no",
|
|
17404
|
+
pagination: false,
|
|
17405
|
+
pathParams: [
|
|
17406
|
+
{
|
|
17407
|
+
name: "session_id",
|
|
17408
|
+
sdkName: "session_id",
|
|
17409
|
+
description: "Session id from session creation or listing."
|
|
17410
|
+
}
|
|
17411
|
+
],
|
|
17412
|
+
query: []
|
|
17413
|
+
},
|
|
17331
17414
|
{
|
|
17332
17415
|
resource: "agent.sessions.resources",
|
|
17333
17416
|
method: "list",
|
|
@@ -25380,6 +25463,12 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
|
|
|
25380
25463
|
- \`RippleDeleteRange\` — Cut a time range and close the gap.
|
|
25381
25464
|
- \`DeleteWords\` — Cut transcript words and ripple every track, keeping a breath.
|
|
25382
25465
|
- \`RemoveFillers\` — List and delete filler words by media's own labels; dryRun first.
|
|
25466
|
+
- \`Matte\` — Replace the clip's background with media's matte of its source, read as a luma mask.
|
|
25467
|
+
- \`EnhanceVoice\` — Replace a clip's sound with media's enhanced speech on its own audio track.
|
|
25468
|
+
- \`AlignByAudio\` — Line two recordings of the same sound up by media's measurement of their offset.
|
|
25469
|
+
- \`Reframe\` — Swap the clip's media for media's reframed take at the aspect you ask for.
|
|
25470
|
+
- \`Upscale\` — Swap the clip's media for media's upscaled take at the height you ask for.
|
|
25471
|
+
- \`Redact\` — Pixelate the faces, QR codes or text media marks, leaving the rest of the frame plain.
|
|
25383
25472
|
- \`AddTrack\` — Add a video, audio or caption track.
|
|
25384
25473
|
- \`MoveTrack\` — Move a track between layers; 0 is the topmost.
|
|
25385
25474
|
- \`UpdateTrack\` — Change a track's name, lock, gain or role.
|
|
@@ -25483,6 +25572,9 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
|
|
|
25483
25572
|
- \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
|
|
25484
25573
|
- \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
|
|
25485
25574
|
- \`MEDIA_IMPORT_FAILED\` — Importing media failed.
|
|
25575
|
+
- \`MEDIA_PROCESSING\` — Media is still processing the clip; wait for the job and rerun.
|
|
25576
|
+
- \`MEDIA_PROCESSING_FAILED\` — Media's processing job failed; nothing changed.
|
|
25577
|
+
- \`ALIGNMENT_UNCERTAIN\` — \`AlignByAudio\` confidence too low; nothing changed.
|
|
25486
25578
|
- \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
|
|
25487
25579
|
- \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
|
|
25488
25580
|
- \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
|
|
@@ -27006,7 +27098,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
27006
27098
|
resource: "devops.flags",
|
|
27007
27099
|
method: "archive",
|
|
27008
27100
|
summary: "Archive a flag",
|
|
27009
|
-
description: "Archive a flag whose code is gone: it stops evaluating in every environment, leaves the ordinary flag list and keeps its key and history. Archiving
|
|
27101
|
+
description: "Archive a flag whose code is gone: it stops evaluating in every environment, leaves the ordinary flag list and keeps its key and history. Archiving is the delete, and the platform refuses it while the last reported scan still finds the key in code or while the flag is on in an environment: a flag whose codeRefs.count is above zero is refused with FLAG_STILL_REFERENCED, and a flag whose on state is true in any environment is refused with FLAG_HAS_LIVE_RULES, so archiving succeeds only once the code that names the key is deployed away and every environment is off. The gate reads the stored scan as it stands — an out-of-date scannedCommit is not corrected for — and there is no force flag. It is irreversible through the API: there is no unarchive call, an archived flag cannot be updated or configured, and its key stays reserved, so a later create with the same key is refused; archiving an archived flag just answers it again. A flag that may come back is turned off in its environment instead. The order is: open the flag fully (`praxis api devops flag environment update`), delete the code that names the key and deploy that, run `praxis devops flag remove <key>` (local, lists the references still naming the key), then `praxis api devops flag archive <id>`, then `praxis devops flag sync` so the local registry drops it. There is no separate delete call.",
|
|
27010
27102
|
http: "POST",
|
|
27011
27103
|
path: "/devops/v1/flags/{id}:archive",
|
|
27012
27104
|
streaming: "no",
|
|
@@ -27870,6 +27962,42 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
27870
27962
|
}
|
|
27871
27963
|
}
|
|
27872
27964
|
},
|
|
27965
|
+
{
|
|
27966
|
+
resource: "devops.projects.flags",
|
|
27967
|
+
method: "reportCodeRefs",
|
|
27968
|
+
summary: "Report a project's flag code references",
|
|
27969
|
+
description: "Store one code-reference scan for a project in a single call: send the commit the scan read (scannedCommit, the checkout's `git rev-parse HEAD`) and, for every flag key the scan knows, the places code reads it ({path, line, snippet}). Send every key the checkout still expects to be referenced, including the ones found nowhere: a project flag with no entry in refs is stored with zero references, and zero is what lets `archive` see the code that named the flag is gone. A key that matches no live flag of the project — one already archived, or from another project — is returned in unknownKeys and stores nothing; reporting it is not an error. updated is how many flags were written, which is every live flag of the project because each gets a row. This is the write side of the archive gate: `POST /v1/flags/{id}:archive` refuses with FLAG_STILL_REFERENCED while the stored count is above zero, and the count it reads is exactly the one stored here. Staleness is not corrected for — the stored scannedCommit and count are used as they stand. At most 500 references are stored per flag; a longer list is truncated for storage while count still reports the true number. Reporting changes no flag's runtime behaviour.",
|
|
27970
|
+
http: "POST",
|
|
27971
|
+
path: "/devops/v1/projects/{project}/flags/code-refs",
|
|
27972
|
+
streaming: "no",
|
|
27973
|
+
pagination: false,
|
|
27974
|
+
pathParams: [
|
|
27975
|
+
{
|
|
27976
|
+
name: "project",
|
|
27977
|
+
sdkName: "project",
|
|
27978
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
27979
|
+
}
|
|
27980
|
+
],
|
|
27981
|
+
query: [],
|
|
27982
|
+
body: {
|
|
27983
|
+
required: true,
|
|
27984
|
+
fields: [
|
|
27985
|
+
{
|
|
27986
|
+
name: "scannedCommit",
|
|
27987
|
+
type: "string",
|
|
27988
|
+
required: true,
|
|
27989
|
+
description: "The commit this scan read, from `git rev-parse HEAD` in the reporting checkout; it is stored as each flag's codeRefs.scannedCommit, so a value older than the current head means the count describes the code as it was then."
|
|
27990
|
+
},
|
|
27991
|
+
{
|
|
27992
|
+
name: "refs",
|
|
27993
|
+
type: "array",
|
|
27994
|
+
itemType: "object",
|
|
27995
|
+
required: true,
|
|
27996
|
+
description: "One entry per flag key this scan judged. Send every key the checkout still expects to be referenced, including the ones found nowhere: a project flag with no entry here is stored with zero references, which is what later lets `archive` refuse only flags code still names."
|
|
27997
|
+
}
|
|
27998
|
+
]
|
|
27999
|
+
}
|
|
28000
|
+
},
|
|
27873
28001
|
{
|
|
27874
28002
|
resource: "devops.projects.promotions",
|
|
27875
28003
|
method: "list",
|
|
@@ -31712,11 +31840,57 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
31712
31840
|
]
|
|
31713
31841
|
}
|
|
31714
31842
|
},
|
|
31843
|
+
{
|
|
31844
|
+
resource: "media.libraries.assets.align",
|
|
31845
|
+
method: "create",
|
|
31846
|
+
summary: "Align asset",
|
|
31847
|
+
description: "Align two recordings by their sound and learn how they line up, without producing an asset. The route names the source asset; the body names the reference to compare against it. Both must be audio or a video, of the same library; anything else is refused with REFERENCE_TYPE_MISMATCH before a job exists. The call is an analysis: it decides and charges nothing else, bills per second of input, and stores no asset — the completed job carries the answer in result, offset_seconds saying how many seconds later the reference starts (so a caller holding both recordings knows which one to slide) and confidence how sure the correlation is. The analysis is idempotent on the source, the reference and the parameters: asking again with the same pair answers the completed job and its result instead of analysing and charging again. A max_offset_seconds caps how far apart the two may be; alignment needs an alignment model from the platform model catalogue, and with none published the request is refused with OPERATION_NOT_SUPPORTED, 尚未上架. Send Idempotency-Key, or idempotency_key in the body, to retry without analysing twice. The response is 202 with a queued Job whose operation is align; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read result. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/align with {\"reference_asset_id\":\"3f2a9c1e5b7d4e6f8a0b1c2d3e4f5a6b\",\"max_offset_seconds\":30}.",
|
|
31848
|
+
http: "POST",
|
|
31849
|
+
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
|
|
31850
|
+
streaming: "no",
|
|
31851
|
+
pagination: false,
|
|
31852
|
+
pathParams: [
|
|
31853
|
+
{
|
|
31854
|
+
name: "library_id",
|
|
31855
|
+
sdkName: "library_id",
|
|
31856
|
+
description: "Library ID returned by creation."
|
|
31857
|
+
},
|
|
31858
|
+
{
|
|
31859
|
+
name: "asset_id",
|
|
31860
|
+
sdkName: "asset_id",
|
|
31861
|
+
description: "32-character asset ID."
|
|
31862
|
+
}
|
|
31863
|
+
],
|
|
31864
|
+
query: [],
|
|
31865
|
+
body: {
|
|
31866
|
+
required: true,
|
|
31867
|
+
fields: [
|
|
31868
|
+
{
|
|
31869
|
+
name: "reference_asset_id",
|
|
31870
|
+
type: "string",
|
|
31871
|
+
required: true,
|
|
31872
|
+
description: "Asset to align against the one the route names. It must be an audio or video asset of the same library, otherwise the request is refused with REFERENCE_TYPE_MISMATCH before a job exists."
|
|
31873
|
+
},
|
|
31874
|
+
{
|
|
31875
|
+
name: "max_offset_seconds",
|
|
31876
|
+
type: "number",
|
|
31877
|
+
required: false,
|
|
31878
|
+
description: "Largest offset to search for, in seconds; omit it to let the model search its full range. Zero and negative values are refused with INVALID_PARAMS."
|
|
31879
|
+
},
|
|
31880
|
+
{
|
|
31881
|
+
name: "idempotency_key",
|
|
31882
|
+
type: "string",
|
|
31883
|
+
required: false,
|
|
31884
|
+
description: "Stable key so a retried request reuses the same job instead of analysing and charging again; reusing it with different content is rejected."
|
|
31885
|
+
}
|
|
31886
|
+
]
|
|
31887
|
+
}
|
|
31888
|
+
},
|
|
31715
31889
|
{
|
|
31716
31890
|
resource: "media.assets",
|
|
31717
31891
|
method: "edit",
|
|
31718
31892
|
summary: "Edit asset",
|
|
31719
|
-
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 and replace_background on images, remove_background on an image or a video, and to_video, frame and resynthesize on the material each takes; every other type in the operation vocabulary is refused with OPERATION_NOT_SUPPORTED. remove_background on a video produces a portrait matte video for compositing without a green screen: output picks
|
|
31893
|
+
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 and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe and redact through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe and redact on a video), and to_video, frame and resynthesize on the material each takes; every other type in the operation vocabulary is refused with OPERATION_NOT_SUPPORTED. The processing lane takes its model from the platform model catalogue, judged by the operation’s capability and overridable with operation.model, and bills per second of input; each edit is idempotent on the source, the operation and the parameters, so a second request that would make the same asset answers the asset already made instead of paying again, and an operation whose catalogue list is empty is refused with OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video produces a portrait matte video for compositing without a green screen: output picks mask (a black-and-white matte as a small H.264 video, person white and background black: use it as a Cut track mask with channel luma under the original video to lay a lecturer over slides — the choice for compositing) or alpha (the default: the person on a transparent background as ProRes 4444, which is very large, about 870 MB per 15 seconds of 1080p, so ask for it only when a transparent file itself is the deliverable), and model picks the matting model from types.matting.models of the generation capabilities — read it first, because a request that names none takes the first available matting model and a video is refused with OPERATION_NOT_SUPPORTED, in the model field, when the platform has published none. output and model mean nothing for an image source and are refused with INVALID_PARAMS naming the field rather than ignored. 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\"}}.",
|
|
31720
31894
|
http: "POST",
|
|
31721
31895
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
|
|
31722
31896
|
streaming: "no",
|
|
@@ -31741,7 +31915,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
31741
31915
|
name: "operation",
|
|
31742
31916
|
type: "object",
|
|
31743
31917
|
required: true,
|
|
31744
|
-
description: "One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED."
|
|
31918
|
+
description: "One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe and redact through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe and redact on a video), and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED. align is not an edit — it compares two assets and has its own endpoint, POST /media/v1/libraries/{library_id}/assets/{asset_id}/align."
|
|
31745
31919
|
},
|
|
31746
31920
|
{
|
|
31747
31921
|
name: "model",
|
|
@@ -34774,6 +34948,7 @@ for more details.`
|
|
|
34774
34948
|
"openai.images.generations",
|
|
34775
34949
|
"openai.responses",
|
|
34776
34950
|
"openai.videos",
|
|
34951
|
+
"praxis.media.process",
|
|
34777
34952
|
"praxis.video.matting",
|
|
34778
34953
|
"typesafe.systemone",
|
|
34779
34954
|
"volcengine.music",
|
|
@@ -40449,6 +40624,129 @@ for more details.`
|
|
|
40449
40624
|
]
|
|
40450
40625
|
}
|
|
40451
40626
|
},
|
|
40627
|
+
{
|
|
40628
|
+
resource: "share.permissions",
|
|
40629
|
+
method: "list",
|
|
40630
|
+
summary: "List shares",
|
|
40631
|
+
description: "Find the shares of this organization, newest first, for example every link that exposes one file before you decide which to revoke. Filter by resource_type, resource_id and status; filters combine with AND. Continue with next_page_token as page_token until next_page_token is null. Records never include link.web_url. A credential bound to specific files must pass resource_type and resource_id of a bound file, and an unbound file answers 404.",
|
|
40632
|
+
http: "GET",
|
|
40633
|
+
path: "/share/v1/permissions",
|
|
40634
|
+
streaming: "no",
|
|
40635
|
+
pagination: false,
|
|
40636
|
+
pathParams: [],
|
|
40637
|
+
query: [
|
|
40638
|
+
{
|
|
40639
|
+
name: "resource_type",
|
|
40640
|
+
type: "string",
|
|
40641
|
+
enum: [
|
|
40642
|
+
"file",
|
|
40643
|
+
"artifact"
|
|
40644
|
+
],
|
|
40645
|
+
required: false,
|
|
40646
|
+
description: "Only shares of this object type; file is the only type that creates today."
|
|
40647
|
+
},
|
|
40648
|
+
{
|
|
40649
|
+
name: "resource_id",
|
|
40650
|
+
type: "string",
|
|
40651
|
+
required: false,
|
|
40652
|
+
description: "Only shares of the object with this id, for example a file id from the File API; combine with resource_type."
|
|
40653
|
+
},
|
|
40654
|
+
{
|
|
40655
|
+
name: "status",
|
|
40656
|
+
type: "string",
|
|
40657
|
+
enum: [
|
|
40658
|
+
"active",
|
|
40659
|
+
"expired",
|
|
40660
|
+
"revoked"
|
|
40661
|
+
],
|
|
40662
|
+
required: false,
|
|
40663
|
+
description: "Only shares in this state; omit to list every state."
|
|
40664
|
+
},
|
|
40665
|
+
{
|
|
40666
|
+
name: "page_size",
|
|
40667
|
+
type: "integer",
|
|
40668
|
+
required: false,
|
|
40669
|
+
description: "Maximum shares in one page, from 1 to 100; defaults to 50."
|
|
40670
|
+
},
|
|
40671
|
+
{
|
|
40672
|
+
name: "page_token",
|
|
40673
|
+
type: "string",
|
|
40674
|
+
required: false,
|
|
40675
|
+
description: "Opaque next_page_token from the preceding page with the same filters; omit on the first request."
|
|
40676
|
+
}
|
|
40677
|
+
]
|
|
40678
|
+
},
|
|
40679
|
+
{
|
|
40680
|
+
resource: "share.permissions",
|
|
40681
|
+
method: "create",
|
|
40682
|
+
summary: "Create share",
|
|
40683
|
+
description: "Make one file readable by anyone holding a link, before sending the link to a person or embedding it. Name the object as resource {type, id}, with the file id from the File API. The response is 201 and is the only time link.web_url is returned; store it, because later reads omit it and a lost address means creating another share (the old one keeps working until you delete it). The link is anonymous and read-only. A type other than file answers 400 RESOURCE_TYPE_UNSUPPORTED, and a file that is missing or outside your organization answers 404 RESOURCE_NOT_FOUND.",
|
|
40684
|
+
http: "POST",
|
|
40685
|
+
path: "/share/v1/permissions",
|
|
40686
|
+
streaming: "no",
|
|
40687
|
+
pagination: false,
|
|
40688
|
+
pathParams: [],
|
|
40689
|
+
query: [],
|
|
40690
|
+
body: {
|
|
40691
|
+
required: true,
|
|
40692
|
+
fields: [
|
|
40693
|
+
{
|
|
40694
|
+
name: "resource",
|
|
40695
|
+
type: "object",
|
|
40696
|
+
required: true,
|
|
40697
|
+
description: "The object a share exposes, named by a type and an id."
|
|
40698
|
+
},
|
|
40699
|
+
{
|
|
40700
|
+
name: "expire_time",
|
|
40701
|
+
type: "string",
|
|
40702
|
+
required: false,
|
|
40703
|
+
description: "ISO 8601 instant after which the link answers 410; omit or null for a link that never expires, and it must be in the future."
|
|
40704
|
+
},
|
|
40705
|
+
{
|
|
40706
|
+
name: "prevents_download",
|
|
40707
|
+
type: "boolean",
|
|
40708
|
+
required: false,
|
|
40709
|
+
description: "Ask viewers to open the content without a download prompt; a limit, not a guarantee, because anyone who can read it can save it. Defaults to false."
|
|
40710
|
+
}
|
|
40711
|
+
]
|
|
40712
|
+
}
|
|
40713
|
+
},
|
|
40714
|
+
{
|
|
40715
|
+
resource: "share.permissions",
|
|
40716
|
+
method: "delete",
|
|
40717
|
+
summary: "Delete share",
|
|
40718
|
+
description: "Take a link back so nobody can open it again. This revokes the share, the record stays readable with status revoked, and opening the link answers 410. Repeating the call on a revoked share is harmless and answers 204 again. Content addresses already signed when the link was opened expire on their own within five minutes. Take the id from shares.create or shares.list.",
|
|
40719
|
+
http: "DELETE",
|
|
40720
|
+
path: "/share/v1/permissions/{id}",
|
|
40721
|
+
streaming: "no",
|
|
40722
|
+
pagination: false,
|
|
40723
|
+
pathParams: [
|
|
40724
|
+
{
|
|
40725
|
+
name: "id",
|
|
40726
|
+
sdkName: "id",
|
|
40727
|
+
description: "Share id returned by shares.create or shares.list, in the form shr_ followed by 32 lowercase letters or digits; a link address is not accepted."
|
|
40728
|
+
}
|
|
40729
|
+
],
|
|
40730
|
+
query: []
|
|
40731
|
+
},
|
|
40732
|
+
{
|
|
40733
|
+
resource: "share.permissions",
|
|
40734
|
+
method: "retrieve",
|
|
40735
|
+
summary: "Retrieve share",
|
|
40736
|
+
description: "Read one share to see whether its link is still active, when it expires, and how many times it was opened. Take the id from shares.create or shares.list. The record never includes link.web_url, because the address is shown once at creation. A share that does not exist or belongs to another organization answers 404 PERMISSION_NOT_FOUND.",
|
|
40737
|
+
http: "GET",
|
|
40738
|
+
path: "/share/v1/permissions/{id}",
|
|
40739
|
+
streaming: "no",
|
|
40740
|
+
pagination: false,
|
|
40741
|
+
pathParams: [
|
|
40742
|
+
{
|
|
40743
|
+
name: "id",
|
|
40744
|
+
sdkName: "id",
|
|
40745
|
+
description: "Share id returned by shares.create or shares.list, in the form shr_ followed by 32 lowercase letters or digits; a link address is not accepted."
|
|
40746
|
+
}
|
|
40747
|
+
],
|
|
40748
|
+
query: []
|
|
40749
|
+
},
|
|
40452
40750
|
{
|
|
40453
40751
|
resource: "studio.codexes",
|
|
40454
40752
|
method: "list",
|
|
@@ -47275,11 +47573,7 @@ var computersFilesConvert = (options) => (options.client ?? client).post({
|
|
|
47275
47573
|
type: "apiKey"
|
|
47276
47574
|
}],
|
|
47277
47575
|
url: "/agent/v1/computers/{computer_id}/files/convert",
|
|
47278
|
-
...options
|
|
47279
|
-
headers: {
|
|
47280
|
-
"Content-Type": "application/json",
|
|
47281
|
-
...options.headers
|
|
47282
|
-
}
|
|
47576
|
+
...options
|
|
47283
47577
|
});
|
|
47284
47578
|
var connectComputer = (options) => (options.client ?? client).post({
|
|
47285
47579
|
security: [{
|
|
@@ -47367,6 +47661,49 @@ var forkSession = (options) => (options.client ?? client).post({
|
|
|
47367
47661
|
...options.headers
|
|
47368
47662
|
}
|
|
47369
47663
|
});
|
|
47664
|
+
var listSessionArtifacts = (options) => (options.client ?? client).get({
|
|
47665
|
+
security: [{
|
|
47666
|
+
key: "BearerAuth",
|
|
47667
|
+
scheme: "bearer",
|
|
47668
|
+
type: "http"
|
|
47669
|
+
}, {
|
|
47670
|
+
key: "ApiKeyAuth",
|
|
47671
|
+
name: "X-API-Key",
|
|
47672
|
+
type: "apiKey"
|
|
47673
|
+
}],
|
|
47674
|
+
url: "/agent/v1/sessions/{session_id}/artifacts",
|
|
47675
|
+
...options
|
|
47676
|
+
});
|
|
47677
|
+
var createSessionArtifactContentUrl = (options) => (options.client ?? client).post({
|
|
47678
|
+
security: [{
|
|
47679
|
+
key: "BearerAuth",
|
|
47680
|
+
scheme: "bearer",
|
|
47681
|
+
type: "http"
|
|
47682
|
+
}, {
|
|
47683
|
+
key: "ApiKeyAuth",
|
|
47684
|
+
name: "X-API-Key",
|
|
47685
|
+
type: "apiKey"
|
|
47686
|
+
}],
|
|
47687
|
+
url: "/agent/v1/sessions/{session_id}/artifacts/{artifact_id}/content_url",
|
|
47688
|
+
...options,
|
|
47689
|
+
headers: {
|
|
47690
|
+
"Content-Type": "application/json",
|
|
47691
|
+
...options.headers
|
|
47692
|
+
}
|
|
47693
|
+
});
|
|
47694
|
+
var listSessionRequests = (options) => (options.client ?? client).get({
|
|
47695
|
+
security: [{
|
|
47696
|
+
key: "BearerAuth",
|
|
47697
|
+
scheme: "bearer",
|
|
47698
|
+
type: "http"
|
|
47699
|
+
}, {
|
|
47700
|
+
key: "ApiKeyAuth",
|
|
47701
|
+
name: "X-API-Key",
|
|
47702
|
+
type: "apiKey"
|
|
47703
|
+
}],
|
|
47704
|
+
url: "/agent/v1/sessions/{session_id}/requests",
|
|
47705
|
+
...options
|
|
47706
|
+
});
|
|
47370
47707
|
var listSessionBackgroundTasks = (options) => (options.client ?? client).get({
|
|
47371
47708
|
security: [{
|
|
47372
47709
|
key: "BearerAuth",
|
|
@@ -53251,6 +53588,19 @@ var devopsFlagsCreate = (options) => (options.client ?? client).post({
|
|
|
53251
53588
|
...options.headers
|
|
53252
53589
|
}
|
|
53253
53590
|
});
|
|
53591
|
+
var devopsFlagsReportCodeRefs = (options) => (options.client ?? client).post({
|
|
53592
|
+
security: [{
|
|
53593
|
+
key: "devops-bearerAuth",
|
|
53594
|
+
scheme: "bearer",
|
|
53595
|
+
type: "http"
|
|
53596
|
+
}],
|
|
53597
|
+
url: "/devops/v1/projects/{project}/flags/code-refs",
|
|
53598
|
+
...options,
|
|
53599
|
+
headers: {
|
|
53600
|
+
"Content-Type": "application/json",
|
|
53601
|
+
...options.headers
|
|
53602
|
+
}
|
|
53603
|
+
});
|
|
53254
53604
|
var devopsFlagsGet = (options) => (options.client ?? client).get({
|
|
53255
53605
|
security: [{
|
|
53256
53606
|
key: "devops-bearerAuth",
|
|
@@ -54464,6 +54814,19 @@ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).ge
|
|
|
54464
54814
|
url: "/media/v1/generation/capabilities",
|
|
54465
54815
|
...options
|
|
54466
54816
|
});
|
|
54817
|
+
var mediaAlignAsset = (options) => (options.client ?? client).post({
|
|
54818
|
+
security: [{
|
|
54819
|
+
key: "media-BearerAuth",
|
|
54820
|
+
scheme: "bearer",
|
|
54821
|
+
type: "http"
|
|
54822
|
+
}],
|
|
54823
|
+
url: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
|
|
54824
|
+
...options,
|
|
54825
|
+
headers: {
|
|
54826
|
+
"Content-Type": "application/json",
|
|
54827
|
+
...options.headers
|
|
54828
|
+
}
|
|
54829
|
+
});
|
|
54467
54830
|
var ontologyListTypes = (options) => (options?.client ?? client).get({
|
|
54468
54831
|
security: [{
|
|
54469
54832
|
key: "ontology-bearerAuth",
|
|
@@ -55596,6 +55959,46 @@ var searchMap = (options) => (options.client ?? client).post({
|
|
|
55596
55959
|
...options.headers
|
|
55597
55960
|
}
|
|
55598
55961
|
});
|
|
55962
|
+
var shareListPermissions = (options) => (options?.client ?? client).get({
|
|
55963
|
+
security: [{
|
|
55964
|
+
key: "share-bearerAuth",
|
|
55965
|
+
scheme: "bearer",
|
|
55966
|
+
type: "http"
|
|
55967
|
+
}],
|
|
55968
|
+
url: "/share/v1/permissions",
|
|
55969
|
+
...options
|
|
55970
|
+
});
|
|
55971
|
+
var shareCreatePermission = (options) => (options.client ?? client).post({
|
|
55972
|
+
security: [{
|
|
55973
|
+
key: "share-bearerAuth",
|
|
55974
|
+
scheme: "bearer",
|
|
55975
|
+
type: "http"
|
|
55976
|
+
}],
|
|
55977
|
+
url: "/share/v1/permissions",
|
|
55978
|
+
...options,
|
|
55979
|
+
headers: {
|
|
55980
|
+
"Content-Type": "application/json",
|
|
55981
|
+
...options.headers
|
|
55982
|
+
}
|
|
55983
|
+
});
|
|
55984
|
+
var shareDeletePermission = (options) => (options.client ?? client).delete({
|
|
55985
|
+
security: [{
|
|
55986
|
+
key: "share-bearerAuth",
|
|
55987
|
+
scheme: "bearer",
|
|
55988
|
+
type: "http"
|
|
55989
|
+
}],
|
|
55990
|
+
url: "/share/v1/permissions/{id}",
|
|
55991
|
+
...options
|
|
55992
|
+
});
|
|
55993
|
+
var shareRetrievePermission = (options) => (options.client ?? client).get({
|
|
55994
|
+
security: [{
|
|
55995
|
+
key: "share-bearerAuth",
|
|
55996
|
+
scheme: "bearer",
|
|
55997
|
+
type: "http"
|
|
55998
|
+
}],
|
|
55999
|
+
url: "/share/v1/permissions/{id}",
|
|
56000
|
+
...options
|
|
56001
|
+
});
|
|
55599
56002
|
var studioGenresList = (options) => (options?.client ?? client).get({
|
|
55600
56003
|
security: [{
|
|
55601
56004
|
key: "BearerAuth",
|
|
@@ -57696,6 +58099,12 @@ function createAgent(transport) {
|
|
|
57696
58099
|
},
|
|
57697
58100
|
sessions: {
|
|
57698
58101
|
archive: bind(transport, sessionsArchive),
|
|
58102
|
+
artifacts: {
|
|
58103
|
+
contentUrl: {
|
|
58104
|
+
create: bind(transport, createSessionArtifactContentUrl)
|
|
58105
|
+
},
|
|
58106
|
+
list: bind(transport, listSessionArtifacts)
|
|
58107
|
+
},
|
|
57699
58108
|
backgroundTasks: {
|
|
57700
58109
|
list: bind(transport, listSessionBackgroundTasks),
|
|
57701
58110
|
retrieveOutput: bind(transport, getSessionBackgroundTaskOutput),
|
|
@@ -57714,6 +58123,9 @@ function createAgent(transport) {
|
|
|
57714
58123
|
},
|
|
57715
58124
|
fork: bind(transport, forkSession),
|
|
57716
58125
|
list: bind(transport, sessionsList),
|
|
58126
|
+
requests: {
|
|
58127
|
+
list: bind(transport, listSessionRequests)
|
|
58128
|
+
},
|
|
57717
58129
|
resources: {
|
|
57718
58130
|
create: bind(transport, sessionsResourcesAdd),
|
|
57719
58131
|
delete: bind(transport, aliasOperation(sessionsResourcesDelete, { query: { session_id: "query_session_id" } })),
|
|
@@ -58226,7 +58638,8 @@ function createDevops(transport) {
|
|
|
58226
58638
|
},
|
|
58227
58639
|
flags: {
|
|
58228
58640
|
create: bind(transport, devopsFlagsCreate),
|
|
58229
|
-
list: bind(transport, devopsFlagsList)
|
|
58641
|
+
list: bind(transport, devopsFlagsList),
|
|
58642
|
+
reportCodeRefs: bind(transport, devopsFlagsReportCodeRefs)
|
|
58230
58643
|
},
|
|
58231
58644
|
list: bind(transport, devopsProjectsList),
|
|
58232
58645
|
promotions: {
|
|
@@ -58430,6 +58843,9 @@ function createMedia(transport) {
|
|
|
58430
58843
|
},
|
|
58431
58844
|
libraries: {
|
|
58432
58845
|
assets: {
|
|
58846
|
+
align: {
|
|
58847
|
+
create: bind(transport, mediaAlignAsset)
|
|
58848
|
+
},
|
|
58433
58849
|
batch: bind(transport, mediaBatchAssets),
|
|
58434
58850
|
create: bind(transport, (options) => mediaUploadAsset({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } })),
|
|
58435
58851
|
delete: bind(transport, mediaDeleteAsset),
|
|
@@ -58871,6 +59287,16 @@ function createSearch(transport) {
|
|
|
58871
59287
|
}
|
|
58872
59288
|
};
|
|
58873
59289
|
}
|
|
59290
|
+
function createShare(transport) {
|
|
59291
|
+
return {
|
|
59292
|
+
permissions: {
|
|
59293
|
+
create: bind(transport, shareCreatePermission),
|
|
59294
|
+
delete: bind(transport, shareDeletePermission),
|
|
59295
|
+
list: bind(transport, shareListPermissions),
|
|
59296
|
+
retrieve: bind(transport, shareRetrievePermission)
|
|
59297
|
+
}
|
|
59298
|
+
};
|
|
59299
|
+
}
|
|
58874
59300
|
function createStudio(transport) {
|
|
58875
59301
|
return {
|
|
58876
59302
|
codexes: {
|
|
@@ -59141,6 +59567,7 @@ var resourceFactories = {
|
|
|
59141
59567
|
organization: createOrganization,
|
|
59142
59568
|
sandbox: createSandbox,
|
|
59143
59569
|
search: createSearch,
|
|
59570
|
+
share: createShare,
|
|
59144
59571
|
studio: createStudio,
|
|
59145
59572
|
ticket: createTicket,
|
|
59146
59573
|
vault: createVault
|
|
@@ -61417,30 +61844,31 @@ var workflows = [
|
|
|
61417
61844
|
{
|
|
61418
61845
|
words: ["devops", "flag", "refs"],
|
|
61419
61846
|
requires: "checkout",
|
|
61420
|
-
usage: "devops flag refs [key]",
|
|
61421
|
-
summary: "Where each flag key is referenced in this checkout: file and line, for every registered key or one named key.",
|
|
61422
|
-
example: "praxis devops flag refs",
|
|
61847
|
+
usage: "devops flag refs [key] [--report --project <dvp_…>]",
|
|
61848
|
+
summary: "Where each flag key is referenced in this checkout: file and line, for every registered key or one named key. With --report the whole scan of every registered key is posted to the platform, which is what lets archiving a flag be refused while code still names it.",
|
|
61849
|
+
example: "praxis devops flag refs --report --project dvp_…",
|
|
61423
61850
|
examples: [
|
|
61424
61851
|
"praxis devops flag refs",
|
|
61425
|
-
"praxis devops flag refs run-page-v2"
|
|
61852
|
+
"praxis devops flag refs run-page-v2",
|
|
61853
|
+
"praxis devops flag refs --report --project dvp_…"
|
|
61426
61854
|
],
|
|
61427
61855
|
group: "local",
|
|
61428
|
-
network: "
|
|
61429
|
-
platform: "
|
|
61856
|
+
network: "Offline. --report: needs a login and sends this checkout's references to the platform",
|
|
61857
|
+
platform: "the platform half of the scan: `devops.flags.reportCodeRefs` stores the references on each flag of the project (0 for a key this scan no longer finds), `devops.flags.listCodeRefs` reads them back, and `praxis api devops flag archive <flg_…>` refuses while a flag still has references or is still on in an environment (ADR-125 §4).",
|
|
61430
61858
|
docs: "https://docs.deepraxis.com/docs/cli"
|
|
61431
61859
|
},
|
|
61432
61860
|
{
|
|
61433
61861
|
words: ["devops", "flag", "remove"],
|
|
61434
61862
|
requires: "checkout",
|
|
61435
61863
|
usage: "devops flag remove <key>",
|
|
61436
|
-
summary: "The local step of removing a flag: list the remaining references, or the steps that follow once none remain. Order:
|
|
61864
|
+
summary: "The local step of removing a flag: list the remaining references, or the steps that follow once none remain. Order: turn the flag off in every environment (praxis api devops flag environment update), delete the code that names the key and deploy it, run this command, report the scan with praxis devops flag refs --report, then retire the flag on the platform with praxis api devops flag archive <flg_…> (irreversible; it is refused while references remain or an environment still has it on), then regenerate the registry with praxis devops flag sync.",
|
|
61437
61865
|
example: "praxis devops flag remove run-page-v2",
|
|
61438
61866
|
examples: [
|
|
61439
61867
|
"praxis devops flag remove run-page-v2"
|
|
61440
61868
|
],
|
|
61441
61869
|
group: "local",
|
|
61442
61870
|
network: "offline",
|
|
61443
|
-
platform: "praxis api devops flag archive — retires the flag on the platform after the code that named it is deployed away
|
|
61871
|
+
platform: "praxis api devops flag archive — retires the flag on the platform after the code that named it is deployed away, and keeps the key reserved; it is refused, not forced, while the references the last `praxis devops flag refs --report` wrote remain or the flag is still on in an environment (ADR-050 §7, ADR-125 §4).",
|
|
61444
61872
|
docs: "https://docs.deepraxis.com/docs/cli"
|
|
61445
61873
|
},
|
|
61446
61874
|
{
|
|
@@ -63049,6 +63477,101 @@ function wranglerEdges(nodes) {
|
|
|
63049
63477
|
}
|
|
63050
63478
|
return edges;
|
|
63051
63479
|
}
|
|
63480
|
+
// ../../packages/praxis/deploy-core/src/lambda-function.ts
|
|
63481
|
+
var LAMBDA_FUNCTIONS_ROOT = "services/lambda/functions";
|
|
63482
|
+
var UPSTREAM = "aliyun-fc";
|
|
63483
|
+
var RECIPE_PATH = /^services\/lambda\/functions\/([^/]+)\/function\.json$/;
|
|
63484
|
+
var isText = (value) => typeof value === "string" && value !== "";
|
|
63485
|
+
var isCount = (value, min, max) => typeof value === "number" && Number.isInteger(value) && value >= min && value <= max;
|
|
63486
|
+
function lambdaFunctionOf(text) {
|
|
63487
|
+
const parsed = text === null ? null : parseJsonc2(text);
|
|
63488
|
+
if (parsed === null)
|
|
63489
|
+
return null;
|
|
63490
|
+
if (!isText(parsed.name) || !isText(parsed.upstream))
|
|
63491
|
+
return null;
|
|
63492
|
+
if (!Array.isArray(parsed.regions) || parsed.regions.length === 0 || !parsed.regions.every(isText))
|
|
63493
|
+
return null;
|
|
63494
|
+
if (parsed.gpu !== undefined && !isText(parsed.gpu))
|
|
63495
|
+
return null;
|
|
63496
|
+
if (!isCount(parsed.cpu, 1, 256))
|
|
63497
|
+
return null;
|
|
63498
|
+
if (!isCount(parsed.memoryMb, 128, 32 * 1024))
|
|
63499
|
+
return null;
|
|
63500
|
+
if (!isCount(parsed.timeoutSeconds, 1, 24 * 3600))
|
|
63501
|
+
return null;
|
|
63502
|
+
if (!isCount(parsed.concurrency, 1, 1024))
|
|
63503
|
+
return null;
|
|
63504
|
+
return {
|
|
63505
|
+
name: parsed.name,
|
|
63506
|
+
upstream: parsed.upstream,
|
|
63507
|
+
regions: [...parsed.regions],
|
|
63508
|
+
...parsed.gpu === undefined ? {} : { gpu: parsed.gpu },
|
|
63509
|
+
cpu: parsed.cpu,
|
|
63510
|
+
memoryMb: parsed.memoryMb,
|
|
63511
|
+
timeoutSeconds: parsed.timeoutSeconds,
|
|
63512
|
+
concurrency: parsed.concurrency
|
|
63513
|
+
};
|
|
63514
|
+
}
|
|
63515
|
+
function lambdaFunctionTarget(recipe) {
|
|
63516
|
+
return { path: `${LAMBDA_FUNCTIONS_ROOT}/${recipe.name}`, name: `lambda-${recipe.name}` };
|
|
63517
|
+
}
|
|
63518
|
+
function lambdaFunctionOwner(path) {
|
|
63519
|
+
return path.split("/").slice(0, -2).join("/");
|
|
63520
|
+
}
|
|
63521
|
+
async function scanRecipes(facts) {
|
|
63522
|
+
const found = [];
|
|
63523
|
+
const warnings = [];
|
|
63524
|
+
for (const path of [...facts.tree].sort()) {
|
|
63525
|
+
const match = RECIPE_PATH.exec(path);
|
|
63526
|
+
if (match === null)
|
|
63527
|
+
continue;
|
|
63528
|
+
const dir = path.slice(0, -"/function.json".length);
|
|
63529
|
+
const recipe = lambdaFunctionOf(await facts.read(path));
|
|
63530
|
+
if (recipe === null) {
|
|
63531
|
+
warnings.push(`${dir}: function.json is not a recipe`);
|
|
63532
|
+
continue;
|
|
63533
|
+
}
|
|
63534
|
+
if (recipe.upstream !== UPSTREAM)
|
|
63535
|
+
continue;
|
|
63536
|
+
if (recipe.name !== match[1]) {
|
|
63537
|
+
warnings.push(`${dir}: function.json names ${JSON.stringify(recipe.name)}, not the directory name`);
|
|
63538
|
+
continue;
|
|
63539
|
+
}
|
|
63540
|
+
found.push(recipe);
|
|
63541
|
+
}
|
|
63542
|
+
return { found, warnings };
|
|
63543
|
+
}
|
|
63544
|
+
function lambdaFunctionProvider(_options = {}) {
|
|
63545
|
+
return {
|
|
63546
|
+
id: "lambda-function",
|
|
63547
|
+
async detect(facts) {
|
|
63548
|
+
return (await scanRecipes(facts)).found.length > 0 ? "certain" : "none";
|
|
63549
|
+
},
|
|
63550
|
+
async plan(facts, partial) {
|
|
63551
|
+
const claimed = new Set(partial.targets.map((target) => target.path));
|
|
63552
|
+
const scan = await scanRecipes(facts);
|
|
63553
|
+
const targets = [];
|
|
63554
|
+
const byOwner = new Map;
|
|
63555
|
+
for (const recipe of scan.found) {
|
|
63556
|
+
const { path, name } = lambdaFunctionTarget(recipe);
|
|
63557
|
+
if (claimed.has(path))
|
|
63558
|
+
continue;
|
|
63559
|
+
targets.push({ path, name, destination: "aliyun-fc", production: true, onTrain: true });
|
|
63560
|
+
const owner = lambdaFunctionOwner(path);
|
|
63561
|
+
byOwner.set(owner, [...byOwner.get(owner) ?? [], path]);
|
|
63562
|
+
}
|
|
63563
|
+
const refined = partial.targets.map((target) => {
|
|
63564
|
+
const paths = byOwner.get(target.path);
|
|
63565
|
+
return paths === undefined ? target : { ...target, dependsOn: [...new Set([...target.dependsOn ?? [], ...paths])] };
|
|
63566
|
+
});
|
|
63567
|
+
return {
|
|
63568
|
+
targets: [...refined, ...targets],
|
|
63569
|
+
...scan.warnings.length === 0 ? {} : { warnings: [...partial.warnings ?? [], ...scan.warnings] }
|
|
63570
|
+
};
|
|
63571
|
+
}
|
|
63572
|
+
};
|
|
63573
|
+
}
|
|
63574
|
+
var lambdaFunction = lambdaFunctionProvider();
|
|
63052
63575
|
// ../../packages/praxis/deploy-core/src/package-manifest.ts
|
|
63053
63576
|
function packageManifestOf(text) {
|
|
63054
63577
|
const parsed = text === null ? null : parseJsonc2(text);
|
|
@@ -63383,7 +63906,11 @@ function workspaceCloudflareProvider(options = {}) {
|
|
|
63383
63906
|
};
|
|
63384
63907
|
}
|
|
63385
63908
|
var workspaceCloudflare = workspaceCloudflareProvider();
|
|
63386
|
-
var BUILTIN_PROVIDERS = [
|
|
63909
|
+
var BUILTIN_PROVIDERS = [
|
|
63910
|
+
workspaceCloudflare,
|
|
63911
|
+
workspaceNpmProvider(),
|
|
63912
|
+
lambdaFunctionProvider()
|
|
63913
|
+
];
|
|
63387
63914
|
function directoriesOfPackageNames(workspaces) {
|
|
63388
63915
|
const byName = new Map;
|
|
63389
63916
|
for (const workspace of workspaces)
|
|
@@ -63410,15 +63937,23 @@ function workspaceClosureOf(target, byName, dependenciesOf) {
|
|
|
63410
63937
|
// ../../packages/praxis/deploy-core/src/plan.ts
|
|
63411
63938
|
async function planRepository(facts, providers = BUILTIN_PROVIDERS, options = {}) {
|
|
63412
63939
|
let partial = { targets: [] };
|
|
63940
|
+
const warnings = [];
|
|
63413
63941
|
for (const provider of providers) {
|
|
63414
63942
|
const confidence = await provider.detect(facts);
|
|
63415
63943
|
if (confidence === "none")
|
|
63416
63944
|
continue;
|
|
63417
63945
|
partial = await provider.plan(facts, partial);
|
|
63946
|
+
for (const warning of partial.warnings ?? [])
|
|
63947
|
+
if (!warnings.includes(warning))
|
|
63948
|
+
warnings.push(warning);
|
|
63418
63949
|
}
|
|
63419
63950
|
const drafts = partial.targets.filter((draft) => draft.deploy !== false);
|
|
63420
63951
|
const workspaces = await readWorkspaces(facts, options);
|
|
63421
|
-
return {
|
|
63952
|
+
return {
|
|
63953
|
+
commit: facts.commit,
|
|
63954
|
+
targets: closePlan(drafts, workspaces),
|
|
63955
|
+
...warnings.length === 0 ? {} : { warnings }
|
|
63956
|
+
};
|
|
63422
63957
|
}
|
|
63423
63958
|
function closePlan(drafts, workspaces) {
|
|
63424
63959
|
const configOf = new Map(workspaces.map((workspace) => [workspace.dir, workspace.config]));
|
|
@@ -63440,7 +63975,7 @@ function closePlan(drafts, workspaces) {
|
|
|
63440
63975
|
path: draft.path,
|
|
63441
63976
|
name: draft.name,
|
|
63442
63977
|
destination: draft.destination,
|
|
63443
|
-
dependsOn: edges.get(draft.path) ?? [],
|
|
63978
|
+
dependsOn: [...new Set([...edges.get(draft.path) ?? [], ...draft.dependsOn ?? []])],
|
|
63444
63979
|
...draft.environments === undefined ? {} : { environments: draft.environments },
|
|
63445
63980
|
production: draft.production === true,
|
|
63446
63981
|
onTrain: draft.onTrain !== false,
|
|
@@ -65935,7 +66470,7 @@ function removalSteps(key) {
|
|
|
65935
66470
|
`No code references ${key}. The rest is not this command's to do:`,
|
|
65936
66471
|
` 1. Deploy the code that removed the references (deploy never writes the trunk).`,
|
|
65937
66472
|
` 2. Retire the flag on the platform: praxis api devops flag archive <flg_…> — the terminal state.`,
|
|
65938
|
-
` Archiving keeps the key reserved and
|
|
66473
|
+
` Archiving keeps the key reserved, and is refused while reported references remain or an environment still has it on; there is no separate delete call (ADR-125 §4).`,
|
|
65939
66474
|
` 3. Regenerate the registry: praxis devops flag sync`
|
|
65940
66475
|
].join(`
|
|
65941
66476
|
`);
|
|
@@ -65965,6 +66500,25 @@ async function repositoryRoot(cwd, read) {
|
|
|
65965
66500
|
dir = parent;
|
|
65966
66501
|
}
|
|
65967
66502
|
}
|
|
66503
|
+
var SNIPPET_LIMIT = 200;
|
|
66504
|
+
function snippetOf(text2, line) {
|
|
66505
|
+
const trimmed = (text2.split(`
|
|
66506
|
+
`)[line - 1] ?? "").trim();
|
|
66507
|
+
return trimmed.length > SNIPPET_LIMIT ? trimmed.slice(0, SNIPPET_LIMIT) : trimmed;
|
|
66508
|
+
}
|
|
66509
|
+
function reportedKeys(keys, sources, refs) {
|
|
66510
|
+
const texts = new Map(sources.map((file) => [file.path, file.text]));
|
|
66511
|
+
return keys.map((flagKey) => ({
|
|
66512
|
+
flagKey,
|
|
66513
|
+
items: refs.filter((ref) => ref.key === flagKey).map((ref) => ({ path: ref.file, line: ref.line, snippet: snippetOf(texts.get(ref.file) ?? "", ref.line) }))
|
|
66514
|
+
}));
|
|
66515
|
+
}
|
|
66516
|
+
function reportNeedsProject() {
|
|
66517
|
+
return new UsageError("praxis devops flag refs --report needs the project to report into: --project <dvp_…>", "Pass the DevOps project id the flags belong to — `praxis api devops project list` lists them, or read devops.project from praxis.jsonc.");
|
|
66518
|
+
}
|
|
66519
|
+
function reportClientMissing() {
|
|
66520
|
+
return new UsageError("this CLI build has no client method for devops.flags.reportCodeRefs yet", "The route is declared in the protocol but the public /devops/v1 spec (and the SDK generated from it) does not carry it yet (#1881); the reference report cannot be sent until that is regenerated.");
|
|
66521
|
+
}
|
|
65968
66522
|
async function codeSources(ports, registry) {
|
|
65969
66523
|
const suffix = registry.replace(/^\.\//, "");
|
|
65970
66524
|
return (await ports.sources()).filter((file) => !file.path.replace(/^\.\//, "").endsWith(suffix));
|
|
@@ -66021,15 +66575,33 @@ async function devopsFlagScaffold(key, args, ports) {
|
|
|
66021
66575
|
ports.emit({ kind: "object", data: { key, registry, file, call: scaffoldCall(key) } });
|
|
66022
66576
|
return 0;
|
|
66023
66577
|
}
|
|
66024
|
-
async function devopsFlagRefs(key, ports) {
|
|
66578
|
+
async function devopsFlagRefs(key, args, ports) {
|
|
66025
66579
|
const registry = await registryOf(ports);
|
|
66026
66580
|
const flags = await ports.loadRegistry(registry);
|
|
66027
66581
|
const keys = key !== undefined ? [key] : Object.keys(flags).sort();
|
|
66028
|
-
const
|
|
66582
|
+
const sources = await codeSources(ports, registry);
|
|
66583
|
+
const refs = flagReferences(sources, keys);
|
|
66029
66584
|
for (const ref of refs)
|
|
66030
66585
|
ports.human(`${ref.file}:${ref.line}: ${ref.key}`);
|
|
66031
66586
|
ports.human(refs.length ? `${refs.length} reference(s) in ${new Set(refs.map((r) => r.file)).size} file(s).` : `No references to ${key ?? "any registered flag"} in this checkout.`);
|
|
66032
|
-
|
|
66587
|
+
if (!args.report) {
|
|
66588
|
+
ports.emit({ kind: "object", data: { refs, reported: false } });
|
|
66589
|
+
return 0;
|
|
66590
|
+
}
|
|
66591
|
+
const project = args.project;
|
|
66592
|
+
if (project === undefined || project === "")
|
|
66593
|
+
throw reportNeedsProject();
|
|
66594
|
+
const scannedCommit = (await ports.git(["rev-parse", "HEAD"])).trim();
|
|
66595
|
+
if (scannedCommit === "")
|
|
66596
|
+
throw new UsageError("git rev-parse HEAD answered no commit", "Run this command inside a git repository.");
|
|
66597
|
+
const payload = reportedKeys(Object.keys(flags).sort(), sources, refs);
|
|
66598
|
+
const client2 = await ports.client();
|
|
66599
|
+
const report = client2.devops?.projects?.flags?.reportCodeRefs;
|
|
66600
|
+
if (typeof report !== "function")
|
|
66601
|
+
throw reportClientMissing();
|
|
66602
|
+
const answer = await report.call(client2.devops.projects.flags, { path: { project }, body: { scannedCommit, refs: payload } });
|
|
66603
|
+
ports.human(`Reported ${refs.length} reference(s) over ${payload.length} key(s) to ${project} at ${scannedCommit}: ${answer.updated} flag(s) updated${answer.unknownKeys.length ? `; unknown key(s): ${answer.unknownKeys.join(", ")}` : ""}.`);
|
|
66604
|
+
ports.emit({ kind: "object", data: { refs, reported: true, project, scannedCommit, updated: answer.updated, unknownKeys: answer.unknownKeys } });
|
|
66033
66605
|
return 0;
|
|
66034
66606
|
}
|
|
66035
66607
|
async function devopsFlagRemove(key, ports) {
|
|
@@ -68679,6 +69251,7 @@ var FILE_ID = /^file-/;
|
|
|
68679
69251
|
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : undefined;
|
|
68680
69252
|
var isImage = (node2) => node2.type === "image" && typeof node2.url === "string";
|
|
68681
69253
|
var isRef = (node2) => node2.type === "ref" && typeof node2.ref === "string";
|
|
69254
|
+
var NODE_TYPES = new Set(Object.keys(KNOWN_PROPS));
|
|
68682
69255
|
function visit2(value, nodeId, fn) {
|
|
68683
69256
|
if (Array.isArray(value)) {
|
|
68684
69257
|
for (const item of value)
|
|
@@ -69615,7 +70188,7 @@ function startProgress(ctx, write = (text2) => writeOutput({ stderr: text2 })) {
|
|
|
69615
70188
|
}
|
|
69616
70189
|
|
|
69617
70190
|
// src/main.ts
|
|
69618
|
-
var version = "0.3.0-dev.
|
|
70191
|
+
var version = "0.3.0-dev.c811f1a";
|
|
69619
70192
|
var commands = commandTree(operations);
|
|
69620
70193
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
69621
70194
|
function route(argv) {
|
|
@@ -69790,6 +70363,10 @@ var appOptions = {
|
|
|
69790
70363
|
"devops flag scaffold": [
|
|
69791
70364
|
{ name: "out", type: "string", description: "Directory the paired on/off scenario stubs are written to (default: the current directory)." }
|
|
69792
70365
|
],
|
|
70366
|
+
"devops flag refs": [
|
|
70367
|
+
{ name: "report", type: "boolean", description: "Post this checkout's scan to the platform, so archiving a flag is refused while code still names it (ADR-125 §4)." },
|
|
70368
|
+
{ name: "project", type: "string", description: "With --report: the DevOps project id (dvp_…) whose flags the scan is reported into. Required." }
|
|
70369
|
+
],
|
|
69793
70370
|
"canvas import": [
|
|
69794
70371
|
{ name: "name", type: "string", description: "Name for the new canvas (default: the file name without .pen)." },
|
|
69795
70372
|
{ name: "canvas", type: "string", description: "Import into this existing canvas instead of a new one. Whole-canvas replacement: it clears what is already there and requires --yes." },
|
|
@@ -69804,7 +70381,7 @@ var appOptions = {
|
|
|
69804
70381
|
};
|
|
69805
70382
|
appOptions["devops engine deploy"] = appOptions["devops deploy"];
|
|
69806
70383
|
var workflowOptions = (words) => words[0] === "skill" ? [{ name: "install", type: "string" }] : appOptions[words.join(" ")] ?? [];
|
|
69807
|
-
function flagPortsFor(ports, context, emit) {
|
|
70384
|
+
function flagPortsFor(ports, context, emit, connect) {
|
|
69808
70385
|
return {
|
|
69809
70386
|
mode: context.mode,
|
|
69810
70387
|
emit,
|
|
@@ -69814,6 +70391,8 @@ function flagPortsFor(ports, context, emit) {
|
|
|
69814
70391
|
},
|
|
69815
70392
|
cwd: ports.cwd,
|
|
69816
70393
|
readFile: ports.readFile,
|
|
70394
|
+
git: async (args) => (await ports.spawnCapture("git", [...args], { cwd: ports.cwd })).output,
|
|
70395
|
+
client: connect,
|
|
69817
70396
|
writeFile: (path, text2) => writeFile5(path, text2, "utf8"),
|
|
69818
70397
|
mkdir: async (path) => {
|
|
69819
70398
|
await mkdir4(path, { recursive: true });
|
|
@@ -70267,7 +70846,7 @@ Examples:
|
|
|
70267
70846
|
}
|
|
70268
70847
|
});
|
|
70269
70848
|
}
|
|
70270
|
-
const flagPorts = flagPortsFor(ports, ctx, emit);
|
|
70849
|
+
const flagPorts = flagPortsFor(ports, ctx, emit, async () => await auth.client(org));
|
|
70271
70850
|
if (name === "devops flag sync")
|
|
70272
70851
|
return await devopsFlagSync({ check: Boolean(parsed.flags.check) }, flagPorts);
|
|
70273
70852
|
if (name === "devops flag check")
|
|
@@ -70275,7 +70854,7 @@ Examples:
|
|
|
70275
70854
|
if (name === "devops flag scaffold")
|
|
70276
70855
|
return await devopsFlagScaffold(parsed.positional[0], { out: parsed.flags.out?.[0] }, flagPorts);
|
|
70277
70856
|
if (name === "devops flag refs")
|
|
70278
|
-
return await devopsFlagRefs(parsed.positional[0], flagPorts);
|
|
70857
|
+
return await devopsFlagRefs(parsed.positional[0], { report: Boolean(parsed.flags.report), project: parsed.flags.project?.[0] }, flagPorts);
|
|
70279
70858
|
return await devopsFlagRemove(parsed.positional[0], flagPorts);
|
|
70280
70859
|
}
|
|
70281
70860
|
if (!quiet)
|