@bike4mind/cli 2.0.0 → 3.0.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.
Files changed (31) hide show
  1. package/README.md +1 -1
  2. package/dist/{AgentHistoryStore-DIMzvf-y.mjs → AgentHistoryStore-DVxv1kSO.mjs} +7940 -7014
  3. package/dist/{ConfigStore-DIs-K9oD.mjs → ConfigStore-51UaP9pJ.mjs} +12333 -7008
  4. package/dist/{ImageStore-kVo-oHoS.mjs → ImageStore-DuI3tgwQ.mjs} +8 -6
  5. package/dist/SandboxRuntimeAdapter-Bt1wPpld.mjs +2 -0
  6. package/dist/{WorkItemsClient-Cow6nXx7.mjs → WorkItemsClient-BMY0Qq1s.mjs} +78 -9
  7. package/dist/{buildAgent-DOvEp92a.mjs → buildAgent-CrSRKYU_.mjs} +106 -43
  8. package/dist/commands/acpCommand.mjs +26 -35
  9. package/dist/commands/apiCommand.mjs +1 -1
  10. package/dist/commands/doctorCommand.mjs +3 -3
  11. package/dist/commands/envCommand.mjs +1 -1
  12. package/dist/commands/headlessCommand.mjs +15 -24
  13. package/dist/commands/mcpCommand.mjs +3 -3
  14. package/dist/commands/pluginCommand.mjs +2 -2
  15. package/dist/commands/updateCommand.mjs +5 -15
  16. package/dist/dist-BsG2Hlp-.mjs +739 -0
  17. package/dist/index.mjs +670 -340
  18. package/dist/{package-Dl_F2Fah.mjs → package-DEsNSP54.mjs} +1 -1
  19. package/dist/serve-BaHzVbcm.mjs +1511 -0
  20. package/dist/store-BkMur6uk.mjs +2 -0
  21. package/dist/{store-CvjTpQPs.mjs → store-BxmPEI3v.mjs} +10 -0
  22. package/dist/types-I45lMh7Q.mjs +2 -0
  23. package/dist/{updateChecker-CQW8bxo6.mjs → updateChecker-CCLVVdH0.mjs} +36 -13
  24. package/package.json +27 -26
  25. package/dist/ApiClient-BTI0-m0g.mjs +0 -316
  26. package/dist/SandboxRuntimeAdapter-BmHELLuM.mjs +0 -3
  27. package/dist/serve-Y2zMbfGs.mjs +0 -938
  28. package/dist/store-BG3e54c8.mjs +0 -3
  29. package/dist/types-CdIKgWWe.mjs +0 -3
  30. package/dist/{bashExecute-CrdPpBqk-DCATrE-D.mjs → bashExecute-CrdPpBqk-CgK1gZa2.mjs} +1 -1
  31. package/dist/{grepSearch-BgoOOwGe-DtlV8Gn-.mjs → grepSearch-BgoOOwGe-B388GxRD.mjs} +2 -2
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as ConfigStore } from "../ConfigStore-DIs-K9oD.mjs";
3
- import { t as version } from "../package-Dl_F2Fah.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-51UaP9pJ.mjs";
3
+ import { t as version } from "../package-DEsNSP54.mjs";
4
4
  //#region src/commands/mcpCommand.ts
5
5
  /**
6
6
  * External MCP commands (b4m mcp list, b4m mcp add, etc.)
@@ -70,7 +70,7 @@ async function handleMcpCommand(subcommand, argv) {
70
70
  await handleDisable(config, argv.name, configStore);
71
71
  break;
72
72
  case "serve": {
73
- const { handleMcpServeCommand } = await import("../serve-Y2zMbfGs.mjs");
73
+ const { handleMcpServeCommand } = await import("../serve-BaHzVbcm.mjs");
74
74
  await handleMcpServeCommand({
75
75
  http: Boolean(argv.http),
76
76
  port: typeof argv.port === "number" ? argv.port : void 0,
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ import { t as ConfigStore } from "../ConfigStore-51UaP9pJ.mjs";
2
3
  import { n as getDefaultPluginsDir, r as isFeatureEnabled, t as PluginStore } from "../PluginStore-DwvOJ-G3.mjs";
3
- import { t as ConfigStore } from "../ConfigStore-DIs-K9oD.mjs";
4
- import { execFileSync } from "child_process";
5
4
  import { promises } from "fs";
6
5
  import path from "path";
6
+ import { execFileSync } from "child_process";
7
7
  //#region src/commands/pluginCommand.ts
8
8
  /**
9
9
  * External plugin commands (b4m plugin list, b4m plugin add, b4m plugin remove).
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as version } from "../package-Dl_F2Fah.mjs";
3
- import { c as isNpmPrefixWritable, l as setAutoUpdatePreference, n as REEXEC_GUARD_ENV, o as forceCheckForUpdate, r as checkForUpdate, s as getAutoUpdatePreference, t as INSTALL_CMD, u as shouldAttemptAutoUpdate } from "../updateChecker-CQW8bxo6.mjs";
2
+ import { t as version } from "../package-DEsNSP54.mjs";
3
+ import { a as forceCheckForUpdate, c as isNpmPrefixWritable, d as shouldAttemptAutoUpdate, l as readCachedUpdate, n as REEXEC_GUARD_ENV, o as getAutoUpdatePreference, t as INSTALL_CMD, u as setAutoUpdatePreference } from "../updateChecker-CCLVVdH0.mjs";
4
4
  import { t as checkRipgrep } from "../ripgrepCheck-BmkyTK2i.mjs";
5
5
  import { execSync, spawnSync } from "child_process";
6
6
  import { createInterface } from "readline";
@@ -106,8 +106,8 @@ function installAndReexec(currentVersion, latestVersion) {
106
106
  * Skip (ask again next launch) / Never (persist `never`).
107
107
  *
108
108
  * It is a safe no-op (returns without installing) when: already re-exec'd this
109
- * launch, disabled via `B4M_AUTO_UPDATE=0`, not attached to a TTY, no update is
110
- * available, the prefix needs sudo (notify banner informs instead), or the
109
+ * launch, disabled via `B4M_AUTO_UPDATE=0`, not attached to a TTY, the last
110
+ * cached check found no update, the prefix needs sudo (notify banner informs instead), or the
111
111
  * user declines the prompt. Any install/network failure is swallowed so the
112
112
  * user is never blocked from launching the current version.
113
113
  */
@@ -117,17 +117,7 @@ async function maybeAutoUpdateOnLaunch() {
117
117
  const preference = await getAutoUpdatePreference();
118
118
  if (preference === "never") return;
119
119
  const currentVersion = version;
120
- let result;
121
- let timeoutHandle;
122
- try {
123
- result = await Promise.race([checkForUpdate(currentVersion), new Promise((resolve) => {
124
- timeoutHandle = setTimeout(() => resolve(null), 3e3);
125
- })]);
126
- } catch {
127
- return;
128
- } finally {
129
- if (timeoutHandle) clearTimeout(timeoutHandle);
130
- }
120
+ const result = await readCachedUpdate(currentVersion);
131
121
  if (!result?.updateAvailable) return;
132
122
  if (!await isNpmPrefixWritable()) return;
133
123
  if (preference === "ask") {