loki-mode 6.26.1 → 6.26.2

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.
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Multi-agent autonomous startup system. Triggers on "Loki Mode". Takes PRD to deployed product with minimal human intervention. Requires --dangerously-skip-permissions flag.
4
4
  ---
5
5
 
6
- # Loki Mode v6.26.1
6
+ # Loki Mode v6.26.2
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -267,4 +267,4 @@ The following features are documented in skill modules but not yet fully automat
267
267
  | Quality gates 3-reviewer system | Implemented (v5.35.0) | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
268
268
  | Benchmarks (HumanEval, SWE-bench) | Infrastructure only | Runner scripts and datasets exist in `benchmarks/`; no published results |
269
269
 
270
- **v6.26.1 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
270
+ **v6.26.2 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 6.26.1
1
+ 6.26.2
package/autonomy/run.sh CHANGED
@@ -9347,7 +9347,6 @@ cleanup() {
9347
9347
  if type app_runner_cleanup &>/dev/null; then
9348
9348
  app_runner_cleanup
9349
9349
  fi
9350
- stop_dashboard
9351
9350
  stop_status_monitor
9352
9351
  kill_all_registered
9353
9352
  rm -f "$loki_dir/loki.pid" 2>/dev/null
@@ -9379,7 +9378,6 @@ except (json.JSONDecodeError, OSError): pass
9379
9378
  if type app_runner_cleanup &>/dev/null; then
9380
9379
  app_runner_cleanup
9381
9380
  fi
9382
- stop_dashboard
9383
9381
  stop_status_monitor
9384
9382
  kill_all_registered
9385
9383
  rm -f "$loki_dir/loki.pid" "$loki_dir/PAUSE" 2>/dev/null
@@ -9974,7 +9972,6 @@ main() {
9974
9972
  if type app_runner_cleanup &>/dev/null; then
9975
9973
  app_runner_cleanup
9976
9974
  fi
9977
- stop_dashboard
9978
9975
  stop_status_monitor
9979
9976
  local loki_dir="${TARGET_DIR:-.}/.loki"
9980
9977
  rm -f "$loki_dir/loki.pid" 2>/dev/null
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "6.26.1"
10
+ __version__ = "6.26.2"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -286,43 +286,6 @@ manager = ConnectionManager()
286
286
  start_time = datetime.now(timezone.utc)
287
287
 
288
288
 
289
- async def _orphan_watchdog():
290
- """Background task that shuts down dashboard if the parent session dies.
291
-
292
- When the session process is killed (SIGKILL), the cleanup trap never runs
293
- and the dashboard is left orphaned. This watchdog checks the session PID
294
- every 30 seconds and initiates shutdown if the session is gone.
295
- """
296
- loki_dir = _get_loki_dir()
297
- pid_file = loki_dir / "loki.pid"
298
- # Wait 60s before first check to let session fully start
299
- await asyncio.sleep(60)
300
- while True:
301
- try:
302
- if pid_file.exists():
303
- pid = int(pid_file.read_text().strip())
304
- try:
305
- os.kill(pid, 0) # Check if process exists
306
- except OSError:
307
- # Session PID is dead -- we're orphaned
308
- logger.warning(
309
- "Session PID %d is gone. Dashboard shutting down to avoid orphan.", pid
310
- )
311
- # Clean up our own PID file
312
- dash_pid = loki_dir / "dashboard" / "dashboard.pid"
313
- dash_pid.unlink(missing_ok=True)
314
- # Give a moment for any in-flight requests
315
- await asyncio.sleep(2)
316
- os._exit(0)
317
- # If PID file doesn't exist and we've been running >2 min, also shut down
318
- elif time.time() - _dashboard_start_time > 120:
319
- logger.warning("No session PID file found. Dashboard shutting down.")
320
- os._exit(0)
321
- except (ValueError, OSError):
322
- pass
323
- await asyncio.sleep(30)
324
-
325
-
326
289
  _dashboard_start_time = time.time()
327
290
 
328
291
 
@@ -332,11 +295,8 @@ async def lifespan(app: FastAPI):
332
295
  # Startup
333
296
  await init_db()
334
297
  _telemetry.send_telemetry("dashboard_start")
335
- # Start orphan watchdog
336
- watchdog_task = asyncio.create_task(_orphan_watchdog())
337
298
  yield
338
299
  # Shutdown
339
- watchdog_task.cancel()
340
300
  await close_db()
341
301
 
342
302
 
@@ -436,6 +396,26 @@ async def get_status() -> StatusResponse:
436
396
  loki_dir = _get_loki_dir()
437
397
  uptime = (datetime.now(timezone.utc) - start_time).total_seconds()
438
398
 
399
+ # Read VERSION file early (independent of .loki/ dir)
400
+ version = "unknown"
401
+ dashboard_dir = os.path.dirname(__file__)
402
+ project_root = os.path.dirname(dashboard_dir)
403
+ version_file = os.path.join(project_root, "VERSION")
404
+ if os.path.isfile(version_file):
405
+ try:
406
+ with open(version_file) as vf:
407
+ version = vf.read().strip()
408
+ except (OSError, IOError) as e:
409
+ logger.warning(f"Failed to read VERSION file: {e}")
410
+
411
+ # If .loki/ directory doesn't exist, return idle status immediately
412
+ if not loki_dir.is_dir():
413
+ return StatusResponse(
414
+ status="idle",
415
+ version=version,
416
+ uptime_seconds=uptime,
417
+ )
418
+
439
419
  # Read dashboard-state.json (written by run.sh every 2 seconds)
440
420
  state_file = loki_dir / "dashboard-state.json"
441
421
  pid_file = loki_dir / "loki.pid"
@@ -450,18 +430,6 @@ async def get_status() -> StatusResponse:
450
430
  current_task = ""
451
431
  pending_tasks = 0
452
432
  running_agents = 0
453
- version = "unknown"
454
-
455
- # Read VERSION file
456
- dashboard_dir = os.path.dirname(__file__)
457
- project_root = os.path.dirname(dashboard_dir)
458
- version_file = os.path.join(project_root, "VERSION")
459
- if os.path.isfile(version_file):
460
- try:
461
- with open(version_file) as vf:
462
- version = vf.read().strip()
463
- except (OSError, IOError) as e:
464
- logger.warning(f"Failed to read VERSION file: {e}")
465
433
 
466
434
  # Read dashboard state
467
435
  if state_file.exists():
@@ -2,7 +2,7 @@
2
2
 
3
3
  The flagship product of [Autonomi](https://www.autonomi.dev/). Complete installation instructions for all platforms and use cases.
4
4
 
5
- **Version:** v6.26.1
5
+ **Version:** v6.26.2
6
6
 
7
7
  ---
8
8
 
package/mcp/__init__.py CHANGED
@@ -57,4 +57,4 @@ try:
57
57
  except ImportError:
58
58
  __all__ = ['mcp']
59
59
 
60
- __version__ = '6.26.1'
60
+ __version__ = '6.26.2'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loki-mode",
3
- "version": "6.26.1",
3
+ "version": "6.26.2",
4
4
  "description": "Loki Mode by Autonomi - Multi-agent autonomous startup system for Claude Code, Codex CLI, and Gemini CLI",
5
5
  "keywords": [
6
6
  "agent",