480f7cf3d1
The Paperclip UI loads each adapter's ui-parser.js inside a sandboxed Web Worker via `new Function(...)` to render the run transcript. The worker can only evaluate CJS — ESM `export` syntax silently fails to register `parseStdoutLine`, and the run window falls back to dumping raw JSONL. tsc was emitting ESM `export function parseStdoutLine`, so every published version since the parser was added has shipped a parser the UI can't load. Add the same esbuild step the claude-k8s adapter uses (0.2.4) to overwrite dist/ui-parser.js with a CJS bundle that assigns to module.exports. Also bump @paperclipai/adapter-utils from a stale 2026.415.0-canary.7 pin to ^2026.428.0 (current stable). All 406 tests pass against the new types; no API drift in the imported surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
1.1 KiB
JSON
43 lines
1.1 KiB
JSON
{
|
|
"name": "paperclip-adapter-opencode-k8s",
|
|
"version": "0.1.38",
|
|
"description": "Paperclip adapter plugin that runs OpenCode agents as Kubernetes Jobs",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"paperclip": {
|
|
"adapterUiParser": "1.0.0"
|
|
},
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./server": "./dist/server/index.js",
|
|
"./ui-parser": "./dist/ui-parser.js",
|
|
"./cli": "./dist/cli/index.js"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc && npm run build:ui-parser",
|
|
"build:ui-parser": "esbuild src/ui-parser.ts --bundle --format=cjs --target=es2020 --outfile=dist/ui-parser.js --log-level=warning",
|
|
"clean": "rm -rf dist",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@kubernetes/client-node": "^1.0.0",
|
|
"picocolors": "^1.1.1"
|
|
},
|
|
"peerDependencies": {
|
|
"@paperclipai/adapter-utils": ">=2026.428.0"
|
|
},
|
|
"devDependencies": {
|
|
"@paperclipai/adapter-utils": "^2026.428.0",
|
|
"@types/node": "^24.6.0",
|
|
"@vitest/coverage-v8": "^4.1.5",
|
|
"esbuild": "^0.24.0",
|
|
"typescript": "^5.7.3",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|