Commit Graph

485 Commits

Author SHA1 Message Date
Yichen Jiang
4788569889 feat(skill): layer the host skill registry per scope like the tools registry
The skills capability moves back to the host plane as one singleton, layered
with the ScopedLayers infrastructure the tools registry established: a
registration files into its calling context's layer (repository plugins and
host rows land global, a preset's skill-local lands in that preset's layer),
and a read merges the global layer with the viewing scope's chain, the
nearest layer winning duplicate names outright while rank keeps deciding
duplicates within one layer.

The web-app bundle re-enables the base skill registry row (skill-local and
tool-skill stay preset-owned), the standard preset drops its isolate skills
realm for bare rows over the host registry, tool-skill passes the calling
agent as the view scope, and the gateway's skills domain reads the host
registry in the presenter scope — a cold session now resolves its recorded
preset's standing key instead of failing.
2026-08-09 22:10:38 +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
Turtle
9704749b01 docs: replace vague provenance prose with recorded facts 2026-08-09 15:35:02 +08:00
Yichen Jiang
3d21db0b83 test(repository-plugin): drop the skill contribution from the preset-composed e2e
The agent plane of this stack's compositions lives behind agent presets,
whose per-preset skills realm has no seam for a deployment-level provider
yet: the fixture's dsh.skills made the prepared wrapper wait forever on a
host skills registry the web/headless profiles no longer compose. Remove
the skill root and its assertions from the fixture and record the gap in
the package's Known Limitations; MCP and entry contributions stay covered
because the tools registry is host-plane and layered.
2026-08-09 13:45:14 +08:00
Tianyi Cui
9d5eb37638 fix(headless): dsh run is a direct core front door 2026-08-09 13:44:44 +08:00
Yichen Jiang
2ebe078ad9 Merge remote-tracking branch 'origin/stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire 2026-08-09 13:16:14 +08:00
xjt
acf75a8af3 Merge origin/master into xjt/incremental-proofreading-275-apply 2026-08-09 12:17:59 +08:00
Tianyi Cui
fc20194733 fix(repository-plugin): follow package regrouping 2026-08-09 11:41:40 +08:00
Tianyi Cui
690fc798a5 test(repository-plugin): isolate simulated npm release 2026-08-09 11:41:40 +08:00
Tianyi Cui
29b3e3fa84 fix(repository-plugin): require published prepare dependency 2026-08-09 11:41:40 +08:00
Tianyi Cui
913ecf5f1d fix(mcp-client): await Cordis startup discovery 2026-08-09 11:41:40 +08:00
Tianyi Cui
67b9e9b1d6 test(repository-plugin): isolate agent mock sequence 2026-08-09 11:41:40 +08:00
Tianyi Cui
c750d5a908 test(repository-plugin): resolve published Cordis types 2026-08-09 11:41:40 +08:00
Tianyi Cui
033fa4b0b1 feat(repository-plugin): load trusted package code 2026-08-09 11:41:40 +08:00
Tianyi Cui
b91b1fdefe fix(repository-plugin): make GitHub source preparation self-contained 2026-08-09 11:41:40 +08:00
Tianyi Cui
da2179dd2b test(fixtures): prepare repository Plugin at prepack 2026-08-09 11:41:40 +08:00
Tianyi Cui
b995b12261 test(fixtures): add private GitHub repository Plugin 2026-08-09 11:41:40 +08:00
xjt
a7af54a8d3 docs(i18n): standardize contract terminology 2026-08-09 11:33:14 +08:00
Yichen Jiang
4952afe5c0 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	docs/cordis-catalog/services.md
#	docs/module-graph.md
#	docs/subsystems/persistence.i18n.yaml
#	packages/client/ui-question/tsconfig.json
#	pnpm-lock.yaml
2026-08-09 03:05:10 +08:00
Tianyi Cui
36cf4f32f4 docs(agent-note): flip the regrouping note to implemented
Move the triplet to implemented/architecture/, rewrite Proposal into a
present-tense Decision, fold Acceptance criteria and Risks into
Consequences (recording what pins the result), retitle the migration
section to what the move actually touched, and repoint the seven
inbound FIXME/README links.
2026-08-09 01:25:24 +08:00
Tianyi Cui
3fc35c91ff 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).
2026-08-09 01:21:12 +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
Yichen Jiang
46649858f6 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
Rewires this layer onto the standing-mount model:

- serviceForAgent roots its search at the agent's standing mount (parent
  scope key → live mount fiber) — the composition no longer lives under the
  agent's own fiber, and two agents on one preset now address ONE instance,
  which the sharing test asserts instead of distinctness.
- viewFor/historyPage take a registry view SCOPE. A live agent is that scope;
  a cold read uses the recorded preset's standing key via standingKeyFor —
  composing plugins but starting no agent, session, or turn. A header without
  a preset (a pre-roster log) renders through the DEFAULT preset's standing
  layer; an unusable preset degrades the read to generic cards, never fails
  it. This turns produced-files and chat-scroll green structurally, with the
  token counts untouched (no resume, so the projections fold stays detached).
- The detached projections baseline now includes every standing unit's key at
  its empty fold (todos: null): the standing mount registers units
  deterministically, which is what makes the client's "omitted key =
  capability absence → clear" rule safe again. seeded-history's contract test
  asserts the new shape.
- The standard preset's realm preamble no longer claims a shared label pools
  instances — provide() throws on the second registration under one realm
  symbol; labels join REALMS.
2026-08-08 18:41:07 +08:00
Yichen Jiang
a21644af59 fix(web-app,agent-presets): keep the goal service on the host plane
The Gateway serves the goal domain as Remote endpoints, and a Remote method
picks its receiver Service from a generated descriptor — `clear(agent, ref)`
takes its agent as a PARAMETER, so the invocation is direct and the receiver
resolves on the host. Behind the preset's entry-local realm there was nothing
to resolve, and every browser goal call answered `service-unavailable`: the
composer's Clear goal button left the bar on screen.

That is the `bash-env` criterion read from the other side. Injection is not the
only host relationship a Service can have; being READ from a host row is one
too. The registry is keyed by session, so one host instance serves every
session exactly as it did before presets. The preset keeps the model-facing
tool, which is the choice a preset is for.

Also reverts the cold-transcript presenter resolve: resuming an agent to reach
its presenters made the context meter drop its cache and token counts on every
cold-opened session, trading one silent degradation for another. The card
degradation it addressed is diagnosed and still open.
2026-08-08 15:53:39 +08:00
Tianyi Cui
6d0a14d428 Merge origin/master into codex/dsh-badge-plugin 2026-08-08 15:42:47 +08:00
Tianyi Cui
b9e7db5abf fix(skill-badge): align with current base contracts 2026-08-08 15:39:19 +08:00
Tianyi Cui
e0f113f55b Merge origin/master into codex/dsh-badge-plugin 2026-08-08 15:33:41 +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
Tianyi Cui
f00f45e3f9 Merge origin/master at f1402327fa 2026-08-07 23:57:23 +08:00
Tianyi Cui
95366f6197 fix(cli): parse commands before loading environment 2026-08-07 23:28:17 +08:00
Tianyi Cui
ac154b2dfa test(cli): cover Harness-home credential loading in built entry
Source-level environment and credential tests prove the individual loaders, but they do not prove that the published launcher runs them before Loader evaluates a shipped profile.

Start the built dsh binary with the shipped base bundle and a test-only LLM probe. Put the endpoint in $DSH_HOME/.env, put the bearer token only in $DSH_HOME/.credentials.yaml, remove inherited DeepSeek overrides, and assert the mock request received both without leaking the token. This covers launch order, profile composition, the adapter, and the credential seam without a real API.
2026-08-07 22:04:04 +08:00
Tianyi Cui
3dfb16008d docs(config): align environment and credential contracts
Code already treats $DSH_HOME/.env as ordinary launch environment and stores managed credentials in .credentials.yaml, but public docs still described the old store, old precedence, removed literal adapter keys, and the deleted TUI. That directed users to the wrong file and overstated the supported configuration surface.

Update the existing English and Chinese owners in place, document inherited > managed > project > user credential resolution, and record the loadLayeredEnv export. Regenerate only pairing records and the source-line catalog; add no new section or site route.
2026-08-07 22:04:04 +08:00
imccyu
bb61dc13f2 refactor(api): colocate gateway and remote assembly 2026-08-07 21:47:17 +08:00
imccyu
64a963da0b feat: add TypeRT remote gateway infrastructure 2026-08-07 21:47:14 +08:00
Yichen Jiang
41938b9da6 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	apps/web/tests/shipped-composition.e2e.ts
2026-08-07 16:20:38 +08:00
Yichen Jiang
dfaf3c288e Merge remote-tracking branch 'origin/master' into claude/unified-environment-credentials-c8841a
# Conflicts:
#	apps/web/tests/models-settings.e2e.ts
#	docs/config-catalog.md
#	packages/llm/llm-deepseek/README.i18n.yaml
#	packages/llm/llm-deepseek/README.md
#	packages/llm/llm-deepseek/README.zh.md
#	packages/llm/llm-deepseek/src/index.ts
#	packages/llm/llm-pi-ai/src/config.ts
#	packages/llm/llm-pi-ai/src/index.ts
2026-08-07 15:54:13 +08:00
Turtle
d3af1d79b8 Merge origin/master into codex/dsh-badge-plugin 2026-08-07 15:33:56 +08:00
Turtle
5e5664e668 Merge remote-tracking branch 'origin/master' into task/command-feedback-master
# Conflicts:
#	.agents/notes/proposed/architecture/2026-07-27-session-projection-and-command-log.i18n.yaml
#	apps/cli/config/base.cordis.yml
#	apps/cli/package.json
#	packages/README.i18n.yaml
#	pnpm-lock.yaml
2026-08-07 14:40:42 +08:00
Yichen Jiang
6c315d2cb6 Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-4-settings 2026-08-07 14:25:59 +08:00
Yichen Jiang
bdf5e39986 fix(cli): give the shipped preset's todo tool its required config
master made `allowParallelInProgress` a required field on dsh-tool-todo, so
every composition must choose it. The base patch was updated with the field,
but the Web surface takes `tool-todo` from the mounted preset instead, and
that row carried no config — so the `standard` preset failed to mount and
every session on the Web surface died at setup.

Also make the preset tree's write test reach the override. Tearing the agent
down stops in the loader's own "tree is being disposed" case before any write;
a live row reconfiguring itself is the trigger that actually gets there.
2026-08-07 14:25:35 +08:00
Yichen Jiang
e95e413115 Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-4-settings 2026-08-07 13:39:40 +08:00
Yichen Jiang
f3f2129154 Merge branch 'stack/agent-profiles-2-configs' into stack/agent-profiles-3-wire
# Conflicts:
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/tests/api-proxy-subagents.spec.ts
2026-08-07 13:39:29 +08:00
Yichen Jiang
d38c32ac5c Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-4-settings
# Conflicts:
#	apps/cli/tests/web-agent-presets.e2e.ts
2026-08-07 12:52:58 +08:00
Yichen Jiang
43af75fca8 fix(cli): boot the composition test the way the preset boot now does
`apps/cli/config/base.cordis.yml` and `web.cordis.yml` no longer exist — the
bundle split replaced them with `packages/bundle/{base,web-app}/cordis.patch.yml`
— so this file booted a path that was deleted under it and every CI run since
the merge failed at `ENOENT`.

It now boots what `dsh web` boots: an empty preset root with the two bundle
patches over it. That root sits outside the workspace, so bare plugin names
cannot resolve by Node's upward walk and the flat module fallback the preset
boot maintains is what makes them resolvable — the same mechanism, not a
test-only shim. That fallback links each package's PUBLISHED entry, so this
file now consumes the artifact plane and moves to the lane that builds first
(`.e2e.ts`, beside `built-bin.e2e.ts`), rather than the coverage lane, which
installs and runs on a clean tree.
2026-08-07 12:50:09 +08:00
Yichen Jiang
31b7dc439b Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-4-settings 2026-08-07 02:58:16 +08:00
Yichen Jiang
89ae94d89f fix(web): stop leaking ask_user_question into every preset
`ui-question`'s node half called `ctx.tools.register` on the host context.
`ScopedLayers.merge()` combines the global layer with the agent's exact-scope
layer, and an unscoped registration lands in the global one — so the tool
reached every agent no matter which preset composed it. `core-web`, sold as a
two-tool benchmark surface, really presented three.

Rendering a question is a host UI capability; having the tool is an agent
capability, and only a preset decides that. The node half is now empty and the
`tool-ask-user` row moved into the preset that wants it. The TUI keeps its own
row, having no presets.

The composition tests now assert the global tool layer is EMPTY, which is the
invariant that would have caught this: any tool outside a preset reaches every
agent. The browser lane's composition, seeded-history, and hermetic-skill
assertions address their registries through a composed agent for the same
reason — those services are per session now, and the host cannot resolve an
`isolate` realm by name.
2026-08-07 02:57:30 +08:00
Yichen Jiang
2d1df8a9e2 fix(cli): declare the packages the shipped presets name
The bundle split emptied `apps/cli`'s plugin dependencies, and the flat module
fallback links only that manifest's closure — so a preset row naming
`@deepseek-ai/dsh-persona` resolved to nothing and every preset mount failed,
leaving each session with an agent that had no tools, persona, or token meter.
Which packages the shipped presets compose is not implied by any bundle: the
presets live beside this manifest, so this is where their closure is declared.

The hermetic skill test now addresses the registry through the composed agent,
the only shape that can see a preset's `isolate` realm.
2026-08-07 02:51:09 +08:00