@lotics/cli 0.39.0 → 0.40.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.
@@ -96,6 +96,7 @@ function readAppMeta(projectDir) {
96
96
  // App row's icon/theme is preserved.
97
97
  icon: pkg.lotics.icon,
98
98
  theme: pkg.lotics.theme,
99
+ capabilities: pkg.lotics.capabilities,
99
100
  };
100
101
  }
101
102
  function writeAppMeta(projectDir, meta) {
@@ -349,6 +350,12 @@ export async function appDeploy(client, args) {
349
350
  // declares them (undefined ⇒ omitted ⇒ App row left untouched).
350
351
  icon: meta.icon,
351
352
  theme: meta.theme,
353
+ // Capabilities are manifest-authoritative (like workflows/queries, not
354
+ // like icon/theme): always send, defaulting to `{}` when the manifest
355
+ // declares none — so deleting the `capabilities` block turns every
356
+ // capability OFF on the next deploy (fail-safe; the declaration is the
357
+ // grant). The manifest is the only writer of capabilities.
358
+ capabilities: meta.capabilities ?? {},
352
359
  // Opt into destructive workflow removal. Default false — the server
353
360
  // rejects deploys whose manifest is missing aliases the App row has.
354
361
  force_workflow_sync: args.forceWorkflowSync,
package/dist/client.d.ts CHANGED
@@ -155,8 +155,10 @@ export declare class LoticsClient {
155
155
  offset?: number;
156
156
  sort?: AppQuerySortKey[];
157
157
  filter?: AppQueryFilter;
158
+ count?: boolean;
158
159
  }): Promise<{
159
160
  rows: unknown[];
161
+ total?: number;
160
162
  }>;
161
163
  appMembers(app_id: string, group_id?: string): Promise<{
162
164
  members: Array<{
@@ -238,6 +240,15 @@ export declare class LoticsClient {
238
240
  */
239
241
  icon?: string;
240
242
  theme?: Record<string, unknown>;
243
+ /**
244
+ * Opt-in app capabilities from `package.json#lotics.capabilities`. The CLI
245
+ * sends this on every deploy (defaulting to `{}`): the manifest is
246
+ * authoritative, so an empty/absent block turns every capability off.
247
+ * `comments: true` enables the members-only `useComments` primitive.
248
+ */
249
+ capabilities?: {
250
+ comments?: boolean;
251
+ };
241
252
  /**
242
253
  * Opt into destructive workflow removal. When false/absent, the server
243
254
  * rejects a deploy whose `workflows` map is missing aliases that exist
package/dist/client.js CHANGED
@@ -230,6 +230,12 @@ export class LoticsClient {
230
230
  if (args.theme !== undefined) {
231
231
  formData.append("theme", JSON.stringify(args.theme));
232
232
  }
233
+ // capabilities is manifest-authoritative — the caller always passes it
234
+ // (`{}` when none declared), so a deploy turns off any capability the
235
+ // manifest no longer declares. JSON-encoded.
236
+ if (args.capabilities !== undefined) {
237
+ formData.append("capabilities", JSON.stringify(args.capabilities));
238
+ }
233
239
  // Only post the override flag when the user explicitly opts in. The
234
240
  // server defaults to "honor the guard" — opt-in is loud, opt-out
235
241
  // requires intent.
@@ -32,6 +32,7 @@ export async function dispatchRpc(client, body) {
32
32
  offset: p.offset,
33
33
  sort: p.sort,
34
34
  filter: p.filter,
35
+ count: p.count,
35
36
  });
36
37
  }
37
38
  case "workflow": {