@lotics/cli 0.94.0 → 0.94.1

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
@@ -30263,6 +30263,27 @@ var LoticsClient = class {
30263
30263
  `/v1/apps/${encodeURIComponent(app_id)}/agent-runs?session_id=${encodeURIComponent(session_id)}`
30264
30264
  );
30265
30265
  }
30266
+ /**
30267
+ * A single run by id — the poll read a client follows after its stream drops
30268
+ * (a parked `awaiting_input` row carries `pending_interactive` so the question
30269
+ * survives reconnection). Mirrors GET /v1/apps/{app_id}/agent-runs/{run_id}.
30270
+ */
30271
+ async getAgentRun(app_id, run_id) {
30272
+ return this.request(
30273
+ "GET",
30274
+ `/v1/apps/${encodeURIComponent(app_id)}/agent-runs/${encodeURIComponent(run_id)}`
30275
+ );
30276
+ }
30277
+ /**
30278
+ * Request cancellation of an in-flight (or parked) run. Mirrors
30279
+ * POST /v1/apps/{app_id}/agent-runs/{run_id}/cancel.
30280
+ */
30281
+ async cancelAgentRun(app_id, run_id) {
30282
+ return this.request(
30283
+ "POST",
30284
+ `/v1/apps/${encodeURIComponent(app_id)}/agent-runs/${encodeURIComponent(run_id)}/cancel`
30285
+ );
30286
+ }
30266
30287
  /**
30267
30288
  * Mint a presigned URL for uploading a file into an app. Mirrors
30268
30289
  * POST /v1/apps/{app_id}/files/upload-url.
@@ -30948,7 +30969,11 @@ export default defineConfig({
30948
30969
  },
30949
30970
  build: {
30950
30971
  outDir: "dist",
30951
- sourcemap: true,
30972
+ // No source maps in the production build: they ship the original source
30973
+ // (comments, logic) as a static asset, and a password-gated app is served
30974
+ // openly at the asset layer \u2014 the map would expose the very source the gate
30975
+ // exists to protect. Source maps aren't needed to run the app.
30976
+ sourcemap: false,
30952
30977
  // Top-level await (package projects' generated .lotics/app_fields.ts
30953
30978
  // resolves the installation binding at module load) needs es2022 \u2014 Vite's
30954
30979
  // default 'modules' baseline is es2020 and esbuild hard-fails TLA there.
@@ -31486,6 +31511,9 @@ var SUPPORTED_OPS = /* @__PURE__ */ new Set([
31486
31511
  "binding",
31487
31512
  "upload_url",
31488
31513
  "upload_complete",
31514
+ "agentRuns",
31515
+ "agentRun.get",
31516
+ "agentRun.cancel",
31489
31517
  "comments.list",
31490
31518
  "comments.create",
31491
31519
  "comments.update",
@@ -31570,6 +31598,27 @@ async function dispatchRpc(client, body, opts) {
31570
31598
  // Comment ops mirror the production iframe-host's `handleCommentRpc` return
31571
31599
  // shapes so the SDK hooks behave identically in dev. App authority + the
31572
31600
  // `comments` capability + tenant floor are enforced server-side.
31601
+ case "agentRuns": {
31602
+ const p = body.payload;
31603
+ if (!p || typeof p.session_id !== "string") {
31604
+ throw new Error("agentRuns payload must include session_id");
31605
+ }
31606
+ return client.listAgentRuns(body.app_id, p.session_id);
31607
+ }
31608
+ case "agentRun.get": {
31609
+ const p = body.payload;
31610
+ if (!p || typeof p.run_id !== "string") {
31611
+ throw new Error("agentRun.get payload must include run_id");
31612
+ }
31613
+ return client.getAgentRun(body.app_id, p.run_id);
31614
+ }
31615
+ case "agentRun.cancel": {
31616
+ const p = body.payload;
31617
+ if (!p || typeof p.run_id !== "string") {
31618
+ throw new Error("agentRun.cancel payload must include run_id");
31619
+ }
31620
+ return client.cancelAgentRun(body.app_id, p.run_id);
31621
+ }
31573
31622
  case "comments.list": {
31574
31623
  const p = body.payload;
31575
31624
  if (!p || typeof p.record_id !== "string") {
@@ -74,6 +74,13 @@ export interface AppAgentRunSummary {
74
74
  triggered_by_member_id: string | null;
75
75
  started_at: string;
76
76
  completed_at: string | null;
77
+ /** Single-run GET only, while `status` is "awaiting_input": the pending ask
78
+ * derived from the transcript — what /continue answers. */
79
+ pending_interactive?: {
80
+ tool_call_id: string;
81
+ tool_name: string;
82
+ input: Record<string, unknown>;
83
+ };
77
84
  }
78
85
  export interface ToolInfo {
79
86
  name: string;
@@ -927,6 +934,21 @@ export declare class LoticsClient {
927
934
  listAgentRuns(app_id: string, session_id: string): Promise<{
928
935
  runs: AppAgentRunSummary[];
929
936
  }>;
937
+ /**
938
+ * A single run by id — the poll read a client follows after its stream drops
939
+ * (a parked `awaiting_input` row carries `pending_interactive` so the question
940
+ * survives reconnection). Mirrors GET /v1/apps/{app_id}/agent-runs/{run_id}.
941
+ */
942
+ getAgentRun(app_id: string, run_id: string): Promise<{
943
+ run: AppAgentRunSummary;
944
+ }>;
945
+ /**
946
+ * Request cancellation of an in-flight (or parked) run. Mirrors
947
+ * POST /v1/apps/{app_id}/agent-runs/{run_id}/cancel.
948
+ */
949
+ cancelAgentRun(app_id: string, run_id: string): Promise<{
950
+ ok: true;
951
+ }>;
930
952
  /**
931
953
  * Mint a presigned URL for uploading a file into an app. Mirrors
932
954
  * POST /v1/apps/{app_id}/files/upload-url.
@@ -661,6 +661,21 @@ export class LoticsClient {
661
661
  async listAgentRuns(app_id, session_id) {
662
662
  return this.request("GET", `/v1/apps/${encodeURIComponent(app_id)}/agent-runs?session_id=${encodeURIComponent(session_id)}`);
663
663
  }
664
+ /**
665
+ * A single run by id — the poll read a client follows after its stream drops
666
+ * (a parked `awaiting_input` row carries `pending_interactive` so the question
667
+ * survives reconnection). Mirrors GET /v1/apps/{app_id}/agent-runs/{run_id}.
668
+ */
669
+ async getAgentRun(app_id, run_id) {
670
+ return this.request("GET", `/v1/apps/${encodeURIComponent(app_id)}/agent-runs/${encodeURIComponent(run_id)}`);
671
+ }
672
+ /**
673
+ * Request cancellation of an in-flight (or parked) run. Mirrors
674
+ * POST /v1/apps/{app_id}/agent-runs/{run_id}/cancel.
675
+ */
676
+ async cancelAgentRun(app_id, run_id) {
677
+ return this.request("POST", `/v1/apps/${encodeURIComponent(app_id)}/agent-runs/${encodeURIComponent(run_id)}/cancel`);
678
+ }
664
679
  /**
665
680
  * Mint a presigned URL for uploading a file into an app. Mirrors
666
681
  * POST /v1/apps/{app_id}/files/upload-url.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.94.0",
3
+ "version": "0.94.1",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {