Commit Graph
20 Commits
Author SHA1 Message Date
Agent Board 26ff1a9c9a Harden auth/vault path sanitization and clean WeKnora docs 2026-07-28 17:04:27 +08:00
Agent Board 262e66b02e feat: purge legacy agent hosts and land vault Chrome extension path
Retire ACP/Hermes/OpenCode surfaces and rename hermes_tools to
mnote_agent_tools so Page AI stays on Pi Lab only. Add Chrome vault
extension + extension token route, pre-release purge design, and soft-retire
legacy smokes for the small-group production cut.
2026-07-25 14:25:37 +08:00
Agent Board c8472bb898 feat: add pi lab ai management integration 2026-07-04 21:47:42 +08:00
lix-2026 cbe789e034 fix local markdown attachment regressions 2026-05-29 11:13:05 +08:00
lix-2026 39b9a0183a feat: consolidate local-first mnote web runtime 2026-05-28 22:01:44 +08:00
lix-2026 a2cb1338c8 chore: 保存当前架构收口与 bug 修复快照
归档本轮 P0/P1 bug 修复、设计审查迁移、AI selection scope 收口与 stream contract 调整,并保留当前 05 主线迁移起点。
2026-05-18 17:01:35 +08:00
lix-2026 bb2f190f50 feat: stabilize page AI ACP runtimes
实现并稳定页面 AI 的 ACP Hermes / ACP Reasonix 运行路径。

主要内容:

- 分离 profile 与 acpRuntime,ACP Hermes 按所选 Hermes profile 启动并注入 provider key。

- 修复 Reasonix ACP wrapper 的 API key 读取、ToolRegistry 注册、LoopEvent role 映射和 reasoning/final 分流。

- 修复 ACP agent_thought_chunk 被 untagged enum 误解析为 message.delta 的问题,补充 thought 相关单测。

- 补充页面 AI 浏览器验证 skill 证据到 7-15 设计稿,并记录严格验收标准。

- 同步提交当前仓库中已存在的 rust-web / Hermes tools / SSE / bug 文档相关改动。

验证:

- node --check scripts/reasonix-acp-wrapper.mjs

- cargo test -p mnote-web acp -- --nocapture

- 页面 AI ACP 浏览器验证:tmp/page-ai-acp-browser-UAYwyM/
2026-05-17 20:11:39 +08:00
lix-2026 9d8e361e43 feat(mnote-web): replace SSE pollMs=1000 polling with WebSocket push for tree realtime events
## Problem
Convex backend RSS grew to 7.7G due to ~17 HTTP POST /api/query/min
(32K+ in 32h) from the SSE polling loop in /api/tree/events?pollMs=1000.
Each poll triggered a Convex query even when nothing changed.

## Root Cause
The tree live EventSource client polled every 1s via SSE, calling
load_stream_overview() → execute_runtime_query_via_convex() → Convex
POST /api/query on every cycle, regardless of workspace state.

## Solution
Replace polling with push: add a `stream_delta_tx` broadcast channel
that publishes after every Convex mutation, consumed by WebSocket and
SSE endpoints for push-only delivery.

### Server-side
- **app.rs**: Add `stream_delta_tx: broadcast::Sender<Value>` to AppState
- **command_support.rs**: `execute_runtime_command_via_convex_with_artifacts`
  now takes `&AppState` (was `&AppConfig`) and pushes `{"kind":"command_committed",...}`
  to `stream_delta_tx` after every successful mutation
- **ws.rs**: Rewrite `handle_socket` with `tokio::select!` subscribing to
  `stream_delta_tx`; pushes delta events to WS clients on mutation, handles
  client `resync` requests for fresh snapshots
- **sse.rs**: `tree_events` endpoint now subscribes to both `block_delta_tx`
  and `stream_delta_tx`; when broadcast channels are available, runs in
  push-only mode (250ms heartbeat, no Convex query). Polling degrades to
  60s safety net. Keeps backward compatibility for non-WS clients.

