Commit graph

62 commits

Author SHA1 Message Date
Natalie
16c030c6b3 feat(@projects/@claire): routing resolver for location-transparent Claire
route(signals, fleet) -> RouteDecision via a deterministic cascade:
explicit host > capability-pin (uses hosts_with_capability) > sticky
(subject's session/task already runs on a host, via sessions+assignments)
> default-local. Pure + auditable (reason+candidates surfaced); the LLM
classify step and cross-host execution are separate layers. 13 tests.

Part of task 13764f2f.
(manual commit via ALLOW_COMMIT — autocommit LLM still down on claire)
2026-06-03 01:41:27 -07:00
Natalie
24c6f24f43 feat(@projects/@claire): supervisor auto-resume of dead worker sessions
When a local worker pane dies (crash, OOM, host power-cycle), its JSONL persists
and is resumable. The agent supervisor now detects dead-but-recent local
sessions and `claude --resume <uuid>`s them, then sends a re-orient kick so the
session re-determines its OWN state (done vs pending vs finished) before acting
— mirrors the orchestrator's rehydrate-on-startup.

- rclaude.Rclaude.resume(): spawn `claude --resume <uuid>` via RCLAUDE_RESUME_ID
  (verified empirically against a real dead session on apricot).
- supervisor.select_resume_candidates(): pure, guarded selection — recency
  window, supersession (skip if a LIVE session shares the cwd), orchestrator-
  workspace exclusion, per-session retry cap, per-tick global ceiling (the
  first-wake token-storm guard). 7 unit tests.
- AgentConfig.auto_resume off|dry-run|on (default off) + max/per_tick/window.
  Ships off; roll out via dry-run, then on — same pattern as auto_continue.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 01:12:33 -07:00
Natalie
c5e63c5942 feat(@projects/@claire): host-capability registry for routing/dispatch
known_hosts gains a `capabilities` tag list (e.g. media, transmission,
cores:64, gpu) + ClaireConfig.hosts_with_capability(tag) (exact or key:
prefix match) and capabilities_for(host) (alias-resolved). Lets routing
(location-transparent Claire, task 13764f2f) and dispatch pick a host by
what it CAN do, not just load. Seeded black={media,transmission}.

Prereq task a5453fb8. 351 tests green.
(manual commit via ALLOW_COMMIT — autocommit LLM still timing out on claire)
2026-06-02 23:58:52 -07:00
Natalie
ce6948d6e9 feat(@projects/@claire): rounds skip-gate loop + fleet release tool
Wire the rounds timer to a pure-Python skip gate so claire-serve only wakes
the orchestrator model when worker fleet state changed (not every tick):
- web/rounds.py: fleet_fingerprint() over worker sessions (minus the
  orchestrator's own) + open tasks; should_skip_round() with heartbeat floor.
- web/app.py: _rounds_loop tracks last fingerprint + consecutive skips.
- excludes the orchestrator's own session/chat so a round's self-side-effects
  can't defeat the gate.
Add scripts/release-fleet.sh (test -> deploy apricot+black -> restart plum
services) and harden deploy-agent.sh's cosmetic status check against a SIGPIPE
false-abort. 3 new discriminating tests; 349 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 22:58:41 -07:00
Natalie
c6bd77cc5b feat(@projects/@claire): add pinned decision feature
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-01 02:36:07 -06:00
Natalie
c22cae1b74 feat(@projects/@claire): add session reaping logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-01 01:16:42 -06:00
Natalie
2146e42de7 feat(@projects/@claire): add auto-continue nudge logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-01 00:39:02 -06:00
Natalie
6cd1d3b28d feat(@projects/@claire): add vault verification CLI
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-01 00:24:35 -06:00
Natalie
70b09d5a9b feat(@projects/@claire): vault secret management
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 21:01:11 -06:00
Natalie
c557774b57 feat(@projects/@claire): add peer sync, supervisor, and telemetry loops
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 18:38:10 -06:00
Natalie
3057182717 feat(@projects/@claire): add headless peer sync agent loops
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 18:15:59 -06:00
Natalie
bda5dad83d feat(@projects/@claire): add host telemetry migration and reporting
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 18:08:43 -06:00
Natalie
8d8c1e32e9 fix(@projects/@claire): 🐛 correct spelling in test names
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 17:47:31 -06:00
Natalie
5269c95a35 feat(@projects/@claire): add health rounds tracking system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 13:14:34 -06:00
Natalie
2d978b5fe3 fix(dispatch): discover sessions by canonical host label, not raw "local"
discover_session polled `rclaude list sessions` for the freshly spawned
session but filtered rows with `r.host == host` where host is the
canonical name (e.g. "plum"), while rclaude labels the calling machine's
own sessions "local". "local" == "plum" is always False, so discovery
matched nothing and timed out even though the session's JSONL was already
on disk (observed: 18s after spawn, inside the 30s window). dispatch then
falsely returned "spawned but not discovered", orphaning the live session
until a manual pull.

Root cause is a missing host-label normalization the pull loop already
does. Fix discover_session to canonicalize both sides via
resolve_host_label, and key local-path symlink resolution on the ROW's
raw label. Apply the same normalization to dispatch_task's pre_uuids
filter (identical mismatch left it empty, risking a stale-sibling match
at a shared cwd). 2 regression tests reproduce rclaude's "local" labeling
(the old fake echoed the dispatch host, masking the bug). 310 tests pass.

Committed manually with ALLOW_COMMIT=1 per user authorization: the
auto-commit service's message LLM was timing out on this repo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 22:46:28 -06:00
Natalie
53921b4e94 refactor(domain): rename ChatRole persisted value clare → claire (migration 0010)
ChatRole.CLAIRE now persists as "claire" everywhere. Migration 0010
rewrites both the chat_messages.role column and the chat_message_posted
event payloads in one transaction so a future replay reconstructs the
same projection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:29:30 -06:00
Natalie
9f81bfc777 feat(@projects/@claire): enhance session naming with org/project prefix
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 17:34:07 -07:00
Natalie
a9731b4cd8 feat(decisions): add decisions tracking system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 16:58:45 -07:00
autocommit
73d76a8dfc feat(service): Add idempotent pull request handling with unique request tracking and test coverage
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 15:10:46 -07:00
autocommit
8eea22aa40 feat(config): Introduce 'this_host' serialization logic and enforce consistent config formatting
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 15:10:46 -07:00
autocommit
8792bffb7e test(config-dispatch): Add comprehensive test cases for config validation and dispatch logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 14:28:15 -07:00
Natalie
139e2918b9 feat(@projects/@claire): add two-gate review workflow
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 02:05:35 -07:00
Natalie
4b768acba2 feat(@projects/@claire): add tmux_name validation in session dispatch tests
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 00:38:16 -07:00
Natalie
eb382ff1c6 feat(@projects/@claire): improve session targeting for direct sends
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-22 00:30:39 -07:00
Natalie
c78ca31fa8 feat(@projects/@claire): add blocker status checks in scheduler
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 23:32:16 -07:00
Natalie
7138724b88 feat(@projects/@claire): add task dependency tracking
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 23:17:40 -07:00
Natalie
8b931e6337 feat(@projects/@claire): improve session targeting and briefing
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 20:12:22 -07:00
Natalie
aa1378a807 feat(@projects): add session orchestration & web UI components
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 19:54:42 -07:00
autocommit
a7158563aa feat(web): Implement API endpoints and service logic for fetching "Considered Work" data
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-21 14:39:22 -07:00
autocommit
6d212b7dbe refactor(testing-test): ♻️ Update test imports to use claire instead of clare in package references
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 19:54:05 -07:00
Natalie
d698cd6430 feat(@projects/@clare): add remote control session registration
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 18:46:42 -07:00
Natalie
146ad7fbb2 feat(@projects): add test for env var stripping in spawn
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 18:32:29 -07:00
Natalie
2d355bcab5 feat(@projects/@clare): add session age recycling logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 17:29:42 -07:00
Natalie
a7cc0bdeab feat(orchestrator): add autonomous dispatch capability
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 05:22:35 -07:00
Natalie
3653177fce feat(@projects/@clare): add budget and limits config for rate/load control
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 05:15:13 -07:00
Natalie
4f2d92d485 feat(db): add org_id column for monorepo projects
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 04:31:55 -07:00
Natalie
99e80259f6 feat(@projects/@clare): improve session liveness detection with tmux slug matching
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 03:50:29 -07:00
Natalie
ee3419820b feat(@projects): add session liveness tracking migration
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 03:43:35 -07:00
Natalie
9f9c1f0cd5 feat(@projects/@clare): enhance orchestrator heartbeat with periodic checks
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 03:15:55 -07:00
Natalie
a426453795 feat(@projects): add fleet agent orchestration workflow
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 02:27:32 -07:00
Natalie
8ab5619421 feat(@projects): add agent status tracking table
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-20 02:20:26 -07:00
Natalie
d2e37ea751 test(@projects/@clare): 🧪 add pm-command parser test suite
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 22:55:54 -07:00
Natalie
bc894b550e feat(@projects): add pm expansion tools
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 22:49:33 -07:00
Natalie
3d24384340 feat(@projects/@clare): add org, people, and task-related tables
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 22:43:13 -07:00
Natalie
cff7892fab feat(@projects/@clare): add ignore_uuids param to discover_session
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 21:20:55 -07:00
Natalie
bce0a5b9b1 feat(@projects/@clare): add mcp config support for detached spawns
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 21:14:06 -07:00
Natalie
bf9b892d19 feat(@projects/@clare): add mcp sse endpoint config
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 21:07:44 -07:00
Natalie
52b9594c35 feat(@projects/@clare): add supervisor for orchestrator session management
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 19:38:33 -07:00
Natalie
46e2211f8c 🔥 remove html chat routes tests
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 17:38:22 -07:00
Natalie
00401248db feat(@projects/clare): add live tool-call logging system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-18 16:14:40 -07:00