{"contract":"treatyway","version":"1","status":"draft","published":"2026-11","publisher":"Charles Azam","source":"https://treatyway.com/contract/v1","source_note":"The human page is the source of truth. This file is the machine-readable copy. If they disagree, the page wins.","feedback":"mailto:charles@treatyway.com","declaration":{"tool":"treatyway_contract","instructions_line":"treatyway-contract: 1","input":{"type":"object","additionalProperties":true,"properties":{}},"output":{"type":"object","required":["contract","version","tools"],"additionalProperties":true,"properties":{"contract":{"const":"treatyway"},"version":{"type":"string","pattern":"^1(\\.[0-9]+)?$","description":"Major 1. This publication is \"1\". An additive revision may return \"1.1\"."},"tools":{"type":"array","description":"Standard tools this server implements. Omit a tool that is off. Do not list custom tools.","items":{"type":"string","enum":["describe_offer","check_availability","request_quote","place_order","get_status","message"]},"uniqueItems":true}}}},"treatyway":{"implements_standard_tools":true,"hosted_tools":["describe_offer","check_availability","request_quote","get_status","message"],"place_order":"not_supported","exposes_treatyway_contract":true,"bearer_key_and_trust_labels":true,"identity_pass":"issued_when_TREATYWAY_PASS_SIGNING_KEY_is_set","jwks":"https://treatyway.com/.well-known/jwks.json","jwks_when_unconfigured":"empty keys array","outcome_reports":"stored","email_fallback":"not_live","hosted_seller_mcp":true,"seller_tools":["list_requests","read_request","reply","decline","update_channel"],"reputation":"not_computed","ranking_credit":"not_implemented","data_location":"unspecified"},"identity_pass":{"status":"issued_when_TREATYWAY_PASS_SIGNING_KEY_is_set","format":"signed JWT","algorithm":"ES256","ttl_seconds":600,"tool":"get_pass","verify":"POST /api/pass/verify","claims":{"iss":"https://treatyway.com","sub":"Agent id.","owner":"Object with name and proof (declared, social, or domain).","level":"1 or 2. Level 0 cannot get a pass.","aud":"Seller domain.","exp":"10 minutes.","jti":"Unique id. Stored with the agent id, aud, and time. No content."}},"trust_levels":{"agents":[{"level":0,"meaning":"Unauthenticated. Limited tools and requests. The business is told the agent is not authenticated.","tiers":[0],"tier_names":["Anonymous"],"business_told_by_this_contract":"This agent is not authenticated. Treatyway does not know who operates it.","business_told_by_treatyway_today":"This agent is not authenticated. Treatyway does not know who operates it."},{"level":1,"meaning":"Names its owner. Declared, not checked.","tiers":[1],"tier_names":["Declared"],"business_told_by_treatyway_today":"Declared by agent, not verified"},{"level":2,"meaning":"Owner authenticated: DNS, a file, or social. OAuth later.","tiers":[2,3,4],"tier_names":["Proven social","Proven domain","Established"],"note":"Established stays inside level 2."}],"businesses":[{"level":1,"meaning":"Gives its website. Declared, not checked.","today":"No declared-only state. A claim checks the domain immediately."},{"level":2,"meaning":"Proves website and company name by DNS.","today":"A claim proves control of the listed website by DNS TXT or a well-known file. The company name is not proved."}]},"$defs":{"answered_by":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","minLength":1,"description":"Who answered."},"role":{"type":"string","enum":["business","person","agent"]}}},"needs_human":{"type":"object","required":["missing"],"additionalProperties":true,"properties":{"missing":{"type":"array","minItems":1,"items":{"type":"string","minLength":1},"description":"What a person still has to supply or decide."}}},"price":{"anyOf":[{"type":"string","const":"needs_human"},{"type":"object","required":["amount","currency"],"additionalProperties":true,"properties":{"amount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{1,2})?$","description":"Decimal string. Not a float."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217."},"note":{"type":"string"}}}]}},"tools":[{"name":"describe_offer","summary":"What the seller sells: services or goods, area, hours, lead time, and how to order.","default_enabled":true,"min_agent_level":0,"input":{"type":"object","additionalProperties":true,"properties":{"kind":{"type":"string","enum":["service","good","any"]}}},"output":{"type":"object","required":["offers","answered_by"],"additionalProperties":true,"properties":{"offers":{"type":"array","items":{"type":"object","required":["name","kind"],"additionalProperties":true,"properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"kind":{"type":"string","enum":["service","good"]},"description":{"type":"string"},"area":{"type":"string"},"hours":{"type":"string"},"lead_time":{"type":"string"},"how_to_order":{"type":"string"}}}},"area":{"type":"string"},"hours":{"type":"string"},"lead_time":{"type":"string"},"how_to_order":{"type":"string"},"answered_by":{"$ref":"#/$defs/answered_by"},"needs_human":{"$ref":"#/$defs/needs_human"}}}},{"name":"check_availability","summary":"Records an information request and returns needs_human unless the business has replied.","default_enabled":true,"min_agent_level":0,"input":{"type":"object","required":["kind"],"additionalProperties":true,"properties":{"kind":{"type":"string","enum":["service","good"]},"offer_id":{"type":"string"},"start":{"type":"string","description":"ISO-8601 date or date-time. Required when kind is service."},"end":{"type":"string"},"quantity":{"type":"integer","minimum":1,"description":"Required when kind is good."},"sku":{"type":"string"}},"allOf":[{"if":{"properties":{"kind":{"const":"service"}},"required":["kind"]},"then":{"required":["start"]}},{"if":{"properties":{"kind":{"const":"good"}},"required":["kind"]},"then":{"required":["quantity"]}}]},"output":{"type":"object","required":["answered_by"],"additionalProperties":true,"anyOf":[{"required":["available","answered_by"]},{"required":["needs_human","answered_by"]}],"properties":{"available":{"type":"boolean"},"quantity_available":{"type":"number"},"start":{"type":"string"},"end":{"type":"string"},"note":{"type":"string"},"answered_by":{"$ref":"#/$defs/answered_by"},"needs_human":{"$ref":"#/$defs/needs_human"}}}},{"name":"request_quote","summary":"A described job or basket. Returns quote_id and a price, or needs_human.","default_enabled":true,"min_agent_level":1,"input":{"type":"object","required":["summary"],"additionalProperties":true,"properties":{"summary":{"type":"string","minLength":1},"kind":{"type":"string","enum":["service","good"]},"lines":{"type":"array","items":{"type":"object","required":["description"],"additionalProperties":true,"properties":{"offer_id":{"type":"string"},"sku":{"type":"string"},"description":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1},"when":{"type":"string"}}}},"when":{"type":"string"},"destination":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3}}},"output":{"type":"object","required":["quote_id","price","answered_by"],"additionalProperties":true,"properties":{"quote_id":{"type":"string","minLength":1},"price":{"$ref":"#/$defs/price"},"expires_at":{"type":"string"},"note":{"type":"string"},"answered_by":{"$ref":"#/$defs/answered_by"},"needs_human":{"$ref":"#/$defs/needs_human"}}}},{"name":"place_order","summary":"Books a service or orders goods against a quote. Off unless the seller enables it. Requires trust level 2. Does not take payment.","default_enabled":false,"min_agent_level":2,"seller_enables":true,"input":{"type":"object","required":["quote_id","confirm"],"additionalProperties":true,"properties":{"quote_id":{"type":"string","minLength":1},"confirm":{"const":true},"note":{"type":"string"}}},"output":{"type":"object","required":["answered_by"],"additionalProperties":true,"anyOf":[{"required":["order_id","status","answered_by"]},{"required":["status","needs_human","answered_by"]}],"properties":{"order_id":{"type":"string","minLength":1},"quote_id":{"type":"string"},"status":{"type":"string","enum":["accepted","rejected","needs_human"]},"answered_by":{"$ref":"#/$defs/answered_by"},"needs_human":{"$ref":"#/$defs/needs_human"}}}},{"name":"get_status","summary":"Status of a quote or an order.","default_enabled":true,"min_agent_level":0,"input":{"type":"object","additionalProperties":true,"anyOf":[{"required":["quote_id"]},{"required":["order_id"]}],"properties":{"quote_id":{"type":"string","minLength":1},"order_id":{"type":"string","minLength":1}}},"output":{"type":"object","required":["status","answered_by"],"additionalProperties":true,"properties":{"quote_id":{"type":"string"},"order_id":{"type":"string"},"status":{"type":"string","minLength":1},"summary":{"type":"string"},"answered_by":{"$ref":"#/$defs/answered_by"},"needs_human":{"$ref":"#/$defs/needs_human"}}}},{"name":"message","summary":"Free text.","default_enabled":true,"min_agent_level":0,"input":{"type":"object","required":["text"],"additionalProperties":true,"properties":{"text":{"type":"string","minLength":1},"quote_id":{"type":"string"},"order_id":{"type":"string"}}},"output":{"type":"object","required":["answered_by"],"additionalProperties":true,"properties":{"text":{"type":"string"},"answered_by":{"$ref":"#/$defs/answered_by"},"needs_human":{"$ref":"#/$defs/needs_human"}}}}],"reserved_names":{"standard_tools":["describe_offer","check_availability","request_quote","place_order","get_status","message"],"prefix":"treatyway_","also_reserved":"A name that starts with a standard tool name and an underscore."},"outcome_report":{"status":"planned","outcomes":["completed","no_show","cancelled"],"note":"One line, no message and no price. Not accepted yet."}}