refactor(packages): dissolve ui/ and rename sdk/ to scaffold/

git mv per the regrouping RFC: the five human-collaboration seams and
tui join packages/interaction/, app-boot becomes packages/boot/, and
jsonrpc joins the renamed scaffold/ (formerly sdk/) as its server half
beside client/protocol/create-sdk/helper/scripts/telemetry, whose
folders drop the legacy sdk- prefix. Three new group README triplets
replace the ui/ and sdk/ ones; tsconfig references/paths/globs,
knip keys, vitest globs, gate scripts, catalogs, docs, and the
lockfile follow. Adds the four settled FIXME rename markers
(dsh-sdk-server, dsh-sdk-telemetry, dsh-sdk-helper, dsh-sdk-scripts).

The scaffold folders diverge from their npm names until those renames
land, so tsconfig.base.json maps the three affected names explicitly
beside the group wildcard. Also repairs two pre-existing stale-path
classes the strengthened sweep surfaced: docs/web-styling.md's retired
web-ui host package and type-model spec fixture-literal joins.

app-boot's three Loader-composition specs time out at the default 5s
under full-suite parallel load on this filesystem (pre-existing;
pass isolated with --testTimeout=30000); interaction/scaffold/boot
suites otherwise green (687 passed).
This commit is contained in:
Tianyi Cui
2026-07-30 03:13:49 +08:00
parent 7e445c3a67
commit 3fc35c91ff
351 changed files with 368 additions and 311 deletions

View File

