loki-mode 6.68.0 → 6.68.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 +2 -2
- package/VERSION +1 -1
- package/autonomy/loki +152 -54
- package/dashboard/__init__.py +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/web-app/dist/assets/{Badge-B5HgOamf.js → Badge-CeqwGFM0.js} +1 -1
- package/web-app/dist/assets/{Button-Dr_x-zc5.js → Button-qiaMm3tV.js} +1 -1
- package/web-app/dist/assets/{Card-Kc9YONqh.js → Card-Uav6bI4v.js} +1 -1
- package/web-app/dist/assets/{HomePage-BtsaYGRR.js → HomePage-CnHzys9u.js} +1 -1
- package/web-app/dist/assets/{LoginPage-D7RmxUWG.js → LoginPage-C5TN24fk.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-D5Gd5Q79.js → NotFoundPage-CRF3pccO.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-DQHsCc2_.js → ProjectPage-reLTN0xY.js} +47 -47
- package/web-app/dist/assets/{ProjectsPage-CUdwe4_n.js → ProjectsPage-BxvFm4PV.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-4zGDgdk5.js → SettingsPage-B-_VC6hV.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-BR2QjKqV.js → TemplatesPage-3h_qn6Ag.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-Bk9csYRz.js → TerminalOutput-Blk-nLSd.js} +1 -1
- package/web-app/dist/assets/{arrow-left-BuMZs13c.js → arrow-left-oowTfEm_.js} +1 -1
- package/web-app/dist/assets/{clock-JjJ4Yqbk.js → clock-DREWjyYa.js} +1 -1
- package/web-app/dist/assets/{external-link-jWUgVKgO.js → external-link-C6nfCPLP.js} +1 -1
- package/web-app/dist/assets/{index-pa3JgPvH.js → index-B79IKKoY.js} +2 -2
- package/web-app/dist/assets/index-BChSxZgM.css +1 -0
- package/web-app/dist/index.html +2 -2
- package/web-app/dist/assets/index-CQcaFLVo.css +0 -1
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.68.
|
|
6
|
+
# Loki Mode v6.68.2
|
|
7
7
|
|
|
8
8
|
**You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
|
|
9
9
|
|
|
@@ -268,4 +268,4 @@ The following features are documented in skill modules but not yet fully automat
|
|
|
268
268
|
| Quality gates 3-reviewer system | Implemented (v5.35.0) | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
|
|
269
269
|
| Benchmarks (HumanEval, SWE-bench) | Infrastructure only | Runner scripts and datasets exist in `benchmarks/`; no published results |
|
|
270
270
|
|
|
271
|
-
**v6.68.
|
|
271
|
+
**v6.68.2 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.68.
|
|
1
|
+
6.68.2
|
package/autonomy/loki
CHANGED
|
@@ -7052,7 +7052,72 @@ QPRDEOF
|
|
|
7052
7052
|
|
|
7053
7053
|
# Docker Compose monitoring with auto-fix (v6.67.0)
|
|
7054
7054
|
cmd_monitor() {
|
|
7055
|
-
|
|
7055
|
+
# Verify Docker is available
|
|
7056
|
+
if ! command -v docker &>/dev/null; then
|
|
7057
|
+
echo -e "${RED}Docker is not installed. Install from https://docker.com${NC}"
|
|
7058
|
+
return 1
|
|
7059
|
+
fi
|
|
7060
|
+
if ! docker info &>/dev/null 2>&1; then
|
|
7061
|
+
echo -e "${RED}Docker daemon is not running. Start Docker Desktop or the Docker service.${NC}"
|
|
7062
|
+
return 1
|
|
7063
|
+
fi
|
|
7064
|
+
|
|
7065
|
+
local project_dir="."
|
|
7066
|
+
local watch_only=false
|
|
7067
|
+
local poll_interval="${LOKI_MONITOR_INTERVAL:-10}"
|
|
7068
|
+
local max_fixes="${LOKI_MONITOR_MAX_FIXES:-10}"
|
|
7069
|
+
|
|
7070
|
+
while [[ $# -gt 0 ]]; do
|
|
7071
|
+
case "$1" in
|
|
7072
|
+
--help|-h)
|
|
7073
|
+
echo -e "${BOLD}loki monitor${NC} - AI-powered Docker Compose monitoring with auto-fix"
|
|
7074
|
+
echo ""
|
|
7075
|
+
echo "Usage: loki monitor [path] [options]"
|
|
7076
|
+
echo ""
|
|
7077
|
+
echo "Arguments:"
|
|
7078
|
+
echo " path Project directory (default: current directory)"
|
|
7079
|
+
echo ""
|
|
7080
|
+
echo "Options:"
|
|
7081
|
+
echo " --watch-only Monitor only, do not auto-fix failures"
|
|
7082
|
+
echo " --no-fix Same as --watch-only"
|
|
7083
|
+
echo " --interval SECONDS Poll interval (default: 10, env: LOKI_MONITOR_INTERVAL)"
|
|
7084
|
+
echo " --max-fixes N Max fix attempts per session (default: 10, env: LOKI_MONITOR_MAX_FIXES)"
|
|
7085
|
+
echo " --help, -h Show this help"
|
|
7086
|
+
echo ""
|
|
7087
|
+
echo "The monitor polls Docker Compose services every N seconds."
|
|
7088
|
+
echo "When a service fails, it captures logs, feeds them to the AI"
|
|
7089
|
+
echo "provider (${LOKI_PROVIDER:-claude}), and lets the AI fix the code."
|
|
7090
|
+
echo "After fixing, it rebuilds and verifies the service."
|
|
7091
|
+
echo ""
|
|
7092
|
+
echo "Environment Variables:"
|
|
7093
|
+
echo " LOKI_MONITOR_INTERVAL Poll interval in seconds (default: 10)"
|
|
7094
|
+
echo " LOKI_MONITOR_MAX_FIXES Max fix attempts (default: 10)"
|
|
7095
|
+
echo " LOKI_PROVIDER AI provider for diagnosis (default: claude)"
|
|
7096
|
+
return 0
|
|
7097
|
+
;;
|
|
7098
|
+
--watch-only|--no-fix)
|
|
7099
|
+
watch_only=true
|
|
7100
|
+
shift
|
|
7101
|
+
;;
|
|
7102
|
+
--interval)
|
|
7103
|
+
poll_interval="${2:-10}"
|
|
7104
|
+
shift 2
|
|
7105
|
+
;;
|
|
7106
|
+
--max-fixes)
|
|
7107
|
+
max_fixes="${2:-10}"
|
|
7108
|
+
shift 2
|
|
7109
|
+
;;
|
|
7110
|
+
-*)
|
|
7111
|
+
echo -e "${RED}Unknown option: $1${NC}"
|
|
7112
|
+
echo "Run 'loki monitor --help' for usage."
|
|
7113
|
+
return 1
|
|
7114
|
+
;;
|
|
7115
|
+
*)
|
|
7116
|
+
project_dir="$1"
|
|
7117
|
+
shift
|
|
7118
|
+
;;
|
|
7119
|
+
esac
|
|
7120
|
+
done
|
|
7056
7121
|
|
|
7057
7122
|
# Resolve to absolute path
|
|
7058
7123
|
if [[ ! "$project_dir" = /* ]]; then
|
|
@@ -7071,11 +7136,39 @@ cmd_monitor() {
|
|
|
7071
7136
|
echo -e "Project: ${BOLD}$project_dir${NC}"
|
|
7072
7137
|
echo -e "Provider: ${GREEN}${LOKI_PROVIDER:-claude}${NC}"
|
|
7073
7138
|
echo "Press Ctrl+C to stop."
|
|
7139
|
+
|
|
7140
|
+
# Show what we're monitoring
|
|
7141
|
+
local initial_services
|
|
7142
|
+
initial_services=$(cd "$project_dir" && docker compose ps -a --format json 2>/dev/null | PARSE_MODE=names python3 -c "
|
|
7143
|
+
import json, sys
|
|
7144
|
+
raw = sys.stdin.read().strip()
|
|
7145
|
+
if not raw: sys.exit(0)
|
|
7146
|
+
try:
|
|
7147
|
+
parsed = json.loads(raw)
|
|
7148
|
+
services = parsed if isinstance(parsed, list) else [parsed]
|
|
7149
|
+
except json.JSONDecodeError:
|
|
7150
|
+
services = []
|
|
7151
|
+
for line in raw.split(chr(10)):
|
|
7152
|
+
try: services.append(json.loads(line))
|
|
7153
|
+
except: pass
|
|
7154
|
+
names = [s.get('Service', s.get('Name','?')) for s in services if isinstance(s, dict)]
|
|
7155
|
+
print(', '.join(names))
|
|
7156
|
+
" 2>/dev/null)
|
|
7157
|
+
|
|
7158
|
+
if [[ -n "$initial_services" ]]; then
|
|
7159
|
+
echo -e "Services: ${GREEN}$initial_services${NC}"
|
|
7160
|
+
else
|
|
7161
|
+
echo -e "${YELLOW}No running services detected yet. Waiting for docker compose up...${NC}"
|
|
7162
|
+
fi
|
|
7163
|
+
|
|
7164
|
+
if [[ "$watch_only" == "true" ]]; then
|
|
7165
|
+
echo -e "Mode: ${YELLOW}watch-only${NC} (auto-fix disabled)"
|
|
7166
|
+
else
|
|
7167
|
+
echo -e "Mode: ${GREEN}auto-fix enabled${NC} (max $max_fixes attempts)"
|
|
7168
|
+
fi
|
|
7074
7169
|
echo ""
|
|
7075
7170
|
|
|
7076
7171
|
local fix_count=0
|
|
7077
|
-
local max_fixes="${LOKI_MONITOR_MAX_FIXES:-10}"
|
|
7078
|
-
local poll_interval="${LOKI_MONITOR_INTERVAL:-10}"
|
|
7079
7172
|
local consecutive_healthy=0
|
|
7080
7173
|
|
|
7081
7174
|
trap 'echo ""; echo -e "${CYAN}Monitor stopped.${NC}"; return 0' INT TERM
|
|
@@ -7129,30 +7222,34 @@ cmd_monitor() {
|
|
|
7129
7222
|
continue 2
|
|
7130
7223
|
fi
|
|
7131
7224
|
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
compose_content
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
for df_path in "$project_dir/$svc_name/Dockerfile" "$project_dir/Dockerfile" "$project_dir/Dockerfile.$svc_name"; do
|
|
7148
|
-
if [[ -f "$df_path" ]]; then
|
|
7149
|
-
dockerfile_content=$(head -c 3000 "$df_path")
|
|
7150
|
-
break
|
|
7225
|
+
if [[ "$watch_only" == "true" ]]; then
|
|
7226
|
+
echo -e "${YELLOW}[WATCH] $svc_name is down. Fix disabled (--watch-only mode).${NC}"
|
|
7227
|
+
echo -e " Logs: cd $project_dir && docker compose logs $svc_name"
|
|
7228
|
+
elif [[ $fix_count -lt $max_fixes ]]; then
|
|
7229
|
+
echo -e "\n${RED}[FAILURE] $svc_name is down${NC}"
|
|
7230
|
+
|
|
7231
|
+
local logs
|
|
7232
|
+
logs=$(cd "$project_dir" && docker compose logs --tail 50 "$svc_name" 2>/dev/null | head -c 3000)
|
|
7233
|
+
|
|
7234
|
+
# Gather docker-compose.yml for AI context (truncated to avoid ARG_MAX)
|
|
7235
|
+
local compose_content=""
|
|
7236
|
+
if [[ -f "$project_dir/docker-compose.yml" ]]; then
|
|
7237
|
+
compose_content=$(head -c 5000 "$project_dir/docker-compose.yml")
|
|
7238
|
+
elif [[ -f "$project_dir/docker-compose.yaml" ]]; then
|
|
7239
|
+
compose_content=$(head -c 5000 "$project_dir/docker-compose.yaml")
|
|
7151
7240
|
fi
|
|
7152
|
-
done
|
|
7153
7241
|
|
|
7154
|
-
|
|
7155
|
-
|
|
7242
|
+
# Gather Dockerfile for the failing service (truncated)
|
|
7243
|
+
local dockerfile_content=""
|
|
7244
|
+
for df_path in "$project_dir/$svc_name/Dockerfile" "$project_dir/Dockerfile" "$project_dir/Dockerfile.$svc_name"; do
|
|
7245
|
+
if [[ -f "$df_path" ]]; then
|
|
7246
|
+
dockerfile_content=$(head -c 3000 "$df_path")
|
|
7247
|
+
break
|
|
7248
|
+
fi
|
|
7249
|
+
done
|
|
7250
|
+
|
|
7251
|
+
# 3. FEED TO AI: Construct a rich prompt with all context
|
|
7252
|
+
local ai_prompt="You are debugging a Docker Compose service that has failed.
|
|
7156
7253
|
|
|
7157
7254
|
SERVICE: $svc_name
|
|
7158
7255
|
STATUS: exited/dead
|
|
@@ -7163,14 +7260,14 @@ $logs
|
|
|
7163
7260
|
DOCKER-COMPOSE.YML:
|
|
7164
7261
|
$compose_content"
|
|
7165
7262
|
|
|
7166
|
-
|
|
7167
|
-
|
|
7263
|
+
if [[ -n "$dockerfile_content" ]]; then
|
|
7264
|
+
ai_prompt="${ai_prompt}
|
|
7168
7265
|
|
|
7169
7266
|
DOCKERFILE ($svc_name/Dockerfile):
|
|
7170
7267
|
$dockerfile_content"
|
|
7171
|
-
|
|
7268
|
+
fi
|
|
7172
7269
|
|
|
7173
|
-
|
|
7270
|
+
ai_prompt="${ai_prompt}
|
|
7174
7271
|
|
|
7175
7272
|
INSTRUCTIONS:
|
|
7176
7273
|
1. Analyze the error in the logs above
|
|
@@ -7181,33 +7278,33 @@ INSTRUCTIONS:
|
|
|
7181
7278
|
6. After fixing, the system will rebuild with 'docker compose up --build'
|
|
7182
7279
|
7. Common issues: named volumes for node_modules (use anonymous), missing dependencies, port conflicts, wrong commands"
|
|
7183
7280
|
|
|
7184
|
-
|
|
7281
|
+
echo -e "${CYAN}[AI] Analyzing $svc_name failure with ${LOKI_PROVIDER:-claude}...${NC}"
|
|
7282
|
+
|
|
7283
|
+
# 4. LET AI FIX: Run loki quick with the AI prompt
|
|
7284
|
+
# The AI provider (claude/codex/gemini/ollama) decides what to fix
|
|
7285
|
+
fix_count=$((fix_count + 1))
|
|
7286
|
+
echo -e "${CYAN}[FIX] Attempt $fix_count/$max_fixes${NC}"
|
|
7185
7287
|
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7288
|
+
(
|
|
7289
|
+
cd "$project_dir"
|
|
7290
|
+
LOKI_MAX_ITERATIONS=5 LOKI_AUTO_FIX=true \
|
|
7291
|
+
"$0" quick "$ai_prompt" 2>&1 | while IFS= read -r fline; do
|
|
7292
|
+
echo " $fline"
|
|
7293
|
+
done
|
|
7294
|
+
)
|
|
7190
7295
|
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
"$0" quick "$ai_prompt" 2>&1 | while IFS= read -r fline; do
|
|
7296
|
+
# 5. REBUILD: Docker compose up --build for the fixed service
|
|
7297
|
+
echo -e "${CYAN}[REBUILD] Rebuilding $svc_name...${NC}"
|
|
7298
|
+
(cd "$project_dir" && docker compose up -d --build --no-deps "$svc_name" 2>&1) | while IFS= read -r fline; do
|
|
7195
7299
|
echo " $fline"
|
|
7196
7300
|
done
|
|
7197
|
-
)
|
|
7198
7301
|
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
echo " $fline"
|
|
7203
|
-
done
|
|
7302
|
+
# 6. VERIFY: Wait and check if the fix worked
|
|
7303
|
+
echo -e "${CYAN}[VERIFY] Waiting 15s for $svc_name to stabilize...${NC}"
|
|
7304
|
+
sleep 15
|
|
7204
7305
|
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
sleep 15
|
|
7208
|
-
|
|
7209
|
-
local verify_state
|
|
7210
|
-
verify_state=$(cd "$project_dir" && docker compose ps -a --format json 2>/dev/null | VERIFY_SVC="$svc_name" python3 -c "
|
|
7306
|
+
local verify_state
|
|
7307
|
+
verify_state=$(cd "$project_dir" && docker compose ps -a --format json 2>/dev/null | VERIFY_SVC="$svc_name" python3 -c "
|
|
7211
7308
|
import json, sys, os
|
|
7212
7309
|
svc = os.environ['VERIFY_SVC']
|
|
7213
7310
|
raw = sys.stdin.read().strip()
|
|
@@ -7231,10 +7328,11 @@ for s in services:
|
|
|
7231
7328
|
print('unknown')
|
|
7232
7329
|
" 2>/dev/null || echo "unknown")
|
|
7233
7330
|
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7331
|
+
if [[ "$verify_state" == "running" ]]; then
|
|
7332
|
+
echo -e "${GREEN}[SUCCESS] $svc_name is now running!${NC}"
|
|
7333
|
+
else
|
|
7334
|
+
echo -e "${YELLOW}[RETRY] $svc_name still not healthy (state: $verify_state). Will retry on next poll.${NC}"
|
|
7335
|
+
fi
|
|
7238
7336
|
fi
|
|
7239
7337
|
done
|
|
7240
7338
|
|
package/dashboard/__init__.py
CHANGED
package/docs/INSTALLATION.md
CHANGED
package/mcp/__init__.py
CHANGED
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as m,r,j as e}from"./index-
|
|
1
|
+
import{c as m,r,j as e}from"./index-B79IKKoY.js";import{C as g,a as p}from"./clock-DREWjyYa.js";/**
|
|
2
2
|
* @license lucide-react v0.577.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-B79IKKoY.js";const n={none:"p-0",sm:"p-3",md:"p-4",lg:"p-6"};function p({hover:e=!1,padding:d="md",className:t="",children:a,onClick:r}){return s.jsx("div",{role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r,onKeyDown:r?o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r())}:void 0,className:["bg-white border border-[#ECEAE3] rounded-[5px] shadow-card",e&&"hover:shadow-card-hover transition-shadow duration-200",r&&"cursor-pointer",n[d],t].filter(Boolean).join(" "),children:a})}export{p as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as l,a as h,u as be,b as ge}from"./index-
|
|
1
|
+
import{j as e,r as l,a as h,u as be,b as ge}from"./index-B79IKKoY.js";import{u as I,B as je}from"./Badge-CeqwGFM0.js";import{P as ve,a as Ne,S as ye,E as C,T as we}from"./TerminalOutput-Blk-nLSd.js";import"./clock-DREWjyYa.js";function ke(t){if(t<60)return`${Math.round(t)}s`;if(t<3600)return`${Math.floor(t/60)}m ${Math.round(t%60)}s`;const s=Math.floor(t/3600),n=Math.floor(t%3600/60);return`${s}h ${n}m`}function Se(t,s){if(!t||t<=0)return"--";const n={simple:{opus:1,haiku:1,total:3},standard:{opus:2,haiku:2,total:5},complex:{opus:3,haiku:3,total:8}},r=n[s]||n.standard;return t<=r.opus?"Opus":t>r.total-r.haiku?"Haiku":"Sonnet"}function Ce({status:t,prdSummary:s,onStop:n,onPause:r,onResume:a,isPaused:c}){const i=t?Se(t.iteration??0,t.complexity||"standard"):"--",o=c??(t==null?void 0:t.paused)??!1;return e.jsxs("div",{className:"card px-5 py-3 flex items-center gap-6 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted uppercase tracking-wider font-medium",children:"Phase"}),e.jsx("span",{className:"font-mono font-semibold text-ink",children:(t==null?void 0:t.phase)||"idle"})]}),e.jsx("div",{className:"w-px h-5 bg-border"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted uppercase tracking-wider font-medium",children:"Complexity"}),e.jsx("span",{className:`font-mono font-semibold ${(t==null?void 0:t.complexity)==="complex"?"text-warning":(t==null?void 0:t.complexity)==="simple"?"text-success":"text-ink"}`,children:(t==null?void 0:t.complexity)||"standard"})]}),e.jsx("div",{className:"w-px h-5 bg-border"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted uppercase tracking-wider font-medium",children:"Model"}),e.jsx("span",{className:`font-mono font-semibold px-2 py-0.5 rounded-md text-xs ${i==="Opus"?"bg-primary/10 text-primary":i==="Haiku"?"bg-success/10 text-success":"bg-primary/10 text-primary"}`,children:i})]}),e.jsx("div",{className:"w-px h-5 bg-border"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted uppercase tracking-wider font-medium",children:"Tasks"}),e.jsx("span",{className:"font-mono text-ink",children:t!=null&&t.current_task?e.jsx("span",{className:"text-xs",children:t.current_task}):e.jsx("span",{className:"text-muted",children:"--"})}),((t==null?void 0:t.pending_tasks)??0)>0&&e.jsxs("span",{className:"text-xs text-primary font-mono",children:["+",t==null?void 0:t.pending_tasks," pending"]})]}),s&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-px h-5 bg-border"}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-xs text-muted uppercase tracking-wider font-medium flex-shrink-0",children:"Building"}),e.jsx("span",{className:"text-xs font-mono text-ink truncate max-w-[220px]",title:s,children:s.length>60?s.slice(0,60)+"...":s})]})]}),e.jsx("div",{className:"flex-1"}),((t==null?void 0:t.uptime)??0)>0&&e.jsx("span",{className:"font-mono text-xs text-muted",children:ke((t==null?void 0:t.uptime)??0)}),(r||a)&&e.jsxs("button",{onClick:o?a:r,className:"flex items-center gap-1.5 px-4 py-1.5 rounded-btn text-xs font-semibold border border-warning/30 text-warning hover:bg-warning/10 transition-colors",children:[o?e.jsx(ve,{size:14}):e.jsx(Ne,{size:14}),o?"Resume":"Pause"]}),n&&e.jsxs("button",{onClick:n,className:"flex items-center gap-1.5 px-4 py-1.5 rounded-btn text-xs font-semibold bg-danger/10 text-danger border border-danger/20 hover:bg-danger/20 transition-colors",children:[e.jsx(ye,{size:14}),"Stop"]})]})}function Ee({status:t}){const s=[{label:"Iteration",value:t?t.iteration.toString():"--",color:"text-primary"},{label:"Agents",value:t?t.running_agents.toString():"--",color:t&&t.running_agents>0?"text-success":"text-muted"},{label:"Pending",value:t?t.pending_tasks.toString():"--",color:t&&t.pending_tasks>0?"text-warning":"text-muted"},{label:"Provider",value:(t==null?void 0:t.provider)||"--",color:"text-primary"}];return e.jsx("div",{className:"grid grid-cols-4 gap-3",children:s.map(n=>e.jsxs("div",{className:"card p-4 text-center",children:[e.jsx("div",{className:`text-2xl font-bold font-mono ${n.color}`,children:n.value}),e.jsx("div",{className:"text-xs text-muted font-medium mt-1 uppercase tracking-wider",children:n.label})]},n.label))})}function Pe({plan:t,loading:s,onConfirm:n,onCancel:r}){return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-sm",children:e.jsxs("div",{className:"card w-full max-w-lg mx-4 p-6 rounded-card shadow-card-hover",children:[e.jsx("h2",{className:"text-lg font-bold text-ink mb-4",children:"Build Estimate"}),s?e.jsxs("div",{className:"flex flex-col items-center py-8 gap-3",children:[e.jsx("div",{className:"w-8 h-8 border-2 border-primary border-t-transparent rounded-full animate-spin"}),e.jsx("p",{className:"text-sm text-muted",children:"Analyzing PRD..."}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 text-sm font-medium text-muted hover:text-ink transition-colors",children:"Cancel"}),e.jsx("button",{onClick:n,className:"px-4 py-2 text-sm font-medium text-primary hover:text-primary/80 transition-colors underline",children:"Skip analysis, build now"})]})]}):t?e.jsxs(e.Fragment,{children:[t.returncode!==0&&e.jsxs("div",{className:"mb-4 px-3 py-2 rounded-btn bg-warning/10 border border-warning/20 text-warning text-xs",children:["loki plan exited with code ",t.returncode," - showing partial results"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[e.jsxs("div",{className:"card rounded-card p-3",children:[e.jsx("div",{className:"text-xs font-semibold text-muted-accessible uppercase tracking-wider mb-1",children:"Complexity"}),e.jsx("div",{className:"text-base font-bold text-ink capitalize",children:t.complexity})]}),e.jsxs("div",{className:"card rounded-card p-3",children:[e.jsx("div",{className:"text-xs font-semibold text-muted-accessible uppercase tracking-wider mb-1",children:"Est. Cost"}),e.jsx("div",{className:"text-base font-bold text-ink",children:t.cost_estimate})]}),e.jsxs("div",{className:"card rounded-card p-3",children:[e.jsx("div",{className:"text-xs font-semibold text-muted-accessible uppercase tracking-wider mb-1",children:"Iterations"}),e.jsx("div",{className:"text-base font-bold text-ink",children:t.iterations})]}),e.jsxs("div",{className:"card rounded-card p-3",children:[e.jsx("div",{className:"text-xs font-semibold text-muted-accessible uppercase tracking-wider mb-1",children:"Phases"}),e.jsx("div",{className:"text-xs text-ink capitalize",children:t.phases.join(", ")})]})]}),t.output_text&&e.jsxs("details",{className:"mb-4",children:[e.jsx("summary",{className:"text-xs text-muted cursor-pointer hover:text-ink transition-colors",children:"Raw output"}),e.jsx("pre",{className:"mt-2 text-xs font-mono text-muted-accessible bg-black/5 rounded-card p-3 overflow-auto max-h-40 whitespace-pre-wrap",children:t.output_text})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 text-sm font-medium text-muted hover:text-ink transition-colors",children:"Cancel"}),e.jsx("button",{onClick:n,className:"px-5 py-2 rounded-card text-sm font-semibold bg-primary text-white hover:bg-primary/90 transition-all shadow-button",children:"Start Build"})]})]}):e.jsx("div",{className:"text-sm text-muted py-4",children:"No plan data available."})]})})}function _e({onSubmit:t,running:s,error:n,provider:r,onProviderChange:a,initialPrd:c}){const[i,o]=l.useState(""),[m,b]=l.useState(""),[f,y]=l.useState("claude"),[d,g]=l.useState(""),j=r??f,[v,w]=l.useState(!1),[k,T]=l.useState([]),[x,E]=l.useState(!1),[N,M]=l.useState(!1),[P,A]=l.useState(!1),[z,_]=l.useState(null),[F,$]=l.useState(!1),[O,B]=l.useState(!1);l.useEffect(()=>{h.getTemplates().then(p=>{T(p),E(!1)}).catch(()=>{T([]),E(!0)})},[]),l.useEffect(()=>{c&&o(c)},[c]),l.useEffect(()=>{if(c)return;const p=localStorage.getItem("loki-prd-draft");p&&o(p),h.getPrdPrefill().then(({content:L})=>{L&&o(L)}).catch(()=>{})},[c]),l.useEffect(()=>{i.trim()?localStorage.setItem("loki-prd-draft",i):localStorage.removeItem("loki-prd-draft")},[i]);const R=l.useCallback(async(p,L)=>{b(L),w(!1);try{const G=await h.getTemplateContent(p);o(G.content)}catch{o(`# ${L}
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r,u as o,r as c,j as e}from"./index-
|
|
1
|
+
import{g as r,u as o,r as c,j as e}from"./index-B79IKKoY.js";function x(){const{user:l,loading:t,login:i,isLocalMode:n}=r(),s=o();return c.useEffect(()=>{!t&&(l||n)&&s("/",{replace:!0})},[l,t,n,s]),t?e.jsx("div",{className:"h-screen bg-[#FAF9F6] flex items-center justify-center text-[#6B6960] text-sm",children:"Loading..."}):e.jsx("div",{className:"h-screen bg-[#FAF9F6] flex items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-sm mx-auto px-6",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"font-heading text-3xl font-bold text-[#36342E] mb-1",children:"Purple Lab"}),e.jsx("p",{className:"text-sm text-[#6B6960]",children:"Autonomous agent workspace powered by Loki"})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-[#ECEAE3] shadow-sm p-6 space-y-4",children:[e.jsx("h2",{className:"text-base font-medium text-[#36342E] text-center",children:"Sign in to continue"}),e.jsxs("button",{type:"button",onClick:()=>i("github"),className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-[5px] border border-[#ECEAE3] bg-[#24292f] text-white text-sm font-medium hover:bg-[#1b1f23] transition-colors",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"})}),"Sign in with GitHub"]}),e.jsxs("button",{type:"button",onClick:()=>i("google"),className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-[5px] border border-[#ECEAE3] bg-white text-[#36342E] text-sm font-medium hover:bg-[#F8F4F0] transition-colors",children:[e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Sign in with Google"]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t border-[#ECEAE3]"})}),e.jsx("div",{className:"relative flex justify-center text-xs",children:e.jsx("span",{className:"bg-white px-2 text-[#939084]",children:"or"})})]}),e.jsx("button",{type:"button",onClick:()=>s("/"),className:"w-full text-center text-sm text-[#6B6960] hover:text-[#553DE9] transition-colors py-1",children:"Continue without account (local mode)"})]}),e.jsx("p",{className:"text-xs text-[#939084] text-center mt-4",children:"Local mode stores everything on your machine. Sign in for cloud sync and collaboration."})]})})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,L as t,H as s}from"./index-
|
|
1
|
+
import{j as e,L as t,H as s}from"./index-B79IKKoY.js";import{A as o}from"./arrow-left-oowTfEm_.js";function i(){return e.jsxs("div",{className:"flex flex-col items-center justify-center h-full min-h-[60vh] p-8 text-center",children:[e.jsx("div",{className:"text-6xl font-heading font-bold text-primary/20 mb-4",children:"404"}),e.jsx("h1",{className:"text-h3 font-heading font-bold text-ink mb-2",children:"Page not found"}),e.jsx("p",{className:"text-sm text-muted-accessible mb-6 max-w-xs",children:"The page you are looking for does not exist or has been moved."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>window.history.back(),className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-medium rounded-btn border border-border text-secondary hover:bg-hover transition-colors",children:[e.jsx(o,{size:14}),"Go Back"]}),e.jsxs(t,{to:"/",className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-medium rounded-btn bg-primary text-white hover:bg-[#4432c4] transition-colors shadow-button",children:[e.jsx(s,{size:14}),"Home"]})]})]})}export{i as default};
|