Sloth-ninja brings Clio into JessicaOSS's chat workflow

The fork is laying the server-side groundwork for lawyers to work with Clio matters and intake records without leaving the assistant.

integrationworkflow

This is JessicaOSS's first practice-management connector, covering Clio Manage for day-to-day matter work and Clio Grow for client intake in the EU. It is built to keep each user's connection separate, protect credentials, and ask for confirmation before making changes.

  • Matter and contact lookup, financial details, time recording, document access, and time-entry deletion through Clio Manage.
  • Intake status and notes through Clio Grow, including the ability to add a note after confirmation.
  • Connection and disconnect handling designed around per-user access and expiring permissions.

It is not live yet: Clio app registrations and configuration still need to be supplied, while Grow's contact and note endpoints need live-account verification before production reliance.

So what Firms already running Clio should watch this fork if they want an AI assistant that can eventually act on the operational context behind a legal matter, not just its documents.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

3 commits from Sloth-ninja/JessicaOSS, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
4ccb7835 Clio connector PR 2: backend (lib/clio seam, routes, chat tools) sloth-ninja 2026-08-03 ↗ GitHub
commit body
Self-contained lib/clio/ seam plus /clio + /clio-grow routes, chat-tool
wiring, and profile serialization for the Clio Manage + Grow connectors.
No migration/.env/schema.sql/LICENSE touched.

- config: region host maps (EU live), creds, redirect-URI derivation,
  pinned Manage X-API-VERSION (4.0.11, env-overridable).
- connections: user_clio_connections CRUD over shared apiKeyCrypto;
  42P01/42703-tolerant; atomic refresh-rotation persistence.
- oauth: start/callback both products; one-time in-process state; PKCE
  S256 for Grow; who_am_i on connect; best-effort deauthorize.
- client: per-user authed fetch; proactive + 401 single refresh/retry;
  Grow rotating refresh persisted before use; 429 Retry-After + rate
  buckets (Manage 50/min, Grow 3/s app-wide); fixed error mapping.
- manage/grow chat tools registered through the companiesHouse seam,
  gated on the product being connected; writes confirmed via prompt;
  save-document enforces ensureDocAccess + 25 MB cap via presigned upload.
- routes: oauth start/callback (callback = exact registered path),
  /status (both products + cheap Manage count), MFA-gated disconnect.
- chat + projectChat gate Clio tools on listConnectedProducts; profile
  exposes clioConnections {manage, grow}.

Verified: tsc clean; vitest 584/584 (513 baseline + 71 new); prettier
clean on new files. Built on the 03/08 spike/write-probe verified facts
(EU hosts, seconds semantics, 3-step upload, rotation, rate limits).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2ebab293 Clio PR2 correction: Grow who_am_i is live-verified - wire it on connect sloth-ninja 2026-08-03 ↗ GitHub
commit body
The 03/08 spike exercised the Grow API with a real token: GET /users/who_am_i,
GET /matters, GET /inbox_leads, GET /users all returned 200. Earlier flag
wrongly called Grow endpoints "unverified".

- oauth: fetchClioIdentity now hits /users/who_am_i for BOTH products on
  connect (Grow parsed defensively for shape drift - data/user/top-level,
  name or first+last); best-effort, connect never fails on a who_am_i hiccup.
- growTools header + BUILD_LOG flags: /matters, /inbox_leads, /users,
  /users/who_am_i are LIVE-VERIFIED; only the matter-note read/write endpoints
  and /contacts remain research-based.
- tests: +2 (Grow identity stored on connect; connect survives who_am_i
  failure). vitest 586/586.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2d6b71cb Clio PR2 review fixes: wire proactive rate-limit backoff + deterministic tests sloth-ninja 2026-08-03 ↗ GitHub
commit body
Independent review (#63): security paths passed; two should-fixes + three nits.

SHOULD-FIX 1 (chosen: WIRE, not delete) - proactive backoff was exported and
tested but never called. Now clioRequest records a per-bucket backoff when a
response reports X-RateLimit-Remaining 0 + a Reset, and the next call for that
bucket waits until reset (capped 5s) or fails fast with the fixed rate-limit
message. Added parseRateLimitResetMs (epoch/delta tolerant) + 3 tests
(reset parsing, over-cap fail-fast without a second request, within-cap
wait-then-proceed under fake timers).

SHOULD-FIX 2 - deterministic CI: the scrypt-heavy Clio suites (connections,
client, oauth, manageTools, growTools) now raise testTimeout to 20s with the
#61-style explanatory comment, so real scryptSync under 43 parallel files can't
flake the 5s default.

NITS: BUILD_LOG test counts → 589/589 (76 new); "presigned PUT/download" →
"presigned PUT never carries the bearer (no document download is implemented)";
added a line that migration 20260803_01 was already run in production 03/08 so
the connector activates on deploy (code stays 42P01-tolerant regardless).

Verified: tsc clean; prettier clean; full suite run TWICE back-to-back, both
589/589 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-1075.md from inside the repo you want the changes in.

⬇ Download capture-thread-1075.md