Commit Graph
100 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 5aa10901ad Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
2026-08-09 21:35:37 +08:00
Yichen Jiang 0eff417b2a Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam 2026-08-09 21:33:45 +08:00
Yichen Jiang 2f86a93bdd test(apiproxy): follow the defaultModelSelection rename in the preset spec
The agent-default-model refactor renamed ApiProxyDefaults.defaultTarget to
defaultModelSelection; this stack-owned spec merged without textual
conflict and kept the old field, so its harness built a defaults object
whose selection thunk was undefined and every create answered internal.
2026-08-09 20:47:22 +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
Yichen Jiang a2d5e3d8a8 Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam
# Conflicts:
#	packages/README.i18n.yaml
#	packages/README.zh.md
#	packages/boot/app-boot/README.i18n.yaml
#	packages/boot/app-boot/README.zh.md
#	scripts/gen-cordis-catalog.ts
#	scripts/verify-package-readme-model-experience.ts
2026-08-09 20:28:03 +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
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
Yichen Jiang 1471f7c081 Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam
# Conflicts:
#	packages/core/scope/README.i18n.yaml
#	packages/core/scope/README.zh.md
2026-08-09 13:14:51 +08:00
Yichen Jiang 62f8eecbba Merge remote-tracking branch 'origin/stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire 2026-08-09 11:51:13 +08:00
Yichen Jiang cb442eb31d Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam 2026-08-09 11:47:41 +08:00
Yichen Jiang 5fc2a81fbe Merge remote-tracking branch 'origin/stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire
# Conflicts:
#	docs/module-graph.md
2026-08-09 11:07:48 +08:00
Yichen Jiang cc8690991c chore(docs): refresh the module graph after the master merge 2026-08-09 03:55:05 +08:00
Yichen Jiang f5d93652d3 chore(docs): refresh the module graph after the master merge 2026-08-09 03:45:30 +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
Yichen Jiang 101b074241 Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam
# Conflicts:
#	docs/capability-seams.md
#	docs/cordis-catalog/services.md
#	docs/module-graph.md
#	packages/README.i18n.yaml
#	packages/README.md
#	packages/README.zh.md
#	packages/boot/app-boot/README.i18n.yaml
#	pnpm-lock.yaml
#	scripts/gen-cordis-catalog.ts
2026-08-09 02:55:11 +08:00
Yichen Jiang be01ae9bf4 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire 2026-08-09 00:47:42 +08:00
Yichen Jiang 859b5b0396 test(agent-presets): cover the direct mountPreset boundary; refresh the module graph
The exported mountPreset carries its own unscoped-context guard beside the
service's, and the per-file gate wants it exercised where it lives. The
module graph regen after the master merge had been swallowed by a silenced
generator run.
2026-08-09 00:44:27 +08:00
Yichen Jiang 7507697c92 Merge branch 'mergefwd-1-seam' into mergefwd-3-wire 2026-08-09 00:27:40 +08:00
Yichen Jiang b5a8a1f722 chore(docs): re-record the packages pairing after the master merge 2026-08-09 00:24:06 +08:00
Yichen Jiang dbd2d75cad Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam 2026-08-09 00:23:11 +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 d43329d178 chore(docs): re-record the pairings after the seam merge 2026-08-08 22:48:29 +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 c9700b6c36 chore(docs): regenerate the catalogs and graphs and re-record the app-boot pairing after the master merge 2026-08-08 22:44:02 +08:00
Yichen Jiang 6ab2d40473 Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam 2026-08-08 22:43:36 +08:00
Yichen Jiang 132debb5fe fix(apiproxy): echo the resolved agent preset on create and session-added
session.create's reply named only the id, and the session-added frame's
agentPreset — which the server already derives via sessionListFields — was
stripped by the wire schema it never joined. A client therefore could not
label a session it just created (or learned live) until the next full list
refresh: the header's preset label rendered nothing for exactly the sessions
made in this tab. The create reply is the commit point that knows the
RESOLVED composition (a caller that named none gets the default the header
recorded), so both carriers now say it.
2026-08-08 20:16:50 +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 d770fb21cc docs(scope,agent-presets): standing-mount model, parent chain, and the Agent Note 2026-08-08 18:08:20 +08:00
Yichen Jiang e18aa2745c refactor(scope,agent-presets): per-preset standing mounts over a scope parent chain
A preset is now ONE composition per process, not one per session. The roster
mounts it once under a synthetic standing scope; each agent joins by having
its scope key parented to the mount's. Two mechanisms in dsh-scope carry the
whole change: registration views walk the parent chain (global → preset →
agent, nearest shadowing farthest — ScopedLayers.chainLayers), and scoped
event dispatch admits a listener tagged with an ancestor of the carrier key,
which is what lets a standing composition's plan/compaction/token listeners
observe each agent composed under it while a sibling preset's stay deaf.

