@anna-ai/cli 0.1.37 → 0.1.39

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.
@@ -10,10 +10,10 @@ import "./executas-CvQY_w2U.js";
10
10
  import "./executa-publish-DueD_0hh.js";
11
11
  import "./binary-upload-CKMU5Rfw.js";
12
12
  import { uploadExecutaBinaries } from "./executa-upload-binaries-DURJTXRI.js";
13
- import "./dev-DBk4WVRp.js";
14
- import "./executa-install-C_n6Kd04.js";
13
+ import "./dev-CXCK6G1l.js";
14
+ import "./executa-install-aCwM1hO0.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { resolveAppBySlugOrCache } from "./working-orchestration-BR6kmngc.js";
16
+ import { resolveAppBySlugOrCache } from "./working-orchestration-CQJEJkV_.js";
17
17
  import { resolve } from "node:path";
18
18
  import { existsSync } from "node:fs";
19
19
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
@@ -10,10 +10,10 @@ import "./executas-CvQY_w2U.js";
10
10
  import "./executa-publish-DueD_0hh.js";
11
11
  import "./binary-upload-CKMU5Rfw.js";
12
12
  import "./executa-upload-binaries-DURJTXRI.js";
13
- import "./dev-DBk4WVRp.js";
14
- import "./executa-install-C_n6Kd04.js";
13
+ import "./dev-CXCK6G1l.js";
14
+ import "./executa-install-aCwM1hO0.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { resolveAppBySlugOrCache } from "./working-orchestration-BR6kmngc.js";
16
+ import { resolveAppBySlugOrCache } from "./working-orchestration-CQJEJkV_.js";
17
17
  import { dim, green, yellow } from "kleur/colors";
18
18
 
19
19
  //#region src/commands/apps-discard.ts
@@ -10,10 +10,10 @@ import "./executas-CvQY_w2U.js";
10
10
  import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-DueD_0hh.js";
11
11
  import "./binary-upload-CKMU5Rfw.js";
12
12
  import "./executa-upload-binaries-DURJTXRI.js";
13
- import "./dev-DBk4WVRp.js";
14
- import "./executa-install-C_n6Kd04.js";
13
+ import "./dev-CXCK6G1l.js";
14
+ import "./executa-install-aCwM1hO0.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-BR6kmngc.js";
16
+ import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-CQJEJkV_.js";
17
17
  import { syncAppListingMeta } from "./listing-meta-CtVtyaWu.js";
18
18
  import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-B6TJeyOq.js";
19
19
  import { resolve } from "node:path";
@@ -0,0 +1,3 @@
1
+ import { BridgeRequestError, PINNED_RUNTIME_VERSION, PythonBridge } from "./bridge-BTMm5SiP.js";
2
+
3
+ export { PINNED_RUNTIME_VERSION, PythonBridge };
@@ -9,7 +9,7 @@ import { createInterface } from "node:readline";
9
9
  * `uvx <pkg>@<version>` so end users always run the dispatcher version
10
10
  * the CLI was tested against.
11
11
  */
