t3code-cli 0.3.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.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/dist/bin.js +412 -87
  3. package/dist/index.js +1 -1
  4. package/dist/{runtime-CMPZpQaG.js → runtime-Cq64iuZr.js} +4768 -2040
  5. package/dist/src/application/layer.d.ts +3 -3
  6. package/dist/src/application/models.d.ts +1 -1
  7. package/dist/src/application/projects.d.ts +1 -1
  8. package/dist/src/application/threads.d.ts +1 -1
  9. package/dist/src/auth/error.d.ts +20 -1
  10. package/dist/src/auth/layer.d.ts +9 -22
  11. package/dist/src/auth/local.d.ts +23 -15
  12. package/dist/src/auth/pairing.d.ts +20 -2
  13. package/dist/src/auth/schema.d.ts +25 -34
  14. package/dist/src/auth/service.d.ts +2 -2
  15. package/dist/src/auth/transport.d.ts +13 -20
  16. package/dist/src/auth/type.d.ts +0 -1
  17. package/dist/src/domain/model-config.d.ts +3 -3
  18. package/dist/src/orchestration/layer.d.ts +3 -3
  19. package/dist/src/rpc/layer.d.ts +6 -6
  20. package/dist/src/rpc/ws-group.d.ts +3 -3
  21. package/dist/src/runtime.d.ts +2 -2
  22. package/dist/src/sql/node-sqlite-client.d.ts +10 -0
  23. package/dist/src/sql/service.d.ts +17 -0
  24. package/dist/upstream-t3code/packages/contracts/src/auth.d.ts +14 -12
  25. package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +167 -7
  26. package/dist/upstream-t3code/packages/contracts/src/index.d.ts +1 -0
  27. package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +24 -0
  28. package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +90 -0
  29. package/dist/upstream-t3code/packages/contracts/src/relay.d.ts +1262 -0
  30. package/dist/upstream-t3code/packages/contracts/src/relayClient.d.ts +48 -0
  31. package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +78 -9
  32. package/dist/upstream-t3code/packages/contracts/src/server.d.ts +3 -3
  33. package/package.json +3 -3
  34. package/src/auth/error.ts +33 -1
  35. package/src/auth/layer.ts +11 -76
  36. package/src/auth/local.ts +342 -208
  37. package/src/auth/pairing.ts +44 -2
  38. package/src/auth/schema.ts +21 -28
  39. package/src/auth/service.ts +2 -2
  40. package/src/auth/transport.ts +59 -22
  41. package/src/auth/type.ts +0 -1
  42. package/src/cli/auth.ts +1 -3
  43. package/src/rpc/layer.ts +2 -2
  44. package/src/runtime.ts +14 -1
  45. package/src/sql/node-sqlite-client.ts +141 -0
  46. package/src/sql/service.ts +21 -0
@@ -765,12 +765,12 @@ export declare const makeT3Application: () => Effect.Effect<{
765
765
  readonly message: string | null;
766
766
  };
767
767
  readonly updateState?: {
768
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
768
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
769
769
  readonly startedAt: string | null;
770
770
  readonly finishedAt: string | null;
771
771
  readonly message: string | null;
772
772
  readonly output: string | null;
773
773
  };
774
774
  }[], import("../rpc/error.ts").RpcError, never>;
775
- }, never, import("../environment/service.ts").Environment | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration | import("effect/Crypto").Crypto>;
776
- export declare const T3ApplicationLive: Layer.Layer<T3Application, never, import("../environment/service.ts").Environment | import("effect/Path").Path | import("../orchestration/service.ts").T3Orchestration | import("effect/Crypto").Crypto>;
775
+ }, never, import("../environment/service.ts").Environment | import("effect/Path").Path | import("effect/Crypto").Crypto | import("../orchestration/service.ts").T3Orchestration>;
776
+ export declare const T3ApplicationLive: Layer.Layer<T3Application, never, import("../environment/service.ts").Environment | import("effect/Path").Path | import("effect/Crypto").Crypto | import("../orchestration/service.ts").T3Orchestration>;
@@ -83,7 +83,7 @@ export declare const makeModelsApplication: () => Effect.Effect<{
83
83
  readonly message: string | null;
84
84
  };
85
85
  readonly updateState?: {
86
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
86
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
87
87
  readonly startedAt: string | null;
88
88
  readonly finishedAt: string | null;
89
89
  readonly message: string | null;
@@ -133,4 +133,4 @@ export declare const makeProjectApplication: () => Effect.Effect<{
133
133
  } | null | undefined;
134
134
  };
135
135
  }, ProjectCreateVisibilityError | import("../rpc/error.ts").RpcError, never>;
136
- }, never, Environment | Path.Path | T3Orchestration | Crypto.Crypto>;
136
+ }, never, Environment | Path.Path | Crypto.Crypto | T3Orchestration>;
@@ -560,4 +560,4 @@ export declare const makeThreadApplication: () => Effect.Effect<{
560
560
  readonly providerInstanceId?: (string & import("effect/Brand").Brand<"ProviderInstanceId">) | undefined;
561
561
  } | null;
562
562
  }, ThreadSessionError | import("../rpc/error.ts").RpcError, never>;
563
- }, never, Environment | Path.Path | T3Orchestration | Crypto.Crypto>;
563
+ }, never, Environment | Path.Path | Crypto.Crypto | T3Orchestration>;
@@ -21,9 +21,28 @@ declare const AuthTransportError_base: Schema.Class<AuthTransportError, Schema.T
21
21
  }>, Cause.YieldableError>;
22
22
  export declare class AuthTransportError extends AuthTransportError_base {
23
23
  }
24
+ declare const AuthLocalSecretError_base: Schema.Class<AuthLocalSecretError, Schema.TaggedStruct<"AuthLocalSecretError", {
25
+ readonly message: Schema.String;
26
+ readonly cause: Schema.optionalKey<Schema.instanceOf<PlatformError, PlatformError>>;
27
+ }>, Cause.YieldableError>;
28
+ export declare class AuthLocalSecretError extends AuthLocalSecretError_base {
29
+ }
30
+ declare const AuthLocalDatabaseError_base: Schema.Class<AuthLocalDatabaseError, Schema.TaggedStruct<"AuthLocalDatabaseError", {
31
+ readonly operation: Schema.Literals<readonly ["connect", "query", "schema"]>;
32
+ readonly message: Schema.String;
33
+ }>, Cause.YieldableError>;
34
+ export declare class AuthLocalDatabaseError extends AuthLocalDatabaseError_base {
35
+ }
36
+ declare const AuthLocalSigningError_base: Schema.Class<AuthLocalSigningError, Schema.TaggedStruct<"AuthLocalSigningError", {
37
+ readonly operation: Schema.Literals<readonly ["sign"]>;
38
+ readonly message: Schema.String;
39
+ readonly cause: Schema.optionalKey<Schema.instanceOf<PlatformError, PlatformError>>;
40
+ }>, Cause.YieldableError>;
41
+ export declare class AuthLocalSigningError extends AuthLocalSigningError_base {
42
+ }
24
43
  declare const AuthLocalError_base: Schema.Class<AuthLocalError, Schema.TaggedStruct<"AuthLocalError", {
25
44
  readonly message: Schema.String;
26
- readonly cause: Schema.optionalKey<Schema.Union<readonly [Schema.instanceOf<PlatformError, unknown>, Schema.instanceOf<Schema.SchemaError, unknown>, typeof UrlError]>>;
45
+ readonly cause: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.instanceOf<PlatformError, unknown>, Schema.instanceOf<Schema.SchemaError, unknown>, typeof UrlError]>, typeof AuthLocalSecretError, typeof AuthLocalDatabaseError, typeof AuthLocalSigningError]>>;
27
46
  }>, Cause.YieldableError>;
28
47
  export declare class AuthLocalError extends AuthLocalError_base {
29
48
  }
@@ -1,36 +1,23 @@
1
1
  import * as Effect from "effect/Effect";
2
- import * as FileSystem from "effect/FileSystem";
3
2
  import * as Layer from "effect/Layer";
4
- import * as Path from "effect/Path";
5
- import * as Scope from "effect/Scope";
6
- import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
7
3
  import { T3Config } from "../config/service.ts";
8
- import { Environment } from "../environment/service.ts";
9
4
  import { AuthConfigError } from "./error.ts";
5
+ import { T3LocalAuth } from "./local.ts";
6
+ import { T3AuthPairing } from "./pairing.ts";
10
7
  import { T3Auth } from "./service.ts";
11
- import type { LocalAuthInput } from "./type.ts";
8
+ import { T3AuthTransport } from "./transport.ts";
12
9
  export declare const makeT3Auth: () => Effect.Effect<{
13
- pair: (pairingUrl: string) => Effect.Effect<{
14
- url: string;
15
- role: "client" | "owner";
16
- expiresAt: string;
17
- }, import("./error.ts").AuthPairingUrlError | AuthConfigError | import("./error.ts").AuthTransportError, never>;
18
- local: (input: LocalAuthInput) => Effect.Effect<{
19
- url: string;
20
- role: "client" | "owner";
21
- expiresAt: string;
22
- source: "local";
23
- baseDir: string;
24
- }, AuthConfigError | import("./error.ts").AuthLocalError, never>;
10
+ pair: (pairingUrl: string) => Effect.Effect<import("./type.ts").PairResult, AuthConfigError | import("./error.ts").AuthPairingUrlError | import("./error.ts").AuthTransportError>;
11
+ local: (input: import("./type.ts").LocalAuthInput) => Effect.Effect<import("./type.ts").LocalAuthResult, AuthConfigError | import("./error.ts").AuthLocalError>;
25
12
  status: () => Effect.Effect<{
26
13
  readonly authenticated: boolean;
27
14
  readonly role?: "client" | "owner";
28
15
  readonly sessionMethod?: string;
29
16
  readonly expiresAt?: string;
30
17
  }, AuthConfigError | import("./error.ts").AuthTransportError, never>;
31
- issueWebSocketToken: () => Effect.Effect<{
32
- readonly token: string;
18
+ issueWebSocketTicket: () => Effect.Effect<{
19
+ readonly ticket: string;
33
20
  readonly expiresAt: string;
34
21
  }, AuthConfigError | import("./error.ts").AuthTransportError, never>;
35
- }, never, Environment | T3Config | Path.Path | ChildProcessSpawner | Scope.Scope | FileSystem.FileSystem | import("effect/unstable/http/HttpClient").HttpClient>;
36
- export declare const T3AuthLive: Layer.Layer<T3Auth, never, Environment | T3Config | Path.Path | ChildProcessSpawner | FileSystem.FileSystem | import("effect/unstable/http/HttpClient").HttpClient>;
22
+ }, never, T3Config | T3LocalAuth | T3AuthTransport | T3AuthPairing>;
23
+ export declare const T3AuthLive: Layer.Layer<T3Auth, never, T3Config | T3LocalAuth | T3AuthTransport | T3AuthPairing>;
@@ -1,19 +1,27 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Crypto from "effect/Crypto";
1
3
  import * as Effect from "effect/Effect";
2
4
  import * as FileSystem from "effect/FileSystem";
5
+ import * as Layer from "effect/Layer";
3
6
  import * as Path from "effect/Path";
4
- import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
7
+ import { T3Config } from "../config/service.ts";
5
8
  import { Environment } from "../environment/service.ts";
6
- import { AuthLocalError } from "./error.ts";
7
- import type { LocalAuthInput } from "./type.ts";
8
- export declare const issueLocalSession: (input: Pick<LocalAuthInput, "label" | "subject" | "role" | "baseDir" | "t3Command">) => Effect.Effect<{
9
- readonly baseDir: string;
10
- readonly session: {
11
- readonly token: string;
12
- readonly role: "client" | "owner";
13
- readonly expiresAt: string;
14
- };
15
- }, AuthLocalError, Environment | Path.Path | ChildProcessSpawner | import("effect/Scope").Scope | FileSystem.FileSystem>;
16
- export declare const resolveLocalOrigin: (input: {
17
- readonly baseDir: string;
18
- readonly origin?: string;
19
- }) => Effect.Effect<string, AuthLocalError, Path.Path | FileSystem.FileSystem>;
9
+ import { SqlClientFactory } from "../sql/service.ts";
10
+ import { AuthConfigError, AuthLocalError } from "./error.ts";
11
+ import type { LocalAuthInput, LocalAuthResult } from "./type.ts";
12
+ declare const T3LocalAuth_base: Context.ServiceClass<T3LocalAuth, "t3cli/T3LocalAuth", {
13
+ readonly local: (input: LocalAuthInput) => Effect.Effect<LocalAuthResult, AuthConfigError | AuthLocalError>;
14
+ }>;
15
+ export declare class T3LocalAuth extends T3LocalAuth_base {
16
+ }
17
+ export declare const makeT3LocalAuth: () => Effect.Effect<{
18
+ local: (input: LocalAuthInput) => Effect.Effect<{
19
+ url: string;
20
+ role: "client" | "owner";
21
+ expiresAt: string;
22
+ source: "local";
23
+ baseDir: string;
24
+ }, AuthConfigError | AuthLocalError, never>;
25
+ }, never, Environment | T3Config | SqlClientFactory | Path.Path | FileSystem.FileSystem | Crypto.Crypto>;
26
+ export declare const T3LocalAuthLive: Layer.Layer<T3LocalAuth, never, Environment | T3Config | SqlClientFactory | Path.Path | FileSystem.FileSystem | Crypto.Crypto>;
27
+ export {};
@@ -1,4 +1,22 @@
1
+ import * as Context from "effect/Context";
1
2
  import * as Effect from "effect/Effect";
2
- import { AuthPairingUrlError } from "./error.ts";
3
- import type { PairingUrl } from "./type.ts";
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>;
4
21
  export declare function parsePairingUrl(value: string): Effect.Effect<PairingUrl, AuthPairingUrlError>;
22
+ export {};
@@ -1,12 +1,19 @@
1
1
  import * as Schema from "effect/Schema";
2
- export declare const AuthBearerBootstrapResultSchema: Schema.Struct<{
3
- readonly authenticated: Schema.Literal<true>;
4
- readonly role: Schema.Literals<readonly ["owner", "client"]>;
5
- readonly sessionMethod: Schema.Literal<"bearer-session-token">;
6
- readonly expiresAt: Schema.String;
7
- readonly sessionToken: Schema.String;
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
8
  }>;
9
- export type AuthBearerBootstrapResult = typeof AuthBearerBootstrapResultSchema.Type;
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
+ };
10
17
  export declare const AuthSessionStateSchema: Schema.Struct<{
11
18
  readonly authenticated: Schema.Boolean;
12
19
  readonly role: Schema.optionalKey<Schema.Literals<readonly ["owner", "client"]>>;
@@ -14,28 +21,22 @@ export declare const AuthSessionStateSchema: Schema.Struct<{
14
21
  readonly expiresAt: Schema.optionalKey<Schema.String>;
15
22
  }>;
16
23
  export type AuthSessionState = typeof AuthSessionStateSchema.Type;
17
- export declare const AuthWebSocketTokenResultSchema: Schema.Struct<{
18
- readonly token: Schema.String;
24
+ export declare const AuthWebSocketTicketResultSchema: Schema.Struct<{
25
+ readonly ticket: Schema.String;
19
26
  readonly expiresAt: Schema.String;
20
27
  }>;
21
- export type AuthWebSocketTokenResult = typeof AuthWebSocketTokenResultSchema.Type;
22
- export declare const AuthLocalSessionIssueResultSchema: Schema.Struct<{
23
- readonly token: Schema.String;
24
- readonly role: Schema.Literals<readonly ["owner", "client"]>;
25
- readonly expiresAt: Schema.String;
26
- }>;
27
- export type AuthLocalSessionIssueResult = typeof AuthLocalSessionIssueResultSchema.Type;
28
+ export type AuthWebSocketTicketResult = typeof AuthWebSocketTicketResultSchema.Type;
28
29
  export declare const AuthLocalRuntimeStateSchema: Schema.Struct<{
29
30
  readonly version: Schema.Literal<1>;
30
31
  readonly origin: Schema.String;
31
32
  }>;
32
33
  export type AuthLocalRuntimeState = typeof AuthLocalRuntimeStateSchema.Type;
33
- export declare const decodeAuthBearerBootstrapResult: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
34
- readonly authenticated: true;
35
- readonly role: "client" | "owner";
36
- readonly sessionMethod: "bearer-session-token";
37
- readonly expiresAt: string;
38
- readonly sessionToken: string;
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;
39
40
  }, Schema.SchemaError, never>;
40
41
  export declare const decodeAuthSessionState: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
41
42
  readonly authenticated: boolean;
@@ -43,24 +44,14 @@ export declare const decodeAuthSessionState: (input: unknown, options?: import("
43
44
  readonly sessionMethod?: string;
44
45
  readonly expiresAt?: string;
45
46
  }, Schema.SchemaError, never>;
46
- export declare const decodeAuthWebSocketTokenResult: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
47
- readonly token: string;
48
- readonly expiresAt: string;
49
- }, Schema.SchemaError, never>;
50
- export declare const decodeAuthLocalSessionIssueResult: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
51
- readonly token: string;
52
- readonly role: "client" | "owner";
47
+ export declare const decodeAuthWebSocketTicketResult: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
48
+ readonly ticket: string;
53
49
  readonly expiresAt: string;
54
50
  }, Schema.SchemaError, never>;
55
51
  export declare const decodeAuthLocalRuntimeState: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
56
52
  readonly version: 1;
57
53
  readonly origin: string;
58
54
  }, Schema.SchemaError, never>;
59
- export declare const decodeAuthLocalSessionIssueResultFromJson: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
60
- readonly token: string;
61
- readonly role: "client" | "owner";
62
- readonly expiresAt: string;
63
- }, Schema.SchemaError, never>;
64
55
  export declare const decodeAuthLocalRuntimeStateFromJson: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
65
56
  readonly version: 1;
66
57
  readonly origin: string;
@@ -1,13 +1,13 @@
1
1
  import * as Context from "effect/Context";
2
2
  import type * as Effect from "effect/Effect";
3
- import type { AuthSessionState, AuthWebSocketTokenResult } from "./schema.ts";
3
+ import type { AuthSessionState, AuthWebSocketTicketResult } from "./schema.ts";
4
4
  import type { AuthError } from "./error.ts";
5
5
  import type { LocalAuthInput, LocalAuthResult, PairResult } from "./type.ts";
6
6
  declare const T3Auth_base: Context.ServiceClass<T3Auth, "t3cli/T3Auth", {
7
7
  readonly pair: (value: string) => Effect.Effect<PairResult, AuthError>;
8
8
  readonly local: (input: LocalAuthInput) => Effect.Effect<LocalAuthResult, AuthError>;
9
9
  readonly status: () => Effect.Effect<AuthSessionState, AuthError>;
10
- readonly issueWebSocketToken: () => Effect.Effect<AuthWebSocketTokenResult, AuthError>;
10
+ readonly issueWebSocketTicket: () => Effect.Effect<AuthWebSocketTicketResult, AuthError>;
11
11
  }>;
12
12
  export declare class T3Auth extends T3Auth_base {
13
13
  }
@@ -1,26 +1,19 @@
1
+ import * as Context from "effect/Context";
1
2
  import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
2
4
  import { HttpClient } from "effect/unstable/http";
3
5
  import type { ResolvedConfig } from "../config/service.ts";
4
6
  import { AuthTransportError } from "./error.ts";
5
- export declare const makeAuthTransport: () => Effect.Effect<{
6
- bootstrapBearer: (input: {
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: {
7
10
  readonly baseUrl: string;
8
11
  readonly credential: string;
9
- }) => Effect.Effect<{
10
- readonly authenticated: true;
11
- readonly role: "client" | "owner";
12
- readonly sessionMethod: "bearer-session-token";
13
- readonly expiresAt: string;
14
- readonly sessionToken: string;
15
- }, AuthTransportError, never>;
16
- getSession: (config: ResolvedConfig) => Effect.Effect<{
17
- readonly authenticated: boolean;
18
- readonly role?: "client" | "owner";
19
- readonly sessionMethod?: string;
20
- readonly expiresAt?: string;
21
- }, AuthTransportError, never>;
22
- issueWebSocketToken: (config: ResolvedConfig) => Effect.Effect<{
23
- readonly token: string;
24
- readonly expiresAt: string;
25
- }, AuthTransportError, never>;
26
- }, never, HttpClient.HttpClient>;
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 {};
@@ -11,7 +11,6 @@ export type PairResult = {
11
11
  };
12
12
  export type LocalAuthInput = {
13
13
  readonly baseDir?: string;
14
- readonly t3Command?: string;
15
14
  readonly origin?: string;
16
15
  readonly role: AuthSessionRole;
17
16
  readonly label: string;
@@ -79,7 +79,7 @@ export declare function firstSelectableProvider(providers: ReadonlyArray<ServerP
79
79
  readonly message: string | null;
80
80
  };
81
81
  readonly updateState?: {
82
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
82
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
83
83
  readonly startedAt: string | null;
84
84
  readonly finishedAt: string | null;
85
85
  readonly message: string | null;
@@ -194,7 +194,7 @@ export declare function findSelectableProvider(providers: ReadonlyArray<ServerPr
194
194
  readonly message: string | null;
195
195
  };
196
196
  readonly updateState?: {
197
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
197
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
198
198
  readonly startedAt: string | null;
199
199
  readonly finishedAt: string | null;
200
200
  readonly message: string | null;
@@ -284,7 +284,7 @@ export declare function filterProvidersForModelListing(input: {
284
284
  readonly message: string | null;
285
285
  };
286
286
  readonly updateState?: {
287
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
287
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
288
288
  readonly startedAt: string | null;
289
289
  readonly finishedAt: string | null;
290
290
  readonly message: string | null;
@@ -214,7 +214,7 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
214
214
  readonly auth: {
215
215
  readonly policy: "desktop-managed-local" | "loopback-browser" | "remote-reachable" | "unsafe-no-auth";
216
216
  readonly bootstrapMethods: readonly ("desktop-bootstrap" | "one-time-token")[];
217
- readonly sessionMethods: readonly ("browser-session-cookie" | "bearer-access-token")[];
217
+ readonly sessionMethods: readonly ("browser-session-cookie" | "bearer-access-token" | "dpop-access-token")[];
218
218
  readonly sessionCookieName: string;
219
219
  };
220
220
  readonly cwd: string;
@@ -332,7 +332,7 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
332
332
  readonly message: string | null;
333
333
  };
334
334
  readonly updateState?: {
335
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
335
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
336
336
  readonly startedAt: string | null;
337
337
  readonly finishedAt: string | null;
338
338
  readonly message: string | null;
@@ -490,7 +490,7 @@ export declare const makeT3Orchestration: () => Effect.Effect<{
490
490
  readonly message: string | null;
491
491
  };
492
492
  readonly updateState?: {
493
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
493
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
494
494
  readonly startedAt: string | null;
495
495
  readonly finishedAt: string | null;
496
496
  readonly message: string | null;
@@ -2055,7 +2055,7 @@ export declare const makeT3RpcLayer: () => Effect.Effect<{
2055
2055
  readonly auth: {
2056
2056
  readonly policy: "desktop-managed-local" | "loopback-browser" | "remote-reachable" | "unsafe-no-auth";
2057
2057
  readonly bootstrapMethods: readonly ("desktop-bootstrap" | "one-time-token")[];
2058
- readonly sessionMethods: readonly ("browser-session-cookie" | "bearer-access-token")[];
2058
+ readonly sessionMethods: readonly ("browser-session-cookie" | "bearer-access-token" | "dpop-access-token")[];
2059
2059
  readonly sessionCookieName: string;
2060
2060
  };
2061
2061
  readonly cwd: string;
@@ -2173,7 +2173,7 @@ export declare const makeT3RpcLayer: () => Effect.Effect<{
2173
2173
  readonly message: string | null;
2174
2174
  };
2175
2175
  readonly updateState?: {
2176
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
2176
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
2177
2177
  readonly startedAt: string | null;
2178
2178
  readonly finishedAt: string | null;
2179
2179
  readonly message: string | null;
@@ -2331,7 +2331,7 @@ export declare const makeT3RpcLayer: () => Effect.Effect<{
2331
2331
  readonly message: string | null;
2332
2332
  };
2333
2333
  readonly updateState?: {
2334
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
2334
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
2335
2335
  readonly startedAt: string | null;
2336
2336
  readonly finishedAt: string | null;
2337
2337
  readonly message: string | null;
@@ -4389,7 +4389,7 @@ export declare const makeT3RpcLayer: () => Effect.Effect<{
4389
4389
  readonly auth: {
4390
4390
  readonly policy: "desktop-managed-local" | "loopback-browser" | "remote-reachable" | "unsafe-no-auth";
4391
4391
  readonly bootstrapMethods: readonly ("desktop-bootstrap" | "one-time-token")[];
4392
- readonly sessionMethods: readonly ("browser-session-cookie" | "bearer-access-token")[];
4392
+ readonly sessionMethods: readonly ("browser-session-cookie" | "bearer-access-token" | "dpop-access-token")[];
4393
4393
  readonly sessionCookieName: string;
4394
4394
  };
4395
4395
  readonly cwd: string;
@@ -4507,7 +4507,7 @@ export declare const makeT3RpcLayer: () => Effect.Effect<{
4507
4507
  readonly message: string | null;
4508
4508
  };
4509
4509
  readonly updateState?: {
4510
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
4510
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
4511
4511
  readonly startedAt: string | null;
4512
4512
  readonly finishedAt: string | null;
4513
4513
  readonly message: string | null;
@@ -4665,7 +4665,7 @@ export declare const makeT3RpcLayer: () => Effect.Effect<{
4665
4665
  readonly message: string | null;
4666
4666
  };
4667
4667
  readonly updateState?: {
4668
- readonly status: "idle" | "running" | "queued" | "succeeded" | "failed" | "unchanged";
4668
+ readonly status: "idle" | "running" | "failed" | "queued" | "succeeded" | "unchanged";
4669
4669
  readonly startedAt: string | null;
4670
4670
  readonly finishedAt: string | null;
4671
4671
  readonly message: string | null;
@@ -106,7 +106,7 @@ export declare const CliServerConfig: Schema.Union<readonly [Schema.Struct<{
106
106
  readonly auth: Schema.Struct<{
107
107
  readonly policy: Schema.Literals<readonly ["desktop-managed-local", "loopback-browser", "remote-reachable", "unsafe-no-auth"]>;
108
108
  readonly bootstrapMethods: Schema.$Array<Schema.Literals<readonly ["desktop-bootstrap", "one-time-token"]>>;
109
- readonly sessionMethods: Schema.$Array<Schema.Literals<readonly ["browser-session-cookie", "bearer-access-token"]>>;
109
+ readonly sessionMethods: Schema.$Array<Schema.Literals<readonly ["browser-session-cookie", "bearer-access-token", "dpop-access-token"]>>;
110
110
  readonly sessionCookieName: Schema.decodeTo<Schema.String, Schema.String, never, never>;
111
111
  }>;
112
112
  readonly cwd: Schema.decodeTo<Schema.String, Schema.String, never, never>;
@@ -413,7 +413,7 @@ export declare const WsServerGetConfigRpc: Rpc.Rpc<"server.getConfig", Schema.St
413
413
  readonly auth: Schema.Struct<{
414
414
  readonly policy: Schema.Literals<readonly ["desktop-managed-local", "loopback-browser", "remote-reachable", "unsafe-no-auth"]>;
415
415
  readonly bootstrapMethods: Schema.$Array<Schema.Literals<readonly ["desktop-bootstrap", "one-time-token"]>>;
416
- readonly sessionMethods: Schema.$Array<Schema.Literals<readonly ["browser-session-cookie", "bearer-access-token"]>>;
416
+ readonly sessionMethods: Schema.$Array<Schema.Literals<readonly ["browser-session-cookie", "bearer-access-token", "dpop-access-token"]>>;
417
417
  readonly sessionCookieName: Schema.decodeTo<Schema.String, Schema.String, never, never>;
418
418
  }>;
419
419
  readonly cwd: Schema.decodeTo<Schema.String, Schema.String, never, never>;
@@ -1945,7 +1945,7 @@ export declare const CliWsRpcGroup: RpcGroup.RpcGroup<Rpc.Rpc<"orchestration.dis
1945
1945
  readonly auth: Schema.Struct<{
1946
1946
  readonly policy: Schema.Literals<readonly ["desktop-managed-local", "loopback-browser", "remote-reachable", "unsafe-no-auth"]>;
1947
1947
  readonly bootstrapMethods: Schema.$Array<Schema.Literals<readonly ["desktop-bootstrap", "one-time-token"]>>;
1948
- readonly sessionMethods: Schema.$Array<Schema.Literals<readonly ["browser-session-cookie", "bearer-access-token"]>>;
1948
+ readonly sessionMethods: Schema.$Array<Schema.Literals<readonly ["browser-session-cookie", "bearer-access-token", "dpop-access-token"]>>;
1949
1949
  readonly sessionCookieName: Schema.decodeTo<Schema.String, Schema.String, never, never>;
1950
1950
  }>;
1951
1951
  readonly cwd: Schema.decodeTo<Schema.String, Schema.String, never, never>;
@@ -1,3 +1,3 @@
1
1
  import * as Layer from "effect/Layer";
2
- export declare const AuthAppLayer: Layer.Layer<import("./config/service.ts").T3Config | import("./auth/service.ts").T3Auth, never, import("./environment/service.ts").Environment | import("effect/Path").Path | import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/FileSystem").FileSystem>;
3
- export declare const AppLayer: Layer.Layer<import("./index.ts").T3Application | import("./config/service.ts").T3Config | import("./auth/service.ts").T3Auth | import("./orchestration/service.ts").T3Orchestration | import("./rpc/service.ts").T3Rpc, never, import("./environment/service.ts").Environment | import("effect/Path").Path | import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/FileSystem").FileSystem | import("effect/Crypto").Crypto>;
2
+ export declare const AuthAppLayer: Layer.Layer<import("./config/service.ts").T3Config | import("./auth/service.ts").T3Auth, never, import("./environment/service.ts").Environment | import("effect/Path").Path | import("effect/FileSystem").FileSystem | import("effect/Crypto").Crypto>;
3
+ export declare const AppLayer: Layer.Layer<import("./index.ts").T3Application | import("./config/service.ts").T3Config | import("./auth/service.ts").T3Auth | import("./orchestration/service.ts").T3Orchestration | import("./rpc/service.ts").T3Rpc, never, import("./environment/service.ts").Environment | import("effect/Path").Path | import("effect/FileSystem").FileSystem | import("effect/Crypto").Crypto>;
@@ -0,0 +1,10 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Layer from "effect/Layer";
3
+ import * as Scope from "effect/Scope";
4
+ import * as Reactivity from "effect/unstable/reactivity/Reactivity";
5
+ import * as SqlClient from "effect/unstable/sql/SqlClient";
6
+ import { SqlError } from "effect/unstable/sql/SqlError";
7
+ import { SqlClientFactory, type SqliteClientConfig } from "./service.ts";
8
+ export declare const makeNodeSqliteClient: (config: SqliteClientConfig) => Effect.Effect<SqlClient.SqlClient, SqlError, Scope.Scope | Reactivity.Reactivity>;
9
+ export declare const NodeSqliteClientLive: (config: SqliteClientConfig) => Layer.Layer<SqlClient.SqlClient, SqlError, never>;
10
+ export declare const NodeSqlClientFactoryLive: Layer.Layer<SqlClientFactory, never, never>;
@@ -0,0 +1,17 @@
1
+ import type * as Effect from "effect/Effect";
2
+ import * as Context from "effect/Context";
3
+ import type * as Scope from "effect/Scope";
4
+ import type * as SqlClient from "effect/unstable/sql/SqlClient";
5
+ import type { SqlError } from "effect/unstable/sql/SqlError";
6
+ export type SqliteClientConfig = {
7
+ readonly filename: string;
8
+ readonly transformResultNames?: ((str: string) => string) | undefined;
9
+ readonly transformQueryNames?: ((str: string) => string) | undefined;
10
+ };
11
+ export type SqlClientFactoryShape = {
12
+ readonly sqliteClient: (config: SqliteClientConfig) => Effect.Effect<SqlClient.SqlClient, SqlError, Scope.Scope>;
13
+ };
14
+ declare const SqlClientFactory_base: Context.ServiceClass<SqlClientFactory, "t3cli/SqlClientFactory", SqlClientFactoryShape>;
15
+ export declare class SqlClientFactory extends SqlClientFactory_base {
16
+ }
17
+ export {};