mindwire 0.1.50 → 0.1.52
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/{chunk-3LN2KXJK.js → chunk-4XL565EU.js} +47 -7
- package/dist/chunk-4XL565EU.js.map +1 -0
- package/dist/{chunk-MUDCOEC5.js → chunk-RTMQJIKW.js} +3 -3
- package/dist/{chunk-MUDCOEC5.js.map → chunk-RTMQJIKW.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/client.d.ts +2 -0
- package/dist/{connection-change-ZYFBOPEE.js → connection-change-6E7QLJFC.js} +3 -3
- package/dist/{connection-change-ZYFBOPEE.js.map → connection-change-6E7QLJFC.js.map} +1 -1
- package/dist/{controller-63NGJNKK.js → controller-566LDBZD.js} +4 -4
- package/dist/{controller-63NGJNKK.js.map → controller-566LDBZD.js.map} +1 -1
- package/dist/{controller-handoff-YB6DMOUW.js → controller-handoff-KNEQ5W6J.js} +3 -3
- package/dist/{controller-handoff-YB6DMOUW.js.map → controller-handoff-KNEQ5W6J.js.map} +1 -1
- package/dist/index.cjs +43 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +43 -3
- package/dist/index.js.map +1 -1
- package/dist/native-sessions.d.ts +96 -0
- package/dist/types.d.ts +6 -0
- package/dist/workspace.d.ts +6 -4
- package/package.json +1 -1
- package/dist/chunk-3LN2KXJK.js.map +0 -1
|
@@ -88,7 +88,7 @@ function computerPairingURI(invitation) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// src/version.ts
|
|
91
|
-
var SDK_VERSION = "0.1.
|
|
91
|
+
var SDK_VERSION = "0.1.52" ;
|
|
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;
|
|
@@ -1446,7 +1446,7 @@ var GitAccessApi = class {
|
|
|
1446
1446
|
run(projectId, operation, auth) {
|
|
1447
1447
|
return this.mw.http.request("POST", `/workspace/projects/${encodeURIComponent(projectId)}/git/${operation}`, { body: { auth } });
|
|
1448
1448
|
}
|
|
1449
|
-
/** Requires health.gitOperationsVersion >= 1 (>= 2 for switch/create, >= 4 for restore_commit, >= 5 for rename/delete). Acceptance persists before Git runs;
|
|
1449
|
+
/** Requires health.gitOperationsVersion >= 1 (>= 2 for switch/create, >= 4 for restore_commit, >= 5 for rename/delete, >= 6 for commit auth). Acceptance persists before Git runs;
|
|
1450
1450
|
* disconnecting only detaches the client. The same ID/intent never runs twice.
|
|
1451
1451
|
*/
|
|
1452
1452
|
start(projectId, request) {
|
|
@@ -1801,6 +1801,43 @@ var VoiceSession = class {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
1803
|
|
|
1804
|
+
// src/native-sessions.ts
|
|
1805
|
+
var NativeSessionsApi = class {
|
|
1806
|
+
constructor(client) {
|
|
1807
|
+
this.client = client;
|
|
1808
|
+
}
|
|
1809
|
+
client;
|
|
1810
|
+
path(chatId) {
|
|
1811
|
+
return `/chats/${encodeURIComponent(chatId)}/native`;
|
|
1812
|
+
}
|
|
1813
|
+
/** A cheap, coalesced status lookup. Does not resume or launch a conversation. */
|
|
1814
|
+
activity(chatId, options = {}) {
|
|
1815
|
+
return this.client.http.request("GET", this.path(chatId), {
|
|
1816
|
+
query: { agent: options.agent ?? this.client.defaultAgent },
|
|
1817
|
+
signal: options.signal
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
/** Breaking the loop detaches only this viewer. No automatic command resends.
|
|
1821
|
+
* On a replacement snapshot, replace the live projection; on resume, retain it.
|
|
1822
|
+
* Persist the cursor after applying each frame, then reuse it on reconnection. */
|
|
1823
|
+
async *events(chatId, options = {}) {
|
|
1824
|
+
const response = await this.client.http.open("GET", `${this.path(chatId)}/events`, {
|
|
1825
|
+
query: { agent: options.agent ?? this.client.defaultAgent, cursor: options.cursor },
|
|
1826
|
+
signal: options.signal
|
|
1827
|
+
});
|
|
1828
|
+
yield* readSSE(response.body, options.signal);
|
|
1829
|
+
}
|
|
1830
|
+
/** Send, stop the exact turn, or answer a pending question. An unknown outcome
|
|
1831
|
+
* requires checking the conversation; do not retry with a fresh requestId. */
|
|
1832
|
+
action(chatId, action, options = {}) {
|
|
1833
|
+
return this.client.http.request("POST", `${this.path(chatId)}/actions`, {
|
|
1834
|
+
query: { agent: options.agent ?? this.client.defaultAgent },
|
|
1835
|
+
body: action,
|
|
1836
|
+
signal: options.signal
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
};
|
|
1840
|
+
|
|
1804
1841
|
// src/embedded.ts
|
|
1805
1842
|
var shared = /* @__PURE__ */ new Map();
|
|
1806
1843
|
function configKey(opts) {
|
|
@@ -2053,6 +2090,7 @@ var Mindwire = class _Mindwire {
|
|
|
2053
2090
|
execution;
|
|
2054
2091
|
computer;
|
|
2055
2092
|
voice;
|
|
2093
|
+
nativeSessions;
|
|
2056
2094
|
http;
|
|
2057
2095
|
/** The default agent type applied to agent-scoped calls, if set. */
|
|
2058
2096
|
defaultAgent;
|
|
@@ -2092,6 +2130,7 @@ var Mindwire = class _Mindwire {
|
|
|
2092
2130
|
this.execution = new ExecutionApi(this);
|
|
2093
2131
|
this.computer = new ComputerApi(this);
|
|
2094
2132
|
this.voice = new VoiceApi(this);
|
|
2133
|
+
this.nativeSessions = new NativeSessionsApi(this);
|
|
2095
2134
|
this.auth = new AuthApi(this);
|
|
2096
2135
|
this.prompts = new PromptsApi(this);
|
|
2097
2136
|
this.mcp = new McpApi(this);
|
|
@@ -2118,6 +2157,7 @@ var Mindwire = class _Mindwire {
|
|
|
2118
2157
|
clone.execution = new ExecutionApi(clone);
|
|
2119
2158
|
clone.computer = new ComputerApi(clone);
|
|
2120
2159
|
clone.voice = new VoiceApi(clone);
|
|
2160
|
+
clone.nativeSessions = new NativeSessionsApi(clone);
|
|
2121
2161
|
clone.auth = new AuthApi(clone);
|
|
2122
2162
|
clone.prompts = new PromptsApi(clone);
|
|
2123
2163
|
clone.mcp = new McpApi(clone);
|
|
@@ -2829,7 +2869,7 @@ async function ensureComputer(directory, cliPath, patch = {}, onProgress, option
|
|
|
2829
2869
|
if (!compatible(controller2) || !await processStateAlive(controller2)) {
|
|
2830
2870
|
await ensureComputer(directory, cliPath, {}, onProgress, { ...options, waitForRoutes: false });
|
|
2831
2871
|
}
|
|
2832
|
-
const { changeComputerConnection } = await import('./connection-change-
|
|
2872
|
+
const { changeComputerConnection } = await import('./connection-change-6E7QLJFC.js');
|
|
2833
2873
|
await changeComputerConnection(directory, Object.fromEntries(changed.map((key) => [key, patch[key]])), { signal: options.signal, onProgress });
|
|
2834
2874
|
return computerClient(directory);
|
|
2835
2875
|
}
|
|
@@ -2870,7 +2910,7 @@ async function ensureComputer(directory, cliPath, patch = {}, onProgress, option
|
|
|
2870
2910
|
let controller = await readJSON(path4.join(directory, "computer-controller.json"));
|
|
2871
2911
|
if (existing && controller && !compatible(controller) && await processStateAlive(controller)) {
|
|
2872
2912
|
onProgress?.("Refreshing the background connection service\u2026");
|
|
2873
|
-
const { handoffController } = await import('./controller-handoff-
|
|
2913
|
+
const { handoffController } = await import('./controller-handoff-KNEQ5W6J.js');
|
|
2874
2914
|
await handoffController(directory, controller, config, await existing.computer.info());
|
|
2875
2915
|
controller = void 0;
|
|
2876
2916
|
}
|
|
@@ -2904,7 +2944,7 @@ async function ensureComputer(directory, cliPath, patch = {}, onProgress, option
|
|
|
2904
2944
|
}
|
|
2905
2945
|
}
|
|
2906
2946
|
async function superviseComputer(directory) {
|
|
2907
|
-
const controller = await import('./controller-
|
|
2947
|
+
const controller = await import('./controller-566LDBZD.js');
|
|
2908
2948
|
await controller.superviseComputer(directory);
|
|
2909
2949
|
}
|
|
2910
2950
|
async function stopComputer(directory, force = false) {
|
|
@@ -2929,5 +2969,5 @@ async function stopComputer(directory, force = false) {
|
|
|
2929
2969
|
}
|
|
2930
2970
|
|
|
2931
2971
|
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, versionAtLeast, websocketURL, writeJSON };
|
|
2932
|
-
//# sourceMappingURL=chunk-
|
|
2933
|
-
//# sourceMappingURL=chunk-
|
|
2972
|
+
//# sourceMappingURL=chunk-4XL565EU.js.map
|
|
2973
|
+
//# sourceMappingURL=chunk-4XL565EU.js.map
|