@bitfun-test/bitfun 0.2.19-daily-20260831 → 0.2.19-daily.20260828

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
@@ -8,23 +8,8 @@ npm install -g @bitfun-ai/bitfun
8
8
  bitfun --help
9
9
  ```
10
10
 
11
- The npm package exposes only the `bitfun` command. The selected platform npm
12
- package contains the native executable, the Bun extension-host runtime, the
13
- Extension Host entrypoint, and product-provided plugin npm directories:
14
-
15
- ```text
16
- vendor/<rust-target>/bin/bitfun(.exe)
17
- host/extension-host.js
18
- plugins/manifest.json
19
- plugins/<plugin-package>/...
20
- runtime/bun(.exe)
21
- ```
22
-
23
- The release workflow installs `deveco-harness@0.1.2` from the official npm
24
- registry before packaging and includes its runtime dependencies below
25
- `plugins/deveco-harness/`. Built-in plugins are loaded automatically when the
26
- CLI starts. User-configured OpenCode plugins continue to use their configured
27
- npm or local file spec.
11
+ The npm package exposes only the `bitfun` command. Platform npm packages also
12
+ contain only the native `bitfun` executable.
28
13
 
29
14
  Supported npm targets are Linux x64, macOS ARM64, Windows x64, and OpenHarmony
30
15
  ARM64. The OpenHarmony platform package is signed and published by the release workflow.
package/bin/launcher.js CHANGED
@@ -33,10 +33,6 @@ export function platformPackage(platform = process.platform, arch = process.arch
33
33
  }
34
34
 
35
35
  export function findNativeExecutable(command, platform = process.platform, arch = process.arch) {
36
- return findNativeExecutableDetails(command, platform, arch).executable;
37
- }
38
-
39
- function findNativeExecutableDetails(command, platform = process.platform, arch = process.arch) {
40
36
  if (command !== "bitfun") {
41
37
  throw new Error(`Unsupported BitFun CLI command: ${command}`);
42
38
  }
@@ -46,25 +42,19 @@ function findNativeExecutableDetails(command, platform = process.platform, arch
46
42
  throw new Error(`Unsupported platform: ${platform} (${arch})`);
47
43
  }
48
44
 
49
- let platformPackageRoot;
45
+ let vendorRoot;
50
46
  try {
51
47
  const packageJson = require.resolve(`${selected.packageName}/package.json`);
52
- platformPackageRoot = path.dirname(packageJson);
48
+ vendorRoot = path.join(path.dirname(packageJson), "vendor");
53
49
  } catch {
54
50
  // This fallback supports a manually assembled package with vendor content.
55
- platformPackageRoot = packageRoot;
51
+ vendorRoot = path.join(packageRoot, "vendor");
56
52
  }
57
53
 
58
54
  const executableName = platform === "win32" ? "bitfun.exe" : "bitfun";
59
- const executable = path.join(
60
- platformPackageRoot,
61
- "vendor",
62
- selected.target,
63
- "bin",
64
- executableName,
65
- );
55
+ const executable = path.join(vendorRoot, selected.target, "bin", executableName);
66
56
  if (existsSync(executable)) {
67
- return { executable, platformPackageRoot };
57
+ return executable;
68
58
  }
69
59
 
70
60
  throw new Error(
@@ -74,26 +64,14 @@ function findNativeExecutableDetails(command, platform = process.platform, arch
74
64
  }
75
65
 
76
66
  export async function run(command) {
77
- const selected = findNativeExecutableDetails(command);
78
- const executable = selected.executable;
79
- const runtimeName = process.platform === "win32" ? "bun.exe" : "bun";
80
- const bundledBun = path.join(selected.platformPackageRoot, "runtime", runtimeName);
81
- const bundledPlugins = path.join(selected.platformPackageRoot, "plugins");
82
- const env = {
83
- ...process.env,
84
- BITFUN_MANAGED_BY_NPM: "1",
85
- BITFUN_MANAGED_PACKAGE_ROOT: packageRoot,
86
- BITFUN_MANAGED_PLATFORM_PACKAGE_ROOT: selected.platformPackageRoot,
87
- };
88
- if (!env.BITFUN_BUN_COMMAND && existsSync(bundledBun)) {
89
- env.BITFUN_BUN_COMMAND = bundledBun;
90
- }
91
- if (!env.BITFUN_BUILTIN_PLUGIN_ROOT && existsSync(bundledPlugins)) {
92
- env.BITFUN_BUILTIN_PLUGIN_ROOT = bundledPlugins;
93
- }
67
+ const executable = findNativeExecutable(command);
94
68
  const child = spawn(executable, process.argv.slice(2), {
95
69
  stdio: "inherit",
96
- env,
70
+ env: {
71
+ ...process.env,
72
+ BITFUN_MANAGED_BY_NPM: "1",
73
+ BITFUN_MANAGED_PACKAGE_ROOT: packageRoot,
74
+ },
97
75
  });
98
76
 
99
77
  const forwardSignal = (signal) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitfun-test/bitfun",
3
- "version": "0.2.19-daily-20260831",
3
+ "version": "0.2.19-daily.20260828",
4
4
  "description": "BitFun CLI - terminal AI agent",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,10 +18,10 @@
18
18
  "third-party"
19
19
  ],
20
20
  "optionalDependencies": {
21
- "@bitfun-test/bitfun-linux-x64": "npm:@bitfun-test/bitfun@0.2.19-daily-20260831.linux-x64",
22
- "@bitfun-test/bitfun-darwin-arm64": "npm:@bitfun-test/bitfun@0.2.19-daily-20260831.darwin-arm64",
23
- "@bitfun-test/bitfun-win32-x64": "npm:@bitfun-test/bitfun@0.2.19-daily-20260831.win32-x64",
24
- "@bitfun-test/bitfun-ohos-arm64": "npm:@bitfun-test/bitfun@0.2.19-daily-20260831.ohos-arm64"
21
+ "@bitfun-test/bitfun-linux-x64": "npm:@bitfun-test/bitfun@0.2.19-daily.20260828.linux-x64",
22
+ "@bitfun-test/bitfun-darwin-arm64": "npm:@bitfun-test/bitfun@0.2.19-daily.20260828.darwin-arm64",
23
+ "@bitfun-test/bitfun-win32-x64": "npm:@bitfun-test/bitfun@0.2.19-daily.20260828.win32-x64",
24
+ "@bitfun-test/bitfun-ohos-arm64": "npm:@bitfun-test/bitfun@0.2.19-daily.20260828.ohos-arm64"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",