@anna-ai/cli 0.1.34 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{app-bundle-upload-CrBRnzf4.js → app-bundle-upload-DmVKWAj9.js} +1 -1
  2. package/dist/{apps-cut-C14A3V93.js → apps-cut-DU9B7ZV8.js} +6 -6
  3. package/dist/{apps-discard-B49iiOX6.js → apps-discard-BgI0e8FR.js} +6 -6
  4. package/dist/{apps-publish-qc_E4b_R.js → apps-publish--EmBa0zN.js} +5 -4
  5. package/dist/{apps-publish-B9CnifEx.js → apps-publish-B7reDBe1.js} +6 -6
  6. package/dist/{apps-push-DnINd0Cx.js → apps-push-BOGVEDQ3.js} +10 -8
  7. package/dist/{apps-release--7R2cmPg.js → apps-release-J-Sjkoym.js} +1 -1
  8. package/dist/{apps-rename-slug-CGykNHM5.js → apps-rename-slug-DYrk4Zpt.js} +1 -1
  9. package/dist/{apps-sync-meta-dy9j-5n8.js → apps-sync-meta-CL2PCMCv.js} +4 -2
  10. package/dist/{bridge-Dvck0e9c.js → bridge-D6c4Asou.js} +1 -1
  11. package/dist/bridge-DlrXzdZQ.js +3 -0
  12. package/dist/cli.js +24 -17
  13. package/dist/{dev-GUFWek03.js → dev-CNFzSiD9.js} +2 -2
  14. package/dist/dev-D4KOnT0B.js +4 -0
  15. package/dist/{doctor-C3Nx8E2L.js → doctor-DtQQOPdR.js} +1 -1
  16. package/dist/{executa-dev-CAw5X64R.js → executa-dev-BWApRNpg.js} +1 -1
  17. package/dist/{executa-install-Dz7hBUsn.js → executa-install-4hdrbusW.js} +1 -1
  18. package/dist/executa-install-hO5EVXL9.js +7 -0
  19. package/dist/{executa-publish-DHICU6S0.js → executa-publish-B_7k1gOf.js} +3 -3
  20. package/dist/{executa-publish-CGz5wM1Q.js → executa-publish-kh4Ucd3o.js} +3 -3
  21. package/dist/{executa-upload-binaries-Do5Sq64E.js → executa-upload-binaries-DURJTXRI.js} +1 -1
  22. package/dist/{executa-upload-binaries-CYMtWJU7.js → executa-upload-binaries-DrwpzQp3.js} +2 -2
  23. package/dist/{listing-meta-C0HsNjIB.js → listing-meta-CtVtyaWu.js} +13 -4
  24. package/dist/{manifest-DlIcwLQs.js → manifest-CAF3_r1T.js} +32 -10
  25. package/dist/{publish-DW_D3uQ4.js → publish-DwIJWl46.js} +6 -6
  26. package/dist/{server-BHWGGZsf.js → server-CB-oHVfr.js} +1 -1
  27. package/dist/test/index.d.ts +2 -0
  28. package/dist/test/index.js +7 -2
  29. package/dist/{working-orchestration-B8KdAh5S.js → working-orchestration-B_4WOk3X.js} +5 -4
  30. package/package.json +3 -3
  31. package/dist/bridge-CzeSuRRL.js +0 -3
  32. package/dist/dev-CZLOk2qE.js +0 -4
  33. package/dist/executa-install-nOFLBwxv.js +0 -7
@@ -1,6 +1,6 @@
1
1
  import { finalizeBundle, finalizeWorkingBundle, getBundle, initBundle, initWorkingBundle, uploadBundleFile, uploadWorkingBundleFile } from "./apps-DlVsVHQ5.js";
2
2
  import { CliError } from "./client-D-_z1ALk.js";
3
- import { canonicalize } from "./executa-publish-CGz5wM1Q.js";
3
+ import { canonicalize } from "./executa-publish-kh4Ucd3o.js";
4
4
  import { join, relative, sep } from "node:path";
5
5
  import { readFileSync, readdirSync, statSync } from "node:fs";
6
6
  import { createHash } from "node:crypto";
@@ -5,15 +5,15 @@ import { CliError } from "./client-D-_z1ALk.js";
5
5
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
6
6
  import { readExecutaIdentity } from "./executa-cache-BFoUtb4J.js";
7
7
  import { readExecutasLock, writeExecutasLock } from "./bundled-executas-rSIkaA6-.js";
8
- import { loadAppManifest, loadExecutaManifest } from "./manifest-DlIcwLQs.js";
8
+ import { loadAppManifest, loadExecutaManifest } from "./manifest-CAF3_r1T.js";
9
9
  import "./executas-CvQY_w2U.js";
10
- import "./executa-publish-CGz5wM1Q.js";
10
+ import "./executa-publish-kh4Ucd3o.js";
11
11
  import "./binary-upload-CKMU5Rfw.js";
12
- import { uploadExecutaBinaries } from "./executa-upload-binaries-Do5Sq64E.js";
13
- import "./dev-GUFWek03.js";
14
- import "./executa-install-Dz7hBUsn.js";
12
+ import { uploadExecutaBinaries } from "./executa-upload-binaries-DURJTXRI.js";
13
+ import "./dev-CNFzSiD9.js";
14
+ import "./executa-install-4hdrbusW.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { resolveAppBySlugOrCache } from "./working-orchestration-B8KdAh5S.js";
16
+ import { resolveAppBySlugOrCache } from "./working-orchestration-B_4WOk3X.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";
@@ -5,15 +5,15 @@ import "./client-D-_z1ALk.js";
5
5
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
6
6
  import "./executa-cache-BFoUtb4J.js";
7
7
  import "./bundled-executas-rSIkaA6-.js";
8
- import "./manifest-DlIcwLQs.js";
8
+ import "./manifest-CAF3_r1T.js";
9
9
  import "./executas-CvQY_w2U.js";
10
- import "./executa-publish-CGz5wM1Q.js";
10
+ import "./executa-publish-kh4Ucd3o.js";
11
11
  import "./binary-upload-CKMU5Rfw.js";
