refactor: apply repository naming contract

Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
This commit is contained in:
Tianyi Cui
2026-08-13 00:36:22 +08:00
parent 101df7cf58
commit a2d0f7f411
3281 changed files with 21730 additions and 21592 deletions

View File

@@ -20,7 +20,7 @@
workspaceContext: false
dshHome: './.dsh-home'
skills:
local:
filesystem:
agentsHome: './.agents-home'
persona: 'Keyless headless-agent smoke.'
- id: persistence

View File

@@ -6,8 +6,8 @@ import type { Agent } from '@deepseek-ai/dsh-agent'
import { Session, SessionId } from '@deepseek-ai/dsh-session'
import type {} from '@deepseek-ai/dsh-fs-e2b'
import type {} from '@deepseek-ai/dsh-bash-local'
import type {} from '@deepseek-ai/dsh-lsp-local'
import type {} from '@deepseek-ai/dsh-pty-local'
import type {} from '@deepseek-ai/dsh-lsp-stdio'
import type {} from '@deepseek-ai/dsh-terminal-bash'
const configPath = process.argv[2]
if (configPath === undefined) throw new Error('usage: bin.ts <cordis.yml>')
@@ -32,7 +32,7 @@ const owner: Agent = {
whenIdle: () => Promise.resolve(),
}
const unregisterOwner = ctx.agents.register(owner)
let terminalId: Awaited<ReturnType<typeof ctx.pty.spawn>>['sessionId'] | undefined
let terminalId: Awaited<ReturnType<typeof ctx.terminals.spawn>>['sessionId'] | undefined
try {
const sandbox = await ctx.e2b.getSandbox()
const fromFs = await ctx.fs.resolve('from-fs.txt')
@@ -46,12 +46,12 @@ try {
{ oldString: 'written-by-fs', newString: 'versioned-by-fs', replaceAll: false },
{ version: observed.version },
)
const bashRead = await ctx.bash.run(ctx.bash.resolve({ command: 'cat from-fs.txt' }))
const bashRead = await ctx.shell.run(ctx.shell.resolve({ command: 'cat from-fs.txt' }))
if (bashRead.exitCode !== 0 || bashRead.stdout.text !== 'versioned-by-fs\n') {
throw new Error(`E2B Bash could not read the FS write: ${JSON.stringify(bashRead)}`)
}
const bashWrite = await ctx.bash.run(ctx.bash.resolve({ command: "printf 'written-by-bash\\n' > from-bash.txt" }))
const bashWrite = await ctx.shell.run(ctx.shell.resolve({ command: "printf 'written-by-bash\\n' > from-bash.txt" }))
if (bashWrite.exitCode !== 0) {
throw new Error(`E2B Bash could not write the shared filesystem: ${JSON.stringify(bashWrite)}`)
}
@@ -137,13 +137,13 @@ try {
workspaceRoot: process.cwd(),
})
const terminal = await ctx.pty.spawn(owner, { type: 'shell' })
const terminal = await ctx.terminals.spawn(owner, { type: 'shell' })
terminalId = terminal.sessionId
const terminalEcho = await ctx.pty.startSend(owner, terminal.sessionId, {
const terminalEcho = await ctx.terminals.startSend(owner, terminal.sessionId, {
text: "printf 'PTY-你好\\n'",
submit: true,
}).done
const sleeping = ctx.pty.startSend(owner, terminal.sessionId, {
const sleeping = ctx.terminals.startSend(owner, terminal.sessionId, {
text: "printf 'DSH_SLEEP_%s\\n' READY; sleep 30",
submit: true,
})
@@ -161,17 +161,17 @@ try {
}
if (Date.now() >= sleepReadyDeadline) throw new Error(`E2B PTY successor did not execute: ${sleepReadyOutput}`)
}
const terminalSignal = await ctx.pty.signal(owner, terminal.sessionId, 'SIGINT')
const terminalSignal = await ctx.terminals.signal(owner, terminal.sessionId, 'SIGINT')
const interrupted = await sleeping.done
const stubborn = await ctx.pty.startSend(owner, terminal.sessionId, {
const stubborn = await ctx.terminals.startSend(owner, terminal.sessionId, {
text: "bash -c 'trap \"\" TERM; exec sleep 30' & printf 'DSH_STUBBORN_PID=%s\\n' \"$!\"",
submit: true,
}).done
const stubbornMatch = /DSH_STUBBORN_PID=([1-9][0-9]*)/.exec(stubborn.viewport)
if (stubbornMatch?.[1] === undefined) throw new Error(`E2B PTY did not report its stubborn child: ${stubborn.viewport}`)
const stubbornPid = Number(stubbornMatch[1])
const terminalScrollback = ctx.pty.read(owner, terminal.sessionId, { count: 50 })
await ctx.pty.kill(owner, terminal.sessionId, 'live E2B composition complete')
const terminalScrollback = ctx.terminals.read(owner, terminal.sessionId, { count: 50 })
await ctx.terminals.kill(owner, terminal.sessionId, 'live E2B composition complete')
terminalId = undefined
const stubbornProbe = await sandbox.commands.run(`if kill -0 ${stubbornPid} 2>/dev/null; then printf alive; else printf gone; fi`)
const terminalTreeCleanup = stubbornProbe.stdout === 'gone'
@@ -195,7 +195,7 @@ try {
},
})}\n`)
} finally {
if (terminalId !== undefined) await ctx.pty.kill(owner, terminalId, 'fixture cleanup').catch(() => false)
if (terminalId !== undefined) await ctx.terminals.kill(owner, terminalId, 'fixture cleanup').catch(() => false)
unregisterOwner()
await ownerFiber.dispose()
await ctx.fiber.dispose()

View File

@@ -28,10 +28,10 @@
workspaceRoot: !!js process.cwd()
- id: pty
name: '@deepseek-ai/dsh-pty'
name: '@deepseek-ai/dsh-terminal'
- id: pty-local
name: '@deepseek-ai/dsh-pty-local'
- id: terminal-bash
name: '@deepseek-ai/dsh-terminal-bash'
config:
pollIntervalMs: 25
exactProbeAfterMs: 150
@@ -43,8 +43,8 @@
- id: lsp
name: '@deepseek-ai/dsh-lsp'
- id: lsp-local
name: '@deepseek-ai/dsh-lsp-local'
- id: lsp-stdio
name: '@deepseek-ai/dsh-lsp-stdio'
config:
servers:
fixture:

View File

@@ -14,7 +14,7 @@ import { recordFeedback } from '@deepseek-ai/dsh-command-feedback'
import { runFixtureTurn } from '@deepseek-ai/dsh-loader-smoke'
const configPath = process.argv[2]
if (configPath === undefined) throw new Error('telemetry-otel driver requires a config path')
if (configPath === undefined) throw new Error('session-telemetry-otel driver requires a config path')
const captures: unknown[] = []
const server = createServer((request, response) => {
@@ -39,7 +39,7 @@ try {
const mode = process.env.DSH_TELEMETRY_E2E_MODE ?? 'FULL'
if (mode !== 'FULL') {
const [agent] = ctx.get('agents')?.roots() ?? []
if (agent === undefined) throw new Error('telemetry-otel driver requires one root agent')
if (agent === undefined) throw new Error('session-telemetry-otel driver requires one root agent')
recordFeedback(agent.session, 'fixture feedback')
if (mode === 'FEEDBACK_ONLY') {
await runFixtureTurn(ctx, { task: 'post-feedback private suffix' })

View File

@@ -1,7 +1,7 @@
# Test-only composition: session-telemetry-otel through the real Loader/app
# path, exporting to the mock OTLP collector the driver starts (url via env).
# The redact-rule entry models a deployment mounting its own scrub rule on the
# telemetry/record waterfall — the seam itself ships no rules.
# session-telemetry/record waterfall — the seam itself ships no rules.
- id: logger-console
name: '@deepseek-ai/cordis-plugin-logger-console'
config:
@@ -23,7 +23,7 @@
- id: bash
name: '@deepseek-ai/dsh-bash-local'
- id: telemetry-otel
- id: session-telemetry-otel
name: '@deepseek-ai/dsh-session-telemetry-otel'
config:
mode: !!js process.env.DSH_TELEMETRY_E2E_MODE || 'FULL'

View File

@@ -3,7 +3,7 @@ import type { Context } from '@deepseek-ai/cordis'
/**
* Deployment-style redaction rule for the telemetry e2e: scrubs the fixture
* credential from body strings, exactly as a real deployment would mount its
* own rules on the `telemetry/record` waterfall.
* own rules on the `session-telemetry/record` waterfall.
*/
const SECRET = /sk-e2efixture[0-9]+/g
@@ -22,7 +22,7 @@ export const name = 'telemetry-redact-rule'
/** Mount the fixture scrub rule onto the redact waterfall. */
export function apply(ctx: Context): void {
ctx.on('telemetry/record', (_record, next) => {
ctx.on('session-telemetry/record', (_record, next) => {
const record = next()
return { ...record, body: scrub(record.body) }
})

View File

@@ -1,5 +1,5 @@
/**
* Loader fixture that resumes the seeded workspace-context session.
* Loader fixture that resumes the seeded agent-instructions session.
* @module workspace-context-resume-agent
*/