diff --git a/packages/experimental/liveshare-protocol/tsconfig.client.json b/packages/experimental/liveshare-protocol/tsconfig.client.json new file mode 100644 index 0000000000..abfaf50195 --- /dev/null +++ b/packages/experimental/liveshare-protocol/tsconfig.client.json @@ -0,0 +1,13 @@ +{ + "extends": "../../../tsconfig.base.client.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib/types", + "tsBuildInfoFile": "lib/tsconfig.client.tsbuildinfo" + }, + "files": [ + "src/viewer-carrier.ts", + "src/viewer-states.ts", + "src/identity/types.ts" + ] +} diff --git a/packages/experimental/liveshare-protocol/tsconfig.host.json b/packages/experimental/liveshare-protocol/tsconfig.host.json new file mode 100644 index 0000000000..f5a809fc26 --- /dev/null +++ b/packages/experimental/liveshare-protocol/tsconfig.host.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib/types", + "tsBuildInfoFile": "lib/tsconfig.host.tsbuildinfo" + }, + "files": [ + "src/index.ts", + "src/tunnel-protocol.ts", + "src/viewer-carrier.ts", + "src/viewer-states.ts", + "src/identity/index.ts", + "src/identity/keys.ts", + "src/identity/mock.ts", + "src/identity/types.ts" + ], + "references": [ + { + "path": "../../util/brand" + } + ] +} diff --git a/packages/experimental/liveshare-protocol/tsconfig.json b/packages/experimental/liveshare-protocol/tsconfig.json index 49c9b83b15..2a0b0e33f7 100644 --- a/packages/experimental/liveshare-protocol/tsconfig.json +++ b/packages/experimental/liveshare-protocol/tsconfig.json @@ -1,14 +1,7 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/types", - "tsBuildInfoFile": "lib/tsconfig.tsbuildinfo" - }, - "include": [ - "src" - ], + "files": [], "references": [ - { "path": "../../util/brand" } + { "path": "./tsconfig.host.json" }, + { "path": "./tsconfig.client.json" } ] } diff --git a/packages/experimental/liveshare-protocol/tsdown.config.ts b/packages/experimental/liveshare-protocol/tsdown.config.ts index c85992b686..3c0c1ca7b5 100644 --- a/packages/experimental/liveshare-protocol/tsdown.config.ts +++ b/packages/experimental/liveshare-protocol/tsdown.config.ts @@ -1,7 +1,12 @@ import type { UserConfig } from 'tsdown' import { defineConfig } from 'tsdown' -/** Dependency-free Host code shared by the owner bundle and the Relay: no browser face. */ +/** + * Dependency-free code shared by the owner bundle and the Relay. The package carries two compiler + * faces — a Host leaf for the wire codecs and identity contract, and a browser leaf for the viewer + * carrier — but only the Host face publishes runtime modules; the carrier reaches a browser as + * generated source text, so it needs no client bundle. + */ export default defineConfig(({ env }) => { if (env?.DSH_BUILD_FACE === 'client') return { entry: '' } satisfies UserConfig return { diff --git a/tsconfig.client.json b/tsconfig.client.json index 91cfdb1075..7e4eb91773 100644 --- a/tsconfig.client.json +++ b/tsconfig.client.json @@ -89,7 +89,7 @@ { "path": "./packages/client/ui-primitives" }, { "path": "./packages/client/modules" }, { "path": "./packages/experimental/inspector/tsconfig.client.json" }, - { "path": "./packages/experimental/liveshare-protocol" }, + { "path": "./packages/experimental/liveshare-protocol/tsconfig.client.json" }, { "path": "./packages/experimental/session-inspector" }, { "path": "./packages/client/hmr" }, { "path": "./packages/client/connection/tsconfig.client.json" }, diff --git a/tsconfig.host.json b/tsconfig.host.json index df6820bd48..a8196f66f8 100644 --- a/tsconfig.host.json +++ b/tsconfig.host.json @@ -528,7 +528,7 @@ { "path": "./packages/experimental/agent-team" }, { "path": "./packages/experimental/agent-team-profile" }, { "path": "./packages/experimental/inspector-profile" }, - { "path": "./packages/experimental/liveshare-protocol" }, + { "path": "./packages/experimental/liveshare-protocol/tsconfig.host.json" }, { "path": "./packages/experimental/tool-agent-team" }, { "path": "./packages/workflow/workflow" }, { "path": "./packages/workflow/workflow-ptc" },