Commit graph

608 commits

Author SHA1 Message Date
Natalie
0319ea6bcc chore(@projects/@claire): 🔧 remove scheduled_tasks.lock file
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-10 02:19:17 -07:00
Natalie
aa2aa68d72 feat(@projects/@claire): wire location-transparent routing into per-turn workflow
Orchestrator CLAUDE.md now instructs Claire, per turn, to call resolve_host
with the signals it extracts (explicit_host / capability_needs /
session_uuid|task_id); when the decision is NOT this node, surface that the
work belongs on that host's Claire and hand it off. Decision layer of
location-transparent Claire (13764f2f) is now live in orchestrator behavior;
cross-host execution/proxy remains the follow-up. resolve_host added to the
Plan tools list.
(manual commit via ALLOW_COMMIT — autocommit LLM still down on claire)
2026-06-03 20:12:46 -07:00
Natalie
3d626a6d88 fix(@projects/@claire): deploy-agent auto-resolves a reachable ssh transport
deploy-agent used bare `ssh <host>` / `rsync <host>:` (→ <host>.lan), which
fails off-LAN or when the direct plum→host WG relay drops — blocking deploys
even though the host is reachable via the black jump host. Now it probes
<host> → <host>-wg → <host>-j and uses the first that answers for the ssh/rsync
legs (remote-run keeps its own routing), keeping the claire host LABEL as
<host>. Override with CLAIRE_SSH_ALIAS. Verified: apricot deployed via apricot-j
while .lan + -wg were timing out.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 02:08:03 -07:00
Natalie
042f5d6756 feat(@projects/@claire): resolve_host MCP tool — orchestrator routing decisions
Exposes routing.route() to the orchestrator as `resolve_host(explicit_host,
capability_needs, session_uuid, task_id)`. Claire (LLM) extracts the signals
from a turn and calls it; gets back {host, reason, detail, candidates} via the
deterministic cascade (explicit>capability>sticky>default-local), with
live-session counts feeding the capability tiebreak. The decision layer of
location-transparent Claire is now callable from the orchestrator.

Part of task 13764f2f. Smoke-verified: explicit→named, media→black (seeded
capability), no-signal→local. 371 tests green.
(manual commit via ALLOW_COMMIT — autocommit LLM still down on claire)
2026-06-03 01:55:31 -07:00
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
2d3777a7d0 fix(@projects/@claire): 🐛 claire-agent KillMode=process so redeploys don't kill workers
Default control-group KillMode meant restarting claire-agent.service (every
deploy) SIGTERMed the whole cgroup, silently killing the live worker claude/tmux
sessions the agent had spawned (next-tour-planner lost on 2026-06-02). KillMode=
process signals only `claire agent run`; panes survive and the fresh agent
re-discovers them via pull. Note: takes effect from the NEXT restart (a unit's
stop phase uses the KillMode it was started under).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 23:25:43 -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
8d82bb0abc feat(@projects/@claire): add rounds skip logic and heartbeat control
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-02 22:39:57 -07:00
Natalie
39ccf5a9f5 feat(@projects/@claire): per-host orchestrator service ([<host>] claire)
Peer nodes can run a local orchestrator registered with claude.ai/code as
[<host>] claire, installed uniformly via deploy-agent.sh (not hand-wired).
- agent.orchestrator_enable + orchestrator.mcp_url config (round-trip safe)
- bootstrap points orchestrator MCP at central endpoint when set
- peer lifespan bootstraps + heartbeats the orchestrator (NO rounds loop)
- claire agent enable-orchestrator CLI + deploy-agent.sh wiring

(manual commit via ALLOW_COMMIT=1 — autocommit LLM was timing out on claire)
2026-06-02 20:52:54 -07:00
Natalie
deca1a280e feat(@projects/@claire): update remote control naming to use bracketed host prefix
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-02 16:06:12 -07:00
Natalie
53d05cfd41 fix(@projects/@claire): 🐛 update stale session cleanup logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-02 15:20:25 -07:00
Natalie
1d431b5056 feat(claire): add session cleanup and kick delay logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-02 15:02:47 -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
7492a4d4dd feat(@projects/@claire): add rclaude path check in supervisor
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-01 00:46:25 -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
6124e9d139 fix(@projects/@claire): 🔐 secure config file permissions
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 19:50:58 -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
9b3bf1a607 feat(@projects/@claire): add wedged/orphaned session detection
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 18:30:30 -06:00
Natalie
2a2e99ab2b feat(@projects/@claire): add systemd agent deployment
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 18:23:18 -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
a3750b68cc feat(@projects/claire): add cold-start rehydration logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 17:33:20 -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
autocommit
770db3ab8e docs(plans): 📝 Update round increment details in mobile app project plan with new tasks, milestones, and features for iterative development
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 18:46:24 -07:00
autocommit
c6337abfbb docs(plans): 📝 Update Claire mobile app sprint tasks, milestones, and deliverables for the next round increment
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 18:27:45 -07:00
autocommit
91a636744e docs(plans): 📝 Update mobile app development plan with round increment milestones and key deliverables
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 18:15:50 -07:00
autocommit
47ae0ffcbc docs(plans): 📝 Update Claire mobile app project plan with next increment milestones and deliverables
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 17:57:50 -07:00
autocommit
42cbbe815f docs(plans): 📝 Update mobile app development plan milestones and next steps for the current round increment
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 17:45:58 -07:00
autocommit
93c7980071 docs(plans): 📝 Update Claire mobile app roadmap documentation for the latest round increment details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 17:27:52 -07:00
autocommit
003ddda77f docs(plans): 📝 Update mobile app increment plan with latest feature roadmap and progress updates
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 17:15:40 -07:00
autocommit
e21d0d8671 docs(plans): 📝 Update Claire mobile app development plan with round-cycle progress details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 16:57:18 -07:00
autocommit
b4a60e6b04 docs(plans): 📝 Update Claire mobile app sprint planning documentation with round increment details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 16:39:22 -07:00
autocommit
c7dbaa33b5 docs(plans): 📝 Update Claire mobile app increment details in project plan document
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 16:27:24 -07:00
autocommit
720f92232d docs(plans): 📝 Update mobile app roadmap for round increment with detailed scope, tasks, and milestones
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 16:09:25 -07:00
autocommit
b60da9fa3b docs(plans): 📝 Update Claire mobile app project plan with new development increments and milestone details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 15:57:22 -07:00
autocommit
ae1f59316f docs(plans): 📝 Update project plan document with round increment details for Claire mobile app development progress
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 15:39:25 -07:00
autocommit
04229b2800 docs(plans): 📝 Update round increment in mobile app plan documentation with milestone/sprint details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 15:27:21 -07:00
autocommit
dd296132fa docs(plans): 📝 Update milestone progress tracking plan for mobile app to reflect 72nd round completion
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 15:09:10 -07:00
autocommit
c99c6dcfc9 docs(plans): 📝 Update Claire mobile app round increment plan details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 14:56:57 -07:00
autocommit
93c13b7ef4 docs(plans): 📝 Update prospecting and CocotteTech project task priorities in Claire mobile app documentation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 14:38:32 -07:00
autocommit
a42375c9bf docs(plans): 📝 Update project plan with round increment details in claire-mobile-app-plan.md
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 14:20:18 -07:00
autocommit
1e45b294a5 docs(plans): 📝 Update Claire mobile app increment plan with next-cycle details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 14:08:03 -07:00
autocommit
797ded5b27 docs(docs): 📝 Update Claire mobile app project plan with next development milestones and round increment details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 13:49:54 -07:00