t3code-cli 0.9.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +52 -14
  2. package/dist/application.js +2 -2
  3. package/dist/auth.js +1 -1
  4. package/dist/bin.js +1556 -341
  5. package/dist/cli.js +1 -1
  6. package/dist/config.js +1 -1
  7. package/dist/connection.js +1 -11
  8. package/dist/index.js +1 -1
  9. package/dist/layout.js +1 -1
  10. package/dist/node.js +2 -0
  11. package/dist/orchestration.js +2 -2
  12. package/dist/rpc.js +2 -2
  13. package/dist/runtime.js +1 -1
  14. package/dist/scope.js +1 -1
  15. package/dist/shared.js +1734 -756
  16. package/dist/src/application/index.d.ts +3 -2
  17. package/dist/src/application/layer.d.ts +82 -841
  18. package/dist/src/application/model-selection.d.ts +15 -0
  19. package/dist/src/application/models.d.ts +1 -87
  20. package/dist/src/application/project-commands.d.ts +9 -0
  21. package/dist/src/application/projects.d.ts +13 -135
  22. package/dist/src/application/service.d.ts +84 -5
  23. package/dist/src/application/shell-sequence.d.ts +2 -12
  24. package/dist/src/application/terminals.d.ts +66 -0
  25. package/dist/src/application/thread-commands.d.ts +47 -0
  26. package/dist/src/application/thread-update.d.ts +8 -0
  27. package/dist/src/application/thread-wait.d.ts +3 -14
  28. package/dist/src/application/threads.d.ts +21 -50
  29. package/dist/src/cli/flags.d.ts +3 -0
  30. package/dist/src/cli/output-format.d.ts +2 -0
  31. package/dist/src/domain/error.d.ts +14 -1
  32. package/dist/src/domain/helpers.d.ts +0 -9
  33. package/dist/src/domain/model-config.d.ts +29 -3
  34. package/dist/src/domain/thread-lifecycle.d.ts +2 -10
  35. package/dist/src/node/index.d.ts +2 -0
  36. package/dist/src/orchestration/index.d.ts +1 -0
  37. package/dist/src/orchestration/layer.d.ts +177 -1032
  38. package/dist/src/orchestration/service.d.ts +1 -0
  39. package/dist/src/rpc/error.d.ts +4 -2
  40. package/dist/src/rpc/index.d.ts +5 -0
  41. package/dist/src/rpc/layer.d.ts +1097 -499
  42. package/dist/src/rpc/operation.d.ts +5752 -0
  43. package/dist/src/rpc/ws-group.d.ts +327 -147
  44. package/dist/src/runtime/layer.d.ts +1 -1
  45. package/dist/t3tools.js +2 -2
  46. package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +10 -33
  47. package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +0 -6
  48. package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +1 -657
  49. package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +0 -14
  50. package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +1 -175
  51. package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +0 -492
  52. package/dist/upstream-t3code/packages/contracts/src/server.d.ts +0 -45
  53. package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +0 -21
  54. package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +3 -6
  55. package/package.json +6 -2
  56. package/src/application/index.ts +28 -2
  57. package/src/application/layer.ts +34 -5
  58. package/src/application/model-selection.ts +68 -2
  59. package/src/application/models.ts +14 -14
  60. package/src/application/project-commands.ts +15 -0
  61. package/src/application/projects.ts +43 -13
  62. package/src/application/service.ts +196 -77
  63. package/src/application/shell-sequence.ts +5 -7
  64. package/src/application/terminals.ts +207 -0
  65. package/src/application/thread-commands.test.ts +43 -0
  66. package/src/application/thread-commands.ts +81 -0
  67. package/src/application/thread-update.ts +72 -0
  68. package/src/application/thread-wait.ts +46 -47
  69. package/src/application/threads.test.ts +166 -0
  70. package/src/application/threads.ts +123 -40
  71. package/src/bin.ts +2 -0
  72. package/src/cli/app.ts +14 -0
  73. package/src/cli/confirm.ts +31 -0
  74. package/src/cli/error.ts +26 -3
  75. package/src/cli/flags.ts +15 -0
  76. package/src/cli/input/layer.ts +20 -0
  77. package/src/cli/input/service.ts +1 -0
  78. package/src/cli/output-format.ts +6 -2
  79. package/src/cli/project-format.ts +7 -0
  80. package/src/cli/project.ts +2 -1
  81. package/src/cli/projects/delete.ts +50 -0
  82. package/src/cli/self-action.ts +34 -0
  83. package/src/cli/terminal/attach.ts +32 -0
  84. package/src/cli/terminal/commands.test.ts +101 -0
  85. package/src/cli/terminal/create.ts +54 -0
  86. package/src/cli/terminal/destroy.ts +60 -0
  87. package/src/cli/terminal/encoding.test.ts +63 -0
  88. package/src/cli/terminal/encoding.ts +23 -0
  89. package/src/cli/terminal/error.ts +14 -0
  90. package/src/cli/terminal/io-node-layer.ts +82 -0
  91. package/src/cli/terminal/io-service.ts +25 -0
  92. package/src/cli/terminal/list.ts +35 -0
  93. package/src/cli/terminal/read.ts +102 -0
  94. package/src/cli/terminal/scope.ts +30 -0
  95. package/src/cli/terminal/shared.ts +250 -0
  96. package/src/cli/terminal/stream.ts +64 -0
  97. package/src/cli/terminal/wait.test.ts +146 -0
  98. package/src/cli/terminal/wait.ts +222 -0
  99. package/src/cli/terminal/write.ts +132 -0
  100. package/src/cli/terminal-format.ts +167 -0
  101. package/src/cli/terminal.ts +26 -0
  102. package/src/cli/thread-format.test.ts +32 -0
  103. package/src/cli/thread-format.ts +8 -1
  104. package/src/cli/thread.ts +9 -13
  105. package/src/cli/threads/archive.ts +11 -18
  106. package/src/cli/threads/delete.ts +61 -0
  107. package/src/cli/threads/interrupt.ts +52 -0
  108. package/src/cli/threads/list.test.ts +69 -0
  109. package/src/cli/threads/list.ts +15 -3
  110. package/src/cli/threads/messages.ts +3 -3
  111. package/src/cli/threads/send.ts +22 -2
  112. package/src/cli/threads/unarchive.ts +44 -0
  113. package/src/cli/threads/update.ts +150 -0
  114. package/src/domain/error.ts +20 -1
  115. package/src/domain/model-config.ts +4 -0
  116. package/src/domain/thread-lifecycle.test.ts +35 -0
  117. package/src/domain/thread-lifecycle.ts +29 -6
  118. package/src/node/index.ts +2 -0
  119. package/src/orchestration/index.ts +1 -0
  120. package/src/orchestration/layer.ts +33 -85
  121. package/src/orchestration/service.ts +4 -0
  122. package/src/rpc/error.ts +10 -0
  123. package/src/rpc/index.ts +5 -0
  124. package/src/rpc/operation.ts +83 -0
  125. package/src/rpc/ws-group.ts +24 -0
  126. package/src/runtime/layer.ts +7 -2
