@deepraxis/cli 0.3.0-dev.0a48184 → 0.3.0-dev.0d5636a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/COMMANDS.md +11 -2
  2. package/dist/praxis.js +551 -34
  3. 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
- 787 HTTP operations; 789 commands including aliases.
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
  |---|---|---|---|
@@ -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,12 @@ 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-never-hold": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2119, expires: "2026-11-29", system: "devops" },
13991
+ "requests-v1": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2057, expires: "2026-11-28", system: "devops" },
13992
+ "router-precommit-hedge": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2052, expires: "2026-11-28", system: "devops" },
13989
13993
  "search-provider-routing": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "praxis-98", ticket: 716, expires: "2026-12-31", system: "devops" },
13990
13994
  "unit-live-probe": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: null, expires: "2026-11-19", system: "devops" }
13991
13995
  };
@@ -14031,6 +14035,8 @@ function checkFlags(files, registry, today = new Date().toISOString().slice(0, 1
14031
14035
  add(f, browserList.index + entry.index, `unregistered browser flag key "${entry[1]}"`);
14032
14036
  }
14033
14037
  }
14038
+ if (/\.generated\.[cm]?[jt]sx?$/.test(f.path))
14039
+ continue;
14034
14040
  const calls = /(\.bool|\breadBrowserFlag|\buseBrowserFlag)\s*\(\s*([^,)\n]+)/g;
14035
14041
  for (const m of f.text.matchAll(calls)) {
14036
14042
  if (/function\s*$/.test(f.text.slice(Math.max(0, m.index - 20), m.index)))
@@ -14539,7 +14545,7 @@ import { mkdir as mkdir4, readFile as readFile7, readdir as readdir3, writeFile
14539
14545
  import { resolve as resolve11 } from "node:path";
14540
14546
  import { pathToFileURL } from "node:url";
14541
14547
  import { createHash as createHash5 } from "node:crypto";
14542
- import { spawn as spawn4 } from "node:child_process";
14548
+ import { spawn as spawn5 } from "node:child_process";
14543
14549
  import { createInterface } from "node:readline";
14544
14550
 
14545
14551
  // ../../packages/sdk/typescript/src/operations.generated.ts
@@ -17227,7 +17233,7 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
17227
17233
  resource: "agent.sessions.events",
17228
17234
  method: "list",
17229
17235
  summary: "List session events",
17230
- 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.",
17236
+ 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.",
17231
17237
  http: "GET",
17232
17238
  path: "/agent/v1/sessions/{session_id}/events",
17233
17239
  streaming: "no",
@@ -17386,6 +17392,26 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
17386
17392
  ]
17387
17393
  }
17388
17394
  },
