Commit Graph
51 Commits
Author SHA1 Message Date
Yichen Jiang 3a64c1c521 Merge remote-tracking branch 'origin/master' into worktree/forge-code-review-gaps-2d9d2e
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/worktree/README.i18n.yaml
#	packages/experimental/worktree/README.md
#	packages/experimental/worktree/README.zh.md
2026-11-05 18:17:56 +08:00
Yichen Jiang 1c30806773 feat(worktree): allow five minutes per command by default
Checking out a large repository on a slow filesystem can take longer than the previous 60-second deadline, which failed worktree creation with WORKTREE_TIMEOUT. The default timeoutMs is now 300000 for each Git and Node command; cancellation still stops the running command, and deployments can still set timeoutMs.

Refs #7937
2026-11-05 17:05:59 +08:00
Yichen Jiang 481641b1b9 feat(worktrees): add the retain-on-archive switch
`retainOnArchive`, a volatile field of the worktree service's Config, skips
cleanup admission while it is on; it is read at each archive, so a change
applies to later archives only. The service keeps its instance off the
generated Settings pages, and the Forge client draws the switch as the
`plugins.row.config` page of the bundle's `worktree` row, staged through
the shared Plugins form until one explicit save.

Docs: the worktree, Forge, and bundle READMEs, the archive-worktrees
upgrade guide, the config and client catalogs, and the
explicit-worktree-creation note.
2026-11-05 16:51:29 +08:00
Yichen Jiang a166b9812d test(worktrees): cover every reclamation path for the per-file gate
Drop the dead branches CI's coverage lane found: the placeholder trailing
slash in `within`, the aborted-lifetime check in `schedule`, the rejection
arm of a task that never rejects, and the undefined arms of the cold reads.
`cleanupOf` re-reads the attempt after waiting, so a cold Session without
creations settles to null instead of a stale placeholder. Removals of one
path never overlap, so `remove` keeps one entry per path without chaining.

New cases: a cold Session without creations, a borrower that appears
between inspection and the locked recheck, a subagent child with an unknown
parent, a creation record whose payload fails validation, a live fork that
moved out of the checkout, a cached cold Session without a directory, the
Forge projection ignoring a creation without an open request, the Remote
with and without the service, and the client's removed follow-up.
2026-11-05 14:10:59 +08:00
Yichen Jiang e6bed3f52c build(worktrees): pin zod to the unified 4.6.6
master unified every zod declaration on 4.6.6, so the worktree package's new
dependency follows it and the lockfile resolves again under --frozen-lockfile.
2026-11-05 13:20:40 +08:00
Yichen Jiang b7c45ab0ad refactor(worktrees): share the creation record schema with the Forge panel
The worktree package owns `createdWorktreeSchema`, the validator of its
`plugin:worktree/created` payload; the Forge projection imports it instead
of redeclaring the same object.
2026-11-05 13:10:27 +08:00
Yichen Jiang 5e7020ee83 test(worktrees): satisfy the static and consumer gates
Move the removal step into `removal.ts` as `removeCheckout`, so the specs
drive the real function and intercept it through a module mock instead of
reaching a private method through an assertion to unknown. Classify
`CREATED_RECORD` as a peer-required Host export for the Forge panel, ship
the compiled `lib/types/*.js` that the `./types` subpath names, refresh the
worktree recorded session with the creation record the service now writes,
and regenerate the module graph.
2026-11-05 12:59:35 +08:00
Yichen Jiang 691ebd7b6c refactor(worktrees): move archive cleanup into the worktree service
The worktree service now records each checkout it creates as a
`plugin:worktree/created` record, folds them in its own `worktree`
projection with fork-aware ownership, and reclaims a clean, unreferenced
checkout when the Session that created it is archived. The Forge panel
reads the service's record and forwards its cleanup state; it no longer
writes a `created` record, owns a retention projection, or gates every
Session's directory access.

Admission registers the attempt inside the Workspace write queue and
returns; inspection runs afterwards, reading cold Sessions through the
projection cache when mounted and from their log otherwise, with subagent
children of an archived ancestor counted as archived. Only a path being
removed holds `working-directory/access`, whose request now carries the
access's `signal`, and listeners withdraw before the drain. Ignored files
no longer retain a checkout, matching Git's non-force removal; processes
and terminals are not consulted.

The Forge bundle mounts one `worktree` service: the `forge-worktree` row
and the `optional-forge-panel` group that isolated a second service are
gone, and `forge-panel` is a top-level row. `canRemove`, `remove`, the
`forgeWorktreeRetention` projection, and `ForgeWorktreeCleanup` are
removed; `WorktreeService.cleanupOf`, `WorktreeCleanup`, and the
`worktree/cleanup` Host event replace them. The upgrade guide moves to
the current version directory and covers the id removals.
2026-11-05 12:28:50 +08:00
Yichen Jiang a2d8340421 Merge origin/master into worktree/archive-session-worktrees 2026-11-05 11:45:46 +08:00
Turtle 38c7a9fbf4 feat(release): publish package source, declaration maps, and documentation (#5884)
* feat(release): publish package source, declaration maps, and documentation

Every release member publishes its TypeScript source and the declaration
maps that resolve into it, and @deepseek-ai/dsh publishes the repository
Markdown documentation staged from docs/ at prepack time.

The ./src/* export most members already declared now resolves for an
installed consumer, and a consumer editor follows a declaration to the
implementation. Bundled JavaScript maps stay unpublished; the vendored
family and the Desktop runtime file policy are unchanged.

Rationale: .agents/notes/implemented/process/2026-10-08-published-source-and-docs.md

* feat(release): publish JavaScript maps and compress bundles

Every emitted JavaScript map ships beside the bundle it describes, and the
workspace build and the client preset compress bundles without mangling
identifiers.

The documentation payload now mirrors the website publication manifest and
is removed again by `postpack`; Desktop and the Python executable exclude
the published source, documentation, and maps; `clean` removes a staged
copy. Typert's publication contract gains the Remote declaration map.

* fix(release): keep node bundles readable for the worker image

The browser worker image lowers `yield*` only as a whole statement and
rewrites `for await` loops by their source layout, so compressed node-side
entries either fail that lowering or lower to unparseable code. Only the
browser bundles keep compression, which removes about a third of their text.

The bundle-purity assertion now matches the module-loader call regardless of
the quote style compression picks, and the release-pack fixture exercises
the installed package's new documentation requirement.

* feat(release): publish the whole documentation tree

`@deepseek-ai/dsh` copies `docs/` in full instead of the website's page
set: the maintainer documents, the generated migration records, the
translation guidelines, and the `*.i18n.yaml` consistency records ship
with the installed package, so the documentation's own links resolve
without a checkout.

* feat(release): publish the upgrade guides with the documentation

The staged documentation keeps the website's page set and adds every
`docs/upgrade-guide/` document, which is what an installed reader consults
when a released change breaks something. The rest of the maintainer tree
stays out.

* test(release): expect source and maps in master's new payload cases

* feat(release): keep installed docs and source readable in Desktop

Desktop keeps the published src/ and docs/ trees inside app.asar, and
every model shell call receives DSH_INSTALL_DIR and DSH_NODE_EXECUTABLE
so an agent can read them through Electron's Node mode. Staging also
generates docs/upgrade-guide/README.md, an index of the upgrade guides
grouped by the release they upgrade from.

Minified client bundles print string literals with backticks: the
worker image packer now recognizes those chunk requests, client license
banners are prepended after minification so their text survives, and
the affected artifact tests accept either quote.

* test(desktop): read archived docs through the Windows PowerShell form

Regenerate the config catalog for the shifted shell-env source line.

* test(desktop): wait for the GUI-subsystem Electron process from PowerShell

* build(release): publish source and maps from the message-quotes package

* build(release): publish source and maps from packages new on master

* build(release): publish source and maps from the tool-office package
2026-11-05 00:22:36 +08:00
imccyu 2f97f60455 release(dsh): 0.2.2-rc.1 2026-11-04 15:50:06 +08:00
imccyu 1c78d475bf release(dsh): 0.2.2-alpha.3 2026-11-03 13:37:26 +08:00
Yichen Jiang 0f1a3e68a0 Merge remote-tracking branch 'origin/master' into worktree/archive-session-worktrees
# Conflicts:
#	apps/web/tests/forge-panel.e2e.ts
#	packages/client/ui-workspace/tests/apply.client.spec.ts
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/client-ui-forge/src/client/locales.ts
#	scripts/type-equiv.manifest.json
2026-10-29 16:31:47 +08:00
imccyu 00d541438b release(dsh): 0.2.2-alpha.2 2026-10-28 02:03:15 +08:00
imccyu 69c389ae11 release(dsh): 0.2.2-alpha.1 2026-10-28 00:00:58 +08:00
Yichen Jiang 5c37ee0163 feat(worktrees): clean up safe UI checkouts when sessions are archived 2026-10-27 12:57:10 +08:00
imccyu 543219b909 Merge remote-tracking branch 'origin/master' into worktree/sync-dsh-0.2.1-rc.4-to-master 2026-10-27 02:21:20 +08:00
Yichen Jiangandimccyu e2c4d0538f ci: make reference and worktree tests portable (#7381)
* fix(forge): make reference and worktree tests portable

* test(worktree): cover error and text cancellation reasons

* test(forge): brace void arrow bodies in the reference lookup spec

* test(ci): expect the joined version script path in the pre-merge check

---------

Co-authored-by: imccyu <[email protected]>
2026-10-27 02:20:02 +08:00
Yichen Jiang 4969525f33 fix(worktree): remove only the missing target registration 2026-10-26 17:57:07 +08:00
Yichen Jiang b740b95424 fix(worktree): validate recorded restoration targets before mutation 2026-10-26 17:57:06 +08:00
imccyu 3014b0af0f Merge master into DSH 0.2.1-rc.4 synchronization branch 2026-10-26 01:29:12 +08:00
imccyu 341beb33c0 release(dsh): 0.2.1-rc.4 2026-10-26 00:57:37 +08:00
Yichen Jiang 6e9ff4c322 Merge remote-tracking branch 'origin/worktree/forge-change-request-bindings' into worktree/forge-pr-worktree-panel
The parent branch now carries master through #6426 again.

- Master moved the optional, experimental, and plugin page bundle lists
  into @deepseek-ai/dsh-official-bundles; the forge bundle joins the
  optional and experimental lists there.
- The CLI manifest, release families, and plugin page expectations keep
  both sides; the forge bundle ranks before the held-back recommendation
  bundles.
- The lockfile, the event matrix, and the experimental persistence
  catalog are regenerated, and the capability-seams and experimental
  README pairings are recorded again.
2026-10-23 14:51:28 +08:00
imccyu 14f0b2aafe Merge master into DSH 0.2.1-rc.3 synchronization branch 2026-10-23 11:56:34 +08:00
imccyu d02ea370ee release(dsh): 0.2.1-rc.3 2026-10-23 01:11:35 +08:00
07akioni 84edeadc2b feat(i18n): add Spanish French German Russian and Portuguese 2026-10-22 19:53:52 +08:00
Yichen Jiang cdc72eb229 Merge remote-tracking branch 'origin/worktree/forge-change-request-bindings' into worktree/forge-pr-worktree-panel
The parent branch now carries master through #6426, including the
agent-controller revert.

- Package manifests keep both sides: the ./types and ./locale/*.json
  exports of the forge packages, and the Web app's forge bundle and
  message quotes dependencies.
- The type manifest drops the removed agent-controller entries and keeps
  the forge panel entries.
- The event matrix and the capability-seams pairing are regenerated.
- The forge bundle stays on the main plugin list and now ranks before the
  held-back developer tools; the plugin page expectations follow.
2026-10-22 17:44:45 +08:00
Yichen Jiang eea6d3b7ec feat(forge): hold a sent message until the Session's worktree is ready
The agent-controller admission hook was reverted on master, so the forge
panel now holds the next Turn with Agent maintenance started from the
agent/inbox/inserted notification. The message stays in the inbox until
the hold ends.

- A message sent before the requested worktree exists waits while the
  panel creates it. After a failed or stopped attempt the message keeps
  waiting until the card retries, through the new
  forgePanel.retryWorktree, or withdraws the request so the message goes
  on in the project directory.
- A message sent after the Session's worktree was removed waits on the
  missing card until the worktree is restored or the Session returns to
  the source checkout.
- Restoring a worktree reports its prepare and checkout steps. The card
  shows them in place of its actions, and the tab's restore action shows
  a spinner while it runs.
- The panel state names what a waiting message waits for and the running
  restoration; the agent-controller dependency is removed.
2026-10-22 17:17:55 +08:00
07akioni 11295990b5 fix(i18n): cover nested metadata and repair locale CI regressions 2026-10-21 17:00:42 +08:00
07akioni ed783066e6 fix(i18n): complete Japanese plugin metadata and guard locale coverage 2026-10-21 16:14:12 +08:00
_Kerman a9c006f9c3 refactor(agent): own model selection on each agent 2026-10-20 21:09:09 +08:00
Yichen Jiang accd5b77c4 feat(worktree): name generated worktrees after their Session
Generated worktree names now join the dsh- prefix, the first eight
hexadecimal digits of the UUID in the Session id, and four random
hexadecimal digits, such as dsh-6b1f02c4-9a3e. A Session id without a
UUID gets eight random hexadecimal digits after the prefix. The worktree
runtime exports generatedWorktreeName, uses it for omitted
create_worktree names, and defaults namePrefix to dsh-. The forge panel
names its Session worktrees with the same function and defaults
worktreePrefix to dsh-, so checkouts no longer nest under a dsh/
directory.

The create_worktree name parameter asks for a few lowercase words joined
by hyphens that describe the task, and the tool description drops the
defaults that its parameters already state.
2026-10-20 11:49:51 +08:00
Yichen Jiang fc43a2d507 feat(forge): add the pull request panel and worktree Sessions
The forge panel shows the pull requests a Session created or pushed in a
right-sidebar tab, with a Session header button and branch label, and lets
a new Session start in its own Git worktree from the New Session options
row. The forge bundle ships the panel with the forge registry, the GitHub
provider, the Session bindings, and an isolated worktree service.

The panel listens to the agent-controller/admission stage. It holds the
first message of a Session with a worktree request while it creates and
enters the worktree as Agent maintenance, and refuses messages while the
worktree the Session works in is gone. A failed or stopped creation
returns the message to the composer: the card above the composer shows the
failure, sending again retries with a new branch name, and Continue
without a worktree withdraws the request. A removed worktree can be
checked out again or left for the source checkout. A message that enters
without admission still gets its worktree at the first step proposal.
2026-10-20 11:49:51 +08:00
_Kerman 955e600031 Merge master into session projection registration handles 2026-10-19 11:21:16 +08:00
imccyu d1b9c04067 release(dsh): 0.2.1-rc.2 2026-10-17 15:10:31 +08:00
imccyu c6e89e6755 release(dsh): 0.2.1-rc.1 2026-10-16 21:39:18 +08:00
imccyu 0a49d91bb2 release: setup next release version for [email protected] 2026-10-16 16:17:09 +08:00
imccyu f2235d6c02 release(dsh): 0.2.1-alpha.4 2026-10-15 20:00:58 +08:00
_Kerman 90014a7508 Merge remote-tracking branch 'origin/master' into xtr/session-projection-registration-handles
# Conflicts:
#	docs/tool-catalog.i18n.yaml
2026-10-15 18:26:22 +08:00
_Kerman c3efd4bff8 refactor(session-projection): keep state reads inside owning services 2026-10-15 18:18:58 +08:00
Yichen Jiang 36acfb1e88 release(dsh): 0.2.1-alpha.3 2026-10-14 19:38:37 +08:00
Turtle b37bd1f2a1 docs(worktree): scope lazy-fetch guarantee and regenerate config catalog 2026-10-10 14:31:58 +08:00
Turtle b0414b8a98 fix(worktree): disable lazy fetch through GIT_NO_LAZY_FETCH
--no-lazy-fetch exists only in Git 2.45+, so older Git exited 129 before
creating a worktree. The environment variable is also honored by the
2.39.4, 2.40.2, 2.41.1, 2.42.2, 2.43.4, and 2.44.1 maintenance releases.
2026-10-10 14:17:21 +08:00
07akioni e2c410ef84 release(dsh): 0.2.1-alpha.2 2026-10-09 15:13:40 +08:00
Tianyi Cui cfad6ba882 fix(worktrees): isolate inherited attributes and clarify Git content 2026-10-06 01:39:48 +08:00
Tianyi Cui 2b6040c40c fix(worktrees): suppress configured checkout filters 2026-10-06 01:39:48 +08:00
Tianyi Cui 171cf5d70f fix(experimental): align worktree fixtures and catalogs with current runtime 2026-10-06 01:39:47 +08:00
Tianyi Cui b26f8eadd4 test(experimental): cover worktree portability on Windows 2026-10-06 01:39:47 +08:00
Tianyi Cui d26fe1ab4e fix(experimental): address worktree review findings 2026-10-06 01:39:46 +08:00
Tianyi Cui d299d3b966 test(experimental): verify worktree release and sandbox behavior 2026-10-06 01:39:46 +08:00