Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Versions follow the merge of a `*_release-v*` branch; CI publishes to npm on tag
- **fork 克隆保号**:`cloneSessionRows`(store+mysql 双后端)把父会话行整段复制到子(session,seq) 保号 + lineage 列(parentSessionId/forkPointSeq 真值)+content/media CAS refcount 提升 + 幂等重放;子 append 自然从父 maxSeq+1(remapPlanToAbsolute)。fork 端点接线,存储不可用降级=kernel-only 克隆(现行为)。
- **验收桩**:kernel 4 测(BLOCKED 偏移重排/交换原子性/无行引用保留+被夺号重安居+死 ref 不动/已对齐幂等)+host 4 测(整段克隆保号+lineage+幂等+子续号/部分分支/superseded 拒绝+当前号通过/冷加载纯视图+服务触达对齐一次+二次幂等)。

### 面板内置博客与长文(#4587)

- **`/__bili/blog` JSON feed + `/__bili/blog-assets/*` 图片路由**:随 npm 包内置的 markdown(website/blog/posts/*.md + website/articles.json 清单列出的仓库长文,paper 中英文)由服务端 `web/markdown.ts`(转义优先、XSS-safe)渲染进面板自己的「博客 Blog」页——卡片列表点展正文,双语随面板语言切换,离线可读;`web/markdown.ts` 顺带支持了图片引用(http(s)/面板资产路由以外的一律丢弃)和 GFM 管道表格(复用 .data 表格样式)。图片路由带穿越/编码/扩展名三重门。内容随自更新前进,GitHub Pages(#4561)仍是永远最新的完整文库。零新配置键/env/磁盘缓存。

### 修复 master 回归(搭乘)

- **#4525 合并把 `sidScope` 改名 `dispatchScope` 漏改一处**:dsh fork-blind-spot 日志(C10b,#4215)仍读旧名 → master tsc 红(`TS2304: Cannot find name 'sidScope'`,dsh-native.ts:1287,CI run 40093629255 failure 同因)。修复=读 `dispatchScope.getStore()` 并按 `{sid,msgIds}` 形状取 `.sid`,语义不变(作用域归因活跃判定)。
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ report above.
**Can I query sessions and config over the web?** Yes — open
[http://localhost:8787](http://localhost:8787): an overview dashboard, session
list with per-session detail, live logs, a config editor, and an upstream
connectivity test. Everything is also plain JSON for scripting
connectivity test. A Blog view renders a few bundled notes and long-form
articles inside the panel itself (offline-readable; the full always-fresh
library lives on GitHub Pages). Everything else is also plain JSON for scripting
(`/__bili/stats`, `/__bili/sessions`, `/__bili/config`, …).

**When does compression happen?** It is model-driven: the injected context
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ bili --version

**`/acp` 显示什么?** 带原生插件的客户端(opencode、dsh)里,`/acp` 直接从代理取当前会话的 ACP 状态面板(会话、块、可压缩区间、用量);首个模型请求到来前显示空闲提示。`/acp-cache [full]` 打印上面的缓存报告。

**能用网页查会话和配置吗?** 能 —— 打开 [http://localhost:8787](http://localhost:8787):总览仪表盘、会话列表(含逐会话详情)、实时日志、配置编辑器、上游连通性测试。全部功能同样以纯 JSON 提供(`/__bili/stats`、`/__bili/sessions`、`/__bili/config`、…),方便脚本化。
**能用网页查会话和配置吗?** 能 —— 打开 [http://localhost:8787](http://localhost:8787):总览仪表盘、会话列表(含逐会话详情)、实时日志、配置编辑器、上游连通性测试。「博客」页还在面板内直接渲染几篇随装内置的发布笔记与长文(离线可看;完整文库在 GitHub Pages)。其余功能同样以纯 JSON 提供(`/__bili/stats`、`/__bili/sessions`、`/__bili/config`、…),方便脚本化。

**压缩什么时候发生?** 由模型驱动:注入的上下文工具由模型在上下文增长时自行调用,温和的增长 nudge(按设计固定约 50K token 步长,可用 `compress.nudgeGrowthTokens` 调整)沿途提醒它,仅输入就超窗时预检作为硬兜底触发(#470)。用 `/acp` 或网页界面实时观察。

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@
"dist",
"dsh.bundle.patch.yml",
"hermes-plugin",
"paper/model-driven-incremental-hierarchical-compression-training-free-multi-generational-context-management-for-long-lived-coding-agents.md",
"paper/figures/*.png"
"paper/*.md",
"paper/figures/*.png",
"website/articles.json",
"website/blog/posts"
],
"pi": {
"image": "https://raw.githubusercontent.com/ranxianglei/billion-context/master/docs/logo.png",
Expand Down
2 changes: 2 additions & 0 deletions reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ billion-context/
│ │ └── native.ts # Routing scope/exemptions policy (#1622)
│ └── web/ # Web UI (config editor, sessions, logs)
│ ├── api.ts # REST handlers (config get/put with parse-state guard)
│ ├── blogfeed.ts # Panel blog/articles feed from bundled markdown (#4587)
│ ├── changelog.ts # GitHub Releases feed for the panel changelog (#3719)
│ ├── sessions-data.ts # Read-only session browsing (live pool + on-disk, #1420); tier tree + lazy block content (#3917)
│ ├── logs-query.ts # GET /__bili/logs selection engine
│ ├── markdown.ts # Escape-safe Markdown → HTML (#1420)
Expand Down
12 changes: 12 additions & 0 deletions src/server/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { getPlannedUpgrade, getUpdatePolicyState } from "../update-policy.js";
import { PACKAGE_NAME, VERSION, BUILD_COMMIT } from "../version.js";
import { buildBlockContent, buildMessageContent, buildOverview, buildSessionDetail, buildSessionList, buildSessionPage, buildSessionTree, handleConfigGet, handleConfigPut, hiddenEmptyCount, renderUI, type BlockContentView } from "../web/index.js";
import { handleChangelogGet } from "../web/changelog.js";
import { handleBlogAssetGet, handleBlogGet } from "../web/blogfeed.js";
import { buildSessionReportMd, buildSessionReportSvg } from "../web/report.js";
import { queryLogLines } from "../web/logs-query.js";
import { buildDiagnostics } from "../web/diagnostics.js";
Expand Down Expand Up @@ -332,6 +333,17 @@ export async function handleAdminRoute(req: http.IncomingMessage, res: http.Serv
// read-only admin gating as every other /__bili/ GET above (the gates run
// before dispatch). Always answers 200; offline degrades to empty+error.
if (req.method === "GET" && req.url === "/__bili/changelog") return handleChangelogGet(res);
// #4587: panel-embedded blog/articles — bundled markdown rendered server-side
// into a JSON feed, plus its images under a guarded asset route. Read-only,
// fail-soft, no config surface; same gating as every other /__bili/ GET above.
if (req.method === "GET" && req.url === "/__bili/blog") {
handleBlogGet(res);
return;
}
if (req.method === "GET" && req.url !== undefined && req.url.startsWith("/__bili/blog-assets/")) {
handleBlogAssetGet(res, req.url);
return;
}
// #3719: dedicated 更新/Updates tab — self-update state plus manual
// check/install actions. Same gating as every /__bili/ route above (the
// gates run before dispatch); an unwired process (autoUpdate off) answers
Expand Down
Loading
Loading