mirror of
https://github.com/hanzoai/extension.git
synced 2026-10-31 19:52:25 +00:00
New @hanzo/clio package: brings Hanzo AI into a lawyer's Clio matters. Pick a matter and Hanzo can summarize it, draft correspondence, extract key dates & obligations, or answer freeform questions over the matter's documents — then write the result back to Clio as a Note or Activity. Architecture (one and only one way, secret-safe): - Clio OAuth2 authorization-code grant. client_secret lives ONLY in the token-exchange service (server.ts, read from env); the browser SPA never sees it. Verified: dist/app.js has zero secret / crypto / process.env refs. - Clio REST API v4 client (clio-api.ts): pure request-shaping wrappers for listMatters/getMatter/listDocuments/downloadDocument/listContacts and the write-back createNote/createActivity — URL, headers, fields selection, pagination all unit-testable; one thin clioFetch/clioDownload at the edge. - Hanzo chat (hanzo-chat.ts) mirrors @hanzo/office-addin's wire contract: api.hanzo.ai/v1/chat/completions + /v1/models, no /api/ prefix. - Four actions + matter-context assembly/truncation (actions.ts, 48k total / 12k per-doc caps, truncation marked). - Custom Action landing (custom-action.ts + server.ts): parses Clio's signed deep-link, HMAC-verifies the nonce (constant-time) with the client_secret, redirects into the SPA on the right matter. - Configurable regional Clio base (us/eu/au/ca). esbuild build (SPA iife + Node ESM service), tsc --noEmit clean, 86 vitest tests pass across config/oauth/api/chat/actions/custom-action/server. Registered packages/clio in pnpm-workspace.yaml.
16 lines
370 B
JSON
16 lines
370 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2020",
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
"types": ["node"],
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true
|
|
},
|
|
"include": ["src/**/*.ts", "tests/**/*.ts"]
|
|
}
|