17395
+ {
17396
+ resource: "agent.sessions.requests",
17397
+ method: "list",
17398
+ summary: "List Session Requests (Extension)",
17399
+ description: `List the requests a session is waiting on; an end-customer token reads its own session.
17400
+
17401
+ 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.`,
17402
+ http: "GET",
17403
+ path: "/agent/v1/sessions/{session_id}/requests",
17404
+ streaming: "no",
17405
+ pagination: false,
17406
+ pathParams: [
17407
+ {
17408
+ name: "session_id",
17409
+ sdkName: "session_id",
17410
+ description: "Session id from session creation or listing."
17411
+ }
17412
+ ],
17413
+ query: []
17414
+ },
17389
17415
  {
17390
17416
  resource: "agent.sessions.resources",
17391
17417
  method: "list",
@@ -25438,6 +25464,12 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
25438
25464
  - \`RippleDeleteRange\` — Cut a time range and close the gap.
25439
25465
  - \`DeleteWords\` — Cut transcript words and ripple every track, keeping a breath.
25440
25466
  - \`RemoveFillers\` — List and delete filler words by media's own labels; dryRun first.
25467
+ - \`Matte\` — Replace the clip's background with media's matte of its source, read as a luma mask.
25468
+ - \`EnhanceVoice\` — Replace a clip's sound with media's enhanced speech on its own audio track.
25469
+ - \`AlignByAudio\` — Line two recordings of the same sound up by media's measurement of their offset.
25470
+ - \`Reframe\` — Swap the clip's media for media's reframed take at the aspect you ask for.
25471
+ - \`Upscale\` — Swap the clip's media for media's upscaled take at the height you ask for.
25472
+ - \`Redact\` — Pixelate the faces, QR codes or text media marks, leaving the rest of the frame plain.
25441
25473
  - \`AddTrack\` — Add a video, audio or caption track.
25442
25474
  - \`MoveTrack\` — Move a track between layers; 0 is the topmost.
25443
25475
  - \`UpdateTrack\` — Change a track's name, lock, gain or role.
@@ -25541,6 +25573,9 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
25541
25573
  - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
25542
25574
  - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
25543
25575
  - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
25576
+ - \`MEDIA_PROCESSING\` — Media is still processing the clip; wait for the job and rerun.
25577
+ - \`MEDIA_PROCESSING_FAILED\` — Media's processing job failed; nothing changed.
25578
+ - \`ALIGNMENT_UNCERTAIN\` — \`AlignByAudio\` confidence too low; nothing changed.
25544
25579
  - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
25545
25580
  - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
25546
25581
  - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
@@ -27064,7 +27099,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
27064
27099
  resource: "devops.flags",
27065
27100
  method: "archive",
27066
27101
  summary: "Archive a flag",
27067
- 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 changes the flag's lifecycle only and does not check code references: codeRefs.count on the flag is informational, and the call succeeds even while code still names the key (ticket #1881), in which case that code gets its default. 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.",
27102
+ 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.",
27068
27103
  http: "POST",
27069
27104
  path: "/devops/v1/flags/{id}:archive",
27070
27105
  streaming: "no",
@@ -27928,6 +27963,42 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
27928
27963
  }
27929
27964
  }
27930
27965
  },
27966
+ {
27967
+ resource: "devops.projects.flags",
27968
+ method: "reportCodeRefs",
27969
+ summary: "Report a project's flag code references",
27970
+ 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.",
27971
+ http: "POST",
27972
+ path: "/devops/v1/projects/{project}/flags/code-refs",
27973
+ streaming: "no",
27974
+ pagination: false,
27975
+ pathParams: [
27976
+ {
27977
+ name: "project",
27978
+ sdkName: "project",
27979
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
27980
+ }
27981
+ ],
27982
+ query: [],
27983
+ body: {
27984
+ required: true,
27985
+ fields: [
27986
+ {
27987
+ name: "scannedCommit",
27988
+ type: "string",
27989
+ required: true,
27990
+ 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."
27991
+ },
27992
+ {
27993
+ name: "refs",
27994
+ type: "array",
27995
+ itemType: "object",
27996
+ required: true,
27997
+ 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."
27998
+ }
27999
+ ]
28000
+ }
28001
+ },
27931
28002
  {
27932
28003
  resource: "devops.projects.promotions",
27933
28004
  method: "list",
@@ -29864,7 +29935,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
29864
29935
  resource: "devops.units",
29865
29936
  method: "push",
29866
29937
  summary: "Push a unit's branch",
29867
- description: "Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that fails inside the machine answers 500 EXECUTION_FAILED and the machine's own words are in the unit's transitions.",
29938
+ description: "Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.",
29868
29939
  http: "POST",
29869
29940
  path: "/devops/v1/units/{id}:push",
29870
29941
  streaming: "no",
@@ -31770,11 +31841,57 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
31770
31841
  ]
31771
31842
  }
31772
31843
  },
31844
+ {
31845
+ resource: "media.libraries.assets.align",
31846
+ method: "create",
31847
+ summary: "Align asset",
31848
+ 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}.",
31849
+ http: "POST",
31850
+ path: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
31851
+ streaming: "no",
31852
+ pagination: false,
31853
+ pathParams: [
31854
+ {
31855
+ name: "library_id",
31856
+ sdkName: "library_id",
31857
+ description: "Library ID returned by creation."
31858
+ },
31859
+ {
31860
+ name: "asset_id",
31861
+ sdkName: "asset_id",
31862
+ description: "32-character asset ID."
31863
+ }
31864
+ ],
31865
+ query: [],
31866
+ body: {
31867
+ required: true,
31868
+ fields: [
31869
+ {
31870
+ name: "reference_asset_id",
31871
+ type: "string",
31872
+ required: true,
31873
+ 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."
31874
+ },
31875
+ {
31876
+ name: "max_offset_seconds",
31877
+ type: "number",
31878
+ required: false,
31879
+ 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."
31880
+ },
31881
+ {
31882
+ name: "idempotency_key",
31883
+ type: "string",
31884
+ required: false,
31885
+ description: "Stable key so a retried request reuses the same job instead of analysing and charging again; reusing it with different content is rejected."
31886
+ }
31887
+ ]
31888
+ }
31889
+ },
31773
31890
  {
31774
31891
  resource: "media.assets",
31775
31892
  method: "edit",
31776
31893
  summary: "Edit asset",
31777
- 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 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\"}}.",
31894
+ 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\"}}.",
31778
31895
  http: "POST",
31779
31896
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
31780
31897
  streaming: "no",
@@ -31799,7 +31916,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
31799
31916
  name: "operation",
31800
31917
  type: "object",
31801
31918
  required: true,
31802
- 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."
31919
+ 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."
31803
31920
  },
31804
31921
  {
31805
31922
  name: "model",
@@ -34832,6 +34949,7 @@ for more details.`
34832
34949
  "openai.images.generations",
34833
34950
  "openai.responses",
34834
34951
  "openai.videos",
34952
+ "praxis.media.process",
34835
34953
  "praxis.video.matting",
34836
34954
  "typesafe.systemone",
34837
34955
  "volcengine.music",
@@ -40507,6 +40625,129 @@ for more details.`
40507
40625
  ]
40508
40626
  }
40509
40627
  },
40628
+ {
40629
+ resource: "share.permissions",
40630
+ method: "list",
40631
+ summary: "List shares",
40632
+ 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.",
40633
+ http: "GET",
40634
+ path: "/share/v1/permissions",
40635
+ streaming: "no",
40636
+ pagination: false,
40637
+ pathParams: [],
40638
+ query: [
40639
+ {
40640
+ name: "resource_type",
40641
+ type: "string",
40642
+ enum: [
40643
+ "file",
40644
+ "artifact"
40645
+ ],
40646
+ required: false,
40647
+ description: "Only shares of this object type; file is the only type that creates today."
40648
+ },
40649
+ {
40650
+ name: "resource_id",
40651
+ type: "string",
40652
+ required: false,
40653
+ description: "Only shares of the object with this id, for example a file id from the File API; combine with resource_type."
40654
+ },
40655
+ {
40656
+ name: "status",
40657
+ type: "string",
40658
+ enum: [
40659
+ "active",
40660
+ "expired",
40661
+ "revoked"
40662
+ ],
40663
+ required: false,
40664
+ description: "Only shares in this state; omit to list every state."
40665
+ },
40666
+ {
40667
+ name: "page_size",
40668
+ type: "integer",
40669
+ required: false,
40670
+ description: "Maximum shares in one page, from 1 to 100; defaults to 50."
40671
+ },
40672
+ {
40673
+ name: "page_token",
40674
+ type: "string",
40675
+ required: false,
40676
+ description: "Opaque next_page_token from the preceding page with the same filters; omit on the first request."
40677
+ }
40678
+ ]
40679
+ },
40680
+ {
40681
+ resource: "share.permissions",
40682
+ method: "create",
40683
+ summary: "Create share",
40684
+ 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.",
40685
+ http: "POST",
40686
+ path: "/share/v1/permissions",
40687
+ streaming: "no",
40688
+ pagination: false,
40689
+ pathParams: [],
40690
+ query: [],
40691
+ body: {
40692
+ required: true,
40693
+ fields: [
40694
+ {
40695
+ name: "resource",
40696
+ type: "object",
40697
+ required: true,
40698
+ description: "The object a share exposes, named by a type and an id."
40699
+ },
40700
+ {
40701
+ name: "expire_time",
40702
+ type: "string",
40703
+ required: false,
40704
+ 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."
40705
+ },
40706
+ {
40707
+ name: "prevents_download",
40708
+ type: "boolean",
40709
+ required: false,
40710
+ 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."
40711
+ }
40712
+ ]
40713
+ }
40714
+ },
40715
+ {
40716
+ resource: "share.permissions",
40717
+ method: "delete",
40718
+ summary: "Delete share",
40719
+ 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.",
40720
+ http: "DELETE",
40721
+ path: "/share/v1/permissions/{id}",
40722
+ streaming: "no",
40723
+ pagination: false,
40724
+ pathParams: [
40725
+ {
40726
+ name: "id",
40727
+ sdkName: "id",
40728
+ 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."
40729
+ }
40730
+ ],
40731
+ query: []
40732
+ },
40733
+ {
40734
+ resource: "share.permissions",
40735
+ method: "retrieve",
40736
+ summary: "Retrieve share",
40737
+ 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.",
40738
+ http: "GET",
40739
+ path: "/share/v1/permissions/{id}",
40740
+ streaming: "no",
40741
+ pagination: false,
40742
+ pathParams: [
40743
+ {
40744
+ name: "id",
40745
+ sdkName: "id",
40746
+ 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."
40747
+ }
40748
+ ],
40749
+ query: []
40750
+ },
40510
40751
  {
40511
40752
  resource: "studio.codexes",
40512
40753
  method: "list",
@@ -47451,6 +47692,19 @@ var createSessionArtifactContentUrl = (options) => (options.client ?? client).po
47451
47692
  ...options.headers
47452
47693
  }
47453
47694
  });
47695
+ var listSessionRequests = (options) => (options.client ?? client).get({
47696
+ security: [{
47697
+ key: "BearerAuth",
47698
+ scheme: "bearer",
47699
+ type: "http"
47700
+ }, {
47701
+ key: "ApiKeyAuth",
47702
+ name: "X-API-Key",
47703
+ type: "apiKey"
47704
+ }],
47705
+ url: "/agent/v1/sessions/{session_id}/requests",
47706
+ ...options
47707
+ });
47454
47708
  var listSessionBackgroundTasks = (options) => (options.client ?? client).get({
47455
47709
  security: [{
47456
47710
  key: "BearerAuth",
@@ -53335,6 +53589,19 @@ var devopsFlagsCreate = (options) => (options.client ?? client).post({
53335
53589
  ...options.headers
53336
53590
  }
53337
53591
  });
53592
+ var devopsFlagsReportCodeRefs = (options) => (options.client ?? client).post({
53593
+ security: [{
53594
+ key: "devops-bearerAuth",
53595
+ scheme: "bearer",
53596
+ type: "http"
53597
+ }],
53598
+ url: "/devops/v1/projects/{project}/flags/code-refs",
53599
+ ...options,
53600
+ headers: {
53601
+ "Content-Type": "application/json",
53602
+ ...options.headers
53603
+ }
53604
+ });
53338
53605
  var devopsFlagsGet = (options) => (options.client ?? client).get({
53339
53606
  security: [{
53340
53607
  key: "devops-bearerAuth",
@@ -54548,6 +54815,19 @@ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).ge
54548
54815
  url: "/media/v1/generation/capabilities",
54549
54816
  ...options
54550
54817
  });
54818
+ var mediaAlignAsset = (options) => (options.client ?? client).post({
54819
+ security: [{
54820
+ key: "media-BearerAuth",
54821
+ scheme: "bearer",
54822
+ type: "http"
54823
+ }],
54824
+ url: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
54825
+ ...options,
54826
+ headers: {
54827
+ "Content-Type": "application/json",
54828
+ ...options.headers
54829
+ }
54830
+ });
54551
54831
  var ontologyListTypes = (options) => (options?.client ?? client).get({
54552
54832
  security: [{
54553
54833
  key: "ontology-bearerAuth",
@@ -55680,6 +55960,46 @@ var searchMap = (options) => (options.client ?? client).post({
55680
55960
  ...options.headers
55681
55961
  }
55682
55962
  });
55963
+ var shareListPermissions = (options) => (options?.client ?? client).get({
55964
+ security: [{
55965
+ key: "share-bearerAuth",
55966
+ scheme: "bearer",
55967
+ type: "http"
55968
+ }],
55969
+ url: "/share/v1/permissions",
55970
+ ...options
55971
+ });
55972
+ var shareCreatePermission = (options) => (options.client ?? client).post({
55973
+ security: [{
55974
+ key: "share-bearerAuth",
55975
+ scheme: "bearer",
55976
+ type: "http"
55977
+ }],
55978
+ url: "/share/v1/permissions",
55979
+ ...options,
55980
+ headers: {
55981
+ "Content-Type": "application/json",
55982
+ ...options.headers
55983
+ }
55984
+ });
55985
+ var shareDeletePermission = (options) => (options.client ?? client).delete({
55986
+ security: [{
55987
+ key: "share-bearerAuth",
55988
+ scheme: "bearer",
55989
+ type: "http"
55990
+ }],
55991
+ url: "/share/v1/permissions/{id}",
55992
+ ...options
55993
+ });
55994
+ var shareRetrievePermission = (options) => (options.client ?? client).get({
55995
+ security: [{
55996
+ key: "share-bearerAuth",
55997
+ scheme: "bearer",
55998
+ type: "http"
55999
+ }],
56000
+ url: "/share/v1/permissions/{id}",
56001
+ ...options
56002
+ });
55683
56003
  var studioGenresList = (options) => (options?.client ?? client).get({
55684
56004
  security: [{
55685
56005
  key: "BearerAuth",
@@ -57804,6 +58124,9 @@ function createAgent(transport) {
57804
58124
  },
57805
58125
  fork: bind(transport, forkSession),
57806
58126
  list: bind(transport, sessionsList),
58127
+ requests: {
58128
+ list: bind(transport, listSessionRequests)
58129
+ },
57807
58130
  resources: {
57808
58131
  create: bind(transport, sessionsResourcesAdd),
57809
58132
  delete: bind(transport, aliasOperation(sessionsResourcesDelete, { query: { session_id: "query_session_id" } })),
@@ -58316,7 +58639,8 @@ function createDevops(transport) {
58316
58639
  },
58317
58640
  flags: {
58318
58641
  create: bind(transport, devopsFlagsCreate),
58319
- list: bind(transport, devopsFlagsList)
58642
+ list: bind(transport, devopsFlagsList),
58643
+ reportCodeRefs: bind(transport, devopsFlagsReportCodeRefs)
58320
58644
  },
58321
58645
  list: bind(transport, devopsProjectsList),
58322
58646
  promotions: {
@@ -58520,6 +58844,9 @@ function createMedia(transport) {
58520
58844
  },
58521
58845
  libraries: {
58522
58846
  assets: {
58847
+ align: {
58848
+ create: bind(transport, mediaAlignAsset)
58849
+ },
58523
58850
  batch: bind(transport, mediaBatchAssets),
58524
58851
  create: bind(transport, (options) => mediaUploadAsset({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } })),
58525
58852
  delete: bind(transport, mediaDeleteAsset),
@@ -58961,6 +59288,16 @@ function createSearch(transport) {
58961
59288
  }
58962
59289
  };
58963
59290
  }
59291
+ function createShare(transport) {
59292
+ return {
59293
+ permissions: {
59294
+ create: bind(transport, shareCreatePermission),
59295
+ delete: bind(transport, shareDeletePermission),
59296
+ list: bind(transport, shareListPermissions),
59297
+ retrieve: bind(transport, shareRetrievePermission)
59298
+ }
59299
+ };
59300
+ }
58964
59301
  function createStudio(transport) {
58965
59302
  return {
58966
59303
  codexes: {
@@ -59231,6 +59568,7 @@ var resourceFactories = {
59231
59568
  organization: createOrganization,
59232
59569
  sandbox: createSandbox,
59233
59570
  search: createSearch,
59571
+ share: createShare,
59234
59572
  studio: createStudio,
59235
59573
  ticket: createTicket,
59236
59574
  vault: createVault
@@ -61507,30 +61845,31 @@ var workflows = [
61507
61845
  {
61508
61846
  words: ["devops", "flag", "refs"],
61509
61847
  requires: "checkout",
61510
- usage: "devops flag refs [key]",
61511
- summary: "Where each flag key is referenced in this checkout: file and line, for every registered key or one named key.",
61512
- example: "praxis devops flag refs",
61848
+ usage: "devops flag refs [key] [--report --project <dvp_…>]",
61849
+ 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.",
61850
+ example: "praxis devops flag refs --report --project dvp_…",
61513
61851
  examples: [
61514
61852
  "praxis devops flag refs",
61515
- "praxis devops flag refs run-page-v2"
61853
+ "praxis devops flag refs run-page-v2",
61854
+ "praxis devops flag refs --report --project dvp_…"
61516
61855
  ],
61517
61856
  group: "local",
61518
- network: "offline",
61519
- platform: "Reporting the references to the platform waits on the write API: `devops.flags.listCodeRefs` reads only, so this slice lists locally (ADR-125 §4).",
61857
+ network: "Offline. --report: needs a login and sends this checkout's references to the platform",
61858
+ 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).",
61520
61859
  docs: "https://docs.deepraxis.com/docs/cli"
61521
61860
  },
61522
61861
  {
61523
61862
  words: ["devops", "flag", "remove"],
61524
61863
  requires: "checkout",
61525
61864
  usage: "devops flag remove <key>",
61526
- summary: "The local step of removing a flag: list the remaining references, or the steps that follow once none remain. Order: open the flag fully (praxis api devops flag environment update), delete the code that names the key and deploy it, run this command, then retire the flag on the platform with praxis api devops flag archive <flg_…> (irreversible; it does not check code references), then regenerate the registry with praxis devops flag sync.",
61865
+ 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.",
61527
61866
  example: "praxis devops flag remove run-page-v2",
61528
61867
  examples: [
61529
61868
  "praxis devops flag remove run-page-v2"
61530
61869
  ],
61531
61870
  group: "local",
61532
61871
  network: "offline",
61533
- platform: "praxis api devops flag archive — retires the flag on the platform after the code that named it is deployed away; it keeps the key reserved (ADR-050 §7, ADR-125 §4).",
61872
+ 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).",
61534
61873
  docs: "https://docs.deepraxis.com/docs/cli"
61535
61874
  },
61536
61875
  {
@@ -63139,6 +63478,101 @@ function wranglerEdges(nodes) {
63139
63478
  }
63140
63479
  return edges;
63141
63480
  }
63481
+ // ../../packages/praxis/deploy-core/src/lambda-function.ts
63482
+ var LAMBDA_FUNCTIONS_ROOT = "services/lambda/functions";
63483
+ var UPSTREAM = "aliyun-fc";
63484
+ var RECIPE_PATH = /^services\/lambda\/functions\/([^/]+)\/function\.json$/;
63485
+ var isText = (value) => typeof value === "string" && value !== "";
63486
+ var isCount = (value, min, max) => typeof value === "number" && Number.isInteger(value) && value >= min && value <= max;
63487
+ function lambdaFunctionOf(text) {
63488
+ const parsed = text === null ? null : parseJsonc2(text);
63489
+ if (parsed === null)
63490
+ return null;
63491
+ if (!isText(parsed.name) || !isText(parsed.upstream))
63492
+ return null;
63493
+ if (!Array.isArray(parsed.regions) || parsed.regions.length === 0 || !parsed.regions.every(isText))
63494
+ return null;
63495
+ if (parsed.gpu !== undefined && !isText(parsed.gpu))
63496
+ return null;
63497
+ if (!isCount(parsed.cpu, 1, 256))
63498
+ return null;
63499
+ if (!isCount(parsed.memoryMb, 128, 32 * 1024))
63500
+ return null;
63501
+ if (!isCount(parsed.timeoutSeconds, 1, 24 * 3600))
63502
+ return null;
63503
+ if (!isCount(parsed.concurrency, 1, 1024))
63504
+ return null;
63505
+ return {
63506
+ name: parsed.name,
63507
+ upstream: parsed.upstream,
63508
+ regions: [...parsed.regions],
63509
+ ...parsed.gpu === undefined ? {} : { gpu: parsed.gpu },
63510
+ cpu: parsed.cpu,
63511
+ memoryMb: parsed.memoryMb,
63512
+ timeoutSeconds: parsed.timeoutSeconds,
63513
+ concurrency: parsed.concurrency
63514
+ };
63515
+ }
63516
+ function lambdaFunctionTarget(recipe) {
63517
+ return { path: `${LAMBDA_FUNCTIONS_ROOT}/${recipe.name}`, name: `lambda-${recipe.name}` };
63518
+ }
63519
+ function lambdaFunctionOwner(path) {
63520
+ return path.split("/").slice(0, -2).join("/");
63521
+ }
63522
+ async function scanRecipes(facts) {
63523
+ const found = [];
63524
+ const warnings = [];
63525
+ for (const path of [...facts.tree].sort()) {
63526
+ const match = RECIPE_PATH.exec(path);
63527
+ if (match === null)
63528
+ continue;
63529
+ const dir = path.slice(0, -"/function.json".length);
63530
+ const recipe = lambdaFunctionOf(await facts.read(path));
63531
+ if (recipe === null) {
63532
+ warnings.push(`${dir}: function.json is not a recipe`);
63533
+ continue;
63534
+ }
63535
+ if (recipe.upstream !== UPSTREAM)
63536
+ continue;
63537
+ if (recipe.name !== match[1]) {
63538
+ warnings.push(`${dir}: function.json names ${JSON.stringify(recipe.name)}, not the directory name`);
63539
+ continue;
63540
+ }
63541
+ found.push(recipe);
63542
+ }
63543
+ return { found, warnings };
63544
+ }
63545
+ function lambdaFunctionProvider(_options = {}) {
63546
+ return {
63547
+ id: "lambda-function",
63548
+ async detect(facts) {
63549
+ return (await scanRecipes(facts)).found.length > 0 ? "certain" : "none";
63550
+ },
63551
+ async plan(facts, partial) {
63552
+ const claimed = new Set(partial.targets.map((target) => target.path));
63553
+ const scan = await scanRecipes(facts);
63554
+ const targets = [];
63555
+ const byOwner = new Map;
63556
+ for (const recipe of scan.found) {
63557
+ const { path, name } = lambdaFunctionTarget(recipe);
63558
+ if (claimed.has(path))
63559
+ continue;
63560
+ targets.push({ path, name, destination: "aliyun-fc", production: true, onTrain: true });
63561
+ const owner = lambdaFunctionOwner(path);
63562
+ byOwner.set(owner, [...byOwner.get(owner) ?? [], path]);
63563
+ }
63564
+ const refined = partial.targets.map((target) => {
63565
+ const paths = byOwner.get(target.path);
63566
+ return paths === undefined ? target : { ...target, dependsOn: [...new Set([...target.dependsOn ?? [], ...paths])] };
63567
+ });
63568
+ return {
63569
+ targets: [...refined, ...targets],
63570
+ ...scan.warnings.length === 0 ? {} : { warnings: [...partial.warnings ?? [], ...scan.warnings] }
63571
+ };
63572
+ }
63573
+ };
63574
+ }
63575
+ var lambdaFunction = lambdaFunctionProvider();
63142
63576
  // ../../packages/praxis/deploy-core/src/package-manifest.ts
63143
63577
  function packageManifestOf(text) {
63144
63578
  const parsed = text === null ? null : parseJsonc2(text);
@@ -63473,7 +63907,11 @@ function workspaceCloudflareProvider(options = {}) {
63473
63907
  };
63474
63908
  }
63475
63909
  var workspaceCloudflare = workspaceCloudflareProvider();
63476
- var BUILTIN_PROVIDERS = [workspaceCloudflare, workspaceNpmProvider()];
63910
+ var BUILTIN_PROVIDERS = [
63911
+ workspaceCloudflare,
63912
+ workspaceNpmProvider(),
63913
+ lambdaFunctionProvider()
63914
+ ];
63477
63915
  function directoriesOfPackageNames(workspaces) {
63478
63916
  const byName = new Map;
63479
63917
  for (const workspace of workspaces)
@@ -63500,15 +63938,23 @@ function workspaceClosureOf(target, byName, dependenciesOf) {
63500
63938
  // ../../packages/praxis/deploy-core/src/plan.ts
63501
63939
  async function planRepository(facts, providers = BUILTIN_PROVIDERS, options = {}) {
63502
63940
  let partial = { targets: [] };
63941
+ const warnings = [];
63503
63942
  for (const provider of providers) {
63504
63943
  const confidence = await provider.detect(facts);
63505
63944
  if (confidence === "none")
63506
63945
  continue;
63507
63946
  partial = await provider.plan(facts, partial);
63947
+ for (const warning of partial.warnings ?? [])
63948
+ if (!warnings.includes(warning))
63949
+ warnings.push(warning);
63508
63950
  }
63509
63951
  const drafts = partial.targets.filter((draft) => draft.deploy !== false);
63510
63952
  const workspaces = await readWorkspaces(facts, options);
63511
- return { commit: facts.commit, targets: closePlan(drafts, workspaces) };
63953
+ return {
63954
+ commit: facts.commit,
63955
+ targets: closePlan(drafts, workspaces),
63956
+ ...warnings.length === 0 ? {} : { warnings }
63957
+ };
63512
63958
  }
63513
63959
  function closePlan(drafts, workspaces) {
63514
63960
  const configOf = new Map(workspaces.map((workspace) => [workspace.dir, workspace.config]));
@@ -63530,7 +63976,7 @@ function closePlan(drafts, workspaces) {
63530
63976
  path: draft.path,
63531
63977
  name: draft.name,
63532
63978
  destination: draft.destination,
63533
- dependsOn: edges.get(draft.path) ?? [],
63979
+ dependsOn: [...new Set([...edges.get(draft.path) ?? [], ...draft.dependsOn ?? []])],
63534
63980
  ...draft.environments === undefined ? {} : { environments: draft.environments },
63535
63981
  production: draft.production === true,
63536
63982
  onTrain: draft.onTrain !== false,
@@ -65526,6 +65972,30 @@ function bunTestRun(packagePath, code, output) {
65526
65972
  }
65527
65973
 
65528
65974
  // src/commands/devops-test.ts
65975
+ import { spawn as spawn4 } from "node:child_process";
65976
+ var CACHE_OFF_REEXEC_ENV = "PRAXIS_DEVOPS_TEST_CACHE_OFF";
65977
+ function needsCacheOffReexec(env) {
65978
+ return env.BUN_RUNTIME_TRANSPILER_CACHE_PATH !== "0" && !env[CACHE_OFF_REEXEC_ENV];
65979
+ }
65980
+ function isDevopsTestRun(words) {
65981
+ return words.join(" ") === "devops test";
65982
+ }
65983
+ function spawnInherit(cmd, args, options) {
65984
+ return new Promise((resolveCode) => {
65985
+ const child = spawn4(cmd, [...args], { cwd: options.cwd, env: options.env, stdio: "inherit" });
65986
+ child.once("error", (error) => {
65987
+ console.error(error instanceof Error ? error.message : String(error));
65988
+ resolveCode(1);
65989
+ });
65990
+ child.once("close", (code) => resolveCode(code ?? 1));
65991
+ });
65992
+ }
65993
+ function reexecWithCacheOff(options = {}) {
65994
+ return (options.spawn ?? spawnInherit)(process.execPath, options.argv ?? process.argv.slice(1), {
65995
+ cwd: options.cwd ?? process.cwd(),
65996
+ env: { ...options.env ?? process.env, BUN_RUNTIME_TRANSPILER_CACHE_PATH: "0", [CACHE_OFF_REEXEC_ENV]: "1" }
65997
+ });
65998
+ }
65529
65999
  async function devopsTest(flags, paths, ports) {
65530
66000
  const plan = planTest(flags, paths);
65531
66001
  if (plan.mode.kind === "affected")
@@ -65796,8 +66266,8 @@ async function localEngine(cwd) {
65796
66266
  })
65797
66267
  };
65798
66268
  }
65799
- async function localCheckout(cwd, spawn4) {
65800
- const git2 = (args) => spawn4("git", [...args], { cwd });
66269
+ async function localCheckout(cwd, spawn5) {
66270
+ const git2 = (args) => spawn5("git", [...args], { cwd });
65801
66271
  const required = async (args) => {
65802
66272
  const result = await git2(args);
65803
66273
  if (result.code !== 0)
@@ -65848,7 +66318,7 @@ async function localCheckout(cwd, spawn4) {
65848
66318
  await walk(packagePath);
65849
66319
  return files;
65850
66320
  },
65851
- runTests: (packagePath, files) => spawn4("nice", ["-n", "10", "bun", "test", ...files], { cwd: packagePath })
66321
+ runTests: (packagePath, files) => spawn5("nice", ["-n", "10", "bun", "test", ...files], { cwd: packagePath })
65852
66322
  };
65853
66323
  }
65854
66324
  async function withEngineStdoutOnStderr(body) {
@@ -66025,7 +66495,7 @@ function removalSteps(key) {
66025
66495
  `No code references ${key}. The rest is not this command's to do:`,
66026
66496
  ` 1. Deploy the code that removed the references (deploy never writes the trunk).`,
66027
66497
  ` 2. Retire the flag on the platform: praxis api devops flag archive <flg_…> — the terminal state.`,
66028
- ` Archiving keeps the key reserved and turns the flag off in every environment; there is no separate delete call.`,
66498
+ ` 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).`,
66029
66499
  ` 3. Regenerate the registry: praxis devops flag sync`
66030
66500
  ].join(`
66031
66501
  `);
