loki-mode 11.161.0 → 11.163.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/loki +24 -1
- package/autonomy/route.sh +12 -5
- package/bin/loki +1 -0
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/cost-controls.md +26 -2
- package/docs/dev/architecture-reference.md +2 -0
- package/docs/environment-variables.md +9 -1
- package/loki-ts/dist/loki.js +1970 -1952
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +378 -148
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-CuV3jwO8.js → AdminPage-Dc_e8C_g.js} +1 -1
- package/web-app/dist/assets/{Avatar-fwxJYmU0.js → Avatar-CtkU_V8o.js} +1 -1
- package/web-app/dist/assets/{Badge-C-16U-fv.js → Badge-10lwViZy.js} +1 -1
- package/web-app/dist/assets/{Button-DFjWZzwM.js → Button-D9wLMuKV.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-BMe0TFba.js → CockpitPage-B4P679NA.js} +1 -1
- package/web-app/dist/assets/{ComparePage-BGNs7d0W.js → ComparePage-CFvw6yC-.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-Dg4jYVbI.js → ErrorBoundary-B8b7m5zw.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-BPiK4shg.js → EvidenceReceiptPanel-BSveU6Uc.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-Bj73V3QA.js → GitHubIssuesPanel-CQgbdmxS.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BbmTPafH.js → GitHubPRsPanel-BulOGtWs.js} +1 -1
- package/web-app/dist/assets/{HomePage-_kzSwCXX.js → HomePage-C61Gquuw.js} +2 -2
- package/web-app/dist/assets/{LoginPage-D3guOsi2.js → LoginPage-CylrcuLY.js} +1 -1
- package/web-app/dist/assets/{MagicPage-SWoVP7OY.js → MagicPage-C4gLb8Be.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-BogKy2pu.js → MetricsPage-BhmaQzNp.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-CQiT_FXs.js → NotFoundPage-Bxex3oMK.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-CZ_hFP38.js → ProjectPage-BC2BHkRl.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-Bq-oT_Pe.js → ProjectsPage-CRddx1WM.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-DSr6lHmq.js → SettingsPage-DXStgGb0.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-Dqjj3rgJ.js → ShowcasePage-BsiVhy1_.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-scRs0fQ3.js → SystemSettingsPage-Cvc2Rv6L.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-BhLTiTJf.js → TeamsPage-DZ5qGheQ.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CfLqFEwD.js → TemplatesPage-DWGts6xb.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-LEdtHTdQ.js → TerminalOutput-D_yJifgE.js} +1 -1
- package/web-app/dist/assets/{activity-CIE6E4sw.js → activity-DBFtxB4p.js} +1 -1
- package/web-app/dist/assets/{bell-CbXNt0VT.js → bell-BQBgmaZT.js} +1 -1
- package/web-app/dist/assets/{bot-DBilu5by.js → bot-D85VQ4wc.js} +1 -1
- package/web-app/dist/assets/{check-ByCaYntD.js → check-CnDR2u8p.js} +1 -1
- package/web-app/dist/assets/{chevron-left-lmByeTlW.js → chevron-left-BTY-4Si9.js} +1 -1
- package/web-app/dist/assets/{circle-alert-DKEPsx9y.js → circle-alert-uZfharAW.js} +1 -1
- package/web-app/dist/assets/{clock-t4QPQ9P1.js → clock-Dgg4J30J.js} +1 -1
- package/web-app/dist/assets/{cloud-YfbBdG9Y.js → cloud-YR8Y1Mof.js} +1 -1
- package/web-app/dist/assets/{code-xml-DUdvGh42.js → code-xml-Bf-AzxR8.js} +1 -1
- package/web-app/dist/assets/{database-DMsUwuu7.js → database-CzNb9ch2.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-CQj8ulH4.js → dollar-sign-CkqzDdZe.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-Dcun8Ito.js → file-code-corner-B2lhA9eJ.js} +1 -1
- package/web-app/dist/assets/{file-plus-BipK8vSI.js → file-plus-A0KdDFJa.js} +1 -1
- package/web-app/dist/assets/{globe-0GE20vx4.js → globe-CdOgdSGt.js} +1 -1
- package/web-app/dist/assets/{hammer-BSCC-aCx.js → hammer-Ccos8dOi.js} +1 -1
- package/web-app/dist/assets/{index-uBPpPPl7.js → index-Cn-3Kqbn.js} +3 -3
- package/web-app/dist/assets/{layers-BT6Akh8A.js → layers-BOnmEKlQ.js} +1 -1
- package/web-app/dist/assets/{loader-circle-BSF5o6lv.js → loader-circle-DPrX5ziD.js} +1 -1
- package/web-app/dist/assets/{lock-DhvY9ErS.js → lock-BqFyS1O4.js} +1 -1
- package/web-app/dist/assets/{package-BMUewVpu.js → package-CGzYc35X.js} +1 -1
- package/web-app/dist/assets/{plus-JcYGK4QC.js → plus-DEj-ibGp.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-BSMX6sVQ.js → refresh-cw-B173UvaC.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-I5qSLfsL.js → rotate-ccw-DDS3YEAZ.js} +1 -1
- package/web-app/dist/assets/{scroll-text-DQ8wk3hX.js → scroll-text-zI5mkC8X.js} +1 -1
- package/web-app/dist/assets/{server-P6nlJ6_y.js → server-C6gc5oLW.js} +1 -1
- package/web-app/dist/assets/{shield-alert-DJXz2Y6G.js → shield-alert-g9_8A5VX.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-BlLS0TcM.js → thumbs-up-B5zNvs0q.js} +1 -1
- package/web-app/dist/assets/{trash-2-2-LU0vyX.js → trash-2-C_4D6pb9.js} +1 -1
- package/web-app/dist/assets/{trending-down-DBVjyJy7.js → trending-down-C187ygzx.js} +1 -1
- package/web-app/dist/assets/{trending-up-Dbz8-n-y.js → trending-up-Bdr0BHTs.js} +1 -1
- package/web-app/dist/assets/{upload-CbP9Qhau.js → upload-CFkle0ZZ.js} +1 -1
- package/web-app/dist/assets/{usePolling-Br1am1Wv.js → usePolling-CXnCA3Yj.js} +1 -1
- package/web-app/dist/assets/{user-B43gT1q9.js → user-BZ9wfmTQ.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.163.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.163.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.163.0
|
package/autonomy/loki
CHANGED
|
@@ -2553,7 +2553,7 @@ _loki_start_handoff() {
|
|
|
2553
2553
|
_loki_start_flag_kind() {
|
|
2554
2554
|
_LOKI_START_FLAG_KIND=""
|
|
2555
2555
|
case "${1%%=*}" in
|
|
2556
|
-
--provider|--brief|--budget|--cost|--prd|--issue|--isolation|--compliance|--max-duration|--log-level|--bmad-project|--openspec|--mirofish-rounds|--mirofish-timeout|--output|--config|--vars|--env-file|--remote|--attempts|--mirofish-docker) _LOKI_START_FLAG_KIND=value ;;
|
|
2556
|
+
--provider|--brief|--budget|--cost|--prd|--issue|--isolation|--compliance|--max-duration|--max-time|--log-level|--bmad-project|--openspec|--mirofish-rounds|--mirofish-timeout|--output|--config|--vars|--env-file|--remote|--attempts|--mirofish-docker) _LOKI_START_FLAG_KIND=value ;;
|
|
2557
2557
|
--mirofish) _LOKI_START_FLAG_KIND=optional ;;
|
|
2558
2558
|
--parallel|--allow-haiku|--haiku|--regen-prd|--regenerate-prd|--regen|--fresh-prd|--bg|--background|--simple|--complex|--github|--no-dashboard|--api|--sandbox|--skip-memory|--yes|-y|--quiet|--mirofish-bg|--no-mirofish|--no-plan|--fast|--repo-fast|--full|--repo-full|--dry-run|--no-start|--worktree|-w|--pr|--prepare-pr|--ship|--detach|-d|--help|-h|--resume|--) _LOKI_START_FLAG_KIND=bool ;;
|
|
2559
2559
|
*) return 1 ;;
|
|
@@ -2943,6 +2943,8 @@ cmd_start() {
|
|
|
2943
2943
|
echo " --quiet Suppress [INFO]/[STEP]; warnings and errors still print"
|
|
2944
2944
|
echo " --log-level LEVEL debug | info | warn | error (default: info)"
|
|
2945
2945
|
echo " --max-duration DUR Wall-clock cap: seconds, or 90m / 2h (default: none)"
|
|
2946
|
+
echo " --max-time DUR Outer time limit the run finishes inside, sealing what is done (LOKI_RUN_DEADLINE_S): seconds, or 90m / 2h."
|
|
2947
|
+
echo " Default: none. With no limit the run stops when it is done or makes no progress."
|
|
2946
2948
|
echo " --deploy After a start that exits 0, run the gated loki deploy --execute. Deploy flags:"
|
|
2947
2949
|
echo " --destination preview|staging|production, --canary, --domain HOST,"
|
|
2948
2950
|
echo " --env-file FILE (the deploy env file, not config, when --deploy is set),"
|
|
@@ -3175,6 +3177,27 @@ cmd_start() {
|
|
|
3175
3177
|
return 1
|
|
3176
3178
|
fi
|
|
3177
3179
|
;;
|
|
3180
|
+
# NO-DEFAULT-BUDGET: an opt-in outer time limit (LOKI_RUN_DEADLINE_S); same duration forms as --max-duration.
|
|
3181
|
+
--max-time)
|
|
3182
|
+
if [[ -n "${2:-}" ]]; then
|
|
3183
|
+
local _mt="$2" _mtn _mtmul=1
|
|
3184
|
+
case "$_mt" in
|
|
3185
|
+
*s) _mtn="${_mt%s}" ;;
|
|
3186
|
+
*m) _mtn="${_mt%m}"; _mtmul=60 ;;
|
|
3187
|
+
*h) _mtn="${_mt%h}"; _mtmul=3600 ;;
|
|
3188
|
+
*) _mtn="$_mt" ;;
|
|
3189
|
+
esac
|
|
3190
|
+
if ! [[ "$_mtn" =~ ^[0-9]+$ ]] || [ "$_mtn" -eq 0 ]; then
|
|
3191
|
+
echo "Error: --max-time must be a positive duration (e.g. 5400, 90m, 2h); got '$2'" >&2
|
|
3192
|
+
return 1
|
|
3193
|
+
fi
|
|
3194
|
+
export LOKI_RUN_DEADLINE_S=$(( _mtn * _mtmul ))
|
|
3195
|
+
shift 2
|
|
3196
|
+
else
|
|
3197
|
+
echo "Error: --max-time requires a value (e.g. 90m)" >&2
|
|
3198
|
+
return 1
|
|
3199
|
+
fi
|
|
3200
|
+
;;
|
|
3178
3201
|
# Verbosity. --quiet suppresses [INFO]/[STEP]; warnings and errors
|
|
3179
3202
|
# always print, so a quiet run can still say why it failed.
|
|
3180
3203
|
--quiet)
|
package/autonomy/route.sh
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# Bash 3.2 compatible (no associative arrays, no ${var,,}).
|
|
11
11
|
|
|
12
12
|
# Flags that take a separate value token.
|
|
13
|
-
_ROUTE_VALUE_FLAGS=" --provider --budget --budget-limit --max-cost --max-iterations --max-retries --session-model --completion-promise --base-wait --max-wait --prd --brief --attempts --spec --isolation --output --engine --mirofish-rounds --mirofish-timeout --max-duration --log-level --compliance --cost --remote --issue --bmad-project --openspec --mirofish-docker --destination --domain --env-file --health-url --health-match --workspace --config --vars --seal-existing --label "
|
|
13
|
+
_ROUTE_VALUE_FLAGS=" --provider --budget --budget-limit --max-cost --max-time --max-iterations --max-retries --session-model --completion-promise --base-wait --max-wait --prd --brief --attempts --spec --isolation --output --engine --mirofish-rounds --mirofish-timeout --max-duration --log-level --compliance --cost --remote --issue --bmad-project --openspec --mirofish-docker --destination --domain --env-file --health-url --health-match --workspace --config --vars --seal-existing --label "
|
|
14
14
|
# Flags whose value is optional (cmd_start reads one only when it is present): --mirofish takes a URL (a token that does not
|
|
15
15
|
# start with --, as _loki_start_optval_consumes). Declared here so a refused one still consumes its value. --parallel is NOT
|
|
16
16
|
# here: cmd_start treats it as a plain boolean (_loki_start_flag_kind), so "--parallel 3" leaves 3 as a positional.
|
|
@@ -157,10 +157,10 @@ loki_route_resolve() {
|
|
|
157
157
|
local verb="$1"; shift
|
|
158
158
|
R_DECIDED=0; R_E10=0; R_HARD=0; R_ENGINE=""; R_REASON=""; R_INPUT_TYPE=""; R_INPUT=""
|
|
159
159
|
R_PROVIDER=""; R_MODEL=""; R_NOTICE=""; R_ERR=""; R_EXPLAIN=0; R_JSON=0; R_SESSION_MODEL=""; R_VERB=""
|
|
160
|
-
R_FRONT=0; R_E10_ARGS=(); R_CLEAN=(); R_ADAPTER=""; R_CAPDIFF=(); R_E10_CAP_S=""; R_DRY=0; R_MAXCOST=""; R_PR_ARGS=()
|
|
160
|
+
R_FRONT=0; R_E10_ARGS=(); R_CLEAN=(); R_ADAPTER=""; R_CAPDIFF=(); R_E10_CAP_S=""; R_DEADLINE_S=""; R_DRY=0; R_MAXCOST=""; R_PR_ARGS=()
|
|
161
161
|
if [ "$verb" = "start" ] && _route_pr_mode "$@"; then return 0; fi
|
|
162
162
|
|
|
163
|
-
local a engine_req="" dry=0 help=0 front_flag="" legacy_flag="" session_model="" provider_flag="" max_duration="" cap_err="" input_flag=""
|
|
163
|
+
local a engine_req="" dry=0 help=0 front_flag="" legacy_flag="" session_model="" provider_flag="" max_duration="" max_time="" cap_err="" input_flag=""
|
|
164
164
|
local -a positionals=() passthru=()
|
|
165
165
|
local i=0 n=$#
|
|
166
166
|
local -a argv=("$@")
|
|
@@ -213,6 +213,12 @@ loki_route_resolve() {
|
|
|
213
213
|
cap_err="loki: --max-duration '$val' is not a duration (use seconds, or 90m / 2h)"
|
|
214
214
|
fi
|
|
215
215
|
continue ;;
|
|
216
|
+
--max-time) # NO-DEFAULT-BUDGET: an outer wall-clock limit the run finishes inside (LOKI_RUN_DEADLINE_S); no limit is set by default
|
|
217
|
+
max_time="$(_route_duration_s "$val")"
|
|
218
|
+
if [ -z "$max_time" ] && [ -z "$cap_err" ]; then
|
|
219
|
+
cap_err="loki: --max-time '$val' is not a duration (use seconds, or 90m / 2h)"
|
|
220
|
+
fi
|
|
221
|
+
continue ;;
|
|
216
222
|
esac
|
|
217
223
|
if _route_has "$_ROUTE_NOOP_FLAGS" "$name"; then continue; fi
|
|
218
224
|
if _route_has "$_ROUTE_E10_FLAGS" "$name"; then passthru+=("$name"); continue; fi
|
|
@@ -395,6 +401,7 @@ $(loki_removed_saved_provider_hint "$R_PROVIDER")"
|
|
|
395
401
|
R_NOTICE="loki: --max-duration $max_duration s is above the engine10 run-cap ceiling; using ${_ROUTE_CAP_CEILING_S}s."
|
|
396
402
|
fi
|
|
397
403
|
fi
|
|
404
|
+
if [ -n "$max_time" ] && [ "$engine_req" != "legacy" ]; then R_DEADLINE_S="$max_time"; fi
|
|
398
405
|
if [ -n "$provider_flag" ] && [ "$engine_req" != "legacy" ]; then
|
|
399
406
|
if ! validate_provider "$provider_flag"; then
|
|
400
407
|
R_ERR="loki: --provider $provider_flag has no Loki 10 engine invoker (use $(loki_supported_providers_joined " or "), or pass --engine legacy)"
|
|
@@ -521,7 +528,7 @@ loki_route_dispatch() {
|
|
|
521
528
|
if [ "$R_EXPLAIN" = "1" ]; then loki_route_print; return 7; fi
|
|
522
529
|
if [ "$R_DRY" = "1" ]; then
|
|
523
530
|
loki_route_print
|
|
524
|
-
printf 'max-cost: %s\nrun-cap: %
|
|
531
|
+
printf 'max-cost: %s\nrun-cap: %s\ndry-run: nothing was started\n' "${R_MAXCOST:-none (engine10 resolves loki.yaml and LOKI_BUDGET_LIMIT)}" "$(if [ -n "$R_E10_CAP_S" ]; then printf '%ss' "$R_E10_CAP_S"; elif [ -n "$R_DEADLINE_S" ]; then printf '%ss (--max-time)' "$R_DEADLINE_S"; else printf 'none (the run stops when it is done or makes no progress)'; fi)"
|
|
525
532
|
return 7
|
|
526
533
|
fi
|
|
527
534
|
if [ -n "$R_NOTICE" ]; then echo "$R_NOTICE" >&2; fi
|
|
@@ -549,5 +556,5 @@ _route_task_first() {
|
|
|
549
556
|
else
|
|
550
557
|
R_E10_ARGS=(--no-pr "$@")
|
|
551
558
|
fi
|
|
552
|
-
R_DECIDED=1; R_E10=1; R_HARD=0; R_ENGINE=engine10; R_VERB="$verb"; R_SESSION_MODEL=""; R_E10_CAP_S=""
|
|
559
|
+
R_DECIDED=1; R_E10=1; R_HARD=0; R_ENGINE=engine10; R_VERB="$verb"; R_SESSION_MODEL=""; R_E10_CAP_S=""; R_DEADLINE_S=""
|
|
553
560
|
}
|
package/bin/loki
CHANGED
|
@@ -793,6 +793,7 @@ if [ -f "$REPO_ROOT/autonomy/route.sh" ]; then
|
|
|
793
793
|
export LOKI_SESSION_MODEL="$R_SESSION_MODEL"
|
|
794
794
|
fi
|
|
795
795
|
if [ "$R_E10" = "1" ] && [ -n "${R_E10_CAP_S:-}" ]; then export LOKI_E10_CAP_S="$R_E10_CAP_S"; fi
|
|
796
|
+
if [ "$R_E10" = "1" ] && [ -n "${R_DEADLINE_S:-}" ]; then export LOKI_RUN_DEADLINE_S="$R_DEADLINE_S"; fi # --max-time
|
|
796
797
|
if [ "$R_ENGINE" = "verify-pr" ]; then
|
|
797
798
|
set -- verify-pr "${R_PR_ARGS[@]}"
|
|
798
799
|
elif [ "$R_E10" != "1" ]; then
|
package/dashboard/__init__.py
CHANGED
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.163.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 |
|
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.163.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
|
|
package/docs/cost-controls.md
CHANGED
|
@@ -35,6 +35,23 @@ while spending almost nothing and completing no iteration, so neither of those
|
|
|
35
35
|
breakers ever trips. The wall-clock cap is the one that catches it. We added it
|
|
36
36
|
after a run burned $34 reaching an external timeout.
|
|
37
37
|
|
|
38
|
+
## Time and progress (Loki 10 engine)
|
|
39
|
+
|
|
40
|
+
There is no default time limit. `--max-time 90m` (or `LOKI_RUN_DEADLINE_S`) sets an outer limit the run finishes
|
|
41
|
+
inside; `--max-duration`, `LOKI_E10_CAP_S` and `budgets.run_cap_s` set a run cap. With any of them the engine budgets
|
|
42
|
+
every stage as before. With none, the run stops on no progress:
|
|
43
|
+
|
|
44
|
+
| Guard | Ends | Default |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| No-progress rounds | fix rounds, proof re-runs, continues that do not improve on the best round | 2 in a row (`LOKI_E10_NO_PROGRESS_ROUNDS`) |
|
|
47
|
+
| Silent session | a session with no output and no tree change | 1800 s (`LOKI_E10_STALL_KILL_S`) |
|
|
48
|
+
| Looping session | a session that prints but changes nothing in the tree | 3600 s (`LOKI_E10_LOOP_KILL_S`) |
|
|
49
|
+
| Silent command | a test or check with no output | 1800 s (`LOKI_E10_CMD_SILENCE_S`) |
|
|
50
|
+
| Hung worker | no event and no running process | 1800 s (`LOKI_E10_HANG_SILENCE_S`) |
|
|
51
|
+
|
|
52
|
+
Each ends the run with commit, seal and a draft PR of what is done. `LOKI_E10_DEFAULT_BUDGETS=1` restores the old
|
|
53
|
+
default budgets.
|
|
54
|
+
|
|
38
55
|
## Budget contract
|
|
39
56
|
|
|
40
57
|
The per-run spend cap: its default, how it is chosen, what it covers, where it is
|
|
@@ -44,7 +61,14 @@ section must agree; tests pin them.
|
|
|
44
61
|
|
|
45
62
|
### Default
|
|
46
63
|
|
|
47
|
-
|
|
64
|
+
**Loki 10 engine (the default route): no default cap.** Since the no-default-budget change (founder, 2026-11-18), the
|
|
65
|
+
engine sets no dollar cap, with an API key or on a subscription, and no time, round, turn or test-count budget either. A
|
|
66
|
+
run ends when it is done or makes no progress (see "Time and progress" below), always with a draft PR of what is done.
|
|
67
|
+
An API-key run prints: "no cost limit is set: the run stops when it is done or makes no progress (--max-cost <usd> sets
|
|
68
|
+
one)". A limit you set (`--max-cost`, `LOKI_BUDGET_LIMIT`, `budgets.per_run`) is enforced exactly as before, and an
|
|
69
|
+
unusable value fails closed.
|
|
70
|
+
|
|
71
|
+
**Previous loop (`autonomy/run.sh`): 100 USD per run.**
|
|
48
72
|
|
|
49
73
|
The number lives in one file, `loki-ts/data/model-pricing.json`
|
|
50
74
|
(`default_max_cost_usd`). Both routes read it:
|
|
@@ -61,7 +85,7 @@ Where the default applies:
|
|
|
61
85
|
|
|
62
86
|
| Route | Default applies | What the cap does |
|
|
63
87
|
| --- | --- | --- |
|
|
64
|
-
| engine10 (`loki "<task>"`, the Loki 10 engine) |
|
|
88
|
+
| engine10 (`loki "<task>"`, the Loki 10 engine) | Never: no default dollar cap, with or without an API key. A cap you set stops starting stages and seals what exists. | Stops starting stages and seals what exists (see "What you keep at the cap"). |
|
|
65
89
|
| Bash loop (`loki start`, `autonomy/run.sh`) | Always, key or not. | Pauses the run (writes `.loki/PAUSE` and `.loki/signals/BUDGET_EXCEEDED`); remove both to resume. |
|
|
66
90
|
|
|
67
91
|
The README and the engine guide have shown different figures in the past (100 and
|
|
@@ -185,9 +185,11 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
|
|
|
185
185
|
- `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.
|
|
186
186
|
- `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.
|
|
187
187
|
- `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").
|
|
188
|
+
- `LOKI_E10_BASE_UNATTRIBUTED` -- on by default, `0` opts out (`loki-ts/src/runner/repo_profile.ts` redUnattributableOnBase, `loki-ts/src/engine10/stages/verify.ts` base_unattributed, `loki-ts/src/engine10/stages/seal.ts` unattributedRed). A full-suite check that is red on head and whose base run of the same command, on this base commit, was red too with the same exit code and no parseable failing id on either side is never excused, and it holds the label at PARTIAL instead of FAILED: Loki could not tell a failure the change caused from the ones already there. A kept failure line that names a changed file takes the check out. closed-set-2 pw43305 (11.158.0): six of six seeds that pass the hidden test were FAILED on this check alone; replayed on their stored receipts and base records (seal's verdictOf with fixed other arguments, not a live run) the verdict reads PARTIAL. Fire marker: `base_unattributed` in the verify output.
|
|
188
189
|
- `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.
|
|
189
190
|
- `LOKI_E10_SUITE_TIMEOUT_NOT_RUN` -- on by default, `0` opts out (`loki-ts/src/project_model/package_suite.ts` runPackageSuites and `loki-ts/src/engine10/stages/deep.ts` runFullSuite; `util/shell.ts` run reports `timedOut`). A full suite stopped by its timeout is not_run "timed out after N s" and runs in its own process group.
|
|
190
191
|
- `LOKI_E10_LINT_UNTOUCHED` -- off by default, `1` opts in (acc-174; off because it changed no label on 150 stored bench runs and has not fired on a real run; `loki-ts/src/engine10/stages/verify.ts` tscUntouchedOnly in runLintChecks, seal lists `lint_untouched`). A failed project-wide tsc whose every diagnostic is in an untouched, unnamed file, with no compiler or linter config changed, no changed symbol in the output, and every diagnostic line also in the same tsc run on the base snapshot (tscOnBase; no base output refuses), is not blocking and is disclosed on the receipt.
|
|
192
|
+
- `LOKI_E10_DEFAULT_BUDGETS` -- off by default (NO-DEFAULT-BUDGET, founder 2026-11-18; `loki-ts/src/engine10/types.ts` defaultBudgetsOn, budgetsOn, armTimer and the no-progress constants; `util/run_cap.ts` resolveRunCapS; consumers marked `NO-DEFAULT-BUDGET` in machine.ts, session.ts, supervisor.ts, worker_proc.ts, stages/verify.ts, stages/deep.ts, stages/implement.ts, util/conflict_resume.ts, util/shell.ts, util/check_result.ts). With no user time limit (LOKI_E10_CAP_S, budgets.run_cap_s, LOKI_RUN_DEADLINE_S or `--max-time`) the worker's capS is Infinity: no soft cap, stage limit, verify maximum, suite or check timeout, fix-round, proof, continue or turn count, Haiku session cap, 20-file dependents cap or backstop. Loops end after LOKI_E10_NO_PROGRESS_ROUNDS (2) rounds without progress; a session ends on 1800 s silence or 3600 s of output with no tree change; a command with no limit on 1800 s without output; the supervisor stops a worker with no event and no child process for 1800 s and seals. Never arm a timer with Infinity or more than 2^31-1 ms (Bun fires it after 1 ms): use armTimer. `1` restores every old default. A user time limit bounds the run through the cap alone: implement and verify are sized from the time left, and no Loki stage limit, verify maximum (900 s), round count or turn cap applies unless the user sets it (`--verify-max-time` / LOKI_E10_VERIFY_MAX_S). LIMIT-NOT-FAILED (`stages/seal.ts` unattributedRed): a verify Loki stopped at its limit or the cap seals PARTIAL on an unattributed pre-existing test failure, never FAILED. Not changed: intake baselines (300 s per command), the prove stage's internal 600 s, the NRD 120 s differential, the prove listing session's 3-turn cap, `--deep` (2700 s), `--verified` bounds, and the bash route's $100 default.
|
|
191
193
|
- `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.
|
|
192
194
|
- `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.
|
|
193
195
|
- `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.
|
|
@@ -23,7 +23,15 @@ with nowhere to look them up.
|
|
|
23
23
|
|---|---|---|
|
|
24
24
|
| `LOKI_PRD_FILE` | none | Path to a spec file, as an alternative to the positional argument. |
|
|
25
25
|
| `LOKI_MAX_ITERATIONS` | `1000` | Hard cap on iterations. Reaching it is a deterministic terminal failure, not a success. Also in `config schema`. |
|
|
26
|
-
| `LOKI_BUDGET_LIMIT` | `100.00`
|
|
26
|
+
| `LOKI_BUDGET_LIMIT` | `100.00` on the previous loop; none on the Loki 10 engine | Spend cap in USD. The previous loop (`autonomy/run.sh`) defaults to $100. The Loki 10 engine sets no dollar cap by default, with an API key or on a subscription; `--max-cost`, this variable or `budgets.per_run` sets one, and an unusable value fails closed. |
|
|
27
|
+
| `LOKI_RUN_DEADLINE_S` | unset (no limit) | Loki 10 engine: an outer wall-clock limit the run finishes inside, sealing what is done with a draft PR. `loki start --max-time 90m` sets it. |
|
|
28
|
+
| `LOKI_E10_DEFAULT_BUDGETS` | unset (off) | `1` restores the Loki 10 engine's old default budgets (900 s run cap sized up to 3600 s, stage limits, 2 fix rounds, 3 proof re-runs, 4 continues and $5 continue line, turn caps, the 20-file dependents cap). Without it, and with no user time limit, a run has no budget and ends when it is done or makes no progress. |
|
|
29
|
+
| `LOKI_E10_VERIFY_MAX_S` | unset (no maximum) | Time limit in seconds for one verify stage; `loki start --verify-max-time 20m` sets it. Without it verify is bounded only by a run time limit you set. |
|
|
30
|
+
| `LOKI_E10_NO_PROGRESS_ROUNDS` | `2` | With no budget: fix rounds, proof re-runs and continues end after this many rounds in a row without progress (fewer failing checks or unmet acceptance lines than the best round so far, a check that now ran, a plan file that now exists, or new outstanding work named). |
|
|
31
|
+
| `LOKI_E10_STALL_KILL_S` | `1800` with no time limit, else off | A session with no new output and no tree change for this many seconds is ended. |
|
|
32
|
+
| `LOKI_E10_LOOP_KILL_S` | `3600` | With no time limit: a session that keeps printing but changes nothing in the tree for this long is ended. |
|
|
33
|
+
| `LOKI_E10_CMD_SILENCE_S` | `1800` | A test or check command with no time limit is stopped after this long with no output, reported as not run. |
|
|
34
|
+
| `LOKI_E10_HANG_SILENCE_S` | `1800` | With no time limit: the supervisor stops a worker that sent no event and runs no process for this long, and seals what is done. |
|
|
27
35
|
| `LOKI_MAX_DURATION` | unset (no cap) | Wall-clock cap in seconds. Stops cleanly at the next iteration boundary with a `max_duration_reached` terminal status. `loki start --max-duration` also accepts `90m` / `2h`. |
|
|
28
36
|
| `LOKI_AUTO_CONFIRM` | unset | `true`/`false` to control prompts. Takes precedence over `CI`. |
|
|
29
37
|
| `LOKI_CONFIG_DUMP` | `0` | `1` prints the resolved configuration and exits **without starting a run or spending anything**. |
|