From 6aa2e4633c226f5475edfbf8e44cb460ae8cd623 Mon Sep 17 00:00:00 2001 From: imccyu Date: Sun, 13 Sep 2026 00:28:18 +0800 Subject: [PATCH] feat(boot): add profile resolution modes --- ...026-08-05-profile-plugin-bundles.i18n.yaml | 4 +- .../2026-08-05-profile-plugin-bundles.md | 4 +- .../2026-08-05-profile-plugin-bundles.zh.md | 4 +- ...xperimental-agent-teams-packages.i18n.yaml | 4 +- ...08-18-experimental-agent-teams-packages.md | 2 +- ...18-experimental-agent-teams-packages.zh.md | 2 +- ...9-profile-resolution-generations.i18n.yaml | 6 + ...26-09-09-profile-resolution-generations.md | 115 +++ ...09-09-profile-resolution-generations.zh.md | 115 +++ apps/cli/reference/README.i18n.yaml | 4 +- apps/cli/reference/README.md | 2 +- apps/cli/reference/README.zh.md | 2 +- apps/cli/src/profile-boot.ts | 27 +- apps/cli/tests/built-bin.e2e.ts | 1 + apps/cli/tests/web-agent-presets.e2e.ts | 28 +- apps/web/tests/scaffold.ts | 37 +- apps/web/tests/shipped-composition.e2e.ts | 8 +- docs/config-catalog.i18n.yaml | 4 +- docs/config-catalog.md | 4 +- docs/config-catalog.zh.md | 4 +- packages/boot/app-boot/README.i18n.yaml | 4 +- packages/boot/app-boot/README.md | 15 +- packages/boot/app-boot/README.zh.md | 15 +- packages/boot/app-boot/package.json | 6 + packages/boot/app-boot/src/index.ts | 9 + .../src/profile-resolution/legacy-links.ts | 73 ++ .../src/profile-resolution/resolver.ts | 612 +++++++++++++++ .../src/profile-resolution/service.ts | 139 ++++ .../profile-resolution/worker-bootstrap.ts | 23 + packages/boot/app-boot/src/profile.ts | 204 +++-- .../tests/profile-resolution-service.spec.ts | 187 +++++ ...rofile-resolution-worker-bootstrap.spec.ts | 70 ++ .../app-boot/tests/profile-resolution.spec.ts | 701 ++++++++++++++++++ packages/boot/app-boot/tsdown.config.ts | 36 +- packages/client/AGENTS.md | 2 +- packages/experimental/inspector/package.json | 1 + .../experimental/inspector/tsdown.config.ts | 6 +- .../package.json | 1 + .../src/index.ts | 22 +- .../tests/inventory.spec.ts | 20 +- .../tsconfig.json | 3 + packages/preset/agent-presets/package.json | 1 + .../preset/agent-presets/src/discovery.ts | 48 +- packages/preset/agent-presets/src/index.ts | 11 +- .../preset/agent-presets/tests/mount.spec.ts | 23 + packages/preset/agent-presets/tsconfig.json | 3 + .../loader-smoke/README.i18n.yaml | 4 +- packages/test-support/loader-smoke/README.md | 2 +- .../test-support/loader-smoke/README.zh.md | 2 +- .../session-snapshot/src/launcher.ts | 17 +- .../session-snapshot/tests/harness.spec.ts | 6 +- packages/tsdown.worker.ts | 13 + packages/typert/loader/package.json | 1 + packages/typert/loader/src/index.ts | 40 +- packages/typert/loader/tests/loader.spec.ts | 29 +- packages/typert/loader/tsconfig.json | 3 + packages/workflow/workflow-ptc/package.json | 1 + pnpm-lock.yaml | 24 +- python/sdk-runtime/package.json | 1 + scripts/check-workspace-constraints.ts | 2 + scripts/gen-cordis-catalog.ts | 1 + snapshots/sdk/sdk.snapshot.ts | 4 +- snapshots/session/headless.snapshot.ts | 2 +- 63 files changed, 2565 insertions(+), 199 deletions(-) create mode 100644 .agents/notes/implemented/architecture/2026-09-09-profile-resolution-generations.i18n.yaml create mode 100644 .agents/notes/implemented/architecture/2026-09-09-profile-resolution-generations.md create mode 100644 .agents/notes/implemented/architecture/2026-09-09-profile-resolution-generations.zh.md create mode 100644 packages/boot/app-boot/src/profile-resolution/legacy-links.ts create mode 100644 packages/boot/app-boot/src/profile-resolution/resolver.ts create mode 100644 packages/boot/app-boot/src/profile-resolution/service.ts create mode 100644 packages/boot/app-boot/src/profile-resolution/worker-bootstrap.ts create mode 100644 packages/boot/app-boot/tests/profile-resolution-service.spec.ts create mode 100644 packages/boot/app-boot/tests/profile-resolution-worker-bootstrap.spec.ts create mode 100644 packages/boot/app-boot/tests/profile-resolution.spec.ts create mode 100644 packages/tsdown.worker.ts diff --git a/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.i18n.yaml b/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.i18n.yaml index 70634bb543..4ebcbc33d9 100644 --- a/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.i18n.yaml +++ b/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.i18n.yaml @@ -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 .agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.md -2026-08-05-profile-plugin-bundles.md: 7e51345e7eba8a58db63807e31d4a11481e3ffea -2026-08-05-profile-plugin-bundles.zh.md: b2631603737ea9412eb97029ff01d751d8084cec +2026-08-05-profile-plugin-bundles.md: 48786a9c1ccaceb5f16c9eefed01e556cf759e6d +2026-08-05-profile-plugin-bundles.zh.md: c88cbf98e4276549a6fae6a5b1253d3d838a64ca diff --git a/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.md b/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.md index 7e51345e7e..48786a9c1c 100644 --- a/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.md +++ b/.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.md @@ -14,7 +14,7 @@ Everything becomes a **profile**: a directory `$DSH_HOME/profiles/` with a The default Profile templates use `@deepseek-ai/dsh-base` as the shared core for `web`, `headless`, `sdk`, and `acp`, with one mode bundle above it. The [standalone `sdk-minimal` profile](../../../../packages/bundle/sdk-minimal/README.md) instead lists one bundle that owns its complete explicit tree. Generic `dsh --profile ` hands its remaining arguments to that profile's command-line startup row: Web owns its flag family, headless owns its task positional, and the protocol profiles accept no app options. Patch overlays use launcher-owned `--patch`. A new, non-shipped target can use `--from-default-profile