build(vendor): rescope the vendored Cordis packages into @deepseek-ai

Machine-produced by `pnpm run rescope-vendor --apply` plus the regeneration it
prints: `pnpm install` for the lockfile, `pnpm run gen-third-party-notices`,
`verify-translation-pairing --write` for the touched bilingual pairs,
`gen-doc-graphs`, and one typert snapshot whose ids embed character offsets.
`pnpm run rescope-vendor --check` verifies the result.

Renames nine vendored packages (cordis, cosmokit, schemastery and the six
@cordisjs plugins) and every reference that resolves them: manifest names and
dependency keys, module specifiers including declare-module merges, cordis.yml
plugin names, tsconfig paths, every Markdown fence, and `docs/` prose.
Directory names, upstream versions, and dependency ranges are unchanged, so
vendor/README.md still reads as an upstream snapshot; its manifest table gains
an upstream-name column so THIRD_PARTY_NOTICES keeps MIT attribution pointed
at each fork's origin.

The tutorial tier follows the rename end to end: its yaml fences named plugins
the Loader can no longer resolve, its `ts ignore-check` fences disagreed with
the compiled fences beside them, and its prose quoted both. The contracts that
told readers to keep upstream names — the root convention and the vendoring
cookbook's tree comment and manifest invariant — now say to rescope instead.

Two rules read `@deepseek-ai/` as "another workspace plugin": the client bundle
purity gate now names the vendored libraries a browser bundle inlines, and the
files where a bare `cordis` is an agent-preset id keep that product data.
This commit is contained in:
imccyu
2026-08-10 22:04:06 +08:00
parent 78e9b8bec5
commit ec601ca13d
1400 changed files with 3337 additions and 3317 deletions

View File

@@ -33,8 +33,8 @@
],
"license": "BSD-3-Clause",
"peerDependencies": {
"@cordisjs/plugin-include": "^1.0.4",
"@cordisjs/plugin-loader": "^1.0.0-rc.5",
"@deepseek-ai/cordis-plugin-include": "^1.0.4",
"@deepseek-ai/cordis-plugin-loader": "^1.0.0-rc.5",
"@deepseek-ai/dsh-acp": "^0.0.1",
"@deepseek-ai/dsh-agent-spine-demo": "^0.0.1",
"@deepseek-ai/dsh-app-boot": "^0.0.1",
@@ -45,12 +45,12 @@
"@deepseek-ai/dsh-session-query-sqlite": "^0.0.1",
"@deepseek-ai/dsh-tools": "^0.0.1",
"@deepseek-ai/dsh-workspace-context": "^0.0.1",
"cordis": "^4.0.0-rc.7",
"schemastery": "^3.17.0"
"@deepseek-ai/cordis": "^4.0.0-rc.7",
"@deepseek-ai/schemastery": "^3.17.0"
},
"devDependencies": {
"@cordisjs/plugin-include": "workspace:^",
"@cordisjs/plugin-loader": "workspace:^",
"@deepseek-ai/cordis-plugin-include": "workspace:^",
"@deepseek-ai/cordis-plugin-loader": "workspace:^",
"@deepseek-ai/dsh-acp": "workspace:^",
"@deepseek-ai/dsh-agent": "workspace:^",
"@deepseek-ai/dsh-agent-spine-demo": "workspace:^",
@@ -63,7 +63,7 @@
"@deepseek-ai/dsh-system-prompt": "workspace:^",
"@deepseek-ai/dsh-tools": "workspace:^",
"@deepseek-ai/dsh-workspace-context": "workspace:^",
"cordis": "^4.0.0-rc.7",
"schemastery": "^3.17.0"
"@deepseek-ai/cordis": "^4.0.0-rc.7",
"@deepseek-ai/schemastery": "^3.17.0"
}
}

View File

@@ -11,9 +11,9 @@
* @module @deepseek-ai/dsh-acp-demo
*/
import type { Context } from 'cordis'
import type { Context } from '@deepseek-ai/cordis'
import { join } from 'node:path'
import z from 'schemastery'
import z from '@deepseek-ai/schemastery'
import * as acp from '@deepseek-ai/dsh-acp'
import * as agentCore from '@deepseek-ai/dsh-agent-spine-demo'
import * as workspaceContext from '@deepseek-ai/dsh-workspace-context'

View File

