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

@@ -1,22 +1,22 @@
import { describe, expect, expectTypeOf, it } from 'vitest'
import type { BashExecRequest, BashExecSpec, BashExecutor, BashRunResult } from '@deepseek-ai/dsh-bash'
import type { ShellExecRequest, ShellExecSpec, ShellExecutor, ShellRunResult } from '@deepseek-ai/dsh-shell'
import { DEFAULT_HOOK_TIMEOUT_MS, runHook } from '@deepseek-ai/dsh-hook-protocol'
import type { RunHookOptions } from '@deepseek-ai/dsh-hook-protocol'
/**
* A minimal stand-in for the bits of {@link BashExecutor} that {@link runHook}
* A minimal stand-in for the bits of {@link ShellExecutor} that {@link runHook}
* actually calls (`resolve` then `run`). `runHook` is pure plumbing over those
* two methods, so a duck-typed recorder is the right test hook — the REAL
* executor (dsh-bash-local) is exercised end-to-end by the hook-bridge plugins
* that consume this library, not here.
*/
function recordingBash(run: (spec: BashExecSpec) => Promise<BashRunResult>): {
bash: BashExecutor
specs: BashExecSpec[]
function recordingBash(run: (spec: ShellExecSpec) => Promise<ShellRunResult>): {
bash: ShellExecutor
specs: ShellExecSpec[]
} {
const specs: BashExecSpec[] = []
const specs: ShellExecSpec[] = []
const bash = {
resolve(request: BashExecRequest): BashExecSpec {
resolve(request: ShellExecRequest): ShellExecSpec {
// Carry the request through verbatim, defaulting the required spec fields —
// exactly what dsh-bash-local's resolve does for the fields runHook sets.
return {
@@ -30,15 +30,15 @@ function recordingBash(run: (spec: BashExecSpec) => Promise<BashRunResult>): {
sandboxPolicy: request.sandboxPolicy,
}
},
async run(spec: BashExecSpec): Promise<BashRunResult> {
async run(spec: ShellExecSpec): Promise<ShellRunResult> {
specs.push(spec)
return run(spec)
},
} as unknown as BashExecutor
} as unknown as ShellExecutor
return { bash, specs }
}
function result(over: Partial<BashRunResult> = {}): BashRunResult {
function result(over: Partial<ShellRunResult> = {}): ShellRunResult {
return {
exitCode: 0,
signal: null,