@deepraxis/cli 0.3.0-dev.3aab976 → 0.3.0-dev.3b48b63

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
- 790 HTTP operations; 792 commands including aliases.
5
+ 797 HTTP operations; 799 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] [--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 …]`.
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>`, `agent support-mcp`, `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
  |---|---|---|---|
@@ -68,6 +68,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
68
68
  | `praxis api agent event stream` | `agent.agents.events.stream` | GET `/agent/v1/agents/{agent_id}/events/stream` | `--agent`, `--event-deltas` |
69
69
  | `praxis api agent get <agent_id>` | `agent.agents.retrieve` | GET `/agent/v1/agents/{agent_id}` | `--param-version` |
70
70
  | `praxis api agent get-appearance <agent_id>` | `agent.agents.retrieveAppearance` | GET `/agent/v1/agents/{agent_id}/appearance` | |
71
+ | `praxis api agent letter list` | `agent.agents.letters.list` | GET `/agent/v1/agents/{agent_id}/letters` | `--agent`, `--unread`, `--param-limit` |
71
72
  | `praxis api agent list` | `agent.agents.list` | GET `/agent/v1/agents` | `--created-at-gte`, `--created-at-lte`, `--include-archived`, `--param-limit`, `--page`, `--kind` |
72
73
  | `praxis api agent session archive <session_id>` | `agent.sessions.archive` | POST `/agent/v1/sessions/{session_id}/archive` | |
73
74
  | `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` |
@@ -87,6 +88,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
87
88
  | `praxis api agent session get-compact <operation_id>` | `agent.sessions.retrieveCompact` | GET `/agent/v1/sessions/{session_id}/compact/{operation_id}` | `--session` |
88
89
  | `praxis api agent session get-context <session_id>` | `agent.sessions.retrieveContext` | GET `/agent/v1/sessions/{session_id}/context` | |
89
90
  | `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` |
91
+ | `praxis api agent session request list` | `agent.sessions.requests.list` | GET `/agent/v1/sessions/{session_id}/requests` | `--session` |
90
92
  | `praxis api agent session resource create` | `agent.sessions.resources.create` | POST `/agent/v1/sessions/{session_id}/resources` | `--session`, `--type`, `--file-id`, `--mount-path` |
91
93
  | `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` |
92
94
  | `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` |
@@ -466,6 +468,7 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
466
468
  | `praxis api media asset lineage <asset_id>` | `media.assets.lineage` | GET `/media/v1/libraries/{library_id}/assets/{asset_id}/lineage` | `--library` |
467
469
  | `praxis api media generation capability list` | `media.generation.capabilities.list` | GET `/media/v1/generation/capabilities` | |
468
470
  | `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` |
471
+ | `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` |
469
472
  | `praxis api media library asset batch <library_id>` | `media.libraries.assets.batch` | POST `/media/v1/libraries/{library_id}/assets:batch` | `--reason` |
470
473
  | `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` |
471
474
  | `praxis api media library asset delete <asset_id>` | `media.libraries.assets.delete` | DELETE `/media/v1/libraries/{library_id}/assets/{asset_id}` | `--library` |
@@ -669,6 +672,10 @@ Handwritten commands: `help [command…] [--json]`, `login`, `logout`, `whoami`,
669
672
  | `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` |
670
673
  | `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` |
671
674
  | `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` |
675
+ | `praxis api share permission create` | `share.permissions.create` | POST `/share/v1/permissions` | `--expire-time`, `--prevents-download` |
676
+ | `praxis api share permission delete <id>` | `share.permissions.delete` | DELETE `/share/v1/permissions/{id}` | |
677
+ | `praxis api share permission get <id>` | `share.permissions.retrieve` | GET `/share/v1/permissions/{id}` | |
678
+ | `praxis api share permission list` | `share.permissions.list` | GET `/share/v1/permissions` | `--resource-type`, `--resource-id`, `--status`, `--page-size`, `--page-token` |
672
679
  | `praxis api studio codex create` | `studio.codexes.create` | POST `/studio/v1/codexes` | `--name`, `--description` |
673
680
  | `praxis api studio codex delete <codex>` | `studio.codexes.delete` | DELETE `/studio/v1/codexes/{codex}` | |
674
681
  | `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
@@ -13987,6 +13987,10 @@ var init_flag_registry_generated = __esm(() => {
13987
13987
  "delivery-rules-v2": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2048, expires: "2026-11-28", system: "devops" },
13988
13988
  "model-access-gate": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 1933, expires: "2026-12-15", system: "devops" },
13989
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" },
13993
+ "router-responses-hedge": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: 2149, expires: "2026-11-28", system: "devops" },
13990
13994
  "search-provider-routing": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "praxis-98", ticket: 716, expires: "2026-12-31", system: "devops" },
13991
13995
  "unit-live-probe": { kind: "RELEASE", type: "BOOLEAN", default: false, owner: "usr_t60d4g5z82rhbtbfrfxfbdxe", ticket: null, expires: "2026-11-19", system: "devops" }
13992
13996
  };
@@ -14032,6 +14036,8 @@ function checkFlags(files, registry, today = new Date().toISOString().slice(0, 1
14032
14036
  add(f, browserList.index + entry.index, `unregistered browser flag key "${entry[1]}"`);
14033
14037
  }
14034
14038
  }
14039
+ if (/\.generated\.[cm]?[jt]sx?$/.test(f.path))
14040
+ continue;
14035
14041
  const calls = /(\.bool|\breadBrowserFlag|\buseBrowserFlag)\s*\(\s*([^,)\n]+)/g;
14036
14042
  for (const m of f.text.matchAll(calls)) {
14037
14043
  if (/function\s*$/.test(f.text.slice(Math.max(0, m.index - 20), m.index)))
@@ -14540,7 +14546,7 @@ import { mkdir as mkdir4, readFile as readFile7, readdir as readdir3, writeFile
14540
14546
  import { resolve as resolve11 } from "node:path";
14541
14547
  import { pathToFileURL } from "node:url";
14542
14548
  import { createHash as createHash5 } from "node:crypto";
14543
- import { spawn as spawn4 } from "node:child_process";
14549
+ import { spawn as spawn5 } from "node:child_process";
14544
14550
  import { createInterface } from "node:readline";
14545
14551
 
14546
14552
  // ../../packages/sdk/typescript/src/operations.generated.ts
@@ -15622,6 +15628,40 @@ Idempotent. Access tokens revoked while the customer was blocked stay revoked; s
15622
15628
  }
15623
15629
  ]
15624
15630
  },
15631
+ {
15632
+ resource: "agent.agents.letters",
15633
+ method: "list",
15634
+ summary: "List an assume agent's waiting letters",
15635
+ description: 'Check whether mail waits for an assume agent without taking it: answers unread, the count of delivered letters the agent has not read, and letters, the newest unread ones (id, sender address, summary, thread, create_time; never the body). Nothing is marked read, so calling it again answers the same until the agent reads its mail with its own inbox tool (praxis_assume_inbox, action "read"). Use it when something outside the agent has to learn that mail arrived: an assume agent is never woken for a letter, so the local `praxis agent support-mcp` polls this to tell its coding agent. {agent_id} takes the agent_… id, the eight character identity number or the handle of an assume agent in your organization; any other kind answers 400 ASSUME_AGENT_REQUIRED. To read or answer the letters, use the agent\'s inbox tool, not this read. Example: GET /agent/v1/agents/R1M9TQ2X/letters?unread=true&limit=5.',
15636
+ http: "GET",
15637
+ path: "/agent/v1/agents/{agent_id}/letters",
15638
+ streaming: "no",
15639
+ pagination: false,
15640
+ pathParams: [
15641
+ {
15642
+ name: "agent_id",
15643
+ sdkName: "agent_id",
15644
+ description: "The assume agent: its agent_… id, eight character identity number or handle, from agents.list or the praxis-assume MCP URL; resolved in your organization. Also accepts an 8-character identity number (0–9, A–Z); malformed, absent and foreign references return 404, and response ids always use agent_…."
15645
+ }
15646
+ ],
15647
+ query: [
15648
+ {
15649
+ name: "unread",
15650
+ type: "boolean",
15651
+ enum: [
15652
+ true
15653
+ ],
15654
+ required: false,
15655
+ description: "Only true is accepted, which is also the default; this read lists waiting (unread) letters and nothing else."
15656
+ },
15657
+ {
15658
+ name: "limit",
15659
+ type: "integer",
15660
+ required: false,
15661
+ description: "How many of the newest unread letters to return, 1 to 50 (default 20); unread always counts every waiting letter."
15662
+ }
15663
+ ]
15664
+ },
15625
15665
  {
15626
15666
  resource: "agent.agents.unarchive",
15627
15667
  method: "create",
@@ -17228,7 +17268,7 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
17228
17268
  resource: "agent.sessions.events",
17229
17269
  method: "list",
17230
17270
  summary: "List session events",
17231
- 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.",
17271
+ 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, system.notification_suppressed (pending background notifications that hit the wake quota and started no run), system.notification_recorded, 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.",
17232
17272
  http: "GET",
17233
17273
  path: "/agent/v1/sessions/{session_id}/events",
17234
17274
  streaming: "no",
@@ -17387,6 +17427,26 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
17387
17427
  ]
17388
17428
  }
17389
17429
  },
