@anna-ai/cli 0.1.34 → 0.1.35

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.
@@ -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";
12
+ import { uploadExecutaBinaries } from "./executa-upload-binaries-DURJTXRI.js";
13
13
  import "./dev-GUFWek03.js";
14
14
  import "./executa-install-Dz7hBUsn.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { resolveAppBySlugOrCache } from "./working-orchestration-B8KdAh5S.js";
16
+ import { resolveAppBySlugOrCache } from "./working-orchestration-D7cW2Bf2.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";
12
+ import "./executa-upload-binaries-DURJTXRI.js";
13
13
  import "./dev-GUFWek03.js";
14
14
  import "./executa-install-Dz7hBUsn.js";
15
15
  import "./app-cache-Cr3tKbux.js";
16
- import { resolveAppBySlugOrCache } from "./working-orchestration-B8KdAh5S.js";
16
+ import { resolveAppBySlugOrCache } from "./working-orchestration-D7cW2Bf2.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";
12
+ import "./executa-upload-binaries-DURJTXRI.js";
13
13
  import "./dev-GUFWek03.js";
14
14
  import "./executa-install-Dz7hBUsn.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-D7cW2Bf2.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}`)));
package/dist/cli.js CHANGED
@@ -648,7 +648,7 @@ apps.command("list").description("List the Anna Apps you authored, with lifecycl
648
648
  }));
649
649
  });
650
650
  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");
651
+ const { runAppsRenameSlug } = await import("./apps-rename-slug-DYrk4Zpt.js");
652
652
  process.exit(await runAppsRenameSlug({
653
653
  newSlug,
654
654
  cwd: opts.cwd,
@@ -657,7 +657,7 @@ apps.command("rename-slug <new-slug>").description("Rename an app's public slug
657
657
  json: opts.json
658
658
  }));
659
659
  });
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) => {
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("--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
661
  if (opts.bump && ![
662
662
  "patch",
663
663
  "minor",
@@ -666,7 +666,7 @@ apps.command("publish").description("Publish or update an Anna App (manifest.jso
666
666
  console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
667
667
  process.exit(2);
668
668
  }
669
- const { runAppsPublish } = await import("./apps-publish-B9CnifEx.js");
669
+ const { runAppsPublish } = await import("./apps-publish-B7reDBe1.js");
670
670
  process.exit(await runAppsPublish({
671
671
  cwd: opts.cwd,
672
672
  manifest: opts.manifest,
@@ -678,11 +678,12 @@ apps.command("publish").description("Publish or update an Anna App (manifest.jso
678
678
  noBundledExecutas: opts.bundledExecutas === false,
679
679
  noBundle: opts.bundle === false,
680
680
  bundleDir: opts.bundleDir,
681
+ profile: opts.profile,
681
682
  account: opts.account,
682
683
  json: opts.json
683
684
  }));
684
685
  });
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) => {
686
+ 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
687
  if (opts.bump && ![
687
688
  "patch",
688
689
  "minor",
@@ -699,7 +700,7 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
699
700
  process.exit(2);
700
701
  }
701
702
  }
702
- const { runAppsPush } = await import("./apps-push-DnINd0Cx.js");
703
+ const { runAppsPush } = await import("./apps-push-CkJ1gtpy.js");
703
704
  process.exit(await runAppsPush({
704
705
  cwd: opts.cwd,
705
706
  manifest: opts.manifest,
@@ -712,13 +713,14 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
712
713
  noBundle: opts.bundle === false,
713
714
  bundleDir: opts.bundleDir,
714
715
  noInstallLocal: opts.installLocal === false,
716
+ profile: opts.profile,
715
717
  ifMatch,
716
718
  account: opts.account,
717
719
  json: opts.json
718
720
  }));
719
721
  });
720
722
  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");
723
+ const { runAppsCut } = await import("./apps-cut-MjSe2ph7.js");
722
724
  process.exit(await runAppsCut({
723
725
  version,
724
726
  changelog: opts.changelog,
@@ -730,7 +732,7 @@ apps.command("cut <version>").description("Snapshot the working draft into an im
730
732
  }));
731
733
  });
732
734
  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");
735
+ const { runAppsDiscard } = await import("./apps-discard-BWLVVMu7.js");
734
736
  process.exit(await runAppsDiscard({
735
737
  slug: opts.slug,
736
738
  cwd: opts.cwd,
@@ -740,7 +742,7 @@ apps.command("discard").description("Drop the mutable working draft (leaves cut
740
742
  }));
741
743
  });
742
744
  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");
745
+ const { runAppsRelease } = await import("./apps-release-J-Sjkoym.js");
744
746
  process.exit(await runAppsRelease({
745
747
  version,
746
748
  slug: opts.slug,
@@ -752,7 +754,7 @@ apps.command("release <version>").description("Freeze & publish an existing remo
752
754
  }));
753
755
  });
754
756
  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");
757
+ const { runAppsSyncMeta } = await import("./apps-sync-meta-CL2PCMCv.js");
756
758
  process.exit(await runAppsSyncMeta({
757
759
  cwd: opts.cwd,
758
760
  manifest: opts.manifest,
@@ -857,7 +859,7 @@ executa.command("versions <ref>").description("List immutable version snapshots
857
859
  json: opts.json
858
860
  }));
859
861
  });
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) => {
862
+ 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
863
  if (opts.bump && ![
862
864
  "patch",
863
865
  "minor",
@@ -866,7 +868,7 @@ executa.command("publish").description("Mint or update an Executa (executa.json
866
868
  console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
867
869
  process.exit(2);
868
870
  }
869
- const { runExecutaPublish } = await import("./executa-publish-DHICU6S0.js");
871
+ const { runExecutaPublish } = await import("./executa-publish-B_7k1gOf.js");
870
872
  process.exit(await runExecutaPublish({
871
873
  cwd: opts.cwd,
872
874
  manifest: opts.manifest,
@@ -874,12 +876,13 @@ executa.command("publish").description("Mint or update an Executa (executa.json
874
876
  noWrite: opts.write === false,
875
877
  publish: opts.publish,
876
878
  dryRun: opts.dryRun,
879
+ profile: opts.profile,
877
880
  account: opts.account,
878
881
  json: opts.json
879
882
  }));
880
883
  });
881
884
  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");
885
+ const { runExecutaUploadBinaries } = await import("./executa-upload-binaries-DrwpzQp3.js");
883
886
  process.exit(await runExecutaUploadBinaries({
884
887
  dir: opts.dir,
885
888
  dryRun: opts.dryRun,
@@ -993,7 +996,7 @@ program.command("publish").description("Auto-detect cwd and publish (apps publis
993
996
  console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
994
997
  process.exit(2);
995
998
  }
996
- const { runTopLevelPublish } = await import("./publish-DW_D3uQ4.js");
999
+ const { runTopLevelPublish } = await import("./publish-DwIJWl46.js");
997
1000
  process.exit(await runTopLevelPublish({
998
1001
  cwd: opts.cwd,
999
1002
  bump: opts.bump,
@@ -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";
@@ -2,8 +2,8 @@ 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";
5
+ import { loadExecutaManifest } from "./manifest-CAF3_r1T.js";
6
+ import { runExecutaPublish } from "./executa-publish-kh4Ucd3o.js";
7
7
  import { runExecutaInstall } from "./executa-install-Dz7hBUsn.js";
8
8
  import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-Cr3tKbux.js";
9
9
  import { join, resolve } from "node:path";
@@ -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.35",
4
4
  "description": "Anna App developer CLI: scaffold, validate, harness (Phase 2 MVP: init + validate).",
5
5
  "license": "MIT",
6
6
  "type": "module",