@lumerahq/cli 0.30.14 → 0.30.16

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 {
2
2
  userContextHeaders
3
- } from "./chunk-KZEOP5YF.js";
3
+ } from "./chunk-E7YZ6QS6.js";
4
4
  import {
5
5
  fetchWithRetry
6
6
  } from "./chunk-FJFIWC7G.js";
@@ -275,6 +275,11 @@ var ApiClient = class {
275
275
  body: JSON.stringify(def)
276
276
  });
277
277
  }
278
+ async deleteMailbox(id) {
279
+ await this.request(`/api/mailboxes/${encodeURIComponent(id)}`, {
280
+ method: "DELETE"
281
+ });
282
+ }
278
283
  // Agents
279
284
  async listAgents(opts) {
280
285
  const params = new URLSearchParams({ limit: "100" });
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createApiClient,
6
6
  isApiErrorStatus
7
- } from "./chunk-KZEOP5YF.js";
7
+ } from "./chunk-E7YZ6QS6.js";
8
8
  import {
9
9
  findProjectRoot,
10
10
  getAppName
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  deps,
3
3
  syncDeps
4
- } from "./chunk-2K2LYH5O.js";
4
+ } from "./chunk-ODANFLL7.js";
5
5
  import "./chunk-2CR762KB.js";
6
- import "./chunk-KZEOP5YF.js";
6
+ import "./chunk-E7YZ6QS6.js";
7
7
  import "./chunk-JLVVHTBY.js";
8
8
  import "./chunk-FJFIWC7G.js";
9
9
  import "./chunk-PNKVD2UK.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  dev
3
- } from "./chunk-ASPEK3I6.js";
3
+ } from "./chunk-2K4ZYGCE.js";
4
4
  import {
5
5
  syncDeps
6
- } from "./chunk-2K2LYH5O.js";
6
+ } from "./chunk-ODANFLL7.js";
7
7
  import {
8
8
  loadEnv
9
9
  } from "./chunk-2CR762KB.js";
