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,330 @@
1
+ import * as Schema from "effect/Schema";
2
+ /**
3
+ * Client-side id for the first shell opened on a thread. Ids are uniformly
4
+ * `term-N`; there's no "default" intrinsic. Kept as a named constant so callers
5
+ * that want "the primary shell" don't hardcode `"term-1"`.
6
+ */
7
+ export declare const DEFAULT_TERMINAL_ID = "term-1";
8
+ export declare const TerminalThreadInput: Schema.Struct<{
9
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
10
+ }>;
11
+ export type TerminalThreadInput = typeof TerminalThreadInput.Type;
12
+ /** Terminal ids are ALWAYS chosen by the client and sent explicitly — no server-side allocation. */
13
+ declare const TerminalSessionInput: Schema.Struct<{
14
+ readonly terminalId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
15
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
16
+ }>;
17
+ export type TerminalSessionInput = Schema.Codec.Encoded<typeof TerminalSessionInput>;
18
+ export declare const TerminalOpenInput: Schema.Struct<{
19
+ readonly cwd: Schema.decodeTo<Schema.String, Schema.String, never, never>;
20
+ readonly worktreePath: Schema.optional<Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>>;
21
+ readonly cols: Schema.optional<Schema.Int>;
22
+ readonly rows: Schema.optional<Schema.Int>;
23
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
24
+ readonly terminalId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
25
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
26
+ }>;
27
+ export type TerminalOpenInput = Schema.Codec.Encoded<typeof TerminalOpenInput>;
28
+ export declare const TerminalAttachInput: Schema.Struct<{
29
+ readonly cwd: Schema.optional<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
30
+ readonly worktreePath: Schema.optional<Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>>;
31
+ readonly cols: Schema.optional<Schema.Int>;
32
+ readonly rows: Schema.optional<Schema.Int>;
33
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
34
+ readonly restartIfNotRunning: Schema.optional<Schema.Boolean>;
35
+ readonly terminalId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
36
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
37
+ }>;
38
+ export type TerminalAttachInput = Schema.Codec.Encoded<typeof TerminalAttachInput>;
39
+ export declare const TerminalWriteInput: Schema.Struct<{
40
+ readonly data: Schema.String;
41
+ readonly terminalId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
42
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
43
+ }>;
44
+ export type TerminalWriteInput = Schema.Codec.Encoded<typeof TerminalWriteInput>;
45
+ export declare const TerminalResizeInput: Schema.Struct<{
46
+ readonly cols: Schema.Int;
47
+ readonly rows: Schema.Int;
48
+ readonly terminalId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
49
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
50
+ }>;
51
+ export type TerminalResizeInput = Schema.Codec.Encoded<typeof TerminalResizeInput>;
52
+ export declare const TerminalClearInput: Schema.Struct<{
53
+ readonly terminalId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
54
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
55
+ }>;
56
+ export type TerminalClearInput = Schema.Codec.Encoded<typeof TerminalClearInput>;
57
+ export declare const TerminalRestartInput: Schema.Struct<{
58
+ readonly cwd: Schema.decodeTo<Schema.String, Schema.String, never, never>;
59
+ readonly worktreePath: Schema.optional<Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>>;
60
+ readonly cols: Schema.Int;
61
+ readonly rows: Schema.Int;
62
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
63
+ readonly terminalId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
64
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
65
+ }>;
66
+ export type TerminalRestartInput = Schema.Codec.Encoded<typeof TerminalRestartInput>;
67
+ export declare const TerminalCloseInput: Schema.Struct<{
68
+ readonly terminalId: Schema.optional<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
69
+ readonly deleteHistory: Schema.optional<Schema.Boolean>;
70
+ readonly threadId: Schema.decodeTo<Schema.String, Schema.String, never, never>;
71
+ }>;
72
+ export type TerminalCloseInput = typeof TerminalCloseInput.Type;
73
+ export declare const TerminalSessionStatus: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
74
+ export type TerminalSessionStatus = typeof TerminalSessionStatus.Type;
75
+ export declare const TerminalSessionSnapshot: Schema.Struct<{
76
+ readonly threadId: Schema.String;
77
+ readonly terminalId: Schema.String;
78
+ readonly cwd: Schema.String;
79
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
80
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
81
+ readonly pid: Schema.NullOr<Schema.Int>;
82
+ readonly history: Schema.String;
83
+ readonly exitCode: Schema.NullOr<Schema.Int>;
84
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
85
+ /** Server-computed display title (idle shell vs subprocess command). */
86
+ readonly label: Schema.String;
87
+ readonly updatedAt: Schema.String;
88
+ readonly sequence: Schema.optional<Schema.Int>;
89
+ }>;
90
+ export type TerminalSessionSnapshot = typeof TerminalSessionSnapshot.Type;
91
+ export declare const TerminalSummary: Schema.Struct<{
92
+ readonly threadId: Schema.String;
93
+ readonly terminalId: Schema.String;
94
+ readonly cwd: Schema.String;
95
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
96
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
97
+ readonly pid: Schema.NullOr<Schema.Int>;
98
+ readonly exitCode: Schema.NullOr<Schema.Int>;
99
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
100
+ readonly hasRunningSubprocess: Schema.Boolean;
101
+ /** Server-computed display title (idle shell vs subprocess command). */
102
+ readonly label: Schema.String;
103
+ readonly updatedAt: Schema.String;
104
+ }>;
105
+ export type TerminalSummary = typeof TerminalSummary.Type;
106
+ export declare const TerminalMetadataStreamEvent: Schema.Union<readonly [Schema.Struct<{
107
+ readonly type: Schema.Literal<"snapshot">;
108
+ readonly terminals: Schema.$Array<Schema.Struct<{
109
+ readonly threadId: Schema.String;
110
+ readonly terminalId: Schema.String;
111
+ readonly cwd: Schema.String;
112
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
113
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
114
+ readonly pid: Schema.NullOr<Schema.Int>;
115
+ readonly exitCode: Schema.NullOr<Schema.Int>;
116
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
117
+ readonly hasRunningSubprocess: Schema.Boolean;
118
+ /** Server-computed display title (idle shell vs subprocess command). */
119
+ readonly label: Schema.String;
120
+ readonly updatedAt: Schema.String;
121
+ }>>;
122
+ }>, Schema.Struct<{
123
+ readonly type: Schema.Literal<"upsert">;
124
+ readonly terminal: Schema.Struct<{
125
+ readonly threadId: Schema.String;
126
+ readonly terminalId: Schema.String;
127
+ readonly cwd: Schema.String;
128
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
129
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
130
+ readonly pid: Schema.NullOr<Schema.Int>;
131
+ readonly exitCode: Schema.NullOr<Schema.Int>;
132
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
133
+ readonly hasRunningSubprocess: Schema.Boolean;
134
+ /** Server-computed display title (idle shell vs subprocess command). */
135
+ readonly label: Schema.String;
136
+ readonly updatedAt: Schema.String;
137
+ }>;
138
+ }>, Schema.Struct<{
139
+ readonly type: Schema.Literal<"remove">;
140
+ readonly threadId: Schema.String;
141
+ readonly terminalId: Schema.String;
142
+ }>]>;
143
+ export type TerminalMetadataStreamEvent = typeof TerminalMetadataStreamEvent.Type;
144
+ export declare const TerminalEvent: Schema.Union<readonly [Schema.Struct<{
145
+ readonly type: Schema.Literal<"started">;
146
+ readonly snapshot: Schema.Struct<{
147
+ readonly threadId: Schema.String;
148
+ readonly terminalId: Schema.String;
149
+ readonly cwd: Schema.String;
150
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
151
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
152
+ readonly pid: Schema.NullOr<Schema.Int>;
153
+ readonly history: Schema.String;
154
+ readonly exitCode: Schema.NullOr<Schema.Int>;
155
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
156
+ /** Server-computed display title (idle shell vs subprocess command). */
157
+ readonly label: Schema.String;
158
+ readonly updatedAt: Schema.String;
159
+ readonly sequence: Schema.optional<Schema.Int>;
160
+ }>;
161
+ readonly threadId: Schema.String;
162
+ readonly terminalId: Schema.String;
163
+ readonly sequence: Schema.optional<Schema.Int>;
164
+ }>, Schema.Struct<{
165
+ readonly type: Schema.Literal<"output">;
166
+ readonly data: Schema.String;
167
+ readonly threadId: Schema.String;
168
+ readonly terminalId: Schema.String;
169
+ readonly sequence: Schema.optional<Schema.Int>;
170
+ }>, Schema.Struct<{
171
+ readonly type: Schema.Literal<"exited">;
172
+ readonly exitCode: Schema.NullOr<Schema.Int>;
173
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
174
+ readonly threadId: Schema.String;
175
+ readonly terminalId: Schema.String;
176
+ readonly sequence: Schema.optional<Schema.Int>;
177
+ }>, Schema.Struct<{
178
+ readonly type: Schema.Literal<"closed">;
179
+ readonly threadId: Schema.String;
180
+ readonly terminalId: Schema.String;
181
+ readonly sequence: Schema.optional<Schema.Int>;
182
+ }>, Schema.Struct<{
183
+ readonly type: Schema.Literal<"error">;
184
+ readonly message: Schema.String;
185
+ readonly threadId: Schema.String;
186
+ readonly terminalId: Schema.String;
187
+ readonly sequence: Schema.optional<Schema.Int>;
188
+ }>, Schema.Struct<{
189
+ readonly type: Schema.Literal<"cleared">;
190
+ readonly threadId: Schema.String;
191
+ readonly terminalId: Schema.String;
192
+ readonly sequence: Schema.optional<Schema.Int>;
193
+ }>, Schema.Struct<{
194
+ readonly type: Schema.Literal<"restarted">;
195
+ readonly snapshot: Schema.Struct<{
196
+ readonly threadId: Schema.String;
197
+ readonly terminalId: Schema.String;
198
+ readonly cwd: Schema.String;
199
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
200
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
201
+ readonly pid: Schema.NullOr<Schema.Int>;
202
+ readonly history: Schema.String;
203
+ readonly exitCode: Schema.NullOr<Schema.Int>;
204
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
205
+ /** Server-computed display title (idle shell vs subprocess command). */
206
+ readonly label: Schema.String;
207
+ readonly updatedAt: Schema.String;
208
+ readonly sequence: Schema.optional<Schema.Int>;
209
+ }>;
210
+ readonly threadId: Schema.String;
211
+ readonly terminalId: Schema.String;
212
+ readonly sequence: Schema.optional<Schema.Int>;
213
+ }>, Schema.Struct<{
214
+ readonly type: Schema.Literal<"activity">;
215
+ readonly hasRunningSubprocess: Schema.Boolean;
216
+ readonly label: Schema.String;
217
+ readonly threadId: Schema.String;
218
+ readonly terminalId: Schema.String;
219
+ readonly sequence: Schema.optional<Schema.Int>;
220
+ }>]>;
221
+ export type TerminalEvent = typeof TerminalEvent.Type;
222
+ export declare const TerminalAttachStreamEvent: Schema.Union<readonly [Schema.Struct<{
223
+ readonly type: Schema.Literal<"snapshot">;
224
+ readonly snapshot: Schema.Struct<{
225
+ readonly threadId: Schema.String;
226
+ readonly terminalId: Schema.String;
227
+ readonly cwd: Schema.String;
228
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
229
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
230
+ readonly pid: Schema.NullOr<Schema.Int>;
231
+ readonly history: Schema.String;
232
+ readonly exitCode: Schema.NullOr<Schema.Int>;
233
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
234
+ /** Server-computed display title (idle shell vs subprocess command). */
235
+ readonly label: Schema.String;
236
+ readonly updatedAt: Schema.String;
237
+ readonly sequence: Schema.optional<Schema.Int>;
238
+ }>;
239
+ }>, Schema.Struct<{
240
+ readonly type: Schema.Literal<"output">;
241
+ readonly data: Schema.String;
242
+ readonly threadId: Schema.String;
243
+ readonly terminalId: Schema.String;
244
+ readonly sequence: Schema.optional<Schema.Int>;
245
+ }>, Schema.Struct<{
246
+ readonly type: Schema.Literal<"exited">;
247
+ readonly exitCode: Schema.NullOr<Schema.Int>;
248
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
249
+ readonly threadId: Schema.String;
250
+ readonly terminalId: Schema.String;
251
+ readonly sequence: Schema.optional<Schema.Int>;
252
+ }>, Schema.Struct<{
253
+ readonly type: Schema.Literal<"closed">;
254
+ readonly threadId: Schema.String;
255
+ readonly terminalId: Schema.String;
256
+ readonly sequence: Schema.optional<Schema.Int>;
257
+ }>, Schema.Struct<{
258
+ readonly type: Schema.Literal<"error">;
259
+ readonly message: Schema.String;
260
+ readonly threadId: Schema.String;
261
+ readonly terminalId: Schema.String;
262
+ readonly sequence: Schema.optional<Schema.Int>;
263
+ }>, Schema.Struct<{
264
+ readonly type: Schema.Literal<"cleared">;
265
+ readonly threadId: Schema.String;
266
+ readonly terminalId: Schema.String;
267
+ readonly sequence: Schema.optional<Schema.Int>;
268
+ }>, Schema.Struct<{
269
+ readonly type: Schema.Literal<"restarted">;
270
+ readonly snapshot: Schema.Struct<{
271
+ readonly threadId: Schema.String;
272
+ readonly terminalId: Schema.String;
273
+ readonly cwd: Schema.String;
274
+ readonly worktreePath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
275
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
276
+ readonly pid: Schema.NullOr<Schema.Int>;
277
+ readonly history: Schema.String;
278
+ readonly exitCode: Schema.NullOr<Schema.Int>;
279
+ readonly exitSignal: Schema.NullOr<Schema.Int>;
280
+ /** Server-computed display title (idle shell vs subprocess command). */
281
+ readonly label: Schema.String;
282
+ readonly updatedAt: Schema.String;
283
+ readonly sequence: Schema.optional<Schema.Int>;
284
+ }>;
285
+ readonly threadId: Schema.String;
286
+ readonly terminalId: Schema.String;
287
+ readonly sequence: Schema.optional<Schema.Int>;
288
+ }>, Schema.Struct<{
289
+ readonly type: Schema.Literal<"activity">;
290
+ readonly hasRunningSubprocess: Schema.Boolean;
291
+ readonly label: Schema.String;
292
+ readonly threadId: Schema.String;
293
+ readonly terminalId: Schema.String;
294
+ readonly sequence: Schema.optional<Schema.Int>;
295
+ }>]>;
296
+ export type TerminalAttachStreamEvent = typeof TerminalAttachStreamEvent.Type;
297
+ declare const TerminalCwdError_base: Schema.Class<TerminalCwdError, Schema.TaggedStruct<"TerminalCwdError", {
298
+ readonly cwd: Schema.String;
299
+ readonly reason: Schema.Literals<readonly ["notFound", "notDirectory", "statFailed"]>;
300
+ readonly cause: Schema.optional<Schema.Defect>;
301
+ }>, import("effect/Cause").YieldableError>;
302
+ export declare class TerminalCwdError extends TerminalCwdError_base {
303
+ get message(): string;
304
+ }
305
+ declare const TerminalHistoryError_base: Schema.Class<TerminalHistoryError, Schema.TaggedStruct<"TerminalHistoryError", {
306
+ readonly operation: Schema.Literals<readonly ["read", "truncate", "migrate"]>;
307
+ readonly threadId: Schema.String;
308
+ readonly terminalId: Schema.String;
309
+ readonly cause: Schema.optional<Schema.Defect>;
310
+ }>, import("effect/Cause").YieldableError>;
311
+ export declare class TerminalHistoryError extends TerminalHistoryError_base {
312
+ get message(): string;
313
+ }
314
+ declare const TerminalSessionLookupError_base: Schema.Class<TerminalSessionLookupError, Schema.TaggedStruct<"TerminalSessionLookupError", {
315
+ readonly threadId: Schema.String;
316
+ readonly terminalId: Schema.String;
317
+ }>, import("effect/Cause").YieldableError>;
318
+ export declare class TerminalSessionLookupError extends TerminalSessionLookupError_base {
319
+ get message(): string;
320
+ }
321
+ declare const TerminalNotRunningError_base: Schema.Class<TerminalNotRunningError, Schema.TaggedStruct<"TerminalNotRunningError", {
322
+ readonly threadId: Schema.String;
323
+ readonly terminalId: Schema.String;
324
+ }>, import("effect/Cause").YieldableError>;
325
+ export declare class TerminalNotRunningError extends TerminalNotRunningError_base {
326
+ get message(): string;
327
+ }
328
+ export declare const TerminalError: Schema.Union<readonly [typeof TerminalCwdError, typeof TerminalHistoryError, typeof TerminalSessionLookupError, typeof TerminalNotRunningError]>;
329
+ export type TerminalError = typeof TerminalError.Type;
330
+ export {};
@@ -0,0 +1,148 @@
1
+ import * as Schema from "effect/Schema";
2
+ export declare const VcsDriverKind: Schema.Literals<readonly ["git", "jj", "unknown"]>;
3
+ export type VcsDriverKind = typeof VcsDriverKind.Type;
4
+ export declare const VcsFreshnessSource: Schema.Literals<readonly ["live-local", "cached-local", "cached-remote", "explicit-remote"]>;
5
+ export type VcsFreshnessSource = typeof VcsFreshnessSource.Type;
6
+ export declare const VcsFreshness: Schema.Struct<{
7
+ readonly source: Schema.Literals<readonly ["live-local", "cached-local", "cached-remote", "explicit-remote"]>;
8
+ readonly observedAt: Schema.DateTimeUtc;
9
+ readonly expiresAt: Schema.Option<Schema.DateTimeUtc>;
10
+ }>;
11
+ export type VcsFreshness = typeof VcsFreshness.Type;
12
+ export declare const VcsDriverCapabilities: Schema.Struct<{
13
+ readonly kind: Schema.Literals<readonly ["git", "jj", "unknown"]>;
14
+ readonly supportsWorktrees: Schema.Boolean;
15
+ readonly supportsBookmarks: Schema.Boolean;
16
+ readonly supportsAtomicSnapshot: Schema.Boolean;
17
+ readonly supportsPushDefaultRemote: Schema.Boolean;
18
+ readonly ignoreClassifier: Schema.Literals<readonly ["native", "git-compatible-fallback"]>;
19
+ }>;
20
+ export type VcsDriverCapabilities = typeof VcsDriverCapabilities.Type;
21
+ export declare const VcsRepositoryIdentity: Schema.Struct<{
22
+ readonly kind: Schema.Literals<readonly ["git", "jj", "unknown"]>;
23
+ readonly rootPath: Schema.decodeTo<Schema.String, Schema.String, never, never>;
24
+ readonly metadataPath: Schema.NullOr<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
25
+ readonly freshness: Schema.Struct<{
26
+ readonly source: Schema.Literals<readonly ["live-local", "cached-local", "cached-remote", "explicit-remote"]>;
27
+ readonly observedAt: Schema.DateTimeUtc;
28
+ readonly expiresAt: Schema.Option<Schema.DateTimeUtc>;
29
+ }>;
30
+ }>;
31
+ export type VcsRepositoryIdentity = typeof VcsRepositoryIdentity.Type;
32
+ export declare const VcsListWorkspaceFilesResult: Schema.Struct<{
33
+ readonly paths: Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
34
+ readonly truncated: Schema.Boolean;
35
+ readonly freshness: Schema.Struct<{
36
+ readonly source: Schema.Literals<readonly ["live-local", "cached-local", "cached-remote", "explicit-remote"]>;
37
+ readonly observedAt: Schema.DateTimeUtc;
38
+ readonly expiresAt: Schema.Option<Schema.DateTimeUtc>;
39
+ }>;
40
+ }>;
41
+ export type VcsListWorkspaceFilesResult = typeof VcsListWorkspaceFilesResult.Type;
42
+ export declare const VcsRemote: Schema.Struct<{
43
+ readonly name: Schema.decodeTo<Schema.String, Schema.String, never, never>;
44
+ readonly url: Schema.decodeTo<Schema.String, Schema.String, never, never>;
45
+ readonly pushUrl: Schema.Option<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
46
+ readonly isPrimary: Schema.Boolean;
47
+ }>;
48
+ export type VcsRemote = typeof VcsRemote.Type;
49
+ export declare const VcsListRemotesResult: Schema.Struct<{
50
+ readonly remotes: Schema.$Array<Schema.Struct<{
51
+ readonly name: Schema.decodeTo<Schema.String, Schema.String, never, never>;
52
+ readonly url: Schema.decodeTo<Schema.String, Schema.String, never, never>;
53
+ readonly pushUrl: Schema.Option<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
54
+ readonly isPrimary: Schema.Boolean;
55
+ }>>;
56
+ readonly freshness: Schema.Struct<{
57
+ readonly source: Schema.Literals<readonly ["live-local", "cached-local", "cached-remote", "explicit-remote"]>;
58
+ readonly observedAt: Schema.DateTimeUtc;
59
+ readonly expiresAt: Schema.Option<Schema.DateTimeUtc>;
60
+ }>;
61
+ }>;
62
+ export type VcsListRemotesResult = typeof VcsListRemotesResult.Type;
63
+ export interface VcsProcessErrorContext {
64
+ readonly operation: string;
65
+ readonly command: string;
66
+ readonly cwd: string;
67
+ }
68
+ export interface VcsProcessSpawnFailure {
69
+ readonly cause: unknown;
70
+ }
71
+ export interface VcsProcessStdinFailure {
72
+ readonly cause: unknown;
73
+ }
74
+ export interface VcsProcessReadFailure {
75
+ readonly stream: "stdout" | "stderr" | "exitCode";
76
+ readonly cause: unknown;
77
+ }
78
+ export interface VcsProcessOutputLimitFailure {
79
+ readonly stream: "stdout" | "stderr";
80
+ readonly maxBytes: number;
81
+ }
82
+ export interface VcsProcessTimeoutFailure {
83
+ readonly timeoutMs: number;
84
+ }
85
+ declare const VcsProcessSpawnError_base: Schema.Class<VcsProcessSpawnError, Schema.TaggedStruct<"VcsProcessSpawnError", {
86
+ readonly operation: Schema.String;
87
+ readonly command: Schema.String;
88
+ readonly cwd: Schema.String;
89
+ readonly cause: Schema.Defect;
90
+ }>, import("effect/Cause").YieldableError>;
91
+ export declare class VcsProcessSpawnError extends VcsProcessSpawnError_base {
92
+ get message(): string;
93
+ static fromProcessSpawnError(context: VcsProcessErrorContext, error: VcsProcessSpawnFailure): VcsProcessSpawnError;
94
+ }
95
+ declare const VcsProcessExitError_base: Schema.Class<VcsProcessExitError, Schema.TaggedStruct<"VcsProcessExitError", {
96
+ readonly operation: Schema.String;
97
+ readonly command: Schema.String;
98
+ readonly cwd: Schema.String;
99
+ readonly exitCode: Schema.Number;
100
+ readonly detail: Schema.String;
101
+ }>, import("effect/Cause").YieldableError>;
102
+ export declare class VcsProcessExitError extends VcsProcessExitError_base {
103
+ get message(): string;
104
+ }
105
+ declare const VcsProcessTimeoutError_base: Schema.Class<VcsProcessTimeoutError, Schema.TaggedStruct<"VcsProcessTimeoutError", {
106
+ readonly operation: Schema.String;
107
+ readonly command: Schema.String;
108
+ readonly cwd: Schema.String;
109
+ readonly timeoutMs: Schema.Number;
110
+ }>, import("effect/Cause").YieldableError>;
111
+ export declare class VcsProcessTimeoutError extends VcsProcessTimeoutError_base {
112
+ get message(): string;
113
+ static fromProcessTimeoutError(context: VcsProcessErrorContext, error: VcsProcessTimeoutFailure): VcsProcessTimeoutError;
114
+ }
115
+ declare const VcsOutputDecodeError_base: Schema.Class<VcsOutputDecodeError, Schema.TaggedStruct<"VcsOutputDecodeError", {
116
+ readonly operation: Schema.String;
117
+ readonly command: Schema.String;
118
+ readonly cwd: Schema.String;
119
+ readonly detail: Schema.String;
120
+ readonly cause: Schema.optional<Schema.Defect>;
121
+ }>, import("effect/Cause").YieldableError>;
122
+ export declare class VcsOutputDecodeError extends VcsOutputDecodeError_base {
123
+ get message(): string;
124
+ static fromProcessStdinError(context: VcsProcessErrorContext, error: VcsProcessStdinFailure): VcsOutputDecodeError;
125
+ static fromProcessReadError(context: VcsProcessErrorContext, error: VcsProcessReadFailure): VcsOutputDecodeError;
126
+ static fromProcessOutputLimitError(context: VcsProcessErrorContext, error: VcsProcessOutputLimitFailure): VcsOutputDecodeError;
127
+ static missingExitCode(context: VcsProcessErrorContext): VcsOutputDecodeError;
128
+ }
129
+ declare const VcsRepositoryDetectionError_base: Schema.Class<VcsRepositoryDetectionError, Schema.TaggedStruct<"VcsRepositoryDetectionError", {
130
+ readonly operation: Schema.String;
131
+ readonly cwd: Schema.String;
132
+ readonly detail: Schema.String;
133
+ readonly cause: Schema.optional<Schema.Defect>;
134
+ }>, import("effect/Cause").YieldableError>;
135
+ export declare class VcsRepositoryDetectionError extends VcsRepositoryDetectionError_base {
136
+ get message(): string;
137
+ }
138
+ declare const VcsUnsupportedOperationError_base: Schema.Class<VcsUnsupportedOperationError, Schema.TaggedStruct<"VcsUnsupportedOperationError", {
139
+ readonly operation: Schema.String;
140
+ readonly kind: Schema.Literals<readonly ["git", "jj", "unknown"]>;
141
+ readonly detail: Schema.String;
142
+ }>, import("effect/Cause").YieldableError>;
143
+ export declare class VcsUnsupportedOperationError extends VcsUnsupportedOperationError_base {
144
+ get message(): string;
145
+ }
146
+ export declare const VcsError: Schema.Union<readonly [typeof VcsProcessSpawnError, typeof VcsProcessExitError, typeof VcsProcessTimeoutError, typeof VcsOutputDecodeError, typeof VcsRepositoryDetectionError, typeof VcsUnsupportedOperationError]>;
147
+ export type VcsError = typeof VcsError.Type;
148
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "t3code-cli",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "CLI for t3code",
5
5
  "keywords": [
6
6
  "claude",
@@ -26,18 +26,26 @@
26
26
  "src"
27
27
  ],
