@anna-ai/cli 0.1.28 → 0.1.30

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 (63) hide show
  1. package/dist/{_lifecycle-shared-BpSOfVCP.js → _lifecycle-shared-CUK2CE76.js} +1 -1
  2. package/dist/account-B6n0XkpV.js +30 -0
  3. package/dist/{agent-CaZVCPs6.js → agent-J2bELWfv.js} +1 -1
  4. package/dist/{app-bundle-upload-BhAYo6yj.js → app-bundle-upload-CPf_nGou.js} +2 -2
  5. package/dist/{app-cache-Bl7cE5fm.js → app-cache-BqnTkxUw.js} +1 -0
  6. package/dist/{apps-CCdtLmxQ.js → apps-73pdBAFE.js} +17 -1
  7. package/dist/{apps-3VcdHIBK.js → apps-BpJ-TvHP.js} +2 -2
  8. package/dist/{apps-cut-BOhg9RHy.js → apps-cut-C5SH9qZN.js} +11 -11
  9. package/dist/{apps-destructive-DWF4eTHn.js → apps-destructive-PY0wKjqu.js} +3 -3
  10. package/dist/{apps-discard-Dy3vzpCM.js → apps-discard-CfdkwUZ_.js} +11 -11
  11. package/dist/{apps-grants-DgvymPBT.js → apps-grants-BtXXiuJt.js} +2 -2
  12. package/dist/apps-publish-3wbhXfAg.js +14 -0
  13. package/dist/{apps-publish-Dgi4lBlu.js → apps-publish-B-ZVNmgn.js} +7 -7
  14. package/dist/{apps-push-DbUEFdCK.js → apps-push-Bh8zwT--.js} +12 -12
  15. package/dist/{apps-release-DJFG4BV3.js → apps-release-DNlN_8gz.js} +4 -4
  16. package/dist/apps-rename-slug-Bp-nQ_6I.js +62 -0
  17. package/dist/{apps-status-F6aVlzDW.js → apps-status-5DV9cY4A.js} +2 -2
  18. package/dist/{apps-submit-review-BVmZlhmB.js → apps-submit-review-DH-bzbDZ.js} +3 -3
  19. package/dist/{apps-sync-meta-CQQC_Heb.js → apps-sync-meta-DdPnXuIU.js} +4 -4
  20. package/dist/{apps-versions-BIKsJzIT.js → apps-versions-vGihRRje.js} +2 -2
  21. package/dist/bridge-CmoKMMcG.js +3 -0
  22. package/dist/{bundled-executas-DeBhDjd8.js → bundled-executas-06keEPP_.js} +1 -1
  23. package/dist/cli.js +61 -40
  24. package/dist/dev-C9VpI_AL.js +4 -0
  25. package/dist/{dev-DXODERsf.js → dev-aWkfWGLD.js} +5 -5
  26. package/dist/{dev-app-cache-TSjL4D4n.js → dev-app-cache-CP2P8SCZ.js} +1 -0
  27. package/dist/{doctor-DCsBgyRg.js → doctor-DnCYaREu.js} +1 -1
  28. package/dist/{executa-cache-Kx3rfQD-.js → executa-cache-B0O79Hpb.js} +1 -1
  29. package/dist/{executa-destructive-PL2ooHpZ.js → executa-destructive-8iSnfmcn.js} +3 -3
  30. package/dist/{executa-dev-Deo8ag5o.js → executa-dev-0XdBPTDy.js} +13 -10
  31. package/dist/{executa-install-BHQpOskj.js → executa-install-A-BgavhA.js} +2 -2
  32. package/dist/executa-install-Bc1WRrWu.js +7 -0
  33. package/dist/executa-publish-9XQRncyN.js +9 -0
  34. package/dist/{executa-publish-CkPAB34b.js → executa-publish-Xmm4DMO9.js} +4 -4
  35. package/dist/{executa-reads-CjGZq1yP.js → executa-reads-CjIr8BuD.js} +2 -2
  36. package/dist/{publish-BYWuujP3.js → publish-NTT1Libd.js} +10 -10
  37. package/dist/{sampling-BcML4teS.js → sampling-Cc0qaj8a.js} +92 -3
  38. package/dist/{server-F_VA-5tS.js → server-DtnMLKQS.js} +1 -1
  39. package/dist/{storage-CKTmE87u.js → storage-C95wApr2.js} +1 -1
  40. package/dist/{token-Cg7BZGp6.js → token-hGGfoge2.js} +1 -1
  41. package/dist/{working-orchestration-Pjm4YC_U.js → working-orchestration-CX0ONKIq.js} +30 -13
  42. package/package.json +1 -1
  43. package/dist/apps-publish-Do7M5je3.js +0 -14
  44. package/dist/bridge-6GIQG63S.js +0 -3
  45. package/dist/dev-CQkCFVXu.js +0 -4
  46. package/dist/executa-install-Bvf_Lvvg.js +0 -7
  47. package/dist/executa-publish-IXWSwva0.js +0 -9
  48. /package/dist/{bridge-DAY7bsje.js → bridge-DXH59CmP.js} +0 -0
  49. /package/dist/{bundled-executas-B6b8gIfp.js → bundled-executas-_H1A9M50.js} +0 -0
  50. /package/dist/{confirm-h_qMrx0I.js → confirm-BuT56E_B.js} +0 -0
  51. /package/dist/{dev-account-CGo8k9_2.js → dev-account-WXEjIE16.js} +0 -0
  52. /package/dist/{executa-cache-CXiEgFZY.js → executa-cache-Do1D7xC0.js} +0 -0
  53. /package/dist/{executa-init-DXea7yRN.js → executa-init-BCqJUZXT.js} +0 -0
  54. /package/dist/{executa-register-BUiPzPIU.js → executa-register-CMmlKyKB.js} +0 -0
  55. /package/dist/{executas-CK3er6f9.js → executas-BhFed1B-.js} +0 -0
  56. /package/dist/{fixture-BvP5umlN.js → fixture-BJqc1IfX.js} +0 -0
  57. /package/dist/{host_upload-BXeHTgJs.js → host_upload-sfo4UHlR.js} +0 -0
  58. /package/dist/{image-CSEXEfD-.js → image-Bdi4Hu0m.js} +0 -0
  59. /package/dist/{login-BGZjMAlh.js → login-CslsHbsq.js} +0 -0
  60. /package/dist/{logout-mh2_QlyM.js → logout-B4_b9ZL0.js} +0 -0
  61. /package/dist/{manifest-Bljz8Y6T.js → manifest-CMc7RM57.js} +0 -0
  62. /package/dist/{runner-BuYbm-ex.js → runner-DVu-o_U8.js} +0 -0
  63. /package/dist/{whoami-l_kIkfbI.js → whoami-ChzwOaN2.js} +0 -0
