t3code-cli 0.13.0 → 0.14.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 +87 -1
- package/dist/application.d.ts +2 -0
- package/dist/application.js +1 -1
- package/dist/auth.d.ts +50 -0
- package/dist/auth.js +1 -1
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +348 -603
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +1 -1
- package/dist/client-runtime/authorization.d.ts +2 -0
- package/dist/client-runtime/authorization.js +2 -0
- package/dist/client-runtime/connection.d.ts +2 -0
- package/dist/client-runtime/connection.js +2 -0
- package/dist/client-runtime/environment.d.ts +57 -0
- package/dist/client-runtime/environment.js +2 -0
- package/dist/client-runtime/errors.d.ts +28 -0
- package/dist/client-runtime/errors.js +35 -0
- package/dist/client-runtime/operations/projects.d.ts +2 -0
- package/dist/client-runtime/operations/projects.js +2 -0
- package/dist/client-runtime/operations.d.ts +2 -0
- package/dist/client-runtime/operations.js +2 -0
- package/dist/client-runtime/platform.d.ts +26 -0
- package/dist/client-runtime/platform.js +74 -0
- package/dist/client-runtime/relay.d.ts +121 -0
- package/dist/client-runtime/relay.js +245 -0
- package/dist/client-runtime/rpc.d.ts +2 -0
- package/dist/client-runtime/rpc.js +2 -0
- package/dist/client-runtime/state/assets.d.ts +40 -0
- package/dist/client-runtime/state/assets.js +53 -0
- package/dist/client-runtime/state/auth.d.ts +98 -0
- package/dist/client-runtime/state/auth.js +48 -0
- package/dist/client-runtime/state/connections.d.ts +2 -0
- package/dist/client-runtime/state/connections.js +52 -0
- package/dist/client-runtime/state/entities.d.ts +33 -0
- package/dist/client-runtime/state/entities.js +2 -0
- package/dist/client-runtime/state/filesystem.d.ts +42 -0
- package/dist/client-runtime/state/filesystem.js +48 -0
- package/dist/client-runtime/state/git.d.ts +43 -0
- package/dist/client-runtime/state/git.js +18 -0
- package/dist/client-runtime/state/models.d.ts +2 -0
- package/dist/client-runtime/state/models.js +2 -0
- package/dist/client-runtime/state/orchestration.d.ts +128 -0
- package/dist/client-runtime/state/orchestration.js +20 -0
- package/dist/client-runtime/state/presentation.d.ts +277 -0
- package/dist/client-runtime/state/presentation.js +34 -0
- package/dist/client-runtime/state/preview.d.ts +447 -0
- package/dist/client-runtime/state/preview.js +103 -0
- package/dist/client-runtime/state/project-grouping.d.ts +26 -0
- package/dist/client-runtime/state/project-grouping.js +73 -0
- package/dist/client-runtime/state/projects.d.ts +192 -0
- package/dist/client-runtime/state/projects.js +2 -0
- package/dist/client-runtime/state/relay.d.ts +10 -0
- package/dist/client-runtime/state/relay.js +19 -0
- package/dist/client-runtime/state/review.d.ts +28 -0
- package/dist/client-runtime/state/review.js +11 -0
- package/dist/client-runtime/state/runtime.d.ts +2 -0
- package/dist/client-runtime/state/runtime.js +2 -0
- package/dist/client-runtime/state/server.d.ts +1495 -0
- package/dist/client-runtime/state/server.js +207 -0
- package/dist/client-runtime/state/session.d.ts +532 -0
- package/dist/client-runtime/state/session.js +21 -0
- package/dist/client-runtime/state/shell.d.ts +529 -0
- package/dist/client-runtime/state/shell.js +2 -0
- package/dist/client-runtime/state/source-control.d.ts +92 -0
- package/dist/client-runtime/state/source-control.js +36 -0
- package/dist/client-runtime/state/terminal.d.ts +237 -0
- package/dist/client-runtime/state/terminal.js +173 -0
- package/dist/client-runtime/state/thread-settled.d.ts +104 -0
- package/dist/client-runtime/state/thread-settled.js +157 -0
- package/dist/client-runtime/state/thread-sort.d.ts +23 -0
- package/dist/client-runtime/state/thread-sort.js +47 -0
- package/dist/client-runtime/state/threads.d.ts +538 -0
- package/dist/client-runtime/state/threads.js +934 -0
- package/dist/client-runtime/state/vcs.d.ts +442 -0
- package/dist/client-runtime/state/vcs.js +756 -0
- package/dist/config.d.ts +84 -0
- package/dist/config.js +1 -1
- package/dist/connection.d.ts +7 -0
- package/dist/connection.js +1 -1
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/node.d.ts +6 -0
- package/dist/node.js +1 -1
- package/dist/orchestration.d.ts +1420 -0
- package/dist/orchestration.js +1 -1
- package/dist/preview.d.ts +2 -0
- package/dist/preview.js +2 -0
- package/dist/rpc.d.ts +6043 -0
- package/dist/rpc.js +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +2 -2
- package/dist/shared/DrainableWorker.d.ts +28 -0
- package/dist/shared/DrainableWorker.js +24 -0
- package/dist/shared/KeyedCoalescingWorker.d.ts +13 -0
- package/dist/shared/KeyedCoalescingWorker.js +89 -0
- package/dist/shared/Net.d.ts +43 -0
- package/dist/shared/Net.js +126 -0
- package/dist/shared/String.d.ts +4 -0
- package/dist/shared/String.js +8 -0
- package/dist/shared/Struct.d.ts +5 -0
- package/dist/shared/Struct.js +2 -0
- package/dist/shared/advertisedEndpoint.d.ts +2 -0
- package/dist/shared/advertisedEndpoint.js +2 -0
- package/dist/shared/agentAwareness.d.ts +27 -0
- package/dist/shared/agentAwareness.js +54 -0
- package/dist/shared/backgroundActivitySettings.d.ts +23 -0
- package/dist/shared/backgroundActivitySettings.js +2 -0
- package/dist/shared/chatList.d.ts +12 -0
- package/dist/shared/chatList.js +14 -0
- package/dist/shared/cliArgs.d.ts +33 -0
- package/dist/shared/cliArgs.js +103 -0
- package/dist/shared/composerInlineTokens.d.ts +20 -0
- package/dist/shared/composerInlineTokens.js +72 -0
- package/dist/shared/composerTrigger.d.ts +26 -0
- package/dist/shared/composerTrigger.js +97 -0
- package/dist/shared/connectAuth.d.ts +58 -0
- package/dist/shared/connectAuth.js +89 -0
- package/dist/shared/devHome.d.ts +21 -0
- package/dist/shared/devHome.js +65 -0
- package/dist/shared/devProxy.d.ts +15 -0
- package/dist/shared/devProxy.js +22 -0
- package/dist/shared/dpop.d.ts +32 -0
- package/dist/shared/dpop.js +2724 -0
- package/dist/shared/dpopCommon.d.ts +2 -0
- package/dist/shared/dpopCommon.js +2 -0
- package/dist/shared/filePreview.d.ts +8 -0
- package/dist/shared/filePreview.js +31 -0
- package/dist/shared/git.d.ts +41 -0
- package/dist/shared/git.js +2 -0
- package/dist/shared/hostProcess.d.ts +13 -0
- package/dist/shared/hostProcess.js +2 -0
- package/dist/shared/httpObservability.d.ts +5 -0
- package/dist/shared/httpObservability.js +2 -0
- package/dist/shared/httpReadiness.d.ts +38 -0
- package/dist/shared/httpReadiness.js +110 -0
- package/dist/shared/keybindings.d.ts +35 -0
- package/dist/shared/keybindings.js +330 -0
- package/dist/shared/logging.d.ts +39 -0
- package/dist/shared/logging.js +2 -0
- package/dist/shared/model.d.ts +44 -0
- package/dist/shared/model.js +2 -0
- package/dist/shared/oauthScope.d.ts +23 -0
- package/dist/shared/oauthScope.js +2 -0
- package/dist/shared/observability.d.ts +105 -0
- package/dist/shared/observability.js +346 -0
- package/dist/shared/orchestrationTiming.d.ts +16 -0
- package/dist/shared/orchestrationTiming.js +32 -0
- package/dist/shared/path.d.ts +2 -0
- package/dist/shared/path.js +2 -0
- package/dist/shared/preview.d.ts +35 -0
- package/dist/shared/preview.js +103 -0
- package/dist/shared/previewViewport.d.ts +16 -0
- package/dist/shared/previewViewport.js +159 -0
- package/dist/shared/projectFavicon.d.ts +5 -0
- package/dist/shared/projectFavicon.js +13 -0
- package/dist/shared/projectScripts.d.ts +19 -0
- package/dist/shared/projectScripts.js +18 -0
- package/dist/shared/qrCode.d.ts +87 -0
- package/dist/shared/qrCode.js +870 -0
- package/dist/shared/relayAuth.d.ts +27 -0
- package/dist/shared/relayAuth.js +83 -0
- package/dist/shared/relayClient.d.ts +58 -0
- package/dist/shared/relayClient.js +245 -0
- package/dist/shared/relayJwt.d.ts +39 -0
- package/dist/shared/relayJwt.js +2 -0
- package/dist/shared/relaySigning.d.ts +4 -0
- package/dist/shared/relaySigning.js +2 -0
- package/dist/shared/relayTracing.d.ts +25 -0
- package/dist/shared/relayTracing.js +2 -0
- package/dist/shared/relayUrl.d.ts +5 -0
- package/dist/shared/relayUrl.js +2 -0
- package/dist/shared/remote.d.ts +57 -0
- package/dist/shared/remote.js +2 -0
- package/dist/shared/schemaJson.d.ts +35 -0
- package/dist/shared/schemaJson.js +2 -0
- package/dist/shared/schemaYaml.d.ts +86 -0
- package/dist/shared/schemaYaml.js +99 -0
- package/dist/shared/searchRanking.d.ts +30 -0
- package/dist/shared/searchRanking.js +99 -0
- package/dist/shared/semver.d.ts +23 -0
- package/dist/shared/semver.js +124 -0
- package/dist/shared/serverSettings.d.ts +19 -0
- package/dist/shared/serverSettings.js +103 -0
- package/dist/shared/shell.d.ts +51 -0
- package/dist/shared/shell.js +408 -0
- package/dist/shared/sourceControl.d.ts +26 -0
- package/dist/shared/sourceControl.js +2 -0
- package/dist/shared/t3ProjectFile.d.ts +27 -0
- package/dist/shared/t3ProjectFile.js +25 -0
- package/dist/shared/terminalLabels.d.ts +16 -0
- package/dist/shared/terminalLabels.js +28 -0
- package/dist/shared/toolActivity.d.ts +16 -0
- package/dist/shared/toolActivity.js +159 -0
- package/dist/shared.d.ts +43036 -0
- package/dist/shared.js +25428 -12277
- package/dist/t3tools.d.ts +2 -0
- package/dist/t3tools.js +1 -1
- package/package.json +39 -21
- package/src/auth/index.ts +2 -0
- package/src/auth/pairing.ts +8 -5
- package/src/auth/service.ts +2 -1
- package/src/auth/transport.ts +4 -0
- package/src/auth/type.ts +6 -0
- package/src/cli/auth.ts +7 -1
- package/src/contracts/index.ts +8 -0
- package/src/orchestration/layer.ts +36 -0
- package/src/orchestration/service.ts +5 -0
- package/src/preview/index.ts +11 -0
- package/src/preview/service.ts +52 -0
- package/src/rpc/error.ts +2 -0
- package/src/rpc/layer.ts +5 -4
- package/src/rpc/operation.ts +5 -4
- package/src/rpc/ws-group.ts +6 -0
- package/src/runtime/index.ts +1 -0
- package/src/runtime/layer.ts +5 -0
- package/src/sql/node-sqlite-client.ts +3 -0
- package/dist/src/application/actions.d.ts +0 -25
- package/dist/src/application/error.d.ts +0 -3
- package/dist/src/application/index.d.ts +0 -4
- package/dist/src/application/layer.d.ts +0 -117
- package/dist/src/application/model-selection.d.ts +0 -34
- package/dist/src/application/models.d.ts +0 -8
- package/dist/src/application/project-commands.d.ts +0 -44
- package/dist/src/application/projects.d.ts +0 -23
- package/dist/src/application/service.d.ts +0 -243
- package/dist/src/application/shell-sequence.d.ts +0 -96
- package/dist/src/application/terminals.d.ts +0 -66
- package/dist/src/application/thread-commands.d.ts +0 -157
- package/dist/src/application/thread-update.d.ts +0 -8
- package/dist/src/application/thread-wait.d.ts +0 -106
- package/dist/src/application/threads.d.ts +0 -660
- package/dist/src/auth/error.d.ts +0 -50
- package/dist/src/auth/index.d.ts +0 -10
- package/dist/src/auth/layer.d.ts +0 -53
- package/dist/src/auth/local-base-dir.d.ts +0 -8
- package/dist/src/auth/local-origin.d.ts +0 -18
- package/dist/src/auth/local-token.d.ts +0 -26
- package/dist/src/auth/local.d.ts +0 -24
- package/dist/src/auth/pairing.d.ts +0 -22
- package/dist/src/auth/remote-error.d.ts +0 -3
- package/dist/src/auth/schema.d.ts +0 -58
- package/dist/src/auth/service.d.ts +0 -27
- package/dist/src/auth/transport.d.ts +0 -22
- package/dist/src/auth/type.d.ts +0 -83
- package/dist/src/cli/env/flag.d.ts +0 -2
- package/dist/src/cli/env/index.d.ts +0 -2
- package/dist/src/cli/env/selection-layer.d.ts +0 -3
- package/dist/src/cli/flags.d.ts +0 -20
- package/dist/src/cli/format/index.d.ts +0 -1
- package/dist/src/cli/format/output.d.ts +0 -12
- package/dist/src/cli/index.d.ts +0 -5
- package/dist/src/cli/runtime/index.d.ts +0 -1
- package/dist/src/cli/runtime/service.d.ts +0 -16
- package/dist/src/cli/scope/index.d.ts +0 -1
- package/dist/src/cli/scope/resolve.d.ts +0 -20
- package/dist/src/cli-path/layer.d.ts +0 -3
- package/dist/src/cli-path/service.d.ts +0 -8
- package/dist/src/config/config.d.ts +0 -49
- package/dist/src/config/credential/cipher-node.d.ts +0 -3
- package/dist/src/config/credential/cipher-web.d.ts +0 -3
- package/dist/src/config/credential/cipher.d.ts +0 -29
- package/dist/src/config/credential/env.d.ts +0 -3
- package/dist/src/config/credential/error.d.ts +0 -8
- package/dist/src/config/credential/index.d.ts +0 -6
- package/dist/src/config/credential/service.d.ts +0 -34
- package/dist/src/config/env/env.d.ts +0 -55
- package/dist/src/config/env/index.d.ts +0 -2
- package/dist/src/config/env/layout.d.ts +0 -11
- package/dist/src/config/environment-name/index.d.ts +0 -1
- package/dist/src/config/environment-name/name.d.ts +0 -10
- package/dist/src/config/error.d.ts +0 -11
- package/dist/src/config/index.d.ts +0 -10
- package/dist/src/config/keystore/error.d.ts +0 -8
- package/dist/src/config/keystore/file.d.ts +0 -9
- package/dist/src/config/keystore/index.d.ts +0 -4
- package/dist/src/config/keystore/keyring-node.d.ts +0 -4
- package/dist/src/config/keystore/service.d.ts +0 -33
- package/dist/src/config/paths/index.d.ts +0 -1
- package/dist/src/config/paths/paths.d.ts +0 -6
- package/dist/src/config/persist/file-mode.d.ts +0 -4
- package/dist/src/config/persist/migration.d.ts +0 -68
- package/dist/src/config/persist/persist.d.ts +0 -40
- package/dist/src/config/persist/schema.d.ts +0 -68
- package/dist/src/config/resolve/resolve.d.ts +0 -40
- package/dist/src/config/selection/index.d.ts +0 -1
- package/dist/src/config/selection/resolve.d.ts +0 -4
- package/dist/src/config/selection/service.d.ts +0 -10
- package/dist/src/config/types.d.ts +0 -36
- package/dist/src/config/url/error.d.ts +0 -10
- package/dist/src/config/url/index.d.ts +0 -2
- package/dist/src/config/url/url.d.ts +0 -6
- package/dist/src/connection/error.d.ts +0 -10
- package/dist/src/connection/index.d.ts +0 -4
- package/dist/src/connection/layer.d.ts +0 -3
- package/dist/src/connection/prepared.d.ts +0 -14
- package/dist/src/connection/service.d.ts +0 -13
- package/dist/src/connection/type.d.ts +0 -10
- package/dist/src/contracts/index.d.ts +0 -1
- package/dist/src/domain/error.d.ts +0 -57
- package/dist/src/domain/helpers.d.ts +0 -179
- package/dist/src/domain/model-config.d.ts +0 -330
- package/dist/src/domain/thread-activities.d.ts +0 -14
- package/dist/src/domain/thread-lifecycle.d.ts +0 -120
- package/dist/src/index.d.ts +0 -3
- package/dist/src/node/connection.d.ts +0 -2
- package/dist/src/node/index.d.ts +0 -1
- package/dist/src/orchestration/index.d.ts +0 -2
- package/dist/src/orchestration/layer.d.ts +0 -1419
- package/dist/src/orchestration/service.d.ts +0 -28
- package/dist/src/rpc/error.d.ts +0 -16
- package/dist/src/rpc/index.d.ts +0 -6
- package/dist/src/rpc/layer.d.ts +0 -5862
- package/dist/src/rpc/operation.d.ts +0 -24
- package/dist/src/rpc/service.d.ts +0 -15
- package/dist/src/rpc/session.d.ts +0 -22
- package/dist/src/rpc/ws-group.d.ts +0 -1984
- package/dist/src/runtime/index.d.ts +0 -1
- package/dist/src/runtime/layer.d.ts +0 -15
- package/dist/src/sql/node-sqlite-client.d.ts +0 -10
- package/dist/src/sql/service.d.ts +0 -17
- package/dist/src/t3tools/index.d.ts +0 -1
package/dist/src/auth/error.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as Cause from "effect/Cause";
|
|
2
|
-
import * as Schema from "effect/Schema";
|
|
3
|
-
import { PlatformError } from "effect/PlatformError";
|
|
4
|
-
import { ConfigError } from "../config/error.ts";
|
|
5
|
-
import { UrlError } from "../config/url/error.ts";
|
|
6
|
-
declare const AuthPairingUrlError_base: Schema.Class<AuthPairingUrlError, Schema.TaggedStruct<"AuthPairingUrlError", {
|
|
7
|
-
readonly message: Schema.String;
|
|
8
|
-
readonly cause: Schema.optionalKey<Schema.instanceOf<Cause.IllegalArgumentError, Cause.IllegalArgumentError>>;
|
|
9
|
-
}>, Cause.YieldableError>;
|
|
10
|
-
export declare class AuthPairingUrlError extends AuthPairingUrlError_base {
|
|
11
|
-
}
|
|
12
|
-
declare const AuthConfigError_base: Schema.Class<AuthConfigError, Schema.TaggedStruct<"AuthConfigError", {
|
|
13
|
-
readonly message: Schema.String;
|
|
14
|
-
readonly cause: Schema.optionalKey<Schema.Union<readonly [typeof ConfigError, typeof UrlError]>>;
|
|
15
|
-
}>, Cause.YieldableError>;
|
|
16
|
-
export declare class AuthConfigError extends AuthConfigError_base {
|
|
17
|
-
}
|
|
18
|
-
declare const AuthTransportError_base: Schema.Class<AuthTransportError, Schema.TaggedStruct<"AuthTransportError", {
|
|
19
|
-
readonly message: Schema.String;
|
|
20
|
-
readonly cause: Schema.Union<readonly [Schema.Union<readonly [typeof import("@t3tools/contracts").EnvironmentRequestInvalidError, typeof import("@t3tools/contracts").EnvironmentAuthInvalidError, typeof import("@t3tools/contracts").EnvironmentScopeRequiredError, typeof import("@t3tools/contracts").EnvironmentOperationForbiddenError, typeof import("@t3tools/contracts").EnvironmentResourceNotFoundError, typeof import("@t3tools/contracts").EnvironmentInternalError]>, Schema.instanceOf<import("@t3tools/client-runtime/authorization").RemoteEnvironmentAuthFetchError, unknown>, Schema.instanceOf<import("@t3tools/client-runtime/authorization").RemoteEnvironmentAuthInvalidJsonError, unknown>, Schema.instanceOf<import("@t3tools/client-runtime/authorization").RemoteEnvironmentAuthTimeoutError, unknown>, Schema.instanceOf<import("@t3tools/client-runtime/authorization").RemoteEnvironmentAuthUndeclaredStatusError, unknown>]>;
|
|
21
|
-
}>, Cause.YieldableError>;
|
|
22
|
-
export declare class AuthTransportError extends AuthTransportError_base {
|
|
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
|
-
}
|
|
43
|
-
declare const AuthLocalError_base: Schema.Class<AuthLocalError, Schema.TaggedStruct<"AuthLocalError", {
|
|
44
|
-
readonly message: Schema.String;
|
|
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]>>;
|
|
46
|
-
}>, Cause.YieldableError>;
|
|
47
|
-
export declare class AuthLocalError extends AuthLocalError_base {
|
|
48
|
-
}
|
|
49
|
-
export type AuthError = AuthPairingUrlError | AuthConfigError | AuthTransportError | AuthLocalError;
|
|
50
|
-
export {};
|
package/dist/src/auth/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { T3Auth } from "./service.ts";
|
|
2
|
-
export { T3AuthLive, makeT3Auth } from "./layer.ts";
|
|
3
|
-
export { T3LocalAuth, T3LocalAuthLive, makeT3LocalAuth } from "./local.ts";
|
|
4
|
-
export { T3LocalAuthOrigin, T3LocalAuthOriginLive, makeT3LocalAuthOrigin } from "./local-origin.ts";
|
|
5
|
-
export { T3LocalAuthToken, T3LocalAuthTokenLive, makeT3LocalAuthToken } from "./local-token.ts";
|
|
6
|
-
export { T3AuthPairing, T3AuthPairingLive, makeT3AuthPairing, parsePairingUrl } from "./pairing.ts";
|
|
7
|
-
export { AuthConfigError, AuthLocalDatabaseError, AuthLocalError, AuthLocalSecretError, AuthLocalSigningError, AuthPairingUrlError, AuthTransportError, } from "./error.ts";
|
|
8
|
-
export type { AuthError } from "./error.ts";
|
|
9
|
-
export type { AuthSessionState, AuthWebSocketTicketResult } from "./schema.ts";
|
|
10
|
-
export type { AuthConfigInput, AuthEnvironmentListItem, AuthEnvironmentSummary, AuthResolvedConfig, AuthSessionRole, AuthStatusResult, AuthUnpairResult, AuthUseResult, LocalAuthInput, LocalAuthOriginInput, LocalAuthResult, LocalAuthTokenInput, LocalAuthTokenResult, PairingUrl, PairResult, PersistEnvironmentInput, } from "./type.ts";
|
package/dist/src/auth/layer.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import * as Layer from "effect/Layer";
|
|
3
|
-
import { T3Config } from "../config/config.ts";
|
|
4
|
-
import { AuthConfigError } from "./error.ts";
|
|
5
|
-
import { T3LocalAuth } from "./local.ts";
|
|
6
|
-
import { T3AuthPairing } from "./pairing.ts";
|
|
7
|
-
import { T3Auth } from "./service.ts";
|
|
8
|
-
import { T3AuthTransport } from "./transport.ts";
|
|
9
|
-
import type { AuthConfigInput, AuthEnvironmentListItem, AuthResolvedConfig } from "./type.ts";
|
|
10
|
-
export declare const makeT3Auth: () => Effect.Effect<{
|
|
11
|
-
pair: (pairingUrl: string) => Effect.Effect<import("./type.ts").PairResult, import("./error.ts").AuthPairingUrlError | import("./error.ts").AuthTransportError>;
|
|
12
|
-
local: (input: import("./type.ts").LocalAuthInput) => Effect.Effect<import("./type.ts").LocalAuthResult, import("./error.ts").AuthLocalError>;
|
|
13
|
-
writeConfig: (input: AuthConfigInput) => Effect.Effect<void, AuthConfigError, never>;
|
|
14
|
-
persistEnvironment: (input: {
|
|
15
|
-
readonly name: string;
|
|
16
|
-
readonly url: string;
|
|
17
|
-
readonly token: string;
|
|
18
|
-
readonly local: boolean;
|
|
19
|
-
readonly replace?: boolean;
|
|
20
|
-
readonly allowReplace: boolean;
|
|
21
|
-
}) => Effect.Effect<string, AuthConfigError, never>;
|
|
22
|
-
environmentExists: (name: string) => Effect.Effect<boolean, AuthConfigError, never>;
|
|
23
|
-
defaultNameFromUrl: (url: string) => Effect.Effect<string, AuthConfigError, never>;
|
|
24
|
-
defaultNameForLocal: () => Effect.Effect<"local", never, never>;
|
|
25
|
-
listEnvironments: () => Effect.Effect<AuthEnvironmentListItem[], AuthConfigError, never>;
|
|
26
|
-
useEnvironment: (name: string) => Effect.Effect<{
|
|
27
|
-
name: string;
|
|
28
|
-
default: true;
|
|
29
|
-
}, AuthConfigError, never>;
|
|
30
|
-
resolveUnpairTarget: (input: {
|
|
31
|
-
readonly name?: string;
|
|
32
|
-
}) => Effect.Effect<string, AuthConfigError, never>;
|
|
33
|
-
unpairEnvironment: (input: {
|
|
34
|
-
readonly name: string;
|
|
35
|
-
}) => Effect.Effect<{
|
|
36
|
-
name: string;
|
|
37
|
-
removed: true;
|
|
38
|
-
}, AuthConfigError, never>;
|
|
39
|
-
status: () => Effect.Effect<{
|
|
40
|
-
readonly config: AuthResolvedConfig;
|
|
41
|
-
readonly session: {
|
|
42
|
-
readonly authenticated: boolean;
|
|
43
|
-
readonly role?: "client" | "owner";
|
|
44
|
-
readonly sessionMethod?: string;
|
|
45
|
-
readonly expiresAt?: string;
|
|
46
|
-
};
|
|
47
|
-
}, AuthConfigError | import("./error.ts").AuthTransportError, never>;
|
|
48
|
-
issueWebSocketTicket: () => Effect.Effect<{
|
|
49
|
-
readonly ticket: string;
|
|
50
|
-
readonly expiresAt: string;
|
|
51
|
-
}, AuthConfigError | import("./error.ts").AuthTransportError, never>;
|
|
52
|
-
}, never, T3AuthPairing | T3AuthTransport | T3Config | T3LocalAuth>;
|
|
53
|
-
export declare const T3AuthLive: Layer.Layer<T3Auth, never, T3AuthPairing | T3AuthTransport | T3Config | T3LocalAuth>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import type { CliRuntime } from "../cli/runtime/service.ts";
|
|
3
|
-
import type { T3CliEnvShape } from "../config/env/env.ts";
|
|
4
|
-
export declare const resolveLocalBaseDir: (input: {
|
|
5
|
-
readonly baseDir?: string | undefined;
|
|
6
|
-
readonly cliRuntime: CliRuntime["Service"];
|
|
7
|
-
readonly t3CliEnv: T3CliEnvShape;
|
|
8
|
-
}) => Effect.Effect<string, never, import("effect/Path").Path>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as FileSystem from "effect/FileSystem";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as Path from "effect/Path";
|
|
6
|
-
import { CliRuntime } from "../cli/runtime/service.ts";
|
|
7
|
-
import { AuthLocalError } from "./error.ts";
|
|
8
|
-
import type { LocalAuthOriginInput } from "./type.ts";
|
|
9
|
-
declare const T3LocalAuthOrigin_base: Context.ServiceClass<T3LocalAuthOrigin, "t3cli/T3LocalAuthOrigin", {
|
|
10
|
-
readonly resolve: (input?: LocalAuthOriginInput) => Effect.Effect<string, AuthLocalError>;
|
|
11
|
-
}>;
|
|
12
|
-
export declare class T3LocalAuthOrigin extends T3LocalAuthOrigin_base {
|
|
13
|
-
}
|
|
14
|
-
export declare const makeT3LocalAuthOrigin: () => Effect.Effect<{
|
|
15
|
-
resolve: (input?: LocalAuthOriginInput | undefined) => Effect.Effect<string, AuthLocalError, never>;
|
|
16
|
-
}, import("effect/Config").ConfigError, CliRuntime | FileSystem.FileSystem | Path.Path>;
|
|
17
|
-
export declare const T3LocalAuthOriginLive: Layer.Layer<T3LocalAuthOrigin, import("effect/Config").ConfigError, CliRuntime | FileSystem.FileSystem | Path.Path>;
|
|
18
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Crypto from "effect/Crypto";
|
|
3
|
-
import * as Effect from "effect/Effect";
|
|
4
|
-
import * as FileSystem from "effect/FileSystem";
|
|
5
|
-
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as Path from "effect/Path";
|
|
7
|
-
import { CliRuntime } from "../cli/runtime/service.ts";
|
|
8
|
-
import { SqlClientFactory } from "../sql/service.ts";
|
|
9
|
-
import { AuthLocalError } from "./error.ts";
|
|
10
|
-
import type { LocalAuthTokenInput, LocalAuthTokenResult } from "./type.ts";
|
|
11
|
-
declare const T3LocalAuthToken_base: Context.ServiceClass<T3LocalAuthToken, "t3cli/T3LocalAuthToken", {
|
|
12
|
-
readonly create: (input: LocalAuthTokenInput) => Effect.Effect<LocalAuthTokenResult, AuthLocalError>;
|
|
13
|
-
}>;
|
|
14
|
-
export declare class T3LocalAuthToken extends T3LocalAuthToken_base {
|
|
15
|
-
}
|
|
16
|
-
export declare const makeT3LocalAuthToken: () => Effect.Effect<{
|
|
17
|
-
create: (input: LocalAuthTokenInput) => Effect.Effect<{
|
|
18
|
-
token: string;
|
|
19
|
-
role: "client" | "owner";
|
|
20
|
-
expiresAt: string;
|
|
21
|
-
source: "local";
|
|
22
|
-
baseDir: string;
|
|
23
|
-
}, AuthLocalError, never>;
|
|
24
|
-
}, import("effect/Config").ConfigError, CliRuntime | Crypto.Crypto | FileSystem.FileSystem | Path.Path | SqlClientFactory>;
|
|
25
|
-
export declare const T3LocalAuthTokenLive: Layer.Layer<T3LocalAuthToken, import("effect/Config").ConfigError, CliRuntime | Crypto.Crypto | FileSystem.FileSystem | Path.Path | SqlClientFactory>;
|
|
26
|
-
export {};
|
package/dist/src/auth/local.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as Layer from "effect/Layer";
|
|
4
|
-
import { AuthLocalError } from "./error.ts";
|
|
5
|
-
import { T3LocalAuthOrigin } from "./local-origin.ts";
|
|
6
|
-
import { T3LocalAuthToken } from "./local-token.ts";
|
|
7
|
-
import type { LocalAuthInput, LocalAuthResult } from "./type.ts";
|
|
8
|
-
declare const T3LocalAuth_base: Context.ServiceClass<T3LocalAuth, "t3cli/T3LocalAuth", {
|
|
9
|
-
readonly local: (input: LocalAuthInput) => Effect.Effect<LocalAuthResult, AuthLocalError>;
|
|
10
|
-
}>;
|
|
11
|
-
export declare class T3LocalAuth extends T3LocalAuth_base {
|
|
12
|
-
}
|
|
13
|
-
export declare const makeT3LocalAuth: () => Effect.Effect<{
|
|
14
|
-
local: (input: LocalAuthInput) => Effect.Effect<{
|
|
15
|
-
url: string;
|
|
16
|
-
token: string;
|
|
17
|
-
role: "client" | "owner";
|
|
18
|
-
expiresAt: string;
|
|
19
|
-
source: "local";
|
|
20
|
-
baseDir: string;
|
|
21
|
-
}, AuthLocalError, never>;
|
|
22
|
-
}, never, T3LocalAuthOrigin | T3LocalAuthToken>;
|
|
23
|
-
export declare const T3LocalAuthLive: Layer.Layer<T3LocalAuth, never, T3LocalAuthOrigin | T3LocalAuthToken>;
|
|
24
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as Layer from "effect/Layer";
|
|
4
|
-
import { AuthPairingUrlError, AuthTransportError } from "./error.ts";
|
|
5
|
-
import { T3AuthTransport } from "./transport.ts";
|
|
6
|
-
import type { PairingUrl, PairResult } from "./type.ts";
|
|
7
|
-
declare const T3AuthPairing_base: Context.ServiceClass<T3AuthPairing, "t3cli/T3AuthPairing", {
|
|
8
|
-
readonly pair: (pairingUrl: string) => Effect.Effect<PairResult, AuthPairingUrlError | AuthTransportError>;
|
|
9
|
-
}>;
|
|
10
|
-
export declare class T3AuthPairing extends T3AuthPairing_base {
|
|
11
|
-
}
|
|
12
|
-
export declare const makeT3AuthPairing: () => Effect.Effect<{
|
|
13
|
-
pair: (pairingUrl: string) => Effect.Effect<{
|
|
14
|
-
url: string;
|
|
15
|
-
token: string;
|
|
16
|
-
role: "client" | "owner";
|
|
17
|
-
expiresAt: string;
|
|
18
|
-
}, AuthPairingUrlError | AuthTransportError, never>;
|
|
19
|
-
}, never, T3AuthTransport>;
|
|
20
|
-
export declare const T3AuthPairingLive: Layer.Layer<T3AuthPairing, never, T3AuthTransport>;
|
|
21
|
-
export declare function parsePairingUrl(value: string): Effect.Effect<PairingUrl, AuthPairingUrlError>;
|
|
22
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { RemoteEnvironmentAuthFetchError, RemoteEnvironmentAuthInvalidJsonError, RemoteEnvironmentAuthTimeoutError, RemoteEnvironmentAuthUndeclaredStatusError } from "@t3tools/client-runtime/authorization";
|
|
2
|
-
import * as Schema from "effect/Schema";
|
|
3
|
-
export declare const RemoteEnvironmentAuthErrorSchema: Schema.Union<readonly [Schema.Union<readonly [typeof import("@t3tools/contracts").EnvironmentRequestInvalidError, typeof import("@t3tools/contracts").EnvironmentAuthInvalidError, typeof import("@t3tools/contracts").EnvironmentScopeRequiredError, typeof import("@t3tools/contracts").EnvironmentOperationForbiddenError, typeof import("@t3tools/contracts").EnvironmentResourceNotFoundError, typeof import("@t3tools/contracts").EnvironmentInternalError]>, Schema.instanceOf<RemoteEnvironmentAuthFetchError, unknown>, Schema.instanceOf<RemoteEnvironmentAuthInvalidJsonError, unknown>, Schema.instanceOf<RemoteEnvironmentAuthTimeoutError, unknown>, Schema.instanceOf<RemoteEnvironmentAuthUndeclaredStatusError, unknown>]>;
|
|
@@ -1,58 +0,0 @@
|
|
|
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>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import type * as Effect from "effect/Effect";
|
|
3
|
-
import type { AuthWebSocketTicketResult } from "./schema.ts";
|
|
4
|
-
import type { AuthError } from "./error.ts";
|
|
5
|
-
import type { AuthConfigInput, AuthEnvironmentListItem, AuthStatusResult, AuthUnpairResult, AuthUseResult, LocalAuthInput, LocalAuthResult, PairResult, PersistEnvironmentInput } 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 writeConfig: (input: AuthConfigInput) => Effect.Effect<void, AuthError>;
|
|
10
|
-
readonly persistEnvironment: (input: PersistEnvironmentInput) => Effect.Effect<string, AuthError>;
|
|
11
|
-
readonly environmentExists: (name: string) => Effect.Effect<boolean, AuthError>;
|
|
12
|
-
readonly defaultNameFromUrl: (url: string) => Effect.Effect<string, AuthError>;
|
|
13
|
-
readonly defaultNameForLocal: () => Effect.Effect<string, AuthError>;
|
|
14
|
-
readonly listEnvironments: () => Effect.Effect<readonly AuthEnvironmentListItem[], AuthError>;
|
|
15
|
-
readonly useEnvironment: (name: string) => Effect.Effect<AuthUseResult, AuthError>;
|
|
16
|
-
readonly unpairEnvironment: (input: {
|
|
17
|
-
readonly name: string;
|
|
18
|
-
}) => Effect.Effect<AuthUnpairResult, AuthError>;
|
|
19
|
-
readonly resolveUnpairTarget: (input: {
|
|
20
|
-
readonly name?: string;
|
|
21
|
-
}) => Effect.Effect<string, AuthError>;
|
|
22
|
-
readonly status: () => Effect.Effect<AuthStatusResult, AuthError>;
|
|
23
|
-
readonly issueWebSocketTicket: () => Effect.Effect<AuthWebSocketTicketResult, AuthError>;
|
|
24
|
-
}>;
|
|
25
|
-
export declare class T3Auth extends T3Auth_base {
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
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 { AuthTransportError } from "./error.ts";
|
|
6
|
-
import { type AuthBearerBootstrapResult, type AuthSessionState, type AuthWebSocketTicketResult } from "./schema.ts";
|
|
7
|
-
export type AuthTransportConnection = {
|
|
8
|
-
readonly url: string;
|
|
9
|
-
readonly token: string;
|
|
10
|
-
};
|
|
11
|
-
declare const T3AuthTransport_base: Context.ServiceClass<T3AuthTransport, "t3cli/T3AuthTransport", {
|
|
12
|
-
readonly bootstrapBearer: (input: {
|
|
13
|
-
readonly baseUrl: string;
|
|
14
|
-
readonly credential: string;
|
|
15
|
-
}) => Effect.Effect<AuthBearerBootstrapResult, AuthTransportError>;
|
|
16
|
-
readonly getSession: (connection: AuthTransportConnection) => Effect.Effect<AuthSessionState, AuthTransportError>;
|
|
17
|
-
readonly issueWebSocketTicket: (connection: AuthTransportConnection) => Effect.Effect<AuthWebSocketTicketResult, AuthTransportError>;
|
|
18
|
-
}>;
|
|
19
|
-
export declare class T3AuthTransport extends T3AuthTransport_base {
|
|
20
|
-
}
|
|
21
|
-
export declare const T3AuthTransportLive: Layer.Layer<T3AuthTransport, never, HttpClient.HttpClient>;
|
|
22
|
-
export {};
|
package/dist/src/auth/type.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { AuthBearerBootstrapResult } from "./schema.ts";
|
|
2
|
-
import type { AuthSessionState } from "./schema.ts";
|
|
3
|
-
export type AuthSessionRole = AuthBearerBootstrapResult["role"];
|
|
4
|
-
export type PairingUrl = {
|
|
5
|
-
readonly baseUrl: string;
|
|
6
|
-
readonly credential: string;
|
|
7
|
-
};
|
|
8
|
-
export type AuthConfigInput = {
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly url: string;
|
|
11
|
-
readonly token: string;
|
|
12
|
-
readonly local: boolean;
|
|
13
|
-
readonly makeDefault?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export type PersistEnvironmentInput = {
|
|
16
|
-
readonly name: string;
|
|
17
|
-
readonly url: string;
|
|
18
|
-
readonly token: string;
|
|
19
|
-
readonly local: boolean;
|
|
20
|
-
readonly replace?: boolean;
|
|
21
|
-
readonly allowReplace: boolean;
|
|
22
|
-
};
|
|
23
|
-
export type AuthResolvedConfig = {
|
|
24
|
-
readonly url: string;
|
|
25
|
-
readonly token: string;
|
|
26
|
-
readonly source: "env" | "config";
|
|
27
|
-
readonly local: boolean;
|
|
28
|
-
readonly environment?: string;
|
|
29
|
-
};
|
|
30
|
-
export type AuthEnvironmentSummary = {
|
|
31
|
-
readonly name: string;
|
|
32
|
-
readonly url: string;
|
|
33
|
-
readonly local: boolean;
|
|
34
|
-
readonly default: boolean;
|
|
35
|
-
};
|
|
36
|
-
export type AuthStatusResult = {
|
|
37
|
-
readonly config: AuthResolvedConfig;
|
|
38
|
-
readonly session: AuthSessionState;
|
|
39
|
-
};
|
|
40
|
-
export type AuthEnvironmentListItem = AuthEnvironmentSummary & {
|
|
41
|
-
readonly active: boolean;
|
|
42
|
-
};
|
|
43
|
-
export type PairResult = {
|
|
44
|
-
readonly url: string;
|
|
45
|
-
readonly token: string;
|
|
46
|
-
readonly role: AuthBearerBootstrapResult["role"];
|
|
47
|
-
readonly expiresAt: string;
|
|
48
|
-
};
|
|
49
|
-
export type LocalAuthInput = {
|
|
50
|
-
readonly baseDir?: string;
|
|
51
|
-
readonly origin?: string;
|
|
52
|
-
readonly role: AuthSessionRole;
|
|
53
|
-
readonly label: string;
|
|
54
|
-
readonly subject: string;
|
|
55
|
-
};
|
|
56
|
-
export type LocalAuthTokenInput = Omit<LocalAuthInput, "origin">;
|
|
57
|
-
export type LocalAuthOriginInput = {
|
|
58
|
-
readonly baseDir?: string;
|
|
59
|
-
readonly origin?: string;
|
|
60
|
-
};
|
|
61
|
-
export type LocalAuthTokenResult = {
|
|
62
|
-
readonly token: string;
|
|
63
|
-
readonly role: AuthSessionRole;
|
|
64
|
-
readonly expiresAt: string;
|
|
65
|
-
readonly source: "local";
|
|
66
|
-
readonly baseDir: string;
|
|
67
|
-
};
|
|
68
|
-
export type LocalAuthResult = {
|
|
69
|
-
readonly url: string;
|
|
70
|
-
readonly token: string;
|
|
71
|
-
readonly role: AuthSessionRole;
|
|
72
|
-
readonly expiresAt: string;
|
|
73
|
-
readonly source: "local";
|
|
74
|
-
readonly baseDir: string;
|
|
75
|
-
};
|
|
76
|
-
export type AuthUseResult = {
|
|
77
|
-
readonly name: string;
|
|
78
|
-
readonly default: true;
|
|
79
|
-
};
|
|
80
|
-
export type AuthUnpairResult = {
|
|
81
|
-
readonly name: string;
|
|
82
|
-
readonly removed: true;
|
|
83
|
-
};
|
package/dist/src/cli/flags.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Flag } from "effect/unstable/cli";
|
|
2
|
-
export declare const projectFlag: Flag.Flag<import("effect/Option").Option<string>>;
|
|
3
|
-
export declare const threadFlag: Flag.Flag<import("effect/Option").Option<string>>;
|
|
4
|
-
export declare const worktreeFlag: Flag.Flag<import("effect/Option").Option<string>>;
|
|
5
|
-
export declare const projectPathFlag: Flag.Flag<string>;
|
|
6
|
-
export declare const yesFlag: Flag.Flag<boolean>;
|
|
7
|
-
export declare const replaceFlag: Flag.Flag<boolean>;
|
|
8
|
-
export declare const envNameFlag: Flag.Flag<import("effect/Option").Option<string>>;
|
|
9
|
-
export declare const forceFlag: Flag.Flag<boolean>;
|
|
10
|
-
export declare const selfActionForceFlag: Flag.Flag<boolean>;
|
|
11
|
-
export declare const formatFlag: Flag.Flag<"auto" | "human" | "json">;
|
|
12
|
-
export declare const threadFormatFlag: Flag.Flag<"auto" | "human" | "json" | "ndjson">;
|
|
13
|
-
export declare const waitFormatFlag: Flag.Flag<"auto" | "human" | "ndjson">;
|
|
14
|
-
export declare const modelFlags: {
|
|
15
|
-
readonly option: Flag.Flag<import("effect/Option").Option<Record<string, string>>>;
|
|
16
|
-
readonly reasoningEffort: Flag.Flag<import("effect/Option").Option<string>>;
|
|
17
|
-
readonly effort: Flag.Flag<import("effect/Option").Option<string>>;
|
|
18
|
-
readonly fastMode: Flag.Flag<import("effect/Option").Option<boolean>>;
|
|
19
|
-
readonly thinking: Flag.Flag<import("effect/Option").Option<boolean>>;
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { resolveOutputFormat, canRenderLiveTerminal, isInteractiveHumanTerminal, isAgentEnvironment, humanJsonFormatChoices, humanNdjsonFormatChoices, humanJsonNdjsonFormatChoices, type HumanJsonFormat, type HumanNdjsonFormat, type HumanJsonNdjsonFormat, } from "./output.ts";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { T3CliEnvShape } from "../../config/env/env.ts";
|
|
2
|
-
import type { CliRuntime } from "../runtime/service.ts";
|
|
3
|
-
export declare const humanJsonFormatChoices: readonly ["auto", "human", "json"];
|
|
4
|
-
export declare const humanNdjsonFormatChoices: readonly ["auto", "human", "ndjson"];
|
|
5
|
-
export declare const humanJsonNdjsonFormatChoices: readonly ["auto", "human", "json", "ndjson"];
|
|
6
|
-
export type HumanJsonFormat = (typeof humanJsonFormatChoices)[number];
|
|
7
|
-
export type HumanNdjsonFormat = (typeof humanNdjsonFormatChoices)[number];
|
|
8
|
-
export type HumanJsonNdjsonFormat = (typeof humanJsonNdjsonFormatChoices)[number];
|
|
9
|
-
export declare function resolveOutputFormat<T extends "json" | "ndjson">(format: "auto" | "human" | T, cliRuntime: CliRuntime["Service"], t3CliEnv: T3CliEnvShape, nonHumanFormat: T): "human" | T;
|
|
10
|
-
export declare function canRenderLiveTerminal(cliRuntime: CliRuntime["Service"], t3CliEnv: T3CliEnvShape): boolean;
|
|
11
|
-
export declare function isInteractiveHumanTerminal(cliRuntime: CliRuntime["Service"], t3CliEnv: T3CliEnvShape): boolean;
|
|
12
|
-
export declare function isAgentEnvironment(t3CliEnv: T3CliEnvShape): boolean;
|
package/dist/src/cli/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { formatFlag, modelFlags, projectFlag, projectPathFlag, threadFlag, threadFormatFlag, waitFormatFlag, worktreeFlag, } from "./flags.ts";
|
|
2
|
-
export * as Env from "./env/index.ts";
|
|
3
|
-
export * as Runtime from "./runtime/index.ts";
|
|
4
|
-
export { resolveCommandProjectRef, resolveProjectRef, resolveThreadId, resolveWorktreePath, } from "./scope/index.ts";
|
|
5
|
-
export { resolveOutputFormat, canRenderLiveTerminal, isInteractiveHumanTerminal, isAgentEnvironment, humanJsonFormatChoices, humanNdjsonFormatChoices, humanJsonNdjsonFormatChoices, type HumanJsonFormat, type HumanNdjsonFormat, type HumanJsonNdjsonFormat, } from "./format/index.ts";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CliRuntime, layer } from "./service.ts";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Layer from "effect/Layer";
|
|
3
|
-
declare const CliRuntime_base: Context.ServiceClass<CliRuntime, "t3cli/CliRuntime", {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly stdoutIsTTY: boolean;
|
|
6
|
-
readonly stderrIsTTY: boolean;
|
|
7
|
-
}>;
|
|
8
|
-
export declare class CliRuntime extends CliRuntime_base {
|
|
9
|
-
static layerTest: (input?: {
|
|
10
|
-
readonly cwd?: string;
|
|
11
|
-
readonly stdoutIsTTY?: boolean;
|
|
12
|
-
readonly stderrIsTTY?: boolean;
|
|
13
|
-
}) => Layer.Layer<CliRuntime, never, never>;
|
|
14
|
-
}
|
|
15
|
-
export declare const layer: Layer.Layer<CliRuntime, never, never>;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { resolveCommandProjectRef, resolveProjectRef, resolveThreadId, resolveWorktreePath, } from "./resolve.ts";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { T3CliEnvScope } from "../../config/env/env.ts";
|
|
2
|
-
export declare function resolveProjectRef(input: {
|
|
3
|
-
readonly value: string | undefined;
|
|
4
|
-
readonly scope: T3CliEnvScope;
|
|
5
|
-
}): string | undefined;
|
|
6
|
-
export declare function resolveCommandProjectRef(input: {
|
|
7
|
-
readonly value: string | undefined;
|
|
8
|
-
readonly scope: T3CliEnvScope;
|
|
9
|
-
readonly cwd: string;
|
|
10
|
-
readonly isLocal?: boolean;
|
|
11
|
-
}): string | undefined;
|
|
12
|
-
export declare function resolveWorktreePath(input: {
|
|
13
|
-
readonly value: string | undefined;
|
|
14
|
-
readonly scope: T3CliEnvScope;
|
|
15
|
-
readonly inferred?: string;
|
|
16
|
-
}): string | undefined;
|
|
17
|
-
export declare function resolveThreadId(input: {
|
|
18
|
-
readonly value: string | undefined;
|
|
19
|
-
readonly scope: T3CliEnvScope;
|
|
20
|
-
}): string | undefined;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
export type CliPathShape = {
|
|
3
|
-
readonly path: string;
|
|
4
|
-
};
|
|
5
|
-
declare const CliPath_base: Context.ServiceClass<CliPath, "t3cli/CliPath", CliPathShape>;
|
|
6
|
-
export declare class CliPath extends CliPath_base {
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as FileSystem from "effect/FileSystem";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as Path from "effect/Path";
|
|
6
|
-
import { T3CredentialCrypto } from "./credential/service.ts";
|
|
7
|
-
import { ConfigError } from "./error.ts";
|
|
8
|
-
import { T3ConfigSelection } from "./selection/service.ts";
|
|
9
|
-
import type { EnvironmentSummary, ResolvedConfig, UpsertEnvironmentInput } from "./types.ts";
|
|
10
|
-
declare const T3Config_base: Context.ServiceClass<T3Config, "t3cli/T3Config", {
|
|
11
|
-
readonly resolve: () => Effect.Effect<ResolvedConfig, ConfigError>;
|
|
12
|
-
readonly resolveActiveEnvironmentName: () => Effect.Effect<string | undefined, ConfigError>;
|
|
13
|
-
readonly listEnvironments: () => Effect.Effect<readonly EnvironmentSummary[], ConfigError>;
|
|
14
|
-
readonly upsertEnvironment: (input: UpsertEnvironmentInput) => Effect.Effect<void, ConfigError>;
|
|
15
|
-
readonly setDefaultEnvironment: (name: string) => Effect.Effect<void, ConfigError>;
|
|
16
|
-
readonly removeEnvironment: (name: string) => Effect.Effect<void, ConfigError>;
|
|
17
|
-
readonly hasEnvironment: (name: string) => Effect.Effect<boolean, ConfigError>;
|
|
18
|
-
readonly getDefaultEnvironmentName: () => Effect.Effect<string | undefined, ConfigError>;
|
|
19
|
-
}>;
|
|
20
|
-
export declare class T3Config extends T3Config_base {
|
|
21
|
-
}
|
|
22
|
-
export declare const make: () => Effect.Effect<{
|
|
23
|
-
readonly resolve: () => Effect.Effect<{
|
|
24
|
-
url: string;
|
|
25
|
-
token: string;
|
|
26
|
-
source: "env";
|
|
27
|
-
local: false;
|
|
28
|
-
} | {
|
|
29
|
-
url: string;
|
|
30
|
-
token: string;
|
|
31
|
-
source: "config";
|
|
32
|
-
local: boolean;
|
|
33
|
-
environment: string;
|
|
34
|
-
}, ConfigError, never>;
|
|
35
|
-
readonly resolveActiveEnvironmentName: () => Effect.Effect<string | undefined, ConfigError, never>;
|
|
36
|
-
readonly listEnvironments: () => Effect.Effect<{
|
|
37
|
-
name: string;
|
|
38
|
-
url: string;
|
|
39
|
-
local: boolean;
|
|
40
|
-
default: boolean;
|
|
41
|
-
}[], ConfigError, never>;
|
|
42
|
-
readonly upsertEnvironment: (input: UpsertEnvironmentInput) => Effect.Effect<void, ConfigError, never>;
|
|
43
|
-
readonly setDefaultEnvironment: (name: string) => Effect.Effect<void, ConfigError, never>;
|
|
44
|
-
readonly removeEnvironment: (name: string) => Effect.Effect<void, ConfigError, never>;
|
|
45
|
-
readonly hasEnvironment: (name: string) => Effect.Effect<boolean, ConfigError, never>;
|
|
46
|
-
readonly getDefaultEnvironmentName: () => Effect.Effect<string | undefined, ConfigError, never>;
|
|
47
|
-
}, import("effect/Config").ConfigError, FileSystem.FileSystem | Path.Path | T3ConfigSelection | T3CredentialCrypto>;
|
|
48
|
-
export declare const layer: Layer.Layer<T3Config, import("effect/Config").ConfigError, FileSystem.FileSystem | Path.Path | T3ConfigSelection | T3CredentialCrypto>;
|
|
49
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import type * as Effect from "effect/Effect";
|
|
3
|
-
import type { CredentialCipherError } from "./error.ts";
|
|
4
|
-
export declare const credentialCipherNonceByteLength = 12;
|
|
5
|
-
export declare const credentialCipherTagByteLength = 16;
|
|
6
|
-
export type AesGcmEncryptInput = {
|
|
7
|
-
readonly key: Uint8Array;
|
|
8
|
-
readonly nonce: Uint8Array;
|
|
9
|
-
readonly plaintext: Uint8Array;
|
|
10
|
-
readonly additionalData: Uint8Array;
|
|
11
|
-
};
|
|
12
|
-
export type AesGcmDecryptInput = {
|
|
13
|
-
readonly key: Uint8Array;
|
|
14
|
-
readonly nonce: Uint8Array;
|
|
15
|
-
readonly ciphertext: Uint8Array;
|
|
16
|
-
readonly tag: Uint8Array;
|
|
17
|
-
readonly additionalData: Uint8Array;
|
|
18
|
-
};
|
|
19
|
-
export type AesGcmEncryptResult = {
|
|
20
|
-
readonly ciphertext: Uint8Array;
|
|
21
|
-
readonly tag: Uint8Array;
|
|
22
|
-
};
|
|
23
|
-
declare const T3CredentialCipher_base: Context.ServiceClass<T3CredentialCipher, "t3cli/T3CredentialCipher", {
|
|
24
|
-
readonly encrypt: (input: AesGcmEncryptInput) => Effect.Effect<AesGcmEncryptResult, CredentialCipherError>;
|
|
25
|
-
readonly decrypt: (input: AesGcmDecryptInput) => Effect.Effect<Uint8Array, CredentialCipherError>;
|
|
26
|
-
}>;
|
|
27
|
-
export declare class T3CredentialCipher extends T3CredentialCipher_base {
|
|
28
|
-
}
|
|
29
|
-
export {};
|