t3code-cli 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -1
- package/dist/application.d.ts +2 -0
- package/dist/application.js +1 -1
- package/dist/auth.d.ts +50 -0
- package/dist/auth.js +1 -1
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +355 -606
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +1 -1
- package/dist/client-runtime/authorization.d.ts +2 -0
- package/dist/client-runtime/authorization.js +2 -0
- package/dist/client-runtime/connection.d.ts +2 -0
- package/dist/client-runtime/connection.js +2 -0
- package/dist/client-runtime/environment.d.ts +57 -0
- package/dist/client-runtime/environment.js +2 -0
- package/dist/client-runtime/errors.d.ts +28 -0
- package/dist/client-runtime/errors.js +35 -0
- package/dist/client-runtime/operations/projects.d.ts +2 -0
- package/dist/client-runtime/operations/projects.js +2 -0
- package/dist/client-runtime/operations.d.ts +2 -0
- package/dist/client-runtime/operations.js +2 -0
- package/dist/client-runtime/platform.d.ts +26 -0
- package/dist/client-runtime/platform.js +74 -0
- package/dist/client-runtime/relay.d.ts +121 -0
- package/dist/client-runtime/relay.js +245 -0
- package/dist/client-runtime/rpc.d.ts +2 -0
- package/dist/client-runtime/rpc.js +2 -0
- package/dist/client-runtime/state/assets.d.ts +40 -0
- package/dist/client-runtime/state/assets.js +53 -0
- package/dist/client-runtime/state/auth.d.ts +98 -0
- package/dist/client-runtime/state/auth.js +48 -0
- package/dist/client-runtime/state/connections.d.ts +2 -0
- package/dist/client-runtime/state/connections.js +52 -0
- package/dist/client-runtime/state/entities.d.ts +33 -0
- package/dist/client-runtime/state/entities.js +2 -0
- package/dist/client-runtime/state/filesystem.d.ts +42 -0
- package/dist/client-runtime/state/filesystem.js +48 -0
- package/dist/client-runtime/state/git.d.ts +43 -0
- package/dist/client-runtime/state/git.js +18 -0
- package/dist/client-runtime/state/models.d.ts +2 -0
- package/dist/client-runtime/state/models.js +2 -0
- package/dist/client-runtime/state/orchestration.d.ts +128 -0
- package/dist/client-runtime/state/orchestration.js +20 -0
- package/dist/client-runtime/state/presentation.d.ts +277 -0
- package/dist/client-runtime/state/presentation.js +34 -0
- package/dist/client-runtime/state/preview.d.ts +447 -0
- package/dist/client-runtime/state/preview.js +103 -0
- package/dist/client-runtime/state/project-grouping.d.ts +26 -0
- package/dist/client-runtime/state/project-grouping.js +73 -0
- package/dist/client-runtime/state/projects.d.ts +192 -0
- package/dist/client-runtime/state/projects.js +2 -0
- package/dist/client-runtime/state/relay.d.ts +10 -0
- package/dist/client-runtime/state/relay.js +19 -0
- package/dist/client-runtime/state/review.d.ts +28 -0
- package/dist/client-runtime/state/review.js +11 -0
- package/dist/client-runtime/state/runtime.d.ts +2 -0
- package/dist/client-runtime/state/runtime.js +2 -0
- package/dist/client-runtime/state/server.d.ts +1495 -0
- package/dist/client-runtime/state/server.js +207 -0
- package/dist/client-runtime/state/session.d.ts +532 -0
- package/dist/client-runtime/state/session.js +21 -0
- package/dist/client-runtime/state/shell.d.ts +529 -0
- package/dist/client-runtime/state/shell.js +2 -0
- package/dist/client-runtime/state/source-control.d.ts +92 -0
- package/dist/client-runtime/state/source-control.js +36 -0
- package/dist/client-runtime/state/terminal.d.ts +237 -0
- package/dist/client-runtime/state/terminal.js +173 -0
- package/dist/client-runtime/state/thread-settled.d.ts +104 -0
- package/dist/client-runtime/state/thread-settled.js +157 -0
- package/dist/client-runtime/state/thread-sort.d.ts +23 -0
- package/dist/client-runtime/state/thread-sort.js +47 -0
- package/dist/client-runtime/state/threads.d.ts +538 -0
- package/dist/client-runtime/state/threads.js +934 -0
- package/dist/client-runtime/state/vcs.d.ts +442 -0
- package/dist/client-runtime/state/vcs.js +756 -0
- package/dist/config.d.ts +84 -0
- package/dist/config.js +1 -1
- package/dist/connection.d.ts +7 -0
- package/dist/connection.js +1 -1
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/node.d.ts +6 -0
- package/dist/node.js +1 -1
- package/dist/orchestration.d.ts +1420 -0
- package/dist/orchestration.js +1 -1
- package/dist/preview.d.ts +2 -0
- package/dist/preview.js +2 -0
- package/dist/rpc.d.ts +6043 -0
- package/dist/rpc.js +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +2 -2
- package/dist/shared/DrainableWorker.d.ts +28 -0
- package/dist/shared/DrainableWorker.js +24 -0
- package/dist/shared/KeyedCoalescingWorker.d.ts +13 -0
- package/dist/shared/KeyedCoalescingWorker.js +89 -0
- package/dist/shared/Net.d.ts +43 -0
- package/dist/shared/Net.js +126 -0
- package/dist/shared/String.d.ts +4 -0
- package/dist/shared/String.js +8 -0
- package/dist/shared/Struct.d.ts +5 -0
- package/dist/shared/Struct.js +2 -0
- package/dist/shared/advertisedEndpoint.d.ts +2 -0
- package/dist/shared/advertisedEndpoint.js +2 -0
- package/dist/shared/agentAwareness.d.ts +27 -0
- package/dist/shared/agentAwareness.js +54 -0
- package/dist/shared/backgroundActivitySettings.d.ts +23 -0
- package/dist/shared/backgroundActivitySettings.js +2 -0
- package/dist/shared/chatList.d.ts +12 -0
- package/dist/shared/chatList.js +14 -0
- package/dist/shared/cliArgs.d.ts +33 -0
- package/dist/shared/cliArgs.js +103 -0
- package/dist/shared/composerInlineTokens.d.ts +20 -0
- package/dist/shared/composerInlineTokens.js +72 -0
- package/dist/shared/composerTrigger.d.ts +26 -0
- package/dist/shared/composerTrigger.js +97 -0
- package/dist/shared/connectAuth.d.ts +58 -0
- package/dist/shared/connectAuth.js +89 -0
- package/dist/shared/devHome.d.ts +21 -0
- package/dist/shared/devHome.js +65 -0
- package/dist/shared/devProxy.d.ts +15 -0
- package/dist/shared/devProxy.js +22 -0
- package/dist/shared/dpop.d.ts +32 -0
- package/dist/shared/dpop.js +2724 -0
- package/dist/shared/dpopCommon.d.ts +2 -0
- package/dist/shared/dpopCommon.js +2 -0
- package/dist/shared/filePreview.d.ts +8 -0
- package/dist/shared/filePreview.js +31 -0
- package/dist/shared/git.d.ts +41 -0
- package/dist/shared/git.js +2 -0
- package/dist/shared/hostProcess.d.ts +13 -0
- package/dist/shared/hostProcess.js +2 -0
- package/dist/shared/httpObservability.d.ts +5 -0
- package/dist/shared/httpObservability.js +2 -0
- package/dist/shared/httpReadiness.d.ts +38 -0
- package/dist/shared/httpReadiness.js +110 -0
- package/dist/shared/keybindings.d.ts +35 -0
- package/dist/shared/keybindings.js +330 -0
- package/dist/shared/logging.d.ts +39 -0
- package/dist/shared/logging.js +2 -0
- package/dist/shared/model.d.ts +44 -0
- package/dist/shared/model.js +2 -0
- package/dist/shared/oauthScope.d.ts +23 -0
- package/dist/shared/oauthScope.js +2 -0
- package/dist/shared/observability.d.ts +105 -0
- package/dist/shared/observability.js +346 -0
- package/dist/shared/orchestrationTiming.d.ts +16 -0
- package/dist/shared/orchestrationTiming.js +32 -0
- package/dist/shared/path.d.ts +2 -0
- package/dist/shared/path.js +2 -0
- package/dist/shared/preview.d.ts +35 -0
- package/dist/shared/preview.js +103 -0
- package/dist/shared/previewViewport.d.ts +16 -0
- package/dist/shared/previewViewport.js +159 -0
- package/dist/shared/projectFavicon.d.ts +5 -0
- package/dist/shared/projectFavicon.js +13 -0
- package/dist/shared/projectScripts.d.ts +19 -0
- package/dist/shared/projectScripts.js +18 -0
- package/dist/shared/qrCode.d.ts +87 -0
- package/dist/shared/qrCode.js +870 -0
- package/dist/shared/relayAuth.d.ts +27 -0
- package/dist/shared/relayAuth.js +83 -0
- package/dist/shared/relayClient.d.ts +58 -0
- package/dist/shared/relayClient.js +245 -0
- package/dist/shared/relayJwt.d.ts +39 -0
- package/dist/shared/relayJwt.js +2 -0
- package/dist/shared/relaySigning.d.ts +4 -0
- package/dist/shared/relaySigning.js +2 -0
- package/dist/shared/relayTracing.d.ts +25 -0
- package/dist/shared/relayTracing.js +2 -0
- package/dist/shared/relayUrl.d.ts +5 -0
- package/dist/shared/relayUrl.js +2 -0
- package/dist/shared/remote.d.ts +57 -0
- package/dist/shared/remote.js +2 -0
- package/dist/shared/schemaJson.d.ts +35 -0
- package/dist/shared/schemaJson.js +2 -0
- package/dist/shared/schemaYaml.d.ts +86 -0
- package/dist/shared/schemaYaml.js +99 -0
- package/dist/shared/searchRanking.d.ts +30 -0
- package/dist/shared/searchRanking.js +99 -0
- package/dist/shared/semver.d.ts +23 -0
- package/dist/shared/semver.js +124 -0
- package/dist/shared/serverSettings.d.ts +19 -0
- package/dist/shared/serverSettings.js +103 -0
- package/dist/shared/shell.d.ts +51 -0
- package/dist/shared/shell.js +408 -0
- package/dist/shared/sourceControl.d.ts +26 -0
- package/dist/shared/sourceControl.js +2 -0
- package/dist/shared/t3ProjectFile.d.ts +27 -0
- package/dist/shared/t3ProjectFile.js +25 -0
- package/dist/shared/terminalLabels.d.ts +16 -0
- package/dist/shared/terminalLabels.js +28 -0
- package/dist/shared/toolActivity.d.ts +16 -0
- package/dist/shared/toolActivity.js +159 -0
- package/dist/shared.d.ts +43036 -0
- package/dist/shared.js +25428 -12277
- package/dist/t3tools.d.ts +2 -0
- package/dist/t3tools.js +1 -1
- package/package.json +39 -21
- package/src/auth/index.ts +2 -0
- package/src/auth/pairing.ts +8 -5
- package/src/auth/service.ts +2 -1
- package/src/auth/transport.ts +4 -0
- package/src/auth/type.ts +6 -0
- package/src/bin.ts +10 -7
- package/src/cli/auth.ts +7 -1
- package/src/contracts/index.ts +8 -0
- package/src/orchestration/layer.ts +36 -0
- package/src/orchestration/service.ts +5 -0
- package/src/preview/index.ts +11 -0
- package/src/preview/service.ts +52 -0
- package/src/rpc/error.ts +2 -0
- package/src/rpc/layer.ts +5 -4
- package/src/rpc/operation.ts +5 -4
- package/src/rpc/ws-group.ts +6 -0
- package/src/runtime/index.ts +1 -0
- package/src/runtime/layer.ts +5 -0
- package/src/sql/node-sqlite-client.ts +3 -0
- package/dist/src/application/actions.d.ts +0 -25
- package/dist/src/application/error.d.ts +0 -3
- package/dist/src/application/index.d.ts +0 -4
- package/dist/src/application/layer.d.ts +0 -117
- package/dist/src/application/model-selection.d.ts +0 -34
- package/dist/src/application/models.d.ts +0 -8
- package/dist/src/application/project-commands.d.ts +0 -44
- package/dist/src/application/projects.d.ts +0 -23
- package/dist/src/application/service.d.ts +0 -243
- package/dist/src/application/shell-sequence.d.ts +0 -96
- package/dist/src/application/terminals.d.ts +0 -66
- package/dist/src/application/thread-commands.d.ts +0 -157
- package/dist/src/application/thread-update.d.ts +0 -8
- package/dist/src/application/thread-wait.d.ts +0 -106
- package/dist/src/application/threads.d.ts +0 -660
- package/dist/src/auth/error.d.ts +0 -50
- package/dist/src/auth/index.d.ts +0 -10
- package/dist/src/auth/layer.d.ts +0 -53
- package/dist/src/auth/local-base-dir.d.ts +0 -8
- package/dist/src/auth/local-origin.d.ts +0 -18
- package/dist/src/auth/local-token.d.ts +0 -26
- package/dist/src/auth/local.d.ts +0 -24
- package/dist/src/auth/pairing.d.ts +0 -22
- package/dist/src/auth/remote-error.d.ts +0 -3
- package/dist/src/auth/schema.d.ts +0 -58
- package/dist/src/auth/service.d.ts +0 -27
- package/dist/src/auth/transport.d.ts +0 -22
- package/dist/src/auth/type.d.ts +0 -83
- package/dist/src/cli/env/flag.d.ts +0 -2
- package/dist/src/cli/env/index.d.ts +0 -2
- package/dist/src/cli/env/selection-layer.d.ts +0 -3
- package/dist/src/cli/flags.d.ts +0 -20
- package/dist/src/cli/format/index.d.ts +0 -1
- package/dist/src/cli/format/output.d.ts +0 -12
- package/dist/src/cli/index.d.ts +0 -5
- package/dist/src/cli/runtime/index.d.ts +0 -1
- package/dist/src/cli/runtime/service.d.ts +0 -16
- package/dist/src/cli/scope/index.d.ts +0 -1
- package/dist/src/cli/scope/resolve.d.ts +0 -20
- package/dist/src/cli-path/layer.d.ts +0 -3
- package/dist/src/cli-path/service.d.ts +0 -8
- package/dist/src/config/config.d.ts +0 -49
- package/dist/src/config/credential/cipher-node.d.ts +0 -3
- package/dist/src/config/credential/cipher-web.d.ts +0 -3
- package/dist/src/config/credential/cipher.d.ts +0 -29
- package/dist/src/config/credential/env.d.ts +0 -3
- package/dist/src/config/credential/error.d.ts +0 -8
- package/dist/src/config/credential/index.d.ts +0 -6
- package/dist/src/config/credential/service.d.ts +0 -34
- package/dist/src/config/env/env.d.ts +0 -55
- package/dist/src/config/env/index.d.ts +0 -2
- package/dist/src/config/env/layout.d.ts +0 -11
- package/dist/src/config/environment-name/index.d.ts +0 -1
- package/dist/src/config/environment-name/name.d.ts +0 -10
- package/dist/src/config/error.d.ts +0 -11
- package/dist/src/config/index.d.ts +0 -10
- package/dist/src/config/keystore/error.d.ts +0 -8
- package/dist/src/config/keystore/file.d.ts +0 -9
- package/dist/src/config/keystore/index.d.ts +0 -4
- package/dist/src/config/keystore/keyring-node.d.ts +0 -4
- package/dist/src/config/keystore/service.d.ts +0 -33
- package/dist/src/config/paths/index.d.ts +0 -1
- package/dist/src/config/paths/paths.d.ts +0 -6
- package/dist/src/config/persist/file-mode.d.ts +0 -4
- package/dist/src/config/persist/migration.d.ts +0 -68
- package/dist/src/config/persist/persist.d.ts +0 -40
- package/dist/src/config/persist/schema.d.ts +0 -68
- package/dist/src/config/resolve/resolve.d.ts +0 -40
- package/dist/src/config/selection/index.d.ts +0 -1
- package/dist/src/config/selection/resolve.d.ts +0 -4
- package/dist/src/config/selection/service.d.ts +0 -10
- package/dist/src/config/types.d.ts +0 -36
- package/dist/src/config/url/error.d.ts +0 -10
- package/dist/src/config/url/index.d.ts +0 -2
- package/dist/src/config/url/url.d.ts +0 -6
- package/dist/src/connection/error.d.ts +0 -10
- package/dist/src/connection/index.d.ts +0 -4
- package/dist/src/connection/layer.d.ts +0 -3
- package/dist/src/connection/prepared.d.ts +0 -14
- package/dist/src/connection/service.d.ts +0 -13
- package/dist/src/connection/type.d.ts +0 -10
- package/dist/src/contracts/index.d.ts +0 -1
- package/dist/src/domain/error.d.ts +0 -57
- package/dist/src/domain/helpers.d.ts +0 -179
- package/dist/src/domain/model-config.d.ts +0 -330
- package/dist/src/domain/thread-activities.d.ts +0 -14
- package/dist/src/domain/thread-lifecycle.d.ts +0 -120
- package/dist/src/index.d.ts +0 -3
- package/dist/src/node/connection.d.ts +0 -2
- package/dist/src/node/index.d.ts +0 -1
- package/dist/src/orchestration/index.d.ts +0 -2
- package/dist/src/orchestration/layer.d.ts +0 -1419
- package/dist/src/orchestration/service.d.ts +0 -28
- package/dist/src/rpc/error.d.ts +0 -16
- package/dist/src/rpc/index.d.ts +0 -6
- package/dist/src/rpc/layer.d.ts +0 -5862
- package/dist/src/rpc/operation.d.ts +0 -24
- package/dist/src/rpc/service.d.ts +0 -15
- package/dist/src/rpc/session.d.ts +0 -22
- package/dist/src/rpc/ws-group.d.ts +0 -1984
- package/dist/src/runtime/index.d.ts +0 -1
- package/dist/src/runtime/layer.d.ts +0 -15
- package/dist/src/sql/node-sqlite-client.d.ts +0 -10
- package/dist/src/sql/service.d.ts +0 -17
- package/dist/src/t3tools/index.d.ts +0 -1
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import { Ab as PreviewSessionLookupError, Hy as PreviewAutomationRemoteUnavailableError, Iy as PreviewAutomationNoAvailableHostError, Jy as PreviewAutomationResultTooLargeError, My as PreviewAutomationInvalidSelectorError, Ny as PreviewAutomationMalformedResponseError, Oy as PreviewAutomationExecutionError, Wy as PreviewAutomationRequestQueueClosedError, bT as EnvironmentAuthorizationError, bb as PreviewInvalidUrlError, f as AtomCommand, ha as EnvironmentRegistry, ib as PreviewAutomationTimeoutError, ma as EnvironmentNotRegisteredError, ob as PreviewAutomationUnavailableError, on as EnvironmentRpcUnavailableError, rb as PreviewAutomationTargetNotEditableError, sb as PreviewAutomationUnsupportedClientError, tb as PreviewAutomationTabNotFoundError, wy as PreviewAutomationControlInterruptedError, yy as PreviewAutomationClientDisconnectedError, zT as EnvironmentId } from "../../shared.js";
|
|
2
|
+
import { Atom } from "effect/unstable/reactivity";
|
|
3
|
+
//#region upstream-t3code/packages/client-runtime/src/state/preview.d.ts
|
|
4
|
+
declare const previewAutomationHostFocusConcurrencyKey: (value: {
|
|
5
|
+
readonly environmentId: string;
|
|
6
|
+
readonly input: {
|
|
7
|
+
readonly clientId: string;
|
|
8
|
+
readonly connectionId: string;
|
|
9
|
+
};
|
|
10
|
+
}) => string;
|
|
11
|
+
declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>): {
|
|
12
|
+
list: (target: {
|
|
13
|
+
readonly environmentId: EnvironmentId;
|
|
14
|
+
readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
|
|
15
|
+
readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
|
|
16
|
+
}>;
|
|
17
|
+
}) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
18
|
+
readonly sessions: readonly {
|
|
19
|
+
readonly threadId: string;
|
|
20
|
+
readonly tabId: string;
|
|
21
|
+
readonly navStatus: {
|
|
22
|
+
readonly _tag: "Idle";
|
|
23
|
+
} | {
|
|
24
|
+
readonly _tag: "Loading";
|
|
25
|
+
readonly url: string;
|
|
26
|
+
readonly title: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly _tag: "Success";
|
|
29
|
+
readonly url: string;
|
|
30
|
+
readonly title: string;
|
|
31
|
+
} | {
|
|
32
|
+
readonly _tag: "LoadFailed";
|
|
33
|
+
readonly url: string;
|
|
34
|
+
readonly title: string;
|
|
35
|
+
readonly code: number;
|
|
36
|
+
readonly description: string;
|
|
37
|
+
};
|
|
38
|
+
readonly canGoBack: boolean;
|
|
39
|
+
readonly canGoForward: boolean;
|
|
40
|
+
readonly viewport?: {
|
|
41
|
+
readonly _tag: "freeform";
|
|
42
|
+
readonly width: number;
|
|
43
|
+
readonly height: number;
|
|
44
|
+
} | {
|
|
45
|
+
readonly _tag: "preset";
|
|
46
|
+
readonly width: number;
|
|
47
|
+
readonly height: number;
|
|
48
|
+
readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
|
|
49
|
+
} | {
|
|
50
|
+
readonly _tag: "fill";
|
|
51
|
+
} | undefined;
|
|
52
|
+
readonly updatedAt: string;
|
|
53
|
+
}[];
|
|
54
|
+
readonly serverEpoch: string;
|
|
55
|
+
readonly revision: number;
|
|
56
|
+
}, E | EnvironmentAuthorizationError | EnvironmentRpcUnavailableError | Error | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
|
|
57
|
+
events: (target: {
|
|
58
|
+
readonly environmentId: EnvironmentId;
|
|
59
|
+
readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{}>;
|
|
60
|
+
}) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
61
|
+
readonly threadId: string;
|
|
62
|
+
readonly tabId: string;
|
|
63
|
+
readonly createdAt: string;
|
|
64
|
+
readonly serverEpoch: string;
|
|
65
|
+
readonly revision: number;
|
|
66
|
+
readonly type: "opened";
|
|
67
|
+
readonly snapshot: {
|
|
68
|
+
readonly threadId: string;
|
|
69
|
+
readonly tabId: string;
|
|
70
|
+
readonly navStatus: {
|
|
71
|
+
readonly _tag: "Idle";
|
|
72
|
+
} | {
|
|
73
|
+
readonly _tag: "Loading";
|
|
74
|
+
readonly url: string;
|
|
75
|
+
readonly title: string;
|
|
76
|
+
} | {
|
|
77
|
+
readonly _tag: "Success";
|
|
78
|
+
readonly url: string;
|
|
79
|
+
readonly title: string;
|
|
80
|
+
} | {
|
|
81
|
+
readonly _tag: "LoadFailed";
|
|
82
|
+
readonly url: string;
|
|
83
|
+
readonly title: string;
|
|
84
|
+
readonly code: number;
|
|
85
|
+
readonly description: string;
|
|
86
|
+
};
|
|
87
|
+
readonly canGoBack: boolean;
|
|
88
|
+
readonly canGoForward: boolean;
|
|
89
|
+
readonly viewport?: {
|
|
90
|
+
readonly _tag: "freeform";
|
|
91
|
+
readonly width: number;
|
|
92
|
+
readonly height: number;
|
|
93
|
+
} | {
|
|
94
|
+
readonly _tag: "preset";
|
|
95
|
+
readonly width: number;
|
|
96
|
+
readonly height: number;
|
|
97
|
+
readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
|
|
98
|
+
} | {
|
|
99
|
+
readonly _tag: "fill";
|
|
100
|
+
} | undefined;
|
|
101
|
+
readonly updatedAt: string;
|
|
102
|
+
};
|
|
103
|
+
} | {
|
|
104
|
+
readonly threadId: string;
|
|
105
|
+
readonly tabId: string;
|
|
106
|
+
readonly createdAt: string;
|
|
107
|
+
readonly serverEpoch: string;
|
|
108
|
+
readonly revision: number;
|
|
109
|
+
readonly type: "navigated";
|
|
110
|
+
readonly snapshot: {
|
|
111
|
+
readonly threadId: string;
|
|
112
|
+
readonly tabId: string;
|
|
113
|
+
readonly navStatus: {
|
|
114
|
+
readonly _tag: "Idle";
|
|
115
|
+
} | {
|
|
116
|
+
readonly _tag: "Loading";
|
|
117
|
+
readonly url: string;
|
|
118
|
+
readonly title: string;
|
|
119
|
+
} | {
|
|
120
|
+
readonly _tag: "Success";
|
|
121
|
+
readonly url: string;
|
|
122
|
+
readonly title: string;
|
|
123
|
+
} | {
|
|
124
|
+
readonly _tag: "LoadFailed";
|
|
125
|
+
readonly url: string;
|
|
126
|
+
readonly title: string;
|
|
127
|
+
readonly code: number;
|
|
128
|
+
readonly description: string;
|
|
129
|
+
};
|
|
130
|
+
readonly canGoBack: boolean;
|
|
131
|
+
readonly canGoForward: boolean;
|
|
132
|
+
readonly viewport?: {
|
|
133
|
+
readonly _tag: "freeform";
|
|
134
|
+
readonly width: number;
|
|
135
|
+
readonly height: number;
|
|
136
|
+
} | {
|
|
137
|
+
readonly _tag: "preset";
|
|
138
|
+
readonly width: number;
|
|
139
|
+
readonly height: number;
|
|
140
|
+
readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
|
|
141
|
+
} | {
|
|
142
|
+
readonly _tag: "fill";
|
|
143
|
+
} | undefined;
|
|
144
|
+
readonly updatedAt: string;
|
|
145
|
+
};
|
|
146
|
+
} | {
|
|
147
|
+
readonly threadId: string;
|
|
148
|
+
readonly tabId: string;
|
|
149
|
+
readonly createdAt: string;
|
|
150
|
+
readonly serverEpoch: string;
|
|
151
|
+
readonly revision: number;
|
|
152
|
+
readonly type: "resized";
|
|
153
|
+
readonly snapshot: {
|
|
154
|
+
readonly threadId: string;
|
|
155
|
+
readonly tabId: string;
|
|
156
|
+
readonly navStatus: {
|
|
157
|
+
readonly _tag: "Idle";
|
|
158
|
+
} | {
|
|
159
|
+
readonly _tag: "Loading";
|
|
160
|
+
readonly url: string;
|
|
161
|
+
readonly title: string;
|
|
162
|
+
} | {
|
|
163
|
+
readonly _tag: "Success";
|
|
164
|
+
readonly url: string;
|
|
165
|
+
readonly title: string;
|
|
166
|
+
} | {
|
|
167
|
+
readonly _tag: "LoadFailed";
|
|
168
|
+
readonly url: string;
|
|
169
|
+
readonly title: string;
|
|
170
|
+
readonly code: number;
|
|
171
|
+
readonly description: string;
|
|
172
|
+
};
|
|
173
|
+
readonly canGoBack: boolean;
|
|
174
|
+
readonly canGoForward: boolean;
|
|
175
|
+
readonly viewport?: {
|
|
176
|
+
readonly _tag: "freeform";
|
|
177
|
+
readonly width: number;
|
|
178
|
+
readonly height: number;
|
|
179
|
+
} | {
|
|
180
|
+
readonly _tag: "preset";
|
|
181
|
+
readonly width: number;
|
|
182
|
+
readonly height: number;
|
|
183
|
+
readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
|
|
184
|
+
} | {
|
|
185
|
+
readonly _tag: "fill";
|
|
186
|
+
} | undefined;
|
|
187
|
+
readonly updatedAt: string;
|
|
188
|
+
};
|
|
189
|
+
} | {
|
|
190
|
+
readonly threadId: string;
|
|
191
|
+
readonly tabId: string;
|
|
192
|
+
readonly createdAt: string;
|
|
193
|
+
readonly serverEpoch: string;
|
|
194
|
+
readonly revision: number;
|
|
195
|
+
readonly type: "failed";
|
|
196
|
+
readonly url: string;
|
|
197
|
+
readonly title: string;
|
|
198
|
+
readonly code: number;
|
|
199
|
+
readonly description: string;
|
|
200
|
+
} | {
|
|
201
|
+
readonly threadId: string;
|
|
202
|
+
readonly tabId: string;
|
|
203
|
+
readonly createdAt: string;
|
|
204
|
+
readonly serverEpoch: string;
|
|
205
|
+
readonly revision: number;
|
|
206
|
+
readonly type: "closed";
|
|
207
|
+
}, E | EnvironmentAuthorizationError | import("effect/Cause").NoSuchElementError | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
|
|
208
|
+
discoveredServers: (target: {
|
|
209
|
+
readonly environmentId: EnvironmentId;
|
|
210
|
+
readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{}>;
|
|
211
|
+
}) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
212
|
+
readonly servers: readonly {
|
|
213
|
+
readonly host: string;
|
|
214
|
+
readonly port: number;
|
|
215
|
+
readonly url: string;
|
|
216
|
+
readonly processName: string | null;
|
|
217
|
+
readonly pid: number | null;
|
|
218
|
+
readonly terminal: {
|
|
219
|
+
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
220
|
+
readonly terminalId: string;
|
|
221
|
+
} | null;
|
|
222
|
+
}[];
|
|
223
|
+
readonly scannedAt: string;
|
|
224
|
+
}, E | EnvironmentAuthorizationError | import("effect/Cause").NoSuchElementError | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
|
|
225
|
+
automationRequests: (target: {
|
|
226
|
+
readonly environmentId: EnvironmentId;
|
|
227
|
+
readonly input: {
|
|
228
|
+
readonly clientId: string;
|
|
229
|
+
readonly environmentId: string & import("effect/Brand").Brand<"EnvironmentId">;
|
|
230
|
+
readonly supportedOperations?: readonly ("click" | "evaluate" | "navigate" | "open" | "press" | "recordingStart" | "recordingStop" | "resize" | "scroll" | "setColorScheme" | "snapshot" | "status" | "type" | "waitFor")[] | undefined;
|
|
231
|
+
};
|
|
232
|
+
}) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
233
|
+
readonly type: "connected";
|
|
234
|
+
readonly connectionId: string;
|
|
235
|
+
} | {
|
|
236
|
+
readonly type: "request";
|
|
237
|
+
readonly connectionId: string;
|
|
238
|
+
readonly request: {
|
|
239
|
+
readonly requestId: string;
|
|
240
|
+
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
241
|
+
readonly tabId?: string | undefined;
|
|
242
|
+
readonly tabIdExplicit?: boolean | undefined;
|
|
243
|
+
readonly operation: "click" | "evaluate" | "navigate" | "open" | "press" | "recordingStart" | "recordingStop" | "resize" | "scroll" | "setColorScheme" | "snapshot" | "status" | "type" | "waitFor";
|
|
244
|
+
readonly input: unknown;
|
|
245
|
+
readonly timeoutMs: number;
|
|
246
|
+
};
|
|
247
|
+
}, E | EnvironmentAuthorizationError | import("effect/Cause").NoSuchElementError | PreviewAutomationClientDisconnectedError | PreviewAutomationControlInterruptedError | PreviewAutomationExecutionError | PreviewAutomationInvalidSelectorError | PreviewAutomationMalformedResponseError | PreviewAutomationNoAvailableHostError | PreviewAutomationRemoteUnavailableError | PreviewAutomationRequestQueueClosedError | PreviewAutomationResultTooLargeError | PreviewAutomationTabNotFoundError | PreviewAutomationTargetNotEditableError | PreviewAutomationTimeoutError | PreviewAutomationUnavailableError | PreviewAutomationUnsupportedClientError | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
|
|
248
|
+
open: AtomCommand<{
|
|
249
|
+
readonly environmentId: EnvironmentId;
|
|
250
|
+
readonly input: {
|
|
251
|
+
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
252
|
+
readonly url?: string | undefined;
|
|
253
|
+
};
|
|
254
|
+
}, {
|
|
255
|
+
readonly threadId: string;
|
|
256
|
+
readonly tabId: string;
|
|
257
|
+
readonly navStatus: {
|
|
258
|
+
readonly _tag: "Idle";
|
|
259
|
+
} | {
|
|
260
|
+
readonly _tag: "Loading";
|
|
261
|
+
readonly url: string;
|
|
262
|
+
readonly title: string;
|
|
263
|
+
} | {
|
|
264
|
+
readonly _tag: "Success";
|
|
265
|
+
readonly url: string;
|
|
266
|
+
readonly title: string;
|
|
267
|
+
} | {
|
|
268
|
+
readonly _tag: "LoadFailed";
|
|
269
|
+
readonly url: string;
|
|
270
|
+
readonly title: string;
|
|
271
|
+
readonly code: number;
|
|
272
|
+
readonly description: string;
|
|
273
|
+
};
|
|
274
|
+
readonly canGoBack: boolean;
|
|
275
|
+
readonly canGoForward: boolean;
|
|
276
|
+
readonly viewport?: {
|
|
277
|
+
readonly _tag: "freeform";
|
|
278
|
+
readonly width: number;
|
|
279
|
+
readonly height: number;
|
|
280
|
+
} | {
|
|
281
|
+
readonly _tag: "preset";
|
|
282
|
+
readonly width: number;
|
|
283
|
+
readonly height: number;
|
|
284
|
+
readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
|
|
285
|
+
} | {
|
|
286
|
+
readonly _tag: "fill";
|
|
287
|
+
} | undefined;
|
|
288
|
+
readonly updatedAt: string;
|
|
289
|
+
}, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
290
|
+
navigate: AtomCommand<{
|
|
291
|
+
readonly environmentId: EnvironmentId;
|
|
292
|
+
readonly input: {
|
|
293
|
+
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
294
|
+
readonly tabId: string;
|
|
295
|
+
readonly url: string;
|
|
296
|
+
readonly resolvedTitle?: string | undefined;
|
|
297
|
+
};
|
|
298
|
+
}, {
|
|
299
|
+
readonly threadId: string;
|
|
300
|
+
readonly tabId: string;
|
|
301
|
+
readonly navStatus: {
|
|
302
|
+
readonly _tag: "Idle";
|
|
303
|
+
} | {
|
|
304
|
+
readonly _tag: "Loading";
|
|
305
|
+
readonly url: string;
|
|
306
|
+
readonly title: string;
|
|
307
|
+
} | {
|
|
308
|
+
readonly _tag: "Success";
|
|
309
|
+
readonly url: string;
|
|
310
|
+
readonly title: string;
|
|
311
|
+
} | {
|
|
312
|
+
readonly _tag: "LoadFailed";
|
|
313
|
+
readonly url: string;
|
|
314
|
+
readonly title: string;
|
|
315
|
+
readonly code: number;
|
|
316
|
+
readonly description: string;
|
|
317
|
+
};
|
|
318
|
+
readonly canGoBack: boolean;
|
|
319
|
+
readonly canGoForward: boolean;
|
|
320
|
+
readonly viewport?: {
|
|
321
|
+
readonly _tag: "freeform";
|
|
322
|
+
readonly width: number;
|
|
323
|
+
readonly height: number;
|
|
324
|
+
} | {
|
|
325
|
+
readonly _tag: "preset";
|
|
326
|
+
readonly width: number;
|
|
327
|
+
readonly height: number;
|
|
328
|
+
readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
|
|
329
|
+
} | {
|
|
330
|
+
readonly _tag: "fill";
|
|
331
|
+
} | undefined;
|
|
332
|
+
readonly updatedAt: string;
|
|
333
|
+
}, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
334
|
+
resize: AtomCommand<{
|
|
335
|
+
readonly environmentId: EnvironmentId;
|
|
336
|
+
readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
|
|
337
|
+
readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
|
|
338
|
+
readonly tabId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
339
|
+
readonly viewport: import("effect/Schema").Union<readonly [import("effect/Schema").TaggedStruct<"fill", {}>, import("effect/Schema").Struct<{
|
|
340
|
+
readonly _tag: import("effect/Schema").tag<"freeform">;
|
|
341
|
+
readonly width: import("effect/Schema").Int;
|
|
342
|
+
readonly height: import("effect/Schema").Int;
|
|
343
|
+
}>, import("effect/Schema").Struct<{
|
|
344
|
+
readonly _tag: import("effect/Schema").tag<"preset">;
|
|
345
|
+
readonly width: import("effect/Schema").Int;
|
|
346
|
+
readonly height: import("effect/Schema").Int;
|
|
347
|
+
readonly presetId: import("effect/Schema").Literals<readonly ["iphone-se", "iphone-xr", "iphone-12-pro", "iphone-14-pro-max", "pixel-7", "samsung-galaxy-s8-plus", "samsung-galaxy-s20-ultra", "ipad-mini", "ipad-air", "ipad-pro", "surface-pro-7", "surface-duo", "galaxy-z-fold-5", "asus-zenbook-fold", "samsung-galaxy-a51-71", "nest-hub", "nest-hub-max", "desktop-1920x1080", "desktop-1440x900", "laptop-1366x768", "laptop-1280x800", "ipad-pro-11", "iphone-15-pro", "pixel-8", "galaxy-s24"]>;
|
|
348
|
+
}>]>;
|
|
349
|
+
}>;
|
|
350
|
+
}, {
|
|
351
|
+
readonly threadId: string;
|
|
352
|
+
readonly tabId: string;
|
|
353
|
+
readonly navStatus: {
|
|
354
|
+
readonly _tag: "Idle";
|
|
355
|
+
} | {
|
|
356
|
+
readonly _tag: "Loading";
|
|
357
|
+
readonly url: string;
|
|
358
|
+
readonly title: string;
|
|
359
|
+
} | {
|
|
360
|
+
readonly _tag: "Success";
|
|
361
|
+
readonly url: string;
|
|
362
|
+
readonly title: string;
|
|
363
|
+
} | {
|
|
364
|
+
readonly _tag: "LoadFailed";
|
|
365
|
+
readonly url: string;
|
|
366
|
+
readonly title: string;
|
|
367
|
+
readonly code: number;
|
|
368
|
+
readonly description: string;
|
|
369
|
+
};
|
|
370
|
+
readonly canGoBack: boolean;
|
|
371
|
+
readonly canGoForward: boolean;
|
|
372
|
+
readonly viewport?: {
|
|
373
|
+
readonly _tag: "freeform";
|
|
374
|
+
readonly width: number;
|
|
375
|
+
readonly height: number;
|
|
376
|
+
} | {
|
|
377
|
+
readonly _tag: "preset";
|
|
378
|
+
readonly width: number;
|
|
379
|
+
readonly height: number;
|
|
380
|
+
readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
|
|
381
|
+
} | {
|
|
382
|
+
readonly _tag: "fill";
|
|
383
|
+
} | undefined;
|
|
384
|
+
readonly updatedAt: string;
|
|
385
|
+
}, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
386
|
+
refresh: AtomCommand<{
|
|
387
|
+
readonly environmentId: EnvironmentId;
|
|
388
|
+
readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
|
|
389
|
+
readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
|
|
390
|
+
readonly tabId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
391
|
+
}>;
|
|
392
|
+
}, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
393
|
+
close: AtomCommand<{
|
|
394
|
+
readonly environmentId: EnvironmentId;
|
|
395
|
+
readonly input: {
|
|
396
|
+
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
397
|
+
readonly tabId?: string | undefined;
|
|
398
|
+
};
|
|
399
|
+
}, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
400
|
+
reportStatus: AtomCommand<{
|
|
401
|
+
readonly environmentId: EnvironmentId;
|
|
402
|
+
readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
|
|
403
|
+
readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
|
|
404
|
+
readonly tabId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
405
|
+
readonly navStatus: import("effect/Schema").Union<readonly [import("effect/Schema").TaggedStruct<"Idle", {}>, import("effect/Schema").TaggedStruct<"Loading", {
|
|
406
|
+
readonly url: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
407
|
+
readonly title: import("effect/Schema").String;
|
|
408
|
+
}>, import("effect/Schema").TaggedStruct<"Success", {
|
|
409
|
+
readonly url: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
410
|
+
readonly title: import("effect/Schema").String;
|
|
411
|
+
}>, import("effect/Schema").TaggedStruct<"LoadFailed", {
|
|
412
|
+
readonly url: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
413
|
+
readonly title: import("effect/Schema").String;
|
|
414
|
+
readonly code: import("effect/Schema").Int;
|
|
415
|
+
readonly description: import("effect/Schema").String;
|
|
416
|
+
}>]>;
|
|
417
|
+
readonly canGoBack: import("effect/Schema").Boolean;
|
|
418
|
+
readonly canGoForward: import("effect/Schema").Boolean;
|
|
419
|
+
}>;
|
|
420
|
+
}, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
421
|
+
respondToAutomation: AtomCommand<{
|
|
422
|
+
readonly environmentId: EnvironmentId;
|
|
423
|
+
readonly input: {
|
|
424
|
+
readonly clientId: string;
|
|
425
|
+
readonly connectionId: string;
|
|
426
|
+
readonly requestId: string;
|
|
427
|
+
readonly ok: boolean;
|
|
428
|
+
readonly result?: unknown;
|
|
429
|
+
readonly error?: {
|
|
430
|
+
readonly _tag: string;
|
|
431
|
+
readonly message: string;
|
|
432
|
+
readonly detail?: unknown;
|
|
433
|
+
} | undefined;
|
|
434
|
+
};
|
|
435
|
+
}, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewAutomationClientDisconnectedError | PreviewAutomationControlInterruptedError | PreviewAutomationExecutionError | PreviewAutomationInvalidSelectorError | PreviewAutomationMalformedResponseError | PreviewAutomationNoAvailableHostError | PreviewAutomationRemoteUnavailableError | PreviewAutomationRequestQueueClosedError | PreviewAutomationResultTooLargeError | PreviewAutomationTabNotFoundError | PreviewAutomationTargetNotEditableError | PreviewAutomationTimeoutError | PreviewAutomationUnavailableError | PreviewAutomationUnsupportedClientError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
436
|
+
focusAutomationHost: AtomCommand<{
|
|
437
|
+
readonly environmentId: EnvironmentId;
|
|
438
|
+
readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
|
|
439
|
+
readonly clientId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
440
|
+
readonly environmentId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "EnvironmentId">;
|
|
441
|
+
readonly connectionId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
|
|
442
|
+
readonly focused: import("effect/Schema").Boolean;
|
|
443
|
+
}>;
|
|
444
|
+
}, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
445
|
+
};
|
|
446
|
+
//#endregion
|
|
447
|
+
export { createPreviewEnvironmentAtoms, previewAutomationHostFocusConcurrencyKey };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Fs as WS_METHODS, dr as createEnvironmentRpcCommand, fr as createEnvironmentRpcQueryAtomFamily, lr as createAtomCommandScheduler, mr as createEnvironmentRpcSubscriptionAtomFamily } from "../../shared.js";
|
|
2
|
+
//#region upstream-t3code/packages/client-runtime/src/state/preview.ts
|
|
3
|
+
const previewAutomationHostFocusConcurrencyKey = (value) => JSON.stringify([
|
|
4
|
+
value.environmentId,
|
|
5
|
+
value.input.clientId,
|
|
6
|
+
value.input.connectionId
|
|
7
|
+
]);
|
|
8
|
+
function createPreviewEnvironmentAtoms(runtime) {
|
|
9
|
+
const lifecycleScheduler = createAtomCommandScheduler();
|
|
10
|
+
const statusScheduler = createAtomCommandScheduler();
|
|
11
|
+
const automationScheduler = createAtomCommandScheduler();
|
|
12
|
+
const lifecycleConcurrency = {
|
|
13
|
+
mode: "serial",
|
|
14
|
+
key: ({ environmentId, input }) => JSON.stringify([environmentId, input.threadId])
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
list: createEnvironmentRpcQueryAtomFamily(runtime, {
|
|
18
|
+
label: "environment-data:preview:list",
|
|
19
|
+
tag: WS_METHODS.previewList,
|
|
20
|
+
staleTimeMs: 5e3
|
|
21
|
+
}),
|
|
22
|
+
events: createEnvironmentRpcSubscriptionAtomFamily(runtime, {
|
|
23
|
+
label: "environment-data:preview:events",
|
|
24
|
+
tag: WS_METHODS.subscribePreviewEvents
|
|
25
|
+
}),
|
|
26
|
+
discoveredServers: createEnvironmentRpcSubscriptionAtomFamily(runtime, {
|
|
27
|
+
label: "environment-data:preview:discovered-servers",
|
|
28
|
+
tag: WS_METHODS.subscribeDiscoveredLocalServers
|
|
29
|
+
}),
|
|
30
|
+
automationRequests: createEnvironmentRpcSubscriptionAtomFamily(runtime, {
|
|
31
|
+
label: "environment-data:preview:automation-requests",
|
|
32
|
+
tag: WS_METHODS.previewAutomationConnect,
|
|
33
|
+
idleTtlMs: 0
|
|
34
|
+
}),
|
|
35
|
+
open: createEnvironmentRpcCommand(runtime, {
|
|
36
|
+
label: "environment-data:preview:open",
|
|
37
|
+
tag: WS_METHODS.previewOpen,
|
|
38
|
+
scheduler: lifecycleScheduler,
|
|
39
|
+
concurrency: lifecycleConcurrency
|
|
40
|
+
}),
|
|
41
|
+
navigate: createEnvironmentRpcCommand(runtime, {
|
|
42
|
+
label: "environment-data:preview:navigate",
|
|
43
|
+
tag: WS_METHODS.previewNavigate,
|
|
44
|
+
scheduler: lifecycleScheduler,
|
|
45
|
+
concurrency: lifecycleConcurrency
|
|
46
|
+
}),
|
|
47
|
+
resize: createEnvironmentRpcCommand(runtime, {
|
|
48
|
+
label: "environment-data:preview:resize",
|
|
49
|
+
tag: WS_METHODS.previewResize,
|
|
50
|
+
scheduler: lifecycleScheduler,
|
|
51
|
+
concurrency: lifecycleConcurrency
|
|
52
|
+
}),
|
|
53
|
+
refresh: createEnvironmentRpcCommand(runtime, {
|
|
54
|
+
label: "environment-data:preview:refresh",
|
|
55
|
+
tag: WS_METHODS.previewRefresh,
|
|
56
|
+
scheduler: lifecycleScheduler,
|
|
57
|
+
concurrency: lifecycleConcurrency
|
|
58
|
+
}),
|
|
59
|
+
close: createEnvironmentRpcCommand(runtime, {
|
|
60
|
+
label: "environment-data:preview:close",
|
|
61
|
+
tag: WS_METHODS.previewClose,
|
|
62
|
+
scheduler: lifecycleScheduler,
|
|
63
|
+
concurrency: lifecycleConcurrency
|
|
64
|
+
}),
|
|
65
|
+
reportStatus: createEnvironmentRpcCommand(runtime, {
|
|
66
|
+
label: "environment-data:preview:report-status",
|
|
67
|
+
tag: WS_METHODS.previewReportStatus,
|
|
68
|
+
scheduler: statusScheduler,
|
|
69
|
+
concurrency: {
|
|
70
|
+
mode: "latest",
|
|
71
|
+
key: ({ environmentId, input }) => JSON.stringify([
|
|
72
|
+
environmentId,
|
|
73
|
+
input.threadId,
|
|
74
|
+
input.tabId
|
|
75
|
+
])
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
respondToAutomation: createEnvironmentRpcCommand(runtime, {
|
|
79
|
+
label: "environment-data:preview:automation-respond",
|
|
80
|
+
tag: WS_METHODS.previewAutomationRespond,
|
|
81
|
+
scheduler: automationScheduler,
|
|
82
|
+
concurrency: {
|
|
83
|
+
mode: "singleFlight",
|
|
84
|
+
key: ({ environmentId, input }) => JSON.stringify([
|
|
85
|
+
environmentId,
|
|
86
|
+
input.connectionId,
|
|
87
|
+
input.requestId
|
|
88
|
+
])
|
|
89
|
+
}
|
|
90
|
+
}),
|
|
91
|
+
focusAutomationHost: createEnvironmentRpcCommand(runtime, {
|
|
92
|
+
label: "environment-data:preview:automation-focus-host",
|
|
93
|
+
tag: WS_METHODS.previewAutomationFocusHost,
|
|
94
|
+
scheduler: automationScheduler,
|
|
95
|
+
concurrency: {
|
|
96
|
+
mode: "latest",
|
|
97
|
+
key: previewAutomationHostFocusConcurrencyKey
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { createPreviewEnvironmentAtoms, previewAutomationHostFocusConcurrencyKey };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jw as ScopedProjectRef, l_ as SidebarProjectGroupingMode, rt as EnvironmentProject, wg as ClientSettings } from "../../shared.js";
|
|
2
|
+
//#region upstream-t3code/packages/client-runtime/src/state/projectGrouping.d.ts
|
|
3
|
+
interface ProjectGroupingSettings {
|
|
4
|
+
readonly sidebarProjectGroupingMode: SidebarProjectGroupingMode;
|
|
5
|
+
readonly sidebarProjectGroupingOverrides: Record<string, SidebarProjectGroupingMode>;
|
|
6
|
+
}
|
|
7
|
+
type ProjectGroupingMode = SidebarProjectGroupingMode;
|
|
8
|
+
declare function selectProjectGroupingSettings(settings: ClientSettings): ProjectGroupingSettings;
|
|
9
|
+
declare function derivePhysicalProjectKeyFromPath(environmentId: string, cwd: string): string;
|
|
10
|
+
declare function derivePhysicalProjectKey(project: Pick<EnvironmentProject, "environmentId" | "workspaceRoot">): string;
|
|
11
|
+
declare function deriveProjectGroupingOverrideKey(project: Pick<EnvironmentProject, "environmentId" | "workspaceRoot">): string;
|
|
12
|
+
declare function getProjectOrderKey(project: Pick<EnvironmentProject, "environmentId" | "workspaceRoot">): string;
|
|
13
|
+
declare function resolveProjectGroupingMode(project: Pick<EnvironmentProject, "environmentId" | "workspaceRoot">, settings: ProjectGroupingSettings): SidebarProjectGroupingMode;
|
|
14
|
+
declare function deriveLogicalProjectKey(project: Pick<EnvironmentProject, "environmentId" | "id" | "workspaceRoot" | "repositoryIdentity">, options?: {
|
|
15
|
+
readonly groupingMode?: SidebarProjectGroupingMode;
|
|
16
|
+
}): string;
|
|
17
|
+
declare function deriveLogicalProjectKeyFromSettings(project: Pick<EnvironmentProject, "environmentId" | "id" | "workspaceRoot" | "repositoryIdentity">, settings: ProjectGroupingSettings): string;
|
|
18
|
+
declare function deriveLogicalProjectKeyFromRef(projectRef: ScopedProjectRef, project: Pick<EnvironmentProject, "environmentId" | "id" | "workspaceRoot" | "repositoryIdentity"> | null | undefined, options?: {
|
|
19
|
+
readonly groupingMode?: SidebarProjectGroupingMode;
|
|
20
|
+
}): string;
|
|
21
|
+
declare function deriveProjectGroupLabel(input: {
|
|
22
|
+
readonly representative: Pick<EnvironmentProject, "title" | "repositoryIdentity">;
|
|
23
|
+
readonly members: ReadonlyArray<Pick<EnvironmentProject, "title" | "repositoryIdentity">>;
|
|
24
|
+
}): string;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ProjectGroupingMode, ProjectGroupingSettings, deriveLogicalProjectKey, deriveLogicalProjectKeyFromRef, deriveLogicalProjectKeyFromSettings, derivePhysicalProjectKey, derivePhysicalProjectKeyFromPath, deriveProjectGroupLabel, deriveProjectGroupingOverrideKey, getProjectOrderKey, resolveProjectGroupingMode, selectProjectGroupingSettings };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn as normalizeProjectPathForComparison, li as scopedProjectKey, si as scopeProjectRef } from "../../shared.js";
|
|
2
|
+
//#region upstream-t3code/packages/client-runtime/src/state/projectGrouping.ts
|
|
3
|
+
function selectProjectGroupingSettings(settings) {
|
|
4
|
+
return {
|
|
5
|
+
sidebarProjectGroupingMode: settings.sidebarProjectGroupingMode,
|
|
6
|
+
sidebarProjectGroupingOverrides: settings.sidebarProjectGroupingOverrides
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function uniqueNonEmptyValues(values) {
|
|
10
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11
|
+
const unique = [];
|
|
12
|
+
for (const value of values) {
|
|
13
|
+
const trimmed = value?.trim();
|
|
14
|
+
if (!trimmed || seen.has(trimmed)) continue;
|
|
15
|
+
seen.add(trimmed);
|
|
16
|
+
unique.push(trimmed);
|
|
17
|
+
}
|
|
18
|
+
return unique;
|
|
19
|
+
}
|
|
20
|
+
function deriveRepositoryRelativeProjectPath(project) {
|
|
21
|
+
const rootPath = project.repositoryIdentity?.rootPath?.trim();
|
|
22
|
+
if (!rootPath) return null;
|
|
23
|
+
const normalizedProjectPath = normalizeProjectPathForComparison(project.workspaceRoot);
|
|
24
|
+
const normalizedRootPath = normalizeProjectPathForComparison(rootPath);
|
|
25
|
+
if (normalizedProjectPath.length === 0 || normalizedRootPath.length === 0) return null;
|
|
26
|
+
if (normalizedProjectPath === normalizedRootPath) return "";
|
|
27
|
+
const rootPrefix = `${normalizedRootPath}${normalizedRootPath.includes("\\") ? "\\" : "/"}`;
|
|
28
|
+
if (!normalizedProjectPath.startsWith(rootPrefix)) return null;
|
|
29
|
+
return normalizedProjectPath.slice(rootPrefix.length).replaceAll("\\", "/");
|
|
30
|
+
}
|
|
31
|
+
function derivePhysicalProjectKeyFromPath(environmentId, cwd) {
|
|
32
|
+
return `${environmentId}:${normalizeProjectPathForComparison(cwd)}`;
|
|
33
|
+
}
|
|
34
|
+
function derivePhysicalProjectKey(project) {
|
|
35
|
+
return derivePhysicalProjectKeyFromPath(project.environmentId, project.workspaceRoot);
|
|
36
|
+
}
|
|
37
|
+
function deriveProjectGroupingOverrideKey(project) {
|
|
38
|
+
return derivePhysicalProjectKey(project);
|
|
39
|
+
}
|
|
40
|
+
function getProjectOrderKey(project) {
|
|
41
|
+
return derivePhysicalProjectKey(project);
|
|
42
|
+
}
|
|
43
|
+
function resolveProjectGroupingMode(project, settings) {
|
|
44
|
+
return settings.sidebarProjectGroupingOverrides?.[deriveProjectGroupingOverrideKey(project)] ?? settings.sidebarProjectGroupingMode;
|
|
45
|
+
}
|
|
46
|
+
function deriveRepositoryScopedKey(project, groupingMode) {
|
|
47
|
+
const canonicalKey = project.repositoryIdentity?.canonicalKey;
|
|
48
|
+
if (!canonicalKey) return null;
|
|
49
|
+
if (groupingMode === "repository") return canonicalKey;
|
|
50
|
+
const relativeProjectPath = deriveRepositoryRelativeProjectPath(project);
|
|
51
|
+
if (relativeProjectPath === null) return canonicalKey;
|
|
52
|
+
return relativeProjectPath.length === 0 ? canonicalKey : `${canonicalKey}::${relativeProjectPath}`;
|
|
53
|
+
}
|
|
54
|
+
function deriveLogicalProjectKey(project, options) {
|
|
55
|
+
const groupingMode = options?.groupingMode ?? "repository";
|
|
56
|
+
if (groupingMode === "separate") return derivePhysicalProjectKey(project);
|
|
57
|
+
return deriveRepositoryScopedKey(project, groupingMode) ?? derivePhysicalProjectKey(project) ?? scopedProjectKey(scopeProjectRef(project.environmentId, project.id));
|
|
58
|
+
}
|
|
59
|
+
function deriveLogicalProjectKeyFromSettings(project, settings) {
|
|
60
|
+
return deriveLogicalProjectKey(project, { groupingMode: resolveProjectGroupingMode(project, settings) });
|
|
61
|
+
}
|
|
62
|
+
function deriveLogicalProjectKeyFromRef(projectRef, project, options) {
|
|
63
|
+
return project ? deriveLogicalProjectKey(project, options) : scopedProjectKey(projectRef);
|
|
64
|
+
}
|
|
65
|
+
function deriveProjectGroupLabel(input) {
|
|
66
|
+
const sharedDisplayNames = uniqueNonEmptyValues(input.members.map((member) => member.repositoryIdentity?.displayName));
|
|
67
|
+
if (sharedDisplayNames.length === 1) return sharedDisplayNames[0];
|
|
68
|
+
const sharedRepositoryNames = uniqueNonEmptyValues(input.members.map((member) => member.repositoryIdentity?.name));
|
|
69
|
+
if (sharedRepositoryNames.length === 1) return sharedRepositoryNames[0];
|
|
70
|
+
return input.representative.title;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { deriveLogicalProjectKey, deriveLogicalProjectKeyFromRef, deriveLogicalProjectKeyFromSettings, derivePhysicalProjectKey, derivePhysicalProjectKeyFromPath, deriveProjectGroupLabel, deriveProjectGroupingOverrideKey, getProjectOrderKey, resolveProjectGroupingMode, selectProjectGroupingSettings };
|