Files
loki/scripts
e993d8ca83 feat(integrations): publish closed runs to OrangeCat activity (run→wall loop) (#134)
Item 2 of the ledger-and-loop build sequence: one producer, two products.
OC's ingest bus (/api/v1/timeline/publish) has been built and waiting —
this adds the FleetCrown-side producer so successful agent runs surface
as real activity on the OC wall and maker profiles.

- config: run_closed promote policy (success-only — the wall is a curated
  projection, failed/reaped runs stay private)
- orangecat-run-moment: pure builder (external_id = run id → idempotent);
  token/cost figures from the run ledger ride along in content
- promoteRunClose: resolves the project back-link (projectKey =
  user_projects.name), skips unpublished projects/unlinked users
- hook: updateOrchestrationRun fires it on every success close, beside
  resolveFeedbackForRun (fire-and-forget, never blocks the close)
- reconcile: daily promote backfill re-emits the last 14 days of
  successful runs — a dropped emit self-heals
- test: scripts/test/oc-run-promote.ts (pure, auto-discovered)

Co-authored-by: test <test@test>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 13:29:08 +02:00
..