opencode-collaboration 0.7.0 → 0.8.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.
package/README.md CHANGED
@@ -219,12 +219,15 @@ The credential-free real-host test starts actual OpenCode processes and drives t
219
219
 
220
220
  ```bash
221
221
  npm install
222
- npm run build # tsc → dist/
223
- npm test # build + node --test tests/*.test.mjs
222
+ npm run build # tsc → dist/ (plain, for fast local iteration)
223
+ npm run build:obfuscated # clean + tsc + obfuscation → dist/ (the shippable artifact)
224
+ npm test # build:obfuscated + node --test tests/*.test.mjs
224
225
  npm run typecheck
225
- npm run dry-run # npm publish --dry-run
226
+ npm run dry-run # npm publish --dry-run
226
227
  ```
227
228
 
229
+ `npm test` runs against the shippable `dist/`; `tests/obfuscation.test.mjs` only passes there. Sourcemaps for the shipped build are written to `.obfuscate-maps/` and are never published.
230
+
228
231
  Zero runtime dependencies beyond `@opencode-ai/plugin` (peer) and `zod` (tool schemas).
229
232
 
230
233
  ## License
package/README.zh-CN.md CHANGED
@@ -219,12 +219,15 @@ cd /tmp/proj-b && opencode serve --port 14101 &
219
219
 
220
220
  ```bash
221
221
  npm install
222
- npm run build # tsc → dist/
223
- npm test # build + node --test tests/*.test.mjs
222
+ npm run build # tsc → dist/(明文,本地快速迭代用)
223
+ npm run build:obfuscated # clean + tsc + 混淆 → dist/(发布产物)
224
+ npm test # build:obfuscated + node --test tests/*.test.mjs
224
225
  npm run typecheck
225
- npm run dry-run # npm publish --dry-run
226
+ npm run dry-run # npm publish --dry-run
226
227
  ```
227
228
 
229
+ `npm test` 跑的是发布产物 dist;`tests/obfuscation.test.mjs` 只在发布产物上通过。发布产物的 sourcemap 输出到 `.obfuscate-maps/`,不随包发布。
230
+
228
231
  除 `@opencode-ai/plugin`(peer 依赖)和 `zod`(工具 schema)外,零运行时依赖。
229
232
 
230
233
  ## 许可证
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-collaboration",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Cross-session messaging for opencode — let independent sessions discover and text each other, modeled after Claude Code's cross-session messaging",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -60,11 +60,14 @@
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsc -p tsconfig.json",
63
+ "clean": "node scripts/clean-dist.mjs",
64
+ "build:obfuscated": "npm run clean && tsc -p tsconfig.json && node scripts/obfuscate-dist.mjs",
65
+ "verify:obfuscated": "node scripts/verify-obfuscated.mjs",
63
66
  "prepare": "npm run build",
64
- "test": "npm run build && node --test tests/*.test.mjs",
67
+ "test": "npm run build:obfuscated && node --test tests/*.test.mjs",
65
68
  "typecheck": "tsc --noEmit -p tsconfig.json",
66
69
  "dry-run": "npm publish --dry-run",
67
- "prepublishOnly": "npm run build"
70
+ "prepublishOnly": "npm run build:obfuscated && npm run verify:obfuscated"
68
71
  },
69
72
  "peerDependencies": {
70
73
  "@opencode-ai/plugin": ">=1.18.0"
@@ -78,6 +81,7 @@
78
81
  "@opentui/keymap": "^0.4.5",
79
82
  "@opentui/solid": "^0.4.5",
80
83
  "@types/node": "^22.0.0",
84
+ "javascript-obfuscator": "5.7.0",
81
85
  "typescript": "^5.4.0"
82
86
  },
83
87
  "opencode": {