The best way to control Claude Code, Codex and more from any computer or phone
| 1 | /** The free tier refuses deny-all sessions. */ |
| 2 | import type { ProviderReplayEntry } from "@t3tools/contracts"; |
| 3 | |
| 4 | export const OPENCODE2_TITLE_GENERATION: ReadonlyArray<ProviderReplayEntry> = [ |
| 5 | { type: "expect_outbound", label: "event.subscribe", frame: { type: "event.subscribe" } }, |
| 6 | { |
| 7 | type: "emit_inbound", |
| 8 | label: "server.connected", |
| 9 | frame: { |
| 10 | type: "sdk.event", |
| 11 | event: { id: "evt_0f137a1d2001lU10ZRa5EiLHAw", type: "server.connected", data: {} }, |
| 12 | }, |
| 13 | }, |
| 14 | { |
| 15 | type: "expect_outbound", |
| 16 | label: "session.create", |
| 17 | frame: { |
| 18 | type: "session.create", |
| 19 | input: { |
| 20 | title: "T3 Code generateThreadTitle", |
| 21 | location: { directory: "<any>" }, |
| 22 | model: { providerID: "opencode", id: "big-pickle" }, |
| 23 | permissions: [{ action: "*", resource: "*", effect: "ask" }], |
| 24 | }, |
| 25 | }, |
| 26 | }, |
| 27 | { |
| 28 | type: "emit_inbound", |
| 29 | label: "session.create.response", |
| 30 | frame: { |
| 31 | type: "sdk.response", |
| 32 | operation: "session.create", |
| 33 | data: { |
| 34 | data: { |
| 35 | id: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 36 | projectID: "global", |
| 37 | model: { id: "big-pickle", providerID: "opencode", variant: "default" }, |
| 38 | cost: 0, |
| 39 | tokens: { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } }, |
| 40 | time: { created: 1790753350431, updated: 1790753350431 }, |
| 41 | title: "T3 Code generateThreadTitle", |
| 42 | permissions: [{ action: "*", resource: "*", effect: "ask" }], |
| 43 | location: { directory: "<work>" }, |
| 44 | }, |
| 45 | }, |
| 46 | }, |
| 47 | }, |
| 48 | { |
| 49 | type: "emit_inbound", |
| 50 | label: "session.created", |
| 51 | frame: { |
| 52 | type: "sdk.event", |
| 53 | event: { |
| 54 | id: "evt_0f137a31f001y6hIo9JFrLXhBa", |
| 55 | created: 1790753350431, |
| 56 | type: "session.created", |
| 57 | location: { directory: "<work>" }, |
| 58 | data: { |
| 59 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 60 | slug: "quiet-lagoon", |
| 61 | version: "2.0.18", |
| 62 | projectID: "global", |
| 63 | location: { directory: "<work>" }, |
| 64 | subpath: "", |
| 65 | title: "T3 Code generateThreadTitle", |
| 66 | permissions: [{ action: "*", resource: "*", effect: "ask" }], |
| 67 | model: { id: "big-pickle", providerID: "opencode" }, |
| 68 | }, |
| 69 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 0, version: 1 }, |
| 70 | }, |
| 71 | }, |
| 72 | }, |
| 73 | { |
| 74 | type: "emit_inbound", |
| 75 | label: "project.updated", |
| 76 | frame: { |
| 77 | type: "sdk.event", |
| 78 | event: { |
| 79 | id: "evt_0f137a32a001SNTdr1fGy7x8KA", |
| 80 | created: 1790753350442, |
| 81 | type: "project.updated", |
| 82 | data: { |
| 83 | id: "global", |
| 84 | canonical: "<work>", |
| 85 | vcs: "git", |
| 86 | time: { created: 1790744321645, updated: 1790744321645, active: 1790753350441 }, |
| 87 | sandboxes: [], |
| 88 | }, |
| 89 | }, |
| 90 | }, |
| 91 | }, |
| 92 | { |
| 93 | type: "expect_outbound", |
| 94 | label: "session.prompt", |
| 95 | frame: { |
| 96 | type: "session.prompt", |
| 97 | input: { sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", text: "<any>" }, |
| 98 | }, |
| 99 | }, |
| 100 | { |
| 101 | type: "emit_inbound", |
| 102 | label: "session.prompt.response", |
| 103 | frame: { |
| 104 | type: "sdk.response", |
| 105 | operation: "session.prompt", |
| 106 | data: { |
| 107 | data: { |
| 108 | id: "msg_0f137a333001NQCSi7im6QbeRu", |
| 109 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 110 | time: { created: 1790753350454 }, |
| 111 | type: "user", |
| 112 | payload: { |
| 113 | text: 'You write concise thread titles for coding conversations. Return only a JSON object with key "title". Title: at most 5 words, no quotes. User message: "fix the login redirect loop after oauth"', |
| 114 | }, |
| 115 | delivery: "steer", |
| 116 | }, |
| 117 | }, |
| 118 | }, |
| 119 | }, |
| 120 | { |
| 121 | type: "emit_inbound", |
| 122 | label: "session.inbox.enqueued", |
| 123 | frame: { |
| 124 | type: "sdk.event", |
| 125 | event: { |
| 126 | id: "evt_0f137a336001aSMpzX88Wc2ggd", |
| 127 | created: 1790753350454, |
| 128 | type: "session.inbox.enqueued", |
| 129 | location: { directory: "<work>" }, |
| 130 | data: { |
| 131 | inboxID: "msg_0f137a333001NQCSi7im6QbeRu", |
| 132 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 133 | item: { |
| 134 | type: "user", |
| 135 | payload: { |
| 136 | text: 'You write concise thread titles for coding conversations. Return only a JSON object with key "title". Title: at most 5 words, no quotes. User message: "fix the login redirect loop after oauth"', |
| 137 | }, |
| 138 | delivery: "steer", |
| 139 | }, |
| 140 | }, |
| 141 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 1, version: 1 }, |
| 142 | }, |
| 143 | }, |
| 144 | }, |
| 145 | { |
| 146 | type: "emit_inbound", |
| 147 | label: "session.execution.started", |
| 148 | frame: { |
| 149 | type: "sdk.event", |
| 150 | event: { |
| 151 | id: "evt_0f137a33b001LaQlIPhw6OXE4K", |
| 152 | created: 1790753350459, |
| 153 | type: "session.execution.started", |
| 154 | data: { sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu" }, |
| 155 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 2, version: 1 }, |
| 156 | }, |
| 157 | }, |
| 158 | }, |
| 159 | { |
| 160 | type: "emit_inbound", |
| 161 | label: "session.instructions.updated", |
| 162 | frame: { |
| 163 | type: "sdk.event", |
| 164 | event: { |
| 165 | id: "evt_0f137a355001zRM26oGzBOQK1I", |
| 166 | created: 1790753350485, |
| 167 | metadata: { instructions: { initial: true } }, |
| 168 | type: "session.instructions.updated", |
| 169 | location: { directory: "<work>" }, |
| 170 | data: { |
| 171 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 172 | delta: { |
| 173 | "core/environment": "00e638e6e54c2bb7786ab0bade9b0f8fcb6401b64ef49fc25025dc97dc2d61ac", |
| 174 | "core/date": "5a13dc24ad554b3e0bf9583fa4a5c52e130b32720d0a9562fd0e9b0ab14210a9", |
| 175 | "core/codemode": "616a7ad8b8e40e8a71eab238dfbbe9eaf0f4a9e6fdad853226d075bfe602e1e6", |
| 176 | "core/skill-guidance": |
| 177 | "b2aff856e4c0afa54b6d56ecdc438d66a6333b36a3b62677bb1a96da62079118", |
| 178 | }, |
| 179 | }, |
| 180 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 3, version: 2 }, |
| 181 | }, |
| 182 | }, |
| 183 | }, |
| 184 | { |
| 185 | type: "emit_inbound", |
| 186 | label: "session.inbox.delivered", |
| 187 | frame: { |
| 188 | type: "sdk.event", |
| 189 | event: { |
| 190 | id: "evt_0f137a358001Nb4SR6NyY00Zo5", |
| 191 | created: 1790753350489, |
| 192 | type: "session.inbox.delivered", |
| 193 | location: { directory: "<work>" }, |
| 194 | data: { |
| 195 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 196 | inboxID: "msg_0f137a333001NQCSi7im6QbeRu", |
| 197 | }, |
| 198 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 4, version: 1 }, |
| 199 | }, |
| 200 | }, |
| 201 | }, |
| 202 | { |
| 203 | type: "emit_inbound", |
| 204 | label: "session.step.started", |
| 205 | frame: { |
| 206 | type: "sdk.event", |
| 207 | event: { |
| 208 | id: "evt_0f137a9a1001mdhCnni47bUQ1S", |
| 209 | created: 1790753352097, |
| 210 | type: "session.step.started", |
| 211 | location: { directory: "<work>" }, |
| 212 | data: { |
| 213 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 214 | agent: "build", |
| 215 | model: { id: "big-pickle", providerID: "opencode", variant: "default" }, |
| 216 | assistantMessageID: "msg_0f137a376001CNO3tIF0OHqFsx", |
| 217 | snapshot: "5ecf8511987b833d27b391b832f802775c5ca199", |
| 218 | started: 1790753350567, |
| 219 | }, |
| 220 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 5, version: 1 }, |
| 221 | }, |
| 222 | }, |
| 223 | }, |
| 224 | { |
| 225 | type: "emit_inbound", |
| 226 | label: "session.text.started", |
| 227 | frame: { |
| 228 | type: "sdk.event", |
| 229 | event: { |
| 230 | id: "evt_0f137a9a5001wyccz82SmtjxpF", |
| 231 | created: 1790753352101, |
| 232 | type: "session.text.started", |
| 233 | location: { directory: "<work>" }, |
| 234 | data: { |
| 235 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 236 | assistantMessageID: "msg_0f137a376001CNO3tIF0OHqFsx", |
| 237 | ordinal: 0, |
| 238 | }, |
| 239 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 6, version: 1 }, |
| 240 | }, |
| 241 | }, |
| 242 | }, |
| 243 | { |
| 244 | type: "emit_inbound", |
| 245 | label: "session.text.delta", |
| 246 | frame: { |
| 247 | type: "sdk.event", |
| 248 | event: { |
| 249 | id: "evt_0f137a9b5001pgNezPn61VhcVj", |
| 250 | created: 1790753352117, |
| 251 | type: "session.text.delta", |
| 252 | location: { directory: "<work>" }, |
| 253 | data: { |
| 254 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 255 | assistantMessageID: "msg_0f137a376001CNO3tIF0OHqFsx", |
| 256 | ordinal: 0, |
| 257 | delta: '{"title": "Fix OAuth Login Redirect Loop"}', |
| 258 | }, |
| 259 | }, |
| 260 | }, |
| 261 | }, |
| 262 | { |
| 263 | type: "emit_inbound", |
| 264 | label: "session.text.ended", |
| 265 | frame: { |
| 266 | type: "sdk.event", |
| 267 | event: { |
| 268 | id: "evt_0f137a9b6001W0DZEOeIf3qavZ", |
| 269 | created: 1790753352118, |
| 270 | type: "session.text.ended", |
| 271 | location: { directory: "<work>" }, |
| 272 | data: { |
| 273 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 274 | assistantMessageID: "msg_0f137a376001CNO3tIF0OHqFsx", |
| 275 | ordinal: 0, |
| 276 | text: '{"title": "Fix OAuth Login Redirect Loop"}', |
| 277 | }, |
| 278 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 7, version: 1 }, |
| 279 | }, |
| 280 | }, |
| 281 | }, |
| 282 | { |
| 283 | type: "emit_inbound", |
| 284 | label: "session.step.streamed", |
| 285 | frame: { |
| 286 | type: "sdk.event", |
| 287 | event: { |
| 288 | id: "evt_0f137a9ba0012p1Dt72Qx5gAbw", |
| 289 | created: 1790753352122, |
| 290 | type: "session.step.streamed", |
| 291 | location: { directory: "<work>" }, |
| 292 | data: { |
| 293 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 294 | assistantMessageID: "msg_0f137a376001CNO3tIF0OHqFsx", |
| 295 | }, |
| 296 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 8, version: 1 }, |
| 297 | }, |
| 298 | }, |
| 299 | }, |
| 300 | { |
| 301 | type: "emit_inbound", |
| 302 | label: "session.step.ended", |
| 303 | frame: { |
| 304 | type: "sdk.event", |
| 305 | event: { |
| 306 | id: "evt_0f137a9c8001CVVUaPgaXOAnJ3", |
| 307 | created: 1790753352136, |
| 308 | type: "session.step.ended", |
| 309 | location: { directory: "<work>" }, |
| 310 | data: { |
| 311 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 312 | assistantMessageID: "msg_0f137a376001CNO3tIF0OHqFsx", |
| 313 | finish: "stop", |
| 314 | rawFinish: "stop", |
| 315 | cost: 0, |
| 316 | tokens: { input: 8927, output: 11, reasoning: 0, cache: { read: 487, write: 0 } }, |
| 317 | snapshot: "5ecf8511987b833d27b391b832f802775c5ca199", |
| 318 | files: [], |
| 319 | }, |
| 320 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 9, version: 1 }, |
| 321 | }, |
| 322 | }, |
| 323 | }, |
| 324 | { |
| 325 | type: "emit_inbound", |
| 326 | label: "session.usage.updated", |
| 327 | frame: { |
| 328 | type: "sdk.event", |
| 329 | event: { |
| 330 | id: "evt_0f137a9cd001vwSgA3M8W9SR9P", |
| 331 | created: 1790753352141, |
| 332 | type: "session.usage.updated", |
| 333 | data: { |
| 334 | sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu", |
| 335 | cost: 0, |
| 336 | tokens: { input: 8927, output: 11, reasoning: 0, cache: { read: 487, write: 0 } }, |
| 337 | }, |
| 338 | }, |
| 339 | }, |
| 340 | }, |
| 341 | { |
| 342 | type: "emit_inbound", |
| 343 | label: "session.execution.succeeded", |
| 344 | frame: { |
| 345 | type: "sdk.event", |
| 346 | event: { |
| 347 | id: "evt_0f137a9ce001qLIAQz6psEXDM3", |
| 348 | created: 1790753352142, |
| 349 | type: "session.execution.succeeded", |
| 350 | data: { sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu" }, |
| 351 | durable: { aggregateID: "ses_f0ec85cf6ffebfalpvV2E9nocu", seq: 10, version: 1 }, |
| 352 | }, |
| 353 | }, |
| 354 | }, |
| 355 | { |
| 356 | type: "expect_outbound", |
| 357 | label: "session.remove", |
| 358 | frame: { type: "session.remove", input: { sessionID: "ses_f0ec85cf6ffebfalpvV2E9nocu" } }, |
| 359 | }, |
| 360 | { |
| 361 | type: "emit_inbound", |
| 362 | label: "session.remove.response", |
| 363 | frame: { type: "sdk.response", operation: "session.remove", data: null }, |
| 364 | }, |
| 365 | ]; |