Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .claude/skills/model-pass/references/units.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,16 @@
"^lib/src/lib/(?:session\\-types|session\\-save|session\\-restore|session\\-remap|session\\-dirty|session\\-label|session\\-activity\\-store|reopen\\-stack|pending\\-kills|terminal\\-lifecycle|terminal\\-registry|terminal\\-store|terminal\\-transfer|id\\-pool|surface\\-ids|reconnect|local\\-json\\-store|resume\\-patterns|coding\\-agents|ref\\-count|settle\\-within|throttle|terminal\\-webgl|xterm\\-options|xterm\\-test\\-mock|test\\-local\\-storage|errors|is\\-record|elapsed)(?:[.-][A-Za-z0-9.-]*)?\\.(?:tsx?|mjs|js|css)$",
"^lib/src/components/(?:PendingKillOverlay|TerminalPane)(?:[.-][A-Za-z0-9.-]*)?\\.(?:tsx?|mjs|js|css)$",
"^lib/src/components/wall/(?:TerminalPanel)(?:[.-][A-Za-z0-9.-]*)?\\.(?:tsx?|mjs|js|css)$",
"^lib/src/host/(?:recovery\\-capture|recovery\\-store|recovery|owner\\-pty|atomic\\-json\\-file|pty\\-flow\\-host)(?:[.-][A-Za-z0-9.-]*)?\\.(?:tsx?|mjs|js|css)$",
"^canopy/"
"^lib/src/host/(?:recovery\\-capture|recovery\\-store|recovery|owner\\-pty|atomic\\-json\\-file|pty\\-flow\\-host)(?:[.-][A-Za-z0-9.-]*)?\\.(?:tsx?|mjs|js|css)$"
],
"tests": null,
"specs": [
"docs/specs/layout.md",
"docs/specs/reopen.md",
"docs/specs/transport.md",
"docs/specs/webgl-text.md"
"docs/specs/transport.md"
],
"what": "session persistence and restore, terminal lifecycle and registry, id pools, reconnect, Reopen and the close paths, pending (delayed) kills, the host-side recovery capture and store, atomic JSON files, and the small `canopy/` WebGL lab.",
"read": "**Specs you own** (read first, in the snapshot): the session-lifecycle and persistence-recovery sections of `docs/specs/layout.md`, all of `docs/specs/reopen.md` + rationale, the persisted-session types and reconnection parts of `docs/specs/transport.md`, `docs/compatible-agents.md` + `docs/compatible-agents.rationale.md` (the hidden recovery contract: shutdown capture, detection, single-use records, cold-restore execution), and `docs/specs/webgl-text.md` for `canopy/` and `terminal-webgl.ts`. Report spec-vs-code disagreements in both directions.",
"what": "session persistence and restore, terminal lifecycle and registry, id pools, reconnect, Reopen and the close paths, pending (delayed) kills, the host-side recovery capture and store, atomic JSON files, and the WebGL renderer lifecycle.",
"read": "**Specs you own** (read first, in the snapshot): the session-lifecycle and persistence-recovery sections of `docs/specs/layout.md`, all of `docs/specs/reopen.md` + rationale, the persisted-session types and reconnection parts of `docs/specs/transport.md`, `docs/compatible-agents.md` + `docs/compatible-agents.rationale.md` (the hidden recovery contract: shutdown capture, detection, single-use records, cold-restore execution), and the \"Renderer\" section of `docs/specs/layout.md` for `terminal-webgl.ts`. Report spec-vs-code disagreements in both directions.",
"focus": [
"Save → restore round trips: what is lost, malformed or truncated persisted data, older shapes, a restore that meets missing PTYs, and writes that race a quit. Persisted formats have reached early users, so treat format changes as `Sure-fix: no`.",
"Id pools and surface ids: counters must be durable and never reused, including across a crash between allocating and saving.",
Expand Down Expand Up @@ -547,8 +545,7 @@
"The Storybook config: `main.ts` globs that miss story files or match none, addons configured and unused, the Tauri stubs and window mock against what the components now import, `preview.ts` runtime imports that defeat build caching or pull the whole app into every story, themes listed against the themes that exist.",
"`vitest.argos.config.ts` and the Argos workflow: which stories are captured, in which browsers and viewports, what is excluded and why.",
"The helper modules (`settle-terminals.ts`, `story-selection.ts`, `PhoneFrame.tsx`, the Hosted `fixtures.tsx`, `HostedFrame.tsx`, `EmailFrame.tsx`): correctness and dead exports.",
"Duplicated story setup that should be one decorator.",
"Canopy's Storybook (`canopy/.storybook/`) is the `session` unit's; skip it."
"Duplicated story setup that should be one decorator."
]
},
{
Expand Down Expand Up @@ -1177,11 +1174,11 @@
"tests": null,
"specs": [
"docs/specs/website-docs.md",
"docs/specs/webgl-text.md",
"docs/specs/layout.md",
"docs/specs/security-local.md"
],
"what": "the repository's own lints and their self-tests in `scripts/`: `spec-lint.mjs` (809 lines) with `spec-md.mjs`, its self-test, and `spec-word-budgets.json`; `e2e-lint.mjs` (940) and its self-test; `outbound-lint.mjs` (765) and its self-test; `public-docs-lint.mjs` (671); `loopback-lint.mjs` and its self-test; `xterm-lint.mjs` and `xterm-bump.mjs`; `lint-kit.mjs`; the Markdown tooling (`md-unwrap.mjs`, `md-merge.mjs`, `setup-git.mjs`); `prose-audit.mjs`; `docs-surfaces.mjs`; the isolation test. `deploy-lint`, `ps1-cmdlet-lint`, `workflow-lint`, and the security-audit scripts belong to other units.",
"read": "**Specs you own** (read first, in the snapshot): the \"Specs\", \"Spec lifecycle\", and \"Markdown\" sections of `AGENTS.md` (they state what each lint enforces and the conventions `spec-lint` checks: its header comment lists the checks), `docs/prose-audit.md`, `docs/specs/website-docs.md` for `public-docs-lint`, `docs/specs/webgl-text.md` for `xterm-lint`, and the sections of `docs/specs/security-local.md` and `security-remote.md` that the loopback, outbound, and e2e lints name. Report disagreements between what a document says a lint enforces and what it enforces.",
"read": "**Specs you own** (read first, in the snapshot): the \"Specs\", \"Spec lifecycle\", and \"Markdown\" sections of `AGENTS.md` (they state what each lint enforces and the conventions `spec-lint` checks: its header comment lists the checks), `docs/prose-audit.md`, `docs/specs/website-docs.md` for `public-docs-lint`, `docs/specs/layout.md` -> \"Renderer\" for `xterm-lint`, and the sections of `docs/specs/security-local.md` and `security-remote.md` that the loopback, outbound, and e2e lints name. Report disagreements between what a document says a lint enforces and what it enforces.",
"before": [
"**The central question for each lint: can it pass while the thing it guards is broken?** A lint that silently checks nothing is worse than no lint."
],
Expand Down Expand Up @@ -1242,7 +1239,7 @@
{
"unit": "x-dead",
"what": "a tool-driven, whole-repository hunt for code that is no longer needed. The per-feature reviewers read the code by hand; your job is the mechanical sweep they cannot do: build the import graph and report what nothing reaches. Work in the live checkout `{{CHECKOUT}}` (it has `node_modules`), strictly read-only; put scripts and their output under `SP/probes/x-dead/`.",
"focusHeading": "**Produce, for every workspace package** (`lib`, `standalone`, `standalone/sidecar`, `vscode-ext`, `website`, `relay`, `hosted`, `dor`, `dor-lib-common`, `dor-tools-builtin`, `dor-tools-lib`, `remote-lib-common`, `canopy`) **and for `scripts/`:**",
"focusHeading": "**Produce, for every workspace package** (`lib`, `standalone`, `standalone/sidecar`, `vscode-ext`, `website`, `relay`, `hosted`, `dor`, `dor-lib-common`, `dor-tools-builtin`, `dor-tools-lib`, `remote-lib-common`) **and for `scripts/`:**",
"numbered": true,
"focus": [
"**Unreachable files**: source files no entrypoint reaches. Entrypoints include each `package.json`'s `main`/`exports`/`bin`/scripts, every Vite, esbuild, vitest, Storybook, wrangler, and Tauri config, HTML files, service-worker and Worker entries, `scripts/` invoked from any `package.json` or any workflow in `.github/workflows/`, and dynamic `import()`/`require()`/`new Worker(new URL(...))`/`fork()` strings. A file reached only from tests or stories is its own class (\"test-only\").",
Expand All @@ -1260,13 +1257,13 @@
"unit": "x-deps",
"what": "dependency hygiene across the pnpm workspace and the Rust crate. Read from the snapshot; use the live checkout `{{CHECKOUT}}` for read-only commands (`pnpm why`, `pnpm ls`, reading `node_modules`); put scripts under `SP/probes/x-deps/`. Never run `pnpm install`, `add`, `update`, or `dedupe`, and never touch the lockfile.",
"read": "**Specs to read first** (in the snapshot): `docs/specs/security-supply-chain.md` + rationale (disclosure of everything that reaches a user's machine, the bundled runtime pin, dependency cooldown), and the comments in `pnpm-workspace.yaml`.",
"focusHeading": "**Answer each of these with evidence, per package** (`lib`, `standalone`, `standalone/sidecar`, `vscode-ext`, `website`, `relay`, `hosted`, `dor`, `dor-lib-common`, `dor-tools-builtin`, `dor-tools-lib`, `remote-lib-common`, `canopy`, and the root):",
"focusHeading": "**Answer each of these with evidence, per package** (`lib`, `standalone`, `standalone/sidecar`, `vscode-ext`, `website`, `relay`, `hosted`, `dor`, `dor-lib-common`, `dor-tools-builtin`, `dor-tools-lib`, `remote-lib-common`, and the root):",
"numbered": true,
"focus": [
"**Declared but unused**: every `dependencies`/`devDependencies`/`optionalDependencies`/`peerDependencies` entry that no source file, config, script, or CLI invocation uses. Search imports, `require`, config plugin strings, `package.json` scripts (binaries), Vite/esbuild externals, and type-only uses (`@types/*`).",
"**Used but undeclared** (phantom dependencies that resolve only through hoisting or another package).",
"**Misplaced**: a runtime import of a `devDependency` in code that ships unbundled, or a build-only tool in `dependencies` (this matters for the dependency disclosure: `website/scripts/generate-deps.js` publishes the production dependency list, so a misplaced entry is a false disclosure in either direction).",
"**Version skew**: one package required at different versions or ranges across workspace packages (React, xterm, TypeScript, Vite, vitest, hono, zod, and so on). Check the `@xterm/*` lockstep rule in `docs/specs/webgl-text.md`.",
"**Version skew**: one package required at different versions or ranges across workspace packages (React, xterm, TypeScript, Vite, vitest, hono, zod, and so on). Check the `@xterm/*` lockstep rule in `docs/specs/layout.md` -> \"Renderer\".",
"**Overrides and allowances** in `pnpm-workspace.yaml`: for each `overrides` entry, each `peerDependencyRules.allowedVersions` entry, and each `allowBuilds` entry, is it still needed today? The comments state the removal condition for each: evaluate the condition against the current lockfile (`pnpm why <pkg>` helps) and report entries whose condition is now met, and entries naming packages that are no longer installed.",
"**Duplicates in the lockfile** for heavy libraries (several copies of the same major version) that a single range would collapse.",
"**Rust**: every crate and feature in `standalone/src-tauri/Cargo.toml` against `use`/path references in `standalone/src-tauri/src/` and `build.rs`; target-specific dependencies used on the wrong `cfg`; features enabled and unused.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ diff --git a/website/scripts/product-sections.js b/website/scripts/product-secti
],
},
{
@@ -53,5 +50,6 @@ export const productSections = [
@@ -53,4 +50,5 @@ export const productSections = [
export const excludedWorkspacePackages = [
"canopy", // Storybook-only rendering lab; no production build imports it.
"dormouse-website", // Visitor browser code; no installed artifact, key, or session.
+ "dormouse-sidecar", // Spawned by the standalone app, which is disclosed as `dormouse-standalone`.
];
Expand Down
2 changes: 1 addition & 1 deletion .github/audit/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ You are also the **catch-all** domain, and this is defined by subtraction, not b

Subtraction is **recursive, not top-level**. Where another domain claims a subdirectory rather than a whole tree, the rest of that tree is yours — so check one level down wherever a claim is partial, or the same orphaning happens inside a directory instead of beside it. `website/` is *not* an example of this any more: `supply-chain` claims all of it except `website/public/`, so none of it is yours. That was fixed by stating the claim as a subtraction rather than as two named subdirectories, which is the shape to prefer when you find the next one.

Today the remainder is `lib/`, `standalone/`, `vscode-ext/`, `dor/`, `dor-lib-common/`, `dor-tools-builtin/`, `dor-tools-lib/`, `canopy/`, `deploy/`, `docs/`, `.impeccable/`, and the root files `ci-and-secrets.md` and `remote.md` do not name, each less what another domain claims inside it — but treat that as a description of the current tree, not as your scope. Your scope is the remainder.
Today the remainder is `lib/`, `standalone/`, `vscode-ext/`, `dor/`, `dor-lib-common/`, `dor-tools-builtin/`, `dor-tools-lib/`, `deploy/`, `docs/`, `.impeccable/`, and the root files `ci-and-secrets.md` and `remote.md` do not name, each less what another domain claims inside it — but treat that as a description of the current tree, not as your scope. Your scope is the remainder.

The checklist is where the depth goes; the rest is a sweep for anything that would be a security hole in a terminal that runs local shells — command construction, path handling, deserialization of persisted state, IPC that crosses a trust boundary.
9 changes: 1 addition & 8 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"separateMajorMinor": false
},
{
"description": "xterm core and its first-party addons ship from one repo but carry INDEPENDENT beta counters (an addon is only published when its own content changes), and each addon peers on the exact core version published from the commit it was built from. So the latest of each is routinely a set spanning two commits — today's newest core has no matching addon publish at all — and since ^6.1.0-beta.N admits every later beta, npm and pnpm stay silent about the mismatch while the addons run against core internals they were not compiled for. This group only guarantees core and the addons arrive in one PR and are tested together; scripts/xterm-lint.mjs is what rejects an incoherent set, and `pnpm bump:xterm` writes the newest coherent one. Matched by scope so a newly added addon is grouped automatically; canopy's fork-base pins are excluded below",
"description": "xterm core and its first-party addons ship from one repo but carry INDEPENDENT beta counters (an addon is only published when its own content changes), and each addon peers on the exact core version published from the commit it was built from. So the latest of each is routinely a set spanning two commits — today's newest core has no matching addon publish at all — and since ^6.1.0-beta.N admits every later beta, npm and pnpm stay silent about the mismatch while the addons run against core internals they were not compiled for. This group only guarantees core and the addons arrive in one PR and are tested together; scripts/xterm-lint.mjs is what rejects an incoherent set, and `pnpm bump:xterm` writes the newest coherent one. Matched by scope so a newly added addon is grouped automatically",
"matchManagers": ["npm"],
"matchPackageNames": ["@xterm/**"],
"groupName": "xterm",
Expand Down Expand Up @@ -203,13 +203,6 @@
"matchPackageNames": ["monaco-editor"],
"allowedVersions": "!/-dev-/"
},
{
"description": "canopy pins the pristine @xterm/addon-webgl AND @xterm/xterm to the exact commit the SDF fork's sdf branch is based on (the addon's beta counter is offset from core's; canopy/README.md records the current correspondence). They are the UpstreamVsFork regression baseline and move in lockstep with the hand-cut @diffplug/xterm-addon-webgl-sdf tarball, which Renovate cannot see, so bumping either one is a manual edit made when the fork rebases — never a Renovate bump (see canopy/README.md and docs/specs/webgl-text.md). File-scoped: lib and standalone still track upstream betas via the xterm group above. Must stay last; later rules win",
"matchManagers": ["npm"],
"matchFileNames": ["canopy/package.json"],
"matchPackageNames": ["@xterm/**"],
"enabled": false
},
{
"description": "The stripe SDK moves the Stripe API version the billing webhook accepts in minor releases, and production's endpoint renders events at the version it was created with, so every update of either package, patches included, is a deliberate endpoint move: approve it on the dependency dashboard only as part of hosted/README.md, Move the Stripe API version. Last, so no later rule lifts it; it also holds the pgstencil group, which @pgstencil/stripe moves with",
"matchManagers": ["npm"],
Expand Down
Loading
Loading