Harden Epiphany state update notifications

This commit is contained in:
Meta Vens 2026-04-25 06:29:45 +01:00
commit 366354d359
16 changed files with 286 additions and 32 deletions

View file

@ -3712,11 +3712,39 @@
],
"type": "object"
},
"ThreadEpiphanyStateUpdatedField": {
"enum": [
"objective",
"activeSubgoalId",
"subgoals",
"invariants",
"graphs",
"graphFrontier",
"graphCheckpoint",
"scratch",
"observations",
"evidence",
"churn",
"mode"
],
"type": "string"
},
"ThreadEpiphanyStateUpdatedNotification": {
"properties": {
"changedFields": {
"items": {
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedField"
},
"type": "array"
},
"epiphanyState": {
"$ref": "#/definitions/EpiphanyThreadState"
},
"revision": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"source": {
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource"
},
@ -3725,7 +3753,9 @@
}
},
"required": [
"changedFields",
"epiphanyState",
"revision",
"source",
"threadId"
],

View file

@ -14966,12 +14966,40 @@
],
"type": "object"
},
"ThreadEpiphanyStateUpdatedField": {
"enum": [
"objective",
"activeSubgoalId",
"subgoals",
"invariants",
"graphs",
"graphFrontier",
"graphCheckpoint",
"scratch",
"observations",
"evidence",
"churn",
"mode"
],
"type": "string"
},
"ThreadEpiphanyStateUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"changedFields": {
"items": {
"$ref": "#/definitions/v2/ThreadEpiphanyStateUpdatedField"
},
"type": "array"
},
"epiphanyState": {
"$ref": "#/definitions/v2/EpiphanyThreadState"
},
"revision": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"source": {
"$ref": "#/definitions/v2/ThreadEpiphanyStateUpdatedSource"
},
@ -14980,7 +15008,9 @@
}
},
"required": [
"changedFields",
"epiphanyState",
"revision",
"source",
"threadId"
],

View file

@ -12853,12 +12853,40 @@
],
"type": "object"
},
"ThreadEpiphanyStateUpdatedField": {
"enum": [
"objective",
"activeSubgoalId",
"subgoals",
"invariants",
"graphs",
"graphFrontier",
"graphCheckpoint",
"scratch",
"observations",
"evidence",
"churn",
"mode"
],
"type": "string"
},
"ThreadEpiphanyStateUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"changedFields": {
"items": {
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedField"
},
"type": "array"
},
"epiphanyState": {
"$ref": "#/definitions/EpiphanyThreadState"
},
"revision": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"source": {
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource"
},
@ -12867,7 +12895,9 @@
}
},
"required": [
"changedFields",
"epiphanyState",
"revision",
"source",
"threadId"
],

View file

@ -705,6 +705,23 @@
],
"type": "string"
},
"ThreadEpiphanyStateUpdatedField": {
"enum": [
"objective",
"activeSubgoalId",
"subgoals",
"invariants",
"graphs",
"graphFrontier",
"graphCheckpoint",
"scratch",
"observations",
"evidence",
"churn",
"mode"
],
"type": "string"
},
"ThreadEpiphanyStateUpdatedSource": {
"enum": [
"update",
@ -714,9 +731,20 @@
}
},
"properties": {
"changedFields": {
"items": {
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedField"
},
"type": "array"
},
"epiphanyState": {
"$ref": "#/definitions/EpiphanyThreadState"
},
"revision": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"source": {
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource"
},
@ -725,7 +753,9 @@
}
},
"required": [
"changedFields",
"epiphanyState",
"revision",
"source",
"threadId"
],

View file

@ -0,0 +1,5 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ThreadEpiphanyStateUpdatedField = "objective" | "activeSubgoalId" | "subgoals" | "invariants" | "graphs" | "graphFrontier" | "graphCheckpoint" | "scratch" | "observations" | "evidence" | "churn" | "mode";

View file

@ -2,6 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EpiphanyThreadState } from "../EpiphanyThreadState";
import type { ThreadEpiphanyStateUpdatedField } from "./ThreadEpiphanyStateUpdatedField";
import type { ThreadEpiphanyStateUpdatedSource } from "./ThreadEpiphanyStateUpdatedSource";
export type ThreadEpiphanyStateUpdatedNotification = { threadId: string, source: ThreadEpiphanyStateUpdatedSource, epiphanyState: EpiphanyThreadState, };
export type ThreadEpiphanyStateUpdatedNotification = { threadId: string, source: ThreadEpiphanyStateUpdatedSource, revision: bigint, changedFields: Array<ThreadEpiphanyStateUpdatedField>, epiphanyState: EpiphanyThreadState, };

View file

@ -321,6 +321,7 @@ export type { ThreadEpiphanyRetrieveIndexSummary } from "./ThreadEpiphanyRetriev
export type { ThreadEpiphanyRetrieveResult } from "./ThreadEpiphanyRetrieveResult";
export type { ThreadEpiphanyRetrieveResultKind } from "./ThreadEpiphanyRetrieveResultKind";
export type { ThreadEpiphanyRetrieveShardSummary } from "./ThreadEpiphanyRetrieveShardSummary";
export type { ThreadEpiphanyStateUpdatedField } from "./ThreadEpiphanyStateUpdatedField";
export type { ThreadEpiphanyStateUpdatedNotification } from "./ThreadEpiphanyStateUpdatedNotification";
export type { ThreadEpiphanyStateUpdatedSource } from "./ThreadEpiphanyStateUpdatedSource";
export type { ThreadEpiphanyUpdatePatch } from "./ThreadEpiphanyUpdatePatch";