Commit eb9130b
committed
feat: framework refactor — Phases 1-9 + ASR MVP + risk-rated gateway
Evolves the incident orchestrator into a generic agent-orchestration
framework with ASR (autonomous SRE) as the flagship example app, plus
code-review as a second example proving genericity.
Phase 1 — Domain extraction
- src/orchestrator → src/runtime + repository split
- examples/incident_management/ + examples/code_review/
Phase 2 — Memory + extensible state + checkpointer
- Generic Session base; IncidentState subclasses it
- SessionStore[StateT] with extra_fields JSON tunnel
- AsyncSqliteSaver / AsyncPostgresSaver via make_checkpointer
Phase 3 — Multi-session OrchestratorService
- Long-lived asyncio loop on a daemon thread
- submit_async helper avoids deadlocks on httpx ASGITransport
- SessionCapExceeded backpressure
Phase 4 — Risk-rated tool gateway + prod-HITL
- low/medium/high risk tiers, prod-overrides applied first
- _GatedToolMarker idempotence guard prevents wrap-of-wrap
- P4-I: pending-approval timeout watchdog (configurable seconds)
Phase 5 — Trigger registry
- api / webhook / schedule / plugin transports + idempotency
Phase 6 — Agent kinds (responsive / supervisor / monitor)
- Skill.kind discriminator with per-kind validators
Phase 7 — Two-stage dedup pipeline
- Embedding similarity → LLM Pydantic-typed structured output
- parent_session_id + dedup_rationale on Session
- parse-failure observability via structured warnings + counter
Phase 8 — Code-review example app proving genericity
Phase 9 — ASR MVP supervisor framework hook (P9-9h)
- Skill.runner dotted-path with fail-fast YAML resolution
- default_supervisor_runner wires hydrate_and_gate
- FS-backed memory (KG, releases, playbooks); seeds at examples/.../seeds/
Framework hardening
- FrameworkAppConfig refactor closes 4 framework→app leaks
- Generic StateT bound, app-overridable id_format + to_agent_input
- SessionStartBody.submitter dict (replaces reporter_id/reporter_team)
- start_session(state_overrides=...) (replaces environment kwarg)
- Genericity ratchet (scripts/check_genericity.py) at baseline 139
Build / ops
- Single-file bundle: dist/app.py + dist/apps/{incident-management,code-review}.py
- SQLite WAL + BEGIN IMMEDIATE + busy_timeout=30000 across stores
- APScheduler in-process, optional [postgres] extra for air-gapped deploys
Tests: 754 passed, 3 skipped.1 parent 5315c1c commit eb9130b
226 files changed
Lines changed: 60455 additions & 4922 deletions
File tree
- config
- dist
- apps
- docs
- superpowers
- plans
- research
- specs
- examples
- code_review
- skills
- _common
- analyzer
- intake
- recommender
- incident_management
- asr
- seeds
- kg
- playbooks
- releases
- skills
- _common
- asr_supervisor
- deep_investigator
- intake
- resolution
- triage
- incidents/faiss
- scripts
- src
- orchestrator
- mcp_servers
- storage
- runtime
- agents
- mcp_servers
- storage
- tools
- triggers
- transports
- tests
- fixtures/code_review
- test_triggers
- ui
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 67 | | |
77 | | - | |
| 68 | + | |
78 | 69 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 70 | | |
86 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
0 commit comments