28
28
  "type": "module",
29
+ "types": "./dist/src/index.d.ts",
30
+ "imports": {
31
+ "#t3tools/contracts": {
32
+ "types": "./dist/upstream-t3code/packages/contracts/src/index.d.ts",
33
+ "default": "./dist/upstream-t3code/packages/contracts/src/index.d.ts"
34
+ }
35
+ },
29
36
  "exports": {
30
37
  ".": {
31
- "import": "./dist/index.js",
32
- "types": "./src/index.ts"
38
+ "types": "./dist/src/index.d.ts",
39
+ "default": "./dist/index.js"
33
40
  }
34
41
  },
35
- "dependencies": {},
42
+ "dependencies": {
43
+ "@effect/platform-node": "4.0.0-beta.74",
44
+ "effect": "4.0.0-beta.74"
45
+ },
36
46
  "devDependencies": {
37
47
  "@changesets/cli": "^2.31.0",
38
- "@effect/platform-node": "4.0.0-beta.74",
39
48
  "@types/node": "^25.9.1",
40
- "effect": "4.0.0-beta.74",
41
49
  "typescript": "^6.0.3",
42
50
  "vite-plus": "^0.1.24",
43
51
  "@t3tools/contracts": "0.0.24"
@@ -46,7 +54,7 @@
46
54
  "node": "^24.0.0"
47
55
  },
48
56
  "scripts": {
49
- "build": "vp pack",
57
+ "build": "vp pack && tsc -p tsconfig.dts.json",
50
58
  "check": "vp check",
51
59
  "format": "vp fmt",
52
60
  "format:check": "vp fmt --check",
@@ -1,6 +1,6 @@
1
1
  import * as Effect from "effect/Effect";
2
- import { ModelSelection, ProviderInstanceId } from "@t3tools/contracts";
3
- import type { OrchestrationProjectShell } from "@t3tools/contracts";
2
+ import { ModelSelection, ProviderInstanceId } from "#t3tools/contracts";
3
+ import type { OrchestrationProjectShell } from "#t3tools/contracts";
4
4
  import * as Schema from "effect/Schema";
5
5
 
6
6
  import { ModelSelectionError } from "../domain/error.ts";
@@ -2,7 +2,7 @@ import * as Crypto from "effect/Crypto";
2
2
  import * as DateTime from "effect/DateTime";
3
3
  import * as Effect from "effect/Effect";
4
4
  import * as Path from "effect/Path";
5
- import { CommandId, ProjectId, type ClientOrchestrationCommand } from "@t3tools/contracts";
5
+ import { CommandId, ProjectId, type ClientOrchestrationCommand } from "#t3tools/contracts";
6
6
 
7
7
  import { Environment } from "../environment/service.ts";
8
8
 
@@ -10,7 +10,7 @@ import type {
10
10
  OrchestrationThread,
11
11
  OrchestrationThreadShell,
12
12
  ServerProvider,
13
- } from "@t3tools/contracts";
13
+ } from "#t3tools/contracts";
14
14
 
15
15
  import type { ApplicationError } from "./error.ts";
16
16
 
@@ -1,7 +1,7 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Option from "effect/Option";
3
3
  import * as Stream from "effect/Stream";
4
- import { ORCHESTRATION_WS_METHODS } from "@t3tools/contracts";
4
+ import { ORCHESTRATION_WS_METHODS } from "#t3tools/contracts";
5
5
 
6
6
  import type { Orchestration } from "../orchestration/service.ts";
7
7
  import { RpcError } from "../rpc/error.ts";
@@ -8,7 +8,7 @@ import {
8
8
  type ClientOrchestrationCommand,
9
9
  type ModelSelection,
10
10
  type OrchestrationProjectShell,
11
- } from "@t3tools/contracts";
11
+ } from "#t3tools/contracts";
12
12
  import type { ServerConfigForCli } from "../orchestration/service.ts";
13
13
  import { resolveModelSelection } from "./model-selection.ts";
14
14
  import type { SendThreadInput, StartThreadInput } from "./service.ts";
@@ -1,7 +1,7 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Option from "effect/Option";
3
3
  import * as Stream from "effect/Stream";
4
- import type { OrchestrationMessage, OrchestrationThread } from "@t3tools/contracts";
4
+ import type { OrchestrationMessage, OrchestrationThread } from "#t3tools/contracts";
5
5
 
