loki-mode 11.141.4 → 11.141.6
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 +1 -1
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/CONSTITUTION.md +2 -2
- package/autonomy/lib/expectation-ledger.py +3 -3
- package/autonomy/lib/own-render.py +2 -2
- package/autonomy/loki +31 -10
- package/autonomy/run.sh +1 -1
- package/dashboard/__init__.py +1 -1
- package/dashboard/audit.py +5 -5
- package/dashboard/server.py +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/COMPONENTS.md +1 -1
- package/docs/INSTALLATION.md +2 -2
- package/docs/dev/architecture-reference.md +4 -0
- package/docs/environment-variables.md +3 -0
- package/loki-ts/dist/loki.js +1812 -1792
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +2025 -1418
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/references/agent-types.md +5 -10
- package/skills/agents.md +2 -2
- package/src/audit/crosslink.js +4 -4
- package/src/audit/index.js +3 -3
- package/web-app/dist/assets/{AdminPage-Dkj5FgZn.js → AdminPage-i9PHmMPD.js} +2 -2
- package/web-app/dist/assets/{Avatar-D6ZOMRQj.js → Avatar-D_6q3v1s.js} +1 -1
- package/web-app/dist/assets/{Badge-przKIrx7.js → Badge-OB8s72yd.js} +1 -1
- package/web-app/dist/assets/{Button-X5VdLM9H.js → Button-DrmV9ik6.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-CWUPO4jE.js → CockpitPage-DJrzZLPZ.js} +1 -1
- package/web-app/dist/assets/{ComparePage-jinxUAH3.js → ComparePage-CPClwQTQ.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-B3o_toch.js → ErrorBoundary-EA1o3dOi.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-ClySg933.js → EvidenceReceiptPanel-CPUmEtva.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-Dm_UsFAy.js → GitHubIssuesPanel-ED2faRlk.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-FAkViqVu.js → GitHubPRsPanel-Bclc5nd2.js} +1 -1
- package/web-app/dist/assets/{HomePage-VeVb73XG.js → HomePage-Bv3f7LxZ.js} +2 -2
- package/web-app/dist/assets/{LoginPage-BpEKt-6l.js → LoginPage-BTFpc_0h.js} +1 -1
- package/web-app/dist/assets/{MagicPage-CNC180dU.js → MagicPage-D6qauYXz.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-BIfpdlcf.js → MetricsPage-DZfxKmxi.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-D54hg346.js → NotFoundPage-C-ZQu1UW.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-Dl3rZ5bV.js → ProjectPage-CRFiZLSc.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-DzQrB1jU.js → ProjectsPage-BavFLKKb.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-DYB5XNpM.js → SettingsPage-zfZDQjF-.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-CjhoM3rN.js → ShowcasePage-DlHcRnXc.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-BVNnfllD.js → SystemSettingsPage-pFanwBec.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-1KkrFd0Y.js → TeamsPage-BLevzZIc.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-DGDnu_RB.js → TemplatesPage-ylTIFbRI.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-DSomtLgf.js → TerminalOutput-CubbKVIZ.js} +1 -1
- package/web-app/dist/assets/{activity-CW1VLglI.js → activity-CAWSp_6M.js} +1 -1
- package/web-app/dist/assets/{bell-tJAz56Yb.js → bell-jGlMrpVq.js} +1 -1
- package/web-app/dist/assets/{bot-B6I5yrNn.js → bot-2hTcA-8p.js} +1 -1
- package/web-app/dist/assets/{check-IVM56fVX.js → check-D80eIYDT.js} +1 -1
- package/web-app/dist/assets/{chevron-left-SsA1da21.js → chevron-left-CnH2CR-8.js} +1 -1
- package/web-app/dist/assets/{circle-alert-Dsq3DqO-.js → circle-alert-C7oUl8Ek.js} +1 -1
- package/web-app/dist/assets/{clock-Cj9sLcEq.js → clock-DOzHiqGs.js} +1 -1
- package/web-app/dist/assets/{cloud-CSbZsshu.js → cloud-FSE-P1Jp.js} +1 -1
- package/web-app/dist/assets/{code-xml-qCQWXElP.js → code-xml-CJnb9wRC.js} +1 -1
- package/web-app/dist/assets/{database-BnviiGuk.js → database-aawTQ1Q7.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-DaU9xa0A.js → dollar-sign-FvH5JFJr.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-a393d0YD.js → file-code-corner-f13oHQ3O.js} +1 -1
- package/web-app/dist/assets/{file-plus-C3J3IYsn.js → file-plus-iOo8cPnc.js} +1 -1
- package/web-app/dist/assets/{globe-DKRN-OfP.js → globe-DQ9k16nT.js} +1 -1
- package/web-app/dist/assets/{hammer-AJ4xEMEQ.js → hammer-BS6OgHCv.js} +1 -1
- package/web-app/dist/assets/{index-BmuNF2mZ.js → index-D9_qIW5t.js} +3 -3
- package/web-app/dist/assets/{layers-ZxK3Lg-E.js → layers-DkgEg5Ww.js} +1 -1
- package/web-app/dist/assets/{loader-circle-BQGio77U.js → loader-circle-DkjkYuPZ.js} +1 -1
- package/web-app/dist/assets/{lock-BSMOsGRv.js → lock-C6YNAGAd.js} +1 -1
- package/web-app/dist/assets/{package-Dc3iyh_u.js → package-EMz5m_kz.js} +1 -1
- package/web-app/dist/assets/{plus-BE-oSyaC.js → plus-ALTNaQeY.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-B24IKBF1.js → refresh-cw-CHtVqI4m.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Cm9OyY5g.js → rotate-ccw-C70B3mg2.js} +1 -1
- package/web-app/dist/assets/{scroll-text-gdM4zNkj.js → scroll-text-BKIkCUal.js} +1 -1
- package/web-app/dist/assets/{server-B8YzsGPg.js → server-DVlrE-zu.js} +1 -1
- package/web-app/dist/assets/{shield-alert-COu4qEAn.js → shield-alert-DNcGRK6A.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-Bs3ZSrCN.js → thumbs-up-DPAOjRCj.js} +1 -1
- package/web-app/dist/assets/{trash-2-vdl0RPBK.js → trash-2-CLgQfWQK.js} +1 -1
- package/web-app/dist/assets/{trending-down-DhxJxyuC.js → trending-down-C_C7_So6.js} +1 -1
- package/web-app/dist/assets/{trending-up-sBLyeLVo.js → trending-up-D_L2MWc2.js} +1 -1
- package/web-app/dist/assets/{upload-B_SYHnav.js → upload-_qHiSlwI.js} +1 -1
- package/web-app/dist/assets/{usePolling-CLtoYkMM.js → usePolling-z23loSZm.js} +1 -1
- package/web-app/dist/assets/{user-CIt72Y0w.js → user-BeGvNcEy.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/web-app/server.py +1 -1
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)
|
|
|
116
116
|
| `loki control serve` | Start the Control Plane (see below) |
|
|
117
117
|
| `loki dashboard` | Open the Control Plane UI, starting it if needed |
|
|
118
118
|
| `loki tour` | Show a sample receipt offline. `loki start` does this when you are not in a git repo and did not pass a task |
|
|
119
|
-
| `loki wow` | Same live mini-task as a normal start, in a temp repo. Offline sample when no provider is ready |
|
|
119
|
+
| `loki wow` | Same live mini-task as a normal start, in a temp repo. It says it makes model calls and what it can cost, and asks y/N first (`--yes` skips; with no terminal it spends nothing). Offline sample when no provider is ready |
|
|
120
120
|
| `loki factory "<task>"` | Same as `loki start`. The policy line is printed by start |
|
|
121
121
|
| `loki --help` | Everything else; `loki help <command>` for one command |
|
|
122
122
|
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: loki-mode
|
|
|
3
3
|
description: Runs an autonomous software factory that knows what it is supposed to deliver and proves it did, with a signed receipt. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Loki Mode v11.141.
|
|
6
|
+
# Loki Mode v11.141.6
|
|
7
7
|
|
|
8
8
|
**Current entry points (Loki 10 engine):** `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run the Loki 10 engine and end with a signed receipt (`loki verify`). `loki backlog owner/repo --all` runs many issues in parallel. Guide: `docs/v10/GUIDE.md`. The skill instructions below, and `loki start`, describe the previous bash loop. PRD-file starts (`loki start ./prd.md`) and the opencode provider still run on it until FC38-SWEEP ports them; the legacy-engine command and the LOKI_ENGINE switch remain removed. Prefer `loki owner/repo#N` for issues.
|
|
9
9
|
|
|
@@ -461,4 +461,4 @@ Implemented, planned and deprecated items, with the version each landed in: `CHA
|
|
|
461
461
|
|
|
462
462
|
---
|
|
463
463
|
|
|
464
|
-
**v11.141.
|
|
464
|
+
**v11.141.6 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.141.
|
|
1
|
+
11.141.6
|
package/autonomy/CONSTITUTION.md
CHANGED
|
@@ -142,7 +142,7 @@ GROWTH ──[continuous improvement loop]──> GROWTH
|
|
|
142
142
|
- `Bash` - Command execution
|
|
143
143
|
- `platform-orchestrator` - Deployment and service management
|
|
144
144
|
|
|
145
|
-
**The
|
|
145
|
+
**The agent types are ROLES defined through prompts, not subagent_types.**
|
|
146
146
|
|
|
147
147
|
---
|
|
148
148
|
|
|
@@ -157,7 +157,7 @@ skills/
|
|
|
157
157
|
quality-gates.md # 8-gate system, anti-sycophancy
|
|
158
158
|
testing.md # Playwright, E2E, property-based
|
|
159
159
|
production.md # CI/CD, batch processing
|
|
160
|
-
agents.md #
|
|
160
|
+
agents.md # agent types, A2A patterns
|
|
161
161
|
parallel-workflows.md # Git worktrees, parallel streams
|
|
162
162
|
troubleshooting.md # Error recovery, fallbacks
|
|
163
163
|
artifacts.md # Code generation patterns
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""Annotate-before-act expected-outcome ledger for Loki Mode.
|
|
3
3
|
|
|
4
4
|
Companion to proof-generator.py / proof-verify.py. Before running verification
|
|
5
|
-
for a change or checklist item, the runtime writes a
|
|
5
|
+
for a change or checklist item, the runtime writes a hashed ledger of
|
|
6
6
|
EXPECTED observable outcomes (e.g. "GET /health -> 200 {status:ok}", "test X
|
|
7
7
|
fails before the fix and passes after", "endpoint Y should now exist"). At
|
|
8
8
|
verify time the actual results are compared to this PRE-COMMITTED prediction:
|
|
@@ -13,7 +13,7 @@ maps to INCONCLUSIVE, never VERIFIED.
|
|
|
13
13
|
Why this is trustworthy:
|
|
14
14
|
- The ledger is written BEFORE the act/verify, so it is a genuine prediction,
|
|
15
15
|
not a post-hoc rationalization of whatever happened.
|
|
16
|
-
- It is
|
|
16
|
+
- It is HASHED: the whole ledger is canonicalized and hashed the SAME
|
|
17
17
|
way proof-generator.py hashes proof.json (sha256 over the compact, sorted
|
|
18
18
|
JSON form). The hash is recorded in the ledger file AND embedded into
|
|
19
19
|
evidence.json / proof.json, so an expectation edited after the fact breaks
|
|
@@ -47,7 +47,7 @@ import sys
|
|
|
47
47
|
# ---------------------------------------------------------------------------
|
|
48
48
|
|
|
49
49
|
def _canonical(obj):
|
|
50
|
-
"""Canonical JSON form used for the
|
|
50
|
+
"""Canonical JSON form used for the ledger hash.
|
|
51
51
|
|
|
52
52
|
Identical to proof-generator.py _canonical() and proof-verify.py
|
|
53
53
|
_canonical(): json.dumps with sort_keys=True and compact separators, and no
|
|
@@ -455,8 +455,8 @@ def _section_verified(proof, run_id):
|
|
|
455
455
|
"""6. 'What is verified' - the proof commands."""
|
|
456
456
|
lines = ["## What is verified", ""]
|
|
457
457
|
if run_id:
|
|
458
|
-
lines.append("Loki keeps a
|
|
459
|
-
"
|
|
458
|
+
lines.append("Loki keeps a receipt of exactly what it did, which "
|
|
459
|
+
"`loki proof verify` re-checks offline against the repo:")
|
|
460
460
|
lines.append("")
|
|
461
461
|
lines.append("- `loki proof show %s` - read the full receipt." % run_id)
|
|
462
462
|
lines.append("- `loki proof verify %s` - confirm the receipt has not been "
|
package/autonomy/loki
CHANGED
|
@@ -2173,7 +2173,7 @@ cmd_ui() {
|
|
|
2173
2173
|
# The classic server is API-only; the UI is the Control Plane.
|
|
2174
2174
|
local url="http://127.0.0.1:${port}"
|
|
2175
2175
|
echo "loki: the classic dashboard at $url serves the API only (the browser UI moved to the Control Plane)." >&2
|
|
2176
|
-
echo "loki:
|
|
2176
|
+
echo "loki: open the Control Plane UI with: loki dashboard (needs bun)" >&2
|
|
2177
2177
|
echo "$url"
|
|
2178
2178
|
}
|
|
2179
2179
|
|
|
@@ -8361,7 +8361,7 @@ cmd_dashboard_start() {
|
|
|
8361
8361
|
# a second port.
|
|
8362
8362
|
echo -e "${DIM}Want to submit a spec in the browser? Open the 'Lab' tab in this dashboard.${NC}"
|
|
8363
8363
|
echo ""
|
|
8364
|
-
echo -e "Control Plane UI: ${CYAN}loki
|
|
8364
|
+
echo -e "Control Plane UI: ${CYAN}loki dashboard${NC}"
|
|
8365
8365
|
echo -e "Check status: ${CYAN}loki dashboard status${NC}"
|
|
8366
8366
|
echo -e "Stop server: ${CYAN}loki dashboard stop${NC}"
|
|
8367
8367
|
else
|
|
@@ -8479,7 +8479,7 @@ cmd_dashboard_status() {
|
|
|
8479
8479
|
fi
|
|
8480
8480
|
|
|
8481
8481
|
echo ""
|
|
8482
|
-
echo -e "Control Plane UI: ${CYAN}loki
|
|
8482
|
+
echo -e "Control Plane UI: ${CYAN}loki dashboard${NC}"
|
|
8483
8483
|
echo -e "Stop server: ${CYAN}loki dashboard stop${NC}"
|
|
8484
8484
|
else
|
|
8485
8485
|
echo -e "${YELLOW}Status: Not running (stale PID file)${NC}"
|
|
@@ -8615,7 +8615,7 @@ cmd_dashboard_open() {
|
|
|
8615
8615
|
# The legacy browser UI was removed; this server is API-only. Never open a
|
|
8616
8616
|
# browser here: point at the Control Plane instead.
|
|
8617
8617
|
echo -e "${YELLOW}The dashboard server at $url serves the API only; the browser UI is now the Control Plane.${NC}"
|
|
8618
|
-
echo -e "Open the Control Plane with: ${CYAN}loki
|
|
8618
|
+
echo -e "Open the Control Plane with: ${CYAN}loki dashboard${NC}"
|
|
8619
8619
|
}
|
|
8620
8620
|
|
|
8621
8621
|
# Welcome opener (the "magic opener"). Shows a branded welcome page in the
|
|
@@ -16913,7 +16913,8 @@ wow_cleanup_dir() {
|
|
|
16913
16913
|
}
|
|
16914
16914
|
|
|
16915
16915
|
cmd_wow() {
|
|
16916
|
-
local offline=false dry_run=false keep=false provider="" max_cost="2"
|
|
16916
|
+
local offline=false dry_run=false keep=false provider="" max_cost="2" assume_yes=false
|
|
16917
|
+
case "${LOKI_ASSUME_YES:-}" in 1|true|yes) assume_yes=true ;; esac
|
|
16917
16918
|
while [[ $# -gt 0 ]]; do
|
|
16918
16919
|
case "$1" in
|
|
16919
16920
|
--help|-h)
|
|
@@ -16924,11 +16925,13 @@ cmd_wow() {
|
|
|
16924
16925
|
echo "With no provider key it runs the offline sample instead (loki tour)."
|
|
16925
16926
|
echo "A failed live run shows its own receipt and exit code, never the sample."
|
|
16926
16927
|
echo ""
|
|
16927
|
-
echo "Usage: loki wow [--offline] [--dry-run] [--keep] [--provider P] [--max-cost N]"
|
|
16928
|
+
echo "Usage: loki wow [--offline] [--dry-run] [--keep] [--yes] [--provider P] [--max-cost N]"
|
|
16928
16929
|
echo ""
|
|
16929
16930
|
echo " --offline Always show the offline sample"
|
|
16930
16931
|
echo " --dry-run Print the plan. No model call, no spend"
|
|
16931
16932
|
echo " --keep Keep the temp repo (default: removed after the receipt is printed)"
|
|
16933
|
+
echo " --yes, -y Skip the spend question. Without it a live run asks y/N first, and a"
|
|
16934
|
+
echo " non-interactive run spends nothing (exit 2)"
|
|
16932
16935
|
echo " --provider P claude (default) or opencode"
|
|
16933
16936
|
echo " --max-cost N Hard per-run cap in USD, a positive number (default 2). budgets.per_run still applies"
|
|
16934
16937
|
echo ""
|
|
@@ -16939,6 +16942,7 @@ cmd_wow() {
|
|
|
16939
16942
|
--offline) offline=true; shift ;;
|
|
16940
16943
|
--dry-run) dry_run=true; shift ;;
|
|
16941
16944
|
--keep) keep=true; shift ;;
|
|
16945
|
+
--yes|-y) assume_yes=true; shift ;;
|
|
16942
16946
|
--provider)
|
|
16943
16947
|
provider="${2:-}"
|
|
16944
16948
|
if [ -z "$provider" ]; then echo "loki wow: --provider requires a value" >&2; return 1; fi
|
|
@@ -16991,6 +16995,23 @@ cmd_wow() {
|
|
|
16991
16995
|
echo "Then print the receipt, PROVEN vs NOT PROVEN, and: Ready for your repo? loki start"
|
|
16992
16996
|
return 0
|
|
16993
16997
|
fi
|
|
16998
|
+
# Ask before any spend: the live task makes real model calls. A TTY answers y/N (default no);
|
|
16999
|
+
# a non-interactive run never spends without --yes or LOKI_ASSUME_YES=1.
|
|
17000
|
+
echo "This makes real model calls through $use_provider and can cost up to \$$max_cost (the --max-cost cap)."
|
|
17001
|
+
if [ "$assume_yes" != true ]; then
|
|
17002
|
+
if [ -t 0 ] && [ -z "${CI:-}" ]; then
|
|
17003
|
+
local wow_answer=""
|
|
17004
|
+
echo -n "Run it now? [y/N] "
|
|
17005
|
+
read -r wow_answer </dev/tty 2>/dev/null || wow_answer=""
|
|
17006
|
+
case "$wow_answer" in
|
|
17007
|
+
[Yy]*) ;;
|
|
17008
|
+
*) echo "Cancelled. Nothing was spent. See a sample receipt with no spend: loki tour"; return 0 ;;
|
|
17009
|
+
esac
|
|
17010
|
+
else
|
|
17011
|
+
echo "loki wow: not run, nothing was spent (no terminal to ask; re-run with --yes to spend)." >&2
|
|
17012
|
+
return 2
|
|
17013
|
+
fi
|
|
17014
|
+
fi
|
|
16994
17015
|
|
|
16995
17016
|
local demo_dir temp_root
|
|
16996
17017
|
temp_root="$(cd "${TMPDIR:-/tmp}" 2>/dev/null && pwd -P)" || { echo "loki wow: cannot resolve the temp root" >&2; return 1; }
|
|
@@ -17099,7 +17120,7 @@ cmd_demo() {
|
|
|
17099
17120
|
echo "Examples:"
|
|
17100
17121
|
echo " loki demo --offline # Replay a sample receipt (no spend)"
|
|
17101
17122
|
echo " loki tour # Same as 'loki demo --offline'"
|
|
17102
|
-
echo " loki tour --live # Tiny real task (loki wow); offline sample if no provider"
|
|
17123
|
+
echo " loki tour --live # Tiny real task (loki wow), asks y/N before spending; offline sample if no provider"
|
|
17103
17124
|
echo " loki wow # Live mini-task, or the offline sample with no key"
|
|
17104
17125
|
echo " loki demo # Build todo app in temp dir"
|
|
17105
17126
|
echo " loki demo --dir ~/demo-project # Build in specific directory"
|
|
@@ -19369,7 +19390,7 @@ print(json.dumps({'id': manifest.id, 'dir': str(pipeline.migration_dir)}))
|
|
|
19369
19390
|
|
|
19370
19391
|
sleep 2
|
|
19371
19392
|
if kill -0 "$migrate_dashboard_pid" 2>/dev/null; then
|
|
19372
|
-
echo -e " Dashboard API: ${CYAN}${url_scheme}://127.0.0.1:${dashboard_port}/${NC} (UI: loki
|
|
19393
|
+
echo -e " Dashboard API: ${CYAN}${url_scheme}://127.0.0.1:${dashboard_port}/${NC} (UI: loki dashboard)"
|
|
19373
19394
|
echo ""
|
|
19374
19395
|
else
|
|
19375
19396
|
echo -e " ${YELLOW}Dashboard failed to start (check logs)${NC}"
|
|
@@ -23355,7 +23376,7 @@ main() {
|
|
|
23355
23376
|
# otherwise inject --offline ahead of any user args.
|
|
23356
23377
|
if [ "${1:-}" = "--help" ] || [ "${1:-}" = "-h" ]; then
|
|
23357
23378
|
cmd_demo --help
|
|
23358
|
-
echo " loki tour --live # Tiny real task (same as loki wow)"
|
|
23379
|
+
echo " loki tour --live # Tiny real task (same as loki wow), asks y/N before spending"
|
|
23359
23380
|
echo " loki wow # Live mini-task, or this sample with no key"
|
|
23360
23381
|
elif [ "${1:-}" = "--live" ]; then
|
|
23361
23382
|
shift
|
|
@@ -25595,7 +25616,7 @@ print()
|
|
|
25595
25616
|
|
|
25596
25617
|
link-manifest)
|
|
25597
25618
|
# Fold the run manifest (.loki/loki-run.json bill-of-materials) into
|
|
25598
|
-
# the agent audit chain so it becomes
|
|
25619
|
+
# the agent audit chain so it becomes hash-chained and verifiable
|
|
25599
25620
|
# against the evidence chain. Explicit, on-demand command: cmd_start
|
|
25600
25621
|
# execs run.sh and replaces the loki process, so there is no
|
|
25601
25622
|
# post-completion return point in this CLI wrapper to auto-invoke
|
package/autonomy/run.sh
CHANGED
|
@@ -2716,7 +2716,7 @@ print(json.dumps(event))
|
|
|
2716
2716
|
# WHY THIS EXISTS: a tier resolution that quietly returns something other than the
|
|
2717
2717
|
# pin is indistinguishable, in the receipt, from a run that got what it asked for.
|
|
2718
2718
|
# The substitution itself is often legitimate; the SILENCE is the defect. This
|
|
2719
|
-
# emits both an event (machine-readable) and an audit line (the
|
|
2719
|
+
# emits both an event (machine-readable) and an audit line (the hash-chained
|
|
2720
2720
|
# chain), so the swap and its stated reason can be audited and, if wrong,
|
|
2721
2721
|
# refuted by whoever has the evidence to refute it.
|
|
2722
2722
|
#
|
package/dashboard/__init__.py
CHANGED
package/dashboard/audit.py
CHANGED
|
@@ -24,7 +24,7 @@ import socket
|
|
|
24
24
|
import sys
|
|
25
25
|
import threading
|
|
26
26
|
|
|
27
|
-
# POSIX-only. Used to serialize the
|
|
27
|
+
# POSIX-only. Used to serialize the hash chain append ACROSS PROCESSES
|
|
28
28
|
# (threading.Lock cannot). Imported defensively so this module still loads on a
|
|
29
29
|
# platform without it; the writer degrades to thread-only serialization rather
|
|
30
30
|
# than refusing to record an audit entry.
|
|
@@ -59,7 +59,7 @@ _SYSLOG_HOST = os.environ.get("LOKI_AUDIT_SYSLOG_HOST", "").strip()
|
|
|
59
59
|
_SYSLOG_PORT = int(os.environ.get("LOKI_AUDIT_SYSLOG_PORT", "514"))
|
|
60
60
|
_SYSLOG_PROTO = os.environ.get("LOKI_AUDIT_SYSLOG_PROTO", "udp").lower().strip()
|
|
61
61
|
|
|
62
|
-
# Integrity chain hashing (
|
|
62
|
+
# Integrity chain hashing (hash-chained logging)
|
|
63
63
|
# Disable with LOKI_AUDIT_NO_INTEGRITY=true
|
|
64
64
|
INTEGRITY_ENABLED = os.environ.get("LOKI_AUDIT_NO_INTEGRITY", "").lower() not in ("true", "1", "yes")
|
|
65
65
|
_last_hash: str = "0" * 64 # Genesis hash
|
|
@@ -68,7 +68,7 @@ _last_hash: str = "0" * 64 # Genesis hash
|
|
|
68
68
|
# it, concurrent callers (the dashboard fans audit writes out across async
|
|
69
69
|
# handlers / asyncio.to_thread workers) interleave the unsynchronized
|
|
70
70
|
# _last_hash RMW with the file append: lines get written in a different order
|
|
71
|
-
# than the hashes were chained, which breaks the
|
|
71
|
+
# than the hashes were chained, which breaks the hash chain so
|
|
72
72
|
# verify_all_logs() reports valid:False even though no entry was tampered with.
|
|
73
73
|
# Holding this lock makes "compute hash, update _last_hash, append the line" a
|
|
74
74
|
# single atomic step so on-disk line order always matches chain order.
|
|
@@ -496,7 +496,7 @@ def log_event(
|
|
|
496
496
|
"details": details or {},
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
-
#
|
|
499
|
+
# Chain hash + file append, serialized as one atomic step.
|
|
500
500
|
#
|
|
501
501
|
# The chain hash is a read-modify-write of the module-global _last_hash, and
|
|
502
502
|
# the line must land in the file in the same order the hashes were chained.
|
|
@@ -926,7 +926,7 @@ def compute_chain_tip_in_dir(audit_dir) -> dict:
|
|
|
926
926
|
an explicit directory, plus a verification verdict for that chain.
|
|
927
927
|
|
|
928
928
|
Used by the unified cross-chain verifier to anchor the Python chain
|
|
929
|
-
state into the JS (``src/audit/log.js``)
|
|
929
|
+
state into the JS (``src/audit/log.js``) hash chain via a
|
|
930
930
|
cross-link record, and to reconcile a previously recorded anchor
|
|
931
931
|
against the live chain.
|
|
932
932
|
|
package/dashboard/server.py
CHANGED
|
@@ -11679,7 +11679,7 @@ def _moved_page() -> str:
|
|
|
11679
11679
|
where = (
|
|
11680
11680
|
f'<p>Control Plane: <a href="{_html.escape(cp, quote=True)}">{_html.escape(cp)}</a></p>'
|
|
11681
11681
|
if cp.startswith(("http://", "https://"))
|
|
11682
|
-
else "<p>Run <code>loki
|
|
11682
|
+
else "<p>Run <code>loki dashboard</code> to open the Control Plane.</p>"
|
|
11683
11683
|
)
|
|
11684
11684
|
return (
|
|
11685
11685
|
'<!doctype html><html lang="en"><head><meta charset="utf-8">'
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -241,7 +241,7 @@ references/ Detailed documentation (~24 files): research patterns
|
|
|
241
241
|
|
|
242
242
|
templates/ 21 PRD templates (saas, cli, discord-bot, ...)
|
|
243
243
|
agents/ Agent registry: types.json, hub install, managed registry
|
|
244
|
-
benchmarks/
|
|
244
|
+
benchmarks/ benchmark harnesses
|
|
245
245
|
plugins/ Claude Code plugin packaging
|
|
246
246
|
.github/workflows/ release.yml, converge-dist-tags.yml,
|
|
247
247
|
sdk-freshness.yml, pr-fast.yml (runs
|
package/docs/CLI-REFERENCE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLI reference
|
|
2
2
|
|
|
3
|
-
Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.141.
|
|
3
|
+
Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.141.6. Do not edit by hand.
|
|
4
4
|
Hidden and legacy-only commands are omitted; see `docs/CLI-INVENTORY.md` for the full inventory.
|
|
5
5
|
|
|
6
6
|
| Command | Description |
|
package/docs/COMPONENTS.md
CHANGED
|
@@ -319,7 +319,7 @@ The agent type registry and installation tooling.
|
|
|
319
319
|
phase.
|
|
320
320
|
|
|
321
321
|
**Key files:**
|
|
322
|
-
- `agents/types.json` - Agent type definitions (
|
|
322
|
+
- `agents/types.json` - Agent type definitions (agent types across 8 domains).
|
|
323
323
|
- `hub_install.py` - Agent hub install.
|
|
324
324
|
- `managed_registry.py` - Managed agent registry.
|
|
325
325
|
|
package/docs/INSTALLATION.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Loki Mode, by [Autonomi](https://www.autonomi.dev/), turns a spec or an issue into a verified pull request with a receipt you can check. This page covers installing it, a first run, and the options around it.
|
|
4
4
|
|
|
5
|
-
**Version:** v11.141.
|
|
5
|
+
**Version:** v11.141.6
|
|
6
6
|
|
|
7
7
|
**Engine note:** `loki start` is the primary command. `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick` all run the Loki 10 engine, whatever the flag order or input form (PRD file, issue ref, task or one-word brief). The previous loop runs only on `--engine legacy`, `LOKI_ENGINE=legacy`, or for one call when a flag Loki 10 cannot honor is present. See the [user guide](v10/GUIDE.md) and the [5-minute quickstart](QUICKSTART.md).
|
|
8
8
|
|
|
@@ -219,7 +219,7 @@ loki completions bash > ~/.loki-completion.bash # or print the script
|
|
|
219
219
|
|
|
220
220
|
Run state lives in `.loki/` inside each project and in `~/.loki/`. Uninstalling the CLI does not delete those directories. Receipts stay yours. Remove `.loki/` and `~/.loki/` yourself only when you want the history gone.
|
|
221
221
|
|
|
222
|
-
`loki wow` runs one small task in a temporary repo when Claude or OpenCode is ready, and falls back to `loki tour` when it is not. `loki factory "<task>"` is `loki start` with the autonomy policy named first. `--cost-first` prefers a lower-cost model only when the advisor marks the route low risk. `--max-cost` and `budgets.per_run` stay the hard cap.
|
|
222
|
+
`loki wow` runs one small task in a temporary repo when Claude or OpenCode is ready (it asks y/N before spending; `--yes` skips), and falls back to `loki tour` when it is not. `loki factory "<task>"` is `loki start` with the autonomy policy named first. `--cost-first` prefers a lower-cost model only when the advisor marks the route low risk. `--max-cost` and `budgets.per_run` stay the hard cap.
|
|
223
223
|
|
|
224
224
|
There is no importer that copies a Claude Code or OpenCode transcript into a Loki run. Inside one Loki run, the plan session resumes into implement unless `LOKI_E10_FIX_RESUME=0`. A rate limit stays a retry; a hard billing failure does not (`loki-ts/src/runner/retry_class.ts`). Checkpoint resume is `loki resume`. The handoff from another tool is the repo plus the task: `loki start --provider opencode` or the default Claude path, then `loki chat --attach` to watch. The MCP server and the Claude plugin return the same receipt-capable results as the CLI.
|
|
225
225
|
|
|
@@ -171,6 +171,10 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
|
|
|
171
171
|
- `LOKI_E10_INTAKE_CAP_S` -- off by default since acc-148 (unset, `0` or a non-number keeps the per-command caps alone); a positive number of seconds turns the shared budget on. When on and it cuts a baseline, intake prints one line starting `loki: intake budget spent after N s` (`repo_profile.ts` intakeBudgetNote). Turned off because it had no measured accuracy benefit and cut 6 of 65 past baselines (a complete 196 s gitea suite among them), and a cut baseline is unattributable base red. (R3; `loki-ts/src/runner/repo_profile.ts` intakeCapS / baselineSuites `deadlineMs`, wired in `stages/intake.ts` and `project_model/install.ts` intakeDeps). One budget in seconds for all of intake's baseline test runs together: the root baseline, its rerun after an install, and the per-suite baselines. A run the budget cuts is recorded as cut off, and a suite with no budget left reads "baseline budget used up", as before. The dependency install keeps its own cap (INSTALL_CAP_MS) and is not counted. The failure: a suite past the 300 s per-command cap was measured twice under two names, so intake spent 600 s on two cut-off runs that excuse nothing. Of 65 recorded bench baselines, 6 took over 180 s in all; 1 of them (195.8 s root, 219.2 s suite) completed and would now be cut.
|
|
172
172
|
- `LOKI_E10_MOCHA_TARGETED` -- on by default, `0` opts out (R5; `loki-ts/src/engine10/testmap.ts` mochaTargets, used by `stages/verify.ts`). When verify selects no test at all, a changed JS/TS file whose nearest package.json declares mocha (a dependency, a script, a `mocha` key, or a .mocharc file beside it) maps to its own test file: itself under the package's test/, tests/ or spec/ directory (fixtures excluded), else the file at the same path under one of them (with or without the source's first directory). At most 8, each run as `npx --no-install mocha <file>` (runner `mocha`, which runner detection never lists) through the normal test path, so base subtraction and the flaky rerun apply and a passing one covers its source. Mocha test files carry no .test or .spec suffix, so such a repo verified with no test at all.
|
|
173
173
|
- `LOKI_E10_BASE_RED_SHAPE` -- on by default, `0` opts out (acc-147; `loki-ts/src/runner/repo_profile.ts` sameUnattributableRed inside attributeFullSuite, `loki-ts/src/util/check_result.ts` failureShape). The intake baseline records the output shape of a base suite that is red with no parseable failing ids (`failing_shape`). A head full suite of the same command is pre-existing only when it fails in the identical kind: the same exit code, no parseable ids, and the same shape (whole output, only durations, clock times, timestamps and hex addresses normalized). A newly broken test, a different message or count, or another exit code stays introduced. The excuse is disclosed on NOT PROVEN. Dev corpus 2026-11-13: 4 of 24 runs ended FAILED with fix rounds chasing such a suite ("the base run is not attributable").
|
|
174
|
+
- `LOKI_E10_BACKSTOP_SEAL` -- on by default, `0` opts out (`loki-ts/src/engine10/supervisor.ts` after the first worker; `worker.ts` LOKI_E10_SEAL_ONLY; `stages/seal.ts` sealOnlyPass). A worker the backstop killed before it sealed gets one seal pass: a resumed worker runs only commit and seal, bounded by min(45 s, ceiling + 25 s - elapsed) and skipped below 10 s. The receipt is never VERIFIED and carries the time-ran-out NOT PROVEN line. `LOKI_E10_TEST_BLOCK_AFTER_SESSION_MS` is a test-only hook that blocks the worker's event loop after its implement session.
|
|
175
|
+
- `LOKI_RUN_DEADLINE_S` -- unset by default (off); a number of seconds turns it on (`loki-ts/src/util/run_cap.ts` deadlineCapS, used by resolveRunCapS and, for deep runs, the supervisor). The run cap is fixed at the deadline minus the process's uptime minus 30 s (at least 60 s), and never above another fixed cap, so the soft cap seals before the deadline.
|
|
176
|
+
- `LOKI_E10_TIMEOUT_CARRY` -- on by default, `0` opts out (`loki-ts/src/engine10/stages/verify.ts` carriedTimeouts in runTests). A test check that timed out in the previous verify of the run, in a file the change did not touch and not a Wall, task-named or held-out check, is carried as not_run instead of rerun. Separately, runOnce SIGKILLs a check KILL_AFTER_MS (5 s) after its timeout or abort.
|
|
177
|
+
- `LOKI_E10_WATCHDOG_SILENT_S` -- 120 by default, `0` turns it off (`loki-ts/src/engine10/supervisor.ts` silenceWatch, descendantNames, on the supervisor's 15 s alive beat). After that many seconds with no worker event, the supervisor appends `watchdog.silent` {silent_s, last_event, processes} (executable basenames under the supervisor, no arguments), again each further interval of silence.
|
|
174
178
|
- `LOKI_E10_DEEP_POST` -- on by default, `0` opts out (fl24; `loki-ts/src/engine10/stages/deep.ts` deepPost, spawned by `loki-ts/src/engine10/supervisor.ts` beside the deep worker). The deep worker holds withheld GitHub credentials, so it no longer posts; the poster (push env, runs no repo code) waits for its pid, reads `receipt-addendum-1.json` and posts the comment and the `loki/deep-verify` status, `error` when no addendum was written. Its pid is the last `deep.started` event, so the run stays live until the status is posted.
|
|
175
179
|
- `LOKI_E10_WEAK_EXCUSE` -- on by default, `0` opts out (fl24; `loki-ts/src/util/test_guard.ts` testFileWeakened / excusedEdit). Fewer assertions only inside test cases the task names by exact title and asks to update are not a weakened test; seal lists each as `edited test kept uncapped (...)`.
|
|
176
180
|
- `LOKI_E10_WEAK_MOCK_NEW` -- off by default, `1` turns it on (fl24; same file). Also excuses a setup hook inside a describe block the change added, an added mock of a module new in the change, or a bare vi.fn() logger or metrics stub. Off because a mock of a new module can still reach existing tests when the change moved logic into it.
|
|
@@ -29,6 +29,9 @@ with nowhere to look them up.
|
|
|
29
29
|
| `LOKI_CONFIG_DUMP` | `0` | `1` prints the resolved configuration and exits **without starting a run or spending anything**. |
|
|
30
30
|
| `LOKI_KEEP_RUN_BRANCH` | unset | When a Loki 10 run ends, Loki returns your checkout to the branch you started from (only when it has no uncommitted changes; otherwise it prints how to return), removes the run's leftover temporary worktrees, and deletes the `loki/e10-*` run branch. A branch that was pushed is simply deleted; an unpushed one is first saved as a git bundle in `.loki/runs/<run-id>/branch.bundle` (with `branch.json` holding the branch name and head SHA), and the summary prints the restore command `git fetch .loki/runs/<run-id>/branch.bundle <branch>:<branch>`. If the bundle cannot be written, the branch is kept. Run branches left by earlier runs are saved and removed the same way at the end of the next run (bundles without a run directory go to `.loki/runs/legacy-branches/`). A run that passed but published nothing (no remote, or `--no-pr`) keeps its branch checked out, a run you can still resume keeps its branch, and a live run's branch or a branch checked out in any worktree is never touched; branches not named `loki/e10-*` are never touched. `1` turns all of this off and keeps every run branch, as before. Independently of this setting, session id files are written in the run directory instead of loose in `.loki/`, and the next run moves older loose ones there. |
|
|
31
31
|
| `LOKI_EPIC_PARALLEL` | provider slots, at most 4 (claude 4, opencode 1) | How many slices of a split issue (`loki start owner/repo#N` on a large issue) run at once. Slices with no dependency run at the same time, each in its own worktree; a slice that depends on another waits for it and starts on its branch. `1` runs them one at a time. A failing or spec-conflicting slice skips only the slices that depend on it. Slices share one `--max-cost` cap, which can be passed by up to (slices in flight - 1) session costs because each running session sees the cap at its next cost event. |
|
|
32
|
+
| `LOKI_SPLIT_ONE_PR` | `1` | A split issue ends in ONE pull request for the issue, not one per slice. Each slice still runs and verifies on its own branch; at the end Loki builds `loki/<issue>-combined` from the issue's base, one commit per slice (`<slice id>: <slice title>`) in dependency order, reruns every slice's sealed tests plus the tests the combined change impacts, seals one combined receipt that lists each slice's verdict (the combined verdict is the weakest slice's, lowered by anything the combined tree breaks), and opens one PR with a section per slice. A merge conflict between slices gets one resolve session; if it still conflicts, that slice (and the slices stacked on it) opens its own PR and the `Combined:` line says why. `0` opens one PR per slice, as before. |
|
|
33
|
+
| `LOKI_SPLIT_ONE_PR_MAX_FILES` | `150` | When the combined diff of a split issue touches more files than this, the slices open one PR each instead of one combined PR, and the reason is printed. |
|
|
34
|
+
| `LOKI_SPLIT_MAX_SLICES` | `8` | The most slices one split may have (at least 2, at most 32). A split over the cap is re-asked once with the limit. |
|
|
32
35
|
|
|
33
36
|
For a cost estimate before committing to a run, `loki plan <spec> --json` is
|
|
34
37
|
the better tool: it reports complexity, iterations, tokens and cost without
|