### Client-side
- **layout.rs**: Bootstrap JSON now defaults to `transport: "convex-command-log-ws"`
  with `wsEndpoint: "/api/realtime/ws"`. TREE_LIVE_CONTROLLER_JS extended
  with `startWithWebSocket()` supporting snapshot/delta/resync/lagged-hint
  events; auto-fallback to SSE on WS failure after 2s.

### Caller updates (17 call sites)
- documents.rs, mindmap_api.rs, resource_trash.rs, tree.rs
- hermes_tools/{artifact,block,page}.rs
All updated from `state.config()` to `&state` for the new signature.

## Verification
- `cargo build` + `cargo test`: 295/298 passed (3 pre-existing failures)
- Browser smoke: page loaded → transport=convex-command-log-ws, status=connected
- Convex logs: 0 POST /api/query in 2min with page idle (vs ~17/min before)
- Initial burst: 8 queries on page load (normal), then silence
2026-05-17 12:58:27 +08:00
lix-2026 f292c6710a feat: EditorRuntimeActor - 三层缓存/delta/事件架构
Phase A — EditorRuntimeActor 内存缓存层
- 新增 editor_actor.rs: EditorBlockDocument 内存态 + apply_command + load_or_init
- block.rs 四个写工具(replace/insert/delete/move)接入 actor 路径
- editor_actor feature flag(MNOTE_WEB_ENABLE_EDITOR_ACTOR=true 默认开启)
- bridge-runtime 三个核心函数公开化
- rust-toolchain: 1.89 → stable(修复 spike WASM 编译阻塞)

Phase B — 编辑器增量 delta channel
- BlockDelta/DeltaOperation 类型 + actor.build_block_delta()
- leptos-tiptap spike: mnote:editor:block-delta CustomEvent 监听 + JSON patch
- DocumentAiAgentPanel: 拦截 blockDelta → window dispatchEvent
- 工具响应含 blockDelta 字段供前端消费

Phase C — 事件 stream delta
- broadcast channel 在 AppState/actor/SSE 三层贯通
- tree_events SSE 端点发 block.delta 事件
- 旧客户端降级兼容

环境修复
- rustc recursion_limit = 1024(修复 Leptos SSR 类型深度溢出)
- run-convex-deploy.js(封装 Convex function 部署到本地后端 3210)

ref: design/07-ai/process/7-13-page-block-editor-runtime-actor-v1.md
2026-05-16 22:03:30 +08:00
lix-2026 b4a452a8b7 20260513 mindmap优化01 2026-05-13 22:43:16 +08:00
lix-2026 17c003976b feat: 收口 Rust Web 3000 主链 2026-05-11 13:16:34 +08:00
lix-2026 8c895b3dc0 收敛树命令与投影切换 2026-04-30 06:58:17 +08:00
lix-2026 3cc090ba5e Implement Rust web sidebar title and tree interactions 2026-04-30 05:46:36 +08:00
lix-2026 048fe28a4d feat: cut over rust web main shell 2026-04-29 12:24:44 +08:00
lix-2026 7965c6c107 feat(tree): close rust family shell cutover 2026-04-28 16:30:51 +08:00
lix-2026 e564dfde02 feat: continue tree rust family cutover
- add rust renderer/state-family scaffolds and inline compat host thinning for page tree, file tree, and picker
- route tree/filetree preflight, file projection, resource artifact, and stream delta contracts through rust plans
- preserve canonical move-order validation, file-tree search projection, and related frontend/runtime regression coverage
2026-04-26 19:35:52 +08:00
lix-2026 338bb2e20f 4-26 树rust-2 2026-04-26 04:29:23 +08:00
lix-2026 41e958769e feat: land page aggregate and phase7 document ai mainline
- 收口 page aggregate 读取、本地状态与命令客户端\n- 接入 phase7 document ai sidecar 与前端编排入口\n- 更新 architecture 与 design 状态迁移
2026-04-23 07:38:34 +08:00
lix-2026 d3876e56eb feat: 收口 tree-first graph 主链与前端测试修复 2026-04-18 05:43:49 +08:00
lix-2026 b1d5d97142 feat(kernel): complete tree-first graph tasks 074-080 2026-04-16 22:01:51 +08:00