t3code-cli 0.2.0 → 0.3.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 (81) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/src/application/error.d.ts +3 -0
  3. package/dist/src/application/layer.d.ts +776 -0
  4. package/dist/src/application/model-selection.d.ts +19 -0
  5. package/dist/src/application/models.d.ts +93 -0
  6. package/dist/src/application/project-commands.d.ts +15 -0
  7. package/dist/src/application/projects.d.ts +136 -0
  8. package/dist/src/application/service.d.ts +72 -0
  9. package/dist/src/application/shell-sequence.d.ts +91 -0
  10. package/dist/src/application/thread-commands.d.ts +84 -0
  11. package/dist/src/application/thread-wait.d.ts +104 -0
  12. package/dist/src/application/threads.d.ts +563 -0
  13. package/dist/src/auth/error.d.ts +31 -0
  14. package/dist/src/auth/layer.d.ts +36 -0
  15. package/dist/src/auth/local.d.ts +19 -0
  16. package/dist/src/auth/pairing.d.ts +4 -0
  17. package/dist/src/auth/schema.d.ts +67 -0
  18. package/dist/src/auth/service.d.ts +14 -0
  19. package/dist/src/auth/transport.d.ts +26 -0
  20. package/dist/src/auth/type.d.ts +26 -0
  21. package/dist/src/config/error.d.ts +18 -0
  22. package/dist/src/config/layer.d.ts +20 -0
  23. package/dist/src/config/service.d.ts +20 -0
  24. package/dist/src/config/url.d.ts +6 -0
  25. package/dist/src/domain/error.d.ts +31 -0
  26. package/dist/src/domain/helpers.d.ts +38 -0
  27. package/dist/src/domain/model-config.d.ts +293 -0
  28. package/dist/src/domain/thread-lifecycle.d.ts +114 -0
  29. package/dist/src/environment/layer.d.ts +3 -0
  30. package/dist/src/environment/service.d.ts +12 -0
  31. package/dist/src/index.d.ts +6 -0
  32. package/dist/src/orchestration/layer.d.ts +2128 -0
  33. package/dist/src/orchestration/service.d.ts +27 -0
  34. package/dist/src/rpc/error.d.ts +15 -0
  35. package/dist/src/rpc/layer.d.ts +4678 -0
  36. package/dist/src/rpc/service.d.ts +15 -0
  37. package/dist/src/rpc/ws-group.d.ts +2238 -0
  38. package/dist/src/runtime.d.ts +3 -0
  39. package/dist/upstream-t3code/packages/contracts/src/auth.d.ts +439 -0
  40. package/dist/upstream-t3code/packages/contracts/src/baseSchemas.d.ts +38 -0
  41. package/dist/upstream-t3code/packages/contracts/src/desktopBootstrap.d.ts +14 -0
  42. package/dist/upstream-t3code/packages/contracts/src/editor.d.ts +124 -0
  43. package/dist/upstream-t3code/packages/contracts/src/environment.d.ts +64 -0
  44. package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +602 -0
  45. package/dist/upstream-t3code/packages/contracts/src/filesystem.d.ts +26 -0
  46. package/dist/upstream-t3code/packages/contracts/src/git.d.ts +500 -0
  47. package/dist/upstream-t3code/packages/contracts/src/index.d.ts +24 -0
  48. package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +466 -0
  49. package/dist/upstream-t3code/packages/contracts/src/keybindings.d.ts +133 -0
  50. package/dist/upstream-t3code/packages/contracts/src/model.d.ts +112 -0
  51. package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +6682 -0
  52. package/dist/upstream-t3code/packages/contracts/src/project.d.ts +45 -0
  53. package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +116 -0
  54. package/dist/upstream-t3code/packages/contracts/src/providerInstance.d.ts +99 -0
  55. package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +4186 -0
  56. package/dist/upstream-t3code/packages/contracts/src/remoteAccess.d.ts +45 -0
  57. package/dist/upstream-t3code/packages/contracts/src/review.d.ts +37 -0
  58. package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +8149 -0
  59. package/dist/upstream-t3code/packages/contracts/src/server.d.ts +2291 -0
  60. package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +271 -0
  61. package/dist/upstream-t3code/packages/contracts/src/sourceControl.d.ts +177 -0
  62. package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +330 -0
  63. package/dist/upstream-t3code/packages/contracts/src/vcs.d.ts +148 -0
  64. package/package.json +15 -7
  65. package/src/application/model-selection.ts +2 -2
  66. package/src/application/project-commands.ts +1 -1
  67. package/src/application/service.ts +1 -1
  68. package/src/application/shell-sequence.ts +1 -1
  69. package/src/application/thread-commands.ts +1 -1
  70. package/src/application/thread-wait.ts +1 -1
  71. package/src/cli/model-format.ts +1 -1
  72. package/src/cli/project-format.ts +1 -1
  73. package/src/cli/thread-format.ts +1 -1
  74. package/src/domain/helpers.ts +1 -1
  75. package/src/domain/model-config.ts +1 -1
  76. package/src/domain/thread-lifecycle.ts +1 -1
  77. package/src/index.ts +3 -3
  78. package/src/orchestration/layer.ts +1 -1
  79. package/src/orchestration/service.ts +1 -1
  80. package/src/rpc/error.ts +1 -1
  81. package/src/rpc/ws-group.ts +1 -1
@@ -0,0 +1,776 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Layer from "effect/Layer";
3
+ import { T3Application } from "./service.ts";
4
+ export declare const makeT3Application: () => Effect.Effect<{
5
+ archiveThread: (threadId: string) => Effect.Effect<{
6
+ readonly sequence: number;
7
+ }, import("../rpc/error.ts").RpcError, never>;
8
+ listThreads: (projectRef: string) => Effect.Effect<{
9
+ project: {
10
+ readonly id: string & import("effect/Brand").Brand<"ProjectId">;
11
+ readonly title: string;
12
+ readonly workspaceRoot: string;
13
+ readonly defaultModelSelection: {
14
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
15
+ readonly model: string;
16
+ readonly options?: readonly {
17
+ readonly id: string;
18
+ readonly value: string | boolean;
19
+ }[];
20
+ } | null;
21
+ readonly scripts: readonly {
22
+ readonly id: string;
23
+ readonly name: string;
24
+ readonly command: string;
25
+ readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
26
+ readonly runOnWorktreeCreate: boolean;
27
+ }[];
28
+ readonly createdAt: string;
29
+ readonly updatedAt: string;
30
+ readonly repositoryIdentity?: {
31
+ readonly canonicalKey: string;
32
+ readonly locator: {
33
+ readonly source: "git-remote";
34
+ readonly remoteName: string;
35
+ readonly remoteUrl: string;
36
+ };
37
+ readonly rootPath?: string;
38
+ readonly displayName?: string;
39
+ readonly provider?: string;
40
+ readonly owner?: string;
41
+ readonly name?: string;
42
+ } | null | undefined;
43
+ };
44
+ threads: {
45
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
46
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
47
+ readonly title: string;
48
+ readonly modelSelection: {
49
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
50
+ readonly model: string;
51
+ readonly options?: readonly {
52
+ readonly id: string;
53
+ readonly value: string | boolean;
54
+ }[];
55
+ };
56
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
57
+ readonly interactionMode: "default" | "plan";
58
+ readonly branch: string | null;
59
+ readonly worktreePath: string | null;
60
+ readonly latestTurn: {
61
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
62
+ readonly state: "error" | "running" | "interrupted" | "completed";
63
+ readonly requestedAt: string;
64
+ readonly startedAt: string | null;
65
+ readonly completedAt: string | null;
66
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
67
+ readonly sourceProposedPlan?: {
68
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
69
+ readonly planId: string;
70
+ } | undefined;
71
+ } | null;
72
+ readonly createdAt: string;
73
+ readonly updatedAt: string;
74
+ readonly archivedAt: string | null;
75
+ readonly session: {
76
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
77
+ readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
78
+ readonly providerName: string | null;
79
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
80
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
81
+ readonly lastError: string | null;
82
+ readonly updatedAt: string;
83
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
84
+ } | null;
85
+ readonly latestUserMessageAt: string | null;
86
+ readonly hasPendingApprovals: boolean;
87
+ readonly hasPendingUserInput: boolean;
88
+ readonly hasActionableProposedPlan: boolean;
89
+ }[];
90
+ }, import("../rpc/error.ts").RpcError, never>;
91
+ getThreadMessages: (threadId: string) => Effect.Effect<{
92
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
93
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
94
+ readonly title: string;
95
+ readonly modelSelection: {
96
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
97
+ readonly model: string;
98
+ readonly options?: readonly {
99
+ readonly id: string;
100
+ readonly value: string | boolean;
101
+ }[];
102
+ };
103
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
104
+ readonly interactionMode: "default" | "plan";
105
+ readonly branch: string | null;
106
+ readonly worktreePath: string | null;
107
+ readonly latestTurn: {
108
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
109
+ readonly state: "error" | "running" | "interrupted" | "completed";
110
+ readonly requestedAt: string;
111
+ readonly startedAt: string | null;
112
+ readonly completedAt: string | null;
113
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
114
+ readonly sourceProposedPlan?: {
115
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
116
+ readonly planId: string;
117
+ } | undefined;
118
+ } | null;
119
+ readonly createdAt: string;
120
+ readonly updatedAt: string;
121
+ readonly archivedAt: string | null;
122
+ readonly deletedAt: string | null;
123
+ readonly messages: readonly {
124
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
125
+ readonly role: "user" | "assistant" | "system";
126
+ readonly text: string;
127
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
128
+ readonly streaming: boolean;
129
+ readonly createdAt: string;
130
+ readonly updatedAt: string;
131
+ readonly attachments?: readonly {
132
+ readonly type: "image";
133
+ readonly id: string;
134
+ readonly name: string;
135
+ readonly mimeType: string;
136
+ readonly sizeBytes: number;
137
+ }[] | undefined;
138
+ }[];
139
+ readonly proposedPlans: readonly {
140
+ readonly id: string;
141
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
142
+ readonly planMarkdown: string;
143
+ readonly implementedAt: string | null;
144
+ readonly implementationThreadId: (string & import("effect/Brand").Brand<"ThreadId">) | null;
145
+ readonly createdAt: string;
146
+ readonly updatedAt: string;
147
+ }[];
148
+ readonly activities: readonly {
149
+ readonly id: string & import("effect/Brand").Brand<"EventId">;
150
+ readonly tone: "error" | "info" | "tool" | "approval";
151
+ readonly kind: string;
152
+ readonly summary: string;
153
+ readonly payload: unknown;
154
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
155
+ readonly createdAt: string;
156
+ readonly sequence?: number | undefined;
157
+ }[];
158
+ readonly checkpoints: readonly {
159
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
160
+ readonly checkpointTurnCount: number;
161
+ readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
162
+ readonly status: "error" | "ready" | "missing";
163
+ readonly files: readonly {
164
+ readonly path: string;
165
+ readonly kind: string;
166
+ readonly additions: number;
167
+ readonly deletions: number;
168
+ }[];
169
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
170
+ readonly completedAt: string;
171
+ }[];
172
+ readonly session: {
173
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
174
+ readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
175
+ readonly providerName: string | null;
176
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
177
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
178
+ readonly lastError: string | null;
179
+ readonly updatedAt: string;
180
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
181
+ } | null;
182
+ }, import("../rpc/error.ts").RpcError, never>;
183
+ sendThread: (input: import("./service.ts").SendThreadInput, policy?: {
184
+ readonly until: "dispatch" | "visible" | "complete";
185
+ } | undefined) => Effect.Effect<{
186
+ dispatch: {
187
+ readonly sequence: number;
188
+ };
189
+ threadId: string;
190
+ thread?: never;
191
+ } | {
192
+ dispatch: {
193
+ readonly sequence: number;
194
+ };
195
+ threadId: string;
196
+ thread: {
197
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
198
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
199
+ readonly title: string;
200
+ readonly modelSelection: {
201
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
202
+ readonly model: string;
203
+ readonly options?: readonly {
204
+ readonly id: string;
205
+ readonly value: string | boolean;
206
+ }[];
207
+ };
208
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
209
+ readonly interactionMode: "default" | "plan";
210
+ readonly branch: string | null;
211
+ readonly worktreePath: string | null;
212
+ readonly latestTurn: {
213
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
214
+ readonly state: "error" | "running" | "interrupted" | "completed";
215
+ readonly requestedAt: string;
216
+ readonly startedAt: string | null;
217
+ readonly completedAt: string | null;
218
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
219
+ readonly sourceProposedPlan?: {
220
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
221
+ readonly planId: string;
222
+ } | undefined;
223
+ } | null;
224
+ readonly createdAt: string;
225
+ readonly updatedAt: string;
226
+ readonly archivedAt: string | null;
227
+ readonly deletedAt: string | null;
228
+ readonly messages: readonly {
229
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
230
+ readonly role: "user" | "assistant" | "system";
231
+ readonly text: string;
232
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
233
+ readonly streaming: boolean;
234
+ readonly createdAt: string;
235
+ readonly updatedAt: string;
236
+ readonly attachments?: readonly {
237
+ readonly type: "image";
238
+ readonly id: string;
239
+ readonly name: string;
240
+ readonly mimeType: string;
241
+ readonly sizeBytes: number;
242
+ }[] | undefined;
243
+ }[];
244
+ readonly proposedPlans: readonly {
245
+ readonly id: string;
246
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
247
+ readonly planMarkdown: string;
248
+ readonly implementedAt: string | null;
249
+ readonly implementationThreadId: (string & import("effect/Brand").Brand<"ThreadId">) | null;
250
+ readonly createdAt: string;
251
+ readonly updatedAt: string;
252
+ }[];
253
+ readonly activities: readonly {
254
+ readonly id: string & import("effect/Brand").Brand<"EventId">;
255
+ readonly tone: "error" | "info" | "tool" | "approval";
256
+ readonly kind: string;
257
+ readonly summary: string;
258
+ readonly payload: unknown;
259
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
260
+ readonly createdAt: string;
261
+ readonly sequence?: number | undefined;
262
+ }[];
263
+ readonly checkpoints: readonly {
264
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
265
+ readonly checkpointTurnCount: number;
266
+ readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
267
+ readonly status: "error" | "ready" | "missing";
268
+ readonly files: readonly {
269
+ readonly path: string;
270
+ readonly kind: string;
271
+ readonly additions: number;
272
+ readonly deletions: number;
273
+ }[];
274
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
275
+ readonly completedAt: string;
276
+ }[];
277
+ readonly session: {
278
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
279
+ readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
280
+ readonly providerName: string | null;
281
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
282
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
283
+ readonly lastError: string | null;
284
+ readonly updatedAt: string;
285
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
286
+ } | null;
287
+ };
288
+ }, import("../domain/error.ts").ThreadSessionError | import("../rpc/error.ts").RpcError, never>;
289
+ startThread: (startInput: import("./service.ts").StartThreadInput, policy?: {
290
+ readonly until: "dispatch" | "visible" | "complete";
291
+ } | undefined) => Effect.Effect<{
292
+ dispatch: {
293
+ readonly sequence: number;
294
+ };
295
+ project: {
296
+ readonly id: string & import("effect/Brand").Brand<"ProjectId">;
297
+ readonly title: string;
298
+ readonly workspaceRoot: string;
299
+ readonly defaultModelSelection: {
300
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
301
+ readonly model: string;
302
+ readonly options?: readonly {
303
+ readonly id: string;
304
+ readonly value: string | boolean;
305
+ }[];
306
+ } | null;
307
+ readonly scripts: readonly {
308
+ readonly id: string;
309
+ readonly name: string;
310
+ readonly command: string;
311
+ readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
312
+ readonly runOnWorktreeCreate: boolean;
313
+ }[];
314
+ readonly createdAt: string;
315
+ readonly updatedAt: string;
316
+ readonly repositoryIdentity?: {
317
+ readonly canonicalKey: string;
318
+ readonly locator: {
319
+ readonly source: "git-remote";
320
+ readonly remoteName: string;
321
+ readonly remoteUrl: string;
322
+ };
323
+ readonly rootPath?: string;
324
+ readonly displayName?: string;
325
+ readonly provider?: string;
326
+ readonly owner?: string;
327
+ readonly name?: string;
328
+ } | null | undefined;
329
+ };
330
+ threadId: string & import("effect/Brand").Brand<"ThreadId">;
331
+ thread?: never;
332
+ } | {
333
+ dispatch: {
334
+ readonly sequence: number;
335
+ };
336
+ project: {
337
+ readonly id: string & import("effect/Brand").Brand<"ProjectId">;
338
+ readonly title: string;
339
+ readonly workspaceRoot: string;
340
+ readonly defaultModelSelection: {
341
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
342
+ readonly model: string;
343
+ readonly options?: readonly {
344
+ readonly id: string;
345
+ readonly value: string | boolean;
346
+ }[];
347
+ } | null;
348
+ readonly scripts: readonly {
349
+ readonly id: string;
350
+ readonly name: string;
351
+ readonly command: string;
352
+ readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
353
+ readonly runOnWorktreeCreate: boolean;
354
+ }[];
355
+ readonly createdAt: string;
356
+ readonly updatedAt: string;
357
+ readonly repositoryIdentity?: {
358
+ readonly canonicalKey: string;
359
+ readonly locator: {
360
+ readonly source: "git-remote";
361
+ readonly remoteName: string;
362
+ readonly remoteUrl: string;
363
+ };
364
+ readonly rootPath?: string;
365
+ readonly displayName?: string;
366
+ readonly provider?: string;
367
+ readonly owner?: string;
368
+ readonly name?: string;
369
+ } | null | undefined;
370
+ };
371
+ threadId: string & import("effect/Brand").Brand<"ThreadId">;
372
+ thread: {
373
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
374
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
375
+ readonly title: string;
376
+ readonly modelSelection: {
377
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
378
+ readonly model: string;
379
+ readonly options?: readonly {
380
+ readonly id: string;
381
+ readonly value: string | boolean;
382
+ }[];
383
+ };
384
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
385
+ readonly interactionMode: "default" | "plan";
386
+ readonly branch: string | null;
387
+ readonly worktreePath: string | null;
388
+ readonly latestTurn: {
389
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
390
+ readonly state: "error" | "running" | "interrupted" | "completed";
391
+ readonly requestedAt: string;
392
+ readonly startedAt: string | null;
393
+ readonly completedAt: string | null;
394
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
395
+ readonly sourceProposedPlan?: {
396
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
397
+ readonly planId: string;
398
+ } | undefined;
399
+ } | null;
400
+ readonly createdAt: string;
401
+ readonly updatedAt: string;
402
+ readonly archivedAt: string | null;
403
+ readonly deletedAt: string | null;
404
+ readonly messages: readonly {
405
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
406
+ readonly role: "user" | "assistant" | "system";
407
+ readonly text: string;
408
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
409
+ readonly streaming: boolean;
410
+ readonly createdAt: string;
411
+ readonly updatedAt: string;
412
+ readonly attachments?: readonly {
413
+ readonly type: "image";
414
+ readonly id: string;
415
+ readonly name: string;
416
+ readonly mimeType: string;
417
+ readonly sizeBytes: number;
418
+ }[] | undefined;
419
+ }[];
420
+ readonly proposedPlans: readonly {
421
+ readonly id: string;
422
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
423
+ readonly planMarkdown: string;
424
+ readonly implementedAt: string | null;
425
+ readonly implementationThreadId: (string & import("effect/Brand").Brand<"ThreadId">) | null;
426
+ readonly createdAt: string;
427
+ readonly updatedAt: string;
428
+ }[];
429
+ readonly activities: readonly {
430
+ readonly id: string & import("effect/Brand").Brand<"EventId">;
431
+ readonly tone: "error" | "info" | "tool" | "approval";
432
+ readonly kind: string;
433
+ readonly summary: string;
434
+ readonly payload: unknown;
435
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
436
+ readonly createdAt: string;
437
+ readonly sequence?: number | undefined;
438
+ }[];
439
+ readonly checkpoints: readonly {
440
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
441
+ readonly checkpointTurnCount: number;
442
+ readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
443
+ readonly status: "error" | "ready" | "missing";
444
+ readonly files: readonly {
445
+ readonly path: string;
446
+ readonly kind: string;
447
+ readonly additions: number;
448
+ readonly deletions: number;
449
+ }[];
450
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
451
+ readonly completedAt: string;
452
+ }[];
453
+ readonly session: {
454
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
455
+ readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
456
+ readonly providerName: string | null;
457
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
458
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
459
+ readonly lastError: string | null;
460
+ readonly updatedAt: string;
461
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
462
+ } | null;
463
+ };
464
+ }, import("../domain/error.ts").ModelSelectionError | import("../domain/error.ts").ThreadSessionError | import("../rpc/error.ts").RpcError, never>;
465
+ watchThread: (threadId: string) => import("effect/Stream").Stream<import("./service.ts").WaitEvent, import("../domain/error.ts").ThreadSessionError | import("../rpc/error.ts").RpcError, never>;
466
+ waitForThread: (threadId: string) => Effect.Effect<{
467
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
468
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
469
+ readonly title: string;
470
+ readonly modelSelection: {
471
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
472
+ readonly model: string;
473
+ readonly options?: readonly {
474
+ readonly id: string;
475
+ readonly value: string | boolean;
476
+ }[];
477
+ };
478
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
479
+ readonly interactionMode: "default" | "plan";
480
+ readonly branch: string | null;
481
+ readonly worktreePath: string | null;
482
+ readonly latestTurn: {
483
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
484
+ readonly state: "error" | "running" | "interrupted" | "completed";
485
+ readonly requestedAt: string;
486
+ readonly startedAt: string | null;
487
+ readonly completedAt: string | null;
488
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
489
+ readonly sourceProposedPlan?: {
490
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
491
+ readonly planId: string;
492
+ } | undefined;
493
+ } | null;
494
+ readonly createdAt: string;
495
+ readonly updatedAt: string;
496
+ readonly archivedAt: string | null;
497
+ readonly deletedAt: string | null;
498
+ readonly messages: readonly {
499
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
500
+ readonly role: "user" | "assistant" | "system";
501
+ readonly text: string;
502
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
503
+ readonly streaming: boolean;
504
+ readonly createdAt: string;
505
+ readonly updatedAt: string;
506
+ readonly attachments?: readonly {
507
+ readonly type: "image";
508
+ readonly id: string;
509
+ readonly name: string;
510
+ readonly mimeType: string;
511
+ readonly sizeBytes: number;
512
+ }[] | undefined;
513
+ }[];
514
+ readonly proposedPlans: readonly {
515
+ readonly id: string;
516
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
517
+ readonly planMarkdown: string;
518
+ readonly implementedAt: string | null;
519
+ readonly implementationThreadId: (string & import("effect/Brand").Brand<"ThreadId">) | null;
520
+ readonly createdAt: string;
521
+ readonly updatedAt: string;
522
+ }[];
523
+ readonly activities: readonly {
524
+ readonly id: string & import("effect/Brand").Brand<"EventId">;
525
+ readonly tone: "error" | "info" | "tool" | "approval";
526
+ readonly kind: string;
527
+ readonly summary: string;
528
+ readonly payload: unknown;
529
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
530
+ readonly createdAt: string;
531
+ readonly sequence?: number | undefined;
532
+ }[];
533
+ readonly checkpoints: readonly {
534
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
535
+ readonly checkpointTurnCount: number;
536
+ readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
537
+ readonly status: "error" | "ready" | "missing";
538
+ readonly files: readonly {
539
+ readonly path: string;
540
+ readonly kind: string;
541
+ readonly additions: number;
542
+ readonly deletions: number;
543
+ }[];
544
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
545
+ readonly completedAt: string;
546
+ }[];
547
+ readonly session: {
548
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
549
+ readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
550
+ readonly providerName: string | null;
551
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
552
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
553
+ readonly lastError: string | null;
554
+ readonly updatedAt: string;
555
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
556
+ } | null;
557
+ }, import("../domain/error.ts").ThreadSessionError | import("../rpc/error.ts").RpcError, never>;
558
+ loadShell: () => Effect.Effect<{
559
+ readonly snapshotSequence: number;
560
+ readonly projects: readonly {
561
+ readonly id: string & import("effect/Brand").Brand<"ProjectId">;
562
+ readonly title: string;
563
+ readonly workspaceRoot: string;
564
+ readonly defaultModelSelection: {
565
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
566
+ readonly model: string;
567
+ readonly options?: readonly {
568
+ readonly id: string;
569
+ readonly value: string | boolean;
570
+ }[];
571
+ } | null;
572
+ readonly scripts: readonly {
573
+ readonly id: string;
574
+ readonly name: string;
575
+ readonly command: string;
576
+ readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
577
+ readonly runOnWorktreeCreate: boolean;
578
+ }[];
579
+ readonly createdAt: string;
580
+ readonly updatedAt: string;
581
+ readonly repositoryIdentity?: {
582
+ readonly canonicalKey: string;
583
+ readonly locator: {
584
+ readonly source: "git-remote";
585
+ readonly remoteName: string;
586
+ readonly remoteUrl: string;
587
+ };
588
+ readonly rootPath?: string;
589
+ readonly displayName?: string;
590
+ readonly provider?: string;
591
+ readonly owner?: string;
592
+ readonly name?: string;
593
+ } | null | undefined;
594
+ }[];
595
+ readonly threads: readonly {
596
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
597
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
598
+ readonly title: string;
599
+ readonly modelSelection: {
600
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
601
+ readonly model: string;
602
+ readonly options?: readonly {
603
+ readonly id: string;
604
+ readonly value: string | boolean;
605
+ }[];
606
+ };
607
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
608
+ readonly interactionMode: "default" | "plan";
609
+ readonly branch: string | null;
610
+ readonly worktreePath: string | null;
611
+ readonly latestTurn: {
612
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
613
+ readonly state: "error" | "running" | "interrupted" | "completed";
614
+ readonly requestedAt: string;
615
+ readonly startedAt: string | null;
616
+ readonly completedAt: string | null;
617
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
618
+ readonly sourceProposedPlan?: {
619
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
620
+ readonly planId: string;
621
+ } | undefined;
622
+ } | null;
623
+ readonly createdAt: string;
624
+ readonly updatedAt: string;
625
+ readonly archivedAt: string | null;
626
+ readonly session: {
627
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
628
+ readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
629
+ readonly providerName: string | null;
630
+ readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
631
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
632
+ readonly lastError: string | null;
633
+ readonly updatedAt: string;
634
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
635
+ } | null;
636
+ readonly latestUserMessageAt: string | null;
637
+ readonly hasPendingApprovals: boolean;
638
+ readonly hasPendingUserInput: boolean;
639
+ readonly hasActionableProposedPlan: boolean;
640
+ }[];
641
+ readonly updatedAt: string;
642
+ }, import("../rpc/error.ts").RpcError, never>;
643
+ addProject: (projectInput: {
644
+ readonly path: string;
645
+ readonly title?: string;
646
+ }) => Effect.Effect<{
647
+ dispatch: {
648
+ readonly sequence: number;
649
+ };
650
+ project: {
651
+ readonly id: string & import("effect/Brand").Brand<"ProjectId">;
652
+ readonly title: string;
653
+ readonly workspaceRoot: string;
654
+ readonly defaultModelSelection: {
655
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
656
+ readonly model: string;
657
+ readonly options?: readonly {
658
+ readonly id: string;
659
+ readonly value: string | boolean;
660
+ }[];
661
+ } | null;
662
+ readonly scripts: readonly {
663
+ readonly id: string;
664
+ readonly name: string;
665
+ readonly command: string;
666
+ readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
667
+ readonly runOnWorktreeCreate: boolean;
668
+ }[];
669
+ readonly createdAt: string;
670
+ readonly updatedAt: string;
671
+ readonly repositoryIdentity?: {
672
+ readonly canonicalKey: string;
673
+ readonly locator: {
674
+ readonly source: "git-remote";
675
+ readonly remoteName: string;
676
+ readonly remoteUrl: string;
677
+ };
678
+ readonly rootPath?: string;
679
+ readonly displayName?: string;
680
+ readonly provider?: string;
681
+ readonly owner?: string;
682
+ readonly name?: string;
683
+ } | null | undefined;
684
+ };
685
+ }, import("../domain/error.ts").ProjectCreateVisibilityError | import("../rpc/error.ts").RpcError, never>;
686
+ listModels: (input: {
687
+ readonly all?: boolean;
688
+ readonly provider?: string;
689
+ }) => Effect.Effect<{
690
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
691
+ readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
692
+ readonly enabled: boolean;
693
+ readonly installed: boolean;
694
+ readonly version: string | null;
695
+ readonly status: "error" | "ready" | "warning" | "disabled";
696
+ readonly auth: {
697
+ readonly status: "authenticated" | "unknown" | "unauthenticated";
698
+ readonly type?: string | undefined;
699
+ readonly label?: string | undefined;
700
+ readonly email?: string | undefined;
701
+ };
702
+ readonly checkedAt: string;
703
+ readonly models: readonly {
704
+ readonly slug: string;
705
+ readonly name: string;
706
+ readonly isCustom: boolean;
707
+ readonly capabilities: {
708
+ readonly optionDescriptors?: readonly ({
709
+ readonly type: "select";
710
+ readonly options: readonly {
711
+ readonly id: string;
712
+ readonly label: string;
713
+ readonly description?: string | undefined;
714
+ readonly isDefault?: boolean | undefined;
715
+ }[];
716
+ readonly id: string;
717
+ readonly label: string;
718
+ readonly currentValue?: string | undefined;
719
+ readonly promptInjectedValues?: readonly string[] | undefined;
720
+ readonly description?: string | undefined;
721
+ } | {
722
+ readonly type: "boolean";
723
+ readonly id: string;
724
+ readonly label: string;
725
+ readonly currentValue?: boolean | undefined;
726
+ readonly description?: string | undefined;
727
+ })[] | undefined;
728
+ } | null;
729
+ readonly shortName?: string | undefined;
730
+ readonly subProvider?: string | undefined;
731
+ }[];
732
+ readonly slashCommands: readonly {
733
+ readonly name: string;
734
+ readonly description?: string | undefined;
735
+ readonly input?: {
736
+ readonly hint: string;
737
+ } | undefined;
738
+ }[];
739
+ readonly skills: readonly {
740
+ readonly name: string;
741
+ readonly path: string;
742
+ readonly enabled: boolean;
743
+ readonly description?: string | undefined;
744
+ readonly scope?: string | undefined;
745
+ readonly displayName?: string | undefined;
746
+ readonly shortDescription?: string | undefined;
747
+ }[];
748
+ readonly displayName?: string | undefined;
749
+ readonly accentColor?: string | undefined;
750
+ readonly badgeLabel?: string | undefined;
751
+ readonly continuation?: {
752
+ readonly groupKey: string;
753
+ } | undefined;
754
+ readonly showInteractionModeToggle?: boolean | undefined;
755
+ readonly message?: string | undefined;
756
+ readonly availability?: "available" | "unavailable" | undefined;
757
+ readonly unavailableReason?: string | undefined;
758
+ readonly versionAdvisory?: {
759
+ readonly status: "unknown" | "current" | "behind_latest";
760
+ readonly currentVersion: string | null;
761
+ readonly latestVersion: string | null;
762
+ readonly updateCommand: string | null;
763
+ readonly canUpdate: boolean;
764
+ readonly checkedAt: string | null;
765
+ readonly message: string | null;
766
+ };
767
+ readonly updateState?: {
768
+ readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
769
+ readonly startedAt: string | null;
770
+ readonly finishedAt: string | null;
771
+ readonly message: string | null;
772
+ readonly output: string | null;
773
+ };
774
+ }[], import("../rpc/error.ts").RpcError, never>;
775
+ }, never, import("../environment/service.ts").Environment | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration | import("effect/Crypto").Crypto>;
776
+ export declare const T3ApplicationLive: Layer.Layer<T3Application, never, import("../environment/service.ts").Environment | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration | import("effect/Crypto").Crypto>;