Commit Graph
941 Commits
Author SHA1 Message Date
Tianyi Cui 5219b36110 Merge pull request #6498 from deepseek-harness/turtle/approval-never-wording-7e59b56e7f5c
fix(user-approval): describe approval policies by meaning in model-visible text
2026-10-22 23:47:16 +08:00
imccyu 261f2db185 Merge master into DSH 0.2.1 navigation and model listing sync 2026-10-22 23:22:35 +08:00
TurtleandTianyi Cui 747cbf13b6 Describe the ask approval policy by its meaning
Replace the literal "Approval policy: ask." runtime-context sentence
with a statement parallel to the never-policy sentence, and refresh the
current-generation fixtures that persist it.

Co-authored-by: Tianyi Cui <[email protected]>
2026-10-22 23:13:19 +08:00
Yichen Jiang c48f8523f2 feat(llm): follow the official /models listing on the DeepSeek API-key route (#6944)
* refactor(llm-deepseek): share the /models listing machinery

Move the account route's `/models` request and decoding, its
credential-scoped listing cache, and listed-catalog resolution with the
version gate into the shared DeepSeek Messages library, so a second
route can follow the same listing. Names drop the account prefix, the
cache takes each access's endpoint settings with the call, and it gains
`invalidate()` for a forced reload. `isBuiltInCatalog()` recognizes the
catalog an uncustomized `models` setting resolves to.

The account route keeps its behavior; only its imports and the
override diagnostic wording ("model listing") change.

* feat(llm-deepseek-api-key): follow the official /models listing

While `models` equals the built-in catalog and the Messages origin is
https://api.deepseek.com, `deepseek-official` serves the official
`GET /models` listing, authenticated with the API key in `x-api-key`.
Loading, refresh, fallback, merging, and the client-version gate match
the account route: the first access waits up to `modelsTimeoutMs`, a
listing older than `modelsMaxAgeMs` refreshes in the background on the
next access, a failure keeps the last good listing or the built-in
catalog, and listed models this build cannot serve are refused before
network I/O.

A customized `models` list replaces the catalog and requests nothing.
Switching between a customized catalog and the listing discards the
cached listing, so Restore defaults reloads it on the next access.

Suites that boot the route on the official endpoint now answer the
listing themselves instead of reaching the network.

* docs: describe the official route model listing

Document when `deepseek-official` follows the official `/models`
listing, its timing fields, customization precedence, and the forced
reload after Restore defaults in the API-key README, the shared
transport README, and the provider guide. Record the decision in a new
Agent Note, keep the account note's statement of where the shared
listing code lives current, and regenerate the configuration catalog.

* test(llm-deepseek-api-key): pin the once-per-listing hidden-entry diagnostic

* docs: regenerate module and event graphs for the shared listing

* fix(llm-deepseek-api-key): report credential failures on the model request

On the official endpoint, `connect` waited for the listing view, whose
credential lookup rethrew a malformed key or a credential-store failure
before the agent loop recorded the prompt. A failed lookup now resolves
the connection from the current listing view, so `resolveAuth` reports
the failure on the model request and the turn keeps the prompt and the
failed attempt. A caller abort still rejects.

* docs(llm-deepseek-api-key): name which hidden listing entries are logged

* test: keep unit suites off the official model listing

Suites that boot the DeepSeek routes with a dummy or inherited key now
request `GET https://api.deepseek.com/models` on the official endpoint.
A unit-lane setup file rejects that request at once, so such a suite
serves the built-in catalog instead of reaching production or waiting
out the listing deadline on a network that never answers; suites that
exercise the listing answer `fetch` themselves. Other requests pass
through unchanged.

* feat(llm-deepseek): read tool_update from the model listing

Both DeepSeek routes now take a listed model's Messages tool update mode
from `api_capabilities.anthropic_messages.tool_update`, alongside the
system prompt mode. `in-history` and `addition-only` replace the
bundled mode; any other value reads as `leading-only` and removes it.
An absent or `null` mode keeps the bundled one, so a listing that does
not declare the field leaves `deepseek-flash` on `addition-only`.

`system_prompt_update: null` likewise keeps the bundled mode now; it
previously read as `leading-only`, which a serializer writing empty
values as null would have turned into a cache-unfriendly downgrade.

* fix(llm-deepseek): sync the built-in context window with the official listing

The official `/models` listing declares a 1,048,576-token context window
for `deepseek-flash` and `deepseek-v4-pro`; the built-in catalog said
1,000,000, a decimal-versus-binary mismatch. Both built-in entries now
carry the listed value, so offline starts and listing failures size the
context the same way the listing does. The Models page shows the exact
count for these rows, since 1,048,576 has no decimal K/M spelling.

`defaultContextWindow`, the fallback for model ids the catalog does not
describe, stays 1,000,000.

* test(llm-deepseek-api-key): reject the stubbed listing request with an Error

* test(cli): keep the built SDK smoke off the official model listing

The SDK profile's initialize now resolves the deepseek-official catalog,
which requests GET https://api.deepseek.com/models on the official
endpoint. With the smoke's fixture key that request answers 401 and the
route warns on stderr, so the test's empty-stderr assertion failed in the
e2e and snapshots lanes. Point the run at a loopback mock and assert it
received no model call.

* test(llm-deepseek): compose the malformed-key turn without the native executor

release/dsh-0.2.1 predates @deepseek-ai/dsh-tool-executor-native; its tool
runtime executes tools itself. Compose the official-route turn the way
account-routing.spec.ts does on this branch.

* fix(llm-deepseek-api-key): gate nothing when the credential lookup fails

The listing cache switches scope only after it reads a credential, so a
failed lookup left `connect` serving the previous credential's listing.
After a key whose listing refuses a model was replaced by a malformed one,
`admit` refused that model with CLIENT_UPGRADE_REQUIRED before the turn
recorded the prompt, instead of `resolveAuth` reporting the credential
error on the request. Serve the built-in catalog without listing gates
when the lookup fails.

* test(llm-deepseek-api-key): pin the once-per-listing diagnostic across request preparation

The hidden-entry diagnostic test repeated the same discovery assertion to
prove a second pass reports nothing new, which read as a duplicate. Assert
the single warning after the request preparations instead; they resolve
the same listing, so dropping the per-listing deduplication still fails
the test.

* docs(llm-deepseek-api-key): note that a list matching an earlier built-in catalog counts as customized

Customization is judged against the running version's built-in catalog,
so a saved `models` list equal to an earlier version's catalog stops
following the listing once the built-in catalog changes, until Restore
defaults. Record the consequence in the Agent Note and the README's known
limitations.
2026-10-22 20:42:19 +08:00
imccyu 39d2903841 fix(ui): separate navigation pins from selection and show menu icons (#6883)
* fix(ui): separate navigation pins from selection and show menu icons

* fix(ui): simplify More menus and fold conversation views on resize

* test(ui): fix navigation CI regressions and refresh catalogs

* refactor(ui): render sidebar panel icons directly

* fix(ui): keep Chat visible and stop persisting navigation pins

* refactor(ui): drop unreachable pin validation from in-memory stores
2026-10-22 20:05:33 +08:00
Yichen Jiang c1238b8792 Merge pull request #5263 from deepseek-harness/worktree/web-search-dynamic-tool-e26c2b
feat(web): withhold web_search and web_fetch from requests without credentials
2026-10-22 15:53:05 +08:00
Yichen Jiang fb378dacf2 fix(web): offer DeepSeek web tools whenever a credential exists
The DeepSeek search and Search/Fetch API providers now report readiness
from credential presence alone, on any model route: the account token
first on the deepseek-account route, then a literal apiKey or a
configured apiKeyEnv reference. A conversation on another provider's
model keeps web_search and web_fetch while a DeepSeek key is configured,
as on master, so the route refusal WEB_PROVIDER_ROUTE_DISABLED and its
upgrade guide are removed.

The pi-ai-conversation-updates and deepseek-messages-system-prompt
snapshots replay their master recordings again, the headless keyless
smoke points its search key reference at an unset variable, and the
readiness Agent Note records the rejected route and endpoint rules.
2026-10-22 15:38:16 +08:00
Yichen Jiang 1922f322aa fix(web): gate the DeepSeek web providers on the model route alone
Review found two faults in the endpoint and configuration checks. The
providers took the official chat route's endpoint from the first active
dsh-llm-deepseek-api-key Loader row, so a composition that isolates several
instances answered for an unrelated one: a correct route lost search, or a
gateway's key reached DeepSeek. And a key saved on the Web search settings
page lands under the default DEEPSEEK_API_KEY reference, so the inference
that search had its own configuration never saw it.

Both DeepSeek web packages now serve only the deepseek-account and
deepseek-official routes, whatever key they are configured with, and no
longer compare the chat endpoint with their own. ready() checks the route
and then credential presence as before; the API-key resolver repeats the
route check and refuses with WEB_PROVIDER_ROUTE_DISABLED. The packages no
longer read Loader rows or depend on dsh-llm-deepseek-api-key, so the
lockfile, the module graph, and the keyless smoke expectations that the
endpoint check had changed return to master's.

An upgrade guide covers conversations on other providers' models, which
lose DeepSeek web search and, with the Search and Fetch APIs selected,
web_fetch.
2026-10-22 13:48:53 +08:00
Turtle 2e0ce8d448 Merge pull request #6924 from deepseek-harness/turtle/extract-bundle-lists-349637056285
refactor(boot): move official bundle lists out of app-boot
2026-10-22 13:16:20 +08:00
imccyu 1276a8e13a ci: split pull-request CI into Linux, Windows, and Python workflows (#6898)
* ci: run native Windows PR jobs in a separate workflow

GitHub re-runs failed jobs only after a whole run finishes, so slow Windows jobs blocked re-running failed Linux jobs. CI Windows now owns the native Windows jobs and the Windows x64 Python runtime target, with its own required 'windows checks passed' verdict.

Refs #6893

* ci: run Python PR jobs in a separate workflow

Python rarely fails while the Windows lanes run long, so the Python SDK suite and the Linux/Windows x64 runtime matrix move into CI Python. The three pull-request workflows can now be re-run without waiting for each other, and branch protection gains "python checks passed" beside the existing verdicts.

Refs #6893

* docs: record the three PR verdicts in the failover runbook

* test: pin the shared environment across the PR workflows

* test: read the python SDK lane from CI Python

* test(sdk): parse session JSONL frames in the keyless smoke

Node 24.19 returned only the first frame of a concatenated zstd log, so the single JSON.parse saw just the header; 24.22 returns every frame and the JSONL body broke the parse. Read frames explicitly and select the main session by its header so both versions agree.
2026-10-22 04:09:35 +00:00
Turtle e0e37bfd3d refactor(boot): move official bundle lists out of app-boot
Profile templates and the default, optional, on-demand, retired, and
installation-owned bundle lists move to the new data-only package
@deepseek-ai/dsh-official-bundles, so editing a bundle list no longer
touches app-boot.
2026-10-22 11:56:47 +08:00
Yichen Jiang 80eca619ef refactor(web-search): admit web_search through step activation conditions
Master's step-scoped conditional activation resolves each tool's condition
before a model step assembles, and both the declarations and dispatch read
that admitted set. Prompt assembly no longer carries tool declarations, so
tool-web's system-prompt/assemble listener could not remove web_search any
more, and removing a declaration there never stopped a repeated call from
running.

tool-web now registers web_search with a when condition that asks
ctx.web.searchReady() about the route of the step's model selection, and its
guidance section renders from the step's admitted set. A step that does not
admit the tool leaves it out of declarations, guidance, and PTC program
bindings, and refuses a call to it as UNKNOWN_TOOL without reaching a
provider. Tests that execute web_search directly now run inside a resolved
step, as the executor requires for conditional registrations.

Docs, the readiness Agent Note, and the event producer/consumer table follow
the new mechanism; the tools README gains an explicit conditional-tools
anchor for cross-locale links.
2026-10-22 10:57:09 +08:00
Yichen Jiang d373778fd8 Merge remote-tracking branch 'origin/master' into worktree/web-search-dynamic-tool-e26c2b
# Conflicts:
#	packages/web/tool-web/tests/tool-web.spec.ts
#	snapshots/session/pi-ai-conversation-updates/session.v4.jsonl
2026-10-22 10:32:41 +08:00
Yichen Jiang 207b30d299 Merge remote-tracking branch 'origin/master' into worktree/dynamic-tool-activation-pr-64796e
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent-loop/src/tool-calls.ts
#	packages/core/agent-loop/tests/tool-updates.spec.ts
#	packages/core/system-prompt/README.i18n.yaml
#	packages/core/system-prompt/README.md
#	packages/core/system-prompt/README.zh.md
#	packages/core/tool-executor-ptc/src/ptc.ts
#	packages/core/tool-executor-ptc/tests/ptc.spec.ts
#	packages/core/tools/README.i18n.yaml
#	packages/core/tools/README.md
#	packages/core/tools/README.zh.md
#	packages/core/tools/src/index.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/plan/plan-mode/tests/plan-mode.spec.ts
#	snapshots/session/cordis-inspect-jsdoc/session.v4.jsonl
2026-10-21 23:32:15 +08:00
_Kerman a53ecb2f3a Merge origin/master into xtr/tool-executor-plugins 2026-10-21 15:56:44 +08:00
Yichen Jiang 7f32f6c3cc test(snapshots): declare exit_plan_mode only in plan mode
Keyless session, SDK, ACP, and Web snapshots, the subagent-inheritance
expected output, and the Python dynamic-tools snapshot no longer list
exit_plan_mode outside plan mode, and the collapse-timing goldens count one
fewer added tool. In plan-review, the approved exit now removes the tool on
the next step: its header records a change that starts a series and a
tool-removal developer message, which the expanded Web timeline shows.
cordis-inspect-jsdoc records the new tools service signatures. The pwsh
tool-turn pins are edited by hand because pwsh is unavailable for a local
refresh; their only change is the removed schema.
2026-10-21 15:15:29 +08:00
Yichen Jiang 7a75f225c5 Merge remote-tracking branch 'origin/master' into worktree/web-search-dynamic-tool-e26c2b
# Conflicts:
#	apps/cli/tests/profiles/headless/tests/fixtures/cli.patch.yml
#	apps/cli/tests/profiles/sdk/keyless-smoke.e2e.ts
#	apps/web/tests/expected/plugin-config/official.expected.md
#	apps/web/tests/expected/plugin-manager/live-enabled.expected.md
#	apps/web/tests/expected/plugin-manager/manager.expected.md
#	apps/web/tests/expected/plugin-manager/refresh.expected.md
#	apps/web/tests/plugin-config.e2e.ts
#	apps/web/tests/plugin-manager.e2e.ts
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/subsystems/web.i18n.yaml
#	docs/subsystems/web.md
#	docs/subsystems/web.zh.md
#	packages/client/ui-settings-web-search/README.i18n.yaml
#	packages/client/ui-settings-web-search/README.md
#	packages/client/ui-settings-web-search/README.zh.md
#	packages/web/tool-web/README.i18n.yaml
#	packages/web/tool-web/README.md
#	packages/web/tool-web/README.zh.md
#	packages/web/web-search-deepseek/README.i18n.yaml
#	packages/web/web-search-deepseek/README.md
#	packages/web/web-search-deepseek/README.zh.md
#	packages/web/web-search-deepseek/src/provider.ts
#	packages/web/web-search-deepseek/tests/deepseek.spec.ts
#	packages/web/web/src/index.ts
#	snapshots/session/web-search-endpoint-guidance/session.v4.jsonl
2026-10-21 14:47:47 +08:00
_Kerman 6bfe05c6f5 refactor(agent): name captured step selection modelSelection 2026-10-21 14:08:11 +08:00
_Kerman 62a1075fe7 Merge remote-tracking branch 'origin/master' into xtr/session-model-selection
# Conflicts:
#	docs/persistence-schema.json
2026-10-21 13:56:41 +08:00
_Kerman 2be80e3619 fix(sdk): select tool executors through profile overlays 2026-10-21 12:13:58 +08:00
Turtle f9ec718a48 feat(preset): enable plugin_manager in standard mode 2026-10-21 11:47:26 +08:00
_Kerman 38b9a095f3 Merge remote-tracking branch 'origin/master' into xtr/tool-executor-plugins
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/web/tool-web/tests/integration.spec.ts
#	pnpm-lock.yaml
#	scripts/check-workspace-constraints.spec.ts
#	scripts/check-workspace-constraints.ts
2026-10-21 11:22:06 +08:00
_Kerman a9c006f9c3 refactor(agent): own model selection on each agent 2026-10-20 21:09:09 +08:00
_Kerman 8b79a1ddcc Merge origin/master into xtr/session-model-selection 2026-10-20 17:22:59 +08:00
fz b88a1c2d14 Merge pull request #6351 from deepseek-harness/fix/sdk-desktop-alignment
fix(sdk): 补齐桌面工具、上下文和原生问答
2026-10-20 01:24:13 +08:00
_Kerman 7d0301fe05 Merge master into scoped tool executors 2026-10-19 21:53:41 +08:00
_Kerman 78b577faa4 refactor(profiles): select PTC execution through overlays 2026-10-19 17:34:49 +08:00
fz 1861316e74 fix(sdk): defer harness development context alignment 2026-10-19 16:59:40 +08:00
_Kerman e9784c073b fix(tools): settle executor calls after unload and validate configuration 2026-10-19 16:32:29 +08:00
_Kerman 3b978adcec test(tools): tidy migrated fixture imports and comments 2026-10-19 16:32:04 +08:00
_Kerman ac71b42560 Merge pull request #5966 from deepseek-harness/xtr/session-projection-registration-handles
refactor(session-projection): return retained handles from async registration
2026-10-19 15:47:04 +08:00
_Kerman 2f69e7f181 test: finish executor fixture migration and await readiness 2026-10-19 15:41:31 +08:00
_Kerman 8822a6d05f Merge remote-tracking branch 'origin/master' into xtr/tool-executor-plugins
# Conflicts:
#	pnpm-lock.yaml
2026-10-19 15:22:40 +08:00
_Kerman ebd6a9cf79 test(tools): migrate remaining executor smoke fixtures 2026-10-19 15:20:48 +08:00
_Kerman b907ff53d9 test(cli): probe the public tool batch entry in profile resolution 2026-10-19 15:06:41 +08:00
_Kerman 31a49c6629 Merge remote-tracking branch 'origin/master' into xtr/tool-executor-plugins
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/tool-catalog.i18n.yaml
#	packages/bundle/base/package.json
#	packages/core/agent-loop/tests/serial-listener-review.spec.ts
#	packages/core/agent-tool-presentation/package.json
#	packages/experimental/auto-review/tests/auto-review.spec.ts
#	packages/lsp/tool-lsp/package.json
#	packages/subagent/tool-subagent/tests/list-models.spec.ts
#	scripts/check-workspace-constraints.ts
#	scripts/type-equiv.manifest.json
#	tsconfig.base.json
2026-10-19 14:53:33 +08:00
_Kerman 455686626d refactor(tools): separate scoped executors from tool registration 2026-10-19 14:49:55 +08:00
luogesi 1ddba8b3b0 fix(sdk-minimal): align review fixtures and upgrade guide 2026-10-19 12:13:57 +08:00
luogesi 96f4db3f7d test(sdk): align built profile and snapshot dependencies 2026-10-19 12:13:57 +08:00
luogesi f62182e577 fix(sdk-minimal): checkpoint sessions before dispatch 2026-10-19 12:13:57 +08:00
fz 8614ca9fb4 Merge origin/master into fix/sdk-desktop-alignment 2026-10-19 11:40:37 +08:00
fz b9fb31c2dd fix(sdk): own reminders and bridge native user questions 2026-10-19 11:35:30 +08:00
_Kerman 043071b874 test(cli): read subagent policy through a retained handle 2026-10-19 11:34:36 +08:00
_Kerman c18f5bd3c0 Merge remote-tracking branch 'origin/master' into xtr/session-model-selection
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/capability-seams.md
#	docs/capability-seams.zh.md
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	packages/api/session-controller/src/types.ts
#	packages/bundle/base/package.json
#	packages/bundle/headless/README.i18n.yaml
#	packages/bundle/headless/README.md
#	packages/bundle/headless/README.zh.md
#	packages/bundle/headless/package.json
#	packages/bundle/headless/tsconfig.json
#	packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts
#	scripts/type-equiv.manifest.json
2026-10-19 11:30:55 +08:00
_Kerman 955e600031 Merge master into session projection registration handles 2026-10-19 11:21:16 +08:00
Tianyi Cui 55fddb3424 refactor(auto-review): recognize existing user task sources 2026-10-18 11:44:14 +08:00
Tianyi Cui e0dffac6fa fix(headless): refine Auto policy reporting and fixtures 2026-10-18 11:44:14 +08:00
Tianyi Cui 7181effc69 feat(headless): support unattended experimental Auto review 2026-10-18 11:44:14 +08:00
Tianyi Cui d6e6550caf test(auto-review): type the restore timestamp assertion 2026-10-18 11:44:13 +08:00
Tianyi Cui 928c3a872b test(auto-review): pin restore and live reload behavior 2026-10-18 11:44:13 +08:00