t3code-cli 0.7.0 → 0.9.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 (82) hide show
  1. package/README.md +90 -35
  2. package/dist/application.js +1 -1
  3. package/dist/auth.js +1 -2
  4. package/dist/bin.js +241 -45
  5. package/dist/cli.js +1 -1
  6. package/dist/config.js +1 -3
  7. package/dist/connection.js +1 -4
  8. package/dist/index.js +1 -4
  9. package/dist/layout.js +1 -1
  10. package/dist/orchestration.js +1 -1
  11. package/dist/rpc.js +1 -1
  12. package/dist/runtime.js +1 -2
  13. package/dist/scope.js +1 -1
  14. package/dist/shared.js +85492 -0
  15. package/dist/src/application/layer.d.ts +86 -2
  16. package/dist/src/application/models.d.ts +1 -0
  17. package/dist/src/application/projects.d.ts +10 -1
  18. package/dist/src/application/service.d.ts +30 -1
  19. package/dist/src/application/shell-sequence.d.ts +9 -0
  20. package/dist/src/application/thread-commands.d.ts +27 -1
  21. package/dist/src/application/thread-wait.d.ts +9 -0
  22. package/dist/src/application/threads.d.ts +102 -2
  23. package/dist/src/cli-path/layer.d.ts +3 -0
  24. package/dist/src/cli-path/service.d.ts +8 -0
  25. package/dist/src/domain/helpers.d.ts +9 -0
  26. package/dist/src/domain/model-config.d.ts +3 -0
  27. package/dist/src/domain/thread-activities.d.ts +14 -0
  28. package/dist/src/domain/thread-lifecycle.d.ts +10 -0
  29. package/dist/src/orchestration/layer.d.ts +215 -0
  30. package/dist/src/rpc/layer.d.ts +466 -0
  31. package/dist/src/rpc/ws-group.d.ts +142 -0
  32. package/dist/src/runtime/layer.d.ts +1 -1
  33. package/dist/t3tools.js +2 -2
  34. package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +33 -10
  35. package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +6 -0
  36. package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +657 -1
  37. package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +14 -0
  38. package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +175 -1
  39. package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +492 -0
  40. package/dist/upstream-t3code/packages/contracts/src/server.d.ts +45 -0
  41. package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +21 -0
  42. package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +6 -3
  43. package/package.json +2 -2
  44. package/src/application/service.ts +32 -0
  45. package/src/application/thread-commands.ts +45 -0
  46. package/src/application/threads.ts +100 -1
  47. package/src/cli/error.ts +15 -0
  48. package/src/cli/message-input.ts +30 -0
  49. package/src/cli/thread-format.ts +47 -0
  50. package/src/cli/thread.ts +8 -0
  51. package/src/cli/threads/approve.ts +61 -0
  52. package/src/cli/threads/archive.ts +18 -3
  53. package/src/cli/threads/callback.ts +92 -0
  54. package/src/cli/threads/respond.ts +70 -0
  55. package/src/cli/threads/show.ts +43 -0
  56. package/src/cli-path/layer.ts +10 -0
  57. package/src/cli-path/service.ts +7 -0
  58. package/src/domain/thread-activities.test.ts +321 -0
  59. package/src/domain/thread-activities.ts +244 -0
  60. package/src/domain/thread-lifecycle.ts +2 -0
  61. package/src/runtime/layer.ts +2 -0
  62. package/dist/Context-DueQ9iMH.js +0 -4916
  63. package/dist/Path-D8WPdPwR.js +0 -11406
  64. package/dist/Schema-DsQxYh6_.js +0 -13581
  65. package/dist/UrlParams-BA6gBvaY.js +0 -205
  66. package/dist/base-dir-R12OMDso.js +0 -20
  67. package/dist/error-B2t1bAP9.js +0 -169
  68. package/dist/error-BHRnjLux.js +0 -15
  69. package/dist/error-jwMt3VoW.js +0 -54
  70. package/dist/flags-CM7_iGdA.js +0 -13371
  71. package/dist/layer-CfC5qZol.js +0 -1508
  72. package/dist/layer-DHhKS5jd.js +0 -13
  73. package/dist/layer-DUv99vsS.js +0 -72
  74. package/dist/layer-DvHnKBYj.js +0 -29466
  75. package/dist/layer-MqCKkIGD.js +0 -1206
  76. package/dist/scope-GycYiJ54.js +0 -29
  77. package/dist/service-CLmRO2Dp.js +0 -8
  78. package/dist/service-ybOWV9pL.js +0 -5
  79. package/dist/src-KdbHqrex.js +0 -8874
  80. package/dist/transport-D3zBdZ1h.js +0 -539
  81. package/dist/url-SlsaG8nY.js +0 -165
  82. /package/dist/{chunk-B5meny8j.js → rolldown-runtime.js} +0 -0
@@ -138,6 +138,20 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
138
138
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
139
139
  readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
140
140
  readonly createdAt: string;
141
+ } | {
142
+ readonly type: "thread.goal.request";
143
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
144
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
145
+ readonly request: {
146
+ readonly kind: "status";
147
+ } | {
148
+ readonly kind: "control";
149
+ readonly action: "pause" | "resume" | "clear";
150
+ } | {
151
+ readonly kind: "set";
152
+ readonly objective: string;
153
+ };
154
+ readonly createdAt: string;
141
155
  } | {
142
156
  readonly type: "thread.turn.start";
143
157
  readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
@@ -319,6 +333,7 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
319
333
  readonly groupKey: string;
320
334
  } | undefined;
321
335
  readonly showInteractionModeToggle?: boolean | undefined;
336
+ readonly requiresNewThreadForModelChange?: boolean | undefined;
322
337
  readonly message?: string | undefined;
323
338
  readonly availability?: "available" | "unavailable" | undefined;
324
339
  readonly unavailableReason?: string | undefined;
@@ -382,6 +397,11 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
382
397
  readonly apiEndpoint: string;
383
398
  readonly customModels: readonly string[];
384
399
  };
400
+ readonly grok: {
401
+ readonly enabled: boolean;
402
+ readonly binaryPath: string;
403
+ readonly customModels: readonly string[];
404
+ };
385
405
  readonly opencode: {
386
406
  readonly enabled: boolean;
387
407
  readonly binaryPath: string;
@@ -477,6 +497,7 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
477
497
  readonly groupKey: string;
478
498
  } | undefined;
479
499
  readonly showInteractionModeToggle?: boolean | undefined;
500
+ readonly requiresNewThreadForModelChange?: boolean | undefined;
480
501
  readonly message?: string | undefined;
481
502
  readonly availability?: "available" | "unavailable" | undefined;
482
503
  readonly unavailableReason?: string | undefined;
@@ -576,6 +597,15 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
576
597
  readonly updatedAt: string;
577
598
  readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
578
599
  } | null;
600
+ readonly goal: {
601
+ readonly objective: string;
602
+ readonly status: "active" | "paused" | "budgetLimited" | "complete";
603
+ readonly tokensUsed: number;
604
+ readonly tokenBudget: number | null;
605
+ readonly timeUsedSeconds: number;
606
+ readonly createdAt: string;
607
+ readonly updatedAt: string;
608
+ } | null;
579
609
  readonly latestUserMessageAt: string | null;
580
610
  readonly hasPendingApprovals: boolean;
581
611
  readonly hasPendingUserInput: boolean;
@@ -615,6 +645,15 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
615
645
  readonly updatedAt: string;
616
646
  readonly archivedAt: string | null;
617
647
  readonly deletedAt: string | null;
648
+ readonly goal: {
649
+ readonly objective: string;
650
+ readonly status: "active" | "paused" | "budgetLimited" | "complete";
651
+ readonly tokensUsed: number;
652
+ readonly tokenBudget: number | null;
653
+ readonly timeUsedSeconds: number;
654
+ readonly createdAt: string;
655
+ readonly updatedAt: string;
656
+ } | null;
618
657
  readonly messages: readonly {
619
658
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
620
659
  readonly role: "user" | "assistant" | "system";
@@ -712,6 +751,15 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
712
751
  readonly updatedAt: string;
713
752
  readonly archivedAt: string | null;
714
753
  readonly deletedAt: string | null;
754
+ readonly goal: {
755
+ readonly objective: string;
756
+ readonly status: "active" | "paused" | "budgetLimited" | "complete";
757
+ readonly tokensUsed: number;
758
+ readonly tokenBudget: number | null;
759
+ readonly timeUsedSeconds: number;
760
+ readonly createdAt: string;
761
+ readonly updatedAt: string;
762
+ } | null;
715
763
  readonly messages: readonly {
716
764
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
717
765
  readonly role: "user" | "assistant" | "system";
@@ -1310,6 +1358,85 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
1310
1358
  readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1311
1359
  readonly ingestedAt?: string | undefined;
1312
1360
  };
1361
+ } | {
1362
+ readonly type: "thread.goal-requested";
1363
+ readonly payload: {
1364
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1365
+ readonly request: {
1366
+ readonly kind: "status";
1367
+ } | {
1368
+ readonly kind: "control";
1369
+ readonly action: "pause" | "resume" | "clear";
1370
+ } | {
1371
+ readonly kind: "set";
1372
+ readonly objective: string;
1373
+ };
1374
+ readonly createdAt: string;
1375
+ };
1376
+ readonly sequence: number;
1377
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1378
+ readonly aggregateKind: "project" | "thread";
1379
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ThreadId">) | (string & import("effect/Brand").Brand<"ProjectId">);
1380
+ readonly occurredAt: string;
1381
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1382
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1383
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1384
+ readonly metadata: {
1385
+ readonly providerTurnId?: string | undefined;
1386
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1387
+ readonly adapterKey?: string | undefined;
1388
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1389
+ readonly ingestedAt?: string | undefined;
1390
+ };
1391
+ } | {
1392
+ readonly type: "thread.goal-updated";
1393
+ readonly payload: {
1394
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1395
+ readonly goal: {
1396
+ readonly objective: string;
1397
+ readonly status: "active" | "paused" | "budgetLimited" | "complete";
1398
+ readonly tokensUsed: number;
1399
+ readonly tokenBudget: number | null;
1400
+ readonly timeUsedSeconds: number;
1401
+ readonly createdAt: string;
1402
+ readonly updatedAt: string;
1403
+ };
1404
+ };
1405
+ readonly sequence: number;
1406
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1407
+ readonly aggregateKind: "project" | "thread";
1408
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ThreadId">) | (string & import("effect/Brand").Brand<"ProjectId">);
1409
+ readonly occurredAt: string;
1410
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1411
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1412
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1413
+ readonly metadata: {
1414
+ readonly providerTurnId?: string | undefined;
1415
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1416
+ readonly adapterKey?: string | undefined;
1417
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1418
+ readonly ingestedAt?: string | undefined;
1419
+ };
1420
+ } | {
1421
+ readonly type: "thread.goal-cleared";
1422
+ readonly payload: {
1423
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1424
+ };
1425
+ readonly sequence: number;
1426
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1427
+ readonly aggregateKind: "project" | "thread";
1428
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ThreadId">) | (string & import("effect/Brand").Brand<"ProjectId">);
1429
+ readonly occurredAt: string;
1430
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1431
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1432
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1433
+ readonly metadata: {
1434
+ readonly providerTurnId?: string | undefined;
1435
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1436
+ readonly adapterKey?: string | undefined;
1437
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1438
+ readonly ingestedAt?: string | undefined;
1439
+ };
1313
1440
  } | {
1314
1441
  readonly type: "thread.proposed-plan-upserted";
1315
1442
  readonly payload: {
@@ -1436,6 +1563,15 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
1436
1563
  readonly updatedAt: string;
1437
1564
  readonly archivedAt: string | null;
1438
1565
  readonly deletedAt: string | null;
1566
+ readonly goal: {
1567
+ readonly objective: string;
1568
+ readonly status: "active" | "paused" | "budgetLimited" | "complete";
1569
+ readonly tokensUsed: number;
1570
+ readonly tokenBudget: number | null;
1571
+ readonly timeUsedSeconds: number;
1572
+ readonly createdAt: string;
1573
+ readonly updatedAt: string;
1574
+ } | null;
1439
1575
  readonly messages: readonly {
1440
1576
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
1441
1577
  readonly role: "user" | "assistant" | "system";
@@ -2031,6 +2167,85 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
2031
2167
  readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
2032
2168
  readonly ingestedAt?: string | undefined;
2033
2169
  };
2170
+ } | {
2171
+ readonly type: "thread.goal-requested";
2172
+ readonly payload: {
2173
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
2174
+ readonly request: {
2175
+ readonly kind: "status";
2176
+ } | {
2177
+ readonly kind: "control";
2178
+ readonly action: "pause" | "resume" | "clear";
2179
+ } | {
2180
+ readonly kind: "set";
2181
+ readonly objective: string;
2182
+ };
2183
+ readonly createdAt: string;
2184
+ };
2185
+ readonly sequence: number;
2186
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
2187
+ readonly aggregateKind: "project" | "thread";
2188
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ThreadId">) | (string & import("effect/Brand").Brand<"ProjectId">);
2189
+ readonly occurredAt: string;
2190
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
2191
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
2192
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
2193
+ readonly metadata: {
2194
+ readonly providerTurnId?: string | undefined;
2195
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
2196
+ readonly adapterKey?: string | undefined;
2197
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
2198
+ readonly ingestedAt?: string | undefined;
2199
+ };
2200
+ } | {
2201
+ readonly type: "thread.goal-updated";
2202
+ readonly payload: {
2203
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
2204
+ readonly goal: {
2205
+ readonly objective: string;
2206
+ readonly status: "active" | "paused" | "budgetLimited" | "complete";
2207
+ readonly tokensUsed: number;
2208
+ readonly tokenBudget: number | null;
2209
+ readonly timeUsedSeconds: number;
2210
+ readonly createdAt: string;
2211
+ readonly updatedAt: string;
2212
+ };
2213
+ };
2214
+ readonly sequence: number;
2215
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
2216
+ readonly aggregateKind: "project" | "thread";
2217
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ThreadId">) | (string & import("effect/Brand").Brand<"ProjectId">);
2218
+ readonly occurredAt: string;
2219
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
2220
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
2221
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
2222
+ readonly metadata: {
2223
+ readonly providerTurnId?: string | undefined;
2224
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
2225
+ readonly adapterKey?: string | undefined;
2226
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
2227
+ readonly ingestedAt?: string | undefined;
2228
+ };
2229
+ } | {
2230
+ readonly type: "thread.goal-cleared";
2231
+ readonly payload: {
2232
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
2233
+ };
2234
+ readonly sequence: number;
2235
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
2236
+ readonly aggregateKind: "project" | "thread";
2237
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ThreadId">) | (string & import("effect/Brand").Brand<"ProjectId">);
2238
+ readonly occurredAt: string;
2239
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
2240
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
2241
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
2242
+ readonly metadata: {
2243
+ readonly providerTurnId?: string | undefined;
2244
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
2245
+ readonly adapterKey?: string | undefined;
2246
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
2247
+ readonly ingestedAt?: string | undefined;
2248
+ };
2034
2249
  } | {
2035
2250
  readonly type: "thread.proposed-plan-upserted";
2036
2251
  readonly payload: {