Commit Graph

134 Commits

Author SHA1 Message Date
Yahya Alhinai 562bc1979a fix: stabilize livekit gemini voice playback 2026-06-28 05:59:21 +00:00
Yahya Alhinai 721fe2b8d9 feat: use gemini tts for livekit voice 2026-06-28 05:43:38 +00:00
Yahya Alhinai c771e1594c feat: show screen thumbnails in pod streams 2026-06-28 05:33:00 +00:00
Yahya Alhinai 1080bfd85f feat: label screen observations in pod streams 2026-06-28 05:24:35 +00:00
sb-iam 95a9bde5ee Merge pull request #7 from karti-ai/feat/live-graph-glue
fix(graph): readable Team-memory graph (short labels, clean collision labels, file cap)
2026-06-27 22:17:02 -07:00
sb-iam a21a2895c4 fix(graph): readable labels + file cap (de-hairball the viz)
The deployed graph was an unreadable mess: full file paths centered on nodes
bled across columns, and collision labels showed garbage vision symbols
("infra/README.md### Running the git watcher").

- node labels are now the last two path segments (full path in summary)
- collision labels are just the file (drop the junk #symbol)
- cap file nodes to 9 (collision files prioritized)

demo-pod: 22 -> 20 clean nodes; no label bleed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 22:14:42 -07:00
Yahya Alhinai dc937a783d feat: fold pod controls into workspace body 2026-06-28 05:14:08 +00:00
Ramis aeb75c310e feat: split pod streams into Signals vs Reasoning sections
My/Team streams were one flat lane; source provenance was buried as a
gray badge by the filename. Group each lane into Signals (vision/git
inputs) and Reasoning & decisions (collision/intervention/outcome), and
promote source to a color-coded provenance chip with a readable kind
label. Presentation-only; no shared-type or backend changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VpySDjxpM1usXMEngJRWqG
2026-06-27 22:08:53 -07:00
sb-iam 4427e18bb9 Merge pull request #6 from karti-ai/feat/live-graph-glue
feat(graph): live Team memory graph from real Mongo data
2026-06-27 22:02:05 -07:00
Yahya Alhinai 866558e100 feat: stabilize pod sidebars layout 2026-06-28 04:35:24 +00:00
sb-iam 2006096cda feat(graph): demo-ready materializer + per-pod Team memory action
Materializer (live.ts) — cut demo-pod from 110 -> 22 nodes:
- cap to 8 recent collisions; collapse repeats by memorySignature
- collapse interventions to one (most recent) per collision
- filter junk 'files' (URLs, env vars, browser/app names, scratch/test) to
  real source paths only
- prune test-artifact engineers (a/b/verify/codex-check/-testrepo) + any node
  orphaned by that
- collisions referenced by accepted outcomes bypass the cap so the learned_from
  money path never drops; risk-paths metric counts distinct signatures

UI: per-pod 'Team memory' action on each PodCard's menu (replaces the header
button that always opened pods[0]).

Verified against live demo-pod data (joins connect); typechecks clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 21:35:14 -07:00
Ramis 4f012aa54a feat: speak collision voice cues via browser Web Speech API
Agent-published LiveKit audio is unreliable for voice: the track is
short-lived (publish, speak ~3s, unpublish) and blocked by browser
autoplay, so participants heard nothing even though the server published
fine. The VOICE_CUE text already arrives over the data channel, so speak
it in the browser via speechSynthesis instead — instant and reliable.

