@liberseek/boft-cli-linux-x64 0.7.6 → 0.7.8
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/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +85 -61
- package/app/console-web.js +678 -182
- package/app/desktop-controller.mjs +84 -22
- package/app/host-runtime.mjs +540 -132
- package/app/plugins/antigravity/plugin.mjs +809 -718
- package/app/plugins/claude-code/plugin.mjs +281 -117
- package/app/plugins/codebuddy/plugin.mjs +739 -664
- package/app/plugins/cursor-cli/plugin.mjs +451 -359
- package/app/plugins/deepseek-harness/plugin.mjs +25477 -26255
- package/app/plugins/grok/plugin.mjs +1405 -1313
- package/app/plugins/hermes/plugin.mjs +621 -472
- package/app/plugins/kimi-code/plugin.mjs +754 -674
- package/app/plugins/kiro-cli/plugin.mjs +15836 -15742
- package/app/plugins/muse/plugin.mjs +74 -55
- package/app/plugins/omp/plugin.mjs +1669 -1551
- package/app/plugins/opencode/plugin.mjs +745 -668
- package/app/plugins/pi/plugin.mjs +15810 -15699
- package/app/plugins/qoder/plugin.mjs +515 -393
- package/app/plugins/qoder-cn/plugin.mjs +181 -57
- package/app/plugins/workbuddy/plugin.mjs +74 -55
- package/app/renderer-extension.js +945 -379
- package/bin/boft +0 -0
- package/libexec/boft-shim +0 -0
- package/libexec/boft-updater +0 -0
- package/package.json +1 -1
|
@@ -219,8 +219,8 @@ function parseTarget(value) {
|
|
|
219
219
|
webSocketDebuggerUrl
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
function defaultFetch(url) {
|
|
223
|
-
return fetch(url);
|
|
222
|
+
function defaultFetch(url, init) {
|
|
223
|
+
return fetch(url, init);
|
|
224
224
|
}
|
|
225
225
|
function defaultSocketFactory(url) {
|
|
226
226
|
return new WebSocket(url);
|
|
@@ -247,10 +247,10 @@ function parseResponse(value) {
|
|
|
247
247
|
}
|
|
248
248
|
return response;
|
|
249
249
|
}
|
|
250
|
-
async function listCdpTargets(endpoint, fetchImpl = defaultFetch) {
|
|
250
|
+
async function listCdpTargets(endpoint, fetchImpl = defaultFetch, signal) {
|
|
251
251
|
const baseUrl = loopbackUrl(endpoint, ["http:", "https:"]);
|
|
252
252
|
const targetsUrl = new URL("/json/list", baseUrl).toString();
|
|
253
|
-
const response = await fetchImpl(targetsUrl);
|
|
253
|
+
const response = await fetchImpl(targetsUrl, signal ? { signal } : void 0);
|
|
254
254
|
if (!response.ok) throw new Error(`CDP target discovery failed with HTTP ${response.status}`);
|
|
255
255
|
const value = await response.json();
|
|
256
256
|
if (!Array.isArray(value)) throw new Error("CDP target discovery did not return an array");
|
|
@@ -1216,6 +1216,14 @@ function installRendererHostRouting(root, target, discover, resolve, createPolic
|
|
|
1216
1216
|
return typeof hostId === "string" && hostId ? hostId : null;
|
|
1217
1217
|
};
|
|
1218
1218
|
const routing = {
|
|
1219
|
+
knownHostIds() {
|
|
1220
|
+
if (disposed) return [];
|
|
1221
|
+
try {
|
|
1222
|
+
return [...read().hostIds];
|
|
1223
|
+
} catch {
|
|
1224
|
+
return [];
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1219
1227
|
forHost(hostId) {
|
|
1220
1228
|
return hostId ? routeFor(hostId) : null;
|
|
1221
1229
|
},
|
|
@@ -1282,7 +1290,12 @@ function directRendererInstaller() {
|
|
|
1282
1290
|
manager, bridge, hostId, target, prewarmed, isCurrent, retainRendererHostResponses,
|
|
1283
1291
|
),
|
|
1284
1292
|
);
|
|
1285
|
-
|
|
1293
|
+
// Publish a default draft policy only when its Host is unambiguous. Host
|
|
1294
|
+
// connections can be ready even when multiple Composers coexist.
|
|
1295
|
+
const composerRoute = routing.forComposer();
|
|
1296
|
+
const connected = composerRoute !== null ||
|
|
1297
|
+
['local', ...(routing.knownHostIds?.() ?? [])].some((hostId) => routing.forHost(hostId) !== null);
|
|
1298
|
+
if (!connected) throw new Error('Renderer Host request manager is unavailable');
|
|
1286
1299
|
return { state: 'ready', reason: 'owned-request-bridge' };
|
|
1287
1300
|
})()`;
|
|
1288
1301
|
}
|
|
@@ -1298,7 +1311,8 @@ async function waitForDraftPrewarmPolicy(evaluate, expression) {
|
|
|
1298
1311
|
} catch (error) {
|
|
1299
1312
|
const message = error instanceof Error ? error.message : String(error);
|
|
1300
1313
|
const remaining = deadline - Date.now();
|
|
1301
|
-
if (!message.includes("Renderer request manager is
|
|
1314
|
+
if (!message.includes("Renderer Host request manager is unavailable") || remaining <= 0)
|
|
1315
|
+
throw error;
|
|
1302
1316
|
await new Promise(
|
|
1303
1317
|
(resolve) => setTimeout(resolve, Math.min(REQUEST_MANAGER_POLL_INTERVAL_MS, remaining))
|
|
1304
1318
|
);
|
|
@@ -1319,6 +1333,33 @@ function isRecord2(value) {
|
|
|
1319
1333
|
function sleep(milliseconds) {
|
|
1320
1334
|
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
1321
1335
|
}
|
|
1336
|
+
function discoveryTimeoutSignal(timeoutMs, signal) {
|
|
1337
|
+
const timeout = AbortSignal.timeout(timeoutMs);
|
|
1338
|
+
return signal ? AbortSignal.any([timeout, signal]) : timeout;
|
|
1339
|
+
}
|
|
1340
|
+
function abortFailure(signal, fallback) {
|
|
1341
|
+
return signal.reason instanceof Error ? signal.reason : new Error(fallback);
|
|
1342
|
+
}
|
|
1343
|
+
function awaitWithSignal(promise, signal, timeoutMessage) {
|
|
1344
|
+
if (signal.aborted) return Promise.reject(abortFailure(signal, timeoutMessage));
|
|
1345
|
+
return new Promise((resolve, reject) => {
|
|
1346
|
+
const onAbort = () => {
|
|
1347
|
+
signal.removeEventListener("abort", onAbort);
|
|
1348
|
+
reject(abortFailure(signal, timeoutMessage));
|
|
1349
|
+
};
|
|
1350
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
1351
|
+
promise.then(
|
|
1352
|
+
(value) => {
|
|
1353
|
+
signal.removeEventListener("abort", onAbort);
|
|
1354
|
+
resolve(value);
|
|
1355
|
+
},
|
|
1356
|
+
(error) => {
|
|
1357
|
+
signal.removeEventListener("abort", onAbort);
|
|
1358
|
+
reject(error);
|
|
1359
|
+
}
|
|
1360
|
+
);
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1322
1363
|
function sameAgents(actual, expected) {
|
|
1323
1364
|
const expectedSet = new Set(expected);
|
|
1324
1365
|
return actual.length === expected.length && new Set(actual).size === actual.length && actual.every((agent) => expectedSet.has(agent));
|
|
@@ -1358,21 +1399,36 @@ function validateBindingStatus(value, expectedAgents) {
|
|
|
1358
1399
|
}
|
|
1359
1400
|
return value;
|
|
1360
1401
|
}
|
|
1361
|
-
async function waitForPrimaryTarget(endpoint, operations, timeoutMs, pollIntervalMs, preferredTargetId) {
|
|
1362
|
-
const
|
|
1402
|
+
async function waitForPrimaryTarget(endpoint, operations, timeoutMs, pollIntervalMs, preferredTargetId, signal) {
|
|
1403
|
+
const discovery = discoveryTimeoutSignal(timeoutMs, signal);
|
|
1363
1404
|
let lastError;
|
|
1364
|
-
while (
|
|
1405
|
+
while (!discovery.aborted) {
|
|
1365
1406
|
try {
|
|
1366
1407
|
const target = selectPrimaryRendererTarget(
|
|
1367
|
-
await
|
|
1408
|
+
await awaitWithSignal(
|
|
1409
|
+
operations.listTargets(endpoint, discovery),
|
|
1410
|
+
discovery,
|
|
1411
|
+
"Renderer CDP target discovery timed out"
|
|
1412
|
+
),
|
|
1368
1413
|
preferredTargetId
|
|
1369
1414
|
);
|
|
1370
1415
|
if (target) return target;
|
|
1371
1416
|
lastError = new Error("Renderer CDP has no primary app://-/index.html page target");
|
|
1372
1417
|
} catch (error) {
|
|
1373
1418
|
lastError = error;
|
|
1419
|
+
if (discovery.aborted) break;
|
|
1420
|
+
}
|
|
1421
|
+
if (discovery.aborted) break;
|
|
1422
|
+
try {
|
|
1423
|
+
await awaitWithSignal(
|
|
1424
|
+
sleep(pollIntervalMs),
|
|
1425
|
+
discovery,
|
|
1426
|
+
"Renderer CDP target discovery timed out"
|
|
1427
|
+
);
|
|
1428
|
+
} catch (error) {
|
|
1429
|
+
lastError = error;
|
|
1430
|
+
break;
|
|
1374
1431
|
}
|
|
1375
|
-
await sleep(pollIntervalMs);
|
|
1376
1432
|
}
|
|
1377
1433
|
const detail = lastError instanceof Error ? `: ${lastError.message}` : "";
|
|
1378
1434
|
throw new Error(`Primary Codex Renderer CDP target did not become ready${detail}`);
|
|
@@ -1514,7 +1570,7 @@ var InstalledRendererCdpControlSession = class {
|
|
|
1514
1570
|
}
|
|
1515
1571
|
};
|
|
1516
1572
|
var defaultOperations = {
|
|
1517
|
-
listTargets: (endpoint) => listCdpTargets(endpoint),
|
|
1573
|
+
listTargets: (endpoint, signal) => listCdpTargets(endpoint, fetch, signal),
|
|
1518
1574
|
connect: (webSocketDebuggerUrl) => CdpClient.connect(webSocketDebuggerUrl),
|
|
1519
1575
|
installDraftPrewarmPolicy: installRendererDraftPrewarmPolicyDirect
|
|
1520
1576
|
};
|
|
@@ -1527,7 +1583,9 @@ async function createRendererCdpControlSession(options) {
|
|
|
1527
1583
|
options.rendererCdpEndpoint,
|
|
1528
1584
|
operations,
|
|
1529
1585
|
timeoutMs,
|
|
1530
|
-
pollIntervalMs
|
|
1586
|
+
pollIntervalMs,
|
|
1587
|
+
void 0,
|
|
1588
|
+
options.signal
|
|
1531
1589
|
);
|
|
1532
1590
|
const installed = await installTarget(
|
|
1533
1591
|
target,
|
|
@@ -1746,7 +1804,8 @@ ${rendererSource}`,
|
|
|
1746
1804
|
"qoder-cn",
|
|
1747
1805
|
"kimi-code"
|
|
1748
1806
|
],
|
|
1749
|
-
timeoutMs: PRODUCTION_INSTALL_TIMEOUT_MS
|
|
1807
|
+
timeoutMs: PRODUCTION_INSTALL_TIMEOUT_MS,
|
|
1808
|
+
signal
|
|
1750
1809
|
},
|
|
1751
1810
|
dependencies
|
|
1752
1811
|
);
|
|
@@ -1754,14 +1813,6 @@ ${rendererSource}`,
|
|
|
1754
1813
|
return installed;
|
|
1755
1814
|
};
|
|
1756
1815
|
startupTrace("initialization started");
|
|
1757
|
-
try {
|
|
1758
|
-
session = await createSession();
|
|
1759
|
-
recordRecoverySuccess();
|
|
1760
|
-
} catch (error) {
|
|
1761
|
-
startupTrace("initial Renderer Session unavailable", error);
|
|
1762
|
-
session = void 0;
|
|
1763
|
-
recordRecoveryFailure(error);
|
|
1764
|
-
}
|
|
1765
1816
|
let operation = Promise.resolve(void 0);
|
|
1766
1817
|
const useSession = (callback) => {
|
|
1767
1818
|
const next = operation.then(callback, callback);
|
|
@@ -1809,6 +1860,17 @@ ${rendererSource}`,
|
|
|
1809
1860
|
state: "compatible",
|
|
1810
1861
|
issues: []
|
|
1811
1862
|
});
|
|
1863
|
+
await useSession(async () => {
|
|
1864
|
+
if (session) return;
|
|
1865
|
+
try {
|
|
1866
|
+
session = await createSession();
|
|
1867
|
+
recordRecoverySuccess();
|
|
1868
|
+
} catch (error) {
|
|
1869
|
+
startupTrace("initial Renderer Session unavailable", error);
|
|
1870
|
+
session = void 0;
|
|
1871
|
+
recordRecoveryFailure(error);
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1812
1874
|
while (!signal.aborted) {
|
|
1813
1875
|
await dependencies.sleep(dependencies.monitorIntervalMs);
|
|
1814
1876
|
if (signal.aborted) continue;
|