mindwire 0.1.24 → 0.1.26

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.js CHANGED
@@ -508,8 +508,8 @@ var WorkspaceApi = class {
508
508
  agents;
509
509
  projects;
510
510
  chats;
511
- snapshot() {
512
- return this.mw.http.request("GET", "/workspace");
511
+ snapshot(options = {}) {
512
+ return this.mw.http.request("GET", "/workspace", { query: options });
513
513
  }
514
514
  /** Start an operation owned by the daemon. The same ID/payload returns the existing operation. */
515
515
  createProject(request) {
@@ -524,8 +524,8 @@ var WorkspaceApi = class {
524
524
  /** Incremental reconciliation. Pass the previous identity to detect a replaced/restored workspace.
525
525
  * A 409 requires fetching snapshot() again; never apply a delta to a different registry.
526
526
  */
527
- changes(since, workspaceId) {
528
- return this.mw.http.request("GET", "/workspace/changes", { query: { since, workspaceId } });
527
+ changes(since, workspaceId, options = {}) {
528
+ return this.mw.http.request("GET", "/workspace/changes", { query: { since, workspaceId, ...options } });
529
529
  }
530
530
  /** Import legacy metadata before replacing a local cache. Safe to repeat after interruption. */
531
531
  import(records) {
@@ -794,9 +794,23 @@ var ComputerApi = class {
794
794
  revoke(id) {
795
795
  return this.client.http.request("DELETE", `/computer/devices/${encodeURIComponent(id)}`);
796
796
  }
797
+ forwards() {
798
+ return this.client.http.request("GET", "/computer/forwards");
799
+ }
800
+ /** Authorize a loopback port for this paired device. Renew the same ID every 30s;
801
+ * grants expire after two minutes. Carry traffic using SSH direct-tcpip. */
802
+ forward(request) {
803
+ return this.client.http.request("POST", "/computer/forwards", { body: request });
804
+ }
805
+ closeForward(id) {
806
+ return this.client.http.request("DELETE", `/computer/forwards/${encodeURIComponent(id)}`);
807
+ }
797
808
  };
809
+ function computerPairingQRData(invitation) {
810
+ return JSON.stringify(invitation);
811
+ }
798
812
  function computerPairingURI(invitation) {
799
- const bytes = new TextEncoder().encode(JSON.stringify(invitation));
813
+ const bytes = new TextEncoder().encode(computerPairingQRData(invitation));
800
814
  let binary = "";
801
815
  for (const byte of bytes) binary += String.fromCharCode(byte);
802
816
  const encoded = btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
@@ -804,7 +818,7 @@ function computerPairingURI(invitation) {
804
818
  }
805
819
 
806
820
  // src/version.ts
807
- var SDK_VERSION = "0.1.24" ;
821
+ var SDK_VERSION = "0.1.26" ;
808
822
 
809
823
  // src/daemon-binary.ts
810
824
  function supported(platform, arch) {
@@ -1207,9 +1221,12 @@ var Mindwire = class _Mindwire {
1207
1221
  });
1208
1222
  }
1209
1223
  // ---- chats & history -----------------------------------------------------
1210
- /** `GET /chats` — recorded chats (newest first), shared across agents. */
1211
- chats() {
1212
- return this.http.request("GET", "/chats");
1224
+ /** Native project conversations and drafts, newest first, shared across agents.
1225
+ * `cwd` matches an exact directory; `projectId` selects saved membership.
1226
+ * `refresh` bypasses the daemon's short native metadata cache.
1227
+ */
1228
+ chats(options = {}) {
1229
+ return this.http.request("GET", "/chats", { query: options });
1213
1230
  }
1214
1231
  /**
1215
1232
  * `PUT /chats/{id}` — rename a chat. The user title wins over the agent's native auto-title in
@@ -1277,6 +1294,7 @@ var Mindwire = class _Mindwire {
1277
1294
  chatId: input.chatId,
1278
1295
  message: input.message
1279
1296
  };
1297
+ if (input.requestId !== void 0) body.requestId = input.requestId;
1280
1298
  if (input.cwd !== void 0) body.cwd = input.cwd;
1281
1299
  if (input.options !== void 0) body.options = input.options;
1282
1300
  if (input.mode !== void 0) body.mode = input.mode;
@@ -2775,6 +2793,6 @@ function clearCatalogCache() {
2775
2793
  inflight = null;
2776
2794
  }
2777
2795
 
2778
- export { AuthApi, ComputerApi, ContainerHost, ExecutionApi, GitAccessApi, Http, MODELS_DEV_URL, McpApi, Mindwire, NotifyApi, ProjectOperationsApi, PromptsApi, ProvidersApi, Run, SDK_VERSION, ServiceApi, SurfacesApi, TerminalsApi, WorkspaceApi, WorkspaceCollection, catalogModels, catalogProvider, catalogProviders, clearCatalogCache, computerPairingURI, docker, ensureDaemon, ensureDaemonBinary, loadCatalog, local, lookupModel, oblien, provisionContainer, provisionDocker, provisionOblien, provisionSsh, provisionSshContainer, remote, resolveLinuxDaemon, ssh, startEmbedded };
2796
+ export { AuthApi, ComputerApi, ContainerHost, ExecutionApi, GitAccessApi, Http, MODELS_DEV_URL, McpApi, Mindwire, NotifyApi, ProjectOperationsApi, 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 };
2779
2797
  //# sourceMappingURL=index.js.map
2780
2798
  //# sourceMappingURL=index.js.map