| ... | ... | @@ -14,8 +14,6 @@ import { |
| 14 | 14 | import { ProviderApprovalDecision, ProviderKind, ProviderRequestKind } from "./orchestration"; |
| 15 | 15 | |
| 16 | 16 | const TrimmedNonEmptyStringSchema = TrimmedNonEmptyString; |
| 17 | | const RuntimeThreadIdSchema = ProviderThreadId; |
| 18 | | const RuntimeTurnIdSchema = ProviderTurnId; |
| 19 | 17 | |
| 20 | 18 | export const ProviderRuntimeToolKind = Schema.Union([ProviderRequestKind, Schema.Literal("other")]); |
| 21 | 19 | export type ProviderRuntimeToolKind = typeof ProviderRuntimeToolKind.Type; |
| ... | ... | @@ -34,7 +32,7 @@ export const ProviderRuntimeSessionStartedEvent = Schema.Struct({ |
| 34 | 32 | provider: ProviderKind, |
| 35 | 33 | sessionId: ProviderSessionId, |
| 36 | 34 | createdAt: IsoDateTime, |
| 37 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 35 | threadId: Schema.optional(ProviderThreadId), |
| 38 | 36 | message: Schema.optional(TrimmedNonEmptyStringSchema), |
| 39 | 37 | }); |
| 40 | 38 | export type ProviderRuntimeSessionStartedEvent = typeof ProviderRuntimeSessionStartedEvent.Type; |
| ... | ... | @@ -45,7 +43,7 @@ export const ProviderRuntimeSessionExitedEvent = Schema.Struct({ |
| 45 | 43 | provider: ProviderKind, |
| 46 | 44 | sessionId: ProviderSessionId, |
| 47 | 45 | createdAt: IsoDateTime, |
| 48 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 46 | threadId: Schema.optional(ProviderThreadId), |
| 49 | 47 | message: Schema.optional(TrimmedNonEmptyStringSchema), |
| 50 | 48 | }); |
| 51 | 49 | export type ProviderRuntimeSessionExitedEvent = typeof ProviderRuntimeSessionExitedEvent.Type; |
| ... | ... | @@ -56,7 +54,7 @@ export const ProviderRuntimeThreadStartedEvent = Schema.Struct({ |
| 56 | 54 | provider: ProviderKind, |
| 57 | 55 | sessionId: ProviderSessionId, |
| 58 | 56 | createdAt: IsoDateTime, |
| 59 | | threadId: RuntimeThreadIdSchema, |
| 57 | threadId: ProviderThreadId, |
| 60 | 58 | }); |
| 61 | 59 | export type ProviderRuntimeThreadStartedEvent = typeof ProviderRuntimeThreadStartedEvent.Type; |
| 62 | 60 | |
| ... | ... | @@ -66,8 +64,8 @@ export const ProviderRuntimeTurnStartedEvent = Schema.Struct({ |
| 66 | 64 | provider: ProviderKind, |
| 67 | 65 | sessionId: ProviderSessionId, |
| 68 | 66 | createdAt: IsoDateTime, |
| 69 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 70 | | turnId: RuntimeTurnIdSchema, |
| 67 | threadId: Schema.optional(ProviderThreadId), |
| 68 | turnId: ProviderTurnId, |
| 71 | 69 | }); |
| 72 | 70 | export type ProviderRuntimeTurnStartedEvent = typeof ProviderRuntimeTurnStartedEvent.Type; |
| 73 | 71 | |
| ... | ... | @@ -77,8 +75,8 @@ export const ProviderRuntimeTurnCompletedEvent = Schema.Struct({ |
| 77 | 75 | provider: ProviderKind, |
| 78 | 76 | sessionId: ProviderSessionId, |
| 79 | 77 | createdAt: IsoDateTime, |
| 80 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 81 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 78 | threadId: Schema.optional(ProviderThreadId), |
| 79 | turnId: Schema.optional(ProviderTurnId), |
| 82 | 80 | status: Schema.optional(ProviderRuntimeTurnStatus), |
| 83 | 81 | errorMessage: Schema.optional(TrimmedNonEmptyStringSchema), |
| 84 | 82 | }); |
| ... | ... | @@ -90,8 +88,8 @@ export const ProviderRuntimeMessageDeltaEvent = Schema.Struct({ |
| 90 | 88 | provider: ProviderKind, |
| 91 | 89 | sessionId: ProviderSessionId, |
| 92 | 90 | createdAt: IsoDateTime, |
| 93 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 94 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 91 | threadId: Schema.optional(ProviderThreadId), |
| 92 | turnId: Schema.optional(ProviderTurnId), |
| 95 | 93 | itemId: Schema.optional(ProviderItemId), |
| 96 | 94 | delta: Schema.String, |
| 97 | 95 | }); |
| ... | ... | @@ -104,8 +102,8 @@ export const ProviderRuntimeMessageCompletedEvent = Schema.Struct({ |
| 104 | 102 | sessionId: ProviderSessionId, |
| 105 | 103 | createdAt: IsoDateTime, |
| 106 | 104 | itemId: ProviderItemId, |
| 107 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 108 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 105 | threadId: Schema.optional(ProviderThreadId), |
| 106 | turnId: Schema.optional(ProviderTurnId), |
| 109 | 107 | }); |
| 110 | 108 | export type ProviderRuntimeMessageCompletedEvent = typeof ProviderRuntimeMessageCompletedEvent.Type; |
| 111 | 109 | |
| ... | ... | @@ -115,8 +113,8 @@ export const ProviderRuntimeToolStartedEvent = Schema.Struct({ |
| 115 | 113 | provider: ProviderKind, |
| 116 | 114 | sessionId: ProviderSessionId, |
| 117 | 115 | createdAt: IsoDateTime, |
| 118 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 119 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 116 | threadId: Schema.optional(ProviderThreadId), |
| 117 | turnId: Schema.optional(ProviderTurnId), |
| 120 | 118 | itemId: Schema.optional(ProviderItemId), |
| 121 | 119 | toolKind: ProviderRuntimeToolKind, |
| 122 | 120 | title: TrimmedNonEmptyStringSchema, |
| ... | ... | @@ -130,8 +128,8 @@ export const ProviderRuntimeToolCompletedEvent = Schema.Struct({ |
| 130 | 128 | provider: ProviderKind, |
| 131 | 129 | sessionId: ProviderSessionId, |
| 132 | 130 | createdAt: IsoDateTime, |
| 133 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 134 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 131 | threadId: Schema.optional(ProviderThreadId), |
| 132 | turnId: Schema.optional(ProviderTurnId), |
| 135 | 133 | itemId: Schema.optional(ProviderItemId), |
| 136 | 134 | toolKind: ProviderRuntimeToolKind, |
| 137 | 135 | title: TrimmedNonEmptyStringSchema, |
| ... | ... | @@ -145,8 +143,8 @@ export const ProviderRuntimeApprovalRequestedEvent = Schema.Struct({ |
| 145 | 143 | provider: ProviderKind, |
| 146 | 144 | sessionId: ProviderSessionId, |
| 147 | 145 | createdAt: IsoDateTime, |
| 148 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 149 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 146 | threadId: Schema.optional(ProviderThreadId), |
| 147 | turnId: Schema.optional(ProviderTurnId), |
| 150 | 148 | itemId: Schema.optional(ProviderItemId), |
| 151 | 149 | requestId: ApprovalRequestId, |
| 152 | 150 | requestKind: ProviderRequestKind, |
| ... | ... | @@ -161,8 +159,8 @@ export const ProviderRuntimeApprovalResolvedEvent = Schema.Struct({ |
| 161 | 159 | provider: ProviderKind, |
| 162 | 160 | sessionId: ProviderSessionId, |
| 163 | 161 | createdAt: IsoDateTime, |
| 164 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 165 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 162 | threadId: Schema.optional(ProviderThreadId), |
| 163 | turnId: Schema.optional(ProviderTurnId), |
| 166 | 164 | itemId: Schema.optional(ProviderItemId), |
| 167 | 165 | requestId: ApprovalRequestId, |
| 168 | 166 | requestKind: Schema.optional(ProviderRequestKind), |
| ... | ... | @@ -176,8 +174,8 @@ export const ProviderRuntimeCheckpointCapturedEvent = Schema.Struct({ |
| 176 | 174 | provider: ProviderKind, |
| 177 | 175 | sessionId: ProviderSessionId, |
| 178 | 176 | createdAt: IsoDateTime, |
| 179 | | threadId: RuntimeThreadIdSchema, |
| 180 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 177 | threadId: ProviderThreadId, |
| 178 | turnId: Schema.optional(ProviderTurnId), |
| 181 | 179 | turnCount: NonNegativeInt, |
| 182 | 180 | status: Schema.optional(ProviderRuntimeTurnStatus), |
| 183 | 181 | }); |
| ... | ... | @@ -190,8 +188,8 @@ export const ProviderRuntimeErrorEvent = Schema.Struct({ |
| 190 | 188 | provider: ProviderKind, |
| 191 | 189 | sessionId: ProviderSessionId, |
| 192 | 190 | createdAt: IsoDateTime, |
| 193 | | threadId: Schema.optional(RuntimeThreadIdSchema), |
| 194 | | turnId: Schema.optional(RuntimeTurnIdSchema), |
| 191 | threadId: Schema.optional(ProviderThreadId), |
| 192 | turnId: Schema.optional(ProviderTurnId), |
| 195 | 193 | itemId: Schema.optional(ProviderItemId), |
| 196 | 194 | message: TrimmedNonEmptyStringSchema, |
| 197 | 195 | }); |