loki-mode 5.48.1 → 5.48.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 zero human intervention. Requires --dangerously-skip-permissions flag.
4
4
  ---
5
5
 
6
- # Loki Mode v5.48.1
6
+ # Loki Mode v5.48.2
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -68,15 +68,16 @@ VERIFY: Run tests. Check build. Validate against spec.
68
68
 
69
69
  ## PRIORITY 3: Autonomy Rules
70
70
 
71
- These rules are ABSOLUTE. Violating them is a critical failure.
71
+ These rules guide autonomous operation. Test results and code quality always take precedence.
72
72
 
73
73
  | Rule | Meaning |
74
74
  |------|---------|
75
- | **NEVER ask** | Do not output questions. Decide and act. |
76
- | **NEVER wait** | Do not pause for confirmation. Execute immediately. |
77
- | **NEVER stop** | There is always another improvement. Find it. |
78
- | **ALWAYS verify** | Code without tests is incomplete. Run tests. |
75
+ | **Decide and act** | Make decisions autonomously. Do not ask the user questions. |
76
+ | **Keep momentum** | Do not pause for confirmation. Move to the next task. |
77
+ | **Iterate continuously** | There is always another improvement. Find it. |
78
+ | **ALWAYS verify** | Code without tests is incomplete. Run tests. **Never ignore or delete failing tests.** |
79
79
  | **ALWAYS commit** | Atomic commits after each task. Checkpoint progress. |
80
+ | **Tests are sacred** | If tests fail, fix the code -- never delete or skip the tests. A passing test suite is a hard requirement. |
80
81
 
81
82
  ---
82
83
 
@@ -262,4 +263,4 @@ The following features are documented in skill modules but not yet fully automat
262
263
  | Quality gates 3-reviewer system | Implemented (v5.35.0) | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
263
264
  | Benchmarks (HumanEval, SWE-bench) | Infrastructure only | Runner scripts and datasets exist in `benchmarks/`; no published results |
264
265
 
265
- **v5.48.1 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
266
+ **v5.48.2 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 5.48.1
1
+ 5.48.2
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #===============================================================================
3
3
  # App Runner Module (v5.45.0)
4
4
  #
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #===============================================================================
3
3
  # Completion Council - Multi-Agent Completion Verification
4
4
  #
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode Stop Hook - Quality Gate Verification
3
3
  # Runs quality checks before allowing completion
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode SessionStart Hook
3
3
  # Loads memory context and initializes session state
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode SessionEnd Hook - Episode Storage
3
3
  # Stores session as episodic memory
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode PostToolUse Hook - Metrics Tracking
3
3
  # Tracks tool usage for efficiency metrics (async)
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode PreToolUse Hook - Bash Command Validation
3
3
  # Blocks dangerous commands, logs all executions
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #===============================================================================
3
3
  # Loki Mode - GitHub Issue Parser (v5.14.0)
4
4
  # Parses GitHub issues and extracts structured data for PRD generation
package/autonomy/loki CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #===============================================================================
3
3
  # Loki Mode CLI Wrapper
4
4
  # Command-line interface for Loki Mode