@@ -66055,6 +66525,25 @@ async function repositoryRoot(cwd, read) {
66055
66525
  dir = parent;
66056
66526
  }
66057
66527
  }
66528
+ var SNIPPET_LIMIT = 200;
66529
+ function snippetOf(text2, line) {
66530
+ const trimmed = (text2.split(`
66531
+ `)[line - 1] ?? "").trim();
66532
+ return trimmed.length > SNIPPET_LIMIT ? trimmed.slice(0, SNIPPET_LIMIT) : trimmed;
66533
+ }
66534
+ function reportedKeys(keys, sources, refs) {
66535
+ const texts = new Map(sources.map((file) => [file.path, file.text]));
66536
+ return keys.map((flagKey) => ({
66537
+ flagKey,
66538
+ items: refs.filter((ref) => ref.key === flagKey).map((ref) => ({ path: ref.file, line: ref.line, snippet: snippetOf(texts.get(ref.file) ?? "", ref.line) }))
66539
+ }));
66540
+ }
66541
+ function reportNeedsProject() {
66542
+ 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.");
66543
+ }
66544
+ function reportClientMissing() {
66545
+ 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.");
66546
+ }
66058
66547
  async function codeSources(ports, registry) {
66059
66548
  const suffix = registry.replace(/^\.\//, "");
66060
66549
  return (await ports.sources()).filter((file) => !file.path.replace(/^\.\//, "").endsWith(suffix));
@@ -66111,15 +66600,33 @@ async function devopsFlagScaffold(key, args, ports) {
66111
66600
  ports.emit({ kind: "object", data: { key, registry, file, call: scaffoldCall(key) } });
66112
66601
  return 0;
66113
66602
  }
66114
- async function devopsFlagRefs(key, ports) {
66603
+ async function devopsFlagRefs(key, args, ports) {
66115
66604
  const registry = await registryOf(ports);
66116
66605
  const flags = await ports.loadRegistry(registry);
66117
66606
  const keys = key !== undefined ? [key] : Object.keys(flags).sort();
66118
- const refs = flagReferences(await codeSources(ports, registry), keys);
66607
+ const sources = await codeSources(ports, registry);
66608
+ const refs = flagReferences(sources, keys);
66119
66609
  for (const ref of refs)
66120
66610
  ports.human(`${ref.file}:${ref.line}: ${ref.key}`);
66121
66611
  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.`);
66122
- ports.emit({ kind: "object", data: { refs, reported: false } });
66612
+ if (!args.report) {
66613
+ ports.emit({ kind: "object", data: { refs, reported: false } });
66614
+ return 0;
66615
+ }
66616
+ const project = args.project;
66617
+ if (project === undefined || project === "")
66618
+ throw reportNeedsProject();
66619
+ const scannedCommit = (await ports.git(["rev-parse", "HEAD"])).trim();
66620
+ if (scannedCommit === "")
66621
+ throw new UsageError("git rev-parse HEAD answered no commit", "Run this command inside a git repository.");
66622
+ const payload = reportedKeys(Object.keys(flags).sort(), sources, refs);
66623
+ const client2 = await ports.client();
66624
+ const report = client2.devops?.projects?.flags?.reportCodeRefs;
66625
+ if (typeof report !== "function")
66626
+ throw reportClientMissing();
66627
+ const answer = await report.call(client2.devops.projects.flags, { path: { project }, body: { scannedCommit, refs: payload } });
66628
+ 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(", ")}` : ""}.`);
66629
+ ports.emit({ kind: "object", data: { refs, reported: true, project, scannedCommit, updated: answer.updated, unknownKeys: answer.unknownKeys } });
66123
66630
  return 0;
66124
66631
  }
66125
66632
  async function devopsFlagRemove(key, ports) {
@@ -68769,6 +69276,7 @@ var FILE_ID = /^file-/;
68769
69276
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : undefined;
68770
69277
  var isImage = (node2) => node2.type === "image" && typeof node2.url === "string";
68771
69278
  var isRef = (node2) => node2.type === "ref" && typeof node2.ref === "string";
69279
+ var NODE_TYPES = new Set(Object.keys(KNOWN_PROPS));
68772
69280
  function visit2(value, nodeId, fn) {
68773
69281
  if (Array.isArray(value)) {
68774
69282
  for (const item of value)
@@ -68962,6 +69470,8 @@ var warningLine = (warning) => {
68962
69470
  return `${warning.code}: ${warning.ref} at ${warning.nodeId}`;
68963
69471
  case "FRAME_NOT_FOUND":
68964
69472
  return `${warning.code}: ${warning.id}`;
69473
+ case "IMAGE_FILE_NOT_FOUND":
69474
+ return `${warning.code}: ${warning.url} (the platform holds no such file) at ${warning.nodeId}`;
68965
69475
  default:
68966
69476
  return `${warning.code}: ${warning.url}`;
68967
69477
  }
@@ -69705,7 +70215,7 @@ function startProgress(ctx, write = (text2) => writeOutput({ stderr: text2 })) {
69705
70215
  }
69706
70216
 
69707
70217
  // src/main.ts
69708
- var version = "0.3.0-dev.0a48184";
70218
+ var version = "0.3.0-dev.0d5636a";
69709
70219
  var commands = commandTree(operations);
69710
70220
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
69711
70221
  function route(argv) {
@@ -69787,7 +70297,7 @@ var defaults = {
69787
70297
  return;
69788
70298
  const cmd = process.platform === "darwin" ? ["open", url] : process.platform === "win32" ? ["rundll32", "url.dll,FileProtocolHandler", url] : ["xdg-open", url];
69789
70299
  await new Promise((resolve12, reject) => {
69790
- const child = spawn4(cmd[0], cmd.slice(1), { stdio: "ignore" });
70300
+ const child = spawn5(cmd[0], cmd.slice(1), { stdio: "ignore" });
69791
70301
  child.once("error", reject);
69792
70302
  child.once("close", () => resolve12());
69793
70303
  });
@@ -69796,12 +70306,12 @@ var defaults = {
69796
70306
  wait: (ms) => new Promise((resolve12) => setTimeout(resolve12, ms)),
69797
70307
  render,
69798
70308
  spawn: (cmd, args, options) => new Promise((resolve12, reject) => {
69799
- const child = spawn4(cmd, args, { cwd: options.cwd, stdio: ["ignore", 2, 2] });
70309
+ const child = spawn5(cmd, args, { cwd: options.cwd, stdio: ["ignore", 2, 2] });
69800
70310
  child.once("error", reject);
69801
70311
  child.once("close", (code) => resolve12(code ?? 1));
69802
70312
  }),
69803
70313
  spawnCapture: (cmd, args, options) => new Promise((resolve12, reject) => {
69804
- const child = spawn4(cmd, args, { cwd: options.cwd, stdio: ["ignore", "pipe", "pipe"] });
70314
+ const child = spawn5(cmd, args, { cwd: options.cwd, stdio: ["ignore", "pipe", "pipe"] });
69805
70315
  const chunks = [];
69806
70316
  child.stdout.on("data", (c) => chunks.push(c));
69807
70317
  child.stderr.on("data", (c) => chunks.push(c));
@@ -69880,6 +70390,10 @@ var appOptions = {
69880
70390
  "devops flag scaffold": [
69881
70391
  { name: "out", type: "string", description: "Directory the paired on/off scenario stubs are written to (default: the current directory)." }
69882
70392
  ],
70393
+ "devops flag refs": [
70394
+ { 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)." },
70395
+ { name: "project", type: "string", description: "With --report: the DevOps project id (dvp_…) whose flags the scan is reported into. Required." }
70396
+ ],
69883
70397
  "canvas import": [
69884
70398
  { name: "name", type: "string", description: "Name for the new canvas (default: the file name without .pen)." },
69885
70399
  { 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." },
@@ -69894,7 +70408,7 @@ var appOptions = {
69894
70408
  };
69895
70409
  appOptions["devops engine deploy"] = appOptions["devops deploy"];
69896
70410
  var workflowOptions = (words) => words[0] === "skill" ? [{ name: "install", type: "string" }] : appOptions[words.join(" ")] ?? [];
69897
- function flagPortsFor(ports, context, emit) {
70411
+ function flagPortsFor(ports, context, emit, connect) {
69898
70412
  return {
69899
70413
  mode: context.mode,
69900
70414
  emit,
@@ -69904,6 +70418,8 @@ function flagPortsFor(ports, context, emit) {
69904
70418
  },
69905
70419
  cwd: ports.cwd,
69906
70420
  readFile: ports.readFile,
70421
+ git: async (args) => (await ports.spawnCapture("git", [...args], { cwd: ports.cwd })).output,
70422
+ client: connect,
69907
70423
  writeFile: (path, text2) => writeFile5(path, text2, "utf8"),
69908
70424
  mkdir: async (path) => {
69909
70425
  await mkdir4(path, { recursive: true });
@@ -69945,7 +70461,7 @@ function toolPortsFor(ports, context, emit) {
69945
70461
  },
69946
70462
  git: (args, cwd) => ports.spawnCapture("git", args, { cwd }),
69947
70463
  run: (cmd, args, cwd) => new Promise((resolve12, reject) => {
69948
- const child = spawn4(cmd, args, { cwd, stdio: "inherit" });
70464
+ const child = spawn5(cmd, args, { cwd, stdio: "inherit" });
69949
70465
  child.once("error", reject);
69950
70466
  child.once("close", (code) => resolve12(code ?? 1));
69951
70467
  }),
@@ -70357,7 +70873,7 @@ Examples:
70357
70873
  }
70358
70874
  });
70359
70875
  }
70360
- const flagPorts = flagPortsFor(ports, ctx, emit);
70876
+ const flagPorts = flagPortsFor(ports, ctx, emit, async () => await auth.client(org));
70361
70877
  if (name === "devops flag sync")
70362
70878
  return await devopsFlagSync({ check: Boolean(parsed.flags.check) }, flagPorts);
70363
70879
  if (name === "devops flag check")
@@ -70365,7 +70881,7 @@ Examples:
70365
70881
  if (name === "devops flag scaffold")
70366
70882
  return await devopsFlagScaffold(parsed.positional[0], { out: parsed.flags.out?.[0] }, flagPorts);
70367
70883
  if (name === "devops flag refs")
70368
- return await devopsFlagRefs(parsed.positional[0], flagPorts);
70884
+ return await devopsFlagRefs(parsed.positional[0], { report: Boolean(parsed.flags.report), project: parsed.flags.project?.[0] }, flagPorts);
70369
70885
  return await devopsFlagRemove(parsed.positional[0], flagPorts);
70370
70886
  }
70371
70887
  if (!quiet)
@@ -70530,7 +71046,8 @@ if (true) {
70530
71046
  process.exit(0);
70531
71047
  throw error;
70532
71048
  });
70533
- process.exitCode = await main3(process.argv.slice(2));
71049
+ const argv = process.argv.slice(2);
71050
+ process.exitCode = isDevopsTestRun(route(argv).words) && needsCacheOffReexec(process.env) ? await reexecWithCacheOff() : await main3(argv);
70534
71051
  }
70535
71052
  export {
70536
71053
  main3 as main
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepraxis/cli",
3
- "version": "0.3.0-dev.0a48184",
3
+ "version": "0.3.0-dev.0d5636a",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "praxis": "dist/praxis.js"