mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-24 09:59:44 +02:00
Backend defaulted ingested items to stateKey="draft" while the UI hardcoded its workflow on "new", so fresh installs rendered the raw stateKey with no transition buttons. Extract the v1 default state and transition lists into src/workflow-defaults.ts and have both the worker (seed + in-memory store) and the UI (state pill, TransitionBar, action form) derive their state keys from that single module. transitionItem now also validates the destination against the queue's configured triage_queue_transitions and rejects unknown destinations with a 422 invalid_state_transition so direct API callers can't push items into made-up states. Regression tests assert the ingested stateKey matches the UI's allowedTransitions keys, that the UI sources from workflow-defaults, that the SQL column default agrees, and that transitionItem rejects unknown / skipped destinations. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Paperclip Triage
Queue workbench for triaging arbitrary items with a teachable assistant.
Development
pnpm install
pnpm dev # watch builds
pnpm dev:ui # local dev server with hot-reload events
pnpm typecheck
pnpm test
pnpm build
pnpm dev rebuilds the worker, manifest, and UI bundles into dist/.
When this package is installed from a local path, Paperclip watches that rebuilt
output and reloads the plugin worker. Local installs run trusted code from this
folder on your machine.
Phase 2 Scope
This package scaffold declares:
- plugin id
paperclipai.plugin-triage - page, sidebar, route sidebar, and settings page slots
- managed
Triage Assistantagent - managed
Triageproject - managed triage skills
- worker health data plus a settings-page reconcile action
Install Into Paperclip
paperclipai plugin install /Users/dotta/paperclip/.paperclip/worktrees/PAP-9815-triage-plugin/packages/plugins/plugin-triage
Build Options
pnpm builduses esbuild presets from@paperclipai/plugin-sdk/bundlers.pnpm build:rollupuses rollup presets from the same SDK.
Focused Verification
From the repository root:
pnpm --filter @paperclipai/plugin-triage typecheck
pnpm --filter @paperclipai/plugin-triage test
pnpm --filter @paperclipai/plugin-triage build