@@ -16,6 +16,7 @@ export type Orchestration = {
16
16
  readonly dispatch: (command: ClientOrchestrationCommand) => Effect.Effect<DispatchResult, OrchestrationError>;
17
17
  readonly getServerConfig: () => Effect.Effect<ServerConfigForCli, OrchestrationError>;
18
18
  readonly getShellSnapshot: () => Effect.Effect<OrchestrationShellSnapshot, OrchestrationError>;
19
+ readonly getArchivedShellSnapshot: () => Effect.Effect<OrchestrationShellSnapshot, OrchestrationError>;
19
20
  readonly getThreadSnapshot: (threadId: string) => Effect.Effect<OrchestrationThread, OrchestrationError>;
20
21
  readonly watchShellSequence: () => Stream.Stream<number, OrchestrationError, Scope.Scope>;
21
22
  readonly watchThreadItems: (threadId: string) => Stream.Stream<OrchestrationThreadStreamItem, OrchestrationError, Scope.Scope>;
@@ -1,14 +1,16 @@
1
1
  import * as Schema from "effect/Schema";
2
- import { EnvironmentAuthorizationError, KeybindingsConfigError, OrchestrationDispatchCommandError, OrchestrationGetSnapshotError, ServerSettingsError } from "#t3tools/contracts";
2
+ import { EnvironmentAuthorizationError, KeybindingsConfigError, OrchestrationDispatchCommandError, OrchestrationGetSnapshotError, ServerSettingsError, TerminalCwdError, TerminalHistoryError, TerminalNotRunningError, TerminalSessionLookupError } from "#t3tools/contracts";
3
3
  import { HttpClientError } from "effect/unstable/http";
4
4
  import { RpcClientError } from "effect/unstable/rpc";
5
5
  import { AuthTransportError } from "../auth/error.ts";
6
6
  import { T3CodeConnectionError } from "../connection/error.ts";
7
7
  import { UrlError } from "../config/error.ts";
8
+ declare const RpcErrorCauseSchema: Schema.Union<readonly [typeof RpcClientError.RpcClientError, typeof EnvironmentAuthorizationError, typeof KeybindingsConfigError, typeof OrchestrationDispatchCommandError, typeof OrchestrationGetSnapshotError, typeof ServerSettingsError, typeof TerminalCwdError, typeof TerminalHistoryError, typeof TerminalNotRunningError, typeof TerminalSessionLookupError, typeof AuthTransportError, typeof T3CodeConnectionError, typeof HttpClientError.HttpClientErrorSchema, typeof UrlError, Schema.instanceOf<Schema.SchemaError, unknown>]>;
9
+ export type RpcKnownCause = Schema.Schema.Type<typeof RpcErrorCauseSchema>;
8
10
  declare const RpcError_base: Schema.Class<RpcError, Schema.TaggedStruct<"RpcError", {
9
11
  readonly message: Schema.String;
10
12
  readonly method: Schema.optionalKey<Schema.String>;
11
- readonly cause: Schema.optionalKey<Schema.Union<readonly [typeof RpcClientError.RpcClientError, typeof EnvironmentAuthorizationError, typeof KeybindingsConfigError, typeof OrchestrationDispatchCommandError, typeof OrchestrationGetSnapshotError, typeof ServerSettingsError, typeof AuthTransportError, typeof T3CodeConnectionError, typeof HttpClientError.HttpClientErrorSchema, typeof UrlError, Schema.instanceOf<Schema.SchemaError, unknown>]>>;
13
+ readonly cause: Schema.optionalKey<Schema.Union<readonly [typeof RpcClientError.RpcClientError, typeof EnvironmentAuthorizationError, typeof KeybindingsConfigError, typeof OrchestrationDispatchCommandError, typeof OrchestrationGetSnapshotError, typeof ServerSettingsError, typeof TerminalCwdError, typeof TerminalHistoryError, typeof TerminalNotRunningError, typeof TerminalSessionLookupError, typeof AuthTransportError, typeof T3CodeConnectionError, typeof HttpClientError.HttpClientErrorSchema, typeof UrlError, Schema.instanceOf<Schema.SchemaError, unknown>]>>;
12
14
  }>, import("effect/Cause").YieldableError>;
13
15
  export declare class RpcError extends RpcError_base {
14
16
  }
@@ -1 +1,6 @@
1
1
  export { RpcError, type OrchestrationError } from "./error.ts";
2
+ export { makeT3RpcLayer, T3RpcLive } from "./layer.ts";
3
+ export { T3RpcOperations, T3RpcOperationsLive, makeT3RpcOperations } from "./operation.ts";
4
+ export type { T3RpcOperationsService } from "./operation.ts";
5
+ export { T3Rpc } from "./service.ts";
6
+ export type { T3RpcService, WsClient } from "./service.ts";