Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
fix(train): integration defects the nineteen-branch union exposed
beenuarde38df7720e8
diff --git a/.train_resolve.py b/.train_resolve.pydeleted file mode 100644index fe54faf54..000000000--- a/.train_resolve.py+++ /dev/null@@ -1,95 +0,0 @@-#!/usr/bin/env python3-"""Train conflict resolver for the recurring tracker shapes (session tool, not shipped).--Usage: python3 .train_resolve.py <file> <mode>- modes:- union -> ours + theirs for every hunk- theirs -> theirs for every hunk- roadmap -> theirs, deduping repeated 'claim-to-gate matrix stands at' paragraphs-Run from the worktree root. Refuses to leave markers behind.-"""-import re-import sys-import pathlib--CONFLICT = re.compile(- r"^<<<<<<< [^\n]*\n(.*?)(?:^\|\|\|\|\|\|\| [^\n]*\n.*?)?^=======\n(.*?)^>>>>>>> [^\n]*\n",- re.DOTALL | re.MULTILINE,-)---def merge_checkboxes(ours: str, theirs: str) -> str:- """Same line set modulo [x]/[ ]: checked wins per line. Falls back to union."""- ol, tl = ours.splitlines(True), theirs.splitlines(True)- norm = lambda s: s.replace("- [x]", "- [ ]", 1)- if len(ol) == len(tl) and all(norm(a) == norm(b) for a, b in zip(ol, tl)):- return "".join(a if "- [x]" in a else b for a, b in zip(ol, tl))- return ours + theirs---def merge_matrix(ours: str, theirs: str) -> str:- """Union of table rows from both sides, then a single trailing non-row block- (theirs'), for hunks spanning appended matrix rows + the Summary."""- def split(block: str):- rows, rest, in_rows = [], [], True- for line in block.splitlines(True):- if in_rows and line.startswith("|"):- rows.append(line)- else:- in_rows = False- rest.append(line)- return rows, "".join(rest)-- orows, orest = split(ours)- trows, trest = split(theirs)- seen, rows = set(), []- for r in orows + trows:- if r not in seen:- seen.add(r)- rows.append(r)- return "".join(rows) + (trest if trest.strip() else orest)---def dedupe_matrix_paragraph(text: str) -> str:- paras = [p for p in text.split("\n\n") if p.strip()]- firsts = [p for p in paras if p.lstrip().startswith("The claim-to-gate matrix stands at")]- if len(firsts) > 1:- return firsts[0] + "\n\n"- return text---def main() -> None:- path, mode = sys.argv[1], sys.argv[2]- p = pathlib.Path(path)- t = p.read_text()- out, idx, n = [], 0, 0- for m in CONFLICT.finditer(t):- ours, theirs = m.group(1), m.group(2)- if mode == "union":- r = ours + theirs- elif mode == "theirs":- r = theirs- elif mode == "ours":- r = ours- elif mode == "roadmap":- r = dedupe_matrix_paragraph(theirs)- elif mode == "checkboxes":- r = merge_checkboxes(ours, theirs)- elif mode == "matrix":- r = merge_matrix(ours, theirs)- else:- raise SystemExit(f"unknown mode {mode}")- out.append(t[idx : m.start()])- out.append(r)- idx = m.end()- n += 1- out.append(t[idx:])- res = "".join(out)- if re.search(r"^(<<<<<<< |>>>>>>> |=======$)", res, re.MULTILINE):- raise SystemExit(f"{path}: markers left behind")- p.write_text(res)- print(f"{path}: {n} hunks -> {mode}")---if __name__ == "__main__":- main()diff --git a/docs/openapi.yaml b/docs/openapi.yamlindex 0243db872..9d62adce1 100644--- a/docs/openapi.yaml+++ b/docs/openapi.yaml@@ -2180,37 +2180,11 @@ paths:required: trueresponses:'200':-- /api/v1/war-rooms/cases/{case_id}:- - war-rooms- summary: Open For Case- description: 'One action: create the channel, invite, post the header, record- it.--- Fails loudly. The analyst pressed a button and is entitled to know when-- it did not work — a 202 "we''ll try" here would be the toast-only control-- this console is not allowed to ship.'- operationId: open_for_case_api_v1_war_rooms_cases__case_id__post- security:- - HTTPBearer: []- parameters:- - name: case_id- in: path- type: string- format: uuid- title: Case Id- $ref: '#/components/schemas/OpenWarRoomRequest'- '201':description: Successful Responsecontent:application/json:schema:$ref: '#/components/schemas/MergeResponse'-- $ref: '#/components/schemas/WarRoomModel''422':description: Validation Errorcontent:@@ -2235,11 +2209,22 @@ paths:responses:'200':description: Successful Response+ content:+ application/json:+ schema:$ref: '#/components/schemas/MergeResponse''422':description: Validation Error+ content:+ application/json:+ schema:$ref: '#/components/schemas/HTTPValidationError'+ security:+ - HTTPBearer: []/api/v1/case-depth/alerts/bulk-triage:+ post:+ tags:+ - case-depthsummary: Bulk Triage Routedescription: 'Apply one triage decision to many alerts, with a preflight count.@@ -2252,44 +2237,155 @@ paths:how the weaker one becomes the one everybody reaches for.'operationId: bulk_triage_route_api_v1_case_depth_alerts_bulk_triage_post+ requestBody:+ content:+ application/json:+ schema:$ref: '#/components/schemas/BulkTriageRequest'+ required: true+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:$ref: '#/components/schemas/BulkTriageResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ security:+ - HTTPBearer: []/api/v1/case-depth/custom-fields:get:+ tags:+ - case-depthsummary: List Custom FieldsoperationId: list_custom_fields_api_v1_case_depth_custom_fields_get+ security:+ - HTTPBearer: []parameters:- name: include_inactivein: queryrequired: false+ schema:type: booleandefault: falsetitle: Include Inactive+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:type: arrayitems:$ref: '#/components/schemas/CustomFieldOut'title: Response List Custom Fields Api V1 Case Depth Custom FieldsGet+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ post:+ tags:+ - case-depthsummary: Create Custom FieldoperationId: create_custom_field_api_v1_case_depth_custom_fields_post+ security:+ - HTTPBearer: []+ requestBody:+ required: true+ content:+ application/json:+ schema:$ref: '#/components/schemas/CustomFieldIn'+ responses:'201':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/CustomFieldOut'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'/api/v1/case-depth/custom-fields/{field_id}:patch:+ tags:+ - case-depthsummary: Update Custom FieldoperationId: update_custom_field_api_v1_case_depth_custom_fields__field_id__patch+ security:+ - HTTPBearer: []+ parameters:- name: field_idin: path+ required: true+ schema:type: stringformat: uuidtitle: Field Id+ requestBody:+ required: true+ content:+ application/json:+ schema:$ref: '#/components/schemas/CustomFieldPatch'+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/CustomFieldOut'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'delete:+ tags:+ - case-depthsummary: Retire Custom Fielddescription: 'Retire, never delete: values already written stay readable andattributable.'operationId: retire_custom_field_api_v1_case_depth_custom_fields__field_id__delete+ security:+ - HTTPBearer: []+ parameters:+ - name: field_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: Field Id+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/CustomFieldOut'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'/api/v1/case-depth/cases/{case_id}/custom-values:+ get:+ tags:+ - case-depthsummary: Get Custom Valuesdescription: 'Every active field, with this case''s value or an empty one.@@ -2300,10 +2396,6 @@ paths:omits whatever was added last week.'operationId: get_custom_values_api_v1_case_depth_cases__case_id__custom_values_get-- - war-rooms- summary: List For Case- operationId: list_for_case_api_v1_war_rooms_cases__case_id__getsecurity:- HTTPBearer: []parameters:@@ -2325,9 +2417,6 @@ paths:$ref: '#/components/schemas/CustomValueOut'title: Response Get Custom Values Api V1 Case Depth Cases Case Id CustomValues Get-- $ref: '#/components/schemas/WarRoomModel'- title: Response List For Case Api V1 War Rooms Cases Case Id Get'422':description: Validation Errorcontent:@@ -2343,72 +2432,12 @@ paths:- HTTPBearer: []parameters:- name: case_id-- /api/v1/war-rooms/{war_room_id}/sync:- post:- - war-rooms- summary: Sync- operationId: sync_api_v1_war_rooms__war_room_id__sync_post- - name: war_room_idin: pathrequired: trueschema:type: stringformat: uuidtitle: Case Id-- title: War Room Id- responses:- '200':- description: Successful Response- content:- application/json:- schema:- $ref: '#/components/schemas/SyncResult'- '422':- description: Validation Error- $ref: '#/components/schemas/HTTPValidationError'- /api/v1/war-rooms/{war_room_id}/close:- post:- tags:- - war-rooms- summary: Close- description: 'Stop mirroring. The channel itself is left alone, deliberately.--- Archiving somebody''s channel from a console button is a bigger action-- than it looks: the transcript is often the incident''s own record and the-- people in it did not press anything.'- operationId: close_api_v1_war_rooms__war_room_id__close_post- security:- - HTTPBearer: []- parameters:- - name: war_room_id- in: path- required: true- type: string- format: uuid- $ref: '#/components/schemas/WarRoomModel'- /api/v1/war-rooms/{war_room_id}/decision:- summary: Channel Decision- description: 'A decision taken in the channel, delivered by the bot.--- Service-token only. See the module header: the bot has verified the-- vendor''s signature and this service cannot, so the token is the whole-- trust relationship and ``CHANNEL_DECISIONS`` is its blast radius.'- operationId: channel_decision_api_v1_war_rooms__war_room_id__decision_post- - name: X-AiSOC-Service-Token- in: header- required: false- anyOf:- - type: string- - type: 'null'- title: X-Aisoc-Service-TokenrequestBody:required: truecontent:@@ -2428,6 +2457,9 @@ paths:Values Put'422':description: Validation Error+ content:+ application/json:+ schema:$ref: '#/components/schemas/HTTPValidationError'/api/v1/case-depth/workload:get:@@ -2449,13 +2481,12 @@ paths:- name: daysin: queryrequired: false+ schema:type: integermaximum: 365minimum: 1default: 30title: Days-- $ref: '#/components/schemas/ChannelDecisionRequest'responses:'200':description: Successful Response@@ -2465,9 +2496,6 @@ paths:type: objectadditionalProperties: truetitle: Response Workload Api V1 Case Depth Workload Get-- title: Response Channel Decision Api V1 War Rooms War Room Id Decision- Post'422':description: Validation Errorcontent:@@ -7729,19 +7757,21 @@ paths:responses:'201':description: Successful Response+ content:+ application/json:+ schema:$ref: '#/components/schemas/MemoryIngestResult''422':description: Validation Error+ content:+ application/json:+ schema:$ref: '#/components/schemas/HTTPValidationError'get:+ tags:+ - semantic-memorysummary: List ItemsoperationId: list_items_api_v1_memory_items_get-- /api/v1/ai-assets:- - ai-estate- summary: List Ai Assets- description: The estate, newest sighting first.- operationId: list_ai_assets_api_v1_ai_assets_getsecurity:- HTTPBearer: []parameters:@@ -7761,13 +7791,6 @@ paths:- type: string- type: 'null'title: State-- description: Filter to one asset kind.- - name: unlinked- type: boolean- description: Only assets with no person linked.- default: false- title: Unlinked- name: limitin: queryrequired: false@@ -7789,6 +7812,9 @@ paths:title: Response List Items Api V1 Memory Items Get'422':description: Validation Error+ content:+ application/json:+ schema:$ref: '#/components/schemas/HTTPValidationError'/api/v1/memory/items/{item_id}:delete:@@ -7804,30 +7830,17 @@ paths:- name: item_idin: pathrequired: true+ schema:type: stringformat: uuidtitle: Item Id- name: reasonin: queryrequired: false+ schema:+ type: stringdefault: ''title: Reason-- maximum: 200- default: 50- - name: offset- type: integer- minimum: 0- default: 0- title: Offset- $ref: '#/components/schemas/AiAssetListResponse'- /api/v1/ai-assets/{asset_id}:- get:- - ai-estate- summary: Get Ai Asset- operationId: get_ai_asset_api_v1_ai_assets__asset_id__get- - name: asset_id- title: Asset Idresponses:'200':description: Successful Response@@ -7835,8 +7848,6 @@ paths:application/json:schema:$ref: '#/components/schemas/MemoryItemOut'-- $ref: '#/components/schemas/AiAssetModel''422':description: Validation Errorcontent:@@ -7875,59 +7886,62 @@ paths:responses:'200':description: Successful Response+ content:+ application/json:+ schema:items:$ref: '#/components/schemas/MemoryRecallHit'type: arraytitle: Response Recall Api V1 Memory Recall Post'422':description: Validation Error+ content:+ application/json:+ schema:$ref: '#/components/schemas/HTTPValidationError'security:- HTTPBearer: []/api/v1/memory/conflicts:get:+ tags:+ - semantic-memorysummary: List ConflictsoperationId: list_conflicts_api_v1_memory_conflicts_get+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ items:$ref: '#/components/schemas/MemoryConflictOut'+ type: arraytitle: Response List Conflicts Api V1 Memory Conflicts Get+ security:+ - HTTPBearer: []/api/v1/memory/conflicts/{item_id}/resolve:+ post:+ tags:+ - semantic-memorysummary: Resolve Conflictdescription: Settle a conflict by naming which side survives. The other is retired.operationId: resolve_conflict_api_v1_memory_conflicts__item_id__resolve_post+ security:+ - HTTPBearer: []parameters:- name: item_id-- /api/v1/ai-assets/{asset_id}/sanction:- - ai-estate- summary: Sanction Ai Asset- description: 'Approve an asset, refuse it, or put it back to undecided.--- The risk score is recomputed here rather than left stale, through the-- same `score_risk` the recorder calls, because the sanction decision is-- one of its inputs: an asset that has just been refused and is still-- running is a different exposure from one nobody had looked at.'- operationId: sanction_ai_asset_api_v1_ai_assets__asset_id__sanction_post- - name: asset_idin: pathrequired: trueschema:type: stringformat: uuidtitle: Item Id-- title: Asset IdrequestBody:required: truecontent:application/json:schema:$ref: '#/components/schemas/MemoryConflictResolution'-- $ref: '#/components/schemas/SanctionRequest'responses:'200':description: Successful Response@@ -7935,8 +7949,6 @@ paths:application/json:schema:$ref: '#/components/schemas/MemoryConflictOut'-- $ref: '#/components/schemas/AiAssetModel''422':description: Validation Errorcontent:@@ -20562,6 +20574,186 @@ paths:$ref: '#/components/schemas/HTTPValidationError'security:- HTTPBearer: []+ /api/v1/lake/estimate:+ post:+ tags:+ - lake+ summary: Estimate Lake Sql+ description: 'What would this query read, and where does that data live?+++ Charged at the schema rate rather than the query rate: an estimate++ runs ``EXPLAIN ESTIMATE`` and two system-table reads, none of which++ touch tenant data. Pricing it like a scan would train analysts to++ skip the estimate, which is the opposite of the point.'+ operationId: estimate_lake_sql_api_v1_lake_estimate_post+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/LakeEstimateRequest'+ required: true+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/LakeEstimateResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ security:+ - HTTPBearer: []+ /api/v1/lake/query-jobs:+ post:+ tags:+ - lake+ summary: Submit Lake Query Job+ description: 'Submit a query that is allowed to take longer than the synchronous+ bound.+++ The estimate is taken once, here, and stored on the job. It is never++ recomputed: it is the number the analyst agreed to before the scan++ started, and moving it afterwards would make the record of what they++ were told untrue.'+ operationId: submit_lake_query_job_api_v1_lake_query_jobs_post+ security:+ - HTTPBearer: []+ requestBody:+ required: true+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/LakeQueryJobRequest'+ responses:+ '202':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/LakeQueryJobResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ get:+ tags:+ - lake+ summary: List Lake Query Jobs+ operationId: list_lake_query_jobs_api_v1_lake_query_jobs_get+ security:+ - HTTPBearer: []+ parameters:+ - name: limit+ in: query+ required: false+ schema:+ type: integer+ default: 50+ title: Limit+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ type: array+ items:+ $ref: '#/components/schemas/LakeQueryJobResponse'+ title: Response List Lake Query Jobs Api V1 Lake Query Jobs Get+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/lake/query-jobs/{job_id}:+ get:+ tags:+ - lake+ summary: Get Lake Query Job+ description: 'One job''s state, with a live progress read while it is running.+++ The live read is folded into the response but is **not** written back++ over a terminal state: a late progress row must not make a finished++ job look like it started again.'+ operationId: get_lake_query_job_api_v1_lake_query_jobs__job_id__get+ security:+ - HTTPBearer: []+ parameters:+ - name: job_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: Job Id+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/LakeQueryJobResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/lake/query-jobs/{job_id}/cancel:+ post:+ tags:+ - lake+ summary: Cancel Lake Query Job+ description: 'Stop a running scan.+++ A job that has already ended answers 409 rather than being quietly++ re-marked: cancelling a finished job would rewrite the record of what++ happened.'+ operationId: cancel_lake_query_job_api_v1_lake_query_jobs__job_id__cancel_post+ security:+ - HTTPBearer: []+ parameters:+ - name: job_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: Job Id+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/LakeQueryJobResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'/api/v1/lake/schema:get:tags:@@ -20682,122 +20874,448 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/WaitlistEntryWire'+ $ref: '#/components/schemas/WaitlistEntryWire'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/admin/tenants/provision:+ post:+ tags:+ - admin+ - tenants+ summary: Promote a waitlist entry into a live managed tenant.+ description: 'Provision a new tenant from a waitlist entry.+++ Idempotent on the waitlist entry id: a repeat call for an++ already-provisioned entry returns the existing tenant + a fresh++ invite link (the demo seed is *not* re-run). This keeps the++ support team from creating duplicate tenants if they click the++ button twice on a flaky network.'+ operationId: provision_tenant_api_v1_admin_tenants_provision_post+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/TenantProvisionRequest'+ required: true+ responses:+ '201':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/TenantProvisionResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ security:+ - HTTPBearer: []+ /api/v1/admin/tenants:+ get:+ tags:+ - admin+ - tenants+ summary: List tenants for the support team.+ description: Read-only tenant list, sorted by creation time descending.+ operationId: list_tenants_api_v1_admin_tenants_get+ security:+ - HTTPBearer: []+ parameters:+ - name: q+ in: query+ required: false+ schema:+ anyOf:+ - type: string+ - type: 'null'+ title: Q+ - name: managed_only+ in: query+ required: false+ schema:+ type: boolean+ default: false+ title: Managed Only+ - name: limit+ in: query+ required: false+ schema:+ type: integer+ default: 200+ title: Limit+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/TenantListResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/realtime/ticket:+ post:+ tags:+ - realtime+ summary: Mint Realtime Ticket+ description: 'Mint a short-lived ticket for the realtime WS/SSE edge.+++ Requires a valid session (``get_current_user`` 401s otherwise). The ticket''s++ tenant is bound server-side from the authenticated user — the client cannot++ request a tenant.'+ operationId: mint_realtime_ticket_api_v1_realtime_ticket_post+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/RealtimeTicket'+ security:+ - HTTPBearer: []+ /api/v1/ai-assets:+ get:+ tags:+ - ai-estate+ summary: List Ai Assets+ description: The estate, newest sighting first.+ operationId: list_ai_assets_api_v1_ai_assets_get+ security:+ - HTTPBearer: []+ parameters:+ - name: kind+ in: query+ required: false+ schema:+ anyOf:+ - type: string+ - type: 'null'+ description: Filter to one asset kind.+ title: Kind+ description: Filter to one asset kind.+ - name: unlinked+ in: query+ required: false+ schema:+ type: boolean+ description: Only assets with no person linked.+ default: false+ title: Unlinked+ description: Only assets with no person linked.+ - name: limit+ in: query+ required: false+ schema:+ type: integer+ maximum: 200+ minimum: 1+ default: 50+ title: Limit+ - name: offset+ in: query+ required: false+ schema:+ type: integer+ minimum: 0+ default: 0+ title: Offset+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/AiAssetListResponse'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/ai-assets/{asset_id}:+ get:+ tags:+ - ai-estate+ summary: Get Ai Asset+ operationId: get_ai_asset_api_v1_ai_assets__asset_id__get+ security:+ - HTTPBearer: []+ parameters:+ - name: asset_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: Asset Id+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/AiAssetModel'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/ai-assets/{asset_id}/sanction:+ post:+ tags:+ - ai-estate+ summary: Sanction Ai Asset+ description: 'Approve an asset, refuse it, or put it back to undecided.+++ The risk score is recomputed here rather than left stale, through the++ same `score_risk` the recorder calls, because the sanction decision is++ one of its inputs: an asset that has just been refused and is still++ running is a different exposure from one nobody had looked at.'+ operationId: sanction_ai_asset_api_v1_ai_assets__asset_id__sanction_post+ security:+ - HTTPBearer: []+ parameters:+ - name: asset_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: Asset Id+ requestBody:+ required: true+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/SanctionRequest'+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/AiAssetModel'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/war-rooms/cases/{case_id}:+ post:+ tags:+ - war-rooms+ summary: Open For Case+ description: 'One action: create the channel, invite, post the header, record+ it.+++ Fails loudly. The analyst pressed a button and is entitled to know when++ it did not work — a 202 "we''ll try" here would be the toast-only control++ this console is not allowed to ship.'+ operationId: open_for_case_api_v1_war_rooms_cases__case_id__post+ security:+ - HTTPBearer: []+ parameters:+ - name: case_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: Case Id+ requestBody:+ required: true+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/OpenWarRoomRequest'+ responses:+ '201':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/WarRoomModel'+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ get:+ tags:+ - war-rooms+ summary: List For Case+ operationId: list_for_case_api_v1_war_rooms_cases__case_id__get+ security:+ - HTTPBearer: []+ parameters:+ - name: case_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: Case Id+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ type: array+ items:+ $ref: '#/components/schemas/WarRoomModel'+ title: Response List For Case Api V1 War Rooms Cases Case Id Get+ '422':+ description: Validation Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/HTTPValidationError'+ /api/v1/war-rooms/{war_room_id}/sync:+ post:+ tags:+ - war-rooms+ summary: Sync+ operationId: sync_api_v1_war_rooms__war_room_id__sync_post+ security:+ - HTTPBearer: []+ parameters:+ - name: war_room_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: War Room Id+ responses:+ '200':+ description: Successful Response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/SyncResult''422':description: Validation Errorcontent:application/json:schema:$ref: '#/components/schemas/HTTPValidationError'- /api/v1/admin/tenants/provision:+ /api/v1/war-rooms/{war_room_id}/close:post:tags:- - admin- - tenants- summary: Promote a waitlist entry into a live managed tenant.- description: 'Provision a new tenant from a waitlist entry.--- Idempotent on the waitlist entry id: a repeat call for an+ - war-rooms+ summary: Close+ description: 'Stop mirroring. The channel itself is left alone, deliberately.- already-provisioned entry returns the existing tenant + a fresh- invite link (the demo seed is *not* re-run). This keeps the+ Archiving somebody''s channel from a console button is a bigger action- support team from creating duplicate tenants if they click the+ than it looks: the transcript is often the incident''s own record and the- button twice on a flaky network.'- operationId: provision_tenant_api_v1_admin_tenants_provision_post- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/TenantProvisionRequest'+ people in it did not press anything.'+ operationId: close_api_v1_war_rooms__war_room_id__close_post+ security:+ - HTTPBearer: []+ parameters:+ - name: war_room_id+ in: pathrequired: true+ schema:+ type: string+ format: uuid+ title: War Room Idresponses:- '201':+ '200':description: Successful Responsecontent:application/json:schema:- $ref: '#/components/schemas/TenantProvisionResponse'+ $ref: '#/components/schemas/WarRoomModel''422':description: Validation Errorcontent:application/json:schema:$ref: '#/components/schemas/HTTPValidationError'- security:- - HTTPBearer: []- /api/v1/admin/tenants:- get:+ /api/v1/war-rooms/{war_room_id}/decision:+ post:tags:- - admin- - tenants- summary: List tenants for the support team.- description: Read-only tenant list, sorted by creation time descending.- operationId: list_tenants_api_v1_admin_tenants_get- security:- - HTTPBearer: []+ - war-rooms+ summary: Channel Decision+ description: 'A decision taken in the channel, delivered by the bot.+++ Service-token only. See the module header: the bot has verified the++ vendor''s signature and this service cannot, so the token is the whole++ trust relationship and ``CHANNEL_DECISIONS`` is its blast radius.'+ operationId: channel_decision_api_v1_war_rooms__war_room_id__decision_postparameters:- - name: q- in: query+ - name: war_room_id+ in: path+ required: true+ schema:+ type: string+ format: uuid+ title: War Room Id+ - name: X-AiSOC-Service-Token+ in: headerrequired: falseschema:anyOf:- type: string- type: 'null'- title: Q- - name: managed_only- in: query- required: false- schema:- type: boolean- default: false- title: Managed Only- - name: limit- in: query- required: false- schema:- type: integer- default: 200- title: Limit+ title: X-Aisoc-Service-Token+ requestBody:+ required: true+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ChannelDecisionRequest'responses:'200':description: Successful Responsecontent:application/json:schema:- $ref: '#/components/schemas/TenantListResponse'+ type: object+ additionalProperties: true+ title: Response Channel Decision Api V1 War Rooms War Room Id Decision+ Post'422':description: Validation Errorcontent:application/json:schema:$ref: '#/components/schemas/HTTPValidationError'- /api/v1/realtime/ticket:- post:- tags:- - realtime- summary: Mint Realtime Ticket- description: 'Mint a short-lived ticket for the realtime WS/SSE edge.--- Requires a valid session (``get_current_user`` 401s otherwise). The ticket''s-- tenant is bound server-side from the authenticated user — the client cannot-- request a tenant.'- operationId: mint_realtime_ticket_api_v1_realtime_ticket_post- responses:- '200':- description: Successful Response- content:- application/json:- schema:- $ref: '#/components/schemas/RealtimeTicket'- security:- - HTTPBearer: []/auth/saml/login:get:tags:@@ -31207,6 +31725,184 @@ components:- typetitle: LakeColumnInfodescription: One column within a lake table.+ LakeEstimateRequest:+ properties:+ sql:+ type: string+ maxLength: 200000+ minLength: 1+ title: Sql+ row_cap:+ anyOf:+ - type: integer+ maximum: 100000.0+ minimum: 1.0+ - type: 'null'+ title: Row Cap+ type: object+ required:+ - sql+ title: LakeEstimateRequest+ description: Ask what a query would read, without running it.+ LakeEstimateResponse:+ properties:+ estimated_rows:+ type: integer+ title: Estimated Rows+ estimated_parts:+ type: integer+ title: Estimated Parts+ estimated_bytes:+ type: integer+ title: Estimated Bytes+ cold_bytes:+ type: integer+ title: Cold Bytes+ warm_bytes:+ type: integer+ title: Warm Bytes+ touches_cold:+ type: boolean+ title: Touches Cold+ tables:+ items:+ type: string+ type: array+ title: Tables+ estimated_usd:+ anyOf:+ - type: number+ - type: 'null'+ title: Estimated Usd+ cost_basis:+ type: string+ title: Cost Basis+ type: object+ required:+ - estimated_rows+ - estimated_parts+ - estimated_bytes+ - cold_bytes+ - warm_bytes+ - touches_cold+ - tables+ - estimated_usd+ - cost_basis+ title: LakeEstimateResponse+ LakeQueryJobRequest:+ properties:+ sql:+ type: string+ maxLength: 200000+ minLength: 1+ title: Sql+ row_cap:+ anyOf:+ - type: integer+ maximum: 100000.0+ minimum: 1.0+ - type: 'null'+ title: Row Cap+ type: object+ required:+ - sql+ title: LakeQueryJobRequest+ LakeQueryJobResponse:+ properties:+ id:+ type: string+ format: uuid+ title: Id+ status:+ type: string+ title: Status+ referenced_tables:+ items:+ type: string+ type: array+ title: Referenced Tables+ row_cap:+ type: integer+ title: Row Cap+ estimate:+ additionalProperties: true+ type: object+ title: Estimate+ rows_read:+ type: integer+ title: Rows Read+ bytes_read:+ type: integer+ title: Bytes Read+ total_rows_approx:+ type: integer+ title: Total Rows Approx+ progress_ratio:+ anyOf:+ - type: number+ - type: 'null'+ title: Progress Ratio+ columns:+ anyOf:+ - items:+ type: string+ type: array+ - type: 'null'+ title: Columns+ rows:+ anyOf:+ - items:+ items: {}+ type: array+ type: array+ - type: 'null'+ title: Rows+ row_count:+ anyOf:+ - type: integer+ - type: 'null'+ title: Row Count+ error:+ anyOf:+ - type: string+ - type: 'null'+ title: Error+ created_at:+ type: string+ format: date-time+ title: Created At+ started_at:+ anyOf:+ - type: string+ format: date-time+ - type: 'null'+ title: Started At+ finished_at:+ anyOf:+ - type: string+ format: date-time+ - type: 'null'+ title: Finished At+ type: object+ required:+ - id+ - status+ - referenced_tables+ - row_cap+ - estimate+ - rows_read+ - bytes_read+ - total_rows_approx+ - progress_ratio+ - columns+ - rows+ - row_count+ - error+ - created_at+ - started_at+ - finished_at+ title: LakeQueryJobResponse+ description: A job's state. The fields a console needs to show progress honestly.LakeQueryRequest:properties:sql:@@ -31237,6 +31933,16 @@ components:title: Timeout Secondsdescription: Optional wall-clock cap. Defaults to the server cap (30s).Useful for agent loops that need to fail fast.+ force_sync:+ type: boolean+ title: Force Sync+ description: 'Run synchronously even when the estimate says the query must+ read the cold volume. Off by default: the synchronous path is bounded+ by the 30-second default and 60-second maximum above, and a cold read+ that does not fit inside them used to come back as a bare timeout with+ no indication of how much data was involved. Set this only when you already+ know the scan is small.'+ default: falsetype: objectrequired:- sqldiff --git a/schemas/graph-schema.yaml b/schemas/graph-schema.yamlindex e8fc99c6e..319384cf4 100644--- a/schemas/graph-schema.yaml+++ b/schemas/graph-schema.yaml@@ -775,6 +775,11 @@ relationships:description: >-"What else did this principal do", without scanning every event theprincipal ever produced.+ properties:+ - { name: ts, type: datetime, required: true }+ - { name: source_event_id, type: string, required: true }+ - { name: snapshot_id, type: string, required: true }+# ── v1.3: the AI estate ────────────────────────────────────────────────────# Two new types rather than a second pair of endpoints on OWNED_BY and# RUNS: each relationship here declares one source label and one target@@ -814,6 +819,11 @@ relationships:target_label: Alertevent_edge: truedescription: What the session is accused of.+ properties:+ - { name: ts, type: datetime, required: true }+ - { name: source_event_id, type: string, required: true }+ - { name: snapshot_id, type: string, required: true }+- name: HOSTSsource_label: Endpointtarget_label: AIAssetdiff --git a/scripts/check_deployment_completeness.py b/scripts/check_deployment_completeness.pyindex 0216f90cd..a0c479f36 100644--- a/scripts/check_deployment_completeness.py+++ b/scripts/check_deployment_completeness.py@@ -84,6 +84,12 @@ COMPOSE_EXEMPT: dict[str, str] = {"kafka-topics": "a one-shot topic-creation Job","core-api": "an optional second API surface with its own template and values block","kafka": "the chart ships its own StatefulSet; compose runs the Confluent image",+ "mcp": (+ "an opt-in surface on both sides: compose gates it behind `profiles: [mcp]` and the "+ "chart ships it `enabled: false` with an empty image repository the template `required`s "+ "— depth 9.1 (#1304) added both halves before 4.5's gate (#1326) existed, and the two "+ "merged in one train"+ ),}#: The compose service each chart component corresponds to where the twodiff --git a/services/api/app/api/v1/router.py b/services/api/app/api/v1/router.pyindex 41eea6eab..c2f9384bb 100644--- a/services/api/app/api/v1/router.py+++ b/services/api/app/api/v1/router.py@@ -7,6 +7,7 @@ from app.api.v1.endpoints import (admin_users,agent_tools,agents,+ ai_assets,airgap,alert_explain,alert_writeback,@@ -102,6 +103,7 @@ from app.api.v1.endpoints import (usage,verification_policies,waitlist,+ war_rooms,workload_identities,)@@ -436,3 +438,17 @@ api_router.include_router(graph_ws.router)# upgrade and SSE request, deriving the tenant from the verified claim so the# fan-out edge is no longer unauthenticated.api_router.include_router(realtime.router)++# Observed AI estate — depth 6.1. /ai-assets reads the inventory the fusion+# recorder writes from the raw-events branch (routes behind ai_estate:read /+# ai_estate:write; deliberately no create route — an inventory a human can+# type into stops answering "what is running that nobody told us about").+# The module shipped in #1303 with no include site, so its three routes were+# unreachable on that branch; mounted here by the merge train.+api_router.include_router(ai_assets.router)++# Case war rooms — depth 9.4. One action opens a Slack channel for a case,+# invites the assignees and mirrors the timeline; the sweep worker is started+# in main.py. Same story as ai_assets: #1315 shipped the module with no+# include site, so POST /war-rooms/cases/{id} was unreachable until here.+api_router.include_router(war_rooms.router)diff --git a/services/fusion/app/workers/consumer.py b/services/fusion/app/workers/consumer.pyindex 7aa40b72c..c75cdebc9 100644--- a/services/fusion/app/workers/consumer.py+++ b/services/fusion/app/workers/consumer.py@@ -24,8 +24,8 @@ from app.services.event_schema import validate_eventfrom app.services.fusion_engine import FusionEnginefrom app.services.lake_writer import LakeWriterfrom app.services.promoter import promote_normalized_event-from app.services.sessions import DERIVED_IDLE_SECONDS, SessionRef, SessionStorefrom app.services.scale_hint import compute as compute_scale_hint+from app.services.sessions import DERIVED_IDLE_SECONDS, SessionRef, SessionStorefrom app.services.tenant_overlay import OverlayCachefrom app.services.ueba_signal import UebaSignalCachefrom app.services.windowed_detection import WindowedDetectionEnginediff --git a/services/fusion/tests/test_threat_anomaly_replay.py b/services/fusion/tests/test_threat_anomaly_replay.pyindex a0c5124c5..9f44b1c7f 100644--- a/services/fusion/tests/test_threat_anomaly_replay.py+++ b/services/fusion/tests/test_threat_anomaly_replay.py@@ -180,9 +180,7 @@ def test_the_threat_half_alone_does_not_fire(rule: dict[str, Any]) -> None:for field in _fields_of(rule["match_when"]) & DERIVED_FIELDS:event.pop(field, None)hits = engine.evaluate(_msg(event, product))- assert all(h.rule_id != rule["id"] for h in hits), (- f"{rule['slug']} fires without its baseline — the anomaly clause is decorative"- )+ assert all(h.rule_id != rule["id"] for h in hits), f"{rule['slug']} fires without its baseline — the anomaly clause is decorative"@pytest.mark.asyncio@@ -203,6 +201,7 @@ async def test_core_fires_one_end_to_end_with_no_full_service() -> None:rarity is *earned from the traffic*, not asserted."""from app.services.baselines import BaselineStore # noqa: PLC0415+from tests.test_baselines import _FakeRedis # noqa: PLC0415rule = next(r for r in FAMILY if r["slug"] == "ta-aws-access-key-created-from-rare-client")