10
10
  import {
11
11
  createApiClient
12
- } from "./chunk-KZEOP5YF.js";
12
+ } from "./chunk-E7YZ6QS6.js";
13
13
  import {
14
14
  findProjectRoot,
15
15
  getApiUrl,
package/dist/index.js CHANGED
@@ -240,32 +240,32 @@ async function main() {
240
240
  switch (command) {
241
241
  // Resource commands
242
242
  case "plan":
243
- await import("./resources-TZD6KV4M.js").then((m) => m.plan(args.slice(1)));
243
+ await import("./resources-LEDTATIA.js").then((m) => m.plan(args.slice(1)));
244
244
  break;
245
245
  case "apply":
246
- await import("./resources-TZD6KV4M.js").then((m) => m.apply(args.slice(1)));
246
+ await import("./resources-LEDTATIA.js").then((m) => m.apply(args.slice(1)));
247
247
  break;
248
248
  case "pull":
249
- await import("./resources-TZD6KV4M.js").then((m) => m.pull(args.slice(1)));
249
+ await import("./resources-LEDTATIA.js").then((m) => m.pull(args.slice(1)));
250
250
  break;
251
251
  case "destroy":
252
- await import("./resources-TZD6KV4M.js").then((m) => m.destroy(args.slice(1)));
252
+ await import("./resources-LEDTATIA.js").then((m) => m.destroy(args.slice(1)));
253
253
  break;
254
254
  case "list":
255
- await import("./resources-TZD6KV4M.js").then((m) => m.list(args.slice(1)));
255
+ await import("./resources-LEDTATIA.js").then((m) => m.list(args.slice(1)));
256
256
  break;
257
257
  case "show":
258
- await import("./resources-TZD6KV4M.js").then((m) => m.show(args.slice(1)));
258
+ await import("./resources-LEDTATIA.js").then((m) => m.show(args.slice(1)));
259
259
  break;
260
260
  case "diff":
261
- await import("./resources-TZD6KV4M.js").then((m) => m.diff(args.slice(1)));
261
+ await import("./resources-LEDTATIA.js").then((m) => m.diff(args.slice(1)));
262
262
  break;
263
263
  // Development
264
264
  case "dev":
265
- await import("./dev-XBOHUDPR.js").then((m) => m.dev(args.slice(1)));
265
+ await import("./dev-S5JVAXDD.js").then((m) => m.dev(args.slice(1)));
266
266
  break;
267
267
  case "run":
268
- await import("./run-EBTA3FKD.js").then((m) => m.run(args.slice(1)));
268
+ await import("./run-MSAMUYQH.js").then((m) => m.run(args.slice(1)));
269
269
  break;
270
270
  case "functions":
271
271
  await import("./functions-DZCNHDRJ.js").then(
@@ -279,10 +279,10 @@ async function main() {
279
279
  break;
280
280
  // Project
281
281
  case "init":
282
- await import("./init-L6D5OHMY.js").then((m) => m.init(args.slice(1)));
282
+ await import("./init-QVR42DUW.js").then((m) => m.init(args.slice(1)));
283
283
  break;
284
284
  case "register":
285
- await import("./register-SBXONOFY.js").then((m) => m.register(args.slice(1)));
285
+ await import("./register-G3YK77HE.js").then((m) => m.register(args.slice(1)));
286
286
  break;
287
287
  case "templates":
288
288
  await import("./templates-LNUOTNLN.js").then((m) => m.templates(subcommand, args.slice(2)));
@@ -299,7 +299,7 @@ async function main() {
299
299
  break;
300
300
  // Dependencies
301
301
  case "deps":
302
- await import("./deps-22CUIP2M.js").then((m) => m.deps(args.slice(1)));
302
+ await import("./deps-ZDRNDMUF.js").then((m) => m.deps(args.slice(1)));
303
303
  break;
304
304
  // Feature flags (read the in-sandbox snapshot)
305
305
  case "flags":
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  createApiClient,
14
14
  validateProjectNameLength
15
- } from "./chunk-KZEOP5YF.js";
15
+ } from "./chunk-E7YZ6QS6.js";
16
16
  import {
17
17
  getToken,
18
18
  init_auth,
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  createApiClient,
9
9
  validateProjectExternalId
10
- } from "./chunk-KZEOP5YF.js";
10
+ } from "./chunk-E7YZ6QS6.js";
11
11
  import {
12
12
  findProjectRoot,
13
13
  getAppName,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  deploy
3
- } from "./chunk-ASPEK3I6.js";
3
+ } from "./chunk-2K4ZYGCE.js";
4
4
  import {
5
5
  syncDeps
6
- } from "./chunk-2K2LYH5O.js";
6
+ } from "./chunk-ODANFLL7.js";
7
7
  import {
8
8
  loadEnv
9
9
  } from "./chunk-2CR762KB.js";
@@ -12,7 +12,7 @@ import {
12
12
  createApiClient,
13
13
  isApiErrorStatus,
14
14
  validateCollectionNameLength
15
- } from "./chunk-KZEOP5YF.js";
15
+ } from "./chunk-E7YZ6QS6.js";
16
16
  import {
17
17
  findProjectRoot,
18
18
  getApiUrl,
@@ -1529,6 +1529,8 @@ ${pc2.dim("Resources:")}
1529
1529
  agents/<name> Destroy single agent
1530
1530
  skills Destroy only project skills
1531
1531
  skills/<slug> Destroy single project skill
1532
+ mailboxes Destroy only mailboxes
1533
+ mailboxes/<slug> Destroy single mailbox
1532
1534
  app Delete app registration
1533
1535
 
1534
1536
  ${pc2.dim("Options:")}
@@ -1538,6 +1540,7 @@ ${pc2.dim("Options:")}
1538
1540
  ${pc2.dim("Examples:")}
1539
1541
  lumera destroy # Destroy everything
1540
1542
  lumera destroy collections/users # Destroy single collection
1543
+ lumera destroy mailboxes/support # Destroy single mailbox
1541
1544
  lumera destroy app # Delete app registration
1542
1545
  `);
1543
1546
  }
@@ -2161,7 +2164,7 @@ async function planMailboxes(api, localMailboxes) {
2161
2164
  resource: "mailbox",
2162
2165
  id: existing.id,
2163
2166
  name: mb.slug,
2164
- details: "description differs (read-only remotely; update in UI or DB)"
2167
+ details: "description differs (no update endpoint)"
2165
2168
  });
2166
2169
  }
2167
2170
  }
@@ -2178,7 +2181,7 @@ async function applyMailboxes(api, localMailboxes) {
2178
2181
  const localDesc = (mb.description ?? "").trim();
2179
2182
  const remoteDesc = (existing.description ?? "").trim();
2180
2183
  if (localDesc !== remoteDesc) {
2181
- console.log(pc2.yellow(" \u26A0"), `mailbox ${mb.slug}: description drift not reconcilable by CLI (no PATCH endpoint yet) \u2014 update in the UI or DB`);
2184
+ console.log(pc2.yellow(" \u26A0"), `mailbox ${mb.slug}: description drift not reconcilable by CLI (no PATCH endpoint yet)`);
2182
2185
  } else {
2183
2186
  console.log(pc2.green(" \u2713"), pc2.dim(`mailbox ${mb.slug} already exists (${existing.email})`));
2184
2187
  }
@@ -3471,6 +3474,17 @@ async function destroyResources(api, platformDir, resourceType, resourceName, sk
3471
3474
  }
3472
3475
  }
3473
3476
  }
3477
+ if (!resourceType || resourceType === "mailboxes") {
3478
+ const localMailboxes = loadLocalMailboxes(platformDir, resourceName || void 0);
3479
+ const remoteMailboxes = await api.listMailboxes();
3480
+ const remoteBySlug = new Map(remoteMailboxes.map((mailbox) => [mailbox.slug, mailbox]));
3481
+ for (const local of localMailboxes) {
3482
+ const remote = remoteBySlug.get(local.slug);
3483
+ if (remote) {
3484
+ toDelete.push({ type: "mailbox", id: local.slug, name: local.slug, remoteId: remote.id });
3485
+ }
3486
+ }
3487
+ }
3474
3488
  if (toDelete.length === 0) {
3475
3489
  console.log(pc2.green(" \u2713 No resources found to delete"));
3476
3490
  return;
@@ -3497,6 +3511,7 @@ async function destroyResources(api, platformDir, resourceType, resourceName, sk
3497
3511
  const skills = toDelete.filter((r) => r.type === "skill");
3498
3512
  const hooks = toDelete.filter((r) => r.type === "hook");
3499
3513
  const automations = toDelete.filter((r) => r.type === "automation");
3514
+ const mailboxes = toDelete.filter((r) => r.type === "mailbox");
3500
3515
  const collections = toDelete.filter((r) => r.type === "collection");
3501
3516
  let errors = 0;
3502
3517
  for (const resource of agents) {
@@ -3535,6 +3550,15 @@ async function destroyResources(api, platformDir, resourceType, resourceName, sk
3535
3550
  errors++;
3536
3551
  }
3537
3552
  }
3553
+ for (const resource of mailboxes) {
3554
+ try {
3555
+ await api.deleteMailbox(resource.remoteId);
3556
+ console.log(pc2.green(" \u2713"), `Deleted mailbox: ${resource.name}`);
3557
+ } catch (e) {
3558
+ console.log(pc2.red(" \u2717"), `Failed to delete mailbox ${resource.name}: ${e}`);
3559
+ errors++;
3560
+ }
3561
+ }
3538
3562
  const deletePlan = planCollectionDelete(collections, platformDir);
3539
3563
  if (deletePlan.cycleNames.length > 0 && !forceCycles) {
3540
3564
  console.log();
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2CR762KB.js";
4
4
  import {
5
5
  createApiClient
6
- } from "./chunk-KZEOP5YF.js";
6
+ } from "./chunk-E7YZ6QS6.js";
7
7
  import {
8
8
  findProjectRoot,
9
9
  getApiUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.30.14",
3
+ "version": "0.30.16",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {
@@ -24,7 +24,7 @@
24
24
  "check:ci": "biome check . && tsr generate && tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@lumerahq/ui": "^0.19.3",
27
+ "@lumerahq/ui": "^0.19.5",
28
28
  "@tanstack/react-query": "^5.90.11",
29
29
  "@tanstack/react-router": "1.155.0",
30
30
  "clsx": "^2.1.1",
@@ -12,8 +12,8 @@ importers:
12
12
  .:
13
13
  dependencies:
14
14
  '@lumerahq/ui':
15
- specifier: ^0.19.3
16
- version: 0.19.3(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
15
+ specifier: ^0.19.5
16
+ version: 0.19.5(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
17
17
  '@tanstack/react-query':
18
18
  specifier: ^5.90.11
19
19
  version: 5.101.0(react@19.2.7)
@@ -457,8 +457,8 @@ packages:
457
457
  '@jridgewell/trace-mapping@0.3.31':
458
458
  resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
459
459
 
460
- '@lumerahq/ui@0.19.3':
461
- resolution: {integrity: sha512-BsO2sxZ84aIOVkUJxaP66V143t/KMLg1ttz5eMt/DKWlrFBiyErAAV8tv+4mlr8g3d5AQB7zwlY+fyn+ZdBVVQ==}
460
+ '@lumerahq/ui@0.19.5':
461
+ resolution: {integrity: sha512-AkX13UMMEkkHLRktms6Gh6vrygcQbMWxq1Du07qNbiVcVCcAPMWr68chkLdUOM0/00Bgb7JfLu1jrodhtFlrGA==}
462
462
  peerDependencies:
463
463
  react: ^18.0.0 || ^19.0.0
464
464
  react-dom: ^18.0.0 || ^19.0.0
@@ -2311,7 +2311,7 @@ snapshots:
2311
2311
  '@jridgewell/resolve-uri': 3.1.2
2312
2312
  '@jridgewell/sourcemap-codec': 1.5.5
2313
2313
 
2314
- '@lumerahq/ui@0.19.3(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
2314
+ '@lumerahq/ui@0.19.5(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
2315
2315
  dependencies:
2316
2316
  '@base-ui/react': 1.5.0(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
2317
2317
  '@tanstack/react-query': 5.101.0(react@19.2.7)