terraphim / terraphim/terraphim-ai

Phase 4: Structured activity log for ADF

Aperta
#641 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Rust
Stelle
62
Fork
5
Merge medio
2h 27m
PR unite (30g)
1

Descrizione

Parent Epic

#637

Summary

Extend telemetry JSONL with structured activity events for all orchestrator mutations and agent lifecycle events.

Changes Required

terraphim_orchestrator
  • New activity.rs module with ActivityEvent enum and JSONL writer
  • Events to log:
    • ConfigChanged {before_hash, after_hash, changed_keys}
    • BudgetWarning {agent, spent_cents, budget_cents, percentage}
    • BudgetPaused {agent, spent_cents, budget_cents}
    • AgentDriftDetected {agent, score, level, action_taken}
    • AgentRestarted {agent, reason, restart_count, session_resumed}
    • CompoundReviewCompleted {findings_count, pr_created, duration}
    • ApprovalRequested {id, type, agent}
    • ApprovalDecided {id, decision, actor}
  • Schema: {timestamp, event_type, agent_name, details: {}, actor: "system"|"human"|agent_name}
  • Write to activity.jsonl in logs directory
Integration
  • Replace ad-hoc telemetry.jsonl writes with structured ActivityEvent emissions
  • Activity log is append-only, rotatable by external logrotate

Reference

  • Paperclip activity log: packages/db/src/schema/activity_log.ts
  • Paperclip activity service: server/src/services/activity.ts

Acceptance Criteria

  • All orchestrator mutations emit structured activity events
  • Events written to activity.jsonl with consistent schema
  • Events include timestamp, event_type, agent_name, details
  • Backward compatible with existing telemetry (can coexist)
  • adf activity CLI command to tail/query recent events

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start with the proposed terraphim_orchestrator/activity.rs module and review the Paperclip activity log references at packages/db/src/schema/activity_log.ts and server/src/services/activity.ts. Trace existing telemetry.jsonl writes before defining the structured event integration. Done means orchestrator mutations emit consistent append-only activity.jsonl events, existing telemetry remains compatible, and the adf activity CLI command can tail or query recent events.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
cli, observability-sre
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.