adelie-ai 0.2.4 → 0.2.5

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.
@@ -194,6 +194,9 @@ class AdelieApp:
194
194
  workspace=str(cfg.PROJECT_ROOT),
195
195
  )
196
196
 
197
+ # Start dashboard server FIRST (so _setup_logger can reference it)
198
+ self._start_dashboard(cfg)
199
+
197
200
  # Setup UILogger
198
201
  self._setup_logger()
199
202
 
@@ -203,9 +206,6 @@ class AdelieApp:
203
206
  # Wire orchestrator callbacks
204
207
  self._wire_orchestrator()
205
208
 
206
- # Start dashboard server
207
- self._start_dashboard(cfg)
208
-
209
209
  self._real_console.print("[dim]Type '/help' for a list of commands.[/dim]")
210
210
  self._real_console.print()
211
211
 
@@ -251,11 +251,11 @@ class AdelieApp:
251
251
  """Create UILogger and wire callbacks."""
252
252
  # Use the saved real console so callbacks never recurse through UILogger
253
253
  real_con = self._real_console
254
- ds = self._dashboard_state # may be None if dashboard disabled
255
254
  self._ui_logger = UILogger()
256
255
 
257
256
  def _on_agent_update(name, info):
258
257
  print_agent_event(name, info)
258
+ ds = self._dashboard_state
259
259
  if ds:
260
260
  ds.update_agent(name, {
261
261
  "state": info.state.value if hasattr(info, 'state') else str(info.state) if hasattr(info, 'state') else "idle",
@@ -265,6 +265,7 @@ class AdelieApp:
265
265
 
266
266
  def _on_log(category, obj):
267
267
  real_con.print(obj)
268
+ ds = self._dashboard_state
268
269
  if ds:
269
270
  import re
270
271
  msg = re.sub(r'\[/?[^\]]*\]', '', str(obj))
@@ -272,11 +273,13 @@ class AdelieApp:
272
273
 
273
274
  def _on_cycle_start(it, ph, st):
274
275
  print_cycle_header(it, ph, st)
276
+ ds = self._dashboard_state
275
277
  if ds:
276
278
  ds.update_cycle(it, ph, st)
277
279
 
278
280
  def _on_cycle_metrics(m):
279
281
  print_cycle_metrics(m)
282
+ ds = self._dashboard_state
280
283
  if ds:
281
284
  ds.update_metrics({
282
285
  "total_tokens": getattr(m, 'total_tokens', 0),
@@ -293,6 +296,7 @@ class AdelieApp:
293
296
  self._ui_logger.on_cycle_start = _on_cycle_start
294
297
  self._ui_logger.on_cycle_metrics = _on_cycle_metrics
295
298
 
299
+
296
300
  def _wire_orchestrator(self):
297
301
  """Wire orchestrator event callbacks."""
298
302
  def _on_agent_start(agent_name: str):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adelie-ai",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Adelie — Self-Communicating Autonomous AI Loop CLI",
5
5
  "bin": {
6
6
  "adelie": "bin/adelie.js"