mindwire 0.1.36 → 0.1.38

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.
@@ -88,7 +88,7 @@ function computerPairingURI(invitation) {
88
88
  }
89
89
 
90
90
  // src/version.ts
91
- var SDK_VERSION = "0.1.36" ;
91
+ var SDK_VERSION = "0.1.38" ;
92
92
  function versionAtLeast(actual, desired) {
93
93
  if (actual === desired) return true;
94
94
  if (!actual || !/^\d+\.\d+\.\d+$/.test(actual) || !/^\d+\.\d+\.\d+$/.test(desired)) return false;
@@ -1246,6 +1246,23 @@ var ProjectSyncApi = class {
1246
1246
  }
1247
1247
  };
1248
1248
 
1249
+ // src/conversations.ts
1250
+ var ConversationsApi = class {
1251
+ constructor(mw) {
1252
+ this.mw = mw;
1253
+ }
1254
+ mw;
1255
+ /** Read-only; includes folders not registered as Mindwire projects. */
1256
+ list(query = {}) {
1257
+ return this.mw.http.request("GET", "/workspace/conversations", { query: { ...query } });
1258
+ }
1259
+ /** Idempotently associates the selected native session with its original folder.
1260
+ * Use chatId with messages()/turn() and the ordinary chat APIs afterward. */
1261
+ open(request) {
1262
+ return this.mw.http.request("POST", "/workspace/conversations/open", { body: request });
1263
+ }
1264
+ };
1265
+
1249
1266
  // src/workspace.ts
1250
1267
  var ProjectOperationsApi = class {
1251
1268
  constructor(mw) {
@@ -1317,6 +1334,7 @@ var WorkspaceCollection = class {
1317
1334
  var WorkspaceApi = class {
1318
1335
  constructor(mw) {
1319
1336
  this.mw = mw;
1337
+ this.conversations = new ConversationsApi(mw);
1320
1338
  this.sync = new ProjectSyncApi(mw);
1321
1339
  this.git = new GitAccessApi(mw);
1322
1340
  this.operations = new ProjectOperationsApi(mw);
@@ -1325,6 +1343,7 @@ var WorkspaceApi = class {
1325
1343
  this.chats = new WorkspaceCollection(mw, "chats");
1326
1344
  }
1327
1345
  mw;
1346
+ conversations;
1328
1347
  sync;
1329
1348
  git;
1330
1349
  operations;
@@ -1958,14 +1977,14 @@ var Mindwire = class _Mindwire {
1958
1977
  }
1959
1978
  /**
1960
1979
  * `POST /chats/{id}/fork` — clone a chat into a new id (generated when `newChatId` is omitted).
1961
- * The fork shares the source's native session until its first turn, which branches it (natively
1962
- * on Claude via `--fork-session`; a fresh session on agents without native fork). Rejects with a
1963
- * 409 if the source has a live turn, 404 if the source is unknown, 400 if the target id is in
1964
- * use. Returns the new chat's summary.
1980
+ * Codex and Claude preserve native context. `beforeMessageId` excludes that prompt and every
1981
+ * later message; send the edited prompt to the returned chat with `turn`. Reuse `newChatId`
1982
+ * and the turn's `requestId` on retries. The source chat and filesystem are unchanged.
1983
+ * A source with a live turn returns 409; an unknown source returns 404.
1965
1984
  */
1966
1985
  forkChat(chatId, opts = {}) {
1967
1986
  return this.http.request("POST", `/chats/${encodeURIComponent(chatId)}/fork`, {
1968
- body: opts.newChatId ? { newChatId: opts.newChatId } : {}
1987
+ body: opts
1969
1988
  });
1970
1989
  }
1971
1990
  /**
@@ -2500,7 +2519,7 @@ async function ensureComputer(directory, cliPath, patch = {}, onProgress, option
2500
2519
  if (!compatible(controller2) || !await processStateAlive(controller2)) {
2501
2520
  await ensureComputer(directory, cliPath, {}, onProgress, { ...options, waitForRoutes: false });
2502
2521
  }
2503
- const { changeComputerConnection } = await import('./connection-change-IBNL42BL.js');
2522
+ const { changeComputerConnection } = await import('./connection-change-5F4WNCYV.js');
2504
2523
  await changeComputerConnection(directory, Object.fromEntries(changed.map((key) => [key, patch[key]])), { signal: options.signal, onProgress });
2505
2524
  return computerClient(directory);
2506
2525
  }
@@ -2541,7 +2560,7 @@ async function ensureComputer(directory, cliPath, patch = {}, onProgress, option
2541
2560
  let controller = await readJSON(path4.join(directory, "computer-controller.json"));
2542
2561
  if (existing && controller && !compatible(controller) && await processStateAlive(controller)) {
2543
2562
  onProgress?.("Refreshing the background connection service\u2026");
2544
- const { handoffController } = await import('./controller-handoff-RUUHODNC.js');
2563
+ const { handoffController } = await import('./controller-handoff-KV7WRDAI.js');
2545
2564
  await handoffController(directory, controller, config, await existing.computer.info());
2546
2565
  controller = void 0;
2547
2566
  }
@@ -2575,7 +2594,7 @@ async function ensureComputer(directory, cliPath, patch = {}, onProgress, option
2575
2594
  }
2576
2595
  }
2577
2596
  async function superviseComputer(directory) {
2578
- const controller = await import('./controller-2SJLZMJZ.js');
2597
+ const controller = await import('./controller-3SZI7TBW.js');
2579
2598
  await controller.superviseComputer(directory);
2580
2599
  }
2581
2600
  async function stopComputer(directory, force = false) {
@@ -2600,5 +2619,5 @@ async function stopComputer(directory, force = false) {
2600
2619
  }
2601
2620
 
2602
2621
  export { CONTROLLER_PROTOCOL, ProviderConnectionError, RelayOutput, SDK_VERSION, acquireProcessLock, adoptProcess, adoptRelay, cloudflareCommand, computerClient, computerPairingQRData, computerPairingURI, currentProcessIdentity, defaultComputerConfig, defaultStateDirectory, directRoutes, ensureComputer, ensureDaemonBinary, hasCertificateError, ownChild, processIdentity, processStateAlive, providerFailure, providerNeedsAction, readJSON, startRelay, stopComputer, superviseComputer, websocketURL, writeJSON };
2603
- //# sourceMappingURL=chunk-RTGZDLSG.js.map
2604
- //# sourceMappingURL=chunk-RTGZDLSG.js.map
2622
+ //# sourceMappingURL=chunk-CKTVMUS4.js.map
2623
+ //# sourceMappingURL=chunk-CKTVMUS4.js.map