Преглед на файлове

refactor(tsconfig): single root solution graph over host/client aggregates

Root tsconfig.json becomes a pure solution (files:[] + two references);
the former root host aggregate moves verbatim to tsconfig.host.json.
New tsconfig.base.client.json carries the shared client compiler shape
(jsx/DOM lib/types:[]), and tsconfig.client.json plus the 12
packages/client tsconfigs extend it instead of restating the trio.
tsconfig.build.json is deleted: the solution covers the full emit graph,
absorbing the command-goal typecheck/build drift.

Consumers migrate to the single graph: typecheck/build scripts and the
lefthook pre-push hook run bare `tsc -b` (pre-push now covers the client
side); the run-gates build gate needs typecheck so two concurrent tsc -b
runs cannot race the same tsbuildinfo; ts-project.ts and the standalone
doc-typecheck mode seed tsconfig.host.json explicitly (never the root
solution — flattening host+client into one program collides the cordis
Context merges); verify-cordis-config BFS seeds the root solution alone.

Per missions/tsconfig-single-graph-migration.md §2–§3.
imccyu преди 2 месеца
родител
ревизия
19e6f7d907

+ 1 - 1
lefthook.yml

@@ -20,4 +20,4 @@ pre-commit:
 pre-push:
   jobs:
     - name: typecheck
-      run: node_modules/.bin/tsc -b tsconfig.json --pretty false
+      run: node_modules/.bin/tsc -b --pretty false

+ 2 - 2
package.json

