t3code-cli 0.11.0 → 0.12.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 (317) hide show
  1. package/README.md +42 -10
  2. package/dist/application.js +2 -2
  3. package/dist/auth.js +1 -1
  4. package/dist/bin.js +85526 -2662
  5. package/dist/cli.js +15 -2
  6. package/dist/config.js +120 -2
  7. package/dist/connection.js +2 -2
  8. package/dist/index.js +1 -1
  9. package/dist/node.js +6 -2
  10. package/dist/orchestration.js +2 -2
  11. package/dist/rpc.js +1 -1
  12. package/dist/runtime.js +2 -2
  13. package/dist/shared.js +42956 -38119
  14. package/dist/src/application/actions.d.ts +25 -0
  15. package/dist/src/application/index.d.ts +3 -3
  16. package/dist/src/application/layer.d.ts +51 -35
  17. package/dist/src/application/model-selection.d.ts +2 -2
  18. package/dist/src/application/models.d.ts +1 -1
  19. package/dist/src/application/project-commands.d.ts +22 -2
  20. package/dist/src/application/projects.d.ts +7 -7
  21. package/dist/src/application/service.d.ts +65 -2
  22. package/dist/src/application/shell-sequence.d.ts +11 -0
  23. package/dist/src/application/terminals.d.ts +2 -2
  24. package/dist/src/application/thread-commands.d.ts +1 -1
  25. package/dist/src/application/thread-wait.d.ts +9 -0
  26. package/dist/src/application/threads.d.ts +56 -5
  27. package/dist/src/auth/error.d.ts +2 -1
  28. package/dist/src/auth/index.d.ts +1 -1
  29. package/dist/src/auth/layer.d.ts +34 -6
  30. package/dist/src/auth/local-base-dir.d.ts +5 -2
  31. package/dist/src/auth/local-origin.d.ts +3 -3
  32. package/dist/src/auth/local-token.d.ts +3 -3
  33. package/dist/src/auth/service.d.ts +15 -3
  34. package/dist/src/auth/type.d.ts +40 -1
  35. package/dist/src/cli/env/flag.d.ts +2 -0
  36. package/dist/src/cli/env/index.d.ts +2 -0
  37. package/dist/src/cli/env/selection-layer.d.ts +3 -0
  38. package/dist/src/cli/flags.d.ts +2 -0
  39. package/dist/src/cli/format/index.d.ts +1 -0
  40. package/dist/src/cli/format/output.d.ts +12 -0
  41. package/dist/src/cli/index.d.ts +4 -0
  42. package/dist/src/cli/runtime/index.d.ts +1 -0
  43. package/dist/src/cli/runtime/service.d.ts +16 -0
  44. package/dist/src/{scope → cli/scope}/resolve.d.ts +5 -4
  45. package/dist/src/config/config.d.ts +49 -0
  46. package/dist/src/config/credential/cipher-node.d.ts +3 -0
  47. package/dist/src/config/credential/cipher-web.d.ts +3 -0
  48. package/dist/src/config/credential/cipher.d.ts +29 -0
  49. package/dist/src/config/credential/env.d.ts +3 -0
  50. package/dist/src/config/credential/error.d.ts +8 -0
  51. package/dist/src/config/credential/index.d.ts +6 -0
  52. package/dist/src/config/credential/service.d.ts +34 -0
  53. package/dist/src/config/env/env.d.ts +55 -0
  54. package/dist/src/config/env/index.d.ts +2 -0
  55. package/dist/src/{layout/base-dir.d.ts → config/env/layout.d.ts} +0 -1
  56. package/dist/src/config/environment-name/index.d.ts +1 -0
  57. package/dist/src/config/environment-name/name.d.ts +10 -0
  58. package/dist/src/config/error.d.ts +4 -11
  59. package/dist/src/config/index.d.ts +10 -5
  60. package/dist/src/config/keystore/error.d.ts +8 -0
  61. package/dist/src/config/keystore/file.d.ts +9 -0
  62. package/dist/src/config/keystore/index.d.ts +4 -0
  63. package/dist/src/config/keystore/keyring-node.d.ts +4 -0
  64. package/dist/src/config/keystore/service.d.ts +33 -0
  65. package/dist/src/config/paths/index.d.ts +1 -0
  66. package/dist/src/config/paths/paths.d.ts +6 -0
  67. package/dist/src/config/persist/file-mode.d.ts +4 -0
  68. package/dist/src/config/persist/migration.d.ts +68 -0
  69. package/dist/src/config/persist/persist.d.ts +40 -0
  70. package/dist/src/config/persist/schema.d.ts +68 -0
  71. package/dist/src/config/resolve/resolve.d.ts +40 -0
  72. package/dist/src/config/selection/index.d.ts +1 -0
  73. package/dist/src/config/selection/resolve.d.ts +4 -0
  74. package/dist/src/config/selection/service.d.ts +10 -0
  75. package/dist/src/config/types.d.ts +36 -0
  76. package/dist/src/config/url/error.d.ts +10 -0
  77. package/dist/src/config/url/index.d.ts +2 -0
  78. package/dist/src/connection/index.d.ts +0 -1
  79. package/dist/src/contracts/index.d.ts +1 -1
  80. package/dist/src/domain/error.d.ts +14 -1
  81. package/dist/src/domain/helpers.d.ts +16 -1
  82. package/dist/src/domain/model-config.d.ts +4 -1
  83. package/dist/src/domain/thread-activities.d.ts +1 -1
  84. package/dist/src/domain/thread-lifecycle.d.ts +10 -1
  85. package/dist/src/index.d.ts +1 -2
  86. package/dist/src/{connection/node.d.ts → node/connection.d.ts} +1 -1
  87. package/dist/src/node/index.d.ts +1 -2
  88. package/dist/src/orchestration/index.d.ts +0 -1
  89. package/dist/src/orchestration/layer.d.ts +153 -7
  90. package/dist/src/orchestration/service.d.ts +1 -1
  91. package/dist/src/rpc/error.d.ts +2 -2
  92. package/dist/src/rpc/index.d.ts +2 -3
  93. package/dist/src/rpc/layer.d.ts +574 -46
  94. package/dist/src/rpc/operation.d.ts +574 -46
  95. package/dist/src/rpc/ws-group.d.ts +184 -19
  96. package/dist/src/runtime/index.d.ts +1 -2
  97. package/dist/src/runtime/layer.d.ts +12 -8
  98. package/dist/src/t3tools/index.d.ts +1 -1
  99. package/dist/t3tools.js +2 -2
  100. package/package.json +25 -21
  101. package/src/application/actions.test.ts +328 -0
  102. package/src/application/actions.ts +475 -0
  103. package/src/application/index.ts +9 -5
  104. package/src/application/layer.ts +9 -0
  105. package/src/application/model-selection.ts +2 -2
  106. package/src/application/project-commands.ts +23 -5
  107. package/src/application/projects.ts +6 -7
  108. package/src/application/service.ts +79 -1
  109. package/src/application/shell-sequence.ts +1 -1
  110. package/src/application/terminals.ts +2 -1
  111. package/src/application/thread-commands.ts +1 -1
  112. package/src/application/thread-update.ts +1 -1
  113. package/src/application/thread-wait.ts +1 -1
  114. package/src/application/threads.test.ts +9 -3
  115. package/src/application/threads.ts +6 -6
  116. package/src/auth/error.ts +2 -1
  117. package/src/auth/index.ts +7 -0
  118. package/src/auth/layer.test-utils.ts +34 -0
  119. package/src/auth/layer.ts +116 -34
  120. package/src/auth/local-base-dir.ts +13 -6
  121. package/src/auth/local-origin.ts +10 -7
  122. package/src/auth/local-token.ts +28 -23
  123. package/src/auth/service.test.ts +200 -0
  124. package/src/auth/service.ts +27 -3
  125. package/src/auth/transport.ts +2 -2
  126. package/src/auth/type.ts +47 -1
  127. package/src/bin.ts +24 -6
  128. package/src/cli/action-format.ts +110 -0
  129. package/src/cli/action.ts +398 -0
  130. package/src/cli/app.ts +6 -0
  131. package/src/cli/auth.ts +76 -23
  132. package/src/cli/env/flag.ts +8 -0
  133. package/src/cli/env/index.ts +2 -0
  134. package/src/cli/env/selection-layer.test.ts +49 -0
  135. package/src/cli/env/selection-layer.ts +27 -0
  136. package/src/cli/env.ts +107 -0
  137. package/src/cli/extra-args.test.ts +32 -0
  138. package/src/cli/extra-args.ts +22 -0
  139. package/src/cli/flags.ts +11 -1
  140. package/src/cli/format/auth.ts +92 -0
  141. package/src/cli/format/human.ts +131 -0
  142. package/src/cli/format/index.ts +12 -0
  143. package/src/cli/format/model.ts +29 -0
  144. package/src/cli/format/output.ts +51 -0
  145. package/src/cli/format/project.ts +32 -0
  146. package/src/cli/format/terminal.ts +87 -0
  147. package/src/cli/{thread-format.test.ts → format/thread.test.ts} +6 -4
  148. package/src/cli/format/thread.ts +185 -0
  149. package/src/cli/index.ts +20 -0
  150. package/src/cli/interaction/confirm.ts +64 -0
  151. package/src/cli/{self-action.ts → interaction/self-action.ts} +8 -6
  152. package/src/cli/message-input.ts +1 -1
  153. package/src/cli/model.ts +9 -5
  154. package/src/cli/project.ts +13 -7
  155. package/src/cli/projects/delete.ts +13 -12
  156. package/src/cli/require.ts +9 -7
  157. package/src/cli/runtime/index.ts +1 -0
  158. package/src/cli/runtime/service.ts +28 -0
  159. package/src/{scope → cli/scope}/resolve.ts +11 -9
  160. package/src/cli/terminal/attach.ts +3 -6
  161. package/src/cli/terminal/create.ts +10 -9
  162. package/src/cli/terminal/destroy.ts +13 -11
  163. package/src/cli/terminal/list.ts +10 -9
  164. package/src/cli/terminal/read.test-utils.ts +48 -0
  165. package/src/cli/terminal/read.test.ts +35 -0
  166. package/src/cli/terminal/read.ts +3 -6
  167. package/src/cli/terminal/scope.ts +10 -5
  168. package/src/cli/terminal/shared.ts +1 -1
  169. package/src/cli/terminal/stream.ts +3 -6
  170. package/src/cli/terminal/wait.test.ts +5 -3
  171. package/src/cli/terminal/wait.ts +10 -9
  172. package/src/cli/terminal/write.test.ts +34 -0
  173. package/src/cli/terminal/write.ts +10 -9
  174. package/src/cli/threads/approve.ts +11 -7
  175. package/src/cli/threads/archive.ts +14 -9
  176. package/src/cli/threads/callback.ts +6 -4
  177. package/src/cli/threads/delete.ts +17 -11
  178. package/src/cli/threads/interrupt.ts +14 -9
  179. package/src/cli/threads/list.test.ts +5 -3
  180. package/src/cli/threads/list.ts +10 -10
  181. package/src/cli/threads/messages.ts +11 -7
  182. package/src/cli/threads/respond.ts +11 -7
  183. package/src/cli/threads/send.ts +19 -9
  184. package/src/cli/threads/show.ts +11 -7
  185. package/src/cli/threads/start.ts +18 -13
  186. package/src/cli/threads/unarchive.ts +11 -7
  187. package/src/cli/threads/update.ts +14 -9
  188. package/src/cli/threads/wait.ts +11 -7
  189. package/src/cli/wait-events.ts +1 -1
  190. package/src/config/config.ts +260 -0
  191. package/src/config/credential/cipher-node.ts +40 -0
  192. package/src/config/credential/cipher-web.ts +82 -0
  193. package/src/config/credential/cipher.ts +39 -0
  194. package/src/config/credential/env.ts +13 -0
  195. package/src/config/credential/error.ts +9 -0
  196. package/src/config/credential/index.ts +6 -0
  197. package/src/config/credential/service.test-utils.ts +25 -0
  198. package/src/config/credential/service.test.ts +116 -0
  199. package/src/config/credential/service.ts +205 -0
  200. package/src/config/env/env.test-utils.ts +14 -0
  201. package/src/config/env/env.ts +81 -0
  202. package/src/config/env/index.ts +2 -0
  203. package/src/{layout/base-dir.ts → config/env/layout.ts} +0 -9
  204. package/src/config/environment-name/index.ts +7 -0
  205. package/src/config/environment-name/name.test.ts +66 -0
  206. package/src/config/environment-name/name.ts +49 -0
  207. package/src/config/error.ts +6 -8
  208. package/src/config/index.ts +16 -5
  209. package/src/config/keystore/error.ts +9 -0
  210. package/src/config/keystore/file.ts +96 -0
  211. package/src/config/keystore/index.ts +4 -0
  212. package/src/config/keystore/keyring-node.test.ts +12 -0
  213. package/src/config/keystore/keyring-node.ts +100 -0
  214. package/src/config/keystore/service.test-utils.ts +15 -0
  215. package/src/config/keystore/service.test.ts +18 -0
  216. package/src/config/keystore/service.ts +29 -0
  217. package/src/config/layer.test-utils.ts +45 -0
  218. package/src/config/layer.test.ts +209 -0
  219. package/src/config/paths/index.ts +1 -0
  220. package/src/config/paths/paths.ts +36 -0
  221. package/src/config/persist/file-mode.ts +21 -0
  222. package/src/config/persist/migration.test.ts +71 -0
  223. package/src/config/persist/migration.ts +82 -0
  224. package/src/config/persist/persist.test.ts +113 -0
  225. package/src/config/persist/persist.ts +65 -0
  226. package/src/config/persist/schema.ts +37 -0
  227. package/src/config/platform.test-utils.ts +20 -0
  228. package/src/config/resolve/resolve.test-utils.ts +20 -0
  229. package/src/config/resolve/resolve.test.ts +137 -0
  230. package/src/config/resolve/resolve.ts +104 -0
  231. package/src/config/selection/index.ts +1 -0
  232. package/src/config/selection/resolve.ts +14 -0
  233. package/src/config/selection/service.ts +29 -0
  234. package/src/config/temp-home.test-utils.ts +7 -0
  235. package/src/config/types.ts +49 -0
  236. package/src/config/url/error.ts +8 -0
  237. package/src/config/url/index.ts +7 -0
  238. package/src/config/url/url.test.ts +31 -0
  239. package/src/connection/index.ts +0 -1
  240. package/src/contracts/index.ts +1 -1
  241. package/src/domain/error.ts +20 -1
  242. package/src/domain/helpers.test.ts +1 -1
  243. package/src/domain/helpers.ts +1 -1
  244. package/src/domain/model-config.ts +1 -1
  245. package/src/domain/thread-activities.test.ts +1 -1
  246. package/src/domain/thread-activities.ts +1 -1
  247. package/src/domain/thread-lifecycle.test.ts +1 -1
  248. package/src/domain/thread-lifecycle.ts +1 -1
  249. package/src/effect.test-utils.ts +25 -0
  250. package/src/index.ts +1 -1
  251. package/src/{connection/node.ts → node/connection.ts} +1 -1
  252. package/src/node/index.ts +1 -2
  253. package/src/orchestration/index.ts +0 -1
  254. package/src/orchestration/layer.ts +1 -1
  255. package/src/orchestration/service.ts +1 -1
  256. package/src/rpc/error.ts +2 -2
  257. package/src/rpc/index.ts +2 -3
  258. package/src/rpc/layer.ts +1 -1
  259. package/src/rpc/ws-group.ts +1 -1
  260. package/src/runtime/index.ts +2 -1
  261. package/src/runtime/layer.test-utils.ts +32 -0
  262. package/src/runtime/layer.test.ts +66 -0
  263. package/src/runtime/layer.ts +15 -9
  264. package/src/t3tools/index.ts +1 -1
  265. package/src/types/marked-terminal.d.ts +11 -0
  266. package/dist/layout.js +0 -2
  267. package/dist/scope.js +0 -2
  268. package/dist/src/cli/output-format.d.ts +0 -11
  269. package/dist/src/config/layer.d.ts +0 -22
  270. package/dist/src/config/service.d.ts +0 -22
  271. package/dist/src/environment/layer.d.ts +0 -3
  272. package/dist/src/environment/service.d.ts +0 -12
  273. package/dist/src/layout/index.d.ts +0 -1
  274. package/dist/upstream-t3code/packages/contracts/src/auth.d.ts +0 -441
  275. package/dist/upstream-t3code/packages/contracts/src/baseSchemas.d.ts +0 -38
  276. package/dist/upstream-t3code/packages/contracts/src/desktopBootstrap.d.ts +0 -14
  277. package/dist/upstream-t3code/packages/contracts/src/editor.d.ts +0 -124
  278. package/dist/upstream-t3code/packages/contracts/src/environment.d.ts +0 -64
  279. package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +0 -762
  280. package/dist/upstream-t3code/packages/contracts/src/filesystem.d.ts +0 -26
  281. package/dist/upstream-t3code/packages/contracts/src/git.d.ts +0 -500
  282. package/dist/upstream-t3code/packages/contracts/src/index.d.ts +0 -25
  283. package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +0 -490
  284. package/dist/upstream-t3code/packages/contracts/src/keybindings.d.ts +0 -133
  285. package/dist/upstream-t3code/packages/contracts/src/model.d.ts +0 -112
  286. package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +0 -6682
  287. package/dist/upstream-t3code/packages/contracts/src/project.d.ts +0 -45
  288. package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +0 -116
  289. package/dist/upstream-t3code/packages/contracts/src/providerInstance.d.ts +0 -99
  290. package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +0 -4276
  291. package/dist/upstream-t3code/packages/contracts/src/relay.d.ts +0 -1262
  292. package/dist/upstream-t3code/packages/contracts/src/relayClient.d.ts +0 -48
  293. package/dist/upstream-t3code/packages/contracts/src/remoteAccess.d.ts +0 -45
  294. package/dist/upstream-t3code/packages/contracts/src/review.d.ts +0 -37
  295. package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +0 -8218
  296. package/dist/upstream-t3code/packages/contracts/src/server.d.ts +0 -2291
  297. package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +0 -271
  298. package/dist/upstream-t3code/packages/contracts/src/sourceControl.d.ts +0 -177
  299. package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +0 -330
  300. package/dist/upstream-t3code/packages/contracts/src/vcs.d.ts +0 -148
  301. package/src/cli/auth-format.ts +0 -45
  302. package/src/cli/confirm.ts +0 -31
  303. package/src/cli/model-format.ts +0 -18
  304. package/src/cli/output-format.ts +0 -45
  305. package/src/cli/project-format.ts +0 -18
  306. package/src/cli/terminal/commands.test.ts +0 -101
  307. package/src/cli/terminal-format.ts +0 -167
  308. package/src/cli/thread-format.ts +0 -128
  309. package/src/config/layer.ts +0 -105
  310. package/src/config/service.ts +0 -26
  311. package/src/environment/layer.ts +0 -12
  312. package/src/environment/service.ts +0 -13
  313. package/src/layout/index.ts +0 -1
  314. /package/dist/src/{scope → cli/scope}/index.d.ts +0 -0
  315. /package/dist/src/config/{url.d.ts → url/url.d.ts} +0 -0
  316. /package/src/{scope → cli/scope}/index.ts +0 -0
  317. /package/src/config/{url.ts → url/url.ts} +0 -0
