@lotics/cli 0.36.2 → 0.38.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/client.d.ts CHANGED
@@ -130,9 +130,19 @@ export declare class LoticsClient {
130
130
  appQuery(app_id: string, body: {
131
131
  alias: string;
132
132
  params?: Record<string, unknown>;
133
+ limit?: number;
134
+ offset?: number;
133
135
  }): Promise<{
134
136
  rows: unknown[];
135
137
  }>;
138
+ appMembers(app_id: string, group_id?: string): Promise<{
139
+ members: Array<{
140
+ id: string;
141
+ name: string | null;
142
+ email: string | null;
143
+ image: string | null;
144
+ }>;
145
+ }>;
136
146
  /**
137
147
  * Execute a workflow by alias declared in package.json#lotics.workflows.
138
148
  * Mirrors POST /v1/apps/{app_id}/workflows/{alias}/execute.
package/dist/client.js CHANGED
@@ -176,6 +176,10 @@ export class LoticsClient {
176
176
  async appQuery(app_id, body) {
177
177
  return this.request("POST", `/v1/apps/${encodeURIComponent(app_id)}/query`, body);
178
178
  }
179
+ async appMembers(app_id, group_id) {
180
+ const qs = group_id ? `?group_id=${encodeURIComponent(group_id)}` : "";
181
+ return this.request("GET", `/v1/apps/${encodeURIComponent(app_id)}/members${qs}`);
182
+ }
179
183
  /**
180
184
  * Execute a workflow by alias declared in package.json#lotics.workflows.
181
185
  * Mirrors POST /v1/apps/{app_id}/workflows/{alias}/execute.
@@ -6,7 +6,7 @@
6
6
  * { message }. Same shape as the production iframe-host's error path.
7
7
  */
8
8
  import { LoticsClient } from "../client.js";
9
- export type RpcOp = "query" | "workflow" | "upload_url" | "upload_complete";
9
+ export type RpcOp = "query" | "workflow" | "members" | "upload_url" | "upload_complete";
10
10
  export interface RpcRequest {
11
11
  app_id: string;
12
12
  op: RpcOp;
@@ -8,6 +8,7 @@
8
8
  const SUPPORTED_OPS = new Set([
9
9
  "query",
10
10
  "workflow",
11
+ "members",
11
12
  "upload_url",
12
13
  "upload_complete",
13
14
  ]);
@@ -24,7 +25,12 @@ export async function dispatchRpc(client, body) {
24
25
  if (!p || typeof p.alias !== "string") {
25
26
  throw new Error("query payload must include `alias`");
26
27
  }
27
- return client.appQuery(body.app_id, { alias: p.alias, params: p.params });
28
+ return client.appQuery(body.app_id, {
29
+ alias: p.alias,
30
+ params: p.params,
31
+ limit: p.limit,
32
+ offset: p.offset,
33
+ });
28
34
  }
29
35
  case "workflow": {
30
36
  const p = body.payload;
@@ -33,6 +39,10 @@ export async function dispatchRpc(client, body) {
33
39
  }
34
40
  return client.appWorkflow(body.app_id, p.alias, p.inputs);
35
41
  }
42
+ case "members": {
43
+ const p = body.payload;
44
+ return client.appMembers(body.app_id, p?.group);
45
+ }
36
46
  case "upload_url": {
37
47
  const p = body.payload;
38
48
  if (!p ||
package/dist/src/cli.js CHANGED
@@ -31841,6 +31841,10 @@ var LoticsClient = class {
31841
31841
  async appQuery(app_id, body) {
31842
31842
  return this.request("POST", `/v1/apps/${encodeURIComponent(app_id)}/query`, body);
31843
31843
  }
31844
+ async appMembers(app_id, group_id) {
31845
+ const qs = group_id ? `?group_id=${encodeURIComponent(group_id)}` : "";
31846
+ return this.request("GET", `/v1/apps/${encodeURIComponent(app_id)}/members${qs}`);
31847
+ }
31844
31848
  /**
31845
31849
  * Execute a workflow by alias declared in package.json#lotics.workflows.
31846
31850
  * Mirrors POST /v1/apps/{app_id}/workflows/{alias}/execute.
@@ -32720,6 +32724,7 @@ import { spawn } from "node:child_process";
32720
32724
  var SUPPORTED_OPS = /* @__PURE__ */ new Set([
32721
32725
  "query",
32722
32726
  "workflow",
32727
+ "members",
32723
32728
  "upload_url",
32724
32729
  "upload_complete"
32725
32730
  ]);
@@ -32736,7 +32741,12 @@ async function dispatchRpc(client, body) {
32736
32741
  if (!p || typeof p.alias !== "string") {
32737
32742
  throw new Error("query payload must include `alias`");
32738
32743
  }
32739
- return client.appQuery(body.app_id, { alias: p.alias, params: p.params });
32744
+ return client.appQuery(body.app_id, {
32745
+ alias: p.alias,
32746
+ params: p.params,
32747
+ limit: p.limit,
32748
+ offset: p.offset
32749
+ });
32740
32750
  }
32741
32751
  case "workflow": {
32742
32752
  const p = body.payload;
@@ -32745,6 +32755,10 @@ async function dispatchRpc(client, body) {
32745
32755
  }
32746
32756
  return client.appWorkflow(body.app_id, p.alias, p.inputs);
32747
32757
  }
32758
+ case "members": {
32759
+ const p = body.payload;
32760
+ return client.appMembers(body.app_id, p?.group);
32761
+ }
32748
32762
  case "upload_url": {
32749
32763
  const p = body.payload;
32750
32764
  if (!p || typeof p.filename !== "string" || typeof p.mime_type !== "string" || typeof p.file_size !== "number") {
@@ -42386,7 +42400,7 @@ function parseExcelFromZip(zip) {
42386
42400
  let visibleIndex = 0;
42387
42401
  for (let i = 0; i < workbookInfo.sheets.length; i++) {
42388
42402
  const sheetInfo = workbookInfo.sheets[i];
42389
- if (sheetInfo.state === "hidden" || sheetInfo.state === "veryHidden") continue;
42403
+ const isHidden = sheetInfo.state === "hidden" || sheetInfo.state === "veryHidden";
42390
42404
  const relTarget = wbRels.get(sheetInfo.rId);
42391
42405
  if (!relTarget) continue;
42392
42406
  const sheetPath = relTarget.startsWith("/") ? relTarget.slice(1) : `xl/${relTarget}`;
@@ -42406,6 +42420,7 @@ function parseExcelFromZip(zip) {
42406
42420
  workbookInfo.date1904
42407
42421
  );
42408
42422
  parsed.name = sheetInfo.name;
42423
+ if (isHidden) parsed.hidden = true;
42409
42424
  const printTitlesRaw = workbookInfo.printTitlesBySheet.get(i);
42410
42425
  if (printTitlesRaw) {
42411
42426
  const pt = parsePrintTitlesRef(printTitlesRaw);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.36.2",
3
+ "version": "0.38.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {