t3code-cli 0.2.0 → 0.4.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 +1 -1
- package/dist/bin.js +412 -87
- package/dist/index.js +1 -1
- package/dist/{runtime-CMPZpQaG.js → runtime-Cq64iuZr.js} +4768 -2040
- package/dist/src/application/error.d.ts +3 -0
- package/dist/src/application/layer.d.ts +776 -0
- package/dist/src/application/model-selection.d.ts +19 -0
- package/dist/src/application/models.d.ts +93 -0
- package/dist/src/application/project-commands.d.ts +15 -0
- package/dist/src/application/projects.d.ts +136 -0
- package/dist/src/application/service.d.ts +72 -0
- package/dist/src/application/shell-sequence.d.ts +91 -0
- package/dist/src/application/thread-commands.d.ts +84 -0
- package/dist/src/application/thread-wait.d.ts +104 -0
- package/dist/src/application/threads.d.ts +563 -0
- package/dist/src/auth/error.d.ts +50 -0
- package/dist/src/auth/layer.d.ts +23 -0
- package/dist/src/auth/local.d.ts +27 -0
- package/dist/src/auth/pairing.d.ts +22 -0
- package/dist/src/auth/schema.d.ts +58 -0
- package/dist/src/auth/service.d.ts +14 -0
- package/dist/src/auth/transport.d.ts +19 -0
- package/dist/src/auth/type.d.ts +25 -0
- package/dist/src/config/error.d.ts +18 -0
- package/dist/src/config/layer.d.ts +20 -0
- package/dist/src/config/service.d.ts +20 -0
- package/dist/src/config/url.d.ts +6 -0
- package/dist/src/domain/error.d.ts +31 -0
- package/dist/src/domain/helpers.d.ts +38 -0
- package/dist/src/domain/model-config.d.ts +293 -0
- package/dist/src/domain/thread-lifecycle.d.ts +114 -0
- package/dist/src/environment/layer.d.ts +3 -0
- package/dist/src/environment/service.d.ts +12 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/orchestration/layer.d.ts +2128 -0
- package/dist/src/orchestration/service.d.ts +27 -0
- package/dist/src/rpc/error.d.ts +15 -0
- package/dist/src/rpc/layer.d.ts +4678 -0
- package/dist/src/rpc/service.d.ts +15 -0
- package/dist/src/rpc/ws-group.d.ts +2238 -0
- package/dist/src/runtime.d.ts +3 -0
- package/dist/src/sql/node-sqlite-client.d.ts +10 -0
- package/dist/src/sql/service.d.ts +17 -0
- package/dist/upstream-t3code/packages/contracts/src/auth.d.ts +441 -0
- package/dist/upstream-t3code/packages/contracts/src/baseSchemas.d.ts +38 -0
- package/dist/upstream-t3code/packages/contracts/src/desktopBootstrap.d.ts +14 -0
- package/dist/upstream-t3code/packages/contracts/src/editor.d.ts +124 -0
- package/dist/upstream-t3code/packages/contracts/src/environment.d.ts +64 -0
- package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +762 -0
- package/dist/upstream-t3code/packages/contracts/src/filesystem.d.ts +26 -0
- package/dist/upstream-t3code/packages/contracts/src/git.d.ts +500 -0
- package/dist/upstream-t3code/packages/contracts/src/index.d.ts +25 -0
- package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +490 -0
- package/dist/upstream-t3code/packages/contracts/src/keybindings.d.ts +133 -0
- package/dist/upstream-t3code/packages/contracts/src/model.d.ts +112 -0
- package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +6682 -0
- package/dist/upstream-t3code/packages/contracts/src/project.d.ts +45 -0
- package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +116 -0
- package/dist/upstream-t3code/packages/contracts/src/providerInstance.d.ts +99 -0
- package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +4276 -0
- package/dist/upstream-t3code/packages/contracts/src/relay.d.ts +1262 -0
- package/dist/upstream-t3code/packages/contracts/src/relayClient.d.ts +48 -0
- package/dist/upstream-t3code/packages/contracts/src/remoteAccess.d.ts +45 -0
- package/dist/upstream-t3code/packages/contracts/src/review.d.ts +37 -0
- package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +8218 -0
- package/dist/upstream-t3code/packages/contracts/src/server.d.ts +2291 -0
- package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +271 -0
- package/dist/upstream-t3code/packages/contracts/src/sourceControl.d.ts +177 -0
- package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +330 -0
- package/dist/upstream-t3code/packages/contracts/src/vcs.d.ts +148 -0
- package/package.json +15 -7
- package/src/application/model-selection.ts +2 -2
- package/src/application/project-commands.ts +1 -1
- package/src/application/service.ts +1 -1
- package/src/application/shell-sequence.ts +1 -1
- package/src/application/thread-commands.ts +1 -1
- package/src/application/thread-wait.ts +1 -1
- package/src/auth/error.ts +33 -1
- package/src/auth/layer.ts +11 -76
- package/src/auth/local.ts +342 -208
- package/src/auth/pairing.ts +44 -2
- package/src/auth/schema.ts +21 -28
- package/src/auth/service.ts +2 -2
- package/src/auth/transport.ts +59 -22
- package/src/auth/type.ts +0 -1
- package/src/cli/auth.ts +1 -3
- package/src/cli/model-format.ts +1 -1
- package/src/cli/project-format.ts +1 -1
- package/src/cli/thread-format.ts +1 -1
- package/src/domain/helpers.ts +1 -1
- package/src/domain/model-config.ts +1 -1
- package/src/domain/thread-lifecycle.ts +1 -1
- package/src/index.ts +3 -3
- package/src/orchestration/layer.ts +1 -1
- package/src/orchestration/service.ts +1 -1
- package/src/rpc/error.ts +1 -1
- package/src/rpc/layer.ts +2 -2
- package/src/rpc/ws-group.ts +1 -1
- package/src/runtime.ts +14 -1
- package/src/sql/node-sqlite-client.ts +141 -0
- package/src/sql/service.ts +21 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
import { T3Config } from "../config/service.ts";
|
|
5
|
+
import { AuthConfigError, AuthPairingUrlError, AuthTransportError } from "./error.ts";
|
|
6
|
+
import { T3AuthTransport } from "./transport.ts";
|
|
7
|
+
import type { PairingUrl, PairResult } from "./type.ts";
|
|
8
|
+
declare const T3AuthPairing_base: Context.ServiceClass<T3AuthPairing, "t3cli/T3AuthPairing", {
|
|
9
|
+
readonly pair: (pairingUrl: string) => Effect.Effect<PairResult, AuthConfigError | AuthPairingUrlError | AuthTransportError>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare class T3AuthPairing extends T3AuthPairing_base {
|
|
12
|
+
}
|
|
13
|
+
export declare const makeT3AuthPairing: () => Effect.Effect<{
|
|
14
|
+
pair: (pairingUrl: string) => Effect.Effect<{
|
|
15
|
+
url: string;
|
|
16
|
+
role: "client" | "owner";
|
|
17
|
+
expiresAt: string;
|
|
18
|
+
}, AuthPairingUrlError | AuthConfigError | AuthTransportError, never>;
|
|
19
|
+
}, never, T3Config | T3AuthTransport>;
|
|
20
|
+
export declare const T3AuthPairingLive: Layer.Layer<T3AuthPairing, never, T3Config | T3AuthTransport>;
|
|
21
|
+
export declare function parsePairingUrl(value: string): Effect.Effect<PairingUrl, AuthPairingUrlError>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
export declare const AuthAccessTokenResultSchema: Schema.Struct<{
|
|
3
|
+
readonly access_token: Schema.String;
|
|
4
|
+
readonly issued_token_type: Schema.String;
|
|
5
|
+
readonly token_type: Schema.Literal<"Bearer">;
|
|
6
|
+
readonly expires_in: Schema.Number;
|
|
7
|
+
readonly scope: Schema.String;
|
|
8
|
+
}>;
|
|
9
|
+
export type AuthAccessTokenResult = typeof AuthAccessTokenResultSchema.Type;
|
|
10
|
+
export type AuthBearerBootstrapResult = {
|
|
11
|
+
readonly authenticated: true;
|
|
12
|
+
readonly role: "owner" | "client";
|
|
13
|
+
readonly sessionMethod: "bearer-access-token";
|
|
14
|
+
readonly expiresAt: string;
|
|
15
|
+
readonly sessionToken: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const AuthSessionStateSchema: Schema.Struct<{
|
|
18
|
+
readonly authenticated: Schema.Boolean;
|
|
19
|
+
readonly role: Schema.optionalKey<Schema.Literals<readonly ["owner", "client"]>>;
|
|
20
|
+
readonly sessionMethod: Schema.optionalKey<Schema.String>;
|
|
21
|
+
readonly expiresAt: Schema.optionalKey<Schema.String>;
|
|
22
|
+
}>;
|
|
23
|
+
export type AuthSessionState = typeof AuthSessionStateSchema.Type;
|
|
24
|
+
export declare const AuthWebSocketTicketResultSchema: Schema.Struct<{
|
|
25
|
+
readonly ticket: Schema.String;
|
|
26
|
+
readonly expiresAt: Schema.String;
|
|
27
|
+
}>;
|
|
28
|
+
export type AuthWebSocketTicketResult = typeof AuthWebSocketTicketResultSchema.Type;
|
|
29
|
+
export declare const AuthLocalRuntimeStateSchema: Schema.Struct<{
|
|
30
|
+
readonly version: Schema.Literal<1>;
|
|
31
|
+
readonly origin: Schema.String;
|
|
32
|
+
}>;
|
|
33
|
+
export type AuthLocalRuntimeState = typeof AuthLocalRuntimeStateSchema.Type;
|
|
34
|
+
export declare const decodeAuthAccessTokenResult: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
|
35
|
+
readonly access_token: string;
|
|
36
|
+
readonly issued_token_type: string;
|
|
37
|
+
readonly token_type: "Bearer";
|
|
38
|
+
readonly expires_in: number;
|
|
39
|
+
readonly scope: string;
|
|
40
|
+
}, Schema.SchemaError, never>;
|
|
41
|
+
export declare const decodeAuthSessionState: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
|
42
|
+
readonly authenticated: boolean;
|
|
43
|
+
readonly role?: "client" | "owner";
|
|
44
|
+
readonly sessionMethod?: string;
|
|
45
|
+
readonly expiresAt?: string;
|
|
46
|
+
}, Schema.SchemaError, never>;
|
|
47
|
+
export declare const decodeAuthWebSocketTicketResult: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
|
48
|
+
readonly ticket: string;
|
|
49
|
+
readonly expiresAt: string;
|
|
50
|
+
}, Schema.SchemaError, never>;
|
|
51
|
+
export declare const decodeAuthLocalRuntimeState: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
|
52
|
+
readonly version: 1;
|
|
53
|
+
readonly origin: string;
|
|
54
|
+
}, Schema.SchemaError, never>;
|
|
55
|
+
export declare const decodeAuthLocalRuntimeStateFromJson: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
|
|
56
|
+
readonly version: 1;
|
|
57
|
+
readonly origin: string;
|
|
58
|
+
}, Schema.SchemaError, never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import type { AuthSessionState, AuthWebSocketTicketResult } from "./schema.ts";
|
|
4
|
+
import type { AuthError } from "./error.ts";
|
|
5
|
+
import type { LocalAuthInput, LocalAuthResult, PairResult } from "./type.ts";
|
|
6
|
+
declare const T3Auth_base: Context.ServiceClass<T3Auth, "t3cli/T3Auth", {
|
|
7
|
+
readonly pair: (value: string) => Effect.Effect<PairResult, AuthError>;
|
|
8
|
+
readonly local: (input: LocalAuthInput) => Effect.Effect<LocalAuthResult, AuthError>;
|
|
9
|
+
readonly status: () => Effect.Effect<AuthSessionState, AuthError>;
|
|
10
|
+
readonly issueWebSocketTicket: () => Effect.Effect<AuthWebSocketTicketResult, AuthError>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare class T3Auth extends T3Auth_base {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
import { HttpClient } from "effect/unstable/http";
|
|
5
|
+
import type { ResolvedConfig } from "../config/service.ts";
|
|
6
|
+
import { AuthTransportError } from "./error.ts";
|
|
7
|
+
import { type AuthBearerBootstrapResult, type AuthSessionState, type AuthWebSocketTicketResult } from "./schema.ts";
|
|
8
|
+
declare const T3AuthTransport_base: Context.ServiceClass<T3AuthTransport, "t3cli/T3AuthTransport", {
|
|
9
|
+
readonly bootstrapBearer: (input: {
|
|
10
|
+
readonly baseUrl: string;
|
|
11
|
+
readonly credential: string;
|
|
12
|
+
}) => Effect.Effect<AuthBearerBootstrapResult, AuthTransportError>;
|
|
13
|
+
readonly getSession: (config: ResolvedConfig) => Effect.Effect<AuthSessionState, AuthTransportError>;
|
|
14
|
+
readonly issueWebSocketTicket: (config: ResolvedConfig) => Effect.Effect<AuthWebSocketTicketResult, AuthTransportError>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare class T3AuthTransport extends T3AuthTransport_base {
|
|
17
|
+
}
|
|
18
|
+
export declare const T3AuthTransportLive: Layer.Layer<T3AuthTransport, never, HttpClient.HttpClient>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AuthBearerBootstrapResult } from "./schema.ts";
|
|
2
|
+
export type AuthSessionRole = AuthBearerBootstrapResult["role"];
|
|
3
|
+
export type PairingUrl = {
|
|
4
|
+
readonly baseUrl: string;
|
|
5
|
+
readonly credential: string;
|
|
6
|
+
};
|
|
7
|
+
export type PairResult = {
|
|
8
|
+
readonly url: string;
|
|
9
|
+
readonly role: AuthBearerBootstrapResult["role"];
|
|
10
|
+
readonly expiresAt: string;
|
|
11
|
+
};
|
|
12
|
+
export type LocalAuthInput = {
|
|
13
|
+
readonly baseDir?: string;
|
|
14
|
+
readonly origin?: string;
|
|
15
|
+
readonly role: AuthSessionRole;
|
|
16
|
+
readonly label: string;
|
|
17
|
+
readonly subject: string;
|
|
18
|
+
};
|
|
19
|
+
export type LocalAuthResult = {
|
|
20
|
+
readonly url: string;
|
|
21
|
+
readonly role: AuthSessionRole;
|
|
22
|
+
readonly expiresAt: string;
|
|
23
|
+
readonly source: "local";
|
|
24
|
+
readonly baseDir: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as Cause from "effect/Cause";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import { PlatformError } from "effect/PlatformError";
|
|
4
|
+
declare const UrlError_base: Schema.Class<UrlError, Schema.TaggedStruct<"UrlError", {
|
|
5
|
+
readonly message: Schema.String;
|
|
6
|
+
readonly protocol: Schema.optionalKey<Schema.String>;
|
|
7
|
+
readonly cause: Schema.optionalKey<Schema.instanceOf<Cause.IllegalArgumentError, Cause.IllegalArgumentError>>;
|
|
8
|
+
}>, Cause.YieldableError>;
|
|
9
|
+
export declare class UrlError extends UrlError_base {
|
|
10
|
+
}
|
|
11
|
+
declare const ConfigError_base: Schema.Class<ConfigError, Schema.TaggedStruct<"ConfigError", {
|
|
12
|
+
readonly message: Schema.String;
|
|
13
|
+
readonly cause: Schema.optionalKey<Schema.Union<readonly [Schema.instanceOf<PlatformError, unknown>, Schema.instanceOf<Schema.SchemaError, unknown>]>>;
|
|
14
|
+
}>, Cause.YieldableError>;
|
|
15
|
+
export declare class ConfigError extends ConfigError_base {
|
|
16
|
+
}
|
|
17
|
+
export type ConfigServiceError = ConfigError | UrlError;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as FileSystem from "effect/FileSystem";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
import * as Path from "effect/Path";
|
|
5
|
+
import { Environment } from "../environment/service.ts";
|
|
6
|
+
import { ConfigError } from "./error.ts";
|
|
7
|
+
import { T3Config, type StoredConfig } from "./service.ts";
|
|
8
|
+
export declare const makeT3Config: () => Effect.Effect<{
|
|
9
|
+
readStored: () => Effect.Effect<{
|
|
10
|
+
readonly url?: string;
|
|
11
|
+
readonly token?: string;
|
|
12
|
+
}, ConfigError, never>;
|
|
13
|
+
writeStored: (config: StoredConfig) => Effect.Effect<void, ConfigError, never>;
|
|
14
|
+
resolve: () => Effect.Effect<{
|
|
15
|
+
url: string;
|
|
16
|
+
token: string;
|
|
17
|
+
source: "config" | "env";
|
|
18
|
+
}, import("./error.ts").UrlError | ConfigError, never>;
|
|
19
|
+
}, never, Environment | Path.Path | FileSystem.FileSystem>;
|
|
20
|
+
export declare const T3ConfigLive: Layer.Layer<T3Config, never, Environment | Path.Path | FileSystem.FileSystem>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import type { ConfigError, ConfigServiceError } from "./error.ts";
|
|
4
|
+
export type StoredConfig = {
|
|
5
|
+
readonly url?: string;
|
|
6
|
+
readonly token?: string;
|
|
7
|
+
};
|
|
8
|
+
export type ResolvedConfig = {
|
|
9
|
+
readonly url: string;
|
|
10
|
+
readonly token: string;
|
|
11
|
+
readonly source: "env" | "config";
|
|
12
|
+
};
|
|
13
|
+
declare const T3Config_base: Context.ServiceClass<T3Config, "t3cli/T3Config", {
|
|
14
|
+
readonly readStored: () => Effect.Effect<StoredConfig, ConfigError>;
|
|
15
|
+
readonly writeStored: (config: StoredConfig) => Effect.Effect<void, ConfigError>;
|
|
16
|
+
readonly resolve: () => Effect.Effect<ResolvedConfig, ConfigServiceError>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare class T3Config extends T3Config_base {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { UrlError } from "./error.ts";
|
|
3
|
+
export declare function normalizeHttpBaseUrl(value: string): Effect.Effect<string, UrlError, never>;
|
|
4
|
+
export declare function toWebSocketBaseUrl(httpBaseUrl: string): Effect.Effect<string, UrlError, never>;
|
|
5
|
+
export declare function toHttpEndpointUrl(httpBaseUrl: string, pathname: string): Effect.Effect<string, UrlError, never>;
|
|
6
|
+
export declare function toWebSocketEndpointUrl(httpBaseUrl: string, pathname: string): Effect.Effect<string, UrlError, never>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
declare const ProjectLookupError_base: Schema.Class<ProjectLookupError, Schema.TaggedStruct<"ProjectLookupError", {
|
|
3
|
+
readonly message: Schema.String;
|
|
4
|
+
readonly ref: Schema.String;
|
|
5
|
+
}>, import("effect/Cause").YieldableError>;
|
|
6
|
+
export declare class ProjectLookupError extends ProjectLookupError_base {
|
|
7
|
+
}
|
|
8
|
+
declare const ModelSelectionError_base: Schema.Class<ModelSelectionError, Schema.TaggedStruct<"ModelSelectionError", {
|
|
9
|
+
readonly message: Schema.String;
|
|
10
|
+
}>, import("effect/Cause").YieldableError>;
|
|
11
|
+
export declare class ModelSelectionError extends ModelSelectionError_base {
|
|
12
|
+
}
|
|
13
|
+
declare const ThreadEventError_base: Schema.Class<ThreadEventError, Schema.TaggedStruct<"ThreadEventError", {
|
|
14
|
+
readonly message: Schema.String;
|
|
15
|
+
}>, import("effect/Cause").YieldableError>;
|
|
16
|
+
export declare class ThreadEventError extends ThreadEventError_base {
|
|
17
|
+
}
|
|
18
|
+
declare const ThreadSessionError_base: Schema.Class<ThreadSessionError, Schema.TaggedStruct<"ThreadSessionError", {
|
|
19
|
+
readonly message: Schema.String;
|
|
20
|
+
readonly threadId: Schema.String;
|
|
21
|
+
}>, import("effect/Cause").YieldableError>;
|
|
22
|
+
export declare class ThreadSessionError extends ThreadSessionError_base {
|
|
23
|
+
}
|
|
24
|
+
declare const ProjectCreateVisibilityError_base: Schema.Class<ProjectCreateVisibilityError, Schema.TaggedStruct<"ProjectCreateVisibilityError", {
|
|
25
|
+
readonly message: Schema.String;
|
|
26
|
+
readonly projectId: Schema.String;
|
|
27
|
+
}>, import("effect/Cause").YieldableError>;
|
|
28
|
+
export declare class ProjectCreateVisibilityError extends ProjectCreateVisibilityError_base {
|
|
29
|
+
}
|
|
30
|
+
export type DomainError = ProjectLookupError | ModelSelectionError | ThreadEventError | ThreadSessionError | ProjectCreateVisibilityError;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type * as Path from "effect/Path";
|
|
2
|
+
import type { OrchestrationProjectShell, OrchestrationShellSnapshot } from "#t3tools/contracts";
|
|
3
|
+
export declare function resolveProject(snapshot: OrchestrationShellSnapshot, ref: string, path: Path.Path, cwd: string): {
|
|
4
|
+
readonly id: string & import("effect/Brand").Brand<"ProjectId">;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
readonly workspaceRoot: string;
|
|
7
|
+
readonly defaultModelSelection: {
|
|
8
|
+
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
9
|
+
readonly model: string;
|
|
10
|
+
readonly options?: readonly {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly value: string | boolean;
|
|
13
|
+
}[];
|
|
14
|
+
} | null;
|
|
15
|
+
readonly scripts: readonly {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly command: string;
|
|
19
|
+
readonly icon: "play" | "test" | "lint" | "configure" | "build" | "debug";
|
|
20
|
+
readonly runOnWorktreeCreate: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
readonly createdAt: string;
|
|
23
|
+
readonly updatedAt: string;
|
|
24
|
+
readonly repositoryIdentity?: {
|
|
25
|
+
readonly canonicalKey: string;
|
|
26
|
+
readonly locator: {
|
|
27
|
+
readonly source: "git-remote";
|
|
28
|
+
readonly remoteName: string;
|
|
29
|
+
readonly remoteUrl: string;
|
|
30
|
+
};
|
|
31
|
+
readonly rootPath?: string;
|
|
32
|
+
readonly displayName?: string;
|
|
33
|
+
readonly provider?: string;
|
|
34
|
+
readonly owner?: string;
|
|
35
|
+
readonly name?: string;
|
|
36
|
+
} | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
export declare function findProjectById(snapshot: OrchestrationShellSnapshot, projectId: string): OrchestrationProjectShell | null;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import type { ServerProvider } from "#t3tools/contracts";
|
|
2
|
+
export declare function isSelectableProvider(provider: ServerProvider): boolean;
|
|
3
|
+
export declare function firstSelectableProvider(providers: ReadonlyArray<ServerProvider>): {
|
|
4
|
+
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
5
|
+
readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
|
|
6
|
+
readonly enabled: boolean;
|
|
7
|
+
readonly installed: boolean;
|
|
8
|
+
readonly version: string | null;
|
|
9
|
+
readonly status: "error" | "ready" | "warning" | "disabled";
|
|
10
|
+
readonly auth: {
|
|
11
|
+
readonly status: "authenticated" | "unknown" | "unauthenticated";
|
|
12
|
+
readonly type?: string | undefined;
|
|
13
|
+
readonly label?: string | undefined;
|
|
14
|
+
readonly email?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
readonly checkedAt: string;
|
|
17
|
+
readonly models: readonly {
|
|
18
|
+
readonly slug: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly isCustom: boolean;
|
|
21
|
+
readonly capabilities: {
|
|
22
|
+
readonly optionDescriptors?: readonly ({
|
|
23
|
+
readonly type: "select";
|
|
24
|
+
readonly options: readonly {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly label: string;
|
|
27
|
+
readonly description?: string | undefined;
|
|
28
|
+
readonly isDefault?: boolean | undefined;
|
|
29
|
+
}[];
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly label: string;
|
|
32
|
+
readonly currentValue?: string | undefined;
|
|
33
|
+
readonly promptInjectedValues?: readonly string[] | undefined;
|
|
34
|
+
readonly description?: string | undefined;
|
|
35
|
+
} | {
|
|
36
|
+
readonly type: "boolean";
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly label: string;
|
|
39
|
+
readonly currentValue?: boolean | undefined;
|
|
40
|
+
readonly description?: string | undefined;
|
|
41
|
+
})[] | undefined;
|
|
42
|
+
} | null;
|
|
43
|
+
readonly shortName?: string | undefined;
|
|
44
|
+
readonly subProvider?: string | undefined;
|
|
45
|
+
}[];
|
|
46
|
+
readonly slashCommands: readonly {
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly description?: string | undefined;
|
|
49
|
+
readonly input?: {
|
|
50
|
+
readonly hint: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
}[];
|
|
53
|
+
readonly skills: readonly {
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly path: string;
|
|
56
|
+
readonly enabled: boolean;
|
|
57
|
+
readonly description?: string | undefined;
|
|
58
|
+
readonly scope?: string | undefined;
|
|
59
|
+
readonly displayName?: string | undefined;
|
|
60
|
+
readonly shortDescription?: string | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
readonly displayName?: string | undefined;
|
|
63
|
+
readonly accentColor?: string | undefined;
|
|
64
|
+
readonly badgeLabel?: string | undefined;
|
|
65
|
+
readonly continuation?: {
|
|
66
|
+
readonly groupKey: string;
|
|
67
|
+
} | undefined;
|
|
68
|
+
readonly showInteractionModeToggle?: boolean | undefined;
|
|
69
|
+
readonly message?: string | undefined;
|
|
70
|
+
readonly availability?: "available" | "unavailable" | undefined;
|
|
71
|
+
readonly unavailableReason?: string | undefined;
|
|
72
|
+
readonly versionAdvisory?: {
|
|
73
|
+
readonly status: "unknown" | "current" | "behind_latest";
|
|
74
|
+
readonly currentVersion: string | null;
|
|
75
|
+
readonly latestVersion: string | null;
|
|
76
|
+
readonly updateCommand: string | null;
|
|
77
|
+
readonly canUpdate: boolean;
|
|
78
|
+
readonly checkedAt: string | null;
|
|
79
|
+
readonly message: string | null;
|
|
80
|
+
};
|
|
81
|
+
readonly updateState?: {
|
|
82
|
+
readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
|
|
83
|
+
readonly startedAt: string | null;
|
|
84
|
+
readonly finishedAt: string | null;
|
|
85
|
+
readonly message: string | null;
|
|
86
|
+
readonly output: string | null;
|
|
87
|
+
};
|
|
88
|
+
} | undefined;
|
|
89
|
+
export declare function firstSelectableModel(provider: ServerProvider): {
|
|
90
|
+
readonly slug: string;
|
|
91
|
+
readonly name: string;
|
|
92
|
+
readonly isCustom: boolean;
|
|
93
|
+
readonly capabilities: {
|
|
94
|
+
readonly optionDescriptors?: readonly ({
|
|
95
|
+
readonly type: "select";
|
|
96
|
+
readonly options: readonly {
|
|
97
|
+
readonly id: string;
|
|
98
|
+
readonly label: string;
|
|
99
|
+
readonly description?: string | undefined;
|
|
100
|
+
readonly isDefault?: boolean | undefined;
|
|
101
|
+
}[];
|
|
102
|
+
readonly id: string;
|
|
103
|
+
readonly label: string;
|
|
104
|
+
readonly currentValue?: string | undefined;
|
|
105
|
+
readonly promptInjectedValues?: readonly string[] | undefined;
|
|
106
|
+
readonly description?: string | undefined;
|
|
107
|
+
} | {
|
|
108
|
+
readonly type: "boolean";
|
|
109
|
+
readonly id: string;
|
|
110
|
+
readonly label: string;
|
|
111
|
+
readonly currentValue?: boolean | undefined;
|
|
112
|
+
readonly description?: string | undefined;
|
|
113
|
+
})[] | undefined;
|
|
114
|
+
} | null;
|
|
115
|
+
readonly shortName?: string | undefined;
|
|
116
|
+
readonly subProvider?: string | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
export declare function findSelectableProvider(providers: ReadonlyArray<ServerProvider>, instanceId: string): {
|
|
119
|
+
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
120
|
+
readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
|
|
121
|
+
readonly enabled: boolean;
|
|
122
|
+
readonly installed: boolean;
|
|
123
|
+
readonly version: string | null;
|
|
124
|
+
readonly status: "error" | "ready" | "warning" | "disabled";
|
|
125
|
+
readonly auth: {
|
|
126
|
+
readonly status: "authenticated" | "unknown" | "unauthenticated";
|
|
127
|
+
readonly type?: string | undefined;
|
|
128
|
+
readonly label?: string | undefined;
|
|
129
|
+
readonly email?: string | undefined;
|
|
130
|
+
};
|
|
131
|
+
readonly checkedAt: string;
|
|
132
|
+
readonly models: readonly {
|
|
133
|
+
readonly slug: string;
|
|
134
|
+
readonly name: string;
|
|
135
|
+
readonly isCustom: boolean;
|
|
136
|
+
readonly capabilities: {
|
|
137
|
+
readonly optionDescriptors?: readonly ({
|
|
138
|
+
readonly type: "select";
|
|
139
|
+
readonly options: readonly {
|
|
140
|
+
readonly id: string;
|
|
141
|
+
readonly label: string;
|
|
142
|
+
readonly description?: string | undefined;
|
|
143
|
+
readonly isDefault?: boolean | undefined;
|
|
144
|
+
}[];
|
|
145
|
+
readonly id: string;
|
|
146
|
+
readonly label: string;
|
|
147
|
+
readonly currentValue?: string | undefined;
|
|
148
|
+
readonly promptInjectedValues?: readonly string[] | undefined;
|
|
149
|
+
readonly description?: string | undefined;
|
|
150
|
+
} | {
|
|
151
|
+
readonly type: "boolean";
|
|
152
|
+
readonly id: string;
|
|
153
|
+
readonly label: string;
|
|
154
|
+
readonly currentValue?: boolean | undefined;
|
|
155
|
+
readonly description?: string | undefined;
|
|
156
|
+
})[] | undefined;
|
|
157
|
+
} | null;
|
|
158
|
+
readonly shortName?: string | undefined;
|
|
159
|
+
readonly subProvider?: string | undefined;
|
|
160
|
+
}[];
|
|
161
|
+
readonly slashCommands: readonly {
|
|
162
|
+
readonly name: string;
|
|
163
|
+
readonly description?: string | undefined;
|
|
164
|
+
readonly input?: {
|
|
165
|
+
readonly hint: string;
|
|
166
|
+
} | undefined;
|
|
167
|
+
}[];
|
|
168
|
+
readonly skills: readonly {
|
|
169
|
+
readonly name: string;
|
|
170
|
+
readonly path: string;
|
|
171
|
+
readonly enabled: boolean;
|
|
172
|
+
readonly description?: string | undefined;
|
|
173
|
+
readonly scope?: string | undefined;
|
|
174
|
+
readonly displayName?: string | undefined;
|
|
175
|
+
readonly shortDescription?: string | undefined;
|
|
176
|
+
}[];
|
|
177
|
+
readonly displayName?: string | undefined;
|
|
178
|
+
readonly accentColor?: string | undefined;
|
|
179
|
+
readonly badgeLabel?: string | undefined;
|
|
180
|
+
readonly continuation?: {
|
|
181
|
+
readonly groupKey: string;
|
|
182
|
+
} | undefined;
|
|
183
|
+
readonly showInteractionModeToggle?: boolean | undefined;
|
|
184
|
+
readonly message?: string | undefined;
|
|
185
|
+
readonly availability?: "available" | "unavailable" | undefined;
|
|
186
|
+
readonly unavailableReason?: string | undefined;
|
|
187
|
+
readonly versionAdvisory?: {
|
|
188
|
+
readonly status: "unknown" | "current" | "behind_latest";
|
|
189
|
+
readonly currentVersion: string | null;
|
|
190
|
+
readonly latestVersion: string | null;
|
|
191
|
+
readonly updateCommand: string | null;
|
|
192
|
+
readonly canUpdate: boolean;
|
|
193
|
+
readonly checkedAt: string | null;
|
|
194
|
+
readonly message: string | null;
|
|
195
|
+
};
|
|
196
|
+
readonly updateState?: {
|
|
197
|
+
readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
|
|
198
|
+
readonly startedAt: string | null;
|
|
199
|
+
readonly finishedAt: string | null;
|
|
200
|
+
readonly message: string | null;
|
|
201
|
+
readonly output: string | null;
|
|
202
|
+
};
|
|
203
|
+
} | undefined;
|
|
204
|
+
export declare function filterProvidersForModelListing(input: {
|
|
205
|
+
readonly providers: ReadonlyArray<ServerProvider>;
|
|
206
|
+
readonly all: boolean;
|
|
207
|
+
readonly provider?: string;
|
|
208
|
+
}): {
|
|
209
|
+
readonly instanceId: string & import("effect/Brand").Brand<"ProviderInstanceId">;
|
|
210
|
+
readonly driver: string & import("effect/Brand").Brand<"ProviderDriverKind">;
|
|
211
|
+
readonly enabled: boolean;
|
|
212
|
+
readonly installed: boolean;
|
|
213
|
+
readonly version: string | null;
|
|
214
|
+
readonly status: "error" | "ready" | "warning" | "disabled";
|
|
215
|
+
readonly auth: {
|
|
216
|
+
readonly status: "authenticated" | "unknown" | "unauthenticated";
|
|
217
|
+
readonly type?: string | undefined;
|
|
218
|
+
readonly label?: string | undefined;
|
|
219
|
+
readonly email?: string | undefined;
|
|
220
|
+
};
|
|
221
|
+
readonly checkedAt: string;
|
|
222
|
+
readonly models: readonly {
|
|
223
|
+
readonly slug: string;
|
|
224
|
+
readonly name: string;
|
|
225
|
+
readonly isCustom: boolean;
|
|
226
|
+
readonly capabilities: {
|
|
227
|
+
readonly optionDescriptors?: readonly ({
|
|
228
|
+
readonly type: "select";
|
|
229
|
+
readonly options: readonly {
|
|
230
|
+
readonly id: string;
|
|
231
|
+
readonly label: string;
|
|
232
|
+
readonly description?: string | undefined;
|
|
233
|
+
readonly isDefault?: boolean | undefined;
|
|
234
|
+
}[];
|
|
235
|
+
readonly id: string;
|
|
236
|
+
readonly label: string;
|
|
237
|
+
readonly currentValue?: string | undefined;
|
|
238
|
+
readonly promptInjectedValues?: readonly string[] | undefined;
|
|
239
|
+
readonly description?: string | undefined;
|
|
240
|
+
} | {
|
|
241
|
+
readonly type: "boolean";
|
|
242
|
+
readonly id: string;
|
|
243
|
+
readonly label: string;
|
|
244
|
+
readonly currentValue?: boolean | undefined;
|
|
245
|
+
readonly description?: string | undefined;
|
|
246
|
+
})[] | undefined;
|
|
247
|
+
} | null;
|
|
248
|
+
readonly shortName?: string | undefined;
|
|
249
|
+
readonly subProvider?: string | undefined;
|
|
250
|
+
}[];
|
|
251
|
+
readonly slashCommands: readonly {
|
|
252
|
+
readonly name: string;
|
|
253
|
+
readonly description?: string | undefined;
|
|
254
|
+
readonly input?: {
|
|
255
|
+
readonly hint: string;
|
|
256
|
+
} | undefined;
|
|
257
|
+
}[];
|
|
258
|
+
readonly skills: readonly {
|
|
259
|
+
readonly name: string;
|
|
260
|
+
readonly path: string;
|
|
261
|
+
readonly enabled: boolean;
|
|
262
|
+
readonly description?: string | undefined;
|
|
263
|
+
readonly scope?: string | undefined;
|
|
264
|
+
readonly displayName?: string | undefined;
|
|
265
|
+
readonly shortDescription?: string | undefined;
|
|
266
|
+
}[];
|
|
267
|
+
readonly displayName?: string | undefined;
|
|
268
|
+
readonly accentColor?: string | undefined;
|
|
269
|
+
readonly badgeLabel?: string | undefined;
|
|
270
|
+
readonly continuation?: {
|
|
271
|
+
readonly groupKey: string;
|
|
272
|
+
} | undefined;
|
|
273
|
+
readonly showInteractionModeToggle?: boolean | undefined;
|
|
274
|
+
readonly message?: string | undefined;
|
|
275
|
+
readonly availability?: "available" | "unavailable" | undefined;
|
|
276
|
+
readonly unavailableReason?: string | undefined;
|
|
277
|
+
readonly versionAdvisory?: {
|
|
278
|
+
readonly status: "unknown" | "current" | "behind_latest";
|
|
279
|
+
readonly currentVersion: string | null;
|
|
280
|
+
readonly latestVersion: string | null;
|
|
281
|
+
readonly updateCommand: string | null;
|
|
282
|
+
readonly canUpdate: boolean;
|
|
283
|
+
readonly checkedAt: string | null;
|
|
284
|
+
readonly message: string | null;
|
|
285
|
+
};
|
|
286
|
+
readonly updateState?: {
|
|
287
|
+
readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
|
|
288
|
+
readonly startedAt: string | null;
|
|
289
|
+
readonly finishedAt: string | null;
|
|
290
|
+
readonly message: string | null;
|
|
291
|
+
readonly output: string | null;
|
|
292
|
+
};
|
|
293
|
+
}[];
|