@liberseek/boft-cli-win32-arm64 0.6.7 → 0.6.9
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/THIRD_PARTY_NOTICES.txt +8 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +137 -36
- package/app/host-runtime.mjs +4164 -3710
- package/app/plugins/antigravity/plugin.mjs +71 -244
- package/app/plugins/claude-code/plugin.mjs +271 -104
- package/app/plugins/codebuddy/assets/icon.svg +1 -0
- package/app/plugins/codebuddy/manifest.json +13 -0
- package/app/plugins/codebuddy/plugin.mjs +23159 -0
- package/app/plugins/cursor-cli/assets/icon.svg +1 -0
- package/app/plugins/cursor-cli/manifest.json +13 -0
- package/app/plugins/cursor-cli/plugin.mjs +22693 -0
- package/app/plugins/deepseek-harness/plugin.mjs +26 -46
- package/app/plugins/enabled.json +3 -1
- package/app/plugins/grok/plugin.mjs +26 -46
- package/app/plugins/hermes/plugin.mjs +268 -92
- package/app/plugins/kiro-cli/plugin.mjs +26 -46
- package/app/plugins/muse/plugin.mjs +26 -46
- package/app/plugins/omp/plugin.mjs +26 -46
- package/app/plugins/opencode/plugin.mjs +50 -51
- package/app/plugins/pi/plugin.mjs +26 -58
- package/app/renderer-extension.js +858 -1145
- package/bin/boft.exe +0 -0
- package/libexec/boft-node-repl.exe +0 -0
- package/libexec/boft-shim.exe +0 -0
- package/libexec/boft-updater.exe +0 -0
- package/licenses/Agent-Client-Protocol-SDK-LICENSE.txt +191 -0
- package/licenses/opencodex-LICENSE.txt +21 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ BOFT CLI runs Pi and other external harnesses inside Codex Desktop.
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g @liberseek/boft-cli@0.6.
|
|
10
|
+
npm install -g @liberseek/boft-cli@0.6.9
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Do not install this package directly. npm selects it through the optional dependencies of `@liberseek/boft-cli`.
|
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
codexhost npm package third-party notices
|
|
2
2
|
|
|
3
|
+
@agentclientprotocol/sdk 1.3.0
|
|
4
|
+
License: Apache-2.0
|
|
5
|
+
License text: licenses/Agent-Client-Protocol-SDK-LICENSE.txt
|
|
6
|
+
|
|
3
7
|
@anthropic-ai/claude-agent-sdk 0.3.220
|
|
4
8
|
License: SEE LICENSE IN README.md
|
|
5
9
|
License text: licenses/Claude-Agent-SDK-LICENSE.md
|
|
@@ -31,3 +35,7 @@ License text: licenses/ws-LICENSE.txt
|
|
|
31
35
|
zod 4.4.3
|
|
32
36
|
License: MIT
|
|
33
37
|
License text: licenses/zod-LICENSE.txt
|
|
38
|
+
|
|
39
|
+
opencodex native profiles (2d4d7a22381a2e497c2442902104619e25f937c7)
|
|
40
|
+
License: MIT
|
|
41
|
+
License text: licenses/opencodex-LICENSE.txt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"version":"0.6.
|
|
1
|
+
{"schemaVersion":1,"version":"0.6.9","distribution":"npm","target":"windows-arm64"}
|
|
@@ -285,10 +285,99 @@ var CdpClient = class _CdpClient {
|
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
|
|
288
|
+
// packages/desktop-control/src/renderer-react-ownership.ts
|
|
289
|
+
function committedReactAncestors(value) {
|
|
290
|
+
const MAX_VISITED_FIBERS = 2e4;
|
|
291
|
+
const fiber = (value2) => typeof value2 === "object" && value2 !== null ? value2 : null;
|
|
292
|
+
const first = fiber(value);
|
|
293
|
+
if (!first) return [];
|
|
294
|
+
const previous = [];
|
|
295
|
+
const seen = /* @__PURE__ */ new Set();
|
|
296
|
+
for (let node = first; node; node = fiber(node.return)) {
|
|
297
|
+
if (seen.has(node) || seen.size >= MAX_VISITED_FIBERS) return [];
|
|
298
|
+
seen.add(node);
|
|
299
|
+
previous.push(node);
|
|
300
|
+
}
|
|
301
|
+
const rootState = fiber(previous.at(-1)?.stateNode);
|
|
302
|
+
if (!rootState || !("current" in rootState)) return previous;
|
|
303
|
+
const current = fiber(rootState.current);
|
|
304
|
+
if (!current) return [];
|
|
305
|
+
const stack = [{ node: current, parent: null }];
|
|
306
|
+
const alternate = fiber(first.alternate);
|
|
307
|
+
seen.clear();
|
|
308
|
+
while (stack.length > 0 && seen.size < MAX_VISITED_FIBERS) {
|
|
309
|
+
const entry = stack.pop();
|
|
310
|
+
if (!entry) break;
|
|
311
|
+
if (seen.has(entry.node)) return [];
|
|
312
|
+
seen.add(entry.node);
|
|
313
|
+
if (entry.node === first || entry.node === alternate) {
|
|
314
|
+
const ancestors = [];
|
|
315
|
+
for (let cursor = entry; cursor; cursor = cursor.parent)
|
|
316
|
+
ancestors.push(cursor.node);
|
|
317
|
+
return ancestors;
|
|
318
|
+
}
|
|
319
|
+
const sibling = entry.parent && fiber(entry.node.sibling);
|
|
320
|
+
if (sibling) stack.push({ node: sibling, parent: entry.parent });
|
|
321
|
+
const child = fiber(entry.node.child);
|
|
322
|
+
if (child) stack.push({ node: child, parent: entry });
|
|
323
|
+
}
|
|
324
|
+
return [];
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// packages/desktop-control/src/renderer-host-response-ownership.ts
|
|
328
|
+
function retainRendererHostResponses(client, hostId, target) {
|
|
329
|
+
if (typeof client.addRequestLifecycleListener !== "function" || typeof target.addEventListener !== "function" || typeof target.removeEventListener !== "function")
|
|
330
|
+
return () => {
|
|
331
|
+
};
|
|
332
|
+
const isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
333
|
+
const pending = /* @__PURE__ */ new Set();
|
|
334
|
+
let retired = false;
|
|
335
|
+
let unsubscribe = () => {
|
|
336
|
+
};
|
|
337
|
+
const detach = () => {
|
|
338
|
+
target.removeEventListener?.("message", receive);
|
|
339
|
+
unsubscribe();
|
|
340
|
+
};
|
|
341
|
+
const receive = (event) => {
|
|
342
|
+
const { source, origin, data } = event;
|
|
343
|
+
if (source != null && source !== target) return;
|
|
344
|
+
const ownOrigin = target.location?.origin;
|
|
345
|
+
if (source === target && ownOrigin && ownOrigin !== "null" && origin !== ownOrigin) return;
|
|
346
|
+
if (!isRecord4(data) || data.type !== "mcp-response" || data.hostId !== hostId) return;
|
|
347
|
+
const message = data.message;
|
|
348
|
+
if (!isRecord4(message)) return;
|
|
349
|
+
const id = message.id;
|
|
350
|
+
if (typeof id !== "string" && typeof id !== "number" || !pending.has(id)) return;
|
|
351
|
+
const hasError = isRecord4(message.error);
|
|
352
|
+
if (!hasError && !Object.prototype.hasOwnProperty.call(message, "result")) return;
|
|
353
|
+
queueMicrotask(() => {
|
|
354
|
+
if (!pending.has(id)) return;
|
|
355
|
+
if (hasError) client.onError(id, message.error, data.hostMetrics);
|
|
356
|
+
else client.onResult(id, message.result, data.hostMetrics);
|
|
357
|
+
});
|
|
358
|
+
};
|
|
359
|
+
target.addEventListener("message", receive);
|
|
360
|
+
unsubscribe = client.addRequestLifecycleListener((event) => {
|
|
361
|
+
if (!isRecord4(event) || event.hostId !== hostId) return;
|
|
362
|
+
const id = event.id;
|
|
363
|
+
if (typeof id !== "string" && typeof id !== "number") return;
|
|
364
|
+
if (!retired && event.type === "started" && typeof event.method === "string" && event.method.startsWith("codexhost/"))
|
|
365
|
+
pending.add(id);
|
|
366
|
+
else if (event.type === "completed" || event.type === "failed") {
|
|
367
|
+
pending.delete(id);
|
|
368
|
+
if (retired && pending.size === 0) detach();
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
return () => {
|
|
372
|
+
retired = true;
|
|
373
|
+
if (pending.size === 0) detach();
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
|
|
288
377
|
// packages/desktop-control/src/renderer-draft-prewarm-runtime.ts
|
|
289
|
-
function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewarmedThreadManager) {
|
|
378
|
+
function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewarmedThreadManager, isCurrentManager, retainResponses = retainRendererHostResponses) {
|
|
290
379
|
const existing = target.__codexhostDraftPrewarmPolicyV1;
|
|
291
|
-
if (existing?.owns?.length ===
|
|
380
|
+
if (existing?.owns?.length === 5 && existing.owns(manager, bridge, hostId, prewarmedThreadManager, !!isCurrentManager) === true) {
|
|
292
381
|
return { state: "ready", reason: "owned-request-bridge" };
|
|
293
382
|
}
|
|
294
383
|
existing?.dispose?.();
|
|
@@ -297,9 +386,10 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
|
|
|
297
386
|
const originalOnNotification = manager.onNotification;
|
|
298
387
|
const originalDispatchAppServerResponse = manager.dispatchAppServerResponse;
|
|
299
388
|
let selectedModel = null;
|
|
300
|
-
let selectedCodexAccountId = null;
|
|
301
389
|
const isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
302
390
|
const isRemoteControlHost = hostId.startsWith("remote-control:");
|
|
391
|
+
const retireResponses = isRemoteControlHost ? () => {
|
|
392
|
+
} : retainResponses(bridge, hostId, target);
|
|
303
393
|
const knownExternalThreadIds = /* @__PURE__ */ new Set();
|
|
304
394
|
const knownOfficialThreadIds = /* @__PURE__ */ new Set();
|
|
305
395
|
const threadOwnershipResolutions = /* @__PURE__ */ new Map();
|
|
@@ -650,7 +740,7 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
|
|
|
650
740
|
if (method.startsWith("codexhost/")) return true;
|
|
651
741
|
if (method === "thread/list") return true;
|
|
652
742
|
if (method === "thread/start") {
|
|
653
|
-
return isRecord4(parameters) &&
|
|
743
|
+
return isRecord4(parameters) && typeof parameters.model === "string" && parameters.model.startsWith("codexhost/");
|
|
654
744
|
}
|
|
655
745
|
const threadId = threadIdFromParameters(parameters);
|
|
656
746
|
if (threadId && knownExternalThreadIds.has(threadId)) return true;
|
|
@@ -661,13 +751,10 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
|
|
|
661
751
|
if (!isRecord4(parameters) || parameters.ephemeral === true) {
|
|
662
752
|
return parameters;
|
|
663
753
|
}
|
|
664
|
-
|
|
754
|
+
return {
|
|
665
755
|
...parameters,
|
|
666
|
-
...selectedModel === null ? {} : { model: selectedModel }
|
|
667
|
-
...selectedCodexAccountId === null ? {} : { __codexhostAccountId: selectedCodexAccountId }
|
|
756
|
+
...selectedModel === null ? {} : { model: selectedModel }
|
|
668
757
|
};
|
|
669
|
-
selectedCodexAccountId = null;
|
|
670
|
-
return routed;
|
|
671
758
|
};
|
|
672
759
|
const routedSend = (method, parameters, options) => {
|
|
673
760
|
const routedParameters = method === "thread/start" ? routeThreadStart(parameters) : parameters;
|
|
@@ -725,10 +812,12 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
|
|
|
725
812
|
const policy = Object.freeze({
|
|
726
813
|
state: "ready",
|
|
727
814
|
hostId,
|
|
728
|
-
owns(candidateManager, candidate, candidateHostId, candidatePrewarmedThreadManager) {
|
|
729
|
-
return candidateManager === manager && candidate === bridge && candidateHostId === hostId && candidatePrewarmedThreadManager === prewarmedThreadManager;
|
|
815
|
+
owns(candidateManager, candidate, candidateHostId, candidatePrewarmedThreadManager, requiresCurrentManager) {
|
|
816
|
+
return candidateManager === manager && candidate === bridge && candidateHostId === hostId && candidatePrewarmedThreadManager === prewarmedThreadManager && requiresCurrentManager === !!isCurrentManager;
|
|
730
817
|
},
|
|
731
818
|
requestTarget() {
|
|
819
|
+
if (isCurrentManager && !isCurrentManager())
|
|
820
|
+
throw new Error("Renderer request manager is retired");
|
|
732
821
|
return manager;
|
|
733
822
|
},
|
|
734
823
|
select(model) {
|
|
@@ -739,19 +828,12 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
|
|
|
739
828
|
selectedModel = model;
|
|
740
829
|
return true;
|
|
741
830
|
},
|
|
742
|
-
selectAccount(accountId) {
|
|
743
|
-
if (accountId !== null && !/^[A-Za-z0-9._~-]+$/u.test(accountId)) {
|
|
744
|
-
throw new Error("Draft Codex Account ID must be filename-safe");
|
|
745
|
-
}
|
|
746
|
-
if (selectedCodexAccountId === accountId) return false;
|
|
747
|
-
selectedCodexAccountId = accountId;
|
|
748
|
-
return true;
|
|
749
|
-
},
|
|
750
831
|
clear() {
|
|
751
832
|
prewarmedThreadManager.discardAllPrewarmedThreads();
|
|
752
833
|
return Promise.resolve();
|
|
753
834
|
},
|
|
754
835
|
dispose() {
|
|
836
|
+
retireResponses();
|
|
755
837
|
if (bridge.sendRequest === routedSend) bridge.sendRequest = originalSend;
|
|
756
838
|
if (bridge.prewarmThreadStart === routedPrewarm) {
|
|
757
839
|
bridge.prewarmThreadStart = originalPrewarm;
|
|
@@ -781,7 +863,6 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
|
|
|
781
863
|
knownOfficialThreadIds.clear();
|
|
782
864
|
threadOwnershipResolutions.clear();
|
|
783
865
|
selectedModel = null;
|
|
784
|
-
selectedCodexAccountId = null;
|
|
785
866
|
}
|
|
786
867
|
});
|
|
787
868
|
Object.defineProperty(target, "__codexhostDraftPrewarmPolicyV1", {
|
|
@@ -808,15 +889,29 @@ function selectRendererRequestManager(candidates, activeHostIds) {
|
|
|
808
889
|
);
|
|
809
890
|
return eligible.length === 1 ? eligible[0] ?? null : null;
|
|
810
891
|
}
|
|
892
|
+
function requestManagerFromHookState(value) {
|
|
893
|
+
const matchesRequestManager = (candidate) => {
|
|
894
|
+
if (candidate == null || typeof candidate !== "object") return false;
|
|
895
|
+
const value2 = candidate;
|
|
896
|
+
return value2.requestClient != null && typeof value2.requestClient.prewarmThreadStart === "function" && typeof value2.requestClient.sendRequest === "function" && typeof value2.requestClient.enqueueRequest === "function" && typeof value2.prewarmedThreadManager?.discardAllPrewarmedThreads === "function" && typeof value2.sendRequest === "function";
|
|
897
|
+
};
|
|
898
|
+
if (matchesRequestManager(value)) return value;
|
|
899
|
+
if (value != null && typeof value === "object" && matchesRequestManager(value.manager)) {
|
|
900
|
+
return value.manager;
|
|
901
|
+
}
|
|
902
|
+
return null;
|
|
903
|
+
}
|
|
811
904
|
function isRecord2(value) {
|
|
812
905
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
813
906
|
}
|
|
814
907
|
var FIND_REQUEST_MANAGER_EXPRESSION = `(() => {
|
|
908
|
+
const requestManagerFromHookState = ${requestManagerFromHookState.toString()};
|
|
909
|
+
const committedReactAncestors = ${committedReactAncestors.toString()};
|
|
815
910
|
const editors = [...document.querySelectorAll(
|
|
816
911
|
'[data-codex-composer], [contenteditable="true"][role="textbox"]',
|
|
817
912
|
)];
|
|
818
913
|
if (editors.length !== 1) {
|
|
819
|
-
return { candidateCount: 0, hostId: null, sendRequest: null };
|
|
914
|
+
return { candidateCount: 0, editorCount: editors.length, hostId: null, sendRequest: null };
|
|
820
915
|
}
|
|
821
916
|
let element = editors[0];
|
|
822
917
|
let fiber = null;
|
|
@@ -829,7 +924,8 @@ var FIND_REQUEST_MANAGER_EXPRESSION = `(() => {
|
|
|
829
924
|
}
|
|
830
925
|
const managers = new Set();
|
|
831
926
|
const activeHostIds = new Set();
|
|
832
|
-
for (
|
|
927
|
+
for (const current of committedReactAncestors(fiber)) {
|
|
928
|
+
const fiber = current;
|
|
833
929
|
const props = fiber.memoizedProps;
|
|
834
930
|
if (props != null && typeof props === 'object') {
|
|
835
931
|
for (const name of ['executionTargetHostId', 'permissionsHostId']) {
|
|
@@ -839,19 +935,8 @@ var FIND_REQUEST_MANAGER_EXPRESSION = `(() => {
|
|
|
839
935
|
}
|
|
840
936
|
let hook = fiber.memoizedState;
|
|
841
937
|
for (let index = 0; hook != null && index < 120; index += 1, hook = hook.next) {
|
|
842
|
-
const
|
|
843
|
-
if (
|
|
844
|
-
value != null &&
|
|
845
|
-
typeof value === 'object' &&
|
|
846
|
-
value.requestClient != null &&
|
|
847
|
-
typeof value.requestClient.prewarmThreadStart === 'function' &&
|
|
848
|
-
typeof value.requestClient.sendRequest === 'function' &&
|
|
849
|
-
typeof value.requestClient.enqueueRequest === 'function' &&
|
|
850
|
-
typeof value.prewarmedThreadManager?.discardAllPrewarmedThreads === 'function' &&
|
|
851
|
-
typeof value.sendRequest === 'function'
|
|
852
|
-
) {
|
|
853
|
-
managers.add(value);
|
|
854
|
-
}
|
|
938
|
+
const manager = requestManagerFromHookState(hook.memoizedState);
|
|
939
|
+
if (manager != null) managers.add(manager);
|
|
855
940
|
}
|
|
856
941
|
}
|
|
857
942
|
const candidates = [...managers].map((manager) => {
|
|
@@ -871,12 +956,20 @@ var FIND_REQUEST_MANAGER_EXPRESSION = `(() => {
|
|
|
871
956
|
const selected = (${selectRendererRequestManager.toString()})(candidates, [...activeHostIds]);
|
|
872
957
|
return {
|
|
873
958
|
candidateCount: selected == null ? candidates.length : 1,
|
|
959
|
+
editorCount: editors.length,
|
|
874
960
|
hostId: selected?.hostId ?? null,
|
|
875
961
|
manager: selected?.manager ?? null,
|
|
876
962
|
requestClient: selected?.requestClient ?? null,
|
|
877
963
|
prewarmedThreadManager: selected?.prewarmedThreadManager ?? null,
|
|
878
964
|
};
|
|
879
965
|
})()`;
|
|
966
|
+
var IS_CURRENT_REQUEST_MANAGER = `function(manager, requestClient, hostId, prewarmedThreadManager) {
|
|
967
|
+
const current = ${FIND_REQUEST_MANAGER_EXPRESSION};
|
|
968
|
+
return current.editorCount === 0 || (
|
|
969
|
+
current.manager === manager && current.requestClient === requestClient &&
|
|
970
|
+
current.hostId === hostId && current.prewarmedThreadManager === prewarmedThreadManager
|
|
971
|
+
);
|
|
972
|
+
}`;
|
|
880
973
|
var INSTALL_RENDERER_POLICY_FUNCTION = `function(requestClient, hostId, prewarmedThreadManager) {
|
|
881
974
|
return (${installDraftPrewarmPolicyBridge.toString()})(
|
|
882
975
|
this,
|
|
@@ -884,6 +977,8 @@ var INSTALL_RENDERER_POLICY_FUNCTION = `function(requestClient, hostId, prewarme
|
|
|
884
977
|
hostId,
|
|
885
978
|
window,
|
|
886
979
|
prewarmedThreadManager,
|
|
980
|
+
() => (${IS_CURRENT_REQUEST_MANAGER})(this, requestClient, hostId, prewarmedThreadManager),
|
|
981
|
+
(${retainRendererHostResponses.toString()}),
|
|
887
982
|
);
|
|
888
983
|
}`;
|
|
889
984
|
var REQUEST_MANAGER_WAIT_TIMEOUT_MS = 6e4;
|
|
@@ -909,6 +1004,10 @@ function directRendererInstaller() {
|
|
|
909
1004
|
selected.hostId,
|
|
910
1005
|
window,
|
|
911
1006
|
selected.prewarmedThreadManager,
|
|
1007
|
+
() => (${IS_CURRENT_REQUEST_MANAGER})(
|
|
1008
|
+
selected.manager, selected.requestClient, selected.hostId, selected.prewarmedThreadManager,
|
|
1009
|
+
),
|
|
1010
|
+
(${retainRendererHostResponses.toString()}),
|
|
912
1011
|
);
|
|
913
1012
|
})()`;
|
|
914
1013
|
}
|
|
@@ -1355,7 +1454,9 @@ ${rendererSource}`,
|
|
|
1355
1454
|
"antigravity",
|
|
1356
1455
|
"hermes",
|
|
1357
1456
|
"muse",
|
|
1358
|
-
"kiro-cli"
|
|
1457
|
+
"kiro-cli",
|
|
1458
|
+
"codebuddy",
|
|
1459
|
+
"cursor-cli"
|
|
1359
1460
|
],
|
|
1360
1461
|
timeoutMs: PRODUCTION_INSTALL_TIMEOUT_MS
|
|
1361
1462
|
},
|