@mirasoth/soothe-client 0.5.8 → 0.5.9

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/index.d.cts CHANGED
@@ -164,7 +164,7 @@ declare const DEFAULT_CLIENT_CAPABILITIES: string[];
164
164
  declare const CLIENT_VERSION = "0.5.3";
165
165
  type MessageType = "connection_init" | "connection_ack" | "request" | "response" | "notification" | "subscribe" | "next" | "error" | "complete" | "unsubscribe" | "ping" | "pong" | "receipt_response" | "disconnect" | "status";
166
166
  /** Method names carried in the envelope `method` field. */
167
- type MethodName = "loop_list" | "loop_get" | "loop_tree" | "loop_prune" | "loop_delete" | "loop_new" | "loop_reattach" | "loop_detach" | "loop_input" | "loop_messages" | "loop_state_get" | "loop_state_update" | "loop_history_fetch" | "loop_events" | "autopilot_events" | "job_create" | "job_status" | "job_pause" | "job_resume" | "job_cancel" | "job_dag" | "job_guidance" | "autopilot_status" | "autopilot_submit" | "autopilot_list_goals" | "autopilot_get_goal" | "autopilot_cancel_goal" | "autopilot_cancel_all" | "autopilot_wake" | "autopilot_dream" | "autopilot_resume" | "autopilot_list_jobs" | "autopilot_get_job" | "autopilot_top" | "daemon_status" | "daemon_shutdown" | "config_get" | "config_reload" | "skills_list" | "invoke_skill" | "models_list" | "mcp_status" | "auth" | "auth_refresh" | "slash_command" | "rpc_command" | "delivery_ack" | "cron_add" | "cron_list" | "cron_show" | "cron_cancel" | "disconnect";
167
+ type MethodName = "loop_list" | "loop_get" | "loop_tree" | "loop_prune" | "loop_delete" | "loop_new" | "loop_reattach" | "loop_detach" | "loop_input" | "loop_messages" | "loop_state_get" | "loop_state_update" | "loop_execution_state_fetch" | "loop_history_fetch" | "loop_events" | "autopilot_events" | "job_create" | "job_status" | "job_pause" | "job_resume" | "job_cancel" | "job_dag" | "job_guidance" | "autopilot_status" | "autopilot_submit" | "autopilot_list_goals" | "autopilot_get_goal" | "autopilot_cancel_goal" | "autopilot_cancel_all" | "autopilot_wake" | "autopilot_dream" | "autopilot_resume" | "autopilot_list_jobs" | "autopilot_get_job" | "autopilot_top" | "daemon_status" | "daemon_shutdown" | "config_get" | "config_reload" | "skills_list" | "invoke_skill" | "models_list" | "mcp_status" | "auth" | "auth_refresh" | "slash_command" | "rpc_command" | "delivery_ack" | "cron_add" | "cron_list" | "cron_show" | "cron_cancel" | "disconnect";
168
168
  /** Base fields shared by every protocol-1 message. */
