Commit Graph
100 Commits
Author SHA1 Message Date
imccyu d8f5b0507d Merge pull request #2495 from deepseek-harness/release/dsh-0.1.0-rc.1
release(dsh): 0.1.0-rc.1
2026-08-13 16:51:36 +08:00
imccyu df9ea1681f fix: snapshot 2026-08-13 16:20:19 +08:00
imccyu fb0f0ba799 Merge pull request #2499 from deepseek-harness/fix/static-ci-081316
fix: static ci
2026-08-13 16:08:16 +08:00
imccyu 944a0260ca fix: static ci 2026-08-13 16:05:57 +08:00
imccyu 7913fc510b Merge pull request #2489 from deepseek-harness/fix/publish-retry-idempotence
fix(release): make publication retry, space out, and skip what already landed
2026-08-13 15:42:39 +08:00
imccyu 6e05cb7ff5 release(landlock-run): 0.1.1 2026-08-13 15:32:17 +08:00
imccyu f1e8187974 fix: static
fix: tar
2026-08-13 15:32:13 +08:00
imccyu 8d6f5164ab fix(release): make publication retry, space out, and skip what landed
A landlock publication failed with `E409 Failed to save packument` on the
second of three packages. The registry answers a write it could not commit that
way, and publishing several packages back to back is what provokes it.

Neither publish path could recover. The native sequence published from a shell
loop of bare `npm publish` calls: no retry, and no way to resume, because the
registry rejects a repeat of an existing version permanently — so a failure
partway through left the release stuck. publish.ts skipped versions already
present, which made a re-run safe, but had no retry either.

Both paths now attempt a tarball up to four times, space writes at least two
seconds apart, and back off 2s/4s/8s between attempts. Every retry re-reads the
registry first, because a reported failure can answer a write that landed
anyway: a version that now exists with this tarball's integrity counts as
published rather than as one to place again. That same re-read is what turns a
mid-run `E403 cannot publish over the previously published versions` into a
skip when the bytes match, and leaves it a hard failure when they do not.

The native sequence gets the registry comparison publish.ts already had, through
its own script rather than shared code — the two sequences keep separate
publication paths. Its publish job now checks out the repository, which the
shell loop did not need.

Verified against a scripted registry: a clean publish, one E409 then success, an
E409 whose write landed anyway, E409 on every attempt (fails after four), and a
version already present with matching integrity (publishes nothing).
2026-08-13 15:31:09 +08:00
imccyu be96840412 Merge pull request #2473 from deepseek-harness/publish/npm-packagejson
build(release): publish the vendored framework and the native packages publicly
2026-08-13 14:17:16 +08:00
imccyu a213befd0f build(release): publish the vendored framework and the native packages publicly
The three release sequences shipped with publishConfig.access: restricted, so
nothing in the @deepseek-ai scope was installable from outside the organization.

A restricted dependency is what actually blocks a public consumer: every harness
package declares the vendored framework as a peerDependency, and
dsh-sandbox-local declares the Landlock entry as a dependency. Those two
sequences therefore go public first — the nine vendor/* packages and the three
native/landlock-run packages — while the dsh family stays restricted until its
own sequence is opened deliberately. No public package requires a restricted one
in this arrangement.

Access is now per sequence, so no publish path can pass --access: one flag
cannot express two levels and would override the manifest that owns the fact.
publish.ts stops passing it, matching the native workflow, and
check-workspace-constraints holds each manifest to its own sequence's level,
which is what stops the scope from drifting one package at a time.

Harness consumers reference the Landlock entry as workspace:^ instead of
workspace:*, so a published harness package accepts the entry's patch and minor
releases. The entry keeps workspace:* for its platform packages, where the
binary must match the entry version exactly.

Two rationales that named a private registry no longer describe the vendored
sequence; they now state the durable reason, which is that the verification must
not depend on the registry already carrying matching versions.
2026-08-13 14:05:48 +08:00
imccyu 1646b7617e fix(bundle): exclude product subagents from base
The Codex and Claude Code subagent providers were production dependencies of
@deepseek-ai/dsh-base and mounted by its Cordis composition, so every install of
the base bundle carried two providers that only some products want.

Drop both from the base bundle's dependencies and composition. The examples keep
them as explicit dependencies, base's tests lock their absence, and the product
preset e2e mounts the providers it needs explicitly.

Cherry-picked from #2387 (two commits squashed into one).
2026-08-13 14:05:46 +08:00
imccyu 3083461524 Merge pull request #2447 from deepseek-harness/release/dsh-0.0.1-rc.5
Release: dsh@0.0.1-rc.5
2026-08-13 06:18:58 +08:00
imccyu 5f3a9c82e8 Merge pull request #2449 from deepseek-harness/release/vendor-081306
Release: vendor@4.0.1-rc.4
2026-08-13 06:10:43 +08:00
imccyu 76be2ef4dc Merge pull request #2446 from deepseek-harness/fix/vendor-release-bump-all
Release: vendor@4.0.1-rc.3
2026-08-13 05:56:57 +08:00
imccyu 069e472e79 Merge pull request #2445 from deepseek-harness/release/vendor-0813
release(vendor): include 1.0.6-rc.2, loader 1.0.2-rc.2
2026-08-13 05:39:59 +08:00
imccyu eb1c67eb6f Merge pull request #2443 from deepseek-harness/fix/session-log-export
Release: dsh@0.0.1-rc.4
2026-08-13 05:29:23 +08:00
imccyu 57abe62a83 Merge pull request #2438 from deepseek-harness/release/dsh-0.0.1-rc.3
Release: dsh@0.0.1-rc.3
2026-08-13 04:18:26 +08:00
imccyu 069c611983 Merge pull request #2047 from deepseek-harness/worktree-cordisweb
feat(cordis-web): model-mounted dynamic dual-half packages for the web client
2026-08-13 04:17:39 +08:00
imccyu 77f9c4fa0a fix: test 2026-08-13 04:02:29 +08:00
imccyu 499d397631 feat: optimze skill and tool 2026-08-13 03:46:20 +08:00
imccyu 35b51dd15c fix: test 2026-08-13 03:24:03 +08:00
imccyu 96d8f9516b feat: optimize prompt 2026-08-13 03:18:04 +08:00
imccyu de25be3647 fix: coverage 2026-08-13 02:58:32 +08:00
imccyu 11a55092e8 fix: rebase 5 2026-08-13 02:51:52 +08:00
imccyu db6b14eb5b fix: rebase 4 2026-08-13 02:38:16 +08:00
imccyu 1ff62760d1 fix: rebase 3 2026-08-13 02:29:17 +08:00
imccyu 45dfff0cdd fix: rebase 2 2026-08-13 02:22:10 +08:00
imccyu 39f55a049f fix: rebase 2026-08-13 01:59:32 +08:00
imccyu 25efb8ff6f fix: snapshot test 2026-08-13 01:37:31 +08:00
imccyu 8bf7b4cc8e fix: vitest 2026-08-13 01:35:47 +08:00
imccyu 4563086a94 fix: ci 2026-08-13 01:35:47 +08:00
imccyu 5a0283b04f fix: ci and static 2026-08-13 01:34:55 +08:00
imccyu a7d4cd8e1b fix: ci 2026-08-13 01:33:31 +08:00
imccyu 978e573605 fix: test/docs 2026-08-13 01:30:49 +08:00
imccyu ffcc8e299b fix: pkg version 2026-08-13 01:29:36 +08:00
imccyu 4064198560 • feat(self-modification): add dynamic Cordis plugin runtime and UI 2026-08-13 01:29:36 +08:00
imccyu 0367506471 feat: slot system + entries/priority/errorreport + typert generator 2026-08-13 01:24:12 +08:00
imccyu 3784607f3d Merge pull request #2035 from deepseek-harness/fix/grep-glob-web-search-row-distinction
fix(client): distinguish grep/glob rows from the web search row
2026-08-12 14:27:04 +08:00
imccyu b76029db0a Merge pull request #2322 from deepseek-harness/fix/clienthost-spec
fix(types): assign package tests to client and host compiler faces
2026-08-12 13:00:58 +08:00
imccyu ff9ee1d9e3 fix: client tsconfig spec 2026-08-12 12:04:30 +08:00
imccyu 660d24e705 fix: client/host spec 2026-08-12 11:22:24 +08:00
imccyu 82d21ab3c3 Merge pull request #2206 from deepseek-harness/worktree-rpchost
refactor(commands): move the command service to Remote and settle the Remote compile faces
2026-08-12 02:44:19 +08:00
imccyu 58b6fa3ae1 fix: test constract 2026-08-12 02:30:08 +08:00
imccyu 929086fb36 fix: docs 2026-08-12 02:30:08 +08:00
imccyu 19303da8de fix: no .map
fix: no map
2026-08-12 02:30:03 +08:00
imccyu d91180db9a docs: client spec 2026-08-12 02:16:39 +08:00
imccyu 2c2d9f26e5 fix: client spec 2026-08-12 02:16:39 +08:00
imccyu 7ad54e7791 refactor(client): name the compile face in every client test filename
A test file under packages/client now says which face it covers:
`*.client.spec.{ts,tsx}` and its `*.client.{ts,tsx}` helpers belong to the
Client aggregate, `*.host.spec.ts` to the host aggregate. The carrier's four
node-half specs take the Host suffix.

The two suffixes are mutually exclusive, so each aggregate excludes the
other's and both keep one broad test glob: `exclude` wins over `include`, and
`packages/client/**` no longer has to be excluded wholesale from the host
program with per-file `files` entries carved back out of it. A Host-face spec
that reaches only Host source therefore needs no cross-face project
reference, which the split-project rule rejects.

vitest still discovers every file through `**/*.spec.{ts,tsx}`.
2026-08-12 01:41:40 +08:00
imccyu 7c3bd75bcc test(remotes): unwrap the Remote envelope in the built-lib chain
Every generated method resolves to RemoteResult, so the plain-Node script
must read the business value through `.value`: the CAS ref it passed on to
goals/edit was undefined, which the client codec rejected before the request
left. The invalid-payload case keeps its try/catch — a codec-rejected
argument still throws at the Client Remote face rather than folding into the
error branch.
2026-08-11 23:56:39 +08:00
imccyu b0d3686f57 fix: pkg 2026-08-11 23:33:18 +08:00
imccyu 9b2925e50f fix: restore the credential-rejected branch and admit SRC absence by key
Review follow-ups that are logic rather than documentation:

- rpc.schema.ts had lost the credential-rejected branch while api-proxy.ts
  still returns that code, so a legitimate business error failed the
  client's response parse. Restore the branch and assert it.
- rpc-schemas.spec.ts had lost the workspace list, archiveSession and
  insertSessionBefore cases along with the command schemas; those routes
  still ship, so restore their coverage.
- An omitted SRC field is now recognized by an absent key instead of an
  undefined value, which makes the allowance assertExactArguments already
  granted reachable; an explicitly undefined field stays invalid input. A
  weak descriptor's undefined result rides the wire as an absent value,
  matching the envelope removal.
- The chooser unmounts an already-created backend when the surface entry
  fails to load, and no longer reverses the captured id array in place.
2026-08-11 23:33:18 +08:00
imccyu 378141bf5d fix: test 2026-08-11 23:33:18 +08:00
imccyu 6332bd3513 fix: build 2026-08-11 23:33:18 +08:00
imccyu 91e7b3d086 test(apiproxy): drop the carrier-signal case for the removed command route
`command.execute` no longer exists on the API Proxy, and the fake's own
handler went with it, so the case only reached a 404 body. The same carrier
behaviour is asserted on live routes by its `session.search`,
`subagent.prompt` and `host.pickDirectory` siblings.
2026-08-11 23:33:18 +08:00
imccyu dffc0a9a15 test(gateway): pin each folded carrier failure message verbatim
Matching the full `RemoteFailure` keeps the assertion inside the typed result
and drops the `expect.stringContaining` placeholders, whose `any` return the
lint rule rejects on assignment.
2026-08-11 23:33:18 +08:00
imccyu 7a9d7d2657 chore(hygiene): restore the cordis peers and teach knip the split faces
`@deepseek-ai/cordis` returns to the peer and dev dependencies of
`dsh-client-ui-model` and `dsh-client-ui-skill`; every harness package declares
it, and the client type-assembly rename dropped it from both. The commands
manifest ships `src` alongside its generated typert faces, matching the
`./src/*` export it already declares.

knip gains the two directory-picker surface workspaces, whose specs are `.tsx`
and matched no default pattern, and ignores `zod` in the commands workspace:
that dependency belongs to the generated Remote and Host faces in `lib/`, which
knip never scans. The unused `dsh-client-test-runtime` and
`dsh-client-connection` dev dependencies are gone; the picker surface's own spec
never imported the former, and ui-settings reads the carrier's types through the
Remote assembly now.
2026-08-11 23:33:17 +08:00
imccyu 3e41b38b39 test(gateway): fold a non-Error carrier throw into the client error branch 2026-08-11 23:33:17 +08:00
imccyu 160aec7115 chore(deps): record the commands zod dependency in the lockfile 2026-08-11 23:33:17 +08:00
imccyu 380b8a18a8 fix(commands): declare the zod runtime dependency of the generated faces
Exporting `./typert` and `./remote` ships two generated modules that
`import { z } from 'zod'`, and the package declared no runtime dependency at
all. Under pnpm's isolated layout nothing resolves zod for it — there is no
root `node_modules/zod` to walk up to — so loading the plugin tree failed with
ERR_MODULE_NOT_FOUND the moment a composition mounted the commands typert
face. The two other packages exporting `./typert` both declare it; this
matches them.
2026-08-11 23:33:17 +08:00
imccyu 92e0e3377f test: finish the Remote-result and picker-split test migrations
Every generated Remote method resolves to `RemoteResult<T>`, so the Gateway
client spec asserts the ok and error branches instead of the unwrapped value
and a throw, and the generator fixtures declare the wrapper in the consumer
face they typecheck. The RPC-failure test splits into the Host error carried
verbatim in the error branch plus a transport throw folded into it.

The runtime client, ui-command and ui-plan benches answer the generated
commands Remote through its result branches and provide the `remote.commands`
namespace their plugins now inject; the ui-command bench also serves the `$on`
the service subscribes on construction.

The directory-picker chooser mounts a backend and its surface as a pair, so the
real-Loader composition serves both surface packages and asserts each entry
arrives and leaves with its backend.
2026-08-11 23:33:17 +08:00
imccyu 03f88e3c3d test(gateway): report a business rejection under an aborted carrier as cancelled 2026-08-11 23:33:17 +08:00
imccyu ea791827f4 test(typert): reject a lookup parameter that accepts undefined 2026-08-11 23:33:17 +08:00
imccyu 51b5f5b565 test(picker): cover the node halves of the split directory-picker faces 2026-08-11 23:33:17 +08:00
imccyu 92e817bf38 chore(lint): satisfy the trailing-comma rule and drop dead oxlint directives
The Gateway client spec's synthetic Remote namespace now resolves under both
analyzers, so its typescript/no-unsafe-call suppressions report as unused.
2026-08-11 23:33:16 +08:00
imccyu df97e4ce2d fix: dep 2026-08-11 23:33:16 +08:00
imccyu 159d102f99 refactor(client): name one assembly package for the carrier types
A business package imported the Remote assembly for `ctx.remote` and the
Connection plugin for the wire types it passes around. The assembly now
re-exports the carrier's Client-facing types, so a business package names one
package. The re-export is type-only: the carrier's runtime values keep their
own module edge, since inlining them here would duplicate the carrier inside
the assembly bundle.

Four surfaces that had no Remote assembly dependency declare one now.
2026-08-11 23:33:16 +08:00
imccyu 027cbdfe5d refactor(faces): keep the generated contributions out of the Host aggregate
The Gateway and the carrier each compiled both halves under one tsconfig, so
the Host aggregate built their browser faces — including the face that owns
`ctx.remote`, the most likely future consumer of a generated `/remote`
contribution. Both packages now expose a host and a client face, and each
aggregate references only its own; three modules the halves share appear in
both file lists, as api/remotes already does.

The two apps/web specs in the Host aggregate restate the conversation engine's
Context key format instead of importing the Client runtime for it. A drift
makes the key miss its rendered node, so the assertion fails loudly.

The Host aggregate now reaches one Client project, the carrier's host face,
which the Gateway's own dispatch face needs; no generated contribution is
reachable from it.
2026-08-11 23:33:16 +08:00
imccyu 40af20cafe refactor(picker): split the directory-picker faces into their own packages
The browse and native backends were dual-face packages: a Node backend plus a
browser surface under one tsconfig that referenced Client packages. That put
Client projects — and through them the Client runtime — inside the Host
compiler aggregate, which builds before the generated Remote contributions
exist. Each browser half moves to its own Client package, and both backends
become Node-only.

The interaction is still one choice: the adaptive chooser mounts the backend
and its surface as a pair of Loader entries and tears both down in reverse, so
a resolved kind still swaps both faces. Compositions that pin an interaction
directly now pin the pair, and the chooser's runtime-string package list keeps
naming everything a composing app must resolve.
2026-08-11 23:33:16 +08:00
imccyu 070a2a7f1e refactor(commands): move the command service to Remote
`CommandService.list` and `execute` carry the wire contract directly through
`@Remote`, and the Client assembly mounts the generated commands
contribution. The legacy API Proxy route, its schemas, the map rows, the
generated client methods and the fixture's command domain are removed, so the
catalog and the admission call have one owner again.

`Session.command()` keeps a result-shaped public face for parity with the
prompt, cancel and attachment neighbours it sits beside, and reads the
generated namespace through one `SessionRemotes` parameter. The Session
cluster declares that face against the owning business package rather than the
generated contribution: the Host compiler aggregate builds this package, and
it runs before any contribution is emitted.

Migrated calls lose the `title-invalid` class of protocol-only error codes and
report `internal`; no production caller branched on them.
2026-08-11 23:33:15 +08:00
imccyu a2981207b0 feat(typert): deliver the carrier outcome from ctx.remote
Every generated Remote method now resolves to `RemoteResult<T>`: the Client
face folds a carrier failure, a transport throw and a rejected result payload
into one error branch, so no consumer wraps a call to recover them. Only
assembly faults still reject — a wrong argument count, an unmounted method, a
missing Context binder, an absent Connection.

`RemoteFailure.code` stays an open string because the closed RPC code union
lives in the carrier package, which already depends on type-meta; naming it
here would invert that edge.

The goal surface drops its own try/catch plus the structural probe that
guessed whether a thrown cause was an RPC failure, and reads the result
instead.
2026-08-11 23:33:15 +08:00
imccyu 027e5fe9a4 feat(typert): carry Remote absence without a second result envelope
Absence crosses the wire as a missing field: an omitted argument and a void
or undefined result both arrive as an absent JSON member, and the wide RPC
result slot accepts a success response without a value. Parameters declared
optional stay optional in the generated consumer declaration, so a business
signature is never widened to `T | undefined` to suit the wire. The weak SRC
descriptor reads parameter names from a JavaScript signature and cannot see
optionality, so a source-launched Host accepts an absent field and the strict
LIB pass owns rejecting a genuinely missing required parameter.
2026-08-11 23:33:15 +08:00
imccyu 8c31290abb docs: propose unary API Remote migration 2026-08-11 23:33:15 +08:00
imccyu 38f99f04f1 Merge pull request #2286 from deepseek-harness/release/dsh-0.0.1-rc.2
release(dsh): 0.0.1-rc.2
2026-08-11 23:04:55 +08:00
imccyu 5ca7be5dcb release(dsh): 0.0.1-rc.2 2026-08-11 22:52:39 +08:00
imccyu e690867a8a Merge pull request #2265 from deepseek-harness/worktree/multimodal-ui
feat(web): align attachment display with DeepSeek Chat via ui-attachment atoms
2026-08-11 19:55:56 +08:00
imccyu f123fb280f Merge pull request #2201 from deepseek-harness/worktree-remoteevent
feat(remote): deliver allowlisted Host events through ctx.remote.$on
2026-08-11 19:38:40 +08:00
imccyu 23c35108d6 fix(test): inject locale settings dependencies 2026-08-11 19:25:43 +08:00
imccyu 3727e242cd fix(ci): satisfy lint contracts-ready lane 2026-08-11 19:25:43 +08:00
imccyu ac01c3b035 fix: lint 2026-08-11 19:25:42 +08:00
imccyu 473289b46a fix: snapshot 2026-08-11 19:25:42 +08:00
imccyu 2c4b3d015b fix: setting scope ctx 2026-08-11 19:25:42 +08:00
imccyu ffdf81b28d fix(ci): repair remote event coverage and catalogs 2026-08-11 19:25:42 +08:00
imccyu e0bbe42242 refactor(web): consume owner remote events directly 2026-08-11 19:25:42 +08:00
imccyu 80f1a064f5 fix: dep 2026-08-11 19:25:41 +08:00
imccyu b7c99b696c test(web): mount the settings domain base in the assembled boot table
`assembled-boot.ts` hand-maintains the boot entries for the built-bundle jsdom
graph, and this branch made the locale and ui-theme rows inject `settingsScope`.
Nothing in that table provided it, so both stayed pending, ui-layout never
activated behind them, and all four assembled snapshots timed out waiting for
the first rendered row. Adds the ui-settings entry ahead of them (it injects
nothing itself) and records `api-gateway` on the runtime entry, which now needs
`remote`.
2026-08-11 19:25:41 +08:00
imccyu 32378d27b4 docs(ui-settings): describe the settings domain base and its shell
`SettingsRoot` and the `sidebar.settings` occupancy moved to ui-settings-general,
but both READMEs still read as if ui-settings were the shell. ui-settings now
documents what it actually is — the `ctx.settingsScope` transport plus the slot
type declarations, with the bind ownership, refresh triggers, write revision
handling, and decode refusal a preference row must know — and records the
loopback-only and single-field write gaps in place of two limitations that no
longer exist. ui-settings-general documents the shell it now renders. The stale
module JSDoc on both halves follows.
2026-08-11 19:25:41 +08:00
imccyu 364f7c7076 docs: compile the note's type-contract and allowlist examples
The six `ignore-check` fences this note added pushed doc-typecheck's repo-wide
opt-out ratio past its 50% ceiling. Two of them were whole compilable units all
along: the type-meta declarations only lacked the cordis `Events` import, and the
allowlist example compiles as one module once the value and its derived type face
sit in the same block. The four that remain are genuine fragments — two interface
member signatures, a union arm, and an expression whose operands are declared
elsewhere.
2026-08-11 19:25:41 +08:00
imccyu e874e80012 fix: test 2026-08-11 19:25:41 +08:00
imccyu 01ecb43ebc docs: state the Host-face rule for the browser e2e and settle the follow-ups
apps/web/tests/README.md records why these e2e type-check in the Host aggregate
and why importing a Client package there pulls its project tree into the Host
build graph, with mirroring as the standing answer. The Agent Note drops the
directory-picker face split (assessed and declined) and the grep-level gate in
favour of that README.

docs: regenerate the catalogs and retarget the moved declarations

The forwarded-event change moved three owner packages' cordis `Events`
declarations and their branded types into client-safe `./types` modules, and
the settings-scope split moves the shell spec into ui-settings-general. Point
the type-equivalence manifest and the affected Agent Note at those homes,
register the new `remote/*` event scope and the `ctx.settingsScope` service in
the catalog partition, and re-run the generators.

`$on` joins the documented `TypeRTClientRemote` surface, and the two Agent Note
fences that quote a bare member signature are marked `ignore-check`: they are
declaration fragments, not compilable units.

refactor(client): make ui-settings the settings domain's base layer

The settings-namespace transport lived in client/runtime, where every feature
could value-import it because runtime is a platform module. It belongs to the
settings domain, but moving it into ui-settings as a shared function fails
twice: the client bundle purity gate forbids cross-plugin value imports, and
ui-settings reached ui-sidebar for its shell, so any feature depending on it
closed a cycle through ui-layout and ui-theme.

Both halves move. `ctx.settingsScope` is now a cordis service — the
collaboration shape the purity gate prescribes, and the service proxy binds
`this.ctx` to the caller, so a bound scope's disposer belongs to the calling
fiber. The shell ui-settings used to own (the `sidebar.settings` occupant, its
navigation, and the nav-row projection) moves to ui-settings-general, which
already owns the chrome and the General section. What stays in ui-settings is
what carries no `ui-*` dependency: the scope service and the canonical settings
slot types, `settings.general.item` included. That type was parked in the locale
package precisely because the declarer was unreachable without a cycle; every
registrant now depends on this base layer, so it comes home.

The scope CONTRACT stays in client/runtime: a feature service accepts a scope
through its own signature without depending on the surface that binds it.

The forwarded settings invalidation replaces the deleted client-side
`settings/changed` event, so the transport reads `ctx.remote.$on`. It reaches
`$on` through the gateway's Client half plus the allowlist's type-only subpath
rather than api-remotes' Client face: that face imports a Host-tsdown-generated
artifact, and this package is reachable from the Host build graph through its
callers.

refactor(client): reach the settings transport through ctx.settingsScope

Every feature that owns a preference row switches from value-importing a shared
binder to the settings domain's service, and declares the two injections that
binding needs: `settingsScope` for the transport and `remote` for the forwarded
invalidation it subscribes to on the caller's own context.

The rows stay with the features that own the preferences — Language with locale,
Appearance with ui-theme, Composer Enter with ui-conversation. Only their route
to the transport changes, so no settings surface moves and no feature gains a
dependency on the shell.

The `settings.general.item` slot type now arrives from ui-settings, the base
layer every registrant already depends on, which retires the re-export outlet
ui-theme kept and the parked declaration in the locale package.

client/runtime drops its settings-form and schemastery dependencies with the
transport that used them.

test(client): bind the settings transport in the specs that boot a preference row

Every bench that activates a plugin owning a preference row now supplies the two
services that plugin injects: the forwarded-event port and the scope service.
Specs that exercise no settings path get the minimal doubles; the ones that do
drive their refresh chains through `remote/host-event`, the same signal
client/runtime republishes from a forwarded frame, replacing the deleted
client-side `settings/changed` event.

Also fixes a publication defect the built-invariant gate catches once it runs:
api-remotes' invariant companion shared the allowlist module with the package
index, so rolldown hoisted it into a third chunk beside the two bundled entries
— a file the mechanically derived publication list does not carry, leaving an
installed companion unable to import it. The companion now reads the allowlist
through this package's own published `./types` subpath, which the bundle keeps
external, so each entry stays self-contained.

The dynamic-subscription cast in apiproxy is gone: after the vendored cordis
rescope, `on` accepts the rest-parameter handler directly, and the allowlist's
shape assertion still carries the safety argument.

fix(client): carry the settings-scope move across the release manifests

Rebasing onto the publishable release set replaced every manifest's dependency
block, so the packages this change touches restate their additions in the
workspace-protocol form: the base layer's own transport dependencies, and the
`ui-settings` plus `remote` edges each preference-row owner now needs.

ui-settings-general takes clsx with the shell it received, and client/runtime
drops the settings-form and schemastery dependencies that left with the
transport.

fix(api-gateway): give each $on subscription its own registration and containment

Two defects in the forwarded-event subscription table, both raised in review:

A set keyed on listener identity stored one entry when two callers subscribed the
same function object to the same event, so the first frame reached it once instead
of twice and either disposer silenced the surviving registration. Subscriptions are
now records addressed by registration, which is what "the disposer belongs to the
calling fiber" requires.

A listener declared void may still be `async`, and the synchronous `try/catch`
could not see its rejection: the promise was dropped and surfaced as an unhandled
rejection outside the documented containment. Delivery now attaches a rejection
handler when a listener returns a promise, so both failure modes are logged and
isolated alike.

Delivery also iterates a snapshot, so a listener that subscribes or disposes during
a frame no longer changes who receives that frame, and production matches the
TestRemote double instead of relying on live Set iteration order.

Both fixes are pinned by tests that fail against the previous implementation. The
double gains its own spec for the `$mount` refusal and the unsubscribed-name drop —
per-file coverage reaches it — plus a note that it propagates a throwing listener
where production contains one, so no spec mistakes it for the containment guarantee.

Three prose corrections: `assertJsonArgs` states where its throw actually surfaces
(the emitter's listener containment, not load or emit time), the browser e2e README
names every standing Client import rather than claiming one exception, and two
comments and a test title state the forwarded event instead of the deleted
client-side one.

refactor(remote): deliver forwarded frames through ctx.remote.$dispatch

The carrier used to relay each decoded frame over an internal
`remote/host-event` cordis event so the delivery port could stay off the Remote
contract. The relay was the wrong shape twice over: it put a client-face event
into a scan whose subject is the Host vocabulary, forcing a walk exemption for
something that is not a Host event at all, and it made a direct handoff between
two Client plugins look like a broadcast any plugin participates in.

`TypeRTClientRemote` now carries both roles of one surface — consumers subscribe
with `$on`, and whoever owns the Host frame sink hands frames over with
`$dispatch` — so client/runtime calls the Remote service directly and the event
declaration is gone. A cordis service method is the collaboration shape the
client bundle purity gate prescribes, and it needs no relay to satisfy it.

The trade is that the handoff is now developer-visible: any plugin holding
`ctx.remote` can synthesize a forwarded event. That is the exposure the relay
already had — `ctx.emit` was equally reachable — stated in the contract instead
of hidden behind a private subscriber.

runtime reaches `ctx.remote` through the gateway's Client face rather than
api-remotes': that face imports a Host-tsdown-generated artifact, and this
project sits in the Host build graph.

refactor(api-remotes): keep the allowlist value out of types.ts

`src/types.ts` carries only types by package convention, but it held the
forwarded-event array, so the type-only subpath published runtime code. The
array moves to `src/remote-events.ts` and `types.ts` derives its projection from
it; both compiler faces list both files, so the Host forwarding loop and the
consumer key face still read one declaration and the package's exports are
unchanged.

The invariant companion returns to an empty installer. Its dispatch-shape check
was the only reason the companion imported the allowlist, which made the two
bundled entries share a module: rolldown hoisted it into a third chunk that the
mechanically derived publication list does not carry, so an installed companion
could not import it. Dropping the check retires that coupling along with the
subpath-import and bundle-external workarounds it needed, and the shape the
check enforced at runtime is the part the Host face's `TypeRTForwardableEvent`
assertion already refuses at compile time.

test(ui-task): bind the locale plugin's new injections in its bench

The bench boots the real locale plugin, which now injects the settings-scope
service and the forwarded-event port, so it stayed pending and left `ctx.locale`
undefined. Supplies both doubles like the other benches that boot a plugin
owning a preference row.

docs: close the documentation gates for the forwarded-event surface

Regenerates the two graph catalogs and re-records every bilingual pair this
branch edited. Several pairs needed real work beyond the record:

- The generators write only the English side, so the Chinese sides of
  `event-producer-consumer` and `module-graph` had drifted: the former still
  listed the three deleted client-face events and pointed at declaration sites
  this branch moved into `types.ts` modules, and the latter carried a stale
  dependency graph.
- `TypeRTClientRemote`'s documented declaration gains `$dispatch` on both sides.
- The pairing contract requires both sides to link the same target, so the
  apiproxy README and the design note now link the English note from both
  languages, and the note's code blocks are byte-identical across the pair
  (a translated comment inside a fence counts as divergence).
- `apps/web/tests/README.md` gains its Chinese counterpart; the browser e2e lane
  documents a discipline reviewers apply, so it belongs in the bilingual corpus
  rather than in the pairing exemption list.
- Four fences in the design note are marked `ignore-check`: each quotes a member
  signature, a union arm, or a snippet that names symbols it does not import, so
  none is a compilable unit.

docs(agent-note): transition the forwarded-event note to implemented

The design shipped in this PR, so the pair moves into `implemented/` and takes
that folder's skeleton: `## Proposal` becomes a present-tense `## Decision`,
and `## Acceptance criteria` plus `## Risks` fold into `## Verification` (what
pins the behavior) and `## Consequences` (what the shipped shape costs).

Facts that moved after the proposal are corrected rather than preserved: the
allowlist value now lives in `remote-events.ts` beside a type-only `types.ts`,
the delivery port is `$dispatch` rather than an internal cordis event, and the
invariant companion is an explained empty installer. `Verification` states the
two `$on` defects the review found — independent registration identity and
async-rejection containment — since those are now the properties tests pin.

Supersession is partial, so five active notes stay active and gain a
cross-link each: `web-config-plane`, `web-client-session-scope`,
`config-plane-boundaries`, `versioned-gui-welcome-onboarding`, and
`permission-default-for-new-sessions` each described a frame this change
replaced. Only the mechanism sentence is annotated; every conclusion those
notes own is untouched, and `host/models-changed` remains apiproxy's own
derived frame in all of them.

Also pins the disposer's idempotence: calling one `$on` disposer twice must not
splice a surviving twin registration out from under its owner.

fix: docs

fix: test
2026-08-11 19:25:41 +08:00
imccyu 77ccffa35e feat(api-remotes): enforce the forwardable shape and resolve the invariant companion
The allowlist's satisfies assertion is active again, so a name that is not a
declared event, binds a Scope, or is not one-way fails at the allowlist rather
than on the wire; the owner packages' ./types imports are what give it a real
event vocabulary to judge. The companion's own paths entry lets its test resolve
it from source instead of a built artifact, matching the api-gateway entry.
2026-08-11 19:25:40 +08:00
imccyu 04b2f7bcc9 test(web): keep the browser e2e out of the Client build graph
These e2e boot a real harness and read Host services, so they type-check in the
Host aggregate; importing a Client package there pulls its whole project — and
everything it references — into the Host build phase, where a Client project
waiting on generated artifacts cannot compile. The welcome-notice constants are
mirrored in the scaffold instead, which lets apps/cli drop the Client project
references that only served as their owner map.
2026-08-11 19:25:40 +08:00
imccyu d88f771e19 feat(remote): deliver allowlisted Host events through ctx.remote.$on
api/remotes owns the allowlist and its type projection; type-meta owns the shape
predicate, the selection seat, and the internal remote/host-event carrier
signal; api/gateway's Client half turns that signal into $on callbacks through a
private dispatch. apiproxy forwards each allowlisted emission verbatim in one
host/remote-event frame, registered ahead of the derived invalidation frames so
frame order is unchanged, and drops the three per-event variants it replaces.
Owner packages move their Events declarations into client-safe ./types exports,
so a consumer's listener signature is the Host's own declaration.
2026-08-11 19:25:40 +08:00
imccyu b64da061a8 docs: record the forwarded-event surface and its face boundaries
Each owner package's README states which of its cordis events are forwarded and
that the declaration now lives in the client-safe ./types export. api/remotes
documents the allowlist as the single control point and the deliberate
both-faces listing of src/types.ts; development.md keeps the split-tsconfig rule
current.
2026-08-11 19:25:40 +08:00
imccyu 7c8ee81818 docs(agent-note): propose Remote event delivery via ctx.remote.$on
An allowlist in api/remotes drives verbatim forwarding of Host cordis events
that bind no AgentScope, wrapped in one host/remote-event frame on the existing
host stream. Consumers subscribe through ctx.remote.$on, whose listener type is
the owner package's own Events declaration, so the payload contract holds by
construction rather than through a restated table.
2026-08-11 19:25:39 +08:00
imccyu ea574b5fca Merge pull request #2180 from deepseek-harness/worktree-dark
fix(client): apply theme before plugin loading
2026-08-11 16:41:50 +08:00
imccyu f0a6c25291 fix(client): apply theme before plugin loading 2026-08-11 15:35:32 +08:00
imccyu 3fcf947765 Merge pull request #2200 from deepseek-harness/fix/agent-preset-ui-flow
fix(web): Some UI problem: agent preset UI fix, subagent badge flash fix
2026-08-11 11:04:04 +08:00
imccyu 45befb87e2 Merge branch 'master' into fix/agent-preset-ui-flow 2026-08-11 10:54:13 +08:00
imccyu db1028a84d Merge pull request #2188 from deepseek-harness/feat/trajectory-conversation-nodes
refactor(ui-trajectory): assemble registered conversation nodes
2026-08-11 04:20:45 +08:00
imccyu 3f7c2a25b6 docs: record trajectory context assembly 2026-08-11 03:29:04 +08:00