@me0wo/opencode 2.2.6 → 2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84

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 (3) hide show
  1. package/bin/cli.mjs +6 -3
  2. package/package.json +24 -11
  3. package/README.md +0 -12
package/bin/cli.mjs CHANGED
@@ -4,14 +4,17 @@ import { spawn } from "node:child_process"
4
4
  import path from "node:path"
5
5
 
6
6
  const require = createRequire(import.meta.url)
7
- const key = process.platform === "win32" ? `windows-${process.arch}` : `${process.platform}-${process.arch}`
7
+ const target = `${process.platform === "win32" ? "windows" : process.platform}-${process.arch}`
8
8
  let entry
9
9
  try {
10
- entry = path.join(path.dirname(require.resolve(`@me0wo/opencode-${key}/package.json`)), "opencode.mjs")
10
+ entry = path.join(path.dirname(require.resolve(`@me0wo/opencode-${target}/package.json`)), "opencode.mjs")
11
11
  } catch {
12
- console.error(`@me0wo/opencode: no bundle available for ${key} (supported: linux-x64, darwin-arm64, windows-x64)`)
12
+ console.error(`@me0wo/opencode: no bundle available for ${target}`)
13
13
  process.exit(1)
14
14
  }
15
+ // The runtime that installed the launcher also runs the bundle: bun's shim
16
+ // executes this file with bun, npm-family shims with node. Reuse the same
17
+ // executable instead of pinning a runtime in the command name.
15
18
  const child = spawn(process.execPath, [entry, ...process.argv.slice(2)], { stdio: "inherit" })
16
19
  child.on("exit", (code, signal) => {
17
20
  if (signal) process.kill(process.pid, signal)
package/package.json CHANGED
@@ -1,17 +1,30 @@
1
1
  {
2
2
  "name": "@me0wo/opencode",
3
- "version": "2.2.6",
4
- "description": "OpenCode V2 JS bundle (bun/node-runnable); unofficial build from upstream stable tags",
3
+ "version": "2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84",
4
+ "description": "OpenCode fork JS bundle",
5
5
  "license": "MIT",
6
- "bin": { "opencode-node": "bin/cli.mjs" },
7
- "files": ["bin/"],
6
+ "bin": {
7
+ "opencode-patcher": "bin/cli.mjs"
8
+ },
9
+ "files": [
10
+ "bin/"
11
+ ],
8
12
  "optionalDependencies": {
9
- "@me0wo/opencode-linux-x64": "2.2.6",
10
- "@me0wo/opencode-darwin-arm64": "2.2.6",
11
- "@me0wo/opencode-windows-x64": "2.2.6"
13
+ "@me0wo/opencode-linux-x64": "2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84",
14
+ "@me0wo/opencode-linux-arm64": "2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84",
15
+ "@me0wo/opencode-darwin-arm64": "2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84",
16
+ "@me0wo/opencode-darwin-x64": "2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84",
17
+ "@me0wo/opencode-windows-x64": "2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84",
18
+ "@me0wo/opencode-windows-arm64": "2.2.7-fork.s5fde96ba178bfbd3da9e510607284d33d480ba84"
19
+ },
20
+ "engines": {
21
+ "node": ">=26"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/Sn0wo2/opencode.git"
12
26
  },
13
- "engines": { "node": ">=26" },
14
- "repository": { "type": "git", "url": "git+https://github.com/Sn0wo2/opencode-dist.git" },
15
- "keywords": ["opencode", "opencode2", "ai", "agent", "cli"],
16
- "publishConfig": { "access": "public" }
27
+ "publishConfig": {
28
+ "access": "public"
29
+ }
17
30
  }
package/README.md DELETED
@@ -1,12 +0,0 @@
1
- # @me0wo/opencode
2
-
3
- Unofficial npm distribution of the [OpenCode V2](https://github.com/anomalyco/opencode) JS bundle, built from upstream stable release tags by [Sn0wo2/opencode-dist](https://github.com/Sn0wo2/opencode-dist).
4
-
5
- No runtime is embedded; the launcher runs the platform bundle with your own Node (>= 26) or bun (>= 1.4.4).
6
-
7
- ```sh
8
- npm i -g @me0wo/opencode
9
- opencode-node --version
10
- ```
11
-
12
- The platform bundle (`@me0wo/opencode-linux-x64`, `@me0wo/opencode-darwin-arm64`, or `@me0wo/opencode-windows-x64`) is selected automatically via optionalDependencies and ships `opencode.mjs` plus its native assets (pty, file watching, web UI). Run `bunx opencode-node` to execute the bundle with bun instead of Node.