{"openapi":"3.1.1","info":{"title":"RunSAVE agent API","version":"1.0.0-beta","description":"Key-protected standalone beta for public/synthetic declared graphs. Not Nexus admission, procurement, payment or certification."},"servers":[{"url":"https://runsave.dev"}],"security":[{"BetaKey":[]}],"paths":{"/api/v1/analyse":{"post":{"operationId":"analyse_declared_topology","summary":"Return six structural checks for one declared graph","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclaredGraph"},"example":{"name":"Synthetic dispatch graph","version":"1.0","context":"distributed","modules":["entry","planner","tool"],"connections":[{"from":"entry","to":"planner","type":"control"},{"from":"planner","to":"tool","type":"execution"}]}}}},"responses":{"200":{"description":"Full structural report. Kernel digests are not settlement receipts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"400":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Sanitized error. 429/503 include Retry-After; daily exhaustion lasts until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"BetaKey":{"type":"apiKey","in":"header","name":"X-RunSAVE-API-Key","description":"Request access from xeolite.app@gmail.com. Keep keys server-side."}},"schemas":{"DeclaredGraph":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"runsave.declared-graph.v1","type":"object","additionalProperties":false,"required":["name","version","context","modules","connections"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"version":{"type":"string","minLength":1,"maxLength":40},"context":{"enum":["distributed","server","client"]},"modules":{"type":"array","minItems":2,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":80}},"connections":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["from","to","type"],"properties":{"from":{"type":"string","minLength":1,"maxLength":80},"to":{"type":"string","minLength":1,"maxLength":80},"type":{"enum":["control","execution","state","signal","analysis","governance"]},"label":{"type":"string","maxLength":160}}}}},"description":"Declared graph only. Strings are trimmed by the engine. Endpoints must name declared modules; duplicate edges (from/to/type) are rejected. HTTP profile rejects empty labels, invalid Unicode and JSON nesting above 12."},"Report":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"runsave.declared-topology-report.v1","type":"object","properties":{"schema":{"const":"runsave.declared-topology-report.v1"},"engine_version":{"const":"0.1.0-pilot"},"method":{"const":"declared-topology-v1"},"input":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"context":{"enum":["distributed","server","client"]},"module_count":{"type":"integer","minimum":0},"connection_count":{"type":"integer","minimum":0}},"required":["name","version","context","module_count","connection_count"],"additionalProperties":false},"checks":{"type":"object","properties":{"connectivity":{"type":"object","properties":{"weak_component_count":{"type":"integer","minimum":0},"weak_components":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"strong_component_count":{"type":"integer","minimum":0},"strong_components":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["weak_component_count","weak_components","strong_component_count","strong_components"],"additionalProperties":false},"module_removal":{"type":"object","properties":{"baseline_weak_components":{"type":"integer","minimum":0},"critical_modules":{"type":"array","items":{"type":"object","properties":{"module":{"type":"string"},"weak_components_after_removal":{"type":"integer","minimum":0}},"required":["module","weak_components_after_removal"],"additionalProperties":false}}},"required":["baseline_weak_components","critical_modules"],"additionalProperties":false},"structural_redundancy":{"type":"object","properties":{"connections_with_alternate_route":{"type":"integer","minimum":0},"total_connections":{"type":"integer","minimum":0},"coverage":{"type":"number","minimum":0},"connection_indexes":{"type":"array","items":{"type":"integer","minimum":0}}},"required":["connections_with_alternate_route","total_connections","coverage","connection_indexes"],"additionalProperties":false},"cycles":{"type":"object","properties":{"cyclic_component_count":{"type":"integer","minimum":0},"signal_or_governance_component_count":{"type":"integer","minimum":0},"other_cyclic_component_count":{"type":"integer","minimum":0},"components":{"type":"array","items":{"type":"object","properties":{"modules":{"type":"array","items":{"type":"string"}},"relation_types":{"type":"array","items":{"enum":["control","execution","state","signal","analysis","governance"]}},"classification":{"enum":["contains-signal-or-governance","other-cycle"]}},"required":["modules","relation_types","classification"],"additionalProperties":false}}},"required":["cyclic_component_count","signal_or_governance_component_count","other_cyclic_component_count","components"],"additionalProperties":false},"centrality":{"type":"object","properties":{"highest_module":{"type":["string","null"]},"highest_betweenness":{"type":"number","minimum":0},"by_module":{"type":"object","additionalProperties":{"type":"number","minimum":0}}},"required":["highest_module","highest_betweenness","by_module"],"additionalProperties":false},"edge_types":{"type":"object","properties":{"counts":{"type":"object","properties":{"control":{"type":"integer","minimum":0},"execution":{"type":"integer","minimum":0},"state":{"type":"integer","minimum":0},"signal":{"type":"integer","minimum":0},"analysis":{"type":"integer","minimum":0},"governance":{"type":"integer","minimum":0}},"required":["control","execution","state","signal","analysis","governance"],"additionalProperties":false},"ratios":{"type":"object","properties":{"control":{"type":"number","minimum":0},"execution":{"type":"number","minimum":0},"state":{"type":"number","minimum":0},"signal":{"type":"number","minimum":0},"analysis":{"type":"number","minimum":0},"governance":{"type":"number","minimum":0}},"required":["control","execution","state","signal","analysis","governance"],"additionalProperties":false}},"required":["counts","ratios"],"additionalProperties":false}},"required":["connectivity","module_removal","structural_redundancy","cycles","centrality","edge_types"],"additionalProperties":false},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"level":{"enum":["attention","observation"]},"title":{"type":"string"},"evidence":{"type":"string"},"inspect":{"type":"string"},"modules":{"type":"array","items":{"type":"string"}}},"required":["id","level","title","evidence","inspect","modules"],"additionalProperties":false}},"non_claims":{"type":"array","items":{"type":"string"}},"input_digest":{"type":"string","pattern":"^[0-9a-f]{64}$"},"report_digest":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["schema","engine_version","method","input","checks","findings","non_claims","input_digest","report_digest"],"additionalProperties":false},"Error":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"runsave.endpoint-error.v1","type":"object","properties":{"schema":{"const":"runsave.endpoint-error.v1"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"code":{"type":"string"}},"required":["path","code"],"additionalProperties":false}}},"required":["code","message","retryable","issues"],"additionalProperties":false}},"required":["schema","error"],"additionalProperties":false}}},"x-limits":{"input_bytes":65536,"output_bytes":262144,"modules":100,"connections":500,"body_deadline_ms":5000,"late_result_cutoff_ms":3000,"concurrency_per_isolate":2,"shared_requests_per_minute":30,"shared_requests_per_utc_day":500},"x-privacy":{"allowed_inputs":"public or synthetic only","application_payload_storage":false,"application_payload_logging":false,"persistent_state":"one aggregate quota row with minute/day counters; no graph, report, key or IP","hosting_metadata":"Infrastructure may process operational metadata under provider settings."}}