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.d.ts CHANGED
@@ -35,6 +35,8 @@ export * from "./types.js";
35
35
  export { ServiceApi } from "./service.js";
36
36
  export type { ServiceUpdateState, ServiceUpdateLease } from "./service.js";
37
37
  export { WorkspaceApi, WorkspaceCollection, ProjectOperationsApi, GitAccessApi } from "./workspace.js";
38
+ export { ConversationsApi } from "./conversations.js";
39
+ export type { Conversation, ConversationQuery, ConversationPage, ConversationOpenRequest, ConversationOpenResult } from "./conversations.js";
38
40
  export { ProjectSyncApi, ProjectSyncError } from "./project-sync.js";
39
41
  export type { ProjectSyncEntry, ProjectSyncCheckpoint, ProjectSyncRequest, ProjectSyncOperation, ProjectSyncConflict, ProjectSyncProgress } from "./project-sync.js";
40
42
  export type { ProjectRequest, ProjectAuth, ProjectOperation, ProjectRemoveRequest, GitConnection, GitAccessState, ProjectGitState, GitAction, GitIdentity, GitIdentityScope, GitIdentitySettings, GitIdentityUpdate, GitOperationRequest, GitOperation } from "./workspace.js";
package/dist/index.js CHANGED
@@ -590,6 +590,23 @@ var ProjectSyncApi = class {
590
590
  }
591
591
  };
592
592
 
593
+ // src/conversations.ts
594
+ var ConversationsApi = class {
595
+ constructor(mw) {
596
+ this.mw = mw;
597
+ }
598
+ mw;
599
+ /** Read-only; includes folders not registered as Mindwire projects. */
600
+ list(query = {}) {
601
+ return this.mw.http.request("GET", "/workspace/conversations", { query: { ...query } });
602
+ }
603
+ /** Idempotently associates the selected native session with its original folder.
604
+ * Use chatId with messages()/turn() and the ordinary chat APIs afterward. */
605
+ open(request) {
606
+ return this.mw.http.request("POST", "/workspace/conversations/open", { body: request });
607
+ }
608
+ };
609
+
593
610
  // src/workspace.ts
594
611
  var ProjectOperationsApi = class {
595
612
  constructor(mw) {
@@ -661,6 +678,7 @@ var WorkspaceCollection = class {
661
678
  var WorkspaceApi = class {
662
679
  constructor(mw) {
663
680
  this.mw = mw;
681
+ this.conversations = new ConversationsApi(mw);
664
682
  this.sync = new ProjectSyncApi(mw);
665
683
  this.git = new GitAccessApi(mw);
666
684
  this.operations = new ProjectOperationsApi(mw);
@@ -669,6 +687,7 @@ var WorkspaceApi = class {
669
687
  this.chats = new WorkspaceCollection(mw, "chats");
670
688
  }
671
689
  mw;
690
+ conversations;
672
691
  sync;
673
692
  git;
674
693
  operations;
@@ -1011,7 +1030,7 @@ function computerPairingURI(invitation) {
1011
1030
  }
1012
1031
 
1013
1032
  // src/version.ts
1014
- var SDK_VERSION = "0.1.36" ;
1033
+ var SDK_VERSION = "0.1.38" ;
1015
1034
  function versionAtLeast(actual, desired) {
1016
1035
  if (actual === desired) return true;
1017
1036
  if (!actual || !/^\d+\.\d+\.\d+$/.test(actual) || !/^\d+\.\d+\.\d+$/.test(desired)) return false;
@@ -1451,14 +1470,14 @@ var Mindwire = class _Mindwire {
1451
1470
  }
1452
1471
  /**
1453
1472
  * `POST /chats/{id}/fork` — clone a chat into a new id (generated when `newChatId` is omitted).
1454
- * The fork shares the source's native session until its first turn, which branches it (natively
1455
- * on Claude via `--fork-session`; a fresh session on agents without native fork). Rejects with a
1456
- * 409 if the source has a live turn, 404 if the source is unknown, 400 if the target id is in
1457
- * use. Returns the new chat's summary.
1473
+ * Codex and Claude preserve native context. `beforeMessageId` excludes that prompt and every
1474
+ * later message; send the edited prompt to the returned chat with `turn`. Reuse `newChatId`
1475
+ * and the turn's `requestId` on retries. The source chat and filesystem are unchanged.
1476
+ * A source with a live turn returns 409; an unknown source returns 404.
1458
1477
  */
1459
1478
  forkChat(chatId, opts = {}) {
1460
1479
  return this.http.request("POST", `/chats/${encodeURIComponent(chatId)}/fork`, {
1461
- body: opts.newChatId ? { newChatId: opts.newChatId } : {}
1480
+ body: opts
1462
1481
  });
1463
1482
  }
1464
1483
  /**
@@ -3010,6 +3029,6 @@ function clearCatalogCache() {
3010
3029
  inflight = null;
3011
3030
  }
3012
3031
 
3013
- export { AuthApi, ComputerApi, ContainerHost, ExecutionApi, GitAccessApi, Http, MODELS_DEV_URL, McpApi, Mindwire, NotifyApi, ProjectOperationsApi, ProjectSyncApi, ProjectSyncError, PromptsApi, ProvidersApi, Run, SDK_VERSION, ServiceApi, SurfacesApi, TerminalsApi, WorkspaceApi, WorkspaceCollection, catalogModels, catalogProvider, catalogProviders, clearCatalogCache, computerPairingQRData, computerPairingURI, docker, ensureDaemon, ensureDaemonBinary, loadCatalog, local, lookupModel, oblien, provisionContainer, provisionDocker, provisionOblien, provisionSsh, provisionSshContainer, remote, resolveLinuxDaemon, ssh, startEmbedded };
3032
+ export { AuthApi, ComputerApi, ContainerHost, ConversationsApi, ExecutionApi, GitAccessApi, Http, MODELS_DEV_URL, McpApi, Mindwire, NotifyApi, ProjectOperationsApi, ProjectSyncApi, ProjectSyncError, PromptsApi, ProvidersApi, Run, SDK_VERSION, ServiceApi, SurfacesApi, TerminalsApi, WorkspaceApi, WorkspaceCollection, catalogModels, catalogProvider, catalogProviders, clearCatalogCache, computerPairingQRData, computerPairingURI, docker, ensureDaemon, ensureDaemonBinary, loadCatalog, local, lookupModel, oblien, provisionContainer, provisionDocker, provisionOblien, provisionSsh, provisionSshContainer, remote, resolveLinuxDaemon, ssh, startEmbedded };
3014
3033
  //# sourceMappingURL=index.js.map
3015
3034
  //# sourceMappingURL=index.js.map