Commit Graph
627 Commits
Author SHA1 Message Date
imccyu 812556040d fix(api): restore migrated remote coverage 2026-08-27 21:57:57 +08:00
imccyu 160706be60 test(api): refresh Remote migration artifacts 2026-08-27 21:57:56 +08:00
imccyu 2d4393d842 refactor(api): expose remaining domain remotes 2026-08-27 21:57:55 +08:00
Yichen Jiang b5c3cc897c fix(llm-pi-ai): store the JSON image of a grant payload
pi-ai credentials carry optional members as explicit undefined (a github.com
Copilot grant holds enterpriseUrl: undefined), and the store bridge committed
the object verbatim, so the credential store's strict validator refused the
write and sign-in failed after the provider had already authorized it.
toRecord now drops explicitly-undefined members and renders undefined array
entries null, exactly as JSON.stringify would; everything else passes through
untouched so genuinely unstorable values still fail loud at the store.
2026-08-26 16:37:49 +08:00
_Kerman d3dd816d67 Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-2731
# Conflicts:
#	packages/util/brand/README.i18n.yaml
#	packages/util/brand/README.md
#	packages/util/brand/README.zh.md
2026-08-26 10:35:38 +08:00
Magolor 0b5eba0c8d docs: rebuild the documentation skill and standards (#2983) 2026-08-25 23:47:20 +08:00
_Kerman f436c888aa Merge remote-tracking branch 'origin/master' into xtr/message-tool-call-id 2026-08-25 20:24:54 +08:00
creatixchu e497ea69b1 Merge remote-tracking branch 'origin/master' into worktree/2848-image-token-pressure 2026-08-25 19:56:17 +08:00
ZiyaandZiyaZhang b565df3442 feat(web): show exact per-turn token usage (#3005)
* feat(web): show exact per-turn token usage

* test(runtime): refresh exact token usage snapshots

* refactor(token-meter): own per-turn usage folding

* perf(ui-chat): bound paging anchor layout reads

* test(web): align usage golden with system prompt row

* fix(test): resolve token-meter client from source

* test(token-meter): cover retry without usage

---------

Co-authored-by: ZiyaZhang <199893125+ZiyaZhang@users.noreply.github.com>
2026-08-25 19:05:52 +08:00
_Kerman 9365ef496d Merge remote-tracking branch 'origin/master' into xtr/message-tool-call-id
# Conflicts:
#	packages/acp/acp/tests/approval.spec.ts
#	packages/acp/acp/tests/edges.spec.ts
#	packages/api/session-controller/tests/event-script.client.ts
#	packages/client/connection/src/client/fixture.ts
#	packages/client/ui-conversation/src/client/contract/slots.ts
#	packages/client/ui-conversation/src/client/contract/views.ts
#	packages/client/ui-conversation/src/client/index.ts
#	packages/client/ui-conversation/src/client/stores.ts
#	packages/core/agent-loop/tests/loop.spec.ts
#	packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/src/api/events.ts
#	packages/host/apiproxy/tests/api-proxy-view.spec.ts
#	packages/interaction/user-approval/src/index.ts
#	packages/llm/llm-deepseek/tests/adapter.e2e.ts
#	packages/llm/llm-pi-ai/src/context.ts
#	packages/llm/llm-pi-ai/tests/context.spec.ts
#	packages/llm/llm/tests/content.spec.ts
#	packages/subagent/subagent/tests/continuation.spec.ts
#	packages/subagent/tool-subagent/tests/tool-subagent.spec.ts
#	packages/test-support/llm-replay/tests/llm-replay.spec.ts
#	packages/todo/tool-todo/tests/tool-todo.spec.ts
#	scripts/gen-persistence-catalog.ts
2026-08-25 14:37:44 +08:00
creatixchu 1c065f3cd4 Merge remote-tracking branch 'origin/master' into worktree/2848-image-token-pressure
# Conflicts:
#	apps/cli/tests/profiles/acp/image-compaction.cordis.snapshot.yml
#	apps/cli/tests/profiles/acp/image-compaction.cordis.yml
#	apps/cli/tests/profiles/acp/tests/snapshots/image-compaction/input.json
#	apps/cli/tests/profiles/acp/tests/snapshots/image-compaction/session.jsonl
#	apps/cli/tests/profiles/acp/tests/snapshots/image-compaction/stdout.expected.jsonl
#	docs/config-catalog.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	examples/acp-agent/tests/acp.snapshot.ts
#	packages/llm/token-meter/README.i18n.yaml
#	packages/llm/token-meter/README.md
#	packages/llm/token-meter/README.zh.md
#	packages/llm/token-meter/src/index.ts
#	packages/llm/token-meter/src/surface-fold.ts
2026-08-25 11:15:35 +08:00
hypatiamay 0c5aa8110f Merge pull request #2999 from deepseek-harness/perf/token-meter-surface-fold-plan-commit
perf(token-meter): commit the surface fold in place through a plan/commit pair
2026-08-25 10:28:11 +08:00
creatixchu 9f2ba9f5aa Merge origin/master (regenerate config catalog) 2026-08-24 19:51:16 +08:00
creatixchu 5183bc2b65 fix(compaction): 摘要收缩改按路由价并补齐定价访问路径
ds-review-bot 首轮意见修复:

- 摘要收缩比较改用所选节点的路由价 shadowedRouteTokenCount,修复图片消息启发式价低于带框摘要时压缩被误拒;日志影子价仍为启发式
- DeepSeek 定价经序列化器同一套 access 解析构建句柄与占位文本,消除逐图数十 token 的低估;uncatalogued 分支 JSDoc 指明复现 projectImagesForTextModel 替换
- llm-replay 在加载时拒绝纯文本模型上的 imageRequestTokens 声明
- contextBreakdown 的 README 与 JSDoc 改为等于 heuristicTokens 之和,不再声称等于路由价 surfaceTokens
2026-08-24 19:48:52 +08:00
creatixchu 42164508c8 feat(llm): 在 compaction 中按路由为图片请求压力计价
Closes #2848.

- dsh-llm 新增 LlmAdapter.imageRequestPricing 同步钩子与 LlmImageRequestPricing/LlmImageRequestPrice 词汇,ctx.llm 按路由解析
- llm-deepseek 用官方公布的 v4 视觉计算器逐句移植(14px patch、3:1 降采样、384 上限、最坏对齐 pad)实现该钩子,复现请求投影的最旧优先 offload 与像素预算缩放;纯几何 requestImageDimensions 上移到 dsh-attachment
- token-meter 表层 fold 存储与路由无关的节点事实,measure() 按生效 envelope 的路由为图片出现处定价;锚点存快照并按同一路由重定价;TokenSurfaceNode 同时携带路由价 tokens 与固定启发式 heuristicTokens
- compaction 触发、保留与选段读取同一套路由价,记录的 shadowedTokenCount 保持启发式以维持 O(1) 投影 fold 一致
- llm-replay 支持按模型的 imageRequestTokens 声明;新增 keyless 的 image-compaction ACP 快照场景端到端验证装配应用
2026-08-24 19:15:30 +08:00
Dudu-0223 f76a225a7d Merge pull request #2663 from deepseek-harness/feat/subagent-provider
让 subagent 按需发现并选择子 Agent 模型
2026-08-24 18:23:42 +08:00
creatixchu 30704dc1df fix(attachment): budget master pixels and share the encoding ladder
Master dimensions move from a 2048 long-edge rule to a total-pixel
budget (normalizedImageMaxPixels, default 2048x2048) with an 8192
long-edge cap, so extreme aspect ratios keep short-edge resolution.
The shared quality ladder and lazy execution move to encoding.ts,
review-round doc fixes land across attachment and llm packages, and
the superseded facts in the unified-image-pipeline note now describe
the shipped routing.
2026-08-24 17:10:59 +08:00
Hypatia May 4db19c352e docs(token-meter): distinguish projection and measurement folds 2026-08-24 16:24:13 +08:00
Hypatia May 58a0e450b3 perf(token-meter): commit the surface fold in place through a plan/commit pair
foldSurfaceTokens rebuilt the priced surface on every surface event: an
append allocated [...nodes, node] and a replacement copied the whole
array before splicing, charging every well-formed event O(surface) for
an atomicity property only malformed events need. Benchmarks put the
copy at ~99.9% of an append's cost (100µs at a 50k-node surface vs
0.1µs for pricing) with O(S²) accumulation over a session, inside the
synchronous session/event publication path.

Split the fold into the session core's planSurfaceEvent/applySurfacePlan
shape: planSurfaceTokens performs every fallible step against the
read-only surface, commitSurfaceTokens applies the plan in place and is
infallible by construction. _foldEvent plans first, runs the remaining
fallible anchor validation, and only then commits, so retry identity is
preserved by ordering instead of by allocation. Appends drop to
amortized O(1) (100.3µs -> 1.9µs at 50k nodes); replacements keep their
O(surface) findIndex but stop paying the extra full copy (21µs -> 4.2µs).

A new regression test pins the one hazard this introduces: an event
whose surface plan is valid but whose later anchor validation throws
must leave the priced surface and running total uncommitted across
repeated failures.
2026-08-24 16:24:12 +08:00
creatixchu ebb8010b56 Merge remote-tracking branch 'origin/master' into worktree/2885-image-compression
# Conflicts:
#	docs/config-catalog.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.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/adapter.ts
2026-08-24 16:23:34 +08:00
creatixchu 4863890535 fix(attachment): route image encoding by alpha over shared quality ladders
Delete the 5-bit colour-count classifier and palette PNG branch that
misrouted high-frequency photographic JPEGs (issue #2885 images 23/24)
into an encoder 100x slower with 4x larger output. Both normalization
and request-image encoding now route by the decoded alpha fact alone:
opaque sources down a JPEG ladder and alpha sources down a WebP
effort-0 ladder, each at qualities 85/75/60. Byte budgets become ladder
targets: the downscale retry loop is gone and a ladder-exhausted encode
keeps its smallest output, while provider byte caps stay enforced at
the transmitting route. Request transforms move to request-image-v5.
2026-08-24 16:14:32 +08:00
creatixchu 7bad88206b test(llm): 覆盖执行环境图片路径解析 2026-08-24 16:01:49 +08:00
creatixchu 558f08780c refactor(attachment): 分离宿主位置与模型访问路径 2026-08-24 14:51:03 +08:00
creatixchu 7f4cf99eeb 修正图片路径访问与只读存储 2026-08-24 13:11:04 +08:00
creatixchu bd4e4173e7 feat(attachment): expose model-readable image paths 2026-08-24 12:08:26 +08:00
Yichen Jiang 05daf25e10 test(llm): pin includeShippedRoot off in the inventory roster
The spec landed on master before the roster gained the plugin-bundled
shipped root; its empty-roots harness now opts out explicitly, matching
every other exact-roster suite.
2026-08-24 10:17:11 +08:00
Tianyi Cui c4f10577b5 test(llm): cover pi-ai upgrade compatibility 2026-08-24 01:57:18 +08:00
Tianyi Cui 76c3bf5f6f Merge origin/master into worktree/upgrade-pi-ai-0.84.2 2026-08-24 01:38:25 +08:00
Tianyi Cui 44bd9182ff chore(llm): bump pi-ai to 0.84.2 2026-08-24 01:19:01 +08:00
imccyu e47c897f5f refactor(session): localize token delta detection 2026-08-23 23:29:38 +08:00
Tianyi Cui 9c7e142f79 refactor(session): send canonical events directly 2026-08-23 00:22:41 +08:00
Tianyi Cui fe72ab42d1 feat(deepseek): upload incremental session logs 2026-08-22 22:55:02 +08:00
Tianyi Cui c41c5f3959 Merge origin/master into todo-event-ownership-v2 2026-08-22 21:12:36 +08:00
Tianyi Cui a2b415096d refactor(todo): own todo event vocabulary 2026-08-22 21:10:02 +08:00
Tianyi Cui 17f85bdbcd docs: trim CoT leakage from post-purge prose
Remove dead design-session citations, change narration, indexical
stamps, and review-adjacent justification found by the
dsh-trim-cot-leakage recall batteries in prose that landed after the
last purge. Bilingual README pairs are re-recorded.
2026-08-22 20:35:11 +08:00
Tianyi Cui ea6f61f144 feat(deepseek): upload plugin package metadata (#2916)
* feat(deepseek): upload plugin package metadata

* feat(deepseek): apply metadata review feedback

* docs(deepseek): specify request wire extensions

* docs(notes): record inventory cache benchmark

* docs(site): keep DeepSeek wire spec repository-only
2026-08-22 20:03:23 +08:00
_Kerman 3cd80a6f3f Merge remote-tracking branch 'origin/xtr/session-format-migration' into xtr/message-tool-call-id
# Conflicts:
#	.agents/notes/implemented/architecture/2026-06-20-branded-ids.i18n.yaml
#	.agents/notes/implemented/architecture/2026-06-20-branded-ids.md
#	.agents/notes/implemented/architecture/2026-06-20-branded-ids.zh.md
#	packages/fs/tool-fs/tests/read-image.spec.ts
#	packages/llm/llm-deepseek/tests/adapter.e2e.ts
#	packages/llm/llm-deepseek/tests/serialize.spec.ts
#	packages/llm/llm-pi-ai/src/context.ts
#	packages/llm/llm-pi-ai/tests/context.spec.ts
#	packages/llm/llm-pi-ai/tests/convert.spec.ts
#	packages/llm/llm/src/message.ts
#	packages/llm/llm/tests/content.spec.ts
2026-08-22 16:03:48 +08:00
Tianyi Cui 934976732d docs: purge residual chain-of-thought leakage 2026-08-22 13:10:23 +08:00
Turtle 6b3e971805 docs: remove implementation narration from prose 2026-08-21 22:22:23 +08:00
imccyu 0bee546177 feat(util): mint UUIDs without crypto.randomUUID in every context 2026-08-21 20:35:34 +08:00
imccyu aa6c361a97 release(dsh): 0.1.1-rc.2 2026-08-21 19:48:58 +08:00
creatixchu d618bfebb4 fix(deepseek): decouple files and stream timeouts 2026-08-21 18:34:16 +08:00
creatixchu 1b389798dc fix(llm-deepseek): fall back when Files resolution fails 2026-08-21 18:14:46 +08:00
_Kerman 82c34463fc fix(tests): complete ToolCallId rename 2026-08-21 17:11:33 +08:00
_Kerman a789637db6 refactor(llm): rename CallId to ToolCallId 2026-08-21 16:10:24 +08:00
creatixchu 2491e12fd8 refactor(attachment): normalize image storage API 2026-08-21 15:06:24 +08:00
creatixchu 724783b024 refactor(image): remove region reads 2026-08-21 15:06:24 +08:00
creatixchu 0c9a664223 test(deepseek): print vision failure facts 2026-08-21 15:06:11 +08:00
creatixchu 703ce4a3d6 test(deepseek): expose Files API e2e failures 2026-08-21 15:06:11 +08:00
creatixchu d65e2a9e8a test(images): close unified pipeline coverage gaps 2026-08-21 15:06:11 +08:00