loki-mode 11.3.0 → 11.3.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/README.md +68 -650
- package/SKILL.md +5 -5
- package/VERSION +1 -1
- package/autonomy/completion-council.sh +2 -2
- package/autonomy/context-tracker.py +4 -4
- package/autonomy/council-v2.sh +1 -1
- package/autonomy/grill.sh +1 -1
- package/autonomy/lib/done-recognition.sh +1 -1
- package/autonomy/lib/efficiency_cost.py +8 -0
- package/autonomy/lib/engine10-push.sh +22 -8
- package/autonomy/lib/prd-enrich.sh +1 -1
- package/autonomy/lib/voter-agents.sh +1 -1
- package/autonomy/loki +161 -105
- package/autonomy/run.sh +30 -18
- package/autonomy/sandbox.sh +1 -1
- package/autonomy/tui.sh +6 -5
- package/autonomy/verify.sh +1 -1
- package/bin/loki +195 -59
- package/completions/_loki +8 -0
- package/completions/loki.bash +3 -3
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +47 -45
- package/docs/AGENT-CHANGE-RECEIPT.md +2 -2
- package/docs/ARCHITECTURE.md +337 -0
- package/docs/BRANDING.md +124 -0
- package/docs/CLI-REFERENCE.md +11 -1
- package/docs/COMPONENTS.md +447 -0
- package/docs/DEPLOYMENT.md +9 -9
- package/docs/DOCKER.md +469 -0
- package/docs/INSTALLATION.md +67 -1045
- package/docs/KNOWN-ISSUES.md +11 -35
- package/docs/OTEL-COLLECTOR.md +24 -0
- package/docs/ROUTING-EVIDENCE.md +32 -0
- package/docs/TESTING.md +161 -0
- package/docs/air-gapped.md +1 -2
- package/docs/alternative-installations.md +14 -24
- package/docs/architecture/DECISIONS.md +333 -0
- package/docs/audit-logging.md +7 -7
- package/docs/authentication.md +3 -3
- package/docs/authorization.md +1 -1
- package/docs/certification/04-production-deployment/lab.md +6 -6
- package/docs/certification/04-production-deployment/lesson.md +4 -4
- package/docs/certification/README.md +1 -1
- package/docs/control-plane-container.md +2 -2
- package/docs/dev/real-run.md +34 -0
- package/docs/dev/release-checklist.md +2 -2
- package/docs/environment-variables.md +1 -0
- package/docs/exit-codes.md +3 -3
- package/docs/git-workflow.md +3 -3
- package/docs/metrics.md +37 -55
- package/docs/network-security.md +1 -1
- package/docs/siem-integration.md +5 -5
- package/docs/spec-first-intent.md +28 -0
- package/docs/v10/CLI-MODERN.md +7 -3
- package/docs/v10/DECISIONS.md +59 -0
- package/docs/v10/DEPS.md +22 -22
- package/docs/v10/ENGINE.md +1 -1
- package/docs/v10/FAILURE-CLASSES.md +212 -1
- package/docs/v10/FOUNDER-QUEUE.md +1 -0
- package/docs/v10/GUARDS.md +31 -0
- package/docs/v10/GUIDE.md +7 -5
- package/docs/v10/LEGACY-REMOVAL.md +4 -6
- package/docs/v10/METRICS.md +14 -2
- package/docs/v10/MODERNIZE.md +1 -1
- package/docs/v10/OPERATING-MODEL.md +4 -3
- package/docs/v10/PROGRESS.md +35 -0
- package/docs/v11/COST-HALF.md +352 -0
- package/docs/v11/INTOTO-AGENT-CHANGE-PREDICATE.md +77 -0
- package/docs/v11/MARKET-SLICES.md +315 -0
- package/docs/v11/MCP-2026-07-28.md +55 -0
- package/docs/v11/REGISTRIES.md +730 -0
- package/docs/v11/VERIFY-PR-SANDBOX.md +41 -0
- package/loki-ts/data/model-pricing.json +52 -24
- package/loki-ts/dist/loki.js +1185 -945
- package/mcp/__init__.py +1 -1
- package/mcp/v10_tools.py +29 -0
- package/package.json +9 -11
- package/packages/control-plane/dist/ask-tools-server.js +8 -2
- package/packages/control-plane/dist/server.js +15832 -12361
- package/packages/control-plane/drizzle/0006_token_sessions.sql +1 -0
- package/packages/control-plane/drizzle/meta/0006_snapshot.json +807 -0
- package/packages/control-plane/drizzle/meta/_journal.json +7 -0
- package/packages/control-plane/src/db/schema.ts +1 -0
- package/packages/control-plane/src/server/routes/cost.ts +4 -3
- package/packages/control-plane/src/server/runs.ts +3 -3
- package/packages/control-plane/ui/dist/assets/index-DbLzr87u.js +190 -0
- package/packages/control-plane/ui/dist/index.html +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/providers/opencode.sh +2 -3
- package/src/observability/genai-spans.js +104 -0
- package/src/observability/otel-bridge.js +49 -1
- package/src/observability/otel.js +2 -2
- package/src/protocols/mcp-client.js +6 -2
- package/src/protocols/mcp-server.js +191 -6
- package/src/protocols/transport/sse.js +23 -2
- package/tools/audit-docs.py +1 -1
- package/web-app/dist/assets/{AdminPage-D_e45uTw.js → AdminPage-DuRQZsF9.js} +1 -1
- package/web-app/dist/assets/{Avatar-T3nIpoaf.js → Avatar-7GtOQvsO.js} +1 -1
- package/web-app/dist/assets/{Badge-BKqb59pP.js → Badge-CYgTnIxj.js} +1 -1
- package/web-app/dist/assets/{Button-DjVlkh8_.js → Button-rYSyIu7X.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-DXJgLGmh.js → CockpitPage-9adANY4o.js} +1 -1
- package/web-app/dist/assets/{ComparePage-BRP_eVc_.js → ComparePage-DEG2oA-R.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-CLjpGLjC.js → ErrorBoundary-CwtvY4xs.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-DX-vb4Xy.js → EvidenceReceiptPanel-DTT73pPB.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-214HVHtX.js → GitHubIssuesPanel-CpWZLz2x.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BEiZKc4t.js → GitHubPRsPanel-H293R7E2.js} +1 -1
- package/web-app/dist/assets/{HomePage-VvMHS5ga.js → HomePage-B11Imp9k.js} +2 -2
- package/web-app/dist/assets/{LoginPage-5WD-v7n3.js → LoginPage-BZBgx5Jr.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DUQT_Jye.js → MagicPage-B27S4_X8.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-lga-z79v.js → MetricsPage-CfbJWNDG.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-CGhBX3G1.js → NotFoundPage-Tp_4zMSm.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-CdzF2GzZ.js → ProjectPage-CM4fgMsV.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-DRG64N8s.js → ProjectsPage-DP2Fvsrd.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-5fzW9Frb.js → SettingsPage-C4G9-EAy.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-DrTdxO4y.js → ShowcasePage-Dj-n4dwu.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-C9Mqs6Rd.js → SystemSettingsPage-BqMLpuGt.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CUGPdSWo.js → TeamsPage-mIH8H96m.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CNraDY0F.js → TemplatesPage-BagW-v4n.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-BIu_6Pea.js → TerminalOutput-CTQRHhnK.js} +1 -1
- package/web-app/dist/assets/{activity-Bk-kgqaf.js → activity-DNQiBDDL.js} +1 -1
- package/web-app/dist/assets/{bell-BXmUdmo8.js → bell-Coiwdad1.js} +1 -1
- package/web-app/dist/assets/{bot-CiuzXxUR.js → bot-Cou-rTgR.js} +1 -1
- package/web-app/dist/assets/{check-BEzjXppd.js → check-CsF-XtQp.js} +1 -1
- package/web-app/dist/assets/{chevron-left-AYWCXHf8.js → chevron-left-BJiy55Ht.js} +1 -1
- package/web-app/dist/assets/{circle-alert-BNg2uSRq.js → circle-alert-D6-pQQWq.js} +1 -1
- package/web-app/dist/assets/{clock-DTj0kkGT.js → clock-BOGqwgt9.js} +1 -1
- package/web-app/dist/assets/{cloud-x4nTDBLT.js → cloud-DsxhTtf5.js} +1 -1
- package/web-app/dist/assets/{code-xml-BVh_MLrk.js → code-xml-CxJDHUlE.js} +1 -1
- package/web-app/dist/assets/{database-DdfBaowG.js → database-BJePscl_.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-XuYFmAOY.js → dollar-sign-6qWGAkZo.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-D4cRnmeL.js → file-code-corner-DcOtYeDb.js} +1 -1
- package/web-app/dist/assets/{file-plus-CyoVlHc_.js → file-plus-WuRyLFo0.js} +1 -1
- package/web-app/dist/assets/{globe-Y6IK2RPW.js → globe-r-xCP4DE.js} +1 -1
- package/web-app/dist/assets/{hammer-BKzr9VZI.js → hammer-DTt0SsCB.js} +1 -1
- package/web-app/dist/assets/{index-B20cSx5G.js → index-BkbXyH8y.js} +3 -3
- package/web-app/dist/assets/{layers-DebNOhGS.js → layers-BvZhvSMY.js} +1 -1
- package/web-app/dist/assets/{loader-circle-DyGbrEgd.js → loader-circle-3gosTei9.js} +1 -1
- package/web-app/dist/assets/{lock-BKPpyt20.js → lock-CZZMxP0U.js} +1 -1
- package/web-app/dist/assets/{package-egF5Wi4y.js → package-C5A8CkJr.js} +1 -1
- package/web-app/dist/assets/{plus-OiEgKIc-.js → plus-Btv7tTIF.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-CzKvrONq.js → refresh-cw-DsWLXgs_.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Bu2mII0p.js → rotate-ccw-DOVDjway.js} +1 -1
- package/web-app/dist/assets/{scroll-text-CSkiyax8.js → scroll-text-smySzlrX.js} +1 -1
- package/web-app/dist/assets/{server-DlPthJFw.js → server-b5PHsqAU.js} +1 -1
- package/web-app/dist/assets/{shield-alert-CbpHWQQX.js → shield-alert-BD7FDlh-.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DgGpZe-Q.js → thumbs-up-CAsFzbyE.js} +1 -1
- package/web-app/dist/assets/{trash-2-BV3GlCB-.js → trash-2-BJ35qHgl.js} +1 -1
- package/web-app/dist/assets/{trending-down-Y4TJtXhD.js → trending-down-Ozrd26cZ.js} +1 -1
- package/web-app/dist/assets/{trending-up-DsDNoHZY.js → trending-up-BhnMcM32.js} +1 -1
- package/web-app/dist/assets/{upload-gkThrc_I.js → upload-JVHfdwoA.js} +1 -1
- package/web-app/dist/assets/{usePolling-jpNSeNAe.js → usePolling-CTzbDV-e.js} +1 -1
- package/web-app/dist/assets/{user-3Zez1WOK.js → user-Bks3-GYv.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
- package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
- package/docs/COCKPIT-SPEC.md +0 -72
- package/docs/COCKPIT-UX-MANDATE.md +0 -53
- package/docs/COMPETITIVE-ANALYSIS.md +0 -303
- package/docs/COMPETITIVE-NEXT-10.md +0 -316
- package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
- package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
- package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
- package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
- package/docs/DEMOS.md +0 -63
- package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
- package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
- package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
- package/docs/GATE-FAILURE-TRIAGE.md +0 -254
- package/docs/HANDOFF-2026-08-03.md +0 -439
- package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
- package/docs/LOOP-HARNESS-AUDIT.md +0 -684
- package/docs/MERGE-DEDUP-MAP.md +0 -420
- package/docs/MERGE-ROUTE-MAP.md +0 -139
- package/docs/MODEL-REGISTRY-PLAN.md +0 -155
- package/docs/OUTCOME-FRONTIER.md +0 -536
- package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
- package/docs/PLANS-INDEX.md +0 -32
- package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
- package/docs/PROMPT-ABLATION-RESULT.md +0 -97
- package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
- package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
- package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
- package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
- package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
- package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
- package/docs/RARV-C-100X-PLAN.md +0 -286
- package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
- package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
- package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
- package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
- package/docs/STALE-STATE-AUDIT.md +0 -174
- package/docs/SYNERGY-TASKS.md +0 -143
- package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
- package/docs/TOP-100-BACKLOG.md +0 -159
- package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
- package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
- package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
- package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
- package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
- package/docs/WELCOME-OPENER-PLAN.md +0 -106
- package/docs/adoption-baseline-2026-07-31.md +0 -84
- package/docs/architecture/bmad-integration-epic.md +0 -271
- package/docs/architecture/bmad-integration-review.md +0 -86
- package/docs/architecture/bmad-integration-validation.md +0 -249
- package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
- package/docs/auto-claude-comparison.md +0 -250
- package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
- package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
- package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
- package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
- package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
- package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
- package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
- package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
- package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
- package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
- package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
- package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
- package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
- package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
- package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
- package/docs/bug-fixes/agent-19-code-review.md +0 -316
- package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
- package/docs/competitive/bolt-new-analysis.md +0 -579
- package/docs/competitive/emergence-others-analysis.md +0 -605
- package/docs/competitive/replit-lovable-analysis.md +0 -622
- package/docs/dashboard-guide.md +0 -487
- package/docs/enterprise/migration.md +0 -265
- package/docs/history/one-run-audit.md +0 -304
- package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
- package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
- package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
- package/docs/prd-purple-lab-ide.md +0 -152
- package/docs/prd-purple-lab-platform-v2.md +0 -223
- package/docs/prd-purple-lab-platform.md +0 -319
- package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
- package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
- package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
- package/docs/show-hn-post.md +0 -46
- package/docs/test-scenarios/enterprise-scenarios.md +0 -732
- package/docs/thick2thin.md +0 -173
- package/packages/control-plane/ui/dist/assets/index-DcBJXjCJ.js +0 -190
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
# Loki Mode Dashboard V2 - Implementation Checklist
|
|
2
|
-
|
|
3
|
-
> **Historical:** this describes the classic dashboard, removed in Loki Mode 10.8. The Control Plane is the only UI; see [control-plane-migration.md](control-plane-migration.md).
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
Enterprise-grade Kanban dashboard with FastAPI backend, cross-project support, and CLI integration.
|
|
7
|
-
|
|
8
|
-
**Target Version:** v6.0.0
|
|
9
|
-
**Status:** Planning Complete
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Phase 1: Backend Foundation
|
|
14
|
-
|
|
15
|
-
### 1.1 FastAPI Server Setup
|
|
16
|
-
- [ ] Create `dashboard/server.py` with FastAPI app
|
|
17
|
-
- [ ] Add SQLite database with SQLAlchemy models
|
|
18
|
-
- [ ] Implement health check endpoint `/health`
|
|
19
|
-
- [ ] Add CORS middleware for frontend
|
|
20
|
-
- [ ] Create Dockerfile for dashboard
|
|
21
|
-
|
|
22
|
-
### 1.2 Database Models
|
|
23
|
-
- [ ] Project model (id, name, path, alias, status)
|
|
24
|
-
- [ ] Session model (id, project_id, status, started_at)
|
|
25
|
-
- [ ] Task model (id, title, status, priority, type, project_id)
|
|
26
|
-
- [ ] Agent model (id, session_id, type, model, status)
|
|
27
|
-
- [ ] Log model (id, session_id, level, message, timestamp)
|
|
28
|
-
|
|
29
|
-
### 1.3 Core API Endpoints
|
|
30
|
-
- [ ] GET/POST `/api/projects` - Project management
|
|
31
|
-
- [ ] GET/POST/PUT/DELETE `/api/tasks` - Task CRUD
|
|
32
|
-
- [ ] POST `/api/tasks/{id}/move` - Move task between columns
|
|
33
|
-
- [ ] GET `/api/status` - System status
|
|
34
|
-
- [ ] GET `/api/agents` - Active agents
|
|
35
|
-
|
|
36
|
-
### 1.4 WebSocket/SSE
|
|
37
|
-
- [ ] WebSocket endpoint `/ws` for real-time updates
|
|
38
|
-
- [ ] Event types: task:*, session:*, agent:*, log:*
|
|
39
|
-
- [ ] Heartbeat mechanism
|
|
40
|
-
- [ ] Reconnection handling
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Phase 2: CLI Integration
|
|
45
|
-
|
|
46
|
-
### 2.1 Dashboard Commands
|
|
47
|
-
- [ ] `loki dashboard start [--port] [--host]`
|
|
48
|
-
- [ ] `loki dashboard stop`
|
|
49
|
-
- [ ] `loki dashboard status`
|
|
50
|
-
- [ ] `loki dashboard url [--format json|text]`
|
|
51
|
-
- [ ] `loki dashboard open`
|
|
52
|
-
|
|
53
|
-
### 2.2 Project Commands
|
|
54
|
-
- [ ] `loki projects list`
|
|
55
|
-
- [ ] `loki projects add [path] [--alias]`
|
|
56
|
-
- [ ] `loki projects remove [alias|path]`
|
|
57
|
-
- [ ] `loki projects select`
|
|
58
|
-
|
|
59
|
-
### 2.3 State Synchronization
|
|
60
|
-
- [ ] Update run.sh to notify dashboard on events
|
|
61
|
-
- [ ] Implement dashboard-state.json writer
|
|
62
|
-
- [ ] Add file watcher for .loki/ changes
|
|
63
|
-
- [ ] Bidirectional task sync
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Phase 3: Frontend (React + Vite)
|
|
68
|
-
|
|
69
|
-
### 3.1 Project Setup
|
|
70
|
-
- [ ] Initialize Vite + React + TypeScript
|
|
71
|
-
- [ ] Add TailwindCSS with Anthropic design tokens
|
|
72
|
-
- [ ] Configure build for embedding in Python package
|
|
73
|
-
- [ ] Add Zustand for state management
|
|
74
|
-
|
|
75
|
-
### 3.2 Layout Components
|
|
76
|
-
- [ ] Sidebar navigation (260px desktop, off-canvas mobile)
|
|
77
|
-
- [ ] Top header with status bar
|
|
78
|
-
- [ ] Project selector dropdown
|
|
79
|
-
- [ ] Theme toggle (light/dark)
|
|
80
|
-
|
|
81
|
-
### 3.3 Kanban Board
|
|
82
|
-
- [ ] 5 columns: Backlog, Pending, In Progress, Review, Done
|
|
83
|
-
- [ ] Drag-and-drop with @dnd-kit
|
|
84
|
-
- [ ] Task cards with priority badges
|
|
85
|
-
- [ ] Column WIP limits
|
|
86
|
-
- [ ] Filter and sort controls
|
|
87
|
-
|
|
88
|
-
### 3.4 Task Management
|
|
89
|
-
- [ ] Task detail modal
|
|
90
|
-
- [ ] New task form
|
|
91
|
-
- [ ] Edit task inline
|
|
92
|
-
- [ ] Delete with confirmation
|
|
93
|
-
- [ ] GitHub issue import
|
|
94
|
-
|
|
95
|
-
### 3.5 Control Panel
|
|
96
|
-
- [ ] Start/Stop/Pause/Resume buttons
|
|
97
|
-
- [ ] Status indicators (mode, phase, RARV step)
|
|
98
|
-
- [ ] Quality gates display
|
|
99
|
-
- [ ] Memory system bars
|
|
100
|
-
|
|
101
|
-
### 3.6 Additional Views
|
|
102
|
-
- [ ] Agents monitor grid
|
|
103
|
-
- [ ] Log viewer (terminal style)
|
|
104
|
-
- [ ] Memory/Learnings browser
|
|
105
|
-
- [ ] Settings page
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Phase 4: Session Control
|
|
110
|
-
|
|
111
|
-
### 4.1 Control Endpoints
|
|
112
|
-
- [ ] POST `/api/control/start` - Start Loki Mode
|
|
113
|
-
- [ ] POST `/api/control/stop` - Stop execution
|
|
114
|
-
- [ ] POST `/api/control/pause` - Pause execution
|
|
115
|
-
- [ ] POST `/api/control/resume` - Resume execution
|
|
116
|
-
- [ ] POST `/api/control/input` - Inject human input
|
|
117
|
-
|
|
118
|
-
### 4.2 Process Management
|
|
119
|
-
- [ ] Spawn run.sh from dashboard
|
|
120
|
-
- [ ] Track PID and monitor process
|
|
121
|
-
- [ ] Handle graceful shutdown
|
|
122
|
-
- [ ] Support background mode
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Phase 5: Cross-Project Features
|
|
127
|
-
|
|
128
|
-
### 5.1 Project Registry
|
|
129
|
-
- [ ] Store projects in ~/.loki/dashboard/projects.json
|
|
130
|
-
- [ ] Auto-discover .loki directories
|
|
131
|
-
- [ ] Project health monitoring
|
|
132
|
-
- [ ] Last accessed tracking
|
|
133
|
-
|
|
134
|
-
### 5.2 Unified Views
|
|
135
|
-
- [ ] Cross-project task list
|
|
136
|
-
- [ ] Combined activity feed
|
|
137
|
-
- [ ] Aggregated metrics
|
|
138
|
-
- [ ] Global search
|
|
139
|
-
|
|
140
|
-
### 5.3 Memory Integration
|
|
141
|
-
- [ ] Display cross-project learnings
|
|
142
|
-
- [ ] Search patterns/mistakes/successes
|
|
143
|
-
- [ ] Export learnings
|
|
144
|
-
- [ ] Learning statistics by project
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Phase 6: Enterprise Features
|
|
149
|
-
|
|
150
|
-
### 6.1 Authentication
|
|
151
|
-
- [ ] Token-based auth for remote access
|
|
152
|
-
- [ ] `loki dashboard token generate/revoke/list`
|
|
153
|
-
- [ ] Bearer token validation middleware
|
|
154
|
-
- [ ] Optional OIDC/SAML support
|
|
155
|
-
|
|
156
|
-
### 6.2 Audit & Logging
|
|
157
|
-
- [ ] Audit trail in audit.jsonl
|
|
158
|
-
- [ ] Action logging (start, stop, task changes)
|
|
159
|
-
- [ ] User attribution
|
|
160
|
-
- [ ] Log retention policy
|
|
161
|
-
|
|
162
|
-
### 6.3 Deployment
|
|
163
|
-
- [ ] Docker Compose with PostgreSQL
|
|
164
|
-
- [ ] Environment variable configuration
|
|
165
|
-
- [ ] TLS/HTTPS support
|
|
166
|
-
- [ ] Reverse proxy compatibility
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Phase 7: Testing & Documentation
|
|
171
|
-
|
|
172
|
-
### 7.1 Backend Tests
|
|
173
|
-
- [ ] Unit tests for API endpoints
|
|
174
|
-
- [ ] Integration tests for WebSocket
|
|
175
|
-
- [ ] Database migration tests
|
|
176
|
-
- [ ] Authentication tests
|
|
177
|
-
|
|
178
|
-
### 7.2 Frontend Tests
|
|
179
|
-
- [ ] Component tests with Vitest
|
|
180
|
-
- [ ] E2E tests with Playwright
|
|
181
|
-
- [ ] Accessibility tests
|
|
182
|
-
- [ ] Mobile responsive tests
|
|
183
|
-
|
|
184
|
-
### 7.3 CLI Tests
|
|
185
|
-
- [ ] Command parsing tests
|
|
186
|
-
- [ ] Integration with dashboard server
|
|
187
|
-
- [ ] Error handling tests
|
|
188
|
-
|
|
189
|
-
### 7.4 Documentation
|
|
190
|
-
- [ ] API documentation (OpenAPI/Swagger)
|
|
191
|
-
- [ ] CLI command reference
|
|
192
|
-
- [ ] Deployment guide
|
|
193
|
-
- [ ] User guide with screenshots
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## Dependencies
|
|
198
|
-
|
|
199
|
-
### Backend
|
|
200
|
-
- Python 3.11+
|
|
201
|
-
- FastAPI
|
|
202
|
-
- SQLAlchemy 2.0
|
|
203
|
-
- Uvicorn
|
|
204
|
-
- Pydantic
|
|
205
|
-
|
|
206
|
-
### Frontend
|
|
207
|
-
- React 18
|
|
208
|
-
- Vite
|
|
209
|
-
- TailwindCSS
|
|
210
|
-
- @dnd-kit (drag-and-drop)
|
|
211
|
-
- Zustand (state)
|
|
212
|
-
- Lucide React (icons)
|
|
213
|
-
|
|
214
|
-
### Build
|
|
215
|
-
- Docker
|
|
216
|
-
- Node.js 18+ (for frontend build)
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
## Success Metrics
|
|
221
|
-
|
|
222
|
-
- [ ] Dashboard loads in < 2 seconds
|
|
223
|
-
- [ ] WebSocket updates in < 100ms
|
|
224
|
-
- [ ] Support 10+ concurrent projects
|
|
225
|
-
- [ ] Mobile-friendly (responsive)
|
|
226
|
-
- [ ] WCAG AA accessibility
|
|
227
|
-
- [ ] Zero npm dependencies in backend
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## Timeline
|
|
232
|
-
|
|
233
|
-
| Phase | Duration | Status |
|
|
234
|
-
|-------|----------|--------|
|
|
235
|
-
| Phase 1: Backend | 1 week | Not Started |
|
|
236
|
-
| Phase 2: CLI | 3 days | Not Started |
|
|
237
|
-
| Phase 3: Frontend | 2 weeks | Not Started |
|
|
238
|
-
| Phase 4: Session Control | 3 days | Not Started |
|
|
239
|
-
| Phase 5: Cross-Project | 1 week | Not Started |
|
|
240
|
-
| Phase 6: Enterprise | 1 week | Not Started |
|
|
241
|
-
| Phase 7: Testing | 1 week | Not Started |
|
|
242
|
-
|
|
243
|
-
**Total: ~6 weeks**
|
package/docs/DEMOS.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# Loki Mode -- Interactive Content Index
|
|
2
|
-
|
|
3
|
-
Complete listing of all interactive HTML experiences in the Loki Mode repository. 8 files total across three categories.
|
|
4
|
-
|
|
5
|
-
## Overview (1 HTML file)
|
|
6
|
-
|
|
7
|
-
`docs/overview.html`: Loki Mode 10 explained in five views (Users, Engineers,
|
|
8
|
-
Architects, Executives, Pitch), with Mermaid flow diagrams. It replaces the six
|
|
9
|
-
legacy-era pages that used to live in `docs/walkthrough/`.
|
|
10
|
-
|
|
11
|
-
## Demo Apps (6 HTML files)
|
|
12
|
-
|
|
13
|
-
Located in `examples/`. Each was generated by Loki Mode from a single prompt.
|
|
14
|
-
|
|
15
|
-
| File | Title | Description | Size |
|
|
16
|
-
|------|-------|-------------|------|
|
|
17
|
-
| `demo-saas-dashboard.html` | SaaS Dashboard | KPI cards, sparklines, revenue chart, activity feed | 9 KB |
|
|
18
|
-
| `demo-task-manager.html` | Task Manager | Kanban board with drag-and-drop and localStorage | 9 KB |
|
|
19
|
-
| `demo-chat-app.html` | Chat App | Real-time chat with typing indicators and auto-scroll | 8 KB |
|
|
20
|
-
| `demo-landing-page.html` | Landing Page | Hero, features, pricing, FAQ accordion, newsletter | 15 KB |
|
|
21
|
-
| `demo-portfolio.html` | Portfolio | Animated gradients, skill bars, project cards, contact form | 12 KB |
|
|
22
|
-
| `demo-ecommerce.html` | E-Commerce | Product filters, sorting, star ratings, cart counter | 12 KB |
|
|
23
|
-
|
|
24
|
-
## Product Website (1 HTML file)
|
|
25
|
-
|
|
26
|
-
| File | Title | Description | Size |
|
|
27
|
-
|------|-------|-------------|------|
|
|
28
|
-
| `website/index.html` | Loki Mode Product Website | Full landing page with hero, terminal animation, features, pricing | 38 KB |
|
|
29
|
-
|
|
30
|
-
## Summary
|
|
31
|
-
|
|
32
|
-
| Category | Count |
|
|
33
|
-
|----------|-------|
|
|
34
|
-
| Overview | 1 |
|
|
35
|
-
| Demo Apps | 6 |
|
|
36
|
-
| Product Website | 1 |
|
|
37
|
-
| **Total** | **8** |
|
|
38
|
-
|
|
39
|
-
## Viewing Locally
|
|
40
|
-
|
|
41
|
-
All files are self-contained HTML. Open directly in any browser:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Open the overview
|
|
45
|
-
open docs/overview.html
|
|
46
|
-
|
|
47
|
-
# Open a demo app
|
|
48
|
-
open examples/demo-saas-dashboard.html
|
|
49
|
-
|
|
50
|
-
# Or serve the entire repo with a local server
|
|
51
|
-
python3 -m http.server 8080
|
|
52
|
-
# Then visit http://localhost:8080/docs/overview.html
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Design
|
|
56
|
-
|
|
57
|
-
All interactive content shares these characteristics:
|
|
58
|
-
|
|
59
|
-
- **Self-contained** -- Single HTML file with embedded CSS and JavaScript
|
|
60
|
-
- **No build step** -- Open in any browser, works offline (except Google Fonts)
|
|
61
|
-
- **Dark theme** -- Consistent dark design with purple accent (#553DE9)
|
|
62
|
-
- **Responsive** -- Adapts to mobile, tablet, and desktop viewports
|
|
63
|
-
- **No build step dependencies** -- No npm packages; `docs/overview.html` loads Mermaid from a CDN to draw its diagrams
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
# Enterprise Identity Roadmap
|
|
2
|
-
|
|
3
|
-
This document scopes Loki Mode's enterprise identity surface honestly. It
|
|
4
|
-
separates what is shipped today from what is roadmap. Nothing in the
|
|
5
|
-
"Roadmap" section ships today. Where a capability is not built, it is labeled
|
|
6
|
-
as such, with a real effort estimate and the identity-provider (IdP) or test
|
|
7
|
-
infrastructure it would require.
|
|
8
|
-
|
|
9
|
-
The intent is to give a precise, non-aspirational picture so that marketing,
|
|
10
|
-
sales, and docs never overstate the enterprise identity story.
|
|
11
|
-
|
|
12
|
-
## 1. Current state (shipped, verified)
|
|
13
|
-
|
|
14
|
-
Everything in this section is backed by code in `dashboard/auth.py` and
|
|
15
|
-
`dashboard/server.py`. Function names are cited so claims can be checked.
|
|
16
|
-
|
|
17
|
-
### Token authentication
|
|
18
|
-
|
|
19
|
-
- Opt-in via `LOKI_ENTERPRISE_AUTH=true` (off by default).
|
|
20
|
-
See `ENTERPRISE_AUTH_ENABLED` and `is_enterprise_mode()` in
|
|
21
|
-
`dashboard/auth.py`.
|
|
22
|
-
- API tokens are minted, hashed (per-token random salt, SHA-256), revoked,
|
|
23
|
-
deleted, and listed:
|
|
24
|
-
`generate_token()`, `revoke_token()`, `delete_token()`, `list_tokens()`,
|
|
25
|
-
`validate_token()`. Tokens are stored at `~/.loki/dashboard/tokens.json`
|
|
26
|
-
with enforced `0600` permissions (`_save_tokens()`).
|
|
27
|
-
- Token validation iterates all entries with a constant-time compare to avoid
|
|
28
|
-
leaking token count via timing (`validate_token()` plus
|
|
29
|
-
`_constant_time_compare()`).
|
|
30
|
-
|
|
31
|
-
### OIDC bearer-token validation (the closest foundation for SSO)
|
|
32
|
-
|
|
33
|
-
- Opt-in via `LOKI_OIDC_ISSUER` + `LOKI_OIDC_CLIENT_ID`.
|
|
34
|
-
See `OIDC_ENABLED` and `is_oidc_mode()` in `dashboard/auth.py`.
|
|
35
|
-
- Inbound JWTs are validated by `validate_oidc_token()`. When PyJWT +
|
|
36
|
-
cryptography are installed, signatures are cryptographically verified
|
|
37
|
-
(RS256/RS384/RS512) against the provider's JWKS endpoint, with issuer and
|
|
38
|
-
audience checks (`_get_oidc_config()`, `_get_jwks()`).
|
|
39
|
-
- Without PyJWT, tokens are rejected unless `LOKI_OIDC_SKIP_SIGNATURE_VERIFY`
|
|
40
|
-
is explicitly set (insecure, local-testing only, loudly logged as critical).
|
|
41
|
-
- Role/group claims are mapped to Loki roles by `_scopes_from_claims()` /
|
|
42
|
-
`_collect_role_claims()`, supporting generic `roles`/`groups`, Keycloak
|
|
43
|
-
`realm_access.roles`, AWS Cognito `cognito:groups`, and a configurable
|
|
44
|
-
claim (`LOKI_OIDC_ROLES_CLAIM`). Unrecognized claims fall back to the
|
|
45
|
-
least-privileged default role (`_default_oidc_role()`, default `viewer`),
|
|
46
|
-
never admin.
|
|
47
|
-
|
|
48
|
-
IMPORTANT distinction: this is server-side validation of a bearer JWT that
|
|
49
|
-
some other system obtained. Loki does NOT implement a browser login flow,
|
|
50
|
-
an authorization-code exchange, or an end-user SSO redirect. A separate
|
|
51
|
-
component must perform the user-facing sign-in and present the resulting
|
|
52
|
-
JWT to Loki.
|
|
53
|
-
|
|
54
|
-
### Scopes and predefined roles (read/control style authorization)
|
|
55
|
-
|
|
56
|
-
- Four predefined roles in `ROLES`: `admin`, `operator`, `viewer`,
|
|
57
|
-
`auditor`. Scope hierarchy (`_SCOPE_HIERARCHY`, `has_scope()`):
|
|
58
|
-
`*` -> `control` -> `write` -> `read`, plus `audit`/`admin`.
|
|
59
|
-
- Endpoint enforcement via the `require_scope()` dependency factory and the
|
|
60
|
-
`get_current_token()` FastAPI dependency. When neither auth mode is enabled,
|
|
61
|
-
access is anonymous (local-first default).
|
|
62
|
-
|
|
63
|
-
### Dashboard transport gating (added in Release A)
|
|
64
|
-
|
|
65
|
-
- WebSocket auth gating: the dashboard validates a bearer token (header or
|
|
66
|
-
`?token=`/`?access_token=` query for browser clients) at the mount
|
|
67
|
-
boundary before delegating, mirroring the HTTP `get_current_token` order
|
|
68
|
-
(OIDC first, then loki token). See `_MountAuthGuard._validate_ws_token()`
|
|
69
|
-
and `_ws_token_from_scope()` in `dashboard/server.py`.
|
|
70
|
-
- REST scope consistency: `/api/memory` and `/api/collab` endpoints were
|
|
71
|
-
brought in line with the read/control scope model so they are not reachable
|
|
72
|
-
unauthenticated when enterprise auth is on.
|
|
73
|
-
- Webhook/trigger HMAC: the external trigger surface requires a shared secret
|
|
74
|
-
and rejects unsigned/mismatched requests (constant-time compare via
|
|
75
|
-
`hmac.compare_digest`, surfaced through `_constant_time_compare()`).
|
|
76
|
-
|
|
77
|
-
### Tenant isolation (data-plane, present but minimal)
|
|
78
|
-
|
|
79
|
-
- A `Tenant` model exists (`dashboard/models.py`: `class Tenant`, with
|
|
80
|
-
`Project.tenant_id` foreign keys) and the v2 API enforces a tenant boundary
|
|
81
|
-
derived from a trusted, server-validated `tenant:<id>` scope on the token
|
|
82
|
-
(`dashboard/api_v2.py`: `TENANT_SCOPE_PREFIX`). A non-admin token is pinned
|
|
83
|
-
to one tenant; cross-tenant requests are denied with 403; an un-scoped
|
|
84
|
-
token reaches no tenant-scoped resource.
|
|
85
|
-
- This is project-level data isolation keyed off a token scope. It is NOT a
|
|
86
|
-
full tenant RBAC system (no roles per tenant, no per-tenant policy
|
|
87
|
-
administration, no tenant lifecycle management UI). See the roadmap below.
|
|
88
|
-
|
|
89
|
-
### What the infrastructure OIDC is (and is NOT)
|
|
90
|
-
|
|
91
|
-
The OIDC referenced in the Terraform and Helm assets is workload identity
|
|
92
|
-
(IRSA on AWS / Workload Identity on GCP) used so the running pods can assume
|
|
93
|
-
cloud roles. That is machine-to-cloud authentication, not end-user SSO.
|
|
94
|
-
|
|
95
|
-
Likewise, Kubernetes RBAC and NetworkPolicy in the Helm chart govern what the
|
|
96
|
-
cluster service accounts and pods may do. They are cluster-plane controls and
|
|
97
|
-
are unrelated to product-level or per-tenant authorization for Loki users.
|
|
98
|
-
Do not conflate cluster RBAC with application RBAC.
|
|
99
|
-
|
|
100
|
-
## 2. Roadmap (NOT built)
|
|
101
|
-
|
|
102
|
-
None of the items below are implemented. Each lists honest scope, a rough
|
|
103
|
-
effort estimate, and the IdP or test infrastructure required.
|
|
104
|
-
|
|
105
|
-
### SSO / SAML (browser sign-in flow)
|
|
106
|
-
|
|
107
|
-
- Scope: a user-facing single sign-on flow. Two sub-paths:
|
|
108
|
-
- OIDC authorization-code login (closer to today's code): a browser
|
|
109
|
-
redirect to the IdP, code exchange, session/cookie issuance, and CSRF/
|
|
110
|
-
state handling. The existing `validate_oidc_token()` already validates the
|
|
111
|
-
resulting JWT, so this is the smaller of the two.
|
|
112
|
-
- SAML 2.0 (still common in large enterprises): SP metadata, ACS endpoint,
|
|
113
|
-
XML signature validation, NameID/attribute mapping, and IdP-initiated and
|
|
114
|
-
SP-initiated flows.
|
|
115
|
-
- Effort: OIDC login flow on top of the existing validator is roughly a few
|
|
116
|
-
weeks (1 engineer) including session management and tests. Full SAML 2.0 is
|
|
117
|
-
larger, on the order of 1 to 2 months, because XML signature handling and
|
|
118
|
-
multi-IdP quirks are involved; using a vetted SAML library is mandatory
|
|
119
|
-
rather than hand-rolling.
|
|
120
|
-
- Needs: a real IdP to test against (Okta, Azure AD/Entra ID, or Auth0; a
|
|
121
|
-
free developer tenant works for early dev). Integration tests must run
|
|
122
|
-
against that IdP, not mocks alone.
|
|
123
|
-
|
|
124
|
-
### SCIM user/group provisioning
|
|
125
|
-
|
|
126
|
-
- Scope: a SCIM 2.0 server so an IdP can create/update/deactivate users and
|
|
127
|
-
push group membership automatically, instead of users being created on
|
|
128
|
-
first login. Requires `/scim/v2/Users` and `/scim/v2/Groups` endpoints,
|
|
129
|
-
filtering, pagination, PATCH semantics, and mapping SCIM groups onto Loki
|
|
130
|
-
roles/tenants.
|
|
131
|
-
- Effort: roughly 1 to 1.5 months (1 engineer) for a conformant subset plus a
|
|
132
|
-
persistence model for provisioned identities (today there is no durable
|
|
133
|
-
user store; OIDC users are derived per-request from claims).
|
|
134
|
-
- Needs: a SCIM-capable IdP to drive the provisioning (Okta or Azure AD), plus
|
|
135
|
-
a SCIM conformance test harness. This depends on a real user-store model
|
|
136
|
-
landing first.
|
|
137
|
-
|
|
138
|
-
### App-level / tenant RBAC
|
|
139
|
-
|
|
140
|
-
- Scope: roles and policy that go beyond the current four global roles and
|
|
141
|
-
the `read`/`control` scope hierarchy. Concretely: roles scoped per tenant,
|
|
142
|
-
per-tenant policy administration, custom roles, resource-level permissions,
|
|
143
|
-
and an admin surface to manage them.
|
|
144
|
-
- Current state to build on: `Tenant`/`Project` models exist and a
|
|
145
|
-
`tenant:<id>` scope pins a token to one tenant (data isolation). What is
|
|
146
|
-
missing: per-tenant role assignment, a policy model richer than the global
|
|
147
|
-
scope hierarchy, custom/role-definition management, and any UI for it.
|
|
148
|
-
- Effort: roughly 1 to 2 months (1 to 2 engineers) depending on how much
|
|
149
|
-
policy flexibility is committed to (a fixed per-tenant role set is the
|
|
150
|
-
smaller end; arbitrary custom roles and resource-level rules is the larger
|
|
151
|
-
end).
|
|
152
|
-
- Needs: no external IdP, but it pairs naturally with SCIM (group-to-role
|
|
153
|
-
mapping) and benefits from the durable user store noted above.
|
|
154
|
-
|
|
155
|
-
### SOC2
|
|
156
|
-
|
|
157
|
-
- Scope: SOC2 is a compliance PROGRAM, not a code feature. It spans durable,
|
|
158
|
-
integrity-protected audit logging with retention and SIEM export, access reviews,
|
|
159
|
-
change-management process, vendor management, security policies, and a Type
|
|
160
|
-
II observation window (commonly 6 to 12 months of evidence collected under
|
|
161
|
-
an auditor).
|
|
162
|
-
- What exists today that helps but does not constitute SOC2: hash-chained
|
|
163
|
-
audit logging and syslog/SIEM forwarding (see the audit-logging docs). These
|
|
164
|
-
are inputs to an audit, not the certification.
|
|
165
|
-
- Effort: multi-quarter organizational work, typically 6 to 12 months elapsed,
|
|
166
|
-
involving engineering, security, and an external auditor. It is not a sprint
|
|
167
|
-
and should never be represented as a shippable feature.
|
|
168
|
-
- Needs: an auditor engagement, an evidence/observation window, and
|
|
169
|
-
organizational process, in parallel with (not blocking) the code items above.
|
|
170
|
-
|
|
171
|
-
## 3. Sequencing recommendation
|
|
172
|
-
|
|
173
|
-
1. OIDC authorization-code login flow first. It reuses the existing
|
|
174
|
-
`validate_oidc_token()` validator, is the smallest increment, and unlocks
|
|
175
|
-
the most common "we need SSO" enterprise requirement with the least new
|
|
176
|
-
surface. This is the natural next code step after today's OIDC bearer
|
|
177
|
-
validation.
|
|
178
|
-
2. App-level / tenant RBAC next, building on the existing `Tenant` model and
|
|
179
|
-
`tenant:<id>` scope. Most mid-market and enterprise deals ask for "roles
|
|
180
|
-
and tenant isolation" once SSO is in place.
|
|
181
|
-
3. SCIM after a durable user store exists (it depends on one). SCIM is a
|
|
182
|
-
larger-enterprise ask and is most valuable once SSO and RBAC are stable.
|
|
183
|
-
4. SAML in parallel with or after the OIDC login flow, only when a target
|
|
184
|
-
account specifically requires SAML rather than OIDC. Many enterprises
|
|
185
|
-
accept OIDC, so do not build SAML speculatively.
|
|
186
|
-
5. SOC2 runs as parallel organizational work, started early because of the
|
|
187
|
-
observation window, but tracked separately from the code roadmap. The
|
|
188
|
-
existing audit-log foundation is a head start, not a finish line.
|
|
189
|
-
|
|
190
|
-
Rationale: OIDC login -> tenant RBAC -> SCIM is the path that unlocks the most
|
|
191
|
-
enterprise deals soonest while reusing the most existing code. SAML is
|
|
192
|
-
demand-gated. SOC2 is long-lead org work that should begin in parallel rather
|
|
193
|
-
than block feature delivery.
|
|
194
|
-
|
|
195
|
-
## 4. What we do NOT claim
|
|
196
|
-
|
|
197
|
-
Loki Mode does NOT today ship: a browser SSO login flow, SAML support, SCIM
|
|
198
|
-
provisioning, app-level or per-tenant RBAC beyond the global four-role / read-
|
|
199
|
-
control scope model and the `tenant:<id>` data-isolation scope, or SOC2
|
|
200
|
-
certification. The shipped identity surface is: opt-in token auth, opt-in OIDC
|
|
201
|
-
bearer-token validation, a read/control scope model with four predefined
|
|
202
|
-
roles, dashboard WebSocket and REST auth gating, webhook HMAC verification,
|
|
203
|
-
and tenant data isolation via a token scope. Workload-identity OIDC (IRSA /
|
|
204
|
-
Workload Identity) and Kubernetes RBAC/NetworkPolicy are infrastructure
|
|
205
|
-
controls and are not end-user SSO or product RBAC. Any statement beyond this
|
|
206
|
-
is roadmap, not a current capability.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Evidence Receipt: honest build applicability (done once, for all customers)
|
|
2
|
-
|
|
3
|
-
## The defect (founder-reported, 2026-07-03)
|
|
4
|
-
|
|
5
|
-
A sophisticated user built a Node CLI (invoice tool) and saw the Evidence Receipt say
|
|
6
|
-
"Build: not run - build not run", "Live health check: not captured", "No screenshot",
|
|
7
|
-
headline "Working, with gaps". He concluded *nothing was validated* -- and that read is the
|
|
8
|
-
bug: it destroys trust in genuinely-validated work.
|
|
9
|
-
|
|
10
|
-
## Ground truth (from the persisted proof of run-20260703034719)
|
|
11
|
-
|
|
12
|
-
- `facts.tests` = `verified`, exit 0 -- tests GENUINELY ran and passed.
|
|
13
|
-
- `facts.security` = `ran:true, clean` -- security GENUINELY ran, real clean scan.
|
|
14
|
-
- `facts.build` = `ran:false, status:not_run, command:""` -- and this is counted as a GAP
|
|
15
|
-
by `_compute_degraded` (proof-generator.py:903-908), which forces "WITH GAPS".
|
|
16
|
-
- `facts.quality_gates` = `[]` (EMPTY) -- verify.sh's deterministic build gate does NOT
|
|
17
|
-
reach the SaaS proof.
|
|
18
|
-
|
|
19
|
-
## Root cause (systemic, every build, every customer)
|
|
20
|
-
|
|
21
|
-
`build-results.json` has **NO writer**. `_collect_build` (proof-generator.py:319) reads
|
|
22
|
-
`.loki/quality/build-results.json`, which nothing ever writes, so `facts.build` defaults to
|
|
23
|
-
`not_run` (line 333) for EVERY build. The sibling collectors DO have writers in run.sh
|
|
24
|
-
(`enforce_static_analysis` 8357, `run_secure_scan` 8720, `enforce_test_coverage` 9170 ->
|
|
25
|
-
test-results.json / security-findings.json / static-analysis.json). Build was never wired.
|
|
26
|
-
|
|
27
|
-
So "Build: not run" is not a per-project decision -- it is a permanent, structural
|
|
28
|
-
mislabel. A build that has no build step (a CLI) and a build that genuinely skipped a real
|
|
29
|
-
build both read identically as "not run" and both count as a gap.
|
|
30
|
-
|
|
31
|
-
## The fix (honest, no fabrication, no mocking -- the founder's hard constraint)
|
|
32
|
-
|
|
33
|
-
Add the missing writer as a sibling collector, with a POSITIVE applicability determination:
|
|
34
|
-
|
|
35
|
-
1. **run.sh `enforce_build_check()`** (new, sibling to enforce_static_analysis): detect the
|
|
36
|
-
stack's build command (npm "build" script / go build / cargo build -- same detectors as
|
|
37
|
-
verify.sh:250-291). Then:
|
|
38
|
-
- build command exists -> RUN it -> record `{ran:true, command, exit_code, status:
|
|
39
|
-
verified|failed}`.
|
|
40
|
-
- genuinely NO build step for this stack -> record `{ran:false, applicable:false,
|
|
41
|
-
status:not_applicable, command:""}`. This is a POSITIVE "no build phase" signal, not an
|
|
42
|
-
absent file.
|
|
43
|
-
Write `.loki/quality/build-results.json`. Call it where the sibling collectors are called.
|
|
44
|
-
|
|
45
|
-
2. **proof-generator.py `_collect_build`**: pass through `applicable:false` -> status
|
|
46
|
-
`not_applicable`. CRITICAL: `not_applicable` ONLY from an explicit `applicable:false` in
|
|
47
|
-
the file. File ABSENT or unknown status -> `not_run` (honest gap), NEVER N/A. Absent must
|
|
48
|
-
never mean N/A (that would flip un-built projects green -- fake-green).
|
|
49
|
-
|
|
50
|
-
3. **proof-generator.py `_compute_degraded`**: `not_applicable` is NOT a gap (excluded from
|
|
51
|
-
the weak set for build). A failed/skipped/not_run build stays a gap. Mirror-image guard:
|
|
52
|
-
a real build script that FAILS still emits `failed` -> gap -> never green.
|
|
53
|
-
|
|
54
|
-
4. **proof-generator.py status normalizer (line 215)**: `not_applicable` passes through.
|
|
55
|
-
|
|
56
|
-
5. **SPA adapter.ts**: `not_applicable` renders "N/A - no build step for this stack" (a
|
|
57
|
-
neutral/pass tier, NOT a warn/gap), distinct from "not run".
|
|
58
|
-
|
|
59
|
-
## Anti-fake-green invariants (the trust moat)
|
|
60
|
-
|
|
61
|
-
- N/A ONLY on positive `applicable:false`. Absent file / unknown status -> honest gap.
|
|
62
|
-
- A build script that got skipped or failed STILL shows a gap and CANNOT go green.
|
|
63
|
-
- The directional regression test (write FIRST): Node project WITH a build script whose
|
|
64
|
-
build FAILS -> `facts.build=failed` -> degraded -> headline NOT green. And: build gate
|
|
65
|
-
MISSING -> still a gap, not N/A.
|
|
66
|
-
- N/A does not gate the seal any more than a gap does; it is honest applicability, not a pass.
|
|
67
|
-
|
|
68
|
-
## Measurable before/after
|
|
69
|
-
|
|
70
|
-
Before: invoice CLI -> "Build: not run", headline "Working, with gaps".
|
|
71
|
-
After: fresh invoice CLI build -> "Build: N/A (no build step for this stack)", tests passed,
|
|
72
|
-
security scanned-clean, headline VERIFIED (no un-closed applicable gaps).
|
|
73
|
-
|
|
74
|
-
## Constraints
|
|
75
|
-
|
|
76
|
-
Verdict-core: council 3/3 + local-ci + 14 version locations. Verify via
|
|
77
|
-
function-extraction/golden harness -- NEVER run the engine build from the worktree. Run the
|
|
78
|
-
EXISTING tests/test_proof_generator.py green before AND after (it has build-results.json
|
|
79
|
-
fixtures that this change touches). Deploy to live SaaS is `bun install -g loki-mode@<ver>`.
|