Repository navigation
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
评审提交 ff6d2c21a750160c6583440641b1b50bc67e6f97,GitHub 目标基线 74ca883d5bd3e4bc64671bac54210eac9e97ed05。本地合并模拟与主干行为对照为 48dbebbd14c5535b9631f4c7a1152d86aa64c5b2。
[P2] Workbench 的同源代理能写入 Chat。 Vite 转发整个 /api/chat,并把 Workbench 的同源 Origin 改成 Chat 来源;开发服务与构建预览都返回 200,随后 GET 与隔离 Chat 文件都读回了刚写入的 Goal 排序。相同来源直接到 Chat 端口会被拒绝。 给 dev 与 preview 使用同一读取路由白名单和 HTTP 方法门,先拒绝 POST 等写入,再决定是否转发。 问题位置
[P2] Chat 故障被显示成没有会话。 助手页将 /api/chat/sessions 的 503 和不兼容 schema 都当成空数组。实际页面无告警,运行会话从 1 变 0,失败会话从 1 变 0,来自 status 的 12 条待办和 1 项需要本人处理的记录仍在。只有 Chat 真返回空列表时才应这样显示。 在助手页携带会话来源的不可用或版本错误状态,显示重试并保留可用的 Goal 与 Todo;仅把成功的空数组显示为没有会话。 问题位置
动机 / Motivation
用户打开 Workbench 的助手页,想知道哪些 LoopX 会话正在执行或需要处理,并在来源故障时知道如何恢复。 主干没有这一 Workbench 入口。上一片只能打开合成工作区,这一片默认从 status 与 Chat 投影生成真实线程和助手页,也保留可选离线样例。 来源健康时展示正确的运行、失败和待办;Chat 来源故障时失去会话事实。两种本地 Vite 入口仍能向 Chat 写偏好。 这里只验收读取、布局和失败恢复。启动执行、升级安装、对真实生产状态的写入及远端接入不在范围内。
改动思路 / Approach
LoopxApi 通过 adapter 读取 status 与 Chat;Todo 由 status 派生,线程来自会话,助手归并两者。页面的写调用由 Api.send 拒绝,Vite HTTP 入口另有自己的权限边界。 在会话读取失败时,归并器收到人为造出的空列表。 持久化和会话状态仍由原 LoopX 读写接口持有。客户端可映射已有 DTO 和错误类型;不能用浏览器写拒绝替代代理授权,也不需再造一个状态提供方。 保留真实来源与离线样例;在代理收窄方法和路径,在读适配器保留错误与来源,验证拒写、视图可用、断线和恢复。
独立验证
干净安装与构建通过,227 项测试通过。投影 smoke 在合成离线与隔离 HTTP 服务上通过 17 项,源状态单一检查通过。保持 status 不变,恢复 Chat 后,运行和失败会话重新可见。
具体改动 / Changes
对 GitHub 基线是 115 文件、约 44k 新行;相对合成页 43 文件,约 4k 增、304 删。本片集中在 HTTP 契约、映射、UI 接线和隔离验证。 以 docs/development/frontend-delivery.md 和不可变版本 48dbebbd14c5535b9631f4c7a1152d86aa64c5b2 为准。设计 PR #8778 说明产品方向。当前验收依据是主干已接纳的前端交付规范,分别查看原型边界、实际读取、不可用及重试、来源的写入权限。 规范
- Task-first delivery · not_met。助手页将 /api/chat/sessions 的 503 和不兼容 schema 都当成空数组。实际页面无告警,运行会话从 1 变 0,失败会话从 1 变 0,来自 status 的 12 条待办和 1 项需要本人处理的记录仍在。只有 Chat 真返回空列表时才应这样显示。
- By default all mutation endpoints are denied · not_met。Vite 转发整个 /api/chat,并把 Workbench 的同源 Origin 改成 Chat 来源;开发服务与构建预览都返回 200,随后 GET 与隔离 Chat 文件都读回了刚写入的 Goal 排序。相同来源直接到 Chat 端口会被拒绝。
- Unavailable sources fail visibly · not_met。助手页将 /api/chat/sessions 的 503 和不兼容 schema 都当成空数组。实际页面无告警,运行会话从 1 变 0,失败会话从 1 变 0,来自 status 的 12 条待办和 1 项需要本人处理的记录仍在。只有 Chat 真返回空列表时才应这样显示。
关键代码讲解
chatProxy.configure。把已匹配 Workbench 来源的请求改成 Chat 来源。 仅检查 Host 和 Origin,方法原样转发。 Vite 转发整个 /api/chat,并把 Workbench 的同源 Origin 改成 Chat 来源;开发服务与构建预览都返回 200,随后 GET 与隔离 Chat 文件都读回了刚写入的 Goal 排序。相同来源直接到 Chat 端口会被拒绝。 精确代码preview。服务生产构建产物。 没有独立停用或收窄代理。 两个入口都能写入隔离 Chat 偏好。 精确代码LoopxApi.send。拒绝经 UI API 发起的写。 非投影操作拒绝,不把网络错误伪装成授权。 写门只管应用调用,不能管 Vite 代理。 精确代码LoopXApiAdapter.triage。汇集 status 与会话数据形成助手页。 catch 把所有会话读取问题变成成功空数组。 助手页将 /api/chat/sessions 的 503 和不兼容 schema 都当成空数组。实际页面无告警,运行会话从 1 变 0,失败会话从 1 变 0,来自 status 的 12 条待办和 1 项需要本人处理的记录仍在。只有 Chat 真返回空列表时才应这样显示。 精确代码TriagePanel。把经归并后的三组数量与条目显示出来。 没有来源失败这一态。 用户看不到会话来源部分失效。 精确代码
对主干的风险 / Risks
PASS · 全量 115 个路径仅在独立 Workbench 目录。补丁空白、3 个提交的签署及当前主干本地合并模拟通过。
FAIL · 启动本机 Workbench dev 或 preview 后,从 Workbench 自身来源向 Chat 偏好接口发出 POST。 Vite 转发整个 /api/chat,并把 Workbench 的同源 Origin 改成 Chat 来源;开发服务与构建预览都返回 200,随后 GET 与隔离 Chat 文件都读回了刚写入的 Goal 排序。相同来源直接到 Chat 端口会被拒绝。 分别在 HTTP 入口和会话读取归并处做两个局部修复,保留现有投影来源、视图和版本判定。
FAIL · 保持 status 正常,将 /api/chat/sessions 从两条有效会话切换到 HTTP 503 或不支持的 schema,然后打开助手页。 在相同 status 上依次提供两条会话、503、不支持的 schema、成功空列表和恢复后的两条会话;助手页应区分失败与空列表,并在重试后恢复运行和失败记录。
UNVERIFIED · 浏览器和适配器用隔离的状态与会话 HTTP 响应做故障注入;写入测试另用真实 Chat 处理器和独立运行目录。实际部署、长时间断线、远端服务及托管 CI 未验证。
语义与 CI 对齐
用既有 HTTP 方法、路径和 typed errors:代理默认拒绝改变来源;只有成功读取的空会话列表表示没有会话。 用独立空 Chat 运行目录,分别启动 dev 与 preview;向 /api/chat/sidebar-goal-order 送同源 POST 后重新 GET。修复后应为 405 或 403,旧排序与运行目录均不变;保留对允许读取的正例。 托管 CI 未读取。
我的整体评价 / Verdict
请求修改。先在两个本地入口封住写入,再让助手页明确告知会话数据中断或不兼容。修复后按上面两条负例重跑。 独立读视图不改变 Agent 的运行、调度、结算与长期任务推进;这次没有测量生产效果。
桌面助手能在首屏分辨三组及对应计数;窄屏把三组纵排。Chat 断开时运行组直接显示空,失败会话从出错组消失,没有来源级提示。 未打开折叠的静置组、所有任务详情或长期重连;窄屏断线恢复与正式安装未验证。
English verdict: REQUEST_CHANGES at ff6d2c2. Enforce read-only behavior at both Vite boundaries and report Chat source failures separately from an empty session list.
| proxy: { | ||
| '/status.json': statusProxy, | ||
| '/ssh-hosts': chatProxy, | ||
| '/api/chat': chatProxy, |
There was a problem hiding this comment.
[P2] Workbench 的同源代理能写入 Chat。 Vite 转发整个 /api/chat,并把 Workbench 的同源 Origin 改成 Chat 来源;开发服务与构建预览都返回 200,随后 GET 与隔离 Chat 文件都读回了刚写入的 Goal 排序。相同来源直接到 Chat 端口会被拒绝。 给 dev 与 preview 使用同一读取路由白名单和 HTTP 方法门,先拒绝 POST 等写入,再决定是否转发。
| async triage(): Promise<TriageView> { | ||
| const [status, sessions] = await Promise.all([ | ||
| this.fetchStatus(), | ||
| this.fetchSessions().catch(() => [] as ChatSessionSummary[]), |
There was a problem hiding this comment.
[P2] Chat 故障被显示成没有会话。 助手页将 /api/chat/sessions 的 503 和不兼容 schema 都当成空数组。实际页面无告警,运行会话从 1 变 0,失败会话从 1 变 0,来自 status 的 12 条待办和 1 项需要本人处理的记录仍在。只有 Chat 真返回空列表时才应这样显示。 在助手页携带会话来源的不可用或版本错误状态,显示重试并保留可用的 Goal 与 Todo;仅把成功的空数组显示为没有会话。
ff6d2c2 to
be330cc
Compare
|
Thanks — confirmed and fixed in The dev/preview proxy forwarded every method on Fix:
Evidence, identical on the dev port and the preview port: All three branches in the stack were rebuilt so the same |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
评审提交 be330cc,GitHub 当前列示的目标分支提交 eaff94c。
[P2] 让只读守卫覆盖 Vite 实际会转发的请求。 旧普通写现被挡住。开发和预览仍各有清单外的合成请求进入隔离上游;守卫与实际代理在入口范围上不相同,不能保证「只转发列明的 GET/HEAD」。 把明确路径和方法约束放在实际转发选择上。仅允许列明的路径及单个会话详情 ID,其余代理候选在本地拒绝。 位置。
[P2] 让助手页区分 Chat 来源不可用与没有会话。 桌面与窄屏在 503 时把运行会话从 1 变成 0,并移除原先失败的会话;1 条需用户处理和 4 条失败待办仍在。HTTP 对照确认错误版本也与真空列表完全相同,页面没有会话来源告警或重试。 沿现有错误类型保留会话来源的独立可用状态,在助手页写明暂不可用并提供重试,同时保留可用的 Goal、Todo。只有成功返回空列表才显示 0。 位置。
动机 / Motivation
主干无此 Workbench。前次提交已能读取状态和会话;评审发现代理仍转发写请求,Chat 读取失败也被助手页归为没有会话。 从助手页看正在运行和失败会话、同时保留可用待办的维护者;独立启动开发或预览入口的贡献者。 独立 Workbench 接入 LoopX 的只读投影并提供助手页;允许的代理请求和不同来源的真实状态都应可辨认。 状态服务健康。用真实代理送入支持的读取和未列明的请求,再令隔离 Chat 来源分别返回正常、503、错误版本和成功的空列表。 旧普通写已本地拒绝。代理守卫仍与实际 Vite 的候选范围不一致;Chat 的 503、不兼容版本和真空列表仍折成同一页。 上游是隔离合成状态和 Chat 数据,构建预览不是已安装应用;上游的测试应答不证明发生生产写入。未查远端 CI。
改动思路 / Approach
老 Dashboard 和 Chat 已有同一事实来源;独立的新页分别消费状态与会话。真实转发入口掌握路由,适配器应保留每个来源的结果。 保留现有状态/Chat 所有权与独立页面。代理只需一个实际转发选择器,适配器复用已有的来源错误类型并仅在成功读到空数组时报告为空。 独立 Workbench 只读连接及助手页;不改变后台写权限或真实性。
对照 既有规范 的使用者结果和边界。当前主干和 PR 目标间没有改动该 Workbench 或交付/设计规则;对主干的合并树验证成功。#8778 仍是设计提案。
- SOURCE-SCOPE:沿现有投影提供独立、有边界的读取路径。 未通过。
- ERROR-READBACK:可见状态必须准确区分无结果、不可用和后续恢复。 未通过。
具体改动 / Changes
新独立应用含三段堆叠内容:包、代理、移植的布局与资源、适配器、合成夹具、助手面板和测试。生产改动全在独立目录。
- 独立 Vite 入口: 显式启用 dev/preview 及已有服务转发。
- proxyRejection: 普通写被拒绝;仍依赖与转发不同的匹配。
- triage: 并行读状态与会话;当前将会话读取失败转为空。
- TriagePanel: 首屏显示三个来源混合的结果和计数。
上一次评审;修后说明。上一精确配置转发普通写,正常读成功;前次浏览器已复现 Chat 故障同空列表。新头的 adapter 与 TriagePanel 内容保持不变。 旧普通写已本地拒绝。代理守卫仍与实际 Vite 的候选范围不一致;Chat 的 503、不兼容版本和真空列表仍折成同一页。
对主干的风险 / Risks
- PASS — TypeScript 和 Vite 构建、232 项本地测试、17 项隔离投影检查和 no-second-state 检查通过。 开发与预览都保留正常读取并拒绝前次普通写;固定状态投影下,正常会话在助手页出现。
- FAIL — 在真实 dev 和 preview 用同一隔离上游对照合法读、未列明的相近路由和非读取方法;所有未列明候选均不能到达上游。 同一健康的状态投影下复验 Chat 正常、503、版本错误、真空列表及恢复;后两类错误必须和真空列表有不同的页面/读回结果。
- UNVERIFIED — 上游是隔离合成状态和 Chat 数据,构建预览不是已安装应用;上游的测试应答不证明发生生产写入。未查远端 CI。
我的整体评价 / Verdict
REQUEST_CHANGES。把明确路径和方法约束放在实际转发选择上。仅允许列明的路径及单个会话详情 ID,其余代理候选在本地拒绝。 沿现有错误类型保留会话来源的独立可用状态,在助手页写明暂不可用并提供重试,同时保留可用的 Goal、Todo。只有成功返回空列表才显示 0。 已构建的桌面与窄屏首屏均重现误导:503 时运行和失败会话消失,运行区仍显示「这里暂时没有」。 只验助手页三组已展示的结果及部分来源故障;所用数据没有折叠的等待详情。未验证已安装、原生移动或真实外部连接。
English verdict: REQUEST_CHANGES at be330cc. The prior ordinary writes are blocked, but both Vite entrypoints still forward requests outside the declared read set. The Desk also renders a Chat 503 or incompatible schema as an empty session list.
| const unsafeMethod = !SAFE_METHODS.has((method ?? 'GET').toUpperCase()); | ||
| // A path that climbs or hides a separator is refused when it sits under a proxied prefix. | ||
| if (path === null) return proxied(new URL(raw, 'http://local').pathname) ? (unsafeMethod ? 405 : 404) : null; | ||
| if (!proxied(path)) return null; |
There was a problem hiding this comment.
[P2] 让只读守卫覆盖 Vite 实际会转发的请求。 旧普通写现被挡住。开发和预览仍各有清单外的合成请求进入隔离上游;守卫与实际代理在入口范围上不相同,不能保证「只转发列明的 GET/HEAD」。 把明确路径和方法约束放在实际转发选择上。仅允许列明的路径及单个会话详情 ID,其余代理候选在本地拒绝。
| async triage(): Promise<TriageView> { | ||
| const [status, sessions] = await Promise.all([ | ||
| this.fetchStatus(), | ||
| this.fetchSessions().catch(() => [] as ChatSessionSummary[]), |
There was a problem hiding this comment.
[P2] 让助手页区分 Chat 来源不可用与没有会话。 桌面与窄屏在 503 时把运行会话从 1 变成 0,并移除原先失败的会话;1 条需用户处理和 4 条失败待办仍在。HTTP 对照确认错误版本也与真空列表完全相同,页面没有会话来源告警或重试。 沿现有错误类型保留会话来源的独立可用状态,在助手页写明暂不可用并提供重试,同时保留可用的 Goal、Todo。只有成功返回空列表才显示 0。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: maxliux5 <lualiudd@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: maxliux5 <lualiudd@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: maxliux5 <lualiudd@gmail.com>
be330cc to
f3a2788
Compare
|
Agreed — the guard middleware and the Vite proxy made separate routing decisions, so a path outside the guard's list could still be forwarded. Fixed by collapsing them into one boundary (
Fake-upstream test results ( Curl evidence, identical on the dev port and the preview port: All three branches are rebuilt on the latest |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
评审 f3a2788bbb9908e148880d6f46b3f813242c7019。实际差异基点 1965965992fffa1a1cca1a18cb297860155bc133,与当前主干 f7e3f427197bab6c66ab535e26613a7f9c2fdbe0 的本地合并模拟通过。
动机 / Motivation
用户把 Workbench 助手页留在前台,想确认当前有哪些会话在跑、哪些出错,以及连接中断时如何恢复。 主干没有这个独立 Workbench。已有状态与 Chat 各有原生投影,前一层 Workbench 只展示内置演示数据。 当前层改用 LoopX 原生读取投影、保持只读,并在状态与会话可用时把待处理、运行和失败集中展示。
先在打包预览打开健康的助手页,再只让 Chat 会话列表故障,让状态服务保持 200;比较已打开页面、故障时直接打开、真实空列表和恢复。 打开页面后 Chat 返回 503,运行从 1 变成 0,失败从 5 变成 4,页面没有故障提示或重试。状态服务仍是 200,需用户处理的 1 项仍在。 故障时直接打开则出现通用服务提示和重试,成功空列表没有这条提示。 本轮使用精确 Vite production preview 和两个隔离合成状态/Chat 上游,dev 与 preview 均做了路径反例。真实已安装产品与长期数据未经此轮验证。
改动思路 / Approach
保留现有 LoopX 投影读取与只读转发。给类型化会话读取和轮询结果增加来源状态,沿用助手页已有重试,不另建任务或会话状态表。 本轮使用精确 Vite production preview 和两个隔离合成状态/Chat 上游,dev 与 preview 均做了路径反例。真实已安装产品与长期数据未经此轮验证。
Vite 的 dev 与 preview 共用一个 HTTP 方法和路径决定。Workbench 使用同源读取协议输出,只保存显示偏好。 两种 Vite 入口各 31 个请求全部符合预期,列明的 GET/HEAD 每次只到对应上游一次,17 个拒绝场景各零转发。源端仅接收允许头,未接收 Origin 或 Cookie。 验收边界 此前评审
| 助手页的输入 | 在跑 | 出错 | 会话来源提示 |
|---|---|---|---|
| 状态和会话健康 | 1 | 5 | 无 |
| 页面已打开,Chat 返回 503 | 0 | 4 | 无,且无重试 |
| Chat 失败时新开页面 | 0 | 4 | 通用服务错误和重试 |
| Chat 真正返回空列表 | 0 | 4 | 无 |
具体改动 / Changes
目标基线相差 117 个文件、44,172 行新增,均在独立 Workbench 目录,包含未合的脚手架和 shell。相对直接父提交,本片 46 文件、+4,214/-309,含代理、适配与映射、客户端界面、可执行测试、锁和文档。
关键代码讲解
- 同一中间件选择并转发已列资源。 两种入口的允许和拒绝均匹配 createReadOnlyForwarder
- 将 Chat 获取失败转换为空数组后计算卡片。 用户看到零运行和减少的失败 LoopXApiAdapter.triage
- 轮询 status 和会话,对成功快照比较摘要。 已有页面的故障缺少恢复提示 streamGlobal
- 在 Desk 呈现三组计数并提供会话详情入口。 需要你、在跑、出错按现有数组显示 TriagePanel
- 同时更新 Todo 和助手分组,复用页面当前重试和局部状态。 健康状态源仍可用 reloadTodos
以现行的产品与仓库约束核对候选。 适用规范
- WB-只读转发。列明资源可读,写方法、未列路径和编码越界不进入源端。 两种 Vite 入口各 31 个请求全部符合预期,列明的 GET/HEAD 每次只到对应上游一次,17 个拒绝场景各零转发。源端仅接收允许头,未接收 Origin 或 Cookie。
- WB-源故障可辨。已打开的助手页保留会话来源失败和可执行恢复,维持健康状态源的工作。 打开页面后 Chat 返回 503,运行从 1 变成 0,失败从 5 变成 4,页面没有故障提示或重试。状态服务仍是 200,需用户处理的 1 项仍在。
- WB-实际下钻与离线。只读详情可下钻,离线模式使 API 请求为零。 故障时新开的助手页恢复上游后可点重试,重新读到 1 个运行会话和 5 项失败。运行会话可打开真实预览详情,输入区显示只读。 预览离线页无服务请求。
对主干的风险 / Risks
[P2] 已打开的助手页把 Chat 故障显示成零会话。 打开页面后 Chat 返回 503,运行从 1 变成 0,失败从 5 变成 4,页面没有故障提示或重试。状态服务仍是 200,需用户处理的 1 项仍在。 会话离线被解释成已经没有在跑的工作,操作者会忽略失联会话和原失败,且没有入口恢复这次只读刷新。 使轮询传递独立的 Chat 可用性和最后成功观察。只有成功的空列表显示为零;故障时保留可用状态卡,给会话区显示暂不可用和重试。 代码位置
精确构建通过,233 项 npm 测试、状态所有权扫描和 62 次真实 Vite 转发检查通过。本地 quick premerge 自动检查通过,人工门槛仍保留。 npm audit 仍报告开发工具链的两项警告,本轮未评价其实际可利用性。
我的整体评价 / Verdict
REQUEST_CHANGES。 转发边界已收敛,现有 dashboard/Chat 仍是状态 owner。 两层脚手架与界面仍在独立 PR 栈。修复后的故障呈现需要在精确预览读回,安装及长时原生使用需另行核对。 桌面三列与 390px 纵向三组均先显示需要本人处理、运行与错误。展开运行会话保留可阅正文和只读输入区。已开页面的 Chat 故障没有来源提示,运行卡写着“这里暂时没有”,左侧仍保留原会话和运行标识。 触屏、两语完整交互和已安装原生 App 尚未覆盖。
English verdict: REQUEST_CHANGES at f3a2788. Dev and preview now forward only the enumerated read routes. After the mounted Desk sees Chat 503 with status still healthy, the running count drops to zero and a previous failure disappears without a warning. Preserve source availability and retry in the live view.
| async triage(): Promise<TriageView> { | ||
| const [status, sessions] = await Promise.all([ | ||
| this.fetchStatus(), | ||
| this.fetchSessions().catch(() => [] as ChatSessionSummary[]), |
There was a problem hiding this comment.
[P2] 已打开的助手页把 Chat 故障显示成零会话。 打开页面后 Chat 返回 503,运行从 1 变成 0,失败从 5 变成 4,页面没有故障提示或重试。状态服务仍是 200,需用户处理的 1 项仍在。 使轮询传递独立的 Chat 可用性和最后成功观察。只有成功的空列表显示为零;故障时保留可用状态卡,给会话区显示暂不可用和重试。
Summary
Points the workbench at LoopX. A new
LoopxApiimplements the UI's existingApiinterface over LoopX's public projections and replaces the demoworkspace as the data source.
LoopxApioverrides the same transport methodsthe demo API did, answers reads from
/status.jsonand the Chat service, andrejects every write, so existing components keep working unchanged. The one
UI addition is a compact, read-only triage panel on the Desk page that shows
what needs the user, what is running and what failed.
?fixture=1renders the same page from fixtures bundled with the app(
src/loopx/fixtures/), with no service running and no network request. Itreplaces B's demo workspace, so offline review still shows all three panes and
all three triage groups populated.
Stack: A scaffold → B shell → C projections (this PR). Related design
notes: #8778 (open; not a prerequisite).
Change boundary
apps/presentation/calli-workbench/. No change toloopx/,packages/, other apps, root configuration, CI or scripts.LoopxApicalls exactly these routes and nothing else:/status.json,/api/chat/sessions,/api/chat/sessions/<id>,/api/chat/endpoints,/api/chat/capabilities,/api/chat/goals/contexts,/ssh-hosts. It does not use the Todo, action or request-control writeroutes.
and B have none). One middleware in
viteandvite previewenumerates theroutes above and forwards them itself: a path it does not enumerate gets a
local 404, any method but GET/HEAD gets a local 405, and the upstream only
ever receives enumerated GET/HEAD requests. Route matching and the method
check happen in that one place.
session fact. Browser storage holds display preferences only, enforced by
npm run check:no-second-state.the dashboard's
src/data/status.tsand the Chat service'sschema_versionliterals; each copied schema names its source and syncowner. A
status_contract.schema_versionbelow 2 shows "Update the localLoopX service" instead of a guessed page.
Files:
src/loopx/LoopxApi.tsextends Api; overridessend,stream,uploadVideo,threadFile,attachmentsrc/loopx/status-schema.ts,src/loopx/chat-schema.tssrc/loopx/mapping.tssrc/loopx/placeholders.tssrc/loopx/fixtures/status.demo.jsonexamples/status.example.jsonwith one added synthetic item waiting on the user; its_provenancefield records thissrc/loopx/fixtures/chat.example.jsonsrc/components/TriagePanel.tsxtriage()as four groups (Needs you, Running, Failed, Waiting; Waiting is folded by default and not counted in any badge)smoke/projection-smoke.ts,smoke/no-second-state-check.mjsreadonly-forward.tsnode:httpand answers everything else locally (404 / 405)vite.config.ts,tsconfig.jsonserver.proxy/preview.proxytest/loopx-*.test.tstest/readonly-forward.test.tssrc/App.tsxLoopxApisrc/api.tsreadOnly; read-only UI branches use it instead of the demo flagsrc/demo/*,test/demo.test.ts?fixture=1replaces the demo workspace for offline reviewpackage.json,package-lock.json,README.mdzodand the smoke scripts; documents data source and fixture modeData mapping
health()/status.json→status_contractthreads()/api/chat/sessionssections()run_history.goalsthread(),events(),historyPage()/api/chat/sessions/<id>stream()agents(),models()/api/chat/endpoints,/api/chat/capabilitieshosts()/ssh-hosts(ssh_host_catalog_v0)todos()todo_index.items+attention_queue.itemsuser→ owner is the user; owner-waiting attention (waiting_on∈ {user,user_or_controller,operator}) → needs answer;blocked→ blocked; anexecutingagent's current Todo → working; any other status word → idle (never inferred)ReadOnlyError; the UI shows the read-only messageKnown limits
this PR; the page refreshes by polling at the dashboard's cadence. A running
turn appears on the next poll, not token by token.
mode, queued messages, approval prompts, pinned and unread flags, archive state,
user-defined sidebar sections, login state, machine reachability) are registered in
src/loopx/placeholders.tsand rendered as omitted or as a fixed read-onlychip. None is filled with an invented value. (Grouping sessions by Goal is
real projection data, not a placeholder.)
/ssh-hostsappear in theswitcher, disabled and marked as not probed; they are neither probed nor
connected. Connecting to them belongs to a later change.
timestamp, the UI omits its relative time instead of computing one from an
empty value (which previously rendered as an age of about 20,000 days).
are disabled; they need control-plane write routes and come in a later PR.
Deviations
docs/development/design.mddiff -ragainst Callipackages/web@87adcde. A and C are small.NOTICEpackage.jsondeclaresApache-2.0;NOTICEcarries the attribution and the relicensing statement.D-1 and D-2 carry over from B unchanged, D-4 is resolved; D-3 does not apply (this diff is concentrated in
src/loopx/). This PR adds no new deviation.License
Apache-2.0. Ported from Calli
packages/web, relicensed under the Apache License, Version 2.0 with contributor consent (seeNOTICE).NOTICEreads: "Portions derived from Calli(https://github.com/maxliux5/calli). Copyright Calli contributors. Relicensed
under the Apache License, Version 2.0 with contributor consent."
How to review offline
?fixture=1reads only the fixtures bundled insrc/loopx/fixtures/and makesno network request:
status.demo.json: a copy of LoopX's publicexamples/status.example.jsonwith one added synthetic item waiting on the user (marked in its
_provenancefield). The repository'sexamples/file is not modified orread.
chat.example.json: synthetic sessions, endpoints and machine aliases.With no service running, the page shows Goals and their sessions on the left, a
session or Goal in the middle, and the triage groups, rendered by the triage
panel on the Desk page:
Without
?fixture=1and without local LoopX services, the page shows its"cannot read the LoopX status service" state with a retry control.
Validation
Forwarding boundary, from
npm test(test/readonly-forward.test.ts, runagainst loopback fake upstreams that count every request they receive):
Curl evidence, identical on the dev port (5174) and the preview port (4174):
skipped otherwise; they print counts only, nothing from the service.
independently of the mapping code, and covers contract-version rejection, an
owner-waiting item, a stopped Goal's attention row, an executing agent, and an
unknown status word that must stay out of every group.
src/loopx/,src/contains nofetch(call.render, and the browser console has no errors. No screenshot was taken
against live services.
e-mail addresses.
Visual evidence
Fixture mode only (
?fixture=1: the app-localstatus.demo.jsonandchat.example.json). Captured atff6d2c21a; the tested revisionf3a2788bbadds only the read-only forwarder on top, no UI change.Desk with the triage panel (header count "1 needs you" equals the Needs you group):
Session view (the composer reads "read-only"):
Rollback
Revert this PR. The workbench returns to the demo workspace from B; nothing
outside
apps/presentation/calli-workbench/is affected and no LoopX state wasever written.