The desks
The Case Desk.
The Case Desk decides an insurance claim, a security alert or a customer dispute on evidence: Tencent Hunyuan plans which facts the case turns on, Truvian buys each one from Telegraph's ranked miners, fixed rules check what the case asserts, and Hunyuan writes the resolution into a signed memo. It answers Tencent's use cases #31 (insurance claims and investigation), #33 (enterprise security operations) and #30 (enterprise customer resolution), and has been live at /case since 3 Dec 2026.
How to use it
Open /case, press one of the twelve Try one examples (or paste your own case), and press Investigate. A case takes 20 to 90 seconds. Agents call POST /api/case with a JSON body; the reply is the signed memo.
| Field | What it is | Limits |
|---|---|---|
type | insurance, security or customer | required; anything else is a 400 |
document | the case as submitted: what is claimed or alerted, the identifiers to check (transaction hash, CVE id, file hash, domain), and the policy or runbook it is decided under | 60 to 6,000 characters after trimming |
title | a short name for the case | optional, cut to 120 characters; when missing, the first line of document, cut to 80 |
curl -s https://truvian.xyz/api/case \
-H 'content-type: application/json' \
-d '{"type":"security","title":"Scanner pages on-call","document":"<the alert, the identifiers, and the runbook>"}'
| Status | When |
|---|---|
200 | the stored memo, with id, sha256, signature, signer, url (/api/work/<id>) and booked (the ledger entry); a paid run also carries payment |
400 INVALID_INPUT | wrong type, or a document under 60 or over 6,000 characters |
402 | the free allowance is used: the body quotes the price and how to pay (see below) |
429 RATE_LIMITED | over a free cap while payments are off, with retryAfterSec |
503 AGENT_MODEL_UNAVAILABLE | no agent model is configured, or it failed while planning; nothing was bought |
What it can decide
Each case type has three resolutions. The model must pick one of them; any other answer is recorded as NO_RESOLUTION. The meanings below are given to the model with every case (RESOLUTION_MEANING) and stored in the memo's meaning.
| Type | Resolution | Meaning |
|---|---|---|
| insurance Tencent #31 | PAY | the trigger is met and evidenced and no exclusion applies |
| DENY | the policy terms or the established facts rule the claim out (an exclusion applies, the trigger event did not happen, or the policy says such a loss is denied) | |
| REFER | a fact the policy needs is missing and could still be supplied, so the claim can be neither paid nor denied yet | |
| security Tencent #33 | GENUINE | every runbook condition for an incident holds |
| FALSE_ALARM | the runbook says it is not an incident (score below threshold, asset not affected, indicator clean) | |
| INCOMPLETE | a condition the runbook needs is not established | |
| customer Tencent #30 | OWED | the policy entitles the customer to a refund, credit or reinstatement |
| NOT_OWED | the established facts show the policy gives the customer nothing | |
| NEEDS_EVIDENCE | the dispute cannot be decided until a missing fact is supplied |
The resolving rules tell the model to apply the policy or runbook strictly: a fact the policy needs that is not established means evidence is missing, not that it is true. What the case records as the organisation's own verified records (its ledger, asset inventory, the insured's application) counts as established; outside facts (transactions, CVE records, public events, threat ratings) count only when bought.
How a case runs
- Plan (Hunyuan). The model reads the case and picks at most 3 questions from a fixed menu of Telegraph intents, each with the checks: what the case asserts about a field of the answer (
eq,neq,gteorlte). Questions off the menu, with malformed parameters, or repeated are dropped and listed inplan.dropped; if every question was dropped, the model is asked once more. - Buy (Telegraph). Each question is one paid ask, routed by the node to its ranked miner and paid from Shield's escrow. Two asks run at a time. Every fact records the miner, its rank, the cost, the latency, the payment receipt and a public signal link. An answer from a miner on Truvian's do-not-ask list is discarded.
- Check (fixed rules).
runCheckcompares each assertion with the bought field: numbers as numbers, booleans as booleans, text and addresses without regard to case. The result isholds,contradictedorunverified; a failed ask or an answer such asUnverifiedorMixedconfirms nothing. - Follow up (Hunyuan and Telegraph). When a fact failed, came back inconclusive or carried none of the intent's comparable fields, the model may ask at most 2 more questions another way. It never repeats one already asked.
- Resolve (Hunyuan). The model writes the resolution, its reasons, the discrepancies and the evidence still needed, from the case, the bought facts (failures named as failures) and the check results.
The menu, with parameters and fields as the node publishes them (GET /engine/v1/intents/<FAMILY>, read 30 Nov 2026):
| Intent | Asks about | Fields a check may compare |
|---|---|---|
ONCHAIN_TX_LOOKUP_GENERAL | one transaction by hash, on ethereum or base | status, from, to, block_number, value_eth |
CVE_LOOKUP_CVSS | a CVE (Common Vulnerabilities and Exposures) record and its CVSS (Common Vulnerability Scoring System) score | cvss_score, severity, published |
MALWARE_DETECTION_HASH | threat feeds and engines on a file hash, domain or IP address | threat_level, match_count |
THREAT_INTELLIGENCE_INDICATOR | an IP address, domain, hash, CVE or actor | malicious, pulse_count |
FACT_CHECK_GENERAL | one factual claim about a public event | verdict |
NEWS_SEARCH_GENERAL | news on a topic, entity or event | none: read as evidence, never compared |
SANCTIONS_SCREENING_MATCH_GENERAL | a person or entity name against sanctions lists | matched |
SSL_VERIFICATION_CERT | the TLS certificate a host serves | valid, category |
Cost, limits and payment
- Questions per case
- 3 in the plan (MAX_ASKS_PER_CASE), at most 2 follow-ups (MAX_FOLLOW_UPS)
- Telegraph budget per case
- $0.10 (CASE_DESK_BUDGET_USD); once spent, further questions are recorded as not asked
- Price of one Telegraph answer
- about $0.01 in test USDC from Shield's escrow on Ethereum Sepolia
- Agent model
- tencent/hy4 through OpenRouter, every request pinned to the Tencent provider with no fallback, reasoning off; 90 s timeout per call (AGENT_LLM_TIMEOUT_MS)
- Model cost in the memo
- OpenRouter's list price for tencent/hy4, read 30 Nov 2026: $0.417 per million prompt tokens, $1.2505 per million completion tokens
- Free runs
- 5 a day per IP address, at most 3 a minute, shared with every other desk (SHIELD_FREE_CHECKS_PER_IP, SHIELD_BURST_PER_MIN); site-wide caps of 300 runs and $5 of Telegraph spend a day
- Past the free runs
- $0.05 a run (SHIELD_PRICE_USD) in USDC on Base Sepolia over x402 (the HTTP 402 payment protocol)
Paying. Past the free allowance, POST /api/case answers 402 with the payment requirements. On the page, pay.js shows a payment sheet; the visitor's browser wallet signs a gasless USDC authorization (EIP-3009) and the same request is sent again with an X-PAYMENT header. Shield checks the payment first and settles it only after the case has run; the settlement comes back in the X-PAYMENT-RESPONSE header and the memo's payment field, and the remaining free runs in X-Shield-Checks-Left. Every run is booked in the ledger at what was paid for it: /api/business.
The memo and its permalink
The memo is truvian-work-memo/1 of kind case-investigation. It carries the case text, the resolution and its meaning, the reasons, the discrepancies, the evidence still needed, the plan and the follow-up plan with anything dropped, every bought fact with its checks, the check counts, the model that served it with its tokens, the Telegraph and model cost, and the time taken. It is hashed (sha256) and signed (EIP-191) by 0x956aECB0b0DEfC2f2631C26ec0FF7366Ebb53245.
- Open a case on the page
/case?c=<id>(the page switches to it after a run)- The stored memo
GET /api/work/<id>- Latest cases
- /api/works?kind=case-investigation (up to 50)
- Check a signature
POST /api/memo/verifywith{memo, signature}; the page's Verify signature button first checks it in your browser (/verify-memo.js), then asks this route for a second opinion
How it is built
runCaseDesk in src/shield/commerce/caseDesk.ts runs the five steps; normalizeCaseDeskRequest reads the input. The menu, the prompts, readPlan, runCheck, inconclusive, readResolution and the cost are in caseInvestigator.ts, the same rules that were measured on the example cases. The model call is chat in src/shield/commerce/llm.ts, configured by HUNYUAN_API_KEY, HUNYUAN_BASE_URL and HUNYUAN_MODEL. The route is in src/shield/commerceRoutes.ts; the memo is signed and stored by createCommerceService (src/shield/commerce/service.ts). The page is src/shield/public/case.html and case.js, with its examples in case-examples.json.
- Offline tests (13)
npx tsx src/scripts/test-case-investigator.ts- Run example cases through the desk's code
npx tsx src/scripts/case-desk-try.ts IC-3 SO-3(buys real answers; needs the model and Telegraph keys in.env)- The measured investigator
- cases/README.md,
src/scripts/case-investigator.ts
The example cases
Twelve cases, four per type, each designed to end in a different resolution. The insurer, merchants, policies and runbooks are invented and each document says so in its first line; the facts they turn on are real and checkable without Telegraph: Ethereum transactions of 30 Nov 2026, the Cetus exploit of 22 May 2025, NVD (National Vulnerability Database) records and the WannaCry hash.
| Type | Cases and designed resolution |
|---|---|
| insurance | IC-1 Cetus exploit loss, PAY · IC-2 a Kraken hack that never happened, DENY · IC-3 the "theft" went to the insured's own address, DENY · IC-4 real event, no position evidence, REFER |
| security | SO-1 exploit attempt on Apache Camel, GENUINE · SO-2 a "critical" SSH CVE that is 5.9, FALSE_ALARM · SO-3 WannaCry flagged by endpoint detection and response (EDR), GENUINE · SO-4 software bill of materials (SBOM) finding with no package version, INCOMPLETE |
| customer | CR-1 invoice paid twice, OWED · CR-2 suspension for an underpayment the chain does not show, OWED · CR-3 payment sent to another address, NOT_OWED · CR-4 payment proof that does not exist onchain, NEEDS_EVIDENCE |
Measured on 30 Nov 2026 (run 3, before the desk went live): 9 of 12 right with Telegraph's facts, 4 of 12 for Hunyuan alone, $0.0285 per correctly resolved case and about 74 s per case. Telegraph turned five wrong resolutions right and none right ones wrong. Details and receipts: cases/README.md.
Real cases, 3 Dec 2026
Every stored case, from /api/works?kind=case-investigation, read 3 Dec 2026. All three ran on the free allowance, all on tencent/hy4 served by Tencent.
| Memo | Case | Resolution | Facts | Telegraph / model | Time |
|---|---|---|---|---|---|
| dTLRmqXq 14:03 UTC | Exchange custody cover: a hack that never happened (IC-2) | DENY | 4: a fact-check came back Unverified, so two follow-ups were bought; no confirmed breach, and the policy denies a loss with no confirmed breach | $0.04 / $0.0023 | 69 s |
| 5pDrtMqP 14:09 UTC | Wallet theft cover: the "theft" went to the insured's own address (IC-3) | DENY | 1 transaction lookup, answered by miner 6255; 4 checks hold, and the recipient is the deposit address the insured declared, so exclusion 4.2 applies | $0.01 / $0.0015 | 21 s |
| sw-8ZVWC 14:12 UTC | Scanner pages on-call for a "critical" SSH CVE (SO-2) | FALSE_ALARM | 1 CVE lookup, answered by miner 6204: CVE-2023-48795 is 5.9 MEDIUM; 2 checks contradicted, below the runbook's 9.0 threshold. The first plan was dropped as off the menu and the retry asked once | $0.01 / $0.0020 | 64 s |
Each fact links its signal on the node, for example the CVE answer in sw-8ZVWC: signal 0x8944c172…33a6, receipt 0xe15e30ec…ab42.
LLM_*) and the memo names it. The store keeps the latest 200 work memos of every kind, so an old permalink can stop resolving. Everything settles on testnets: test USDC on Ethereum Sepolia for Telegraph, Base Sepolia for x402.