@@ -62,4 +62,4 @@ async function withErrorHandling(fn) {
62
62
  }
63
63
 
64
64
  //#endregion
65
- export { resolveClient, withErrorHandling };
65
+ export { reportError, resolveClient, withErrorHandling };
@@ -0,0 +1,30 @@
1
+ import "./credentials-BTv2IfUZ.js";
2
+ import { setDeveloperHandle } from "./apps-73pdBAFE.js";
3
+ import { CliError } from "./client-D-_z1ALk.js";
4
+ import { reportError, resolveClient } from "./_lifecycle-shared-CUK2CE76.js";
5
+ import { bold, dim, green, red } from "kleur/colors";
6
+
7
+ //#region src/commands/account.ts
8
+ async function runAccountSetHandle(opts) {
9
+ try {
10
+ const { client, host, source } = resolveClient({ account: opts.account });
11
+ if (!opts.json) console.log(dim(`using PAT from ${source} (host=${host})`));
12
+ const { handle } = await setDeveloperHandle(client, opts.handle);
13
+ if (opts.json) console.log(JSON.stringify({ handle }, null, 2));
14
+ else console.log(green(`✓ developer handle set to `) + bold(`@${handle}`) + "\n" + dim(` your apps are now published as @${handle}/<slug>.`));
15
+ return 0;
16
+ } catch (e) {
17
+ if (e instanceof CliError && e.status && e.status >= 400) {
18
+ const body = e.body;
19
+ const detail = body?.detail;
20
+ if (detail && typeof detail === "object" && detail.code) {
21
+ console.error(red(`✗ ${detail.code}: ${detail.message ?? "handle rejected"}`));
22
+ return e.exitCode;
23
+ }
24
+ }
25
+ return reportError(e);
26
+ }
27
+ }
28
+
29
+ //#endregion
30
+ export { runAccountSetHandle };
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { hostOf, mintAppSession, requireAccount, withCode } from "./dev-account-CGo8k9_2.js";
2
+ import { hostOf, mintAppSession, requireAccount, withCode } from "./dev-account-WXEjIE16.js";
3
3
  import { resolve } from "node:path";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
 
@@ -1,6 +1,6 @@
1
- import { finalizeBundle, finalizeWorkingBundle, getBundle, initBundle, initWorkingBundle, uploadBundleFile, uploadWorkingBundleFile } from "./apps-CCdtLmxQ.js";
1
+ import { finalizeBundle, finalizeWorkingBundle, getBundle, initBundle, initWorkingBundle, uploadBundleFile, uploadWorkingBundleFile } from "./apps-73pdBAFE.js";
2
2
  import { CliError } from "./client-D-_z1ALk.js";
3
- import { canonicalize } from "./executa-publish-CkPAB34b.js";
3
+ import { canonicalize } from "./executa-publish-Xmm4DMO9.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";
@@ -18,6 +18,7 @@ function readAppIdentity(cwd) {
18
18
  host: canonicalHost(raw.host),
19
19
  app_id: raw.app_id,
20
20
  slug: raw.slug,
21
+ handle: typeof raw.handle === "string" ? raw.handle : void 0,
21
22
  first_published_at: raw.first_published_at
22
23
  };
23
24
  } catch {}
@@ -104,6 +104,22 @@ async function getAppGrants(client, appId) {
104
104
  });
105
105
  return r.status === 404 ? null : r.data;
106
106
  }
107
+ /**
108
+ * Set (or rename) the caller's developer handle — the per-developer
109
+ * namespace for `@handle/slug` public app refs.
110
+ *
111
+ * `PUT /api/v1/developer/profile/handle`. Server validates the handle
112
+ * grammar/reserved words and uniqueness; renaming away from a handle that
113
+ * owns a published app is rejected (409 SLUG_FROZEN / manual flow).
114
+ */
115
+ async function setDeveloperHandle(client, handle) {
116
+ const r = await client.request({
117
+ method: "PUT",
118
+ path: "/api/v1/developer/profile/handle",
119
+ body: { handle }
120
+ });
121
+ return r.data;
122
+ }
107
123
  /** GET the bundle for a version, or `null` when none is initialized (404). */
108
124
  async function getBundle(client, appId, versionId) {
109
125
  const r = await client.request({
@@ -218,4 +234,4 @@ async function finalizeWorkingBundle(client, appId, skipRemoteCheck = false) {
218
234
  }
219
235
 
220
236
  //#endregion
221
- export { archiveApp, createApp, createVersion, cutWorkingDraft, deleteApp, deleteWorkingDraft, finalizeBundle, finalizeWorkingBundle, findAppBySlug, getApp, getAppGrants, getBundle, getWorkingDraft, initBundle, initWorkingBundle, listMyApps, listVersions, patchApp, publishVersion, submitForReview, unarchiveApp, unpublishApp, uploadBundleFile, uploadWorkingBundleFile, upsertWorkingDraft };
237
+ export { archiveApp, createApp, createVersion, cutWorkingDraft, deleteApp, deleteWorkingDraft, finalizeBundle, finalizeWorkingBundle, findAppBySlug, getApp, getAppGrants, getBundle, getWorkingDraft, initBundle, initWorkingBundle, listMyApps, listVersions, patchApp, publishVersion, setDeveloperHandle, submitForReview, unarchiveApp, unpublishApp, uploadBundleFile, uploadWorkingBundleFile, upsertWorkingDraft };
@@ -1,7 +1,7 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { listMyApps } from "./apps-CCdtLmxQ.js";
2
+ import { listMyApps } from "./apps-73pdBAFE.js";
3
3
  import "./client-D-_z1ALk.js";
4
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim, green, magenta, red, yellow } from "kleur/colors";
6
6
 
7
7
  //#region src/commands/apps.ts
@@ -1,17 +1,17 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
2
  import "./nexus-root-BlPwOusj.js";
3
- import { cutWorkingDraft } from "./apps-CCdtLmxQ.js";
3
+ import { cutWorkingDraft } from "./apps-73pdBAFE.js";
4
4
  import { CliError } from "./client-D-_z1ALk.js";
5
- import { readExecutasLock, writeExecutasLock } from "./bundled-executas-B6b8gIfp.js";
6
- import "./executas-CK3er6f9.js";
7
- import "./executa-cache-CXiEgFZY.js";
8
- import "./executa-publish-CkPAB34b.js";
9
- import "./manifest-Bljz8Y6T.js";
10
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
11
- import "./dev-DXODERsf.js";
12
- import "./executa-install-BHQpOskj.js";
13
- import "./app-cache-Bl7cE5fm.js";
14
- import { resolveAppBySlugOrCache } from "./working-orchestration-Pjm4YC_U.js";
5
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
6
+ import { readExecutasLock, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
7
+ import "./executas-BhFed1B-.js";
8
+ import "./executa-cache-Do1D7xC0.js";
9
+ import "./executa-publish-Xmm4DMO9.js";
10
+ import "./manifest-CMc7RM57.js";
11
+ import "./dev-aWkfWGLD.js";
12
+ import "./executa-install-A-BgavhA.js";
13
+ import "./app-cache-BqnTkxUw.js";
14
+ import { resolveAppBySlugOrCache } from "./working-orchestration-CX0ONKIq.js";
15
15
  import { resolve } from "node:path";
16
16
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
17
17
 
@@ -1,8 +1,8 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { archiveApp, deleteApp, findAppBySlug, unarchiveApp, unpublishApp } from "./apps-CCdtLmxQ.js";
2
+ import { archiveApp, deleteApp, findAppBySlug, unarchiveApp, unpublishApp } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
5
- import { ensureDestructiveAllowed } from "./confirm-h_qMrx0I.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
+ import { ensureDestructiveAllowed } from "./confirm-BuT56E_B.js";
6
6
  import { dim, green, yellow } from "kleur/colors";
7
7
 
8
8
  //#region src/commands/apps-destructive.ts
@@ -1,17 +1,17 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
2
  import "./nexus-root-BlPwOusj.js";
3
- import { deleteWorkingDraft, getWorkingDraft } from "./apps-CCdtLmxQ.js";
3
+ import { deleteWorkingDraft, getWorkingDraft } from "./apps-73pdBAFE.js";
4
4
  import "./client-D-_z1ALk.js";
5
- import "./bundled-executas-B6b8gIfp.js";
6
- import "./executas-CK3er6f9.js";
7
- import "./executa-cache-CXiEgFZY.js";
8
- import "./executa-publish-CkPAB34b.js";
9
- import "./manifest-Bljz8Y6T.js";
10
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
11
- import "./dev-DXODERsf.js";
12
- import "./executa-install-BHQpOskj.js";
13
- import "./app-cache-Bl7cE5fm.js";
14
- import { resolveAppBySlugOrCache } from "./working-orchestration-Pjm4YC_U.js";
5
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
6
+ import "./bundled-executas-_H1A9M50.js";
7
+ import "./executas-BhFed1B-.js";
8
+ import "./executa-cache-Do1D7xC0.js";
9
+ import "./executa-publish-Xmm4DMO9.js";
10
+ import "./manifest-CMc7RM57.js";
11
+ import "./dev-aWkfWGLD.js";
12
+ import "./executa-install-A-BgavhA.js";
13
+ import "./app-cache-BqnTkxUw.js";
14
+ import { resolveAppBySlugOrCache } from "./working-orchestration-CX0ONKIq.js";
15
15
  import { dim, green, yellow } from "kleur/colors";
16
16
 
17
17
  //#region src/commands/apps-discard.ts
@@ -1,7 +1,7 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getAppGrants } from "./apps-CCdtLmxQ.js";
2
+ import { findAppBySlug, getAppGrants } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim } from "kleur/colors";
6
6
 
7
7
  //#region src/commands/apps-grants.ts
@@ -0,0 +1,14 @@
1
+ import "./credentials-BTv2IfUZ.js";
2
+ import "./apps-73pdBAFE.js";
3
+ import "./client-D-_z1ALk.js";
4
+ import "./_lifecycle-shared-CUK2CE76.js";
5
+ import "./bundled-executas-_H1A9M50.js";
6
+ import "./executas-BhFed1B-.js";
7
+ import "./executa-cache-Do1D7xC0.js";
8
+ import "./executa-publish-Xmm4DMO9.js";
9
+ import "./manifest-CMc7RM57.js";
10
+ import "./app-cache-BqnTkxUw.js";
11
+ import "./app-bundle-upload-CPf_nGou.js";
12
+ import { runAppsPublish } from "./apps-publish-B-ZVNmgn.js";
13
+
14
+ export { runAppsPublish };
@@ -1,12 +1,12 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { createApp, createVersion, findAppBySlug, getApp } from "./apps-CCdtLmxQ.js";
2
+ import { createApp, createVersion, findAppBySlug, getApp } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-B6b8gIfp.js";
5
- import { bumpVersion, bundleHash, manifestHash, rewriteVersion, runExecutaPublish } from "./executa-publish-CkPAB34b.js";
6
- import { loadAppManifest } from "./manifest-Bljz8Y6T.js";
7
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
8
- import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-Bl7cE5fm.js";
9
- import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-BhAYo6yj.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
+ import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
6
+ import { bumpVersion, bundleHash, manifestHash, rewriteVersion, runExecutaPublish } from "./executa-publish-Xmm4DMO9.js";
7
+ import { loadAppManifest } from "./manifest-CMc7RM57.js";
8
+ import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-BqnTkxUw.js";
9
+ import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-CPf_nGou.js";
10
10
  import { resolve } from "node:path";
11
11
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
12
12
 
@@ -1,18 +1,18 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
2
  import "./nexus-root-BlPwOusj.js";
3
- import { getApp, getWorkingDraft, upsertWorkingDraft } from "./apps-CCdtLmxQ.js";
3
+ import { getApp, getWorkingDraft, upsertWorkingDraft } from "./apps-73pdBAFE.js";
4
4
  import { CliError } from "./client-D-_z1ALk.js";
5
- import "./bundled-executas-B6b8gIfp.js";
6
- import "./executas-CK3er6f9.js";
7
- import "./executa-cache-CXiEgFZY.js";
8
- import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-CkPAB34b.js";
9
- import { loadAppManifest } from "./manifest-Bljz8Y6T.js";
10
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
11
- import "./dev-DXODERsf.js";
12
- import "./executa-install-BHQpOskj.js";
13
- import "./app-cache-Bl7cE5fm.js";
14
- import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-Pjm4YC_U.js";
15
- import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-BhAYo6yj.js";
5
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
6
+ import "./bundled-executas-_H1A9M50.js";
7
+ import "./executas-BhFed1B-.js";
8
+ import "./executa-cache-Do1D7xC0.js";
9
+ import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-Xmm4DMO9.js";
10
+ import { loadAppManifest } from "./manifest-CMc7RM57.js";
11
+ import "./dev-aWkfWGLD.js";
12
+ import "./executa-install-A-BgavhA.js";
13
+ import "./app-cache-BqnTkxUw.js";
14
+ import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-CX0ONKIq.js";
15
+ import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-CPf_nGou.js";
16
16
  import { resolve } from "node:path";
17
17
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
18
18
 
@@ -1,8 +1,8 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, getBundle, listVersions, publishVersion } from "./apps-CCdtLmxQ.js";
2
+ import { findAppBySlug, getApp, getBundle, listVersions, publishVersion } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
5
- import { readAppIdentity } from "./app-cache-Bl7cE5fm.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
+ import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
6
6
  import { resolve } from "node:path";
7
7
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
8
8
 
@@ -58,7 +58,7 @@ async function runAppsRelease(opts) {
58
58
  if (!target) {
59
59
  if (opts.allowCreate) {
60
60
  if (!opts.json) console.log(yellow(`version ${opts.version} not found remotely; running 'apps publish' first (--allow-create)…`));
61
- const { runAppsPublish } = await import("./apps-publish-Do7M5je3.js");
61
+ const { runAppsPublish } = await import("./apps-publish-3wbhXfAg.js");
62
62
  const code = await runAppsPublish({
63
63
  cwd: opts.cwd,
64
64
  account: opts.account,
@@ -0,0 +1,62 @@
1
+ import "./credentials-BTv2IfUZ.js";
2
+ import { findAppBySlug, patchApp } from "./apps-73pdBAFE.js";
3
+ import { CliError } from "./client-D-_z1ALk.js";
4
+ import { reportError, resolveClient } from "./_lifecycle-shared-CUK2CE76.js";
5
+ import { loadAppManifest } from "./manifest-CMc7RM57.js";
6
+ import { readAppIdentity, writeAppIdentity } from "./app-cache-BqnTkxUw.js";
7
+ import { writeFileSync } from "node:fs";
8
+ import { bold, dim, green, red, yellow } from "kleur/colors";
9
+
10
+ //#region src/commands/apps-rename-slug.ts
11
+ async function runAppsRenameSlug(opts) {
12
+ const cwd = opts.cwd ?? process.cwd();
13
+ try {
14
+ const { client, host } = resolveClient({ account: opts.account });
15
+ const manifest = loadAppManifest(cwd, opts.manifest);
16
+ const oldSlug = manifest.slug;
17
+ if (oldSlug === opts.newSlug) {
18
+ console.error(yellow(`slug is already "${opts.newSlug}" — nothing to do.`));
19
+ return 0;
20
+ }
21
+ const identity = readAppIdentity(cwd);
22
+ let appId = identity && identity.host === host ? identity.app_id : void 0;
23
+ if (appId === void 0) {
24
+ const found = await findAppBySlug(client, oldSlug);
25
+ if (!found) {
26
+ console.error(red(`✗ no app found for slug "${oldSlug}" under this account.`));
27
+ return 4;
28
+ }
29
+ appId = found.id;
30
+ }
31
+ const updated = await patchApp(client, appId, { slug: opts.newSlug });
32
+ const nextMeta = {
33
+ ...manifest.metadataRaw,
34
+ slug: opts.newSlug
35
+ };
36
+ writeFileSync(manifest.metadataPath, JSON.stringify(nextMeta, null, 2) + "\n", "utf-8");
37
+ if (identity) writeAppIdentity(cwd, {
38
+ ...identity,
39
+ slug: opts.newSlug
40
+ });
41
+ if (opts.json) console.log(JSON.stringify({
42
+ id: appId,
43
+ old_slug: oldSlug,
44
+ slug: updated.slug ?? opts.newSlug
45
+ }, null, 2));
46
+ else console.log(green(`✓ renamed slug `) + bold(oldSlug) + green(` → `) + bold(updated.slug ?? opts.newSlug) + "\n" + dim(` updated ${manifest.metadataPath} and .anna/app.json.`));
47
+ return 0;
48
+ } catch (e) {
49
+ if (e instanceof CliError && e.status && e.status >= 400) {
50
+ const body = e.body;
51
+ const detail = body?.detail;
52
+ if (detail && typeof detail === "object" && detail.code) {
53
+ console.error(red(`✗ ${detail.code}: ${detail.message ?? "rename rejected"}`));
54
+ return e.exitCode;
55
+ }
56
+ }
57
+ return reportError(e);
58
+ }
59
+ }
60
+
61
+ //#endregion
62
+ export { runAppsRenameSlug };
@@ -1,7 +1,7 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, listVersions } from "./apps-CCdtLmxQ.js";
2
+ import { findAppBySlug, getApp, listVersions } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
6
6
 
7
7
  //#region src/commands/apps-status.ts
@@ -1,8 +1,8 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, submitForReview } from "./apps-CCdtLmxQ.js";
2
+ import { findAppBySlug, getApp, submitForReview } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
5
- import { readAppIdentity } from "./app-cache-Bl7cE5fm.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
+ import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
6
6
  import { resolve } from "node:path";
7
7
  import { bold, cyan, green } from "kleur/colors";
8
8
 
@@ -1,9 +1,9 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, patchApp } from "./apps-CCdtLmxQ.js";
2
+ import { findAppBySlug, getApp, patchApp } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { loadAppManifest } from "./manifest-Bljz8Y6T.js";
5
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
6
- import { readAppIdentity } from "./app-cache-Bl7cE5fm.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
+ import { loadAppManifest } from "./manifest-CMc7RM57.js";
6
+ import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
7
7
  import { resolve } from "node:path";
8
8
  import { bold, cyan, dim, green } from "kleur/colors";
9
9
 
@@ -1,7 +1,7 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, listVersions } from "./apps-CCdtLmxQ.js";
2
+ import { findAppBySlug, listVersions } from "./apps-73pdBAFE.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
4
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim, green } from "kleur/colors";
6
6
 
7
7
  //#region src/commands/apps-versions.ts
@@ -0,0 +1,3 @@
1
+ import { BridgeRequestError, PINNED_RUNTIME_VERSION, PythonBridge } from "./bridge-DXH59CmP.js";
2
+
3
+ export { PINNED_RUNTIME_VERSION, PythonBridge };
@@ -1,5 +1,5 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
2
  import "./client-D-_z1ALk.js";
3
- import { collectBundledHandles, lockPath, parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-B6b8gIfp.js";
3
+ import { collectBundledHandles, lockPath, parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
4
4
 
5
5
  export { substituteBundledRefs, writeBundleToolIdSidecar };