t3code-cli 0.13.0 → 0.14.1
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.
- package/README.md +87 -1
- package/dist/application.d.ts +2 -0
- package/dist/application.js +1 -1
- package/dist/auth.d.ts +50 -0
- package/dist/auth.js +1 -1
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +355 -606
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +1 -1
- package/dist/client-runtime/authorization.d.ts +2 -0
- package/dist/client-runtime/authorization.js +2 -0
- package/dist/client-runtime/connection.d.ts +2 -0
- package/dist/client-runtime/connection.js +2 -0
- package/dist/client-runtime/environment.d.ts +57 -0
- package/dist/client-runtime/environment.js +2 -0
- package/dist/client-runtime/errors.d.ts +28 -0
- package/dist/client-runtime/errors.js +35 -0
- package/dist/client-runtime/operations/projects.d.ts +2 -0
- package/dist/client-runtime/operations/projects.js +2 -0
- package/dist/client-runtime/operations.d.ts +2 -0
- package/dist/client-runtime/operations.js +2 -0
- package/dist/client-runtime/platform.d.ts +26 -0
- package/dist/client-runtime/platform.js +74 -0
- package/dist/client-runtime/relay.d.ts +121 -0
- package/dist/client-runtime/relay.js +245 -0
- package/dist/client-runtime/rpc.d.ts +2 -0
- package/dist/client-runtime/rpc.js +2 -0
- package/dist/client-runtime/state/assets.d.ts +40 -0
- package/dist/client-runtime/state/assets.js +53 -0
- package/dist/client-runtime/state/auth.d.ts +98 -0
- package/dist/client-runtime/state/auth.js +48 -0
- package/dist/client-runtime/state/connections.d.ts +2 -0
- package/dist/client-runtime/state/connections.js +52 -0
- package/dist/client-runtime/state/entities.d.ts +33 -0
- package/dist/client-runtime/state/entities.js +2 -0
- package/dist/client-runtime/state/filesystem.d.ts +42 -0
- package/dist/client-runtime/state/filesystem.js +48 -0
- package/dist/client-runtime/state/git.d.ts +43 -0
- package/dist/client-runtime/state/git.js +18 -0
- package/dist/client-runtime/state/models.d.ts +2 -0
- package/dist/client-runtime/state/models.js +2 -0
- package/dist/client-runtime/state/orchestration.d.ts +128 -0
- package/dist/client-runtime/state/orchestration.js +20 -0
- package/dist/client-runtime/state/presentation.d.ts +277 -0
- package/dist/client-runtime/state/presentation.js +34 -0
- package/dist/client-runtime/state/preview.d.ts +447 -0
- package/dist/client-runtime/state/preview.js +103 -0
- package/dist/client-runtime/state/project-grouping.d.ts +26 -0
- package/dist/client-runtime/state/project-grouping.js +73 -0
- package/dist/client-runtime/state/projects.d.ts +192 -0
- package/dist/client-runtime/state/projects.js +2 -0
- package/dist/client-runtime/state/relay.d.ts +10 -0
- package/dist/client-runtime/state/relay.js +19 -0
- package/dist/client-runtime/state/review.d.ts +28 -0
- package/dist/client-runtime/state/review.js +11 -0
- package/dist/client-runtime/state/runtime.d.ts +2 -0
- package/dist/client-runtime/state/runtime.js +2 -0
- package/dist/client-runtime/state/server.d.ts +1495 -0
- package/dist/client-runtime/state/server.js +207 -0
- package/dist/client-runtime/state/session.d.ts +532 -0
- package/dist/client-runtime/state/session.js +21 -0
- package/dist/client-runtime/state/shell.d.ts +529 -0
- package/dist/client-runtime/state/shell.js +2 -0
- package/dist/client-runtime/state/source-control.d.ts +92 -0
- package/dist/client-runtime/state/source-control.js +36 -0
- package/dist/client-runtime/state/terminal.d.ts +237 -0
- package/dist/client-runtime/state/terminal.js +173 -0
- package/dist/client-runtime/state/thread-settled.d.ts +104 -0
- package/dist/client-runtime/state/thread-settled.js +157 -0
- package/dist/client-runtime/state/thread-sort.d.ts +23 -0
- package/dist/client-runtime/state/thread-sort.js +47 -0
- package/dist/client-runtime/state/threads.d.ts +538 -0
- package/dist/client-runtime/state/threads.js +934 -0
- package/dist/client-runtime/state/vcs.d.ts +442 -0
- package/dist/client-runtime/state/vcs.js +756 -0
- package/dist/config.d.ts +84 -0
- package/dist/config.js +1 -1
- package/dist/connection.d.ts +7 -0
- package/dist/connection.js +1 -1
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/node.d.ts +6 -0
- package/dist/node.js +1 -1
- package/dist/orchestration.d.ts +1420 -0
- package/dist/orchestration.js +1 -1
- package/dist/preview.d.ts +2 -0
- package/dist/preview.js +2 -0
- package/dist/rpc.d.ts +6043 -0
- package/dist/rpc.js +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +2 -2
- package/dist/shared/DrainableWorker.d.ts +28 -0
- package/dist/shared/DrainableWorker.js +24 -0
- package/dist/shared/KeyedCoalescingWorker.d.ts +13 -0
- package/dist/shared/KeyedCoalescingWorker.js +89 -0
- package/dist/shared/Net.d.ts +43 -0
- package/dist/shared/Net.js +126 -0
- package/dist/shared/String.d.ts +4 -0
- package/dist/shared/String.js +8 -0
- package/dist/shared/Struct.d.ts +5 -0
- package/dist/shared/Struct.js +2 -0
- package/dist/shared/advertisedEndpoint.d.ts +2 -0
- package/dist/shared/advertisedEndpoint.js +2 -0
- package/dist/shared/agentAwareness.d.ts +27 -0
- package/dist/shared/agentAwareness.js +54 -0
- package/dist/shared/backgroundActivitySettings.d.ts +23 -0
- package/dist/shared/backgroundActivitySettings.js +2 -0
- package/dist/shared/chatList.d.ts +12 -0
- package/dist/shared/chatList.js +14 -0
- package/dist/shared/cliArgs.d.ts +33 -0
- package/dist/shared/cliArgs.js +103 -0
- package/dist/shared/composerInlineTokens.d.ts +20 -0
- package/dist/shared/composerInlineTokens.js +72 -0
- package/dist/shared/composerTrigger.d.ts +26 -0
- package/dist/shared/composerTrigger.js +97 -0
- package/dist/shared/connectAuth.d.ts +58 -0
- package/dist/shared/connectAuth.js +89 -0
- package/dist/shared/devHome.d.ts +21 -0
- package/dist/shared/devHome.js +65 -0
- package/dist/shared/devProxy.d.ts +15 -0
- package/dist/shared/devProxy.js +22 -0
- package/dist/shared/dpop.d.ts +32 -0
- package/dist/shared/dpop.js +2724 -0
- package/dist/shared/dpopCommon.d.ts +2 -0
- package/dist/shared/dpopCommon.js +2 -0
- package/dist/shared/filePreview.d.ts +8 -0
- package/dist/shared/filePreview.js +31 -0
- package/dist/shared/git.d.ts +41 -0
- package/dist/shared/git.js +2 -0
- package/dist/shared/hostProcess.d.ts +13 -0
- package/dist/shared/hostProcess.js +2 -0
- package/dist/shared/httpObservability.d.ts +5 -0
- package/dist/shared/httpObservability.js +2 -0
- package/dist/shared/httpReadiness.d.ts +38 -0
- package/dist/shared/httpReadiness.js +110 -0
- package/dist/shared/keybindings.d.ts +35 -0
- package/dist/shared/keybindings.js +330 -0
- package/dist/shared/logging.d.ts +39 -0
- package/dist/shared/logging.js +2 -0
- package/dist/shared/model.d.ts +44 -0
- package/dist/shared/model.js +2 -0
- package/dist/shared/oauthScope.d.ts +23 -0
- package/dist/shared/oauthScope.js +2 -0
- package/dist/shared/observability.d.ts +105 -0
- package/dist/shared/observability.js +346 -0
- package/dist/shared/orchestrationTiming.d.ts +16 -0
- package/dist/shared/orchestrationTiming.js +32 -0
- package/dist/shared/path.d.ts +2 -0
- package/dist/shared/path.js +2 -0
- package/dist/shared/preview.d.ts +35 -0
- package/dist/shared/preview.js +103 -0
- package/dist/shared/previewViewport.d.ts +16 -0
- package/dist/shared/previewViewport.js +159 -0
- package/dist/shared/projectFavicon.d.ts +5 -0
- package/dist/shared/projectFavicon.js +13 -0
- package/dist/shared/projectScripts.d.ts +19 -0
- package/dist/shared/projectScripts.js +18 -0
- package/dist/shared/qrCode.d.ts +87 -0
- package/dist/shared/qrCode.js +870 -0
- package/dist/shared/relayAuth.d.ts +27 -0
- package/dist/shared/relayAuth.js +83 -0
- package/dist/shared/relayClient.d.ts +58 -0
- package/dist/shared/relayClient.js +245 -0
- package/dist/shared/relayJwt.d.ts +39 -0
- package/dist/shared/relayJwt.js +2 -0
- package/dist/shared/relaySigning.d.ts +4 -0
- package/dist/shared/relaySigning.js +2 -0
- package/dist/shared/relayTracing.d.ts +25 -0
- package/dist/shared/relayTracing.js +2 -0
- package/dist/shared/relayUrl.d.ts +5 -0
- package/dist/shared/relayUrl.js +2 -0
- package/dist/shared/remote.d.ts +57 -0
- package/dist/shared/remote.js +2 -0
- package/dist/shared/schemaJson.d.ts +35 -0
- package/dist/shared/schemaJson.js +2 -0
- package/dist/shared/schemaYaml.d.ts +86 -0
- package/dist/shared/schemaYaml.js +99 -0
- package/dist/shared/searchRanking.d.ts +30 -0
- package/dist/shared/searchRanking.js +99 -0
- package/dist/shared/semver.d.ts +23 -0
- package/dist/shared/semver.js +124 -0
- package/dist/shared/serverSettings.d.ts +19 -0
- package/dist/shared/serverSettings.js +103 -0
- package/dist/shared/shell.d.ts +51 -0
- package/dist/shared/shell.js +408 -0
- package/dist/shared/sourceControl.d.ts +26 -0
- package/dist/shared/sourceControl.js +2 -0
- package/dist/shared/t3ProjectFile.d.ts +27 -0
- package/dist/shared/t3ProjectFile.js +25 -0
- package/dist/shared/terminalLabels.d.ts +16 -0
- package/dist/shared/terminalLabels.js +28 -0
- package/dist/shared/toolActivity.d.ts +16 -0
- package/dist/shared/toolActivity.js +159 -0
- package/dist/shared.d.ts +43036 -0
- package/dist/shared.js +25428 -12277
- package/dist/t3tools.d.ts +2 -0
- package/dist/t3tools.js +1 -1
- package/package.json +39 -21
- package/src/auth/index.ts +2 -0
- package/src/auth/pairing.ts +8 -5
- package/src/auth/service.ts +2 -1
- package/src/auth/transport.ts +4 -0
- package/src/auth/type.ts +6 -0
- package/src/bin.ts +10 -7
- package/src/cli/auth.ts +7 -1
- package/src/contracts/index.ts +8 -0
- package/src/orchestration/layer.ts +36 -0
- package/src/orchestration/service.ts +5 -0
- package/src/preview/index.ts +11 -0
- package/src/preview/service.ts +52 -0
- package/src/rpc/error.ts +2 -0
- package/src/rpc/layer.ts +5 -4
- package/src/rpc/operation.ts +5 -4
- package/src/rpc/ws-group.ts +6 -0
- package/src/runtime/index.ts +1 -0
- package/src/runtime/layer.ts +5 -0
- package/src/sql/node-sqlite-client.ts +3 -0
- package/dist/src/application/actions.d.ts +0 -25
- package/dist/src/application/error.d.ts +0 -3
- package/dist/src/application/index.d.ts +0 -4
- package/dist/src/application/layer.d.ts +0 -117
- package/dist/src/application/model-selection.d.ts +0 -34
- package/dist/src/application/models.d.ts +0 -8
- package/dist/src/application/project-commands.d.ts +0 -44
- package/dist/src/application/projects.d.ts +0 -23
- package/dist/src/application/service.d.ts +0 -243
- package/dist/src/application/shell-sequence.d.ts +0 -96
- package/dist/src/application/terminals.d.ts +0 -66
- package/dist/src/application/thread-commands.d.ts +0 -157
- package/dist/src/application/thread-update.d.ts +0 -8
- package/dist/src/application/thread-wait.d.ts +0 -106
- package/dist/src/application/threads.d.ts +0 -660
- package/dist/src/auth/error.d.ts +0 -50
- package/dist/src/auth/index.d.ts +0 -10
- package/dist/src/auth/layer.d.ts +0 -53
- package/dist/src/auth/local-base-dir.d.ts +0 -8
- package/dist/src/auth/local-origin.d.ts +0 -18
- package/dist/src/auth/local-token.d.ts +0 -26
- package/dist/src/auth/local.d.ts +0 -24
- package/dist/src/auth/pairing.d.ts +0 -22
- package/dist/src/auth/remote-error.d.ts +0 -3
- package/dist/src/auth/schema.d.ts +0 -58
- package/dist/src/auth/service.d.ts +0 -27
- package/dist/src/auth/transport.d.ts +0 -22
- package/dist/src/auth/type.d.ts +0 -83
- package/dist/src/cli/env/flag.d.ts +0 -2
- package/dist/src/cli/env/index.d.ts +0 -2
- package/dist/src/cli/env/selection-layer.d.ts +0 -3
- package/dist/src/cli/flags.d.ts +0 -20
- package/dist/src/cli/format/index.d.ts +0 -1
- package/dist/src/cli/format/output.d.ts +0 -12
- package/dist/src/cli/index.d.ts +0 -5
- package/dist/src/cli/runtime/index.d.ts +0 -1
- package/dist/src/cli/runtime/service.d.ts +0 -16
- package/dist/src/cli/scope/index.d.ts +0 -1
- package/dist/src/cli/scope/resolve.d.ts +0 -20
- package/dist/src/cli-path/layer.d.ts +0 -3
- package/dist/src/cli-path/service.d.ts +0 -8
- package/dist/src/config/config.d.ts +0 -49
- package/dist/src/config/credential/cipher-node.d.ts +0 -3
- package/dist/src/config/credential/cipher-web.d.ts +0 -3
- package/dist/src/config/credential/cipher.d.ts +0 -29
- package/dist/src/config/credential/env.d.ts +0 -3
- package/dist/src/config/credential/error.d.ts +0 -8
- package/dist/src/config/credential/index.d.ts +0 -6
- package/dist/src/config/credential/service.d.ts +0 -34
- package/dist/src/config/env/env.d.ts +0 -55
- package/dist/src/config/env/index.d.ts +0 -2
- package/dist/src/config/env/layout.d.ts +0 -11
- package/dist/src/config/environment-name/index.d.ts +0 -1
- package/dist/src/config/environment-name/name.d.ts +0 -10
- package/dist/src/config/error.d.ts +0 -11
- package/dist/src/config/index.d.ts +0 -10
- package/dist/src/config/keystore/error.d.ts +0 -8
- package/dist/src/config/keystore/file.d.ts +0 -9
- package/dist/src/config/keystore/index.d.ts +0 -4
- package/dist/src/config/keystore/keyring-node.d.ts +0 -4
- package/dist/src/config/keystore/service.d.ts +0 -33
- package/dist/src/config/paths/index.d.ts +0 -1
- package/dist/src/config/paths/paths.d.ts +0 -6
- package/dist/src/config/persist/file-mode.d.ts +0 -4
- package/dist/src/config/persist/migration.d.ts +0 -68
- package/dist/src/config/persist/persist.d.ts +0 -40
- package/dist/src/config/persist/schema.d.ts +0 -68
- package/dist/src/config/resolve/resolve.d.ts +0 -40
- package/dist/src/config/selection/index.d.ts +0 -1
- package/dist/src/config/selection/resolve.d.ts +0 -4
- package/dist/src/config/selection/service.d.ts +0 -10
- package/dist/src/config/types.d.ts +0 -36
- package/dist/src/config/url/error.d.ts +0 -10
- package/dist/src/config/url/index.d.ts +0 -2
- package/dist/src/config/url/url.d.ts +0 -6
- package/dist/src/connection/error.d.ts +0 -10
- package/dist/src/connection/index.d.ts +0 -4
- package/dist/src/connection/layer.d.ts +0 -3
- package/dist/src/connection/prepared.d.ts +0 -14
- package/dist/src/connection/service.d.ts +0 -13
- package/dist/src/connection/type.d.ts +0 -10
- package/dist/src/contracts/index.d.ts +0 -1
- package/dist/src/domain/error.d.ts +0 -57
- package/dist/src/domain/helpers.d.ts +0 -179
- package/dist/src/domain/model-config.d.ts +0 -330
- package/dist/src/domain/thread-activities.d.ts +0 -14
- package/dist/src/domain/thread-lifecycle.d.ts +0 -120
- package/dist/src/index.d.ts +0 -3
- package/dist/src/node/connection.d.ts +0 -2
- package/dist/src/node/index.d.ts +0 -1
- package/dist/src/orchestration/index.d.ts +0 -2
- package/dist/src/orchestration/layer.d.ts +0 -1419
- package/dist/src/orchestration/service.d.ts +0 -28
- package/dist/src/rpc/error.d.ts +0 -16
- package/dist/src/rpc/index.d.ts +0 -6
- package/dist/src/rpc/layer.d.ts +0 -5862
- package/dist/src/rpc/operation.d.ts +0 -24
- package/dist/src/rpc/service.d.ts +0 -15
- package/dist/src/rpc/session.d.ts +0 -22
- package/dist/src/rpc/ws-group.d.ts +0 -1984
- package/dist/src/runtime/index.d.ts +0 -1
- package/dist/src/runtime/layer.d.ts +0 -15
- package/dist/src/sql/node-sqlite-client.d.ts +0 -10
- package/dist/src/sql/service.d.ts +0 -17
- package/dist/src/t3tools/index.d.ts +0 -1
package/src/bin.ts
CHANGED
|
@@ -54,14 +54,17 @@ const program = Effect.gen(function* () {
|
|
|
54
54
|
process.exitCode = error.errors.length > 0 ? 1 : 0;
|
|
55
55
|
}),
|
|
56
56
|
),
|
|
57
|
-
Effect.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
Effect.matchEffect({
|
|
58
|
+
onFailure: (error) =>
|
|
59
|
+
Effect.gen(function* () {
|
|
60
|
+
const output = yield* T3Output;
|
|
61
|
+
yield* output.writeStderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
62
|
+
process.exitCode = 1;
|
|
63
|
+
}),
|
|
64
|
+
onSuccess: (value) => Effect.succeed(value),
|
|
65
|
+
}),
|
|
63
66
|
Effect.scoped,
|
|
64
67
|
Effect.provide(CliLayer),
|
|
65
68
|
);
|
|
66
69
|
|
|
67
|
-
NodeRuntime.runMain(program
|
|
70
|
+
NodeRuntime.runMain(program);
|
package/src/cli/auth.ts
CHANGED
|
@@ -75,7 +75,13 @@ const pairCommand = Command.make(
|
|
|
75
75
|
const t3CliEnv = yield* loadT3CliEnv;
|
|
76
76
|
const output = yield* T3Output;
|
|
77
77
|
const resolvedFormat = resolveOutputFormat(format, cliRuntime, t3CliEnv, "json");
|
|
78
|
-
const result = yield* auth.pair(
|
|
78
|
+
const result = yield* auth.pair({
|
|
79
|
+
pairingUrl: url,
|
|
80
|
+
clientMetadata: {
|
|
81
|
+
label: "t3cli",
|
|
82
|
+
deviceType: "bot",
|
|
83
|
+
},
|
|
84
|
+
});
|
|
79
85
|
const fallbackName = yield* auth.defaultNameFromUrl(result.url);
|
|
80
86
|
const environmentName = yield* persistAuthEnvironment({
|
|
81
87
|
explicitName: name,
|
package/src/contracts/index.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export type {
|
|
2
|
+
AuthClientPresentationMetadata,
|
|
2
3
|
OrchestrationMessage,
|
|
3
4
|
OrchestrationProjectShell,
|
|
4
5
|
OrchestrationShellSnapshot,
|
|
5
6
|
OrchestrationThread,
|
|
6
7
|
OrchestrationThreadShell,
|
|
8
|
+
PreviewAutomationHost,
|
|
9
|
+
PreviewAutomationHostFocus,
|
|
10
|
+
PreviewAutomationResizeInput,
|
|
11
|
+
PreviewAutomationResponse,
|
|
12
|
+
PreviewAutomationStreamEvent,
|
|
13
|
+
PreviewViewportPresetId,
|
|
7
14
|
ServerProvider,
|
|
8
15
|
} from "@t3tools/contracts";
|
|
16
|
+
export { PREVIEW_VIEWPORT_PRESET_IDS, PreviewViewportSetting } from "@t3tools/contracts";
|
|
@@ -8,9 +8,11 @@ import {
|
|
|
8
8
|
ThreadId,
|
|
9
9
|
WS_METHODS,
|
|
10
10
|
type ClientOrchestrationCommand,
|
|
11
|
+
type OrchestrationShellSnapshot,
|
|
11
12
|
type OrchestrationShellStreamItem,
|
|
12
13
|
type OrchestrationThreadStreamItem,
|
|
13
14
|
} from "@t3tools/contracts";
|
|
15
|
+
import { applyShellStreamEvent } from "@t3tools/client-runtime/state/shell";
|
|
14
16
|
|
|
15
17
|
import { RpcError } from "../rpc/error.ts";
|
|
16
18
|
import { T3RpcOperations } from "../rpc/operation.ts";
|
|
@@ -19,6 +21,39 @@ import { T3Orchestration, type OpenThread, type Orchestration } from "./service.
|
|
|
19
21
|
export const makeT3Orchestration = Effect.fn("makeT3Orchestration")(function* () {
|
|
20
22
|
const rpc = yield* T3RpcOperations;
|
|
21
23
|
|
|
24
|
+
const watchShellSnapshots: Orchestration["watchShellSnapshots"] = () =>
|
|
25
|
+
rpc
|
|
26
|
+
.subscribe(ORCHESTRATION_WS_METHODS.subscribeShell, (client) =>
|
|
27
|
+
client[ORCHESTRATION_WS_METHODS.subscribeShell]({}),
|
|
28
|
+
)
|
|
29
|
+
.pipe(
|
|
30
|
+
Stream.filter(
|
|
31
|
+
(
|
|
32
|
+
item,
|
|
33
|
+
): item is Exclude<OrchestrationShellStreamItem, { readonly kind: "synchronized" }> =>
|
|
34
|
+
item.kind !== "synchronized",
|
|
35
|
+
),
|
|
36
|
+
Stream.mapAccum(
|
|
37
|
+
() => Option.none<OrchestrationShellSnapshot>(),
|
|
38
|
+
(
|
|
39
|
+
current,
|
|
40
|
+
item,
|
|
41
|
+
): readonly [
|
|
42
|
+
Option.Option<OrchestrationShellSnapshot>,
|
|
43
|
+
ReadonlyArray<OrchestrationShellSnapshot>,
|
|
44
|
+
] => {
|
|
45
|
+
if (item.kind === "snapshot") {
|
|
46
|
+
return [Option.some(item.snapshot), [item.snapshot]];
|
|
47
|
+
}
|
|
48
|
+
if (Option.isNone(current)) {
|
|
49
|
+
return [current, []];
|
|
50
|
+
}
|
|
51
|
+
const next = applyShellStreamEvent(current.value, item);
|
|
52
|
+
return [Option.some(next), [next]];
|
|
53
|
+
},
|
|
54
|
+
),
|
|
55
|
+
);
|
|
56
|
+
|
|
22
57
|
const watchShellSequence: Orchestration["watchShellSequence"] = () =>
|
|
23
58
|
rpc
|
|
24
59
|
.subscribe(ORCHESTRATION_WS_METHODS.subscribeShell, (client) =>
|
|
@@ -126,6 +161,7 @@ export const makeT3Orchestration = Effect.fn("makeT3Orchestration")(function* ()
|
|
|
126
161
|
getShellSnapshot,
|
|
127
162
|
getArchivedShellSnapshot,
|
|
128
163
|
getThreadSnapshot,
|
|
164
|
+
watchShellSnapshots,
|
|
129
165
|
watchShellSequence,
|
|
130
166
|
watchThreadItems,
|
|
131
167
|
openThread,
|
|
@@ -38,6 +38,11 @@ export type Orchestration = {
|
|
|
38
38
|
readonly getThreadSnapshot: (
|
|
39
39
|
threadId: string,
|
|
40
40
|
) => Effect.Effect<OrchestrationThread, OrchestrationError>;
|
|
41
|
+
readonly watchShellSnapshots: () => Stream.Stream<
|
|
42
|
+
OrchestrationShellSnapshot,
|
|
43
|
+
OrchestrationError,
|
|
44
|
+
Scope.Scope
|
|
45
|
+
>;
|
|
41
46
|
readonly watchShellSequence: () => Stream.Stream<number, OrchestrationError, Scope.Scope>;
|
|
42
47
|
readonly watchThreadItems: (
|
|
43
48
|
threadId: string,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export {
|
|
2
|
+
T3PreviewAutomation,
|
|
3
|
+
T3PreviewAutomationLive,
|
|
4
|
+
makeT3PreviewAutomation,
|
|
5
|
+
} from "./service.ts";
|
|
6
|
+
export type {
|
|
7
|
+
PreviewAutomationHost,
|
|
8
|
+
PreviewAutomationHostFocus,
|
|
9
|
+
PreviewAutomationResponse,
|
|
10
|
+
PreviewAutomationStreamEvent,
|
|
11
|
+
} from "../contracts/index.ts";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { WS_METHODS } from "@t3tools/contracts";
|
|
2
|
+
import * as Context from "effect/Context";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
|
+
import type * as Stream from "effect/Stream";
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
PreviewAutomationHost,
|
|
9
|
+
PreviewAutomationHostFocus,
|
|
10
|
+
PreviewAutomationResponse,
|
|
11
|
+
PreviewAutomationStreamEvent,
|
|
12
|
+
} from "../contracts/index.ts";
|
|
13
|
+
import type { RpcError } from "../rpc/error.ts";
|
|
14
|
+
import { T3RpcOperations } from "../rpc/operation.ts";
|
|
15
|
+
|
|
16
|
+
export class T3PreviewAutomation extends Context.Service<
|
|
17
|
+
T3PreviewAutomation,
|
|
18
|
+
{
|
|
19
|
+
readonly connect: (
|
|
20
|
+
host: PreviewAutomationHost,
|
|
21
|
+
) => Stream.Stream<PreviewAutomationStreamEvent, RpcError>;
|
|
22
|
+
readonly respond: (response: PreviewAutomationResponse) => Effect.Effect<void, RpcError>;
|
|
23
|
+
readonly focusHost: (input: PreviewAutomationHostFocus) => Effect.Effect<void, RpcError>;
|
|
24
|
+
}
|
|
25
|
+
>()("t3cli/T3PreviewAutomation") {}
|
|
26
|
+
|
|
27
|
+
export const makeT3PreviewAutomation = Effect.fn("makeT3PreviewAutomation")(function* () {
|
|
28
|
+
const rpc = yield* T3RpcOperations;
|
|
29
|
+
|
|
30
|
+
const connect: T3PreviewAutomation["Service"]["connect"] = (host) =>
|
|
31
|
+
rpc.subscribe(WS_METHODS.previewAutomationConnect, (client) =>
|
|
32
|
+
client[WS_METHODS.previewAutomationConnect](host),
|
|
33
|
+
);
|
|
34
|
+
const respond = Effect.fn("T3PreviewAutomation.respond")(function* (
|
|
35
|
+
response: PreviewAutomationResponse,
|
|
36
|
+
) {
|
|
37
|
+
return yield* rpc.run(WS_METHODS.previewAutomationRespond, (client) =>
|
|
38
|
+
client[WS_METHODS.previewAutomationRespond](response),
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
const focusHost = Effect.fn("T3PreviewAutomation.focusHost")(function* (
|
|
42
|
+
input: PreviewAutomationHostFocus,
|
|
43
|
+
) {
|
|
44
|
+
return yield* rpc.run(WS_METHODS.previewAutomationFocusHost, (client) =>
|
|
45
|
+
client[WS_METHODS.previewAutomationFocusHost](input),
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return T3PreviewAutomation.of({ connect, respond, focusHost });
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export const T3PreviewAutomationLive = Layer.effect(T3PreviewAutomation, makeT3PreviewAutomation());
|
package/src/rpc/error.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
KeybindingsConfigError,
|
|
8
8
|
OrchestrationDispatchCommandError,
|
|
9
9
|
OrchestrationGetSnapshotError,
|
|
10
|
+
PreviewAutomationError,
|
|
10
11
|
ServerSettingsError,
|
|
11
12
|
TerminalError,
|
|
12
13
|
} from "@t3tools/contracts";
|
|
@@ -21,6 +22,7 @@ const RpcErrorCauseSchema = Schema.Union([
|
|
|
21
22
|
KeybindingsConfigError,
|
|
22
23
|
OrchestrationDispatchCommandError,
|
|
23
24
|
OrchestrationGetSnapshotError,
|
|
25
|
+
PreviewAutomationError,
|
|
24
26
|
ServerSettingsError,
|
|
25
27
|
TerminalError,
|
|
26
28
|
ConnectionBlockedError,
|
package/src/rpc/layer.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ConnectionAttemptError } from "@t3tools/client-runtime/connection";
|
|
1
2
|
import * as Context from "effect/Context";
|
|
2
3
|
import * as Effect from "effect/Effect";
|
|
3
4
|
import * as Exit from "effect/Exit";
|
|
@@ -8,16 +9,16 @@ import * as Schedule from "effect/Schedule";
|
|
|
8
9
|
import * as Scope from "effect/Scope";
|
|
9
10
|
import * as SynchronizedRef from "effect/SynchronizedRef";
|
|
10
11
|
|
|
12
|
+
import { T3CodeConnectionError } from "../connection/error.ts";
|
|
11
13
|
import { T3PreparedConnectionProvider } from "../connection/prepared.ts";
|
|
12
14
|
import { RpcError } from "./error.ts";
|
|
13
15
|
import { T3RpcSessionFactory } from "./session.ts";
|
|
14
16
|
import { T3Rpc, type WsClient } from "./service.ts";
|
|
15
17
|
|
|
16
18
|
const connectionRetrySchedule = Schedule.exponential("100 millis").pipe(
|
|
17
|
-
Schedule.
|
|
18
|
-
Schedule.
|
|
19
|
-
|
|
20
|
-
),
|
|
19
|
+
Schedule.setInputType<ConnectionAttemptError | T3CodeConnectionError>(),
|
|
20
|
+
Schedule.upTo({ times: 4 }),
|
|
21
|
+
Schedule.while((metadata) => Predicate.isTagged(metadata.input, "ConnectionTransientError")),
|
|
21
22
|
);
|
|
22
23
|
|
|
23
24
|
type Connection = {
|
package/src/rpc/operation.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
KeybindingsConfigError,
|
|
4
4
|
OrchestrationDispatchCommandError,
|
|
5
5
|
OrchestrationGetSnapshotError,
|
|
6
|
+
PreviewAutomationError,
|
|
6
7
|
ServerSettingsError,
|
|
7
8
|
TerminalError,
|
|
8
9
|
} from "@t3tools/contracts";
|
|
@@ -22,15 +23,15 @@ export type CliRpcOperationError =
|
|
|
22
23
|
| KeybindingsConfigError
|
|
23
24
|
| OrchestrationDispatchCommandError
|
|
24
25
|
| OrchestrationGetSnapshotError
|
|
26
|
+
| PreviewAutomationError
|
|
25
27
|
| RpcClientError.RpcClientError
|
|
26
28
|
| ServerSettingsError
|
|
27
29
|
| TerminalError;
|
|
28
30
|
|
|
29
31
|
export const rpcRetrySchedule = Schedule.exponential("100 millis").pipe(
|
|
30
|
-
Schedule.
|
|
31
|
-
Schedule.
|
|
32
|
-
|
|
33
|
-
),
|
|
32
|
+
Schedule.setInputType<CliRpcOperationError | RpcError>(),
|
|
33
|
+
Schedule.upTo({ times: 4 }),
|
|
34
|
+
Schedule.while((metadata) => Predicate.isTagged(metadata.input, "RpcClientError")),
|
|
34
35
|
);
|
|
35
36
|
|
|
36
37
|
export type T3RpcOperationsService = {
|
package/src/rpc/ws-group.ts
CHANGED
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
WsOrchestrationGetArchivedShellSnapshotRpc,
|
|
9
9
|
WsOrchestrationSubscribeShellRpc,
|
|
10
10
|
WsOrchestrationSubscribeThreadRpc,
|
|
11
|
+
WsPreviewAutomationConnectRpc,
|
|
12
|
+
WsPreviewAutomationFocusHostRpc,
|
|
13
|
+
WsPreviewAutomationRespondRpc,
|
|
11
14
|
WsServerProbeRpc,
|
|
12
15
|
WsSubscribeTerminalEventsRpc,
|
|
13
16
|
WsSubscribeTerminalMetadataRpc,
|
|
@@ -48,6 +51,9 @@ export const CliWsRpcGroup = RpcGroup.make(
|
|
|
48
51
|
WsOrchestrationGetArchivedShellSnapshotRpc,
|
|
49
52
|
WsOrchestrationSubscribeShellRpc,
|
|
50
53
|
WsOrchestrationSubscribeThreadRpc,
|
|
54
|
+
WsPreviewAutomationConnectRpc,
|
|
55
|
+
WsPreviewAutomationRespondRpc,
|
|
56
|
+
WsPreviewAutomationFocusHostRpc,
|
|
51
57
|
WsServerProbeRpc,
|
|
52
58
|
WsServerGetConfigRpc,
|
|
53
59
|
);
|
package/src/runtime/index.ts
CHANGED
package/src/runtime/layer.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { T3CodeConnectionError } from "../connection/error.ts";
|
|
|
17
17
|
import { T3PreparedConnectionProviderLive } from "../connection/prepared.ts";
|
|
18
18
|
import { T3CodeConnectionProvider, makeT3CodeConnectionProvider } from "../connection/service.ts";
|
|
19
19
|
import { T3OrchestrationLive } from "../orchestration/layer.ts";
|
|
20
|
+
import { T3PreviewAutomationLive } from "../preview/service.ts";
|
|
20
21
|
import { T3RpcLive } from "../rpc/layer.ts";
|
|
21
22
|
import { T3RpcOperationsLive } from "../rpc/operation.ts";
|
|
22
23
|
import { T3RpcSessionFactoryLive } from "../rpc/session.ts";
|
|
@@ -74,6 +75,9 @@ const T3RpcLayer = T3RpcLive.pipe(
|
|
|
74
75
|
);
|
|
75
76
|
const T3RpcOperationsLayer = T3RpcOperationsLive.pipe(Layer.provide(T3RpcLayer));
|
|
76
77
|
export const T3OrchestrationLayer = T3OrchestrationLive.pipe(Layer.provide(T3RpcOperationsLayer));
|
|
78
|
+
export const T3PreviewAutomationLayer = T3PreviewAutomationLive.pipe(
|
|
79
|
+
Layer.provide(T3RpcOperationsLayer),
|
|
80
|
+
);
|
|
77
81
|
const T3ApplicationLayer = T3ApplicationLive.pipe(
|
|
78
82
|
Layer.provide(Layer.mergeAll(T3RpcOperationsLayer, T3OrchestrationLayer)),
|
|
79
83
|
);
|
|
@@ -84,6 +88,7 @@ export const BaseAppLayer = Layer.mergeAll(
|
|
|
84
88
|
T3RpcLayer,
|
|
85
89
|
T3RpcOperationsLayer,
|
|
86
90
|
T3OrchestrationLayer,
|
|
91
|
+
T3PreviewAutomationLayer,
|
|
87
92
|
T3ApplicationLayer,
|
|
88
93
|
NodeCliPathLayer,
|
|
89
94
|
);
|
|
@@ -91,6 +91,9 @@ export const makeNodeSqliteClient = Effect.fn("makeNodeSqliteClient")(function*
|
|
|
91
91
|
executeValues(sql, params) {
|
|
92
92
|
return runValues(sql, params);
|
|
93
93
|
},
|
|
94
|
+
executeValuesUnprepared(sql, params) {
|
|
95
|
+
return runValues(sql, params);
|
|
96
|
+
},
|
|
94
97
|
executeUnprepared(sql, params, rowTransform) {
|
|
95
98
|
const effect = runRows(sql, params);
|
|
96
99
|
return rowTransform === undefined ? effect : Effect.map(effect, rowTransform);
|
|
@@ -1,25 +0,0 @@
|
|
|
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, Crypto.Crypto | Path.Path | T3Orchestration | 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 +0,0 @@
|
|
|
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
|
-
export type { ApplicationError } from "./error.ts";
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import * as Layer from "effect/Layer";
|
|
3
|
-
import { T3ActionApplication, T3Application, T3ModelApplication, T3ProjectApplication, T3TerminalApplication, T3ThreadApplication } from "./service.ts";
|
|
4
|
-
export declare const makeT3Application: () => Effect.Effect<{
|
|
5
|
-
listActions: (projectRef: string) => Effect.Effect<{
|
|
6
|
-
readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
|
|
7
|
-
readonly actions: ReadonlyArray<import("@t3tools/contracts").ProjectScript>;
|
|
8
|
-
}, import("./error.ts").ApplicationError>;
|
|
9
|
-
addAction: (input: import("./service.ts").AddProjectActionInput) => Effect.Effect<import("./service.ts").ProjectActionMutationResult, import("./error.ts").ApplicationError>;
|
|
10
|
-
updateAction: (input: import("./service.ts").UpdateProjectActionInput) => Effect.Effect<import("./service.ts").ProjectActionMutationResult, import("./error.ts").ApplicationError>;
|
|
11
|
-
deleteAction: (input: {
|
|
12
|
-
readonly projectRef: string;
|
|
13
|
-
readonly selector: import("./service.ts").ProjectActionSelector;
|
|
14
|
-
}) => Effect.Effect<import("./service.ts").ProjectActionDeleteResult, import("./error.ts").ApplicationError>;
|
|
15
|
-
runAction: (input: {
|
|
16
|
-
readonly threadId: string;
|
|
17
|
-
readonly selector: import("./service.ts").ProjectActionSelector;
|
|
18
|
-
readonly terminalId?: string;
|
|
19
|
-
}) => Effect.Effect<import("./service.ts").ProjectActionRunResult, import("./error.ts").ApplicationError>;
|
|
20
|
-
listModels: (input: {
|
|
21
|
-
readonly all?: boolean;
|
|
22
|
-
readonly provider?: string;
|
|
23
|
-
}) => Effect.Effect<ReadonlyArray<import("@t3tools/contracts").ServerProvider>, import("./error.ts").ApplicationError>;
|
|
24
|
-
loadShell: () => Effect.Effect<import("@t3tools/contracts").OrchestrationShellSnapshot, import("./error.ts").ApplicationError>;
|
|
25
|
-
addProject: (input: {
|
|
26
|
-
readonly path: string;
|
|
27
|
-
readonly title?: string;
|
|
28
|
-
}) => Effect.Effect<{
|
|
29
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
30
|
-
readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
|
|
31
|
-
}, import("./error.ts").ApplicationError>;
|
|
32
|
-
resolveProject: (projectRef: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationProjectShell, import("./error.ts").ApplicationError>;
|
|
33
|
-
deleteProject: (input: {
|
|
34
|
-
readonly projectId: string;
|
|
35
|
-
readonly force?: boolean;
|
|
36
|
-
}) => Effect.Effect<{
|
|
37
|
-
readonly projectId: string;
|
|
38
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
39
|
-
}, import("./error.ts").ApplicationError>;
|
|
40
|
-
listThreads: (projectRef: string, options?: {
|
|
41
|
-
readonly include?: import("./service.ts").ListThreadsInclude;
|
|
42
|
-
}) => Effect.Effect<{
|
|
43
|
-
readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
|
|
44
|
-
readonly threads: ReadonlyArray<import("@t3tools/contracts").OrchestrationThreadShell>;
|
|
45
|
-
}, import("./error.ts").ApplicationError>;
|
|
46
|
-
getThreadMessages: (threadId: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationThread, import("./error.ts").ApplicationError>;
|
|
47
|
-
showThread: (threadId: string) => Effect.Effect<import("./threads.ts").ThreadShow, import("./error.ts").ApplicationError>;
|
|
48
|
-
approveThread: (input: {
|
|
49
|
-
readonly threadId: string;
|
|
50
|
-
readonly requestId: string;
|
|
51
|
-
readonly decision: "accept" | "decline" | "cancel";
|
|
52
|
-
}) => Effect.Effect<{
|
|
53
|
-
readonly threadId: string;
|
|
54
|
-
readonly requestId: string;
|
|
55
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
56
|
-
}, import("./error.ts").ApplicationError>;
|
|
57
|
-
respondToThread: (input: {
|
|
58
|
-
readonly threadId: string;
|
|
59
|
-
readonly requestId: string;
|
|
60
|
-
readonly answers: import("@t3tools/contracts").ProviderUserInputAnswers;
|
|
61
|
-
}) => Effect.Effect<{
|
|
62
|
-
readonly threadId: string;
|
|
63
|
-
readonly requestId: string;
|
|
64
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
65
|
-
}, import("./error.ts").ApplicationError>;
|
|
66
|
-
archiveThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
|
|
67
|
-
interruptThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
|
|
68
|
-
unarchiveThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
|
|
69
|
-
deleteThread: (threadId: string) => Effect.Effect<{
|
|
70
|
-
readonly threadId: string;
|
|
71
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
72
|
-
}, import("./error.ts").ApplicationError>;
|
|
73
|
-
updateThread: (input: import("./service.ts").UpdateThreadInput) => Effect.Effect<import("@t3tools/contracts").DispatchResult, import("./error.ts").ApplicationError>;
|
|
74
|
-
startThread: (input: import("./service.ts").StartThreadInput, policy?: import("./service.ts").StartThreadPolicy) => Effect.Effect<{
|
|
75
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
76
|
-
readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
|
|
77
|
-
readonly threadId: string;
|
|
78
|
-
readonly thread?: import("@t3tools/contracts").OrchestrationThread;
|
|
79
|
-
}, import("./error.ts").ApplicationError>;
|
|
80
|
-
sendThread: (input: import("./service.ts").SendThreadInput, policy?: import("./service.ts").StartThreadPolicy) => Effect.Effect<{
|
|
81
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
82
|
-
readonly threadId: string;
|
|
83
|
-
readonly thread?: import("@t3tools/contracts").OrchestrationThread;
|
|
84
|
-
}, import("./error.ts").ApplicationError>;
|
|
85
|
-
watchThread: (threadId: string) => import("effect/Stream").Stream<import("./service.ts").WaitEvent, import("./error.ts").ApplicationError>;
|
|
86
|
-
waitForThread: (threadId: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationThread, import("./error.ts").ApplicationError>;
|
|
87
|
-
callbackThread: (input: import("./service.ts").CallbackThreadInput) => Effect.Effect<{
|
|
88
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
89
|
-
readonly targetThreadId: string;
|
|
90
|
-
}, import("./error.ts").ApplicationError>;
|
|
91
|
-
listTerminals: (threadId: string) => Effect.Effect<ReadonlyArray<import("@t3tools/contracts").TerminalSummary>, import("./error.ts").ApplicationError>;
|
|
92
|
-
getTerminal: (terminal: import("./service.ts").TerminalRef) => Effect.Effect<import("@t3tools/contracts").TerminalSummary, import("./error.ts").ApplicationError>;
|
|
93
|
-
createTerminal: (input: import("./service.ts").CreateTerminalInput) => Effect.Effect<import("@t3tools/contracts").TerminalSessionSnapshot, import("./error.ts").ApplicationError>;
|
|
94
|
-
attachTerminal: (input: {
|
|
95
|
-
readonly terminal: import("./service.ts").TerminalAttachTarget;
|
|
96
|
-
readonly cols?: number;
|
|
97
|
-
readonly rows?: number;
|
|
98
|
-
}) => import("effect/Stream").Stream<import("@t3tools/contracts").TerminalAttachStreamEvent, import("./error.ts").ApplicationError>;
|
|
99
|
-
watchTerminalMetadata: () => import("effect/Stream").Stream<import("@t3tools/contracts").TerminalMetadataStreamEvent, import("./error.ts").ApplicationError>;
|
|
100
|
-
writeTerminal: (input: {
|
|
101
|
-
readonly terminal: import("./service.ts").TerminalRef;
|
|
102
|
-
readonly data: string;
|
|
103
|
-
}) => Effect.Effect<void, import("./error.ts").ApplicationError>;
|
|
104
|
-
resizeTerminal: (input: {
|
|
105
|
-
readonly terminal: import("./service.ts").TerminalRef;
|
|
106
|
-
readonly cols: number;
|
|
107
|
-
readonly rows: number;
|
|
108
|
-
}) => Effect.Effect<void, import("./error.ts").ApplicationError>;
|
|
109
|
-
destroyTerminal: (terminal: import("./service.ts").TerminalRef) => Effect.Effect<void, import("./error.ts").ApplicationError>;
|
|
110
|
-
}, never, T3ActionApplication | T3ModelApplication | T3ProjectApplication | T3TerminalApplication | T3ThreadApplication>;
|
|
111
|
-
export declare const T3ModelApplicationLive: Layer.Layer<T3ModelApplication, never, import("../orchestration/service.ts").T3Orchestration>;
|
|
112
|
-
export declare const T3ProjectApplicationLive: Layer.Layer<T3ProjectApplication, never, import("../cli/runtime/service.ts").CliRuntime | import("effect/Crypto").Crypto | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration>;
|
|
113
|
-
export declare const T3TerminalApplicationLive: Layer.Layer<T3TerminalApplication, never, import("effect/Crypto").Crypto | import("../orchestration/service.ts").T3Orchestration | import("../rpc/operation.ts").T3RpcOperations>;
|
|
114
|
-
export declare const T3ActionApplicationLive: Layer.Layer<T3ActionApplication, never, import("effect/Crypto").Crypto | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration | import("../rpc/operation.ts").T3RpcOperations>;
|
|
115
|
-
export declare const T3ThreadApplicationLive: Layer.Layer<T3ThreadApplication, never, import("../cli/runtime/service.ts").CliRuntime | import("effect/Crypto").Crypto | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration>;
|
|
116
|
-
export declare const T3ApplicationSlicesLive: Layer.Layer<T3ActionApplication | T3ModelApplication | T3ProjectApplication | T3TerminalApplication | T3ThreadApplication, never, import("../cli/runtime/service.ts").CliRuntime | import("effect/Crypto").Crypto | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration | import("../rpc/operation.ts").T3RpcOperations>;
|
|
117
|
-
export declare const T3ApplicationLive: Layer.Layer<T3Application, never, import("../cli/runtime/service.ts").CliRuntime | import("effect/Crypto").Crypto | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration | import("../rpc/operation.ts").T3RpcOperations>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { ModelSelection } from "@t3tools/contracts";
|
|
3
|
-
import type { OrchestrationProjectShell } from "@t3tools/contracts";
|
|
4
|
-
import { ModelSelectionError } from "../domain/error.ts";
|
|
5
|
-
import type { ServerConfigForCli } from "../orchestration/service.ts";
|
|
6
|
-
import type { StartThreadInput } from "./service.ts";
|
|
7
|
-
export declare function resolveModelSelection(input: {
|
|
8
|
-
readonly start: StartThreadInput;
|
|
9
|
-
readonly project: OrchestrationProjectShell;
|
|
10
|
-
readonly serverConfig: ServerConfigForCli;
|
|
11
|
-
}): Effect.Effect<{
|
|
12
|
-
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
13
|
-
readonly model: string;
|
|
14
|
-
readonly options?: readonly {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
readonly value: string | boolean;
|
|
17
|
-
}[];
|
|
18
|
-
}, ModelSelectionError, never>;
|
|
19
|
-
export declare function mergeModelOptions(selection: ModelSelection, options: NonNullable<ModelSelection["options"]>): ModelSelection;
|
|
20
|
-
export declare function resolveUpdateModelSelection(input: {
|
|
21
|
-
readonly current: ModelSelection;
|
|
22
|
-
readonly provider?: string;
|
|
23
|
-
readonly model?: string;
|
|
24
|
-
readonly options?: NonNullable<ModelSelection["options"]>;
|
|
25
|
-
readonly project: OrchestrationProjectShell;
|
|
26
|
-
readonly serverConfig: ServerConfigForCli;
|
|
27
|
-
}): Effect.Effect<{
|
|
28
|
-
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
29
|
-
readonly model: string;
|
|
30
|
-
readonly options?: readonly {
|
|
31
|
-
readonly id: string;
|
|
32
|
-
readonly value: string | boolean;
|
|
33
|
-
}[];
|
|
34
|
-
}, ModelSelectionError, never>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { T3Orchestration } from "../orchestration/service.ts";
|
|
3
|
-
export declare const makeModelsApplication: () => Effect.Effect<{
|
|
4
|
-
listModels: (input: {
|
|
5
|
-
readonly all?: boolean;
|
|
6
|
-
readonly provider?: string;
|
|
7
|
-
}) => Effect.Effect<ReadonlyArray<import("@t3tools/contracts").ServerProvider>, import("./error.ts").ApplicationError>;
|
|
8
|
-
}, never, T3Orchestration>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as Crypto from "effect/Crypto";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as Path from "effect/Path";
|
|
4
|
-
import { type ClientOrchestrationCommand } from "@t3tools/contracts";
|
|
5
|
-
export declare const makeProjectCreateCommand: (input: {
|
|
6
|
-
readonly path: string;
|
|
7
|
-
readonly title?: string;
|
|
8
|
-
readonly cwd: string;
|
|
9
|
-
}) => Effect.Effect<{
|
|
10
|
-
type: "project.create";
|
|
11
|
-
commandId: string & import("effect/Brand").Brand<"CommandId">;
|
|
12
|
-
projectId: string & import("effect/Brand").Brand<"ProjectId">;
|
|
13
|
-
title: string;
|
|
14
|
-
workspaceRoot: string;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
}, never, Crypto.Crypto | Path.Path>;
|
|
17
|
-
export declare const makeProjectDeleteCommand: (input: {
|
|
18
|
-
readonly projectId: string;
|
|
19
|
-
readonly force?: boolean;
|
|
20
|
-
}) => Effect.Effect<{
|
|
21
|
-
type: "project.delete";
|
|
22
|
-
commandId: string & import("effect/Brand").Brand<"CommandId">;
|
|
23
|
-
projectId: string & import("effect/Brand").Brand<"ProjectId">;
|
|
24
|
-
force?: true;
|
|
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: "build" | "configure" | "debug" | "lint" | "play" | "test";
|
|
40
|
-
readonly runOnWorktreeCreate: boolean;
|
|
41
|
-
readonly previewUrl?: string | undefined;
|
|
42
|
-
readonly autoOpenPreview?: boolean | undefined;
|
|
43
|
-
}[] | undefined;
|
|
44
|
-
}, never, Crypto.Crypto>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as Crypto from "effect/Crypto";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as Path from "effect/Path";
|
|
4
|
-
import { CliRuntime } from "../cli/runtime/service.ts";
|
|
5
|
-
import { T3Orchestration } from "../orchestration/service.ts";
|
|
6
|
-
export declare const makeProjectApplication: () => Effect.Effect<{
|
|
7
|
-
loadShell: () => Effect.Effect<import("@t3tools/contracts").OrchestrationShellSnapshot, import("./error.ts").ApplicationError>;
|
|
8
|
-
addProject: (input: {
|
|
9
|
-
readonly path: string;
|
|
10
|
-
readonly title?: string;
|
|
11
|
-
}) => Effect.Effect<{
|
|
12
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
13
|
-
readonly project: import("@t3tools/contracts").OrchestrationProjectShell;
|
|
14
|
-
}, import("./error.ts").ApplicationError>;
|
|
15
|
-
resolveProject: (projectRef: string) => Effect.Effect<import("@t3tools/contracts").OrchestrationProjectShell, import("./error.ts").ApplicationError>;
|
|
16
|
-
deleteProject: (input: {
|
|
17
|
-
readonly projectId: string;
|
|
18
|
-
readonly force?: boolean;
|
|
19
|
-
}) => Effect.Effect<{
|
|
20
|
-
readonly projectId: string;
|
|
21
|
-
readonly dispatch: import("@t3tools/contracts").DispatchResult;
|
|
22
|
-
}, import("./error.ts").ApplicationError>;
|
|
23
|
-
}, never, CliRuntime | Crypto.Crypto | Path.Path | T3Orchestration>;
|