Files
Randall Hand 7e23e5e0a3 fix: ship compiled plugin.js so install works on openclaw 2026.5.3
The 2026.5.3 plugin loader requires a compiled JS sibling for any
TypeScript entry declared in `openclaw.extensions`. Since v1.8.x ships
only `plugin.ts` in the npm tarball, install fails:

    package install requires compiled runtime output for TypeScript
    entry plugin.ts: expected ./dist/plugin.js, ./dist/plugin.mjs,
    ./dist/plugin.cjs, plugin.js, plugin.mjs, plugin.cjs

Repro: `openclaw plugins install @askjo/camofox-browser` on host
>=2026.5.3.

Fix:
- Add minimal `tsconfig.json` (ESM/NodeNext, target ES2022) that
  compiles `plugin.ts` → `plugin.js` at the package root, preserving
  the `./lib/*.js` import paths.
- Add `npm run build` script (typescript + @types/node devDeps).
- Include `plugin.js` and `tsconfig.json` in the npm `files` array.
- Declare `openclaw.runtimeExtensions: ["plugin.js"]` so the loader
  knows where the compiled entry is.
- Bump `openclaw.build.openclawVersion` to 2026.5.3 (the version the
  compiled output is intended for).
- Build before publish in `.github/workflows/publish.yml` (npm ci uses
  --ignore-scripts so prepublishOnly doesn't fire — explicit step is
  needed) and run build in `ci.yml` so PRs catch build regressions.
- Gitignore the built artifacts so they're produced fresh in CI.

Verified locally: `npm pack` + `openclaw plugins install ./*.tgz`
succeeds end-to-end on openclaw 2026.5.3-1.

Pre-existing TypeScript type errors (commander chained-API typings,
spread of unknown type) emit non-fatally and are out of scope for this
fix; they should be tracked separately.
2026-05-04 15:43:30 -04:00

13 lines
248 B
JSON

{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"skipLibCheck": true,
"noImplicitAny": false,
"types": ["node"]
},
"files": ["plugin.ts"]
}