@@ -1460,9 +1460,12 @@ cmd_dashboard_start() {
1460
1460
  exit 1
1461
1461
  fi
1462
1462
 
1463
- # Determine python command
1463
+ # Determine python command -- prefer dashboard venv if available
1464
1464
  local python_cmd="python3"
1465
- if ! command -v python3 &> /dev/null; then
1465
+ local dashboard_venv="${SKILL_DIR}/dashboard/.venv"
1466
+ if [ -x "${dashboard_venv}/bin/python3" ]; then
1467
+ python_cmd="${dashboard_venv}/bin/python3"
1468
+ elif ! command -v python3 &> /dev/null; then
1466
1469
  python_cmd="python"
1467
1470
  fi
1468
1471
 
@@ -1510,19 +1513,29 @@ cmd_dashboard_start() {
1510
1513
  tls_info=" (TLS enabled)"
1511
1514
  fi
1512
1515
 
1513
- # Ensure dashboard Python dependencies are installed
1516
+ # Ensure dashboard Python dependencies via virtualenv (PEP 668 safe)
1514
1517
  if ! "$python_cmd" -c "import fastapi" 2>/dev/null; then
1515
- echo -e "${YELLOW}Installing dashboard dependencies...${NC}"
1518
+ echo -e "${YELLOW}Setting up dashboard virtualenv...${NC}"
1516
1519
  local req_file="${SKILL_DIR}/dashboard/requirements.txt"
1517
- if [ -f "$req_file" ]; then
1518
- pip3 install -q -r "$req_file" 2>/dev/null || pip install -q -r "$req_file" 2>/dev/null || {
1519
- echo -e "${RED}Failed to install dashboard dependencies${NC}"
1520
- echo "Run manually: pip install fastapi uvicorn pydantic websockets"
1521
- exit 1
1522
- }
1520
+ if ! [ -d "$dashboard_venv" ]; then
1521
+ python3 -m venv "$dashboard_venv" 2>/dev/null || python3.13 -m venv "$dashboard_venv" 2>/dev/null || true
1522
+ fi
1523
+ if [ -x "${dashboard_venv}/bin/python3" ]; then
1524
+ python_cmd="${dashboard_venv}/bin/python3"
1525
+ echo -e "${YELLOW}Installing dashboard dependencies into venv...${NC}"
1526
+ if [ -f "$req_file" ]; then
1527
+ "${dashboard_venv}/bin/pip" install -q -r "$req_file" 2>/dev/null || {
1528
+ echo -e "${YELLOW}Pinned deps failed, installing core deps...${NC}"
1529
+ "${dashboard_venv}/bin/pip" install -q fastapi uvicorn pydantic websockets 2>/dev/null || true
1530
+ }
1531
+ else
1532
+ "${dashboard_venv}/bin/pip" install -q fastapi uvicorn pydantic websockets 2>/dev/null || true
1533
+ fi
1523
1534
  else
1535
+ # Fallback: try direct pip (may fail on PEP 668 systems)
1524
1536
  pip3 install -q fastapi uvicorn pydantic websockets 2>/dev/null || pip install -q fastapi uvicorn pydantic websockets 2>/dev/null || {
1525
1537
  echo -e "${RED}Failed to install dashboard dependencies${NC}"
1538
+ echo "Run manually: python3 -m venv ${dashboard_venv} && ${dashboard_venv}/bin/pip install fastapi uvicorn pydantic websockets"
1526
1539
  exit 1
1527
1540
  }
1528
1541
  fi
@@ -3143,19 +3156,31 @@ cmd_api() {
3143
3156
  fi
3144
3157
  fi
3145
3158
 
3146
- # Ensure dashboard Python dependencies are installed
3147
- if ! python3 -c "import fastapi" 2>/dev/null; then
3148
- echo -e "${YELLOW}Installing dashboard dependencies...${NC}"
3149
- local req_file="${SKILL_DIR}/dashboard/requirements.txt"
3150
- if [ -f "$req_file" ]; then
3151
- pip3 install -q -r "$req_file" 2>/dev/null || pip install -q -r "$req_file" 2>/dev/null || {
3152
- echo -e "${RED}Failed to install dashboard dependencies${NC}"
3153
- echo "Run manually: pip install fastapi uvicorn pydantic websockets"
3154
- exit 1
3155
- }
3159
+ # Ensure dashboard Python dependencies via virtualenv (PEP 668 safe)
3160
+ local dashboard_venv="${SKILL_DIR}/dashboard/.venv"
3161
+ local api_python="python3"
3162
+ if [ -x "${dashboard_venv}/bin/python3" ]; then
3163
+ api_python="${dashboard_venv}/bin/python3"
3164
+ fi
3165
+ if ! "$api_python" -c "import fastapi" 2>/dev/null; then
3166
+ echo -e "${YELLOW}Setting up dashboard virtualenv...${NC}"
3167
+ if ! [ -d "$dashboard_venv" ]; then
3168
+ python3 -m venv "$dashboard_venv" 2>/dev/null || python3.13 -m venv "$dashboard_venv" 2>/dev/null || true
3169
+ fi
3170
+ if [ -x "${dashboard_venv}/bin/python3" ]; then
3171
+ api_python="${dashboard_venv}/bin/python3"
3172
+ local req_file="${SKILL_DIR}/dashboard/requirements.txt"
3173
+ if [ -f "$req_file" ]; then
3174
+ "${dashboard_venv}/bin/pip" install -q -r "$req_file" 2>/dev/null || {
3175
+ "${dashboard_venv}/bin/pip" install -q fastapi uvicorn pydantic websockets 2>/dev/null || true
3176
+ }
3177
+ else
3178
+ "${dashboard_venv}/bin/pip" install -q fastapi uvicorn pydantic websockets 2>/dev/null || true
3179
+ fi
3156
3180
  else
3157
3181
  pip3 install -q fastapi uvicorn pydantic websockets 2>/dev/null || {
3158
3182
  echo -e "${RED}Failed to install dashboard dependencies${NC}"
3183
+ echo "Run manually: python3 -m venv ${dashboard_venv} && ${dashboard_venv}/bin/pip install fastapi uvicorn pydantic websockets"
3159
3184
  exit 1
3160
3185
  }
3161
3186
  fi
@@ -3168,7 +3193,7 @@ cmd_api() {
3168
3193
  if [ -n "${LOKI_TLS_CERT:-}" ] && [ -n "${LOKI_TLS_KEY:-}" ]; then
3169
3194
  uvicorn_args="$uvicorn_args --ssl-certfile ${LOKI_TLS_CERT} --ssl-keyfile ${LOKI_TLS_KEY}"
3170
3195
  fi
3171
- LOKI_DIR="$LOKI_DIR" PYTHONPATH="$SKILL_DIR" nohup python3 -m uvicorn dashboard.server:app $uvicorn_args > "$LOKI_DIR/logs/api.log" 2>&1 &
3196
+ LOKI_DIR="$LOKI_DIR" PYTHONPATH="$SKILL_DIR" nohup "$api_python" -m uvicorn dashboard.server:app $uvicorn_args > "$LOKI_DIR/logs/api.log" 2>&1 &
3172
3197
  local new_pid=$!
3173
3198
  echo "$new_pid" > "$pid_file"
3174
3199
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #===============================================================================
3
3
  # Playwright Smoke Test Module (v5.46.0)
4
4
  #
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #===============================================================================
3
3
  # PRD Checklist Module (v5.44.0)
4
4
  #
package/autonomy/run.sh CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # shellcheck disable=SC2034 # Many variables are used by sourced scripts
3
3
  # shellcheck disable=SC2155 # Declare and assign separately (acceptable in this codebase)
4
4
  # shellcheck disable=SC2329 # Functions may be invoked indirectly or via dynamic dispatch
@@ -5147,19 +5147,40 @@ start_dashboard() {
5147
5147
  log_info "TLS enabled for dashboard"
5148
5148
  fi
5149
5149
 
5150
- # Ensure dashboard Python dependencies are installed
5150
+ # Ensure dashboard Python dependencies via virtualenv (PEP 668 safe)
5151
5151
  local skill_dir="${SCRIPT_DIR%/*}"
5152
5152
  local req_file="${skill_dir}/dashboard/requirements.txt"
5153
- if ! python3 -c "import fastapi" 2>/dev/null; then
5154
- log_step "Installing dashboard dependencies..."
5155
- if [ -f "$req_file" ]; then
5156
- pip3 install -q -r "$req_file" 2>/dev/null || pip install -q -r "$req_file" 2>/dev/null || {
5157
- log_warn "Failed to install dashboard dependencies"
5158
- log_warn "Run manually: pip install fastapi uvicorn pydantic websockets"
5153
+ local dashboard_venv="${skill_dir}/dashboard/.venv"
5154
+ local python_cmd="python3"
5155
+
5156
+ # Use venv python if available, otherwise set one up
5157
+ if [ -x "${dashboard_venv}/bin/python3" ]; then
5158
+ python_cmd="${dashboard_venv}/bin/python3"
5159
+ fi
5160
+
5161
+ if ! "$python_cmd" -c "import fastapi" 2>/dev/null; then
5162
+ log_step "Setting up dashboard virtualenv..."
5163
+ if ! [ -d "$dashboard_venv" ]; then
5164
+ python3 -m venv "$dashboard_venv" 2>/dev/null || python3.13 -m venv "$dashboard_venv" 2>/dev/null || {
5165
+ log_warn "Failed to create virtualenv, trying direct pip install..."
5159
5166
  }
5167
+ fi
5168
+ if [ -x "${dashboard_venv}/bin/python3" ]; then
5169
+ python_cmd="${dashboard_venv}/bin/python3"
5170
+ log_step "Installing dashboard dependencies into venv..."
5171
+ if [ -f "$req_file" ]; then
5172
+ "${dashboard_venv}/bin/pip" install -q -r "$req_file" 2>/dev/null || {
5173
+ log_warn "Pinned deps failed, installing core deps..."
5174
+ "${dashboard_venv}/bin/pip" install -q fastapi uvicorn pydantic websockets 2>/dev/null || true
5175
+ }
5176
+ else
5177
+ "${dashboard_venv}/bin/pip" install -q fastapi uvicorn pydantic websockets 2>/dev/null || true
5178
+ fi
5160
5179
  else
5180
+ # Fallback: try direct pip (may fail on PEP 668 systems)
5161
5181
  pip3 install -q fastapi uvicorn pydantic websockets 2>/dev/null || pip install -q fastapi uvicorn pydantic websockets 2>/dev/null || {
5162
5182
  log_warn "Failed to install dashboard dependencies"
5183
+ log_warn "Run manually: python3 -m venv ${dashboard_venv} && ${dashboard_venv}/bin/pip install fastapi uvicorn pydantic websockets"
5163
5184
  }
5164
5185
  fi
5165
5186
  fi
@@ -5168,7 +5189,7 @@ start_dashboard() {
5168
5189
  # Dashboard module is at project root (parent of autonomy/)
5169
5190
  # LOKI_SKILL_DIR tells server.py where to find static files
5170
5191
  LOKI_TLS_CERT="${LOKI_TLS_CERT:-}" LOKI_TLS_KEY="${LOKI_TLS_KEY:-}" \
5171
- LOKI_SKILL_DIR="${skill_dir}" PYTHONPATH="${skill_dir}" nohup python3 -m dashboard.server > "$log_file" 2>&1 &
5192
+ LOKI_SKILL_DIR="${skill_dir}" PYTHONPATH="${skill_dir}" nohup "$python_cmd" -m dashboard.server > "$log_file" 2>&1 &
5172
5193
  DASHBOARD_PID=$!
5173
5194
 
5174
5195
  # Save PID for later cleanup
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #===============================================================================
3
3
  # Loki Mode - Docker Sandbox Manager
4
4
  # Provides isolated container execution for enhanced security
package/autonomy/serve.sh CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # shellcheck disable=SC2034 # Unused variables are for future use or exported
3
3
  # shellcheck disable=SC2155 # Declare and assign separately
4
4
  #===============================================================================
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "5.48.1"
10
+ __version__ = "5.48.2"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -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:** v5.48.1
5
+ **Version:** v5.48.2
6
6
 
7
7
  ---
8
8
 
package/events/emit.sh CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode Event Emitter - Bash helper for emitting events
3
3
  #
4
4
  # Usage:
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode Learning Aggregator - Bash CLI helper
3
3
  #
4
4
  # Runs learning signal aggregation and displays results.
package/learning/emit.sh CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode Learning Signal Emitter - Bash helper
3
3
  #
4
4
  # Emits learning signals by calling the Python learning emitter.
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Loki Mode Learning Suggestions - Bash CLI helper
3
3
  #
4
4
  # Shows context-aware suggestions based on aggregated learnings.
package/mcp/__init__.py CHANGED
@@ -21,4 +21,4 @@ try:
21
21
  except ImportError:
22
22
  __all__ = ['mcp']
23
23
 
24
- __version__ = '5.48.1'
24
+ __version__ = '5.48.2'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loki-mode",
3
- "version": "5.48.1",
3
+ "version": "5.48.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
  "autonomi",
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Claude Code Provider Configuration
3
3
  # Shell-sourceable config for loki-mode multi-provider support
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # OpenAI Codex CLI Provider Configuration
3
3
  # Shell-sourceable config for loki-mode multi-provider support
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Google Gemini CLI Provider Configuration
3
3
  # Shell-sourceable config for loki-mode multi-provider support
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  # Provider Loader for loki-mode
3
3
  # Sources the appropriate provider configuration based on LOKI_PROVIDER
4
4