Phase 005: vendor ArkScope, land the Arco style baseline, and fix bridge interpreter resolution

- Vendor ArkScope decorative layers (ScrambleTitle / IsometricWave) with provenance notes; decorative-only per AGENTS.md red lines
- Migrate theme tokens to Arco, register the Arco theme, and add hook adapter composables (useMessage / useDialog / useNotification) with matching signatures
- Sample pages: LoginView and AppSidebar on the new baseline; docs/arco-mapping.md and docs/ui-baseline.md land
- agent-bridge: prefer the PM-selected venv from facts.json over legacy in-tree venvs (legacy lacks the mcp extra, so every MCP server showed 0 tools / not connected)
- agent-bridge python (vendored, deliberate deviation): MCP discovery import fallback and pyyaml -> hermes_yaml so plugins and MCP work under the PM env; install the mcp extra via `hermes pm install --extra mcp`
- Chat-chain fragment: docs/chat-chain-changes/2026-10-17-phase005-arkscope-baseline.md

Verified: harness:check, test (2020 passed), test:e2e (30 passed), build all green; manual: plugins 100/0 warnings, MCP 6/6 servers connected with 104 tools.
This commit is contained in:
2026-10-17 09:45:30 +08:00
parent 4701bf0ad0
commit 4baccd5d88
106 changed files with 1493 additions and 221 deletions
@@ -0,0 +1,61 @@
---
date: 2026-10-17
pr: pending
feature: Phase 005 - ArkScope vendor, Arco theme baseline, and bridge environment fixes
impact: No chat-chain behavior change; chat components only swap naive-ui rendering for Arco/theme-token rendering and route hooks through the new composables, while the bridge manager prefers the PM-selected venv so MCP/plugin discovery works again.
---
# Phase 005 — ArkScope vendor + style baseline
Phase: `docs/phases/phase_005.md`
## What Changed
Phase 005 vendors ArkScope decorative layers, migrates the theme to Arco
tokens, and lands two sample pages (LoginView, AppSidebar). Chain-adjacent
files touched:
- `packages/client/src/components/hermes/chat/*.vue` — rendering-layer only:
naive-ui components replaced with Arco equivalents or native markup, and
`useMessage` / `useDialog` / `useNotification` imports moved to the Phase 005
composables (`packages/client/src/composables/useMessage.ts` etc., same
signatures). Chat run flow, store logic, and keyboard handling were not
modified; `MarkdownRenderer.vue` changes are style-token only.
- `packages/client/src/components/hermes/group-chat/*.vue` — same rendering-layer
swap as above.
- `packages/server/src/services/hermes/agent-bridge/manager.ts` — interpreter
resolution now prefers the PM-selected venv recorded in
`<hermesHome>/installs/<key>/facts.json` (sha256 of the resolved agent root)
before the legacy in-tree `.venv`/`venv` trees. The legacy venv lacks the
`mcp` extra, which made every MCP server report `connected: false` with zero
tools. `explicitPython` / `HERMES_AGENT_BRIDGE_PYTHON` still wins first.
- `packages/server/src/services/hermes/agent-bridge/python/bridge_server.py` /
`bridge_runtime.py` — vendored read-only bridge got compatibility fixes:
MCP registry import fallback (`mcp_tool_discovery`), and `_read_mcp_config`
now imports `hermes_yaml` when `pyyaml` is absent (PM env has no `yaml`).
- `packages/server/src/services/hermes/agent-bridge/README.md` — documents the
new interpreter resolution order.
## Contract Check
`/chat-run` event names, field names, field types, and emission timing are
unchanged (no bridge protocol fields were added or altered; only the Python
interpreter the bridge runs under changed). No run dispatch, session, or
usage-recording behavior changed.
Note: `agent-bridge/python/` is marked read-only in AGENTS.md; the two bridge
python fixes above are deliberate deviations to keep the vendored bridge
importable under the PM environment, called out for review.
## Verification
```bash
npm run harness:check
npm run test
npm run test:e2e
npm run build
```
Manual: bridge resolves to the PM venv (`installs/.../venv/bin/python3`),
`mcpList` returns 6/6 servers connected with 104 tools, plugins list returns
100 plugins / 0 warnings.