t3code-cli 0.10.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.
- package/README.md +75 -11
- package/dist/application.js +2 -2
- package/dist/auth.js +1 -1
- package/dist/bin.js +86754 -2675
- package/dist/cli.js +15 -2
- package/dist/config.js +120 -2
- package/dist/connection.js +2 -12
- package/dist/index.js +1 -1
- package/dist/node.js +6 -0
- package/dist/orchestration.js +2 -2
- package/dist/rpc.js +2 -2
- package/dist/runtime.js +2 -2
- package/dist/shared.js +43850 -38040
- package/dist/src/application/actions.d.ts +25 -0
- package/dist/src/application/index.d.ts +3 -2
- package/dist/src/application/layer.d.ts +99 -842
- package/dist/src/application/model-selection.d.ts +17 -2
- package/dist/src/application/models.d.ts +1 -87
- package/dist/src/application/project-commands.d.ts +31 -2
- package/dist/src/application/projects.d.ts +15 -137
- package/dist/src/application/service.d.ts +147 -5
- package/dist/src/application/shell-sequence.d.ts +5 -4
- package/dist/src/application/terminals.d.ts +66 -0
- package/dist/src/application/thread-commands.d.ts +48 -1
- package/dist/src/application/thread-update.d.ts +8 -0
- package/dist/src/application/thread-wait.d.ts +4 -6
- package/dist/src/application/threads.d.ts +36 -14
- package/dist/src/auth/error.d.ts +2 -1
- package/dist/src/auth/index.d.ts +1 -1
- package/dist/src/auth/layer.d.ts +34 -6
- package/dist/src/auth/local-base-dir.d.ts +5 -2
- package/dist/src/auth/local-origin.d.ts +3 -3
- package/dist/src/auth/local-token.d.ts +3 -3
- package/dist/src/auth/service.d.ts +15 -3
- package/dist/src/auth/type.d.ts +40 -1
- package/dist/src/cli/env/flag.d.ts +2 -0
- package/dist/src/cli/env/index.d.ts +2 -0
- package/dist/src/cli/env/selection-layer.d.ts +3 -0
- package/dist/src/cli/flags.d.ts +5 -0
- package/dist/src/cli/format/index.d.ts +1 -0
- package/dist/src/cli/format/output.d.ts +12 -0
- package/dist/src/cli/index.d.ts +4 -0
- package/dist/src/cli/runtime/index.d.ts +1 -0
- package/dist/src/cli/runtime/service.d.ts +16 -0
- package/dist/src/{scope → cli/scope}/resolve.d.ts +5 -4
- package/dist/src/config/config.d.ts +49 -0
- package/dist/src/config/credential/cipher-node.d.ts +3 -0
- package/dist/src/config/credential/cipher-web.d.ts +3 -0
- package/dist/src/config/credential/cipher.d.ts +29 -0
- package/dist/src/config/credential/env.d.ts +3 -0
- package/dist/src/config/credential/error.d.ts +8 -0
- package/dist/src/config/credential/index.d.ts +6 -0
- package/dist/src/config/credential/service.d.ts +34 -0
- package/dist/src/config/env/env.d.ts +55 -0
- package/dist/src/config/env/index.d.ts +2 -0
- package/dist/src/{layout/base-dir.d.ts → config/env/layout.d.ts} +0 -1
- package/dist/src/config/environment-name/index.d.ts +1 -0
- package/dist/src/config/environment-name/name.d.ts +10 -0
- package/dist/src/config/error.d.ts +4 -11
- package/dist/src/config/index.d.ts +10 -5
- package/dist/src/config/keystore/error.d.ts +8 -0
- package/dist/src/config/keystore/file.d.ts +9 -0
- package/dist/src/config/keystore/index.d.ts +4 -0
- package/dist/src/config/keystore/keyring-node.d.ts +4 -0
- package/dist/src/config/keystore/service.d.ts +33 -0
- package/dist/src/config/paths/index.d.ts +1 -0
- package/dist/src/config/paths/paths.d.ts +6 -0
- package/dist/src/config/persist/file-mode.d.ts +4 -0
- package/dist/src/config/persist/migration.d.ts +68 -0
- package/dist/src/config/persist/persist.d.ts +40 -0
- package/dist/src/config/persist/schema.d.ts +68 -0
- package/dist/src/config/resolve/resolve.d.ts +40 -0
- package/dist/src/config/selection/index.d.ts +1 -0
- package/dist/src/config/selection/resolve.d.ts +4 -0
- package/dist/src/config/selection/service.d.ts +10 -0
- package/dist/src/config/types.d.ts +36 -0
- package/dist/src/config/url/error.d.ts +10 -0
- package/dist/src/config/url/index.d.ts +2 -0
- package/dist/src/connection/index.d.ts +0 -1
- package/dist/src/contracts/index.d.ts +1 -1
- package/dist/src/domain/error.d.ts +27 -1
- package/dist/src/domain/helpers.d.ts +8 -2
- package/dist/src/domain/model-config.d.ts +30 -1
- package/dist/src/domain/thread-activities.d.ts +1 -1
- package/dist/src/domain/thread-lifecycle.d.ts +3 -2
- package/dist/src/index.d.ts +1 -2
- package/dist/src/{connection/node.d.ts → node/connection.d.ts} +1 -1
- package/dist/src/node/index.d.ts +1 -0
- package/dist/src/orchestration/index.d.ts +1 -1
- package/dist/src/orchestration/layer.d.ts +120 -829
- package/dist/src/orchestration/service.d.ts +2 -1
- package/dist/src/rpc/error.d.ts +5 -3
- package/dist/src/rpc/index.d.ts +5 -1
- package/dist/src/rpc/layer.d.ts +1166 -40
- package/dist/src/rpc/operation.d.ts +6280 -0
- package/dist/src/rpc/ws-group.d.ts +372 -27
- package/dist/src/runtime/index.d.ts +1 -2
- package/dist/src/runtime/layer.d.ts +12 -8
- package/dist/src/t3tools/index.d.ts +1 -1
- package/dist/t3tools.js +2 -2
- package/package.json +27 -19
- package/src/application/actions.test.ts +328 -0
- package/src/application/actions.ts +475 -0
- package/src/application/index.ts +32 -2
- package/src/application/layer.ts +43 -5
- package/src/application/model-selection.ts +70 -4
- package/src/application/models.ts +14 -14
- package/src/application/project-commands.ts +38 -5
- package/src/application/projects.ts +49 -20
- package/src/application/service.ts +275 -78
- package/src/application/shell-sequence.ts +6 -8
- package/src/application/terminals.ts +208 -0
- package/src/application/thread-commands.test.ts +43 -0
- package/src/application/thread-commands.ts +82 -1
- package/src/application/thread-update.ts +72 -0
- package/src/application/thread-wait.ts +47 -48
- package/src/application/threads.test.ts +172 -0
- package/src/application/threads.ts +128 -45
- package/src/auth/error.ts +2 -1
- package/src/auth/index.ts +7 -0
- package/src/auth/layer.test-utils.ts +34 -0
- package/src/auth/layer.ts +116 -34
- package/src/auth/local-base-dir.ts +13 -6
- package/src/auth/local-origin.ts +10 -7
- package/src/auth/local-token.ts +28 -23
- package/src/auth/service.test.ts +200 -0
- package/src/auth/service.ts +27 -3
- package/src/auth/transport.ts +2 -2
- package/src/auth/type.ts +47 -1
- package/src/bin.ts +26 -6
- package/src/cli/action-format.ts +110 -0
- package/src/cli/action.ts +398 -0
- package/src/cli/app.ts +8 -0
- package/src/cli/auth.ts +76 -23
- package/src/cli/env/flag.ts +8 -0
- package/src/cli/env/index.ts +2 -0
- package/src/cli/env/selection-layer.test.ts +49 -0
- package/src/cli/env/selection-layer.ts +27 -0
- package/src/cli/env.ts +107 -0
- package/src/cli/error.ts +26 -3
- package/src/cli/extra-args.test.ts +32 -0
- package/src/cli/extra-args.ts +22 -0
- package/src/cli/flags.ts +26 -1
- package/src/cli/format/auth.ts +92 -0
- package/src/cli/format/human.ts +131 -0
- package/src/cli/format/index.ts +12 -0
- package/src/cli/format/model.ts +29 -0
- package/src/cli/format/output.ts +51 -0
- package/src/cli/format/project.ts +32 -0
- package/src/cli/format/terminal.ts +87 -0
- package/src/cli/format/thread.test.ts +34 -0
- package/src/cli/format/thread.ts +185 -0
- package/src/cli/index.ts +20 -0
- package/src/cli/input/layer.ts +20 -0
- package/src/cli/input/service.ts +1 -0
- package/src/cli/interaction/confirm.ts +64 -0
- package/src/cli/interaction/self-action.ts +36 -0
- package/src/cli/message-input.ts +1 -1
- package/src/cli/model.ts +9 -5
- package/src/cli/project.ts +15 -8
- package/src/cli/projects/delete.ts +51 -0
- package/src/cli/require.ts +9 -7
- package/src/cli/runtime/index.ts +1 -0
- package/src/cli/runtime/service.ts +28 -0
- package/src/{scope → cli/scope}/resolve.ts +11 -9
- package/src/cli/terminal/attach.ts +29 -0
- package/src/cli/terminal/create.ts +55 -0
- package/src/cli/terminal/destroy.ts +62 -0
- package/src/cli/terminal/encoding.test.ts +63 -0
- package/src/cli/terminal/encoding.ts +23 -0
- package/src/cli/terminal/error.ts +14 -0
- package/src/cli/terminal/io-node-layer.ts +82 -0
- package/src/cli/terminal/io-service.ts +25 -0
- package/src/cli/terminal/list.ts +36 -0
- package/src/cli/terminal/read.test-utils.ts +48 -0
- package/src/cli/terminal/read.test.ts +35 -0
- package/src/cli/terminal/read.ts +99 -0
- package/src/cli/terminal/scope.ts +35 -0
- package/src/cli/terminal/shared.ts +250 -0
- package/src/cli/terminal/stream.ts +61 -0
- package/src/cli/terminal/wait.test.ts +148 -0
- package/src/cli/terminal/wait.ts +223 -0
- package/src/cli/terminal/write.test.ts +34 -0
- package/src/cli/terminal/write.ts +133 -0
- package/src/cli/terminal.ts +26 -0
- package/src/cli/thread.ts +8 -0
- package/src/cli/threads/approve.ts +11 -7
- package/src/cli/threads/archive.ts +23 -25
- package/src/cli/threads/callback.ts +6 -4
- package/src/cli/threads/delete.ts +67 -0
- package/src/cli/threads/interrupt.ts +57 -0
- package/src/cli/threads/list.test.ts +71 -0
- package/src/cli/threads/list.ts +25 -13
- package/src/cli/threads/messages.ts +11 -7
- package/src/cli/threads/respond.ts +11 -7
- package/src/cli/threads/send.ts +39 -9
- package/src/cli/threads/show.ts +11 -7
- package/src/cli/threads/start.ts +18 -13
- package/src/cli/threads/unarchive.ts +48 -0
- package/src/cli/threads/update.ts +155 -0
- package/src/cli/threads/wait.ts +11 -7
- package/src/cli/wait-events.ts +1 -1
- package/src/config/config.ts +260 -0
- package/src/config/credential/cipher-node.ts +40 -0
- package/src/config/credential/cipher-web.ts +82 -0
- package/src/config/credential/cipher.ts +39 -0
- package/src/config/credential/env.ts +13 -0
- package/src/config/credential/error.ts +9 -0
- package/src/config/credential/index.ts +6 -0
- package/src/config/credential/service.test-utils.ts +25 -0
- package/src/config/credential/service.test.ts +116 -0
- package/src/config/credential/service.ts +205 -0
- package/src/config/env/env.test-utils.ts +14 -0
- package/src/config/env/env.ts +81 -0
- package/src/config/env/index.ts +2 -0
- package/src/{layout/base-dir.ts → config/env/layout.ts} +0 -9
- package/src/config/environment-name/index.ts +7 -0
- package/src/config/environment-name/name.test.ts +66 -0
- package/src/config/environment-name/name.ts +49 -0
- package/src/config/error.ts +6 -8
- package/src/config/index.ts +16 -5
- package/src/config/keystore/error.ts +9 -0
- package/src/config/keystore/file.ts +96 -0
- package/src/config/keystore/index.ts +4 -0
- package/src/config/keystore/keyring-node.test.ts +12 -0
- package/src/config/keystore/keyring-node.ts +100 -0
- package/src/config/keystore/service.test-utils.ts +15 -0
- package/src/config/keystore/service.test.ts +18 -0
- package/src/config/keystore/service.ts +29 -0
- package/src/config/layer.test-utils.ts +45 -0
- package/src/config/layer.test.ts +209 -0
- package/src/config/paths/index.ts +1 -0
- package/src/config/paths/paths.ts +36 -0
- package/src/config/persist/file-mode.ts +21 -0
- package/src/config/persist/migration.test.ts +71 -0
- package/src/config/persist/migration.ts +82 -0
- package/src/config/persist/persist.test.ts +113 -0
- package/src/config/persist/persist.ts +65 -0
- package/src/config/persist/schema.ts +37 -0
- package/src/config/platform.test-utils.ts +20 -0
- package/src/config/resolve/resolve.test-utils.ts +20 -0
- package/src/config/resolve/resolve.test.ts +137 -0
- package/src/config/resolve/resolve.ts +104 -0
- package/src/config/selection/index.ts +1 -0
- package/src/config/selection/resolve.ts +14 -0
- package/src/config/selection/service.ts +29 -0
- package/src/config/temp-home.test-utils.ts +7 -0
- package/src/config/types.ts +49 -0
- package/src/config/url/error.ts +8 -0
- package/src/config/url/index.ts +7 -0
- package/src/config/url/url.test.ts +31 -0
- package/src/connection/index.ts +0 -1
- package/src/contracts/index.ts +1 -1
- package/src/domain/error.ts +39 -1
- package/src/domain/helpers.test.ts +1 -1
- package/src/domain/helpers.ts +1 -1
- package/src/domain/model-config.ts +5 -1
- package/src/domain/thread-activities.test.ts +1 -1
- package/src/domain/thread-activities.ts +1 -1
- package/src/domain/thread-lifecycle.test.ts +1 -1
- package/src/domain/thread-lifecycle.ts +15 -1
- package/src/effect.test-utils.ts +25 -0
- package/src/index.ts +1 -1
- package/src/{connection/node.ts → node/connection.ts} +1 -1
- package/src/node/index.ts +1 -0
- package/src/orchestration/index.ts +1 -1
- package/src/orchestration/layer.ts +34 -86
- package/src/orchestration/service.ts +5 -1
- package/src/rpc/error.ts +12 -2
- package/src/rpc/index.ts +5 -1
- package/src/rpc/layer.ts +1 -1
- package/src/rpc/operation.ts +83 -0
- package/src/rpc/ws-group.ts +25 -1
- package/src/runtime/index.ts +2 -1
- package/src/runtime/layer.test-utils.ts +32 -0
- package/src/runtime/layer.test.ts +66 -0
- package/src/runtime/layer.ts +22 -11
- package/src/t3tools/index.ts +1 -1
- package/src/types/marked-terminal.d.ts +11 -0
- package/dist/layout.js +0 -2
- package/dist/scope.js +0 -2
- package/dist/src/cli/output-format.d.ts +0 -9
- package/dist/src/config/layer.d.ts +0 -22
- package/dist/src/config/service.d.ts +0 -22
- package/dist/src/environment/layer.d.ts +0 -3
- package/dist/src/environment/service.d.ts +0 -12
- package/dist/src/layout/index.d.ts +0 -1
- package/dist/upstream-t3code/packages/contracts/src/auth.d.ts +0 -441
- package/dist/upstream-t3code/packages/contracts/src/baseSchemas.d.ts +0 -38
- package/dist/upstream-t3code/packages/contracts/src/desktopBootstrap.d.ts +0 -14
- package/dist/upstream-t3code/packages/contracts/src/editor.d.ts +0 -124
- package/dist/upstream-t3code/packages/contracts/src/environment.d.ts +0 -64
- package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +0 -785
- package/dist/upstream-t3code/packages/contracts/src/filesystem.d.ts +0 -26
- package/dist/upstream-t3code/packages/contracts/src/git.d.ts +0 -500
- package/dist/upstream-t3code/packages/contracts/src/index.d.ts +0 -25
- package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +0 -496
- package/dist/upstream-t3code/packages/contracts/src/keybindings.d.ts +0 -133
- package/dist/upstream-t3code/packages/contracts/src/model.d.ts +0 -112
- package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +0 -7338
- package/dist/upstream-t3code/packages/contracts/src/project.d.ts +0 -45
- package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +0 -130
- package/dist/upstream-t3code/packages/contracts/src/providerInstance.d.ts +0 -99
- package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +0 -4450
- package/dist/upstream-t3code/packages/contracts/src/relay.d.ts +0 -1262
- package/dist/upstream-t3code/packages/contracts/src/relayClient.d.ts +0 -48
- package/dist/upstream-t3code/packages/contracts/src/remoteAccess.d.ts +0 -45
- package/dist/upstream-t3code/packages/contracts/src/review.d.ts +0 -37
- package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +0 -8710
- package/dist/upstream-t3code/packages/contracts/src/server.d.ts +0 -2336
- package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +0 -292
- package/dist/upstream-t3code/packages/contracts/src/sourceControl.d.ts +0 -177
- package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +0 -333
- package/dist/upstream-t3code/packages/contracts/src/vcs.d.ts +0 -148
- package/src/cli/auth-format.ts +0 -45
- package/src/cli/model-format.ts +0 -18
- package/src/cli/output-format.ts +0 -41
- package/src/cli/project-format.ts +0 -11
- package/src/cli/thread-format.ts +0 -121
- package/src/config/layer.ts +0 -105
- package/src/config/service.ts +0 -26
- package/src/environment/layer.ts +0 -12
- package/src/environment/service.ts +0 -13
- package/src/layout/index.ts +0 -1
- /package/dist/src/{scope → cli/scope}/index.d.ts +0 -0
- /package/dist/src/config/{url.d.ts → url/url.d.ts} +0 -0
- /package/src/{scope → cli/scope}/index.ts +0 -0
- /package/src/config/{url.ts → url/url.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
-
import { ModelSelection } from "
|
|
3
|
-
import type { OrchestrationProjectShell } from "
|
|
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";
|
|
@@ -17,3 +17,18 @@ export declare function resolveModelSelection(input: {
|
|
|
17
17
|
}[];
|
|
18
18
|
}, ModelSelectionError, never>;
|
|
19
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>;
|
|
@@ -4,91 +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<
|
|
8
|
-
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
9
|
-
readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
|
|
10
|
-
readonly enabled: boolean;
|
|
11
|
-
readonly installed: boolean;
|
|
12
|
-
readonly version: string | null;
|
|
13
|
-
readonly status: "error" | "ready" | "warning" | "disabled";
|
|
14
|
-
readonly auth: {
|
|
15
|
-
readonly status: "authenticated" | "unknown" | "unauthenticated";
|
|
16
|
-
readonly type?: string | undefined;
|
|
17
|
-
readonly label?: string | undefined;
|
|
18
|
-
readonly email?: string | undefined;
|
|
19
|
-
};
|
|
20
|
-
readonly checkedAt: string;
|
|
21
|
-
readonly models: readonly {
|
|
22
|
-
readonly slug: string;
|
|
23
|
-
readonly name: string;
|
|
24
|
-
readonly isCustom: boolean;
|
|
25
|
-
readonly capabilities: {
|
|
26
|
-
readonly optionDescriptors?: readonly ({
|
|
27
|
-
readonly type: "select";
|
|
28
|
-
readonly options: readonly {
|
|
29
|
-
readonly id: string;
|
|
30
|
-
readonly label: string;
|
|
31
|
-
readonly description?: string | undefined;
|
|
32
|
-
readonly isDefault?: boolean | undefined;
|
|
33
|
-
}[];
|
|
34
|
-
readonly id: string;
|
|
35
|
-
readonly label: string;
|
|
36
|
-
readonly currentValue?: string | undefined;
|
|
37
|
-
readonly promptInjectedValues?: readonly string[] | undefined;
|
|
38
|
-
readonly description?: string | undefined;
|
|
39
|
-
} | {
|
|
40
|
-
readonly type: "boolean";
|
|
41
|
-
readonly id: string;
|
|
42
|
-
readonly label: string;
|
|
43
|
-
readonly currentValue?: boolean | undefined;
|
|
44
|
-
readonly description?: string | undefined;
|
|
45
|
-
})[] | undefined;
|
|
46
|
-
} | null;
|
|
47
|
-
readonly shortName?: string | undefined;
|
|
48
|
-
readonly subProvider?: string | undefined;
|
|
49
|
-
}[];
|
|
50
|
-
readonly slashCommands: readonly {
|
|
51
|
-
readonly name: string;
|
|
52
|
-
readonly description?: string | undefined;
|
|
53
|
-
readonly input?: {
|
|
54
|
-
readonly hint: string;
|
|
55
|
-
} | undefined;
|
|
56
|
-
}[];
|
|
57
|
-
readonly skills: readonly {
|
|
58
|
-
readonly name: string;
|
|
59
|
-
readonly path: string;
|
|
60
|
-
readonly enabled: boolean;
|
|
61
|
-
readonly description?: string | undefined;
|
|
62
|
-
readonly scope?: string | undefined;
|
|
63
|
-
readonly displayName?: string | undefined;
|
|
64
|
-
readonly shortDescription?: string | undefined;
|
|
65
|
-
}[];
|
|
66
|
-
readonly displayName?: string | undefined;
|
|
67
|
-
readonly accentColor?: string | undefined;
|
|
68
|
-
readonly badgeLabel?: string | undefined;
|
|
69
|
-
readonly continuation?: {
|
|
70
|
-
readonly groupKey: string;
|
|
71
|
-
} | undefined;
|
|
72
|
-
readonly showInteractionModeToggle?: boolean | undefined;
|
|
73
|
-
readonly requiresNewThreadForModelChange?: boolean | undefined;
|
|
74
|
-
readonly message?: string | undefined;
|
|
75
|
-
readonly availability?: "available" | "unavailable" | undefined;
|
|
76
|
-
readonly unavailableReason?: string | undefined;
|
|
77
|
-
readonly versionAdvisory?: {
|
|
78
|
-
readonly status: "unknown" | "current" | "behind_latest";
|
|
79
|
-
readonly currentVersion: string | null;
|
|
80
|
-
readonly latestVersion: string | null;
|
|
81
|
-
readonly updateCommand: string | null;
|
|
82
|
-
readonly canUpdate: boolean;
|
|
83
|
-
readonly checkedAt: string | null;
|
|
84
|
-
readonly message: string | null;
|
|
85
|
-
};
|
|
86
|
-
readonly updateState?: {
|
|
87
|
-
readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
|
|
88
|
-
readonly startedAt: string | null;
|
|
89
|
-
readonly finishedAt: string | null;
|
|
90
|
-
readonly message: string | null;
|
|
91
|
-
readonly output: string | null;
|
|
92
|
-
};
|
|
93
|
-
}[], import("../rpc/error.ts").RpcError, never>;
|
|
7
|
+
}) => Effect.Effect<ReadonlyArray<import("@t3tools/contracts").ServerProvider>, import("./error.ts").ApplicationError>;
|
|
94
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 {
|
|
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,4 +13,32 @@ export declare const makeProjectCreateCommand: (input: {
|
|
|
12
13
|
title: string;
|
|
13
14
|
workspaceRoot: string;
|
|
14
15
|
createdAt: string;
|
|
15
|
-
}, never,
|
|
16
|
+
}, never, Path.Path | Crypto.Crypto>;
|
|
17
|
+
export declare const makeProjectDeleteCommand: (input: {
|
|
18
|
+
readonly projectId: string;
|
|
19
|
+
readonly force?: boolean;
|
|
20
|
+
}) => Effect.Effect<{
|
|
21
|
+
force?: true;
|
|
22
|
+
type: "project.delete";
|
|
23
|
+
commandId: string & import("effect/Brand").Brand<"CommandId">;
|
|
24
|
+
projectId: string & import("effect/Brand").Brand<"ProjectId">;
|
|
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,145 +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 {
|
|
4
|
+
import { CliRuntime } from "../cli/runtime/service.ts";
|
|
5
5
|
import { T3Orchestration } from "../orchestration/service.ts";
|
|
6
|
-
import { ProjectCreateVisibilityError } from "../domain/error.ts";
|
|
7
6
|
export declare const makeProjectApplication: () => Effect.Effect<{
|
|
8
|
-
loadShell: () => Effect.Effect<
|
|
9
|
-
|
|
10
|
-
readonly projects: readonly {
|
|
11
|
-
readonly id: string & import("effect/Brand").Brand<"ProjectId">;
|
|
12
|
-
readonly title: string;
|
|
13
|
-
readonly workspaceRoot: string;
|
|
14
|
-
readonly defaultModelSelection: {
|
|
15
|
-
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
16
|
-
readonly model: string;
|
|
17
|
-
readonly options?: readonly {
|
|
18
|
-
readonly id: string;
|
|
19
|
-
readonly value: string | boolean;
|
|
20
|
-
}[];
|
|
21
|
-
} | null;
|
|
22
|
-
readonly scripts: readonly {
|
|
23
|
-
readonly id: string;
|
|
24
|
-
readonly name: string;
|
|
25
|
-
readonly command: string;
|
|
26
|
-
readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
|
|
27
|
-
readonly runOnWorktreeCreate: boolean;
|
|
28
|
-
}[];
|
|
29
|
-
readonly createdAt: string;
|
|
30
|
-
readonly updatedAt: string;
|
|
31
|
-
readonly repositoryIdentity?: {
|
|
32
|
-
readonly canonicalKey: string;
|
|
33
|
-
readonly locator: {
|
|
34
|
-
readonly source: "git-remote";
|
|
35
|
-
readonly remoteName: string;
|
|
36
|
-
readonly remoteUrl: string;
|
|
37
|
-
};
|
|
38
|
-
readonly rootPath?: string;
|
|
39
|
-
readonly displayName?: string;
|
|
40
|
-
readonly provider?: string;
|
|
41
|
-
readonly owner?: string;
|
|
42
|
-
readonly name?: string;
|
|
43
|
-
} | null | undefined;
|
|
44
|
-
}[];
|
|
45
|
-
readonly threads: readonly {
|
|
46
|
-
readonly id: string & import("effect/Brand").Brand<"ThreadId">;
|
|
47
|
-
readonly projectId: string & import("effect/Brand").Brand<"ProjectId">;
|
|
48
|
-
readonly title: string;
|
|
49
|
-
readonly modelSelection: {
|
|
50
|
-
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
51
|
-
readonly model: string;
|
|
52
|
-
readonly options?: readonly {
|
|
53
|
-
readonly id: string;
|
|
54
|
-
readonly value: string | boolean;
|
|
55
|
-
}[];
|
|
56
|
-
};
|
|
57
|
-
readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
|
|
58
|
-
readonly interactionMode: "default" | "plan";
|
|
59
|
-
readonly branch: string | null;
|
|
60
|
-
readonly worktreePath: string | null;
|
|
61
|
-
readonly latestTurn: {
|
|
62
|
-
readonly turnId: string & import("effect/Brand").Brand<"TurnId">;
|
|
63
|
-
readonly state: "error" | "running" | "interrupted" | "completed";
|
|
64
|
-
readonly requestedAt: string;
|
|
65
|
-
readonly startedAt: string | null;
|
|
66
|
-
readonly completedAt: string | null;
|
|
67
|
-
readonly assistantMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
|
|
68
|
-
readonly sourceProposedPlan?: {
|
|
69
|
-
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
70
|
-
readonly planId: string;
|
|
71
|
-
} | undefined;
|
|
72
|
-
} | null;
|
|
73
|
-
readonly createdAt: string;
|
|
74
|
-
readonly updatedAt: string;
|
|
75
|
-
readonly archivedAt: string | null;
|
|
76
|
-
readonly session: {
|
|
77
|
-
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
78
|
-
readonly status: "error" | "idle" | "starting" | "running" | "ready" | "interrupted" | "stopped";
|
|
79
|
-
readonly providerName: string | null;
|
|
80
|
-
readonly runtimeMode: "approval-required" | "auto-accept-edits" | "full-access";
|
|
81
|
-
readonly activeTurnId: (string & import("effect/Brand").Brand<"TurnId">) | null;
|
|
82
|
-
readonly lastError: string | null;
|
|
83
|
-
readonly updatedAt: string;
|
|
84
|
-
readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
|
|
85
|
-
} | null;
|
|
86
|
-
readonly goal: {
|
|
87
|
-
readonly objective: string;
|
|
88
|
-
readonly status: "active" | "paused" | "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;
|
|
95
|
-
readonly latestUserMessageAt: string | null;
|
|
96
|
-
readonly hasPendingApprovals: boolean;
|
|
97
|
-
readonly hasPendingUserInput: boolean;
|
|
98
|
-
readonly hasActionableProposedPlan: boolean;
|
|
99
|
-
}[];
|
|
100
|
-
readonly updatedAt: string;
|
|
101
|
-
}, import("../rpc/error.ts").RpcError, never>;
|
|
102
|
-
addProject: (projectInput: {
|
|
7
|
+
loadShell: () => Effect.Effect<import("@t3tools/contracts").OrchestrationShellSnapshot, import("./error.ts").ApplicationError>;
|
|
8
|
+
addProject: (input: {
|
|
103
9
|
readonly path: string;
|
|
104
10
|
readonly title?: string;
|
|
105
11
|
}) => Effect.Effect<{
|
|
106
|
-
dispatch:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
readonly value: string | boolean;
|
|
119
|
-
}[];
|
|
120
|
-
} | null;
|
|
121
|
-
readonly scripts: readonly {
|
|
122
|
-
readonly id: string;
|
|
123
|
-
readonly name: string;
|
|
124
|
-
readonly command: string;
|
|
125
|
-
readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
|
|
126
|
-
readonly runOnWorktreeCreate: boolean;
|
|
127
|
-
}[];
|
|
128
|
-
readonly createdAt: string;
|
|
129
|
-
readonly updatedAt: string;
|
|
130
|
-
readonly repositoryIdentity?: {
|
|
131
|
-
readonly canonicalKey: string;
|
|
132
|
-
readonly locator: {
|
|
133
|
-
readonly source: "git-remote";
|
|
134
|
-
readonly remoteName: string;
|
|
135
|
-
readonly remoteUrl: string;
|
|
136
|
-
};
|
|
137
|
-
readonly rootPath?: string;
|
|
138
|
-
readonly displayName?: string;
|
|
139
|
-
readonly provider?: string;
|
|
140
|
-
readonly owner?: string;
|
|
141
|
-
readonly name?: string;
|
|
142
|
-
} | null | undefined;
|
|
143
|
-
};
|
|
144
|
-
}, ProjectCreateVisibilityError | import("../rpc/error.ts").RpcError, never>;
|
|
145
|
-
}, never, Environment | T3Orchestration | Path.Path | Crypto.Crypto>;
|
|
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 | 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 } from "
|
|
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 = {
|
|
@@ -13,6 +13,20 @@ export type StartThreadInput = {
|
|
|
13
13
|
readonly options?: NonNullable<ModelSelection["options"]>;
|
|
14
14
|
readonly worktreePath?: string;
|
|
15
15
|
};
|
|
16
|
+
export type CreateTerminalInput = {
|
|
17
|
+
readonly threadId: string;
|
|
18
|
+
readonly terminalId?: string;
|
|
19
|
+
readonly command?: string;
|
|
20
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
21
|
+
};
|
|
22
|
+
export type TerminalRef = {
|
|
23
|
+
readonly threadId: string;
|
|
24
|
+
readonly terminalId: string;
|
|
25
|
+
};
|
|
26
|
+
export type TerminalAttachTarget = TerminalRef & {
|
|
27
|
+
readonly cwd: string;
|
|
28
|
+
readonly worktreePath: string | null;
|
|
29
|
+
};
|
|
16
30
|
export type SendThreadInput = {
|
|
17
31
|
readonly threadId: string;
|
|
18
32
|
readonly message: string;
|
|
@@ -23,6 +37,16 @@ export type CallbackThreadInput = {
|
|
|
23
37
|
readonly targetThreadId: string;
|
|
24
38
|
readonly prompt: string;
|
|
25
39
|
};
|
|
40
|
+
export type ListThreadsInclude = "active" | "archived" | "all";
|
|
41
|
+
export type UpdateThreadInput = {
|
|
42
|
+
readonly threadId: string;
|
|
43
|
+
readonly title?: string;
|
|
44
|
+
readonly provider?: string;
|
|
45
|
+
readonly model?: string;
|
|
46
|
+
readonly options?: NonNullable<ModelSelection["options"]>;
|
|
47
|
+
readonly branch?: string | null;
|
|
48
|
+
readonly worktreePath?: string | null;
|
|
49
|
+
};
|
|
26
50
|
export type StartThreadPolicy = {
|
|
27
51
|
readonly until: "dispatch" | "visible" | "complete";
|
|
28
52
|
};
|
|
@@ -40,12 +64,79 @@ export type WaitEvent = {
|
|
|
40
64
|
readonly type: "done";
|
|
41
65
|
readonly thread: OrchestrationThread;
|
|
42
66
|
};
|
|
43
|
-
|
|
44
|
-
readonly
|
|
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
|
+
}
|
|
129
|
+
export type T3ModelApplicationService = {
|
|
45
130
|
readonly listModels: (input: {
|
|
46
131
|
readonly all?: boolean;
|
|
47
132
|
readonly provider?: string;
|
|
48
133
|
}) => Effect.Effect<ReadonlyArray<ServerProvider>, ApplicationError>;
|
|
134
|
+
};
|
|
135
|
+
declare const T3ModelApplication_base: Context.ServiceClass<T3ModelApplication, "t3cli/T3ModelApplication", T3ModelApplicationService>;
|
|
136
|
+
export declare class T3ModelApplication extends T3ModelApplication_base {
|
|
137
|
+
}
|
|
138
|
+
export type T3ProjectApplicationService = {
|
|
139
|
+
readonly loadShell: () => Effect.Effect<OrchestrationShellSnapshot, ApplicationError>;
|
|
49
140
|
readonly addProject: (input: {
|
|
50
141
|
readonly path: string;
|
|
51
142
|
readonly title?: string;
|
|
@@ -53,7 +144,22 @@ declare const T3Application_base: Context.ServiceClass<T3Application, "t3cli/T3A
|
|
|
53
144
|
readonly dispatch: DispatchResult;
|
|
54
145
|
readonly project: OrchestrationProjectShell;
|
|
55
146
|
}, ApplicationError>;
|
|
56
|
-
readonly
|
|
147
|
+
readonly resolveProject: (projectRef: string) => Effect.Effect<OrchestrationProjectShell, ApplicationError>;
|
|
148
|
+
readonly deleteProject: (input: {
|
|
149
|
+
readonly projectId: string;
|
|
150
|
+
readonly force?: boolean;
|
|
151
|
+
}) => Effect.Effect<{
|
|
152
|
+
readonly projectId: string;
|
|
153
|
+
readonly dispatch: DispatchResult;
|
|
154
|
+
}, ApplicationError>;
|
|
155
|
+
};
|
|
156
|
+
declare const T3ProjectApplication_base: Context.ServiceClass<T3ProjectApplication, "t3cli/T3ProjectApplication", T3ProjectApplicationService>;
|
|
157
|
+
export declare class T3ProjectApplication extends T3ProjectApplication_base {
|
|
158
|
+
}
|
|
159
|
+
export type T3ThreadApplicationService = {
|
|
160
|
+
readonly listThreads: (projectRef: string, options?: {
|
|
161
|
+
readonly include?: ListThreadsInclude;
|
|
162
|
+
}) => Effect.Effect<{
|
|
57
163
|
readonly project: OrchestrationProjectShell;
|
|
58
164
|
readonly threads: ReadonlyArray<OrchestrationThreadShell>;
|
|
59
165
|
}, ApplicationError>;
|
|
@@ -78,6 +184,13 @@ declare const T3Application_base: Context.ServiceClass<T3Application, "t3cli/T3A
|
|
|
78
184
|
readonly dispatch: DispatchResult;
|
|
79
185
|
}, ApplicationError>;
|
|
80
186
|
readonly archiveThread: (threadId: string) => Effect.Effect<DispatchResult, ApplicationError>;
|
|
187
|
+
readonly interruptThread: (threadId: string) => Effect.Effect<DispatchResult, ApplicationError>;
|
|
188
|
+
readonly unarchiveThread: (threadId: string) => Effect.Effect<DispatchResult, ApplicationError>;
|
|
189
|
+
readonly deleteThread: (threadId: string) => Effect.Effect<{
|
|
190
|
+
readonly threadId: string;
|
|
191
|
+
readonly dispatch: DispatchResult;
|
|
192
|
+
}, ApplicationError>;
|
|
193
|
+
readonly updateThread: (input: UpdateThreadInput) => Effect.Effect<DispatchResult, ApplicationError>;
|
|
81
194
|
readonly startThread: (input: StartThreadInput, policy?: StartThreadPolicy) => Effect.Effect<{
|
|
82
195
|
readonly dispatch: DispatchResult;
|
|
83
196
|
readonly project: OrchestrationProjectShell;
|
|
@@ -95,7 +208,36 @@ declare const T3Application_base: Context.ServiceClass<T3Application, "t3cli/T3A
|
|
|
95
208
|
readonly dispatch: DispatchResult;
|
|
96
209
|
readonly targetThreadId: string;
|
|
97
210
|
}, ApplicationError>;
|
|
98
|
-
}
|
|
211
|
+
};
|
|
212
|
+
declare const T3ThreadApplication_base: Context.ServiceClass<T3ThreadApplication, "t3cli/T3ThreadApplication", T3ThreadApplicationService>;
|
|
213
|
+
export declare class T3ThreadApplication extends T3ThreadApplication_base {
|
|
214
|
+
}
|
|
215
|
+
export type T3TerminalApplicationService = {
|
|
216
|
+
readonly listTerminals: (threadId: string) => Effect.Effect<ReadonlyArray<TerminalSummary>, ApplicationError>;
|
|
217
|
+
readonly getTerminal: (terminal: TerminalRef) => Effect.Effect<TerminalSummary, ApplicationError>;
|
|
218
|
+
readonly createTerminal: (input: CreateTerminalInput) => Effect.Effect<TerminalSessionSnapshot, ApplicationError>;
|
|
219
|
+
readonly attachTerminal: (input: {
|
|
220
|
+
readonly terminal: TerminalAttachTarget;
|
|
221
|
+
readonly cols?: number;
|
|
222
|
+
readonly rows?: number;
|
|
223
|
+
}) => Stream.Stream<TerminalAttachStreamEvent, ApplicationError>;
|
|
224
|
+
readonly watchTerminalMetadata: () => Stream.Stream<TerminalMetadataStreamEvent, ApplicationError>;
|
|
225
|
+
readonly writeTerminal: (input: {
|
|
226
|
+
readonly terminal: TerminalRef;
|
|
227
|
+
readonly data: string;
|
|
228
|
+
}) => Effect.Effect<void, ApplicationError>;
|
|
229
|
+
readonly resizeTerminal: (input: {
|
|
230
|
+
readonly terminal: TerminalRef;
|
|
231
|
+
readonly cols: number;
|
|
232
|
+
readonly rows: number;
|
|
233
|
+
}) => Effect.Effect<void, ApplicationError>;
|
|
234
|
+
readonly destroyTerminal: (terminal: TerminalRef) => Effect.Effect<void, ApplicationError>;
|
|
235
|
+
};
|
|
236
|
+
declare const T3TerminalApplication_base: Context.ServiceClass<T3TerminalApplication, "t3cli/T3TerminalApplication", T3TerminalApplicationService>;
|
|
237
|
+
export declare class T3TerminalApplication extends T3TerminalApplication_base {
|
|
238
|
+
}
|
|
239
|
+
export type T3ApplicationService = T3ModelApplicationService & T3ActionApplicationService & T3ProjectApplicationService & T3ThreadApplicationService & T3TerminalApplicationService;
|
|
240
|
+
declare const T3Application_base: Context.ServiceClass<T3Application, "t3cli/T3Application", T3ApplicationService>;
|
|
99
241
|
export declare class T3Application extends T3Application_base {
|
|
100
242
|
}
|
|
101
243
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
-
import
|
|
2
|
+
import { T3Orchestration } from "../orchestration/service.ts";
|
|
3
3
|
import { RpcError } from "../rpc/error.ts";
|
|
4
4
|
export declare function waitForShellSequence(input: {
|
|
5
|
-
readonly orchestration: Orchestration;
|
|
6
5
|
readonly sequence: number;
|
|
7
6
|
}): Effect.Effect<{
|
|
8
7
|
readonly snapshotSequence: number;
|
|
@@ -24,6 +23,8 @@ export declare function waitForShellSequence(input: {
|
|
|
24
23
|
readonly command: string;
|
|
25
24
|
readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
|
|
26
25
|
readonly runOnWorktreeCreate: boolean;
|
|
26
|
+
readonly previewUrl?: string | undefined;
|
|
27
|
+
readonly autoOpenPreview?: boolean | undefined;
|
|
27
28
|
}[];
|
|
28
29
|
readonly createdAt: string;
|
|
29
30
|
readonly updatedAt: string;
|
|
@@ -84,7 +85,7 @@ export declare function waitForShellSequence(input: {
|
|
|
84
85
|
} | null;
|
|
85
86
|
readonly goal: {
|
|
86
87
|
readonly objective: string;
|
|
87
|
-
readonly status: "active" | "paused" | "budgetLimited" | "complete";
|
|
88
|
+
readonly status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
|
|
88
89
|
readonly tokensUsed: number;
|
|
89
90
|
readonly tokenBudget: number | null;
|
|
90
91
|
readonly timeUsedSeconds: number;
|
|
@@ -97,4 +98,4 @@ export declare function waitForShellSequence(input: {
|
|
|
97
98
|
readonly hasActionableProposedPlan: boolean;
|
|
98
99
|
}[];
|
|
99
100
|
readonly updatedAt: string;
|
|
100
|
-
}, RpcError,
|
|
101
|
+
}, RpcError, T3Orchestration>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as Crypto from "effect/Crypto";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Stream from "effect/Stream";
|
|
4
|
+
import { TerminalLookupError, ThreadLookupError } from "../domain/error.ts";
|
|
5
|
+
import { T3Orchestration } from "../orchestration/service.ts";
|
|
6
|
+
import { RpcError } from "../rpc/error.ts";
|
|
7
|
+
import { T3RpcOperations } from "../rpc/operation.ts";
|
|
8
|
+
import type { CreateTerminalInput, TerminalRef } from "./service.ts";
|
|
9
|
+
export declare const makeTerminalApplication: () => Effect.Effect<{
|
|
10
|
+
attachTerminal: (input: {
|
|
11
|
+
readonly terminal: import("./service.ts").TerminalAttachTarget;
|
|
12
|
+
readonly cols?: number;
|
|
13
|
+
readonly rows?: number;
|
|
14
|
+
}) => Stream.Stream<import("@t3tools/contracts").TerminalAttachStreamEvent, import("./error.ts").ApplicationError>;
|
|
15
|
+
createTerminal: (input: CreateTerminalInput) => Effect.Effect<{
|
|
16
|
+
readonly threadId: string;
|
|
17
|
+
readonly terminalId: string;
|
|
18
|
+
readonly cwd: string;
|
|
19
|
+
readonly worktreePath: string | null;
|
|
20
|
+
readonly status: "error" | "starting" | "running" | "exited";
|
|
21
|
+
readonly pid: number | null;
|
|
22
|
+
readonly history: string;
|
|
23
|
+
readonly exitCode: number | null;
|
|
24
|
+
readonly exitSignal: number | null;
|
|
25
|
+
readonly label: string;
|
|
26
|
+
readonly updatedAt: string;
|
|
27
|
+
readonly sequence?: number | undefined;
|
|
28
|
+
}, import("./error.ts").ApplicationError, never>;
|
|
29
|
+
destroyTerminal: (terminal: TerminalRef) => Effect.Effect<void, RpcError, never>;
|
|
30
|
+
getTerminal: (terminal: TerminalRef) => Effect.Effect<{
|
|
31
|
+
readonly threadId: string;
|
|
32
|
+
readonly terminalId: string;
|
|
33
|
+
readonly cwd: string;
|
|
34
|
+
readonly worktreePath: string | null;
|
|
35
|
+
readonly status: "error" | "starting" | "running" | "exited";
|
|
36
|
+
readonly pid: number | null;
|
|
37
|
+
readonly exitCode: number | null;
|
|
38
|
+
readonly exitSignal: number | null;
|
|
39
|
+
readonly hasRunningSubprocess: boolean;
|
|
40
|
+
readonly label: string;
|
|
41
|
+
readonly updatedAt: string;
|
|
42
|
+
}, ThreadLookupError | TerminalLookupError | RpcError, never>;
|
|
43
|
+
listTerminals: (threadId: string) => Effect.Effect<{
|
|
44
|
+
readonly threadId: string;
|
|
45
|
+
readonly terminalId: string;
|
|
46
|
+
readonly cwd: string;
|
|
47
|
+
readonly worktreePath: string | null;
|
|
48
|
+
readonly status: "error" | "starting" | "running" | "exited";
|
|
49
|
+
readonly pid: number | null;
|
|
50
|
+
readonly exitCode: number | null;
|
|
51
|
+
readonly exitSignal: number | null;
|
|
52
|
+
readonly hasRunningSubprocess: boolean;
|
|
53
|
+
readonly label: string;
|
|
54
|
+
readonly updatedAt: string;
|
|
55
|
+
}[], ThreadLookupError | RpcError, never>;
|
|
56
|
+
resizeTerminal: (input: {
|
|
57
|
+
readonly terminal: TerminalRef;
|
|
58
|
+
readonly cols: number;
|
|
59
|
+
readonly rows: number;
|
|
60
|
+
}) => Effect.Effect<void, RpcError, never>;
|
|
61
|
+
watchTerminalMetadata: () => Stream.Stream<import("@t3tools/contracts").TerminalMetadataStreamEvent, import("./error.ts").ApplicationError>;
|
|
62
|
+
writeTerminal: (input: {
|
|
63
|
+
readonly terminal: TerminalRef;
|
|
64
|
+
readonly data: string;
|
|
65
|
+
}) => Effect.Effect<void, RpcError, never>;
|
|
66
|
+
}, never, T3Orchestration | Crypto.Crypto | T3RpcOperations>;
|