@@ -0,0 +1,25 @@
1
+ import * as Crypto from "effect/Crypto";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Path from "effect/Path";
4
+ import { type OrchestrationProjectShell, type ProjectScript } from "@t3tools/contracts";
5
+ import { T3Orchestration } from "../orchestration/service.ts";
6
+ import { T3TerminalApplication, type AddProjectActionInput, type ProjectActionSelector, type UpdateProjectActionInput } from "./service.ts";
7
+ export declare const makeActionApplication: () => Effect.Effect<{
8
+ addAction: (input: AddProjectActionInput) => Effect.Effect<import("./service.ts").ProjectActionMutationResult, import("./error.ts").ApplicationError>;
9
+ deleteAction: (input: {
10
+ readonly projectRef: string;
11
+ readonly selector: ProjectActionSelector;
12
+ }) => Effect.Effect<import("./service.ts").ProjectActionDeleteResult, import("./error.ts").ApplicationError>;
13
+ listActions: (projectRef: string) => Effect.Effect<{
14
+ readonly project: OrchestrationProjectShell;
15
+ readonly actions: ReadonlyArray<ProjectScript>;
16
+ }, import("./error.ts").ApplicationError>;
17
+ runAction: (input: {
18
+ readonly threadId: string;
19
+ readonly selector: ProjectActionSelector;
20
+ readonly terminalId?: string;
21
+ }) => Effect.Effect<import("./service.ts").ProjectActionRunResult, import("./error.ts").ApplicationError>;
22
+ updateAction: (input: UpdateProjectActionInput) => Effect.Effect<import("./service.ts").ProjectActionMutationResult, import("./error.ts").ApplicationError>;
23
+ }, never, T3Orchestration | Path.Path | Crypto.Crypto | T3TerminalApplication>;
24
+ export declare function nextProjectScriptId(name: string, existingIds: Iterable<string>): string;
25
+ export declare function resolveActionBySelector(scripts: ReadonlyArray<ProjectScript>, selector: ProjectActionSelector, projectId: string): ProjectScript;
@@ -1,4 +1,4 @@
1
- export { T3Application, T3ModelApplication, T3ProjectApplication, T3TerminalApplication, T3ThreadApplication, } from "./service.ts";
2
- export { makeT3Application, T3ApplicationLive, T3ApplicationSlicesLive, T3ModelApplicationLive, T3ProjectApplicationLive, T3TerminalApplicationLive, T3ThreadApplicationLive, } from "./layer.ts";
3
- export type { SendThreadInput, StartThreadInput, StartThreadPolicy, T3ApplicationService, T3ModelApplicationService, T3ProjectApplicationService, T3TerminalApplicationService, T3ThreadApplicationService, UpdateThreadInput, WaitEvent, } from "./service.ts";
1
+ export { T3ActionApplication, T3Application, T3ModelApplication, T3ProjectApplication, T3TerminalApplication, T3ThreadApplication, } from "./service.ts";
2
+ export { makeT3Application, T3ActionApplicationLive, T3ApplicationLive, T3ApplicationSlicesLive, T3ModelApplicationLive, T3ProjectApplicationLive, T3TerminalApplicationLive, T3ThreadApplicationLive, } from "./layer.ts";
3
+ export type { AddProjectActionInput, ProjectActionDeleteResult, ProjectActionMutationResult, ProjectActionRunResult, ProjectActionSelector, SendThreadInput, StartThreadInput, StartThreadPolicy, T3ActionApplicationService, UpdateProjectActionInput, UpdateThreadInput, WaitEvent, } from "./service.ts";
4
4
  export type { ApplicationError } from "./error.ts";
