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