9 Commits
Author SHA1 Message Date
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
Turtle 93a1b569ac Merge remote-tracking branch 'origin/master' into codex/remove-cordis-catalog-line-numbers
# Conflicts:
#	docs/subsystems/agent-team.i18n.yaml
#	docs/subsystems/approval.i18n.yaml
#	docs/subsystems/client-modules.i18n.yaml
#	docs/subsystems/client-modules.md
#	docs/subsystems/client-modules.zh.md
#	docs/subsystems/code-runtime.i18n.yaml
#	docs/subsystems/commands.i18n.yaml
#	docs/subsystems/commands.md
#	docs/subsystems/commands.zh.md
#	docs/subsystems/compaction.i18n.yaml
#	docs/subsystems/compaction.md
#	docs/subsystems/compaction.zh.md
#	docs/subsystems/core.i18n.yaml
#	docs/subsystems/core.md
#	docs/subsystems/core.zh.md
#	docs/subsystems/credentials.i18n.yaml
#	docs/subsystems/credentials.md
#	docs/subsystems/credentials.zh.md
#	docs/subsystems/feedback.i18n.yaml
#	docs/subsystems/filesystem.i18n.yaml
#	docs/subsystems/goal.i18n.yaml
#	docs/subsystems/http-server.md
#	docs/subsystems/http-server.zh.md
#	docs/subsystems/invariants.i18n.yaml
#	docs/subsystems/invariants.md
#	docs/subsystems/invariants.zh.md
#	docs/subsystems/jobs.i18n.yaml
#	docs/subsystems/llm-streaming.i18n.yaml
#	docs/subsystems/llm-streaming.md
#	docs/subsystems/llm-streaming.zh.md
#	docs/subsystems/permission-presets.md
#	docs/subsystems/permission-presets.zh.md
#	docs/subsystems/persistence.i18n.yaml
#	docs/subsystems/persistence.md
#	docs/subsystems/persistence.zh.md
#	docs/subsystems/plan.i18n.yaml
#	docs/subsystems/plan.md
#	docs/subsystems/plan.zh.md
#	docs/subsystems/sandbox.i18n.yaml
#	docs/subsystems/sandbox.md
#	docs/subsystems/sandbox.zh.md
#	docs/subsystems/schedule.i18n.yaml
#	docs/subsystems/session-projection.i18n.yaml
#	docs/subsystems/session-projection.md
#	docs/subsystems/session-projection.zh.md
#	docs/subsystems/session-query.i18n.yaml
#	docs/subsystems/session-reference.i18n.yaml
#	docs/subsystems/session-reference.md
#	docs/subsystems/session-reference.zh.md
#	docs/subsystems/session-telemetry.md
#	docs/subsystems/session-telemetry.zh.md
#	docs/subsystems/session-title.i18n.yaml
#	docs/subsystems/session.i18n.yaml
#	docs/subsystems/session.md
#	docs/subsystems/session.zh.md
#	docs/subsystems/settings.i18n.yaml
#	docs/subsystems/settings.md
#	docs/subsystems/settings.zh.md
#	docs/subsystems/shell.i18n.yaml
#	docs/subsystems/shell.md
#	docs/subsystems/shell.zh.md
#	docs/subsystems/skills.i18n.yaml
#	docs/subsystems/skills.md
#	docs/subsystems/skills.zh.md
#	docs/subsystems/spill.i18n.yaml
#	docs/subsystems/storage.i18n.yaml
#	docs/subsystems/subagent.i18n.yaml
#	docs/subsystems/subagent.md
#	docs/subsystems/subagent.zh.md
#	docs/subsystems/subprocess.i18n.yaml
#	docs/subsystems/system-prompt.i18n.yaml
#	docs/subsystems/system-prompt.md
#	docs/subsystems/system-prompt.zh.md
#	docs/subsystems/tasks.md
#	docs/subsystems/tasks.zh.md
#	docs/subsystems/terminal.md
#	docs/subsystems/terminal.zh.md
#	docs/subsystems/token-meter.i18n.yaml
#	docs/subsystems/tools.i18n.yaml
#	docs/subsystems/tools.md
#	docs/subsystems/tools.zh.md
#	docs/subsystems/typert.i18n.yaml
#	docs/subsystems/typert.md
#	docs/subsystems/typert.zh.md
#	docs/subsystems/user-interaction.i18n.yaml
#	docs/subsystems/user-questions.i18n.yaml
#	docs/subsystems/user-questions.md
#	docs/subsystems/user-questions.zh.md
#	docs/subsystems/web.i18n.yaml
#	docs/subsystems/workflow.i18n.yaml
#	docs/subsystems/workflow.md
#	docs/subsystems/workflow.zh.md
#	docs/subsystems/workspace.i18n.yaml
#	docs/subsystems/workspace.md
#	docs/subsystems/workspace.zh.md
#	packages/typert/generator/tests/cordis-catalog.spec.ts
2026-08-20 19:48:43 +08:00
pku-xht ad6516933b fix(i18n): close automated review findings 2026-08-18 21:02:50 +08:00
Tianyi Cui a2d0f7f411 refactor: apply repository naming contract
Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
2026-08-13 00:54:38 +08:00
Turtle 0c708cb10d refactor: replace overloaded surface terminology 2026-08-11 15:23:05 +08:00
Turtle f248dc3773 docs: remove line numbers from subsystem catalog links 2026-08-10 11:13:33 +08:00
Tianyi Cui aa0ca6c836 docs: anchor each subsystem page to its package group; make group READMEs thin tables
core.md read as a type grab-bag: LLM wire vocabulary up front, the agent/loop story buried, and no correspondence to packages/core. It now opens on the packages/core control spine — the package-by-package loop map with a Page column into session/system-prompt/tools/scope — and keeps only what the spine group declares plus the repo-wide patterns: the Agent handle with its delivery/cancellation/interception contracts, the SessionEvent envelope, branded ids, the …Map pattern. The conversation vocabulary (Message/ContentBlock, the model request, adapters — 17 type-equiv blocks) moves to llm-streaming.md, which now declares packages/llm end-to-end; the duplicate ContentBlockMap paste near its seam section folds into the moved section, and the manifest, LINK_MAP, README table rows, website label (Core data structures → Core), and inbound anchors follow.

