@superbiche/cline-paperclip-adapter
v0.1.3
Published
Paperclip external adapter that spawns Cline CLI 2.x as a managed employee.
Maintainers
Readme
@superbiche/cline-paperclip-adapter
External Paperclip adapter that spawns Cline CLI 2.x as a managed employee. Wraps cline as a subprocess, passes the wake prompt as a positional argument, parses --json stdout, and persists Cline's native taskId so Paperclip can resume the same task across heartbeats via cline -T <taskId>.
Status
- v0.1.2 on npm as
@superbiche/cline-paperclip-adapter. - Session resume (
cline -T <id>) proven: 9 consecutive 30-second-interval heartbeats against the same issue all resumed the same Cline task. - Watchdog kills the run on hang-prone asks (
followup,mistake_limit_reached,plan_mode_respond,act_mode_respond) with a structuredcline_hang_prone_ask_<subtype>error code. - Event discriminator and token aggregation verified against Cline's own aggregator in
dist/cli.mjs. supportsSessionResume: true,nativeContextManagement: "confirmed". Full session-management parity landed via paperclipai/paperclip#4296 (IIFE path) and #4324 (hot-install path); both are in master and ship incanary/v2026.423.0-canary.2and the next stable tag.
Install
curl -X POST http://127.0.0.1:3100/api/adapters/install \
-H 'content-type: application/json' \
-d '{"packageName":"@superbiche/cline-paperclip-adapter"}'On paperclip built from master commit 3d15798 or later (i.e. canary/v2026.423.0-canary.2 or the next stable), hot-install picks up sessionManagement without a restart. On older releases (v2026.416.0 and prior, pre-#4324), restart Paperclip once after install so the IIFE path can register it.
Local development
git clone https://github.com/superbiche/paperclip-adapters
cd paperclip-adapters
pnpm install
pnpm -C packages/cline-local build
pnpm -C packages/cline-local testAgent config
Create a Paperclip agent with adapterType: "cline_local" and an adapterConfig object. Minimum:
{
"adapterType": "cline_local",
"adapterConfig": {
"command": "cline",
"configDir": "/absolute/path/to/preauth/cline-config",
"model": "deepseek-v4-pro",
"timeoutSec": 600
}
}configDir must be a pre-authenticated Cline config directory. Seed once:
cline auth -p deepseek -k "$DEEPSEEK_API_KEY" -m deepseek-v4-pro \
--config /absolute/path/to/preauth/cline-configFull config surface is documented in the adapter's agentConfigurationDoc — exposed via GET /api/adapters/cline_local on a Paperclip instance that has the adapter installed.
License
MIT. See LICENSE at the repo root.
