@liberseek/boft-cli-win32-arm64 0.4.4 → 0.6.0

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 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.4.4
10
+ npm install -g @liberseek/boft-cli@0.6.0
11
11
  ```
12
12
 
13
13
  Do not install this package directly. npm selects it through the optional dependencies of `@liberseek/boft-cli`.
@@ -17,19 +17,19 @@ This package is platform-specific (`os=win32`, `cpu=arm64`).
17
17
  ## Usage
18
18
 
19
19
  ```bash
20
- codexhost
21
- codexhost --version
22
- codexhost inspect
23
- codexhost launch
24
- codexhost remote install
25
- codexhost remote start
26
- codexhost remote stop
27
- codexhost remote status
28
- codexhost remote uninstall
29
- codexhost broker status
20
+ boft
21
+ boft --version
22
+ boft inspect
23
+ boft launch
24
+ boft remote install
25
+ boft remote start
26
+ boft remote stop
27
+ boft remote status
28
+ boft remote uninstall
29
+ boft broker status
30
30
  ```
31
31
 
32
- The `codexhost` command launches the packaged Rust launcher with:
32
+ The `boft` command launches the packaged Rust launcher with:
33
33
 
34
34
  - the current Node.js executable as Host Runtime
35
35
  - packaged `host-runtime`, Desktop Controller, Renderer, and Shim binaries
@@ -1 +1 @@
1
- {"schemaVersion":1,"version":"0.4.4","distribution":"npm","target":"windows-arm64"}
1
+ {"schemaVersion":1,"version":"0.6.0","distribution":"npm","target":"windows-arm64"}
@@ -297,6 +297,7 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
297
297
  const originalOnNotification = manager.onNotification;
298
298
  const originalDispatchAppServerResponse = manager.dispatchAppServerResponse;
299
299
  let selectedModel = null;
300
+ let selectedCodexAccountId = null;
300
301
  const isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
301
302
  const isRemoteControlHost = hostId.startsWith("remote-control:");
302
303
  const knownExternalThreadIds = /* @__PURE__ */ new Set();
@@ -649,7 +650,7 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
649
650
  if (method.startsWith("codexhost/")) return true;
650
651
  if (method === "thread/list") return true;
651
652
  if (method === "thread/start") {
652
- return isRecord4(parameters) && typeof parameters.model === "string" && parameters.model.startsWith("codexhost/");
653
+ return isRecord4(parameters) && (typeof parameters.model === "string" && parameters.model.startsWith("codexhost/") || typeof parameters.__codexhostAccountId === "string");
653
654
  }
654
655
  const threadId = threadIdFromParameters(parameters);
655
656
  if (threadId && knownExternalThreadIds.has(threadId)) return true;
@@ -657,10 +658,16 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
657
658
  return selectedModel !== null && (method.startsWith("thread/") || method.startsWith("turn/") || method.startsWith("review/"));
658
659
  };
659
660
  const routeThreadStart = (parameters) => {
660
- if (selectedModel === null || !isRecord4(parameters) || parameters.ephemeral === true) {
661
+ if (!isRecord4(parameters) || parameters.ephemeral === true) {
661
662
  return parameters;
662
663
  }
663
- return { ...parameters, model: selectedModel };
664
+ const routed = {
665
+ ...parameters,
666
+ ...selectedModel === null ? {} : { model: selectedModel },
667
+ ...selectedCodexAccountId === null ? {} : { __codexhostAccountId: selectedCodexAccountId }
668
+ };
669
+ selectedCodexAccountId = null;
670
+ return routed;
664
671
  };
665
672
  const routedSend = (method, parameters, options) => {
666
673
  const routedParameters = method === "thread/start" ? routeThreadStart(parameters) : parameters;
@@ -732,6 +739,14 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
732
739
  selectedModel = model;
733
740
  return true;
734
741
  },
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
+ },
735
750
  clear() {
736
751
  prewarmedThreadManager.discardAllPrewarmedThreads();
737
752
  return Promise.resolve();
@@ -766,6 +781,7 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
766
781
  knownOfficialThreadIds.clear();
767
782
  threadOwnershipResolutions.clear();
768
783
  selectedModel = null;
784
+ selectedCodexAccountId = null;
769
785
  }
770
786
  });
771
787
  Object.defineProperty(target, "__codexhostDraftPrewarmPolicyV1", {
@@ -1428,7 +1444,7 @@ try {
1428
1444
  await runDesktopController(parseDesktopControllerArguments(process.argv.slice(2)), abort.signal);
1429
1445
  } catch (error) {
1430
1446
  console.error(
1431
- `codexhost Desktop Controller: ${error instanceof Error ? error.message : String(error)}`
1447
+ `BOFT CLI Desktop Controller: ${error instanceof Error ? error.message : String(error)}`
1432
1448
  );
1433
1449
  process.exitCode = 1;
1434
1450
  } finally {