Prime speechSynthesis from user gestures (Enable sound, Share screen) so
later cues are allowed to play.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft
2026-06-27 21:24:06 -07:00
Ramis cfdbbb3ad7 docs: add production deployment & ops section to CLAUDE.md
Document the box topology so future sessions (and teammates' agents) don't
rediscover it the hard way: systemd-managed services (never launch the agent
manually — duplicate podman-hermes identities evict each other and silently
drop interventions), Caddy serving the static frontend from /var/www/podman,
the deploy procedure, and the shared-package build order.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft
2026-06-27 21:17:26 -07:00
Ramis 4142876b23 feat: unlock voice audio + terse demo-style collision alerts
Voice generation, critical escalation, and audio publish all worked, but
participants heard nothing: browsers block autoplay of the agent's audio
track until a user gesture. Add the canonical LiveKit unlock — listen for
AudioPlaybackStatusChanged and show an "Enable sound" button that calls
room.startAudio() so PodMan's voice cues are actually heard.

Also make collision alerts short and direct instead of chatty AI prose:
  card:  "Conflict: ram + yahya both on README.md (unpushed). Seen before."
  voice: "Conflict. ram + yahya, both on README.md."

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft
2026-06-27 21:08:41 -07:00
Yahya Alhinai 16e959072b feat: route pods by URL slug 2026-06-28 04:07:10 +00:00
sb-iam 412d3f7df6 tune(graph): de-noise the live materializer
Verified materializePodGraph against real demo-pod data (joins all connect:
21/21 interventions->collisions, learned_from produced). Tuning:
- engineer nodes are case-insensitive (merges Shakthi/shakthi)
- git (engineer_states) now only CONFIRMS editing on files vision/collisions
  already surfaced, instead of adding the whole repo diff (killed a 29-file
  node explosion from a watcher running against the full podman repo)

Cut demo-pod from 110 -> 77 nodes; git file-edges 39 -> 6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 21:03:57 -07:00
Yahya Alhinai 563bc6f8fd feat: add collapsible pod stream sidebars 2026-06-28 04:03:25 +00:00
Yahya Alhinai 59f92f18df feat: add realtime pod activity streams 2026-06-28 03:50:56 +00:00
sb-iam 85ab8da598 feat(graph): live materializer + light shadcn theme (real-data glue)
- backend/src/graph/live.ts: materializePodGraph builds the graph from the real
  collections (pods, engineer_states, observations, collisions, interventions,
  outcomes) instead of the demo seed. Parses git-status paths, fuses git+vision,
  draws collides/warns/learned_from, computes live metrics + a column layout.
- store.ts: loadPodGraph now prefers live → seeded team_model.graph → demo.
- GraphView.tsx: light/shadcn theme (from the team-memory-theme work), composed
  from the ruixen primitives; node-shape encoding unchanged.
- docs/graph.md: live data→graph mapping + fallback order.

Typechecks clean. Not yet runtime-verified end-to-end (Atlas creds rotated again).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 20:44:50 -07:00
Ramis e474fef228 fix: detect same-file collisions reliably via basename + git overlap
Live observations showed two engineers both dirty on README.md but zero
collisions firing. Two root causes:

1. normalize() only lowercased and prepended src/, so the same file at
   different path depths ("agent.ts" vs "backend/src/agent.ts") never
   matched. Replace with lowercased-basename matching.
2. Git ground truth (engineer_states.changedFiles) was only used to set
   the unpushed flag, never to match the file. The strongest signal was
   wasted.

Detector now fuses vision currentFile AND git changedFiles into one
file->engineers map, so a collision fires when two people share a dirty
file even if both screens aren't on it at the same instant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft
2026-06-27 20:44:44 -07:00
Yahya Alhinai dd99050be8 fix: prevent agent frame backpressure 2026-06-28 03:42:08 +00:00
Yahya Alhinai d9e6e8cef4 fix: harden agent worker crash handling 2026-06-28 03:38:50 +00:00
Ramis 745f0032f7 fix: make MongoDB mandatory, fail loud instead of degrading
Reverse the best-effort error swallowing. MongoDB is core to PodMan's
continual-learning story and must always be used, so a broken memory
layer must surface immediately rather than silently masquerade as
working (which is how observations stayed at 0 unnoticed).

- agent verifies Mongo via initMemory() at boot; bad creds / unreachable
  Atlas now fail loudly before joining the room, not mid-demo
- server exits on Mongo init failure instead of warning and limping on
- getGitStates and onScreenFrame no longer swallow Mongo errors
- memory persist() logs the failure and rethrows instead of warning

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft
2026-06-27 20:34:27 -07:00
Ramis 6a6fbca9e0 fix: stop agent crashing on Mongo errors during live loop
A Mongo auth/connection failure in getGitStates escaped uncaught and
killed the agent process on the first screen frame, so collision
detection never ran. Make git-state fusion best-effort (degrade to
vision-only) and wrap the whole onScreenFrame loop so no per-frame
Gemini/GitHub/Mongo error can crash the long-running agent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft
2026-06-27 20:31:38 -07:00
Kartikeya fe37f35522 feat: podman.live Caddy + social link previews
infra/Caddyfile: add podman.live + www.podman.live (serve app + proxy /api),
so the domain is durable in the canonical config (not just a manual edit).
index.html: Open Graph + Twitter Card meta (title, description, og:image) so
sharing www.podman.live renders a rich preview. Adds a 1200x630 og.png card
(generated from og.svg) under public/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 20:22:08 -07:00
Yahya Alhinai 924552a025 chore: remove unused screen publish hook 2026-06-28 03:00:12 +00:00
Yahya Alhinai 7497318cde test: strengthen deployment verification 2026-06-28 02:54:29 +00:00
Kartikeya 702026fbd4 feat(frontend): add PodMan favicon
SVG favicon (dark #0b0f17 tile, emerald "P" + live dot) wired via
<link rel="icon"> in index.html. Fixes the favicon.ico 404.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 19:51:21 -07:00
Yahya Alhinai 4639db11b1 fix: verify atlas vector index without voyage 2026-06-28 02:38:54 +00:00
Yahya Alhinai 39a06499af feat: add local vector recall fallback 2026-06-28 02:27:45 +00:00
Yahya Alhinai 146d7e4bd2 test: verify frontend screen sharing 2026-06-28 02:20:58 +00:00
Yahya Alhinai 4253921532 Add Hermes operations management layer 2026-06-28 02:17:23 +00:00
Yahya Alhinai 89893110f1 feat: activate gemini voice tts path 2026-06-28 02:11:02 +00:00
Yahya Alhinai 4726e8ce80 test: make frontend verifier target frontend pod 2026-06-28 02:02:06 +00:00
Yahya Alhinai 1088196ba6 test: verify graph surfaces end to end 2026-06-28 01:59:58 +00:00
sb-iam b092a24941 Merge pull request #2 from karti-ai/feat/graph-data-viz
feat(graph): continual-learning graph data model + dark-Bauhaus viz
2026-06-27 18:56:00 -07:00
sb-iam 4ff17415b6 Merge origin/main into feat/graph-data-viz
Resolve App.tsx header conflict: keep main's "Privacy-limited" badge AND the
"Team memory" graph button (both in the header action group). server.ts and
backend/package.json auto-merged cleanly — main's closeMemory/shutdown and the
graph:seed script are both preserved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 18:54:10 -07:00
Yahya Alhinai 3d99dd2449 fix: proxy LiveKit subdomain to cloud service 2026-06-28 01:53:20 +00:00
Yahya Alhinai 205939616b chore: add public healthcheck watchdog 2026-06-28 01:53:03 +00:00
Yahya Alhinai 9ac7bc5e8f test: stabilize frontend live join verifier 2026-06-28 01:46:57 +00:00
Yahya Alhinai c818d5081e feat: harden podman deployment orchestration 2026-06-28 01:44:26 +00:00
sb-iam eedfa935b1 Merge origin/main into feat/graph-data-viz
Resolve conflicts:
- backend/src/server.ts: keep main's getPresence + closeRoom (room auto-cleanup)
  and add the graph imports/routes (additive).
- frontend/src/App.tsx: take main's shadcn command-center UI and re-integrate
  GraphView — import, graphPodId state, an early-return render branch, and a
  shadcn "Team memory" button next to Refresh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 18:41:56 -07:00
sb-iam 32bff6a3ab fix(graph): address review — reachFrom direct edges + node a11y
- reachFrom now returns the direct outbound edges PLUS the recursive
  $graphLookup reaches, de-duped by edge id, with maxDepth to bound cycles.
  It was dropping edges straight off the start node. [review P2]
- GraphView SVG nodes are keyboard-accessible: role/tabIndex/aria-label +
  Enter/Space handler alongside onClick. [review P3]

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 18:14:48 -07:00
sb-iam 546aeeed70 feat(graph): continual-learning graph data model + dark-Bauhaus viz
Adds the team_model graph layer (the "it learned" view) and its visualization,
per docs/graph.md. Demo-backed first; built on origin/main conventions.

- shared: PodGraph / node / edge / metric types + GraphNodeDoc / GraphEdgeDoc
- backend/src/graph: demo graph data; Mongo store (loadPodGraph w/ demo
  fallback, seedGraph, reachFrom via $graphLookup); graph:seed script
- backend/src/server.ts: additive GET /api/pods/:id/graph + /graph/reach/:node
- frontend: dark-Bauhaus GraphView + fetch helper, reachable from a
  "Team memory" toggle in App.tsx
- docs/graph.md: spec (data model, $graphLookup, API, demo-first plan)

Demo-backed: the route serves a grounded demo graph when team_model has no
graph yet; graph:seed writes team_model + graph_nodes/graph_edges so the
$graphLookup traversal is real. Swap loadPodGraph to live team_model later.

Known follow-ups before merge: branch is based on 65a0791; origin/main is now
at 1294b84, so this needs a rebase + App.tsx conflict resolution (teammate
rewrote App.tsx with live room view / one-click join).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 18:14:48 -07:00
Yahya Alhinai 5185845090 Overhaul PodMan UI with shadcn 2026-06-28 01:04:25 +00:00
Yahya Alhinai 80cc89072f feat: modernize PodMan frontend command center 2026-06-28 00:35:46 +00:00
Ramis 549895292c fix(frontend): stop screen MediaStreamTrack on PodView unmount
room.disconnect() removes the participant from LiveKit but doesn't stop
the underlying OS capture. Without track.stop() the screen share indicator
keeps running after Leave. beatRef already had cleanup; add the same for
screenTrackRef.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft
2026-06-27 17:34:37 -07:00
Kartikeya 59e201fe93 fix(frontend): refresh pod list on leave so a deleted pod doesn't linger
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 17:23:47 -07:00
Kartikeya 891d4b12bd feat(livekit): close the room when a pod is deleted
DELETE /api/pods/:id now also calls closeRoom (RoomServiceClient.deleteRoom)
to end the live LiveKit room and disconnect anyone connected. PodView listens
for RoomEvent.Disconnected and returns the user to the pod list, so a deleted
pod cleanly kicks everyone out instead of stranding them in a dead room.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 17:22:07 -07:00
Kartikeya e29fabc3f1 fix(livekit): stable identity + room auto-cleanup
Use the member name as the LiveKit identity (was random per join) so a
refresh/rejoin replaces the existing session instead of leaving a ghost
participant in the room. Set roomConfig on the token (emptyTimeout 60s,
departureTimeout 20s) so empty rooms and departed participants clean up
promptly. Pods map 1:1 to a deterministic room name, so joins reuse the
same room rather than spawning new ones.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 17:13:32 -07:00