Skip to content

roster: live rockit-office aggregator + launchd job#3

Open
tps-flint wants to merge 1 commit into
roster-cp2from
cp-aggregate
Open

roster: live rockit-office aggregator + launchd job#3
tps-flint wants to merge 1 commit into
roster-cp2from
cp-aggregate

Conversation

@tps-flint

Copy link
Copy Markdown
Contributor

What

Replaces the one-shot push-roster.mjs seed (run once 2026-06-11, which froze the Observatory feed) with a recurring aggregator that derives REAL rockit-agent state and signs/POSTs it to /IngestEvents on a 60s cadence. The deployed Observatory (tps.dtrt.harperfabric.com) now shows live agent state instead of the Jun-11 fake seed.

Files

  • scripts/aggregate-rockit.mjs — the aggregator (reuses push-roster.mjs's Ed25519 signing + the real rockit-office.key).
  • deploy/ai.tpsdev.observatory-aggregate.plist — launchd job (60s StartInterval).
  • deploy/README.md — sources, thresholds, install steps.

Live sources (rockit office only, all local to rockit)

  • Presence — newest session *.jsonl mtime per agent (flint→claude project dir; kern/sherlock→openclaw sessions; ember→pi-agent sessions). Thresholds: <10m active, <3h idle, else stale. (Renderer treats status:"stale" as the producer-computed crashed state.)
  • currentTaskbd list --status in_progress issue titles (non-secret).
  • Events — recent PR state across tpsdev-ai/{flair,cli}pr_opened/pr_merged + CI rollup → ci_passed/ci_failed, deduped by stable id (server dedups by {officeId}:{id}).

Security

Status text only — agent names, presence states, bd titles, PR numbers/titles. Never task bodies, mail bodies, secrets, or file contents. Audited the live RosterView payload: zero secret-pattern hits, Office.publicKey correctly excluded from public reads.

Verified end-to-end

After the aggregator ran (manually + then launchd-driven), GET /RosterView returns fresh real data:

  • rockit.lastSeen = seconds old (was frozen at 2026-06-11T21:50:01Z).
  • Real per-agent presence: flint:active, kern:idle, sherlock:stale, ember:stale.
  • Real currentTask from bd (e.g. flint = "Flair-for-n8n: community node...").
  • Real PR events (flair#488-494, cli#313/315) with actual merge timestamps/titles.

Idempotency confirmed: re-runs push the same events but the server inserts 0 (dedup); member snapshots refresh each tick. The 10s rate guard is respected by the 60s cadence.

Base note

Based on roster-cp2 (not main) because the live pipeline it feeds — RosterView + the live-path IngestEvents + push-roster.mjs — lives on roster-cp2 and is what production runs. roster-cp2 is currently unmerged to main (flagging, not fixing here). Merging this PR's chain to main should be sequenced after / together with roster-cp2.

🤖 Generated with Claude Code

Replaces the one-shot push-roster.mjs seed (run once 2026-06-11, which
froze the Observatory feed) with a recurring aggregator that derives REAL
rockit agent state and signs/POSTs it to /IngestEvents on a 60s cadence.

Sources (all local to rockit, status text only — no secrets/bodies):
- presence ← newest session .jsonl mtime per agent (claude/openclaw/pi-agent);
  <10m active, <3h idle, else stale
- currentTask ← `bd list --status in_progress` issue titles
- events ← tpsdev-ai/{flair,cli} PR state → pr_opened/pr_merged + CI rollup
  → ci_passed/ci_failed, deduped by stable id (server dedups by {office}:{id})

Reuses push-roster.mjs's Ed25519 signing + the real rockit-office.key.
Verified end-to-end: /RosterView now returns fresh data (lastSeen seconds
old, real per-agent states) instead of the Jun-11 seed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant