t3code-cli 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/application.js +1 -1
  2. package/dist/auth.js +1 -1
  3. package/dist/bin.js +48 -31
  4. package/dist/cli.js +1 -1
  5. package/dist/config.js +1 -1
  6. package/dist/connection.js +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/node.js +1 -1
  9. package/dist/rolldown-runtime.js +1 -1
  10. package/dist/rpc.js +1 -1
  11. package/dist/shared.js +11971 -1517
  12. package/dist/src/application/actions.d.ts +1 -1
  13. package/dist/src/application/layer.d.ts +42 -42
  14. package/dist/src/application/project-commands.d.ts +3 -3
  15. package/dist/src/application/projects.d.ts +1 -1
  16. package/dist/src/application/shell-sequence.d.ts +23 -28
  17. package/dist/src/application/terminals.d.ts +6 -6
  18. package/dist/src/application/thread-commands.d.ts +18 -18
  19. package/dist/src/application/thread-update.d.ts +1 -1
  20. package/dist/src/application/thread-wait.d.ts +19 -24
  21. package/dist/src/application/threads.d.ts +124 -149
  22. package/dist/src/auth/error.d.ts +1 -2
  23. package/dist/src/auth/layer.d.ts +2 -2
  24. package/dist/src/auth/local-origin.d.ts +2 -2
  25. package/dist/src/auth/local-token.d.ts +2 -2
  26. package/dist/src/auth/remote-error.d.ts +3 -0
  27. package/dist/src/config/config.d.ts +2 -2
  28. package/dist/src/config/credential/service.d.ts +2 -2
  29. package/dist/src/config/keystore/file.d.ts +1 -1
  30. package/dist/src/config/persist/migration.d.ts +3 -3
  31. package/dist/src/config/persist/persist.d.ts +4 -4
  32. package/dist/src/connection/error.d.ts +3 -1
  33. package/dist/src/connection/prepared.d.ts +14 -0
  34. package/dist/src/domain/helpers.d.ts +46 -51
  35. package/dist/src/domain/model-config.d.ts +91 -86
  36. package/dist/src/domain/thread-lifecycle.d.ts +23 -28
  37. package/dist/src/orchestration/layer.d.ts +308 -523
  38. package/dist/src/rpc/error.d.ts +4 -6
  39. package/dist/src/rpc/index.d.ts +3 -2
  40. package/dist/src/rpc/layer.d.ts +1890 -2299
  41. package/dist/src/rpc/operation.d.ts +4 -6260
  42. package/dist/src/rpc/service.d.ts +1 -1
  43. package/dist/src/rpc/session.d.ts +22 -0
  44. package/dist/src/rpc/ws-group.d.ts +439 -1180
  45. package/dist/src/runtime/layer.d.ts +10 -10
  46. package/dist/src/sql/node-sqlite-client.d.ts +1 -1
  47. package/dist/t3tools.js +2 -2
  48. package/package.json +8 -7
  49. package/src/application/thread-wait.ts +4 -0
  50. package/src/auth/error.ts +2 -8
  51. package/src/auth/remote-error.ts +17 -0
  52. package/src/auth/transport.ts +45 -114
  53. package/src/connection/error.ts +4 -1
  54. package/src/connection/layer.ts +5 -2
  55. package/src/connection/prepared.ts +83 -0
  56. package/src/orchestration/layer.ts +2 -1
  57. package/src/rpc/error.ts +9 -16
  58. package/src/rpc/index.ts +3 -2
  59. package/src/rpc/layer.ts +17 -51
  60. package/src/rpc/operation.ts +16 -2
  61. package/src/rpc/service.ts +2 -1
  62. package/src/rpc/session.ts +168 -0
  63. package/src/rpc/ws-group.ts +12 -26
  64. package/src/runtime/layer.ts +6 -3
@@ -3,23 +3,40 @@ export declare function isSelectableProvider(provider: ServerProvider): boolean;
3
3
  export declare function firstSelectableProvider(providers: ReadonlyArray<ServerProvider>): {
4
4
  readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
5
5
  readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
6
+ readonly displayName?: string | undefined;
7
+ readonly accentColor?: string | undefined;
8
+ readonly badgeLabel?: string | undefined;
9
+ readonly continuation?: {
10
+ readonly groupKey: string;
11
+ } | undefined;
12
+ readonly showInteractionModeToggle?: boolean | undefined;
13
+ readonly requiresNewThreadForModelChange?: boolean | undefined;
6
14
  readonly enabled: boolean;
7
15
  readonly installed: boolean;
8
16
  readonly version: string | null;
9
- readonly status: "error" | "ready" | "warning" | "disabled";
17
+ readonly status: "disabled" | "error" | "ready" | "warning";
10
18
  readonly auth: {
11
- readonly status: "authenticated" | "unknown" | "unauthenticated";
19
+ readonly status: "authenticated" | "unauthenticated" | "unknown";
12
20
  readonly type?: string | undefined;
13
21
  readonly label?: string | undefined;
14
22
  readonly email?: string | undefined;
15
23
  };
16
24
  readonly checkedAt: string;
25
+ readonly message?: string | undefined;
26
+ readonly availability?: "available" | "unavailable" | undefined;
27
+ readonly unavailableReason?: string | undefined;
17
28
  readonly models: readonly {
18
29
  readonly slug: string;
19
30
  readonly name: string;
31
+ readonly shortName?: string | undefined;
32
+ readonly subProvider?: string | undefined;
20
33
  readonly isCustom: boolean;
34
+ readonly isDefault?: boolean | undefined;
21
35
  readonly capabilities: {
22
36
  readonly optionDescriptors?: readonly ({
37
+ readonly id: string;
38
+ readonly label: string;
39
+ readonly description?: string | undefined;
23
40
  readonly type: "select";
24
41
  readonly options: readonly {
25
42
  readonly id: string;
@@ -27,21 +44,16 @@ export declare function firstSelectableProvider(providers: ReadonlyArray<ServerP
27
44
  readonly description?: string | undefined;
28
45
  readonly isDefault?: boolean | undefined;
29
46
  }[];
30
- readonly id: string;
31
- readonly label: string;
32
47
  readonly currentValue?: string | undefined;
33
48
  readonly promptInjectedValues?: readonly string[] | undefined;
34
- readonly description?: string | undefined;
35
49
  } | {
36
- readonly type: "boolean";
37
50
  readonly id: string;
38
51
  readonly label: string;
39
- readonly currentValue?: boolean | undefined;
40
52
  readonly description?: string | undefined;
53
+ readonly type: "boolean";
54
+ readonly currentValue?: boolean | undefined;
41
55
  })[] | undefined;
42
56
  } | null;
43
- readonly shortName?: string | undefined;
44
- readonly subProvider?: string | undefined;
45
57
  }[];
46
58
  readonly slashCommands: readonly {
47
59
  readonly name: string;
@@ -52,26 +64,15 @@ export declare function firstSelectableProvider(providers: ReadonlyArray<ServerP
52
64
  }[];
53
65
  readonly skills: readonly {
54
66
  readonly name: string;
55
- readonly path: string;
56
- readonly enabled: boolean;
57
67
  readonly description?: string | undefined;
68
+ readonly path: string;
58
69
  readonly scope?: string | undefined;
70
+ readonly enabled: boolean;
59
71
  readonly displayName?: string | undefined;
60
72
  readonly shortDescription?: string | undefined;
61
73
  }[];
62
- readonly displayName?: string | undefined;
63
- readonly accentColor?: string | undefined;
64
- readonly badgeLabel?: string | undefined;
65
- readonly continuation?: {
66
- readonly groupKey: string;
67
- } | undefined;
68
- readonly showInteractionModeToggle?: boolean | undefined;
69
- readonly requiresNewThreadForModelChange?: boolean | undefined;
70
- readonly message?: string | undefined;
71
- readonly availability?: "available" | "unavailable" | undefined;
72
- readonly unavailableReason?: string | undefined;
73
74
  readonly versionAdvisory?: {
74
- readonly status: "unknown" | "current" | "behind_latest";
75
+ readonly status: "behind_latest" | "current" | "unknown";
75
76
  readonly currentVersion: string | null;
76
77
  readonly latestVersion: string | null;
77
78
  readonly updateCommand: string | null;
@@ -80,7 +81,7 @@ export declare function firstSelectableProvider(providers: ReadonlyArray<ServerP
80
81
  readonly message: string | null;
81
82
  };
82
83
  readonly updateState?: {
83
- readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
84
+ readonly status: "failed" | "idle" | "queued" | "running" | "succeeded" | "unchanged";
84
85
  readonly startedAt: string | null;
85
86
  readonly finishedAt: string | null;
86
87
  readonly message: string | null;
@@ -90,9 +91,15 @@ export declare function firstSelectableProvider(providers: ReadonlyArray<ServerP
90
91
  export declare function firstSelectableModel(provider: ServerProvider): {
91
92
  readonly slug: string;
92
93
  readonly name: string;
94
+ readonly shortName?: string | undefined;
95
+ readonly subProvider?: string | undefined;
93
96
  readonly isCustom: boolean;
97
+ readonly isDefault?: boolean | undefined;
94
98
  readonly capabilities: {
95
99
  readonly optionDescriptors?: readonly ({
100
+ readonly id: string;
101
+ readonly label: string;
102
+ readonly description?: string | undefined;
96
103
  readonly type: "select";
97
104
  readonly options: readonly {
98
105
  readonly id: string;
@@ -100,28 +107,29 @@ export declare function firstSelectableModel(provider: ServerProvider): {
100
107
  readonly description?: string | undefined;
101
108
  readonly isDefault?: boolean | undefined;
102
109
  }[];
103
- readonly id: string;
104
- readonly label: string;
105
110
  readonly currentValue?: string | undefined;
106
111
  readonly promptInjectedValues?: readonly string[] | undefined;
107
- readonly description?: string | undefined;
108
112
  } | {
109
- readonly type: "boolean";
110
113
  readonly id: string;
111
114
  readonly label: string;
112
- readonly currentValue?: boolean | undefined;
113
115
  readonly description?: string | undefined;
116
+ readonly type: "boolean";
117
+ readonly currentValue?: boolean | undefined;
114
118
  })[] | undefined;
115
119
  } | null;
116
- readonly shortName?: string | undefined;
117
- readonly subProvider?: string | undefined;
118
120
  } | undefined;
119
121
  export declare function findSelectableModel(provider: ServerProvider, slug: string): {
120
122
  readonly slug: string;
121
123
  readonly name: string;
124
+ readonly shortName?: string | undefined;
125
+ readonly subProvider?: string | undefined;
122
126
  readonly isCustom: boolean;
127
+ readonly isDefault?: boolean | undefined;
123
128
  readonly capabilities: {
124
129
  readonly optionDescriptors?: readonly ({
130
+ readonly id: string;
131
+ readonly label: string;
132
+ readonly description?: string | undefined;
125
133
  readonly type: "select";
126
134
  readonly options: readonly {
127
135
  readonly id: string;
@@ -129,42 +137,54 @@ export declare function findSelectableModel(provider: ServerProvider, slug: stri
129
137
  readonly description?: string | undefined;
130
138
  readonly isDefault?: boolean | undefined;
131
139
  }[];
132
- readonly id: string;
133
- readonly label: string;
134
140
  readonly currentValue?: string | undefined;
135
141
  readonly promptInjectedValues?: readonly string[] | undefined;
136
- readonly description?: string | undefined;
137
142
  } | {
138
- readonly type: "boolean";
139
143
  readonly id: string;
140
144
  readonly label: string;
141
- readonly currentValue?: boolean | undefined;
142
145
  readonly description?: string | undefined;
146
+ readonly type: "boolean";
147
+ readonly currentValue?: boolean | undefined;
143
148
  })[] | undefined;
144
149
  } | null;
145
- readonly shortName?: string | undefined;
146
- readonly subProvider?: string | undefined;
147
150
  } | undefined;
148
151
  export declare function findSelectableProvider(providers: ReadonlyArray<ServerProvider>, instanceId: string): {
149
152
  readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
150
153
  readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
154
+ readonly displayName?: string | undefined;
155
+ readonly accentColor?: string | undefined;
156
+ readonly badgeLabel?: string | undefined;
157
+ readonly continuation?: {
158
+ readonly groupKey: string;
159
+ } | undefined;
160
+ readonly showInteractionModeToggle?: boolean | undefined;
161
+ readonly requiresNewThreadForModelChange?: boolean | undefined;
151
162
  readonly enabled: boolean;
152
163
  readonly installed: boolean;
153
164
  readonly version: string | null;
154
- readonly status: "error" | "ready" | "warning" | "disabled";
165
+ readonly status: "disabled" | "error" | "ready" | "warning";
155
166
  readonly auth: {
156
- readonly status: "authenticated" | "unknown" | "unauthenticated";
167
+ readonly status: "authenticated" | "unauthenticated" | "unknown";
157
168
  readonly type?: string | undefined;
158
169
  readonly label?: string | undefined;
159
170
  readonly email?: string | undefined;
160
171
  };
161
172
  readonly checkedAt: string;
173
+ readonly message?: string | undefined;
174
+ readonly availability?: "available" | "unavailable" | undefined;
175
+ readonly unavailableReason?: string | undefined;
162
176
  readonly models: readonly {
163
177
  readonly slug: string;
164
178
  readonly name: string;
179
+ readonly shortName?: string | undefined;
180
+ readonly subProvider?: string | undefined;
165
181
  readonly isCustom: boolean;
182
+ readonly isDefault?: boolean | undefined;
166
183
  readonly capabilities: {
167
184
  readonly optionDescriptors?: readonly ({
185
+ readonly id: string;
186
+ readonly label: string;
187
+ readonly description?: string | undefined;
168
188
  readonly type: "select";
169
189
  readonly options: readonly {
170
190
  readonly id: string;
@@ -172,21 +192,16 @@ export declare function findSelectableProvider(providers: ReadonlyArray<ServerPr
172
192
  readonly description?: string | undefined;
173
193
  readonly isDefault?: boolean | undefined;
174
194
  }[];
175
- readonly id: string;
176
- readonly label: string;
177
195
  readonly currentValue?: string | undefined;
178
196
  readonly promptInjectedValues?: readonly string[] | undefined;
179
- readonly description?: string | undefined;
180
197
  } | {
181
- readonly type: "boolean";
182
198
  readonly id: string;
183
199
  readonly label: string;
184
- readonly currentValue?: boolean | undefined;
185
200
  readonly description?: string | undefined;
201
+ readonly type: "boolean";
202
+ readonly currentValue?: boolean | undefined;
186
203
  })[] | undefined;
187
204
  } | null;
188
- readonly shortName?: string | undefined;
189
- readonly subProvider?: string | undefined;
190
205
  }[];
191
206
  readonly slashCommands: readonly {
192
207
  readonly name: string;
@@ -197,26 +212,15 @@ export declare function findSelectableProvider(providers: ReadonlyArray<ServerPr
197
212
  }[];
198
213
  readonly skills: readonly {
199
214
  readonly name: string;
200
- readonly path: string;
201
- readonly enabled: boolean;
202
215
  readonly description?: string | undefined;
216
+ readonly path: string;
203
217
  readonly scope?: string | undefined;
218
+ readonly enabled: boolean;
204
219
  readonly displayName?: string | undefined;
205
220
  readonly shortDescription?: string | undefined;
206
221
  }[];
207
- readonly displayName?: string | undefined;
208
- readonly accentColor?: string | undefined;
209
- readonly badgeLabel?: string | undefined;
210
- readonly continuation?: {
211
- readonly groupKey: string;
212
- } | undefined;
213
- readonly showInteractionModeToggle?: boolean | undefined;
214
- readonly requiresNewThreadForModelChange?: boolean | undefined;
215
- readonly message?: string | undefined;
216
- readonly availability?: "available" | "unavailable" | undefined;
217
- readonly unavailableReason?: string | undefined;
218
222
  readonly versionAdvisory?: {
219
- readonly status: "unknown" | "current" | "behind_latest";
223
+ readonly status: "behind_latest" | "current" | "unknown";
220
224
  readonly currentVersion: string | null;
221
225
  readonly latestVersion: string | null;
222
226
  readonly updateCommand: string | null;
@@ -225,7 +229,7 @@ export declare function findSelectableProvider(providers: ReadonlyArray<ServerPr
225
229
  readonly message: string | null;
226
230
  };
227
231
  readonly updateState?: {
228
- readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
232
+ readonly status: "failed" | "idle" | "queued" | "running" | "succeeded" | "unchanged";
229
233
  readonly startedAt: string | null;
230
234
  readonly finishedAt: string | null;
231
235
  readonly message: string | null;
@@ -239,23 +243,40 @@ export declare function filterProvidersForModelListing(input: {
239
243
  }): {
240
244
  readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
241
245
  readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
246
+ readonly displayName?: string | undefined;
247
+ readonly accentColor?: string | undefined;
248
+ readonly badgeLabel?: string | undefined;
249
+ readonly continuation?: {
250
+ readonly groupKey: string;
251
+ } | undefined;
252
+ readonly showInteractionModeToggle?: boolean | undefined;
253
+ readonly requiresNewThreadForModelChange?: boolean | undefined;
242
254
  readonly enabled: boolean;
243
255
  readonly installed: boolean;
244
256
  readonly version: string | null;
245
- readonly status: "error" | "ready" | "warning" | "disabled";
257
+ readonly status: "disabled" | "error" | "ready" | "warning";
246
258
  readonly auth: {
247
- readonly status: "authenticated" | "unknown" | "unauthenticated";
259
+ readonly status: "authenticated" | "unauthenticated" | "unknown";
248
260
  readonly type?: string | undefined;
249
261
  readonly label?: string | undefined;
250
262
  readonly email?: string | undefined;
251
263
  };
252
264
  readonly checkedAt: string;
265
+ readonly message?: string | undefined;
266
+ readonly availability?: "available" | "unavailable" | undefined;
267
+ readonly unavailableReason?: string | undefined;
253
268
  readonly models: readonly {
254
269
  readonly slug: string;
255
270
  readonly name: string;
271
+ readonly shortName?: string | undefined;
272
+ readonly subProvider?: string | undefined;
256
273
  readonly isCustom: boolean;
274
+ readonly isDefault?: boolean | undefined;
257
275
  readonly capabilities: {
258
276
  readonly optionDescriptors?: readonly ({
277
+ readonly id: string;
278
+ readonly label: string;
279
+ readonly description?: string | undefined;
259
280
  readonly type: "select";
260
281
  readonly options: readonly {
261
282
  readonly id: string;
@@ -263,21 +284,16 @@ export declare function filterProvidersForModelListing(input: {
263
284
  readonly description?: string | undefined;
264
285
  readonly isDefault?: boolean | undefined;
265
286
  }[];
266
- readonly id: string;
267
- readonly label: string;
268
287
  readonly currentValue?: string | undefined;
269
288
  readonly promptInjectedValues?: readonly string[] | undefined;
270
- readonly description?: string | undefined;
271
289
  } | {
272
- readonly type: "boolean";
273
290
  readonly id: string;
274
291
  readonly label: string;
275
- readonly currentValue?: boolean | undefined;
276
292
  readonly description?: string | undefined;
293
+ readonly type: "boolean";
294
+ readonly currentValue?: boolean | undefined;
277
295
  })[] | undefined;
278
296
  } | null;
279
- readonly shortName?: string | undefined;
280
- readonly subProvider?: string | undefined;
281
297
  }[];
282
298
  readonly slashCommands: readonly {
283
299
  readonly name: string;
@@ -288,26 +304,15 @@ export declare function filterProvidersForModelListing(input: {
288
304
  }[];
289
305
  readonly skills: readonly {
290
306
  readonly name: string;
291
- readonly path: string;
292
- readonly enabled: boolean;
293
307
  readonly description?: string | undefined;
308
+ readonly path: string;
294
309
  readonly scope?: string | undefined;
310
+ readonly enabled: boolean;
295
311
  readonly displayName?: string | undefined;
296
312
  readonly shortDescription?: string | undefined;
297
313
  }[];
298
- readonly displayName?: string | undefined;
299
- readonly accentColor?: string | undefined;
300
- readonly badgeLabel?: string | undefined;
301
- readonly continuation?: {
302
- readonly groupKey: string;
303
- } | undefined;
304
- readonly showInteractionModeToggle?: boolean | undefined;
305
- readonly requiresNewThreadForModelChange?: boolean | undefined;
306
- readonly message?: string | undefined;
307
- readonly availability?: "available" | "unavailable" | undefined;
308
- readonly unavailableReason?: string | undefined;
309
314
  readonly versionAdvisory?: {
310
- readonly status: "unknown" | "current" | "behind_latest";
315
+ readonly status: "behind_latest" | "current" | "unknown";
311
316
  readonly currentVersion: string | null;
312
317
  readonly latestVersion: string | null;
313
318
  readonly updateCommand: string | null;
@@ -316,7 +321,7 @@ export declare function filterProvidersForModelListing(input: {
316
321
  readonly message: string | null;
317
322
  };
318
323
  readonly updateState?: {
319
- readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
324
+ readonly status: "failed" | "idle" | "queued" | "running" | "succeeded" | "unchanged";
320
325
  readonly startedAt: string | null;
321
326
  readonly finishedAt: string | null;
322
327
  readonly message: string | null;
@@ -2,15 +2,11 @@ import { type OrchestrationEvent, type OrchestrationMessage as OrchestrationMess
2
2
  export declare function sessionNeedsStopBeforeDelete(session: OrchestrationSession | null): boolean;
3
3
  export declare function isThreadActive(thread: OrchestrationThreadShell | OrchestrationThread): boolean;
4
4
  export type ThreadLifecycleStatus = ReturnType<typeof threadStatus>;
5
- export declare function threadStatus(thread: OrchestrationThreadShell | OrchestrationThread): "unknown" | "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped" | "completed" | "pending";
5
+ export declare function threadStatus(thread: OrchestrationThreadShell | OrchestrationThread): "completed" | "error" | "idle" | "interrupted" | "pending" | "ready" | "running" | "starting" | "stopped" | "unknown";
6
6
  export declare function latestAssistantMessage(thread: OrchestrationThread): {
7
7
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
8
- readonly role: "user" | "assistant" | "system";
8
+ readonly role: "assistant" | "system" | "user";
9
9
  readonly text: string;
10
- readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
11
- readonly streaming: boolean;
12
- readonly createdAt: string;
13
- readonly updatedAt: string;
14
10
  readonly attachments?: readonly {
15
11
  readonly type: "image";
16
12
  readonly id: string;
@@ -18,6 +14,10 @@ export declare function latestAssistantMessage(thread: OrchestrationThread): {
18
14
  readonly mimeType: string;
19
15
  readonly sizeBytes: number;
20
16
  }[] | undefined;
17
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
18
+ readonly streaming: boolean;
19
+ readonly createdAt: string;
20
+ readonly updatedAt: string;
21
21
  } | undefined;
22
22
  export declare function isThreadCompleteEnough(thread: OrchestrationThread): boolean;
23
23
  export declare function applyThreadEvent(current: OrchestrationThread, event: OrchestrationEvent, messages: Map<string, OrchestrationMessageType>): {
@@ -32,13 +32,13 @@ export declare function applyThreadEvent(current: OrchestrationThread, event: Or
32
32
  readonly value: string | boolean;
33
33
  }[];
34
34
  };
35
- readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
35
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
36
36
  readonly interactionMode: "default" | "plan";
37
37
  readonly branch: string | null;
38
38
  readonly worktreePath: string | null;
39
39
  readonly latestTurn: {
40
40
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
41
- readonly state: "error" | "running" | "interrupted" | "completed";
41
+ readonly state: "completed" | "error" | "interrupted" | "running";
42
42
  readonly requestedAt: string;
43
43
  readonly startedAt: string | null;
44
44
  readonly completedAt: string | null;
@@ -51,24 +51,15 @@ export declare function applyThreadEvent(current: OrchestrationThread, event: Or
51
51
  readonly createdAt: string;
52
52
  readonly updatedAt: string;
53
53
  readonly archivedAt: string | null;
54
+ readonly settledOverride: "active" | "settled" | null;
55
+ readonly settledAt: string | null;
56
+ readonly snoozedUntil?: string | null | undefined;
57
+ readonly snoozedAt?: string | null | undefined;
54
58
  readonly deletedAt: string | null;
55
- readonly goal: {
56
- readonly objective: string;
57
- readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
58
- readonly tokensUsed: number;
59
- readonly tokenBudget: number | null;
60
- readonly timeUsedSeconds: number;
61
- readonly createdAt: string;
62
- readonly updatedAt: string;
63
- } | null;
64
59
  readonly messages: readonly {
65
60
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
66
- readonly role: "user" | "assistant" | "system";
61
+ readonly role: "assistant" | "system" | "user";
67
62
  readonly text: string;
68
- readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
69
- readonly streaming: boolean;
70
- readonly createdAt: string;
71
- readonly updatedAt: string;
72
63
  readonly attachments?: readonly {
73
64
  readonly type: "image";
74
65
  readonly id: string;
@@ -76,6 +67,10 @@ export declare function applyThreadEvent(current: OrchestrationThread, event: Or
76
67
  readonly mimeType: string;
77
68
  readonly sizeBytes: number;
78
69
  }[] | undefined;
70
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
71
+ readonly streaming: boolean;
72
+ readonly createdAt: string;
73
+ readonly updatedAt: string;
79
74
  }[];
80
75
  readonly proposedPlans: readonly {
81
76
  readonly id: string;
@@ -88,19 +83,19 @@ export declare function applyThreadEvent(current: OrchestrationThread, event: Or
88
83
  }[];
89
84
  readonly activities: readonly {
90
85
  readonly id: string & import("effect/Brand").Brand<"EventId">;
91
- readonly tone: "error" | "info" | "tool" | "approval";
86
+ readonly tone: "approval" | "error" | "info" | "tool";
92
87
  readonly kind: string;
93
88
  readonly summary: string;
94
89
  readonly payload: unknown;
95
90
  readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
96
- readonly createdAt: string;
97
91
  readonly sequence?: number | undefined;
92
+ readonly createdAt: string;
98
93
  }[];
99
94
  readonly checkpoints: readonly {
100
95
  readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
101
96
  readonly checkpointTurnCount: number;
102
97
  readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
103
- readonly status: "error" | "ready" | "missing";
98
+ readonly status: "error" | "missing" | "ready";
104
99
  readonly files: readonly {
105
100
  readonly path: string;
106
101
  readonly kind: string;
@@ -112,13 +107,13 @@ export declare function applyThreadEvent(current: OrchestrationThread, event: Or
112
107
  }[];
113
108
  readonly session: {
114
109
  readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
115
- readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
110
+ readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
116
111
  readonly providerName: string | null;
117
- readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
112
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
113
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
118
114
  readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
119
115
  readonly lastError: string | null;
120
116
  readonly updatedAt: string;
121
- readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
122
117
  } | null;
123
118
  };
124
119
  export declare function messageFromEvent(event: OrchestrationEvent, existingMessages?: Map<string, OrchestrationMessageType>): OrchestrationMessageType | null;