Skip to content

Commit 7084716

Browse files
committed
merge: sync Workbench OAR parity with updated #10241 (#10243 alignment)
Signed-off-by: song <xinxinsong66@gmail.com>
2 parents bf4b2f6 + a1ac646 commit 7084716

388 files changed

Lines changed: 4170 additions & 2661 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/python-tests.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ jobs:
419419
- name: Verify upgraded Workbench uses the shared OAR session
420420
if: matrix.shard == 1 && needs.changes.outputs.workbench_oar_tests == 'true'
421421
run: |
422-
npm ci --prefix apps/workbench --workspace @loopx/loochat --ignore-scripts
423-
npm run --prefix apps/workbench build --workspace @loopx/loochat
422+
npm ci --prefix apps/workbench --workspace @loopx/workbench-daemon --ignore-scripts
423+
npm run --prefix apps/workbench build --workspace @loopx/workbench-daemon
424424
test -f apps/workbench/packages/daemon/dist/adapters/oar.js
425425
test -f node_modules/@botiverse/oar/package.json
426426
python -m pytest -q tests/test_workbench_cli.py::test_upgraded_workbench_service_creates_one_session_on_the_shared_core

‎apps/workbench/.env.example‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,57 @@
22

33
# Address the daemon listens on. Keep 127.0.0.1 for local use.
44
# For remote access over VPN, set this to the VPN interface address.
5-
LOOCHAT_HOST=127.0.0.1
6-
LOOCHAT_PORT=8787
5+
LOOPX_WORKBENCH_HOST=127.0.0.1
6+
LOOPX_WORKBENCH_PORT=8787
77

88
# Static access token. Generate a long random value, e.g. `openssl rand -hex 32`.
9-
LOOCHAT_TOKEN=
9+
LOOPX_WORKBENCH_TOKEN=
1010

1111
# Where the SQLite database is stored. Relative paths resolve from the directory the daemon starts in.
12-
LOOCHAT_DATA_DIR=./data
12+
LOOPX_WORKBENCH_DATA_DIR=./data
1313

1414
# Agent executables. Claude: leave empty to use the bundled ACP adapter. pi, agy, traex, codex and dsh:
1515
# leave empty to use the one on PATH. An agent that is not installed is simply shown as unavailable.
16-
LOOCHAT_CLAUDE_ACP_BIN=
16+
LOOPX_WORKBENCH_CLAUDE_ACP_BIN=
1717
# The claude CLI itself, for local one-shot runs (quota reads, signed-in account discovery).
18-
LOOCHAT_CLAUDE_BIN=
19-
LOOCHAT_PI_BIN=
20-
LOOCHAT_AGY_BIN=
21-
LOOCHAT_TRAEX_BIN=
22-
LOOCHAT_CODEX_BIN=
18+
LOOPX_WORKBENCH_CLAUDE_BIN=
19+
LOOPX_WORKBENCH_PI_BIN=
20+
LOOPX_WORKBENCH_AGY_BIN=
21+
LOOPX_WORKBENCH_TRAEX_BIN=
22+
LOOPX_WORKBENCH_CODEX_BIN=
2323
# DeepSeek Harness; the ACP profile it serves is `dsh --profile acp`.
24-
LOOCHAT_DSH_BIN=
24+
LOOPX_WORKBENCH_DSH_BIN=
2525

2626
# Working directories offered in the UI, comma-separated. Empty means the daemon's start directory.
27-
LOOCHAT_WORKDIRS=/path/to/project-a,/path/to/project-b
27+
LOOPX_WORKBENCH_WORKDIRS=/path/to/project-a,/path/to/project-b
2828

2929
# The sidebar lists this machine's Claude Code / Codex / … sessions from every directory; importing
3030
# one from outside the working directories adds its directory. Directories listed here (and those
3131
# below them), comma-separated, are left out of that list.
32-
LOOCHAT_HIDDEN_SESSION_DIRS=
32+
LOOPX_WORKBENCH_HIDDEN_SESSION_DIRS=
3333

3434
# Shell that runs in a web terminal. Empty means $SHELL, then /bin/bash.
35-
LOOCHAT_TERM_SHELL=
35+
LOOPX_WORKBENCH_TERM_SHELL=
3636

3737
# Private Unix socket used by this node's relay client. Keep it enabled when joining a hub.
38-
# Empty means ~/.local/state/loochat/daemon.sock; `off` disables it.
39-
LOOCHAT_SOCKET=
38+
# Empty means ~/.local/state/loopx-workbench/daemon.sock; `off` disables it.
39+
LOOPX_WORKBENCH_SOCKET=
4040
# Join settings generated on the hub: leave empty for a standalone machine.
41-
LOOCHAT_HUB_URL=
42-
LOOCHAT_HUB_TOKEN=
41+
LOOPX_WORKBENCH_HUB_URL=
42+
LOOPX_WORKBENCH_HUB_TOKEN=
4343

4444
# Your own browser on this machine, shown on the VNC desktop; agents drive it with agent-browser.
4545
# Profile (holds your sign-ins). Empty means browser/profile under the data directory.
46-
LOOCHAT_BROWSER_PROFILE=
46+
LOOPX_WORKBENCH_BROWSER_PROFILE=
4747
# X display to show it on. Empty follows the VNC desktop; `off` turns the browser off.
48-
LOOCHAT_BROWSER_DISPLAY=
48+
LOOPX_WORKBENCH_BROWSER_DISPLAY=
4949
# Chrome to start. Empty prefers Google Chrome, then Chromium.
50-
LOOCHAT_BROWSER_EXECUTABLE=
50+
LOOPX_WORKBENCH_BROWSER_EXECUTABLE=
5151
# agent-browser, when it is not on PATH (npm install -g agent-browser).
52-
LOOCHAT_AGENT_BROWSER=
52+
LOOPX_WORKBENCH_AGENT_BROWSER=
5353

5454
# Built web UI to serve at `/`. Leave empty to use packages/web/dist when it exists.
55-
LOOCHAT_WEB_DIR=
55+
LOOPX_WORKBENCH_WEB_DIR=
5656

5757
# Used only by `npm run dev:web` (Vite dev server) to find the daemon.
58-
LOOCHAT_DAEMON_URL=http://127.0.0.1:8787
58+
LOOPX_WORKBENCH_DAEMON_URL=http://127.0.0.1:8787

‎apps/workbench/LICENSE‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2026 LooChat contributors
3+
Copyright (c) 2026 LoopX contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎apps/workbench/README.md‎

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

‎apps/workbench/THIRD_PARTY_NOTICES.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ inline/resumable login at `c9802662b5219395b14e65ba30dfff21230df91b`).
3535

3636
Quote-paste handling is adapted from Calli `b456a10716221f06baee5d62a02f87dd626df460`;
3737
quoted side-chat model selection from `80eb16edbd3e2cc3e2a3c887a2560fe39b6ab209`,
38-
including the current local SideChat preference/catalog refinements. Existing Loochat
38+
including the current local SideChat preference/catalog refinements. Existing LoopX Workbench
3939
message-draft protections and machine-scoped provenance are retained.
4040

4141
Antigravity model-family/effort selection and legacy preference compatibility are adapted from
4242
Calli `d89d2656d707ba9b152178be4343f9112fd87c72`; the ACP conversation transport and
4343
its protocol fixtures from `96f3dade4c603778d48a494f53753b888b5e1c26`. The port retains
44-
Loochat's typed login recovery and prompt-submission lifecycle.
44+
LoopX Workbench's typed login recovery and prompt-submission lifecycle.
4545

4646
Collaboration mail batching and progress semantics are adapted from Calli
4747
`edf2708` and `2ee2853`; member composer controls from `26ad76d`; the shared
@@ -64,7 +64,7 @@ cache skeleton, floating side-card/note scoping, and Liquid Glass chrome are
6464
adapted from Calli (`cb2b6d6..68cffdb`, including `8aa0b7e`, `0a0f65c`,
6565
`3ceb7c0`, `66ef16e`, `e081081`, `a0df5bb`, `a6ae44f`, `78213cf`, `68f558d`,
6666
`4a64ae9`, `8c8e66f`, `438b490`, `af054cf`, `7496298`, `f9cef93`, `5fddb74`,
67-
`dc49405`, `68cffdb`). LoopX keeps its `loochat` protocol/CLI naming, Control
67+
`dc49405`, `68cffdb`). LoopX keeps its `loopx-context` protocol/CLI naming, Control
6868
Plane Steward/Goal workflows, and Composer draft-ownership semantics.
6969

7070
MIT License

‎apps/workbench/docs/fork-design.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
- 主列表只保留独立「话题」;由该话题衍生出的 **原生分叉(`⑂`)**、**接力继续(`⇄`)**、**划词/消息追问** 与 **团队协作** 全部自动归入父话题的折叠抽屉,每条子项标题前用 12px 极小单色线性图标一眼区分。
1414
- 任何衍生子线程在侧边栏右键菜单中均支持「移出为独立话题」(`PATCH /api/threads/:id { forkGroup: null }`),长大后随时可独立为主线。
1515

16-
3. **接力继续的默认实现:新会话起步 + 0-Token 成对进度锚点 + 按需回查 `loochat history`**
16+
3. **接力继续的默认实现:新会话起步 + 0-Token 成对进度锚点 + 按需回查 `loopx-context history`**
1717
- 接力继续不复制源会话的全量历史,也不调用额外模型做压缩或写交接摘要。
18-
- 在新会话首轮消息发送时,由 daemon 在本地用 0 额外模型调用生成一个结构化 `<loochat-fork-anchor>` 进度锚点(仅作为发送给 Agent 的系统上下文,不在用户气泡里展示),内容包括:
18+
- 在新会话首轮消息发送时,由 daemon 在本地用 0 额外模型调用生成一个结构化 `<loopx-context kind="fork-anchor">` 进度锚点(仅作为发送给 Agent 的系统上下文,不在用户气泡里展示),内容包括:
1919
- 源对话最近 3 轮的**成对问答摘要**(用户要求 + 助手结论),避免只放用户原话导致「方案 A」「把这个改一下」等指代失去参照;
2020
- 源对话近期修改/涉及的文件路径;
21-
- 回溯完整上下文的明确命令:`loochat history <sourceThreadId> --turns 6`(按成对轮次查看,而非只看用户输入)。
21+
- 回溯完整上下文的明确命令:`loopx-context history <sourceThreadId> --turns 6`(按成对轮次查看,而非只看用户输入)。
2222
- 额度耗尽(`plan_exhausted`)触发的自动续跑直接复用同一机制,自动接管中断轮次与排队消息,并移除主动定时压缩与预生成交接摘要流程。
2323

2424
---
@@ -60,9 +60,9 @@
6060
| 对照组 | 策略 |
6161
|---|---|
6262
| **Arm 0(裸新会话)** | 直接开新会话,不提供历史回查通道 |
63-
| **Arm 1(纯指令)** | 新会话,仅告知通过 `loochat history`(成对问答)查看历史并继续 |
64-
| **Arm 2(0-Token 锚点,最终采用)** | 新会话 + 本地 0-Token 注入最近 3 轮成对问答锚点与变更文件 + `loochat history --turns 6` |
65-
| **Arm 3(模型预摘要)** | 先用轻量模型阅读源会话生成 30 行 6 节交接摘要 + `loochat history` |
63+
| **Arm 1(纯指令)** | 新会话,仅告知通过 `loopx-context history`(成对问答)查看历史并继续 |
64+
| **Arm 2(0-Token 锚点,最终采用)** | 新会话 + 本地 0-Token 注入最近 3 轮成对问答锚点与变更文件 + `loopx-context history --turns 6` |
65+
| **Arm 3(模型预摘要)** | 先用轻量模型阅读源会话生成 30 行 6 节交接摘要 + `loopx-context history` |
6666

6767
### 3. 汇总结果(4 样本 × 4 组 = 16 次试验)
6868

@@ -72,7 +72,7 @@
7272
| 幻觉 / 编造次数 | 0 | 0 | **0** | 0 |
7373
| 平均端到端耗时 | 338.8s | 452.1s | **326.4s** | 299.8s |
7474
| 主模型总调用轮次 | 73 | 45 | **36** | 42 |
75-
| `loochat history` 调用次数 | 0 | 40 | **38** | 27 |
75+
| `loopx-context history` 调用次数 | 0 | 40 | **38** | 27 |
7676
| 磁盘文件读取次数 | 233 | 50 | **30** | 40 |
7777
| 非缓存输入 Token | 1,210,201 | 503,794 | **396,860** | 423,927 |
7878
| 缓存命中读取 Token | 11,693,281 | 2,937,084 | **1,711,473** | 2,404,864 |
@@ -91,7 +91,7 @@
9191

9292
2. **模型预摘要(Arm 3)出现「摘要失真导致漏检」**
9393
- 在概念辨析样本(样本 3)中,预摘要压缩掉了两个相近概念的边界区分,主模型信任摘要后减少了对原历史核对(`history` 调用从 38 次降到 27 次),导致该样本得分跌至 2/4。
94-
- 相比之下,0-Token 锚点直接引用原话片段并附带 `loochat history --turns 6` 指针,既给出坐标又不伪装成全貌,模型在需要细节时会主动回查原文。
94+
- 相比之下,0-Token 锚点直接引用原话片段并附带 `loopx-context history --turns 6` 指针,既给出坐标又不伪装成全貌,模型在需要细节时会主动回查原文。
9595

9696
3. **成对问答(`--turns`)是必要条件**
9797
- 仅拼接用户历史输入(`--user-inputs`)会产生大量无头指代(「选方案 a」「把上面那段删了」),只能用作定位目录;默认检索指令必须拉取成对的「用户提问 + 助手回答」。
@@ -101,4 +101,4 @@
101101
## 四、两种操作的适用分工
102102

103103
- **分叉(`⑂`)**:从当前或中间某轮精确复制完整上下文,沿着另一条思路探索,或同 Agent 短对话直接沿用原生会话状态;需要隔离改动时从 `⋯ → 分叉` 勾选 `独立 git worktree`。
104-
- **接力继续(`⇄`)**:对话过长、需要切换 Agent / 模型、当前线程仍在运行中想并行开线、或额度耗尽时使用,以 0-Token 进度锚点 + 按需 `loochat history --turns 6` 秒开新会话。
104+
- **接力继续(`⇄`)**:对话过长、需要切换 Agent / 模型、当前线程仍在运行中想并行开线、或额度耗尽时使用,以 0-Token 进度锚点 + 按需 `loopx-context history --turns 6` 秒开新会话。

0 commit comments

Comments
 (0)