loki-mode 11.123.0 → 11.124.1
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/loki +72 -73
- package/autonomy/route.sh +17 -10
- package/bin/loki +31 -12
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/COMPARE-OPENCODE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/v10/GUIDE.md +17 -3
- package/loki-ts/data/child-env.json +0 -1
- package/loki-ts/dist/loki.js +1314 -1309
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +77 -38
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/providers/loader.sh +18 -3
- package/web-app/dist/assets/{AdminPage-D1Pq4MQi.js → AdminPage-C9YXclra.js} +1 -1
- package/web-app/dist/assets/{Avatar-A2BFZ8T8.js → Avatar-DcHwmo8Q.js} +1 -1
- package/web-app/dist/assets/{Badge-BeAiw5Sl.js → Badge-DFRrk7D-.js} +1 -1
- package/web-app/dist/assets/{Button-DprfqpF8.js → Button-y19VaxSR.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-C4h6TT-c.js → CockpitPage-DX3I-w5q.js} +1 -1
- package/web-app/dist/assets/{ComparePage-apBsndqK.js → ComparePage-CkBggRv7.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-B6mK7ggZ.js → ErrorBoundary-mLvOnCJ1.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-DNEXfKYK.js → EvidenceReceiptPanel-BkmkNppK.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-BHMnS0dv.js → GitHubIssuesPanel-Cs8rKLO7.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-Bg1hQTBZ.js → GitHubPRsPanel-FgKZAobV.js} +1 -1
- package/web-app/dist/assets/{HomePage-C0uIfnbC.js → HomePage-F_FNrAKj.js} +2 -2
- package/web-app/dist/assets/{LoginPage-C5W1PwxV.js → LoginPage-B-2bqmPh.js} +1 -1
- package/web-app/dist/assets/{MagicPage-B9v5J6kn.js → MagicPage-WPCVC2fy.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-TyFW2Mi7.js → MetricsPage-DYJ6MOpJ.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-fhomLjyo.js → NotFoundPage-CyrIHlCL.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-B7Q9_E7J.js → ProjectPage-BAmwg2sJ.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-BRlw-ztJ.js → ProjectsPage-COAKl6xX.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-DBS-DpXz.js → SettingsPage-rpHmbyL0.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-C609Y2vd.js → ShowcasePage-btQXeHy5.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-CpZ_F3Pz.js → SystemSettingsPage-RRwW7JCN.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-C8gdvyoH.js → TeamsPage-BiUdYmVH.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-JcmMFDss.js → TemplatesPage-BRh8dRWR.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-DeKTksvK.js → TerminalOutput-HXMsEbnh.js} +1 -1
- package/web-app/dist/assets/{activity-fohF0bEH.js → activity-CP62VCuF.js} +1 -1
- package/web-app/dist/assets/{bell-DXoB51yh.js → bell-D6tfe2Lc.js} +1 -1
- package/web-app/dist/assets/{bot-ozfD3tc3.js → bot-BcumQWsn.js} +1 -1
- package/web-app/dist/assets/{check-DJIvauO5.js → check-Dr3Y24yi.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DubgZZGE.js → chevron-left-DqxUiGVI.js} +1 -1
- package/web-app/dist/assets/{circle-alert-DVP3spwP.js → circle-alert-DItIPVXH.js} +1 -1
- package/web-app/dist/assets/{clock-D0y8bHsc.js → clock-DW0A6_om.js} +1 -1
- package/web-app/dist/assets/{cloud-AZw6GZdP.js → cloud-Dpg6r2M0.js} +1 -1
- package/web-app/dist/assets/{code-xml-lxx2SVRo.js → code-xml-CRCM56ot.js} +1 -1
- package/web-app/dist/assets/{database-DSHk51Pu.js → database-DrakaR5y.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-jBZCz460.js → dollar-sign-Bx88-uC1.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-HGtDqBI1.js → file-code-corner-u54f6D1m.js} +1 -1
- package/web-app/dist/assets/{file-plus-L3tAznio.js → file-plus-BoUK6DIP.js} +1 -1
- package/web-app/dist/assets/{globe-f50xCoGa.js → globe-CxjteMVu.js} +1 -1
- package/web-app/dist/assets/{hammer-Btdop6UY.js → hammer-DfPVK8V-.js} +1 -1
- package/web-app/dist/assets/{index-alvwtVBH.js → index-PdsIYs8D.js} +3 -3
- package/web-app/dist/assets/{layers-WZi-3fiX.js → layers-BkC-tIBJ.js} +1 -1
- package/web-app/dist/assets/{loader-circle-B13s_pbT.js → loader-circle-ZFbmGHbG.js} +1 -1
- package/web-app/dist/assets/{lock-DPzrJtGd.js → lock-DCPTgRju.js} +1 -1
- package/web-app/dist/assets/{package-q3dYbP9u.js → package-CQiO2qzH.js} +1 -1
- package/web-app/dist/assets/{plus-nLd8kLVM.js → plus-CnOfFWUF.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-T4m4o3p9.js → refresh-cw-odLkbX4s.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-BsPRTRVr.js → rotate-ccw-BwYmXJvd.js} +1 -1
- package/web-app/dist/assets/{scroll-text-BKYY62-4.js → scroll-text--pDgaJgE.js} +1 -1
- package/web-app/dist/assets/{server-WY0czRua.js → server-CD4f5Vze.js} +1 -1
- package/web-app/dist/assets/{shield-alert-JFzWB4HO.js → shield-alert-CcQwHRj8.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DY-6b3kG.js → thumbs-up-Dlt9cYEo.js} +1 -1
- package/web-app/dist/assets/{trash-2-Rij5mMzF.js → trash-2-xnhro-Jd.js} +1 -1
- package/web-app/dist/assets/{trending-down-BwEIkU-x.js → trending-down-UmLy_Cck.js} +1 -1
- package/web-app/dist/assets/{trending-up-Coe2CO4y.js → trending-up-ahzpV7N6.js} +1 -1
- package/web-app/dist/assets/{upload-CPuWWzzF.js → upload-BMRTmfO-.js} +1 -1
- package/web-app/dist/assets/{usePolling-Ce5XHOw4.js → usePolling-VSt8R-0Q.js} +1 -1
- package/web-app/dist/assets/{user-D1q10hes.js → user-C72PyQtn.js} +1 -1
- package/web-app/dist/index.html +1 -1
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)
|
|
|
99
99
|
|
|
100
100
|
| Command | What it does |
|
|
101
101
|
|---------|--------------|
|
|
102
|
-
| `loki start "<task>"` | The command you run: same provider model as a raw session, then the harness re-runs the checks and seals a receipt (`--no-pr`, `--provider`, `--max-cost`, `--haiku` to
|
|
102
|
+
| `loki start "<task>"` | The command you run: same provider model as a raw session, then the harness re-runs the checks and seals a receipt (`--no-pr`, `--provider`, `--max-cost`, `--haiku` to run implement and fix on Haiku, climbing to Sonnet on a failed check). `loki "<task>"` and `loki owner/repo#N` are shorthand. No task and no git repo shows a receipt and spends nothing |
|
|
103
103
|
| `loki edit "<change>"` | One targeted change in one pass, no PR, plan or council (`--verify`, `--receipt`, `--commit`, `--dry-run`) |
|
|
104
104
|
| `loki quick "<task>"` | One small task with a verify loop, no PR |
|
|
105
105
|
| `loki chat` | Interactive alternative: Plan and Build modes, slash commands, `/run` starts a `loki start` run, `--attach` joins one |
|
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.124.1
|
|
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.124.1 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.124.1
|
package/autonomy/loki
CHANGED
|
@@ -1937,7 +1937,7 @@ show_help_all() {
|
|
|
1937
1937
|
echo " --no-dashboard Disable web dashboard"
|
|
1938
1938
|
echo " --isolation LVL Per-run isolation dial: none (default) | worktree | docker"
|
|
1939
1939
|
echo " --skip-memory Skip loading memory context at startup"
|
|
1940
|
-
echo " --cost PROFILE Opt-in cost profile: lean sets
|
|
1940
|
+
echo " --cost PROFILE Opt-in cost profile: lean sets LOKI_ROUTER=auto, LOKI_E10_TRIM=1, LOKI_E10_SMALL_NO_RUNNER=1 and LOKI_E10_SMALL_MAX_CHARS=1200 unless already set (also LOKI_COST_PROFILE)"
|
|
1941
1941
|
echo " --spec FILE Run against an edited spec (written by 'loki plan <task> --spec'; see also --spec-first)"
|
|
1942
1942
|
echo " --fresh-prd Regenerate the PRD from the codebase (no-PRD runs; ignores the reusable generated PRD)"
|
|
1943
1943
|
echo " --compliance PRESET Enable compliance mode (default|healthcare|fintech|government)"
|
|
@@ -2660,9 +2660,15 @@ _loki_e10_resume_map() {
|
|
|
2660
2660
|
|
|
2661
2661
|
# TEN-COST-01 lean levers (the bash twin of COST_PROFILES.lean in loki-ts/src/util/cost_profile.ts).
|
|
2662
2662
|
# Fills only unset variables, so explicit env wins. Shared by --cost lean and --haiku.
|
|
2663
|
+
# $1 names the flag for the one line printed when an explicit LOKI_ROUTER wins.
|
|
2663
2664
|
loki_lean_levers() {
|
|
2664
|
-
|
|
2665
|
-
|
|
2665
|
+
case "${LOKI_ROUTER:-auto}" in
|
|
2666
|
+
auto|AUTO|Auto) ;;
|
|
2667
|
+
*) [ -n "${_LOKI_ROUTER_KEPT_NOTED:-}" ] || echo "${1:---cost lean}: LOKI_ROUTER=${LOKI_ROUTER} is already set and wins; the auto preset is not applied" >&2
|
|
2668
|
+
_LOKI_ROUTER_KEPT_NOTED=1 ;;
|
|
2669
|
+
esac
|
|
2670
|
+
: "${LOKI_ROUTER:=auto}" "${LOKI_E10_TRIM:=1}" "${LOKI_E10_SMALL_NO_RUNNER:=1}" "${LOKI_E10_SMALL_MAX_CHARS:=1200}"
|
|
2671
|
+
export LOKI_ROUTER LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS
|
|
2666
2672
|
}
|
|
2667
2673
|
|
|
2668
2674
|
# --haiku opt-in: the lean levers plus LOKI_COST_FIRST=1. Does not change the
|
|
@@ -2672,7 +2678,7 @@ loki_apply_haiku_optin() {
|
|
|
2672
2678
|
local _a
|
|
2673
2679
|
for _a in "$@"; do
|
|
2674
2680
|
[ "$_a" = "--haiku" ] || continue
|
|
2675
|
-
loki_lean_levers
|
|
2681
|
+
loki_lean_levers --haiku
|
|
2676
2682
|
: "${LOKI_COST_FIRST:=1}"
|
|
2677
2683
|
export LOKI_COST_FIRST
|
|
2678
2684
|
return 0
|
|
@@ -2990,8 +2996,8 @@ cmd_start() {
|
|
|
2990
2996
|
echo " --regenerate-prd, --regen, or LOKI_PRD_REGEN=1)"
|
|
2991
2997
|
echo " --compliance PRESET Enable compliance mode (default|healthcare|fintech|government)"
|
|
2992
2998
|
echo " --budget USD Per-run cost cap (default $(loki_budget_default_usd); auto-pause when exceeded)"
|
|
2993
|
-
echo " --cost PROFILE Opt-in cost profile: lean (
|
|
2994
|
-
echo " --haiku Opt in to
|
|
2999
|
+
echo " --cost PROFILE Opt-in cost profile: lean (LOKI_ROUTER=auto, LOKI_E10_TRIM=1, LOKI_E10_SMALL_NO_RUNNER=1, LOKI_E10_SMALL_MAX_CHARS=1200 unless already set) or off"
|
|
3000
|
+
echo " --haiku Opt in to Haiku for implement and fix (LOKI_ROUTER=auto, the --cost lean levers, plus LOKI_COST_FIRST=1). A failed check climbs to Sonnet, then Opus. An explicit LOKI_ROUTER wins. Default is the provider model"
|
|
2995
3001
|
echo " Proof Default LOKI_MUTATION_STRICT=1 and LOKI_E10_TRIM=1. A behavior change is VERIFIED only when a Wall test fails on the old code. Tool logs are trimmed before the next turn; a command's tail is kept. Opt out: LOKI_MUTATION_STRICT=0, LOKI_E10_TRIM=0"
|
|
2996
3002
|
echo " --bmad-project PATH Use BMAD Method project artifacts as input"
|
|
2997
3003
|
echo " --openspec PATH Use OpenSpec change directory as input"
|
|
@@ -3432,9 +3438,9 @@ cmd_start() {
|
|
|
3432
3438
|
--cost|--cost=*)
|
|
3433
3439
|
if [[ "$1" == --cost=* ]]; then _cost_val="${1#*=}"; _cost_n=1; else _cost_val="${2:-}"; _cost_n=2; fi
|
|
3434
3440
|
case "$_cost_val" in
|
|
3435
|
-
lean) loki_lean_levers
|
|
3441
|
+
lean) loki_lean_levers "--cost lean"
|
|
3436
3442
|
export LOKI_COST_PROFILE=lean
|
|
3437
|
-
echo "cost profile lean:
|
|
3443
|
+
echo "cost profile lean: LOKI_ROUTER=$LOKI_ROUTER LOKI_E10_TRIM=$LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER=$LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS=$LOKI_E10_SMALL_MAX_CHARS" ;;
|
|
3438
3444
|
off) ;;
|
|
3439
3445
|
*) echo -e "${RED}--cost must be lean or off${NC}" >&2; exit 2 ;;
|
|
3440
3446
|
esac
|
|
@@ -3638,8 +3644,7 @@ cmd_start() {
|
|
|
3638
3644
|
local _pf_p
|
|
3639
3645
|
# Single source: SUPPORTED_PROVIDERS in providers/loader.sh.
|
|
3640
3646
|
local _pf_known
|
|
3641
|
-
_pf_known="$(
|
|
3642
|
-
[ -n "$_pf_known" ] || _pf_known="claude opencode"
|
|
3647
|
+
_pf_known="$(loki_supported_providers_joined " ")"
|
|
3643
3648
|
case " $_pf_known " in
|
|
3644
3649
|
*" $_pf_explicit "*) ;;
|
|
3645
3650
|
*)
|
|
@@ -3667,7 +3672,7 @@ cmd_start() {
|
|
|
3667
3672
|
echo "Re-run with one of those, e.g. loki start --provider ${_pf_installed%% *}" >&2
|
|
3668
3673
|
else
|
|
3669
3674
|
echo "No supported provider CLI is installed on this machine." >&2
|
|
3670
|
-
echo "Supported providers:
|
|
3675
|
+
echo "Supported providers: $(loki_supported_providers_joined)" >&2
|
|
3671
3676
|
fi
|
|
3672
3677
|
echo "" >&2
|
|
3673
3678
|
echo "Loki will not silently run a different provider than the one you asked for." >&2
|
|
@@ -4338,17 +4343,17 @@ cmd_start() {
|
|
|
4338
4343
|
# with bogus state for 24h. Also write current PID alongside so the reader
|
|
4339
4344
|
# can drop the marker when the originating process is no longer alive
|
|
4340
4345
|
# (SIGKILL / crash paths that skip our cleanup hooks).
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4346
|
+
if [ -z "$provider" ]; then
|
|
4347
|
+
: # no --provider passed
|
|
4348
|
+
elif validate_provider "$provider"; then
|
|
4349
|
+
mkdir -p "$LOKI_DIR/state" 2>/dev/null || true
|
|
4350
|
+
printf '%s:%s:%s\n' "$provider" "$(date +%s)" "$$" \
|
|
4351
|
+
> "$LOKI_DIR/state/.cli-provider.tmp" 2>/dev/null \
|
|
4352
|
+
&& mv "$LOKI_DIR/state/.cli-provider.tmp" \
|
|
4353
|
+
"$LOKI_DIR/state/cli-provider" 2>/dev/null || true
|
|
4354
|
+
else
|
|
4355
|
+
log_warn "UT2-13: skipped cli-provider marker (unknown provider '$provider')"
|
|
4356
|
+
fi
|
|
4352
4357
|
|
|
4353
4358
|
# Emit learning signal: user preference for provider selection (SYN-018)
|
|
4354
4359
|
if [ -n "$provider" ]; then
|
|
@@ -6900,7 +6905,7 @@ cmd_status() {
|
|
|
6900
6905
|
;;
|
|
6901
6906
|
esac
|
|
6902
6907
|
echo -e "${CYAN}Provider:${NC} $current_provider ($capability)"
|
|
6903
|
-
echo -e "${DIM} Switch with: loki provider set
|
|
6908
|
+
echo -e "${DIM} Switch with: loki provider set <$(loki_supported_providers_joined "|")>${NC}"
|
|
6904
6909
|
echo ""
|
|
6905
6910
|
|
|
6906
6911
|
# Show running sessions (v6.4.0 - concurrent session support)
|
|
@@ -7801,6 +7806,12 @@ cmd_provider_show() {
|
|
|
7801
7806
|
fi
|
|
7802
7807
|
|
|
7803
7808
|
local current="${positional_arg:-${saved_provider:-${LOKI_PROVIDER:-claude}}}"
|
|
7809
|
+
# A removed provider saved in .loki/state/provider: the migration line and how to clear it, as `loki start` says.
|
|
7810
|
+
if [ -z "$positional_arg" ] && [ "$current" = "$saved_provider" ] && loki_is_removed_provider "$saved_provider"; then
|
|
7811
|
+
loki_removed_provider_message "$saved_provider" >&2
|
|
7812
|
+
loki_removed_saved_provider_hint "$saved_provider" >&2
|
|
7813
|
+
exit 2
|
|
7814
|
+
fi
|
|
7804
7815
|
|
|
7805
7816
|
echo -e "${BOLD}Current Provider${NC}"
|
|
7806
7817
|
echo ""
|
|
@@ -7832,7 +7843,7 @@ cmd_provider_set() {
|
|
|
7832
7843
|
|
|
7833
7844
|
if [ -z "$new_provider" ]; then
|
|
7834
7845
|
echo -e "${RED}Error: Provider name required${NC}"
|
|
7835
|
-
echo "Usage: loki provider set
|
|
7846
|
+
echo "Usage: loki provider set <$(loki_supported_providers_joined "|")>"
|
|
7836
7847
|
exit 2
|
|
7837
7848
|
fi
|
|
7838
7849
|
|
|
@@ -7842,15 +7853,11 @@ cmd_provider_set() {
|
|
|
7842
7853
|
loki_removed_provider_message "$new_provider" >&2
|
|
7843
7854
|
exit 2
|
|
7844
7855
|
fi
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
echo "Valid providers: claude, opencode"
|
|
7851
|
-
exit 1
|
|
7852
|
-
;;
|
|
7853
|
-
esac
|
|
7856
|
+
if ! validate_provider "$new_provider"; then
|
|
7857
|
+
echo -e "${RED}Error: Invalid provider '$new_provider'${NC}"
|
|
7858
|
+
echo "Valid providers: $(loki_supported_providers_joined)"
|
|
7859
|
+
exit 1
|
|
7860
|
+
fi
|
|
7854
7861
|
|
|
7855
7862
|
# Check if CLI is installed
|
|
7856
7863
|
if ! command -v "$new_provider" &> /dev/null; then
|
|
@@ -12376,15 +12383,13 @@ cmd_run() {
|
|
|
12376
12383
|
# UT2-13: Record CLI provider at parse time (atomic write).
|
|
12377
12384
|
# v7.7.11 (council fix): validate against canonical set; include
|
|
12378
12385
|
# PID so reader can drop the marker when originating process is gone.
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
;;
|
|
12387
|
-
esac
|
|
12386
|
+
if validate_provider "$2"; then
|
|
12387
|
+
mkdir -p "${LOKI_DIR:-.loki}/state" 2>/dev/null || true
|
|
12388
|
+
printf '%s:%s:%s\n' "$2" "$(date +%s)" "$$" \
|
|
12389
|
+
> "${LOKI_DIR:-.loki}/state/.cli-provider.tmp" 2>/dev/null \
|
|
12390
|
+
&& mv "${LOKI_DIR:-.loki}/state/.cli-provider.tmp" \
|
|
12391
|
+
"${LOKI_DIR:-.loki}/state/cli-provider" 2>/dev/null || true
|
|
12392
|
+
fi
|
|
12388
12393
|
shift 2
|
|
12389
12394
|
else
|
|
12390
12395
|
echo -e "${RED}--provider requires a value${NC}"
|
|
@@ -12396,15 +12401,13 @@ cmd_run() {
|
|
|
12396
12401
|
start_args+=("--provider" "$provider_override")
|
|
12397
12402
|
# UT2-13: Record CLI provider at parse time (atomic write).
|
|
12398
12403
|
# v7.7.11 (council fix): validate + include PID.
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
;;
|
|
12407
|
-
esac
|
|
12404
|
+
if validate_provider "$provider_override"; then
|
|
12405
|
+
mkdir -p "${LOKI_DIR:-.loki}/state" 2>/dev/null || true
|
|
12406
|
+
printf '%s:%s:%s\n' "$provider_override" "$(date +%s)" "$$" \
|
|
12407
|
+
> "${LOKI_DIR:-.loki}/state/.cli-provider.tmp" 2>/dev/null \
|
|
12408
|
+
&& mv "${LOKI_DIR:-.loki}/state/.cli-provider.tmp" \
|
|
12409
|
+
"${LOKI_DIR:-.loki}/state/cli-provider" 2>/dev/null || true
|
|
12410
|
+
fi
|
|
12408
12411
|
shift
|
|
12409
12412
|
;;
|
|
12410
12413
|
--parallel|--bg|--background|--simple|--complex|--no-dashboard|--sandbox|--no-plan)
|
|
@@ -14488,7 +14491,7 @@ cmd_config() {
|
|
|
14488
14491
|
echo " model.planning Model for planning tier"
|
|
14489
14492
|
echo " model.development Model for development tier"
|
|
14490
14493
|
echo " model.fast Model for fast tier"
|
|
14491
|
-
echo " provider Default AI provider:
|
|
14494
|
+
echo " provider Default AI provider: $(loki_supported_providers_joined)"
|
|
14492
14495
|
echo " issue.provider Default issue provider: github, gitlab, jira, azure_devops"
|
|
14493
14496
|
echo " blind_validation Blind validation mode: true, false (default: true)"
|
|
14494
14497
|
echo " adversarial_testing Adversarial testing: true, false (default: true)"
|
|
@@ -14552,10 +14555,9 @@ cmd_config_set() {
|
|
|
14552
14555
|
;;
|
|
14553
14556
|
provider)
|
|
14554
14557
|
if loki_is_removed_provider "$value"; then loki_removed_provider_message "$value" >&2; return 2; fi
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
esac
|
|
14558
|
+
if ! validate_provider "$value"; then
|
|
14559
|
+
echo -e "${RED}Invalid provider: $value (expected: $(loki_supported_providers_joined))${NC}"; return 1
|
|
14560
|
+
fi
|
|
14559
14561
|
;;
|
|
14560
14562
|
issue.provider)
|
|
14561
14563
|
case "$value" in
|
|
@@ -17040,10 +17042,9 @@ cmd_wow() {
|
|
|
17040
17042
|
fi
|
|
17041
17043
|
|
|
17042
17044
|
local use_provider="${provider:-${LOKI_PROVIDER:-claude}}"
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
|
|
17046
|
-
esac
|
|
17045
|
+
if ! validate_provider "$use_provider"; then
|
|
17046
|
+
echo "loki wow: unknown provider '$use_provider' (use $(loki_supported_providers_joined " or "))" >&2; return 2
|
|
17047
|
+
fi
|
|
17047
17048
|
if ! wow_provider_ready "$use_provider"; then
|
|
17048
17049
|
if [ "$dry_run" = true ]; then
|
|
17049
17050
|
echo "loki wow: no provider ready for '$use_provider'. A real run would show the offline sample."
|
|
@@ -17137,8 +17138,8 @@ cmd_factory() {
|
|
|
17137
17138
|
echo "When the contract cannot be satisfied the run stops with one question (BLOCKED)."
|
|
17138
17139
|
echo "The summary still prints outcome, receipt, cost and the next command."
|
|
17139
17140
|
echo ""
|
|
17140
|
-
echo "loki start keeps the provider model. Pass --haiku (or --cost lean) to
|
|
17141
|
-
echo "
|
|
17141
|
+
echo "loki start keeps the provider model. Pass --haiku (or --cost lean) to run implement and"
|
|
17142
|
+
echo "fix on Haiku (LOKI_ROUTER=auto); a failed check climbs to Sonnet. --max-cost stays the hard cap."
|
|
17142
17143
|
return 0
|
|
17143
17144
|
fi
|
|
17144
17145
|
exec "$SKILL_DIR/bin/loki" start "$@"
|
|
@@ -18621,7 +18622,7 @@ ENDGITIGNORE
|
|
|
18621
18622
|
# opencode here made `loki provider list` under-report a provider the
|
|
18622
18623
|
# runner will happily select -- the same drift that blocked
|
|
18623
18624
|
# opencode-only machines entirely until v8.76.0.
|
|
18624
|
-
for _pcli in
|
|
18625
|
+
for _pcli in "${SUPPORTED_PROVIDERS[@]}"; do
|
|
18625
18626
|
if command -v "$_pcli" &>/dev/null; then
|
|
18626
18627
|
_has_provider=true
|
|
18627
18628
|
break
|
|
@@ -19623,7 +19624,7 @@ except Exception: pass
|
|
|
19623
19624
|
(cd "$codebase_path" && source "$_LOKI_SCRIPT_DIR/../providers/opencode.sh" && provider_invoke "$phase_prompt" 2>&1) || phase_exit=$?
|
|
19624
19625
|
;;
|
|
19625
19626
|
*)
|
|
19626
|
-
echo -e "${RED}Error: Unknown provider '${provider_name}'. Supported:
|
|
19627
|
+
echo -e "${RED}Error: Unknown provider '${provider_name}'. Supported: $(loki_supported_providers_joined)${NC}"
|
|
19627
19628
|
phase_exit=1
|
|
19628
19629
|
;;
|
|
19629
19630
|
esac
|
|
@@ -20848,7 +20849,7 @@ except Exception: pass
|
|
|
20848
20849
|
# BUG-HEAL-003: Unknown provider should error, not silently succeed
|
|
20849
20850
|
*)
|
|
20850
20851
|
echo -e "${RED}Error: Unknown provider: $provider${NC}"
|
|
20851
|
-
echo "Supported providers:
|
|
20852
|
+
echo "Supported providers: $(loki_supported_providers_joined)"
|
|
20852
20853
|
return 1
|
|
20853
20854
|
;;
|
|
20854
20855
|
esac
|
|
@@ -21685,10 +21686,9 @@ with open(failover_file, 'w') as f: json.dump(d, f, indent=2)
|
|
|
21685
21686
|
# Validate each provider in chain
|
|
21686
21687
|
local IFS=','
|
|
21687
21688
|
for p in $new_chain; do
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
esac
|
|
21689
|
+
if ! validate_provider "$p"; then
|
|
21690
|
+
echo -e "${RED}Error: invalid provider '$p' in chain${NC}"; return 1
|
|
21691
|
+
fi
|
|
21692
21692
|
done
|
|
21693
21693
|
unset IFS
|
|
21694
21694
|
|
|
@@ -22984,10 +22984,9 @@ cmd_try() {
|
|
|
22984
22984
|
return 2
|
|
22985
22985
|
fi
|
|
22986
22986
|
local use_provider="${provider:-${LOKI_PROVIDER:-claude}}"
|
|
22987
|
-
|
|
22988
|
-
|
|
22989
|
-
|
|
22990
|
-
esac
|
|
22987
|
+
if ! validate_provider "$use_provider"; then
|
|
22988
|
+
echo "loki try: unknown provider '$use_provider' (use $(loki_supported_providers_joined " or "))" >&2; return 2
|
|
22989
|
+
fi
|
|
22991
22990
|
if [ "$dry_run" != true ] && ! wow_provider_ready "$use_provider"; then
|
|
22992
22991
|
try_print_provider_setup "$use_provider" >&2
|
|
22993
22992
|
return 2
|
package/autonomy/route.sh
CHANGED
|
@@ -312,6 +312,16 @@ loki_route_resolve() {
|
|
|
312
312
|
|
|
313
313
|
# Provider and model (display only; engine10 resolves its own at run time).
|
|
314
314
|
R_PROVIDER="$(_route_provider "$provider_flag")"
|
|
315
|
+
# A removed provider gets the one migration line on every engine. bin/loki already refused one from
|
|
316
|
+
# --provider or LOKI_PROVIDER, so a removed name here is the project's saved choice: add how to clear it.
|
|
317
|
+
if loki_is_removed_provider "$R_PROVIDER"; then
|
|
318
|
+
R_ERR="$(loki_removed_provider_message "$R_PROVIDER")"
|
|
319
|
+
if [ -z "$provider_flag" ] && [ -z "${LOKI_PROVIDER:-}" ]; then
|
|
320
|
+
R_ERR="$R_ERR
|
|
321
|
+
$(loki_removed_saved_provider_hint "$R_PROVIDER")"
|
|
322
|
+
fi
|
|
323
|
+
return 0
|
|
324
|
+
fi
|
|
315
325
|
if [ -n "$session_model" ]; then
|
|
316
326
|
R_MODEL="$session_model"
|
|
317
327
|
elif [ -n "${LOKI_SESSION_MODEL:-}" ]; then
|
|
@@ -377,12 +387,10 @@ loki_route_resolve() {
|
|
|
377
387
|
fi
|
|
378
388
|
fi
|
|
379
389
|
if [ -n "$provider_flag" ] && [ "$engine_req" != "legacy" ]; then
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
return 0 ;;
|
|
385
|
-
esac
|
|
390
|
+
if ! validate_provider "$provider_flag"; then
|
|
391
|
+
R_ERR="loki: --provider $provider_flag has no Loki 10 engine invoker (use $(loki_supported_providers_joined " or "), or pass --engine legacy)"
|
|
392
|
+
return 0
|
|
393
|
+
fi
|
|
386
394
|
fi
|
|
387
395
|
# --dry-run (engine10 has no preview of its own for these inputs): print the route, then exit 0 without a run.
|
|
388
396
|
if [ "$dry" = "1" ] && [ "$engine_req" != "legacy" ]; then R_DRY=1; fi
|
|
@@ -395,10 +403,9 @@ loki_route_resolve() {
|
|
|
395
403
|
R_ENGINE=engine10; R_E10=1; R_HARD=1; R_REASON="explicit: --engine engine10"
|
|
396
404
|
else
|
|
397
405
|
# L009: a provider with no engine10 invoker is refused, never sent to the legacy loop.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
esac
|
|
406
|
+
if ! validate_provider "$R_PROVIDER"; then
|
|
407
|
+
R_ERR="loki: provider $R_PROVIDER is not supported; use one of: $(loki_supported_providers_joined)"; return 0
|
|
408
|
+
fi
|
|
402
409
|
if [ "${sz:-0}" -gt "$_ROUTE_PRD_MAX" ] && _route_sdk_claude "$R_PROVIDER"; then
|
|
403
410
|
R_ERR="loki: this PRD is ${sz} bytes, over the ${_ROUTE_PRD_MAX}-byte limit of the Loki 10 engine, and the legacy engine has no Agent SDK path; trim the PRD below 100 KB, or unset LOKI_SDK_MODE, LOKI_SDK and LOKI_SDK_LOOP to run the legacy engine on a provider CLI"
|
|
404
411
|
return 0
|
package/bin/loki
CHANGED
|
@@ -325,21 +325,42 @@ if [ "$_cf_has" = "1" ]; then
|
|
|
325
325
|
fi
|
|
326
326
|
unset _cf_has _cf_out _cf_a
|
|
327
327
|
|
|
328
|
-
#
|
|
328
|
+
# LOKI_IMPLEMENT_HAIKU_FIRST was removed: a set value maps to LOKI_ROUTER=auto
|
|
329
|
+
# when LOKI_ROUTER is unset, then is cleared. bin/loki is the only entry that
|
|
330
|
+
# reads it; neither engine looks at it.
|
|
331
|
+
case "${LOKI_IMPLEMENT_HAIKU_FIRST:-}" in
|
|
332
|
+
""|0|false|FALSE) ;;
|
|
333
|
+
*)
|
|
334
|
+
if [ -n "${LOKI_ROUTER:-}" ]; then
|
|
335
|
+
_hf_why="LOKI_ROUTER=${LOKI_ROUTER} is already set and wins."
|
|
336
|
+
else
|
|
337
|
+
export LOKI_ROUTER=auto
|
|
338
|
+
_hf_why="Mapped to LOKI_ROUTER=auto (Haiku executes implement and fix)."
|
|
339
|
+
fi
|
|
340
|
+
echo "Note: 'LOKI_IMPLEMENT_HAIKU_FIRST' is deprecated and has no effect of its own since the router auto preset. ${_hf_why} Accepted for back-compat only." >&2
|
|
341
|
+
unset LOKI_IMPLEMENT_HAIKU_FIRST _hf_why
|
|
342
|
+
;;
|
|
343
|
+
esac
|
|
344
|
+
|
|
345
|
+
# --haiku opts implement and fix onto haiku (LOKI_ROUTER=auto plus the lean levers).
|
|
329
346
|
# The default model stays the provider default, the same one a raw claude
|
|
330
|
-
# session uses. A failed check
|
|
347
|
+
# session uses. A failed check climbs to sonnet (the router ladder, runner/router/unit_model.ts).
|
|
331
348
|
# Explicit env wins. Stripped so neither engine treats it as an unknown flag.
|
|
332
349
|
_hk_has=0
|
|
333
350
|
for _hk_a in "$@"; do
|
|
334
351
|
case "$_hk_a" in --haiku) _hk_has=1 ;; esac
|
|
335
352
|
done
|
|
336
353
|
if [ "$_hk_has" = "1" ]; then
|
|
337
|
-
|
|
354
|
+
case "${LOKI_ROUTER:-auto}" in
|
|
355
|
+
auto|AUTO|Auto) ;;
|
|
356
|
+
*) echo "--haiku: LOKI_ROUTER=${LOKI_ROUTER} is already set and wins; the auto preset is not applied" >&2 ;;
|
|
357
|
+
esac
|
|
358
|
+
: "${LOKI_ROUTER:=auto}"
|
|
338
359
|
: "${LOKI_E10_TRIM:=1}"
|
|
339
360
|
: "${LOKI_E10_SMALL_NO_RUNNER:=1}"
|
|
340
361
|
: "${LOKI_E10_SMALL_MAX_CHARS:=1200}"
|
|
341
362
|
: "${LOKI_COST_FIRST:=1}"
|
|
342
|
-
export
|
|
363
|
+
export LOKI_ROUTER LOKI_E10_TRIM LOKI_E10_SMALL_NO_RUNNER LOKI_E10_SMALL_MAX_CHARS LOKI_COST_FIRST
|
|
343
364
|
_hk_out=()
|
|
344
365
|
for _hk_a in "$@"; do
|
|
345
366
|
[ "$_hk_a" = "--haiku" ] || _hk_out+=("$_hk_a")
|
|
@@ -588,10 +609,9 @@ _loki_attempts_refuse() {
|
|
|
588
609
|
echo "loki: 'loki start --attempts' runs only the Loki 10 engine; an option or provider in this command (for example --parallel, --github, --sandbox, --issue, or --detach) was only honored by the removed legacy loop. Remove it, or use a task string, an issue ref or a PRD path." >&2
|
|
589
610
|
exit 2
|
|
590
611
|
fi
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
esac
|
|
612
|
+
if ! validate_provider "${LOKI_PROVIDER:-claude}"; then
|
|
613
|
+
echo "loki: the Loki 10 engine does not support LOKI_PROVIDER=${LOKI_PROVIDER:-}; use $(loki_supported_providers_joined " or ")." >&2; exit 2
|
|
614
|
+
fi
|
|
595
615
|
}
|
|
596
616
|
|
|
597
617
|
# FC-37: --attempts is handled HERE, once, before any route split (engine10 positional task, Bun
|
|
@@ -755,10 +775,9 @@ case "v10" in
|
|
|
755
775
|
fi
|
|
756
776
|
;;
|
|
757
777
|
*)
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
esac
|
|
778
|
+
if ! validate_provider "${LOKI_PROVIDER:-claude}"; then
|
|
779
|
+
echo "loki: provider ${LOKI_PROVIDER:-} is not supported; use one of: $(loki_supported_providers_joined) (LOKI_PROVIDER)." >&2; exit 2
|
|
780
|
+
fi
|
|
762
781
|
[ -n "$(_loki_bun)" ] || _loki_no_bun_exit
|
|
763
782
|
;;
|
|
764
783
|
esac
|
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.124.1. 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/COMPARE-OPENCODE.md
CHANGED
|
@@ -19,7 +19,7 @@ Loki can also drive opencode as a provider (`loki start --provider opencode`).
|
|
|
19
19
|
| Provider flexibility | Claude default (CLI or Agent SDK); opencode; OpenRouter and local routes | Very wide provider catalog, first-class | opencode |
|
|
20
20
|
| Local models | `loki models --local`, `LOKI_MODEL_ROUTE=ollama/...`, lmstudio, llamacpp, vllm, custom URL | Local providers via config | Even |
|
|
21
21
|
| Multi-agent | Role agents, council review, custom agents in `.loki/agents/*.md`, the run view names the active stage | Configurable agents and subagents | Loki when you want the receipt to name who ran |
|
|
22
|
-
| Cost control | Same provider model as a raw session. Tool logs are trimmed before the next turn so a long run does not resend them. `--max-cost` and `budgets.per_run` are hard caps. `--haiku` or `--cost lean`
|
|
22
|
+
| Cost control | Same provider model as a raw session. Tool logs are trimmed before the next turn so a long run does not resend them. `--max-cost` and `budgets.per_run` are hard caps. `--haiku` or `--cost lean` (LOKI_ROUTER=auto) runs implement and fix on haiku; a failed check climbs to sonnet. `--cost-first` (or `LOKI_COST_FIRST=1`, also set by `--haiku`) keeps a haiku route only when the advisor marks the risk low; a history floor, no advisor, or an explicit model override still raise it | User watches the TUI | Loki when the result has to be a check the model did not grade |
|
|
23
23
|
| Proof | Signed receipt, `loki verify`, NOT PROVEN list, and a PR comment. A behavior change is verified only when a Wall test fails on the old code and passes after (`LOKI_MUTATION_STRICT=0` opts out) | The diff in the TUI | Loki |
|
|
24
24
|
| Docs consistency | One routing story, one cap rule, generated CLI table | Single product surface | Even |
|
|
25
25
|
| Predictability | Order-independent routing, documented exit-code contract, spend cap, STALLED is never a verified receipt | Interactive, user-driven | Loki for unattended use |
|
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.124.1
|
|
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/v10/GUIDE.md
CHANGED
|
@@ -99,6 +99,18 @@ skipped and implement runs on your run's own model, like a raw session.
|
|
|
99
99
|
`LOKI_E10_CASCADE=1` opts in to the cheaper sonnet start (it prints and
|
|
100
100
|
records the downgrade); a repeated test failure always escalates up, never
|
|
101
101
|
down (Engine Law L1).
|
|
102
|
+
`LOKI_ROUTER=auto` (also set by `--haiku` and `--cost lean`) is the router's
|
|
103
|
+
auto preset (Engine Law L1, as amended 2026-11-01, allows Haiku as the
|
|
104
|
+
executor when asked for): Haiku runs implement and fix, Opus writes the plan
|
|
105
|
+
of a hard task (judged from the task, never the repo size: sized large, or
|
|
106
|
+
a task naming more than 4 distinct non-test files), the Opus advisor tool is
|
|
107
|
+
attached to a fix round on Haiku or Sonnet (never to an Opus session), a
|
|
108
|
+
Haiku implement that claims the work is already done with no diff climbs one
|
|
109
|
+
rung, and a code-owned
|
|
110
|
+
failure, a stall or a spec conflict climbs the router's ladder (Sonnet, then
|
|
111
|
+
Opus). The start line names the downgrade and the route; the receipt's route
|
|
112
|
+
block records the executor and every climb. `LOKI_ROUTER_EXECUTOR` picks
|
|
113
|
+
another executor; `LOKI_ALLOW_HAIKU=false` makes it Sonnet.
|
|
102
114
|
`loki quick --help` prints the help; `loki quick -v "<task>"` runs on Loki 10 with
|
|
103
115
|
`--verbose`.
|
|
104
116
|
|
|
@@ -494,9 +506,11 @@ ready-to-paste values. Both accept `--json`.
|
|
|
494
506
|
Model routing picks which Claude model does each stage of a run. It is OFF
|
|
495
507
|
by default in 11.2.0. Set `LOKI_ROUTER=1` to opt in. `LOKI_ROUTER=0` is the
|
|
496
508
|
explicit opt-out and keeps the exact pre-router model behavior, pins
|
|
497
|
-
included. Explicit
|
|
498
|
-
`
|
|
499
|
-
bypass the router.
|
|
509
|
+
included. Explicit `LOKI_MODEL_OVERRIDE`, `LOKI_CLAUDE_MODEL_DEVELOPMENT`,
|
|
510
|
+
`LOKI_MODEL_DEVELOPMENT` and `LOKI_SESSION_MODEL` (set by `--model`) still
|
|
511
|
+
win and bypass the router. `LOKI_SESSION_MODEL` and `LOKI_MODEL_DEVELOPMENT`
|
|
512
|
+
joined this list in the auto-preset change, so a `LOKI_ROUTER=1` run with
|
|
513
|
+
`--model` set now runs every session on that model instead of routing. The other knobs are `LOKI_ROUTER_EXECUTOR` (post-flip
|
|
500
514
|
default sonnet; haiku only by earned evidence), `LOKI_ROUTER_ESCALATE` (default sonnet) and `LOKI_ROUTER_ADVISOR`
|
|
501
515
|
(default opus; `off` disables the advisor). The router engine itself lands in
|
|
502
516
|
11.2.0; the pieces below marked "shipped in 11.1.0" are already in the code.
|