12
- import "./executa-upload-binaries-Do5Sq64E.js";
13
- import "./dev-GUFWek03.js";
14
- import "./executa-install-Dz7hBUsn.js";
12
+ import "./executa-upload-binaries-DURJTXRI.js";
13
+ import "./dev-CNFzSiD9.js";
14
+ import "./executa-install-4hdrbusW.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { resolveAppBySlugOrCache } from "./working-orchestration-B8KdAh5S.js";
16
+ import { resolveAppBySlugOrCache } from "./working-orchestration-B_4WOk3X.js";
17
17
  import { dim, green, yellow } from "kleur/colors";
18
18
 
19
19
  //#region src/commands/apps-discard.ts
@@ -3,11 +3,11 @@ import { createApp, createVersion, findAppBySlug, getApp } from "./apps-DlVsVHQ5
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
5
5
  import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-rSIkaA6-.js";
6
- import { loadAppManifest } from "./manifest-DlIcwLQs.js";
7
- import { bumpVersion, bundleHash, manifestHash, rewriteVersion, runExecutaPublish } from "./executa-publish-CGz5wM1Q.js";
6
+ import { loadAppManifest } from "./manifest-CAF3_r1T.js";
7
+ import { bumpVersion, bundleHash, manifestHash, rewriteVersion, runExecutaPublish } from "./executa-publish-kh4Ucd3o.js";
8
8
  import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-Cr3tKbux.js";
9
- import { syncAppListingMeta } from "./listing-meta-C0HsNjIB.js";
10
- import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-CrBRnzf4.js";
9
+ import { syncAppListingMeta } from "./listing-meta-CtVtyaWu.js";
10
+ import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-DmVKWAj9.js";
11
11
  import { resolve } from "node:path";
12
12
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
13
13
 
@@ -75,6 +75,7 @@ async function runAppsPublish(opts) {
75
75
  cwd: execCwd,
76
76
  account: opts.account,
77
77
  quiet: true,
78
+ profile: opts.profile,
78
79
  capture: (r) => {
79
80
  captured = r;
80
81
  }
@@ -4,14 +4,14 @@ import "./client-D-_z1ALk.js";
4
4
  import "./_lifecycle-shared-RyiRITI5.js";
5
5
  import "./executa-cache-BFoUtb4J.js";
6
6
  import "./bundled-executas-rSIkaA6-.js";
7
- import "./manifest-DlIcwLQs.js";
7
+ import "./manifest-CAF3_r1T.js";
8
8
  import "./executas-CvQY_w2U.js";
9
- import "./executa-publish-CGz5wM1Q.js";
9
+ import "./executa-publish-kh4Ucd3o.js";
10
10
  import "./binary-upload-CKMU5Rfw.js";
11
- import "./executa-upload-binaries-Do5Sq64E.js";
11
+ import "./executa-upload-binaries-DURJTXRI.js";
12
12
  import "./app-cache-Cr3tKbux.js";
13
- import "./listing-meta-C0HsNjIB.js";
14
- import "./app-bundle-upload-CrBRnzf4.js";
15
- import { runAppsPublish } from "./apps-publish-qc_E4b_R.js";
13
+ import "./listing-meta-CtVtyaWu.js";
14
+ import "./app-bundle-upload-DmVKWAj9.js";
15
+ import { runAppsPublish } from "./apps-publish--EmBa0zN.js";
16
16
 
17
17
  export { runAppsPublish };
@@ -5,17 +5,17 @@ import { CliError } from "./client-D-_z1ALk.js";
5
5
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
6
6
  import "./executa-cache-BFoUtb4J.js";
7
7
  import "./bundled-executas-rSIkaA6-.js";
8
- import { loadAppManifest } from "./manifest-DlIcwLQs.js";
8
+ import { loadAppManifest } from "./manifest-CAF3_r1T.js";
9
9
  import "./executas-CvQY_w2U.js";
10
- import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-CGz5wM1Q.js";
10
+ import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-kh4Ucd3o.js";
11
11
  import "./binary-upload-CKMU5Rfw.js";
12
- import "./executa-upload-binaries-Do5Sq64E.js";
13
- import "./dev-GUFWek03.js";
14
- import "./executa-install-Dz7hBUsn.js";
12
+ import "./executa-upload-binaries-DURJTXRI.js";
13
+ import "./dev-CNFzSiD9.js";
14
+ import "./executa-install-4hdrbusW.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-B8KdAh5S.js";
17
- import { syncAppListingMeta } from "./listing-meta-C0HsNjIB.js";
18
- import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-CrBRnzf4.js";
16
+ import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-B_4WOk3X.js";
17
+ import { syncAppListingMeta } from "./listing-meta-CtVtyaWu.js";
18
+ import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-DmVKWAj9.js";
19
19
  import { resolve } from "node:path";
20
20
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
21
21
 
@@ -43,6 +43,7 @@ async function runAppsPush(opts) {
43
43
  dryRun: opts.dryRun,
44
44
  freeze: false,
45
45
  lockSource: "working",
46
+ profile: opts.profile,
46
47
  account: opts.account,
47
48
  json: opts.json
48
49
  });
@@ -51,6 +52,7 @@ async function runAppsPush(opts) {
51
52
  manifest,
52
53
  cwd,
53
54
  resolved,
55
+ profile: opts.profile,
54
56
  json: opts.json
55
57
  });
56
58
  const identity = await resolveAppIdentity({
@@ -59,7 +59,7 @@ async function runAppsRelease(opts) {
59
59
  if (!target) {
60
60
  if (opts.allowCreate) {
61
61
  if (!opts.json) console.log(yellow(`version ${opts.version} not found remotely; running 'apps publish' first (--allow-create)…`));
62
- const { runAppsPublish } = await import("./apps-publish-B9CnifEx.js");
62
+ const { runAppsPublish } = await import("./apps-publish-B7reDBe1.js");
63
63
  const code = await runAppsPublish({
64
64
  cwd: opts.cwd,
65
65
  account: opts.account,
@@ -2,7 +2,7 @@ import "./credentials-BTv2IfUZ.js";
2
2
  import { findAppBySlug, patchApp } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { reportError, resolveClient } from "./_lifecycle-shared-RyiRITI5.js";
5
- import { loadAppManifest } from "./manifest-DlIcwLQs.js";
5
+ import { loadAppManifest } from "./manifest-CAF3_r1T.js";
6
6
  import { readAppIdentity, writeAppIdentity } from "./app-cache-Cr3tKbux.js";
7
7
  import { writeFileSync } from "node:fs";
8
8
  import { bold, dim, green, red, yellow } from "kleur/colors";
@@ -2,9 +2,9 @@ import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
2
  import { findAppBySlug, getApp } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
5
- import { loadAppManifest } from "./manifest-DlIcwLQs.js";
5
+ import { loadAppManifest } from "./manifest-CAF3_r1T.js";
6
6
  import { readAppIdentity } from "./app-cache-Cr3tKbux.js";
7
- import { syncAppListingMeta } from "./listing-meta-C0HsNjIB.js";
7
+ import { syncAppListingMeta } from "./listing-meta-CtVtyaWu.js";
8
8
  import { resolve } from "node:path";
9
9
  import { bold, cyan, dim, green } from "kleur/colors";
10
10
 
@@ -70,6 +70,8 @@ async function runAppsSyncMeta(opts) {
70
70
  console.log(` ${dim("name :")} ${manifest.name}`);
71
71
  if (manifest.category) console.log(` ${dim("category :")} ${manifest.category}`);
72
72
  if (manifest.tagline) console.log(` ${dim("tagline :")} ${manifest.tagline}`);
73
+ const cleared = Object.entries(meta).filter(([, v]) => v === "").map(([k]) => k);
74
+ if (cleared.length > 0) console.log(` ${dim("cleared :")} ${cleared.join(", ")}`);
73
75
  if (sync.logoUpload?.logo_url) console.log(` ${dim("logo :")} ${sync.logoUpload.logo_url}`);
74
76
  if (sync.screenshotUploads && sync.screenshotUploads.length > 0) console.log(` ${dim("shots :")} ${sync.screenshotUploads.length} uploaded`);
75
77
  console.log(bold(cyan(`status: ${finalApp.status}`)));
@@ -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.0a12";
12
+ const PINNED_RUNTIME_VERSION = "0.2.0a13";
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.
@@ -0,0 +1,3 @@
1
+ import { BridgeRequestError, PINNED_RUNTIME_VERSION, PythonBridge } from "./bridge-D6c4Asou.js";
2
+
3
+ export { PINNED_RUNTIME_VERSION, PythonBridge };
package/dist/cli.js CHANGED
@@ -145,6 +145,10 @@ function hostApiAllows(manifest, ns, method) {
145
145
  const declared = (manifest.required_executas?.length ?? 0) + (manifest.optional_executas?.length ?? 0);
146
146
  return declared > 0;
147
147
  }
148
+ if (ns === "credentials" && (method === "list_accounts" || method === "get_token")) {
149
+ const providers = grants.credentials;
150
+ return !!providers && providers.length > 0;
151
+ }
148
152
  const methods = grants[ns];
149
153
  if (!methods || methods.length === 0) return false;
150
154
  if (methods.includes("*")) return true;
@@ -470,7 +474,7 @@ program.command("validate").description("Run schema + ACL checks on a manifest+b
470
474
  process.exit(code);
471
475
  });
472
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) => {
473
- const { runDev, parseExecutaSpec } = await import("./dev-CZLOk2qE.js");
477
+ const { runDev, parseExecutaSpec } = await import("./dev-D4KOnT0B.js");
474
478
  const cwd = opts.cwd ?? process.cwd();
475
479
  let executas;
476
480
  if (opts.executa && opts.executa.length > 0) {
@@ -529,7 +533,7 @@ fixture.command("replay <file>").description("Dry-run replay of a harness record
529
533
  process.exit(code);
530
534
  });
531
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) => {
532
- const { runDoctor } = await import("./doctor-C3Nx8E2L.js");
536
+ const { runDoctor } = await import("./doctor-DtQQOPdR.js");
533
537
  const code = await runDoctor({ matrixNexusRoot: opts.matrixNexusRoot });
534
538
  process.exit(code);
535
539
  });
@@ -592,7 +596,7 @@ executa.command("register").description("Register a HARNESS AnnaApp(kind=executa
592
596
  process.exit(code);
593
597
  });
594
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) => {
595
- const { runExecutaInstall } = await import("./executa-install-nOFLBwxv.js");
599
+ const { runExecutaInstall } = await import("./executa-install-hO5EVXL9.js");
596
600
  const code = await runExecutaInstall({
597
601
  dir: opts.dir,
598
602
  toolId: opts.toolId,
@@ -603,7 +607,7 @@ executa.command("install").description("Install a local-dev shim for an Executa
603
607
  process.exit(code);
604
608
  });
605
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) => {
606
- const { runExecutaDev } = await import("./executa-dev-CAw5X64R.js");
610
+ const { runExecutaDev } = await import("./executa-dev-BWApRNpg.js");
607
611
  const storageMode = opts.storage === void 0 ? void 0 : (() => {
608
612
  const m = opts.storage;
609
613
  if (m === "off" || m === "memory" || m === "mock" || m === "real") return m;
@@ -648,7 +652,7 @@ apps.command("list").description("List the Anna Apps you authored, with lifecycl
648
652
  }));
649
653
  });
650
654
  apps.command("rename-slug <new-slug>").description("Rename an app's public slug (DRAFT/REJECTED, never-published, zero installs only). Updates local app.json + .anna/app.json on success.").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (newSlug, opts) => {
651
- const { runAppsRenameSlug } = await import("./apps-rename-slug-CGykNHM5.js");
655
+ const { runAppsRenameSlug } = await import("./apps-rename-slug-DYrk4Zpt.js");
652
656
  process.exit(await runAppsRenameSlug({
653
657
  newSlug,
654
658
  cwd: opts.cwd,
@@ -657,7 +661,7 @@ apps.command("rename-slug <new-slug>").description("Rename an app's public slug
657
661
  json: opts.json
658
662
  }));
659
663
  });
660
- apps.command("publish").description("Publish or update an Anna App (manifest.json in cwd)").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bump <kind>", "Bump version: patch|minor|major").option("--no-write", "Skip writing the bumped version back to disk", false).option("--dry-run", "Resolve identity + diff but don't upload", false).option("--executa-id <handle=id>", "Override a bundled executa handle with a real tool_id (repeatable)", (val, prev) => [...prev, val], []).option("--skip-executa-publish", "Use cached/overridden tool_ids; don't recursively publish bundled executas", false).option("--no-bundled-executas", "Disable bundled-executa orchestration (legacy behaviour)").option("--no-bundle", "Skip UI bundle upload even if the manifest declares a UI").option("--bundle-dir <dir>", "UI bundle directory (default: <cwd>/bundle)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
664
+ apps.command("publish").description("Publish or update an Anna App (manifest.json in cwd)").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bump <kind>", "Bump version: patch|minor|major").option("--no-write", "Skip writing the bumped version back to disk", false).option("--dry-run", "Resolve identity + diff but don't upload", false).option("--executa-id <handle=id>", "Override a bundled executa handle with a real tool_id (repeatable)", (val, prev) => [...prev, val], []).option("--skip-executa-publish", "Use cached/overridden tool_ids; don't recursively publish bundled executas", false).option("--no-bundled-executas", "Disable bundled-executa orchestration (legacy behaviour)").option("--no-bundle", "Skip UI bundle upload even if the manifest declares a UI").option("--bundle-dir <dir>", "UI bundle directory (default: <cwd>/bundle)").option("--profile <name>", "Select a bundled executa `distribution.profiles` entry for this run (overrides each executa.json `active`, e.g. --profile local)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
661
665
  if (opts.bump && ![
662
666
  "patch",
663
667
  "minor",
@@ -666,7 +670,7 @@ apps.command("publish").description("Publish or update an Anna App (manifest.jso
666
670
  console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
667
671
  process.exit(2);
668
672
  }
669
- const { runAppsPublish } = await import("./apps-publish-B9CnifEx.js");
673
+ const { runAppsPublish } = await import("./apps-publish-B7reDBe1.js");
670
674
  process.exit(await runAppsPublish({
671
675
  cwd: opts.cwd,
672
676
  manifest: opts.manifest,
@@ -678,11 +682,12 @@ apps.command("publish").description("Publish or update an Anna App (manifest.jso
678
682
  noBundledExecutas: opts.bundledExecutas === false,
679
683
  noBundle: opts.bundle === false,
680
684
  bundleDir: opts.bundleDir,
685
+ profile: opts.profile,
681
686
  account: opts.account,
682
687
  json: opts.json
683
688
  }));
684
689
  });
685
- apps.command("push").description("Upsert the mutable working draft (manifest + bundle, no freeze)").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bump <kind>", "Bump version: patch|minor|major").option("--no-write", "Skip writing the bumped version back to disk", false).option("--dry-run", "Resolve identity + diff but don't upsert", false).option("--executa-id <handle=id>", "Override a bundled executa handle with a real tool_id (repeatable)", (val, prev) => [...prev, val], []).option("--skip-executa-publish", "Use cached/overridden tool_ids; don't recursively register bundled executas", false).option("--no-bundled-executas", "Disable bundled-executa orchestration (legacy behaviour)").option("--no-bundle", "Skip working UI bundle upload even if the manifest declares a UI").option("--bundle-dir <dir>", "UI bundle directory (default: <cwd>/bundle)").option("--no-install-local", "Don't install local-dev shims for bundled `local` executas (skip Rediscover-Local prep)").option("--if-match <revision>", "Optimistic-lock: require this working revision").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
690
+ apps.command("push").description("Upsert the mutable working draft (manifest + bundle, no freeze)").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bump <kind>", "Bump version: patch|minor|major").option("--no-write", "Skip writing the bumped version back to disk", false).option("--dry-run", "Resolve identity + diff but don't upsert", false).option("--executa-id <handle=id>", "Override a bundled executa handle with a real tool_id (repeatable)", (val, prev) => [...prev, val], []).option("--skip-executa-publish", "Use cached/overridden tool_ids; don't recursively register bundled executas", false).option("--no-bundled-executas", "Disable bundled-executa orchestration (legacy behaviour)").option("--no-bundle", "Skip working UI bundle upload even if the manifest declares a UI").option("--bundle-dir <dir>", "UI bundle directory (default: <cwd>/bundle)").option("--no-install-local", "Don't install local-dev shims for bundled `local` executas (skip Rediscover-Local prep)").option("--profile <name>", "Select a bundled executa `distribution.profiles` entry for this push (overrides each executa.json `active`; e.g. --profile local for a dev push while `active` stays `binary`)").option("--if-match <revision>", "Optimistic-lock: require this working revision").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
686
691
  if (opts.bump && ![
687
692
  "patch",
688
693
  "minor",
@@ -699,7 +704,7 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
699
704
  process.exit(2);
700
705
  }
701
706
  }
702
- const { runAppsPush } = await import("./apps-push-DnINd0Cx.js");
707
+ const { runAppsPush } = await import("./apps-push-BOGVEDQ3.js");
703
708
  process.exit(await runAppsPush({
704
709
  cwd: opts.cwd,
705
710
  manifest: opts.manifest,
@@ -712,13 +717,14 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
712
717
  noBundle: opts.bundle === false,
713
718
  bundleDir: opts.bundleDir,
714
719
  noInstallLocal: opts.installLocal === false,
720
+ profile: opts.profile,
715
721
  ifMatch,
716
722
  account: opts.account,
717
723
  json: opts.json
718
724
  }));
719
725
  });
720
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) => {
721
- const { runAppsCut } = await import("./apps-cut-C14A3V93.js");
727
+ const { runAppsCut } = await import("./apps-cut-DU9B7ZV8.js");
722
728
  process.exit(await runAppsCut({
723
729
  version,
724
730
  changelog: opts.changelog,
@@ -730,7 +736,7 @@ apps.command("cut <version>").description("Snapshot the working draft into an im
730
736
  }));
731
737
  });
732
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) => {
733
- const { runAppsDiscard } = await import("./apps-discard-B49iiOX6.js");
739
+ const { runAppsDiscard } = await import("./apps-discard-BgI0e8FR.js");
734
740
  process.exit(await runAppsDiscard({
735
741
  slug: opts.slug,
736
742
  cwd: opts.cwd,
@@ -740,7 +746,7 @@ apps.command("discard").description("Drop the mutable working draft (leaves cut
740
746
  }));
741
747
  });
742
748
  apps.command("release <version>").description("Freeze & publish an existing remote version (go live)").option("--slug <slug>", "App slug (default: resolve from .anna/app.json cache)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--allow-create", "If the version isn't on the server, run 'apps publish' first, then release", false).option("--dry-run", "Resolve target + pre-flight but don't publish", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (version, opts) => {
743
- const { runAppsRelease } = await import("./apps-release--7R2cmPg.js");
749
+ const { runAppsRelease } = await import("./apps-release-J-Sjkoym.js");
744
750
  process.exit(await runAppsRelease({
745
751
  version,
746
752
  slug: opts.slug,
@@ -752,7 +758,7 @@ apps.command("release <version>").description("Freeze & publish an existing remo
752
758
  }));
753
759
  });
754
760
  apps.command("sync-meta").description("Push mutable store metadata (name/tagline/…) from the manifest").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--logo <path>", "Local logo file to upload (overrides app.json logo_file)").option("--dry-run", "Print the metadata diff but don't PATCH", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
755
- const { runAppsSyncMeta } = await import("./apps-sync-meta-dy9j-5n8.js");
761
+ const { runAppsSyncMeta } = await import("./apps-sync-meta-CL2PCMCv.js");
756
762
  process.exit(await runAppsSyncMeta({
757
763
  cwd: opts.cwd,
758
764
  manifest: opts.manifest,
@@ -857,7 +863,7 @@ executa.command("versions <ref>").description("List immutable version snapshots
857
863
  json: opts.json
858
864
  }));
859
865
  });
860
- executa.command("publish").description("Mint or update an Executa (executa.json in cwd)").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "executa.json path", "executa.json").option("--bump <kind>", "Bump version: patch|minor|major").option("--no-write", "Skip writing the bumped version back to disk", false).option("--publish", "After freezing the version, flip visibility to PUBLIC", false).option("--dry-run", "Resolve identity + diff but don't upload", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
866
+ executa.command("publish").description("Mint or update an Executa (executa.json in cwd)").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "executa.json path", "executa.json").option("--bump <kind>", "Bump version: patch|minor|major").option("--no-write", "Skip writing the bumped version back to disk", false).option("--publish", "After freezing the version, flip visibility to PUBLIC", false).option("--dry-run", "Resolve identity + diff but don't upload", false).option("--profile <name>", "Select a `distribution.profiles` entry for this run (overrides executa.json `active`, e.g. --profile local)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
861
867
  if (opts.bump && ![
862
868
  "patch",
863
869
  "minor",
@@ -866,7 +872,7 @@ executa.command("publish").description("Mint or update an Executa (executa.json
866
872
  console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
867
873
  process.exit(2);
868
874
  }
869
- const { runExecutaPublish } = await import("./executa-publish-DHICU6S0.js");
875
+ const { runExecutaPublish } = await import("./executa-publish-B_7k1gOf.js");
870
876
  process.exit(await runExecutaPublish({
871
877
  cwd: opts.cwd,
872
878
  manifest: opts.manifest,
@@ -874,12 +880,13 @@ executa.command("publish").description("Mint or update an Executa (executa.json
874
880
  noWrite: opts.write === false,
875
881
  publish: opts.publish,
876
882
  dryRun: opts.dryRun,
883
+ profile: opts.profile,
877
884
  account: opts.account,
878
885
  json: opts.json
879
886
  }));
880
887
  });
881
888
  executa.command("upload-binaries").description("Push the local binary_artifacts declared in executa.json straight to the platform CDN (no public source URL needed — works for private repos). Requires a minted identity (.anna/executa.json from `executa publish` / `apps push`) or --tool-id.").option("--dir <path>", "Executa project dir (default: CWD)").option("--dry-run", "Hash artifacts + validate the plan server-side without uploading", false).option("--oidc", "Mint the upload token from the GitHub Actions OIDC id-token instead of a PAT (zero long-term secrets; needs `permissions: id-token: write` and a registered trusted publisher)", false).option("--tool-id <id>", "Explicit tool_id (skip the identity cache)").option("--host <url>", "Nexus host (required with --oidc unless ANNA_APP_HOST is set)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
882
- const { runExecutaUploadBinaries } = await import("./executa-upload-binaries-CYMtWJU7.js");
889
+ const { runExecutaUploadBinaries } = await import("./executa-upload-binaries-DrwpzQp3.js");
883
890
  process.exit(await runExecutaUploadBinaries({
884
891
  dir: opts.dir,
885
892
  dryRun: opts.dryRun,
@@ -993,7 +1000,7 @@ program.command("publish").description("Auto-detect cwd and publish (apps publis
993
1000
  console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
994
1001
  process.exit(2);
995
1002
  }
996
- const { runTopLevelPublish } = await import("./publish-DW_D3uQ4.js");
1003
+ const { runTopLevelPublish } = await import("./publish-DwIJWl46.js");
997
1004
  process.exit(await runTopLevelPublish({
998
1005
  cwd: opts.cwd,
999
1006
  bump: opts.bump,
@@ -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-CzeSuRRL.js");
53
- const { HarnessServer } = await import("./server-BHWGGZsf.js");
52
+ const { PythonBridge, PINNED_RUNTIME_VERSION } = await import("./bridge-DlrXzdZQ.js");
53
+ const { HarnessServer } = await import("./server-CB-oHVfr.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-CNFzSiD9.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-Dvck0e9c.js";
2
+ import { PINNED_RUNTIME_VERSION } from "./bridge-D6c4Asou.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-GUFWek03.js";
2
+ import { parseExecutaSpec } from "./dev-CNFzSiD9.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";
@@ -1,5 +1,5 @@
1
1
  import { readExecutaIdentity } from "./executa-cache-BFoUtb4J.js";
2
- import { parseExecutaSpec } from "./dev-GUFWek03.js";
2
+ import { parseExecutaSpec } from "./dev-CNFzSiD9.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";
@@ -0,0 +1,7 @@
1
+ import "./credentials-BTv2IfUZ.js";
2
+ import "./nexus-root-BlPwOusj.js";
3
+ import "./executa-cache-BFoUtb4J.js";
4
+ import "./dev-CNFzSiD9.js";
5
+ import { runExecutaInstall } from "./executa-install-4hdrbusW.js";
6
+
7
+ export { runExecutaInstall };
@@ -2,10 +2,10 @@ import "./credentials-BTv2IfUZ.js";
2
2
  import "./client-D-_z1ALk.js";
3
3
  import "./_lifecycle-shared-RyiRITI5.js";
4
4
  import "./executa-cache-BFoUtb4J.js";
5
- import "./manifest-DlIcwLQs.js";
5
+ import "./manifest-CAF3_r1T.js";
6
6
  import "./executas-CvQY_w2U.js";
7
- import { runExecutaPublish } from "./executa-publish-CGz5wM1Q.js";
7
+ import { runExecutaPublish } from "./executa-publish-kh4Ucd3o.js";
8
8
  import "./binary-upload-CKMU5Rfw.js";
9
- import "./executa-upload-binaries-Do5Sq64E.js";
9
+ import "./executa-upload-binaries-DURJTXRI.js";
10
10
 
11
11
  export { runExecutaPublish };
@@ -2,9 +2,9 @@ import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
2
  import { CliError } from "./client-D-_z1ALk.js";
3
3
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
4
4
  import { executaCacheMatches, invalidateExecutaCache, mintIdempotencyKey, readExecutaIdentity, writeExecutaIdentity } from "./executa-cache-BFoUtb4J.js";
5
- import { loadExecutaManifest } from "./manifest-DlIcwLQs.js";
5
+ import { loadExecutaManifest } from "./manifest-CAF3_r1T.js";
6
6
  import { commitDraft, createDraft, getMySkill, getMyTool, listToolVersions, publishToolVersion, setSkillVisibility, setToolVisibility, updateMySkill, updateMyTool } from "./executas-CvQY_w2U.js";
7
- import { uploadExecutaBinaries } from "./executa-upload-binaries-Do5Sq64E.js";
7
+ import { uploadExecutaBinaries } from "./executa-upload-binaries-DURJTXRI.js";
8
8
  import { join, relative, resolve, sep } from "node:path";
9
9
  import { readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
10
10
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
@@ -110,7 +110,7 @@ function distributionPayload(d) {
110
110
  async function runExecutaPublish(opts) {
111
111
  return withErrorHandling(async () => {
112
112
  const cwd = resolve(opts.cwd ?? process.cwd());
113
- const manifest = loadExecutaManifest(cwd, opts.manifest);
113
+ const manifest = loadExecutaManifest(cwd, opts.manifest, opts.profile);
114
114
  const isSkill = manifest.executa_type === "skill";
115
115
  const { client, host, source } = resolveClient({ account: opts.account });
116
116
  if (!opts.json && !opts.quiet) console.log(dim(`using PAT from ${source} (host=${host})`));
@@ -2,7 +2,7 @@ import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
2
  import { CliError } from "./client-D-_z1ALk.js";
3
3
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
4
4
  import { readExecutaIdentity } from "./executa-cache-BFoUtb4J.js";
5
- import { loadExecutaManifest } from "./manifest-DlIcwLQs.js";
5
+ import { loadExecutaManifest } from "./manifest-CAF3_r1T.js";
6
6
  import { fetchGitHubIdToken, finalizeBinaryUpload, initBinaryUpload, mintUploadSession, mintUploadSessionViaOidc, uploadBinaryPart } from "./binary-upload-CKMU5Rfw.js";
7
7
  import { isAbsolute, resolve } from "node:path";
8
8
  import { closeSync, createReadStream, existsSync, openSync, readSync, statSync } from "node:fs";
@@ -2,8 +2,8 @@ import "./credentials-BTv2IfUZ.js";
2
2
  import "./client-D-_z1ALk.js";
3
3
  import "./_lifecycle-shared-RyiRITI5.js";
4
4
  import "./executa-cache-BFoUtb4J.js";
5
- import "./manifest-DlIcwLQs.js";
5
+ import "./manifest-CAF3_r1T.js";
6
6
  import "./binary-upload-CKMU5Rfw.js";
7
- import { expandArtifactPath, resolveArtifactPlan, runExecutaUploadBinaries, uploadExecutaBinaries, uploadPlannedParts } from "./executa-upload-binaries-Do5Sq64E.js";
7
+ import { expandArtifactPath, resolveArtifactPlan, runExecutaUploadBinaries, uploadExecutaBinaries, uploadPlannedParts } from "./executa-upload-binaries-DURJTXRI.js";
8
8
 
9
9
  export { runExecutaUploadBinaries };
@@ -27,20 +27,29 @@ function isRemoteAsset(src) {
27
27
  /**
28
28
  * Build the metadata payload from the manifest (only defined fields). The
29
29
  * logo is handled separately and never appears here when sourced from a file.
30
+ *
31
+ * Optional listing URLs (cover/homepage/support/privacy) are *clearable*:
32
+ * `loadAppManifest` normalises an explicit `""`/`null` in the local metadata
33
+ * file to the `""` sentinel, which is forwarded on the PATCH so the server
34
+ * value is emptied (the store UI hides falsy links). An absent key stays
35
+ * `undefined` and is omitted from the payload — "leave unchanged".
30
36
  */
31
37
  function buildMeta(manifest) {
32
38
  const meta = {};
33
39
  const add = (key, value) => {
34
40
  if (value !== void 0 && value !== null && value !== "") meta[key] = value;
35
41
  };
42
+ const addClearable = (key, value) => {
43
+ if (value !== void 0) meta[key] = value;
44
+ };
36
45
  add("name", manifest.name);
37
46
  add("category", manifest.category);
38
47
  add("tagline", manifest.tagline);
39
48
  add("description", manifest.description);
40
- add("cover_url", manifest.coverUrl);
41
- add("homepage_url", manifest.homepageUrl);
42
- add("support_url", manifest.supportUrl);
43
- add("privacy_url", manifest.privacyUrl);
49
+ addClearable("cover_url", manifest.coverUrl);
50
+ addClearable("homepage_url", manifest.homepageUrl);
51
+ addClearable("support_url", manifest.supportUrl);
52
+ addClearable("privacy_url", manifest.privacyUrl);
44
53
  add("pricing_model", manifest.pricingModel);
45
54
  return meta;
46
55
  }
@@ -43,6 +43,13 @@ function loadAppManifest(cwd, manifestPath) {
43
43
  const metadataLabel = hasAppJson ? "app.json" : "manifest.json";
44
44
  const pickMeta = (k) => (appJsonRaw && pickString(appJsonRaw, k)) ?? pickString(raw, k);
45
45
  const pickMetaArray = (k) => (appJsonRaw && pickStringArray(appJsonRaw, k)) ?? pickStringArray(raw, k);
46
+ const pickClearableMeta = (k) => {
47
+ const owner = appJsonRaw && k in appJsonRaw ? appJsonRaw : k in raw ? raw : null;
48
+ if (!owner) return void 0;
49
+ const v = owner[k];
50
+ if (v === null || v === "") return "";
51
+ return typeof v === "string" ? v : void 0;
52
+ };
46
53
  const slug = pickMeta("slug");
47
54
  const name = pickMeta("name") ?? slug ?? "";
48
55
  const version = pickMeta("version") ?? "0.1.0";
@@ -67,11 +74,11 @@ function loadAppManifest(cwd, manifestPath) {
67
74
  changelog: pickMeta("changelog"),
68
75
  logoUrl: pickMeta("logo_url"),
69
76
  logoFile: pickMeta("logo_file"),
70
- coverUrl: pickMeta("cover_url"),
77
+ coverUrl: pickClearableMeta("cover_url"),
71
78
  screenshots: pickMetaArray("screenshots"),
72
- homepageUrl: pickMeta("homepage_url"),
73
- supportUrl: pickMeta("support_url"),
74
- privacyUrl: pickMeta("privacy_url"),
79
+ homepageUrl: pickClearableMeta("homepage_url"),
80
+ supportUrl: pickClearableMeta("support_url"),
81
+ privacyUrl: pickClearableMeta("privacy_url"),
75
82
  pricingModel: pickMeta("pricing_model")
76
83
  };
77
84
  }
@@ -92,7 +99,7 @@ function parseBundledExecutas(value, label) {
92
99
  }
93
100
  return out;
94
101
  }
95
- function loadExecutaManifest(cwd, manifestPath) {
102
+ function loadExecutaManifest(cwd, manifestPath, profileOverride) {
96
103
  const path = resolve(cwd, manifestPath ?? "executa.json");
97
104
  if (!existsSync(path)) throw new CliError(`no executa.json at ${path}`, 4);
98
105
  const raw = readJson(path);
@@ -124,7 +131,7 @@ function loadExecutaManifest(cwd, manifestPath) {
124
131
  changelog: pickString(raw, "changelog") ?? void 0,
125
132
  skillContent,
126
133
  executionMode: pickString(raw, "execution_mode") ?? void 0,
127
- distribution: parseExecutaDistribution(raw["distribution"], t)
134
+ distribution: parseExecutaDistribution(raw["distribution"], t, profileOverride)
128
135
  };
129
136
  }
130
137
  /**
@@ -155,20 +162,32 @@ function loadExecutaManifest(cwd, manifestPath) {
155
162
  * still caught), but the returned `ExecutaDistribution` carries the
156
163
  * fields of the *active* profile plus `active`/`profiles` for
157
164
  * introspection. Downstream publish code stays profile-agnostic.
165
+ *
166
+ * The optional `profileOverride` (from the CLI `--profile <name>` flag)
167
+ * selects a declared profile for THIS invocation without touching the
168
+ * on-disk `active` field — so `active` can stay pinned to the production
169
+ * default (e.g. `binary`) while a developer temporarily pushes with
170
+ * `--profile local`. It is rejected if the block is the flat form (no
171
+ * `profiles`) or names an undeclared profile.
158
172
  */
159
- function parseExecutaDistribution(value, executaType) {
173
+ function parseExecutaDistribution(value, executaType, profileOverride) {
160
174
  if (value === void 0 || value === null) return void 0;
161
175
  if (typeof value !== "object" || Array.isArray(value)) throw new CliError("executa.json `distribution` must be an object with a `type` field (or `profiles` for the switchable multi-mode form)", 4);
162
176
  if (executaType === "skill") throw new CliError("executa.json `distribution` is only valid for `executa_type: \"tool\"` — skills are declarative Markdown and are not installed as a process", 4);
163
177
  const d = value;
164
- if (d["profiles"] !== void 0) return parseProfiledDistribution(d);
178
+ if (d["profiles"] !== void 0) return parseProfiledDistribution(d, profileOverride);
179
+ if (profileOverride !== void 0) throw new CliError(`--profile "${profileOverride}" was given but executa.json \`distribution\` is the flat single-mode form (no \`profiles\`) — declare a \`profiles\` map to switch between modes`, 4);
165
180
  return parseDistributionProfile(d, "distribution");
166
181
  }
167
182
  /**
168
183
  * Resolve the multi-profile `distribution` form into the selected profile.
169
184
  * Validates *all* profiles and records them under `profiles`.
185
+ *
186
+ * Selection precedence: `profileOverride` (CLI `--profile`) > `active` field >
187
+ * the sole profile when exactly one is declared. The override never mutates
188
+ * the on-disk `active`; it only picks which profile this run publishes.
170
189
  */
171
- function parseProfiledDistribution(d) {
190
+ function parseProfiledDistribution(d, profileOverride) {
172
191
  if (d["type"] !== void 0) throw new CliError("executa.json `distribution` cannot set both `type` (flat form) and `profiles` (switchable form) — pick one", 4);
173
192
  const profilesRaw = d["profiles"];
174
193
  if (profilesRaw === null || typeof profilesRaw !== "object" || Array.isArray(profilesRaw)) throw new CliError("executa.json `distribution.profiles` must be an object mapping a profile name → distribution config", 4);
@@ -181,7 +200,10 @@ function parseProfiledDistribution(d) {
181
200
  }
182
201
  const active = pickString(d, "active");
183
202
  let selected;
184
- if (active !== void 0) {
203
+ if (profileOverride !== void 0) {
204
+ if (!(profileOverride in profiles)) throw new CliError(`--profile "${profileOverride}" is not a declared \`distribution.profiles\` entry — expected one of ${Object.keys(profiles).join(" | ")}`, 4);
205
+ selected = profileOverride;
206
+ } else if (active !== void 0) {
185
207
  if (!(active in profiles)) throw new CliError(`executa.json \`distribution.active\` "${active}" is not a declared profile — expected one of ${Object.keys(profiles).join(" | ")}`, 4);
186
208
  selected = active;
187
209
  } else if (profileEntries.length === 1) selected = profileEntries[0][0];
@@ -4,15 +4,15 @@ import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { withErrorHandling } from "./_lifecycle-shared-RyiRITI5.js";
5
5
  import "./executa-cache-BFoUtb4J.js";
6
6
  import "./bundled-executas-rSIkaA6-.js";
7
- import "./manifest-DlIcwLQs.js";
7
+ import "./manifest-CAF3_r1T.js";
8
8
  import "./executas-CvQY_w2U.js";
9
- import { runExecutaPublish } from "./executa-publish-CGz5wM1Q.js";
9
+ import { runExecutaPublish } from "./executa-publish-kh4Ucd3o.js";
10
10
  import "./binary-upload-CKMU5Rfw.js";
11
- import "./executa-upload-binaries-Do5Sq64E.js";
11
+ import "./executa-upload-binaries-DURJTXRI.js";
12
12
  import "./app-cache-Cr3tKbux.js";
13
- import "./listing-meta-C0HsNjIB.js";
14
- import "./app-bundle-upload-CrBRnzf4.js";
15
- import { runAppsPublish } from "./apps-publish-qc_E4b_R.js";
13
+ import "./listing-meta-CtVtyaWu.js";
14
+ import "./app-bundle-upload-DmVKWAj9.js";
15
+ import { runAppsPublish } from "./apps-publish--EmBa0zN.js";
16
16
  import { resolve } from "node:path";
17
17
  import { existsSync } from "node:fs";
18
18
  import { red, yellow } from "kleur/colors";
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost, getAccount } from "./credentials-BTv2IfUZ.js";
2
- import { BridgeRequestError } from "./bridge-Dvck0e9c.js";
2
+ import { BridgeRequestError } from "./bridge-D6c4Asou.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";
@@ -16,6 +16,8 @@ interface HostApi {
16
16
  storage?: string[];
17
17
  prefs?: string[];
18
18
  window?: string[];
19
+ /** Provider ids (e.g. "google") — NOT method names. */
20
+ credentials?: string[];
19
21
  }
20
22
  interface ManifestForAcl {
21
23
  required_executas?: Array<{
@@ -7,7 +7,8 @@ const NAMESPACED = {
7
7
  fs: true,
8
8
  storage: true,
9
9
  prefs: true,
10
- window: true
10
+ window: true,
11
+ credentials: true
11
12
  };
12
13
  function deriveAcl(manifest) {
13
14
  const ha = manifest.ui?.host_api ?? {};
@@ -26,8 +27,12 @@ function deriveAcl(manifest) {
26
27
  for (const r of [...manifest.required_executas ?? [], ...manifest.optional_executas ?? []]) if (r.tool_id) allowedTools.add(r.tool_id);
27
28
  }
28
29
  if (allowedTools.size > 0 || toolsWildcard) allowed.add("tools.invoke");
30
+ if ((ha.credentials ?? []).length > 0) {
31
+ allowed.add("credentials.list_accounts");
32
+ allowed.add("credentials.get_token");
33
+ }
29
34
  for (const ns of Object.keys(NAMESPACED)) {
30
- if (ns === "tools") continue;
35
+ if (ns === "tools" || ns === "credentials") continue;
31
36
  for (const method of ha[ns] ?? []) allowed.add(`${ns}.${method}`);
32
37
  }
33
38
  return {
@@ -2,9 +2,9 @@ import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
2
  import { createApp, findAppBySlug, getApp } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-rSIkaA6-.js";
5
- import { loadExecutaManifest } from "./manifest-DlIcwLQs.js";
6
- import { runExecutaPublish } from "./executa-publish-CGz5wM1Q.js";
7
- import { runExecutaInstall } from "./executa-install-Dz7hBUsn.js";
5
+ import { loadExecutaManifest } from "./manifest-CAF3_r1T.js";
6
+ import { runExecutaPublish } from "./executa-publish-kh4Ucd3o.js";
7
+ import { runExecutaInstall } from "./executa-install-4hdrbusW.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";
@@ -60,6 +60,7 @@ async function resolveBundledExecutas(params) {
60
60
  account: params.account,
61
61
  quiet: true,
62
62
  freeze,
63
+ profile: params.profile,
63
64
  capture: (r) => {
64
65
  captured = r;
65
66
  }
@@ -129,7 +130,7 @@ async function installLocalBundledShims(params) {
129
130
  const dir = resolve(cwd, decl.path);
130
131
  let exManifest;
131
132
  try {
132
- exManifest = loadExecutaManifest(dir);
133
+ exManifest = loadExecutaManifest(dir, void 0, params.profile);
133
134
  } catch {
134
135
  continue;
135
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anna-ai/cli",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
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.10.0",
37
- "@anna-ai/app-schema": "^0.12.0",
36
+ "@anna-ai/app-runtime": "^0.11.0",
37
+ "@anna-ai/app-schema": "^0.13.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-Dvck0e9c.js";
2
-
3
- export { PINNED_RUNTIME_VERSION, PythonBridge };
@@ -1,4 +0,0 @@
1
- import "./nexus-root-BlPwOusj.js";
2
- import { parseExecutaSpec, runDev } from "./dev-GUFWek03.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-GUFWek03.js";
5
- import { runExecutaInstall } from "./executa-install-Dz7hBUsn.js";
6
-
7
- export { runExecutaInstall };