Files
PaperClipAI/packages/plugins/plugin-triage
DottaandPaperclip bd6b8e3a53 Fix triage workbench draft state alignment (PAP-9894)
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>
2026-05-19 17:22:33 -05:00
..
2026-05-19 13:28:07 -05:00
2026-05-19 16:27:02 -05:00
2026-05-19 13:14:10 -05:00

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 Assistant agent
  • managed Triage project
  • 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 build uses esbuild presets from @paperclipai/plugin-sdk/bundlers.
  • pnpm build:rollup uses 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