rootsight 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rootsight/__init__.py +40 -0
- rootsight/advisor.py +728 -0
- rootsight/agent.py +99 -0
- rootsight/assistant.py +623 -0
- rootsight/blocks.py +1077 -0
- rootsight/catalog.py +145 -0
- rootsight/cicd.py +622 -0
- rootsight/cli.py +675 -0
- rootsight/cloud.py +345 -0
- rootsight/codebase.py +680 -0
- rootsight/config/catalog.yaml +300 -0
- rootsight/config/cloud_services.yaml +104 -0
- rootsight/config/provider_services.json +1 -0
- rootsight/config/rl_costly.yaml +63 -0
- rootsight/config/rl_default.yaml +54 -0
- rootsight/config/sre_notes.yaml +271 -0
- rootsight/connectors.py +519 -0
- rootsight/dashboard.py +1250 -0
- rootsight/demo.py +66 -0
- rootsight/detect.py +131 -0
- rootsight/device.py +202 -0
- rootsight/env.py +165 -0
- rootsight/evaluate.py +198 -0
- rootsight/evidence.py +292 -0
- rootsight/explain.py +535 -0
- rootsight/guard.py +101 -0
- rootsight/incidents.py +371 -0
- rootsight/infra.py +701 -0
- rootsight/investigate.py +337 -0
- rootsight/llm.py +358 -0
- rootsight/llm_tune.py +433 -0
- rootsight/models/default/cascade.pkl.xz +0 -0
- rootsight/models/default/guard.json +1 -0
- rootsight/models/default/metadata.json +13 -0
- rootsight/observation.py +246 -0
- rootsight/panels.py +324 -0
- rootsight/paths.py +115 -0
- rootsight/policies.py +226 -0
- rootsight/replay.py +92 -0
- rootsight/retrain.py +259 -0
- rootsight/scenarios.py +488 -0
- rootsight/setup_files.py +299 -0
- rootsight/slack.py +191 -0
- rootsight/stack.py +305 -0
- rootsight/supervised.py +135 -0
- rootsight/tools.py +166 -0
- rootsight/train.py +228 -0
- rootsight/vault.py +148 -0
- rootsight/web/404/index.html +1 -0
- rootsight/web/404.html +1 -0
- rootsight/web/__next.__PAGE__.txt +36 -0
- rootsight/web/__next._full.txt +33 -0
- rootsight/web/__next._tree.txt +6 -0
- rootsight/web/_next/static/chunks/0-o74znen4827.js +31 -0
- rootsight/web/_next/static/chunks/00ago4-oi8b7s.js +1 -0
- rootsight/web/_next/static/chunks/0_6xtfl8i25kg.js +22 -0
- rootsight/web/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- rootsight/web/_next/static/chunks/0eo_6vgcrj18j.js +1 -0
- rootsight/web/_next/static/chunks/0i9_h0_zogq9k.js +1 -0
- rootsight/web/_next/static/chunks/0l0ggt2ab7xk_.js +1 -0
- rootsight/web/_next/static/chunks/0o0-3a_q_md_l.js +1 -0
- rootsight/web/_next/static/chunks/0o7wk_04elxhu.js +6 -0
- rootsight/web/_next/static/chunks/0umf92h1sb77c.js +1 -0
- rootsight/web/_next/static/chunks/0z3yikbjw1fdc.js +1 -0
- rootsight/web/_next/static/chunks/0z4eyromaufc9.js +1 -0
- rootsight/web/_next/static/chunks/16kw5f1xcz19h.js +1 -0
- rootsight/web/_next/static/chunks/1alp732igntdn.js +1 -0
- rootsight/web/_next/static/chunks/1ix59xuhq-q14.css +1 -0
- rootsight/web/_next/static/chunks/22q4rsj0-nwuk.css +1 -0
- rootsight/web/_next/static/chunks/23vmn3rf45_63.js +1 -0
- rootsight/web/_next/static/chunks/26h7kfekwoiue.js +1 -0
- rootsight/web/_next/static/chunks/2aweo6zrt819x.js +1 -0
- rootsight/web/_next/static/chunks/2e9p8z1_-wfoz.js +1 -0
- rootsight/web/_next/static/chunks/2h-5ajbkt8j_r.js +3 -0
- rootsight/web/_next/static/chunks/2h3are88dm7i6.js +1 -0
- rootsight/web/_next/static/chunks/2ognsvh8ttbt7.js +1 -0
- rootsight/web/_next/static/chunks/2ooptwigcnk9y.js +1 -0
- rootsight/web/_next/static/chunks/2x1f3xwifsf35.js +1 -0
- rootsight/web/_next/static/chunks/36sg8kttb04c2.css +2 -0
- rootsight/web/_next/static/chunks/3dmm3v_fq28gc.js +1 -0
- rootsight/web/_next/static/chunks/3gs-qra1gcckn.js +1 -0
- rootsight/web/_next/static/chunks/3srfjz42u14tx.js +1 -0
- rootsight/web/_next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
- rootsight/web/_next/static/dL0NFdt1pLHSL2kzfMWRB/_buildManifest.js +11 -0
- rootsight/web/_next/static/dL0NFdt1pLHSL2kzfMWRB/_clientMiddlewareManifest.js +1 -0
- rootsight/web/_next/static/dL0NFdt1pLHSL2kzfMWRB/_ssgManifest.js +1 -0
- rootsight/web/_next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- rootsight/web/_next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- rootsight/web/_next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- rootsight/web/_next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- rootsight/web/_next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- rootsight/web/_next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- rootsight/web/_next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- rootsight/web/_next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- rootsight/web/_next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- rootsight/web/_next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- rootsight/web/_next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- rootsight/web/_not-found/__next._full.txt +28 -0
- rootsight/web/_not-found/__next._not-found.__PAGE__.txt +34 -0
- rootsight/web/_not-found/__next._tree.txt +5 -0
- rootsight/web/_not-found/index.html +1 -0
- rootsight/web/_not-found/index.txt +28 -0
- rootsight/web/agent/__next._full.txt +36 -0
- rootsight/web/agent/__next._tree.txt +7 -0
- rootsight/web/agent/__next.agent.__PAGE__.txt +40 -0
- rootsight/web/agent/index.html +1 -0
- rootsight/web/agent/index.txt +36 -0
- rootsight/web/agent/try/__next._full.txt +37 -0
- rootsight/web/agent/try/__next._tree.txt +8 -0
- rootsight/web/agent/try/__next.agent.try.__PAGE__.txt +42 -0
- rootsight/web/agent/try/index.html +1 -0
- rootsight/web/agent/try/index.txt +37 -0
- rootsight/web/ask/__next._full.txt +35 -0
- rootsight/web/ask/__next._tree.txt +7 -0
- rootsight/web/ask/__next.ask.__PAGE__.txt +39 -0
- rootsight/web/ask/index.html +1 -0
- rootsight/web/ask/index.txt +35 -0
- rootsight/web/errors/__next._full.txt +36 -0
- rootsight/web/errors/__next._tree.txt +7 -0
- rootsight/web/errors/__next.errors.__PAGE__.txt +40 -0
- rootsight/web/errors/index.html +1 -0
- rootsight/web/errors/index.txt +36 -0
- rootsight/web/how-it-works/__next._full.txt +53 -0
- rootsight/web/how-it-works/__next._tree.txt +7 -0
- rootsight/web/how-it-works/__next.how-it-works.__PAGE__.txt +58 -0
- rootsight/web/how-it-works/index.html +1 -0
- rootsight/web/how-it-works/index.txt +53 -0
- rootsight/web/incidents/__next._full.txt +36 -0
- rootsight/web/incidents/__next._tree.txt +7 -0
- rootsight/web/incidents/__next.incidents.__PAGE__.txt +40 -0
- rootsight/web/incidents/index.html +1 -0
- rootsight/web/incidents/index.txt +36 -0
- rootsight/web/index.html +1 -0
- rootsight/web/index.txt +33 -0
- rootsight/web/infrastructure/__next._full.txt +38 -0
- rootsight/web/infrastructure/__next._tree.txt +8 -0
- rootsight/web/infrastructure/__next.infrastructure.__PAGE__.txt +42 -0
- rootsight/web/infrastructure/index.html +1 -0
- rootsight/web/infrastructure/index.txt +38 -0
- rootsight/web/monitoring/__next._full.txt +38 -0
- rootsight/web/monitoring/__next._tree.txt +7 -0
- rootsight/web/monitoring/__next.monitoring.__PAGE__.txt +42 -0
- rootsight/web/monitoring/index.html +1 -0
- rootsight/web/monitoring/index.txt +38 -0
- rootsight/web/resources/__next._full.txt +36 -0
- rootsight/web/resources/__next._tree.txt +7 -0
- rootsight/web/resources/__next.resources.__PAGE__.txt +40 -0
- rootsight/web/resources/index.html +1 -0
- rootsight/web/resources/index.txt +36 -0
- rootsight/web/results/__next._full.txt +38 -0
- rootsight/web/results/__next._tree.txt +7 -0
- rootsight/web/results/__next.results.__PAGE__.txt +42 -0
- rootsight/web/results/index.html +1 -0
- rootsight/web/results/index.txt +38 -0
- rootsight/web/training/__next._full.txt +38 -0
- rootsight/web/training/__next._tree.txt +7 -0
- rootsight/web/training/__next.training.__PAGE__.txt +42 -0
- rootsight/web/training/index.html +1 -0
- rootsight/web/training/index.txt +38 -0
- rootsight/web/trust/__next._full.txt +36 -0
- rootsight/web/trust/__next._tree.txt +7 -0
- rootsight/web/trust/__next.trust.__PAGE__.txt +40 -0
- rootsight/web/trust/index.html +1 -0
- rootsight/web/trust/index.txt +36 -0
- rootsight/wizard.py +840 -0
- rootsight-0.1.0.dist-info/METADATA +51 -0
- rootsight-0.1.0.dist-info/RECORD +170 -0
- rootsight-0.1.0.dist-info/WHEEL +5 -0
- rootsight-0.1.0.dist-info/entry_points.txt +2 -0
- rootsight-0.1.0.dist-info/top_level.txt +1 -0
rootsight/__init__.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""rootsight: a Gymnasium RL environment for incident investigation.
|
|
2
|
+
|
|
3
|
+
Each episode: an alert fires on a service with one hidden root cause. The agent
|
|
4
|
+
calls diagnostic tools (metrics, deploy history, commit diff, runbook) and then
|
|
5
|
+
submits one of 4 causes or escalates. Reward: +1 correct, -1 wrong, -0.25
|
|
6
|
+
escalate, small cost per tool call, max 8 actions.
|
|
7
|
+
|
|
8
|
+
How the files connect (top to bottom = dependency order):
|
|
9
|
+
|
|
10
|
+
scenarios.py seeded incident generator; hidden cause + precomputed tool responses
|
|
11
|
+
tools.py action registry, ToolAdapter interface, SimulatedTools, Transcript
|
|
12
|
+
observation.py Transcript -> 35 features in [0, 1] (never sees the hidden cause)
|
|
13
|
+
env.py IncidentEnv(gym.Env): step/reset, rewards, termination vs truncation
|
|
14
|
+
policies.py baselines (random, fixed-order, heuristic, supervised, cascade) + DQN wrapper
|
|
15
|
+
evaluate.py runs any policy on frozen test fixtures -> JSON/CSV/Markdown
|
|
16
|
+
train.py trains DQN (stable-baselines3), picks checkpoint on validation
|
|
17
|
+
supervised.py trains classifier baselines to check whether RL is actually needed
|
|
18
|
+
explain.py template + local-LLM explanations behind a grounding guardrail; LLM eval
|
|
19
|
+
agent.py investigate(alert, tools, policy): the production-style entry point
|
|
20
|
+
demo.py replays one incident with every policy, reveals the answer after
|
|
21
|
+
live.py LiveTools: same ToolAdapter backed by real Prometheus + git
|
|
22
|
+
live_scenarios.py injects real faults into the Docker stack, runs every policy on the alert
|
|
23
|
+
dashboard.py local web dashboard (+ dashboard.html): results, training, agent at work,
|
|
24
|
+
errors, live incidents, approvals/resources, human feedback
|
|
25
|
+
|
|
26
|
+
Run from the repo root (Python 3.10+):
|
|
27
|
+
|
|
28
|
+
pip install -e ".[rl,dev]"
|
|
29
|
+
pytest # 31 checks, ~10s
|
|
30
|
+
python -m rootsight.train --seed 7 # ~25s on CPU
|
|
31
|
+
python -m rootsight.demo --checkpoint artifacts/rl/seed7/best_model.zip --episode-seed 42
|
|
32
|
+
python -m rootsight.evaluate --split test --checkpoints artifacts/rl/seed7/best_model.zip
|
|
33
|
+
|
|
34
|
+
Minimal use as a plain Gymnasium env:
|
|
35
|
+
|
|
36
|
+
from rootsight.env import IncidentEnv
|
|
37
|
+
env = IncidentEnv(split="train")
|
|
38
|
+
obs, info = env.reset(seed=0)
|
|
39
|
+
obs, reward, terminated, truncated, info = env.step(env.action_space.sample())
|
|
40
|
+
"""
|