Building
HarborClient does not ship a plugin SDK runtime — you author and bundle plugins with your own toolchain.
Packaging as .hcp
Create a ZIP archive and use the .hcp extension. Any zip tool works — for example:
cd request-logger
zip -r ../request-logger.hcp manifest.json README.md distYou can also build request-logger.zip and rename it to request-logger.hcp; HarborClient treats both the same way at install time as long as the contents are a valid plugin layout.
Recommended project setup
{
"name": "request-logger",
"private": true,
"devDependencies": {
"@harborclient/plugin-api": "^0.2.0",
"@types/react": "^19.0.0",
"esbuild": "^0.25.0",
"typescript": "^5.0.0"
},
"scripts": {
"build": "esbuild src/main.ts --bundle --outfile=dist/main.js --format=esm --platform=neutral",
"pack": "pnpm build && zip -r ../request-logger.hcp manifest.json README.md dist"
}
}For renderer plugins, mark react and react-dom as external, set --jsx=automatic --jsx-import-source=@harborclient/plugin-api, and call installReact(hc.react) at the start of activate(). See React and JSX.
TypeScript
Use jsx: react-jsx with jsxImportSource: '@harborclient/plugin-api' and import types from @harborclient/plugin-api. Your entry module should export activate and optionally deactivate as named exports.
Main entry
If your plugin includes HTTP hooks, add a separate build target for src/main.ts → dist/main.js and reference it in manifest.json under "main". Main entries run in the SES utilityProcess; keep UI code in the renderer entry only.
See Package layout for the expected directory structure and Dev workflow for iterative development with unpacked loading.