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.
package/dist/index.cjs CHANGED
@@ -721,6 +721,23 @@ var ProjectSyncApi = class {
721
721
  }
722
722
  };
723
723
 
724
+ // src/conversations.ts
725
+ var ConversationsApi = class {
726
+ constructor(mw) {
727
+ this.mw = mw;
728
+ }
729
+ mw;
730
+ /** Read-only; includes folders not registered as Mindwire projects. */
731
+ list(query = {}) {
732
+ return this.mw.http.request("GET", "/workspace/conversations", { query: { ...query } });
733
+ }
734
+ /** Idempotently associates the selected native session with its original folder.
735
+ * Use chatId with messages()/turn() and the ordinary chat APIs afterward. */
736
+ open(request) {
737
+ return this.mw.http.request("POST", "/workspace/conversations/open", { body: request });
738
+ }
739
+ };
740
+
724
741
  // src/workspace.ts
725
742
  var ProjectOperationsApi = class {
726
743
  constructor(mw) {
@@ -792,6 +809,7 @@ var WorkspaceCollection = class {
792
809
  var WorkspaceApi = class {
793
810
  constructor(mw) {
794
811
  this.mw = mw;
812
+ this.conversations = new ConversationsApi(mw);
795
813
  this.sync = new ProjectSyncApi(mw);
796
814
  this.git = new GitAccessApi(mw);
797
815
  this.operations = new ProjectOperationsApi(mw);
@@ -800,6 +818,7 @@ var WorkspaceApi = class {
800
818
  this.chats = new WorkspaceCollection(mw, "chats");
801
819
  }
802
820
  mw;
821
+ conversations;
803
822
  sync;
804
823
  git;
805
824
  operations;
@@ -1148,7 +1167,7 @@ init_errors();
1148
1167
  init_errors();
1149
1168
 
1150
1169
  // src/version.ts
1151
- var SDK_VERSION = "0.1.36" ;
1170
+ var SDK_VERSION = "0.1.38" ;
1152
1171
  function versionAtLeast(actual, desired) {
1153
1172
  if (actual === desired) return true;
1154
1173
  if (!actual || !/^\d+\.\d+\.\d+$/.test(actual) || !/^\d+\.\d+\.\d+$/.test(desired)) return false;
@@ -1588,14 +1607,14 @@ var Mindwire = class _Mindwire {
1588
1607
  }
1589
1608
  /**
1590
1609
  * `POST /chats/{id}/fork` — clone a chat into a new id (generated when `newChatId` is omitted).
1591
- * The fork shares the source's native session until its first turn, which branches it (natively
1592
- * on Claude via `--fork-session`; a fresh session on agents without native fork). Rejects with a
1593
- * 409 if the source has a live turn, 404 if the source is unknown, 400 if the target id is in
1594
- * use. Returns the new chat's summary.
1610
+ * Codex and Claude preserve native context. `beforeMessageId` excludes that prompt and every
1611
+ * later message; send the edited prompt to the returned chat with `turn`. Reuse `newChatId`
1612
+ * and the turn's `requestId` on retries. The source chat and filesystem are unchanged.
1613
+ * A source with a live turn returns 409; an unknown source returns 404.
1595
1614
  */
1596
1615
  forkChat(chatId, opts = {}) {
1597
1616
  return this.http.request("POST", `/chats/${encodeURIComponent(chatId)}/fork`, {
1598
- body: opts.newChatId ? { newChatId: opts.newChatId } : {}
1617
+ body: opts
1599
1618
  });
1600
1619
  }
1601
1620
  /**
@@ -3160,6 +3179,7 @@ init_errors();
3160
3179
  exports.AuthApi = AuthApi;
3161
3180
  exports.ComputerApi = ComputerApi;
3162
3181
  exports.ContainerHost = ContainerHost;
3182
+ exports.ConversationsApi = ConversationsApi;
3163
3183
  exports.ExecutionApi = ExecutionApi;
3164
3184
  exports.GitAccessApi = GitAccessApi;
3165
3185
  exports.Http = Http;