{"kind":"x402/contract-term-extraction","profileVersion":"contract-terms/v1","service":"contract-term-extraction","summary":"A paying agent submits a commercial agreement (text or PDF bytes) and receives ONE Ed25519-signed, SHA-256-reproducible extraction of the clauses that decide money and liability: parties, term, auto-renewal, price and escalation, payment terms, liability caps, termination rights and governing law — plus an explicit AMBIGUITY for every clause that could not be located deterministically.","input":{"document_text":"string — the agreement text.","document_b64":"string — base64 of the agreement (PDF or text). The server decodes it deterministically.","document_type":"string — optional; when absent the engine classifies it from its own words.","jurisdiction":"string — optional; when absent the engine uses the located governing law, or reports that it was not located.","asOf":"string — the extraction timestamp (SUPPLIED, never the wall clock)."},"output":{"extract_id":"string — derived from the document digest, never random.","parties":"list of {name, role, source}. A party whose role cannot be resolved carries role UNRESOLVED.","term":"{effective_date, expiry_date, duration, auto_renewal, renewal_notice} — only the keys that were located.","commercial":"{price, price_basis, escalation, payment_terms, payment_method, late_fee} — only the keys located.","liability":"{cap, exclusions, has_indemnity, has_insurance_requirement}.","termination":"{notice_window, for_cause, cure_period_days, has_termination_clause}.","governing_law":"{governing_law, exclusive_venue}.","ambiguities":"list of {clause, why_unresolved} — MANDATORY and non-empty whenever a clause was not located.","coverage":"{gaps[], groups_located[], groups_not_located[]} — the honest 'what I did not find' list.","sha256":"SHA-256 over the canonical evidenceCore.","ed25519Sig":"Ed25519 signature over the canonical evidenceCore."},"clauseGroups":["parties","term","commercial","liability","termination","governing_law"],"publishedPatterns":{"party_named_with_role_in_parentheses":"(?P<name>[A-Z][A-Za-z0-9&.,'’\\- ]{2,80}?)\\s*\\(\\s*[\\\"']?(?P<role>[A-Za-z ]{2,30}?)\\s*[\\\"']?\\s*\\)","party_role_label":"(?i)\\b(?P<role>customer|client|buyer|purchaser|vendor|supplier|seller|provider|service\\s+provider|contractor|employer|employee|licensor|licensee|landlord|tenant|carrier|shipper|consignee|lender|borrower|payer|payee|disclosing\\s+party|receiving\\s+party|party\\s+a|party\\s+b)\\s*[:–—\\-]\\s+(?P<name>[A-Z][A-Za-z0-9&.,'’\\- ]{2,80}?)(?=[\\s.,;:]|$)","between_clause":"(?i)\\b(?:between|among)\\b\\s*[:\\-–—]?\\s*(?P<parties>[^.]{4,300}?)(?=\\s+(?:and|&)\\s|[.;]|\\s*\\(|$)","effective_date":"(?i)\\b(?:effective(?:\\s+date)?|commenc(?:es|ing|ement)|as\\s+of|dated)\\b[^.]{0,80}?(?P<date>(?:(?:[0-3]?\\d)\\s+(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+[0-9]{4}|(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+(?:[0-3]?\\d)\\s*,?\\s+[0-9]{4}|[0-9]{4}-[0-9]{2}-[0-9]{2})) | (?i)(?P<date>(?:(?:[0-3]?\\d)\\s+(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+[0-9]{4}|(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+(?:[0-3]?\\d)\\s*,?\\s+[0-9]{4}|[0-9]{4}-[0-9]{2}-[0-9]{2}))\\s*\\(\\s*[\\\"']?the\\s+[\\\"']?\\s*(?:effective|commencement)\\s+date | (?i)\\beffective\\s+date\\s+(?:is|shall\\s+be)\\s+(?P<date>(?:(?:[0-3]?\\d)\\s+(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+[0-9]{4}|(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+(?:[0-3]?\\d)\\s*,?\\s+[0-9]{4}|[0-9]{4}-[0-9]{2}-[0-9]{2}))","expiry_date":"(?i)\\b(?:expir\\w+|terminat(?:es|ion\\s+date)|end\\s+date|until)\\b[^.]{0,80}?(?P<date>(?:(?:[0-3]?\\d)\\s+(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+[0-9]{4}|(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+(?:[0-3]?\\d)\\s*,?\\s+[0-9]{4}|[0-9]{4}-[0-9]{2}-[0-9]{2})) | (?i)(?P<date>(?:(?:[0-3]?\\d)\\s+(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+[0-9]{4}|(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+(?:[0-3]?\\d)\\s*,?\\s+[0-9]{4}|[0-9]{4}-[0-9]{2}-[0-9]{2}))\\s*\\(\\s*[\\\"']?the\\s+[\\\"']?\\s*(?:expiry|expiration|end)\\s+date | (?i)\\b(?:expiry|expiration|end)\\s+date\\s+(?:is|shall\\s+be)\\s+(?P<date>(?:(?:[0-3]?\\d)\\s+(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+[0-9]{4}|(?:january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|sept|oct|nov|dec)\\s+(?:[0-3]?\\d)\\s*,?\\s+[0-9]{4}|[0-9]{4}-[0-9]{2}-[0-9]{2}))","term":"(?i)\\b(?:initial\\s+term|term\\s+of\\s+\\w+|for\\s+a\\s+(?:period|term)\\s+of|commencing)\\b[^.]{0,60}?(?P<value>\\d+\\s*(?:year|month|day)s?) | (?i)\\b(?:initial\\s+term|term)\\b[^.]{0,40}?(?P<months>\\d+)\\s*\\(?\\s*months?\\)? | (?i)\\b(?:initial\\s+term|term)\\b[^.]{0,40}?(?P<years>\\d+)\\s*\\(?\\s*years?\\)?","auto_renewal":"(?i)\\b(?:auto(?:matic)?[\\s\\-]?(?:ally\\s+)?renew\\w*|renew(?:s|al)?\\s+automatically|shall\\s+renew|successive\\s+renew\\w*|evergreen)\\b","renewal_notice":"(?i)\\b(?:written\\s+notice|notice\\s+of\\s+non[\\- ]?renewal|not(?:ice)?\\s+to\\s+renew)\\b[^.]{0,80}?(?P<days>\\d+)\\s*(?P<unit>days?|weeks?|months?)","price":"(?i)\\b(?:fee|price|pricing|subscription\\s+fee|monthly\\s+fee|annual\\s+fee|service\\s+fee|charges?|rate)\\b[^.]{0,80}?(?:is|of|shall\\s+be|:)?[^0-9\\n]{0,20}(?:US\\$|USD|EUR|GBP|\\$|€|£)\\s*(?P<amount>\\d[\\d,]*(?:\\.\\d+)?)(?:\\s*(?P<per>per\\s+(?:month|year|seat|user|monthly|annually|quarterly|usage|request|call)))?","escalation":"(?i)\\b(?:escalat(?:e|ion)|increase[ds]?|adjust(?:ed|ment)?|updat(?:e|ed))\\b[^.]{0,100}?by\\s+(?P<pct>\\d+(?:\\.\\d+)?)\\s*% | (?i)\\b(?:escalat(?:e|ion)|increase[ds]?|adjust(?:ed|ment)?|updat(?:e|ed))\\b[^.]{0,100}?of\\s+(?P<pct>\\d+(?:\\.\\d+)?)\\s*% | (?i)\\b(?:escalat(?:e|ion)|increase[ds]?)\\b[^.]{0,60}?(?P<pct>\\d+(?:\\.\\d+)?)\\s*% | (?i)\\bby\\s+(?P<pct>\\d+(?:\\.\\d+)?)\\s*%\\s*(?:per\\s+(?:annum|year)|annually)\\b","indexation":"(?i)\\b(?:cpi|consumer\\s+price\\s+index|rpi|retail\\s+price\\s+index|index(?:ation)?)\\b","payment_terms":"(?i)\\bnet\\s*(?P<days>\\d+)\\b | (?i)\\b(?:within|in)\\s+(?P<days>\\d+)\\s*days?\\s+(?:of|from|after|following)\\b | (?i)\\b(?:payment\\s+due|invoices?\\s+(?:are\\s+)?due|pay(?:ment)?\\s+within)\\b[^.]{0,40}?(?P<days>\\d+)\\s*days?","payment_method":"(?i)\\b(?:wire\\s+transfer|bank\\s+transfer|ach|sepa|direct\\s+debit|credit\\s+card|usdc|cheque|check)\\b","late_fee":"(?i)\\b(?:late\\s+(?:payment\\s+)?(?:fee|interest|charge)|interest\\s+on\\s+(?:late|overdue)|late\\s+payment|penalty)\\b[^.]{0,80}?(?P<pct>\\d+(?:\\.\\d+)?)\\s*%","liability_cap":"(?i)\\b(?:aggregate\\s+liability|total\\s+liability|liability\\s+arising|liability)\\b[^.]{0,140}?(?:shall\\s+not\\s+exceed|limited\\s+to|capped\\s+at|not\\s+to\\s+exceed)\\s+(?P<amount>(?:US\\$|USD|EUR|GBP|\\$|€|£)\\s*\\d[\\d,]*(?:\\.\\d+)?|\\d[\\d,]*(?:\\.\\d+)?\\s*(?:percent|%|usd|eur|gbp)) | (?i)\\b(?:in\\s+no\\s+event\\s+shall[^.]{0,140}?exceed|aggregate\\s+liability[^.]{0,100}?shall\\s+not\\s+exceed|total\\s+liability[^.]{0,100}?limited\\s+to)\\s+(?P<amount>the\\s+total\\s+fees\\s+paid[^.]{0,60}|an?\\s+amount\\s+equal\\s+to[^.]{0,60}|(?:US\\$|USD|EUR|GBP|\\$|€|£)\\s*\\d[\\d,]*(?:\\.\\d+)?|\\d[\\d,]*(?:\\.\\d+)?\\s*(?:percent|%|usd|eur|gbp)) | (?i)\\b(?:aggregate\\s+liability|total\\s+liability|liability)\\b[^.]{0,140}?(?:shall\\s+not\\s+exceed|limited\\s+to|not\\s+to\\s+exceed)\\s+(?P<amount>the\\s+total\\s+fees\\s+paid[^.]{0,60}|an?\\s+amount\\s+equal\\s+to[^.]{0,60}|(?:US\\$|USD|EUR|GBP|\\$|€|£)\\s*\\d[\\d,]*(?:\\.\\d+)?|\\d[\\d,]*(?:\\.\\d+)?\\s*(?:percent|%|usd|eur|gbp))","liability_exclusions":"(?i)\\b(?:shall\\s+not\\s+be\\s+liable\\s+for|excludes?|exclusion\\s+of|not\\s+liable\\s+for|neither\\s+party\\s+shall\\s+be\\s+liable\\s+for)\\b[^.]{0,120}?(?P<exclusion>consequential|indirect|special|incidental|exemplary|punitive|damages|loss\\s+of\\s+profit|loss\\s+of\\s+revenue|loss\\s+of\\s+business|goodwill|interruption)","indemnity":"(?i)\\b(?:indemnif(?:y|ies|ies\\s+and\\s+hold\\s+harmless))\\b","insurance":"(?i)\\b(?:insurance|insured\\s+for|policy\\s+of\\s+insurance|certificate\\s+of\\s+insurance)\\b","termination_notice":"(?i)\\bterminat(?:e|ion)[^.]{0,60}?on\\s+(?P<days>\\d+)\\s*(?P<unit>days?|months?|weeks?) | (?i)\\b(?:on|upon)\\s+(?P<days>\\d+)\\s*(?P<unit>days?|months?|weeks?)\\s+(?:written\\s+|prior\\s+)?notice","termination_for_cause":"(?i)\\b(?:material\\s+breach|breach\\s+of\\s+this\\s+agreement|for\\s+cause|immediately\\s+upon\\s+written\\s+notice|failure\\s+to\\s+pay)\\b","cure_period":"(?i)\\b(?:within\\s+(?P<days>\\d+)\\s*days?\\s+(?:of|from|after)\\s+(?:written\\s+)?notice[^.]{0,80}?(?:cure|remedy|correct)|(?:cure|remedy)[^.]{0,60}?within\\s+(?P<days2>\\d+)\\s*days?) | (?i)\\b(?:cure\\s+period\\s+of|has\\s+)\\s*(?P<days>\\d+)\\s*days?\\b","governing_law":"(?i)\\b(?:laws?|governing\\s+law|governed\\s+by[^.]{0,40}?law)\\s+of\\s+(?P<place>(?:the\\s+)?(?:laws?\\s+of\\s+)?[A-Z][A-Za-z]+(?:\\s+(?:and|of|the|&|de|von|van)\\s+[A-Z][A-Za-z]+)?(?:\\s+[A-Z][A-Za-z]+)?)(?=[\\s.,;)]|$)","exclusive_venue":"(?i)\\b(?:exclusive\\s+jurisdiction|exclusive\\s+venue|subject\\s+to\\s+the\\\\s+exclusive\\\\s+jurisdiction)\\b[^.]{0,80}?(?P<court>the\\s+(?:courts?|tribunal)\\s+of\\s+[^.]{2,60}) | (?i)\\bthe\\s+(?P<court2>courts?|tribunal)\\s+of\\s+(?P<place2>[A-Z][A-Za-z ]{2,40}?)\\s+shall\\s+have\\s+(?:exclusive\\s+jurisdiction|exclusive\\s+venue)"},"sectionKeywords":{"term":["TERM","TERM AND TERMINATION","DURATION","TERM OF","COMMENCEMENT"],"commercial":["FEES","PRICING","PAYMENT","COMMERCIAL","CHARGES","FEES AND PAYMENT","BILLING"],"liability":["LIABILITY","LIMITATION OF LIABILITY","INDEMNITY","INDEMNIFICATION","INSURANCE","LIABILITIES"],"termination":["TERMINATION","TERM AND TERMINATION","EXIT","TERMINATION AND CONSEQUENCES"],"governing_law":["GOVERNING LAW","GOVERNING","JURISDICTION","LAW AND JURISDICTION","APPLICABLE LAW"],"parties":["PARTIES","PARTIES AND DEFINITIONS"]},"method":"A clause is located in two steps: (a) SECTION — the heading whose keywords match the clause group, from there to the next heading; (b) VALUE — the group's published patterns matched inside that section. When a document has no heading for a group, the whole document is searched and the result is reported the same way. The document DIGEST is always computed over the RAW text.","checks":["document_received","document_non_empty","document_type_detected","parties_found","term_found","commercial_found","liability_found","termination_found","governing_law_found","ambiguities_recorded","coverage_gaps_recorded"],"honestRefusals":[{"id":"REF-CON-001","trigger":"no document text was supplied (or the bytes decoded to nothing)","behaviour":"the extraction returns empty clause blocks, a named document gap, and no invented parties or dates."},{"id":"REF-CON-002","trigger":"a clause group matched no rule","behaviour":"the group is named in `coverage.gaps` and the clause is NOT reported as absent by assumption — it is reported as not located."},{"id":"REF-CON-003","trigger":"a clause group matched more than one rule with DIFFERENT values","behaviour":"the clause is reported as an AMBIGUITY with the candidates listed. The engine does not pick one."},{"id":"REF-CON-004","trigger":"a party could not be separated from the counterparty text","behaviour":"the party is reported with a `role: UNRESOLVED` marker and the clause is an ambiguity."},{"id":"REF-CON-005","trigger":"a date was found but its meaning (effective vs expiry) is not determinable from the matched context","behaviour":"the date is reported under `datesFound` with its surrounding context, and the clause is an ambiguity."}],"readOnly":true,"note":"This extraction is RULE-BASED over the text you supplied. It reports what was LOCATED and what was NOT LOCATED. It does NOT interpret the agreement, does NOT opine on enforceability, does NOT resolve ambiguities, and does NOT assert that an absent clause is absent from the contract — only that no published rule located it. A missing clause is an ambiguity with a reason, never a guess. This is not legal advice."}