@@ -4,7 +4,7 @@
*/
/* jscpd:ignore-start */
import type { Context } from 'cordis'
import type { Context } from '@deepseek-ai/cordis'
import type { InvariantInstaller } from '@deepseek-ai/dsh-invariants'
const PACKAGE_NAME = '@deepseek-ai/dsh-acp-demo'

View File

@@ -3,8 +3,8 @@ import { randomUUID } from 'node:crypto'
import { mkdtemp } from 'node:fs/promises'
import { join } from 'node:path'
import { tmpdir } from 'node:os'
import { Context } from 'cordis'
import Loader from '@cordisjs/plugin-loader'
import { Context } from '@deepseek-ai/cordis'
import Loader from '@deepseek-ai/cordis-plugin-loader'
import { agentEvents } from '@deepseek-ai/dsh-agent'
import { TOOL_ORDER_REST } from '@deepseek-ai/dsh-system-prompt'
import type { Message } from '@deepseek-ai/dsh-llm'

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/examples/agent-spine-demo/README.md
README.md: cf0dc2ecd6e51eb872be75dfe6d80a5338605195
README.zh.md: e5a8672d494e0c456aa820641e685d00be624445
README.md: 5957d9a8e9218e18d5d7d0f620b6be811f2c230f
README.zh.md: 78372240764ff3c779ea0805aedd26a00baf1768

View File

@@ -11,7 +11,7 @@ Read this package for the whole plugin tree and its composition order.
`apply(ctx, config)` mounts each of these as a child of the bundle fiber:
```
@cordisjs/plugin-timer timer service (writes nothing to stdout)
@deepseek-ai/cordis-plugin-timer timer service (writes nothing to stdout)
@deepseek-ai/dsh-llm abstract LLM service + content-block vocabulary
@deepseek-ai/dsh-session event-sourced session log + store
@deepseek-ai/dsh-session-title log-backed title service + deterministic fallback

View File

@@ -11,7 +11,7 @@
`apply(ctx, config)` 将以下每个插件挂载为组合包 fiber 的子节点:
```
@cordisjs/plugin-timer timer service (writes nothing to stdout)
@deepseek-ai/cordis-plugin-timer timer service (writes nothing to stdout)
@deepseek-ai/dsh-llm abstract LLM service + content-block vocabulary
@deepseek-ai/dsh-session event-sourced session log + store
@deepseek-ai/dsh-session-title log-backed title service + deterministic fallback

View File

@@ -25,7 +25,7 @@
],
"license": "BSD-3-Clause",
"peerDependencies": {
"@cordisjs/plugin-timer": "^1.1.2",
"@deepseek-ai/cordis-plugin-timer": "^1.1.2",
"@deepseek-ai/dsh-agent": "^0.0.1",
"@deepseek-ai/dsh-agent-loop": "^0.0.1",
"@deepseek-ai/dsh-goal": "^0.0.1",
@@ -48,10 +48,10 @@
"@deepseek-ai/dsh-tool-tasks": "^0.0.1",
"@deepseek-ai/dsh-tools": "^0.0.1",
"@deepseek-ai/dsh-workspace-context": "^0.0.1",
"cordis": "^4.0.0-rc.7"
"@deepseek-ai/cordis": "^4.0.0-rc.7"
},
"devDependencies": {
"@cordisjs/plugin-timer": "workspace:^",
"@deepseek-ai/cordis-plugin-timer": "workspace:^",
"@deepseek-ai/dsh-agent": "workspace:^",
"@deepseek-ai/dsh-agent-loop": "workspace:^",
"@deepseek-ai/dsh-bash-env": "workspace:^",
@@ -85,9 +85,9 @@
"@deepseek-ai/dsh-tools": "workspace:^",
"@deepseek-ai/dsh-workspace-context": "workspace:^",
"@deepseek-ai/node-addon-landlock-run": "workspace:*",
"cordis": "^4.0.0-rc.7"
"@deepseek-ai/cordis": "^4.0.0-rc.7"
},
"dependencies": {
"schemastery": "^3.18.0"
"@deepseek-ai/schemastery": "^3.18.0"
}
}

View File

@@ -8,9 +8,9 @@
* @module @deepseek-ai/dsh-agent-spine-demo
*/
import type { Context } from 'cordis'
import Timer from '@cordisjs/plugin-timer'
import z from 'schemastery'
import type { Context } from '@deepseek-ai/cordis'
import Timer from '@deepseek-ai/cordis-plugin-timer'
import z from '@deepseek-ai/schemastery'
import LlmService from '@deepseek-ai/dsh-llm'
import SessionStore from '@deepseek-ai/dsh-session'
import SessionTitleService, { type Config as SessionTitleConfig } from '@deepseek-ai/dsh-session-title'

