@anna-ai/cli 0.1.30 → 0.1.33

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 (59) hide show
  1. package/dist/{account-B6n0XkpV.js → account-bqao7Gp5.js} +1 -1
  2. package/dist/{agent-J2bELWfv.js → agent-CzPryLi6.js} +1 -1
  3. package/dist/{app-bundle-upload-CPf_nGou.js → app-bundle-upload-CqT9KUOl.js} +2 -2
  4. package/dist/{apps-73pdBAFE.js → apps-DlVsVHQ5.js} +30 -1
  5. package/dist/{apps-cut-C5SH9qZN.js → apps-cut-8870xpk-.js} +6 -6
  6. package/dist/{apps-destructive-PY0wKjqu.js → apps-destructive-B6RFjokU.js} +1 -1
  7. package/dist/{apps-discard-CfdkwUZ_.js → apps-discard-hVZxAQyj.js} +6 -6
  8. package/dist/{apps-BpJ-TvHP.js → apps-dvknZYI2.js} +1 -1
  9. package/dist/{apps-grants-BtXXiuJt.js → apps-grants-DnXCnkH5.js} +1 -1
  10. package/dist/{apps-publish-B-ZVNmgn.js → apps-publish-BKqVsS1W.js} +10 -4
  11. package/dist/apps-publish-Djpw5cfG.js +15 -0
  12. package/dist/{apps-push-Bh8zwT--.js → apps-push-B3wZr9B4.js} +13 -7
  13. package/dist/{apps-release-DNlN_8gz.js → apps-release-CyAPmWPU.js} +6 -5
  14. package/dist/{apps-rename-slug-Bp-nQ_6I.js → apps-rename-slug-D2BrWasG.js} +2 -2
  15. package/dist/{apps-status-5DV9cY4A.js → apps-status-DV8V_y35.js} +2 -2
  16. package/dist/{apps-submit-review-DH-bzbDZ.js → apps-submit-review-DMFQI8JZ.js} +1 -1
  17. package/dist/{apps-sync-meta-DdPnXuIU.js → apps-sync-meta-BOb6J_wz.js} +25 -16
  18. package/dist/{apps-versions-vGihRRje.js → apps-versions-D1lixrmM.js} +1 -1
  19. package/dist/{bridge-DXH59CmP.js → bridge-CbjqAm0H.js} +1 -1
  20. package/dist/bridge-CzHB_IsQ.js +3 -0
  21. package/dist/cli.js +42 -41
  22. package/dist/dev-C3yWhzAp.js +4 -0
  23. package/dist/{dev-aWkfWGLD.js → dev-Re6NyNDS.js} +4 -4
  24. package/dist/{doctor-DnCYaREu.js → doctor-VrfEkedz.js} +1 -1
  25. package/dist/{executa-dev-0XdBPTDy.js → executa-dev-B5Uz982M.js} +8 -8
  26. package/dist/{executa-install-A-BgavhA.js → executa-install-BW9jjY7u.js} +1 -1
  27. package/dist/executa-install-Cyid8R7r.js +7 -0
  28. package/dist/{executa-publish-Xmm4DMO9.js → executa-publish-Ah6J7jYd.js} +1 -1
  29. package/dist/{executa-publish-9XQRncyN.js → executa-publish-DI_6M_ea.js} +2 -2
  30. package/dist/listing-meta-BlY7XMrw.js +117 -0
  31. package/dist/{manifest-CMc7RM57.js → manifest-DOMrcdCK.js} +16 -1
  32. package/dist/{publish-NTT1Libd.js → publish-GpvkaBIx.js} +6 -5
  33. package/dist/{runner-DVu-o_U8.js → runner-BxYjAmih.js} +9 -3
  34. package/dist/{server-DtnMLKQS.js → server-BMcGaUTy.js} +229 -5
  35. package/dist/{storage-C95wApr2.js → storage-BkF4XyI0.js} +3 -3
  36. package/dist/{working-orchestration-CX0ONKIq.js → working-orchestration-1jzRuk34.js} +4 -4
  37. package/package.json +3 -3
  38. package/templates/executa/go/main.go +1 -1
  39. package/templates/executa/node/plugin.mjs +1 -1
  40. package/templates/executa/python/__SLUG_PY___plugin.py +1 -1
  41. package/templates/minimal/executas/__SLUG__/__SLUG_PY___plugin.py +1 -1
  42. package/dist/apps-publish-3wbhXfAg.js +0 -14
  43. package/dist/bridge-CmoKMMcG.js +0 -3
  44. package/dist/dev-C9VpI_AL.js +0 -4
  45. package/dist/executa-install-Bc1WRrWu.js +0 -7
  46. /package/dist/{dev-account-WXEjIE16.js → dev-account-DqEFCmVg.js} +0 -0
  47. /package/dist/{dev-app-cache-CP2P8SCZ.js → dev-app-cache-Dv1dZ_bw.js} +0 -0
  48. /package/dist/{executa-destructive-8iSnfmcn.js → executa-destructive-Bz7vWxEO.js} +0 -0
  49. /package/dist/{executa-init-BCqJUZXT.js → executa-init-D-kWINZ3.js} +0 -0
  50. /package/dist/{executa-reads-CjIr8BuD.js → executa-reads-BXDJWWw6.js} +0 -0
  51. /package/dist/{executa-register-CMmlKyKB.js → executa-register-D5kvSSz_.js} +0 -0
  52. /package/dist/{fixture-BJqc1IfX.js → fixture-BUKQYR5e.js} +0 -0
  53. /package/dist/{host_upload-sfo4UHlR.js → host_upload-BVzAqvX1.js} +0 -0
  54. /package/dist/{image-Bdi4Hu0m.js → image-BLPyUbGQ.js} +0 -0
  55. /package/dist/{login-CslsHbsq.js → login-DhgBgsfx.js} +0 -0
  56. /package/dist/{logout-B4_b9ZL0.js → logout-VYDkLYAx.js} +0 -0
  57. /package/dist/{sampling-Cc0qaj8a.js → sampling-XBIEYU4A.js} +0 -0
  58. /package/dist/{token-hGGfoge2.js → token-uedeaAy7.js} +0 -0
  59. /package/dist/{whoami-ChzwOaN2.js → whoami-C_x26b_k.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { setDeveloperHandle } from "./apps-73pdBAFE.js";
2
+ import { setDeveloperHandle } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { reportError, resolveClient } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, dim, green, red } from "kleur/colors";
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { hostOf, mintAppSession, requireAccount, withCode } from "./dev-account-WXEjIE16.js";
2
+ import { hostOf, mintAppSession, requireAccount, withCode } from "./dev-account-DqEFCmVg.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-73pdBAFE.js";
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-Xmm4DMO9.js";
3
+ import { canonicalize } from "./executa-publish-Ah6J7jYd.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";
@@ -33,6 +33,35 @@ async function patchApp(client, appId, body) {
33
33
  });