Every packages/<group>/README pair is now a thin front door in one shape: a why-first intro (bash's seam-pattern-first paragraph rewritten as 'shell execution for the agent'), the package table, and a closing pointer to the owning docs/subsystems page — the bash-style table stays the load-bearing middle. Load-bearing trailing paragraphs relocate rather than vanish: the fs no-timeout rationale becomes a filesystem.md section (both languages), session's four sectioned tables merge into one 12-row table, examples' legacy-bin H2 collapses to a pointer at jsonrpc-demo's README, and design rationale that already lives in an Agent Note or subsystem page is now linked instead of restated. All 40 pair records re-recorded.
2026-08-09 01:32:39 +08:00
Tianyi Cui f7323354bb docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs
Rebuild of the region machinery (PR3) on the post-#904 Typert projection:
renderPageRegion/renderInheritedPage live in dsh-typert-generator beside the
projection; scripts/gen-cordis-catalog.ts owns the curated SERVICE_PAGE /
EVENT_SCOPE_PAGE / SERVICE_WALK_EXEMPTIONS / LINK_MAP partition (fail-loud in
both directions, with the independent Context-merge scan backstopping the
projection's blind spot), spliceRegion, and the guarded pair auto-record.
docs/cordis-catalog/ is deleted: the flat events/services catalogs dissolve
into per-page regions and docs/cordis-catalog/core moves to docs/cordis-api/
with the inherited tier as its own generated page. The partition absorbs the
post-regrouping surface: ctx.typert → invariants.md, ctx.directoryPicker →
workspace.md, skills/* events → skills.md, and the four launcher-provided tui
accessor values join the named exemptions.
2026-08-09 01:31:57 +08:00
Tianyi Cui ba3125234a docs: rename core-data-structures/ to subsystems/
The folder is becoming the home of one-doc-per-subsystem pages (intro +
data structures + cordis services/events), so the name must describe the
whole contract, not just the type-vocabulary third of it. Mechanical
rename rebuilt on current master: every inbound Markdown link, generator
constant, website route, type-equiv manifest path, and spec expectation
moves together; the zh sides of the notes whose prose names the folder
are aligned (子系统) in the same change; touched bilingual pairs
re-recorded; translation-prompt snapshot re-recorded (its example embeds
development.md). Historical Agent Note slugs keep their dated
filenames.
2026-08-09 01:27:09 +08:00