Full common split: composite tsconfigs and target-* modules

- Add composite TypeScript projects for common/primitives and common/runtime
- Decouple primitives from runtime (buffer service interfaces, UnicodeProperties, CellTypes, etc.)
- Move Types.ts to runtime; re-export primitive types from runtime/Types
- Rename src/browser -> src/target-browser, src/headless -> src/target-headless
- Update import paths (target-browser/*, target-headless/*) across repo
- Fix esbuild outbase so common/* and target-* resolve under out-esbuild/
- Point unicode addons at primitives for UnicodeTypes/UnicodeProperties
- Update ARCHITECTURE.md and AGENTS.md

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-05-31 00:19:43 +00:00
co-authored by Daniel Imms
parent 9a65429a30
commit c569e5ab19
188 changed files with 879 additions and 729 deletions
+3 -3
View File
@@ -10,9 +10,9 @@ import { Attributes, BgFlags, Content, ExtFlags, UnderlineStyle } from 'common/b
import type { AttributeData } from 'common/buffer/AttributeData';
import type { IParams, IDcsHandler, IOscHandler, IApcHandler, IEscapeSequenceParser } from 'common/parser/Types';
import type { IBufferLine, IExtendedAttrs, IInputHandler } from 'common/Types';
import type { ITerminal, ReadonlyColorSet } from 'browser/Types';
import type { IRenderDimensions } from 'browser/renderer/shared/Types';
import type { ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
import type { ITerminal, ReadonlyColorSet } from 'target-browser/Types';
import type { IRenderDimensions } from 'target-browser/renderer/shared/Types';
import type { ICoreBrowserService, IRenderService, IThemeService } from 'target-browser/services/Services';
export const enum Cell {
CONTENT = 0, // codepoint and wcwidth information (enum Content)
+2 -2
View File
@@ -12,7 +12,7 @@
"../../../node_modules/@types/mocha"
],
"paths": {
"browser/*": [ "../../../src/browser/*" ],
"target-browser/*": [ "../../../src/target-browser/*" ],
"common/*": [
"../../../src/common/primitives/*",
"../../../src/common/runtime/*",
@@ -27,7 +27,7 @@
"../../../typings/xterm.d.ts"
],
"references": [
{ "path": "../../../src/browser" },
{ "path": "../../../src/target-browser" },
{ "path": "../../../src/common" }
]
}
+3 -3
View File
@@ -15,8 +15,8 @@
"../../../src/common/runtime/*",
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
"target-browser/*": [
"../../../src/target-browser/*"
],
"*": [
"./*"
@@ -36,7 +36,7 @@
"path": "../../../src/common"
},
{
"path": "../../../src/browser"
"path": "../../../src/target-browser"
},
{
"path": "../../../test/playwright"
+1 -1
View File
@@ -26,7 +26,7 @@ const addon = {
extensions: [ '.js' ],
alias: {
common: path.resolve('../../out/common'),
browser: path.resolve('../../out/browser'),
browser: path.resolve('../../out/target-browser'),
vs: path.resolve('../../out/vs')
}
},