The preset plugins already key their state by Session/Agent — they predate
presets and were written for the shared world — so sharing one instance is a
return to their design, not a rewrite. Preset ymls are unchanged: one mount
per preset means one Entry per preset, whose entry-local realms keep two
presets' services apart exactly as they kept two sessions' apart before.

The standing scope hangs off the service's UNTRACED context (selfCtx): a
method invoked through the traceable proxy sees this.ctx rebound to the
caller and carrying its shadow, and a subtree minted from that resolves every
service through the shadow's fiber instead of each entry's own inject store —
preset rows then fail on the very services they declare.

A standing mount survives its agents deliberately. The composition a running
session joined must outlive the file changing or disappearing underneath it;
reclamation happens at whole-tree teardown, and file edits reach only future
generations (the authoring layer swaps the pointer, never disposes a joined
generation).
2026-08-08 17:51:49 +08:00
Yichen Jiang e75a5c6651 Merge pull request #2040 from deepseek-harness/worktree/sidebar-subagent-activity
feat(web): surface subagent activity in sidebar
2026-08-08 16:47:06 +08:00
Yichen Jiang 3b10120d60 Merge remote-tracking branch 'origin/master' into worktree/sidebar-subagent-activity
# Conflicts:
#	packages/client/runtime/README.i18n.yaml
2026-08-08 16:37:29 +08:00
Yichen Jiang d174edf9eb Merge pull request #2034 from deepseek-harness/worktree/merge-compact-card
feat(web): merge compact status and summary cards
2026-08-08 16:23:00 +08:00
Yichen Jiang fb1d230518 test(web): avoid replay timing assertions 2026-08-08 15:56:36 +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
Yichen Jiang 81d32bf52c test(web): isolate sidebar subagent activity snapshot 2026-08-08 15:46:08 +08:00
Yichen Jiang 1c80023b12 fix(apiproxy): give a cold transcript read the agent its presenters live in
A preset registers its tools into the agent's OWN layer, so `session.history`
served while no agent exists found no presenter at all and every card degraded
to the generic renderer — silently, because a viewless entry is also what a
tool with no presenter produces. The web client opens a session by reading its
transcript, so this was the ordinary path, not an edge: the write row lost its
diff card, and with it the `locations` the produced-files row derives from.

