plan-approve-once policy + cooler empty states + remove graph header
Backend: - proposePlan sets plan window in autonomy_settings (nomos:plan:<session>) - run handler checks plan window — auto-executes config_mutation commands within plan without per-action approval - planWindowActive function in server.go - Plan window cleaned up on completeTask (already covered by LIKE '%:' || ) Frontend: - Removed 'Session graph' header bar - Cooler empty states: Plan shows animated dots + 'Awaiting plan…', Activity shows pulsing dots + 'Waiting for activity…'
This commit is contained in:
@@ -464,6 +464,15 @@ func (s *store) proposePlan(ctx context.Context, sessionID string, steps []planS
|
||||
// rather than replace it (mirrors the mid-flight append above).
|
||||
_ = observability.Event(ctx, sqlcgen.New(s.pool), "plan.proposed", s.taskEntityPtr(ctx, sessionID),
|
||||
"info", "nomos", sessionID, map[string]any{"steps": out, "appended": anyStarted})
|
||||
// Record a plan-proposed window so the `run` handler knows a plan is
|
||||
// pending approval and can skip per-action approval for config_mutation
|
||||
// commands within the plan. Transitions to 'active' when the operator
|
||||
// approves (chat-assent or button). The window key is session-scoped;
|
||||
// one agent serves all sessions on this nomos instance.
|
||||
s.pool.Exec(ctx,
|
||||
`INSERT INTO autonomy_settings (key, value) VALUES ($1, 'proposed')
|
||||
ON CONFLICT (key) DO UPDATE SET value = 'proposed'`,
|
||||
"nomos:plan:"+sessionID)
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user