6
6
  import { ThreadSessionError } from "../domain/error.ts";
7
7
  import type { Orchestration } from "../orchestration/service.ts";
@@ -1,4 +1,4 @@
1
- import type { ServerProvider } from "@t3tools/contracts";
1
+ import type { ServerProvider } from "#t3tools/contracts";
2
2
 
3
3
  export function formatModelsHuman(providers: ReadonlyArray<ServerProvider>) {
4
4
  if (providers.length === 0) {
@@ -1,4 +1,4 @@
1
- import type { OrchestrationProjectShell } from "@t3tools/contracts";
1
+ import type { OrchestrationProjectShell } from "#t3tools/contracts";
2
2
 
3
3
  export function formatProjectsHuman(projects: ReadonlyArray<OrchestrationProjectShell>) {
4
4
  return projects
@@ -1,5 +1,5 @@
1
1
  import type { WaitEvent } from "../application/service.ts";
2
- import type { OrchestrationThread, OrchestrationThreadShell } from "@t3tools/contracts";
2
+ import type { OrchestrationThread, OrchestrationThreadShell } from "#t3tools/contracts";
3
3
  import { latestAssistantMessage, threadStatus } from "../domain/thread-lifecycle.ts";
4
4
 
5
5
  export function formatThreadsHuman(threads: ReadonlyArray<OrchestrationThreadShell>) {
@@ -1,5 +1,5 @@
1
1
  import type * as Path from "effect/Path";
2
- import type { OrchestrationProjectShell, OrchestrationShellSnapshot } from "@t3tools/contracts";
2
+ import type { OrchestrationProjectShell, OrchestrationShellSnapshot } from "#t3tools/contracts";
3
3
 
4
4
  import { ProjectLookupError } from "./error.ts";
5
5
 
@@ -1,4 +1,4 @@
1
- import type { ServerProvider } from "@t3tools/contracts";
1
+ import type { ServerProvider } from "#t3tools/contracts";
2
2
 
3
3
  export function isSelectableProvider(provider: ServerProvider) {
4
4
  return provider.status === "ready" && provider.models.length > 0;
@@ -4,7 +4,7 @@ import {
4
4
  type OrchestrationMessage as OrchestrationMessageType,
5
5
  type OrchestrationThread,
6
6
  type OrchestrationThreadShell,
7
- } from "@t3tools/contracts";
7
+ } from "#t3tools/contracts";
8
8
  import * as Schema from "effect/Schema";
9
9
 
10
10
  export function isThreadActive(thread: OrchestrationThreadShell | OrchestrationThread) {
package/src/index.ts CHANGED
@@ -6,6 +6,8 @@ export type {
6
6
  WaitEvent,
7
7
  } from "./application/service.ts";
8
8
  export type { ApplicationError } from "./application/error.ts";
9
+ export { NodeEnvironmentLive } from "./environment/layer.ts";
10
+ export { AppLayer, AuthAppLayer } from "./runtime.ts";
9
11
  export type {
10
12
  OrchestrationMessage,
11
13
  OrchestrationProjectShell,
@@ -13,6 +15,4 @@ export type {
13
15
  OrchestrationThread,
14
16
  OrchestrationThreadShell,
15
17
  ServerProvider,
16
- } from "@t3tools/contracts";
17
- export { NodeEnvironmentLive } from "./environment/layer.ts";
18
- export { AppLayer, AuthAppLayer } from "./runtime.ts";
18
+ } from "#t3tools/contracts";