Commit Graph

193 Commits

Author SHA1 Message Date
Turtle
09e2d2ddc1 refactor(cmdline): make command providers ordinary 2026-08-10 23:45:05 +08:00
Turtle
668bdb3d8e refactor(cmdline): keep readiness in web app 2026-08-10 23:45:05 +08:00
Turtle
18328ce615 refactor(cli): remove the unused profile preparation hook 2026-08-10 23:45:05 +08:00
Turtle
d4ccfbd80f refactor(cli)!: complete app-owned profile startup 2026-08-10 23:45:04 +08:00
Turtle
37cbd155f5 refactor(cli)!: the launcher parses only its own flags
Launcher flags come first and end at the first token dsh does not
recognize; everything after reaches the booted app verbatim, so
dsh --profile tui --resume <id> works with no launcher change and
dsh --profile web --help prints the web app's help. A bare dsh -h, which
has no app to hand the flag to, still prints the launcher's own.

src/web.ts is deleted: the Web flag family, its LAN-trust sampling, and the
one-shot task positional now live in their bundles, and runProfile no
longer knows any row id. What the startup row decides comes back as a
launcher-owned patch layer above every layer a user can edit, so a live
config edit recomposes the tree without resetting a served port.

dsh web and dsh --profile web finally boot through one path, which also
gives --profile web the harness-source prompt section that only the alias
used to add.
2026-08-10 23:45:04 +08:00
imccyu
ec601ca13d 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.
2026-08-10 22:04:13 +08:00
Turtle
a27efdef36 docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
creatixchu
a832fc2fa5 Merge remote-tracking branch 'origin/master' into worktree/drop-create-by-name
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-25-session-list-browsing-and-manual-order.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-25-workspace-ui-product-flow.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-25-workspace-ui-product-flow.zh.md
#	.agents/notes/implemented/simplification/2026-07-31-one-route-to-add-a-workspace.i18n.yaml
#	.agents/notes/implemented/simplification/2026-07-31-one-route-to-add-a-workspace.md
#	.agents/notes/implemented/simplification/2026-07-31-one-route-to-add-a-workspace.zh.md
#	apps/cli/reference/README.i18n.yaml
#	docs/config-catalog.md
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.md
#	packages/host/apiproxy/README.zh.md
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/src/index.ts
#	packages/host/apiproxy/tests/api-proxy-approval.spec.ts
#	packages/host/apiproxy/tests/api-proxy-blank.spec.ts
#	packages/host/apiproxy/tests/api-proxy-cold.spec.ts
#	packages/host/apiproxy/tests/api-proxy-commands.spec.ts
#	packages/host/apiproxy/tests/api-proxy-config.spec.ts
#	packages/host/apiproxy/tests/api-proxy-models.spec.ts
#	packages/host/apiproxy/tests/api-proxy-projections.spec.ts
#	packages/host/apiproxy/tests/api-proxy-question.spec.ts
#	packages/host/apiproxy/tests/api-proxy-rename.spec.ts
#	packages/host/apiproxy/tests/api-proxy-search.spec.ts
#	packages/host/apiproxy/tests/api-proxy-subagents.spec.ts
#	packages/host/apiproxy/tests/api-proxy-view.spec.ts
#	packages/host/apiproxy/tests/api-proxy-workspace.spec.ts
#	packages/todo/tool-todo/tests/projection.spec.ts
#	scripts/hero-composer-dom-continuity.mjs
2026-08-10 15:49:34 +08:00
Turtle
a7fc81d745 docs: replace front door terminology 2026-08-10 13:07:46 +08:00
Huanqi Cao
c9285753de Merge branch 'merge/1829-master' into merge/1990-1829
# Conflicts:
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
2026-08-10 12:35:32 +08:00
Huanqi Cao
2a6aba0f48 Merge remote-tracking branch 'origin/master' into merge/1829-master
# Conflicts:
#	apps/cli/package.json
#	pnpm-lock.yaml
2026-08-10 12:32:14 +08:00
Yichen Jiang
b87e2240bf Merge pull request #1543 from deepseek-harness/stack/agent-profiles-8-authoring
feat(web): author agent presets from a settings page
2026-08-10 11:55:58 +08:00
Huanqi Cao
a3a91aa654 Merge branch 'merge/1829-master' into merge/1990-1829
# Conflicts:
#	vitest.config.ts
2026-08-10 11:24:58 +08:00
Huanqi Cao
a7b973757b Merge remote-tracking branch 'origin/master' into merge/1829-master 2026-08-10 11:23:08 +08:00
Huanqi Cao
ee38c2540b Merge branch 'merge/1829-master' into merge/1990-1829 2026-08-10 11:12:52 +08:00
Huanqi Cao
2474b6e638 Merge remote-tracking branch 'origin/master' into merge/1829-master
# Conflicts:
#	scripts/project-doc-site.spec.ts
2026-08-10 11:12:39 +08:00
Huanqi Cao
a29966b71f Merge branch 'feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	.agents/notes/implemented/feature/2026-08-02-pwsh-tool-bash-parity.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-02-pwsh-tool-bash-parity.md
#	.agents/notes/implemented/feature/2026-08-02-pwsh-tool-bash-parity.zh.md
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/bash/tool-pwsh/README.i18n.yaml
#	packages/bash/tool-pwsh/README.md
#	packages/bash/tool-pwsh/README.zh.md
2026-08-09 23:19:14 +08:00
Tianyi Cui
4619f183ff fix(cli): drain native handles on normal exit 2026-08-09 21:44:57 +08:00
Yichen Jiang
f80d2a742e Merge remote-tracking branch 'origin/stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	docs/module-graph.md
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/tsconfig.json
2026-08-09 20:33:55 +08:00
Huanqi Cao
63ad5d6d98 refactor(cli): drop the redundant existence pre-check in resolveWindowsShellLayer
loadOverlayPatches already throws on a missing file (the caller named
it, so absence is a misconfiguration) — the existsSync guard was a
second fail-loud mechanism for the same miss with a prettier message.
The loader's throw keeps the fail-loud contract the Windows-default
note records.
2026-08-09 18:53:38 +08:00
Huanqi Cao
f5caadc808 Merge branch 'feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	packages/bash/pwsh-local/src/index.ts
#	packages/sandbox/sandbox-local/src/index.ts
2026-08-09 17:50:55 +08:00
Huanqi Cao
8af10a54b9 Merge remote-tracking branch 'origin/master' into feat/windows-pwsh-default 2026-08-09 17:45:36 +08:00
Tianyi Cui
88096fb2da Merge remote-tracking branch 'origin/master' into worktree/ci-native-windows-20260808 2026-08-09 17:25:15 +08:00
Turtle
9704749b01 docs: replace vague provenance prose with recorded facts 2026-08-09 15:35:02 +08:00
Tianyi Cui
3b5ee1dce1 fix(windows): address native CI review findings 2026-08-09 13:57:50 +08:00
Yichen Jiang
921fcc1341 fix(cli): patch the agent-preset roots for every dsh launcher
The roots are an assembly fact (the shipped set beside this app's config,
the user's own under $DSH_HOME) but only `dsh web` patched them in, so the
merged `dsh run` booted the roster with no roots and failed resolving
`standard`. The shared profile boot now owns the patch for every launcher,
and master's interrupt_agent tool joins the standard composition's exact
catalog. The roster helpers the wire layer added (standingKeyFor,
serviceForAgent's chain guards, the direct mountPreset boundary) gain the
unit coverage the per-file gate requires.
2026-08-08 23:33:17 +08:00
Yichen Jiang
bcfab57318 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire 2026-08-08 22:47:15 +08:00
Tianyi Cui
bdbc6c3da4 fix(windows): preserve graceful CLI shutdown 2026-08-08 19:57:31 +08:00
Huanqi Cao
cc64c729db Merge remote-tracking branch 'origin/feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	apps/cli/reference/README.i18n.yaml
#	knip.json
#	packages/sandbox/sandbox-local/package.json
#	pnpm-lock.yaml
#	scripts/check-workspace-constraints.ts
2026-08-08 17:50:39 +08:00
Huanqi Cao
d1b080a68d Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	.agents/notes/implemented/feature/2026-08-05-pwsh-ui-bash-parity.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-05-pwsh-ui-bash-parity.md
#	.agents/notes/implemented/feature/2026-08-05-pwsh-ui-bash-parity.zh.md
#	apps/cli/reference/README.i18n.yaml
2026-08-08 17:42:47 +08:00
Tianyi Cui
bdd2f49df7 fix(cli): address dsh run review feedback 2026-08-08 15:05:50 +08:00
Yichen Jiang
c5ca12eabd Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
master extracted this layer's inline cold-resume resolver into
@deepseek-ai/dsh-api-remotes, whose `setup` was a fixed AgentSetup. A resumed
session composes the preset ITS header recorded, so the option becomes a
function of that header; the resolver builds the setup before the published
re-checks so those stay adjacent to `resume`.

Conflicts:
	docs/cordis-catalog/services.md
	docs/module-graph.md
	packages/host/apiproxy/package.json
	packages/host/apiproxy/src/api-proxy.ts
	pnpm-lock.yaml
2026-08-08 14:26:38 +08:00
Tianyi Cui
f32aa54aeb feat(cli)!: make dsh run the headless entrypoint 2026-08-08 14:21:42 +08:00
Huanqi Cao
2ecfe383c7 fix(cli): resolve the pwsh-sandbox layer row from the cold-start module closure
The launcher's healProfilesModuleFallback BFS-links the apps/cli dependency closure into the profile's node_modules (the pwsh-local precedent): without dsh-pwsh-sandbox in apps/cli dependencies, a fresh Windows host cannot resolve the inserted row. Assert the closure reaches both inserted packages in the real-layers composition; rewrap the windows-shell layer comment.
2026-08-08 13:44:05 +08:00
Huanqi Cao
b60e64c592 Merge remote-tracking branch 'origin/feat/windows-pwsh-default' into feat/windows-acl-sandbox
# Conflicts:
#	apps/cli/reference/README.i18n.yaml
2026-08-08 12:13:23 +08:00
Huanqi Cao
94f1a7741c Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	apps/cli/reference/README.i18n.yaml
2026-08-08 12:09:04 +08:00
Huanqi Cao
7574769818 fix(bundle): drop fs-local from the Windows layer — duplicate ctx.fs registration failed load
The Windows platform layer re-enables the base fs-sandbox row (removing its disable), but still inserted dsh-fs-local: both extend FileSystem and provide ctx.fs, so every shipped win32 profile failed at load. Delete the insert; fs-sandbox stays the single fs provider exactly as on POSIX. Sync the roster specs, the base/reference README pairs, the sandbox core doc (read-only grants no sink on Windows), the windows-shell JSDoc, and re-record the i18n pairings.
2026-08-08 02:11:15 +08:00
Tianyi Cui
95366f6197 fix(cli): parse commands before loading environment 2026-08-07 23:28:17 +08:00
Huanqi Cao
1ee773317c docs(bundle): complete the Windows pwsh default contract per review
- apps/cli/reference/README: state the win32 permission/sandbox/approval
  degradation so the workspace-write promise no longer misleads Windows users
- bundle README + agent note: give the complete bash-restore recipe (disable
  pwsh-local/tool-pwsh and re-enable bash-sandbox/tool-bash), since both
  executors register the same bash service and an incomplete recipe fails
  loud at load
- windows.cordis.patch.yml: header comment notes the recipe and that the
  ui-permission row belongs to dsh-web-app (base-only profiles get a
  harmless no-match warning)
- profile-boot.ts: rewrap composeProfile JSDoc
- re-record i18n hashes for the touched bilingual pairs
2026-08-07 19:21:49 +08:00
creatixchu
a7e43d4346 refactor: drop the create-by-name workspace route
The Web picker collapsed onto the directory flow (see the one-route-to-add-a-workspace
Agent Note), leaving workspace.create({ name }) with no product consumer. Delete the
whole feed line: the wire schema's name member and WorkspaceApi spelling, the gateway's
workspaceRoot config/default and the mkdir branch, the client seam that carried the name
(WorkspaceCreateInput, WorkspacesService.create, intentName), the dsh web
--workspace-root flag, and the fixture's name handling. workspace-name-conflict stays as
workspace.rename's duplicate-title error.
2026-08-07 14:26:50 +08:00
Yichen Jiang
2b7d50642c Merge branch 'stack/agent-profiles-2-configs' into stack/agent-profiles-3-wire 2026-08-07 01:01:49 +08:00
Huanqi Cao
8ff75622c6 feat(bundle): default Windows hosts to the pwsh shell stack
win32 hosts booting a shipped profile now get pwsh-local as the ctx.bash
executor and tool-pwsh as the shell tool through the base bundle's new
windows.cordis.patch.yml platform layer, injected by the launcher between
the bundle layers and the user layers on win32. bash-sandbox, tool-bash,
permission, and ui-permission are disabled there: the POSIX-only executor
cannot run on Windows, and dsh-permission requires a confining executor.
Overriding the default is a composition decision through the user's
cordis.patch.yml; there is no environment override channel.

apps/cli and dsh-base re-declare dsh-pwsh-local/dsh-tool-pwsh so the
profile module fallback links them for cold starts (the profiles rework
had dropped them from the CLI closure).

Promotes the windows-pwsh-default Agent Note from proposed to implemented
and documents the platform layer in the base bundle README.
2026-08-07 00:37:33 +08:00
Yichen Jiang
3d68185480 feat(web): move the agent plane behind per-session presets
The Web overlay disables base's 32 agent-plane rows and mounts the preset
roster instead, so each session composes its own tools and prompt rather than
sharing one process-wide set. The TUI keeps base unchanged: it is single-session
and composing its agent process-wide is correct there.

`roots` is patched in by AppCLIEntry, like `distIndex`: the shipped presets sit
beside the composition that names them and the user's live under the Harness
home, neither of which a config author chooses.

A session's preset is fixed at creation. Naming a different one for an existing
identity is `agent-preset-conflict` rather than a switch, because that
session's history was produced under the first preset's tools. The guard sits
after `await creation`, beside the cwd check, so it covers every path that
yields a live agent — freshly created, adopted live, resumed, or recovered by
the concurrent-creation catch. A request naming no preset adopts the session as
it is, keeping reconnect and retry ordinary.

Two bugs the real-composition test caught, both invisible to unit tests:

`PresetTree` now refuses to write. The Loader persists a tree whose plugin
self-disposed, and tearing an agent down disposes its whole subtree — inherited,
that rewrote the shipped composition, truncating a 241-line preset to `[]` the
first time a session ended.

`dsh-tool-skill` compared against a lookup of its own name in the global layer,
so it threw inside any preset: `register()` files into the calling context's
scope. It now compares against the definition it registered, which is what the
identity check meant all along.

The `standard` catalog is asserted exactly, not spot-checked: a row that
registers into the wrong layer mounts cleanly and simply contributes nothing, so
an omission is this design's quietest failure. It matches the shipped TUI
catalog plus `glob`/`grep`, the pair that composition documents as
ripgrep-dependent.

Re-records `cordis-inspect-jsdoc`, whose rendered `SessionHeader` gains the
`agentPreset` field. `fs-glob-sampling` fails identically on pristine master
and is untouched here.

The browser e2e scaffold gains the roster fact AppCLIEntry supplies. `roots` is
resolved and patched in by the CLI entry, like `distIndex` on the webserver row,
and this lane boots the shipped tree without that entry — so it has to supply
the same fact or the roster resolves nothing and every session in the lane
composes an agent with no tools, no persona, and no token meter. Only the
shipped root: a developer's own `~/.dsh/.agent-presets` must not decide a golden. The
`cordis:group` builtin comes with it, exactly as `boot()` registers it, because
a preset resolving package names from its own directory cannot reach
`@cordisjs/plugin-group` by name.

The lane stays red through this layer and the next four for the reason stated
above — the api-proxy injects `subagents`, `workspace`, and `tools`, so
`api-gateway` cannot activate and the browser has no `/api` at all. It goes
green again in the layer that returns those registries to the host plane; this
change is what makes that layer's fix sufficient rather than partial.
2026-08-07 00:35:30 +08:00
Yichen Jiang
fe31cd7609 Merge remote-tracking branch 'origin/master' into claude/unified-environment-credentials-c8841a
# Conflicts:
#	apps/cli/src/profile-boot.ts
#	apps/cli/src/web.ts
2026-08-06 22:34:46 +08:00
Yichen Jiang
5e139ac64e Merge remote-tracking branch 'origin/master' into claude/unified-environment-credentials-c8841a
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-20-dsh-cli-personal-config.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-20-dsh-cli-personal-config.md
#	.agents/notes/implemented/feature/2026-07-20-dsh-cli-personal-config.zh.md
#	apps/cli/config/base.cordis.yml
#	apps/cli/package.json
#	apps/cli/reference/README.i18n.yaml
#	apps/cli/reference/README.md
#	apps/cli/reference/README.zh.md
#	apps/cli/src/app-cli-entry.ts
#	apps/cli/src/args.ts
#	apps/cli/src/bin.ts
#	apps/cli/src/config.ts
#	apps/cli/src/dump-config.ts
#	apps/cli/src/headless.ts
#	apps/cli/src/web.ts
#	apps/cli/tests/args.spec.ts
#	apps/cli/tests/built-bin.e2e.ts
#	apps/cli/tests/headless-shutdown.e2e.ts
#	apps/cli/tsconfig.json
#	docs/user/guide/config.i18n.yaml
#	docs/user/guide/config.md
#	docs/user/guide/config.zh.md
#	examples/mcp-memory/README.i18n.yaml
#	examples/mcp-memory/README.md
#	examples/mcp-memory/README.zh.md
#	packages/bundle/web-app/cordis.patch.yml
#	packages/cordis/repository-plugin/README.i18n.yaml
#	packages/cordis/repository-plugin/README.md
#	packages/cordis/repository-plugin/README.zh.md
#	packages/credentials/credentials-local/README.i18n.yaml
#	packages/credentials/credentials-local/README.md
#	packages/credentials/credentials-local/README.zh.md
#	packages/ui/app-boot/README.i18n.yaml
#	packages/ui/app-boot/README.md
#	packages/ui/app-boot/README.zh.md
#	packages/ui/app-boot/src/index.ts
#	packages/ui/app-boot/tests/config-reload.spec.ts
#	packages/ui/app-boot/tests/user-patches.spec.ts
#	pnpm-lock.yaml
2026-08-06 21:34:45 +08:00
Yichen Jiang
b5600e9376 Merge remote-tracking branch 'origin/master' into worktree/align-core-web-rl-prompt
# Conflicts:
#	apps/cli/reference/README.i18n.yaml
#	apps/cli/reference/README.md
#	apps/cli/reference/README.zh.md
#	apps/cli/src/app-cli-entry.ts
#	apps/cli/src/dump-config.ts
#	apps/cli/src/web.ts
#	apps/cli/tests/built-bin.e2e.ts
#	apps/cli/tests/web-prompt-context.spec.ts
#	apps/web/tests/scaffold.ts
2026-08-06 20:34:57 +08:00
Yichen Jiang
50c46be948 fix(cli): isolate Web runtime context from headless 2026-08-06 20:11:44 +08:00
Yichen Jiang
0cf1ba7f87 fix(web): align core profile with RL prompt 2026-08-06 19:52:16 +08:00
Turtle
62d0f26fd6 refactor(cli)!: namespace the profile and bundle manifests under dsh.profile and dsh.bundle
A profile manifest and a bundle manifest are different kinds and shared one
flat `dsh` section: `dsh.plugins` listed bundles (not plugins) and `dsh.patch`
declared a bundle's layer. Each kind now names its role — a bundle declares
`dsh.bundle.patch`, a profile declares `dsh.profile.bundles` — so a
package.json states which role it plays and the list name matches its contents.

`DEFAULT_PROFILE_PLUGINS` becomes `DEFAULT_PROFILE_BUNDLES`, and
`DshManifestSection` splits into `DshBundleManifest`/`DshProfileManifest`.
Pre-release: no compatibility shim; turtle-ui moved with it (bd5ff10).
2026-08-06 17:28:30 +08:00
Turtle
52d7515936 fix(cli): plugin UX — anchor relative specs, reconcile by installed state, guide blocked git builds
- Relative path specs (., ../plugin, file:/link: forms) anchor to the
  invoking directory before forwarding: pnpm's cwd is the profile dir, so a
  bare 'add .' from a plugin checkout used to self-link the profile (exit 0,
  nothing installed). Bare paths stay bare and prefixed specs keep their
  prefix, preserving pnpm's link-vs-copy semantics.
- dsh.plugins reconciles against the INSTALLED state on every successful
  pnpm run, not the dependency diff: an update whose new version gains
  dsh.patch activates the layer; a version that drops it (or a removal)
  deactivates it. Template bundles are never touched.
- A failed pnpm run now names the profile directory, and a git-spec failure
  explains pnpm >=10's prepare-script block with a pointer at the profile's
  pnpm-workspace.yaml allowBuilds (turtle-ui's prepare-based git install is
  the reference consumer); reference README documents all three.
2026-08-06 12:16:32 +08:00