@hyperdrive.bot/paseo-client 0.3.73 → 0.3.74

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.
@@ -898,6 +898,7 @@ export declare class DaemonClient {
898
898
  }>;
899
899
  editMessage(agentId: string, turnId: string, newContent: string): Promise<{
900
900
  newSessionId: string;
901
+ adopted: boolean;
901
902
  }>;
902
903
  listWorkspaceSessions(workspaceId: string, options?: {
903
904
  signal?: AbortSignal;
@@ -1512,11 +1512,15 @@ export class DaemonClient {
1512
1512
  }
1513
1513
  return { newSessionId: payload.newSessionId };
1514
1514
  }
1515
- // Story 2.4 — Edit a user message. Sends `edit_message_request` over the
1516
- // existing WebSocket so the request tunnels through the relay's E2EE channel
1517
- // (the legacy HTTP route `/agents/:agentId/edit-message` is unreachable over
1518
- // relay). The caller is responsible for spawning a fresh agent with
1519
- // `resumeSessionId=<newSessionId>` and the new content as the initial prompt.
1515
+ // Edit a user message. Sends `edit_message_request` over the existing WebSocket so the
1516
+ // request tunnels through the relay's E2EE channel (the legacy HTTP route
1517
+ // `/agents/:agentId/edit-message` is unreachable over relay).
1518
+ //
1519
+ // The daemon truncates the transcript just before the edited turn and, when the provider
1520
+ // supports it, repoints THIS agent at the fork -- `adopted: true`. The caller then rewinds
1521
+ // in place and sends the edited text as the next prompt. `adopted: false` means the fork
1522
+ // exists but this agent still runs the old session, so the caller must not pretend the
1523
+ // conversation moved.
1520
1524
  async editMessage(agentId, turnId, newContent) {
1521
1525
  const requestId = this.createRequestId();
1522
1526
  const message = SessionInboundMessageSchema.parse({
@@ -1542,7 +1546,7 @@ export class DaemonClient {
1542
1546
  if (payload.error || !payload.newSessionId) {
1543
1547
  throw new Error(payload.error ?? "editMessage: daemon response missing newSessionId");
1544
1548
  }
1545
- return { newSessionId: payload.newSessionId };
1549
+ return { newSessionId: payload.newSessionId, adopted: payload.adopted === true };
1546
1550
  }
1547
1551
  // Story 3.3 / 3.4 — Session history for a workspace. Sends
1548
1552
  // `list_workspace_sessions_request` over the existing WebSocket so the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperdrive.bot/paseo-client",
3
- "version": "0.3.73",
3
+ "version": "0.3.74",
4
4
  "description": "Paseo client SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -35,8 +35,8 @@
35
35
  "test": "vitest run"
36
36
  },
37
37
  "dependencies": {
38
- "@hyperdrive.bot/paseo-protocol": "0.3.73",
39
- "@hyperdrive.bot/paseo-relay": "0.3.73",
38
+ "@hyperdrive.bot/paseo-protocol": "0.3.74",
39
+ "@hyperdrive.bot/paseo-relay": "0.3.74",
40
40
  "zod": "^4.4.3"
41
41
  },
42
42
  "devDependencies": {