34
34
  return r.data;
35
35
  }
36
+ /**
37
+ * Upload a store-listing logo from local bytes. The server normalizes raster
38
+ * images to a 256² WebP and stores SVGs verbatim (after an active-content
39
+ * check), writes the resulting CDN URL onto the app row, and returns it.
40
+ */
41
+ async function uploadAppLogo(client, appId, blob) {
42
+ const r = await client.request({
43
+ method: "POST",
44
+ path: `/api/v1/developer/apps/${appId}/logo`,
45
+ multipart: { fields: { file: blob } }
46
+ });
47
+ return r.data;
48
+ }
49
+ /**
50
+ * Upload a single store-listing screenshot from local bytes. The server
51
+ * normalizes raster images to WebP (aspect ratio preserved, long side capped),
52
+ * stores SVGs verbatim (after an active-content check), and returns the CDN
53
+ * URL. Unlike the logo, this does NOT mutate the app row — callers collect all
54
+ * resulting URLs (mixed with any passthrough externals) and persist the
55
+ * ordered list via `PATCH …/apps/{id}` `screenshots`.
56
+ */
57
+ async function uploadAppScreenshot(client, appId, blob) {
58
+ const r = await client.request({
59
+ method: "POST",
60
+ path: `/api/v1/developer/apps/${appId}/screenshots`,
61
+ multipart: { fields: { file: blob } }
62
+ });
63
+ return r.data;
64
+ }
36
65
  async function listVersions(client, appId) {
37
66
  const r = await client.request({ path: `/api/v1/developer/apps/${appId}/versions` });
38
67
  return Array.isArray(r.data) ? r.data : [];
@@ -234,4 +263,4 @@ async function finalizeWorkingBundle(client, appId, skipRemoteCheck = false) {
234
263
  }
235
264
 
236
265
  //#endregion
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 };
266
+ export { archiveApp, createApp, createVersion, cutWorkingDraft, deleteApp, deleteWorkingDraft, finalizeBundle, finalizeWorkingBundle, findAppBySlug, getApp, getAppGrants, getBundle, getWorkingDraft, initBundle, initWorkingBundle, listMyApps, listVersions, patchApp, publishVersion, setDeveloperHandle, submitForReview, unarchiveApp, unpublishApp, uploadAppLogo, uploadAppScreenshot, uploadBundleFile, uploadWorkingBundleFile, upsertWorkingDraft };
@@ -1,17 +1,17 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
2
  import "./nexus-root-BlPwOusj.js";
3
- import { cutWorkingDraft } from "./apps-73pdBAFE.js";
3
+ import { cutWorkingDraft } from "./apps-DlVsVHQ5.js";
4
4
  import { CliError } from "./client-D-_z1ALk.js";
5
5
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
6
6
  import { readExecutasLock, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
7
7
  import "./executas-BhFed1B-.js";
8
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";
9
+ import "./executa-publish-Ah6J7jYd.js";
10
+ import "./manifest-DOMrcdCK.js";
11
+ import "./dev-Re6NyNDS.js";
12
+ import "./executa-install-BW9jjY7u.js";
13
13
  import "./app-cache-BqnTkxUw.js";
14
- import { resolveAppBySlugOrCache } from "./working-orchestration-CX0ONKIq.js";
14
+ import { resolveAppBySlugOrCache } from "./working-orchestration-1jzRuk34.js";
15
15
  import { resolve } from "node:path";
16
16
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
17
17
 
@@ -1,5 +1,5 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { archiveApp, deleteApp, findAppBySlug, unarchiveApp, unpublishApp } from "./apps-73pdBAFE.js";
2
+ import { archiveApp, deleteApp, findAppBySlug, unarchiveApp, unpublishApp } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { ensureDestructiveAllowed } from "./confirm-BuT56E_B.js";
@@ -1,17 +1,17 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
2
  import "./nexus-root-BlPwOusj.js";
3
- import { deleteWorkingDraft, getWorkingDraft } from "./apps-73pdBAFE.js";
3
+ import { deleteWorkingDraft, getWorkingDraft } from "./apps-DlVsVHQ5.js";
4
4
  import "./client-D-_z1ALk.js";
5
5
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
6
6
  import "./bundled-executas-_H1A9M50.js";
7
7
  import "./executas-BhFed1B-.js";
8
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";
9
+ import "./executa-publish-Ah6J7jYd.js";
10
+ import "./manifest-DOMrcdCK.js";
11
+ import "./dev-Re6NyNDS.js";
12
+ import "./executa-install-BW9jjY7u.js";
13
13
  import "./app-cache-BqnTkxUw.js";
14
- import { resolveAppBySlugOrCache } from "./working-orchestration-CX0ONKIq.js";
14
+ import { resolveAppBySlugOrCache } from "./working-orchestration-1jzRuk34.js";
15
15
  import { dim, green, yellow } from "kleur/colors";
16
16
 
17
17
  //#region src/commands/apps-discard.ts
@@ -1,5 +1,5 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { listMyApps } from "./apps-73pdBAFE.js";
2
+ import { listMyApps } from "./apps-DlVsVHQ5.js";
3
3
  import "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim, green, magenta, red, yellow } from "kleur/colors";
@@ -1,5 +1,5 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getAppGrants } from "./apps-73pdBAFE.js";
2
+ import { findAppBySlug, getAppGrants } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim } from "kleur/colors";
@@ -1,12 +1,13 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { createApp, createVersion, findAppBySlug, getApp } from "./apps-73pdBAFE.js";
2
+ import { createApp, createVersion, findAppBySlug, getApp } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
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";
6
+ import { bumpVersion, bundleHash, manifestHash, rewriteVersion, runExecutaPublish } from "./executa-publish-Ah6J7jYd.js";
7
+ import { loadAppManifest } from "./manifest-DOMrcdCK.js";
8
8
  import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-BqnTkxUw.js";
9
- import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-CPf_nGou.js";
9
+ import { syncAppListingMeta } from "./listing-meta-BlY7XMrw.js";
10
+ import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-CqT9KUOl.js";
10
11
  import { resolve } from "node:path";
11
12
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
12
13
 
@@ -228,6 +229,11 @@ async function runAppsPublish(opts) {
228
229
  externalOrigins: Array.isArray(uiBundle.external_origins) ? uiBundle.external_origins : [],
229
230
  log: opts.json ? void 0 : (m) => console.log(dim(m))
230
231
  });
232
+ try {
233
+ await syncAppListingMeta(client, appId, manifest, { cwd });
234
+ } catch (err) {
235
+ if (!opts.json) console.log(yellow(`! listing metadata sync skipped: ${err.message}`));
236
+ }
231
237
  const finalApp = await getApp(client, appId);
232
238
  if (opts.json) {
233
239
  console.log(JSON.stringify({
@@ -0,0 +1,15 @@
1
+ import "./credentials-BTv2IfUZ.js";
2
+ import "./apps-DlVsVHQ5.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-Ah6J7jYd.js";
9
+ import "./manifest-DOMrcdCK.js";
10
+ import "./app-cache-BqnTkxUw.js";
11
+ import "./listing-meta-BlY7XMrw.js";
12
+ import "./app-bundle-upload-CqT9KUOl.js";
13
+ import { runAppsPublish } from "./apps-publish-BKqVsS1W.js";
14
+
15
+ export { runAppsPublish };
@@ -1,18 +1,19 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
2
  import "./nexus-root-BlPwOusj.js";
3
- import { getApp, getWorkingDraft, upsertWorkingDraft } from "./apps-73pdBAFE.js";
3
+ import { getApp, getWorkingDraft, upsertWorkingDraft } from "./apps-DlVsVHQ5.js";
4
4
  import { CliError } from "./client-D-_z1ALk.js";
5
5
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
6
6
  import "./bundled-executas-_H1A9M50.js";
7
7
  import "./executas-BhFed1B-.js";
8
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";
9
+ import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-Ah6J7jYd.js";
10
+ import { loadAppManifest } from "./manifest-DOMrcdCK.js";
11
+ import "./dev-Re6NyNDS.js";
12
+ import "./executa-install-BW9jjY7u.js";
13
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";
14
+ import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-1jzRuk34.js";
15
+ import { syncAppListingMeta } from "./listing-meta-BlY7XMrw.js";
16
+ import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-CqT9KUOl.js";
16
17
  import { resolve } from "node:path";
17
18
  import { bold, cyan, dim, green, yellow } from "kleur/colors";
18
19
 
@@ -97,6 +98,11 @@ async function runAppsPush(opts) {
97
98
  log: opts.json ? void 0 : (m) => console.log(dim(m))
98
99
  });
99
100
  }
101
+ try {
102
+ await syncAppListingMeta(client, appId, manifest, { cwd });
103
+ } catch (err) {
104
+ if (!opts.json) console.log(yellow(`! listing metadata sync skipped: ${err.message}`));
105
+ }
100
106
  const finalApp = await getApp(client, appId);
101
107
  const draft = await getWorkingDraft(client, appId);
102
108
  if (opts.json) {
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, getBundle, listVersions, publishVersion } from "./apps-73pdBAFE.js";
2
+ import { findAppBySlug, getApp, getBundle, listVersions, publishVersion } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
@@ -32,9 +32,10 @@ function declaresUiBundle(version) {
32
32
  return typeof entry === "string" && entry.length > 0;
33
33
  }
34
34
  function statusGuard(app) {
35
- if (app.status === "APPROVED" || app.status === "PUBLISHED") return;
35
+ const status = (app.status ?? "").toUpperCase();
36
+ if (status === "APPROVED" || status === "PUBLISHED") return;
36
37
  let hint;
37
- switch (app.status) {
38
+ switch (status) {
38
39
  case "DRAFT":
39
40
  case "REJECTED":
40
41
  hint = "submit for review first: `anna-app apps submit-review`";
@@ -58,7 +59,7 @@ async function runAppsRelease(opts) {
58
59
  if (!target) {
59
60
  if (opts.allowCreate) {
60
61
  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-3wbhXfAg.js");
62
+ const { runAppsPublish } = await import("./apps-publish-Djpw5cfG.js");
62
63
  const code = await runAppsPublish({
63
64
  cwd: opts.cwd,
64
65
  account: opts.account,
@@ -76,7 +77,7 @@ async function runAppsRelease(opts) {
76
77
  if (!bundle || bundle.status !== "bundle_ready") throw new CliError(`version ${opts.version} declares a UI bundle but it is not finalized (status=${bundle?.status ?? "missing"}) — re-run 'anna-app apps publish'`, 4);
77
78
  }
78
79
  statusGuard(app);
79
- if (target.is_latest && app.status === "PUBLISHED") {
80
+ if (target.is_latest && (app.status ?? "").toUpperCase() === "PUBLISHED") {
80
81
  if (opts.json) {
81
82
  console.log(JSON.stringify({
82
83
  host,
@@ -1,8 +1,8 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, patchApp } from "./apps-73pdBAFE.js";
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-CUK2CE76.js";
5
- import { loadAppManifest } from "./manifest-CMc7RM57.js";
5
+ import { loadAppManifest } from "./manifest-DOMrcdCK.js";
6
6
  import { readAppIdentity, writeAppIdentity } from "./app-cache-BqnTkxUw.js";
7
7
  import { writeFileSync } from "node:fs";
8
8
  import { bold, dim, green, red, yellow } from "kleur/colors";
@@ -1,5 +1,5 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, listVersions } from "./apps-73pdBAFE.js";
2
+ import { findAppBySlug, getApp, listVersions } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
@@ -45,7 +45,7 @@ async function runAppsStatus(opts) {
45
45
  });
46
46
  }
47
47
  function colorStatus(s) {
48
- switch (s) {
48
+ switch (s.toUpperCase()) {
49
49
  case "PUBLISHED": return green(s);
50
50
  case "PENDING_REVIEW": return yellow(s);
51
51
  case "REJECTED": return red(s);
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, submitForReview } from "./apps-73pdBAFE.js";
2
+ import { findAppBySlug, getApp, submitForReview } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
@@ -1,9 +1,10 @@
1
1
  import { canonicalHost } from "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, getApp, patchApp } from "./apps-73pdBAFE.js";
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-CUK2CE76.js";
5
- import { loadAppManifest } from "./manifest-CMc7RM57.js";
5
+ import { loadAppManifest } from "./manifest-DOMrcdCK.js";
6
6
  import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
7
+ import { syncAppListingMeta } from "./listing-meta-BlY7XMrw.js";
7
8
  import { resolve } from "node:path";
8
9
  import { bold, cyan, dim, green } from "kleur/colors";
9
10
 
@@ -27,27 +28,31 @@ async function runAppsSyncMeta(opts) {
27
28
  }
28
29
  }
29
30
  if (appId === null) throw new CliError(`no app with slug "${manifest.slug}" on ${host} — run 'anna-app apps publish' first`, 5);
30
- const meta = {
31
- name: manifest.name,
32
- category: manifest.category,
33
- tagline: manifest.tagline,
34
- description: manifest.description
35
- };
31
+ const sync = await syncAppListingMeta(client, appId, manifest, {
32
+ cwd,
33
+ logoOverride: opts.logo,
34
+ dryRun: opts.dryRun
35
+ });
36
+ const meta = sync.meta;
36
37
  if (opts.dryRun) {
38
+ const plan = {
39
+ host,
40
+ app_id: appId,
41
+ slug: serverSlug,
42
+ meta,
43
+ logo: sync.logoUpload?.source,
44
+ screenshots: sync.screenshotUploads?.map((s) => s.source),
45
+ dry_run: true
46
+ };
37
47
  if (opts.json) {
38
- console.log(JSON.stringify({
39
- host,
40
- app_id: appId,
41
- slug: serverSlug,
42
- meta,
43
- dry_run: true
44
- }, null, 2));
48
+ console.log(JSON.stringify(plan, null, 2));
45
49
  return 0;
46
50
  }
47
51
  console.log(`[dry-run] would PATCH apps/${serverSlug} metadata: ` + JSON.stringify(meta));
52
+ if (sync.logoUpload) console.log(`[dry-run] would upload logo from ${sync.logoUpload.source}`);
53
+ for (const shot of sync.screenshotUploads ?? []) console.log(`[dry-run] would upload screenshot from ${shot.source}`);
48
54
  return 0;
49
55
  }
50
- await patchApp(client, appId, meta);
51
56
  const finalApp = await getApp(client, appId);
52
57
  if (opts.json) {
53
58
  console.log(JSON.stringify({
@@ -55,6 +60,8 @@ async function runAppsSyncMeta(opts) {
55
60
  app_id: appId,
56
61
  slug: serverSlug,
57
62
  meta,
63
+ logo_url: sync.logoUpload?.logo_url,
64
+ screenshot_urls: sync.screenshotUploads?.map((s) => s.screenshot_url),
58
65
  status: finalApp.status
59
66
  }, null, 2));
60
67
  return 0;
@@ -63,6 +70,8 @@ async function runAppsSyncMeta(opts) {
63
70
  console.log(` ${dim("name :")} ${manifest.name}`);
64
71
  if (manifest.category) console.log(` ${dim("category :")} ${manifest.category}`);
65
72
  if (manifest.tagline) console.log(` ${dim("tagline :")} ${manifest.tagline}`);
73
+ if (sync.logoUpload?.logo_url) console.log(` ${dim("logo :")} ${sync.logoUpload.logo_url}`);
74
+ if (sync.screenshotUploads && sync.screenshotUploads.length > 0) console.log(` ${dim("shots :")} ${sync.screenshotUploads.length} uploaded`);
66
75
  console.log(bold(cyan(`status: ${finalApp.status}`)));
67
76
  return 0;
68
77
  });
@@ -1,5 +1,5 @@
1
1
  import "./credentials-BTv2IfUZ.js";
2
- import { findAppBySlug, listVersions } from "./apps-73pdBAFE.js";
2
+ import { findAppBySlug, listVersions } from "./apps-DlVsVHQ5.js";
3
3
  import { CliError } from "./client-D-_z1ALk.js";
4
4
  import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
5
5
  import { bold, cyan, dim, green } from "kleur/colors";
@@ -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.0a9";
12
+ const PINNED_RUNTIME_VERSION = "0.2.0a11";
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-CbjqAm0H.js";
2
+
3
+ export { PINNED_RUNTIME_VERSION, PythonBridge };