12
- const PINNED_RUNTIME_VERSION = "0.2.0a14";
12
+ const PINNED_RUNTIME_VERSION = "0.2.0a16";
13
13
  /**
14
14
  * Throwable from a {@link RequestHandler} to send a structured JSON-RPC
15
15
  * error back to the python bridge with a stable string ``code`` (e.g.
package/dist/cli.js CHANGED
@@ -474,7 +474,7 @@ program.command("validate").description("Run schema + ACL checks on a manifest+b
474
474
  process.exit(code);
475
475
  });
476
476
  program.command("dev").description("Run a local harness (in-process dispatcher + iframe + SSE relay)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bundle <dir>", "bundle directory (default: ./bundle)").option("--slug <slug>", "App slug (overrides manifest.slug/name)").option("--view <name>", "View name to open (default: manifest default)").option("--matrix-nexus-root <path>", "matrix-nexus checkout (auto-detected if omitted; can also use $ANNA_NEXUS_ROOT)").option("--port <number>", "HTTP port", "5180").option("--user-id <id>", "Harness user_id", "1").option("--cwd <dir>", "Project root (default: cwd)").option("--no-watch", "Disable bundle file watcher (default: enabled)").option("--executa <spec>", "Explicit executa registration; repeatable. Spec: comma-separated key=value (dir=<path>[,tool_id=<id>][,type=python|node|go|binary][,command=\"<argv>\"]). When only `dir=` is given, the executa is auto-detected from executa.json / pyproject.toml / package.json / go.mod. Overrides directory auto-discovery under <manifest-dir>/executas/.", (val, prev) => prev ? [...prev, val] : [val]).option("--no-llm", "Disable LLM bridge (anna.llm/agent return llm_disabled)").option("--mock-llm <fixture>", "Serve canned LLM responses from a JSONL fixture").option("--llm-account <host>", "Saved account host to use (default: current)").option("--llm-app-slug <slug>", "Override the manifest slug used to register / look up the dev AnnaApp (default: manifest.slug)").option("--storage <mode>", "Storage backend: \"legacy\" (in-memory runtime_state, default) or \"aps\" (real nexus APS via /api/v1/storage/* — requires `anna-app login`).", "legacy").action(async (opts) => {
477
- const { runDev, parseExecutaSpec } = await import("./dev-CgOVdKgK.js");
477
+ const { runDev, parseExecutaSpec } = await import("./dev-NBsx_AGR.js");
478
478
  const cwd = opts.cwd ?? process.cwd();
479
479
  let executas;
480
480
  if (opts.executa && opts.executa.length > 0) {
@@ -533,7 +533,7 @@ fixture.command("replay <file>").description("Dry-run replay of a harness record
533
533
  process.exit(code);
534
534
  });
535
535
  program.command("doctor").description("Check environment for `anna-app dev` (uv, matrix-nexus, dev key)").option("--matrix-nexus-root <path>", "matrix-nexus checkout (optional)").action(async (opts) => {
536
- const { runDoctor } = await import("./doctor-jwjNoAwf.js");
536
+ const { runDoctor } = await import("./doctor-BAyE1WAT.js");
537
537
  const code = await runDoctor({ matrixNexusRoot: opts.matrixNexusRoot });
538
538
  process.exit(code);
539
539
  });
@@ -596,7 +596,7 @@ executa.command("register").description("Register a HARNESS AnnaApp(kind=executa
596
596
  process.exit(code);
597
597
  });
598
598
  executa.command("install").description("Install a local-dev shim for an Executa under its minted tool_id so the Agent can discover it via 'Rediscover Local' (for distribution_type: local). Resolves the tool_id from .anna/executa.json (written by `executa publish` / `apps push`) unless --tool-id is given.").option("--dir <path>", "Executa project dir (default: CWD)").option("--tool-id <id>", "Install the shim under this exact id (default: minted id from .anna/executa.json, else executa.json tool_id)").option("--bin-dir <path>", "Install dir for the shim (default: ~/.anna/executa/bin)").option("--force", "Overwrite an existing shim of the same name", false).option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
599
- const { runExecutaInstall } = await import("./executa-install-CgB-pvR9.js");
599
+ const { runExecutaInstall } = await import("./executa-install-RBG-DOAY.js");
600
600
  const code = await runExecutaInstall({
601
601
  dir: opts.dir,
602
602
  toolId: opts.toolId,
@@ -607,7 +607,7 @@ executa.command("install").description("Install a local-dev shim for an Executa
607
607
  process.exit(code);
608
608
  });
609
609
  executa.command("dev").description("Run one Executa plugin in isolation (REPL or one-shot describe/invoke)").option("--dir <path>", "Executa project dir (default: CWD)").option("--spec <spec>", "Override discovery: comma-separated key=value (tool_id=...,type=...,command=\"...\")").option("--describe", "Print MANIFEST and exit", false).option("--health", "Print health and exit", false).option("--invoke <tool>", "Invoke one tool and exit").option("--args <json>", "JSON object passed as tool arguments", "{}").option("--json", "One-shot: emit compact JSON (no banners)", false).option("--no-sampling", "Hard-disable sampling reverse RPC (returns sampling_disabled)").option("--mock-sampling <fixture>", "Serve canned sampling responses from a JSONL fixture (offline)").option("--sampling-unsupported-format", "Simulate a model without json_schema support — exercises responseFormat onUnsupported branches (-32010 / downgrade)").option("--app-slug <slug>", "Forward sampling to nexus on behalf of this dev AnnaApp slug").option("--sampling-account <host>", "Saved account host for nexus sampling (default: current)").option("--no-agent", "Hard-disable agent reverse RPC (returns agent_not_granted)").option("--mock-agent <fixture>", "Serve canned agent/* responses from a JSONL fixture (offline)").option("--agent-account <host>", "Saved account host for nexus agent (default: --sampling-account or current)").option("--storage <mode>", "Storage backend: off | memory | mock | real (default: memory)").option("--mock-storage <fixture>", "Serve canned storage/* + files/* responses from a JSONL fixture").option("--storage-account <host>", "Saved account host for nexus storage (default: --sampling-account or current)").option("--storage-scopes <list>", "Comma-separated scopes for real storage tokens (default: user,app,tool)").option("--no-image", "Hard-disable image reverse RPC (returns image_not_granted)").option("--mock-image <fixture>", "Serve canned image/generate + image/edit responses from a JSONL fixture").option("--image-account <host>", "Saved account host for nexus image (default: --sampling-account or current)").option("--no-upload", "Hard-disable host/uploadFile reverse RPC (returns upload_not_granted)").option("--mock-upload <fixture>", "Serve canned host/uploadFile responses from a JSONL fixture").option("--upload-account <host>", "Saved account host for nexus uploads (default: --sampling-account or current)").action(async (opts) => {
610
- const { runExecutaDev } = await import("./executa-dev-BOYF0I4H.js");
610
+ const { runExecutaDev } = await import("./executa-dev-bx27DUJ7.js");
611
611
  const storageMode = opts.storage === void 0 ? void 0 : (() => {
612
612
  const m = opts.storage;
613
613
  if (m === "off" || m === "memory" || m === "mock" || m === "real") return m;
@@ -704,7 +704,7 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
704
704
  process.exit(2);
705
705
  }
706
706
  }
707
- const { runAppsPush } = await import("./apps-push-CFDmMwaR.js");
707
+ const { runAppsPush } = await import("./apps-push-DhUwaJrr.js");
708
708
  process.exit(await runAppsPush({
709
709
  cwd: opts.cwd,
710
710
  manifest: opts.manifest,
@@ -724,7 +724,7 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
724
724
  }));
725
725
  });
726
726
  apps.command("cut <version>").description("Snapshot the working draft into an immutable version (freeze deps)").option("--changelog <text>", "Override the working draft changelog for this version").option("--slug <slug>", "App slug (default: resolve from .anna/app.json cache)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--dry-run", "Resolve target but don't cut", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (version, opts) => {
727
- const { runAppsCut } = await import("./apps-cut-Cc0XCFm3.js");
727
+ const { runAppsCut } = await import("./apps-cut-PyNqcXFx.js");
728
728
  process.exit(await runAppsCut({
729
729
  version,
730
730
  changelog: opts.changelog,
@@ -736,7 +736,7 @@ apps.command("cut <version>").description("Snapshot the working draft into an im
736
736
  }));
737
737
  });
738
738
  apps.command("discard").description("Drop the mutable working draft (leaves cut versions intact)").option("--slug <slug>", "App slug (default: resolve from .anna/app.json cache)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--dry-run", "Resolve target but don't discard", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
739
- const { runAppsDiscard } = await import("./apps-discard-CUmXXvm1.js");
739
+ const { runAppsDiscard } = await import("./apps-discard-CTheELlR.js");
740
740
  process.exit(await runAppsDiscard({
741
741
  slug: opts.slug,
742
742
  cwd: opts.cwd,
@@ -181,7 +181,7 @@
181
181
  <span id="iframe-src">awaiting session…</span>
182
182
  <span class="size" id="size"></span>
183
183
  </div>
184
- <iframe id="app" sandbox="allow-scripts allow-same-origin allow-forms allow-popups"></iframe>
184
+ <iframe id="app" sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-downloads"></iframe>
185
185
  </div>
186
186
  </main>
187
187
  <aside>
@@ -382,15 +382,36 @@
382
382
  });
383
383
  const body = await res.json();
384
384
  if (body.ok) {
385
+ let result = body.result;
386
+ // files.download — mirror production anna-app-host-bridge.js:
387
+ // consume the presigned URL at TOP LEVEL (the sandboxed iframe
388
+ // can't reliably save files), then strip it before relaying the
389
+ // result into the iframe so the bearer URL never enters app DOM.
390
+ if (ns === "files" && method === "download" && result && result.get_url) {
391
+ const a = document.createElement("a");
392
+ a.href = result.get_url;
393
+ a.rel = "noopener";
394
+ if (result.filename) a.download = result.filename;
395
+ a.style.display = "none";
396
+ document.body.appendChild(a);
397
+ a.click();
398
+ a.remove();
399
+ const { get_url, ...rest } = result;
400
+ result = { ...rest, ok: true };
401
+ logLine(
402
+ "meta-line",
403
+ `⬇ files.download → browser save (${escapeHtml(String(result.filename ?? "file"))})`,
404
+ );
405
+ }
385
406
  iframe.contentWindow.postMessage(
386
- { wid: windowUuid, kind: "res", id, result: body.result },
407
+ { wid: windowUuid, kind: "res", id, result },
387
408
  "*",
388
409
  );
389
410
  logLine(
390
411
  "res-ok",
391
- `← res ok <span class="pill">${escapeHtml(ns)}.${escapeHtml(method)}</span> ${escapeHtml(JSON.stringify(body.result))}`,
412
+ `← res ok <span class="pill">${escapeHtml(ns)}.${escapeHtml(method)}</span> ${escapeHtml(JSON.stringify(result))}`,
392
413
  );
393
- recPush("res", { id, ok: true, result: body.result });
414
+ recPush("res", { id, ok: true, result });
394
415
  } else {
395
416
  iframe.contentWindow.postMessage(
396
417
  { wid: windowUuid, kind: "res", id, error: body.error },
@@ -49,8 +49,8 @@ async function runDev(opts) {
49
49
  }
50
50
  process.env.ANNA_APP_RUNTIME_STORAGE_MODE = "aps";
51
51
  }
52
- const { PythonBridge, PINNED_RUNTIME_VERSION } = await import("./bridge-D_J1ql-k.js");
53
- const { HarnessServer } = await import("./server-Cg13x19g.js");
52
+ const { PythonBridge, PINNED_RUNTIME_VERSION } = await import("./bridge-5PPeIq2g.js");
53
+ const { HarnessServer } = await import("./server-B2N6MuQJ.js");
54
54
  const bridge = new PythonBridge({
55
55
  mode,
56
56
  matrixNexusRoot: matrixNexusRoot ?? void 0,
@@ -0,0 +1,4 @@
1
+ import "./nexus-root-BlPwOusj.js";
2
+ import { parseExecutaSpec, runDev } from "./dev-CXCK6G1l.js";
3
+
4
+ export { parseExecutaSpec, runDev };
@@ -1,5 +1,5 @@
1
1
  import { findMatrixNexusRoot, nexusSchemaDir } from "./nexus-root-BlPwOusj.js";
2
- import { PINNED_RUNTIME_VERSION } from "./bridge-C_Vpmwag.js";
2
+ import { PINNED_RUNTIME_VERSION } from "./bridge-BTMm5SiP.js";
3
3
  import { resolve } from "node:path";
4
4
  import { existsSync, statSync } from "node:fs";
5
5
  import { spawnSync } from "node:child_process";
@@ -1,5 +1,5 @@
1
1
  import "./nexus-root-BlPwOusj.js";
2
- import { parseExecutaSpec } from "./dev-DBk4WVRp.js";
2
+ import { parseExecutaSpec } from "./dev-CXCK6G1l.js";
3
3
  import { isAbsolute, resolve } from "node:path";
4
4
  import { existsSync } from "node:fs";
5
5
  import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
@@ -98,7 +98,7 @@ async function runExecutaDev(opts) {
98
98
  account: opts.imageAccount ?? opts.samplingAccount,
99
99
  appSlug: effectiveAppSlug
100
100
  }) : new ImageBridge({ mode: "off" });
101
- const { HostUploadBridge } = await import("./host_upload-DrbQ-vk2.js");
101
+ const { HostUploadBridge } = await import("./host_upload-CW_2Fxg6.js");
102
102
  const hostUpload = opts.noUpload ? new HostUploadBridge({ mode: "off" }) : opts.mockUpload ? new HostUploadBridge({
103
103
  mode: "mock",
104
104
  mockFile: opts.mockUpload
@@ -0,0 +1,7 @@
1
+ import "./credentials-BTv2IfUZ.js";
2
+ import "./nexus-root-BlPwOusj.js";
3
+ import "./executa-cache-BFoUtb4J.js";
4
+ import "./dev-CXCK6G1l.js";
5
+ import { runExecutaInstall } from "./executa-install-aCwM1hO0.js";
6
+
7
+ export { runExecutaInstall };
@@ -1,5 +1,5 @@
1
1
  import { readExecutaIdentity } from "./executa-cache-BFoUtb4J.js";
2
- import { parseExecutaSpec } from "./dev-DBk4WVRp.js";
2
+ import { parseExecutaSpec } from "./dev-CXCK6G1l.js";
3
3
  import { isAbsolute, join, resolve } from "node:path";
4
4
  import { chmodSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
5
5
  import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
@@ -36,11 +36,15 @@ var HostUploadBridge = class {
36
36
  const mime = String(params.mime_type ?? "application/octet-stream");
37
37
  const url = `data:${mime};base64,${b64}`;
38
38
  const r2Key = `mock/${hashShort(filename + ":" + b64)}/${filename || "blob"}`;
39
+ const sizeBytes = Math.floor(b64.length * .75);
39
40
  return {
40
41
  download_url: url,
42
+ url,
41
43
  r2_key: r2Key,
42
- size_bytes: Math.floor(b64.length * .75),
43
- expires_at: new Date(Date.now() + 3600 * 1e3).toISOString()
44
+ size_bytes: sizeBytes,
45
+ bytes: sizeBytes,
46
+ expires_at: new Date(Date.now() + 3600 * 1e3).toISOString(),
47
+ expires_in: 3600
44
48
  };
45
49
  }
46
50
  if (mode === "negotiate") {
@@ -49,16 +53,21 @@ var HostUploadBridge = class {
49
53
  put_url: `https://mock.local/${key}?signature=mock`,
50
54
  headers: { "content-type": String(params.mime_type ?? "") },
51
55
  r2_key: key,
52
- expires_at: new Date(Date.now() + 600 * 1e3).toISOString()
56
+ expires_at: new Date(Date.now() + 600 * 1e3).toISOString(),
57
+ expires_in: 600
53
58
  };
54
59
  }
55
60
  if (mode === "confirm") {
56
61
  const key = String(params.r2_key ?? "");
62
+ const url = `https://mock.local/${key}`;
57
63
  return {
58
- download_url: `https://mock.local/${key}`,
64
+ download_url: url,
65
+ url,
59
66
  r2_key: key,
60
67
  size_bytes: 0,
61
- expires_at: new Date(Date.now() + 3600 * 1e3).toISOString()
68
+ bytes: 0,
69
+ expires_at: new Date(Date.now() + 3600 * 1e3).toISOString(),
70
+ expires_in: 3600
62
71
  };
63
72
  }
64
73
  throw withCode(new Error(`unknown upload mode: ${mode}`), -32203);
@@ -111,9 +120,24 @@ var HostUploadBridge = class {
111
120
  const text = await res.text().catch(() => "");
112
121
  throw withCode(new Error(`HTTP ${res.status}: ${text}`), httpToUploadCode(res.status));
113
122
  }
114
- return res.json();
123
+ return normalizeUploadResult(await res.json());
115
124
  }
116
125
  };
126
+ /**
127
+ * Backfill canonical field aliases on a `host/uploadFile` result.
128
+ * Older nexus builds emit `url` / `bytes` / `expires_in` while the SDK
129
+ * contract is `download_url` / `size_bytes` / `expires_at` (forum #168).
130
+ * Never overwrites existing fields.
131
+ */
132
+ function normalizeUploadResult(result) {
133
+ if (!result || typeof result !== "object") return result;
134
+ if (result.url != null && result.download_url == null) result.download_url = result.url;
135
+ else if (result.download_url != null && result.url == null) result.url = result.download_url;
136
+ if (result.bytes != null && result.size_bytes == null) result.size_bytes = result.bytes;
137
+ else if (result.size_bytes != null && result.bytes == null) result.bytes = result.size_bytes;
138
+ if (result.expires_in != null && result.expires_at == null) result.expires_at = new Date(Date.now() + Number(result.expires_in) * 1e3).toISOString();
139
+ return result;
140
+ }
117
141
  function withCode(err, code) {
118
142
  err.rpcCode = code;
119
143
  return err;
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost, getAccount } from "./credentials-BTv2IfUZ.js";
2
- import { BridgeRequestError } from "./bridge-C_Vpmwag.js";
2
+ import { BridgeRequestError } from "./bridge-BTMm5SiP.js";
3
3
  import { dirname, join, normalize, resolve } from "node:path";
4
4
  import { createRequire } from "node:module";
5
5
  import { createReadStream, existsSync, readFileSync, statSync, watch } from "node:fs";
@@ -78,6 +78,11 @@ const FILES_APP_ROUTES = {
78
78
  "/files/url",
79
79
  "query"
80
80
  ],
81
+ download: [
82
+ "GET",
83
+ "/files/url",
84
+ "query"
85
+ ],
81
86
  list: [
82
87
  "GET",
83
88
  "/files",
@@ -801,10 +806,21 @@ var LlmBridge = class {
801
806
  a.size_bytes = a.size;
802
807
  delete a.size;
803
808
  }
809
+ let downloadFilename;
810
+ if (args.method === "download") {
811
+ const rawName = typeof a.filename === "string" && a.filename ? a.filename : String(a.path ?? "").split("/").pop() || "download";
812
+ downloadFilename = rawName;
813
+ const asciiSafe = rawName.replace(/["\\\r\n]/g, "_");
814
+ a.disposition = `attachment; filename="${asciiSafe}"; filename*=UTF-8''${encodeURIComponent(rawName)}`;
815
+ if (a.ttl === void 0 && a.ttl_seconds !== void 0) a.ttl = a.ttl_seconds;
816
+ delete a.ttl_seconds;
817
+ delete a.filename;
818
+ }
804
819
  const base = `${canonicalHost(this.account().host)}/api/v1/storage`;
805
820
  const [httpMethod, subPath, payloadKind] = froute;
806
821
  const url = new URL(`${base}${subPath}`);
807
- url.searchParams.set("scope", "app");
822
+ const reqScope = typeof a.scope === "string" && VALID_STORAGE_SCOPES.has(a.scope) ? a.scope : "app";
823
+ url.searchParams.set("scope", reqScope);
808
824
  let jsonBody;
809
825
  if (payloadKind === "query") for (const [k, v] of Object.entries(a)) {
810
826
  if (k === "scope" || v === void 0 || v === null) continue;
@@ -834,9 +850,11 @@ var LlmBridge = class {
834
850
  ok: true,
835
851
  result: { deleted: true }
836
852
  };
853
+ const fresult = await res.json();
854
+ if (args.method === "download" && downloadFilename !== void 0) fresult.filename = fresult.filename ?? downloadFilename;
837
855
  return {
838
856
  ok: true,
839
- result: await res.json()
857
+ result: fresult
840
858
  };
841
859
  }
842
860
  }
@@ -4,7 +4,7 @@ import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-rSIkaA6-.js";
5
5
  import { loadExecutaManifest } from "./manifest-CAF3_r1T.js";
6
6
  import { runExecutaPublish } from "./executa-publish-DueD_0hh.js";
7
- import { runExecutaInstall } from "./executa-install-C_n6Kd04.js";
7
+ import { runExecutaInstall } from "./executa-install-aCwM1hO0.js";
8
8
  import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-Cr3tKbux.js";
9
9
  import { join, resolve } from "node:path";
10
10
  import { dim, green, yellow } from "kleur/colors";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anna-ai/cli",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "Anna App developer CLI: scaffold, validate, harness (Phase 2 MVP: init + validate).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,8 +33,8 @@
33
33
  "prepublishOnly": "pnpm lint && pnpm test && pnpm build && node scripts/check-runtime-pin.mjs && node scripts/check-sdk-pin.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "@anna-ai/app-runtime": "^0.12.0",
37
- "@anna-ai/app-schema": "^0.15.0",
36
+ "@anna-ai/app-runtime": "^0.13.0",
37
+ "@anna-ai/app-schema": "^0.17.0",
38
38
  "ajv": "^8.17.1",
39
39
  "ajv-formats": "^3.0.1",
40
40
  "commander": "^12.1.0",
@@ -1,3 +0,0 @@
1
- import { BridgeRequestError, PINNED_RUNTIME_VERSION, PythonBridge } from "./bridge-C_Vpmwag.js";
2
-
3
- export { PINNED_RUNTIME_VERSION, PythonBridge };
@@ -1,4 +0,0 @@
1
- import "./nexus-root-BlPwOusj.js";
2
- import { parseExecutaSpec, runDev } from "./dev-DBk4WVRp.js";
3
-
4
- export { parseExecutaSpec, runDev };
@@ -1,7 +0,0 @@
1
- import "./credentials-BTv2IfUZ.js";
2
- import "./nexus-root-BlPwOusj.js";
3
- import "./executa-cache-BFoUtb4J.js";
4
- import "./dev-DBk4WVRp.js";
5
- import { runExecutaInstall } from "./executa-install-C_n6Kd04.js";
6
-
7
- export { runExecutaInstall };