17430
+ {
17431
+ resource: "agent.sessions.requests",
17432
+ method: "list",
17433
+ summary: "List Session Requests (Extension)",
17434
+ description: `List the requests a session is waiting on; an end-customer token reads its own session.
17435
+
17436
+ 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.`,
17437
+ http: "GET",
17438
+ path: "/agent/v1/sessions/{session_id}/requests",
17439
+ streaming: "no",
17440
+ pagination: false,
17441
+ pathParams: [
17442
+ {
17443
+ name: "session_id",
17444
+ sdkName: "session_id",
17445
+ description: "Session id from session creation or listing."
17446
+ }
17447
+ ],
17448
+ query: []
17449
+ },
17390
17450
  {
17391
17451
  resource: "agent.sessions.resources",
17392
17452
  method: "list",
@@ -25439,6 +25499,12 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
25439
25499
  - \`RippleDeleteRange\` — Cut a time range and close the gap.
25440
25500
  - \`DeleteWords\` — Cut transcript words and ripple every track, keeping a breath.
25441
25501
  - \`RemoveFillers\` — List and delete filler words by media's own labels; dryRun first.
25502
+ - \`Matte\` — Replace the clip's background with media's matte of its source, read as a luma mask.
25503
+ - \`EnhanceVoice\` — Replace a clip's sound with media's enhanced speech on its own audio track.
25504
+ - \`AlignByAudio\` — Line two recordings of the same sound up by media's measurement of their offset.
25505
+ - \`Reframe\` — Swap the clip's media for media's reframed take at the aspect you ask for.
25506
+ - \`Upscale\` — Swap the clip's media for media's upscaled take at the height you ask for.
25507
+ - \`Redact\` — Pixelate the faces, QR codes or text media marks, leaving the rest of the frame plain.
25442
25508
  - \`AddTrack\` — Add a video, audio or caption track.
25443
25509
  - \`MoveTrack\` — Move a track between layers; 0 is the topmost.
25444
25510
  - \`UpdateTrack\` — Change a track's name, lock, gain or role.
@@ -25542,6 +25608,9 @@ Published at https://docs.deepraxis.com/docs/developers/cut/script-reference wit
25542
25608
  - \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
25543
25609
  - \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
25544
25610
  - \`MEDIA_IMPORT_FAILED\` — Importing media failed.
25611
+ - \`MEDIA_PROCESSING\` — Media is still processing the clip; wait for the job and rerun.
25612
+ - \`MEDIA_PROCESSING_FAILED\` — Media's processing job failed; nothing changed.
25613
+ - \`ALIGNMENT_UNCERTAIN\` — \`AlignByAudio\` confidence too low; nothing changed.
25545
25614
  - \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
25546
25615
  - \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
25547
25616
  - \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
@@ -29901,7 +29970,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
29901
29970
  resource: "devops.units",
29902
29971
  method: "push",
29903
29972
  summary: "Push a unit's branch",
29904
- 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.",
29973
+ 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.",
29905
29974
  http: "POST",
29906
29975
  path: "/devops/v1/units/{id}:push",
29907
29976
  streaming: "no",
@@ -31807,11 +31876,57 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
31807
31876
  ]
31808
31877
  }
31809
31878
  },
31879
+ {
31880
+ resource: "media.libraries.assets.align",
31881
+ method: "create",
31882
+ summary: "Align asset",
31883
+ 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}.",
31884
+ http: "POST",
31885
+ path: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
31886
+ streaming: "no",
31887
+ pagination: false,
31888
+ pathParams: [
31889
+ {
31890
+ name: "library_id",
31891
+ sdkName: "library_id",
31892
+ description: "Library ID returned by creation."
31893
+ },
31894
+ {
31895
+ name: "asset_id",
31896
+ sdkName: "asset_id",
31897
+ description: "32-character asset ID."
31898
+ }
31899
+ ],
31900
+ query: [],
31901
+ body: {
31902
+ required: true,
31903
+ fields: [
31904
+ {
31905
+ name: "reference_asset_id",
31906
+ type: "string",
31907
+ required: true,
31908
+ 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."
31909
+ },
31910
+ {
31911
+ name: "max_offset_seconds",
31912
+ type: "number",
31913
+ required: false,
31914
+ 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."
31915
+ },
31916
+ {
31917
+ name: "idempotency_key",
31918
+ type: "string",
31919
+ required: false,
31920
+ description: "Stable key so a retried request reuses the same job instead of analysing and charging again; reusing it with different content is rejected."
31921
+ }
31922
+ ]
31923
+ }
31924
+ },
31810
31925
  {
31811
31926
  resource: "media.assets",
31812
31927
  method: "edit",
31813
31928
  summary: "Edit asset",
31814
- 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\"}}.",
31929
+ 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\"}}.",
31815
31930
  http: "POST",
31816
31931
  path: "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
31817
31932
  streaming: "no",
@@ -31836,7 +31951,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
31836
31951
  name: "operation",
31837
31952
  type: "object",
31838
31953
  required: true,
31839
- 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."
31954
+ 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."
31840
31955
  },
31841
31956
  {
31842
31957
  name: "model",
@@ -34869,6 +34984,7 @@ for more details.`
34869
34984
  "openai.images.generations",
34870
34985
  "openai.responses",
34871
34986
  "openai.videos",
34987
+ "praxis.media.process",
34872
34988
  "praxis.video.matting",
34873
34989
  "typesafe.systemone",
34874
34990
  "volcengine.music",
@@ -40544,6 +40660,129 @@ for more details.`
40544
40660
  ]
40545
40661
  }
40546
40662
  },
40663
+ {
40664
+ resource: "share.permissions",
40665
+ method: "list",
40666
+ summary: "List shares",
40667
+ 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.",
40668
+ http: "GET",
40669
+ path: "/share/v1/permissions",
40670
+ streaming: "no",
40671
+ pagination: false,
40672
+ pathParams: [],
40673
+ query: [
40674
+ {
40675
+ name: "resource_type",
40676
+ type: "string",
40677
+ enum: [
40678
+ "file",
40679
+ "artifact"
40680
+ ],
40681
+ required: false,
40682
+ description: "Only shares of this object type; file is the only type that creates today."
40683
+ },
40684
+ {
40685
+ name: "resource_id",
40686
+ type: "string",
40687
+ required: false,
40688
+ description: "Only shares of the object with this id, for example a file id from the File API; combine with resource_type."
40689
+ },
40690
+ {
40691
+ name: "status",
40692
+ type: "string",
40693
+ enum: [
40694
+ "active",
40695
+ "expired",
40696
+ "revoked"
40697
+ ],
40698
+ required: false,
40699
+ description: "Only shares in this state; omit to list every state."
40700
+ },
40701
+ {
40702
+ name: "page_size",
40703
+ type: "integer",
40704
+ required: false,
40705
+ description: "Maximum shares in one page, from 1 to 100; defaults to 50."
40706
+ },
40707
+ {
40708
+ name: "page_token",
40709
+ type: "string",
40710
+ required: false,
40711
+ description: "Opaque next_page_token from the preceding page with the same filters; omit on the first request."
40712
+ }
40713
+ ]
40714
+ },
40715
+ {
40716
+ resource: "share.permissions",
40717
+ method: "create",
40718
+ summary: "Create share",
40719
+ 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.",
40720
+ http: "POST",
40721
+ path: "/share/v1/permissions",
40722
+ streaming: "no",
40723
+ pagination: false,
40724
+ pathParams: [],
40725
+ query: [],
40726
+ body: {
40727
+ required: true,
40728
+ fields: [
40729
+ {
40730
+ name: "resource",
40731
+ type: "object",
40732
+ required: true,
40733
+ description: "The object a share exposes, named by a type and an id."
40734
+ },
40735
+ {
40736
+ name: "expire_time",
40737
+ type: "string",
40738
+ required: false,
40739
+ 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."
40740
+ },
40741
+ {
40742
+ name: "prevents_download",
40743
+ type: "boolean",
40744
+ required: false,
40745
+ 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."
40746
+ }
40747
+ ]
40748
+ }
40749
+ },
40750
+ {
40751
+ resource: "share.permissions",
40752
+ method: "delete",
40753
+ summary: "Delete share",
40754
+ 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.",
40755
+ http: "DELETE",
40756
+ path: "/share/v1/permissions/{id}",
40757
+ streaming: "no",
40758
+ pagination: false,
40759
+ pathParams: [
40760
+ {
40761
+ name: "id",
40762
+ sdkName: "id",
40763
+ 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."
40764
+ }
40765
+ ],
40766
+ query: []
40767
+ },
40768
+ {
40769
+ resource: "share.permissions",
40770
+ method: "retrieve",
40771
+ summary: "Retrieve share",
40772
+ 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.",
40773
+ http: "GET",
40774
+ path: "/share/v1/permissions/{id}",
40775
+ streaming: "no",
40776
+ pagination: false,
40777
+ pathParams: [
40778
+ {
40779
+ name: "id",
40780
+ sdkName: "id",
40781
+ 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."
40782
+ }
40783
+ ],
40784
+ query: []
40785
+ },
40547
40786
  {
40548
40787
  resource: "studio.codexes",
40549
40788
  method: "list",
@@ -47018,6 +47257,19 @@ var getAgentConsolidation = (options) => (options.client ?? client).get({
47018
47257
  url: "/agent/v1/agents/{agent_id}/consolidations/{consolidation_id}",
47019
47258
  ...options
47020
47259
  });
47260
+ var listAgentLetters = (options) => (options.client ?? client).get({
47261
+ security: [{
47262
+ key: "BearerAuth",
47263
+ scheme: "bearer",
47264
+ type: "http"
47265
+ }, {
47266
+ key: "ApiKeyAuth",
47267
+ name: "X-API-Key",
47268
+ type: "apiKey"
47269
+ }],
47270
+ url: "/agent/v1/agents/{agent_id}/letters",
47271
+ ...options
47272
+ });
47021
47273
  var applyAgentVersion = (options) => (options.client ?? client).post({
47022
47274
  security: [{
47023
47275
  key: "BearerAuth",
@@ -47488,6 +47740,19 @@ var createSessionArtifactContentUrl = (options) => (options.client ?? client).po
47488
47740
  ...options.headers
47489
47741
  }
47490
47742
  });
47743
+ var listSessionRequests = (options) => (options.client ?? client).get({
47744
+ security: [{
47745
+ key: "BearerAuth",
47746
+ scheme: "bearer",
47747
+ type: "http"
47748
+ }, {
47749
+ key: "ApiKeyAuth",
47750
+ name: "X-API-Key",
47751
+ type: "apiKey"
47752
+ }],
47753
+ url: "/agent/v1/sessions/{session_id}/requests",
47754
+ ...options
47755
+ });
47491
47756
  var listSessionBackgroundTasks = (options) => (options.client ?? client).get({
47492
47757
  security: [{
47493
47758
  key: "BearerAuth",
@@ -54598,6 +54863,19 @@ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).ge
54598
54863
  url: "/media/v1/generation/capabilities",
54599
54864
  ...options
54600
54865
  });
54866
+ var mediaAlignAsset = (options) => (options.client ?? client).post({
54867
+ security: [{
54868
+ key: "media-BearerAuth",
54869
+ scheme: "bearer",
54870
+ type: "http"
54871
+ }],
54872
+ url: "/media/v1/libraries/{library_id}/assets/{asset_id}/align",
54873
+ ...options,
54874
+ headers: {
54875
+ "Content-Type": "application/json",
54876
+ ...options.headers
54877
+ }
54878
+ });
54601
54879
  var ontologyListTypes = (options) => (options?.client ?? client).get({
54602
54880
  security: [{
54603
54881
  key: "ontology-bearerAuth",
@@ -55730,6 +56008,46 @@ var searchMap = (options) => (options.client ?? client).post({
55730
56008
  ...options.headers
55731
56009
  }
55732
56010
  });
56011
+ var shareListPermissions = (options) => (options?.client ?? client).get({
56012
+ security: [{
56013
+ key: "share-bearerAuth",
56014
+ scheme: "bearer",
56015
+ type: "http"
56016
+ }],
56017
+ url: "/share/v1/permissions",
56018
+ ...options
56019
+ });
56020
+ var shareCreatePermission = (options) => (options.client ?? client).post({
56021
+ security: [{
56022
+ key: "share-bearerAuth",
56023
+ scheme: "bearer",
56024
+ type: "http"
56025
+ }],
56026
+ url: "/share/v1/permissions",
56027
+ ...options,
56028
+ headers: {
56029
+ "Content-Type": "application/json",
56030
+ ...options.headers
56031
+ }
56032
+ });
56033
+ var shareDeletePermission = (options) => (options.client ?? client).delete({
56034
+ security: [{
56035
+ key: "share-bearerAuth",
56036
+ scheme: "bearer",
56037
+ type: "http"
56038
+ }],
56039
+ url: "/share/v1/permissions/{id}",
56040
+ ...options
56041
+ });
56042
+ var shareRetrievePermission = (options) => (options.client ?? client).get({
56043
+ security: [{
56044
+ key: "share-bearerAuth",
56045
+ scheme: "bearer",
56046
+ type: "http"
56047
+ }],
56048
+ url: "/share/v1/permissions/{id}",
56049
+ ...options
56050
+ });
55733
56051
  var studioGenresList = (options) => (options?.client ?? client).get({
55734
56052
  security: [{
55735
56053
  key: "BearerAuth",
@@ -57766,6 +58084,9 @@ function createAgent(transport) {
57766
58084
  send: bind(transport, sendAgentEvents),
57767
58085
  stream: bindStream(transport, streamAgentEvents)
57768
58086
  },
58087
+ letters: {
58088
+ list: bind(transport, listAgentLetters)
58089
+ },
57769
58090
  list: bind(transport, agentsList),
57770
58091
  retrieve: bind(transport, agentsRetrieve),
57771
58092
  retrieveAppearance: bind(transport, getAgentAppearance),
@@ -57854,6 +58175,9 @@ function createAgent(transport) {
57854
58175
  },
57855
58176
  fork: bind(transport, forkSession),
57856
58177
  list: bind(transport, sessionsList),
58178
+ requests: {
58179
+ list: bind(transport, listSessionRequests)
58180
+ },
57857
58181
  resources: {
57858
58182
  create: bind(transport, sessionsResourcesAdd),
57859
58183
  delete: bind(transport, aliasOperation(sessionsResourcesDelete, { query: { session_id: "query_session_id" } })),
@@ -58571,6 +58895,9 @@ function createMedia(transport) {
58571
58895
  },
58572
58896
  libraries: {
58573
58897
  assets: {
58898
+ align: {
58899
+ create: bind(transport, mediaAlignAsset)
58900
+ },
58574
58901
  batch: bind(transport, mediaBatchAssets),
58575
58902
  create: bind(transport, (options) => mediaUploadAsset({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } })),
58576
58903
  delete: bind(transport, mediaDeleteAsset),
@@ -59012,6 +59339,16 @@ function createSearch(transport) {
59012
59339
  }
59013
59340
  };
59014
59341
  }
59342
+ function createShare(transport) {
59343
+ return {
59344
+ permissions: {
59345
+ create: bind(transport, shareCreatePermission),
59346
+ delete: bind(transport, shareDeletePermission),
59347
+ list: bind(transport, shareListPermissions),
59348
+ retrieve: bind(transport, shareRetrievePermission)
59349
+ }
59350
+ };
59351
+ }
59015
59352
  function createStudio(transport) {
59016
59353
  return {
59017
59354
  codexes: {
@@ -59282,6 +59619,7 @@ var resourceFactories = {
59282
59619
  organization: createOrganization,
59283
59620
  sandbox: createSandbox,
59284
59621
  search: createSearch,
59622
+ share: createShare,
59285
59623
  studio: createStudio,
59286
59624
  ticket: createTicket,
59287
59625
  vault: createVault
@@ -61599,6 +61937,13 @@ var workflows = [
61599
61937
  platform: "praxis api devops project change create — the platform creates and names a Change; the CLI only lands its branch (ADR-125 §5).",
61600
61938
  docs: "https://docs.deepraxis.com/docs/cli"
61601
61939
  },
61940
+ {
61941
+ words: ["agent", "support-mcp"],
61942
+ usage: "agent support-mcp",
61943
+ summary: "Run a local stdio MCP server that tells Claude Code when letters arrive for your assume agent (PRAXIS_ASSUME_AGENT, default R1M9TQ2X): it polls the waiting letters every PRAXIS_SUPPORT_POLL_SECONDS (default 30, at least 10) without marking them read, and pushes a channel notice for each new batch. Claude Code must start with --dangerously-load-development-channels server:praxis-support; Claude Code starts this command itself from .mcp.json.",
61944
+ example: "PRAXIS_ASSUME_AGENT=R1M9TQ2X praxis agent support-mcp",
61945
+ network: "online"
61946
+ },
61602
61947
  { words: ["canvas", "import"], usage: "canvas import <file.pen> [--name <name>] [--canvas <cvs_…> --yes] [--frames <id,id>] [--image-root <dir>] [--dry-run]", summary: "Import a Pencil .pen file as a canvas, uploading the images it references first.", example: 'praxis canvas import design.pen --name "Landing page"' },
61603
61948
  { words: ["skill"], usage: "skill [--install <dir>]", summary: "Print the AI skill, or write <dir>/praxis-cli/SKILL.md." },
61604
61949
  {
@@ -63191,6 +63536,101 @@ function wranglerEdges(nodes) {
63191
63536
  }
63192
63537
  return edges;
63193
63538
  }
63539
+ // ../../packages/praxis/deploy-core/src/lambda-function.ts
63540
+ var LAMBDA_FUNCTIONS_ROOT = "services/lambda/functions";
63541
+ var UPSTREAM = "aliyun-fc";
63542
+ var RECIPE_PATH = /^services\/lambda\/functions\/([^/]+)\/function\.json$/;
63543
+ var isText = (value) => typeof value === "string" && value !== "";
63544
+ var isCount = (value, min, max) => typeof value === "number" && Number.isInteger(value) && value >= min && value <= max;
63545
+ function lambdaFunctionOf(text) {
63546
+ const parsed = text === null ? null : parseJsonc2(text);
63547
+ if (parsed === null)
63548
+ return null;
63549
+ if (!isText(parsed.name) || !isText(parsed.upstream))
63550
+ return null;
63551
+ if (!Array.isArray(parsed.regions) || parsed.regions.length === 0 || !parsed.regions.every(isText))
63552
+ return null;
63553
+ if (parsed.gpu !== undefined && !isText(parsed.gpu))
63554
+ return null;
63555
+ if (!isCount(parsed.cpu, 1, 256))
63556
+ return null;
63557
+ if (!isCount(parsed.memoryMb, 128, 32 * 1024))
63558
+ return null;
63559
+ if (!isCount(parsed.timeoutSeconds, 1, 24 * 3600))
63560
+ return null;
63561
+ if (!isCount(parsed.concurrency, 1, 1024))
63562
+ return null;
63563
+ return {
63564
+ name: parsed.name,
63565
+ upstream: parsed.upstream,
63566
+ regions: [...parsed.regions],
63567
+ ...parsed.gpu === undefined ? {} : { gpu: parsed.gpu },
63568
+ cpu: parsed.cpu,
63569
+ memoryMb: parsed.memoryMb,
63570
+ timeoutSeconds: parsed.timeoutSeconds,
63571
+ concurrency: parsed.concurrency
63572
+ };
63573
+ }
63574
+ function lambdaFunctionTarget(recipe) {
63575
+ return { path: `${LAMBDA_FUNCTIONS_ROOT}/${recipe.name}`, name: `lambda-${recipe.name}` };
63576
+ }
63577
+ function lambdaFunctionOwner(path) {
63578
+ return path.split("/").slice(0, -2).join("/");
63579
+ }
63580
+ async function scanRecipes(facts) {
63581
+ const found = [];
63582
+ const warnings = [];
63583
+ for (const path of [...facts.tree].sort()) {
63584
+ const match = RECIPE_PATH.exec(path);
63585
+ if (match === null)
63586
+ continue;
63587
+ const dir = path.slice(0, -"/function.json".length);
63588
+ const recipe = lambdaFunctionOf(await facts.read(path));
63589
+ if (recipe === null) {
63590
+ warnings.push(`${dir}: function.json is not a recipe`);
63591
+ continue;
63592
+ }
63593
+ if (recipe.upstream !== UPSTREAM)
63594
+ continue;
63595
+ if (recipe.name !== match[1]) {
63596
+ warnings.push(`${dir}: function.json names ${JSON.stringify(recipe.name)}, not the directory name`);
63597
+ continue;
63598
+ }
63599
+ found.push(recipe);
63600
+ }
63601
+ return { found, warnings };
63602
+ }
63603
+ function lambdaFunctionProvider(_options = {}) {
63604
+ return {
63605
+ id: "lambda-function",
63606
+ async detect(facts) {
63607
+ return (await scanRecipes(facts)).found.length > 0 ? "certain" : "none";
63608
+ },
63609
+ async plan(facts, partial) {
63610
+ const claimed = new Set(partial.targets.map((target) => target.path));
63611
+ const scan = await scanRecipes(facts);
63612
+ const targets = [];
63613
+ const byOwner = new Map;
63614
+ for (const recipe of scan.found) {
63615
+ const { path, name } = lambdaFunctionTarget(recipe);
63616
+ if (claimed.has(path))
63617
+ continue;
63618
+ targets.push({ path, name, destination: "aliyun-fc", production: true, onTrain: true });
63619
+ const owner = lambdaFunctionOwner(path);
63620
+ byOwner.set(owner, [...byOwner.get(owner) ?? [], path]);
63621
+ }
63622
+ const refined = partial.targets.map((target) => {
63623
+ const paths = byOwner.get(target.path);
63624
+ return paths === undefined ? target : { ...target, dependsOn: [...new Set([...target.dependsOn ?? [], ...paths])] };
63625
+ });
63626
+ return {
63627
+ targets: [...refined, ...targets],
63628
+ ...scan.warnings.length === 0 ? {} : { warnings: [...partial.warnings ?? [], ...scan.warnings] }
63629
+ };
63630
+ }
63631
+ };
63632
+ }
63633
+ var lambdaFunction = lambdaFunctionProvider();
63194
63634
  // ../../packages/praxis/deploy-core/src/package-manifest.ts
63195
63635
  function packageManifestOf(text) {
63196
63636
  const parsed = text === null ? null : parseJsonc2(text);
@@ -63525,7 +63965,11 @@ function workspaceCloudflareProvider(options = {}) {
63525
63965
  };
63526
63966
  }
63527
63967
  var workspaceCloudflare = workspaceCloudflareProvider();
63528
- var BUILTIN_PROVIDERS = [workspaceCloudflare, workspaceNpmProvider()];
63968
+ var BUILTIN_PROVIDERS = [
63969
+ workspaceCloudflare,
63970
+ workspaceNpmProvider(),
63971
+ lambdaFunctionProvider()
63972
+ ];
63529
63973
  function directoriesOfPackageNames(workspaces) {
63530
63974
  const byName = new Map;
63531
63975
  for (const workspace of workspaces)
@@ -63552,15 +63996,23 @@ function workspaceClosureOf(target, byName, dependenciesOf) {
63552
63996
  // ../../packages/praxis/deploy-core/src/plan.ts
63553
63997
  async function planRepository(facts, providers = BUILTIN_PROVIDERS, options = {}) {
63554
63998
  let partial = { targets: [] };
63999
+ const warnings = [];
63555
64000
  for (const provider of providers) {
63556
64001
  const confidence = await provider.detect(facts);
63557
64002
  if (confidence === "none")
63558
64003
  continue;
63559
64004
  partial = await provider.plan(facts, partial);
64005
+ for (const warning of partial.warnings ?? [])
64006
+ if (!warnings.includes(warning))
64007
+ warnings.push(warning);
63560
64008
  }
63561
64009
  const drafts = partial.targets.filter((draft) => draft.deploy !== false);
63562
64010
  const workspaces = await readWorkspaces(facts, options);
63563
- return { commit: facts.commit, targets: closePlan(drafts, workspaces) };
64011
+ return {
64012
+ commit: facts.commit,
64013
+ targets: closePlan(drafts, workspaces),
64014
+ ...warnings.length === 0 ? {} : { warnings }
64015
+ };
63564
64016
  }
63565
64017
  function closePlan(drafts, workspaces) {
63566
64018
  const configOf = new Map(workspaces.map((workspace) => [workspace.dir, workspace.config]));
@@ -63582,7 +64034,7 @@ function closePlan(drafts, workspaces) {
63582
64034
  path: draft.path,
63583
64035
  name: draft.name,
63584
64036
  destination: draft.destination,
63585
- dependsOn: edges.get(draft.path) ?? [],
64037
+ dependsOn: [...new Set([...edges.get(draft.path) ?? [], ...draft.dependsOn ?? []])],
63586
64038
  ...draft.environments === undefined ? {} : { environments: draft.environments },
63587
64039
  production: draft.production === true,
63588
64040
  onTrain: draft.onTrain !== false,
@@ -65578,6 +66030,30 @@ function bunTestRun(packagePath, code, output) {
65578
66030
  }
65579
66031
 
65580
66032
  // src/commands/devops-test.ts
66033
+ import { spawn as spawn4 } from "node:child_process";
66034
+ var CACHE_OFF_REEXEC_ENV = "PRAXIS_DEVOPS_TEST_CACHE_OFF";
66035
+ function needsCacheOffReexec(env) {
66036
+ return env.BUN_RUNTIME_TRANSPILER_CACHE_PATH !== "0" && !env[CACHE_OFF_REEXEC_ENV];
66037
+ }
66038
+ function isDevopsTestRun(words) {
66039
+ return words.join(" ") === "devops test";
66040
+ }
66041
+ function spawnInherit(cmd, args, options) {
66042
+ return new Promise((resolveCode) => {
66043
+ const child = spawn4(cmd, [...args], { cwd: options.cwd, env: options.env, stdio: "inherit" });
66044
+ child.once("error", (error) => {
66045
+ console.error(error instanceof Error ? error.message : String(error));
66046
+ resolveCode(1);
66047
+ });
66048
+ child.once("close", (code) => resolveCode(code ?? 1));
66049
+ });
66050
+ }
66051
+ function reexecWithCacheOff(options = {}) {
66052
+ return (options.spawn ?? spawnInherit)(process.execPath, options.argv ?? process.argv.slice(1), {
66053
+ cwd: options.cwd ?? process.cwd(),
66054
+ env: { ...options.env ?? process.env, BUN_RUNTIME_TRANSPILER_CACHE_PATH: "0", [CACHE_OFF_REEXEC_ENV]: "1" }
66055
+ });
66056
+ }
65581
66057
  async function devopsTest(flags, paths, ports) {
65582
66058
  const plan = planTest(flags, paths);
65583
66059
  if (plan.mode.kind === "affected")
@@ -65848,8 +66324,8 @@ async function localEngine(cwd) {
65848
66324
  })
65849
66325
  };
65850
66326
  }
65851
- async function localCheckout(cwd, spawn4) {
65852
- const git2 = (args) => spawn4("git", [...args], { cwd });
66327
+ async function localCheckout(cwd, spawn5) {
66328
+ const git2 = (args) => spawn5("git", [...args], { cwd });
65853
66329
  const required = async (args) => {
65854
66330
  const result = await git2(args);
65855
66331
  if (result.code !== 0)
@@ -65900,7 +66376,7 @@ async function localCheckout(cwd, spawn4) {
65900
66376
  await walk(packagePath);
65901
66377
  return files;
65902
66378
  },
65903
- runTests: (packagePath, files) => spawn4("nice", ["-n", "10", "bun", "test", ...files], { cwd: packagePath })
66379
+ runTests: (packagePath, files) => spawn5("nice", ["-n", "10", "bun", "test", ...files], { cwd: packagePath })
65904
66380
  };
65905
66381
  }
65906
66382
  async function withEngineStdoutOnStderr(body) {
@@ -68858,6 +69334,7 @@ var FILE_ID = /^file-/;
68858
69334
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : undefined;
68859
69335
  var isImage = (node2) => node2.type === "image" && typeof node2.url === "string";
68860
69336
  var isRef = (node2) => node2.type === "ref" && typeof node2.ref === "string";
69337
+ var NODE_TYPES = new Set(Object.keys(KNOWN_PROPS));
68861
69338
  function visit2(value, nodeId, fn) {
68862
69339
  if (Array.isArray(value)) {
68863
69340
  for (const item of value)
@@ -69051,6 +69528,8 @@ var warningLine = (warning) => {
69051
69528
  return `${warning.code}: ${warning.ref} at ${warning.nodeId}`;
69052
69529
  case "FRAME_NOT_FOUND":
69053
69530
  return `${warning.code}: ${warning.id}`;
69531
+ case "IMAGE_FILE_NOT_FOUND":
69532
+ return `${warning.code}: ${warning.url} (the platform holds no such file) at ${warning.nodeId}`;
69054
69533
  default:
69055
69534
  return `${warning.code}: ${warning.url}`;
69056
69535
  }
@@ -69158,6 +69637,132 @@ async function canvasImport(args, ports) {
69158
69637
  return 0;
69159
69638
  }
69160
69639
 
69640
+ // src/commands/support-mcp.ts
69641
+ var SUPPORTED_PROTOCOLS = ["2025-11-25", "2025-06-18", "2025-03-26"];
69642
+ var SERVER_NAME = "praxis-support";
69643
+ var DEFAULT_AGENT = "R1M9TQ2X";
69644
+ var DEFAULT_POLL_SECONDS = 30;
69645
+ var MIN_POLL_SECONDS = 10;
69646
+ var MAX_BACKOFF_MS = 10 * 60000;
69647
+ var NOTICE_NAMED = 5;
69648
+ var ANNOUNCED_KEEP = 500;
69649
+ var INSTRUCTIONS = [
69650
+ "praxis-support tells you when letters arrive for your Praxis assume agent (the one praxis-assume drives). An assume agent is never woken for mail: letters wait until it next calls a tool, so without this an idle session never hears of them.",
69651
+ 'A notice arrives as <channel source="praxis-support" letter_ids="…" agent="…">: it names the new letters only; read and handle them with praxis_assume_inbox (action "read"), which is also what marks them read.',
69652
+ "Notices are pushed only when Claude Code was started with --dangerously-load-development-channels server:praxis-support (channels are a research preview); otherwise this server pushes nothing, and you should check the inbox when you resume work."
69653
+ ].join(" ");
69654
+ function negotiateProtocol(requested) {
69655
+ return typeof requested === "string" && SUPPORTED_PROTOCOLS.includes(requested) ? requested : SUPPORTED_PROTOCOLS[0];
69656
+ }
69657
+ function react(message, version) {
69658
+ if (typeof message !== "object" || message === null || Array.isArray(message))
69659
+ return { reply: { jsonrpc: "2.0", id: null, error: { code: -32600, message: "Invalid Request" } } };
69660
+ const { id, method, params } = message;
69661
+ if (method === "notifications/initialized")
69662
+ return { initialized: true };
69663
+ if (id === undefined || id === null || typeof method !== "string")
69664
+ return {};
69665
+ const ok = (result) => ({ reply: { jsonrpc: "2.0", id, result } });
69666
+ if (method === "initialize") {
69667
+ return ok({
69668
+ protocolVersion: negotiateProtocol(params?.protocolVersion),
69669
+ capabilities: { experimental: { "claude/channel": {} } },
69670
+ serverInfo: { name: SERVER_NAME, version },
69671
+ instructions: INSTRUCTIONS
69672
+ });
69673
+ }
69674
+ if (method === "ping")
69675
+ return ok({});
69676
+ if (method === "tools/list")
69677
+ return ok({ tools: [] });
69678
+ return { reply: { jsonrpc: "2.0", id, error: { code: -32601, message: `Method not found: ${method}` } } };
69679
+ }
69680
+ function assumeAgentOf(env) {
69681
+ return env.PRAXIS_ASSUME_AGENT?.trim() || DEFAULT_AGENT;
69682
+ }
69683
+ function pollIntervalMs(raw) {
69684
+ const seconds = raw === undefined || raw.trim() === "" ? DEFAULT_POLL_SECONDS : Number(raw);
69685
+ if (!Number.isFinite(seconds))
69686
+ return DEFAULT_POLL_SECONDS * 1000;
69687
+ return Math.max(MIN_POLL_SECONDS, seconds) * 1000;
69688
+ }
69689
+ function backoffMs(intervalMs, failures) {
69690
+ if (failures <= 0)
69691
+ return intervalMs;
69692
+ return Math.min(MAX_BACKOFF_MS, intervalMs * 2 ** Math.min(failures, 16));
69693
+ }
69694
+ function planNotice(page, announced, agent) {
69695
+ const seen = new Set(announced);
69696
+ const fresh = page.letters.filter((letter) => !seen.has(letter.id));
69697
+ if (!fresh.length)
69698
+ return { announced };
69699
+ const named = fresh.slice(0, NOTICE_NAMED).map((letter) => `${letter.sender_name || letter.sender}:${letter.summary}`);
69700
+ const more = fresh.length > NOTICE_NAMED ? `;另有 ${fresh.length - NOTICE_NAMED} 封` : "";
69701
+ const content = `你有 ${fresh.length} 封新信:${named.join(";")}${more}。用 praxis_assume_inbox(action "read")读取并处理。`;
69702
+ const next = [...announced, ...fresh.map((letter) => letter.id)];
69703
+ return {
69704
+ notice: { content, meta: { letter_ids: fresh.map((letter) => letter.id).join(","), agent } },
69705
+ announced: next.length > ANNOUNCED_KEEP ? next.slice(next.length - ANNOUNCED_KEEP) : next
69706
+ };
69707
+ }
69708
+ function lettersOf(body) {
69709
+ const value = body;
69710
+ if (!value || typeof value.unread !== "number" || !Array.isArray(value.letters))
69711
+ throw new Error("letters answer is not { unread, letters }");
69712
+ const letters = value.letters.filter((letter) => typeof letter === "object" && letter !== null && typeof letter.id === "string" && typeof letter.summary === "string");
69713
+ return { unread: value.unread, letters };
69714
+ }
69715
+ async function runSupportMcp(ports) {
69716
+ const agent = assumeAgentOf(ports.env);
69717
+ const interval = pollIntervalMs(ports.env.PRAXIS_SUPPORT_POLL_SECONDS);
69718
+ const stop = new AbortController;
69719
+ let polling;
69720
+ const send = (message) => ports.write(JSON.stringify(message));
69721
+ const poll = async () => {
69722
+ let announced = [];
69723
+ let failures = 0;
69724
+ ports.log(`praxis-support: watching letters for assume agent ${agent} every ${interval / 1000}s`);
69725
+ while (!stop.signal.aborted) {
69726
+ try {
69727
+ const planned = planNotice(await ports.fetchLetters(), announced, agent);
69728
+ announced = planned.announced;
69729
+ if (planned.notice)
69730
+ send({ jsonrpc: "2.0", method: "notifications/claude/channel", params: planned.notice });
69731
+ if (failures)
69732
+ ports.log("praxis-support: letters readable again");
69733
+ failures = 0;
69734
+ } catch (error) {
69735
+ failures += 1;
69736
+ ports.log(`praxis-support: reading letters failed (${failures} in a row, next try in ${backoffMs(interval, failures) / 1000}s): ${error instanceof Error ? error.message : String(error)}`);
69737
+ }
69738
+ await ports.sleep(backoffMs(interval, failures), stop.signal);
69739
+ }
69740
+ };
69741
+ try {
69742
+ for await (const line of ports.lines) {
69743
+ if (!line.trim())
69744
+ continue;
69745
+ let message;
69746
+ try {
69747
+ message = JSON.parse(line);
69748
+ } catch {
69749
+ send({ jsonrpc: "2.0", id: null, error: { code: -32700, message: "Parse error" } });
69750
+ continue;
69751
+ }
69752
+ const reaction = react(message, ports.version);
69753
+ if (reaction.reply)
69754
+ send(reaction.reply);
69755
+ if (reaction.initialized && !polling)
69756
+ polling = poll();
69757
+ }
69758
+ } catch (error) {
69759
+ ports.log(`praxis-support: stdin failed: ${error instanceof Error ? error.message : String(error)}`);
69760
+ } finally {
69761
+ stop.abort();
69762
+ await polling;
69763
+ }
69764
+ }
69765
+
69161
69766
  // src/main.ts
69162
69767
  import { spawnSync } from "node:child_process";
69163
69768
 
@@ -69794,7 +70399,7 @@ function startProgress(ctx, write = (text2) => writeOutput({ stderr: text2 })) {
69794
70399
  }
69795
70400
 
69796
70401
  // src/main.ts
69797
- var version = "0.3.0-dev.3aab976";
70402
+ var version = "0.3.0-dev.3b48b63";
69798
70403
  var commands = commandTree(operations);
69799
70404
  var manual = [...workflows.map((w) => w.words), [API_WORD]];
69800
70405
  function route(argv) {
@@ -69876,7 +70481,7 @@ var defaults = {
69876
70481
  return;
69877
70482
  const cmd = process.platform === "darwin" ? ["open", url] : process.platform === "win32" ? ["rundll32", "url.dll,FileProtocolHandler", url] : ["xdg-open", url];
69878
70483
  await new Promise((resolve12, reject) => {
69879
- const child = spawn4(cmd[0], cmd.slice(1), { stdio: "ignore" });
70484
+ const child = spawn5(cmd[0], cmd.slice(1), { stdio: "ignore" });
69880
70485
  child.once("error", reject);
69881
70486
  child.once("close", () => resolve12());
69882
70487
  });
@@ -69885,12 +70490,12 @@ var defaults = {
69885
70490
  wait: (ms) => new Promise((resolve12) => setTimeout(resolve12, ms)),
69886
70491
  render,
69887
70492
  spawn: (cmd, args, options) => new Promise((resolve12, reject) => {
69888
- const child = spawn4(cmd, args, { cwd: options.cwd, stdio: ["ignore", 2, 2] });
70493
+ const child = spawn5(cmd, args, { cwd: options.cwd, stdio: ["ignore", 2, 2] });
69889
70494
  child.once("error", reject);
69890
70495
  child.once("close", (code) => resolve12(code ?? 1));
69891
70496
  }),
69892
70497
  spawnCapture: (cmd, args, options) => new Promise((resolve12, reject) => {
69893
- const child = spawn4(cmd, args, { cwd: options.cwd, stdio: ["ignore", "pipe", "pipe"] });
70498
+ const child = spawn5(cmd, args, { cwd: options.cwd, stdio: ["ignore", "pipe", "pipe"] });
69894
70499
  const chunks = [];
69895
70500
  child.stdout.on("data", (c) => chunks.push(c));
69896
70501
  child.stderr.on("data", (c) => chunks.push(c));
@@ -70040,7 +70645,7 @@ function toolPortsFor(ports, context, emit) {
70040
70645
  },
70041
70646
  git: (args, cwd) => ports.spawnCapture("git", args, { cwd }),
70042
70647
  run: (cmd, args, cwd) => new Promise((resolve12, reject) => {
70043
- const child = spawn4(cmd, args, { cwd, stdio: "inherit" });
70648
+ const child = spawn5(cmd, args, { cwd, stdio: "inherit" });
70044
70649
  child.once("error", reject);
70045
70650
  child.once("close", (code) => resolve12(code ?? 1));
70046
70651
  }),
@@ -70536,6 +71141,43 @@ Examples:
70536
71141
  cwd: ports.cwd
70537
71142
  });
70538
71143
  }
71144
+ case "agent support-mcp": {
71145
+ const agent = assumeAgentOf(ports.env);
71146
+ const fetchLetters = async () => {
71147
+ const credential = await auth.get(org);
71148
+ const response = await wireFetch(`${config.apiUrl}/agent/v1/agents/${encodeURIComponent(agent)}/letters?unread=true&limit=20`, {
71149
+ headers: { Authorization: `Bearer ${credential.token}`, ...credential.source === "api-key" ? { "X-API-Key": credential.token } : {} },
71150
+ signal: AbortSignal.timeout(30000),
71151
+ redirect: "error"
71152
+ });
71153
+ const body = await response.json().catch(() => null);
71154
+ if (!response.ok)
71155
+ throw new Error(`HTTP ${response.status}${body?.error?.code ? ` ${body.error.code}` : ""}${body?.error?.message ? `: ${String(redact(body.error.message, secrets))}` : ""}`);
71156
+ return lettersOf(body);
71157
+ };
71158
+ await runSupportMcp({
71159
+ lines: createInterface({ input: process.stdin, crlfDelay: Infinity, terminal: false }),
71160
+ write: (line) => {
71161
+ process.stdout.write(line + `
71162
+ `);
71163
+ },
71164
+ log: (line) => {
71165
+ process.stderr.write(String(redact(line, secrets)) + `
71166
+ `);
71167
+ },
71168
+ fetchLetters,
71169
+ env: ports.env,
71170
+ version,
71171
+ sleep: (ms, signal) => new Promise((resolve12) => {
71172
+ const timer = setTimeout(resolve12, ms);
71173
+ signal.addEventListener("abort", () => {
71174
+ clearTimeout(timer);
71175
+ resolve12();
71176
+ }, { once: true });
71177
+ })
71178
+ });
71179
+ return 0;
71180
+ }
70539
71181
  case "canvas import": {
70540
71182
  const authorize = async () => {
70541
71183
  const credential = await auth.get(org);
@@ -70625,7 +71267,8 @@ if (true) {
70625
71267
  process.exit(0);
70626
71268
  throw error;
70627
71269
  });
70628
- process.exitCode = await main3(process.argv.slice(2));
71270
+ const argv = process.argv.slice(2);
71271
+ process.exitCode = isDevopsTestRun(route(argv).words) && needsCacheOffReexec(process.env) ? await reexecWithCacheOff() : await main3(argv);
70629
71272
  }
70630
71273
  export {
70631
71274
  main3 as main
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepraxis/cli",
3
- "version": "0.3.0-dev.3aab976",
3
+ "version": "0.3.0-dev.3b48b63",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "praxis": "dist/praxis.js"