@@ -1,14 +1,14 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Layer from "effect/Layer";
3
- import { T3Application, T3ModelApplication, T3ProjectApplication, T3TerminalApplication, T3ThreadApplication } from "./service.ts";
3
+ import { T3ActionApplication, T3Application, T3ModelApplication, T3ProjectApplication, T3TerminalApplication, T3ThreadApplication } from "./service.ts";
4
4
  export declare const makeT3Application: () => Effect.Effect<{
5
5
  listThreads: (projectRef: string, options?: {
6
6
  readonly include?: import("./service.ts").ListThreadsInclude;
7
7
  }) => Effect.Effect<{
8
- readonly project: import("#t3tools/contracts").OrchestrationProjectShell;
9
- readonly threads: ReadonlyArray<import("#t3tools/contracts").OrchestrationThreadShell>;
8
+ readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
9
+ readonly threads: ReadonlyArray<import("@t3tools/contracts").OrchestrationThreadShell>;
10
10
  }, import("./error.ts").ApplicationError>;
11
- getThreadMessages: (threadId: string) => Effect.Effect<import("#t3tools/contracts").OrchestrationThread, import("./error.ts").ApplicationError>;
11
+ getThreadMessages: (threadId: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationThread, import("./error.ts").ApplicationError>;
12
12
  showThread: (threadId: string) => Effect.Effect<import("./threads.ts").ThreadShow, import("./error.ts").ApplicationError>;
13
13
  approveThread: (input: {
14
14
  readonly threadId: string;
@@ -17,51 +17,51 @@ export declare const makeT3Application: () => Effect.Effect<{
17
17
  }) => Effect.Effect<{
18
18
  readonly threadId: string;
19
19
  readonly requestId: string;
20
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
20
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
21
21
  }, import("./error.ts").ApplicationError>;
22
22
  respondToThread: (input: {
23
23
  readonly threadId: string;
24
24
  readonly requestId: string;
25
- readonly answers: import("#t3tools/contracts").ProviderUserInputAnswers;
25
+ readonly answers: import("@t3tools/contracts").ProviderUserInputAnswers;
26
26
  }) => Effect.Effect<{
27
27
  readonly threadId: string;
28
28
  readonly requestId: string;
29
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
29
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
30
30
  }, import("./error.ts").ApplicationError>;
31
- archiveThread: (threadId: string) => Effect.Effect<import("#t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
32
- interruptThread: (threadId: string) => Effect.Effect<import("#t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
33
- unarchiveThread: (threadId: string) => Effect.Effect<import("#t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
31
+ archiveThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
32
+ interruptThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
33
+ unarchiveThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
34
34
  deleteThread: (threadId: string) => Effect.Effect<{
35
35
  readonly threadId: string;
36
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
36
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
37
37
  }, import("./error.ts").ApplicationError>;
38
- updateThread: (input: import("./service.ts").UpdateThreadInput) => Effect.Effect<import("#t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
38
+ updateThread: (input: import("./service.ts").UpdateThreadInput) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
39
39
  startThread: (input: import("./service.ts").StartThreadInput, policy?: import("./service.ts").StartThreadPolicy) => Effect.Effect<{
40
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
41
- readonly project: import("#t3tools/contracts").OrchestrationProjectShell;
40
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
41
+ readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
42
42
  readonly threadId: string;
43
- readonly thread?: import("#t3tools/contracts").OrchestrationThread;
43
+ readonly thread?: import("@t3tools/contracts").OrchestrationThread;
44
44
  }, import("./error.ts").ApplicationError>;
45
45
  sendThread: (input: import("./service.ts").SendThreadInput, policy?: import("./service.ts").StartThreadPolicy) => Effect.Effect<{
46
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
46
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
47
47
  readonly threadId: string;
48
- readonly thread?: import("#t3tools/contracts").OrchestrationThread;
48
+ readonly thread?: import("@t3tools/contracts").OrchestrationThread;
49
49
  }, import("./error.ts").ApplicationError>;
50
50
  watchThread: (threadId: string) => import("effect/Stream").Stream<import("./service.ts").WaitEvent, import("./error.ts").ApplicationError>;
51
- waitForThread: (threadId: string) => Effect.Effect<import("#t3tools/contracts").OrchestrationThread, import("./error.ts").ApplicationError>;
51
+ waitForThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationThread, import("./error.ts").ApplicationError>;
52
52
  callbackThread: (input: import("./service.ts").CallbackThreadInput) => Effect.Effect<{
53
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
53
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
54
54
  readonly targetThreadId: string;
55
55
  }, import("./error.ts").ApplicationError>;
56
- listTerminals: (threadId: string) => Effect.Effect<ReadonlyArray<import("#t3tools/contracts").TerminalSummary>, import("./error.ts").ApplicationError>;
57
- getTerminal: (terminal: import("./service.ts").TerminalRef) => Effect.Effect<import("#t3tools/contracts").TerminalSummary, import("./error.ts").ApplicationError>;
58
- createTerminal: (input: import("./service.ts").CreateTerminalInput) => Effect.Effect<import("#t3tools/contracts").TerminalSessionSnapshot, import("./error.ts").ApplicationError>;
56
+ listTerminals: (threadId: string) => Effect.Effect<ReadonlyArray<import("@t3tools/contracts").TerminalSummary>, import("./error.ts").ApplicationError>;
57
+ getTerminal: (terminal: import("./service.ts").TerminalRef) => Effect.Effect<import("@t3tools/contracts").TerminalSummary, import("./error.ts").ApplicationError>;
58
+ createTerminal: (input: import("./service.ts").CreateTerminalInput) => Effect.Effect<import("@t3tools/contracts").TerminalSessionSnapshot, import("./error.ts").ApplicationError>;
59
59
  attachTerminal: (input: {
60
60
  readonly terminal: import("./service.ts").TerminalAttachTarget;
61
61
  readonly cols?: number;
62
62
  readonly rows?: number;
63
- }) => import("effect/Stream").Stream<import("#t3tools/contracts").TerminalAttachStreamEvent, import("./error.ts").ApplicationError>;
64
- watchTerminalMetadata: () => import("effect/Stream").Stream<import("#t3tools/contracts").TerminalMetadataStreamEvent, import("./error.ts").ApplicationError>;
63
+ }) => import("effect/Stream").Stream<import("@t3tools/contracts").TerminalAttachStreamEvent, import("./error.ts").ApplicationError>;
64
+ watchTerminalMetadata: () => import("effect/Stream").Stream<import("@t3tools/contracts").TerminalMetadataStreamEvent, import("./error.ts").ApplicationError>;
65
65
  writeTerminal: (input: {
66
66
  readonly terminal: import("./service.ts").TerminalRef;
67
67
  readonly data: string;
@@ -72,30 +72,46 @@ export declare const makeT3Application: () => Effect.Effect<{
72
72
  readonly rows: number;
73
73
  }) => Effect.Effect<void, import("./error.ts").ApplicationError>;
74
74
  destroyTerminal: (terminal: import("./service.ts").TerminalRef) => Effect.Effect<void, import("./error.ts").ApplicationError>;
75
- loadShell: () => Effect.Effect<import("#t3tools/contracts").OrchestrationShellSnapshot, import("./error.ts").ApplicationError>;
75
+ loadShell: () => Effect.Effect<import("@t3tools/contracts").OrchestrationShellSnapshot, import("./error.ts").ApplicationError>;
76
76
  addProject: (input: {
77
77
  readonly path: string;
78
78
  readonly title?: string;
79
79
  }) => Effect.Effect<{
80
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
81
- readonly project: import("#t3tools/contracts").OrchestrationProjectShell;
80
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
81
+ readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
82
82
  }, import("./error.ts").ApplicationError>;
83
- resolveProject: (projectRef: string) => Effect.Effect<import("#t3tools/contracts").OrchestrationProjectShell, import("./error.ts").ApplicationError>;
83
+ resolveProject: (projectRef: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationProjectShell, import("./error.ts").ApplicationError>;
84
84
  deleteProject: (input: {
85
85
  readonly projectId: string;
86
86
  readonly force?: boolean;
87
87
  }) => Effect.Effect<{
88
88
  readonly projectId: string;
89
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
89
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
90
90
  }, import("./error.ts").ApplicationError>;
91
91
  listModels: (input: {
92
92
  readonly all?: boolean;
93
93
  readonly provider?: string;
94
- }) => Effect.Effect<ReadonlyArray<import("#t3tools/contracts").ServerProvider>, import("./error.ts").ApplicationError>;
95
- }, never, T3ModelApplication | T3ProjectApplication | T3ThreadApplication | T3TerminalApplication>;
94
+ }) => Effect.Effect<ReadonlyArray<import("@t3tools/contracts").ServerProvider>, import("./error.ts").ApplicationError>;
95
+ listActions: (projectRef: string) => Effect.Effect<{
96
+ readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
97
+ readonly actions: ReadonlyArray<import("@t3tools/contracts").ProjectScript>;
98
+ }, import("./error.ts").ApplicationError>;
99
+ addAction: (input: import("./service.ts").AddProjectActionInput) => Effect.Effect<import("./service.ts").ProjectActionMutationResult, import("./error.ts").ApplicationError>;
100
+ updateAction: (input: import("./service.ts").UpdateProjectActionInput) => Effect.Effect<import("./service.ts").ProjectActionMutationResult, import("./error.ts").ApplicationError>;
101
+ deleteAction: (input: {
102
+ readonly projectRef: string;
103
+ readonly selector: import("./service.ts").ProjectActionSelector;
104
+ }) => Effect.Effect<import("./service.ts").ProjectActionDeleteResult, import("./error.ts").ApplicationError>;
105
+ runAction: (input: {
106
+ readonly threadId: string;
107
+ readonly selector: import("./service.ts").ProjectActionSelector;
108
+ readonly terminalId?: string;
109
+ }) => Effect.Effect<import("./service.ts").ProjectActionRunResult, import("./error.ts").ApplicationError>;
110
+ }, never, T3ActionApplication | T3ModelApplication | T3ProjectApplication | T3ThreadApplication | T3TerminalApplication>;
96
111
  export declare const T3ModelApplicationLive: Layer.Layer<T3ModelApplication, never, import("../orchestration/service.ts").T3Orchestration>;
97
- export declare const T3ProjectApplicationLive: Layer.Layer<T3ProjectApplication, never, import("../environment/service.ts").Environment | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto>;
112
+ export declare const T3ProjectApplicationLive: Layer.Layer<T3ProjectApplication, never, import("../cli/runtime/service.ts").CliRuntime | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto>;
98
113
  export declare const T3TerminalApplicationLive: Layer.Layer<T3TerminalApplication, never, import("../orchestration/service.ts").T3Orchestration | import("effect/Crypto").Crypto | import("../rpc/operation.ts").T3RpcOperations>;
99
- export declare const T3ThreadApplicationLive: Layer.Layer<T3ThreadApplication, never, import("../environment/service.ts").Environment | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto>;
100
- export declare const T3ApplicationSlicesLive: Layer.Layer<T3ModelApplication | T3ProjectApplication | T3ThreadApplication | T3TerminalApplication, never, import("../environment/service.ts").Environment | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto | import("../rpc/operation.ts").T3RpcOperations>;
101
- export declare const T3ApplicationLive: Layer.Layer<T3Application, never, import("../environment/service.ts").Environment | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto | import("../rpc/operation.ts").T3RpcOperations>;
114
+ export declare const T3ActionApplicationLive: Layer.Layer<T3ActionApplication, never, import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto | import("../rpc/operation.ts").T3RpcOperations>;
115
+ export declare const T3ThreadApplicationLive: Layer.Layer<T3ThreadApplication, never, import("../cli/runtime/service.ts").CliRuntime | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto>;
116
+ export declare const T3ApplicationSlicesLive: Layer.Layer<T3ActionApplication | T3ModelApplication | T3ProjectApplication | T3ThreadApplication | T3TerminalApplication, never, import("../cli/runtime/service.ts").CliRuntime | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto | import("../rpc/operation.ts").T3RpcOperations>;
117
+ export declare const T3ApplicationLive: Layer.Layer<T3Application, never, import("../cli/runtime/service.ts").CliRuntime | import("../orchestration/service.ts").T3Orchestration | import("effect/Path").Path | import("effect/Crypto").Crypto | import("../rpc/operation.ts").T3RpcOperations>;
@@ -1,6 +1,6 @@
1
1
  import * as Effect from "effect/Effect";
2
- import { ModelSelection } from "#t3tools/contracts";
3
- import type { OrchestrationProjectShell } from "#t3tools/contracts";
2
+ import { ModelSelection } from "@t3tools/contracts";
3
+ import type { OrchestrationProjectShell } from "@t3tools/contracts";
4
4
  import { ModelSelectionError } from "../domain/error.ts";
5
5
  import type { ServerConfigForCli } from "../orchestration/service.ts";
6
6
  import type { StartThreadInput } from "./service.ts";
@@ -4,5 +4,5 @@ export declare const makeModelsApplication: () => Effect.Effect<{
4
4
  listModels: (input: {
5
5
  readonly all?: boolean;
6
6
  readonly provider?: string;
7
- }) => Effect.Effect<ReadonlyArray<import("#t3tools/contracts").ServerProvider>, import("./error.ts").ApplicationError>;
7
+ }) => Effect.Effect<ReadonlyArray<import("@t3tools/contracts").ServerProvider>, import("./error.ts").ApplicationError>;
8
8
  }, never, T3Orchestration>;
@@ -1,10 +1,11 @@
1
1
  import * as Crypto from "effect/Crypto";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Path from "effect/Path";
4
- import { Environment } from "../environment/service.ts";
4
+ import { type ClientOrchestrationCommand } from "@t3tools/contracts";
5
5
  export declare const makeProjectCreateCommand: (input: {
6
6
  readonly path: string;
7
7
  readonly title?: string;
8
+ readonly cwd: string;
8
9
  }) => Effect.Effect<{
9
10
  type: "project.create";
10
11
  commandId: string & import("effect/Brand").Brand<"CommandId">;
@@ -12,7 +13,7 @@ export declare const makeProjectCreateCommand: (input: {
12
13
  title: string;
13
14
  workspaceRoot: string;
14
15
  createdAt: string;
15
- }, never, Environment | Path.Path | Crypto.Crypto>;
16
+ }, never, Path.Path | Crypto.Crypto>;
16
17
  export declare const makeProjectDeleteCommand: (input: {
17
18
  readonly projectId: string;
18
19
  readonly force?: boolean;
@@ -22,3 +23,22 @@ export declare const makeProjectDeleteCommand: (input: {
22
23
  commandId: string & import("effect/Brand").Brand<"CommandId">;
23
24
  projectId: string & import("effect/Brand").Brand<"ProjectId">;
24
25
  }, never, Crypto.Crypto>;
26
+ export declare const makeProjectMetaUpdateCommand: (input: {
27
+ readonly projectId: string;
28
+ readonly scripts: Extract<ClientOrchestrationCommand, {
29
+ readonly type: "project.meta.update";
30
+ }>["scripts"];
31
+ }) => Effect.Effect<{
32
+ type: "project.meta.update";
33
+ commandId: string & import("effect/Brand").Brand<"CommandId">;
34
+ projectId: string & import("effect/Brand").Brand<"ProjectId">;
35
+ scripts: readonly {
36
+ readonly id: string;
37
+ readonly name: string;
38
+ readonly command: string;
39
+ readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
40
+ readonly runOnWorktreeCreate: boolean;
41
+ readonly previewUrl?: string | undefined;
42
+ readonly autoOpenPreview?: boolean | undefined;
43
+ }[] | undefined;
44
+ }, never, Crypto.Crypto>;
@@ -1,23 +1,23 @@
1
1
  import * as Crypto from "effect/Crypto";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Path from "effect/Path";
4
- import { Environment } from "../environment/service.ts";
4
+ import { CliRuntime } from "../cli/runtime/service.ts";
5
5
  import { T3Orchestration } from "../orchestration/service.ts";
6
6
  export declare const makeProjectApplication: () => Effect.Effect<{
7
- loadShell: () => Effect.Effect<import("#t3tools/contracts").OrchestrationShellSnapshot, import("./error.ts").ApplicationError>;
7
+ loadShell: () => Effect.Effect<import("@t3tools/contracts").OrchestrationShellSnapshot, import("./error.ts").ApplicationError>;
8
8
  addProject: (input: {
9
9
  readonly path: string;
10
10
  readonly title?: string;
11
11
  }) => Effect.Effect<{
12
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
13
- readonly project: import("#t3tools/contracts").OrchestrationProjectShell;
12
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
13
+ readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
14
14
  }, import("./error.ts").ApplicationError>;
15
- resolveProject: (projectRef: string) => Effect.Effect<import("#t3tools/contracts").OrchestrationProjectShell, import("./error.ts").ApplicationError>;
15
+ resolveProject: (projectRef: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationProjectShell, import("./error.ts").ApplicationError>;
16
16
  deleteProject: (input: {
17
17
  readonly projectId: string;
18
18
  readonly force?: boolean;
19
19
  }) => Effect.Effect<{
20
20
  readonly projectId: string;
21
- readonly dispatch: import("#t3tools/contracts").DispatchResult;
21
+ readonly dispatch: import("@t3tools/contracts").DispatchResult;
22
22
  }, import("./error.ts").ApplicationError>;
23
- }, never, Environment | T3Orchestration | Path.Path | Crypto.Crypto>;
23
+ }, never, CliRuntime | T3Orchestration | Path.Path | Crypto.Crypto>;
@@ -1,7 +1,7 @@
1
1
  import * as Context from "effect/Context";
2
2
  import type * as Effect from "effect/Effect";
3
3
  import type * as Stream from "effect/Stream";
4
- import type { DispatchResult, ModelSelection, OrchestrationMessage, OrchestrationProjectShell, OrchestrationShellSnapshot, OrchestrationThread, OrchestrationThreadShell, ProviderUserInputAnswers, ServerProvider, TerminalAttachStreamEvent, TerminalMetadataStreamEvent, TerminalSessionSnapshot, TerminalSummary } from "#t3tools/contracts";
4
+ import type { DispatchResult, ModelSelection, OrchestrationMessage, OrchestrationProjectShell, OrchestrationShellSnapshot, OrchestrationThread, OrchestrationThreadShell, ProjectScript, ProjectScriptIcon, ProviderUserInputAnswers, ServerProvider, TerminalAttachStreamEvent, TerminalMetadataStreamEvent, TerminalSessionSnapshot, TerminalSummary } from "@t3tools/contracts";
5
5
  import type { ApplicationError } from "./error.ts";
6
6
  import type { ThreadShow } from "./threads.ts";
7
7
  export type StartThreadInput = {
@@ -17,6 +17,7 @@ export type CreateTerminalInput = {
17
17
  readonly threadId: string;
18
18
  readonly terminalId?: string;
19
19
  readonly command?: string;
20
+ readonly env?: Readonly<Record<string, string>>;
20
21
  };
21
22
  export type TerminalRef = {
22
23
  readonly threadId: string;
@@ -63,6 +64,68 @@ export type WaitEvent = {
63
64
  readonly type: "done";
64
65
  readonly thread: OrchestrationThread;
65
66
  };
67
+ export type ProjectActionSelector = {
68
+ readonly id: string;
69
+ readonly name?: never;
70
+ } | {
71
+ readonly id?: never;
72
+ readonly name: string;
73
+ };
74
+ export type AddProjectActionInput = {
75
+ readonly projectRef: string;
76
+ readonly id?: string;
77
+ readonly name: string;
78
+ readonly command: string;
79
+ readonly icon?: ProjectScriptIcon;
80
+ readonly setup?: boolean;
81
+ readonly previewUrl?: string;
82
+ readonly autoOpenPreview?: boolean;
83
+ };
84
+ export type UpdateProjectActionInput = {
85
+ readonly projectRef: string;
86
+ readonly selector: ProjectActionSelector;
87
+ readonly name?: string;
88
+ readonly command?: string;
89
+ readonly icon?: ProjectScriptIcon;
90
+ readonly setup?: boolean;
91
+ readonly previewUrl?: string | null;
92
+ readonly autoOpenPreview?: boolean | null;
93
+ };
94
+ export type ProjectActionMutationResult = {
95
+ readonly dispatch: DispatchResult;
96
+ readonly project: OrchestrationProjectShell;
97
+ readonly action: ProjectScript;
98
+ };
99
+ export type ProjectActionDeleteResult = {
100
+ readonly dispatch: DispatchResult;
101
+ readonly project: OrchestrationProjectShell;
102
+ readonly action: ProjectScript;
103
+ };
104
+ export type ProjectActionRunResult = {
105
+ readonly project: OrchestrationProjectShell;
106
+ readonly action: ProjectScript;
107
+ readonly terminal: TerminalSessionSnapshot;
108
+ };
109
+ export type T3ActionApplicationService = {
110
+ readonly listActions: (projectRef: string) => Effect.Effect<{
111
+ readonly project: OrchestrationProjectShell;
112
+ readonly actions: ReadonlyArray<ProjectScript>;
113
+ }, ApplicationError>;
114
+ readonly addAction: (input: AddProjectActionInput) => Effect.Effect<ProjectActionMutationResult, ApplicationError>;
115
+ readonly updateAction: (input: UpdateProjectActionInput) => Effect.Effect<ProjectActionMutationResult, ApplicationError>;
116
+ readonly deleteAction: (input: {
117
+ readonly projectRef: string;
118
+ readonly selector: ProjectActionSelector;
119
+ }) => Effect.Effect<ProjectActionDeleteResult, ApplicationError>;
120
+ readonly runAction: (input: {
121
+ readonly threadId: string;
122
+ readonly selector: ProjectActionSelector;
123
+ readonly terminalId?: string;
124
+ }) => Effect.Effect<ProjectActionRunResult, ApplicationError>;
125
+ };
126
+ declare const T3ActionApplication_base: Context.ServiceClass<T3ActionApplication, "t3cli/T3ActionApplication", T3ActionApplicationService>;
127
+ export declare class T3ActionApplication extends T3ActionApplication_base {
128
+ }
66
129
  export type T3ModelApplicationService = {
67
130
  readonly listModels: (input: {
68
131
  readonly all?: boolean;
@@ -173,7 +236,7 @@ export type T3TerminalApplicationService = {
173
236
  declare const T3TerminalApplication_base: Context.ServiceClass<T3TerminalApplication, "t3cli/T3TerminalApplication", T3TerminalApplicationService>;
174
237
  export declare class T3TerminalApplication extends T3TerminalApplication_base {
175
238
  }
176
- export type T3ApplicationService = T3ModelApplicationService & T3ProjectApplicationService & T3ThreadApplicationService & T3TerminalApplicationService;
239
+ export type T3ApplicationService = T3ModelApplicationService & T3ActionApplicationService & T3ProjectApplicationService & T3ThreadApplicationService & T3TerminalApplicationService;
177
240
  declare const T3Application_base: Context.ServiceClass<T3Application, "t3cli/T3Application", T3ApplicationService>;
178
241
  export declare class T3Application extends T3Application_base {
179
242
  }
@@ -23,6 +23,8 @@ export declare function waitForShellSequence(input: {
23
23
  readonly command: string;
24
24
  readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
25
25
  readonly runOnWorktreeCreate: boolean;
26
+ readonly previewUrl?: string | undefined;
27
+ readonly autoOpenPreview?: boolean | undefined;
26
28
  }[];
27
29
  readonly createdAt: string;
28
30
  readonly updatedAt: string;
@@ -81,6 +83,15 @@ export declare function waitForShellSequence(input: {
81
83
  readonly updatedAt: string;
82
84
  readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
83
85
  } | null;
86
+ readonly goal: {
87
+ readonly objective: string;
88
+ readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
89
+ readonly tokensUsed: number;
90
+ readonly tokenBudget: number | null;
91
+ readonly timeUsedSeconds: number;
92
+ readonly createdAt: string;
93
+ readonly updatedAt: string;
94
+ } | null;
84
95
  readonly latestUserMessageAt: string | null;
85
96
  readonly hasPendingApprovals: boolean;
86
97
  readonly hasPendingUserInput: boolean;
@@ -11,7 +11,7 @@ export declare const makeTerminalApplication: () => Effect.Effect<{
11
11
  readonly terminal: import("./service.ts").TerminalAttachTarget;
12
12
  readonly cols?: number;
13
13
  readonly rows?: number;
14
- }) => Stream.Stream<import("#t3tools/contracts").TerminalAttachStreamEvent, import("./error.ts").ApplicationError>;
14
+ }) => Stream.Stream<import("@t3tools/contracts").TerminalAttachStreamEvent, import("./error.ts").ApplicationError>;
15
15
  createTerminal: (input: CreateTerminalInput) => Effect.Effect<{
16
16
  readonly threadId: string;
17
17
  readonly terminalId: string;
@@ -58,7 +58,7 @@ export declare const makeTerminalApplication: () => Effect.Effect<{
58
58
  readonly cols: number;
59
59
  readonly rows: number;
60
60
  }) => Effect.Effect<void, RpcError, never>;
61
- watchTerminalMetadata: () => Stream.Stream<import("#t3tools/contracts").TerminalMetadataStreamEvent, import("./error.ts").ApplicationError>;
61
+ watchTerminalMetadata: () => Stream.Stream<import("@t3tools/contracts").TerminalMetadataStreamEvent, import("./error.ts").ApplicationError>;
62
62
  writeTerminal: (input: {
63
63
  readonly terminal: TerminalRef;
64
64
  readonly data: string;
@@ -1,6 +1,6 @@
1
1
  import * as Crypto from "effect/Crypto";
2
2
  import * as Effect from "effect/Effect";
3
- import { type ModelSelection, type OrchestrationProjectShell, type ProviderApprovalDecision, type ProviderUserInputAnswers } from "#t3tools/contracts";
3
+ import { type ModelSelection, type OrchestrationProjectShell, type ProviderApprovalDecision, type ProviderUserInputAnswers } from "@t3tools/contracts";
4
4
  import type { ServerConfigForCli } from "../orchestration/service.ts";
5
5
  import type { SendThreadInput, StartThreadInput } from "./service.ts";
6
6
  export declare const makeThreadStartCommands: (input: {
@@ -40,6 +40,15 @@ export declare function waitForThread(input: {
40
40
  readonly updatedAt: string;
41
41
  readonly archivedAt: string | null;
42
42
  readonly deletedAt: string | null;
43
+ readonly goal: {
44
+ readonly objective: string;
45
+ readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
46
+ readonly tokensUsed: number;
47
+ readonly tokenBudget: number | null;
48
+ readonly timeUsedSeconds: number;
49
+ readonly createdAt: string;
50
+ readonly updatedAt: string;
51
+ } | null;
43
52
  readonly messages: readonly {
44
53
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
45
54
  readonly role: "user" | "assistant" | "system";
@@ -2,15 +2,15 @@ import * as Crypto from "effect/Crypto";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Path from "effect/Path";
4
4
  import * as Stream from "effect/Stream";
5
- import { Environment } from "../environment/service.ts";
5
+ import { CliRuntime } from "../cli/runtime/service.ts";
6
6
  import { T3Orchestration } from "../orchestration/service.ts";
7
7
  import { ProjectLookupError, ThreadLookupError, ThreadSessionError } from "../domain/error.ts";
8
8
  import { type ListThreadsInclude, type StartThreadInput } from "./service.ts";
9
9
  import type { CallbackThreadInput, SendThreadInput } from "./service.ts";
10
10
  import { derivePendingApprovals, derivePendingUserInputs } from "../domain/thread-activities.ts";
11
11
  import { type ThreadLifecycleStatus } from "../domain/thread-lifecycle.ts";
12
- import type { OrchestrationThread } from "#t3tools/contracts";
13
- import type { ProviderApprovalDecision, ProviderUserInputAnswers } from "#t3tools/contracts";
12
+ import type { OrchestrationThread } from "@t3tools/contracts";
13
+ import type { ProviderApprovalDecision, ProviderUserInputAnswers } from "@t3tools/contracts";
14
14
  export declare const makeThreadApplication: () => Effect.Effect<{
15
15
  approveThread: (input: {
16
16
  readonly threadId: string;
@@ -35,7 +35,7 @@ export declare const makeThreadApplication: () => Effect.Effect<{
35
35
  interruptThread: (threadId: string) => Effect.Effect<{
36
36
  readonly sequence: number;
37
37
  }, import("../rpc/error.ts").RpcError, never>;
38
- updateThread: (input: import("./service.ts").UpdateThreadInput) => Effect.Effect<import("#t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
38
+ updateThread: (input: import("./service.ts").UpdateThreadInput) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
39
39
  unarchiveThread: (threadId: string) => Effect.Effect<{
40
40
  readonly sequence: number;
41
41
  }, import("../rpc/error.ts").RpcError, never>;
@@ -60,6 +60,8 @@ export declare const makeThreadApplication: () => Effect.Effect<{
60
60
  readonly command: string;
61
61
  readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
62
62
  readonly runOnWorktreeCreate: boolean;
63
+ readonly previewUrl?: string | undefined;
64
+ readonly autoOpenPreview?: boolean | undefined;
63
65
  }[];
64
66
  readonly createdAt: string;
65
67
  readonly updatedAt: string;
@@ -118,6 +120,15 @@ export declare const makeThreadApplication: () => Effect.Effect<{
118
120
  readonly updatedAt: string;
119
121
  readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
120
122
  } | null;
123
+ readonly goal: {
124
+ readonly objective: string;
125
+ readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
126
+ readonly tokensUsed: number;
127
+ readonly tokenBudget: number | null;
128
+ readonly timeUsedSeconds: number;
129
+ readonly createdAt: string;
130
+ readonly updatedAt: string;
131
+ } | null;
121
132
  readonly latestUserMessageAt: string | null;
122
133
  readonly hasPendingApprovals: boolean;
123
134
  readonly hasPendingUserInput: boolean;
@@ -156,6 +167,15 @@ export declare const makeThreadApplication: () => Effect.Effect<{
156
167
  readonly updatedAt: string;
157
168
  readonly archivedAt: string | null;
158
169
  readonly deletedAt: string | null;
170
+ readonly goal: {
171
+ readonly objective: string;
172
+ readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
173
+ readonly tokensUsed: number;
174
+ readonly tokenBudget: number | null;
175
+ readonly timeUsedSeconds: number;
176
+ readonly createdAt: string;
177
+ readonly updatedAt: string;
178
+ } | null;
159
179
  readonly messages: readonly {
160
180
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
161
181
  readonly role: "user" | "assistant" | "system";
@@ -272,6 +292,15 @@ export declare const makeThreadApplication: () => Effect.Effect<{
272
292
  readonly updatedAt: string;
273
293
  readonly archivedAt: string | null;
274
294
  readonly deletedAt: string | null;
295
+ readonly goal: {
296
+ readonly objective: string;
297
+ readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
298
+ readonly tokensUsed: number;
299
+ readonly tokenBudget: number | null;
300
+ readonly timeUsedSeconds: number;
301
+ readonly createdAt: string;
302
+ readonly updatedAt: string;
303
+ } | null;
275
304
  readonly messages: readonly {
276
305
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
277
306
  readonly role: "user" | "assistant" | "system";
@@ -358,6 +387,8 @@ export declare const makeThreadApplication: () => Effect.Effect<{
358
387
  readonly command: string;
359
388
  readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
360
389
  readonly runOnWorktreeCreate: boolean;
390
+ readonly previewUrl?: string | undefined;
391
+ readonly autoOpenPreview?: boolean | undefined;
361
392
  }[];
362
393
  readonly createdAt: string;
363
394
  readonly updatedAt: string;
@@ -399,6 +430,8 @@ export declare const makeThreadApplication: () => Effect.Effect<{
399
430
  readonly command: string;
400
431
  readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
401
432
  readonly runOnWorktreeCreate: boolean;
433
+ readonly previewUrl?: string | undefined;
434
+ readonly autoOpenPreview?: boolean | undefined;
402
435
  }[];
403
436
  readonly createdAt: string;
404
437
  readonly updatedAt: string;
@@ -449,6 +482,15 @@ export declare const makeThreadApplication: () => Effect.Effect<{
449
482
  readonly updatedAt: string;
450
483
  readonly archivedAt: string | null;
451
484
  readonly deletedAt: string | null;
485
+ readonly goal: {
486
+ readonly objective: string;
487
+ readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
488
+ readonly tokensUsed: number;
489
+ readonly tokenBudget: number | null;
490
+ readonly timeUsedSeconds: number;
491
+ readonly createdAt: string;
492
+ readonly updatedAt: string;
493
+ } | null;
452
494
  readonly messages: readonly {
453
495
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
454
496
  readonly role: "user" | "assistant" | "system";
@@ -543,6 +585,15 @@ export declare const makeThreadApplication: () => Effect.Effect<{
543
585
  readonly updatedAt: string;
544
586
  readonly archivedAt: string | null;
545
587
  readonly deletedAt: string | null;
588
+ readonly goal: {
589
+ readonly objective: string;
590
+ readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
591
+ readonly tokensUsed: number;
592
+ readonly tokenBudget: number | null;
593
+ readonly timeUsedSeconds: number;
594
+ readonly createdAt: string;
595
+ readonly updatedAt: string;
596
+ } | null;
546
597
  readonly messages: readonly {
547
598
  readonly id: string & import("effect/Brand").Brand<"MessageId">;
548
599
  readonly role: "user" | "assistant" | "system";
@@ -609,7 +660,7 @@ export declare const makeThreadApplication: () => Effect.Effect<{
609
660
  };
610
661
  targetThreadId: string;
611
662
  }, ThreadSessionError | import("../rpc/error.ts").RpcError, never>;
612
- }, never, Environment | T3Orchestration | Path.Path | Crypto.Crypto>;
663
+ }, never, CliRuntime | T3Orchestration | Path.Path | Crypto.Crypto>;
613
664
  export type ThreadShow = {
614
665
  readonly id: string;
615
666
  readonly projectId: string;
@@ -2,7 +2,8 @@ import * as Cause from "effect/Cause";
2
2
  import * as Schema from "effect/Schema";
3
3
  import { PlatformError } from "effect/PlatformError";
4
4
  import { HttpClientError } from "effect/unstable/http";
5
- import { ConfigError, UrlError } from "../config/error.ts";
5
+ import { ConfigError } from "../config/error.ts";
6
+ import { UrlError } from "../config/url/error.ts";
6
7
  declare const AuthPairingUrlError_base: Schema.Class<AuthPairingUrlError, Schema.TaggedStruct<"AuthPairingUrlError", {
7
8
  readonly message: Schema.String;
8
9
  readonly cause: Schema.optionalKey<Schema.instanceOf<Cause.IllegalArgumentError, Cause.IllegalArgumentError>>;
@@ -7,4 +7,4 @@ export { T3AuthPairing, T3AuthPairingLive, makeT3AuthPairing, parsePairingUrl }
7
7
  export { AuthConfigError, AuthLocalDatabaseError, AuthLocalError, AuthLocalSecretError, AuthLocalSigningError, AuthPairingUrlError, AuthTransportError, } from "./error.ts";
8
8
  export type { AuthError } from "./error.ts";
9
9
  export type { AuthSessionState, AuthWebSocketTicketResult } from "./schema.ts";
10
- export type { AuthConfigInput, AuthSessionRole, LocalAuthInput, LocalAuthOriginInput, LocalAuthResult, LocalAuthTokenInput, LocalAuthTokenResult, PairingUrl, PairResult, } from "./type.ts";
10
+ export type { AuthConfigInput, AuthEnvironmentListItem, AuthEnvironmentSummary, AuthResolvedConfig, AuthSessionRole, AuthStatusResult, AuthUnpairResult, AuthUseResult, LocalAuthInput, LocalAuthOriginInput, LocalAuthResult, LocalAuthTokenInput, LocalAuthTokenResult, PairingUrl, PairResult, PersistEnvironmentInput, } from "./type.ts";