169
169
  interface BaseEnvelope {
170
170
  proto: string;
@@ -577,9 +577,9 @@ declare class Client extends EventEmitter {
577
577
  private readLiveEventWithTimeout;
578
578
  /**
579
579
  * Sends a `request` envelope and waits for the matching `response` (or
580
- * `error`) correlated by `id`. Returns the `result` object.
580
+ * `error`) correlated by `id`. Returns the `result` object.
581
581
  *
582
- * Multiplexer-aware: registers a pending RPC wait
582
+ * Multiplexer-aware: registers a pending RPC wait
583
583
  * keyed by the request id so that, even when a `receiveMessages()` reader
584
584
  * is concurrently active, the matching `response`/`error` is routed to
585
585
  * this caller instead of being discarded or buffered behind a stream.
@@ -649,8 +649,16 @@ declare class Client extends EventEmitter {
649
649
  getLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
650
650
  /** Requests loop tree and waits for response. */
651
651
  getLoopTree(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
652
+ /** Prunes old checkpoint branches for a loop and waits for response. */
653
+ pruneLoop(loopID: string, keepLatest?: number, timeout?: number): Promise<Record<string, unknown>>;
652
654
  /** Requests loop deletion and waits for response. */
653
655
  deleteLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
656
+ /** Reattaches to an existing loop and waits for response. */
657
+ reattachLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
658
+ /** Detaches from a loop (unsubscribe) and waits for response. */
659
+ detachLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
660
+ /** Fetches the execution state snapshot (plan, step_index, iteration, status). */
661
+ getLoopExecutionState(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
654
662
  /** Requests persisted conversation/activity rows. */
655
663
  sendLoopMessages(loopID: string, limit?: number, offset?: number, includeEvents?: boolean): Promise<void>;
656
664
  /** Requests LangGraph checkpoint channel values. */
@@ -766,7 +774,11 @@ declare class CommandClient {
766
774
  request(method: MethodName, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
767
775
  jobCreate(goal: string, workspace?: string): Promise<Record<string, unknown>>;
768
776
  jobStatus(jobId: string): Promise<Record<string, unknown>>;
777
+ jobPause(jobId: string): Promise<Record<string, unknown>>;
778
+ jobResume(jobId: string): Promise<Record<string, unknown>>;
769
779
  jobCancel(jobId: string): Promise<Record<string, unknown>>;
780
+ jobDag(jobId: string): Promise<Record<string, unknown>>;
781
+ jobGuidance(jobId: string, content: string, goalId?: string): Promise<Record<string, unknown>>;
770
782
  /** Return autopilot scheduler status (running / dreaming / pool). */
771
783
  autopilotStatus(): Promise<Record<string, unknown>>;
772
784
  /** Submit a new autopilot goal (returns goal_id). */
@@ -796,6 +808,8 @@ declare class CommandClient {
796
808
  autopilotTop(includeTerminal?: boolean): Promise<Record<string, unknown>>;
797
809
  cronAdd(text: string, priority?: number): Promise<Record<string, unknown>>;
798
810
  cronList(status?: string): Promise<Record<string, unknown>>;
811
+ cronShow(jobId: string): Promise<Record<string, unknown>>;
812
+ cronCancel(jobId: string): Promise<Record<string, unknown>>;
799
813
  }
800
814
 
801
815
  /**
package/dist/index.d.ts CHANGED
@@ -164,7 +164,7 @@ declare const DEFAULT_CLIENT_CAPABILITIES: string[];
164
164
  declare const CLIENT_VERSION = "0.5.3";
165
165
  type MessageType = "connection_init" | "connection_ack" | "request" | "response" | "notification" | "subscribe" | "next" | "error" | "complete" | "unsubscribe" | "ping" | "pong" | "receipt_response" | "disconnect" | "status";
166
166
  /** Method names carried in the envelope `method` field. */
167
- type MethodName = "loop_list" | "loop_get" | "loop_tree" | "loop_prune" | "loop_delete" | "loop_new" | "loop_reattach" | "loop_detach" | "loop_input" | "loop_messages" | "loop_state_get" | "loop_state_update" | "loop_history_fetch" | "loop_events" | "autopilot_events" | "job_create" | "job_status" | "job_pause" | "job_resume" | "job_cancel" | "job_dag" | "job_guidance" | "autopilot_status" | "autopilot_submit" | "autopilot_list_goals" | "autopilot_get_goal" | "autopilot_cancel_goal" | "autopilot_cancel_all" | "autopilot_wake" | "autopilot_dream" | "autopilot_resume" | "autopilot_list_jobs" | "autopilot_get_job" | "autopilot_top" | "daemon_status" | "daemon_shutdown" | "config_get" | "config_reload" | "skills_list" | "invoke_skill" | "models_list" | "mcp_status" | "auth" | "auth_refresh" | "slash_command" | "rpc_command" | "delivery_ack" | "cron_add" | "cron_list" | "cron_show" | "cron_cancel" | "disconnect";
167
+ type MethodName = "loop_list" | "loop_get" | "loop_tree" | "loop_prune" | "loop_delete" | "loop_new" | "loop_reattach" | "loop_detach" | "loop_input" | "loop_messages" | "loop_state_get" | "loop_state_update" | "loop_execution_state_fetch" | "loop_history_fetch" | "loop_events" | "autopilot_events" | "job_create" | "job_status" | "job_pause" | "job_resume" | "job_cancel" | "job_dag" | "job_guidance" | "autopilot_status" | "autopilot_submit" | "autopilot_list_goals" | "autopilot_get_goal" | "autopilot_cancel_goal" | "autopilot_cancel_all" | "autopilot_wake" | "autopilot_dream" | "autopilot_resume" | "autopilot_list_jobs" | "autopilot_get_job" | "autopilot_top" | "daemon_status" | "daemon_shutdown" | "config_get" | "config_reload" | "skills_list" | "invoke_skill" | "models_list" | "mcp_status" | "auth" | "auth_refresh" | "slash_command" | "rpc_command" | "delivery_ack" | "cron_add" | "cron_list" | "cron_show" | "cron_cancel" | "disconnect";
168
168
  /** Base fields shared by every protocol-1 message. */
169
169
  interface BaseEnvelope {
170
170
  proto: string;
@@ -577,9 +577,9 @@ declare class Client extends EventEmitter {
577
577
  private readLiveEventWithTimeout;
578
578
  /**
579
579
  * Sends a `request` envelope and waits for the matching `response` (or
580
- * `error`) correlated by `id`. Returns the `result` object.
580
+ * `error`) correlated by `id`. Returns the `result` object.
581
581
  *
582
- * Multiplexer-aware: registers a pending RPC wait
582
+ * Multiplexer-aware: registers a pending RPC wait
583
583
  * keyed by the request id so that, even when a `receiveMessages()` reader
584
584
  * is concurrently active, the matching `response`/`error` is routed to
585
585
  * this caller instead of being discarded or buffered behind a stream.
@@ -649,8 +649,16 @@ declare class Client extends EventEmitter {
649
649
  getLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
650
650
  /** Requests loop tree and waits for response. */
651
651
  getLoopTree(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
652
+ /** Prunes old checkpoint branches for a loop and waits for response. */
653
+ pruneLoop(loopID: string, keepLatest?: number, timeout?: number): Promise<Record<string, unknown>>;
652
654
  /** Requests loop deletion and waits for response. */
653
655
  deleteLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
656
+ /** Reattaches to an existing loop and waits for response. */
657
+ reattachLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
658
+ /** Detaches from a loop (unsubscribe) and waits for response. */
659
+ detachLoop(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
660
+ /** Fetches the execution state snapshot (plan, step_index, iteration, status). */
661
+ getLoopExecutionState(loopID: string, timeout?: number): Promise<Record<string, unknown>>;
654
662
  /** Requests persisted conversation/activity rows. */
655
663
  sendLoopMessages(loopID: string, limit?: number, offset?: number, includeEvents?: boolean): Promise<void>;
656
664
  /** Requests LangGraph checkpoint channel values. */
@@ -766,7 +774,11 @@ declare class CommandClient {
766
774
  request(method: MethodName, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
767
775
  jobCreate(goal: string, workspace?: string): Promise<Record<string, unknown>>;
768
776
  jobStatus(jobId: string): Promise<Record<string, unknown>>;
777
+ jobPause(jobId: string): Promise<Record<string, unknown>>;
778
+ jobResume(jobId: string): Promise<Record<string, unknown>>;
769
779
  jobCancel(jobId: string): Promise<Record<string, unknown>>;
780
+ jobDag(jobId: string): Promise<Record<string, unknown>>;
781
+ jobGuidance(jobId: string, content: string, goalId?: string): Promise<Record<string, unknown>>;
770
782
  /** Return autopilot scheduler status (running / dreaming / pool). */
771
783
  autopilotStatus(): Promise<Record<string, unknown>>;
772
784
  /** Submit a new autopilot goal (returns goal_id). */
@@ -796,6 +808,8 @@ declare class CommandClient {
796
808
  autopilotTop(includeTerminal?: boolean): Promise<Record<string, unknown>>;
797
809
  cronAdd(text: string, priority?: number): Promise<Record<string, unknown>>;
798
810
  cronList(status?: string): Promise<Record<string, unknown>>;
811
+ cronShow(jobId: string): Promise<Record<string, unknown>>;
812
+ cronCancel(jobId: string): Promise<Record<string, unknown>>;
799
813
  }
800
814
 
801
815
  /**
package/dist/index.js CHANGED
@@ -76,7 +76,7 @@ import {
76
76
  splitWirePayload,
77
77
  subscribeEnvelope,
78
78
  unsubscribeEnvelope
79
- } from "./chunk-CFGENQFE.js";
79
+ } from "./chunk-GYTZI5RE.js";
80
80
 
81
81
  // src/intent_hints.ts
82
82
  var INTENT_HINT_TEXT_COMPLETION = "text_completion";
@@ -236,9 +236,23 @@ var CommandClient = class {
236
236
  async jobStatus(jobId) {
237
237
  return this.request("job_status", { job_id: jobId });
238
238
  }
239
+ async jobPause(jobId) {
240
+ return this.request("job_pause", { job_id: jobId });
241
+ }
242
+ async jobResume(jobId) {
243
+ return this.request("job_resume", { job_id: jobId });
244
+ }
239
245
  async jobCancel(jobId) {
240
246
  return this.request("job_cancel", { job_id: jobId });
241
247
  }
248
+ async jobDag(jobId) {
249
+ return this.request("job_dag", { job_id: jobId });
250
+ }
251
+ async jobGuidance(jobId, content, goalId) {
252
+ const params = { job_id: jobId, content };
253
+ if (goalId) params.goal_id = goalId;
254
+ return this.request("job_guidance", params);
255
+ }
242
256
  /** Return autopilot scheduler status (running / dreaming / pool). */
243
257
  async autopilotStatus() {
244
258
  return this.request("autopilot_status");
@@ -302,6 +316,12 @@ var CommandClient = class {
302
316
  if (status) params.status = status;
303
317
  return this.request("cron_list", params);
304
318
  }
319
+ async cronShow(jobId) {
320
+ return this.request("cron_show", { job_id: jobId });
321
+ }
322
+ async cronCancel(jobId) {
323
+ return this.request("cron_cancel", { job_id: jobId });
324
+ }
305
325
  };
306
326
 
307
327
  // src/helpers.ts
@@ -309,7 +329,7 @@ async function checkDaemonStatus(client, timeout) {
309
329
  return client.requestResponse("daemon_status", {}, "daemon_status", timeout ?? 5e3);
310
330
  }
311
331
  async function isDaemonLive(wsURL, timeout) {
312
- const { Client: Client2 } = await import("./client-57KMIFVI.js");
332
+ const { Client: Client2 } = await import("./client-NNEEEY7Z.js");
313
333
  const t = timeout ?? 5e3;
314
334
  const client = new Client2(wsURL, defaultConfig());
315
335
  try {
@@ -393,7 +413,7 @@ async function fetchLoopMessages(client, loopID, opts) {
393
413
  );
394
414
  }
395
415
  async function connectedWebsocket(wsUrl, fn, timeoutMs = 3e4) {
396
- const { Client: Client2 } = await import("./client-57KMIFVI.js");
416
+ const { Client: Client2 } = await import("./client-NNEEEY7Z.js");
397
417
  const client = new Client2(wsUrl, defaultConfig());
398
418
  const deadline = Date.now() + timeoutMs;
399
419
  try {