deepseek-harness/scripts
imccyu 194828e8b8 build(vendor): add the @deepseek-ai rescope codemod, its mapping doc, and its Agent Note
Every harness package declares cordis as a peer dependency, so publishing the
harness publishes the vendored framework layer too; under the upstream names
that publication would squat them on the registry.

scripts/rescope-vendor.ts owns the rename: the nine-package mapping, a
delimited-token rule that leaves cordis.yml, the Loader's cordis: builtins and
vendor directory names alone, per-file exemptions where a name is a directory
or an upstream runtime identifier, and the exact edits for sites a token rule
cannot express — dot-notation lookups, unquoted manifest keys, a regex literal
whose failure would make every Context-merge scan silently find nothing, the
vendored-manifest table, and the contracts that told readers vendored packages
keep their upstream names.

Markdown follows the rename inside every fence, because a fence is code a
reader copies or configuration they mount, and in `docs/` prose as well, where
a sentence quoting a name teaches something this repository no longer resolves.
Prose elsewhere records what was true when it was written, and the same
spelling can mean something else: the Python SDK's `cordis` option, or the
unvendored `@cordisjs/plugin-http`. `docs/rescope.md` states both names on
purpose and is exempt.

exactEditState() classifies every exact edit as pending, applied, or invalid.
An insertion keeps its anchor and a deletion keeps its remainder, so each side
counts the form that survives: a duplicated insertion, a half-applied
replacement, and a deletion whose remainder moved are all invalid. The run
classifies every edit before writing anything and aborts on the first invalid
one, so a disagreement between the mapping and the tree cannot leave a
half-rescoped checkout; each write re-reads its file, because two edits can
target one. rescope-vendor.spec.ts pins those rejections, and --check asserts
the whole post-state from the hygiene gate, so CI owns the invariant.

--reverse restores the upstream names, verified as a round trip: reverse, then
apply, reproduces this tree byte for byte.

docs/rescope.md is the consumer-facing reference: the old-name/new-name table
with each package's role, what the rename deliberately leaves alone, the sites
callers must change, and the commands to apply, verify, and revert. The Agent
Note carries the decision and its consequences.

