@frumu/tandem-client 0.3.22 → 0.3.23

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.cjs CHANGED
@@ -327,6 +327,13 @@ var TandemClient = class {
327
327
  this.agentTeams = new AgentTeams(req);
328
328
  this.missions = new Missions(req);
329
329
  }
330
+ /**
331
+ * Update the bearer token used for future HTTP and SSE requests.
332
+ */
333
+ setToken(token) {
334
+ this.token = token;
335
+ this.sessions.setToken(token);
336
+ }
330
337
  // ─── Health ───────────────────────────────────────────────────────────────
331
338
  /** Check engine health. Returns `{ ready: true }` when the engine is ready. */
332
339
  async health() {
@@ -434,6 +441,9 @@ var Sessions = class {
434
441
  this.timeoutMs = timeoutMs;
435
442
  this.req = req;
436
443
  }
444
+ setToken(token) {
445
+ this.token = token;
446
+ }
437
447
  /** Create a new session. Returns the session ID. */
438
448
  async create(options = {}) {
439
449
  const payload = {
@@ -617,7 +627,12 @@ var Sessions = class {
617
627
  */
618
628
  async children(sessionId) {
619
629
  const raw = await this.req(`/session/${encodeURIComponent(sessionId)}/children`);
620
- const parsed = parseResponse(SessionListResponseSchema, raw, `/session/${sessionId}/children`, 200);
630
+ const parsed = parseResponse(
631
+ SessionListResponseSchema,
632
+ raw,
633
+ `/session/${sessionId}/children`,
634
+ 200
635
+ );
621
636
  return parsed.sessions;
622
637
  }
623
638
  /**
@@ -786,10 +801,9 @@ var Mcp = class {
786
801
  }
787
802
  /** Re-discover tools from a connected MCP server. */
788
803
  async refresh(name) {
789
- return this.req(
790
- `/mcp/${encodeURIComponent(name)}/refresh`,
791
- { method: "POST" }
792
- );
804
+ return this.req(`/mcp/${encodeURIComponent(name)}/refresh`, {
805
+ method: "POST"
806
+ });
793
807
  }
794
808
  /** Enable or disable an MCP server. */
795
809
  async setEnabled(name, enabled) {
@@ -1123,7 +1137,9 @@ var Automations = class {
1123
1137
  }
1124
1138
  /** List artifacts from an automation run. */
1125
1139
  async listArtifacts(runId) {
1126
- return this.req(`/automations/runs/${encodeURIComponent(runId)}/artifacts`);
1140
+ return this.req(
1141
+ `/automations/runs/${encodeURIComponent(runId)}/artifacts`
1142
+ );
1127
1143
  }
1128
1144
  /** Approve an automation run pending human review. */
1129
1145
  async approveRun(runId, reason) {