@@ -14,10 +14,10 @@
     "website"
   ],
   "scripts": {
-    "build": "tsc -b tsconfig.build.json && tsdown",
+    "build": "tsc -b && tsdown",
     "build:web": "pnpm --filter @deepseek-ai/dsh-frontend run build",
     "clean:build": "rm -rf .typecheck packages/*/*/lib vendor/*/lib *.tsbuildinfo",
-    "typecheck": "tsc -b tsconfig.json tsconfig.client.json",
+    "typecheck": "tsc -b",
     "lint": "eslint .",
     "lint:fix": "eslint . --fix",
     "duplication": "jscpd --config .jscpd.json packages scripts",

+ 2 - 8
packages/client/connection/tsconfig.json

@@ -1,14 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 8
packages/client/i18n/tsconfig.json

@@ -1,14 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 8
packages/client/runtime/tsconfig.json

@@ -1,14 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 9
packages/client/ui-conversation/tsconfig.json

@@ -1,15 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "jsx": "react-jsx",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 9
packages/client/ui-layout/tsconfig.json

@@ -1,15 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "jsx": "react-jsx",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 9
packages/client/ui-primitives/tsconfig.json

@@ -1,15 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "jsx": "react-jsx",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 9
packages/client/ui-sidebar/tsconfig.json

@@ -1,15 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "jsx": "react-jsx",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 8
packages/client/ui-slots/tsconfig.json

@@ -1,14 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 8
packages/client/ui-theme/tsconfig.json

@@ -1,14 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 9
packages/client/ui-trajectory/tsconfig.json

@@ -1,15 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "jsx": "react-jsx",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 9
packages/client/web-react/tsconfig.json

@@ -1,15 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "jsx": "react-jsx",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 2 - 9
packages/client/web/tsconfig.json

@@ -1,15 +1,8 @@
 {
-  "extends": "../../../tsconfig.base.json",
+  "extends": "../../../tsconfig.base.client.json",
   "compilerOptions": {
     "rootDir": "src",
-    "outDir": "lib/types",
-    "jsx": "react-jsx",
-    "lib": [
-      "ES2024",
-      "DOM",
-      "DOM.Iterable"
-    ],
-    "types": []
+    "outDir": "lib/types"
   },
   "include": [
     "src"

+ 16 - 6
scripts/doc-typecheck.ts

@@ -55,15 +55,20 @@ const configHost: ts.ParseConfigFileHost = {
   },
 }
 
-/** Load root settings and redirect workspace aliases to declarations from the coordinated build. */
+/**
+ * Load host-aggregate settings and redirect workspace aliases to declarations
+ * from the coordinated build. Doc fragments speak the host vocabulary; the host
+ * aggregate (never the root solution — it has no compilerOptions) carries the
+ * workspace paths via tsconfig.base.json.
+ */
 function builtTypeCompilerOptions(): ts.CompilerOptions {
-  const configPath = join(root, 'tsconfig.json')
+  const configPath = join(root, 'tsconfig.host.json')
   const parsed = ts.getParsedCommandLineOfConfigFile(configPath, {}, configHost)
   if (!parsed) throw new Error(`doc-typecheck: cannot parse ${configPath}`)
   if (parsed.errors.length > 0) {
     throw new Error(parsed.errors.map(error => ts.flattenDiagnosticMessageText(error.messageText, '\n')).join('\n'))
   }
-  if (parsed.options.paths === undefined) throw new Error('doc-typecheck: root tsconfig has no workspace paths')
+  if (parsed.options.paths === undefined) throw new Error('doc-typecheck: host tsconfig has no workspace paths')
   const paths = Object.fromEntries(Object.entries(parsed.options.paths).map(([specifier, candidates]) => [
     specifier,
     candidates.map(builtDeclarationPath),
@@ -125,9 +130,14 @@ function formatDiagnostics(diagnostics: readonly ts.Diagnostic[], blocks: Block[
   return remapBlockPaths(formatted, blocks)
 }
 
-/** Reuse the repo typecheck graph references from a temp project one directory below root. */
+/**
+ * Reuse the host-aggregate references from a temp project one directory below
+ * root. Doc fragments speak the host vocabulary, so the standalone project
+ * seeds tsconfig.host.json (never the root solution: flattening host+client
+ * into one program collides the cordis Context merges).
+ */
 function workspaceReferences(): { path: string }[] {
-  const file = join(root, 'tsconfig.json')
+  const file = join(root, 'tsconfig.host.json')
   // Parse with TypeScript's own JSONC reader: a regex comment stripper corrupts the `/*/` path
   // candidate in the workspace wildcard.
   const result = ts.readConfigFile(file, path => readFileSync(path, 'utf8'))
@@ -144,7 +154,7 @@ function workspaceReferences(): { path: string }[] {
 /** The standalone temp project used when no coordinated build owns declaration freshness. */
 function tempTsconfig(): string {
   return JSON.stringify({
-    extends: '../tsconfig.json',
+    extends: '../tsconfig.host.json',
     compilerOptions: {
       noUnusedLocals: false,
       noUnusedParameters: false,

+ 1 - 1
scripts/gen-scoped-events.ts

@@ -370,7 +370,7 @@ function quote(value: string): string {
 
 /**
  * Render the generated scoped-event resolver module for one repository root.
- * @param projectRoot - repository root carrying tsconfig.json.
+ * @param projectRoot - repository root carrying tsconfig.host.json.
  * @returns complete generated TypeScript source.
  */
 export function renderScopedEvents(projectRoot: string = root): string {

+ 4 - 1
scripts/run-gates.ts

@@ -228,7 +228,10 @@ function ciPrimaryGates(): Gate[] {
     ...docSyncLeafGates(),
     pnpmScript('module-graph', 'verify-module-graph', { label: 'module graph' }),
     pnpmScript('knip', 'knip'),
-    pnpmScript('build', 'build'),
+    // typecheck and build now drive the same root solution graph; without the
+    // dependency two concurrent `tsc -b` runs race the same tsbuildinfo files.
+    // The tsc step is an incremental no-op after typecheck.
+    pnpmScript('build', 'build', { needs: ['typecheck'] }),
     pnpmScript('publint', 'publint', { needs: ['build'] }),
     pnpmScript('node-next-types', 'verify-node-next-types', {
       label: 'node-next types',

+ 6 - 2
scripts/ts-project.ts

@@ -22,9 +22,13 @@ const configHost: ts.ParseConfigFileHost = {
   },
 }
 
-/** Parse a root tsconfig and flatten all referenced projects into one semantic graph. */
+/**
+ * Parse the host aggregate tsconfig and flatten all referenced projects into one
+ * semantic graph. Never seed the root solution: flattening host+client into one
+ * program collides the cordis Context merges.
+ */
 function loadProjectGraph(projectRoot: string): ProjectGraph {
-  const rootConfigPath = resolve(projectRoot, 'tsconfig.json')
+  const rootConfigPath = resolve(projectRoot, 'tsconfig.host.json')
   const rootConfig = parseConfig(rootConfigPath)
   const rootNames = new Set<string>()
   const visited = new Set<string>()

+ 6 - 5
scripts/verify-cordis-config.ts

@@ -152,12 +152,13 @@ function localPackageDirectories(): Map<string, string> {
 }
 
 function rootProjectReferences(): Set<string> {
-  // Typecheck runs two sibling aggregates (root = host program,
-  // tsconfig.client.json = client program; the two sides merge cordis Context
-  // under the same keys, so one program cannot see both). Seed both and follow
-  // any nested aggregate references to collect the covered leaf project set.
+  // The root solution references the host and client aggregates (the two
+  // sides merge cordis Context under the same keys, so one program cannot see
+  // both — but this BFS only collects reference paths, it never forms a
+  // program). Seed the solution and follow nested aggregate references to
+  // collect the covered leaf project set.
   const collected = new Set<string>()
-  const queue = [resolve(root, 'tsconfig.json'), resolve(root, 'tsconfig.client.json')]
+  const queue = [resolve(root, 'tsconfig.json')]
   const seen = new Set<string>()
   for (let file = queue.pop(); file !== undefined; file = queue.pop()) {
     if (seen.has(file)) continue

+ 11 - 0
tsconfig.base.client.json

@@ -0,0 +1,11 @@
+{
+  // Client-side compiler shape shared by tsconfig.client.json and every
+  // packages/client/* package: browser lib surface, React JSX, no ambient
+  // node types (packages that need them override locally).
+  "extends": "./tsconfig.base.json",
+  "compilerOptions": {
+    "jsx": "react-jsx",
+    "lib": ["ES2024", "DOM", "DOM.Iterable"],
+    "types": []
+  }
+}

+ 3 - 4
tsconfig.client.json

@@ -4,14 +4,13 @@
   // under the same keys (sessions, loader) with different services; shared
   // leaves (session/llm/tools/apiproxy/...) build once and are referenced by
   // both programs through each client package's own references.
-  "extends": "./tsconfig.base.json",
+  "extends": "./tsconfig.base.client.json",
   "compilerOptions": {
     "noEmit": true,
     "rewriteRelativeImportExtensions": false,
-    "jsx": "react-jsx",
-    "lib": ["ES2024", "DOM", "DOM.Iterable"],
     // Tests execute under vitest on node (e2e files spawn processes); browser
-    // purity of package src is each package's own tsconfig + verify-client-closure.
+    // purity of package src is each package's own tsconfig plus
+    // scripts/client-bundle-purity.spec.ts.
     "types": ["node"]
   },
   "include": [

+ 26 - 16
tsconfig.build.json → tsconfig.host.json

@@ -1,5 +1,25 @@
 {
-  "files": [],
+  // Host aggregate (one of the two check units; see tsconfig.json). packages/client
+  // type-checks in tsconfig.client.json: the two sides merge cordis Context under
+  // the same keys, one program cannot see both.
+  "extends": "./tsconfig.base.json",
+  "compilerOptions": {
+    "noEmit": true,
+    "rewriteRelativeImportExtensions": false
+  },
+  "include": [
+    "examples/*/src/**/*.ts",
+    "examples/*/start.ts",
+    "examples/*/tests/**/*.ts",
+    "packages/*/*/tests/**/*.ts",
+    "scripts/**/*.ts",
+    "website/**/*.ts",
+    "website/.vitepress/**/*.ts"
+  ],
+  "exclude": [
+    "packages/client/**",
+    "scripts/client-bundle-purity.spec.ts"
+  ],
   "references": [
     { "path": "./vendor/cosmokit" },
     { "path": "./vendor/schemastery" },
@@ -33,7 +53,9 @@
     { "path": "./packages/goal/goal" },
     { "path": "./packages/goal/tool-goal" },
     { "path": "./packages/goal/goal-session" },
+    { "path": "./packages/goal/command-goal" },
     { "path": "./packages/context/time-context" },
+    { "path": "./packages/context/session-reference" },
     { "path": "./packages/ui/user-interaction" },
     { "path": "./packages/ui/user-approval" },
     { "path": "./packages/ui/permission" },
@@ -53,9 +75,6 @@
     { "path": "./packages/pty/tool-pty" },
     { "path": "./packages/code-runtime/code-runtime" },
     { "path": "./packages/code-runtime/code-runtime-worker" },
-    { "path": "./packages/compact/compact" },
-    { "path": "./packages/compact/compact-basic" },
-    { "path": "./packages/compact/compact-tool-result-prune" },
     { "path": "./packages/llm/llm-deepseek" },
     { "path": "./packages/llm/llm-pi-ai" },
     { "path": "./packages/bash/bash-local" },
@@ -70,6 +89,9 @@
     { "path": "./packages/fs/fs-sandbox" },
     { "path": "./packages/fs/tool-fs" },
     { "path": "./packages/fs/tool-fs-search" },
+    { "path": "./packages/compact/compact" },
+    { "path": "./packages/compact/compact-basic" },
+    { "path": "./packages/compact/compact-tool-result-prune" },
     { "path": "./packages/web/web" },
     { "path": "./packages/web/web-search-exa" },
     { "path": "./packages/web/web-search-perplexity" },
@@ -116,18 +138,6 @@
     { "path": "./packages/host/apiproxy" },
     { "path": "./packages/host/runtime" },
     { "path": "./packages/host/webserver" },
-    { "path": "./packages/client/ui-slots" },
-    { "path": "./packages/client/ui-primitives" },
-    { "path": "./packages/client/web-react" },
-    { "path": "./packages/client/connection" },
-    { "path": "./packages/client/runtime" },
-    { "path": "./packages/client/ui-layout" },
-    { "path": "./packages/client/ui-sidebar" },
-    { "path": "./packages/client/ui-conversation" },
-    { "path": "./packages/client/ui-trajectory" },
-    { "path": "./packages/client/ui-theme" },
-    { "path": "./packages/client/i18n" },
-    { "path": "./packages/client/web" },
     { "path": "./packages/sdk/helper" },
     { "path": "./packages/sdk/scripts" },
     { "path": "./packages/sdk/create-sdk" },

+ 10 - 144
tsconfig.json

@@ -1,149 +1,15 @@
 {
-  // Host aggregate. packages/client type-checks in tsconfig.client.json: the two
-  // sides merge cordis Context under the same keys, one program cannot see both.
+  // Solution file: the whole-repo graph for `tsc -b tsconfig.json` and the
+  // tsserver entry. `extends` carries the base paths for get-tsconfig
+  // consumers — tsx running examples/ and scripts/ (no nearer tsconfig)
+  // resolves workspace imports through this file. `files: []` keeps it
+  // program-less, so the host/client cordis Context merges never meet.
+  // NEVER add include/files entries, and NEVER flatten this solution into a
+  // single ts.Program (scripts seed tsconfig.host.json or tsconfig.client.json).
   "extends": "./tsconfig.base.json",
-  "compilerOptions": {
-    "noEmit": true,
-    "rewriteRelativeImportExtensions": false
-  },
-  "include": [
-    "examples/*/src/**/*.ts",
-    "examples/*/start.ts",
-    "examples/*/tests/**/*.ts",
-    "packages/*/*/tests/**/*.ts",
-    "scripts/**/*.ts",
-    "website/**/*.ts",
-    "website/.vitepress/**/*.ts"
-  ],
-  "exclude": [
-    "packages/client/**",
-    "scripts/client-bundle-purity.spec.ts"
-  ],
+  "files": [],
   "references": [
-    { "path": "./vendor/cosmokit" },
-    { "path": "./vendor/schemastery" },
-    { "path": "./vendor/cordis" },
-    { "path": "./vendor/loader" },
-    { "path": "./vendor/include" },
-    { "path": "./vendor/group" },
-    { "path": "./vendor/timer" },
-    { "path": "./vendor/hmr" },
-    { "path": "./vendor/logger-console" },
-    { "path": "./packages/util/brand" },
-    { "path": "./packages/util/paths" },
-    { "path": "./packages/util/timeout" },
-    { "path": "./packages/util/retention" },
-    { "path": "./packages/llm/llm" },
-    { "path": "./packages/llm/token-meter" },
-    { "path": "./packages/core/session" },
-    { "path": "./packages/core/scope" },
-    { "path": "./packages/session-persistence/session-persistence" },
-    { "path": "./packages/session-persistence/session-checkpoint-policy" },
-    { "path": "./packages/session-persistence/session-persistence-jsonl" },
-    { "path": "./packages/session-persistence/session-persistence-sqlite" },
-    { "path": "./packages/session-query/session-query" },
-    { "path": "./packages/session-title/session-title" },
-    { "path": "./packages/session-title/session-title-llm" },
-    { "path": "./packages/session-title/session-title-first-message-llm" },
-    { "path": "./packages/session-title/session-title-all-messages-llm" },
-    { "path": "./packages/core/system-prompt" },
-    { "path": "./packages/core/agent" },
-    { "path": "./packages/ui/commands" },
-    { "path": "./packages/goal/goal" },
-    { "path": "./packages/goal/tool-goal" },
-    { "path": "./packages/goal/goal-session" },
-    { "path": "./packages/goal/command-goal" },
-    { "path": "./packages/context/time-context" },
-    { "path": "./packages/context/session-reference" },
-    { "path": "./packages/ui/user-interaction" },
-    { "path": "./packages/ui/user-approval" },
-    { "path": "./packages/ui/permission" },
-    { "path": "./packages/core/tools" },
-    { "path": "./packages/skill/skill" },
-    { "path": "./packages/skill/skill-local" },
-    { "path": "./packages/skill/tool-skill" },
-    { "path": "./packages/ui/tool-ask-user" },
-    { "path": "./packages/context/workspace-context" },
-    { "path": "./packages/core/agent-loop" },
-    { "path": "./packages/llm/llm-retry" },
-    { "path": "./packages/examples/agent-spine-demo" },
-    { "path": "./packages/examples/cli-demo" },
-    { "path": "./packages/bash/bash" },
-    { "path": "./packages/pty/pty" },
-    { "path": "./packages/pty/pty-local" },
-    { "path": "./packages/pty/tool-pty" },
-    { "path": "./packages/code-runtime/code-runtime" },
-    { "path": "./packages/code-runtime/code-runtime-worker" },
-    { "path": "./packages/llm/llm-deepseek" },
-    { "path": "./packages/llm/llm-pi-ai" },
-    { "path": "./packages/bash/bash-local" },
-    { "path": "./packages/sandbox/sandbox" },
-    { "path": "./packages/sandbox/sandbox-local" },
-    { "path": "./packages/sandbox/sandbox-policy" },
-    { "path": "./packages/bash/bash-sandbox" },
-    { "path": "./packages/bash/tool-bash" },
-    { "path": "./packages/fs/fs" },
-    { "path": "./packages/fs/fs-local" },
-    { "path": "./packages/fs/fs-policy" },
-    { "path": "./packages/fs/fs-sandbox" },
-    { "path": "./packages/fs/tool-fs" },
-    { "path": "./packages/fs/tool-fs-search" },
-    { "path": "./packages/compact/compact" },
-    { "path": "./packages/compact/compact-basic" },
-    { "path": "./packages/compact/compact-tool-result-prune" },
-    { "path": "./packages/web/web" },
-    { "path": "./packages/web/web-search-exa" },
-    { "path": "./packages/web/web-search-perplexity" },
-    { "path": "./packages/web/web-search-deepseek" },
-    { "path": "./packages/web/web-fetch-local" },
-    { "path": "./packages/web/tool-web" },
-    { "path": "./packages/spill/spill" },
-    { "path": "./packages/spill/spill-local" },
-    { "path": "./packages/spill/spill-policy" },
-    { "path": "./packages/timeout/timeout-policy" },
-    { "path": "./packages/support/invariants" },
-    { "path": "./packages/support/agent-loop-testkit" },
-    { "path": "./packages/ui/acp" },
-    { "path": "./packages/examples/acp-demo" },
-    { "path": "./packages/ui/app-boot" },
-    { "path": "./packages/ui/jsonrpc" },
-    { "path": "./packages/examples/jsonrpc-demo" },
-    { "path": "./packages/ui/tui" },
-    { "path": "./packages/examples/tui-demo" },
-    { "path": "./packages/support/llm-replay" },
-    { "path": "./packages/support/acp-snapshot" },
-    { "path": "./packages/support/loader-smoke" },
-    { "path": "./packages/subagent/subagent" },
-    { "path": "./packages/subagent/tool-subagent" },
-    { "path": "./packages/subagent/subagent-inprocess" },
-    { "path": "./packages/subagent/subagent-subprocess" },
-    { "path": "./packages/subagent/subagent-spawn" },
-    { "path": "./packages/subagent/subagent-fork" },
-    { "path": "./packages/subagent/subagent-acp" },
-    { "path": "./packages/tasks/tasks" },
-    { "path": "./packages/tasks/tool-tasks" },
-    { "path": "./packages/workflow/workflow" },
-    { "path": "./packages/workflow/workflow-workerthread" },
-    { "path": "./packages/workflow/tool-workflow" },
-    { "path": "./packages/workflow/tool-ralph" },
-    { "path": "./packages/todo/tool-todo" },
-    { "path": "./packages/plan/plan-mode" },
-    { "path": "./packages/guard/repeat-tool-guard" },
-    { "path": "./packages/cordis/tool-cordis" },
-    { "path": "./packages/hooks/hook-protocol" },
-    { "path": "./packages/hooks/hooks-claude" },
-    { "path": "./packages/hooks/hooks-codex" },
-    { "path": "./packages/mcp/mcp-client" },
-    { "path": "./packages/host/apiproxy" },
-    { "path": "./packages/host/runtime" },
-    { "path": "./packages/host/webserver" },
-    { "path": "./packages/sdk/helper" },
-    { "path": "./packages/sdk/scripts" },
-    { "path": "./packages/sdk/create-sdk" },
-    { "path": "./packages/sdk/telemetry" },
-    { "path": "./packages/lsp/lsp" },
-    { "path": "./packages/lsp/lsp-local" },
-    { "path": "./packages/lsp/tool-lsp" },
-    { "path": "./apps/cli" }
+    { "path": "./tsconfig.host.json" },
+    { "path": "./tsconfig.client.json" }
   ]
 }

+ 1 - 1
tsdown.config.ts

@@ -2,7 +2,7 @@ import { defineConfig } from 'tsdown'
 
 /**
  * JS bundling for vendored Cordis and Harness TypeScript packages.
- * TypeScript source is compiled first by `tsc -b tsconfig.build.json`; tsdown
+ * TypeScript source is compiled first by `tsc -b` (the root solution); tsdown
  * reads only the emitted JS under lib/types and writes the package root and
  * invariant companion runtime bundles. Declarations are NOT produced here,
  * hence `dts: false`.