@@ -275,7 +275,7 @@ export const TYPE_LINK_EXEMPTIONS: Readonly<Record<string, string>> = {
ProjectionChangeListener: 'change-feed listener contract is owned by packages/session/session-projection/src/index.ts',
ProjectionSnapshot: 'watermark snapshot shape is owned by packages/session/session-projection/src/index.ts',
ProjectionCheckpoint: 'persisted checkpoint row map is owned by packages/session/session-projection/src/index.ts',
CommandExecution: 'executor return contract is owned by packages/ui/commands/src/index.ts',
CommandExecution: 'executor return contract is owned by packages/interaction/commands/src/index.ts',
TypertContribution: 'registry contribution contract is owned by packages/typert/registry/README.md',
TypertFace: 'registry face identity is owned by packages/typert/registry/README.md',
TypertPackageFilter: 'registry package query filter is owned by packages/typert/registry/README.md',
@@ -295,10 +295,10 @@ export const TYPE_LINK_EXEMPTIONS: Readonly<Record<string, string>> = {
Translate: 'service-local bound translator is owned by packages/client/i18n/src/index.ts',
InvariantRegistration: 'service-local lifecycle handle is owned by packages/support/invariants/README.md',
InvokeRemoteRequest: 'gateway invocation contract is owned by packages/api/gateway/README.md',
PresetOption: 'deployment menu metadata is owned by packages/ui/permission/README.md',
PresetSpec: 'deployment preset composition is owned by packages/ui/permission/README.md',
KnobState: 'projection unit state shape is owned by packages/ui/permission/README.md',
PermissionSelect: 'permissions projection payload is owned by packages/ui/permission/src/types.ts',
PresetOption: 'deployment menu metadata is owned by packages/interaction/permission/README.md',
PresetSpec: 'deployment preset composition is owned by packages/interaction/permission/README.md',
KnobState: 'projection unit state shape is owned by packages/interaction/permission/README.md',
PermissionSelect: 'permissions projection payload is owned by packages/interaction/permission/src/types.ts',
PromptAssembly: 'assembly result is owned by packages/core/system-prompt/README.md',
ResumeAgentOptions: 'agent resume contract is owned by packages/core/agent/README.md',
Sandbox: 'external E2B SDK handle is owned by packages/e2b/e2b/README.md',

View File

@@ -70,7 +70,7 @@ describe('tierExternalDeps', () => {
it('keeps a package runtime when any shipping area declares it, and excludes workspace links', () => {
const { manifests, names } = workspace({
'package.json': { devDependencies: { shared: '^1' } },
'packages/ui/tui/package.json': { name: '@deepseek-ai/dsh-tui', dependencies: { shared: '^1', '@deepseek-ai/dsh-cli': 'workspace:^' } },
'packages/interaction/tui/package.json': { name: '@deepseek-ai/dsh-tui', dependencies: { shared: '^1', '@deepseek-ai/dsh-cli': 'workspace:^' } },
'apps/cli/package.json': { name: '@deepseek-ai/dsh-cli' },
})

View File

@@ -154,7 +154,7 @@ const TOOL_PACKAGES: ToolPackage[] = [
{
pkg: '@deepseek-ai/dsh-tool-ask-user',
dir: 'tool-ask-user',
source: 'packages/ui/tool-ask-user/src/index.ts',
source: 'packages/interaction/tool-ask-user/src/index.ts',
requires: ['ctx.tools', 'ctx.userInteraction'],
writes: ['tool/call', 'tool/result after a UI/provider answers the question'],
async mount(ctx) {

View File

@@ -619,7 +619,7 @@ function builtBinSmokeGate(needs: string[] = ['build']): Gate {
'apps/cli/tests/built-bin.e2e.ts',
'packages/examples/acp-demo/tests/built-bin.e2e.ts',
'packages/host/directory-picker-native/tests/built-worker.e2e.ts',
'packages/ui/jsonrpc/tests/built-scope-carrier.e2e.ts',
'packages/scaffold/server/tests/built-scope-carrier.e2e.ts',
'packages/subagent/subagent-codex/tests/loader-composition.e2e.ts',
'packages/subagent/subagent-claude-code/tests/loader-composition.e2e.ts',
'packages/api/remotes/tests/built-lib.e2e.ts',

View File

@@ -234,32 +234,32 @@
{
"doc": "docs/core-data-structures/commands.md",
"symbol": "CommandInputDescriptor",
"source": "packages/ui/commands/src/index.ts"
"source": "packages/interaction/commands/src/index.ts"
},
{
"doc": "docs/core-data-structures/commands.md",
"symbol": "CommandDefinition",
"source": "packages/ui/commands/src/index.ts"
"source": "packages/interaction/commands/src/index.ts"
},
{
"doc": "docs/core-data-structures/commands.md",
"symbol": "CommandInvocation",
"source": "packages/ui/commands/src/index.ts"
"source": "packages/interaction/commands/src/index.ts"
},
{
"doc": "docs/core-data-structures/commands.md",
"symbol": "CommandResult",
"source": "packages/ui/commands/src/index.ts"
"source": "packages/interaction/commands/src/index.ts"
},
{
"doc": "docs/core-data-structures/commands.md",
"symbol": "CommandDescriptor",
"source": "packages/ui/commands/src/index.ts"
"source": "packages/interaction/commands/src/index.ts"
},
{
"doc": "docs/core-data-structures/commands.md",
"symbol": "ParsedCommand",
"source": "packages/ui/commands/src/index.ts"
"source": "packages/interaction/commands/src/index.ts"
},
{
"doc": "docs/core-data-structures/system-prompt.md",
@@ -733,62 +733,62 @@
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "AskUserQuestionOption",
"source": "packages/ui/user-interaction/src/types.ts"
"source": "packages/interaction/user-interaction/src/types.ts"
},
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "AskUserQuestionIntent",
"source": "packages/ui/user-interaction/src/types.ts"
"source": "packages/interaction/user-interaction/src/types.ts"
},
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "AskUserQuestionItem",
"source": "packages/ui/user-interaction/src/types.ts"
"source": "packages/interaction/user-interaction/src/types.ts"
},
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "AskUserQuestionRequest",
"source": "packages/ui/user-interaction/src/index.ts"
"source": "packages/interaction/user-interaction/src/index.ts"
},
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "AskUserQuestionAnswerItem",
"source": "packages/ui/user-interaction/src/types.ts"
"source": "packages/interaction/user-interaction/src/types.ts"
},
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "AskUserQuestionAnswer",
"source": "packages/ui/user-interaction/src/types.ts"
"source": "packages/interaction/user-interaction/src/types.ts"
},
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "UserInteractionProvider",
"source": "packages/ui/user-interaction/src/index.ts"
"source": "packages/interaction/user-interaction/src/index.ts"
},
{
"doc": "docs/core-data-structures/user-interaction.md",
"symbol": "UserInteractionError",
"source": "packages/ui/user-interaction/src/index.ts"
"source": "packages/interaction/user-interaction/src/index.ts"
},
{
"doc": "docs/core-data-structures/approval.md",
"symbol": "ApprovalRequestId",
"source": "packages/ui/user-approval/src/types.ts"
"source": "packages/interaction/user-approval/src/types.ts"
},
{
"doc": "docs/core-data-structures/approval.md",
"symbol": "ApprovalOutcome",
"source": "packages/ui/user-approval/src/types.ts"
"source": "packages/interaction/user-approval/src/types.ts"
},
{
"doc": "docs/core-data-structures/approval.md",
"symbol": "ApprovalPolicy",
"source": "packages/ui/user-approval/src/index.ts"
"source": "packages/interaction/user-approval/src/index.ts"
},
{
"doc": "docs/core-data-structures/approval.md",
"symbol": "ApprovalRequest",
"source": "packages/ui/user-approval/src/index.ts"
"source": "packages/interaction/user-approval/src/index.ts"
},
{
"doc": "docs/core-data-structures/bash.md",

View File

@@ -103,12 +103,12 @@ const SENTENCE_MODEL_EXPERIENCE: Readonly<Record<string, SentenceContract>> = {
'packages/e2b/subprocess-e2b': { kind: 'indirect', reason: 'The remote spawn backend delegates model rendering to consumer seams such as the bash executor family.' },
'packages/subprocess/subprocess-local': { kind: 'indirect', reason: 'The spawn backend delegates model rendering to consumer seams such as the bash executor family.' },
'packages/sandbox/sandbox-local': { kind: 'indirect', reason: 'The provider backend delegates model rendering to dsh-bash-sandbox and dsh-tool-bash.' },
'packages/sdk/create-sdk': { kind: 'indirect', reason: 'The initializer only writes project files; selected runtime plugins provide the generated project model surface.' },
'packages/sdk/helper': { kind: 'none', reason: 'The project domain edits files and registers no live agent or model surface.' },
'packages/sdk/scripts': { kind: 'indirect', reason: 'The launcher delegates model context to the loaded project plugin tree.' },
'packages/sdk/sdk-client': { kind: 'none', reason: 'Client-process library; the model surface lives in the spawned runtime\'s composed plugins.' },
'packages/sdk/sdk-protocol': { kind: 'none', reason: 'Client-facing wire library; the runtime plugins behind the serving entry own the model surface.' },
'packages/sdk/telemetry': { kind: 'none', reason: 'The launcher-side reporter sends developer-cycle telemetry and registers no live agent or model surface.' },
'packages/scaffold/create-sdk': { kind: 'indirect', reason: 'The initializer only writes project files; selected runtime plugins provide the generated project model surface.' },
'packages/scaffold/helper': { kind: 'none', reason: 'The project domain edits files and registers no live agent or model surface.' },
'packages/scaffold/scripts': { kind: 'indirect', reason: 'The launcher delegates model context to the loaded project plugin tree.' },
'packages/scaffold/client': { kind: 'none', reason: 'Client-process library; the model surface lives in the spawned runtime\'s composed plugins.' },
'packages/scaffold/protocol': { kind: 'none', reason: 'Client-facing wire library; the runtime plugins behind the serving entry own the model surface.' },
'packages/scaffold/telemetry': { kind: 'none', reason: 'The launcher-side reporter sends developer-cycle telemetry and registers no live agent or model surface.' },
'packages/session/session-projection': { kind: 'none', reason: 'The projection registry serves client-facing read models of already-logged session state and registers no model surface.' },
'packages/session/session-projection-cache': { kind: 'none', reason: 'The persisted cache accelerates host-side cold reads of projection state and registers no model surface.' },
'packages/session-query/session-query': { kind: 'none', reason: 'The trusted query service exposes cloned records only to callers and registers no model surface.' },
@@ -138,10 +138,10 @@ const SENTENCE_MODEL_EXPERIENCE: Readonly<Record<string, SentenceContract>> = {
'packages/tasks/tasks': { kind: 'indirect', reason: 'Producer and control-surface plugins own all model rendering over the task registry.' },
'packages/tasks/tasks-local': { kind: 'indirect', reason: 'The registry backend delegates model rendering to producer plugins and dsh-tool-tasks.' },
'packages/examples/acp-demo': { kind: 'indirect', reason: 'The app bundle delegates request composition to dsh-agent-spine-demo and dsh-acp.' },
'packages/ui/app-boot': { kind: 'indirect', reason: 'Only the loaded plugin tree contributes model context.' },
'packages/boot/app-boot': { kind: 'indirect', reason: 'Only the loaded plugin tree contributes model context.' },
'packages/examples/jsonrpc-demo': { kind: 'indirect', reason: 'Only the externally configured plugin tree contributes model context.' },
'packages/ui/permission': { kind: 'indirect', reason: 'The service writes mechanism events rendered by dsh-user-approval and dsh-tool-bash.' },
'packages/ui/user-interaction': { kind: 'indirect', reason: 'Model-facing consumers render provider answers and seam errors.' },
'packages/interaction/permission': { kind: 'indirect', reason: 'The service writes mechanism events rendered by dsh-user-approval and dsh-tool-bash.' },
'packages/interaction/user-interaction': { kind: 'indirect', reason: 'Model-facing consumers render provider answers and seam errors.' },
'packages/util/timeout': { kind: 'indirect', reason: 'Only timeout consumers render timeout outcomes.' },
'packages/util/retention': { kind: 'indirect', reason: 'Only retention consumers render retained content and omission metadata.' },
'packages/util/native-command': { kind: 'none', reason: 'The host-side subprocess runner registers no model surface.' },