@deepraxis/cli 0.3.0-dev.11911e3 → 0.3.0-dev.1b3a943

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 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
+ 791 HTTP operations; 793 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`, `--name` |
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` |
@@ -364,6 +366,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
364
366
  | `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
367
  | `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
368
  | `praxis api devops project flag list` | `devops.projects.flags.list` | GET `/devops/v1/projects/{project}/flags` | `--project`, `--page-size`, `--page-token`, `--filter` |
369
+ | `praxis api devops project flag report-code-refs` | `devops.projects.flags.reportCodeRefs` | POST `/devops/v1/projects/{project}/flags/code-refs` | `--project`, `--scanned-commit` |
367
370
  | `praxis api devops project get <id>` | `devops.projects.retrieve` | GET `/devops/v1/projects/{id}` | |
368
371
  | `praxis api devops project get-test-catalog <project>` | `devops.projects.retrieveTestCatalog` | GET `/devops/v1/projects/{project}/test-catalog` | `--commit` |
369
372
  | `praxis api devops project list` | `devops.projects.list` | GET `/devops/v1/projects` | `--page-size`, `--page-token` |
@@ -463,6 +466,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
463
466
  | `praxis api media asset lineage <asset_id>` | `media.assets.lineage` | GET `/media/v1/libraries/{library_id}/assets/{asset_id}/lineage` | `--library` |
464
467
  | `praxis api media generation capability list` | `media.generation.capabilities.list` | GET `/media/v1/generation/capabilities` | |
465
468
  | `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` |
469
+ | `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
470
  | `praxis api media library asset batch <library_id>` | `media.libraries.assets.batch` | POST `/media/v1/libraries/{library_id}/assets:batch` | `--reason` |
467
471
  | `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
472
  | `praxis api media library asset delete <asset_id>` | `media.libraries.assets.delete` | DELETE `/media/v1/libraries/{library_id}/assets/{asset_id}` | `--library` |
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
- body: {
15988
- required: true,
15989
- fields: [
15990
- {
15991
- name: "name",
15992
- type: "string",
15993
- required: true,
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",
@@ -25380,6 +25443,12 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
25380
25443
  - \`RippleDeleteRange\` — Cut a time range and close the gap.
25381
25444
  - \`DeleteWords\` — Cut transcript words and ripple every track, keeping a breath.
25382
25445
  - \`RemoveFillers\` — List and delete filler words by media's own labels; dryRun first.
25446
+ - \`Matte\` — Replace the clip's background with media's matte of its source, read as a luma mask.
25447
+ - \`EnhanceVoice\` — Replace a clip's sound with media's enhanced speech on its own audio track.
25448
+ - \`AlignByAudio\` — Line two recordings of the same sound up by media's measurement of their offset.
25449
+ - \`Reframe\` — Swap the clip's media for media's reframed take at the aspect you ask for.
25450
+ - \`Upscale\` — Swap the clip's media for media's upscaled take at the height you ask for.
25451
+ - \`Redact\` — Pixelate the faces, QR codes or text media marks, leaving the rest of the frame plain.
25383
25452
  - \`AddTrack\` — Add a video, audio or caption track.
25384
25453
  - \`MoveTrack\` — Move a track between layers; 0 is the topmost.
25385
25454
  - \`UpdateTrack\` — Change a track's name, lock, gain or role.
@@ -25483,6 +25552,9 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
25483
25552
  - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
25484
25553
  - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
25485
25554
  - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
25555
+ - \`MEDIA_PROCESSING\` — Media is still processing the clip; wait for the job and rerun.
25556
+ - \`MEDIA_PROCESSING_FAILED\` — Media's processing job failed; nothing changed.
25557
+ - \`ALIGNMENT_UNCERTAIN\` — \`AlignByAudio\` confidence too low; nothing changed.
25486
25558
  - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
25487
25559
  - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
25488
25560
  - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
@@ -27006,7 +27078,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
27006
27078
  resource: "devops.flags",
27007
27079
  method: "archive",
27008
27080
  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 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.",
27081
+ 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
27082
  http: "POST",
27011
27083
  path: "/devops/v1/flags/{id}:archive",
27012
27084
  streaming: "no",
@@ -27870,6 +27942,42 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
27870
27942
  }
27871
27943
  }
27872
27944
  },
27945
+ {
27946
+ resource: "devops.projects.flags",
27947
+ method: "reportCodeRefs",
27948
+ summary: "Report a project's flag code references",
27949
+ 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.",
27950
+ http: "POST",
27951
+ path: "/devops/v1/projects/{project}/flags/code-refs",
27952
+ streaming: "no",
27953
+ pagination: false,
27954
+ pathParams: [
27955
+ {
27956
+ name: "project",
27957
+ sdkName: "project",
27958
+ description: "Identifies the project whose data you are reading, from the project list or create answer."
27959
+ }
27960
+ ],
27961
+ query: [],
27962
+ body: {
27963
+ required: true,
27964
+ fields: [
27965
+ {
27966
+ name: "scannedCommit",
27967
+ type: "string",
27968
+ required: true,
27969
+ 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."
27970
+ },
27971
+ {
27972
+ name: "refs",
27973
+ type: "array",
27974
+ itemType: "object",
27975
+ required: true,
27976
+ 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."
27977
+ }
27978
+ ]
27979
+ }
27980
+ },
27873
27981
  {
27874
27982
  resource: "devops.projects.promotions",
27875
27983
  method: "list",
@@ -31712,11 +31820,57 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
31712
31820
  ]
31713
31821
  }
31714
31822
  },
31823
+ {
31824
+ resource: "media.libraries.assets.align",
31825
+ method: "create",
31826
+ summary: "Align asset",
31827
+ 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}.",
31828
+ http: "POST",
31829
+ path: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
31830
+ streaming: "no",
31831
+ pagination: false,
31832
+ pathParams: [
31833
+ {
31834
+ name: "library_id",
31835
+ sdkName: "library_id",
31836
+ description: "Library ID returned by creation."
31837
+ },
31838
+ {
31839
+ name: "asset_id",
31840
+ sdkName: "asset_id",
31841
+ description: "32-character asset ID."
31842
+ }
31843
+ ],
31844
+ query: [],
31845
+ body: {
31846
+ required: true,
31847
+ fields: [
31848
+ {
31849
+ name: "reference_asset_id",
31850
+ type: "string",
31851
+ required: true,
31852
+ 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."
31853
+ },
31854
+ {
31855
+ name: "max_offset_seconds",
31856
+ type: "number",
31857
+ required: false,
31858
+ 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."
31859
+ },
31860
+ {
31861
+ name: "idempotency_key",
31862
+ type: "string",
31863
+ required: false,
31864
+ description: "Stable key so a retried request reuses the same job instead of analysing and charging again; reusing it with different content is rejected."
31865
+ }
31866
+ ]
31867
+ }
31868
+ },
31715
31869
  {
31716
31870
  resource: "media.assets",
31717
31871
  method: "edit",
31718
31872
  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 alpha (the default: the person cut out on a transparent background, to lay over slides directly or use as a Cut track mask with channel alpha) or mask (a black-and-white keying matte, which the current matting line does not produce and refuses), 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\"}}.",
31873
+ 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
31874
  http: "POST",
31721
31875
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
31722
31876
  streaming: "no",
@@ -31741,7 +31895,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
31741
31895
  name: "operation",
31742
31896
  type: "object",
31743
31897
  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."
31898
+ 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
31899
  },
31746
31900
  {
31747
31901
  name: "model",
@@ -47275,11 +47429,7 @@ var computersFilesConvert = (options) => (options.client ?? client).post({
47275
47429
  type: "apiKey"
47276
47430
  }],
47277
47431
  url: "/agent/v1/computers/{computer_id}/files/convert",
47278
- ...options,
47279
- headers: {
47280
- "Content-Type": "application/json",
47281
- ...options.headers
47282
- }
47432
+ ...options
47283
47433
  });
47284
47434
  var connectComputer = (options) => (options.client ?? client).post({
47285
47435
  security: [{
@@ -47367,6 +47517,36 @@ var forkSession = (options) => (options.client ?? client).post({
47367
47517
  ...options.headers
47368
47518
  }
47369
47519
  });
47520
+ var listSessionArtifacts = (options) => (options.client ?? client).get({
47521
+ security: [{
47522
+ key: "BearerAuth",
47523
+ scheme: "bearer",
47524
+ type: "http"
47525
+ }, {
47526
+ key: "ApiKeyAuth",
47527
+ name: "X-API-Key",
47528
+ type: "apiKey"
47529
+ }],
47530
+ url: "/agent/v1/sessions/{session_id}/artifacts",
47531
+ ...options
47532
+ });
47533
+ var createSessionArtifactContentUrl = (options) => (options.client ?? client).post({
47534
+ security: [{
47535
+ key: "BearerAuth",
47536
+ scheme: "bearer",
47537
+ type: "http"
47538
+ }, {
47539
+ key: "ApiKeyAuth",
47540
+ name: "X-API-Key",
47541
+ type: "apiKey"
47542
+ }],
47543
+ url: "/agent/v1/sessions/{session_id}/artifacts/{artifact_id}/content_url",
47544
+ ...options,
47545
+ headers: {
47546
+ "Content-Type": "application/json",
47547
+ ...options.headers
47548
+ }
47549
+ });
47370
47550
  var listSessionBackgroundTasks = (options) => (options.client ?? client).get({
47371
47551
  security: [{
47372
47552
  key: "BearerAuth",
@@ -53251,6 +53431,19 @@ var devopsFlagsCreate = (options) => (options.client ?? client).post({
53251
53431
  ...options.headers
53252
53432
  }
53253
53433
  });
53434
+ var devopsFlagsReportCodeRefs = (options) => (options.client ?? client).post({
53435
+ security: [{
53436
+ key: "devops-bearerAuth",
53437
+ scheme: "bearer",
53438
+ type: "http"
53439
+ }],
53440
+ url: "/devops/v1/projects/{project}/flags/code-refs",
53441
+ ...options,
53442
+ headers: {
53443
+ "Content-Type": "application/json",
53444
+ ...options.headers
53445
+ }
53446
+ });
53254
53447
  var devopsFlagsGet = (options) => (options.client ?? client).get({
53255
53448
  security: [{
53256
53449
  key: "devops-bearerAuth",
@@ -54464,6 +54657,19 @@ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).ge
54464
54657
  url: "/media/v1/generation/capabilities",
54465
54658
  ...options
54466
54659
  });
54660
+ var mediaAlignAsset = (options) => (options.client ?? client).post({
54661
+ security: [{
54662
+ key: "media-BearerAuth",
54663
+ scheme: "bearer",
54664
+ type: "http"
54665
+ }],
54666
+ url: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
54667
+ ...options,
54668
+ headers: {
54669
+ "Content-Type": "application/json",
54670
+ ...options.headers
54671
+ }
54672
+ });
54467
54673
  var ontologyListTypes = (options) => (options?.client ?? client).get({
54468
54674
  security: [{
54469
54675
  key: "ontology-bearerAuth",
@@ -57696,6 +57902,12 @@ function createAgent(transport) {
57696
57902
  },
57697
57903
  sessions: {
57698
57904
  archive: bind(transport, sessionsArchive),
57905
+ artifacts: {
57906
+ contentUrl: {
57907
+ create: bind(transport, createSessionArtifactContentUrl)
57908
+ },
57909
+ list: bind(transport, listSessionArtifacts)
57910
+ },
57699
57911
  backgroundTasks: {
57700
57912
  list: bind(transport, listSessionBackgroundTasks),
57701
57913
  retrieveOutput: bind(transport, getSessionBackgroundTaskOutput),
@@ -58226,7 +58438,8 @@ function createDevops(transport) {
58226
58438
  },
58227
58439
  flags: {
58228
58440
  create: bind(transport, devopsFlagsCreate),
58229
- list: bind(transport, devopsFlagsList)
58441
+ list: bind(transport, devopsFlagsList),
58442
+ reportCodeRefs: bind(transport, devopsFlagsReportCodeRefs)
58230
58443
  },
58231
58444
  list: bind(transport, devopsProjectsList),
58232
58445
  promotions: {
@@ -58430,6 +58643,9 @@ function createMedia(transport) {
58430
58643
  },
58431
58644
  libraries: {
58432
58645
  assets: {
58646
+ align: {
58647
+ create: bind(transport, mediaAlignAsset)
58648
+ },
58433
58649
  batch: bind(transport, mediaBatchAssets),
58434
58650
  create: bind(transport, (options) => mediaUploadAsset({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } })),
58435
58651
  delete: bind(transport, mediaDeleteAsset),
@@ -61417,30 +61633,31 @@ var workflows = [
61417
61633
  {
61418
61634
  words: ["devops", "flag", "refs"],
61419
61635
  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",
61636
+ usage: "devops flag refs [key] [--report --project <dvp_…>]",
61637
+ 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.",
61638
+ example: "praxis devops flag refs --report --project dvp_…",
61423
61639
  examples: [
61424
61640
  "praxis devops flag refs",
61425
- "praxis devops flag refs run-page-v2"
61641
+ "praxis devops flag refs run-page-v2",
61642
+ "praxis devops flag refs --report --project dvp_…"
61426
61643
  ],
61427
61644
  group: "local",
61428
- network: "offline",
61429
- 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).",
61645
+ network: "Offline. --report: needs a login and sends this checkout's references to the platform",
61646
+ 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
61647
  docs: "https://docs.deepraxis.com/docs/cli"
61431
61648
  },
61432
61649
  {
61433
61650
  words: ["devops", "flag", "remove"],
61434
61651
  requires: "checkout",
61435
61652
  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: 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.",
61653
+ 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
61654
  example: "praxis devops flag remove run-page-v2",
61438
61655
  examples: [
61439
61656
  "praxis devops flag remove run-page-v2"
61440
61657
  ],
61441
61658
  group: "local",
61442
61659
  network: "offline",
61443
- 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).",
61660
+ 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
61661
  docs: "https://docs.deepraxis.com/docs/cli"
61445
61662
  },
61446
61663
  {
@@ -63206,13 +63423,21 @@ function matchesPattern(pattern, path) {
63206
63423
  }
63207
63424
  async function workspaceIndexOf(facts, options = {}) {
63208
63425
  const tree = new Set(facts.tree);
63209
- const declared = workspacePatternsOf({
63426
+ return workspaceIndexOfSync({
63427
+ tree: facts.tree,
63210
63428
  packageJson: tree.has("package.json") ? await facts.read("package.json") : null,
63211
63429
  pnpmWorkspace: tree.has("pnpm-workspace.yaml") ? await facts.read("pnpm-workspace.yaml") : null
63430
+ }, options);
63431
+ }
63432
+ function workspaceIndexOfSync(input, options = {}) {
63433
+ const tree = new Set(input.tree);
63434
+ const declared = workspacePatternsOf({
63435
+ packageJson: input.packageJson,
63436
+ pnpmWorkspace: input.pnpmWorkspace
63212
63437
  });
63213
63438
  const patterns = declared.length > 0 ? declared : options.defaultPatterns ?? [];
63214
63439
  const candidates2 = new Set;
63215
- for (const path of facts.tree) {
63440
+ for (const path of input.tree) {
63216
63441
  const dir = dirOfPackageJson(path) ?? dirOfManifest(path);
63217
63442
  if (dir === undefined || dir === ".")
63218
63443
  continue;
@@ -65193,7 +65418,7 @@ function planTest(flags, paths) {
65193
65418
  }
65194
65419
  function requireSingleCtrfTarget(targets) {
65195
65420
  if (targets > 1)
65196
- throw new UsageError("--ctrf names one report file but this selection covers several packages", "Run one package at a time with --ctrf, or drop --ctrf and read each run's own .mise/ctrf/<run>.json.");
65421
+ throw new UsageError("--ctrf names one report file but this selection covers several packages", "Run one package at a time with --ctrf, or drop --ctrf and read each run's own .praxis/ctrf/<run>.json.");
65197
65422
  }
65198
65423
  var FAILURE_LIMIT2 = 20;
65199
65424
  var member3 = (value, key) => typeof value === "object" && value !== null ? value[key] : undefined;
@@ -65552,7 +65777,7 @@ async function devopsTestReportUpload(args, ports) {
65552
65777
  if (id === undefined || id === "")
65553
65778
  throw new UsageError("--upload needs --id", "Run `praxis devops test report` first to list this machine's runs, then pass one with --id.");
65554
65779
  const root = await ports.root();
65555
- const file = join6(root, ".mise", "ctrf", `${id}.json`);
65780
+ const file = join6(root, ".praxis", "ctrf", `${id}.json`);
65556
65781
  let report;
65557
65782
  try {
65558
65783
  report = await ports.readFile(file);
@@ -65735,7 +65960,7 @@ async function localCheckout(cwd, spawn4) {
65735
65960
  const files = new Map;
65736
65961
  const walk = async (dir) => {
65737
65962
  for (const entry of await readdir2(dir, { withFileTypes: true })) {
65738
- if (["node_modules", ".git", "dist", ".mise"].includes(entry.name))
65963
+ if (["node_modules", ".git", "dist", ".praxis"].includes(entry.name))
65739
65964
  continue;
65740
65965
  const full = join6(dir, entry.name);
65741
65966
  if (entry.isDirectory()) {
@@ -65927,7 +66152,7 @@ function removalSteps(key) {
65927
66152
  `No code references ${key}. The rest is not this command's to do:`,
65928
66153
  ` 1. Deploy the code that removed the references (deploy never writes the trunk).`,
65929
66154
  ` 2. Retire the flag on the platform: praxis api devops flag archive <flg_…> — the terminal state.`,
65930
- ` Archiving keeps the key reserved and turns the flag off in every environment; there is no separate delete call.`,
66155
+ ` 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).`,
65931
66156
  ` 3. Regenerate the registry: praxis devops flag sync`
65932
66157
  ].join(`
65933
66158
  `);
@@ -65957,6 +66182,25 @@ async function repositoryRoot(cwd, read) {
65957
66182
  dir = parent;
65958
66183
  }
65959
66184
  }
66185
+ var SNIPPET_LIMIT = 200;
66186
+ function snippetOf(text2, line) {
66187
+ const trimmed = (text2.split(`
66188
+ `)[line - 1] ?? "").trim();
66189
+ return trimmed.length > SNIPPET_LIMIT ? trimmed.slice(0, SNIPPET_LIMIT) : trimmed;
66190
+ }
66191
+ function reportedKeys(keys, sources, refs) {
66192
+ const texts = new Map(sources.map((file) => [file.path, file.text]));
66193
+ return keys.map((flagKey) => ({
66194
+ flagKey,
66195
+ items: refs.filter((ref) => ref.key === flagKey).map((ref) => ({ path: ref.file, line: ref.line, snippet: snippetOf(texts.get(ref.file) ?? "", ref.line) }))
66196
+ }));
66197
+ }
66198
+ function reportNeedsProject() {
66199
+ 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.");
66200
+ }
66201
+ function reportClientMissing() {
66202
+ 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.");
66203
+ }
65960
66204
  async function codeSources(ports, registry) {
65961
66205
  const suffix = registry.replace(/^\.\//, "");
65962
66206
  return (await ports.sources()).filter((file) => !file.path.replace(/^\.\//, "").endsWith(suffix));
@@ -66013,15 +66257,33 @@ async function devopsFlagScaffold(key, args, ports) {
66013
66257
  ports.emit({ kind: "object", data: { key, registry, file, call: scaffoldCall(key) } });
66014
66258
  return 0;
66015
66259
  }
66016
- async function devopsFlagRefs(key, ports) {
66260
+ async function devopsFlagRefs(key, args, ports) {
66017
66261
  const registry = await registryOf(ports);
66018
66262
  const flags = await ports.loadRegistry(registry);
66019
66263
  const keys = key !== undefined ? [key] : Object.keys(flags).sort();
66020
- const refs = flagReferences(await codeSources(ports, registry), keys);
66264
+ const sources = await codeSources(ports, registry);
66265
+ const refs = flagReferences(sources, keys);
66021
66266
  for (const ref of refs)
66022
66267
  ports.human(`${ref.file}:${ref.line}: ${ref.key}`);
66023
66268
  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.`);
66024
- ports.emit({ kind: "object", data: { refs, reported: false } });
66269
+ if (!args.report) {
66270
+ ports.emit({ kind: "object", data: { refs, reported: false } });
66271
+ return 0;
66272
+ }
66273
+ const project = args.project;
66274
+ if (project === undefined || project === "")
66275
+ throw reportNeedsProject();
66276
+ const scannedCommit = (await ports.git(["rev-parse", "HEAD"])).trim();
66277
+ if (scannedCommit === "")
66278
+ throw new UsageError("git rev-parse HEAD answered no commit", "Run this command inside a git repository.");
66279
+ const payload = reportedKeys(Object.keys(flags).sort(), sources, refs);
66280
+ const client2 = await ports.client();
66281
+ const report = client2.devops?.projects?.flags?.reportCodeRefs;
66282
+ if (typeof report !== "function")
66283
+ throw reportClientMissing();
66284
+ const answer = await report.call(client2.devops.projects.flags, { path: { project }, body: { scannedCommit, refs: payload } });
66285
+ 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(", ")}` : ""}.`);
66286
+ ports.emit({ kind: "object", data: { refs, reported: true, project, scannedCommit, updated: answer.updated, unknownKeys: answer.unknownKeys } });
66025
66287
  return 0;
66026
66288
  }
66027
66289
  async function devopsFlagRemove(key, ports) {
@@ -69607,7 +69869,7 @@ function startProgress(ctx, write = (text2) => writeOutput({ stderr: text2 })) {
69607
69869
  }
69608
69870
 
69609
69871
  // src/main.ts
69610
- var version = "0.3.0-dev.11911e3";
69872
+ var version = "0.3.0-dev.1b3a943";
69611
69873
  var commands = commandTree(operations);
69612
69874
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
69613
69875
  function route(argv) {
@@ -69762,7 +70024,7 @@ var appOptions = {
69762
70024
  { name: "case", type: "string", description: "Scenario title substring; the engine's `scenario` (case ids are a later slice)." },
69763
70025
  { name: "e2e", type: "boolean", description: "The large end-to-end tests; exactly --size large, so the two cannot be combined." },
69764
70026
  { name: "retries", type: "string", description: "Retries after a failing scenario (default: 0)." },
69765
- { name: "ctrf", type: "string", description: "Write the CTRF report here (default: <cwd>/.mise/ctrf/<run>.json)." }
70027
+ { name: "ctrf", type: "string", description: "Write the CTRF report here (default: <cwd>/.praxis/ctrf/<run>.json)." }
69766
70028
  ],
69767
70029
  "devops test report": [
69768
70030
  { name: "id", type: "string", description: "Show one run's detail instead of the recent list." },
@@ -69782,6 +70044,10 @@ var appOptions = {
69782
70044
  "devops flag scaffold": [
69783
70045
  { name: "out", type: "string", description: "Directory the paired on/off scenario stubs are written to (default: the current directory)." }
69784
70046
  ],
70047
+ "devops flag refs": [
70048
+ { 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)." },
70049
+ { name: "project", type: "string", description: "With --report: the DevOps project id (dvp_…) whose flags the scan is reported into. Required." }
70050
+ ],
69785
70051
  "canvas import": [
69786
70052
  { name: "name", type: "string", description: "Name for the new canvas (default: the file name without .pen)." },
69787
70053
  { 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." },
@@ -69796,7 +70062,7 @@ var appOptions = {
69796
70062
  };
69797
70063
  appOptions["devops engine deploy"] = appOptions["devops deploy"];
69798
70064
  var workflowOptions = (words) => words[0] === "skill" ? [{ name: "install", type: "string" }] : appOptions[words.join(" ")] ?? [];
69799
- function flagPortsFor(ports, context, emit) {
70065
+ function flagPortsFor(ports, context, emit, connect) {
69800
70066
  return {
69801
70067
  mode: context.mode,
69802
70068
  emit,
@@ -69806,6 +70072,8 @@ function flagPortsFor(ports, context, emit) {
69806
70072
  },
69807
70073
  cwd: ports.cwd,
69808
70074
  readFile: ports.readFile,
70075
+ git: async (args) => (await ports.spawnCapture("git", [...args], { cwd: ports.cwd })).output,
70076
+ client: connect,
69809
70077
  writeFile: (path, text2) => writeFile5(path, text2, "utf8"),
69810
70078
  mkdir: async (path) => {
69811
70079
  await mkdir4(path, { recursive: true });
@@ -70259,7 +70527,7 @@ Examples:
70259
70527
  }
70260
70528
  });
70261
70529
  }
70262
- const flagPorts = flagPortsFor(ports, ctx, emit);
70530
+ const flagPorts = flagPortsFor(ports, ctx, emit, async () => await auth.client(org));
70263
70531
  if (name === "devops flag sync")
70264
70532
  return await devopsFlagSync({ check: Boolean(parsed.flags.check) }, flagPorts);
70265
70533
  if (name === "devops flag check")
@@ -70267,7 +70535,7 @@ Examples:
70267
70535
  if (name === "devops flag scaffold")
70268
70536
  return await devopsFlagScaffold(parsed.positional[0], { out: parsed.flags.out?.[0] }, flagPorts);
70269
70537
  if (name === "devops flag refs")
70270
- return await devopsFlagRefs(parsed.positional[0], flagPorts);
70538
+ return await devopsFlagRefs(parsed.positional[0], { report: Boolean(parsed.flags.report), project: parsed.flags.project?.[0] }, flagPorts);
70271
70539
  return await devopsFlagRemove(parsed.positional[0], flagPorts);
70272
70540
  }
70273
70541
  if (!quiet)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepraxis/cli",
3
- "version": "0.3.0-dev.11911e3",
3
+ "version": "0.3.0-dev.1b3a943",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "praxis": "dist/praxis.js"