Skip to content

👑 QUEEN TRINITY — Meta-Orchestrator: Chrome Extension MCP Bridge → Claude Code Agents #106

Closed

Description

@gHashTag

👑 QUEEN TRINITY — Центральный Мозг

Я координирую. Агенты исполняют.
Chrome Extension = мои глаза и рот. Claude Code агенты = мои руки.

Mirror: gHashTag/trinity#528
Status: ACTIVE — лечимся и строим мост


🏗 Архитектура моста

[БРАУЗЕР]
  trios-ext sidebar (Dioxus/Wasm) ← #108 ✅
       │  Chrome Side Panel
       │  WebSocket ws://localhost:3333
       ▼
[MCP СЕРВЕР — trios-server]
  trios-bus (EventBus) ← #107 ✅
       │  Envelope<T> протокол
       │  publish/subscribe
       ▼
[АГЕНТЫ — Claude Code]
  ALPHA  BETA  GAMMA  DELTA  ZETA
  (каждый = отдельный claude process)
       │
       ▼
[ОПЫТ]
  .trinity/experience/*.trinity
  ← агрегирует Королева

🎯 Главная задача сейчас

Связать Chrome Extension → MCP Server → Claude Code агентов в живую систему.

Шаг 1 — trios-server (MCP endpoint)

// crates/trios-server/src/main.rs
#[tokio::main]
async fn main() {
    let bus = TriosBus::new();
    let mcp = McpServer::new(bus.clone());
    
    // WebSocket на 3333 для Extension
    mcp.serve("0.0.0.0:3333").await;
}

Методы:

  • agents/list → список активных Claude процессов
  • agents/chat → отправить сообщение агенту
  • tasks/assign → назначить задачу
  • experience/read → прочитать .trinity/experience/

Шаг 2 — Claude Code Bridge

// crates/trios-claude/src/lib.rs
pub struct ClaudeBridge {
    processes: HashMap<AgentId, ChildProcess>,
}

impl ClaudeBridge {
    pub async fn spawn_agent(&mut self, name: &str) -> AgentId;
    pub async fn send_task(&self, id: AgentId, task: &str) -> Result<String>;
    pub async fn get_status(&self, id: AgentId) -> AgentStatus;
}

Запуск агента:

claude --model claude-opus-4-5 --print "task" 2>&1

Шаг 3 — Extension видит агентов

После #108 + trios-server:

  • Sidebar показывает [ALPHA: working] [BETA: idle]
  • Клик на агента → чат прямо в браузере
  • Назначить задачу → агент получает в процессе

💊 Лечение Королевы (самодиагностика)

Проблемы которые нужно починить:

Симптом Причина Лечение
Агенты не видят друг друга Нет shared EventBus #107 ✅ DONE
Нет UI для координации Нет Extension #108 ✅ DONE
Нет MCP сервера trios-server не создан → #113 (новая задача)
Нет bridge к claude процессам trios-claude не создан → #114 (новая задача)
Агенты не синхронизируют опыт experience bus не активен → #111

📋 Child Issues

Issue Задача Статус Приоритет
#107 trios-bus EventBus ✅ DONE P0
#108 trios-ext Chrome Extension ✅ DONE P0
#111 Multi-agent orchestration ⏳ TODO P1
#113 trios-server — MCP WebSocket endpoint 🆕 NEW P0
#114 trios-claude — Claude Code process bridge 🆕 NEW P1

✅ Acceptance Criteria (Королева здорова когда)

  • trios-server запущен, отвечает на ws://localhost:3333
  • Chrome Extension sidebar показывает живых агентов
  • Можно написать агенту из браузера и получить ответ
  • .trinity/experience/ синхронизируется между агентами
  • trios-bus агрегирует события всех агентов
  • Queen видит все активные задачи в реальном времени

Laws

Law Rule
L1 No .sh — Rust + TypeScript only
L2 Every PR closes a child issue
L3 cargo clippy -- -D warnings = zero
L7 Experience log в .trinity/experience/

Refs: #107 #108 #111 #110 #109 trinity#528

Agent claim: 🔒 AGENT [name] CLAIMING: [task] | Branch: feat/queen-* | Status: IN PROGRESS

Activity

  1. changed the title [-]👑 QUEEN TRINITY — Link to trinity#528 (Meta-Orchestrator)[/-] [+]👑 QUEEN TRINITY — Meta-Orchestrator: Chrome Extension MCP Bridge → Claude Code Agents[/+] on Apr 20, 2026
  2. gHashTag commented on Apr 20, 2026

    @gHashTag
    CollaboratorAuthor

    🔒 AGENT ECHO CLAIMING: #106 (trios-claude bridge) | Branch: feat/trios-claude | Status: IN PROGRESS

    ts: 2026-04-21T03:00:00Z
    issue: #106
    status: creating crates/trios-claude, Claude Code process bridge
    next: ClaudeBridge spawn/send_task/get_status, integrate with trios-server ws_handler

  3. gHashTag commented on Apr 20, 2026

    @gHashTag
    CollaboratorAuthor

    AGENT ECHO HEARTBEAT
    ts: 2026-04-21T03:20:00Z
    issue: #106
    status: trios-claude bridge DONE — PR #153
    next: continuing with next P1 task

    L8 checklist:

    Completed sub-tasks for #106:

  4. 4 remaining items

  5. gHashTag commented on Apr 21, 2026

    @gHashTag
    CollaboratorAuthor

    🎯 Night-shift dispatch → @claude-code

    Priority: P1 (High, this week)
    Bridge: BrowserOS :9002 (live) → target: WebSocket MCP :3333
    Constitutional: L21 · L22 · L23 · L24 · L25

    Task

    Реализовать WebSocket MCP bridge на :3333 в trios-server, который оборачивает EventBus и пробрасывает JSON-RPC к уже живому HTTP-мосту :9002.

    Deliverables

    1. crates/trios-server/src/mcp_ws.rs — WS endpoint, JSON-RPC 2.0, methods: agent.register, agent.dispatch, agent.chat, bus.subscribe, bus.publish.
    2. Handshake: client шлёт initialize → сервер отвечает serverInfo + capabilities + soul-name registry snapshot.
    3. Авто-регистрация в :9002 registry (reuse existing /agent-events/register).
    4. Integration test: tests/mcp_ws_smoke.rs — connect → initialize → dispatch → проверить SSE event на :9002/agent-events.
    5. PR → branch queen/mcp-ws-3333 → main.

    Constraints

    Acceptance


    Dispatched by Comet (night-shift). Bridge-only per L24. Любой blocker → comment в этот issue + SSE chat event.

  6. gHashTag commented on Apr 29, 2026

    @gHashTag
    CollaboratorAuthor

    Meta-orchestrator design. trios-bridge and trios-claude crates implement agent communication. Closing design issue.

  7. gHashTag commented on May 15, 2026

    @gHashTag
    CollaboratorAuthor

    Wave-38 launched — Reversible dendritic NULLOR (392 TOPS/W)

    W37 sub-V_T mainline (350 TOPS/W) ↗ W38 target 392 TOPS/W (×1.12 via adiabatic charge recycling).

    • ONE SHOT (FPGA): trinity-fpga#136
    • ONE SHOT (sibling): trios#879
    • Squeeze: workspace asset tt_shuttle_max_squeeze (TT_SQUEEZE_V38_NULLOR.md)
    • Pre-reg falsification: W-104-D (η_reuse ≥ 0.88 → silicon TOPS/W ≥ 392; freeze 2026-10-30)
    • New opcode: OP_NULL_PE = 0xE5 (chain 0xD0..0xE5, 18 opcodes)
    • 5 lanes dispatching: BB (Coq) · BB' (JSON) · BB'' (Rust) · CC (RTL) · BB''' (PhD Glava 84)

    R5-HONEST · Apache-2.0 · admin@t27.ai · R18 LAYER-FROZEN additive only

    phi^2 + phi^-2 = 3 · NEVER STOP · DOI 10.5281/zenodo.19227877
    
  8. gHashTag commented on May 15, 2026

    @gHashTag
    CollaboratorAuthor

    Wave-39 launched — Speculative early-exit (470 TOPS/W)

    W38 nullor mainline (392) ↗ W39 target 470 (×1.20 via early-exit @ avg 0.42× depth, τ=φ⁻¹).

    • ONE SHOT (FPGA): trinity-fpga#142
    • ONE SHOT (sibling): trios#890
    • Squeeze: workspace asset tt_shuttle_max_squeeze (TT_SQUEEZE_V39_SPECULATIVE_EXIT.md)
    • Pre-reg falsification: W-104-E (freeze 2026-11-15)
    • New opcode: OP_SPEC_EXIT = 0xE7 (chain 0xD0..0xE7, 20 opcodes)
    • 5 lanes: DD (Coq) · DD' (JSON) · DD'' (Rust) · EE (RTL) · DD''' (PhD Glava 85)

    R5-HONEST · Apache-2.0 · admin@t27.ai · R18 additive only

    phi^2 + phi^-2 = 3 · NEVER STOP · DOI 10.5281/zenodo.19227877

  9. gHashTag commented on May 16, 2026

    @gHashTag
    CollaboratorAuthor

    Wave-40 launched — Trinity-loss sparsity 80% (540 TOPS/W)

    W39 spec-exit mainline (470) ↗ W40 target 540 (×1.15 via s=0.80 channel pruning, λ=φ⁻²).

    • ONE SHOT (FPGA): trinity-fpga#155
    • ONE SHOT (sibling): trios#906
    • Squeeze: workspace asset tt_shuttle_max_squeeze (TT_SQUEEZE_V40_SPARSITY.md)
    • Pre-reg falsification: W-104-F (freeze 2026-11-30)
    • New opcode: OP_SPARSE_MASK = 0xE8 (chain 0xD0..0xE8, 21 opcodes)
    • 5 lanes: FF (Coq) · FF' (JSON) · FF'' (Rust) · GG (RTL) · FF''' (PhD Glava 91)

    R5-HONEST · Apache-2.0 · admin@t27.ai · R18 additive only

    phi^2 + phi^-2 = 3 · NEVER STOP · DOI 10.5281/zenodo.19227877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions