From 639c94a37543d610f11adc2816293b000b557d12 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Mon, 22 Jun 2026 12:22:43 +0000 Subject: [PATCH] chore: generate --- packages/sdk/js/src/v2/gen/types.gen.ts | 172 +- packages/sdk/openapi.json | 5213 ++++++++++++++++++++++- packages/tui/src/context/data.tsx | 43 +- 3 files changed, 5284 insertions(+), 144 deletions(-) diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index abb9668f6..b2900e8d6 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -4269,13 +4269,13 @@ export type V2EventModelsDevRefreshed = { metadata?: { [key: string]: unknown } - type: "models-dev.refreshed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "models-dev.refreshed" data: { [key: string]: unknown } @@ -4286,13 +4286,13 @@ export type V2EventIntegrationUpdated = { metadata?: { [key: string]: unknown } - type: "integration.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "integration.updated" data: { [key: string]: unknown } @@ -4303,13 +4303,13 @@ export type V2EventCatalogUpdated = { metadata?: { [key: string]: unknown } - type: "catalog.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "catalog.updated" data: { [key: string]: unknown } @@ -4320,13 +4320,13 @@ export type V2EventSessionCreated = { metadata?: { [key: string]: unknown } - type: "session.created" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.created" data: { sessionID: string info: Session @@ -4338,13 +4338,13 @@ export type V2EventSessionUpdated = { metadata?: { [key: string]: unknown } - type: "session.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.updated" data: { sessionID: string info: Session @@ -4356,13 +4356,13 @@ export type V2EventSessionDeleted = { metadata?: { [key: string]: unknown } - type: "session.deleted" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.deleted" data: { sessionID: string info: Session @@ -4374,13 +4374,13 @@ export type V2EventMessageUpdated = { metadata?: { [key: string]: unknown } - type: "message.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "message.updated" data: { sessionID: string info: Message @@ -4392,13 +4392,13 @@ export type V2EventMessageRemoved = { metadata?: { [key: string]: unknown } - type: "message.removed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "message.removed" data: { sessionID: string messageID: string @@ -4410,13 +4410,13 @@ export type V2EventMessagePartUpdated = { metadata?: { [key: string]: unknown } - type: "message.part.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "message.part.updated" data: { sessionID: string part: Part @@ -4429,13 +4429,13 @@ export type V2EventMessagePartRemoved = { metadata?: { [key: string]: unknown } - type: "message.part.removed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "message.part.removed" data: { sessionID: string messageID: string @@ -4448,13 +4448,13 @@ export type V2EventSessionNextAgentSwitched = { metadata?: { [key: string]: unknown } - type: "session.next.agent.switched" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.agent.switched" data: { timestamp: number sessionID: string @@ -4468,13 +4468,13 @@ export type V2EventSessionNextModelSwitched = { metadata?: { [key: string]: unknown } - type: "session.next.model.switched" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.model.switched" data: { timestamp: number sessionID: string @@ -4492,13 +4492,13 @@ export type V2EventSessionNextMoved = { metadata?: { [key: string]: unknown } - type: "session.next.moved" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.moved" data: { timestamp: number sessionID: string @@ -4512,13 +4512,13 @@ export type V2EventSessionNextPrompted = { metadata?: { [key: string]: unknown } - type: "session.next.prompted" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.prompted" data: { timestamp: number sessionID: string @@ -4533,13 +4533,13 @@ export type V2EventSessionNextPromptAdmitted = { metadata?: { [key: string]: unknown } - type: "session.next.prompt.admitted" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.prompt.admitted" data: { timestamp: number sessionID: string @@ -4554,13 +4554,13 @@ export type V2EventSessionNextPromptPromoted = { metadata?: { [key: string]: unknown } - type: "session.next.prompt.promoted" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.prompt.promoted" data: { timestamp: number sessionID: string @@ -4575,13 +4575,13 @@ export type V2EventSessionNextInterruptRequested = { metadata?: { [key: string]: unknown } - type: "session.next.interrupt.requested" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.interrupt.requested" data: { timestamp: number sessionID: string @@ -4593,13 +4593,13 @@ export type V2EventSessionNextContextUpdated = { metadata?: { [key: string]: unknown } - type: "session.next.context.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.context.updated" data: { timestamp: number sessionID: string @@ -4613,13 +4613,13 @@ export type V2EventSessionNextSynthetic = { metadata?: { [key: string]: unknown } - type: "session.next.synthetic" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.synthetic" data: { timestamp: number sessionID: string @@ -4633,13 +4633,13 @@ export type V2EventSessionNextShellStarted = { metadata?: { [key: string]: unknown } - type: "session.next.shell.started" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.shell.started" data: { timestamp: number sessionID: string @@ -4654,13 +4654,13 @@ export type V2EventSessionNextShellEnded = { metadata?: { [key: string]: unknown } - type: "session.next.shell.ended" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.shell.ended" data: { timestamp: number sessionID: string @@ -4674,13 +4674,13 @@ export type V2EventSessionNextStepStarted = { metadata?: { [key: string]: unknown } - type: "session.next.step.started" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.step.started" data: { timestamp: number sessionID: string @@ -4700,13 +4700,13 @@ export type V2EventSessionNextStepEnded = { metadata?: { [key: string]: unknown } - type: "session.next.step.ended" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.step.ended" data: { timestamp: number sessionID: string @@ -4731,13 +4731,13 @@ export type V2EventSessionNextStepFailed = { metadata?: { [key: string]: unknown } - type: "session.next.step.failed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.step.failed" data: { timestamp: number sessionID: string @@ -4751,13 +4751,13 @@ export type V2EventSessionNextTextStarted = { metadata?: { [key: string]: unknown } - type: "session.next.text.started" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.text.started" data: { timestamp: number sessionID: string @@ -4771,13 +4771,13 @@ export type V2EventSessionNextTextDelta = { metadata?: { [key: string]: unknown } - type: "session.next.text.delta" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.text.delta" data: { timestamp: number sessionID: string @@ -4792,13 +4792,13 @@ export type V2EventSessionNextTextEnded = { metadata?: { [key: string]: unknown } - type: "session.next.text.ended" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.text.ended" data: { timestamp: number sessionID: string @@ -4813,13 +4813,13 @@ export type V2EventSessionNextReasoningStarted = { metadata?: { [key: string]: unknown } - type: "session.next.reasoning.started" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.reasoning.started" data: { timestamp: number sessionID: string @@ -4838,13 +4838,13 @@ export type V2EventSessionNextReasoningDelta = { metadata?: { [key: string]: unknown } - type: "session.next.reasoning.delta" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.reasoning.delta" data: { timestamp: number sessionID: string @@ -4859,13 +4859,13 @@ export type V2EventSessionNextReasoningEnded = { metadata?: { [key: string]: unknown } - type: "session.next.reasoning.ended" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.reasoning.ended" data: { timestamp: number sessionID: string @@ -4885,13 +4885,13 @@ export type V2EventSessionNextToolInputStarted = { metadata?: { [key: string]: unknown } - type: "session.next.tool.input.started" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.tool.input.started" data: { timestamp: number sessionID: string @@ -4906,13 +4906,13 @@ export type V2EventSessionNextToolInputDelta = { metadata?: { [key: string]: unknown } - type: "session.next.tool.input.delta" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.tool.input.delta" data: { timestamp: number sessionID: string @@ -4927,13 +4927,13 @@ export type V2EventSessionNextToolInputEnded = { metadata?: { [key: string]: unknown } - type: "session.next.tool.input.ended" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.tool.input.ended" data: { timestamp: number sessionID: string @@ -4948,13 +4948,13 @@ export type V2EventSessionNextToolCalled = { metadata?: { [key: string]: unknown } - type: "session.next.tool.called" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.tool.called" data: { timestamp: number sessionID: string @@ -4980,13 +4980,13 @@ export type V2EventSessionNextToolProgress = { metadata?: { [key: string]: unknown } - type: "session.next.tool.progress" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.tool.progress" data: { timestamp: number sessionID: string @@ -5004,13 +5004,13 @@ export type V2EventSessionNextToolSuccess = { metadata?: { [key: string]: unknown } - type: "session.next.tool.success" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.tool.success" data: { timestamp: number sessionID: string @@ -5038,13 +5038,13 @@ export type V2EventSessionNextToolFailed = { metadata?: { [key: string]: unknown } - type: "session.next.tool.failed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.tool.failed" data: { timestamp: number sessionID: string @@ -5068,13 +5068,13 @@ export type V2EventSessionNextRetried = { metadata?: { [key: string]: unknown } - type: "session.next.retried" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.retried" data: { timestamp: number sessionID: string @@ -5088,13 +5088,13 @@ export type V2EventSessionNextCompactionStarted = { metadata?: { [key: string]: unknown } - type: "session.next.compaction.started" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.compaction.started" data: { timestamp: number sessionID: string @@ -5108,13 +5108,13 @@ export type V2EventSessionNextCompactionDelta = { metadata?: { [key: string]: unknown } - type: "session.next.compaction.delta" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.compaction.delta" data: { timestamp: number sessionID: string @@ -5128,13 +5128,13 @@ export type V2EventSessionNextCompactionEnded = { metadata?: { [key: string]: unknown } - type: "session.next.compaction.ended" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.next.compaction.ended" data: { timestamp: number sessionID: string @@ -5150,13 +5150,13 @@ export type V2EventMessagePartDelta = { metadata?: { [key: string]: unknown } - type: "message.part.delta" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "message.part.delta" data: { sessionID: string messageID: string @@ -5171,13 +5171,13 @@ export type V2EventSessionDiff = { metadata?: { [key: string]: unknown } - type: "session.diff" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.diff" data: { sessionID: string diff: Array @@ -5189,13 +5189,13 @@ export type V2EventSessionError = { metadata?: { [key: string]: unknown } - type: "session.error" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.error" data: { sessionID?: string error?: @@ -5215,13 +5215,13 @@ export type V2EventInstallationUpdated = { metadata?: { [key: string]: unknown } - type: "installation.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "installation.updated" data: { version: string } @@ -5232,13 +5232,13 @@ export type V2EventInstallationUpdateAvailable = { metadata?: { [key: string]: unknown } - type: "installation.update-available" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "installation.update-available" data: { version: string } @@ -5249,13 +5249,13 @@ export type V2EventFileEdited = { metadata?: { [key: string]: unknown } - type: "file.edited" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "file.edited" data: { file: string } @@ -5266,13 +5266,13 @@ export type V2EventPluginAdded = { metadata?: { [key: string]: unknown } - type: "plugin.added" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "plugin.added" data: { id: string } @@ -5283,13 +5283,13 @@ export type V2EventPermissionV2Asked = { metadata?: { [key: string]: unknown } - type: "permission.v2.asked" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "permission.v2.asked" data: { id: string sessionID: string @@ -5308,13 +5308,13 @@ export type V2EventPermissionV2Replied = { metadata?: { [key: string]: unknown } - type: "permission.v2.replied" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "permission.v2.replied" data: { sessionID: string requestID: string @@ -5327,13 +5327,13 @@ export type V2EventReferenceUpdated = { metadata?: { [key: string]: unknown } - type: "reference.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "reference.updated" data: { [key: string]: unknown } @@ -5344,13 +5344,13 @@ export type V2EventProjectDirectoriesUpdated = { metadata?: { [key: string]: unknown } - type: "project.directories.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "project.directories.updated" data: { projectID: string } @@ -5361,13 +5361,13 @@ export type V2EventFileWatcherUpdated = { metadata?: { [key: string]: unknown } - type: "file.watcher.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "file.watcher.updated" data: { file: string event: "add" | "change" | "unlink" @@ -5379,13 +5379,13 @@ export type V2EventPtyCreated = { metadata?: { [key: string]: unknown } - type: "pty.created" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "pty.created" data: { info: Pty } @@ -5396,13 +5396,13 @@ export type V2EventPtyUpdated = { metadata?: { [key: string]: unknown } - type: "pty.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "pty.updated" data: { info: Pty } @@ -5413,13 +5413,13 @@ export type V2EventPtyExited = { metadata?: { [key: string]: unknown } - type: "pty.exited" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "pty.exited" data: { id: string exitCode: number @@ -5431,13 +5431,13 @@ export type V2EventPtyDeleted = { metadata?: { [key: string]: unknown } - type: "pty.deleted" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "pty.deleted" data: { id: string } @@ -5448,13 +5448,13 @@ export type V2EventQuestionV2Asked = { metadata?: { [key: string]: unknown } - type: "question.v2.asked" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "question.v2.asked" data: { id: string sessionID: string @@ -5471,13 +5471,13 @@ export type V2EventQuestionV2Replied = { metadata?: { [key: string]: unknown } - type: "question.v2.replied" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "question.v2.replied" data: { sessionID: string requestID: string @@ -5490,13 +5490,13 @@ export type V2EventQuestionV2Rejected = { metadata?: { [key: string]: unknown } - type: "question.v2.rejected" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "question.v2.rejected" data: { sessionID: string requestID: string @@ -5508,13 +5508,13 @@ export type V2EventTodoUpdated = { metadata?: { [key: string]: unknown } - type: "todo.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "todo.updated" data: { sessionID: string todos: Array @@ -5526,13 +5526,13 @@ export type V2EventLspUpdated = { metadata?: { [key: string]: unknown } - type: "lsp.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "lsp.updated" data: { [key: string]: unknown } @@ -5543,13 +5543,13 @@ export type V2EventPermissionAsked = { metadata?: { [key: string]: unknown } - type: "permission.asked" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "permission.asked" data: { id: string sessionID: string @@ -5571,13 +5571,13 @@ export type V2EventPermissionReplied = { metadata?: { [key: string]: unknown } - type: "permission.replied" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "permission.replied" data: { sessionID: string requestID: string @@ -5590,13 +5590,13 @@ export type V2EventTuiPromptAppend = { metadata?: { [key: string]: unknown } - type: "tui.prompt.append" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "tui.prompt.append" data: { text: string } @@ -5607,13 +5607,13 @@ export type V2EventTuiCommandExecute = { metadata?: { [key: string]: unknown } - type: "tui.command.execute" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "tui.command.execute" data: { command: | "session.list" @@ -5641,13 +5641,13 @@ export type V2EventTuiToastShow = { metadata?: { [key: string]: unknown } - type: "tui.toast.show" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "tui.toast.show" data: { title?: string message: string @@ -5661,13 +5661,13 @@ export type V2EventTuiSessionSelect = { metadata?: { [key: string]: unknown } - type: "tui.session.select" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "tui.session.select" data: { /** * Session ID to navigate to @@ -5681,13 +5681,13 @@ export type V2EventMcpToolsChanged = { metadata?: { [key: string]: unknown } - type: "mcp.tools.changed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "mcp.tools.changed" data: { server: string } @@ -5698,13 +5698,13 @@ export type V2EventMcpBrowserOpenFailed = { metadata?: { [key: string]: unknown } - type: "mcp.browser.open.failed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "mcp.browser.open.failed" data: { mcpName: string url: string @@ -5716,13 +5716,13 @@ export type V2EventCommandExecuted = { metadata?: { [key: string]: unknown } - type: "command.executed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "command.executed" data: { name: string sessionID: string @@ -5736,13 +5736,13 @@ export type V2EventProjectUpdated = { metadata?: { [key: string]: unknown } - type: "project.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "project.updated" data: { id: string worktree: string @@ -5773,13 +5773,13 @@ export type V2EventSessionStatus = { metadata?: { [key: string]: unknown } - type: "session.status" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.status" data: { sessionID: string status: SessionStatus @@ -5791,13 +5791,13 @@ export type V2EventSessionIdle = { metadata?: { [key: string]: unknown } - type: "session.idle" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.idle" data: { sessionID: string } @@ -5808,13 +5808,13 @@ export type V2EventQuestionAsked = { metadata?: { [key: string]: unknown } - type: "question.asked" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "question.asked" data: { id: string sessionID: string @@ -5831,13 +5831,13 @@ export type V2EventQuestionReplied = { metadata?: { [key: string]: unknown } - type: "question.replied" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "question.replied" data: { sessionID: string requestID: string @@ -5850,13 +5850,13 @@ export type V2EventQuestionRejected = { metadata?: { [key: string]: unknown } - type: "question.rejected" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "question.rejected" data: { sessionID: string requestID: string @@ -5868,13 +5868,13 @@ export type V2EventSessionCompacted = { metadata?: { [key: string]: unknown } - type: "session.compacted" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "session.compacted" data: { sessionID: string } @@ -5885,13 +5885,13 @@ export type V2EventVcsBranchUpdated = { metadata?: { [key: string]: unknown } - type: "vcs.branch.updated" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "vcs.branch.updated" data: { branch?: string } @@ -5902,13 +5902,13 @@ export type V2EventWorkspaceReady = { metadata?: { [key: string]: unknown } - type: "workspace.ready" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "workspace.ready" data: { name: string } @@ -5919,13 +5919,13 @@ export type V2EventWorkspaceFailed = { metadata?: { [key: string]: unknown } - type: "workspace.failed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "workspace.failed" data: { message: string } @@ -5936,13 +5936,13 @@ export type V2EventWorkspaceStatus = { metadata?: { [key: string]: unknown } - type: "workspace.status" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "workspace.status" data: { workspaceID: string status: "connected" | "connecting" | "disconnected" | "error" @@ -5954,13 +5954,13 @@ export type V2EventWorktreeReady = { metadata?: { [key: string]: unknown } - type: "worktree.ready" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "worktree.ready" data: { name: string branch?: string @@ -5972,13 +5972,13 @@ export type V2EventWorktreeFailed = { metadata?: { [key: string]: unknown } - type: "worktree.failed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "worktree.failed" data: { message: string } @@ -5989,13 +5989,13 @@ export type V2EventServerConnected = { metadata?: { [key: string]: unknown } - type: "server.connected" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "server.connected" data: { [key: string]: unknown } @@ -6006,13 +6006,13 @@ export type V2EventGlobalDisposed = { metadata?: { [key: string]: unknown } - type: "global.disposed" durable?: { aggregateID: string seq: number version: number } location?: LocationRef + type: "global.disposed" data: { [key: string]: unknown } diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 04165386c..d9aee6051 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -13138,35 +13138,15 @@ "get": { "tags": ["events"], "operationId": "v2.event.subscribe", - "parameters": [ - { - "name": "location", - "in": "query", - "schema": { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "workspace": { - "type": "string" - } - }, - "additionalProperties": false - }, - "required": false, - "style": "deepObject", - "explode": true - } - ], + "parameters": [], "security": [], "responses": { "200": { - "description": "Success", + "description": "Event stream", "content": { "text/event-stream": { "schema": { - "type": "string" + "$ref": "#/components/schemas/V2Event" } } } @@ -13192,7 +13172,7 @@ } } }, - "description": "Subscribe to native event payloads for a location.", + "description": "Subscribe to native event payloads for the server.", "summary": "Subscribe to events", "x-codeSamples": [ { @@ -23081,6 +23061,271 @@ "required": ["_tag", "providerID", "message"], "additionalProperties": false }, + "V2Event": { + "anyOf": [ + { + "$ref": "#/components/schemas/V2EventModels-devRefreshed" + }, + { + "$ref": "#/components/schemas/V2EventIntegrationUpdated" + }, + { + "$ref": "#/components/schemas/V2EventCatalogUpdated" + }, + { + "$ref": "#/components/schemas/V2EventSessionCreated" + }, + { + "$ref": "#/components/schemas/V2EventSessionUpdated" + }, + { + "$ref": "#/components/schemas/V2EventSessionDeleted" + }, + { + "$ref": "#/components/schemas/V2EventMessageUpdated" + }, + { + "$ref": "#/components/schemas/V2EventMessageRemoved" + }, + { + "$ref": "#/components/schemas/V2EventMessagePartUpdated" + }, + { + "$ref": "#/components/schemas/V2EventMessagePartRemoved" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextModelSwitched" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextMoved" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextPrompted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextPromptPromoted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextInterruptRequested" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextContextUpdated" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextSynthetic" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextShellStarted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextShellEnded" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextStepStarted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextStepEnded" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextStepFailed" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextTextStarted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextTextDelta" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextTextEnded" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextToolCalled" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextToolProgress" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextToolSuccess" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextToolFailed" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextRetried" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta" + }, + { + "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded" + }, + { + "$ref": "#/components/schemas/V2EventMessagePartDelta" + }, + { + "$ref": "#/components/schemas/V2EventSessionDiff" + }, + { + "$ref": "#/components/schemas/V2EventSessionError" + }, + { + "$ref": "#/components/schemas/V2EventInstallationUpdated" + }, + { + "$ref": "#/components/schemas/V2EventInstallationUpdate-available" + }, + { + "$ref": "#/components/schemas/V2EventFileEdited" + }, + { + "$ref": "#/components/schemas/V2EventPluginAdded" + }, + { + "$ref": "#/components/schemas/V2EventPermissionV2Asked" + }, + { + "$ref": "#/components/schemas/V2EventPermissionV2Replied" + }, + { + "$ref": "#/components/schemas/V2EventReferenceUpdated" + }, + { + "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated" + }, + { + "$ref": "#/components/schemas/V2EventFileWatcherUpdated" + }, + { + "$ref": "#/components/schemas/V2EventPtyCreated" + }, + { + "$ref": "#/components/schemas/V2EventPtyUpdated" + }, + { + "$ref": "#/components/schemas/V2EventPtyExited" + }, + { + "$ref": "#/components/schemas/V2EventPtyDeleted" + }, + { + "$ref": "#/components/schemas/V2EventQuestionV2Asked" + }, + { + "$ref": "#/components/schemas/V2EventQuestionV2Replied" + }, + { + "$ref": "#/components/schemas/V2EventQuestionV2Rejected" + }, + { + "$ref": "#/components/schemas/V2EventTodoUpdated" + }, + { + "$ref": "#/components/schemas/V2EventLspUpdated" + }, + { + "$ref": "#/components/schemas/V2EventPermissionAsked" + }, + { + "$ref": "#/components/schemas/V2EventPermissionReplied" + }, + { + "$ref": "#/components/schemas/V2EventTuiPromptAppend" + }, + { + "$ref": "#/components/schemas/V2EventTuiCommandExecute" + }, + { + "$ref": "#/components/schemas/V2EventTuiToastShow" + }, + { + "$ref": "#/components/schemas/V2EventTuiSessionSelect" + }, + { + "$ref": "#/components/schemas/V2EventMcpToolsChanged" + }, + { + "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed" + }, + { + "$ref": "#/components/schemas/V2EventCommandExecuted" + }, + { + "$ref": "#/components/schemas/V2EventProjectUpdated" + }, + { + "$ref": "#/components/schemas/V2EventSessionStatus" + }, + { + "$ref": "#/components/schemas/V2EventSessionIdle" + }, + { + "$ref": "#/components/schemas/V2EventQuestionAsked" + }, + { + "$ref": "#/components/schemas/V2EventQuestionReplied" + }, + { + "$ref": "#/components/schemas/V2EventQuestionRejected" + }, + { + "$ref": "#/components/schemas/V2EventSessionCompacted" + }, + { + "$ref": "#/components/schemas/V2EventVcsBranchUpdated" + }, + { + "$ref": "#/components/schemas/V2EventWorkspaceReady" + }, + { + "$ref": "#/components/schemas/V2EventWorkspaceFailed" + }, + { + "$ref": "#/components/schemas/V2EventWorkspaceStatus" + }, + { + "$ref": "#/components/schemas/V2EventWorktreeReady" + }, + { + "$ref": "#/components/schemas/V2EventWorktreeFailed" + }, + { + "$ref": "#/components/schemas/V2EventServerConnected" + }, + { + "$ref": "#/components/schemas/V2EventGlobalDisposed" + }, + { + "$ref": "#/components/schemas/V2EventServerConnected" + } + ] + }, "ForbiddenError": { "type": "object", "properties": { @@ -27666,6 +27911,4926 @@ "required": ["name", "location", "content"], "additionalProperties": false }, + "V2EventModels-devRefreshed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["models-dev.refreshed"] + }, + "data": { + "type": "object", + "properties": {} + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventIntegrationUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["integration.updated"] + }, + "data": { + "type": "object", + "properties": {} + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventCatalogUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["catalog.updated"] + }, + "data": { + "type": "object", + "properties": {} + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionCreated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.created"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "info": { + "$ref": "#/components/schemas/Session" + } + }, + "required": ["sessionID", "info"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.updated"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "info": { + "$ref": "#/components/schemas/Session" + } + }, + "required": ["sessionID", "info"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionDeleted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.deleted"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "info": { + "$ref": "#/components/schemas/Session" + } + }, + "required": ["sessionID", "info"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventMessageUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["message.updated"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "info": { + "$ref": "#/components/schemas/Message" + } + }, + "required": ["sessionID", "info"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventMessageRemoved": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["message.removed"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg" + } + }, + "required": ["sessionID", "messageID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventMessagePartUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["message.part.updated"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "part": { + "$ref": "#/components/schemas/Part" + }, + "time": { + "type": "number" + } + }, + "required": ["sessionID", "part", "time"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventMessagePartRemoved": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["message.part.removed"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg" + }, + "partID": { + "type": "string", + "pattern": "^prt" + } + }, + "required": ["sessionID", "messageID", "partID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextAgentSwitched": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.agent.switched"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "agent": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "messageID", "agent"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextModelSwitched": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.model.switched"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "model": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "variant": { + "type": "string" + } + }, + "required": ["id", "providerID"], + "additionalProperties": false + } + }, + "required": ["timestamp", "sessionID", "messageID", "model"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextMoved": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.moved"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "subdirectory": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "location"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextPrompted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.prompted"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "prompt": { + "$ref": "#/components/schemas/Prompt" + }, + "delivery": { + "type": "string", + "enum": ["steer", "queue"] + } + }, + "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextPromptAdmitted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.prompt.admitted"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "prompt": { + "$ref": "#/components/schemas/Prompt" + }, + "delivery": { + "type": "string", + "enum": ["steer", "queue"] + } + }, + "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextPromptPromoted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.prompt.promoted"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "prompt": { + "$ref": "#/components/schemas/Prompt" + }, + "timeCreated": { + "type": "number" + } + }, + "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextInterruptRequested": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.interrupt.requested"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + } + }, + "required": ["timestamp", "sessionID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextContextUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.context.updated"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "text": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "messageID", "text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextSynthetic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.synthetic"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "text": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "messageID", "text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextShellStarted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.shell.started"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "command": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "messageID", "callID", "command"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextShellEnded": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.shell.ended"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "callID": { + "type": "string" + }, + "output": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "callID", "output"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextStepStarted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.step.started"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "agent": { + "type": "string" + }, + "model": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "providerID": { + "type": "string" + }, + "variant": { + "type": "string" + } + }, + "required": ["id", "providerID"], + "additionalProperties": false + }, + "snapshot": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextStepEnded": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.step.ended"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "finish": { + "type": "string" + }, + "cost": { + "type": "number" + }, + "tokens": { + "type": "object", + "properties": { + "input": { + "type": "number" + }, + "output": { + "type": "number" + }, + "reasoning": { + "type": "number" + }, + "cache": { + "type": "object", + "properties": { + "read": { + "type": "number" + }, + "write": { + "type": "number" + } + }, + "required": ["read", "write"], + "additionalProperties": false + } + }, + "required": ["input", "output", "reasoning", "cache"], + "additionalProperties": false + }, + "snapshot": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextStepFailed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.step.failed"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "error": { + "$ref": "#/components/schemas/SessionErrorUnknown" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "error"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextTextStarted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.text.started"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "textID": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "textID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextTextDelta": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.text.delta"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "textID": { + "type": "string" + }, + "delta": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextTextEnded": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.text.ended"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "textID": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextReasoningStarted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.reasoning.started"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "reasoningID": { + "type": "string" + }, + "providerMetadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextReasoningDelta": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.reasoning.delta"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "reasoningID": { + "type": "string" + }, + "delta": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextReasoningEnded": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.reasoning.ended"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "reasoningID": { + "type": "string" + }, + "text": { + "type": "string" + }, + "providerMetadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextToolInputStarted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.tool.input.started"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextToolInputDelta": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.tool.input.delta"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "delta": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextToolInputEnded": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.tool.input.ended"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextToolCalled": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.tool.called"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "tool": { + "type": "string" + }, + "input": { + "type": "object" + }, + "provider": { + "type": "object", + "properties": { + "executed": { + "type": "boolean" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": ["executed"], + "additionalProperties": false + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextToolProgress": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.tool.progress"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "structured": { + "type": "object" + }, + "content": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolTextContent" + }, + { + "$ref": "#/components/schemas/ToolFileContent" + } + ] + } + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextToolSuccess": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.tool.success"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "structured": { + "type": "object" + }, + "content": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolTextContent" + }, + { + "$ref": "#/components/schemas/ToolFileContent" + } + ] + } + }, + "outputPaths": { + "type": "array", + "items": { + "type": "string" + } + }, + "result": {}, + "provider": { + "type": "object", + "properties": { + "executed": { + "type": "boolean" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": ["executed"], + "additionalProperties": false + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextToolFailed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.tool.failed"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "assistantMessageID": { + "type": "string", + "pattern": "^msg_" + }, + "callID": { + "type": "string" + }, + "error": { + "$ref": "#/components/schemas/SessionErrorUnknown" + }, + "result": {}, + "provider": { + "type": "object", + "properties": { + "executed": { + "type": "boolean" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + "required": ["executed"], + "additionalProperties": false + } + }, + "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextRetried": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.retried"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "attempt": { + "type": "number" + }, + "error": { + "$ref": "#/components/schemas/SessionNextRetry_error" + } + }, + "required": ["timestamp", "sessionID", "attempt", "error"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextCompactionStarted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.compaction.started"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + } + }, + "required": ["timestamp", "sessionID", "messageID", "reason"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextCompactionDelta": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.compaction.delta"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "text": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "messageID", "text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionNextCompactionEnded": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.next.compaction.ended"] + }, + "data": { + "type": "object", + "properties": { + "timestamp": { + "type": "number" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg_" + }, + "reason": { + "type": "string", + "enum": ["auto", "manual"] + }, + "text": { + "type": "string" + }, + "recent": { + "type": "string" + } + }, + "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventMessagePartDelta": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["message.part.delta"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "messageID": { + "type": "string", + "pattern": "^msg" + }, + "partID": { + "type": "string", + "pattern": "^prt" + }, + "field": { + "type": "string" + }, + "delta": { + "type": "string" + } + }, + "required": ["sessionID", "messageID", "partID", "field", "delta"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionDiff": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.diff"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "diff": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotFileDiff" + } + } + }, + "required": ["sessionID", "diff"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionError": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.error"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderAuthError" + }, + { + "$ref": "#/components/schemas/UnknownError" + }, + { + "$ref": "#/components/schemas/MessageOutputLengthError" + }, + { + "$ref": "#/components/schemas/MessageAbortedError" + }, + { + "$ref": "#/components/schemas/StructuredOutputError" + }, + { + "$ref": "#/components/schemas/ContextOverflowError" + }, + { + "$ref": "#/components/schemas/ContentFilterError" + }, + { + "$ref": "#/components/schemas/APIError" + } + ] + } + }, + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventInstallationUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["installation.updated"] + }, + "data": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + }, + "required": ["version"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventInstallationUpdate-available": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["installation.update-available"] + }, + "data": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + }, + "required": ["version"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventFileEdited": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["file.edited"] + }, + "data": { + "type": "object", + "properties": { + "file": { + "type": "string" + } + }, + "required": ["file"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPluginAdded": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["plugin.added"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": ["id"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPermissionV2Asked": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["permission.v2.asked"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^per" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "action": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "type": "string" + } + }, + "save": { + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "type": "object" + }, + "source": { + "$ref": "#/components/schemas/PermissionV2Source" + } + }, + "required": ["id", "sessionID", "action", "resources"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPermissionV2Replied": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["permission.v2.replied"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "requestID": { + "type": "string", + "pattern": "^per" + }, + "reply": { + "$ref": "#/components/schemas/PermissionV2Reply" + } + }, + "required": ["sessionID", "requestID", "reply"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventReferenceUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["reference.updated"] + }, + "data": { + "type": "object", + "properties": {} + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventProjectDirectoriesUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["project.directories.updated"] + }, + "data": { + "type": "object", + "properties": { + "projectID": { + "type": "string" + } + }, + "required": ["projectID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventFileWatcherUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["file.watcher.updated"] + }, + "data": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "event": { + "type": "string", + "enum": ["add", "change", "unlink"] + } + }, + "required": ["file", "event"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPtyCreated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["pty.created"] + }, + "data": { + "type": "object", + "properties": { + "info": { + "$ref": "#/components/schemas/Pty" + } + }, + "required": ["info"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPtyUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["pty.updated"] + }, + "data": { + "type": "object", + "properties": { + "info": { + "$ref": "#/components/schemas/Pty" + } + }, + "required": ["info"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPtyExited": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["pty.exited"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^pty" + }, + "exitCode": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["id", "exitCode"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPtyDeleted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["pty.deleted"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^pty" + } + }, + "required": ["id"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventQuestionV2Asked": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["question.v2.asked"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^que" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "questions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestionV2Info" + }, + "description": "Questions to ask" + }, + "tool": { + "$ref": "#/components/schemas/QuestionV2Tool" + } + }, + "required": ["id", "sessionID", "questions"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventQuestionV2Replied": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["question.v2.replied"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "requestID": { + "type": "string", + "pattern": "^que" + }, + "answers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestionV2Answer" + } + } + }, + "required": ["sessionID", "requestID", "answers"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventQuestionV2Rejected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["question.v2.rejected"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "requestID": { + "type": "string", + "pattern": "^que" + } + }, + "required": ["sessionID", "requestID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventTodoUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["todo.updated"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "todos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Todo" + } + } + }, + "required": ["sessionID", "todos"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventLspUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["lsp.updated"] + }, + "data": { + "type": "object", + "properties": {} + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPermissionAsked": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["permission.asked"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^per" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "permission": { + "type": "string" + }, + "patterns": { + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "type": "object" + }, + "always": { + "type": "array", + "items": { + "type": "string" + } + }, + "tool": { + "type": "object", + "properties": { + "messageID": { + "type": "string" + }, + "callID": { + "type": "string" + } + }, + "required": ["messageID", "callID"], + "additionalProperties": false + } + }, + "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventPermissionReplied": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["permission.replied"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "requestID": { + "type": "string", + "pattern": "^per" + }, + "reply": { + "type": "string", + "enum": ["once", "always", "reject"] + } + }, + "required": ["sessionID", "requestID", "reply"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventTuiPromptAppend": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["tui.prompt.append"] + }, + "data": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventTuiCommandExecute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["tui.command.execute"] + }, + "data": { + "type": "object", + "properties": { + "command": { + "anyOf": [ + { + "type": "string", + "enum": [ + "session.list", + "session.new", + "session.share", + "session.interrupt", + "session.compact", + "session.page.up", + "session.page.down", + "session.line.up", + "session.line.down", + "session.half.page.up", + "session.half.page.down", + "session.first", + "session.last", + "prompt.clear", + "prompt.submit", + "agent.cycle" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": ["command"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventTuiToastShow": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["tui.toast.show"] + }, + "data": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "message": { + "type": "string" + }, + "variant": { + "type": "string", + "enum": ["info", "success", "warning", "error"] + }, + "duration": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "required": ["message", "variant"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventTuiSessionSelect": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["tui.session.select"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses", + "description": "Session ID to navigate to" + } + }, + "required": ["sessionID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventMcpToolsChanged": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["mcp.tools.changed"] + }, + "data": { + "type": "object", + "properties": { + "server": { + "type": "string" + } + }, + "required": ["server"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventMcpBrowserOpenFailed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["mcp.browser.open.failed"] + }, + "data": { + "type": "object", + "properties": { + "mcpName": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": ["mcpName", "url"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventCommandExecuted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["command.executed"] + }, + "data": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "arguments": { + "type": "string" + }, + "messageID": { + "type": "string", + "pattern": "^msg" + } + }, + "required": ["name", "sessionID", "arguments", "messageID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventProjectUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["project.updated"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "worktree": { + "type": "string" + }, + "vcs": { + "type": "string", + "enum": ["git"] + }, + "name": { + "type": "string" + }, + "icon": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "override": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "additionalProperties": false + }, + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "Startup script to run when creating a new workspace (worktree)" + } + }, + "additionalProperties": false + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "integer", + "minimum": 0 + }, + "updated": { + "type": "integer", + "minimum": 0 + }, + "initialized": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["created", "updated"], + "additionalProperties": false + }, + "sandboxes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["id", "worktree", "time", "sandboxes"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionStatus": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.status"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "status": { + "$ref": "#/components/schemas/SessionStatus" + } + }, + "required": ["sessionID", "status"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionIdle": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.idle"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + } + }, + "required": ["sessionID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventQuestionAsked": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["question.asked"] + }, + "data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^que" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "questions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestionInfo" + }, + "description": "Questions to ask" + }, + "tool": { + "$ref": "#/components/schemas/QuestionTool" + } + }, + "required": ["id", "sessionID", "questions"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventQuestionReplied": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["question.replied"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "requestID": { + "type": "string", + "pattern": "^que" + }, + "answers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestionAnswer" + } + } + }, + "required": ["sessionID", "requestID", "answers"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventQuestionRejected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["question.rejected"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "requestID": { + "type": "string", + "pattern": "^que" + } + }, + "required": ["sessionID", "requestID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventSessionCompacted": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["session.compacted"] + }, + "data": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses" + } + }, + "required": ["sessionID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventVcsBranchUpdated": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["vcs.branch.updated"] + }, + "data": { + "type": "object", + "properties": { + "branch": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventWorkspaceReady": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["workspace.ready"] + }, + "data": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventWorkspaceFailed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["workspace.failed"] + }, + "data": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventWorkspaceStatus": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["workspace.status"] + }, + "data": { + "type": "object", + "properties": { + "workspaceID": { + "type": "string", + "pattern": "^wrk" + }, + "status": { + "type": "string", + "enum": ["connected", "connecting", "disconnected", "error"] + } + }, + "required": ["workspaceID", "status"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventWorktreeReady": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["worktree.ready"] + }, + "data": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "branch": { + "type": "string" + } + }, + "required": ["name"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventWorktreeFailed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["worktree.failed"] + }, + "data": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"], + "additionalProperties": false + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventServerConnected": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["server.connected"] + }, + "data": { + "type": "object", + "properties": {} + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, + "V2EventGlobalDisposed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^evt_" + }, + "metadata": { + "type": "object" + }, + "durable": { + "type": "object", + "properties": { + "aggregateID": { + "type": "string" + }, + "seq": { + "type": "integer" + }, + "version": { + "type": "integer" + } + }, + "required": ["aggregateID", "seq", "version"], + "additionalProperties": false + }, + "location": { + "$ref": "#/components/schemas/LocationRef" + }, + "type": { + "type": "string", + "enum": ["global.disposed"] + }, + "data": { + "type": "object", + "properties": {} + } + }, + "required": ["id", "type", "data"], + "additionalProperties": false + }, "QuestionV2Request": { "type": "object", "properties": { diff --git a/packages/tui/src/context/data.tsx b/packages/tui/src/context/data.tsx index 184837c54..2b39dd33b 100644 --- a/packages/tui/src/context/data.tsx +++ b/packages/tui/src/context/data.tsx @@ -263,19 +263,13 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ break case "session.next.text.delta": message.update(event.data.sessionID, (draft) => { - const match = message.latestText( - message.assistant(draft, event.data.assistantMessageID), - event.data.textID, - ) + const match = message.latestText(message.assistant(draft, event.data.assistantMessageID), event.data.textID) if (match) match.text += event.data.delta }) break case "session.next.text.ended": message.update(event.data.sessionID, (draft) => { - const match = message.latestText( - message.assistant(draft, event.data.assistantMessageID), - event.data.textID, - ) + const match = message.latestText(message.assistant(draft, event.data.assistantMessageID), event.data.textID) if (match) match.text = event.data.text }) break @@ -292,28 +286,19 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ break case "session.next.tool.input.delta": message.update(event.data.sessionID, (draft) => { - const match = message.latestTool( - message.assistant(draft, event.data.assistantMessageID), - event.data.callID, - ) + const match = message.latestTool(message.assistant(draft, event.data.assistantMessageID), event.data.callID) if (match?.state.status === "pending") match.state.input += event.data.delta }) break case "session.next.tool.input.ended": message.update(event.data.sessionID, (draft) => { - const match = message.latestTool( - message.assistant(draft, event.data.assistantMessageID), - event.data.callID, - ) + const match = message.latestTool(message.assistant(draft, event.data.assistantMessageID), event.data.callID) if (match?.state.status === "pending") match.state.input = event.data.text }) break case "session.next.tool.called": message.update(event.data.sessionID, (draft) => { - const match = message.latestTool( - message.assistant(draft, event.data.assistantMessageID), - event.data.callID, - ) + const match = message.latestTool(message.assistant(draft, event.data.assistantMessageID), event.data.callID) if (!match) return match.time.ran = event.data.timestamp match.provider = event.data.provider @@ -322,10 +307,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ break case "session.next.tool.progress": message.update(event.data.sessionID, (draft) => { - const match = message.latestTool( - message.assistant(draft, event.data.assistantMessageID), - event.data.callID, - ) + const match = message.latestTool(message.assistant(draft, event.data.assistantMessageID), event.data.callID) if (match?.state.status !== "running") return match.state.structured = event.data.structured match.state.content = [...event.data.content] @@ -333,10 +315,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ break case "session.next.tool.success": message.update(event.data.sessionID, (draft) => { - const match = message.latestTool( - message.assistant(draft, event.data.assistantMessageID), - event.data.callID, - ) + const match = message.latestTool(message.assistant(draft, event.data.assistantMessageID), event.data.callID) if (match?.state.status !== "running") return match.state = { status: "completed", @@ -355,10 +334,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ break case "session.next.tool.failed": message.update(event.data.sessionID, (draft) => { - const match = message.latestTool( - message.assistant(draft, event.data.assistantMessageID), - event.data.callID, - ) + const match = message.latestTool(message.assistant(draft, event.data.assistantMessageID), event.data.callID) if (!match || (match.state.status !== "pending" && match.state.status !== "running")) return match.state = { status: "error", @@ -403,8 +379,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({ ) if (match) { match.text = event.data.text - if (event.data.providerMetadata !== undefined) - match.providerMetadata = event.data.providerMetadata + if (event.data.providerMetadata !== undefined) match.providerMetadata = event.data.providerMetadata } }) break