loki-mode 11.156.0 → 11.157.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/hooks/validate-bash.sh +39 -1
- package/autonomy/loki +25 -23
- package/autonomy/route.sh +1 -1
- package/completions/_loki +1 -1
- package/completions/loki.bash +1 -1
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-CORE-VERBS.md +2 -2
- package/docs/CLI-INVENTORY.md +2 -2
- package/docs/CLI-REFERENCE.md +3 -2
- package/docs/INSTALLATION.md +1 -1
- package/docs/dev/architecture-reference.md +4 -0
- package/loki-ts/dist/cockpit.js +1 -1
- package/loki-ts/dist/loki.js +2403 -2373
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +126028 -124150
- package/packages/control-plane/src/server/app.ts +10 -2
- package/packages/control-plane/src/server/serve.ts +7 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-CnEl1LJ0.js → AdminPage-Dtr9qXAr.js} +1 -1
- package/web-app/dist/assets/{Avatar-nR_QigXF.js → Avatar-Bbd5nIIQ.js} +1 -1
- package/web-app/dist/assets/{Badge-B-Dei4TU.js → Badge-KlCR8eBL.js} +1 -1
- package/web-app/dist/assets/{Button-CxjxI-uw.js → Button-CuvgSS4G.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-D8tmzOFq.js → CockpitPage-DoEOdgP2.js} +1 -1
- package/web-app/dist/assets/{ComparePage-D8CXHyX0.js → ComparePage-kHjdfoWo.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-Bj-_6IRg.js → ErrorBoundary-Cdm7nC6_.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-BNMf9o_x.js → EvidenceReceiptPanel-Cy4gJTfN.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-7m921nqb.js → GitHubIssuesPanel-CoaeSXOe.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BOa-Qw0J.js → GitHubPRsPanel-CQJCoIz_.js} +1 -1
- package/web-app/dist/assets/{HomePage-DUR58xru.js → HomePage-3XZPfCSJ.js} +2 -2
- package/web-app/dist/assets/{LoginPage-DMeC_PZP.js → LoginPage-BNSbxeMm.js} +1 -1
- package/web-app/dist/assets/{MagicPage-BH_PUkIC.js → MagicPage-WWH7SwfZ.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-DrX-1vg9.js → MetricsPage-Cjvh-jSf.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-CJvcnXIn.js → NotFoundPage-CgL4EF3d.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-CcJGiv7r.js → ProjectPage-B2y6gBfZ.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-D-dpezwE.js → ProjectsPage-BTagWO2i.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-DP7btA4h.js → SettingsPage-WmRElM3E.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-u7Rfj0wj.js → ShowcasePage-wQ-VZyW1.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-DEeW2RLu.js → SystemSettingsPage-CkoLiTvO.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CIUHZTj2.js → TeamsPage-D-LHZsn9.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CYc3d0tK.js → TemplatesPage-DuRKmn-s.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-DPxVMWCr.js → TerminalOutput-2PXo3eS2.js} +1 -1
- package/web-app/dist/assets/{activity-Bsy01YfY.js → activity-D3TUBclR.js} +1 -1
- package/web-app/dist/assets/{bell-D8DFcv4d.js → bell-BDl1J6X-.js} +1 -1
- package/web-app/dist/assets/{bot-CacWSWwY.js → bot-CHoQ0cL1.js} +1 -1
- package/web-app/dist/assets/{check-DmLCcg4h.js → check-BuGreETS.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DSg7_Nm8.js → chevron-left-Dkf6mFUB.js} +1 -1
- package/web-app/dist/assets/{circle-alert-KccjUQRt.js → circle-alert-WFj2TQ9c.js} +1 -1
- package/web-app/dist/assets/{clock-Bnz3wpmw.js → clock-Bn6QW9zr.js} +1 -1
- package/web-app/dist/assets/{cloud-Bv1pXMGJ.js → cloud-Yzjfx2Bv.js} +1 -1
- package/web-app/dist/assets/{code-xml-Hub3vAtf.js → code-xml-CtpDC2I8.js} +1 -1
- package/web-app/dist/assets/{database-BDbyQiYL.js → database-Datydoc-.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-AN4S0rjL.js → dollar-sign-BCJkxKs6.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-C9I5wdgG.js → file-code-corner-gbgUZQ60.js} +1 -1
- package/web-app/dist/assets/{file-plus-BuoFKaIH.js → file-plus-B-Ah_CpZ.js} +1 -1
- package/web-app/dist/assets/{globe-Cr8TvGwy.js → globe-Bst-IJOg.js} +1 -1
- package/web-app/dist/assets/{hammer-Dyl7781L.js → hammer-CcKIK3jL.js} +1 -1
- package/web-app/dist/assets/{index-Bvn4cBwL.js → index-DtmaWxTZ.js} +3 -3
- package/web-app/dist/assets/{layers-C9TmHkcI.js → layers-BAdGUPGI.js} +1 -1
- package/web-app/dist/assets/{loader-circle-Djb2m9Hu.js → loader-circle-CzTwEeEV.js} +1 -1
- package/web-app/dist/assets/{lock-Boqvd0Nw.js → lock-B5s3sYxt.js} +1 -1
- package/web-app/dist/assets/{package-CP7-aoul.js → package-BwP9xtUT.js} +1 -1
- package/web-app/dist/assets/{plus-B5u1_pj4.js → plus-BkTkRvnl.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-SRzZ5IqE.js → refresh-cw-vZWSQT4C.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-BatXNjHV.js → rotate-ccw-BfiOpKkJ.js} +1 -1
- package/web-app/dist/assets/{scroll-text-B57TlwdW.js → scroll-text-0F2pJrT7.js} +1 -1
- package/web-app/dist/assets/{server-BsD10iWD.js → server-DKTp6Lsg.js} +1 -1
- package/web-app/dist/assets/{shield-alert-Cu62bdJA.js → shield-alert-DpL3knlY.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DsprGKjp.js → thumbs-up-CRr5J1fb.js} +1 -1
- package/web-app/dist/assets/{trash-2-BTduWSwY.js → trash-2-MhZJBf3n.js} +1 -1
- package/web-app/dist/assets/{trending-down-CdhKHs5h.js → trending-down-DL8xT5IX.js} +1 -1
- package/web-app/dist/assets/{trending-up-DePgEFVD.js → trending-up-Ciy20G6q.js} +1 -1
- package/web-app/dist/assets/{upload-eZURGOKq.js → upload-BlJIPegj.js} +1 -1
- package/web-app/dist/assets/{usePolling-CKmytDcn.js → usePolling-CxQ0uJJk.js} +1 -1
- package/web-app/dist/assets/{user-CvDfX-rr.js → user-C0ktPCL2.js} +1 -1
- package/web-app/dist/index.html +1 -1
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.
|
|
6
|
+
# Loki Mode v11.157.0
|
|
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.
|
|
464
|
+
**v11.157.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.157.0
|
|
@@ -130,6 +130,38 @@ wrapper_value_options = {
|
|
|
130
130
|
shells = {"bash", "dash", "ksh", "sh", "zsh"}
|
|
131
131
|
separators = {";", "&", "&&", "|", "||", "(", ")"}
|
|
132
132
|
assignment = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*=.*$", re.S)
|
|
133
|
+
# STASH-GUARD: an engine session (LOKI_E10_STAGE is set only by engine10/session.ts) never runs `git stash`. A session
|
|
134
|
+
# stopped between the stash and the pop left its whole change in the stash and the run delivered nothing.
|
|
135
|
+
STASH_REASON = "__git_stash__"
|
|
136
|
+
stash_guard = bool(os.environ.get("LOKI_E10_STAGE"))
|
|
137
|
+
shell_keywords = {"{", "!", "then", "do", "else", "elif", "if", "while", "until"}
|
|
138
|
+
git_value_options = {"-C", "-c", "--git-dir", "--work-tree", "--namespace", "--exec-path", "--super-prefix", "--config-env", "--attr-source"}
|
|
139
|
+
# a command substitution inside a quoted word is one token to shlex, so it is read from the text
|
|
140
|
+
stash_substitution = re.compile(r"(?:\$\(|`)\s*(?:[^\s)`]*/)?git\s[^)`]*\bstash\b")
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def git_stash(part):
|
|
144
|
+
start = 0
|
|
145
|
+
while start < len(part) and part[start] in shell_keywords:
|
|
146
|
+
start += 1
|
|
147
|
+
rest = part[start:]
|
|
148
|
+
name, index = first_command(rest)
|
|
149
|
+
args = rest[index + 1:]
|
|
150
|
+
if name == "xargs":
|
|
151
|
+
while args and args[0].startswith("-"):
|
|
152
|
+
args = args[1:]
|
|
153
|
+
name, args = (basename(args[0]), args[1:]) if args else ("", [])
|
|
154
|
+
if name != "git":
|
|
155
|
+
return False
|
|
156
|
+
pos = 0
|
|
157
|
+
while pos < len(args):
|
|
158
|
+
if args[pos] in git_value_options:
|
|
159
|
+
pos += 2
|
|
160
|
+
elif args[pos].startswith("-"):
|
|
161
|
+
pos += 1
|
|
162
|
+
else:
|
|
163
|
+
break
|
|
164
|
+
return pos < len(args) and args[pos] == "stash"
|
|
133
165
|
|
|
134
166
|
|
|
135
167
|
def basename(value):
|
|
@@ -180,6 +212,8 @@ def classify(value, depth=0):
|
|
|
180
212
|
tokens = words(value)
|
|
181
213
|
except ValueError:
|
|
182
214
|
return "command text could not be parsed safely"
|
|
215
|
+
if stash_guard and stash_substitution.search(value):
|
|
216
|
+
return STASH_REASON
|
|
183
217
|
|
|
184
218
|
segment = []
|
|
185
219
|
segments = []
|
|
@@ -199,6 +233,8 @@ def classify(value, depth=0):
|
|
|
199
233
|
return "command wrapper cannot be inspected safely"
|
|
200
234
|
if name in blocked:
|
|
201
235
|
return blocked[name]
|
|
236
|
+
if stash_guard and git_stash(part):
|
|
237
|
+
return STASH_REASON
|
|
202
238
|
|
|
203
239
|
args = part[index + 1:]
|
|
204
240
|
if name in shells:
|
|
@@ -381,7 +417,9 @@ def to_classify():
|
|
|
381
417
|
|
|
382
418
|
|
|
383
419
|
reason = classify(to_classify())
|
|
384
|
-
if reason:
|
|
420
|
+
if reason == STASH_REASON:
|
|
421
|
+
print("LOKI_STASH_GUARD: git stash is refused in a Loki session: a session that is stopped between the stash and the pop leaves its whole change outside the work tree, and the run then delivers nothing. To see the code without your change use git diff, git show HEAD:<file>, or a temporary copy of the file under $TMPDIR.")
|
|
422
|
+
elif reason:
|
|
385
423
|
print("LOKI_HOST_GUARD: refusing " + reason + ". Use the platform sandbox and lifecycle APIs instead.")
|
|
386
424
|
PY
|
|
387
425
|
)
|
package/autonomy/loki
CHANGED
|
@@ -2107,35 +2107,36 @@ PY
|
|
|
2107
2107
|
|
|
2108
2108
|
_loki_control_ui() {
|
|
2109
2109
|
[ "${LOKI_CONTROL_DEFAULT:-1}" = "0" ] && return 1
|
|
2110
|
-
local url="" open_it=1 arg
|
|
2110
|
+
local url="" open_it=1 arg
|
|
2111
2111
|
for arg in "$@"; do [ "$arg" = "--no-open" ] && open_it=0; done
|
|
2112
2112
|
if [ "${LOKI_HEADLESS:-0}" = "1" ] || [ "${LOKI_NO_BROWSER:-0}" = "1" ]; then open_it=0; fi
|
|
2113
2113
|
command -v python3 >/dev/null 2>&1 || return 1
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
fi
|
|
2120
|
-
# LOKI_CONTROL=0 is the test off switch (supervisor, run-all-tests, local-ci);
|
|
2121
|
-
# it must never start a detached `control serve` that writes ~/.loki/control.
|
|
2122
|
-
[ "${LOKI_CONTROL:-}" = "0" ] && return 1
|
|
2123
|
-
local cli="$SKILL_DIR/loki-ts/dist/loki.js" cdir="${HOME}/.loki/control" spid
|
|
2124
|
-
[ -f "$cli" ] || cli="$SKILL_DIR/loki-ts/src/cli.ts"
|
|
2125
|
-
mkdir -p "$cdir" && chmod 700 "$cdir" 2>/dev/null || true
|
|
2126
|
-
LOKI_CONTROL=1 LOKI_NO_BROWSER=1 nohup bun --no-env-file --config=/dev/null "$cli" control serve >"$cdir/serve.log" 2>&1 </dev/null &
|
|
2127
|
-
spid=$!
|
|
2128
|
-
echo "$spid" > "$cdir/serve.pid" 2>/dev/null || true
|
|
2129
|
-
for i in $(seq 1 100); do
|
|
2130
|
-
url=$(_loki_control_live_url) && break
|
|
2131
|
-
url=""
|
|
2132
|
-
kill -0 "$spid" 2>/dev/null || break
|
|
2133
|
-
sleep 0.1
|
|
2134
|
-
done
|
|
2114
|
+
# LOKI_CONTROL=0 is the test off switch (supervisor, run-all-tests, local-ci);
|
|
2115
|
+
# it must never start a detached `control serve` that writes ~/.loki/control.
|
|
2116
|
+
# With it, or with no bun, only a Control Plane that is already running is used.
|
|
2117
|
+
if [ "${LOKI_CONTROL:-}" = "0" ] || ! command -v bun >/dev/null 2>&1; then
|
|
2118
|
+
url=$(_loki_control_live_url) || url=""
|
|
2135
2119
|
if [ -z "$url" ]; then
|
|
2136
|
-
echo "loki: the Control Plane
|
|
2120
|
+
command -v bun >/dev/null 2>&1 || echo "loki: the Control Plane needs bun (https://bun.sh); using the classic dashboard." >&2
|
|
2137
2121
|
return 1
|
|
2138
2122
|
fi
|
|
2123
|
+
else
|
|
2124
|
+
# One path with `loki control open` and the live console's o key
|
|
2125
|
+
# (loki-ts/src/commands/control.ts ensureControlPlane): a running Control
|
|
2126
|
+
# Plane is reused only when the install it was started from still exists,
|
|
2127
|
+
# still holds the dashboard page and is this version; a stale one is
|
|
2128
|
+
# stopped by its recorded PID and this install's own is started detached
|
|
2129
|
+
# in its place. The first stdout line is the URL.
|
|
2130
|
+
local cli="$SKILL_DIR/loki-ts/dist/loki.js"
|
|
2131
|
+
[ -f "$cli" ] || cli="$SKILL_DIR/loki-ts/src/cli.ts"
|
|
2132
|
+
url=$(LOKI_CONTROL=1 LOKI_NO_BROWSER=1 LOKI_CONTROL_START_WAIT_MS="${LOKI_CONTROL_START_WAIT_MS:-10000}" bun --no-env-file --config=/dev/null "$cli" control open --no-open </dev/null | sed -n 1p) || url=""
|
|
2133
|
+
case "$url" in
|
|
2134
|
+
http://*) url="${url%/}" ;;
|
|
2135
|
+
*)
|
|
2136
|
+
echo "loki: the Control Plane did not start (see ${HOME}/.loki/control/serve.log); using the classic dashboard." >&2
|
|
2137
|
+
return 1
|
|
2138
|
+
;;
|
|
2139
|
+
esac
|
|
2139
2140
|
fi
|
|
2140
2141
|
if [ "$open_it" = "1" ]; then
|
|
2141
2142
|
loki_open_url "$url" || echo "$url"
|
|
@@ -36214,6 +36215,7 @@ cmd_control() {
|
|
|
36214
36215
|
echo ""
|
|
36215
36216
|
echo "Commands:"
|
|
36216
36217
|
echo " serve [--port N] [--db PATH] Run the control plane + UI on 127.0.0.1"
|
|
36218
|
+
echo " open [--no-open] Open the dashboard in your browser and print its URL; starts it first when needed (also: loki dashboard)"
|
|
36217
36219
|
echo " backfill [DIR] Ship DIR/.loki/runs to the control plane"
|
|
36218
36220
|
echo " prune --repo OWNER/NAME | --before ISO_DATE [--dry-run] [--db PATH]"
|
|
36219
36221
|
echo " Delete matching runs, their events and orphaned sources"
|
package/autonomy/route.sh
CHANGED
|
@@ -19,7 +19,7 @@ _ROUTE_OPTVAL_FLAGS=" --mirofish "
|
|
|
19
19
|
# engine rather than configure it: the route still resolves (R_FRONT=1) but the dispatcher leaves the call to the front end.
|
|
20
20
|
_ROUTE_FRONT_FLAGS=" --workspace --deploy --health-url --health-match --auto-rollback --destination --canary --domain "
|
|
21
21
|
# Flags engine10 honors as-is.
|
|
22
|
-
_ROUTE_E10_FLAGS=" --no-pr --deep --json --verbose --quiet --resume --provider --max-cost --spec --attempts --seal-existing --detach -d "
|
|
22
|
+
_ROUTE_E10_FLAGS=" --no-pr --deep --verified --json --verbose --quiet --resume --provider --max-cost --spec --attempts --seal-existing --detach -d "
|
|
23
23
|
# The largest PRD engine10 takes: it carries the task in env vars and CLI arguments (with a context pack added under
|
|
24
24
|
# --session-model), and Linux caps one string at 128 KiB. A bigger PRD runs on the legacy engine, or is refused under
|
|
25
25
|
# SDK mode with claude (the legacy engine has no SDK path).
|
package/completions/_loki
CHANGED
|
@@ -54,7 +54,7 @@ function _loki {
|
|
|
54
54
|
'--port[Port for the control plane server]:port:' \
|
|
55
55
|
'--json[Output as JSON]' \
|
|
56
56
|
'--repo[Repository to backfill]:repo:_files -/' \
|
|
57
|
-
'1:subcommand:(serve status help)'
|
|
57
|
+
'1:subcommand:(open serve stop status help)'
|
|
58
58
|
;;
|
|
59
59
|
config)
|
|
60
60
|
_loki_config
|
package/completions/loki.bash
CHANGED
|
@@ -287,7 +287,7 @@ _loki_completion() {
|
|
|
287
287
|
COMPREPLY=( $(compgen -W "--port --json --repo --help" -- "$cur") )
|
|
288
288
|
return 0
|
|
289
289
|
fi
|
|
290
|
-
COMPREPLY=( $(compgen -W "serve status help" -- "$cur") )
|
|
290
|
+
COMPREPLY=( $(compgen -W "open serve stop status help" -- "$cur") )
|
|
291
291
|
;;
|
|
292
292
|
|
|
293
293
|
plan)
|
package/dashboard/__init__.py
CHANGED
package/docs/CLI-CORE-VERBS.md
CHANGED
|
@@ -28,7 +28,7 @@ provider; other providers and model routes are additions selected with
|
|
|
28
28
|
| `loki deploy` | Deploy a VERIFIED run |
|
|
29
29
|
| `loki doctor [--fix] [--json]` | Check prerequisites, providers and login. `--fix` creates state dirs and a default config and prints exact commands for the rest; never runs sudo |
|
|
30
30
|
| `loki config list\|get\|set\|path\|show\|validate` | Settings; `config list --json` for machines |
|
|
31
|
-
| `loki control
|
|
31
|
+
| `loki control open` | The dashboard (the local Control Plane UI) in your browser, started when needed; also `loki dashboard`. Others: `serve`, `stop`, `status`, `backfill`, `prune` |
|
|
32
32
|
|
|
33
33
|
`start` flags: `--no-pr`, `--deep`, `--provider NAME`, `--model ID`, `--max-cost USD`
|
|
34
34
|
(aliases `--budget`, `--budget-limit`), `--session-model TIER`, `-v` (verbose),
|
|
@@ -93,7 +93,7 @@ with the planned removal of commands that have no dependents, is the generated
|
|
|
93
93
|
| `proof`, `keys` | `loki receipt` |
|
|
94
94
|
| `verify-pr` | `loki verify <PR url>` |
|
|
95
95
|
| `rollback` | `loki undo <run>` |
|
|
96
|
-
| `dashboard` | `loki control
|
|
96
|
+
| `dashboard` | `loki control open` |
|
|
97
97
|
| `why`, `trust` | `loki status` |
|
|
98
98
|
| `quickstart`, `tour`, `demo`, `wow`, `factory` | `loki start` (first run) |
|
|
99
99
|
| `docs` | `loki help` |
|
package/docs/CLI-INVENTORY.md
CHANGED
|
@@ -11,7 +11,7 @@ Classes: KEEP (the 11 commands in `loki --help` and completions), HIDE (keeps wo
|
|
|
11
11
|
- FOLD: 61
|
|
12
12
|
- REMOVED: 29
|
|
13
13
|
- Total rows: 145
|
|
14
|
-
- Registry paths (commands and nested subcommands):
|
|
14
|
+
- Registry paths (commands and nested subcommands): 219
|
|
15
15
|
|
|
16
16
|
## Commands
|
|
17
17
|
|
|
@@ -62,7 +62,7 @@ Classes: KEEP (the 11 commands in `loki --help` and completions), HIDE (keeps wo
|
|
|
62
62
|
| verify | autonomy/loki | KEEP | Legacy proof vs v10 verify split | |
|
|
63
63
|
| keys | autonomy/loki | FOLD | Receipt signing | loki receipt key |
|
|
64
64
|
| review | autonomy/loki | HIDE | Gates are legacy-shaped | |
|
|
65
|
-
| dashboard | autonomy/loki | FOLD | Overlaps Control Plane | loki control
|
|
65
|
+
| dashboard | autonomy/loki | FOLD | Overlaps Control Plane | loki control open |
|
|
66
66
|
| config | autonomy/loki | KEEP | Mixed legacy keys | |
|
|
67
67
|
| mcp | autonomy/loki | HIDE | Engine-neutral | |
|
|
68
68
|
| acp | autonomy/loki | HIDE | Engine-neutral | |
|
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.
|
|
3
|
+
Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.157.0. 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 |
|
|
@@ -29,7 +29,8 @@ Hidden and legacy-only commands are omitted; see `docs/CLI-INVENTORY.md` for the
|
|
|
29
29
|
| `loki config path` | Print config path |
|
|
30
30
|
| `loki config set` | Set a value |
|
|
31
31
|
| `loki config get` | Get a value |
|
|
32
|
-
| `loki control` | Control Plane (serve, backfill, prune, stop, status) |
|
|
32
|
+
| `loki control` | Dashboard and Control Plane (open, serve, backfill, prune, stop, status) |
|
|
33
|
+
| `loki control open` | Open the dashboard in your browser (starts it when needed) |
|
|
33
34
|
| `loki control serve` | Run the control plane and UI |
|
|
34
35
|
| `loki control backfill` | Ship DIR/.loki/runs to the control plane |
|
|
35
36
|
| `loki control prune` | Delete matching runs |
|
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.
|
|
5
|
+
**Version:** v11.157.0
|
|
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
|
|
|
@@ -224,6 +224,7 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
|
|
|
224
224
|
- `LOKI_E10_COLLATERAL_BASELINE` -- on by default, `0` opts out (acc-154, fix D; `loki-ts/src/runner/repo_profile.ts` collateralOnBaseline, `stages/verify.ts`). A collateral test (relevant, not the task's own) is pre-existing at once, with no COLLATERAL_RED cap and no fix round, only when the environment is as intake left it, the test file is unedited, no changed file is its path-paired source, and every comparable failing id with its error lines equals this base commit's intake profile. A changed paired source, a new failing id, or the same id with another error keeps the cap and the fix round. Before it, FireLater#24's collateral page tests cost a fix round each slice and capped VERIFIED although they matched base exactly.
|
|
225
225
|
- `LOKI_DEFAULT_SESSION_MODEL` -- the session model a Claude run uses when the user names none (acc-156; `loki-ts/src/util/claude_model.ts` DEFAULT_SESSION_MODEL and chooseSessionModel, applied in `engine10/supervisor.ts`, shown by `autonomy/route.sh`). Unset means DEFAULT_SESSION_MODEL (`sonnet`); any session pin value (`haiku`, `sonnet`, `opus`, `small`, `medium`, `high`, ...) sets another; `provider` restores the pre-acc-156 run with no `--model`, the Claude CLI's account default. The default is exported as LOKI_SESSION_MODEL, so a default run is exactly a `--session-model <default>` run. `--session-model`, LOKI_SESSION_MODEL, LOKI_MODEL_OVERRIDE, LOKI_MODEL_ROUTE, LOKI_{,CLAUDE_}MODEL_{DEVELOPMENT,PLANNING,FAST} and the model router (LOKI_ROUTER=on|auto, which `--haiku` and `--cost lean` set) always win. The start line prints `model <m> (<why>)` and the receipt records `model_source` (explicit, default, provider). Bench: an `L-Default` arm or BENCH_NO_SESSION_MODEL=1 runs `bench/bin/run_arm.sh` with no `--session-model`.
|
|
226
226
|
- `LOKI_E10_COMMIT_HOOK_BYPASS` -- on by default, `0` opts out (acc-160; `loki-ts/src/engine10/stages/seal.ts` commitStage, `engine10/machine.ts`, knob in `util/safe_git.ts`). Loki's internal commit runs the repo's own hooks first, with the user's signing kept and a 120 s limit. If that commit fails, the index and the run's own files go back to the tree verify judged, which undoes a hook that ran a formatter and restaged. The commit is then retried once with `core.hooksPath=/dev/null`, signing still kept. A pass on the retry proves a hook was the cause, and the receipt says so on NOT PROVEN (a disclosure, not a cap). A failure the retry does not fix, such as signing, stays `git commit failed`. In both cases seal now writes a FAILED receipt with the git error on NOT PROVEN, instead of ending with no receipt. Found on dev-msw-2829: the session's `pnpm run build` installed simple-git-hooks, whose commitlint `commit-msg` hook rejected the `loki:` subject.
|
|
227
|
+
- `LOKI_VERIFIED` -- off by default; `1` (or `loki start --verified`) turns verified mode on (rw-03; `loki-ts/src/engine10/closure.ts` `verifiedOn`, `verifiedBounds`, `verifiedHeader`; flag parsed in `engine10/supervisor.ts`, passed through by `autonomy/route.sh`). The start line says so and the receipt carries `verified_mode`. Bounds, each with its own override: `LOKI_VERIFIED_ROUNDS` (3, at most 10), `LOKI_VERIFIED_MAX_S` (7200, at most 14400), `LOKI_VERIFIED_MAX_USD` (5.00), `LOKI_VERIFIED_MAX_TOKENS` (3,000,000). `CLOSURE_ROUNDS_BUILT` in the same file is false until the closure round lands; until then the mode is recorded and changes nothing else. The reviewer flag count beside the label (`reviewerFlagsSuffix`, `flagsFirst`) is always on and reads no label rule.
|
|
227
228
|
- `LOKI_E10_CARGO_MERGED_DOCTEST` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `loki-ts/src/util/check_result.ts`). rustdoc's merged-doctests note (Rust 2024 edition), `all doctests ran in Xs; merged doctests compilation took Ys`, prints after a doctest segment's own `test result:` trailer. It is cargo's note, not test output, so it is dropped from segment bodies and from the stream's tail, and the segment and the run read as measured. A green `cargo test` with no test target at all (a fuzz or bin-only crate) ran 0 tests instead of reading as unparsed. Found on tera (dev2): every cargo suite read not_run.
|
|
228
229
|
- `LOKI_E10_AVA_TARGETED` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `engine10/testmap.ts` avaTargets, `util/check_result.ts`). When verify selects nothing, a changed JS/TS file whose nearest package declares ava (a dependency, an `ava` key, or an ava.config file) maps to its own ava test: itself under test/ or tests/ (helpers and fixtures excluded), else the same-stem file there. At most 8 refs, each run as `npx --no-install ava <file>`. The count comes from ava's own summary block after its last rule, past stderr noise. Found on ink (dev2): only lint:tsc ran.
|
|
229
230
|
- `LOKI_E10_NO_TEST_FALLBACK` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (acc-162; `engine10/stages/verify.ts`, `project_model/package_suite.ts` ownedSuites). A low-tier verify that executed no test at all runs the repo's own test command, through the full-suite path and its base attribution. That means the Project Model suites of the packages that own the changed files (for example `cargo test` in that crate), else the detected runner's full command. verify records `no_test_fallback: true`. When nothing executable runs, NOT PROVEN still says `no tests executed`.
|
|
@@ -241,6 +242,9 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
|
|
|
241
242
|
- `LOKI_E10_PRECEDENCE_CHECK` -- on by default, `0` opts out (F3; `loki-ts/src/util/edit_shape.ts` precedenceSites / precedenceBrief, `util/conflict_resume.ts` resumeForPrecedence). The edit-shape precedence rule detects a widened check from the diff alone: a Go `x.(T)` replaced by `errors.As` or `errors.Is`, an `isinstance` or `instanceof` moved to another type, or an exact `==` / `===` comparison replaced by a membership test (`includes`, `in`, `strings.Contains`). For each such site it lists the other type or value checks in the same function, the inputs that took their own branch before. After a clean LOKI_DONE with a non-empty diff, a site that has such inputs gets one follow-up resume (`-pr`) naming each input and asking that it still take its branch, with a test case per input; only a clean LOKI_DONE replaces the first result. Nothing fires, and nothing is spent, without such a site. The implement stage records `precedence_check: {sites, resumed}`. The tuning case was a widened error check placed ahead of an existing assertion branch; the test fixtures are synthetic.
|
|
242
243
|
- `LOKI_E10_BUILD_ARTIFACT_DROP` -- on by default, `0` opts out (GB; `buildArtifacts` in `loki-ts/src/e10ext/commit_filter.ts`, part of `dropSet`, so the commit stage, the supervisor backstop and the WIP commit all apply it; seal names each one with "generated or build file left out of the commit: <path>"). A file the run ADDED is left out when the repo's ignore rules match it (`git check-ignore --no-index`, so a force-added file counts), when it is byte-compiled or incremental build state anywhere (`*.pyc`, `*.pyo`, `*.tsbuildinfo`, `__pycache__/`, `<name>.egg-info/`), or when it sits under `dist/`, `build/`, `coverage/`, `.nyc_output/` or `target/` at the repo root or beside a package manifest. Kept: the task names the file, or that output or cache directory (`dist/`, `__pycache__/`, `<name>.egg-info/` ...) already holds a file tracked at the run base (a repo that commits it). Modified tracked files are never touched. The ignore rules are the tree's at commit time, which equal the base's unless the run edited a `.gitignore`.
|
|
243
244
|
- `LOKI_E10_REGEN_DROP` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (RD; `noteRegenerated`, `regenDrops` in `loki-ts/src/e10ext/commit_filter.ts`; the machine snapshots the tree around every verify run in `engine10/machine.ts`, and the commit stage in `stages/seal.ts` applies it). A path a verify run changed joins `<runDir>/regenerated.json`; a path a model stage (wall, implement, fix) later writes leaves it. At commit, a staged path still in that set is left out unless the task names it or one of its changed lines carries a task keyword (a backticked span, or an identifier of 5 or more characters with a digit, underscore or camelCase, or 8 or more letters), so a doc a test run regenerated in step with the change stays. Each drop is named on the receipt: "rewritten only by Loki's own check run, not by the change, and left out of the commit: <path>". The failure: a test run regenerated an unrelated doc page with a machine-specific path, the commit shipped it, and review failed a VERIFIED run as an unrelated edit. acc-170 adds three rules. A NEW file only a check run wrote is left out unless the task names its exact path or file name; the task-keyword exemption keeps only modified files. The commit stage's picks go through `guardRegenDrops`: each goes back to base on disk (a modified file checked out, a new one removed), then `targetedBreak` (seal.ts) reruns the targeted tests verify passed (at most 6, about 20 s; never a full suite or lint). If one fails, or none could run, every pick is restored byte for byte, kept, and named on the receipt ("rewritten by Loki's own check run and kept: a targeted test fails without it"). And `commitUnsealedWork`, the run-end WIP commit of a run with no PR, applies the same RD drop, so a path the commit stage left out cannot come back.
|
|
245
|
+
- `LOKI_E10_ONE_ROAD` -- on by default, `0` opts out, `all` widens it (RW-02; `workRoad` and `runRoad` in `loki-ts/src/engine10/supervisor.ts`, read by the stages through `issueRunBrief` in `engine10/types.ts`). A text task that carries its own acceptance list (`issueAcceptance` in `util/intent_card.ts`) takes the proof and acceptance road an issue takes: its lines, the proof script brief and helper kit, Loki's own re-run, hand-backs, the count, the review round and the issue time cap rule (`issueCapRule` in `util/run_cap.ts`). Decided once per run in the supervisor and carried to every worker in `LOKI_E10_WORK_ROAD` (set by Loki from `run.started`'s `road`, never by the user), so a resumed worker is on the same road. Not on the road: a task in prose (unless `all`), a goal at or under `LOKI_E10_SMALL_MAX_CHARS` (600), a task that sizes large by structure (`deliverables` in `features/decompose.ts`), `--spec`, `--seal-existing`, a group unit, a provider other than claude, `LOKI_E10_PROVE_BY_RUNNING=0`. Intake's source stays `text`; only what needs GitHub reads the source. A text task with its own list and no run of Loki's own is held below VERIFIED (`noOwnProofNotes` in `engine10/proof_rerun.ts`).
|
|
246
|
+
- `LOKI_E10_TITLE_ACCEPTANCE` -- on by default, `0` opts out (RW-02; `fallbackLines` in `loki-ts/src/engine10/proof_rerun.ts`, used by `labelAsks` and the seal). A run on the proof road whose task has no acceptance list takes the plan's intent-card `Acceptance:` lines when a plan ran, otherwise the task's title line from the intake record as the one item (receipt `issue_acceptance_source: "title"`). No plan session is added for it: a plan turns off the coverage fold, the patch path and the systematic-edit completion in implement. A stand-in line never holds a label by itself.
|
|
247
|
+
- `LOKI_E10_TEST_REACH_HELPERS` -- on by default, `0` opts out (RW-02; `exercisesChange` in `loki-ts/src/e10ext/scope.ts`). TK also holds when a helper file the test imports by a relative path (one hop, at most 20 files) imports the changed code.
|
|
244
248
|
- `LOKI_E10_DIFF_NEED` -- on by default since 11.141.3 (measured on dev2, 2 seeds, GOALS A3.2), `0` opts out (DN; `needDrops`, `formattingOnly`, `suppressionOnly` in `loki-ts/src/e10ext/commit_filter.ts`, applied by the commit stage in `stages/seal.ts` after RD). Deliver only what the fix needs, with no model call: a staged modified file the task does not name is left out when its change is formatting only (base and head equal once whitespace, quote style, semicolons and trailing commas are normalized; Python, YAML and other whitespace-significant files keep their indentation, so only trailing space, blank lines and quotes are normalized), unless the task asks for formatting; or when its change only adds or removes lint-suppression comments (noqa, type: ignore, eslint-disable, @ts-ignore, @ts-expect-error, nolint, pylint: disable, rubocop:disable, #[allow(..)], @SuppressWarnings) in a file outside the stated scope (or with no scope signal), unless the task is about lint or warnings. Each drop is named on the receipt ("formatting-only change left out of the delivered diff: <path>"). The failures: a 177 KB delivered diff of reformatted generated route trees and schema files where the raw run delivered 4.5 KB, and a drive-by suppression removal in an unrelated file.
|
|
245
249
|
- `LOKI_E10_TEST_REACH` -- on by default, `0` opts out (TK; `exercisesChange` in `loki-ts/src/e10ext/scope.ts`, applied inside J3 `crossPackageTestEdits`). J3 never drops a test that imports the changed code: a JS/TS import or require whose relative specifier resolves to a changed source file (extension and `/index` optional) or names the changed file's package (its package.json name or a subpath), or a Go import of a changed file's package path (go.mod module plus directory; import blocks and single imports). A test that imports nothing changed is still dropped as before. Measured on synthetic layouts: a JS tests workspace importing the changed package, a relative import from a sibling package, and a Go package importing the changed subpackage were all dropped before (the run's only regression test, so the diff carried none) and are kept now; Python src-layout and Rust `tests/` are never J3 candidates.
|
|
246
250
|
- `LOKI_E10_SCOPE_TEST_DROP` -- on by default, `0` opts out (J3; `loki-ts/src/e10ext/scope.ts` crossPackageTestEdits, applied by the commit stage in `stages/seal.ts`). The one non-advisory scope rule: a test file the run added or modified in an owner package (a Go directory, or a JS/TS package with its own package.json) where the change has no non-test change, the package has source files, and the task names neither the file nor the package, is reset to base (index and tree) before commit, with a NOT PROVEN line naming it. Source files, Python layouts, Go tests-only directories and test-only changes are never touched. On the tuning bench it fires on the 3 cross-package test scope fails and on 0 of 160 lean runs.
|
package/loki-ts/dist/cockpit.js
CHANGED
|
@@ -16,4 +16,4 @@ var BJ=Object.defineProperty;var HJ=(J)=>J;function FJ(J,Q){this[J]=HJ.bind(null
|
|
|
16
16
|
`),3}let K=WJ()-2,V=await zJ(G,{protocol:Q,forceText:Z,cols:K});if($)try{let{writeFileSync:q}=await import("fs");q($,V.svg)}catch{}if(V.kind==="image"&&V.data)return process.stdout.write(V.data),0;return process.stderr.write(`FALLBACK ${V.reason||"image unavailable"}
|
|
17
17
|
`),3}if(import.meta.main)eJ().then((J)=>process.exit(J));export{eJ as main};
|
|
18
18
|
|
|
19
|
-
//# debugId=
|
|
19
|
+
//# debugId=3EED06C3EBD19944C9E0D0E357793ED0
|