@anna-ai/cli 0.1.29 → 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 +59 -39
  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-DEpBrEIH.js → executa-dev-0XdBPTDy.js} +8 -8
  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/{server-F_VA-5tS.js → server-DtnMLKQS.js} +1 -1
  38. package/dist/{storage-CKTmE87u.js → storage-C95wApr2.js} +1 -1
  39. package/dist/{token-Cg7BZGp6.js → token-hGGfoge2.js} +1 -1
  40. package/dist/{working-orchestration-Pjm4YC_U.js → working-orchestration-CX0ONKIq.js} +30 -13
  41. package/package.json +1 -1
  42. package/dist/apps-publish-Do7M5je3.js +0 -14
  43. package/dist/bridge-6GIQG63S.js +0 -3
  44. package/dist/dev-CQkCFVXu.js +0 -4
  45. package/dist/executa-install-Bvf_Lvvg.js +0 -7
  46. package/dist/executa-publish-IXWSwva0.js +0 -9
  47. /package/dist/{bridge-DAY7bsje.js → bridge-DXH59CmP.js} +0 -0
  48. /package/dist/{bundled-executas-B6b8gIfp.js → bundled-executas-_H1A9M50.js} +0 -0
  49. /package/dist/{confirm-h_qMrx0I.js → confirm-BuT56E_B.js} +0 -0
  50. /package/dist/{dev-account-CGo8k9_2.js → dev-account-WXEjIE16.js} +0 -0
  51. /package/dist/{executa-cache-CXiEgFZY.js → executa-cache-Do1D7xC0.js} +0 -0
  52. /package/dist/{executa-init-DXea7yRN.js → executa-init-BCqJUZXT.js} +0 -0
  53. /package/dist/{executa-register-BUiPzPIU.js → executa-register-CMmlKyKB.js} +0 -0
  54. /package/dist/{executas-CK3er6f9.js → executas-BhFed1B-.js} +0 -0
  55. /package/dist/{fixture-BvP5umlN.js → fixture-BJqc1IfX.js} +0 -0
  56. /package/dist/{host_upload-BXeHTgJs.js → host_upload-sfo4UHlR.js} +0 -0
  57. /package/dist/{image-CSEXEfD-.js → image-Bdi4Hu0m.js} +0 -0
  58. /package/dist/{login-BGZjMAlh.js → login-CslsHbsq.js} +0 -0
  59. /package/dist/{logout-mh2_QlyM.js → logout-B4_b9ZL0.js} +0 -0
  60. /package/dist/{manifest-Bljz8Y6T.js → manifest-CMc7RM57.js} +0 -0
  61. /package/dist/{runner-BuYbm-ex.js → runner-DVu-o_U8.js} +0 -0
  62. /package/dist/{sampling-DwV7VPfT.js → sampling-Cc0qaj8a.js} +0 -0
  63. /package/dist/{whoami-l_kIkfbI.js → whoami-ChzwOaN2.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { hostOf, requireAccount, withCode } from "./dev-account-CGo8k9_2.js";
2
+ import { hostOf, 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
1
  import "./credentials-BTv2IfUZ.js";
2
2
  import "./client-D-_z1ALk.js";
3
- import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
3
+ import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
4
4
  import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
5
5
 
6
6
  //#region src/api/tokens.ts
@@ -1,11 +1,11 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { createApp, findAppBySlug, getApp } from "./apps-CCdtLmxQ.js";
2
+ import { createApp, 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 { runExecutaPublish } from "./executa-publish-CkPAB34b.js";
6
- import { loadExecutaManifest } from "./manifest-Bljz8Y6T.js";
7
- import { runExecutaInstall } from "./executa-install-BHQpOskj.js";
8
- import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-Bl7cE5fm.js";
4
+ import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
5
+ import { runExecutaPublish } from "./executa-publish-Xmm4DMO9.js";
6
+ import { loadExecutaManifest } from "./manifest-CMc7RM57.js";
7
+ import { runExecutaInstall } from "./executa-install-A-BgavhA.js";
8
+ import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-BqnTkxUw.js";
9
9
  import { join, resolve } from "node:path";
10
10
  import { dim, green, yellow } from "kleur/colors";
11
11
  import { homedir } from "node:os";
@@ -174,24 +174,40 @@ async function resolveAppIdentity(params) {
174
174
  const found = await findAppBySlug(client, manifest.slug);
175
175
  let appId;
176
176
  let serverSlug;
177
+ let serverHandle;
177
178
  let firstPublish = false;
178
179
  if (found) {
179
180
  appId = found.id;
180
181
  serverSlug = found.slug;
182
+ serverHandle = typeof found.handle === "string" ? found.handle : void 0;
181
183
  } else {
182
184
  if (dryRun) {
183
185
  if (!json) console.log(yellow(`[dry-run] would create AnnaApp slug=${manifest.slug}`));
184
186
  return null;
185
187
  }
186
- const created = await createApp(client, {
187
- slug: manifest.slug,
188
- name: manifest.name,
189
- category: manifest.category,
190
- tagline: manifest.tagline,
191
- description: manifest.description
192
- });
188
+ let created;
189
+ try {
190
+ created = await createApp(client, {
191
+ slug: manifest.slug,
192
+ name: manifest.name,
193
+ category: manifest.category,
194
+ tagline: manifest.tagline,
195
+ description: manifest.description
196
+ });
197
+ } catch (e) {
198
+ if (e instanceof CliError && e.status === 409) {
199
+ const body = e.body;
200
+ const code = body?.detail?.code;
201
+ if (code === "HANDLE_REQUIRED") throw new CliError("you must set a developer handle before creating an app.\n Run: anna-app account set-handle <handle>\n Your apps will then publish as @<handle>/" + manifest.slug + ".", 5, {
202
+ status: 409,
203
+ body
204
+ });
205
+ }
206
+ throw e;
207
+ }
193
208
  appId = created.id;
194
209
  serverSlug = created.slug;
210
+ serverHandle = typeof created.handle === "string" ? created.handle : void 0;
195
211
  firstPublish = true;
196
212
  }
197
213
  writeAppIdentity(cwd, {
@@ -199,6 +215,7 @@ async function resolveAppIdentity(params) {
199
215
  host: canonicalHost(host),
200
216
  app_id: appId,
201
217
  slug: serverSlug,
218
+ handle: serverHandle,
202
219
  first_published_at: cached?.first_published_at ?? new Date().toISOString()
203
220
  });
204
221
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anna-ai/cli",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "Anna App developer CLI: scaffold, validate, harness (Phase 2 MVP: init + validate).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,14 +0,0 @@
1
- import "./credentials-BTv2IfUZ.js";
2
- import "./apps-CCdtLmxQ.js";
3
- import "./client-D-_z1ALk.js";
4
- import "./bundled-executas-B6b8gIfp.js";
5
- import "./executas-CK3er6f9.js";
6
- import "./executa-cache-CXiEgFZY.js";
7
- import "./executa-publish-CkPAB34b.js";
8
- import "./manifest-Bljz8Y6T.js";
9
- import "./_lifecycle-shared-BpSOfVCP.js";
10
- import "./app-cache-Bl7cE5fm.js";
11
- import "./app-bundle-upload-BhAYo6yj.js";
12
- import { runAppsPublish } from "./apps-publish-Dgi4lBlu.js";
13
-
14
- export { runAppsPublish };
@@ -1,3 +0,0 @@
1
- import { BridgeRequestError, PINNED_RUNTIME_VERSION, PythonBridge } from "./bridge-DAY7bsje.js";
2
-
3
- export { PINNED_RUNTIME_VERSION, PythonBridge };
@@ -1,4 +0,0 @@
1
- import "./nexus-root-BlPwOusj.js";
2
- import { parseExecutaSpec, runDev } from "./dev-DXODERsf.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-CXiEgFZY.js";
4
- import "./dev-DXODERsf.js";
5
- import { runExecutaInstall } from "./executa-install-BHQpOskj.js";
6
-
7
- export { runExecutaInstall };
@@ -1,9 +0,0 @@
1
- import "./credentials-BTv2IfUZ.js";
2
- import "./client-D-_z1ALk.js";
3
- import "./executas-CK3er6f9.js";
4
- import "./executa-cache-CXiEgFZY.js";
5
- import { runExecutaPublish } from "./executa-publish-CkPAB34b.js";
6
- import "./manifest-Bljz8Y6T.js";
7
- import "./_lifecycle-shared-BpSOfVCP.js";
8
-
9
- export { runExecutaPublish };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes