Label Epiphany state update notifications
This commit is contained in:
parent
cabad31b5e
commit
4c770e98dd
17 changed files with 100 additions and 22 deletions
11
vendor/codex/codex-rs/app-server-protocol/schema/json/ServerNotification.json
generated
vendored
11
vendor/codex/codex-rs/app-server-protocol/schema/json/ServerNotification.json
generated
vendored
|
|
@ -3717,16 +3717,27 @@
|
|||
"epiphanyState": {
|
||||
"$ref": "#/definitions/EpiphanyThreadState"
|
||||
},
|
||||
"source": {
|
||||
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"epiphanyState",
|
||||
"source",
|
||||
"threadId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadEpiphanyStateUpdatedSource": {
|
||||
"enum": [
|
||||
"update",
|
||||
"promote"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadId": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14972,17 +14972,28 @@
|
|||
"epiphanyState": {
|
||||
"$ref": "#/definitions/v2/EpiphanyThreadState"
|
||||
},
|
||||
"source": {
|
||||
"$ref": "#/definitions/v2/ThreadEpiphanyStateUpdatedSource"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"epiphanyState",
|
||||
"source",
|
||||
"threadId"
|
||||
],
|
||||
"title": "ThreadEpiphanyStateUpdatedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadEpiphanyStateUpdatedSource": {
|
||||
"enum": [
|
||||
"update",
|
||||
"promote"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadEpiphanyUpdatePatch": {
|
||||
"properties": {
|
||||
"activeSubgoalId": {
|
||||
|
|
|
|||
|
|
@ -12859,17 +12859,28 @@
|
|||
"epiphanyState": {
|
||||
"$ref": "#/definitions/EpiphanyThreadState"
|
||||
},
|
||||
"source": {
|
||||
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"epiphanyState",
|
||||
"source",
|
||||
"threadId"
|
||||
],
|
||||
"title": "ThreadEpiphanyStateUpdatedNotification",
|
||||
"type": "object"
|
||||
},
|
||||
"ThreadEpiphanyStateUpdatedSource": {
|
||||
"enum": [
|
||||
"update",
|
||||
"promote"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadEpiphanyUpdatePatch": {
|
||||
"properties": {
|
||||
"activeSubgoalId": {
|
||||
|
|
|
|||
|
|
@ -704,18 +704,29 @@
|
|||
"default"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ThreadEpiphanyStateUpdatedSource": {
|
||||
"enum": [
|
||||
"update",
|
||||
"promote"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"epiphanyState": {
|
||||
"$ref": "#/definitions/EpiphanyThreadState"
|
||||
},
|
||||
"source": {
|
||||
"$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"epiphanyState",
|
||||
"source",
|
||||
"threadId"
|
||||
],
|
||||
"title": "ThreadEpiphanyStateUpdatedNotification",
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
|
||||
// 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 { ThreadEpiphanyStateUpdatedSource } from "./ThreadEpiphanyStateUpdatedSource";
|
||||
|
||||
export type ThreadEpiphanyStateUpdatedNotification = { threadId: string, epiphanyState: EpiphanyThreadState, };
|
||||
export type ThreadEpiphanyStateUpdatedNotification = { threadId: string, source: ThreadEpiphanyStateUpdatedSource, epiphanyState: EpiphanyThreadState, };
|
||||
|
|
|
|||
5
vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedSource.ts
generated
vendored
Normal file
5
vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedSource.ts
generated
vendored
Normal 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 ThreadEpiphanyStateUpdatedSource = "update" | "promote";
|
||||
1
vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts
generated
vendored
1
vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts
generated
vendored
|
|
@ -322,6 +322,7 @@ export type { ThreadEpiphanyRetrieveResult } from "./ThreadEpiphanyRetrieveResul
|
|||
export type { ThreadEpiphanyRetrieveResultKind } from "./ThreadEpiphanyRetrieveResultKind";
|
||||
export type { ThreadEpiphanyRetrieveShardSummary } from "./ThreadEpiphanyRetrieveShardSummary";
|
||||
export type { ThreadEpiphanyStateUpdatedNotification } from "./ThreadEpiphanyStateUpdatedNotification";
|
||||
export type { ThreadEpiphanyStateUpdatedSource } from "./ThreadEpiphanyStateUpdatedSource";
|
||||
export type { ThreadEpiphanyUpdatePatch } from "./ThreadEpiphanyUpdatePatch";
|
||||
export type { ThreadForkParams } from "./ThreadForkParams";
|
||||
export type { ThreadForkResponse } from "./ThreadForkResponse";
|
||||
|
|
|
|||
|
|
@ -1888,6 +1888,7 @@ mod tests {
|
|||
let notification = ServerNotification::ThreadEpiphanyStateUpdated(
|
||||
v2::ThreadEpiphanyStateUpdatedNotification {
|
||||
thread_id: "thr_123".to_string(),
|
||||
source: v2::ThreadEpiphanyStateUpdatedSource::Update,
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
revision: 7,
|
||||
objective: Some("Keep the map live".to_string()),
|
||||
|
|
@ -1900,6 +1901,7 @@ mod tests {
|
|||
"method": "thread/epiphany/stateUpdated",
|
||||
"params": {
|
||||
"threadId": "thr_123",
|
||||
"source": "update",
|
||||
"epiphanyState": {
|
||||
"revision": 7,
|
||||
"objective": "Keep the map live"
|
||||
|
|
@ -2512,6 +2514,7 @@ mod tests {
|
|||
let notification = ServerNotification::ThreadEpiphanyStateUpdated(
|
||||
v2::ThreadEpiphanyStateUpdatedNotification {
|
||||
thread_id: "thr_123".to_string(),
|
||||
source: v2::ThreadEpiphanyStateUpdatedSource::Promote,
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState::default(),
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4058,9 +4058,18 @@ pub struct ThreadEpiphanyUpdateResponse {
|
|||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadEpiphanyStateUpdatedNotification {
|
||||
pub thread_id: String,
|
||||
pub source: ThreadEpiphanyStateUpdatedSource,
|
||||
pub epiphany_state: CoreEpiphanyThreadState,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub enum ThreadEpiphanyStateUpdatedSource {
|
||||
Update,
|
||||
Promote,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
|
|
|
|||
Reference in a new issue