mirror of
https://github.com/bitbaum/causius.git
synced 2026-12-05 15:29:40 +01:00
main
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
53400228b0 |
chore(deps): @bitbaum/ai-kit 1.26.0: Google out of the free AI chain (#147)
ai-kit <=1.25 put Google's Gemini API in the free model chain on the fleet-wide GEMINI_API_KEY. That key sits on a billed Google project and cost about $567 on 10-11 Nov 2026. 1.26 builds no Google link (free chain is Groq, then OpenRouter :free), keeps paid AI off unless an app opts in, and adds daily caps. - the freeAvailability test now pins that a Gemini key switches nothing on, and that Groq comes before OpenRouter - README, live-check warning and the live check's comments no longer name GEMINI_API_KEY as a free key Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
6cf21ce9e7 |
feat(agent): read the law of all 26 cantons through LexFind (#44)
* feat(agent): read the law of all 26 cantons through LexFind lib/law/lexfind.ts finds a cantonal act by abbreviation (StG), systematic number (631.1) or title through LexFind's public API (Institute of Federalism, University of Fribourg), reads the canton's official PDF with unpdf, drops repeated page headers, rejoins hyphenated words and cuts out one § or Art., stopping at the next heading but not at a reference to it. The source link is the canton's own page. read_law reads a non-federal act from the matter's canton, or from one named with the new canton field. Checked live: ZH StG § 140, BE StG Art. 187, VD LI Art. 1 (and LU, GE by hand). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud * fix(agent): a runaway reply runs 8 calls, a turn 12 law reads; point the agent at read_law Agent check on |
||
|
|
d9dfb24089 |
feat(agent): read Liechtenstein law from gesetze.li; one read_law per country (#40)
lib/law/lilex.ts reads one provision of a Liechtenstein act from Lilex, the Government's consolidated collection: art:n and par:n anchors, a provision ending at the next provision or heading, a link scrolled to it. Lilex has no API and puts its listings behind a browser proof-of- work, so acts come from a map checked against the live pages (LV, ABGB, SR, PGR, ZPO, StGB, StPO, LVG, AuG, SteG, ArG), and a challenge page is reported as unreachable with one polite retry, never parsed as law. lib/law/index.ts picks the collection by the matter's country first (StGB and ZPO exist in both) and follows update_matter during the turn. A country is added by giving it a reader there. Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
af0757a737 |
feat(agent): read Swiss federal law from Fedlex, no search engine needed (#36)
A read_law tool: an act by abbreviation (OR, ZGB, SchKG, DBG, AIG, CO, CC, LP…, all three official languages) or SR number, and an article. lib/law/fedlex.ts asks Fedlex's open SPARQL endpoint which consolidated version applies today, fetches its HTML from the official file store and cuts out the article (paragraph numbers kept, footnote markers dropped). The text comes back with its Fedlex link as a numbered source. Free and on our side of the wire, so the agent can source federal law while web search is down; an unsourced answer is corrected toward read_law, and stored unverified only when Fedlex is unreachable too. live/law.live.ts (pnpm run check:law) reads real articles and checks that every SR number in the abbreviation map is a real act. Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
1efd80ab5c |
feat(matters): ask the same questions of every document (#33)
* feat(matters): ask the same questions of every document Up to three questions across a matter's documents, answered as a table with each answer's quoted passage. A quote not found in the document is dropped, never shown. The table is saved as a draft. Personal data is redacted before the model sees it and restored after. Also: a one-letter account name no longer makes matter creation fail (wordsToHide trims and drops words shorter than two letters). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud * fix(agent): a deadline given in the answer must be recorded The real-model Agent check saw the model compute the tax objection deadline correctly (4 November 2026) and never call record_deadline, so no reminder was set. An answer naming a deadline date while the matter holds none now gets the one correction, like a narrated call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud * fix(agent): a model that writes its calls out hands the retry on Agent check run on |
||
|
|
eba1b0abb5 |
fix(agent): no tool calls written out, no law without a source (#32)
* fix(agent): no tool calls written out, no law without a source Found on the live site: a free model answered a Zürich rent-increase question without calling one tool, wrote update_matter(…) and record_deadline(…) into its answer as text, and stated rules of law with no source. Nothing was searched or recorded. - The system prompt now carries ai-kit's TEXT_TOOL_PROTOCOL_HINT, so a model that calls tools in text uses the format complete() parses. - lib/matters/answer-check.ts checks every final answer: tool calls narrated instead of made, or law (Art./§/OR/ZGB/SchKG/SR/LGBl…) stated in a turn with no source. One precise correction, then a retry; an answer still failing is stored under a visible 'unverified' step. - live/agent.live.ts gains the failing question as a real-model case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud * fix(agent): the tool-format hint actually reaches the model The previous commit imported TEXT_TOOL_PROTOCOL_HINT but its edit to the system prompt was lost; lint flagged the unused import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud * test(live): show the rent case's lines in the Agent check output Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud * fix(agent): withdraw the text tool hint; '(called …)' is not an answer The real-model Agent check failed with TEXT_TOOL_PROTOCOL_HINT in the prompt: the chain's models (all native callers) switched to text calls and answered '(called note_fact)', copying the loop's own note of a call. It passed without the hint. The hint is withdrawn, and an answer that is only such a note now counts as narrated, so it gets the one correction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Lem7GyhyyjKhmwjG8G7Ud --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
35faee8843 |
Agent: set the matter up, cite every rule, answer in the reader's language (#19)
* Agent: set the matter up first, cite every rule, answer in the person's language From the first real-model run: it found the right deadline but answered a question written in English in German (the letter's language), wrote ß, cited the federal act for a cantonal assessment without a source number, and left the matter untitled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ * Agent answers in the reader's interface language Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
4a610f612d |
Search queries keep their placeholders; a real-model agent check (#18)
* Provision: record 0000_init in the shared deploy's schema ledger Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ * Search queries keep their placeholders; a real-model agent check that runs on the box The agent restored placeholders in every tool's arguments, so a search query the model wrote as "[NAME-1] …" went to the search engine with the name in it. Arguments are now restored only for tools that write into the matter; web search, page reads and domain lookups go out as the model wrote them. live/agent.live.ts runs one turn through the real free chain on PGlite and asserts a recorded deadline and that no request carried the name; the Agent check workflow runs it on the box, where the keys are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
1ccc37cdea |
Build out Causius: cases, own model, helpers, EN/DE/FR (#7)
* Build out Causius: case intake, case file, helper marketplace Replace the day-zero page with the product: a landing page, letter intake with env-gated AI analysis, a case view (deadline, checklist, translations, draft reply), browser-only case storage with export/import, and the helper marketplace rules for legal assistants and licensed lawyers. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ * Put Causius on the fleet's stack and its three planes - AI: replace the hand-rolled single-vendor fetch with @bitbaum/ai-kit complete() over the shared free chain; no pinned model id. Add the fleet's own-model flow (ai-kit byok + probe), key kept in the browser. - Validation with zod, rate limits with limitkit, tests with Vitest. - Identity rendered from the Loki fleet map; ROADMAP.md and CHANGELOG.md as the public record, shown through bip-kit. - Helpers live on OrangeCat as services; OrangeCat and Solon links appear only when the fleet map reports the profiles exist. - Nav contract: routes constant, aria-current, 44px targets. Beta label. - CI and auto-merge from the current site template; TypeScript 6, ESLint 10, Node 24; AGENTS.md from the fleet template. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ * Speak English, German and French; make intake work end to end - next-intl with locale routing (en unprefixed, /de, /fr), every string in the message catalogues, a parity test, Swiss German spelling. - The analysis is written in the reader's language. - Several pages per letter; photos are shrunk in the browser so a phone picture fits. - The deadline is shown with the sentence it was read from, and the model is told never to compute a date the letter does not state. - /api/health, and the intake page says up front what the free models can do. `pnpm run check:analyze` runs the sample letter through a real model. - A down fleet map no longer stalls on-demand pages. - Refuse the two build scripts next-intl brought, so installs stay clean. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ --------- Co-authored-by: Claude <noreply@anthropic.com> |