loki-mode 5.55.0 → 5.56.0

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 v5.55.0
6
+ # Loki Mode v5.56.0
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -263,4 +263,4 @@ The following features are documented in skill modules but not yet fully automat
263
263
  | Quality gates 3-reviewer system | Implemented (v5.35.0) | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
264
264
  | Benchmarks (HumanEval, SWE-bench) | Infrastructure only | Runner scripts and datasets exist in `benchmarks/`; no published results |
265
265
 
266
- **v5.55.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
266
+ **v5.56.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 5.55.0
1
+ 5.56.0
@@ -148,7 +148,8 @@ council_track_iteration() {
148
148
  fi
149
149
 
150
150
  # Store convergence data point
151
- local timestamp=$(date +%s)
151
+ local timestamp
152
+ timestamp=$(date +%s)
152
153
  local files_changed
153
154
  files_changed=$(git diff --name-only HEAD 2>/dev/null | wc -l | tr -d ' ')
154
155
 
@@ -16,7 +16,6 @@ if [ ! -f "$GATE_FILE" ]; then
16
16
  fi
17
17
 
18
18
  # Run quality gate checks
19
- GATES_PASSED=true
20
19
  GATE_RESULTS=()
21
20
 
22
21
  # Check for uncommitted changes warning
@@ -19,9 +19,9 @@ fi
19
19
  mkdir -p "$CWD/.loki/state" "$CWD/.loki/memory" "$CWD/.loki/logs"
20
20
 
21
21
  # Load memory context using environment variables (safe from injection)
22
- MEMORY_CONTEXT=""
23
22
  if [ -f "$CWD/.loki/memory/index.json" ]; then
24
- MEMORY_CONTEXT=$(LOKI_CWD="$CWD" LOKI_MEMORY_PATH="$CWD/.loki/memory" python3 -c '
23
+ # Memory context is loaded for side effects (engine initialization)
24
+ LOKI_CWD="$CWD" LOKI_MEMORY_PATH="$CWD/.loki/memory" python3 -c '
25
25
  import json
26
26
  import os
27
27
  import sys
@@ -37,7 +37,7 @@ try:
37
37
  print(json.dumps({"memories_loaded": stats}))
38
38
  except Exception as e:
39
39
  print(json.dumps({"error": str(e)}))
40
- ' 2>/dev/null || echo '{}')
40
+ ' 2>/dev/null || true
41
41
  fi
42
42
 
43
43
  # Escape special characters in SESSION_ID for JSON output
@@ -5,7 +5,6 @@
5
5
  INPUT=$(cat)
6
6
  SESSION_ID=$(echo "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('session_id',''))")
7
7
  CWD=$(echo "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('cwd',''))")
8
- TRANSCRIPT_PATH=$(echo "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('transcript_path',''))")
9
8
 
10
9
  # Store episode if memory system available
11
10
  if [ -d "$CWD/memory" ]; then
@@ -23,10 +23,8 @@ set -euo pipefail
23
23
  RED='\033[0;31m'
24
24
  GREEN='\033[0;32m'
25
25
  YELLOW='\033[1;33m'
26
- BLUE='\033[0;34m'
27
26
  CYAN='\033[0;36m'
28
27
  BOLD='\033[1m'
29
- DIM='\033[2m'
30
28
  NC='\033[0m'
31
29
 
32
30
  # Logging functions (consistent with run.sh patterns)
package/autonomy/loki CHANGED
@@ -5139,7 +5139,12 @@ print(json.dumps({'id': manifest.id, 'dir': str(pipeline.migration_dir)}))
5139
5139
  local secrets_found=0
5140
5140
  if command -v grep &>/dev/null; then
5141
5141
  local secret_patterns="(password|secret|api_key|apikey|token|private_key|AWS_SECRET|DB_PASS)\\s*[=:]\\s*['\"][^'\"]+['\"]"
5142
- secrets_found=$(grep -rEli "$secret_patterns" "$codebase_path" --include='*.js' --include='*.ts' --include='*.py' --include='*.rb' --include='*.go' --include='*.java' --include='*.env' --include='*.yml' --include='*.yaml' --include='*.json' --include='*.toml' --include='*.cfg' --include='*.ini' 2>/dev/null | wc -l | tr -d ' ')
5142
+ secrets_found=$(grep -rEli "$secret_patterns" "$codebase_path" --include='*.js' --include='*.ts' --include='*.py' --include='*.rb' --include='*.go' --include='*.java' --include='*.env' --include='*.yml' --include='*.yaml' --include='*.json' --include='*.toml' --include='*.cfg' --include='*.ini' 2>/dev/null || true)
5143
+ if [ -n "$secrets_found" ]; then
5144
+ secrets_found=$(echo "$secrets_found" | wc -l | tr -d ' ')
5145
+ else
5146
+ secrets_found=0
5147
+ fi
5143
5148
  fi
5144
5149
 
5145
5150
  if [ "$secrets_found" -gt 0 ]; then
@@ -250,7 +250,8 @@ create_worktree_sandbox() {
250
250
  local prd_path="${1:-}"
251
251
  local provider="${LOKI_PROVIDER:-claude}"
252
252
 
253
- local timestamp=$(date +%Y%m%d-%H%M%S)
253
+ local timestamp
254
+ timestamp=$(date +%Y%m%d-%H%M%S)
254
255
  local sandbox_name="${WORKTREE_PREFIX}-${timestamp}"
255
256
  local sandbox_branch="${WORKTREE_PREFIX}-${timestamp}"
256
257
  local sandbox_path="${WORKTREE_BASE}/${sandbox_name}"
@@ -274,7 +275,8 @@ create_worktree_sandbox() {
274
275
 
275
276
  # Check for existing sandbox
276
277
  if [[ -f "$WORKTREE_STATE_FILE" ]]; then
277
- local existing_path=$(jq -r '.sandbox_path // empty' "$WORKTREE_STATE_FILE" 2>/dev/null)
278
+ local existing_path
279
+ existing_path=$(jq -r '.sandbox_path // empty' "$WORKTREE_STATE_FILE" 2>/dev/null)
278
280
  if [[ -n "$existing_path" ]] && [[ -d "$existing_path" ]]; then
279
281
  log_warn "Existing sandbox found: $existing_path"
280
282
  log_info "Use 'loki sandbox stop' to stop it first."
@@ -341,7 +343,8 @@ start_worktree_sandbox() {
341
343
  create_worktree_sandbox "$prd_path" || return 1
342
344
  fi
343
345
 
344
- local sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
346
+ local sandbox_path
347
+ sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
345
348
 
346
349
  if [[ ! -d "$sandbox_path" ]]; then
347
350
  log_error "Sandbox path does not exist: $sandbox_path"
@@ -388,8 +391,10 @@ stop_worktree_sandbox() {
388
391
  return 0
389
392
  fi
390
393
 
391
- local sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
392
- local sandbox_branch=$(jq -r '.sandbox_branch' "$WORKTREE_STATE_FILE")
394
+ local sandbox_path
395
+ sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
396
+ local sandbox_branch
397
+ sandbox_branch=$(jq -r '.sandbox_branch' "$WORKTREE_STATE_FILE")
393
398
 
394
399
  log_info "Stopping worktree sandbox..."
395
400
 
@@ -427,9 +432,12 @@ worktree_sandbox_status() {
427
432
  return 0
428
433
  fi
429
434
 
430
- local sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
431
- local sandbox_branch=$(jq -r '.sandbox_branch' "$WORKTREE_STATE_FILE")
432
- local created_at=$(jq -r '.created_at' "$WORKTREE_STATE_FILE")
435
+ local sandbox_path
436
+ sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
437
+ local sandbox_branch
438
+ sandbox_branch=$(jq -r '.sandbox_branch' "$WORKTREE_STATE_FILE")
439
+ local created_at
440
+ created_at=$(jq -r '.created_at' "$WORKTREE_STATE_FILE")
433
441
 
434
442
  echo ""
435
443
  echo -e "${BOLD}Worktree Sandbox Status${NC}"
@@ -440,7 +448,8 @@ worktree_sandbox_status() {
440
448
  echo -e " Created: $created_at"
441
449
 
442
450
  if [[ -d "$sandbox_path" ]]; then
443
- local disk_usage=$(du -sh "$sandbox_path" 2>/dev/null | cut -f1)
451
+ local disk_usage
452
+ disk_usage=$(du -sh "$sandbox_path" 2>/dev/null | cut -f1)
444
453
  echo -e " Disk: $disk_usage"
445
454
 
446
455
  if [[ -f "$sandbox_path/.loki/STOP" ]]; then
@@ -482,7 +491,8 @@ worktree_sandbox_prompt() {
482
491
  return 1
483
492
  fi
484
493
 
485
- local sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
494
+ local sandbox_path
495
+ sandbox_path=$(jq -r '.sandbox_path' "$WORKTREE_STATE_FILE")
486
496
 
487
497
  if [[ ! -d "$sandbox_path" ]]; then
488
498
  log_error "Sandbox path does not exist"
@@ -516,7 +526,8 @@ cleanup_worktrees() {
516
526
  git worktree prune 2>/dev/null || true
517
527
 
518
528
  # Clean up orphaned branches
519
- local branches=$(git branch --list "${WORKTREE_PREFIX}*" 2>/dev/null)
529
+ local branches
530
+ branches=$(git branch --list "${WORKTREE_PREFIX}*" 2>/dev/null)
520
531
  while IFS= read -r branch; do
521
532
  branch=$(echo "$branch" | tr -d '* ')
522
533
  if [[ -n "$branch" ]]; then
@@ -642,6 +653,7 @@ start_docker_desktop_sandbox() {
642
653
  bash -c "$loki_cmd"
643
654
  }
644
655
 
656
+ # shellcheck disable=SC2120
645
657
  stop_docker_desktop_sandbox() {
646
658
  local remove="${1:-false}"
647
659
 
@@ -1071,8 +1083,10 @@ sandbox_serve() {
1071
1083
 
1072
1084
  if docker exec "$CONTAINER_NAME" test -f /workspace/package.json; then
1073
1085
  # Check for common dev server scripts
1074
- local has_dev=$(docker exec "$CONTAINER_NAME" jq -r '.scripts.dev // empty' /workspace/package.json 2>/dev/null)
1075
- local has_start=$(docker exec "$CONTAINER_NAME" jq -r '.scripts.start // empty' /workspace/package.json 2>/dev/null)
1086
+ local has_dev
1087
+ has_dev=$(docker exec "$CONTAINER_NAME" jq -r '.scripts.dev // empty' /workspace/package.json 2>/dev/null)
1088
+ local has_start
1089
+ has_start=$(docker exec "$CONTAINER_NAME" jq -r '.scripts.start // empty' /workspace/package.json 2>/dev/null)
1076
1090
 
1077
1091
  if [[ -n "$has_dev" ]]; then
1078
1092
  serve_cmd="npm run dev"
@@ -1184,7 +1198,8 @@ sandbox_phase() {
1184
1198
  fi
1185
1199
 
1186
1200
  # Get current phase from orchestrator state
1187
- local phase=$(docker exec "$CONTAINER_NAME" bash -c \
1201
+ local phase
1202
+ phase=$(docker exec "$CONTAINER_NAME" bash -c \
1188
1203
  "python3 -c \"import json; print(json.load(open('/workspace/.loki/state/orchestrator.json')).get('currentPhase', 'UNKNOWN'))\" 2>/dev/null" \
1189
1204
  || echo "UNKNOWN")
1190
1205
 
@@ -41,7 +41,7 @@ _loki_detect_channel() {
41
41
  loki_telemetry() {
42
42
  _loki_telemetry_enabled || return 0
43
43
  local event="$1"; shift
44
- local distinct_id props_json
44
+ local distinct_id
45
45
  distinct_id=$(_loki_telemetry_id 2>/dev/null) || return 0
46
46
  local version
47
47
  version=$(cat "${SCRIPT_DIR:-${SKILL_DIR:-}}/VERSION" 2>/dev/null || cat "${SCRIPT_DIR:-${SKILL_DIR:-}}/../VERSION" 2>/dev/null || echo "unknown")
package/autonomy/voice.sh CHANGED
@@ -12,7 +12,6 @@
12
12
 
13
13
  set -euo pipefail
14
14
 
15
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
15
  LOKI_DIR="${LOKI_DIR:-.loki}"
17
16
 
18
17
  # Colors (only if terminal supports them)
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "5.55.0"
10
+ __version__ = "5.56.0"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try: