{"openapi":"3.1.0","info":{"title":"KYDE Score","version":"0.11.24"},"paths":{"/score/v0/keys":{"post":{"summary":"Create a scoring key (no signup)","operationId":"create_key_score_v0_keys_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"summary":"Add or change the key's webhook","description":"Add, change or remove the webhook on an existing key.\nwebhook_url null (or \"\") removes it — the key becomes poll-only.","operationId":"update_key_score_v0_keys_patch","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Revoke the key and delete all its data","description":"Self-service revocation: deletes the key and all data under it\n(including the claim email — Art. 17 stays one request). On a claimed\nkey this is a human action: sign in and delete from the dashboard.","operationId":"revoke_key_score_v0_keys_delete","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/scores":{"get":{"summary":"Current drift score per agent (polling interface)","description":"Current drift score per agent under this key (polling interface).\n\nReads persisted scoring state — O(agents), not O(history) (issue #2).\nWith session_id, session_service_name names the agent whose calls\ncarry that session.id (null until its first call arrives): the\nClaude Code hook finds its own agent this way.","operationId":"get_scores_score_v0_scores_get","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Session Id"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/records":{"get":{"summary":"An agent's stored calls, newest first (metadata only)","description":"What the agent did, call by call, from the first one on: tool,\ntime, duration, success, session. Only stored metadata, never\ncontent. Page with before=<next_before> (KYDE-379).","operationId":"get_records_score_v0_records_get","parameters":[{"name":"service_name","in":"query","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/alarms":{"get":{"summary":"Stored alarms, newest first (pageable audit view)","description":"Every stored alarm under this key, newest first — the append-only\nincident record that survives rebaselines (KYDE-480). get_scores\nshows only the newest few per agent; this endpoint pages through all\nof them: pass before=<next_before> for the next page, optionally\nfilter with service_name. Each row carries `what` — a label and a\none-sentence explanation where one exists for the channel.","operationId":"get_alarms_score_v0_alarms_get","parameters":[{"name":"service_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Name"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/history":{"get":{"summary":"Score and band over time, with the reason for each change","description":"The agent's score history, newest first (KYDE-492): one point per\nscored run, each band change carrying old_band and a one-sentence\nreason. `events` lists rebaselines and model changes inside the\npage's time span. Without history there is no trend and no story —\npage with before=<next_before>.","operationId":"get_history_score_v0_history_get","parameters":[{"name":"service_name","in":"query","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/drift":{"get":{"summary":"The fleet drift table: how agents behave per model","description":"Aggregated over the Kyde fleet (P6, no auth — kyde.com/drift\nreads it directly): per model, how many agents run on it, how many\nswitched to it in the last 90 days, how many of those entered watch\nor deviating within 7 days, and the median score delta after the\nswitch. Rows appear only when at least 5 distinct keys contribute;\nsuppressed_models says how many wait below that line. Never a\nsingle customer's agent; this measures agent behavior on a model,\nnever model quality. With ?model=X: that one row, or an honest\nknown: false.","operationId":"get_drift_score_v0_drift_get","parameters":[{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/agents/{service_name}/seal":{"get":{"summary":"The agent's seal facts, in final form (for Shine)","description":"Everything a Shine statement carries about this agent, ready to\nsign (D-069): band, score and runs_seen; the confirmed contract and\norganization frame as triples {hash, schema_version, confirmed_at}\n(a hash never travels alone; a PROPOSED document is never sealed);\nthe duration of compliance with its honest too_young state (under\n14 days) — the clock survives confirmed version changes along the\nsupersedes chain; holds of the last 90 days as a band (none, low,\nelevated), never a raw count; and false_alarms, reserved and null\nuntil the number is presentable (the same number as the false-block\nrate) — null never means zero. Metadata only.","operationId":"get_seal_score_v0_agents__service_name__seal_get","parameters":[{"name":"service_name","in":"path","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/agents/{service_name}/behavior":{"get":{"summary":"What the detectors see, in plain values","description":"Tool-mix share, error rate, median duration and calls per run:\nthe frozen baseline against the window once a baseline exists,\neverything-so-far against the window while the agent is still\nlearning (`comparison` says which) — so the view is never empty\nfrom the first run on (KYDE-493). Stored metadata only, never\ncontent.","operationId":"get_behavior_score_v0_agents__service_name__behavior_get","parameters":[{"name":"service_name","in":"path","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Window"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/limits":{"get":{"summary":"The enforced free-tier limits (also on the landing page)","description":"The data limits this deployment enforces, read live from the\nconfiguration so env overrides show truthfully. Keys match the\ndata-limit attributes on the landing page, so kyde.com can fill\nthose spans at runtime. Public by design: the numbers already are\n(score.kyde.com/, llms.txt).","operationId":"get_limits_score_v0_limits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/score/v0/cases":{"get":{"summary":"Same-cause alarms folded into cases (one decision each)","description":"Same-cause alarms under this key, folded into cases (KYDE-485):\nsame kind, short spacing, same agent — or the same signature across\nagents (a shared root cause, e.g. one default name). A looping agent\nis one case with a counter, not fifty alarms; the first alarm of a\ncase is delivered, repeats only count up, and one human verdict via\nthe feedback link resolves the whole case. Page with\nbefore=<next_before>; filter with status=open|resolved.","operationId":"get_cases_score_v0_cases_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/entities":{"post":{"summary":"Recipient hashes of the next tool call (sender-salted)","description":"The Claude Code hook calls this in PreToolUse: SHA256(salt|value)\nof the call's recipient fields (iban, recipient, account, merchant,\ncustomer, amount bucket), salted on the sender side — the salt never\nreaches Kyde, cleartext never leaves the machine. The hashes wait for\nthe tool_result of the same session and tool and then count like\ncollector-hashed kyde.entity.* attributes in the task contract.\nBody: {\"session_id\": \"...\", \"tool_name\": \"...\",\n       \"entities\": {\"merchant\": [\"<64 hex>\"], ...}}","operationId":"post_entities_score_v0_entities_post","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/keys/claim":{"post":{"summary":"Attach a human to the key (email, double opt-in)","description":"Stores the address unconfirmed and mails a confirmation link\n(valid 15 minutes, works once). After confirmation the key is\n'claimed': the human gets the management dashboard, and critical\nactions (rebaseline, webhook change, revoke) stop working with the\nkey alone. Until confirmation the claim may be replaced; a confirmed\nclaim is locked. Never invent an address for a user.","operationId":"claim_key_score_v0_keys_claim_post","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/login":{"post":{"summary":"Request a sign-in magic link","description":"Mails a one-time sign-in link when the address belongs to a\nconfirmed key. The response is the same either way — addresses can\nnot be enumerated.","operationId":"login_score_v0_login_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/score/v0/agents/{service_name}/rebaseline":{"post":{"summary":"Reset an agent's baseline (relearn from here)","description":"Forgets the agent's frozen baseline and score and starts a fresh\nlearning phase: the next 30 runs, over at least 3 days, become the\nnew baseline.\nStored records and alarms are kept (append-only) but fenced out of\nthe new baseline. Use after an intended behavior change — a new\nmodel, a new task — left the agent permanently deviating. Optional\nJSON body {\"reason\": \"...\", \"kind\": \"role_change|model_change|\"\n\"prompt_change|tool_change|other\"} records why; it lands in the\nrebaseline alarm, the timeline and the webhook event. The MCP\nequivalent is the rebaseline tool (requires confirm=true).","operationId":"rebaseline_agent_score_v0_agents__service_name__rebaseline_post","parameters":[{"name":"service_name","in":"path","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/agents/{service_name}/announce":{"post":{"summary":"Announce a wanted change before it ships","description":"Declares a coming change (KYDE-486) — body {\"kind\":\n\"role_change|model_change|prompt_change|tool_change|other\",\n\"note\": \"...\"}. While the announcement is active (7 days), a\ndrift-only shift of this agent folds into its summary instead of\npaging the human; rule violations (contract, loop, new recipient)\nand unannounced shifts alarm exactly as before. get_scores carries\nthe announcement under notices, with the rebaseline call that\naccepts the new baseline; a second announce replaces the first.\nLike rebaseline, this is gated on claimed keys: it mutes\ndeliveries.","operationId":"announce_change_score_v0_agents__service_name__announce_post","parameters":[{"name":"service_name","in":"path","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/contracts":{"post":{"summary":"Propose a declared contract (a human confirms it)","description":"The agent proposes its declared contract (ADR-003): scope\norganization (the frame) or agent, written from the order and\nstructured history, never from read text. The service referees the\nproposal (dry run over the stored history plus softness flags) and\nstores it as proposed; only a human confirms, by mail or in the\ndashboard. Measuring is free (D-070): violations of a confirmed\ncontract alarm like any alert. Holding before the action is the\npaid plan and runs locally in the hook.","operationId":"propose_contract_score_v0_contracts_post","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"The declared contract in force, proposal and chain","description":"What the local checker (hook, gateway) and the dashboard read:\nthe confirmed document in force with its frame-capped effective\nform, the open proposal with the referee report, the organization\nframe and the version chain as triples {hash, schema_version,\nconfirmed_at} (a hash never travels alone, D-069). Empty\nservice_name reads the organization frame's slot.","operationId":"get_contracts_score_v0_contracts_get","parameters":[{"name":"service_name","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Service Name"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/score/v0/holds":{"post":{"summary":"Report a held action (the hook, paid plan)","description":"The local checker held a call outside the confirmed contract\n(D-050, paid plan) and reports it: {service_name, tool_name,\nsession_id?, prompt_id?, entities? {class: [64-hex]}, reason?}.\nThe human gets one mail with three choices (approve once, approve\nand extend the contract, deny); an identical pending hold folds, so\na retrying agent never mails twice. Entities are salted hashes, the\nplaintext never leaves the operator's machine.","operationId":"report_hold_score_v0_holds_post","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Held actions and their resolutions (pageable)","description":"The hook polls this after a hold: approved means the exact case\nmay pass once, approved_extended means the new contract version\nadmits it (refetch /score/v0/contracts), denied and expired stay\nblocked. Page with before=<next_before>.","operationId":"get_holds_score_v0_holds_get","parameters":[{"name":"service_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Service Name"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/logs":{"post":{"summary":"OTLP/HTTP logs ingest (JSON or protobuf)","description":"One scored record per tool call. Required: resource attribute\n`service.name` (the agent, the unit of scoring); per log record the\nevent name `tool_result` — as attribute `event.name` (Claude Code\nshape) or as the OTLP record field `eventName` with value\n`grok_code.tool_result` (Grok CLI) — plus attributes `session.id`\n(one id per run) and `tool_name`. Used when present: `success`,\n`duration_ms`, `event.sequence`, `event.timestamp`, `prompt.id`,\n`tool_use_id`, `kyde.args.digest`, `kyde.entity.*`. Records in any\nother shape are ignored; if a payload contains log records and none\nmatch, the response carries `partialSuccess.errorMessage` and\n`stored` stays 0.","operationId":"ingest_logs_v1_logs_post","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics":{"post":{"summary":"OTLP/HTTP metrics ingest (acknowledged)","description":"Accepted and acknowledged; metrics are not scored today. Scoring\nreads log events and GenAI tool spans.","operationId":"ingest_metrics_v1_metrics_post","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/traces":{"post":{"summary":"OTLP/HTTP traces ingest (JSON or protobuf)","description":"Spans carrying `gen_ai.tool.name`, or\n`gen_ai.operation.name=execute_tool`, are scored as tool calls\n(session from `gen_ai.conversation.id`, falling back to the trace id;\nsuccess from the span status; duration from the span times). All\nother spans are ignored; if a payload contains spans and none match,\nthe response carries `partialSuccess.errorMessage`.","operationId":"ingest_traces_v1_traces_post","parameters":[{"name":"x-kyde-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Kyde-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Agent":{"type":"object","properties":{"service_name":{"type":"string"},"status":{"type":"string","enum":["learning","scored"]},"score":{"type":["integer","null"],"description":"0-100; null while learning."},"band":{"type":["string","null"],"description":"deviating (0-39) | watch (40-69) | normal (70-100); null while learning."},"alarms":{"type":"array","items":{"type":"object"}},"alarms_total":{"type":"integer"},"runs_seen":{"type":"integer"},"runs_needed":{"type":"integer"},"n_baseline_records":{"type":"integer"},"n_live_records":{"type":"integer"},"baseline_fingerprint":{"type":["string","null"]},"method_version":{"type":"string"},"rebaselined_at":{"type":["string","null"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Setup problems with this agent's name, e.g. a harness default name or several agents sharing one service.name. Fix them, or the baseline blurs; relay them to your human."},"last_seen_at":{"type":["string","null"],"description":"When the newest call arrived (UTC)."},"calls":{"type":"integer","description":"Stored tool calls, also while learning."},"error_rate":{"type":["number","null"]},"median_duration_ms":{"type":["integer","null"]},"tool_mix":{"type":"array","items":{"type":"object"}},"reason":{"type":["object","null"],"description":"The alarm reason line while watch/deviating: one plain sentence, what to do, how sure.","properties":{"reason":{"type":"string"},"action":{"type":"string"},"certainty":{"type":"string","enum":["sure","hint"]},"kind":{"type":"string"}}},"model":{"type":["string","null"],"description":"The model the agent currently runs on (majority of its last runs)."},"model_changes":{"type":"array","items":{"type":"object"},"description":"Detected model switches, newest first."},"proposed_action":{"type":"object","description":"Present only while the agent is deviating: the one-click way back if the change was intended (rebaseline with kind and reason)."},"contract":{"type":"object","description":"The declared contract's seal triple (never a bare hash, D-069): status proposed or confirmed, hash, schema_version, confirmed_at. Absent when no contract was ever proposed."},"notices":{"type":"array","items":{"type":"object"},"description":"Present when something needs the human's attention beyond the score: the active announced change (announce_change) with what shifted since and the rebaseline call that accepts the new baseline, and — while an agent is still learning with no real alarm — a sample_alarm with sample: true showing what an alarm will look like, and an alert_held notice when the free plan's one instant alert mail of the month is used up (the alerts then wait for the weekly review; tell your human one is waiting), a contract_proposed notice while a proposed contract awaits the human, and an action_held notice when a call was held before execution (tell your human; retry only after approval). NEVER relay a sample as a real alarm; real ones carry an alarm_id."}},"required":["service_name","status","score","band","runs_seen","runs_needed","method_version"]}}}}