@witness-ai/opencode 0.7.4 → 0.7.5

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,8 +8,12 @@ OpenCode plugin for witness. It reconciles OpenCode's local session database on
8
8
  | --- | --- | --- |
9
9
  | macOS | Apple Silicon (`darwin/arm64`) | `@witness-ai/opencode-darwin-arm64` |
10
10
  | Linux | x86-64 (`linux/x64`) | `@witness-ai/opencode-linux-x64` |
11
+ | Windows | x86-64 (`win32/x64`) | `@witness-ai/opencode-win32-x64` |
12
+ | Windows | ARM64 (`win32/arm64`) | `@witness-ai/opencode-win32-arm64` |
11
13
 
12
- These are the only platforms supported by the npm distribution. macOS Intel, Linux ARM, and Windows are not supported. The CLI exits with a clear supported-platform message on those systems.
14
+ These are the only platforms supported by the npm distribution. macOS Intel and Linux ARM are not supported; the CLI exits with a clear supported-platform message on those systems.
15
+
16
+ Windows requires **OpenCode 1.18.0 or newer**. If you prefer a self-contained install with the embedding model already included — no first-run download — use the zip from the [latest release](https://github.com/IngTian/witness/releases/latest) instead.
13
17
 
14
18
  ## Install
15
19
 
package/bin/platform.js CHANGED
@@ -4,22 +4,35 @@ import path from "node:path"
4
4
  const PACKAGES = {
5
5
  "darwin-arm64": "@witness-ai/opencode-darwin-arm64",
6
6
  "linux-x64": "@witness-ai/opencode-linux-x64",
7
+ "win32-x64": "@witness-ai/opencode-win32-x64",
8
+ "win32-arm64": "@witness-ai/opencode-win32-arm64",
7
9
  }
8
10
 
9
11
  export function platformPackage(platform = process.platform, arch = process.arch) {
10
12
  return PACKAGES[`${platform}-${arch}`] || ""
11
13
  }
12
14
 
15
+ // binName is "witness.exe" on Windows and "witness" everywhere else.
16
+ //
17
+ // This is not cosmetic: it is the difference between the Windows packages working and being dead
18
+ // weight. The path built here is gated by an existsSync in both consumers (bin/witness.js and the
19
+ // plugin in witness.js), so a missing .exe suffix means the probe silently fails, WITNESS_BIN stays
20
+ // empty, and every hook early-returns — the plugin loads and captures nothing. Publishing a Windows
21
+ // binary while resolving it under a POSIX name would have shipped a package that could never run.
22
+ function binName(platform) {
23
+ return platform === "win32" ? "witness.exe" : "witness"
24
+ }
25
+
13
26
  export function platformWitnessBin(platform = process.platform, arch = process.arch, resolve = createRequire(import.meta.url).resolve) {
14
27
  const name = platformPackage(platform, arch)
15
28
  if (!name) return ""
16
29
  try {
17
- return path.join(path.dirname(resolve(`${name}/package.json`)), "bin", "witness")
30
+ return path.join(path.dirname(resolve(`${name}/package.json`)), "bin", binName(platform))
18
31
  } catch {
19
32
  return ""
20
33
  }
21
34
  }
22
35
 
23
36
  export function supportedPlatforms() {
24
- return "macOS Apple Silicon (darwin/arm64) and Linux x86-64 (linux/x64)"
37
+ return "macOS Apple Silicon (darwin/arm64), Linux x86-64 (linux/x64), and Windows x86-64 + ARM64 (win32/x64, win32/arm64)"
25
38
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@witness-ai/opencode",
3
3
  "mcpName": "io.github.IngTian/witness",
4
- "version": "0.7.4",
4
+ "version": "0.7.5",
5
5
  "description": "MCP memory / second brain for Claude Code & OpenCode — captures your coding sessions and distills how your knowledge and habits evolve over time, queryable by your agent.",
6
6
  "type": "module",
7
7
  "main": "./witness.js",
@@ -21,8 +21,10 @@
21
21
  "README.md"
22
22
  ],
23
23
  "optionalDependencies": {
24
- "@witness-ai/opencode-darwin-arm64": "0.7.4",
25
- "@witness-ai/opencode-linux-x64": "0.7.4"
24
+ "@witness-ai/opencode-darwin-arm64": "0.7.5",
25
+ "@witness-ai/opencode-linux-x64": "0.7.5",
26
+ "@witness-ai/opencode-win32-x64": "0.7.5",
27
+ "@witness-ai/opencode-win32-arm64": "0.7.5"
26
28
  },
27
29
  "keywords": [
28
30
  "mcp",