Commit Graph
5050 Commits
Author SHA1 Message Date
imccyu 3ddab34194 Revert "perf(web): 压缩动态插件资源以加快冷启动" 2026-10-27 23:25:57 +08:00
imccyu 873c68c15b feat(models): show model selector badges from the /models listing (#7027)
* 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.

* feat(llm): carry /models badges into the model catalog

The shared DeepSeek listing decoder reads an optional per-entry
`badge: { text, tone }`. Text is one literal or translations keyed by
lowercase language id with a required English entry, each trimmed to 1
to 12 characters on one line; tone is neutral, info, success, or
warning, and an absent or unrecognized tone reads as neutral. An absent
or null badge declares none; an unreadable one is dropped with a listing
problem and never hides its model.

resolveListedCatalog keeps the badges of offered models, both DeepSeek
routes attach them through catalogModelInfo, LlmRuntime.listModels
detaches them, and the Host model catalog forwards them as
ModelCatalogModel.badge. resolveModelInfo omits the badge, so no model
request, Session event, or model-facing tool carries it.

* feat(client): render catalog badges in the model selector

The composer model seat shows a catalog model's badge after its name in
the trigger, the root-menu value, and each option: a Tag in the badge's
tone whose text is resolved for the active locale through
ctx.locale.resolveText. A conversation.input.model.label contribution
replaces the name and badge together and receives the badge in its
owner props.

Remove ui-deepseek-model-label-1017, which hard-coded `1017` beside
DeepSeek-V4.1-Flash for two providers, and its Web bundle row. The badge
now comes only from the model listing, so the build ships none of its
own; the upgrade guide covers profile patches that still target the
removed row. The Web e2e replaces the fixed-badge case with replay
catalogs that declare literal and translated badges, and the replay
adapter validates and advertises a configured badge.

* feat(llm-deepseek): read model badges from client_metadata

Each /models entry now declares its selector badge under
client_metadata["deepseek-harness"].badge, keyed by the User-Agent product
token like client_requirements, so the public model fields stay unchanged
and later DeepSeek Harness fields join the same object. Every field under
client_metadata is ignorable: null at any level shows no badge, and a level
that is not an object drops only the badge with a diagnostic naming it.

* docs: record why the listing badge container is client_metadata

* fix(models): refresh listed badges in open selectors

* refactor(models): share listing cache lifecycle wiring

* docs(models): refresh listing event producer catalog

* fix(models): retain badges when listing refresh fails

* fix(models): validate badge text and preserve tags beside long names

* test(models): cover account listing automatic badge removal
2026-10-27 23:18:07 +08:00
liukx0205 0bfa572080 test(web): retain minified bundles in real-host smoke coverage 2026-10-27 17:55:51 +08:00
liukx0205 4f851948a5 perf(web): minify dynamic client bundles 2026-10-27 15:42:21 +08:00
Yichen Jiang af086ad377 Merge remote-tracking branch 'origin/master' into worktree/pr-7027-badge-refresh
# Conflicts:
#	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/client/ui-deepseek-model-label-1017/package.json
2026-10-27 14:38:36 +08:00
_Kerman 89c5ea4d83 Merge latest master into xtr/trajectory-result-mode 2026-10-27 11:16:45 +08:00
Yichen Jiangandimccyu e2c4d0538f ci: make reference and worktree tests portable (#7381)
* fix(forge): make reference and worktree tests portable

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

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

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

---------

Co-authored-by: imccyu <[email protected]>
2026-10-27 02:20:02 +08:00
imccyu 3ddacfd725 fix(ci): narrow the version scan and keep a crashing check inside its mode
The scan now reads exactly the manifests the release tooling rewrites, names
every directory and file it cannot read, and refuses an empty corpus; the
command takes the root it checks so the exit code is tested, and the workflow
reports a crashed check as a warning in report mode.
2026-10-26 23:51:18 +08:00
imccyu 2b485ea1db fix(ci): run the version check as the first step of the pre-merge check
It reads the manifests without an install, so it opens the step list and a
mistyped release stops the check before anything is built.
2026-10-26 23:27:39 +08:00
imccyu 1e433706f4 refactor(ci): run the pre-merge steps as one ordered list
Each step is a spawn whose stdio reaches the job log, the first failure stops
the list, and the script decides from CHECK_MODE whether to annotate as an
error or a warning, so the workflow only calls it.
2026-10-26 23:24:20 +08:00
imccyu a518d10c95 fix(ci): keep the pre-merge check's failures honest
The missing-script branch now fails in block mode instead of passing, the shell
block parses, the version walk refuses a directory it cannot read or one that
holds no manifest, the install is watched before anything else can throw, and a
spec runs `bash -n` over every Policy shell block.
2026-10-26 23:12:29 +08:00
imccyu c3998dde7c feat(ci): run one script for the merged tree in the pre-merge check
`Policy / Pre-Merge Check` now runs `scripts/pre-merge-check.ts` under plain
Node and knows nothing else about the merged tree. That script installs the
dependencies, checks that every released manifest carries the root version
while the install runs, and builds the Host and Client contracts, reporting
which step failed.
2026-10-26 22:54:02 +08:00
Yichen Jiang a941288b74 fix(forge): use the existing storage helper dependency classification 2026-10-26 21:35:20 +08:00
Yichen Jiang a36d02a596 Merge master into worktree/forge-session-list 2026-10-26 21:17:53 +08:00
Yichen Jiang a6883f4038 test: calibrate npm layout budget for the expanded release graph 2026-10-26 18:54:40 +08:00
Yichen Jiang f74e15ba08 Merge branch 'worktree/forge-bindings-stack-sync' into worktree/forge-pr-worktree-panel
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/experimental/README.i18n.yaml
#	packages/preset/agent-preset/skills/cordis-composition-reference/references/packages.md
2026-10-26 18:39:10 +08:00
Yichen Jiang 667ef04270 Merge remote-tracking branch 'origin/master' into worktree/forge-bindings-stack-sync
# Conflicts:
#	packages/experimental/README.i18n.yaml
2026-10-26 18:35:22 +08:00
Yichen Jiang bbb031654e Merge remote-tracking branch 'origin/worktree/forge-change-request-bindings' into worktree/forge-pr-worktree-panel
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/experimental/forge-github/README.i18n.yaml
#	packages/experimental/forge-github/README.md
#	packages/experimental/forge-github/README.zh.md
#	packages/experimental/forge-github/src/provider.ts
#	packages/experimental/forge-session/README.i18n.yaml
#	packages/experimental/forge-session/README.md
#	packages/experimental/forge-session/README.zh.md
#	packages/experimental/forge-session/src/index.ts
#	packages/experimental/forge/README.i18n.yaml
#	packages/experimental/forge/README.md
#	packages/experimental/forge/README.zh.md
#	packages/experimental/forge/src/index.ts
2026-10-26 18:14:53 +08:00
Yichen Jiang dd0ed998e7 docs(forge): define and verify worktree request type 2026-10-26 17:52:30 +08:00
winewill d8b9cff130 Merge pull request #7326 from deepseek-harness/feat/intel-mac-packaging
feat(desktop): add Intel Mac packaging Action and align platform forms
2026-10-26 17:51:11 +08:00
Yichen Jiang 8d4c8865dd fix(forge-session): resync watches when providers change 2026-10-26 17:48:19 +08:00
Yichen Jiang 1abf0f55fe docs(forge): clarify discovery limits and provider contracts 2026-10-26 17:39:09 +08:00
_Kerman e63f5903f1 fix(trajectory): sync catalogs after hiding the result service type 2026-10-26 17:10:46 +08:00
Xu Hanxiang 037ffa43d9 Merge pull request #6639 from deepseek-harness/worktree/experimental-client-ui-perf
feat(experimental): add client-ui-stats conversation view plugin
2026-10-26 15:48:06 +08:00
mektpoy 37afdaf3bb chore(release): cover the current dual-release resolution graph 2026-10-26 14:40:20 +08:00
mektpoy b7f14d3108 refactor(experimental): rename client-ui-perf to client-ui-stats 2026-10-26 14:30:51 +08:00
winewill a578ca435f feat(desktop): add Intel Mac packaging workflow and align forms 2026-10-26 14:17:58 +08:00
imccyuandimccyu df469ea6ff fix(ci): keep the pre-merge check green in report mode (#7311)
* fix(ci): keep the pre-merge check off the report-mode failures

* fix(ci): fail the pre-merge check in block mode without a base commit

* fix(ci): report every pre-merge failure the way its mode asks

The merge step now separates a base commit it cannot fetch from a merge it
cannot do, both failures print an annotation, and a spec pins the mode
wiring of the three Policy workflows.

* test(ci): type the Policy workflow assertions

---------

Co-authored-by: imccyu <[email protected]>
2026-10-26 13:39:57 +08:00
Yichen Jiang 64c81cb3e3 Merge branch 'worktree/forge-bindings-stack-sync' into worktree/forge-pr-worktree-panel 2026-10-26 13:30:55 +08:00
Yichen Jiang 3cee25a3a5 Merge branch 'worktree/composer-host-confirmed-echo' into worktree/forge-bindings-stack-sync 2026-10-26 13:30:15 +08:00
mektpoy 1b9b924a05 fix(experimental): complete shipped-locale dictionaries and release expectations 2026-10-26 13:26:10 +08:00
mektpoy 65dcfaefa5 fix(experimental): align package version and remove duplicated helpers 2026-10-26 13:26:10 +08:00
Xu Hanxiang 160ba96793 feat(experimental): add client-ui-perf conversation view plugin 2026-10-26 13:25:50 +08:00
_Kerman e3805406c4 Merge pull request #6763 from deepseek-harness/xtr/ptc-vm-script
feat(ptc-runtime-node): add VM Script execution with optional state retention
2026-10-26 11:52:18 +08:00
_Kerman 271a6143a1 Merge origin/master into xtr/ptc-vm-script 2026-10-26 11:34:32 +08:00
_Kerman 5626ae2391 refactor(trajectory): own live result inspection in the feature plugin 2026-10-26 11:16:36 +08:00
winewill 6cbbc8caa5 Merge master and reconcile desktop diagnostic records 2026-10-26 11:05:45 +08:00
Turtle daf7a0cc43 refactor(scripts): share npm os/cpu matching for pnpm pruning
Move the release verifier's npm platform check into scripts/npm-platform.ts and use it when pruning pnpm's bundled packages, so negations, 'any' and invalid fields follow npm. Skip non-directories and name the manifest on invalid fields.
2026-10-26 03:25:12 +08:00
Turtle 44494c0c83 fix(desktop): drop other targets' native packages from bundled pnpm
pnpm's npm package carries reflink bindings for darwin-arm64, darwin-x64, win32-arm64 and win32-x64. The primary runtime copied all of them, so the Apple silicon app contained an x86_64 Mach-O module that triggers macOS's Intel app warning. Prune packages whose os/cpu fields exclude the target and bump the payload format.
2026-10-26 02:37:23 +08:00
imccyu ca4c00de46 Merge pull request #7154 from deepseek-harness/session-stream-snapshot
refactor(session): separate history, state and Web follow implementations
2026-10-25 20:08:12 +08:00
creatixchu d8c9ac6a0f Merge master into feat/cua-permission-onboarding 2026-10-25 19:36:49 +08:00
imccyu 7c7b021766 docs(session): document events, deprecated page and activation order
Sync the Session README, implementation notes and follow upgrade guide,
then regenerate the API, subsystem, persistence and event-graph catalogs.
2026-10-25 18:14:32 +08:00
CreatixChu 7bc30c4cba fix(attachments): 复用完整图片引用,取消 Session 历史扫描 (#7021)
* test(api): measure historical image read costs

* fix(test): resolve image benchmark paths from its config

* fix(attachments): read stored images without scanning sessions

* test(attachments): complete by-id fixtures and access assertions

* fix(docs): implement image-id read on catalog fixture

* docs(attachments): refresh generated read contracts

* test(web): verify stored images across history and forks

* docs(api): clarify image read metadata and permission scope

* test(api): type benchmark instrumentation without unsafe returns

* test(api): retire unknown-cast allowances with removed history fixtures

* test(attachments): isolate browser cases and document store-wide access

* test(web): intercept the by-id thumbnail read path

* docs(perf): run generated diagnostic from its owning package

* refactor(attachments): reuse reference reads for conversation images

* docs(api): refresh complete image reference client contract

* test(ui-chat): assert complete image reference forwarding

* test(perf): measure image reads against current Session observations
2026-10-25 09:40:53 +00:00
creatixchu fc6e370457 Merge master after platform support landed 2026-10-25 13:41:24 +08:00
creatixchu cf65ee6e01 Merge master into bundle Host platform support 2026-10-25 11:58:20 +08:00
Yichen Jiang e4fd8a87ff Merge branch 'worktree/forge-pr-worktree-panel' into worktree/forge-session-list 2026-10-24 22:03:03 +08:00
Yichen Jiang 53d8a336f7 Merge commit 'bf1df01ae99' into worktree/forge-session-list
Brings the Session list branch up to date with the forge panel, whose
held messages now wait at inbox insertion.

- client-ui-forge keeps the Session list's remote-access import and the
  panel's messageOf; the agent-controller import is gone.
- The README and the forge panel Agent Note combine both sides: the
  forgeWorktree projection keeps its client view next to the inbox hold,
  and the Session list paragraphs stay.
- The config catalog is regenerated, and the README, forge subsystem
  page, and Agent Note pairings are recorded again.
2026-10-24 22:02:44 +08:00
Yichen Jiang bec0ac67ba Merge commit '45db0d28ce5' into worktree/forge-pr-worktree-panel 2026-10-24 21:45:54 +08:00
Yichen Jiang 3a52eb1993 Merge commit '861f5200ded' into worktree/forge-pr-worktree-panel
Master replaced the creation and plugin recommendation bundles with one
personalized recommendations bundle.

- The CLI manifest keeps master's bundle and the forge bundle.
- The plugin page expectation ranks the forge bundle before the held-back
  personalized recommendations bundle.
- The experimental README pairing is recorded again.
2026-10-24 21:45:41 +08:00
Yichen Jiang 91bd19ea98 Merge remote-tracking branch 'origin/worktree/composer-host-confirmed-echo' into worktree/forge-change-request-bindings 2026-10-24 21:42:23 +08:00