t3code-cli 0.13.0 → 0.14.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 (323) hide show
  1. package/README.md +87 -1
  2. package/dist/application.d.ts +2 -0
  3. package/dist/application.js +1 -1
  4. package/dist/auth.d.ts +50 -0
  5. package/dist/auth.js +1 -1
  6. package/dist/bin.d.ts +1 -0
  7. package/dist/bin.js +348 -603
  8. package/dist/cli.d.ts +66 -0
  9. package/dist/cli.js +1 -1
  10. package/dist/client-runtime/authorization.d.ts +2 -0
  11. package/dist/client-runtime/authorization.js +2 -0
  12. package/dist/client-runtime/connection.d.ts +2 -0
  13. package/dist/client-runtime/connection.js +2 -0
  14. package/dist/client-runtime/environment.d.ts +57 -0
  15. package/dist/client-runtime/environment.js +2 -0
  16. package/dist/client-runtime/errors.d.ts +28 -0
  17. package/dist/client-runtime/errors.js +35 -0
  18. package/dist/client-runtime/operations/projects.d.ts +2 -0
  19. package/dist/client-runtime/operations/projects.js +2 -0
  20. package/dist/client-runtime/operations.d.ts +2 -0
  21. package/dist/client-runtime/operations.js +2 -0
  22. package/dist/client-runtime/platform.d.ts +26 -0
  23. package/dist/client-runtime/platform.js +74 -0
  24. package/dist/client-runtime/relay.d.ts +121 -0
  25. package/dist/client-runtime/relay.js +245 -0
  26. package/dist/client-runtime/rpc.d.ts +2 -0
  27. package/dist/client-runtime/rpc.js +2 -0
  28. package/dist/client-runtime/state/assets.d.ts +40 -0
  29. package/dist/client-runtime/state/assets.js +53 -0
  30. package/dist/client-runtime/state/auth.d.ts +98 -0
  31. package/dist/client-runtime/state/auth.js +48 -0
  32. package/dist/client-runtime/state/connections.d.ts +2 -0
  33. package/dist/client-runtime/state/connections.js +52 -0
  34. package/dist/client-runtime/state/entities.d.ts +33 -0
  35. package/dist/client-runtime/state/entities.js +2 -0
  36. package/dist/client-runtime/state/filesystem.d.ts +42 -0
  37. package/dist/client-runtime/state/filesystem.js +48 -0
  38. package/dist/client-runtime/state/git.d.ts +43 -0
  39. package/dist/client-runtime/state/git.js +18 -0
  40. package/dist/client-runtime/state/models.d.ts +2 -0
  41. package/dist/client-runtime/state/models.js +2 -0
  42. package/dist/client-runtime/state/orchestration.d.ts +128 -0
  43. package/dist/client-runtime/state/orchestration.js +20 -0
  44. package/dist/client-runtime/state/presentation.d.ts +277 -0
  45. package/dist/client-runtime/state/presentation.js +34 -0
  46. package/dist/client-runtime/state/preview.d.ts +447 -0
  47. package/dist/client-runtime/state/preview.js +103 -0
  48. package/dist/client-runtime/state/project-grouping.d.ts +26 -0
  49. package/dist/client-runtime/state/project-grouping.js +73 -0
  50. package/dist/client-runtime/state/projects.d.ts +192 -0
  51. package/dist/client-runtime/state/projects.js +2 -0
  52. package/dist/client-runtime/state/relay.d.ts +10 -0
  53. package/dist/client-runtime/state/relay.js +19 -0
  54. package/dist/client-runtime/state/review.d.ts +28 -0
  55. package/dist/client-runtime/state/review.js +11 -0
  56. package/dist/client-runtime/state/runtime.d.ts +2 -0
  57. package/dist/client-runtime/state/runtime.js +2 -0
  58. package/dist/client-runtime/state/server.d.ts +1495 -0
  59. package/dist/client-runtime/state/server.js +207 -0
  60. package/dist/client-runtime/state/session.d.ts +532 -0
  61. package/dist/client-runtime/state/session.js +21 -0
  62. package/dist/client-runtime/state/shell.d.ts +529 -0
  63. package/dist/client-runtime/state/shell.js +2 -0
  64. package/dist/client-runtime/state/source-control.d.ts +92 -0
  65. package/dist/client-runtime/state/source-control.js +36 -0
  66. package/dist/client-runtime/state/terminal.d.ts +237 -0
  67. package/dist/client-runtime/state/terminal.js +173 -0
  68. package/dist/client-runtime/state/thread-settled.d.ts +104 -0
  69. package/dist/client-runtime/state/thread-settled.js +157 -0
  70. package/dist/client-runtime/state/thread-sort.d.ts +23 -0
  71. package/dist/client-runtime/state/thread-sort.js +47 -0
  72. package/dist/client-runtime/state/threads.d.ts +538 -0
  73. package/dist/client-runtime/state/threads.js +934 -0
  74. package/dist/client-runtime/state/vcs.d.ts +442 -0
  75. package/dist/client-runtime/state/vcs.js +756 -0
  76. package/dist/config.d.ts +84 -0
  77. package/dist/config.js +1 -1
  78. package/dist/connection.d.ts +7 -0
  79. package/dist/connection.js +1 -1
  80. package/dist/contracts.d.ts +2 -0
  81. package/dist/contracts.js +2 -1
  82. package/dist/index.d.ts +2 -0
  83. package/dist/index.js +1 -1
  84. package/dist/node.d.ts +6 -0
  85. package/dist/node.js +1 -1
  86. package/dist/orchestration.d.ts +1420 -0
  87. package/dist/orchestration.js +1 -1
  88. package/dist/preview.d.ts +2 -0
  89. package/dist/preview.js +2 -0
  90. package/dist/rpc.d.ts +6043 -0
  91. package/dist/rpc.js +1 -1
  92. package/dist/runtime.d.ts +2 -0
  93. package/dist/runtime.js +2 -2
  94. package/dist/shared/DrainableWorker.d.ts +28 -0
  95. package/dist/shared/DrainableWorker.js +24 -0
  96. package/dist/shared/KeyedCoalescingWorker.d.ts +13 -0
  97. package/dist/shared/KeyedCoalescingWorker.js +89 -0
  98. package/dist/shared/Net.d.ts +43 -0
  99. package/dist/shared/Net.js +126 -0
  100. package/dist/shared/String.d.ts +4 -0
  101. package/dist/shared/String.js +8 -0
  102. package/dist/shared/Struct.d.ts +5 -0
  103. package/dist/shared/Struct.js +2 -0
  104. package/dist/shared/advertisedEndpoint.d.ts +2 -0
  105. package/dist/shared/advertisedEndpoint.js +2 -0
  106. package/dist/shared/agentAwareness.d.ts +27 -0
  107. package/dist/shared/agentAwareness.js +54 -0
  108. package/dist/shared/backgroundActivitySettings.d.ts +23 -0
  109. package/dist/shared/backgroundActivitySettings.js +2 -0
  110. package/dist/shared/chatList.d.ts +12 -0
  111. package/dist/shared/chatList.js +14 -0
  112. package/dist/shared/cliArgs.d.ts +33 -0
  113. package/dist/shared/cliArgs.js +103 -0
  114. package/dist/shared/composerInlineTokens.d.ts +20 -0
  115. package/dist/shared/composerInlineTokens.js +72 -0
  116. package/dist/shared/composerTrigger.d.ts +26 -0
  117. package/dist/shared/composerTrigger.js +97 -0
  118. package/dist/shared/connectAuth.d.ts +58 -0
  119. package/dist/shared/connectAuth.js +89 -0
  120. package/dist/shared/devHome.d.ts +21 -0
  121. package/dist/shared/devHome.js +65 -0
  122. package/dist/shared/devProxy.d.ts +15 -0
  123. package/dist/shared/devProxy.js +22 -0
  124. package/dist/shared/dpop.d.ts +32 -0
  125. package/dist/shared/dpop.js +2724 -0
  126. package/dist/shared/dpopCommon.d.ts +2 -0
  127. package/dist/shared/dpopCommon.js +2 -0
  128. package/dist/shared/filePreview.d.ts +8 -0
  129. package/dist/shared/filePreview.js +31 -0
  130. package/dist/shared/git.d.ts +41 -0
  131. package/dist/shared/git.js +2 -0
  132. package/dist/shared/hostProcess.d.ts +13 -0
  133. package/dist/shared/hostProcess.js +2 -0
  134. package/dist/shared/httpObservability.d.ts +5 -0
  135. package/dist/shared/httpObservability.js +2 -0
  136. package/dist/shared/httpReadiness.d.ts +38 -0
  137. package/dist/shared/httpReadiness.js +110 -0
  138. package/dist/shared/keybindings.d.ts +35 -0
  139. package/dist/shared/keybindings.js +330 -0
  140. package/dist/shared/logging.d.ts +39 -0
  141. package/dist/shared/logging.js +2 -0
  142. package/dist/shared/model.d.ts +44 -0
  143. package/dist/shared/model.js +2 -0
  144. package/dist/shared/oauthScope.d.ts +23 -0
  145. package/dist/shared/oauthScope.js +2 -0
  146. package/dist/shared/observability.d.ts +105 -0
  147. package/dist/shared/observability.js +346 -0
  148. package/dist/shared/orchestrationTiming.d.ts +16 -0
  149. package/dist/shared/orchestrationTiming.js +32 -0
  150. package/dist/shared/path.d.ts +2 -0
  151. package/dist/shared/path.js +2 -0
  152. package/dist/shared/preview.d.ts +35 -0
  153. package/dist/shared/preview.js +103 -0
  154. package/dist/shared/previewViewport.d.ts +16 -0
  155. package/dist/shared/previewViewport.js +159 -0
  156. package/dist/shared/projectFavicon.d.ts +5 -0
  157. package/dist/shared/projectFavicon.js +13 -0
  158. package/dist/shared/projectScripts.d.ts +19 -0
  159. package/dist/shared/projectScripts.js +18 -0
  160. package/dist/shared/qrCode.d.ts +87 -0
  161. package/dist/shared/qrCode.js +870 -0
  162. package/dist/shared/relayAuth.d.ts +27 -0
  163. package/dist/shared/relayAuth.js +83 -0
  164. package/dist/shared/relayClient.d.ts +58 -0
  165. package/dist/shared/relayClient.js +245 -0
  166. package/dist/shared/relayJwt.d.ts +39 -0
  167. package/dist/shared/relayJwt.js +2 -0
  168. package/dist/shared/relaySigning.d.ts +4 -0
  169. package/dist/shared/relaySigning.js +2 -0
  170. package/dist/shared/relayTracing.d.ts +25 -0
  171. package/dist/shared/relayTracing.js +2 -0
  172. package/dist/shared/relayUrl.d.ts +5 -0
  173. package/dist/shared/relayUrl.js +2 -0
  174. package/dist/shared/remote.d.ts +57 -0
  175. package/dist/shared/remote.js +2 -0
  176. package/dist/shared/schemaJson.d.ts +35 -0
  177. package/dist/shared/schemaJson.js +2 -0
  178. package/dist/shared/schemaYaml.d.ts +86 -0
  179. package/dist/shared/schemaYaml.js +99 -0
  180. package/dist/shared/searchRanking.d.ts +30 -0
  181. package/dist/shared/searchRanking.js +99 -0
  182. package/dist/shared/semver.d.ts +23 -0
  183. package/dist/shared/semver.js +124 -0
  184. package/dist/shared/serverSettings.d.ts +19 -0
  185. package/dist/shared/serverSettings.js +103 -0
  186. package/dist/shared/shell.d.ts +51 -0
  187. package/dist/shared/shell.js +408 -0
  188. package/dist/shared/sourceControl.d.ts +26 -0
  189. package/dist/shared/sourceControl.js +2 -0
  190. package/dist/shared/t3ProjectFile.d.ts +27 -0
  191. package/dist/shared/t3ProjectFile.js +25 -0
  192. package/dist/shared/terminalLabels.d.ts +16 -0
  193. package/dist/shared/terminalLabels.js +28 -0
  194. package/dist/shared/toolActivity.d.ts +16 -0
  195. package/dist/shared/toolActivity.js +159 -0
  196. package/dist/shared.d.ts +43036 -0
  197. package/dist/shared.js +25428 -12277
  198. package/dist/t3tools.d.ts +2 -0
  199. package/dist/t3tools.js +1 -1
  200. package/package.json +39 -21
  201. package/src/auth/index.ts +2 -0
  202. package/src/auth/pairing.ts +8 -5
  203. package/src/auth/service.ts +2 -1
  204. package/src/auth/transport.ts +4 -0
  205. package/src/auth/type.ts +6 -0
  206. package/src/cli/auth.ts +7 -1
  207. package/src/contracts/index.ts +8 -0
  208. package/src/orchestration/layer.ts +36 -0
  209. package/src/orchestration/service.ts +5 -0
  210. package/src/preview/index.ts +11 -0
  211. package/src/preview/service.ts +52 -0
  212. package/src/rpc/error.ts +2 -0
  213. package/src/rpc/layer.ts +5 -4
  214. package/src/rpc/operation.ts +5 -4
  215. package/src/rpc/ws-group.ts +6 -0
  216. package/src/runtime/index.ts +1 -0
  217. package/src/runtime/layer.ts +5 -0
  218. package/src/sql/node-sqlite-client.ts +3 -0
  219. package/dist/src/application/actions.d.ts +0 -25
  220. package/dist/src/application/error.d.ts +0 -3
  221. package/dist/src/application/index.d.ts +0 -4
  222. package/dist/src/application/layer.d.ts +0 -117
  223. package/dist/src/application/model-selection.d.ts +0 -34
  224. package/dist/src/application/models.d.ts +0 -8
  225. package/dist/src/application/project-commands.d.ts +0 -44
  226. package/dist/src/application/projects.d.ts +0 -23
  227. package/dist/src/application/service.d.ts +0 -243
  228. package/dist/src/application/shell-sequence.d.ts +0 -96
  229. package/dist/src/application/terminals.d.ts +0 -66
  230. package/dist/src/application/thread-commands.d.ts +0 -157
  231. package/dist/src/application/thread-update.d.ts +0 -8
  232. package/dist/src/application/thread-wait.d.ts +0 -106
  233. package/dist/src/application/threads.d.ts +0 -660
  234. package/dist/src/auth/error.d.ts +0 -50
  235. package/dist/src/auth/index.d.ts +0 -10
  236. package/dist/src/auth/layer.d.ts +0 -53
  237. package/dist/src/auth/local-base-dir.d.ts +0 -8
  238. package/dist/src/auth/local-origin.d.ts +0 -18
  239. package/dist/src/auth/local-token.d.ts +0 -26
  240. package/dist/src/auth/local.d.ts +0 -24
  241. package/dist/src/auth/pairing.d.ts +0 -22
  242. package/dist/src/auth/remote-error.d.ts +0 -3
  243. package/dist/src/auth/schema.d.ts +0 -58
  244. package/dist/src/auth/service.d.ts +0 -27
  245. package/dist/src/auth/transport.d.ts +0 -22
  246. package/dist/src/auth/type.d.ts +0 -83
  247. package/dist/src/cli/env/flag.d.ts +0 -2
  248. package/dist/src/cli/env/index.d.ts +0 -2
  249. package/dist/src/cli/env/selection-layer.d.ts +0 -3
  250. package/dist/src/cli/flags.d.ts +0 -20
  251. package/dist/src/cli/format/index.d.ts +0 -1
  252. package/dist/src/cli/format/output.d.ts +0 -12
  253. package/dist/src/cli/index.d.ts +0 -5
  254. package/dist/src/cli/runtime/index.d.ts +0 -1
  255. package/dist/src/cli/runtime/service.d.ts +0 -16
  256. package/dist/src/cli/scope/index.d.ts +0 -1
  257. package/dist/src/cli/scope/resolve.d.ts +0 -20
  258. package/dist/src/cli-path/layer.d.ts +0 -3
  259. package/dist/src/cli-path/service.d.ts +0 -8
  260. package/dist/src/config/config.d.ts +0 -49
  261. package/dist/src/config/credential/cipher-node.d.ts +0 -3
  262. package/dist/src/config/credential/cipher-web.d.ts +0 -3
  263. package/dist/src/config/credential/cipher.d.ts +0 -29
  264. package/dist/src/config/credential/env.d.ts +0 -3
  265. package/dist/src/config/credential/error.d.ts +0 -8
  266. package/dist/src/config/credential/index.d.ts +0 -6
  267. package/dist/src/config/credential/service.d.ts +0 -34
  268. package/dist/src/config/env/env.d.ts +0 -55
  269. package/dist/src/config/env/index.d.ts +0 -2
  270. package/dist/src/config/env/layout.d.ts +0 -11
  271. package/dist/src/config/environment-name/index.d.ts +0 -1
  272. package/dist/src/config/environment-name/name.d.ts +0 -10
  273. package/dist/src/config/error.d.ts +0 -11
  274. package/dist/src/config/index.d.ts +0 -10
  275. package/dist/src/config/keystore/error.d.ts +0 -8
  276. package/dist/src/config/keystore/file.d.ts +0 -9
  277. package/dist/src/config/keystore/index.d.ts +0 -4
  278. package/dist/src/config/keystore/keyring-node.d.ts +0 -4
  279. package/dist/src/config/keystore/service.d.ts +0 -33
  280. package/dist/src/config/paths/index.d.ts +0 -1
  281. package/dist/src/config/paths/paths.d.ts +0 -6
  282. package/dist/src/config/persist/file-mode.d.ts +0 -4
  283. package/dist/src/config/persist/migration.d.ts +0 -68
  284. package/dist/src/config/persist/persist.d.ts +0 -40
  285. package/dist/src/config/persist/schema.d.ts +0 -68
  286. package/dist/src/config/resolve/resolve.d.ts +0 -40
  287. package/dist/src/config/selection/index.d.ts +0 -1
  288. package/dist/src/config/selection/resolve.d.ts +0 -4
  289. package/dist/src/config/selection/service.d.ts +0 -10
  290. package/dist/src/config/types.d.ts +0 -36
  291. package/dist/src/config/url/error.d.ts +0 -10
  292. package/dist/src/config/url/index.d.ts +0 -2
  293. package/dist/src/config/url/url.d.ts +0 -6
  294. package/dist/src/connection/error.d.ts +0 -10
  295. package/dist/src/connection/index.d.ts +0 -4
  296. package/dist/src/connection/layer.d.ts +0 -3
  297. package/dist/src/connection/prepared.d.ts +0 -14
  298. package/dist/src/connection/service.d.ts +0 -13
  299. package/dist/src/connection/type.d.ts +0 -10
  300. package/dist/src/contracts/index.d.ts +0 -1
  301. package/dist/src/domain/error.d.ts +0 -57
  302. package/dist/src/domain/helpers.d.ts +0 -179
  303. package/dist/src/domain/model-config.d.ts +0 -330
  304. package/dist/src/domain/thread-activities.d.ts +0 -14
  305. package/dist/src/domain/thread-lifecycle.d.ts +0 -120
  306. package/dist/src/index.d.ts +0 -3
  307. package/dist/src/node/connection.d.ts +0 -2
  308. package/dist/src/node/index.d.ts +0 -1
  309. package/dist/src/orchestration/index.d.ts +0 -2
  310. package/dist/src/orchestration/layer.d.ts +0 -1419
  311. package/dist/src/orchestration/service.d.ts +0 -28
  312. package/dist/src/rpc/error.d.ts +0 -16
  313. package/dist/src/rpc/index.d.ts +0 -6
  314. package/dist/src/rpc/layer.d.ts +0 -5862
  315. package/dist/src/rpc/operation.d.ts +0 -24
  316. package/dist/src/rpc/service.d.ts +0 -15
  317. package/dist/src/rpc/session.d.ts +0 -22
  318. package/dist/src/rpc/ws-group.d.ts +0 -1984
  319. package/dist/src/runtime/index.d.ts +0 -1
  320. package/dist/src/runtime/layer.d.ts +0 -15
  321. package/dist/src/sql/node-sqlite-client.d.ts +0 -10
  322. package/dist/src/sql/service.d.ts +0 -17
  323. package/dist/src/t3tools/index.d.ts +0 -1
