loki-mode 10.5.16 → 10.5.19
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/.claude-plugin/marketplace.json +12 -0
- package/README.md +878 -29
- package/SKILL.md +3 -3
- package/VERSION +1 -1
- package/autonomy/lib/backlog.py +280 -0
- package/autonomy/lib/loki_yaml.py +225 -0
- package/autonomy/lib/proof-generator.py +251 -0
- package/autonomy/lib/proof-verify.py +1 -0
- package/autonomy/loki +117 -12
- package/autonomy/run.sh +27 -2
- package/autonomy/verify.sh +11 -0
- package/completions/_loki +1 -0
- package/completions/loki.bash +2 -2
- package/dashboard/__init__.py +1 -1
- package/dashboard/api_start.py +463 -0
- package/dashboard/server.py +31 -0
- package/dashboard/static/start.html +100 -0
- package/docs/COMPARISON.md +6 -19
- package/docs/COMPETITIVE-ANALYSIS.md +6 -41
- package/docs/CRASH-REPORTING-PLAN.md +1 -1
- package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/PRIVACY.md +1 -1
- package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +1 -1
- package/docs/WANG-PRINCIPLES-PLAN.md +1 -1
- package/docs/architecture/STATE-MACHINES.md +18 -27
- package/docs/architecture/bmad-integration-validation.md +2 -2
- package/docs/audit-logging.md +12 -86
- package/docs/authentication.md +4 -4
- package/docs/authorization.md +15 -47
- package/docs/auto-claude-comparison.md +1 -33
- package/docs/certification/01-core-concepts/lab.md +3 -3
- package/docs/certification/01-core-concepts/lesson.md +11 -22
- package/docs/certification/01-core-concepts/quiz.md +7 -7
- package/docs/certification/02-enterprise-features/lab.md +0 -2
- package/docs/certification/02-enterprise-features/lesson.md +0 -10
- package/docs/certification/04-production-deployment/lab.md +1 -1
- package/docs/certification/05-troubleshooting/lab.md +2 -2
- package/docs/certification/README.md +1 -1
- package/docs/certification/answer-key.md +37 -20
- package/docs/certification/certification-exam.md +7 -7
- package/docs/competitive/emergence-others-analysis.md +3 -3
- package/docs/competitive/replit-lovable-analysis.md +2 -2
- package/docs/cursor-comparison.md +2 -2
- package/docs/dashboard-guide.md +14 -2
- package/docs/dev/architecture-reference.md +2 -2
- package/docs/dev/project-structure.md +1 -1
- package/docs/enterprise/architecture.md +11 -8
- package/docs/enterprise/integration-cookbook.md +23 -14
- package/docs/enterprise/migration.md +5 -9
- package/docs/enterprise/performance.md +3 -6
- package/docs/enterprise/sdk-guide.md +1 -1
- package/docs/enterprise/security.md +8 -17
- package/docs/exit-codes.md +29 -0
- package/docs/git-workflow.md +4 -62
- package/docs/network-security.md +3 -13
- package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +1 -1
- package/docs/prd-purple-lab-platform-v2.md +1 -1
- package/docs/prd-purple-lab-platform.md +1 -3
- package/docs/research-2026-07/GAP-ANALYSIS-BACKLOG.md +1 -1
- package/docs/show-hn-post.md +3 -4
- package/docs/siem-integration.md +8 -10
- package/docs/test-scenarios/edge-cases.md +2 -2
- package/docs/test-scenarios/enterprise-scenarios.md +4 -4
- package/docs/v10/BOARD.md +21 -11
- package/docs/v10/DECISIONS.md +36 -0
- package/docs/v10/FOUNDER-QUEUE.md +1 -0
- package/docs/v10/GUIDE.md +5 -3
- package/docs/v10/METRICS.md +36 -0
- package/docs/v10/PROGRESS.md +76 -0
- package/docs/walkthrough/README.md +1 -7
- package/loki-ts/dist/loki.js +415 -407
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-B1zdOJaF.js → AdminPage-BH_7fpoz.js} +1 -1
- package/web-app/dist/assets/{Avatar-DKjAJ_w7.js → Avatar-BzyhrX0s.js} +1 -1
- package/web-app/dist/assets/{Badge-DP-UrPLv.js → Badge-CL05xwgC.js} +1 -1
- package/web-app/dist/assets/{Button-c8qBEA2K.js → Button-BVHrGLGH.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-CFljzGbi.js → CockpitPage-B9BAEqD-.js} +1 -1
- package/web-app/dist/assets/{ComparePage-BNKqdNRu.js → ComparePage-D4grckhY.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-DNkpXGt5.js → ErrorBoundary-Bg52u7eg.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-CQd49V4Z.js → EvidenceReceiptPanel-B15kRZbJ.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-B9wji_yi.js → GitHubIssuesPanel-DP_BhJSC.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BkfCV4ag.js → GitHubPRsPanel-DJBu83u9.js} +1 -1
- package/web-app/dist/assets/{HomePage-BVV3Cowy.js → HomePage-6mw4uvLs.js} +2 -2
- package/web-app/dist/assets/{LoginPage-CWiOenLJ.js → LoginPage-BWWzFHif.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DckrjTVd.js → MagicPage-CSyo7k5t.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-DNBnH68C.js → MetricsPage-Buq03cch.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-Ca8za8mL.js → NotFoundPage-BG8vuV4g.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-C92sm9xi.js → ProjectPage-D7eJn--6.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-BxsCyJ95.js → ProjectsPage-DXPycvjA.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-BKg-6aHI.js → SettingsPage-Blvav87U.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-Bw_fI5rG.js → ShowcasePage-ZCAKRsNN.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-Bc-2OWUp.js → SystemSettingsPage-ClzjKfI4.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-GsYRD1b9.js → TeamsPage-CKp1-WGX.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-BN7ZlULA.js → TemplatesPage-C0yAp2Yl.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-d7__ysTd.js → TerminalOutput-C3KbV8E7.js} +1 -1
- package/web-app/dist/assets/{activity-ycOMpCGz.js → activity-CG5PtpVI.js} +1 -1
- package/web-app/dist/assets/{bell-B93o4lsL.js → bell-CyLp--NR.js} +1 -1
- package/web-app/dist/assets/{bot-CB0kmriG.js → bot-Dp0zY9t7.js} +1 -1
- package/web-app/dist/assets/{check-BAYNAOEO.js → check-ipranz8L.js} +1 -1
- package/web-app/dist/assets/{chevron-left-Bgu8UgyR.js → chevron-left-DhYs9D3t.js} +1 -1
- package/web-app/dist/assets/{circle-alert-n_FciWUP.js → circle-alert-BLAxBNgz.js} +1 -1
- package/web-app/dist/assets/{clock-CNceeS66.js → clock-DzocnapF.js} +1 -1
- package/web-app/dist/assets/{cloud-CJBEdb7m.js → cloud-B3YsIUwq.js} +1 -1
- package/web-app/dist/assets/{code-xml-BHnKVqrH.js → code-xml-BPcy_Eqm.js} +1 -1
- package/web-app/dist/assets/{database-DSVoL7Pl.js → database-DOuuclZf.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-48dvOe4H.js → dollar-sign-o77cj-xB.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-8yzS5DeZ.js → file-code-corner-BZ2VMnYA.js} +1 -1
- package/web-app/dist/assets/{file-plus-BcuVrrey.js → file-plus-DeHfGncj.js} +1 -1
- package/web-app/dist/assets/{globe-Bb-O58oN.js → globe-DmIW-phf.js} +1 -1
- package/web-app/dist/assets/{hammer-DeMMY6xW.js → hammer-CoW8R8V5.js} +1 -1
- package/web-app/dist/assets/{index-9hue9wt2.js → index-5rCTAnsF.js} +3 -3
- package/web-app/dist/assets/{layers-DmCoMrQC.js → layers-DGEk-2RQ.js} +1 -1
- package/web-app/dist/assets/{loader-circle-CJvjM7JW.js → loader-circle-DXn-F-H5.js} +1 -1
- package/web-app/dist/assets/{lock-Dpje5cWO.js → lock-D5nAjeUu.js} +1 -1
- package/web-app/dist/assets/{package-mA_hCaf8.js → package-D8Drpzi8.js} +1 -1
- package/web-app/dist/assets/{plus-Db0JnAoC.js → plus-C-0T9dAu.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-DbCL1y7h.js → refresh-cw-AyYQQPZG.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Bt6pp50d.js → rotate-ccw-DYbslLfT.js} +1 -1
- package/web-app/dist/assets/{scroll-text-7j0hXxm7.js → scroll-text-CQFQhF_6.js} +1 -1
- package/web-app/dist/assets/{server-BMJYtpVZ.js → server-DxNytQEJ.js} +1 -1
- package/web-app/dist/assets/{shield-alert-Bu8Pbdy-.js → shield-alert-Xj5wGUSK.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-8erzRJ8k.js → thumbs-up-DW0j9Yxz.js} +1 -1
- package/web-app/dist/assets/{trash-2-DBC_D_Hv.js → trash-2-VOdpiJ1e.js} +1 -1
- package/web-app/dist/assets/{trending-down-DMNq5hSm.js → trending-down-eTizH4_b.js} +1 -1
- package/web-app/dist/assets/{trending-up-9b1IqBqR.js → trending-up-agYVl7bU.js} +1 -1
- package/web-app/dist/assets/{upload-SoA0iiLG.js → upload-DQ3NfXA_.js} +1 -1
- package/web-app/dist/assets/{usePolling-DLP2FX9M.js → usePolling-BKETnkDT.js} +1 -1
- package/web-app/dist/assets/{user-D7Pb9wW3.js → user-Cv6BNmOT.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/docs/README-FULL.md +0 -977
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Loki Mode
|
|
1
|
+
# Loki Mode Integration Cookbook
|
|
2
2
|
|
|
3
3
|
Step-by-step guides for connecting Loki Mode to external services. Each integration is opt-in and configured via environment variables.
|
|
4
4
|
|
|
@@ -173,9 +173,16 @@ curl -X POST "$LOKI_TEAMS_WEBHOOK_URL" \
|
|
|
173
173
|
| Variable | Required | Description |
|
|
174
174
|
|----------|----------|-------------|
|
|
175
175
|
| `LOKI_JIRA_URL` | Yes | Jira Cloud base URL |
|
|
176
|
-
| `LOKI_JIRA_EMAIL` | Yes | Jira user email for authentication |
|
|
177
176
|
| `LOKI_JIRA_TOKEN` | Yes | Jira API token |
|
|
178
|
-
| `
|
|
177
|
+
| `LOKI_JIRA_EPIC_KEY` | No | Epic that run events are synced to |
|
|
178
|
+
|
|
179
|
+
These are read by `src/integrations/sync-subscriber.js`. The Jira user email is
|
|
180
|
+
passed to `JiraApiClient` in code (see below); no environment variable carries it.
|
|
181
|
+
|
|
182
|
+
Known issue on main: `src/integrations/sync-subscriber.js` constructs `JiraApiClient`
|
|
183
|
+
without the `email` and `apiToken` it requires, so Jira auto-sync from these
|
|
184
|
+
variables does not start. Construct `JiraApiClient({ baseUrl, email, apiToken })`
|
|
185
|
+
in code until that is fixed.
|
|
179
186
|
|
|
180
187
|
### Configuration
|
|
181
188
|
|
|
@@ -187,9 +194,7 @@ curl -X POST "$LOKI_TEAMS_WEBHOOK_URL" \
|
|
|
187
194
|
|
|
188
195
|
```bash
|
|
189
196
|
export LOKI_JIRA_URL="https://company.atlassian.net"
|
|
190
|
-
export LOKI_JIRA_EMAIL="user@company.com"
|
|
191
197
|
export LOKI_JIRA_TOKEN="your-api-token"
|
|
192
|
-
export LOKI_JIRA_PROJECT_KEY="PROJ"
|
|
193
198
|
```
|
|
194
199
|
|
|
195
200
|
3. **Epic Sync:**
|
|
@@ -202,7 +207,7 @@ curl -X POST "$LOKI_TEAMS_WEBHOOK_URL" \
|
|
|
202
207
|
|
|
203
208
|
const api = new JiraApiClient({
|
|
204
209
|
baseUrl: process.env.LOKI_JIRA_URL,
|
|
205
|
-
email:
|
|
210
|
+
email: 'user@company.com',
|
|
206
211
|
apiToken: process.env.LOKI_JIRA_TOKEN,
|
|
207
212
|
});
|
|
208
213
|
|
|
@@ -250,11 +255,11 @@ curl -X POST "$LOKI_TEAMS_WEBHOOK_URL" \
|
|
|
250
255
|
|
|
251
256
|
```bash
|
|
252
257
|
# Test Jira API access
|
|
253
|
-
curl -u "
|
|
258
|
+
curl -u "user@company.com:$LOKI_JIRA_TOKEN" \
|
|
254
259
|
"$LOKI_JIRA_URL/rest/api/3/myself" | python3 -m json.tool
|
|
255
260
|
|
|
256
261
|
# Test epic fetch
|
|
257
|
-
curl -u "
|
|
262
|
+
curl -u "user@company.com:$LOKI_JIRA_TOKEN" \
|
|
258
263
|
"$LOKI_JIRA_URL/rest/api/3/issue/PROJ-123" | python3 -m json.tool
|
|
259
264
|
```
|
|
260
265
|
|
|
@@ -282,9 +287,12 @@ curl -u "$LOKI_JIRA_EMAIL:$LOKI_JIRA_TOKEN" \
|
|
|
282
287
|
|
|
283
288
|
| Variable | Required | Description |
|
|
284
289
|
|----------|----------|-------------|
|
|
285
|
-
| `
|
|
290
|
+
| `LOKI_LINEAR_TOKEN` | Yes | Linear personal API key |
|
|
286
291
|
| `LOKI_LINEAR_TEAM_ID` | No | Default team ID for issue creation |
|
|
287
|
-
| `
|
|
292
|
+
| `LOKI_LINEAR_PROJECT_ID` | No | Project that run events are synced to |
|
|
293
|
+
|
|
294
|
+
The webhook signing secret is not an environment variable; set `webhook_secret`
|
|
295
|
+
under `integrations.linear` in `.loki/config.yaml`.
|
|
288
296
|
|
|
289
297
|
### Configuration
|
|
290
298
|
|
|
@@ -295,7 +303,7 @@ curl -u "$LOKI_JIRA_EMAIL:$LOKI_JIRA_TOKEN" \
|
|
|
295
303
|
2. **Set Environment Variables:**
|
|
296
304
|
|
|
297
305
|
```bash
|
|
298
|
-
export
|
|
306
|
+
export LOKI_LINEAR_TOKEN="lin_api_your_key_here"
|
|
299
307
|
export LOKI_LINEAR_TEAM_ID="your-team-id"
|
|
300
308
|
```
|
|
301
309
|
|
|
@@ -304,7 +312,7 @@ curl -u "$LOKI_JIRA_EMAIL:$LOKI_JIRA_TOKEN" \
|
|
|
304
312
|
```javascript
|
|
305
313
|
const { LinearClient } = require('./src/integrations/linear/client');
|
|
306
314
|
|
|
307
|
-
const client = new LinearClient(process.env.
|
|
315
|
+
const client = new LinearClient(process.env.LOKI_LINEAR_TOKEN);
|
|
308
316
|
|
|
309
317
|
// Fetch a project with all issues
|
|
310
318
|
const project = await client.getProject('project-id');
|
|
@@ -338,14 +346,15 @@ curl -u "$LOKI_JIRA_EMAIL:$LOKI_JIRA_TOKEN" \
|
|
|
338
346
|
|
|
339
347
|
5. **Webhook Handler (optional):**
|
|
340
348
|
|
|
341
|
-
Configure Linear to send webhooks to your Loki Mode instance
|
|
349
|
+
Configure Linear to send webhooks to your Loki Mode instance. Signatures are
|
|
350
|
+
verified when `webhook_secret` is set (`src/integrations/linear/sync.js`).
|
|
342
351
|
|
|
343
352
|
### Verification
|
|
344
353
|
|
|
345
354
|
```bash
|
|
346
355
|
# Test Linear API access
|
|
347
356
|
curl -X POST https://api.linear.app/graphql \
|
|
348
|
-
-H "Authorization: $
|
|
357
|
+
-H "Authorization: $LOKI_LINEAR_TOKEN" \
|
|
349
358
|
-H "Content-Type: application/json" \
|
|
350
359
|
-d '{"query": "{ viewer { id name } }"}'
|
|
351
360
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Loki Mode
|
|
1
|
+
# Loki Mode Migration Guide
|
|
2
2
|
|
|
3
3
|
## Upgrading from v5.50.0 to v5.51.0
|
|
4
4
|
|
|
@@ -76,10 +76,7 @@ See `docs/enterprise/sdk-guide.md` for installation and usage.
|
|
|
76
76
|
| `LOKI_TEAMS_WEBHOOK_SECRET` | (unset) | Teams webhook shared secret |
|
|
77
77
|
| `LOKI_OIDC_ISSUER` | (unset) | OIDC identity provider URL |
|
|
78
78
|
| `LOKI_OIDC_CLIENT_ID` | (unset) | OIDC client ID |
|
|
79
|
-
| `
|
|
80
|
-
| `LOKI_OIDC_REDIRECT_URI` | (unset) | OIDC redirect URI |
|
|
81
|
-
| `LOKI_CORS_ORIGINS` | localhost | Allowed CORS origins |
|
|
82
|
-
| `LOKI_API_RATE_LIMIT` | 100 | API rate limit (requests/min) |
|
|
79
|
+
| `LOKI_DASHBOARD_CORS` | localhost | Allowed CORS origins |
|
|
83
80
|
|
|
84
81
|
### Existing Environment Variables (Unchanged)
|
|
85
82
|
|
|
@@ -101,12 +98,11 @@ These variables from v5.50.0 continue to work identically:
|
|
|
101
98
|
| `LOKI_TLS_CERT` | (unset) | TLS certificate path |
|
|
102
99
|
| `LOKI_TLS_KEY` | (unset) | TLS key path |
|
|
103
100
|
| `LOKI_JIRA_URL` | (unset) | Jira Cloud base URL |
|
|
104
|
-
| `LOKI_JIRA_EMAIL` | (unset) | Jira user email |
|
|
105
101
|
| `LOKI_JIRA_TOKEN` | (unset) | Jira API token |
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
102
|
+
| `LOKI_JIRA_EPIC_KEY` | (unset) | Jira epic that run events sync to |
|
|
103
|
+
| `LOKI_LINEAR_TOKEN` | (unset) | Linear API key |
|
|
108
104
|
| `LOKI_LINEAR_TEAM_ID` | (unset) | Linear team ID |
|
|
109
|
-
| `
|
|
105
|
+
| `LOKI_LINEAR_PROJECT_ID` | (unset) | Linear project that run events sync to |
|
|
110
106
|
| `LOKI_GITHUB_SYNC` | (unset) | Enable GitHub sync |
|
|
111
107
|
|
|
112
108
|
### API Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Loki Mode
|
|
1
|
+
# Loki Mode Enterprise Performance Tuning
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
@@ -233,11 +233,8 @@ uvicorn dashboard.server:app --workers 4 --host 0.0.0.0 --port 57374
|
|
|
233
233
|
|
|
234
234
|
Dashboard API rate limits protect against abuse:
|
|
235
235
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
# Override via env vars if needed
|
|
239
|
-
export LOKI_API_RATE_LIMIT="100" # requests per minute
|
|
240
|
-
```
|
|
236
|
+
Rate limits are built into the API layer (10 requests/min on control endpoints,
|
|
237
|
+
60 on rate-limited read endpoints) and are not configurable by environment variable.
|
|
241
238
|
|
|
242
239
|
### Static Asset Caching
|
|
243
240
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Loki Mode
|
|
1
|
+
# Loki Mode Enterprise Security
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
@@ -167,27 +167,18 @@ When both variables are set, the dashboard server binds on HTTPS only. Self-sign
|
|
|
167
167
|
|
|
168
168
|
### Rate Limiting
|
|
169
169
|
|
|
170
|
-
The API
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
| Write operations | 30 req/min |
|
|
176
|
-
| Auth operations | 10 req/min |
|
|
177
|
-
|
|
178
|
-
Rate limit headers are included in every response:
|
|
179
|
-
```
|
|
180
|
-
X-RateLimit-Limit: 100
|
|
181
|
-
X-RateLimit-Remaining: 95
|
|
182
|
-
X-RateLimit-Reset: 1708520460
|
|
183
|
-
```
|
|
170
|
+
The dashboard API applies in-process rate limits (`_RateLimiter` in
|
|
171
|
+
`dashboard/server.py`): 10 requests/min on control endpoints and 60
|
|
172
|
+
requests/min on rate-limited read endpoints. Exceeding them returns HTTP 429.
|
|
173
|
+
The limits are not configurable by environment variable, and no
|
|
174
|
+
`X-RateLimit-*` headers are sent.
|
|
184
175
|
|
|
185
176
|
### CORS
|
|
186
177
|
|
|
187
178
|
CORS is configured via environment variables:
|
|
188
179
|
|
|
189
180
|
```bash
|
|
190
|
-
export
|
|
181
|
+
export LOKI_DASHBOARD_CORS="https://dashboard.company.com,https://admin.company.com"
|
|
191
182
|
```
|
|
192
183
|
|
|
193
184
|
Default behavior: `localhost` origins are allowed for development. In production, explicitly set allowed origins.
|
|
@@ -228,7 +219,7 @@ This is a deliberate fail-closed design. Invalid or missing signatures always re
|
|
|
228
219
|
|
|
229
220
|
## Audit Logging
|
|
230
221
|
|
|
231
|
-
### Hash-Chained
|
|
222
|
+
### Hash-Chained Audit Logs
|
|
232
223
|
|
|
233
224
|
Audit logs use SHA-256 hash chains for tamper evidence. Each entry's hash depends on the previous entry's hash, creating an immutable chain from the genesis record.
|
|
234
225
|
|
package/docs/exit-codes.md
CHANGED
|
@@ -50,6 +50,20 @@ immediately instead of burning `backoffLimit`. Requires Kubernetes 1.31+.
|
|
|
50
50
|
Both the bash runner and the Bun runner (`LOKI_SDK_LOOP`) implement this
|
|
51
51
|
identically; a parity test asserts they agree status for status.
|
|
52
52
|
|
|
53
|
+
## `loki quick`
|
|
54
|
+
|
|
55
|
+
| Code | Meaning |
|
|
56
|
+
|---|---|
|
|
57
|
+
| 0 | The run completed and its diff did not weaken the tests |
|
|
58
|
+
| 3 | The diff weakened the tests (a skip marker added in a test file, a test runner config changed, or an existing test file deleted or renamed). The receipt headline is NOT VERIFIED and names what was weakened, for example `NOT VERIFIED (tests weakened: skip added in sum.test.js)` |
|
|
59
|
+
| other nonzero | The run itself failed; this code is passed through unchanged |
|
|
60
|
+
|
|
61
|
+
Code 3 only ever raises an exit of 0, in quiet and `LOKI_VERBOSE=1` modes alike;
|
|
62
|
+
it never lowers another nonzero code. Edited assertion lines are disclosed in
|
|
63
|
+
the receipt (`tests_integrity:assertions_edited`) and keep exit 0. A NOT VERIFIED
|
|
64
|
+
headline caused by unproven gates alone also keeps exit 0. The signal is the
|
|
65
|
+
`tests_integrity` item in the proof's `honesty.degraded`, not the headline text.
|
|
66
|
+
|
|
53
67
|
## `loki verify`
|
|
54
68
|
|
|
55
69
|
| Code | Verdict |
|
|
@@ -63,6 +77,21 @@ Code 3 matters more than it looks. A verifier that cannot run is not a pass,
|
|
|
63
77
|
so `[ $rc -eq 0 ]` is the only safe test for "verified" -- `[ $rc -ne 2 ]`
|
|
64
78
|
would treat a broken verifier as acceptable.
|
|
65
79
|
|
|
80
|
+
### UNSIGNED receipts (D47)
|
|
81
|
+
|
|
82
|
+
An UNSIGNED receipt (no attestation, so its integrity is not attested) is never
|
|
83
|
+
a pass, on either engine, with or without a local key. A stripped receipt must
|
|
84
|
+
not rank above UNCHECKED.
|
|
85
|
+
|
|
86
|
+
| Engine | UNSIGNED without the flag | With `--allow-unsigned` or `LOKI_VERIFY_ALLOW_UNSIGNED=1` |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| Engine10 (`loki-ts`, `verify_cmd.ts`) | exit 3, `attestation: UNSIGNED, integrity not attested; refusing (pass --allow-unsigned to accept)` | exit 0, `attestation: UNSIGNED (accepted by --allow-unsigned; integrity not attested)` |
|
|
89
|
+
| Legacy shell (`autonomy/verify.sh`) | BLOCKED (non-zero) | the receipt line passes with the same accepted line |
|
|
90
|
+
|
|
91
|
+
Engine10 `loki verify [run-id]` exits: 0 verified, 1 tampered, 2 unchecked,
|
|
92
|
+
3 unsigned (refused), 66 no runs. The flag never changes TAMPERED or UNCHECKED,
|
|
93
|
+
and verify never creates a signing key.
|
|
94
|
+
|
|
66
95
|
An early draft spec listed `1=BLOCKED, 2=CONCERNS`. That ordering was rejected:
|
|
67
96
|
it is not used anywhere, it has no consumers, and it inverts the
|
|
68
97
|
severity-rises-with-the-code rule that every other command follows.
|
package/docs/git-workflow.md
CHANGED
|
@@ -19,7 +19,7 @@ When enabled, Loki Mode automatically:
|
|
|
19
19
|
|
|
20
20
|
1. Creates a feature branch: `loki/session-<timestamp>-<pid>`
|
|
21
21
|
2. Performs all agent work on the feature branch
|
|
22
|
-
3. Creates a PR at session end (
|
|
22
|
+
3. Creates a PR at session end when `LOKI_AUTO_PR=1` (and GitHub CLI is available)
|
|
23
23
|
4. Requires manual review and merge to main
|
|
24
24
|
|
|
25
25
|
### Feature Branch Naming
|
|
@@ -62,25 +62,8 @@ Delete feature branch
|
|
|
62
62
|
|
|
63
63
|
| Variable | Default | Description |
|
|
64
64
|
|----------|---------|-------------|
|
|
65
|
-
| `LOKI_BRANCH_PROTECTION` | `
|
|
66
|
-
| `
|
|
67
|
-
| `LOKI_BRANCH_PREFIX` | `loki/session-` | Prefix for auto-created branches |
|
|
68
|
-
| `LOKI_AUTO_PR` | `true` | Automatically create PR at session end |
|
|
69
|
-
| `LOKI_PR_TEMPLATE` | - | Path to PR description template |
|
|
70
|
-
|
|
71
|
-
### Configuration File
|
|
72
|
-
|
|
73
|
-
```yaml
|
|
74
|
-
# .loki/config.yaml
|
|
75
|
-
git:
|
|
76
|
-
branch_protection:
|
|
77
|
-
enabled: true
|
|
78
|
-
base_branch: main
|
|
79
|
-
branch_prefix: loki/session-
|
|
80
|
-
auto_pr: true
|
|
81
|
-
squash_merge: true
|
|
82
|
-
delete_after_merge: true
|
|
83
|
-
```
|
|
65
|
+
| `LOKI_BRANCH_PROTECTION` | `true` | Run agent work on an auto-created `loki/session-<timestamp>-<pid>` branch |
|
|
66
|
+
| `LOKI_AUTO_PR` | off | Set to `1` to push the session branch and open a PR at session end |
|
|
84
67
|
|
|
85
68
|
## Manual Git Workflow
|
|
86
69
|
|
|
@@ -126,7 +109,7 @@ git push origin feature/my-feature
|
|
|
126
109
|
|
|
127
110
|
### Automatic PR Creation
|
|
128
111
|
|
|
129
|
-
When `LOKI_AUTO_PR=
|
|
112
|
+
When `LOKI_AUTO_PR=1` and GitHub CLI is installed:
|
|
130
113
|
|
|
131
114
|
```bash
|
|
132
115
|
# Loki Mode automatically runs at session end
|
|
@@ -137,47 +120,6 @@ gh pr create \
|
|
|
137
120
|
--head loki/session-20260215-143022-12345
|
|
138
121
|
```
|
|
139
122
|
|
|
140
|
-
### PR Description Template
|
|
141
|
-
|
|
142
|
-
Create a template for consistent PR descriptions:
|
|
143
|
-
|
|
144
|
-
```markdown
|
|
145
|
-
# .loki/pr-template.md
|
|
146
|
-
|
|
147
|
-
## Changes
|
|
148
|
-
|
|
149
|
-
<!-- Auto-generated summary of changes -->
|
|
150
|
-
|
|
151
|
-
## Tasks Completed
|
|
152
|
-
|
|
153
|
-
<!-- List of completed tasks from task queue -->
|
|
154
|
-
|
|
155
|
-
## Quality Gates
|
|
156
|
-
|
|
157
|
-
- [ ] All tests passing
|
|
158
|
-
- [ ] Code review completed
|
|
159
|
-
- [ ] No security vulnerabilities
|
|
160
|
-
- [ ] Documentation updated
|
|
161
|
-
|
|
162
|
-
## Cost
|
|
163
|
-
|
|
164
|
-
Estimated cost: $X.XX USD
|
|
165
|
-
|
|
166
|
-
## Session Info
|
|
167
|
-
|
|
168
|
-
- Start: YYYY-MM-DD HH:MM:SS
|
|
169
|
-
- End: YYYY-MM-DD HH:MM:SS
|
|
170
|
-
- Duration: X hours
|
|
171
|
-
- Iterations: X
|
|
172
|
-
- Provider: claude/cline/codex/aider/opencode
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Set template path:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
export LOKI_PR_TEMPLATE=.loki/pr-template.md
|
|
179
|
-
```
|
|
180
|
-
|
|
181
123
|
## Agent Action Audit
|
|
182
124
|
|
|
183
125
|
All Git operations performed by agents are logged to `.loki/logs/agent-audit.jsonl`:
|
package/docs/network-security.md
CHANGED
|
@@ -6,19 +6,9 @@ Network egress control and isolation for Loki Mode deployments.
|
|
|
6
6
|
|
|
7
7
|
This guide covers network-level security controls for restricting outbound network access from Loki Mode containers and pods to only the AI API endpoints required for operation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
reserved names for a planned application-level enforcement layer, and no
|
|
13
|
-
runtime code reads any of them today. Network security is enforced entirely at
|
|
14
|
-
the infrastructure level, using the Docker network and Kubernetes NetworkPolicy
|
|
15
|
-
recipes in the rest of this guide.
|
|
16
|
-
|
|
17
|
-
| Variable | Default | Description | Status |
|
|
18
|
-
|----------|---------|-------------|--------|
|
|
19
|
-
| `LOKI_NETWORK_EGRESS_POLICY` | `unrestricted` | `unrestricted` (default), `ai-only` (restrict to AI APIs), `none` (block all outbound) | Planned, target TBD |
|
|
20
|
-
| `LOKI_ALLOWED_HOSTS` | (empty) | Comma-separated list of additional hostnames to allow when egress policy is `ai-only` | Planned, target TBD |
|
|
21
|
-
| `LOKI_BLOCK_METADATA_ENDPOINT` | `false` | Block cloud metadata endpoint (169.254.169.254) from within the application | Planned, target TBD |
|
|
9
|
+
Loki Mode has no application-level egress setting: no runtime code restricts
|
|
10
|
+
outbound hosts. Network security is enforced entirely at the infrastructure
|
|
11
|
+
level, using the Docker network and Kubernetes NetworkPolicy recipes below.
|
|
22
12
|
|
|
23
13
|
## Docker Network Isolation
|
|
24
14
|
|
|
@@ -25,7 +25,7 @@ Loki Mode today is a **multi-agent autonomous orchestrator**, not a BaaS. It own
|
|
|
25
25
|
- An auth layer (`dashboard/auth.py`, `web-app/auth.py`) supporting Bearer tokens, OIDC (Google/Azure/Okta), bcrypt password hashing, RBAC scopes
|
|
26
26
|
- A working completion-council with anti-sycophancy, 3-reviewer parallel review, devil's-advocate fallback
|
|
27
27
|
- A healing-mode for legacy systems (v6.67+) with friction-as-semantics
|
|
28
|
-
-
|
|
28
|
+
- Specialized agent types and a queue system
|
|
29
29
|
|
|
30
30
|
**The gap:** every backend primitive Loki owns is for orchestrating the agent. None of it is for the *application the agent is building*. When `loki start ./prd.md` builds "a Twitter clone with login and image uploads", the agent has to invent the auth flow, choose a DB, set up storage, wire Stripe, etc. - and the user has to run a parallel set of tools (Supabase, Stripe, Cloudflare R2) to support the resulting app.
|
|
31
31
|
|
|
@@ -165,7 +165,7 @@ URL bar showing current preview path, Refresh button, Open in New Tab button.
|
|
|
165
165
|
Based on feedback:
|
|
166
166
|
- Memory System Viewer (power-user debug tool, not customer-facing)
|
|
167
167
|
- Full Integrations page (keep GitHub only, defer Jira/Linear/Slack/Teams)
|
|
168
|
-
-
|
|
168
|
+
- Agent grid (most sessions have 1-3 agents active; show compact list instead)
|
|
169
169
|
- Code Review panel (let quality gates surface findings inline)
|
|
170
170
|
- Collaboration/multiplayer (acknowledged as future need, not v1)
|
|
171
171
|
- Database provisioning (out of scope for v1)
|
|
@@ -137,8 +137,6 @@ Each card:
|
|
|
137
137
|
|
|
138
138
|
Integrations available:
|
|
139
139
|
- **GitHub**: Connect repo, import issues, create PRs (`loki github`, `loki run`)
|
|
140
|
-
- **Jira**: Bidirectional sync (`LOKI_JIRA_*` env vars)
|
|
141
|
-
- **Linear**: Issue sync (`LOKI_LINEAR_*` env vars)
|
|
142
140
|
- **Slack**: Notifications + slash commands (`LOKI_SLACK_*`)
|
|
143
141
|
- **Teams**: Adaptive Cards notifications (`LOKI_TEAMS_*`)
|
|
144
142
|
- **OpenTelemetry**: Trace export (`loki telemetry`)
|
|
@@ -197,7 +195,7 @@ Each gate: name, status (pass/fail/pending), details expandable
|
|
|
197
195
|
|
|
198
196
|
### Agent Activity
|
|
199
197
|
|
|
200
|
-
Real-time grid showing which
|
|
198
|
+
Real-time grid showing which agent types are active:
|
|
201
199
|
- Agent name, type, domain, model tier (Opus/Sonnet/Haiku)
|
|
202
200
|
- Current task
|
|
203
201
|
- Status (working/idle/completed)
|
|
@@ -65,7 +65,7 @@ Acceptance criteria:
|
|
|
65
65
|
Validation: Fixture repos: (A) spec names endpoint /orders that exists -> no finding; (B) spec names /orders but no handler -> High finding; (C) plaintext password store -> invariant finding. Measure false-positive rate on 3 clean real repos (must be zero). Prove accuracy lift on the FrontierCode-style benchmark (rank 12): source-grounded checklists should catch wrong-but-internally-consistent implementations that prose-only checklists pass.
|
|
66
66
|
|
|
67
67
|
### #3 Annotate-before-act: pre-committed expected-outcome ledger, diffed against reality at verify time (loki-mode, high/L)
|
|
68
|
-
Before running verification for a change/checklist-item, the runtime writes a
|
|
68
|
+
Before running verification for a change/checklist-item, the runtime writes a hash-chained ledger of EXPECTED observable outcomes (e.g. 'GET /health -> 200 {status:ok}', 'test X fails before fix, passes after', 'endpoint Y should now exist'). At verify time, actual results are compared to the pre-committed prediction; any expectation silently dropped or contradicted becomes a finding. Reuse the proof-verify canonical-hash + drift pattern so the ledger is tamper-evident and edits-after-the-fact are detectable. Forces a falsifiable prediction, cutting self-serving post-hoc rationalization.
|
|
69
69
|
Acceptance criteria:
|
|
70
70
|
- .loki/expectations/<iter>.json written BEFORE the verify/checklist run, each entry {id, statement, check_ref, expected}, canonicalized and hashed like proof-generator
|
|
71
71
|
- loki verify (or the completion gate) reads the ledger and emits a finding for any expectation with no matching executed check, or whose actual contradicts expected
|
package/docs/show-hn-post.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## Title
|
|
4
4
|
|
|
5
|
-
Show HN: Loki Mode - PRD in, tested code out (
|
|
5
|
+
Show HN: Loki Mode - PRD in, tested code out (8 quality gates, RARV self-verification)
|
|
6
6
|
|
|
7
7
|
## Body
|
|
8
8
|
|
|
9
9
|
I built Loki Mode because I got tired of the copy-paste loop between AI coding assistants and my terminal. I wanted to hand over a PRD and get back a working, tested codebase -- not perfect, but a solid starting point.
|
|
10
10
|
|
|
11
|
-
**What it does:** You give it a Product Requirements Document. It breaks the work into tasks across
|
|
11
|
+
**What it does:** You give it a Product Requirements Document. It breaks the work into tasks across specialized agent roles (engineering, operations, business, data, product, growth, review, orchestration) -- prompt-defined specifications the orchestrator adopts per phase, with parallel review (blind council) and optional worktree streams on Claude Code, sequential on other providers -- and runs every iteration through a self-verification loop called RARV: Reason, Act, Reflect, Verify. The idea is that the system catches its own mistakes before you have to.
|
|
12
12
|
|
|
13
13
|
**Quality gates:** 8 automated gates including 3-reviewer blind review (agents review each other's work without seeing prior reviews), anti-sycophancy checks (a devil's advocate pass on unanimous approvals), and mock/mutation detection. These are not foolproof, but they catch a surprising number of issues that single-pass generation misses.
|
|
14
14
|
|
|
@@ -20,9 +20,8 @@ I built Loki Mode because I got tired of the copy-paste loop between AI coding a
|
|
|
20
20
|
|
|
21
21
|
**Research foundation:** The architecture draws from Anthropic's Constitutional AI (principles-based self-critique), DeepMind's Scalable Oversight via Debate, and OpenAI's Agents SDK patterns (guardrails, tripwires, handoffs). References to specific papers are in the repo.
|
|
22
22
|
|
|
23
|
-
**What it does NOT do:** It does not deploy anything. It generates deployment configs (Helm, Docker Compose, Terraform), but a human deploys. Complex domain logic will need human review. The system can and does make mistakes, especially on novel problems. Token costs scale with project complexity.
|
|
23
|
+
**What it does NOT do:** It does not deploy anything. It generates deployment configs (Helm, Docker Compose, Terraform), but a human deploys. Complex domain logic will need human review. The system can and does make mistakes, especially on novel problems. Token costs scale with project complexity. There is no published benchmark score.
|
|
24
24
|
|
|
25
|
-
**Test suite:** 683 npm tests, 631 pytest tests, 16 shell tests. Self-reported HumanEval score of 162/164 (98.78%).
|
|
26
25
|
|
|
27
26
|
Built solo. BUSL-1.1 source-available.
|
|
28
27
|
|
package/docs/siem-integration.md
CHANGED
|
@@ -8,7 +8,7 @@ Loki Mode supports integration with enterprise SIEM systems for:
|
|
|
8
8
|
|
|
9
9
|
- Centralized security monitoring
|
|
10
10
|
- Real-time threat detection
|
|
11
|
-
-
|
|
11
|
+
- Audit evidence for your own compliance reporting
|
|
12
12
|
- Incident response
|
|
13
13
|
- Forensic analysis
|
|
14
14
|
|
|
@@ -385,7 +385,6 @@ logs:
|
|
|
385
385
|
tags:
|
|
386
386
|
- env:production
|
|
387
387
|
- team:security
|
|
388
|
-
- compliance:soc2
|
|
389
388
|
|
|
390
389
|
# Process JSON logs
|
|
391
390
|
logs_config:
|
|
@@ -487,14 +486,13 @@ in your SIEM, where the correlation and retention rules already live.
|
|
|
487
486
|
To pull an evidence slice locally for an auditor:
|
|
488
487
|
|
|
489
488
|
```bash
|
|
490
|
-
AUDIT=~/.loki/dashboard/audit
|
|
489
|
+
AUDIT=~/.loki/dashboard/audit # one audit-YYYY-MM-DD.jsonl file per day
|
|
491
490
|
|
|
492
|
-
#
|
|
493
|
-
jq -s 'map(select(.timestamp >= "2026-01-01" and .timestamp <= "2026-12-31"))'
|
|
494
|
-
"$AUDIT" > audit-evidence.json
|
|
491
|
+
# Events in a date range
|
|
492
|
+
cat "$AUDIT"/audit-*.jsonl | jq -s 'map(select(.timestamp >= "2026-01-01" and .timestamp <= "2026-12-31"))' > audit-evidence.json
|
|
495
493
|
|
|
496
|
-
# Token lifecycle events
|
|
497
|
-
jq -c 'select(.
|
|
494
|
+
# Token lifecycle events
|
|
495
|
+
cat "$AUDIT"/audit-*.jsonl | jq -c 'select(.resource_type == "token")'
|
|
498
496
|
```
|
|
499
497
|
|
|
500
498
|
Verify the hash chain before handing the file over. There is no
|
|
@@ -592,8 +590,8 @@ logger -n syslog.example.com -P 514 "Test from Loki Mode"
|
|
|
592
590
|
echo $LOKI_AUDIT_SYSLOG_HOST
|
|
593
591
|
loki syslog test
|
|
594
592
|
|
|
595
|
-
# Check
|
|
596
|
-
loki enterprise audit tail
|
|
593
|
+
# Check recent audit entries
|
|
594
|
+
loki enterprise audit tail
|
|
597
595
|
```
|
|
598
596
|
|
|
599
597
|
### Format Issues
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Loki Mode Edge Case Test Scenarios
|
|
2
2
|
|
|
3
3
|
Agent 12 - Scenario Writing: Edge Cases, Error Paths, Concurrent Usage
|
|
4
|
-
|
|
4
|
+
Date: 2026-03-24
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -55,7 +55,7 @@ Version: v6.71.1 | Date: 2026-03-24
|
|
|
55
55
|
**Given** an autonomous session is running at iteration 15 of 1000
|
|
56
56
|
**When** the network connection drops (DNS resolution fails, API timeout)
|
|
57
57
|
**Then** the system should:
|
|
58
|
-
- The provider CLI (claude/codex/
|
|
58
|
+
- The provider CLI (claude/codex/cline/aider/opencode) exits with a non-zero exit code
|
|
59
59
|
- `run_autonomous()` captures the exit code in `$exit_code` (run.sh:9406)
|
|
60
60
|
- Rate limit detection runs via `is_rate_limited()` (checks for common rate limit strings)
|
|
61
61
|
- If failover is enabled (`LOKI_FAILOVER=true`), attempt `attempt_provider_failover()`
|
|
@@ -52,7 +52,7 @@ Source: `.github/workflows/loki-ci-example.yml:41-44`
|
|
|
52
52
|
### TW-04: Handoff Between Human and AI Coding
|
|
53
53
|
|
|
54
54
|
```
|
|
55
|
-
GIVEN a
|
|
55
|
+
GIVEN a Loki autonomous session is running (iteration 5 of 20)
|
|
56
56
|
AND the human developer notices a design issue
|
|
57
57
|
WHEN the developer creates .loki/PAUSE signal file
|
|
58
58
|
THEN the session pauses after the current RARV iteration completes
|
|
@@ -66,7 +66,7 @@ Source: `autonomy/run.sh:7897` (check_human_intervention)
|
|
|
66
66
|
### TW-05: Project Template Sharing Across Team
|
|
67
67
|
|
|
68
68
|
```
|
|
69
|
-
GIVEN the team uses
|
|
69
|
+
GIVEN the team uses Loki PRD templates (saas, cli, discord-bot, etc.)
|
|
70
70
|
AND the team lead wants to standardize on a custom template
|
|
71
71
|
WHEN the lead creates a PRD template at templates/custom-team.md
|
|
72
72
|
AND commits it to the shared repository
|
|
@@ -195,7 +195,7 @@ Source: `skills/parallel-workflows.md`
|
|
|
195
195
|
### GI-02: Meaningful AI Commit Messages
|
|
196
196
|
|
|
197
197
|
```
|
|
198
|
-
GIVEN a
|
|
198
|
+
GIVEN a Loki session has completed a RARV iteration
|
|
199
199
|
AND the iteration modified 4 files
|
|
200
200
|
WHEN the autonomous system commits changes
|
|
201
201
|
THEN the commit message follows the format: "<type>: <description>"
|
|
@@ -437,7 +437,7 @@ Source: `.github/workflows/release.yml:238-496`
|
|
|
437
437
|
|
|
438
438
|
```
|
|
439
439
|
GIVEN the dashboard WebSocket endpoint is available at /ws
|
|
440
|
-
AND a CI pipeline is running a
|
|
440
|
+
AND a CI pipeline is running a Loki session
|
|
441
441
|
WHEN the WebSocket client connects
|
|
442
442
|
THEN real-time events are streamed including:
|
|
443
443
|
- iteration_start / iteration_complete
|