@witness-ai/opencode 0.7.3 → 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 +10 -11
- package/bin/platform.js +15 -2
- package/package.json +5 -3
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
|
|
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
|
|
|
@@ -22,14 +26,9 @@ Add the npm plugin to your OpenCode config. OpenCode installs the package automa
|
|
|
22
26
|
}
|
|
23
27
|
```
|
|
24
28
|
|
|
25
|
-
To test a prerelease, pin
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
"$schema": "https://opencode.ai/config.json",
|
|
30
|
-
"plugin": ["@witness-ai/opencode@beta"]
|
|
31
|
-
}
|
|
32
|
-
```
|
|
29
|
+
To test a prerelease, pin an explicit version instead of the unversioned package name — e.g.
|
|
30
|
+
`"plugin": ["@witness-ai/opencode@0.8.0-beta.1"]`. Use a real published version; the `beta` dist-tag
|
|
31
|
+
is not kept current, so pinning it can silently install something several releases old.
|
|
33
32
|
|
|
34
33
|
Optional: install it globally if you also want a `witness` CLI on your shell `PATH`:
|
|
35
34
|
|
|
@@ -48,8 +47,8 @@ The main package includes the plugin, CLI wrapper, and prompts. npm installs one
|
|
|
48
47
|
After the download completes, verify the model, OpenCode runner, archive, and queue:
|
|
49
48
|
|
|
50
49
|
```sh
|
|
51
|
-
npm exec --yes --package=@witness-ai/opencode
|
|
52
|
-
npm exec --yes --package=@witness-ai/opencode
|
|
50
|
+
npm exec --yes --package=@witness-ai/opencode -- witness doctor
|
|
51
|
+
npm exec --yes --package=@witness-ai/opencode -- witness status
|
|
53
52
|
```
|
|
54
53
|
|
|
55
54
|
> **Upgrade note:** Older witness releases could leave an OpenCode session whose agent or title is
|
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",
|
|
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)
|
|
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
|
+
"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.
|
|
25
|
-
"@witness-ai/opencode-linux-x64": "0.7.
|
|
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",
|