@@ -0,0 +1,1420 @@
1
+ import { Mi as Orchestration, Ni as OrchestrationError, Pi as T3Orchestration, ai as T3RpcOperations, cv as OrchestrationShellSnapshot, ji as OpenThread, vv as OrchestrationThreadStreamItem, zi as RpcError } from "./shared.js";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Stream from "effect/Stream";
4
+ import * as Layer from "effect/Layer";
5
+ //#region src/orchestration/layer.d.ts
6
+ declare const makeT3Orchestration: () => Effect.Effect<{
7
+ dispatch: (command: {
8
+ readonly type: "project.create";
9
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
10
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
11
+ readonly title: string;
12
+ readonly workspaceRoot: string;
13
+ readonly createWorkspaceRootIfMissing?: boolean | undefined;
14
+ readonly defaultModelSelection?: {
15
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
16
+ readonly model: string;
17
+ readonly options?: readonly {
18
+ readonly id: string;
19
+ readonly value: string | boolean;
20
+ }[];
21
+ } | null | undefined;
22
+ readonly createdAt: string;
23
+ } | {
24
+ readonly type: "project.meta.update";
25
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
26
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
27
+ readonly title?: string | undefined;
28
+ readonly workspaceRoot?: string | undefined;
29
+ readonly defaultModelSelection?: {
30
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
31
+ readonly model: string;
32
+ readonly options?: readonly {
33
+ readonly id: string;
34
+ readonly value: string | boolean;
35
+ }[];
36
+ } | null | undefined;
37
+ readonly scripts?: readonly {
38
+ readonly id: string;
39
+ readonly name: string;
40
+ readonly command: string;
41
+ readonly icon: "build" | "configure" | "debug" | "lint" | "play" | "test";
42
+ readonly runOnWorktreeCreate: boolean;
43
+ readonly previewUrl?: string | undefined;
44
+ readonly autoOpenPreview?: boolean | undefined;
45
+ }[] | undefined;
46
+ } | {
47
+ readonly type: "project.delete";
48
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
49
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
50
+ readonly force?: boolean | undefined;
51
+ } | {
52
+ readonly type: "thread.create";
53
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
54
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
55
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
56
+ readonly title: string;
57
+ readonly modelSelection: {
58
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
59
+ readonly model: string;
60
+ readonly options?: readonly {
61
+ readonly id: string;
62
+ readonly value: string | boolean;
63
+ }[];
64
+ };
65
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
66
+ readonly interactionMode: "default" | "plan";
67
+ readonly branch: string | null;
68
+ readonly worktreePath: string | null;
69
+ readonly createdAt: string;
70
+ } | {
71
+ readonly type: "thread.delete";
72
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
73
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
74
+ } | {
75
+ readonly type: "thread.archive";
76
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
77
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
78
+ } | {
79
+ readonly type: "thread.unarchive";
80
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
81
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
82
+ } | {
83
+ readonly type: "thread.settle";
84
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
85
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
86
+ } | {
87
+ readonly type: "thread.unsettle";
88
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
89
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
90
+ readonly reason: "user";
91
+ } | {
92
+ readonly type: "thread.snooze";
93
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
94
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
95
+ readonly snoozedUntil: string;
96
+ } | {
97
+ readonly type: "thread.unsnooze";
98
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
99
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
100
+ readonly reason: "user";
101
+ } | {
102
+ readonly type: "thread.meta.update";
103
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
104
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
105
+ readonly title?: string | undefined;
106
+ readonly modelSelection?: {
107
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
108
+ readonly model: string;
109
+ readonly options?: readonly {
110
+ readonly id: string;
111
+ readonly value: string | boolean;
112
+ }[];
113
+ } | undefined;
114
+ readonly branch?: string | null | undefined;
115
+ readonly expectedBranch?: string | null | undefined;
116
+ readonly worktreePath?: string | null | undefined;
117
+ } | {
118
+ readonly type: "thread.runtime-mode.set";
119
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
120
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
121
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
122
+ readonly createdAt: string;
123
+ } | {
124
+ readonly type: "thread.interaction-mode.set";
125
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
126
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
127
+ readonly interactionMode: "default" | "plan";
128
+ readonly createdAt: string;
129
+ } | {
130
+ readonly type: "thread.turn.start";
131
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
132
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
133
+ readonly message: {
134
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
135
+ readonly role: "user";
136
+ readonly text: string;
137
+ readonly attachments: readonly {
138
+ readonly type: "image";
139
+ readonly name: string;
140
+ readonly mimeType: string;
141
+ readonly sizeBytes: number;
142
+ readonly dataUrl: string;
143
+ }[];
144
+ };
145
+ readonly modelSelection?: {
146
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
147
+ readonly model: string;
148
+ readonly options?: readonly {
149
+ readonly id: string;
150
+ readonly value: string | boolean;
151
+ }[];
152
+ } | undefined;
153
+ readonly titleSeed?: string | undefined;
154
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
155
+ readonly interactionMode: "default" | "plan";
156
+ readonly bootstrap?: {
157
+ readonly createThread?: {
158
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
159
+ readonly title: string;
160
+ readonly modelSelection: {
161
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
162
+ readonly model: string;
163
+ readonly options?: readonly {
164
+ readonly id: string;
165
+ readonly value: string | boolean;
166
+ }[];
167
+ };
168
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
169
+ readonly interactionMode: "default" | "plan";
170
+ readonly branch: string | null;
171
+ readonly worktreePath: string | null;
172
+ readonly createdAt: string;
173
+ } | undefined;
174
+ readonly prepareWorktree?: {
175
+ readonly projectCwd: string;
176
+ readonly baseBranch: string;
177
+ readonly branch?: string | undefined;
178
+ readonly startFromOrigin?: boolean | undefined;
179
+ } | undefined;
180
+ readonly runSetupScript?: boolean | undefined;
181
+ } | undefined;
182
+ readonly sourceProposedPlan?: {
183
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
184
+ readonly planId: string;
185
+ } | undefined;
186
+ readonly createdAt: string;
187
+ } | {
188
+ readonly type: "thread.turn.interrupt";
189
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
190
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
191
+ readonly turnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
192
+ readonly createdAt: string;
193
+ } | {
194
+ readonly type: "thread.approval.respond";
195
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
196
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
197
+ readonly requestId: string & import("effect/Brand").Brand<"ApprovalRequestId">;
198
+ readonly decision: "accept" | "acceptForSession" | "cancel" | "decline";
199
+ readonly createdAt: string;
200
+ } | {
201
+ readonly type: "thread.user-input.respond";
202
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
203
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
204
+ readonly requestId: string & import("effect/Brand").Brand<"ApprovalRequestId">;
205
+ readonly answers: {
206
+ readonly [x: string]: unknown;
207
+ };
208
+ readonly createdAt: string;
209
+ } | {
210
+ readonly type: "thread.checkpoint.revert";
211
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
212
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
213
+ readonly turnCount: number;
214
+ readonly createdAt: string;
215
+ } | {
216
+ readonly type: "thread.session.stop";
217
+ readonly commandId: string & import("effect/Brand").Brand<"CommandId">;
218
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
219
+ readonly createdAt: string;
220
+ }) => Effect.Effect<{
221
+ readonly sequence: number;
222
+ }, RpcError, never>;
223
+ getServerConfig: () => Effect.Effect<{
224
+ readonly environment: {
225
+ readonly capabilities: {
226
+ readonly connectionProbe: boolean;
227
+ };
228
+ };
229
+ readonly providers: readonly {
230
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
231
+ readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
232
+ readonly displayName?: string | undefined;
233
+ readonly accentColor?: string | undefined;
234
+ readonly badgeLabel?: string | undefined;
235
+ readonly continuation?: {
236
+ readonly groupKey: string;
237
+ } | undefined;
238
+ readonly showInteractionModeToggle?: boolean | undefined;
239
+ readonly requiresNewThreadForModelChange?: boolean | undefined;
240
+ readonly enabled: boolean;
241
+ readonly installed: boolean;
242
+ readonly version: string | null;
243
+ readonly status: "disabled" | "error" | "ready" | "warning";
244
+ readonly auth: {
245
+ readonly status: "authenticated" | "unauthenticated" | "unknown";
246
+ readonly type?: string | undefined;
247
+ readonly label?: string | undefined;
248
+ readonly email?: string | undefined;
249
+ };
250
+ readonly checkedAt: string;
251
+ readonly message?: string | undefined;
252
+ readonly availability?: "available" | "unavailable" | undefined;
253
+ readonly unavailableReason?: string | undefined;
254
+ readonly models: readonly {
255
+ readonly slug: string;
256
+ readonly name: string;
257
+ readonly shortName?: string | undefined;
258
+ readonly subProvider?: string | undefined;
259
+ readonly isCustom: boolean;
260
+ readonly isDefault?: boolean | undefined;
261
+ readonly capabilities: {
262
+ readonly optionDescriptors?: readonly ({
263
+ readonly id: string;
264
+ readonly label: string;
265
+ readonly description?: string | undefined;
266
+ readonly type: "select";
267
+ readonly options: readonly {
268
+ readonly id: string;
269
+ readonly label: string;
270
+ readonly description?: string | undefined;
271
+ readonly isDefault?: boolean | undefined;
272
+ }[];
273
+ readonly currentValue?: string | undefined;
274
+ readonly promptInjectedValues?: readonly string[] | undefined;
275
+ } | {
276
+ readonly id: string;
277
+ readonly label: string;
278
+ readonly description?: string | undefined;
279
+ readonly type: "boolean";
280
+ readonly currentValue?: boolean | undefined;
281
+ })[] | undefined;
282
+ } | null;
283
+ }[];
284
+ readonly slashCommands: readonly {
285
+ readonly name: string;
286
+ readonly description?: string | undefined;
287
+ readonly input?: {
288
+ readonly hint: string;
289
+ } | undefined;
290
+ }[];
291
+ readonly skills: readonly {
292
+ readonly name: string;
293
+ readonly description?: string | undefined;
294
+ readonly path: string;
295
+ readonly scope?: string | undefined;
296
+ readonly enabled: boolean;
297
+ readonly displayName?: string | undefined;
298
+ readonly shortDescription?: string | undefined;
299
+ }[];
300
+ readonly versionAdvisory?: {
301
+ readonly status: "behind_latest" | "current" | "unknown";
302
+ readonly currentVersion: string | null;
303
+ readonly latestVersion: string | null;
304
+ readonly updateCommand: string | null;
305
+ readonly canUpdate: boolean;
306
+ readonly checkedAt: string | null;
307
+ readonly message: string | null;
308
+ };
309
+ readonly updateState?: {
310
+ readonly status: "failed" | "idle" | "queued" | "running" | "succeeded" | "unchanged";
311
+ readonly startedAt: string | null;
312
+ readonly finishedAt: string | null;
313
+ readonly message: string | null;
314
+ readonly output: string | null;
315
+ };
316
+ }[];
317
+ }, RpcError, never>;
318
+ getShellSnapshot: () => Effect.Effect<{
319
+ readonly snapshotSequence: number;
320
+ readonly projects: readonly {
321
+ readonly id: string & import("effect/Brand").Brand<"ProjectId">;
322
+ readonly title: string;
323
+ readonly workspaceRoot: string;
324
+ readonly repositoryIdentity?: {
325
+ readonly canonicalKey: string;
326
+ readonly locator: {
327
+ readonly source: "git-remote";
328
+ readonly remoteName: string;
329
+ readonly remoteUrl: string;
330
+ };
331
+ readonly rootPath?: string;
332
+ readonly displayName?: string;
333
+ readonly provider?: string;
334
+ readonly owner?: string;
335
+ readonly name?: string;
336
+ } | null | undefined;
337
+ readonly defaultModelSelection: {
338
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
339
+ readonly model: string;
340
+ readonly options?: readonly {
341
+ readonly id: string;
342
+ readonly value: string | boolean;
343
+ }[];
344
+ } | null;
345
+ readonly scripts: readonly {
346
+ readonly id: string;
347
+ readonly name: string;
348
+ readonly command: string;
349
+ readonly icon: "build" | "configure" | "debug" | "lint" | "play" | "test";
350
+ readonly runOnWorktreeCreate: boolean;
351
+ readonly previewUrl?: string | undefined;
352
+ readonly autoOpenPreview?: boolean | undefined;
353
+ }[];
354
+ readonly createdAt: string;
355
+ readonly updatedAt: string;
356
+ }[];
357
+ readonly threads: readonly {
358
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
359
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
360
+ readonly title: string;
361
+ readonly modelSelection: {
362
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
363
+ readonly model: string;
364
+ readonly options?: readonly {
365
+ readonly id: string;
366
+ readonly value: string | boolean;
367
+ }[];
368
+ };
369
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
370
+ readonly interactionMode: "default" | "plan";
371
+ readonly branch: string | null;
372
+ readonly worktreePath: string | null;
373
+ readonly latestTurn: {
374
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
375
+ readonly state: "completed" | "error" | "interrupted" | "running";
376
+ readonly requestedAt: string;
377
+ readonly startedAt: string | null;
378
+ readonly completedAt: string | null;
379
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
380
+ readonly sourceProposedPlan?: {
381
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
382
+ readonly planId: string;
383
+ } | undefined;
384
+ } | null;
385
+ readonly createdAt: string;
386
+ readonly updatedAt: string;
387
+ readonly archivedAt: string | null;
388
+ readonly settledOverride: "active" | "settled" | null;
389
+ readonly settledAt: string | null;
390
+ readonly snoozedUntil?: string | null | undefined;
391
+ readonly snoozedAt?: string | null | undefined;
392
+ readonly session: {
393
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
394
+ readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
395
+ readonly providerName: string | null;
396
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
397
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
398
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
399
+ readonly lastError: string | null;
400
+ readonly updatedAt: string;
401
+ } | null;
402
+ readonly latestUserMessageAt: string | null;
403
+ readonly hasPendingApprovals: boolean;
404
+ readonly hasPendingUserInput: boolean;
405
+ readonly hasActionableProposedPlan: boolean;
406
+ }[];
407
+ readonly updatedAt: string;
408
+ }, RpcError, never>;
409
+ getArchivedShellSnapshot: () => Effect.Effect<{
410
+ readonly snapshotSequence: number;
411
+ readonly projects: readonly {
412
+ readonly id: string & import("effect/Brand").Brand<"ProjectId">;
413
+ readonly title: string;
414
+ readonly workspaceRoot: string;
415
+ readonly repositoryIdentity?: {
416
+ readonly canonicalKey: string;
417
+ readonly locator: {
418
+ readonly source: "git-remote";
419
+ readonly remoteName: string;
420
+ readonly remoteUrl: string;
421
+ };
422
+ readonly rootPath?: string;
423
+ readonly displayName?: string;
424
+ readonly provider?: string;
425
+ readonly owner?: string;
426
+ readonly name?: string;
427
+ } | null | undefined;
428
+ readonly defaultModelSelection: {
429
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
430
+ readonly model: string;
431
+ readonly options?: readonly {
432
+ readonly id: string;
433
+ readonly value: string | boolean;
434
+ }[];
435
+ } | null;
436
+ readonly scripts: readonly {
437
+ readonly id: string;
438
+ readonly name: string;
439
+ readonly command: string;
440
+ readonly icon: "build" | "configure" | "debug" | "lint" | "play" | "test";
441
+ readonly runOnWorktreeCreate: boolean;
442
+ readonly previewUrl?: string | undefined;
443
+ readonly autoOpenPreview?: boolean | undefined;
444
+ }[];
445
+ readonly createdAt: string;
446
+ readonly updatedAt: string;
447
+ }[];
448
+ readonly threads: readonly {
449
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
450
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
451
+ readonly title: string;
452
+ readonly modelSelection: {
453
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
454
+ readonly model: string;
455
+ readonly options?: readonly {
456
+ readonly id: string;
457
+ readonly value: string | boolean;
458
+ }[];
459
+ };
460
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
461
+ readonly interactionMode: "default" | "plan";
462
+ readonly branch: string | null;
463
+ readonly worktreePath: string | null;
464
+ readonly latestTurn: {
465
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
466
+ readonly state: "completed" | "error" | "interrupted" | "running";
467
+ readonly requestedAt: string;
468
+ readonly startedAt: string | null;
469
+ readonly completedAt: string | null;
470
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
471
+ readonly sourceProposedPlan?: {
472
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
473
+ readonly planId: string;
474
+ } | undefined;
475
+ } | null;
476
+ readonly createdAt: string;
477
+ readonly updatedAt: string;
478
+ readonly archivedAt: string | null;
479
+ readonly settledOverride: "active" | "settled" | null;
480
+ readonly settledAt: string | null;
481
+ readonly snoozedUntil?: string | null | undefined;
482
+ readonly snoozedAt?: string | null | undefined;
483
+ readonly session: {
484
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
485
+ readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
486
+ readonly providerName: string | null;
487
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
488
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
489
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
490
+ readonly lastError: string | null;
491
+ readonly updatedAt: string;
492
+ } | null;
493
+ readonly latestUserMessageAt: string | null;
494
+ readonly hasPendingApprovals: boolean;
495
+ readonly hasPendingUserInput: boolean;
496
+ readonly hasActionableProposedPlan: boolean;
497
+ }[];
498
+ readonly updatedAt: string;
499
+ }, RpcError, never>;
500
+ getThreadSnapshot: (threadId: string) => Effect.Effect<{
501
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
502
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
503
+ readonly title: string;
504
+ readonly modelSelection: {
505
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
506
+ readonly model: string;
507
+ readonly options?: readonly {
508
+ readonly id: string;
509
+ readonly value: string | boolean;
510
+ }[];
511
+ };
512
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
513
+ readonly interactionMode: "default" | "plan";
514
+ readonly branch: string | null;
515
+ readonly worktreePath: string | null;
516
+ readonly latestTurn: {
517
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
518
+ readonly state: "completed" | "error" | "interrupted" | "running";
519
+ readonly requestedAt: string;
520
+ readonly startedAt: string | null;
521
+ readonly completedAt: string | null;
522
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
523
+ readonly sourceProposedPlan?: {
524
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
525
+ readonly planId: string;
526
+ } | undefined;
527
+ } | null;
528
+ readonly createdAt: string;
529
+ readonly updatedAt: string;
530
+ readonly archivedAt: string | null;
531
+ readonly settledOverride: "active" | "settled" | null;
532
+ readonly settledAt: string | null;
533
+ readonly snoozedUntil?: string | null | undefined;
534
+ readonly snoozedAt?: string | null | undefined;
535
+ readonly deletedAt: string | null;
536
+ readonly messages: readonly {
537
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
538
+ readonly role: "assistant" | "system" | "user";
539
+ readonly text: string;
540
+ readonly attachments?: readonly {
541
+ readonly type: "image";
542
+ readonly id: string;
543
+ readonly name: string;
544
+ readonly mimeType: string;
545
+ readonly sizeBytes: number;
546
+ }[] | undefined;
547
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
548
+ readonly streaming: boolean;
549
+ readonly createdAt: string;
550
+ readonly updatedAt: string;
551
+ }[];
552
+ readonly proposedPlans: readonly {
553
+ readonly id: string;
554
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
555
+ readonly planMarkdown: string;
556
+ readonly implementedAt: string | null;
557
+ readonly implementationThreadId: (string & import("effect/Brand").Brand<"ThreadId">) | null;
558
+ readonly createdAt: string;
559
+ readonly updatedAt: string;
560
+ }[];
561
+ readonly activities: readonly {
562
+ readonly id: string & import("effect/Brand").Brand<"EventId">;
563
+ readonly tone: "approval" | "error" | "info" | "tool";
564
+ readonly kind: string;
565
+ readonly summary: string;
566
+ readonly payload: unknown;
567
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
568
+ readonly sequence?: number | undefined;
569
+ readonly createdAt: string;
570
+ }[];
571
+ readonly checkpoints: readonly {
572
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
573
+ readonly checkpointTurnCount: number;
574
+ readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
575
+ readonly status: "error" | "missing" | "ready";
576
+ readonly files: readonly {
577
+ readonly path: string;
578
+ readonly kind: string;
579
+ readonly additions: number;
580
+ readonly deletions: number;
581
+ }[];
582
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
583
+ readonly completedAt: string;
584
+ }[];
585
+ readonly session: {
586
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
587
+ readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
588
+ readonly providerName: string | null;
589
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
590
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
591
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
592
+ readonly lastError: string | null;
593
+ readonly updatedAt: string;
594
+ } | null;
595
+ }, RpcError, never>;
596
+ watchShellSnapshots: () => Stream.Stream<OrchestrationShellSnapshot, OrchestrationError, import("effect/Scope").Scope>;
597
+ watchShellSequence: () => Stream.Stream<number, OrchestrationError, import("effect/Scope").Scope>;
598
+ watchThreadItems: (threadId: string) => Stream.Stream<OrchestrationThreadStreamItem, OrchestrationError, import("effect/Scope").Scope>;
599
+ openThread: (threadId: string) => Effect.Effect<{
600
+ snapshot: {
601
+ readonly id: string & import("effect/Brand").Brand<"ThreadId">;
602
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
603
+ readonly title: string;
604
+ readonly modelSelection: {
605
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
606
+ readonly model: string;
607
+ readonly options?: readonly {
608
+ readonly id: string;
609
+ readonly value: string | boolean;
610
+ }[];
611
+ };
612
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
613
+ readonly interactionMode: "default" | "plan";
614
+ readonly branch: string | null;
615
+ readonly worktreePath: string | null;
616
+ readonly latestTurn: {
617
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
618
+ readonly state: "completed" | "error" | "interrupted" | "running";
619
+ readonly requestedAt: string;
620
+ readonly startedAt: string | null;
621
+ readonly completedAt: string | null;
622
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
623
+ readonly sourceProposedPlan?: {
624
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
625
+ readonly planId: string;
626
+ } | undefined;
627
+ } | null;
628
+ readonly createdAt: string;
629
+ readonly updatedAt: string;
630
+ readonly archivedAt: string | null;
631
+ readonly settledOverride: "active" | "settled" | null;
632
+ readonly settledAt: string | null;
633
+ readonly snoozedUntil?: string | null | undefined;
634
+ readonly snoozedAt?: string | null | undefined;
635
+ readonly deletedAt: string | null;
636
+ readonly messages: readonly {
637
+ readonly id: string & import("effect/Brand").Brand<"MessageId">;
638
+ readonly role: "assistant" | "system" | "user";
639
+ readonly text: string;
640
+ readonly attachments?: readonly {
641
+ readonly type: "image";
642
+ readonly id: string;
643
+ readonly name: string;
644
+ readonly mimeType: string;
645
+ readonly sizeBytes: number;
646
+ }[] | undefined;
647
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
648
+ readonly streaming: boolean;
649
+ readonly createdAt: string;
650
+ readonly updatedAt: string;
651
+ }[];
652
+ readonly proposedPlans: readonly {
653
+ readonly id: string;
654
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
655
+ readonly planMarkdown: string;
656
+ readonly implementedAt: string | null;
657
+ readonly implementationThreadId: (string & import("effect/Brand").Brand<"ThreadId">) | null;
658
+ readonly createdAt: string;
659
+ readonly updatedAt: string;
660
+ }[];
661
+ readonly activities: readonly {
662
+ readonly id: string & import("effect/Brand").Brand<"EventId">;
663
+ readonly tone: "approval" | "error" | "info" | "tool";
664
+ readonly kind: string;
665
+ readonly summary: string;
666
+ readonly payload: unknown;
667
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
668
+ readonly sequence?: number | undefined;
669
+ readonly createdAt: string;
670
+ }[];
671
+ readonly checkpoints: readonly {
672
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
673
+ readonly checkpointTurnCount: number;
674
+ readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
675
+ readonly status: "error" | "missing" | "ready";
676
+ readonly files: readonly {
677
+ readonly path: string;
678
+ readonly kind: string;
679
+ readonly additions: number;
680
+ readonly deletions: number;
681
+ }[];
682
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
683
+ readonly completedAt: string;
684
+ }[];
685
+ readonly session: {
686
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
687
+ readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
688
+ readonly providerName: string | null;
689
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
690
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
691
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
692
+ readonly lastError: string | null;
693
+ readonly updatedAt: string;
694
+ } | null;
695
+ };
696
+ events: Stream.Stream<{
697
+ readonly sequence: number;
698
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
699
+ readonly aggregateKind: "project" | "thread";
700
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
701
+ readonly occurredAt: string;
702
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
703
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
704
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
705
+ readonly metadata: {
706
+ readonly providerTurnId?: string | undefined;
707
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
708
+ readonly adapterKey?: string | undefined;
709
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
710
+ readonly ingestedAt?: string | undefined;
711
+ };
712
+ readonly type: "project.created";
713
+ readonly payload: {
714
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
715
+ readonly title: string;
716
+ readonly workspaceRoot: string;
717
+ readonly repositoryIdentity?: {
718
+ readonly canonicalKey: string;
719
+ readonly locator: {
720
+ readonly source: "git-remote";
721
+ readonly remoteName: string;
722
+ readonly remoteUrl: string;
723
+ };
724
+ readonly rootPath?: string;
725
+ readonly displayName?: string;
726
+ readonly provider?: string;
727
+ readonly owner?: string;
728
+ readonly name?: string;
729
+ } | null | undefined;
730
+ readonly defaultModelSelection: {
731
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
732
+ readonly model: string;
733
+ readonly options?: readonly {
734
+ readonly id: string;
735
+ readonly value: string | boolean;
736
+ }[];
737
+ } | null;
738
+ readonly scripts: readonly {
739
+ readonly id: string;
740
+ readonly name: string;
741
+ readonly command: string;
742
+ readonly icon: "build" | "configure" | "debug" | "lint" | "play" | "test";
743
+ readonly runOnWorktreeCreate: boolean;
744
+ readonly previewUrl?: string | undefined;
745
+ readonly autoOpenPreview?: boolean | undefined;
746
+ }[];
747
+ readonly createdAt: string;
748
+ readonly updatedAt: string;
749
+ };
750
+ } | {
751
+ readonly sequence: number;
752
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
753
+ readonly aggregateKind: "project" | "thread";
754
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
755
+ readonly occurredAt: string;
756
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
757
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
758
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
759
+ readonly metadata: {
760
+ readonly providerTurnId?: string | undefined;
761
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
762
+ readonly adapterKey?: string | undefined;
763
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
764
+ readonly ingestedAt?: string | undefined;
765
+ };
766
+ readonly type: "project.meta-updated";
767
+ readonly payload: {
768
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
769
+ readonly title?: string | undefined;
770
+ readonly workspaceRoot?: string | undefined;
771
+ readonly repositoryIdentity?: {
772
+ readonly canonicalKey: string;
773
+ readonly locator: {
774
+ readonly source: "git-remote";
775
+ readonly remoteName: string;
776
+ readonly remoteUrl: string;
777
+ };
778
+ readonly rootPath?: string;
779
+ readonly displayName?: string;
780
+ readonly provider?: string;
781
+ readonly owner?: string;
782
+ readonly name?: string;
783
+ } | null | undefined;
784
+ readonly defaultModelSelection?: {
785
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
786
+ readonly model: string;
787
+ readonly options?: readonly {
788
+ readonly id: string;
789
+ readonly value: string | boolean;
790
+ }[];
791
+ } | null | undefined;
792
+ readonly scripts?: readonly {
793
+ readonly id: string;
794
+ readonly name: string;
795
+ readonly command: string;
796
+ readonly icon: "build" | "configure" | "debug" | "lint" | "play" | "test";
797
+ readonly runOnWorktreeCreate: boolean;
798
+ readonly previewUrl?: string | undefined;
799
+ readonly autoOpenPreview?: boolean | undefined;
800
+ }[] | undefined;
801
+ readonly updatedAt: string;
802
+ };
803
+ } | {
804
+ readonly sequence: number;
805
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
806
+ readonly aggregateKind: "project" | "thread";
807
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
808
+ readonly occurredAt: string;
809
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
810
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
811
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
812
+ readonly metadata: {
813
+ readonly providerTurnId?: string | undefined;
814
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
815
+ readonly adapterKey?: string | undefined;
816
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
817
+ readonly ingestedAt?: string | undefined;
818
+ };
819
+ readonly type: "project.deleted";
820
+ readonly payload: {
821
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
822
+ readonly deletedAt: string;
823
+ };
824
+ } | {
825
+ readonly sequence: number;
826
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
827
+ readonly aggregateKind: "project" | "thread";
828
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
829
+ readonly occurredAt: string;
830
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
831
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
832
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
833
+ readonly metadata: {
834
+ readonly providerTurnId?: string | undefined;
835
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
836
+ readonly adapterKey?: string | undefined;
837
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
838
+ readonly ingestedAt?: string | undefined;
839
+ };
840
+ readonly type: "thread.created";
841
+ readonly payload: {
842
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
843
+ readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
844
+ readonly title: string;
845
+ readonly modelSelection: {
846
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
847
+ readonly model: string;
848
+ readonly options?: readonly {
849
+ readonly id: string;
850
+ readonly value: string | boolean;
851
+ }[];
852
+ };
853
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
854
+ readonly interactionMode: "default" | "plan";
855
+ readonly branch: string | null;
856
+ readonly worktreePath: string | null;
857
+ readonly createdAt: string;
858
+ readonly updatedAt: string;
859
+ };
860
+ } | {
861
+ readonly sequence: number;
862
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
863
+ readonly aggregateKind: "project" | "thread";
864
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
865
+ readonly occurredAt: string;
866
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
867
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
868
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
869
+ readonly metadata: {
870
+ readonly providerTurnId?: string | undefined;
871
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
872
+ readonly adapterKey?: string | undefined;
873
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
874
+ readonly ingestedAt?: string | undefined;
875
+ };
876
+ readonly type: "thread.deleted";
877
+ readonly payload: {
878
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
879
+ readonly deletedAt: string;
880
+ };
881
+ } | {
882
+ readonly sequence: number;
883
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
884
+ readonly aggregateKind: "project" | "thread";
885
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
886
+ readonly occurredAt: string;
887
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
888
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
889
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
890
+ readonly metadata: {
891
+ readonly providerTurnId?: string | undefined;
892
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
893
+ readonly adapterKey?: string | undefined;
894
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
895
+ readonly ingestedAt?: string | undefined;
896
+ };
897
+ readonly type: "thread.archived";
898
+ readonly payload: {
899
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
900
+ readonly archivedAt: string;
901
+ readonly updatedAt: string;
902
+ };
903
+ } | {
904
+ readonly sequence: number;
905
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
906
+ readonly aggregateKind: "project" | "thread";
907
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
908
+ readonly occurredAt: string;
909
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
910
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
911
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
912
+ readonly metadata: {
913
+ readonly providerTurnId?: string | undefined;
914
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
915
+ readonly adapterKey?: string | undefined;
916
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
917
+ readonly ingestedAt?: string | undefined;
918
+ };
919
+ readonly type: "thread.unarchived";
920
+ readonly payload: {
921
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
922
+ readonly updatedAt: string;
923
+ };
924
+ } | {
925
+ readonly sequence: number;
926
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
927
+ readonly aggregateKind: "project" | "thread";
928
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
929
+ readonly occurredAt: string;
930
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
931
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
932
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
933
+ readonly metadata: {
934
+ readonly providerTurnId?: string | undefined;
935
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
936
+ readonly adapterKey?: string | undefined;
937
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
938
+ readonly ingestedAt?: string | undefined;
939
+ };
940
+ readonly type: "thread.settled";
941
+ readonly payload: {
942
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
943
+ readonly settledAt: string;
944
+ readonly updatedAt: string;
945
+ };
946
+ } | {
947
+ readonly sequence: number;
948
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
949
+ readonly aggregateKind: "project" | "thread";
950
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
951
+ readonly occurredAt: string;
952
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
953
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
954
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
955
+ readonly metadata: {
956
+ readonly providerTurnId?: string | undefined;
957
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
958
+ readonly adapterKey?: string | undefined;
959
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
960
+ readonly ingestedAt?: string | undefined;
961
+ };
962
+ readonly type: "thread.unsettled";
963
+ readonly payload: {
964
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
965
+ readonly reason: "activity" | "user";
966
+ readonly updatedAt: string;
967
+ };
968
+ } | {
969
+ readonly sequence: number;
970
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
971
+ readonly aggregateKind: "project" | "thread";
972
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
973
+ readonly occurredAt: string;
974
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
975
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
976
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
977
+ readonly metadata: {
978
+ readonly providerTurnId?: string | undefined;
979
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
980
+ readonly adapterKey?: string | undefined;
981
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
982
+ readonly ingestedAt?: string | undefined;
983
+ };
984
+ readonly type: "thread.snoozed";
985
+ readonly payload: {
986
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
987
+ readonly snoozedUntil: string;
988
+ readonly snoozedAt: string;
989
+ readonly updatedAt: string;
990
+ };
991
+ } | {
992
+ readonly sequence: number;
993
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
994
+ readonly aggregateKind: "project" | "thread";
995
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
996
+ readonly occurredAt: string;
997
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
998
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
999
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1000
+ readonly metadata: {
1001
+ readonly providerTurnId?: string | undefined;
1002
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1003
+ readonly adapterKey?: string | undefined;
1004
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1005
+ readonly ingestedAt?: string | undefined;
1006
+ };
1007
+ readonly type: "thread.unsnoozed";
1008
+ readonly payload: {
1009
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1010
+ readonly reason: "activity" | "user";
1011
+ readonly updatedAt: string;
1012
+ };
1013
+ } | {
1014
+ readonly sequence: number;
1015
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1016
+ readonly aggregateKind: "project" | "thread";
1017
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1018
+ readonly occurredAt: string;
1019
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1020
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1021
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1022
+ readonly metadata: {
1023
+ readonly providerTurnId?: string | undefined;
1024
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1025
+ readonly adapterKey?: string | undefined;
1026
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1027
+ readonly ingestedAt?: string | undefined;
1028
+ };
1029
+ readonly type: "thread.meta-updated";
1030
+ readonly payload: {
1031
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1032
+ readonly title?: string | undefined;
1033
+ readonly modelSelection?: {
1034
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
1035
+ readonly model: string;
1036
+ readonly options?: readonly {
1037
+ readonly id: string;
1038
+ readonly value: string | boolean;
1039
+ }[];
1040
+ } | undefined;
1041
+ readonly branch?: string | null | undefined;
1042
+ readonly worktreePath?: string | null | undefined;
1043
+ readonly updatedAt: string;
1044
+ };
1045
+ } | {
1046
+ readonly sequence: number;
1047
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1048
+ readonly aggregateKind: "project" | "thread";
1049
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1050
+ readonly occurredAt: string;
1051
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1052
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1053
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1054
+ readonly metadata: {
1055
+ readonly providerTurnId?: string | undefined;
1056
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1057
+ readonly adapterKey?: string | undefined;
1058
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1059
+ readonly ingestedAt?: string | undefined;
1060
+ };
1061
+ readonly type: "thread.runtime-mode-set";
1062
+ readonly payload: {
1063
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1064
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
1065
+ readonly updatedAt: string;
1066
+ };
1067
+ } | {
1068
+ readonly sequence: number;
1069
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1070
+ readonly aggregateKind: "project" | "thread";
1071
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1072
+ readonly occurredAt: string;
1073
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1074
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1075
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1076
+ readonly metadata: {
1077
+ readonly providerTurnId?: string | undefined;
1078
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1079
+ readonly adapterKey?: string | undefined;
1080
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1081
+ readonly ingestedAt?: string | undefined;
1082
+ };
1083
+ readonly type: "thread.interaction-mode-set";
1084
+ readonly payload: {
1085
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1086
+ readonly interactionMode: "default" | "plan";
1087
+ readonly updatedAt: string;
1088
+ };
1089
+ } | {
1090
+ readonly sequence: number;
1091
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1092
+ readonly aggregateKind: "project" | "thread";
1093
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1094
+ readonly occurredAt: string;
1095
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1096
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1097
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1098
+ readonly metadata: {
1099
+ readonly providerTurnId?: string | undefined;
1100
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1101
+ readonly adapterKey?: string | undefined;
1102
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1103
+ readonly ingestedAt?: string | undefined;
1104
+ };
1105
+ readonly type: "thread.message-sent";
1106
+ readonly payload: {
1107
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1108
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1109
+ readonly role: "assistant" | "system" | "user";
1110
+ readonly text: string;
1111
+ readonly attachments?: readonly {
1112
+ readonly type: "image";
1113
+ readonly id: string;
1114
+ readonly name: string;
1115
+ readonly mimeType: string;
1116
+ readonly sizeBytes: number;
1117
+ }[] | undefined;
1118
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
1119
+ readonly streaming: boolean;
1120
+ readonly createdAt: string;
1121
+ readonly updatedAt: string;
1122
+ };
1123
+ } | {
1124
+ readonly sequence: number;
1125
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1126
+ readonly aggregateKind: "project" | "thread";
1127
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1128
+ readonly occurredAt: string;
1129
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1130
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1131
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1132
+ readonly metadata: {
1133
+ readonly providerTurnId?: string | undefined;
1134
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1135
+ readonly adapterKey?: string | undefined;
1136
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1137
+ readonly ingestedAt?: string | undefined;
1138
+ };
1139
+ readonly type: "thread.turn-start-requested";
1140
+ readonly payload: {
1141
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1142
+ readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
1143
+ readonly modelSelection?: {
1144
+ readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
1145
+ readonly model: string;
1146
+ readonly options?: readonly {
1147
+ readonly id: string;
1148
+ readonly value: string | boolean;
1149
+ }[];
1150
+ } | undefined;
1151
+ readonly titleSeed?: string | undefined;
1152
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
1153
+ readonly interactionMode: "default" | "plan";
1154
+ readonly sourceProposedPlan?: {
1155
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1156
+ readonly planId: string;
1157
+ } | undefined;
1158
+ readonly createdAt: string;
1159
+ };
1160
+ } | {
1161
+ readonly sequence: number;
1162
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1163
+ readonly aggregateKind: "project" | "thread";
1164
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1165
+ readonly occurredAt: string;
1166
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1167
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1168
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1169
+ readonly metadata: {
1170
+ readonly providerTurnId?: string | undefined;
1171
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1172
+ readonly adapterKey?: string | undefined;
1173
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1174
+ readonly ingestedAt?: string | undefined;
1175
+ };
1176
+ readonly type: "thread.turn-interrupt-requested";
1177
+ readonly payload: {
1178
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1179
+ readonly turnId?: (string & import("effect/Brand").Brand<"TurnId">) | undefined;
1180
+ readonly createdAt: string;
1181
+ };
1182
+ } | {
1183
+ readonly sequence: number;
1184
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1185
+ readonly aggregateKind: "project" | "thread";
1186
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1187
+ readonly occurredAt: string;
1188
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1189
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1190
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1191
+ readonly metadata: {
1192
+ readonly providerTurnId?: string | undefined;
1193
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1194
+ readonly adapterKey?: string | undefined;
1195
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1196
+ readonly ingestedAt?: string | undefined;
1197
+ };
1198
+ readonly type: "thread.approval-response-requested";
1199
+ readonly payload: {
1200
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1201
+ readonly requestId: string & import("effect/Brand").Brand<"ApprovalRequestId">;
1202
+ readonly decision: "accept" | "acceptForSession" | "cancel" | "decline";
1203
+ readonly createdAt: string;
1204
+ };
1205
+ } | {
1206
+ readonly sequence: number;
1207
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1208
+ readonly aggregateKind: "project" | "thread";
1209
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1210
+ readonly occurredAt: string;
1211
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1212
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1213
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1214
+ readonly metadata: {
1215
+ readonly providerTurnId?: string | undefined;
1216
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1217
+ readonly adapterKey?: string | undefined;
1218
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1219
+ readonly ingestedAt?: string | undefined;
1220
+ };
1221
+ readonly type: "thread.user-input-response-requested";
1222
+ readonly payload: {
1223
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1224
+ readonly requestId: string & import("effect/Brand").Brand<"ApprovalRequestId">;
1225
+ readonly answers: {
1226
+ readonly [x: string]: unknown;
1227
+ };
1228
+ readonly createdAt: string;
1229
+ };
1230
+ } | {
1231
+ readonly sequence: number;
1232
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1233
+ readonly aggregateKind: "project" | "thread";
1234
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1235
+ readonly occurredAt: string;
1236
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1237
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1238
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1239
+ readonly metadata: {
1240
+ readonly providerTurnId?: string | undefined;
1241
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1242
+ readonly adapterKey?: string | undefined;
1243
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1244
+ readonly ingestedAt?: string | undefined;
1245
+ };
1246
+ readonly type: "thread.checkpoint-revert-requested";
1247
+ readonly payload: {
1248
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1249
+ readonly turnCount: number;
1250
+ readonly createdAt: string;
1251
+ };
1252
+ } | {
1253
+ readonly sequence: number;
1254
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1255
+ readonly aggregateKind: "project" | "thread";
1256
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1257
+ readonly occurredAt: string;
1258
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1259
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1260
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1261
+ readonly metadata: {
1262
+ readonly providerTurnId?: string | undefined;
1263
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1264
+ readonly adapterKey?: string | undefined;
1265
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1266
+ readonly ingestedAt?: string | undefined;
1267
+ };
1268
+ readonly type: "thread.reverted";
1269
+ readonly payload: {
1270
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1271
+ readonly turnCount: number;
1272
+ };
1273
+ } | {
1274
+ readonly sequence: number;
1275
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1276
+ readonly aggregateKind: "project" | "thread";
1277
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1278
+ readonly occurredAt: string;
1279
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1280
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1281
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1282
+ readonly metadata: {
1283
+ readonly providerTurnId?: string | undefined;
1284
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1285
+ readonly adapterKey?: string | undefined;
1286
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1287
+ readonly ingestedAt?: string | undefined;
1288
+ };
1289
+ readonly type: "thread.session-stop-requested";
1290
+ readonly payload: {
1291
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1292
+ readonly createdAt: string;
1293
+ };
1294
+ } | {
1295
+ readonly sequence: number;
1296
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1297
+ readonly aggregateKind: "project" | "thread";
1298
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1299
+ readonly occurredAt: string;
1300
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1301
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1302
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1303
+ readonly metadata: {
1304
+ readonly providerTurnId?: string | undefined;
1305
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1306
+ readonly adapterKey?: string | undefined;
1307
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1308
+ readonly ingestedAt?: string | undefined;
1309
+ };
1310
+ readonly type: "thread.session-set";
1311
+ readonly payload: {
1312
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1313
+ readonly session: {
1314
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1315
+ readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
1316
+ readonly providerName: string | null;
1317
+ readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
1318
+ readonly runtimeMode: "approval-required" | "auto" | "auto-accept-edits" | "full-access";
1319
+ readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
1320
+ readonly lastError: string | null;
1321
+ readonly updatedAt: string;
1322
+ };
1323
+ };
1324
+ } | {
1325
+ readonly sequence: number;
1326
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1327
+ readonly aggregateKind: "project" | "thread";
1328
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1329
+ readonly occurredAt: string;
1330
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1331
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1332
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1333
+ readonly metadata: {
1334
+ readonly providerTurnId?: string | undefined;
1335
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1336
+ readonly adapterKey?: string | undefined;
1337
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1338
+ readonly ingestedAt?: string | undefined;
1339
+ };
1340
+ readonly type: "thread.proposed-plan-upserted";
1341
+ readonly payload: {
1342
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1343
+ readonly proposedPlan: {
1344
+ readonly id: string;
1345
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
1346
+ readonly planMarkdown: string;
1347
+ readonly implementedAt: string | null;
1348
+ readonly implementationThreadId: (string & import("effect/Brand").Brand<"ThreadId">) | null;
1349
+ readonly createdAt: string;
1350
+ readonly updatedAt: string;
1351
+ };
1352
+ };
1353
+ } | {
1354
+ readonly sequence: number;
1355
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1356
+ readonly aggregateKind: "project" | "thread";
1357
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1358
+ readonly occurredAt: string;
1359
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1360
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1361
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1362
+ readonly metadata: {
1363
+ readonly providerTurnId?: string | undefined;
1364
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1365
+ readonly adapterKey?: string | undefined;
1366
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1367
+ readonly ingestedAt?: string | undefined;
1368
+ };
1369
+ readonly type: "thread.turn-diff-completed";
1370
+ readonly payload: {
1371
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1372
+ readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
1373
+ readonly checkpointTurnCount: number;
1374
+ readonly checkpointRef: string & import("effect/Brand").Brand<"CheckpointRef">;
1375
+ readonly status: "error" | "missing" | "ready";
1376
+ readonly files: readonly {
1377
+ readonly path: string;
1378
+ readonly kind: string;
1379
+ readonly additions: number;
1380
+ readonly deletions: number;
1381
+ }[];
1382
+ readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1383
+ readonly completedAt: string;
1384
+ };
1385
+ } | {
1386
+ readonly sequence: number;
1387
+ readonly eventId: string & import("effect/Brand").Brand<"EventId">;
1388
+ readonly aggregateKind: "project" | "thread";
1389
+ readonly aggregateId: (string & import("effect/Brand").Brand<"ProjectId">) | (string & import("effect/Brand").Brand<"ThreadId">);
1390
+ readonly occurredAt: string;
1391
+ readonly commandId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1392
+ readonly causationEventId: (string & import("effect/Brand").Brand<"EventId">) | null;
1393
+ readonly correlationId: (string & import("effect/Brand").Brand<"CommandId">) | null;
1394
+ readonly metadata: {
1395
+ readonly providerTurnId?: string | undefined;
1396
+ readonly providerItemId?: (string & import("effect/Brand").Brand<"ProviderItemId">) | undefined;
1397
+ readonly adapterKey?: string | undefined;
1398
+ readonly requestId?: (string & import("effect/Brand").Brand<"ApprovalRequestId">) | undefined;
1399
+ readonly ingestedAt?: string | undefined;
1400
+ };
1401
+ readonly type: "thread.activity-appended";
1402
+ readonly payload: {
1403
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
1404
+ readonly activity: {
1405
+ readonly id: string & import("effect/Brand").Brand<"EventId">;
1406
+ readonly tone: "approval" | "error" | "info" | "tool";
1407
+ readonly kind: string;
1408
+ readonly summary: string;
1409
+ readonly payload: unknown;
1410
+ readonly turnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
1411
+ readonly sequence?: number | undefined;
1412
+ readonly createdAt: string;
1413
+ };
1414
+ };
1415
+ }, RpcError, never>;
1416
+ }, RpcError, import("effect/Scope").Scope>;
1417
+ }, never, T3RpcOperations>;
1418
+ declare const T3OrchestrationLive: Layer.Layer<T3Orchestration, never, T3RpcOperations>;
1419
+ //#endregion
1420
+ export { type OpenThread, type Orchestration, type OrchestrationError, T3Orchestration, T3OrchestrationLive, makeT3Orchestration };