The read now resolves the agent through the same deduplicated resume every
other session method takes, but only when a roster is composed: a deployment
without presets keeps its tools on the host layer, which needs no agent to
address, and keeps the storage-only read unchanged. A resolution failure stays
a successful read.
2026-08-08 15:27:57 +08:00
Yichen Jiang ebd3a87834 fix(web): stabilize compact card snapshots 2026-08-08 15:24:50 +08:00
Yichen Jiang b3a53c1e51 fix(client): address sidebar activity review 2026-08-08 15:14:29 +08:00
Yichen Jiang 7aca4c6b94 Merge branch 'master' into worktree/merge-compact-card 2026-08-08 14:45:55 +08:00
Yichen Jiang e9103ad5ee Merge branch 'master' into worktree/sidebar-subagent-activity 2026-08-08 14:44:48 +08:00
Yichen Jiang 04e6a98064 feat(client): surface subagent activity in sidebar 2026-08-08 14:42:14 +08:00
Yichen Jiang 63f88997bb fix(web): preserve compact icon until hover 2026-08-08 14:36:03 +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
Yichen Jiang 915a56208d Merge pull request #1977 from deepseek-harness/worktree/pi-ai-per-model-reasoning
feat(llm-pi-ai): per-model reasoning efforts, dialect switches, and modelOverrides in settings.yaml
2026-08-08 14:23:07 +08:00
Yichen Jiang f50521ac4c Merge pull request #2002 from deepseek-harness/feature/issue-1470-skill-invoke
feat(skill): deterministic user-explicit skill invocation at the pre-step gesture boundary
2026-08-08 14:17:52 +08:00
Yichen Jiang 1db327ea6c feat(web): merge compact status and summary cards 2026-08-08 14:11:26 +08:00
Yichen Jiang 2afdc68fab chore(docs): regenerate the graphs and re-record the pairings after the master merge 2026-08-08 14:04:53 +08:00
Yichen Jiang 18dee248a6 Merge remote-tracking branch 'origin/master' into feature/issue-1470-skill-invoke
# Conflicts:
#	docs/module-graph.md
2026-08-08 14:03:29 +08:00
Yichen Jiang ed492077a5 test(tool-skill): cover reject passthrough and non-text block scanning 2026-08-08 14:03:03 +08:00
Yichen Jiang f517d29723 Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam
# Conflicts:
#	docs/capability-seams.md
#	docs/event-producer-consumer.md
#	packages/README.i18n.yaml
#	packages/ui/app-boot/README.i18n.yaml
#	packages/ui/app-boot/src/index.ts
#	scripts/doc-budgets.manifest.json
2026-08-08 14:00:34 +08:00
Yichen Jiang 7f138f3f5c test(examples): re-record catalog stitch sentence in agent-spine inline snapshot 2026-08-08 13:52:47 +08:00
Yichen Jiang 2b6836a6fe fix(vendor): widen include's writeTask for exactOptionalPropertyTypes
The debounced writer assigns undefined on flush, which a plain optional
NodeJS.Timeout rejects under exactOptionalPropertyTypes; the error had
been masked by stale build state until a residue cleanup invalidated it.
Logged as local modification 14 in the vendor manifest.
2026-08-08 13:16:27 +08:00
Yichen Jiang 0d53752c49 refactor(host)!: retire the skill.invoke RPC for the gesture boundary
Invocation is an ordinary session.prompt again: the pre-step gesture
boundary makes it deterministic host-side for every front end, so the
dedicated RPC (handler, wire schema, error codes, client face, fixtures)
and ui-skill's claim machinery are net deletions. The menu keeps decision
21 exactly — a pick lands literal /name text — plus the user-only marker
from skill.list's modelInvocable flag.
2026-08-08 13:15:52 +08:00
Yichen Jiang c08fa27e5c feat(tool-skill): inject user-invoked skills at the pre-step gesture boundary
A whitespace-bounded /name token anywhere in a claimed user message,
naming a user-invocable skill in the workspace directory, now injects that
skill's renderSkillContent as instructions context appended after every
other injection of the step — the same agent/pre-step seam the catalog,
workspace instructions, and the runtime snapshot ride. Closed-set matching
mirrors the command registry (a miss stays plain prose), only user-source
messages are scanned, the policy check runs on the loaded definition, and
this is the sole entry point for disable-model-invocation skills. The
catalog's no-reload sentence now names the gesture boundary.
2026-08-08 13:14:49 +08:00
Yichen Jiang 7750789c8e docs: regenerate the module graph for the dsh-skill llm dependency 2026-08-08 11:32:28 +08:00
Yichen Jiang 31ed85900d fix(client): review fixes for invocation rendering and turn boundaries
The user-turn predicate (opensUserTurn) unifies the three parallel
consumers a new node kind silently missed — produced-files turn reset,
retry liveness, own-words force-scroll — so a skill invocation behaves as
the turn opener it is. The menu marker resolves through ctx.locale.bind
instead of a hand-rolled snapshot lookup; the dead legacy <skill> render
arm goes with the removal cut; command-over-skill name precedence is now
documented at the matchEnter seam; and the emptied replacement catalog
keeps the no-reload sentence, with the never-published residual recorded
in the Agent Note.
2026-08-08 11:30:16 +08:00
Yichen Jiang c4c2355b50 fix(host): harden skill.invoke at the enforcement boundary
Review fixes: recheck isUserInvocable on the loaded definition (list and
get collect independently, so a provider change between them could swap in
a user-disabled body — the skill-tool execute template's second check);
thread the carrier signal through the lookup and refuse an abandoned
caller's turn as cancelled; fold lookup/loader failures into the
structured internal error the list face already uses; refuse cwd-less
sessions with the skill.list stance; and reject blank trailing text at the
wire schema instead of relying on client trimming.
2026-08-08 11:30:14 +08:00
Yichen Jiang c480796db4 docs(llm-pi-ai): state the composition-base assumption for the dict-merge limitation
Maintainer ruling on the review's merge-semantics warning: per-model
reasoning fields belong to the settings document, not cordis.yml entry
config (the shipped composition mounts the adapter dormant), so the
recursive-merge delete gap is a documented posture rather than a tracked
fix; the Known Limitations entry now states the assumption instead of
pointing at the closed #2003.
2026-08-08 11:06:29 +08:00
Yichen Jiang e5d0089d5b cleanup(llm-pi-ai): share the model-entry field schemas between models and modelOverrides
The duplication gate caught the two schema literals diverging only by
the id field; the shared dict is now the single home, with the id added
where it lives (the entry) and omitted where the dict key carries it.
2026-08-08 10:55:11 +08:00
Yichen Jiang ae9d31d098 review: pin off-value wire contract, scope compat inheritance to the entry's api, update the superseded note
Review findings on #1977, each verified before acting: the 2026-08-03
declared-provider-catalog note is updated in place and cross-linked both
ways now that reasoningEfforts/compat reopened half of its rejected
alternative; resolveModelCompat inherits the catalog entry's compat only
while the resolved api still is the entry's own, so a route-level api
repoint no longer merges another protocol's shape as a completions base;
the off-with-value promise gains a request-boundary test proving pi-ai
reads thinkingLevelMap.off when the reasoning option is absent (and the
catalog-level test name stops overclaiming); the cannot-stop-thinking
wording narrows to what is actually enforced (no Off offered, explicit
Off refused — an effortless request goes out bare); the z.const(null)
comment attributes null passthrough to schemastery's nullable
short-circuit; the baseten drift-gate claim names its verification
source; and the layered-merge delete gap for dict keys is documented
under Known Limitations with the atomic-leaf follow-up in #2003.
2026-08-08 10:46:58 +08:00
Yichen Jiang 86fbc5fc15 Merge remote-tracking branch 'origin/master' into worktree/pi-ai-per-model-reasoning
# Conflicts:
#	docs/config-catalog.md
#	docs/user/guide/providers.i18n.yaml
#	packages/llm/llm-pi-ai/README.i18n.yaml
#	packages/llm/llm-pi-ai/README.md
#	packages/llm/llm-pi-ai/README.zh.md
#	packages/llm/llm-pi-ai/tests/config.spec.ts
2026-08-08 10:32:22 +08:00
Yichen Jiang 69bd00ae76 chore(web): register the skill-user-invoke scenario in both typecheck planes
The web app project excludes every e2e file (they are host-plane programs)
and tsconfig.host.json includes them one by one; the new scenario joins
both lists so it keeps typecheck coverage without dragging host sources
into the client project.
2026-08-08 10:28:30 +08:00
Yichen Jiang 3584d8e088 docs(skill): document the user-explicit invocation path
Bilingual README updates for the four touched packages (ui-skill's claim
flow and deterministic-injection model experience, the apiproxy skills
domain, the shared renderSkillContent seam export, the catalog stitch
sentence), the implemented Agent Note triplet recording the decision and
its peer-product evidence, and the regenerated catalogs/graphs.
2026-08-08 01:52:43 +08:00
Yichen Jiang db146f0eba refactor(host): share the turn-start route refusal between prompt and skill.invoke
turnAgentFor owns the addressed-agent resolution and the model-unavailable
refusal both turn-starting methods repeat; the duplication gate flagged the
copied block.
2026-08-08 01:52:42 +08:00
Yichen Jiang 74ba0b532e chore: sync the lockfile for the dsh-skill llm dependency 2026-08-08 01:33:56 +08:00
Yichen Jiang 0fb474f672 test(web): cover user-only skill invocation end to end
The policy scenario now expects the user-only quadrant in the menu with
its marker (riding the description — the hint field is claim-state ghost
text, which the menu never renders), and a new skill-user-invoke scenario
drives /name args through the composer against the real host: the claim
lands skill.invoke, the transcript shows the dedicated card with the
collapsed <skill_content> body, and a paced replay answers the injected
turn deterministically.
2026-08-08 01:27:25 +08:00
Yichen Jiang 8ccb176905 docs: per-model reasoning guide, config catalog, and the feature's Agent Note
The user guide's model-catalog section teaches the three new knobs at
task altitude — declare levels per model, pick the reasoning dialect,
reshape catalog models with modelOverrides — with the settings.yaml
example exercising all of them, plus an UNSUPPORTED_REASONING_EFFORT
troubleshooting row. The generated plugin config catalog picks up the
new Config fields, and the bilingual Agent Note records the decision,
the alternatives considered, and the schemastery materialization
constraint that chose false over {} as the disable spelling.
2026-08-08 01:17:10 +08:00
Yichen Jiang 011e3e4e63 feat(client): render user skill invocations as dedicated transcript cards
A user/message carrying the skill-invocation source materializes as its
own conversation node (name/args lifted off the source metadata, never
re-parsed from the body) and renders as a right-aligned bubble: the /name
chip plus the user's trailing text, with the injected <skill_content>
collapsed behind a disclosure. A record with an unreadable name degrades
to the injected-context row.
2026-08-08 01:05:08 +08:00
Yichen Jiang 56e9e61749 feat(ui-skill): claim slash skill references into skill.invoke
A menu pick or an entered /name line now claims the composer into an
args-tolerant skill.invoke transaction instead of shipping the literal
text and hoping the model loads the skill. This gives every user-invocable
skill a deterministic entry point — including disable-model-invocation
skills the catalog never shows the model (issue #1470). Candidates carry
a user-only hint, and the unreached legacy <skill> reference codec is
removed (decision 21 removal cut).
2026-08-08 00:59:55 +08:00
Yichen Jiang 756304322a feat(llm-pi-ai): modelOverrides reshapes catalog models without replacing the catalog
A route's modelOverrides dict customizes individual installed-catalog
models — key = catalog model id, value = the same fields a models entry
takes — while the rest of the catalog keeps serving, which a models list
cannot express because declaring one replaces the served set. An
override becomes the catalog entry's configuration and resolves through
the existing entry path, so capacities, reasoningEfforts, compat, and
request-default semantics are identical to a models entry's. Unlike
Pi's config layer, which ignores unknown ids, every override that lands
nowhere is refused at the write that produced it: beside a models list,
on a hand-declared route, naming a model the catalog does not describe,
or smuggling an id through the schema's unknown-key tolerance.
2026-08-08 00:57:41 +08:00
Yichen Jiang cc0f6e11b9 feat(tool-skill): teach the catalog about user-explicit skill injection
Both catalog renderings now tell the model that a directly invoked skill
arrives as an inline <skill_content> block to follow without re-loading it
through the skill tool — the seam rule that keeps the user-explicit path
and the model-autonomous path from double-injecting one skill.
2026-08-08 00:55:37 +08:00
Yichen Jiang 0490f8bb06 feat(llm-pi-ai): per-model reasoningEfforts and reasoning-dispatch compat switches
A model entry's reasoningEfforts dict declares its selectable thinking
levels — key = offered level, value = the wire spelling dispatch sends;
only off may leave the value empty (supported, send nothing). false
strips reasoning from a catalog model; every level is materialized
explicitly into pi-ai's thinkingLevelMap so nobody has to know pi-ai's
asymmetric absent-key defaulting. compat.thinkingFormat and
compat.supportsReasoningEffort become configurable on the route and per
model (model > route > catalog entry > pi-ai's URL-derived guess),
openai-completions only, so a private gateway speaking the DeepSeek
reasoning dialect no longer depends on its URL being recognizable.
Record-typed drift gates pin both enums to pi-ai's, and an unserviceable
declaration is refused at the write that produced it, naming route,
model, and level.
2026-08-08 00:51:54 +08:00
Yichen Jiang 85422f44dc feat(host): user-invocable skill listing and skill.invoke injection RPC
skill.list now serves every user-invocable skill and carries modelInvocable
so menus can mark user-only entries; the old model-and-user intersection
hid disable-model-invocation skills from their only legitimate entry point
(issue #1470). skill.invoke enforces user-invocation policy at the host
boundary, renders the canonical <skill_content> body, and injects it as a
user-role message carrying the skill-invocation source before starting a
turn. The connection fixture mirrors both faces for client tests.
2026-08-08 00:51:24 +08:00
Yichen Jiang 62c308f415 feat(skill): share renderSkillContent and declare the skill-invocation message source
The model-facing <skill_content> rendering moves from dsh-tool-skill to the
dsh-skill seam so the skill tool result and the upcoming user-explicit
invocation injection share one canonical shape. The seam also declares the
skill-invocation MessageSource kind that injection will stamp on its
user-role messages.
2026-08-08 00:40:06 +08:00
Yichen Jiang b1074e60ab test(web): re-record the skill-tool-row golden for the resolved seat label
Master added this scenario while this branch was open, so its golden froze
the composer seat's "Select model" fallback. The scaffold's route-only
adapter (added here for fixture-less scenarios) makes the seat resolve the
model those scenarios actually route to, which is what the other eight
goldens on this branch already show. Only the two seat lines move.
2026-08-07 18:54:50 +08:00
Yichen Jiang 209fb4d355 Merge remote-tracking branch 'origin/master' into worktree/default-model-persistence
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
2026-08-07 18:18:40 +08:00
Yichen Jiang f3049e5663 fix(llm-pi-ai): describing a model must not fail on a bad profile level
`resolveModel` validated the profile's reasoning level against the exact
model and threw when it did not fit. That call builds the model catalog,
and the catalog build catches per PROVIDER — so one mis-set field took the
whole provider out of every picker behind a single error row, hiding even
the models that do support the level. Measured: `anthropic` set to `max`
threw for six of its eight models.

Describing what a model can do now reports an unusable profile level as no
default rather than throwing; the request path still refuses it, which is
where a bad configuration belongs. The existing spec asserted the old
throw and now asserts both halves of that split.

Known gap, left deliberately: a model that cannot take the route's level
still fails its first request while the picker shows 「Default」 for it,
because the request path keeps using the profile level as the fallback.
Reaching that needs a hand-written `settings.yaml` — the Models page no
longer writes the field — and the error names the model and the level, so
selecting a supported level is a way out. Closing it properly means giving
`AgentOptions` a `reasoningEffort` so compositions without a model picker
keep an entry point, then dropping the provider-scoped field altogether;
that is its own change.
2026-08-07 18:07:15 +08:00
Yichen Jiang 2dc1406dfd feat(ui-models): drop the provider-scoped reasoning effort, and red-flag a bad route id
**Reasoning effort leaves the provider cards entirely.** It is a per-MODEL
capability and the models under one provider disagree about which levels
they accept: setting `anthropic` to `max` made six of its eight models
throw UNSUPPORTED_REASONING_EFFORT, and because the catalog build catches
per provider, the whole provider vanished from the picker behind one error
row. A provider-scoped control can only ever be set to a value some of its
models reject.

The composer's model picker already offers each model its own levels, and
a switch there now records provider, model, and effort together as the
next session's default — so the setting has a better home at the right
granularity. The profile field stays in `settings.yaml` for a deployment
that knows its route; only the control is gone, from both cards and both
adapter families. Two `components.spec` cases used the control as the
vehicle for their op assertions and now use `baseURL`, which is what they
were actually testing.

**A rejected Provider ID now reads as a fault.** It shared the neutral
hint paragraph with the field's guidance, so the copy telling the user
what they got wrong looked like advice. Reuses the existing `.error`
style, matching the split the key field already makes.
2026-08-07 17:36:08 +08:00
Yichen Jiang 135064c831 fix(ui-models): stop the shared hint contradicting a filled-in field
The line under the create form names the one blocked gate worth naming,
and its fallback arm reads "no models yet". An unmet Provider ID gate fell
through to that arm, so a card with two models listed right above it was
told it needed one. The key gate was already excluded for this reason; the
route gate was assumed excluded because its field explains itself, and was
not.

Tightening the route rule in the previous commit is what made this easy to
hit — a digit-leading id now fails the gate — but the fallthrough predates
it and fires for an empty or taken id just the same.
2026-08-07 17:02:05 +08:00
Yichen Jiang 5a90eb41fb fix(ui-models): three faults the running app surfaced
**A hand-declared route must not offer a reasoning effort.** The earlier
commit read the create card's missing control as drift and added one. It
is the other way round: such a model has no reasoning capability — pi-ai's
installed catalog is what supplies one, and it ships nothing under the
route — so `resolveModel` throws UNSUPPORTED_REASONING_EFFORT for every
model on it and the whole provider drops out of the picker. Verified
against the adapter, not inferred. The create card no longer offers it and
the editor withholds it on the directory's `declared` bit, which is the
real bug: that control has always been wrong for these routes.

**A blocked composer locked the way out of the block.** Reusing the
no-workspace inert posture disabled the model seat along with everything
else, so the bar asked for a model while preventing the one control that
picks one. A block now rides its own `blocked` owner prop: the textarea,
send, commands, plan seat, and access chip all lock, and the model seat
alone stays live.

**A Provider ID could derive an illegal credential reference.** The card
accepted a digit-leading id, whose derived `123_API_KEY` then failed at
the credential seam with a raw regular expression the user cannot act on.
The id must now start with a letter, and a test pins the relation between
the two rules rather than the regex.
2026-08-07 16:45:50 +08:00
Yichen Jiang 210b6fec5c Merge pull request #1879 from deepseek-harness/worktree/web-skill-icon-14
fix(web): render Skill icon at 14px
2026-08-07 16:25:34 +08:00
Yichen Jiang 342b5c4830 fix(web): keep both agents distinct in the shipped-composition test
The preset catalog assertion and master's new command-catalog assertion each
create an agent in the same test; the second is now named for what it is.
2026-08-07 16:22:02 +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 3a0703f8ac chore(docs): re-record the packages README pairing after the master merge 2026-08-07 16:20:05 +08:00
Yichen Jiang 2a515cce94 Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam
# Conflicts:
#	packages/README.i18n.yaml
2026-08-07 16:19:45 +08:00
Yichen Jiang 8e57dd1dac fix(web): render Skill icon at 14px 2026-08-07 16:15:17 +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
Yichen Jiang 53bd0a90a6 Merge pull request #1754 from deepseek-harness/worktree/web-skill-tool-row
feat(web): add dedicated skill tool row
2026-08-07 15:45:24 +08:00
Yichen Jiang d03d3ab70b Merge remote-tracking branch 'origin/master' into worktree/default-model-persistence
Carries two edits beyond conflict resolution, both forced by what master
brought in:

- `CustomProviderCard`: master added front-end key validation and a
  component-level `keyValue` (already trimmed) while still writing
  `apiKeyEnv` unconditionally. Kept this branch's blank-key rule and its
  committed-profile retry gate, and adopted master's single `keyValue` so
  the component has one spelling of the key rather than two.
- `docs/user/guide/providers`: master merged #1810, whose default-model
  section still taught overriding the `api-gateway` row in
  `$DSH_HOME/config.yaml` — the behavior this branch replaced. Rewritten
  for the settings section the picker now writes, plus the review fix from
  #1810 replacing the colloquial 挂着 in the opener.
2026-08-07 15:44:57 +08:00
Yichen Jiang 6093c266c6 Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire 2026-08-07 15:41:09 +08:00
Yichen Jiang 23fea5e70d Merge remote-tracking branch 'origin/master' into stack/agent-profiles-1-seam 2026-08-07 15:41:03 +08:00
Yichen Jiang bb43ff4f37 feat(ui): make a session that cannot send refuse to accept one
A default naming a route the Models page has since removed left the
composer saying 选择模型 while the input still accepted a message, which
then failed inside the adapter mid-turn.

`session.prompt` now refuses with `model-unavailable` before opening a
turn. That is the enforcement boundary: the method stays callable no
matter what a client disables. `session.models` reports the same fact as
`routable`, and ui-model pushes a block through the new
`ctx.conversation.blocks` registry so the bar renders the disabled
textarea it already renders without a workspace, carrying the blocker's
own reason. The push direction is forced — ui-model already depends on
ui-conversation, so ui-conversation cannot read it back.

The gate is `routable`, not "matches no advertised group": catalog
membership is advisory, so a route serving a model it stopped advertising
is missing from the groups yet perfectly usable, and `null` before the
first load never blocks so a slow Host cannot lock a working composer.

The scaffold gains a route-only adapter for fixture-less keyless
scenarios. Registering zero providers is a test artifact — every product
composition mounts one — and the goldens that froze the seat's fallback
label now show the model those scenarios actually route to.
2026-08-07 15:26:42 +08:00
Yichen Jiang 7ce9c244ae Merge pull request #1810 from deepseek-harness/claude/docs-model-providers
docs(user): 新增「配置模型」入门文档,并让文档站点自带图片
2026-08-07 15:15:27 +08:00
Yichen Jiang 44e9bfca75 test(agent-presets): keep one write regression after the merge
The lower layer now carries the same test, and the merge kept both copies.
2026-08-07 15:11:39 +08:00
Yichen Jiang a45beb1292 Merge branch 'master' into worktree/web-skill-tool-row 2026-08-07 15:06:42 +08:00
Yichen Jiang 61895808a6 Merge branch 'stack/agent-profiles-3-wire' into stack/agent-profiles-4-settings 2026-08-07 15:04:30 +08:00
Yichen Jiang 6435463edc test(agent-presets): prove the write override where it is introduced
The regression for `PresetTree.write` lived two layers up, so this layer's own
assertion could not fail: it checked the file after an ordinary teardown, and
the Loader's unload listener returns early when the whole tree is being
disposed, so the override never ran. Moves the self-disposing-row test down to
the layer that adds the override, in a temp root so a committed fixture cannot
be damaged by the run that proves the bug.
2026-08-07 15:04:23 +08:00
Yichen Jiang 23a4c0a51e Merge pull request #1827 from deepseek-harness/worktree/charming-swartz-83bf33
fix(llm,web): validate API key format before it reaches an HTTP header
2026-08-07 14:36:04 +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