The rename itself lands in the next commit, produced by running the script.
2026-08-10 22:04:10 +08:00
..
fixtures/translation-prompt
snapshots fix(skill): enforce manual invocation policy 2026-08-10 18:04:26 +08:00
agent-note-tree.ts fix(notes): keep archive helpers internal 2026-07-26 23:29:46 +08:00
AGENTS.md docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
archived-agent-notes.spec.ts Merge remote-tracking branch 'origin/master' into worktree/archive-agent-notes-20260726 2026-07-27 00:53:07 +08:00
archived-agent-notes.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
attribute-chunk-bytes.mjs build(web): react-free vendor list for the incremental markdown pipeline, npmPackageOf scoped guard, chunk audit script 2026-08-06 16:38:25 +08:00
build-exe-for-python-sdk.ts fix(pty-local): restore the session-resolved workspace policy 2026-08-08 21:28:00 +08:00
build-python-release.py cleanup(build): minimize native payload handling 2026-07-30 01:29:18 +08:00
change-scope.spec.ts test(windows): budget instrumented integration waits 2026-08-09 16:39:41 +08:00
change-scope.ts refactor(dev-infra): narrow change scope report 2026-07-28 01:02:43 +08:00
check-expected-filenames.sh
check-vendor-manifest.sh
check-workspace-constraints.ts Merge remote-tracking branch 'origin/feat/windows-pwsh-default' into feat/windows-acl-sandbox 2026-08-09 00:29:55 +08:00
ci-workflow.spec.ts ci(windows): serialize instrumented coverage 2026-08-09 16:44:19 +08:00
clean.spec.ts fix(clean): remove native build state (review round 3) 2026-08-06 11:11:57 +08:00
clean.ts fix(clean): remove native build state (review round 3) 2026-08-06 11:11:57 +08:00
client-bundle-css.spec.ts build: order Host and Client compilation faces 2026-08-08 04:20:39 +08:00
client-bundle-purity.spec.ts refactor: nest client manifest metadata under dsh 2026-08-10 21:11:09 +08:00
client-tsconfig.spec.ts fix(windows): make native coverage graph portable 2026-08-08 22:19:45 +08:00
cordis-config-files.spec.ts
cordis-config-files.ts
cordis-core-api.spec.ts docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs 2026-08-09 01:31:57 +08:00
cordis-core-api.ts docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs 2026-08-09 01:31:57 +08:00
cordis-walk.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
coverage-exempt.spec.ts fix(ci): review follow-ups for the coverage lane split 2026-07-31 02:55:37 +08:00
coverage-exempt.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
coverage-uncovered-locations.cjs ci: print exact uncovered locations when the coverage gate fails 2026-08-06 03:18:17 +08:00
demo-code-mode.mjs fix(cli): close shared config review gaps 2026-07-30 14:56:39 +08:00
demo-cordis.mjs feat(cli)!: dsh boots profiles; plugin subcommand manages them via pnpm 2026-08-06 06:29:06 +08:00
dev-web.spec.ts refactor: nest client manifest metadata under dsh 2026-08-10 21:11:09 +08:00
dev-web.ts refactor: nest client manifest metadata under dsh 2026-08-10 21:11:09 +08:00
doc-budgets.manifest.json Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam 2026-08-09 21:33:45 +08:00
doc-typecheck-paths.spec.ts
doc-typecheck-paths.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
doc-typecheck.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
gen-config-catalog.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
gen-cordis-api.ts refactor(cordis): generate catalogs from Typert models 2026-07-29 23:55:12 +08:00
gen-cordis-catalog-partition.spec.ts fix(doc-gates): review findings — scan every merge block, any quote style, .tsx too; self-check the scan 2026-08-09 10:29:13 +08:00
gen-cordis-catalog-record.spec.ts docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs 2026-08-09 01:31:57 +08:00
gen-cordis-catalog.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
gen-doc-graphs.spec.ts fix(scripts): share package-source selection to clear the jscpd clone 2026-07-30 19:57:17 +08:00
gen-doc-graphs.ts docs: rename client manifest field references 2026-08-10 21:11:09 +08:00
gen-module-graph.ts
gen-persistence-catalog.ts fix(client): consume typed business session events 2026-08-09 18:42:25 +08:00
gen-scoped-events.ts
gen-third-party-notices.spec.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
gen-third-party-notices.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
gen-tool-catalog.ts docs: purge chain-of-thought leakage from prose 2026-08-09 21:10:59 +08:00
gen-translation-brief.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
install-lefthook.mjs fix(i18n): preserve merge conflicts without runtime 2026-08-09 00:37:46 +08:00
install-lefthook.spec.ts Merge branch 'worktree/ci-native-windows-20260808' into worktree/ci-native-windows-coverage-20260808 2026-08-09 01:34:01 +08:00
install.sh cleanup: remove private repository references 2026-08-08 01:10:57 +08:00
jsdoc.ts feat: slash system / input service / agent scope 2026-07-27 03:28:39 +08:00
lint-rule-fingerprint.spec.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
markdown.ts fix(scripts): address review findings on the gate consolidation 2026-07-27 12:02:39 +08:00
merge-translation-pairing-driver.sh fix(i18n): preserve merge conflicts without runtime 2026-08-09 00:37:46 +08:00
merge-translation-pairing.ts fix(i18n): preserve merge conflicts without runtime 2026-08-09 00:37:46 +08:00
migrate-packed-session-fixtures.ts feat(session): default JSONL writes to packed rows 2026-07-26 23:44:52 +08:00
oxlint-contract.spec.ts Merge branch 'worktree/ci-native-windows-20260808' into worktree/ci-native-windows-coverage-20260808 2026-08-09 16:14:01 +08:00
package-graph.ts
package-invariants.spec.ts build: order Host and Client compilation faces 2026-08-08 04:20:39 +08:00
package-invariants.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
paired-markdown-derivatives.spec.ts
paired-markdown-derivatives.ts
prepare-ci-bubblewrap.sh fix(ci): tolerate platform-specific coverage and curl retries 2026-08-10 04:52:07 -07:00
project-doc-site.spec.ts Merge remote-tracking branch 'origin/master' into feat/windows-pwsh-default 2026-08-09 22:59:34 +08:00
project-doc-site.ts docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs 2026-08-09 01:31:57 +08:00
project-reference-faces.spec.ts build: enforce split project reference faces 2026-08-08 12:25:41 +08:00
project-reference-faces.ts build: enforce split project reference faces 2026-08-08 12:25:41 +08:00
publication-payload.spec.ts fix(typert): satisfy workspace static gates 2026-08-07 21:47:14 +08:00
publication-payload.ts fix(typert): satisfy workspace static gates 2026-08-07 21:47:14 +08:00
publint-all.spec.ts feat(dev-infra): make gate plans inspectable and replayable 2026-07-27 21:27:42 +08:00
publint-all.ts fix(scripts): address review findings on the gate consolidation 2026-07-27 12:02:39 +08:00
publish-npm-baseline.ts fix(typert): satisfy workspace static gates 2026-08-07 21:47:14 +08:00
repo-files.ts Merge remote-tracking branch 'origin/master' into worktree/archive-agent-notes-20260726 2026-07-27 00:53:07 +08:00
rescope-vendor.spec.ts build(vendor): add the @deepseek-ai rescope codemod, its mapping doc, and its Agent Note 2026-08-10 22:04:10 +08:00
rescope-vendor.ts build(vendor): add the @deepseek-ai rescope codemod, its mapping doc, and its Agent Note 2026-08-10 22:04:10 +08:00
run-gates.spec.ts refactor: remove repository plugin path 2026-08-10 21:32:13 +08:00
run-gates.ts build(vendor): add the @deepseek-ai rescope codemod, its mapping doc, and its Agent Note 2026-08-10 22:04:10 +08:00
run-oxlint.spec.ts refactor: centralize Oxlint worker bounds 2026-07-29 23:39:49 +08:00
run-oxlint.ts refactor: make lint workflows Oxlint-only 2026-08-09 14:55:15 +08:00
session-fixture-layout.snapshot.ts feat(session): default JSONL writes to packed rows 2026-07-26 23:44:52 +08:00
session-fixture-layout.spec.ts fix(scripts): complete fixture migration diagnostics 2026-07-27 03:54:33 +08:00
session-fixture-layout.ts fix(scripts): complete fixture migration diagnostics 2026-07-27 03:54:33 +08:00
smoke-python-runtime.py Merge branch 'worktree-llm-dynamic-config' into worktree-llm-web-config 2026-07-30 20:15:40 +08:00
test-invariants.spec.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
test-invariants.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
translation-brief.spec.ts feat(i18n): unit-mapped briefings with mechanical --apply, adopting the #684 planner mechanics 2026-07-27 02:31:07 +08:00
translation-brief.ts docs: purge chain-of-thought leakage from prose 2026-08-09 21:10:59 +08:00
translation-pairing-git.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
translation-pairing-merge.spec.ts Merge branch 'worktree/ci-native-windows-20260808' into worktree/ci-native-windows-coverage-20260808 2026-08-09 16:47:17 +08:00
translation-pairing-merge.ts fix(docs): address generated translation review findings 2026-08-09 12:21:57 +08:00
translation-pairing-record.ts feat(i18n): compose pairing records during merges 2026-08-08 21:11:59 +08:00
translation-pairing.manifest.json docs: complete Chinese proofreading and generated reference pairing 2026-08-09 11:02:16 +08:00
translation-pairing.spec.ts docs: complete Chinese proofreading and generated reference pairing 2026-08-09 11:02:16 +08:00
translation-pairing.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
translation-prompt.snapshot.ts
translation-prompt.spec.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
translation-prompt.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
ts-project.ts
type-equiv.manifest.json Merge remote-tracking branch 'origin/master' into codex/pr-555-ci-fix 2026-08-10 12:33:36 +08:00
verify-agent-note-classification.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-agent-note-format.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-archived-agent-notes.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-built-package-invariants.mjs refactor(scripts): consolidate gate scripts on mdast fences, parseArgs, and globSync 2026-07-26 23:14:28 +08:00
verify-built-package-invariants.spec.ts
verify-client-domain-graph.ts docs: purge chain-of-thought leakage from prose 2026-08-09 21:10:59 +08:00
verify-config-source-ownership.spec.ts fix(config): cover shipped bundle source ownership 2026-08-07 23:26:39 +08:00
verify-config-source-ownership.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-cordis-config.ts fix(scripts): point the plane-separation gate at the bundle patches 2026-08-07 00:44:49 +08:00
verify-doc-budgets.ts
verify-doc-refs.ts
verify-export-jsdoc.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-md-links.spec.ts fix(doc-gates): review findings — GitHub-slugger parity and the surviving old-rule prose 2026-08-09 10:56:43 +08:00
verify-md-links.ts fix(doc-gates): review findings — GitHub-slugger parity and the surviving old-rule prose 2026-08-09 10:56:43 +08:00
verify-md-wrap.ts
verify-mermaid.ts feat(skills): bundle and harden personal maintenance workflows 2026-07-27 18:53:30 +08:00
verify-node-next-types.ts
verify-package-invariants.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-package-paths.ts docs(agent-note): flip the regrouping note to implemented 2026-08-09 01:25:24 +08:00
verify-package-readme-limitations.ts
verify-package-readme-model-experience.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-public-repository-links.spec.ts fix: allow audited publishing repository links 2026-08-08 16:15:00 +08:00
verify-public-repository-links.ts fix: allow audited publishing repository links 2026-08-08 16:15:00 +08:00
verify-runtime-closure.ts refactor(scripts): consolidate gate scripts on mdast fences, parseArgs, and globSync 2026-07-26 23:14:28 +08:00
verify-skill-invocation-metadata.spec.ts fix(skill): enforce manual invocation policy 2026-08-10 18:04:26 +08:00
verify-skill-invocation-metadata.ts fix(skill): enforce manual invocation policy 2026-08-10 18:04:26 +08:00
verify-translation-pairing.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
verify-translation-prompt.ts
verify-type-equiv.ts fix(scripts): address review findings on the gate consolidation 2026-07-27 12:02:39 +08:00
verify-vendored-links.ts fix(review): label host-preparation failures and gate vendored lockfile links 2026-08-02 01:25:01 +08:00
vitest-environment.compat.spec.ts fix(test): isolate jsdom storage on Node 26 2026-07-30 21:49:33 +08:00
wine-windows-gates.sh ci(wine): add verified archive mirror fallback 2026-08-09 19:58:29 +08:00