View File

@@ -4,7 +4,7 @@
*/
/* jscpd:ignore-start */
import type { Context } from 'cordis'
import type { Context } from '@deepseek-ai/cordis'
import type { InvariantInstaller } from '@deepseek-ai/dsh-invariants'
const PACKAGE_NAME = '@deepseek-ai/dsh-agent-spine-demo'

View File

@@ -2,8 +2,8 @@ import { describe, expect, it, vi } from 'vitest'
import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'
import { join, sep } from 'node:path'
import { tmpdir } from 'node:os'
import { Context } from 'cordis'
import Loader from '@cordisjs/plugin-loader'
import { Context } from '@deepseek-ai/cordis'
import Loader from '@deepseek-ai/cordis-plugin-loader'
import { renderPrompt, TOOL_ORDER_REST } from '@deepseek-ai/dsh-system-prompt'
import * as agentCore from '../src/index.ts'
import { agentEvents, type Agent } from '@deepseek-ai/dsh-agent'

View File

@@ -43,7 +43,7 @@ export interface Config {
describe('gen-config-catalog classification', () => {
it('classifies an apply plugin with a config parameter and extracts the paste', () => {
const entries = collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
export const inject = ['tools']
${DOCUMENTED_CONFIG}
/** Load. */
@@ -57,8 +57,8 @@ export function apply(ctx: Context, config: Config): void {}
it('classifies a default service class, reading its constructor and static inject', () => {
const entries = collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
${DOCUMENTED_CONFIG}
/** Fixture service. */
export default class Fix {
@@ -110,7 +110,7 @@ export default class Fix {
describe('gen-config-catalog config extraction guards', () => {
it('hard-errors on a config field with no JSDoc prose', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
export interface Config {
knob?: string
}
@@ -122,7 +122,7 @@ export function apply(ctx: Context, config: Config): void {}
it('hard-errors on an undocumented field nested in a type literal', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
/** Fixture config. */
export interface Config {
/** Entries. */
@@ -138,7 +138,7 @@ export function apply(ctx: Context, config: Config): void {}
it('pastes a package-local type transitively and records external refs', () => {
const entries = collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import type { Mode } from './types.ts'
import type { Remote } from '@fix/dep'
/** Fixture config. */
@@ -162,7 +162,7 @@ export function apply(ctx: Context, config: Config): void {}
it('pastes an enum referenced by the config type', () => {
const entries = collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
/** Fixture mode. */
export enum Mode {
A = 'a',
@@ -185,7 +185,7 @@ export function apply(ctx: Context, config: Config): void {}
it('hard-errors on a referenced type name that resolves nowhere', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
/** Fixture config. */
export interface Config {
/** The ghost. */
@@ -199,7 +199,7 @@ export function apply(ctx: Context, config: Config): void {}
it('hard-errors on a config type imported from another package', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import type { Config } from '@fix/dep'
/** Load. */
export function apply(ctx: Context, config: Config): void {}
@@ -209,7 +209,7 @@ export function apply(ctx: Context, config: Config): void {}
it('hard-errors when one name resolves to two different declarations across the closure', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import type { A } from './a.ts'
import type { B } from './b.ts'
/** Fixture config. */
@@ -231,8 +231,8 @@ export function apply(ctx: Context, config: Config): void {}
describe('gen-config-catalog schema cross-check', () => {
it('accepts a chained schema whose keys all appear on the config type', () => {
const entries = collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
${DOCUMENTED_CONFIG}
export const Config: z<Config> = z.object({ knob: z.string() }).default({})
/** Load. */
@@ -244,8 +244,8 @@ export function apply(ctx: Context, config: Config): void {}
it('hard-errors on a schema key the config type does not declare', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
${DOCUMENTED_CONFIG}
export const Config: z<Config> = z.object({ knob: z.string(), hidden: z.number() })
/** Load. */
@@ -256,8 +256,8 @@ export function apply(ctx: Context, config: Config): void {}
it('hard-errors on a NESTED schema key the config type does not declare', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
/** Fixture config. */
export interface Config {
/** Entries. */
@@ -280,8 +280,8 @@ export function apply(ctx: Context, config: Config): void {}
'src/types.ts': '/** Shared options. */\nexport interface Opts {\n /** Model. */\n model?: string\n}\n',
})
writePkg(root, 'group/one', '@fix/one', {
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
import type { Opts } from '@fix/dep'
/** Fixture config. */
export interface Config {
@@ -301,8 +301,8 @@ export function apply(ctx: Context, config: Config): void {}
it('resolves nested keys through a Partial<> wrapper', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
/** Caps. */
export interface Caps {
/** X. */
@@ -322,8 +322,8 @@ export function apply(ctx: Context, config: Config): void {}
it('leaves a nested key under an external (unresolvable) type unreported', () => {
expect(() => collectConfigCatalog(make({
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
import type { External } from 'some-external-pkg'
/** Fixture config. */
export interface Config {
@@ -340,8 +340,8 @@ export function apply(ctx: Context, config: Config): void {}
it('folds an intersected workspace schema into the subset check', () => {
const root = makeRoot()
writePkg(root, 'group/leaf', '@fix/leaf', {
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
/** Leaf config. */
export interface Config {
/** Leaf knob. */
@@ -355,8 +355,8 @@ export default class Leaf {
`,
})
writePkg(root, 'group/bundle', '@fix/bundle', {
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
import Leaf from '@fix/leaf'
/** Bundle config. */
export interface Config {
@@ -375,8 +375,8 @@ export function apply(ctx: Context, config: Config): void {}
it('resolves composed nested keys through an indexed-access forwarder', () => {
const root = makeRoot()
writePkg(root, 'group/leaf', '@fix/leaf', {
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
/** Leaf config. */
export interface Config {
/** Agents. */
@@ -393,8 +393,8 @@ export default class Leaf {
`,
})
writePkg(root, 'group/bundle', '@fix/bundle', {
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
import Leaf, { type Config as LeafConfig } from '@fix/leaf'
/** Bundle config forwarding the leaf's agents list. */
export interface Config {
@@ -412,8 +412,8 @@ export function apply(ctx: Context, config: Config): void {}
it('hard-errors when an intersected schema key is missing from the bundle config type', () => {
const root = makeRoot()
writePkg(root, 'group/leaf', '@fix/leaf', {
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
/** Leaf config. */
export interface Config {
/** Leaf knob. */
@@ -427,8 +427,8 @@ export default class Leaf {
`,
})
writePkg(root, 'group/bundle', '@fix/bundle', {
'src/index.ts': `import type { Context } from 'cordis'
import z from 'schemastery'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
import z from '@deepseek-ai/schemastery'
import Leaf from '@fix/leaf'
/** Bundle config that forgot to declare the forwarded field. */
export interface Config {
@@ -448,7 +448,7 @@ describe('gen-config-catalog render', () => {
it('renders sections, fences, and the terse classification lists', () => {
const root = makeRoot()
writePkg(root, 'group/one', '@fix/one', {
'src/index.ts': `import type { Context } from 'cordis'
'src/index.ts': `import type { Context } from '@deepseek-ai/cordis'
${DOCUMENTED_CONFIG}
/** Load. */
export function apply(ctx: Context, config: Config): void {}

View File

@@ -3,7 +3,7 @@ import { mkdir, mkdtemp, readFile, rm, symlink, writeFile } from 'node:fs/promis
import { homedir } from 'node:os'
import { basename, join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { Context } from 'cordis'
import { Context } from '@deepseek-ai/cordis'
import { SandboxBashExecutor } from '@deepseek-ai/dsh-bash-sandbox'
import LocalSubprocessService from '@deepseek-ai/dsh-subprocess-local'
import * as FsPolicy from '@deepseek-ai/dsh-fs-policy'

View File

@@ -37,10 +37,10 @@
},
"peerDependencies": {
"@deepseek-ai/dsh-invariants": "^0.0.1",
"cordis": "^4.0.0-rc.7"
"@deepseek-ai/cordis": "^4.0.0-rc.7"
},
"devDependencies": {
"@deepseek-ai/dsh-invariants": "workspace:^",
"cordis": "^4.0.0-rc.7"
"@deepseek-ai/cordis": "^4.0.0-rc.7"
}
}

View File

@@ -4,7 +4,7 @@
*/
/* jscpd:ignore-start */
import type { Context } from 'cordis'
import type { Context } from '@deepseek-ai/cordis'
import type { InvariantInstaller } from '@deepseek-ai/dsh-invariants'
const PACKAGE_NAME = '@deepseek-ai/dsh-jsonrpc-demo'