@lotics/cli 0.163.0 → 0.165.0

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.
package/dist/src/cli.js CHANGED
@@ -44480,6 +44480,16 @@ var LoticsClient = class {
44480
44480
  async retirePackage(package_id, body) {
44481
44481
  return this.request("POST", `/v1/packages/${encodeURIComponent(package_id)}/retire`, body);
44482
44482
  }
44483
+ /**
44484
+ * Edit a starter's registry listing — the name and description a stranger
44485
+ * reads before copying, and what every copy's app row is created from.
44486
+ *
44487
+ * A version is an immutable snapshot; the listing is not. Omit a field to
44488
+ * leave it, pass `description: null` to clear it. Owner-org admin-only.
44489
+ */
44490
+ async editPackageListing(package_id, body) {
44491
+ return this.request("POST", `/v1/packages/${encodeURIComponent(package_id)}/listing`, body);
44492
+ }
44483
44493
  // --- Packages (registry reads + installations) ---
44484
44494
  // Authoring is server-side: apps via `POST /v1/apps/{id}/package-publish|release`,
44485
44495
  // content packages via the `publish_content`/`release_content` tools. There is no
@@ -62975,7 +62985,20 @@ var readSourceSchema = zod_default.discriminatedUnion("from", [
62975
62985
  zod_default.object({ from: zod_default.literal("trigger_record") }),
62976
62986
  zod_default.object({ from: zod_default.literal("trigger_record_prev") }),
62977
62987
  zod_default.object({ from: zod_default.literal("trigger_changes") }),
62978
- zod_default.object({ from: zod_default.literal("foreach_item") }),
62988
+ // `name` is the loop's bind name, and it is OPTIONAL for one reason: every
62989
+ // body stored before names existed emits the bare form, and those resolve to
62990
+ // the innermost frame — today's behaviour, and correct for any loop that is
62991
+ // not nested. Without a name a read inside a NESTED loop cannot say which
62992
+ // loop it means, so both binds resolve to the inner item and a join between
62993
+ // two collections silently matches nothing. The parser emits the name now, so
62994
+ // a body gets correct nesting the first time it is saved through it.
62995
+ zod_default.object({ from: zod_default.literal("foreach_item"), name: zod_default.string().min(1).optional() }),
62996
+ // No `name` here, deliberately: the JS surface spells the index as one
62997
+ // reserved `index` keyword with no per-loop form, so the innermost loop is
62998
+ // the only thing a read can mean. A name would be representable, honoured at
62999
+ // run time, and silently rewritten to the innermost by the renderer — which
63000
+ // prints every index as `index` — reintroducing the corruption above for a
63001
+ // case nothing can author.
62979
63002
  zod_default.object({ from: zod_default.literal("foreach_index") }),
62980
63003
  zod_default.object({
62981
63004
  from: zod_default.literal("step_output"),
@@ -69170,7 +69193,7 @@ function walkRead(node, scope) {
69170
69193
  return readFromLambdaParam(root, chain2);
69171
69194
  }
69172
69195
  if (scope.foreachBinds.includes(root)) {
69173
- return readFromForeachItem(chain2);
69196
+ return readFromForeachItem(root, chain2);
69174
69197
  }
69175
69198
  if (scope.stepIds.has(root)) {
69176
69199
  return readFromStepOutput(root, chain2);
@@ -69296,10 +69319,13 @@ function readFromRuntime(chain2) {
69296
69319
  return { kind: "read", source, path: path14 };
69297
69320
  });
69298
69321
  }
69299
- function readFromForeachItem(chain2) {
69322
+ function readFromForeachItem(name2, chain2) {
69300
69323
  return wrapOptionalGuards(chain2, (segments) => ({
69301
69324
  kind: "read",
69302
- source: { from: "foreach_item" },
69325
+ // NAMED, so a read inside a nested loop says which loop it means. Without
69326
+ // it both binds resolved to the innermost item, and a join between two
69327
+ // collections matched nothing while the workflow reported success.
69328
+ source: { from: "foreach_item", name: name2 },
69303
69329
  path: classifyRecordPath(segments)
69304
69330
  }));
69305
69331
  }
@@ -70255,7 +70281,11 @@ function walkForOf(stmt, scope, stepIds, opts, stepId, description, nextSyntheti
70255
70281
  type: "bind",
70256
70282
  expression: patternEntryExpression(entry, {
70257
70283
  kind: "read",
70258
- source: { from: "foreach_item" },
70284
+ // The loop's synthetic bind name, stated rather than left to the
70285
+ // innermost-frame fallback — these bind steps happen to run where
70286
+ // this loop IS innermost, and naming it keeps that true if the
70287
+ // lowering ever moves.
70288
+ source: { from: "foreach_item", name: bindName },
70259
70289
  path: [entry.segment]
70260
70290
  })
70261
70291
  });
@@ -328,6 +328,26 @@ export declare class LoticsClient {
328
328
  name: string;
329
329
  retired_at: string | null;
330
330
  }>;
331
+ /**
332
+ * Edit a starter's registry listing — the name and description a stranger
333
+ * reads before copying, and what every copy's app row is created from.
334
+ *
335
+ * A version is an immutable snapshot; the listing is not. Omit a field to
336
+ * leave it, pass `description: null` to clear it. Owner-org admin-only.
337
+ */
338
+ editPackageListing(package_id: string, body: {
339
+ name?: string;
340
+ description?: string | null;
341
+ icon?: string | null;
342
+ theme?: {
343
+ color: string;
344
+ } | null;
345
+ }): Promise<{
346
+ id: string;
347
+ name: string;
348
+ description: string | null;
349
+ icon?: string | null;
350
+ }>;
331
351
  /**
332
352
  * The starters this organization can copy — Lotics-reviewed ones plus its own,
333
353
  * never a catalogue of everything published. The server returns exactly what
@@ -257,6 +257,16 @@ export class LoticsClient {
257
257
  async retirePackage(package_id, body) {
258
258
  return this.request("POST", `/v1/packages/${encodeURIComponent(package_id)}/retire`, body);
259
259
  }
260
+ /**
261
+ * Edit a starter's registry listing — the name and description a stranger
262
+ * reads before copying, and what every copy's app row is created from.
263
+ *
264
+ * A version is an immutable snapshot; the listing is not. Omit a field to
265
+ * leave it, pass `description: null` to clear it. Owner-org admin-only.
266
+ */
267
+ async editPackageListing(package_id, body) {
268
+ return this.request("POST", `/v1/packages/${encodeURIComponent(package_id)}/listing`, body);
269
+ }
260
270
  // --- Packages (registry reads + installations) ---
261
271
  // Authoring is server-side: apps via `POST /v1/apps/{id}/package-publish|release`,
262
272
  // content packages via the `publish_content`/`release_content` tools. There is no
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.163.0",
3
+ "version": "0.165.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {