Commit Graph

20 Commits

Author SHA1 Message Date
Dai Ha 7fccdbeeca docs: enforce IDE MCP tool usage + per-file diagnostics; mvn clean install for overall health 2026-07-13 13:45:20 +02:00
Dai Ha 1ce0aba7fc CB-108: worker placement — one tab per worker in a dedicated worker space
Workers now land in their own herdr tab inside a dedicated, shared "worker
space" (workspace.create → tab.create → agent.start{tab_id} → close seed shell
→ rename), instead of splitting the user's currently-focused tab. Placement is
configurable (worker.placement tab|pane, worker.workspace, worker.tabLabel);
a future per-session space is just a distinct label.

New: Workspace/Tab records, WorkspaceControl over workspace.*/tab.*,
AgentControl.start tab_id overload, Agent.tabId.

Lifecycle carefulness:
- ensureWorkspace is a synchronized find-or-create (never double-creates)
- teardown closes the tab ONLY when the worker is its sole pane (never a
  shared user tab), resolving the tab via pane.get before closing
- tolerance is precise: only *_not_found is swallowed; real failures surface
- spawn failure closes the orphan tab; post-start cosmetic steps can't orphan
  a live worker or fail the spawn
- unique per-worker names (claude-<profile>-<nonce>-<seq>) with retry: herdr
  rejects duplicate agent names, and the per-process nonce survives a restart
  with lingering workers

herdr facts pinned: agent.start honors tab_id; agent name must be unique;
kind/status are detected from terminal output, not the name.

Reviewed at high effort (multi-agent); all findings addressed. 34 tests green
(29 unit/acceptance + 5 contract vs live herdr 0.7.0). Also bumps wiki.
2026-07-13 08:26:53 +02:00
Dai Ha 83359df3d0 wiki: CB-102 agent.* decision + Stage-1 build status 2026-07-12 20:19:44 +02:00
Dai Ha 2a815ee64e CB-102: native agent.* worker spawn (env-injected, guard-checked)
Spike decided the worker south side in favour of herdr's native agent.*
namespace over pane+send_text. Proven against live herdr 0.7.0:
agent.start takes a first-class env map that reaches the process
environment (ANTHROPIC_BASE_URL confirmed via agent.read), and herdr
tracks each worker's Claude session UUID itself.

- AgentControl: start/send/read/get/status/list + pane.close over agent.*.
- Agent/AgentStatus: projection of herdr agent records (session UUID,
  injectable status gate).
- WorkerService: build worker env (base_url/token/model/config dir),
  assertWorker BEFORE any herdr call, then agent.start.
- REST: GET /agents (discovery by session UUID), POST /workers (201, or
  403 subscription_boundary), DELETE /workers/{paneId}.
- Full stack smoke-tested live: POST->guard->agent.start->new pane,
  GET /agents lists it, DELETE closes it.
- Tests: 21 unit/acceptance + 4 contract (incl. a live end-to-end probe
  spawn that proves env injection and cleans up its pane).

No agent.stop in herdr (use pane.close); herdr id must be a string;
one request per connection — all pinned by contract tests.
2026-07-12 20:18:18 +02:00
Dai Ha 1d558a3692 wiki: record herdr string-id + one-shot-per-connection contract facts 2026-07-12 20:00:37 +02:00
Dai Ha 93cfdb640f Stage-1 walking skeleton: bridged Java daemon (herdr client + REST + guard)
Maven/Java 25 module under bridged/. End-to-end verified against live
herdr 0.7.0 (protocol 14): GET /healthz and GET /sessions serve real
workspace data through the socket client.

- herdr client (CB-101): Unix-socket JSON-RPC via UnixDomainSocketAddress.
  Two contract facts pinned by tests against the real daemon:
  ids MUST be strings, and herdr is one-shot per connection
  (connection-per-call, which also makes the client lock-free).
- subscription guard: worker base_url must be on the off-subscription
  allowlist (gx00.gw, ollama.ltms.dev); primary env must carry no base_url.
- config (CB-106): Jackson YAML + Logback; example grounded in ltms-local.
- REST app (CB-104 start): injectable HerdrClient so acceptance tests run
  on an ephemeral port with a fake herdr, no daemon/Claude in the loop.
- tests: 17 unit/acceptance (mvn test) + 3 contract (mvn test -Pcontract).
2026-07-12 20:00:02 +02:00
Dai Ha b415003245 IDE MCP config (jetbrains + intellij-index) for IntelliJ; bump wiki (Java stack, REST test surface, herdr 0.7.0 API) 2026-07-12 09:23:36 +02:00
Dai Ha ae7b98afe8 Bump wiki: add Use Cases (7) + Roadmap (8) — review scenario, ccs spawn, Stage-1 tickets 2026-07-12 07:44:53 +02:00
Dai Ha 0ad19cc39e Bump wiki: consistency pass vs rewritten Architecture (Mode/SERVER-CLIENT terms, hook reconciliation) 2026-07-12 07:11:13 +02:00
Dai Ha 36b01cf5ef Bump wiki: clean-slate rewrite of 1-Architecture 2026-07-12 06:57:10 +02:00
Dai Ha c539ae18cc Bump wiki + README: bridged as sole communication gateway (broker internal) 2026-07-12 06:50:08 +02:00
Dai Ha b0deb476d4 Bump wiki + README: bridged standalone SERVER/CLIENT diagrams (MCP) 2026-07-11 15:52:32 +02:00
Dai Ha 79ce930c78 Bump wiki: renumber Team -> chapter 6, sidebar + Home nav 2026-07-11 15:41:39 +02:00
Dai Ha 4b0e84a66a MCP unified north-face contract; bump wiki + README MCP framing 2026-07-11 15:37:07 +02:00
Dai Ha ff9cac6b8a Bump wiki: numbered page filenames + sidebar nav 2026-07-11 15:14:12 +02:00
Dai Ha 07c9dea010 Bump wiki: architect review + numbered navigation 2026-07-11 15:08:50 +02:00
Dai Ha 43695187e5 README: herdr-centric bridged as leading approach; bump wiki
- Swap leading approach to the bridged message server driving herdr
  (AgentAPI retained as fallback injector); add mermaid overview
- Update status to Design (2026-07-11)
- Advance wiki submodule to new docs
2026-07-11 14:50:52 +02:00
ltms e90ad56a2c wiki: add Architecture page 2026-07-08 16:39:33 +02:00
ltms b7338cda63 wiki: add Approaches page 2026-07-08 16:25:37 +02:00
ltms 49357f2699 Init claude-bridge: README + wiki submodule (AgentAPI approach) 2026-07-08 16:01:01 +02:00