loki-mode 11.118.1 → 11.120.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 +3 -3
- package/VERSION +1 -1
- package/autonomy/lib/backlog.py +107 -37
- package/autonomy/loki +5 -2
- package/autonomy/route.sh +67 -22
- package/bin/loki +19 -78
- package/dashboard/__init__.py +1 -1
- package/docs/ARCHITECTURE.md +4 -4
- package/docs/CLI-INVENTORY.md +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/air-gapped.md +1 -1
- package/docs/alternative-installations.md +1 -1
- package/docs/cost-controls.md +0 -1
- package/docs/dev/architecture-reference.md +2 -2
- package/docs/environment-variables.md +1 -1
- package/docs/exit-codes.md +3 -4
- package/docs/trackers.md +12 -0
- package/docs/v10/GUIDE.md +3 -3
- package/loki-ts/data/child-env.json +2 -0
- package/loki-ts/dist/loki.js +1693 -1885
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +4948 -4751
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/references/sdk-mode.md +8 -10
- package/web-app/dist/assets/{AdminPage-Dl95kEpz.js → AdminPage-D1_vz1LQ.js} +1 -1
- package/web-app/dist/assets/{Avatar-CoMNZyZc.js → Avatar-BefQj_9m.js} +1 -1
- package/web-app/dist/assets/{Badge-DQ_maQj6.js → Badge-BcAowN-N.js} +1 -1
- package/web-app/dist/assets/{Button-xAjqoDGo.js → Button-BeVwFkYh.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-DLS-kNOJ.js → CockpitPage-Q-sO8Psm.js} +1 -1
- package/web-app/dist/assets/{ComparePage-xWlmnGaY.js → ComparePage-CiJ3FrSl.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-BRbWbU8C.js → ErrorBoundary-DdIh2DlF.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-CNbbIGm3.js → EvidenceReceiptPanel-cf2Jhgl3.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-DTjOTX07.js → GitHubIssuesPanel-SfgkosoM.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-B7OVy1iJ.js → GitHubPRsPanel-DsUqn99r.js} +1 -1
- package/web-app/dist/assets/{HomePage-CETALbO9.js → HomePage-C6PCzqqg.js} +2 -2
- package/web-app/dist/assets/{LoginPage-DwPyh-M5.js → LoginPage-Bqci5QVa.js} +1 -1
- package/web-app/dist/assets/{MagicPage-CmLl1poT.js → MagicPage-NO5PIrOb.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-CWQVihAs.js → MetricsPage-B0oveHbr.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-D5c8BBZa.js → NotFoundPage-CDh2DiQC.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-DUbvjiAF.js → ProjectPage-CrJ_t9m_.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-bBUlPEjC.js → ProjectsPage-UPhA-lpV.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-BpHpvLOi.js → SettingsPage-DKO1LhLq.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-BCSWtWpO.js → ShowcasePage-sZmG4qo4.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-CZMC1YjJ.js → SystemSettingsPage-Drvx9eXK.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-wNI7lC4g.js → TeamsPage-DFuLa1I9.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-BUXLMzDk.js → TemplatesPage-C_U8lRMD.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-Ci-OwQtT.js → TerminalOutput-DdU-3V0-.js} +1 -1
- package/web-app/dist/assets/{activity-DrY_CBEj.js → activity-BwXV9-sA.js} +1 -1
- package/web-app/dist/assets/{bell-zizLC58S.js → bell-DF148FeB.js} +1 -1
- package/web-app/dist/assets/{bot-DEypgLT2.js → bot-BM1t71_O.js} +1 -1
- package/web-app/dist/assets/{check-gY52vWg_.js → check-DHJPb450.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DoDaUPzk.js → chevron-left-DZIgwXb6.js} +1 -1
- package/web-app/dist/assets/{circle-alert-Cfu5G_0b.js → circle-alert-31lHNmy0.js} +1 -1
- package/web-app/dist/assets/{clock-De708wI0.js → clock-D4QAxoCy.js} +1 -1
- package/web-app/dist/assets/{cloud-EGwYhSkv.js → cloud-Dd2iypzJ.js} +1 -1
- package/web-app/dist/assets/{code-xml-BJXvBR7V.js → code-xml-CnUOPwx8.js} +1 -1
- package/web-app/dist/assets/{database-D4yAsGes.js → database-Dhpbplpo.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-BUAWk_hv.js → dollar-sign-DCt7L7Pk.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-DbVIY5Ui.js → file-code-corner-D2SPiEH7.js} +1 -1
- package/web-app/dist/assets/{file-plus-TuU3vx6q.js → file-plus-cCrpp-pe.js} +1 -1
- package/web-app/dist/assets/{globe-Cf3pzF10.js → globe-Cn6TYK_z.js} +1 -1
- package/web-app/dist/assets/{hammer-CkFR5FA_.js → hammer-sMLkpUw2.js} +1 -1
- package/web-app/dist/assets/{index-BOitSoSC.js → index-Dgb8Kves.js} +3 -3
- package/web-app/dist/assets/{layers-CaH8k11R.js → layers-DuPguIVU.js} +1 -1
- package/web-app/dist/assets/{loader-circle-CS4D1KEz.js → loader-circle-BBhsXs18.js} +1 -1
- package/web-app/dist/assets/{lock-6XzWbWxF.js → lock-n-qJvU_o.js} +1 -1
- package/web-app/dist/assets/{package-BOuSIjSw.js → package-cDxKfjAD.js} +1 -1
- package/web-app/dist/assets/{plus-B3x53Byn.js → plus-COk5sQxp.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-x8YMlGSU.js → refresh-cw--VKVhvpo.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-C783lZy1.js → rotate-ccw-DvZ6KExW.js} +1 -1
- package/web-app/dist/assets/{scroll-text-CUyhyoYB.js → scroll-text-HRyHuQUy.js} +1 -1
- package/web-app/dist/assets/{server-BgM5H1lS.js → server-CoZSZtid.js} +1 -1
- package/web-app/dist/assets/{shield-alert-PhlB-cgX.js → shield-alert--WkXdHlN.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-BMv6-FAl.js → thumbs-up-YeW2Lb8g.js} +1 -1
- package/web-app/dist/assets/{trash-2-cwv6_KMs.js → trash-2-DuhNrOPo.js} +1 -1
- package/web-app/dist/assets/{trending-down-fh1-jf_B.js → trending-down-55EMrZu6.js} +1 -1
- package/web-app/dist/assets/{trending-up-CBhpOjo8.js → trending-up-BaUDEQ-n.js} +1 -1
- package/web-app/dist/assets/{upload-B6OTSfOn.js → upload-BrHq6BXI.js} +1 -1
- package/web-app/dist/assets/{usePolling-EItfhxee.js → usePolling-BEtK-_qo.js} +1 -1
- package/web-app/dist/assets/{user-BW393wzp.js → user-DL5XlCBR.js} +1 -1
- package/web-app/dist/index.html +1 -1
package/bin/loki
CHANGED
|
@@ -66,12 +66,16 @@ case "${1:-}" in
|
|
|
66
66
|
esac
|
|
67
67
|
|
|
68
68
|
# v8.1: resolve the one-switch SDK mode (LOKI_SDK_MODE=off|judges|full) into the
|
|
69
|
-
# per-site LOKI_SDK_* flags HERE, in the outermost shim,
|
|
70
|
-
#
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
|
|
69
|
+
# per-site LOKI_SDK_* flags HERE, in the outermost shim, so every child (bash or
|
|
70
|
+
# Bun) reads the same resolved flags. Same idempotent lib all three entrypoints
|
|
71
|
+
# source. No-op when the mode is unset.
|
|
72
|
+
# LOKI_SDK_LOOP once routed `loki start` to a separate Bun loop; that loop is gone and every start runs
|
|
73
|
+
# the default engine. Read the user's own value before the mode resolver can set it.
|
|
74
|
+
if [ "${1:-}" = "start" ]; then
|
|
75
|
+
case "${LOKI_SDK_LOOP:-}" in
|
|
76
|
+
1|true) echo "loki: LOKI_SDK_LOOP no longer selects a separate loop; the default engine is Loki 10 (engine10)." >&2 ;;
|
|
77
|
+
esac
|
|
78
|
+
fi
|
|
75
79
|
if [ -f "$REPO_ROOT/autonomy/lib/sdk-mode.sh" ]; then
|
|
76
80
|
# shellcheck source=../autonomy/lib/sdk-mode.sh
|
|
77
81
|
source "$REPO_ROOT/autonomy/lib/sdk-mode.sh"
|
|
@@ -646,14 +650,19 @@ fi
|
|
|
646
650
|
|
|
647
651
|
# OC-ROUTE: normalize flags before the engine decision so argument order and input form
|
|
648
652
|
# never change the engine (autonomy/route.sh; `loki route ...` and --explain-route print it).
|
|
653
|
+
# route.sh is the only start and quick decision, `start --attempts 1` included (N=1 was stripped above).
|
|
649
654
|
_R_APPLIED=0
|
|
650
|
-
if [ -f "$REPO_ROOT/autonomy/route.sh" ]
|
|
655
|
+
if [ -f "$REPO_ROOT/autonomy/route.sh" ]; then
|
|
651
656
|
# shellcheck source=/dev/null
|
|
652
657
|
. "$REPO_ROOT/autonomy/route.sh"
|
|
653
658
|
_r_rc=0
|
|
654
659
|
loki_route_dispatch "$@" || _r_rc=$?
|
|
655
660
|
case "$_r_rc" in 7) exit 0 ;; 8) exit 2 ;; esac
|
|
656
661
|
if [ "$R_DECIDED" = "1" ]; then
|
|
662
|
+
if [ "$_LOKI_START_ATTEMPTS" = "1" ] && [ "$R_ENGINE" = "legacy" ]; then
|
|
663
|
+
echo "loki: --attempts runs only the Loki 10 engine, but this call routes to the legacy engine ($R_REASON); drop --attempts or the legacy request." >&2
|
|
664
|
+
exit 2
|
|
665
|
+
fi
|
|
657
666
|
_R_APPLIED=1
|
|
658
667
|
if [ -n "$R_SESSION_MODEL" ]; then
|
|
659
668
|
case "$R_SESSION_MODEL" in small) R_SESSION_MODEL=fast ;; medium) R_SESSION_MODEL=development ;; high) R_SESSION_MODEL=planning ;; esac
|
|
@@ -712,47 +721,6 @@ case "v10" in
|
|
|
712
721
|
unset _pa
|
|
713
722
|
;;
|
|
714
723
|
""|-*) _e10=0 ;;
|
|
715
|
-
# quick: the lean small path, no PR (legacy quick never opened one). A flag-first
|
|
716
|
-
# call (--help, -v) stays on the legacy quick.
|
|
717
|
-
quick)
|
|
718
|
-
case "${2:-}" in
|
|
719
|
-
""|-*) _e10=0 ;;
|
|
720
|
-
*) _e10=1; _e10_args=(--no-pr "${@:2}") ;;
|
|
721
|
-
esac
|
|
722
|
-
;;
|
|
723
|
-
# D58: `loki start <issue ref|issue URL|"multi-word task">` takes the same v10 path as
|
|
724
|
-
# `loki <ref>`. This arm decides only when autonomy/route.sh did not (--attempts, --help, the
|
|
725
|
-
# --workspace/--deploy front end); route.sh sends a PRD file, a brief and a bare start to engine10.
|
|
726
|
-
start)
|
|
727
|
-
# --workspace and --deploy (with its companions) are run by the bash front end around the engine; never glue them into an engine10 task.
|
|
728
|
-
_e10_front=0
|
|
729
|
-
for _e10_a in "${@:2}"; do
|
|
730
|
-
case "$_e10_a" in --workspace|--workspace=*|--deploy) _e10_front=1 ;; esac
|
|
731
|
-
done
|
|
732
|
-
unset _e10_a
|
|
733
|
-
case "${_e10_front}:${2:-}" in
|
|
734
|
-
1:*) _e10=0 ;;
|
|
735
|
-
0:*/*\#[0-9]*|0:http*://*/issues/*|0:http*://*/browse/*|0:jira:*|0:linear:*|0:https://linear.app/*/issue/*|0:*" "*)
|
|
736
|
-
_e10=1; _e10_args=("${@:2}")
|
|
737
|
-
if [ "$_LOKI_START_ATTEMPTS" = "1" ]; then
|
|
738
|
-
_e10_hard=1 # FC-38: --attempts never falls back to the legacy engine
|
|
739
|
-
# FC-37: engine10 has no --budget; unmapped it would be glued onto the task text. Its per-run cap is --max-cost.
|
|
740
|
-
_e10_args=(); _e10_bnext=0
|
|
741
|
-
for _e10_a in "${@:2}"; do
|
|
742
|
-
if [ "$_e10_bnext" = "1" ]; then _e10_args+=("$_e10_a"); _e10_bnext=0; continue; fi
|
|
743
|
-
case "$_e10_a" in
|
|
744
|
-
--budget|--budget-limit) _e10_args+=(--max-cost); _e10_bnext=1 ;;
|
|
745
|
-
--budget=*|--budget-limit=*) _e10_args+=("--max-cost=${_e10_a#*=}") ;;
|
|
746
|
-
*) _e10_args+=("$_e10_a") ;;
|
|
747
|
-
esac
|
|
748
|
-
done
|
|
749
|
-
unset _e10_a _e10_bnext
|
|
750
|
-
fi
|
|
751
|
-
;;
|
|
752
|
-
*) _e10=0 ;;
|
|
753
|
-
esac
|
|
754
|
-
unset _e10_front
|
|
755
|
-
;;
|
|
756
724
|
# http*://*/issues/* also covers GitLab's /-/issues/ URLs.
|
|
757
725
|
*/*\#[0-9]*|http*://*/issues/*|http*://*/browse/*|jira:*|linear:*|https://linear.app/*/issue/*) _e10=1 ;;
|
|
758
726
|
*" "*) _e10=1 ;;
|
|
@@ -817,40 +785,13 @@ if ! command -v bun &>/dev/null; then
|
|
|
817
785
|
exec "$BASH_CLI" "$@"
|
|
818
786
|
fi
|
|
819
787
|
|
|
820
|
-
#
|
|
821
|
-
#
|
|
822
|
-
#
|
|
823
|
-
# bash above) and AFTER the bun-presence check (a bun-less host already fell to
|
|
824
|
-
# bash). Accepts 1|true to match the flag's documented =1 usage; bash cannot
|
|
825
|
-
# cheaply reproduce truthy()'s yes/on spellings, so those are not honored here
|
|
826
|
-
# (documented divergence, same as other bin/loki bool guards). v8.1: LOKI_SDK_LOOP
|
|
827
|
-
# may also be set by the mode resolver above (LOKI_SDK_MODE=full -> LOOP=1), so
|
|
828
|
-
# `LOKI_SDK_MODE=full loki start` now correctly routes the loop to Bun here.
|
|
829
|
-
#
|
|
830
|
-
# RUN-25 iter 2 (T3(c) pre-flight): the Bun runAutonomous loop handles the RARV
|
|
831
|
-
# loop only. Orchestration flags that do pre-loop work the Bun loop does NOT do
|
|
832
|
-
# (git-worktree parallel streams, GitHub/issue import, Docker sandbox, the API
|
|
833
|
-
# server, backgrounding, alternate spec sources) must run on the bash route so the
|
|
834
|
-
# user gets FULL behavior even with the loop flag on. Scan the start args for any
|
|
835
|
-
# such flag (or an issue-ref positional) and, if present, DIVERT back to bash
|
|
836
|
-
# instead of taking the Bun fork. This is the "pre-loop handled, not rejected"
|
|
837
|
-
# guarantee that makes the eventual loop default-flip a no-regression. Runner
|
|
838
|
-
# flags (--simple, --allow-haiku, --regen-prd, --skip-memory, provider knobs) are
|
|
839
|
-
# handled by start.ts and do NOT divert. See artifacts/ITER1-FLAG-RECONCILE.md.
|
|
840
|
-
# FC-38 (scoped to --attempts; plain start keeps the 11.3.0 routing below): no `start --attempts` reaches the legacy loop (bash cmd_start, run.sh, runAutonomous).
|
|
841
|
-
# Issue refs and multi-word tasks were sent to engine10 above; every other start (PRD path, brief,
|
|
842
|
-
# flags) goes to the Bun start command, which runs engine10 and seals a receipt. A flag only the
|
|
843
|
-
# legacy route honored, or a provider engine10 cannot invoke, is refused loudly instead.
|
|
788
|
+
# `start --attempts 1` that route.sh left to its own handler (--help, the --workspace/--deploy front end, a bare
|
|
789
|
+
# start outside a repo) goes to the Bun start command, never the legacy loop (FC-38). An option only the legacy
|
|
790
|
+
# loop honored, or a provider engine10 cannot invoke, is refused loudly instead.
|
|
844
791
|
if [ "${1:-}" = "start" ] && [ "$_LOKI_START_ATTEMPTS" = "1" ]; then
|
|
845
792
|
_loki_attempts_refuse "${@:2}"
|
|
846
793
|
exec bun "${_LOKI_BUN_SAFE[@]}" "$BUN_CLI" "$@"
|
|
847
794
|
fi
|
|
848
|
-
if [ "${1:-}" = "start" ] && { [ "${LOKI_SDK_LOOP:-}" = "1" ] || [ "${LOKI_SDK_LOOP:-}" = "true" ]; }; then
|
|
849
|
-
if _loki_start_needs_bash "${@:2}"; then
|
|
850
|
-
exec "$BASH_CLI" "$@"
|
|
851
|
-
fi
|
|
852
|
-
exec bun "${_LOKI_BUN_SAFE[@]}" "$BUN_CLI" "$@"
|
|
853
|
-
fi
|
|
854
795
|
|
|
855
796
|
# CLI consolidation (Phase A): `trust detail` is the grouped form of the
|
|
856
797
|
# trust-metrics breakdown. The Bun `trust` handler only knows the trajectory
|
package/dashboard/__init__.py
CHANGED
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -126,10 +126,10 @@ same state, which is what makes runs resumable and independently verifiable.
|
|
|
126
126
|
|
|
127
127
|
A representative end-to-end flow:
|
|
128
128
|
|
|
129
|
-
1. **Entry.** `loki start ./prd.md` (
|
|
130
|
-
the
|
|
131
|
-
(`
|
|
132
|
-
`
|
|
129
|
+
1. **Entry.** `loki start ./prd.md` (`bin/loki`, which asks `autonomy/route.sh`
|
|
130
|
+
for the engine) runs the Loki 10 engine (`loki-ts/src/engine10`). The previous
|
|
131
|
+
bash loop (`autonomy/run.sh`) runs only on `--engine legacy` or
|
|
132
|
+
`LOKI_LEGACY_BASH=1`.
|
|
133
133
|
2. **Complexity and tier.** The engine detects complexity and maps the iteration
|
|
134
134
|
to a model tier (`rarv.ts` / `run.sh:get_rarv_tier`).
|
|
135
135
|
3. **Prompt construction.** `build_prompt.ts` (`run.sh:build_prompt`) assembles
|
package/docs/CLI-INVENTORY.md
CHANGED
|
@@ -37,7 +37,7 @@ Classes: KEEP-MODERN (v10-native or engine-neutral), UPDATE (live but needs mode
|
|
|
37
37
|
| trust | bun route, bash fallthrough | KEEP-MODERN | Trust trajectory surface |
|
|
38
38
|
| crash | bun route, bash fallthrough | KEEP-MODERN | Local-only crash plumbing |
|
|
39
39
|
| contract | loki-ts/src/cli.ts | KEEP-MODERN | v10 delivery contract |
|
|
40
|
-
| start | bun route, bash fallthrough | UPDATE |
|
|
40
|
+
| start | bun route, bash fallthrough | UPDATE | One engine (engine10); flags still legacy-shaped |
|
|
41
41
|
| slack | loki-ts/src/cli.ts | KEEP-MODERN | Bun-native integration |
|
|
42
42
|
| queue | loki-ts/src/cli.ts | KEEP-MODERN | Governor-aware batch of issue-mode runs |
|
|
43
43
|
| issues | loki-ts/src/cli.ts | KEEP-MODERN | Mass issue pickup on the T7 queue |
|
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.120.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.120.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/air-gapped.md
CHANGED
|
@@ -72,7 +72,7 @@ With a non-claude provider selected, `loki start` on the default (bash) route
|
|
|
72
72
|
and `loki quickstart` never prompt the `claude` CLI, even when one is
|
|
73
73
|
installed: PRD enrichment, done recognition, the council voters, the USAGE.md
|
|
74
74
|
refresh and the quickstart intent check fall back to their deterministic
|
|
75
|
-
paths.
|
|
75
|
+
paths.
|
|
76
76
|
`LOKI_ALLOW_CLAUDE_SIDECALLS=1` restores those claude calls, and the audit then lists them as REQUIRED egress, so it cannot read air-gap ready.
|
|
77
77
|
|
|
78
78
|
**We cannot run a build with no model at all.** Nobody can. What we can do is
|
|
@@ -136,7 +136,7 @@ A first task is ready when every required "All paths" item is present and at lea
|
|
|
136
136
|
### Execution paths
|
|
137
137
|
|
|
138
138
|
- Claude Code CLI path: the default. `loki start` runs the `claude` binary you installed and logged in with `claude auth login`. `loki chat` (with the claude provider) and `loki edit` call the `claude` CLI directly.
|
|
139
|
-
- Anthropic API-key path (Agent SDK, no `claude` CLI): `loki "<goal>"` needs only Anthropic credentials (for example `ANTHROPIC_API_KEY`), the bundled `@anthropic-ai/claude-agent-sdk` platform binary, and Bun. No `claude` CLI and no extra setting: the engine runs every session on the bundled SDK unless `LOKI_E10_INVOKER=cli`.
|
|
139
|
+
- Anthropic API-key path (Agent SDK, no `claude` CLI): `loki "<goal>"` needs only Anthropic credentials (for example `ANTHROPIC_API_KEY`), the bundled `@anthropic-ai/claude-agent-sdk` platform binary, and Bun. No `claude` CLI and no extra setting: the engine runs every session on the bundled SDK unless `LOKI_E10_INVOKER=cli`. `loki start ./prd.md` runs the same engine for a PRD up to 100000 bytes. A provider CLI on PATH is still needed by `loki demo` and `loki quickstart` (their provider check runs before the run starts), and by anything that reaches the bash loop: `loki start --engine legacy`, a PRD over 100000 bytes, and the `--workspace` / `--deploy` front end. Under `LOKI_SDK_MODE=full` with the claude provider, `--engine legacy` and a PRD over 100000 bytes are refused in one line instead.
|
|
140
140
|
- Other provider CLIs: `codex` (degraded), `cline`, `aider`, `opencode`. Any one of them replaces the `claude` CLI for `loki start --provider <name>`. Loki never silently substitutes a different provider than the one requested.
|
|
141
141
|
|
|
142
142
|
### Install methods
|
package/docs/cost-controls.md
CHANGED
|
@@ -63,7 +63,6 @@ Where the default applies:
|
|
|
63
63
|
| --- | --- | --- |
|
|
64
64
|
| engine10 (`loki "<task>"`, the Loki 10 engine) | Only when an API key is set (`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`). A subscription run (no key) has no dollar cap. | Ends the run `BUDGET_STOP`, exit 3. |
|
|
65
65
|
| 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
|
-
| Bun SDK loop (`LOKI_SDK_LOOP`) | No default. Opt in with `BUDGET_LIMIT`. | Stops the loop when the limit is reached. |
|
|
67
66
|
|
|
68
67
|
The README and the engine guide have shown different figures in the past (100 and
|
|
69
68
|
20). The figure above is the code's, and the two guides follow it.
|
|
@@ -112,8 +112,8 @@ Default-on in the Bun runner (see `CHANGELOG.md` v7.x entries; documented in `sk
|
|
|
112
112
|
|
|
113
113
|
- `LOKI_INJECT_FINDINGS` -- inject structured per-finding records into the next-iteration prompt; persists `.loki/state/findings-<iter>.json` after aggregation.
|
|
114
114
|
- `LOKI_OVERRIDE_COUNCIL` -- enable the 3-judge override council on a BLOCK verdict. Requires `LOKI_INJECT_FINDINGS=1` (operator setting only this var alone is a no-op).
|
|
115
|
-
**The BLOCK-LIFT arm
|
|
116
|
-
This fail-closed direction is DELIBERATE, not a bug: on the agent-authored route the gated agent writes its own counter-evidence, so mechanical verification is forgeable. On bash the only exits from a Critical/High BLOCK are to fix the finding or to use the human-escape path (`rm .loki/PAUSE`). Documented here because the heading above says "default-on" and, for this one knob's block-lift, that is true
|
|
115
|
+
**The BLOCK-LIFT arm never adjudicates on the bash loop.** The Bun loop that ran it was removed; on the bash loop (`--engine legacy`) the override lands in a stub that returns `REJECT_OVERRIDE` for every record (`loki-ts/src/commands/internal_phase1.ts:215-227`). Counter-evidence is still parsed and an `override-<iter>.json` transcript is still written, so the feature looks live in the artifacts while never being able to lift a BLOCK.
|
|
116
|
+
This fail-closed direction is DELIBERATE, not a bug: on the agent-authored route the gated agent writes its own counter-evidence, so mechanical verification is forgeable. On bash the only exits from a Critical/High BLOCK are to fix the finding or to use the human-escape path (`rm .loki/PAUSE`). Documented here because the heading above says "default-on" and, for this one knob's block-lift, that is not true.
|
|
117
117
|
- `LOKI_AUTO_LEARNINGS` -- auto-write structured learnings per code_review cycle. Optional `LOKI_AUTO_LEARNINGS_EPISODE=1` also writes the learning into the episode store.
|
|
118
118
|
**Bun route only.** This var has ZERO occurrences in `autonomy/run.sh` and `autonomy/loki` (measured; controls: `LOKI_HANDOFF_MD` returns 2, `LOKI_INJECT_FINDINGS` returns 3), so "set to `1` to force-enable on the bash route" does not apply to this knob -- there is nothing on bash to enable. The bash route DOES have a learnings store (`init_learnings_db`, `run.sh`); what is Bun-only is the automatic per-code_review-cycle write.
|
|
119
119
|
- `LOKI_HANDOFF_MD` -- write a structured handoff doc before iteration close.
|
|
@@ -226,7 +226,7 @@ banners you might expect. These variables control the remaining `[INFO]` and
|
|
|
226
226
|
| Variable | Default | Effect |
|
|
227
227
|
|---|---|---|
|
|
228
228
|
| `LOKI_DURABLE_STATE` | `0` | `1` enables durable state **and** the richer process-exit contract that lets Kubernetes distinguish a deterministic failure from a crash. See [exit codes](./exit-codes.md). |
|
|
229
|
-
| `LOKI_SDK_LOOP` | unset |
|
|
229
|
+
| `LOKI_SDK_LOOP` | unset | No longer selects a loop: `loki start` routes through `autonomy/route.sh` to the default engine (Loki 10), whose Claude sessions use the Agent SDK unless `LOKI_E10_INVOKER=cli`. Setting it prints a one-line notice. While it is set (directly, or by `LOKI_SDK_MODE=full` or `LOKI_SDK=full`) with the claude provider, `--engine legacy`, `LOKI_ENGINE=legacy` and a PRD over 100000 bytes exit 2 with one line, because the bash loop has no SDK path. |
|
|
230
230
|
| `LOKI_ALLOW_AGENT_GITHUB_TOKEN` | unset | By default `GH_TOKEN`, `GITHUB_TOKEN`, `GH_ENTERPRISE_TOKEN`, and `GITHUB_ENTERPRISE_TOKEN` are withheld from the agent's environment (the agent runs as the user, so OS keychain and credential files are not yet isolated; P9-ISOLATION is in design). The two routes differ: on the bash route (`autonomy/run.sh`) the withheld tokens are re-granted only for Loki's own trusted calls, namely the `gh()` CLI wrapper, the `_loki_net` helper used by the optional local-PR path in `on_run_complete()`, the session-end `create_session_pr` call, and `autonomy/lib/proof-check.sh`'s network probe. On the Bun route (`loki-ts/src/runner/github_token.ts`'s `withholdGithubTokens()`) the tokens are dropped from the process outright, with no re-grant and no push/PR step of its own. Exactly `1` lets the agent inherit the tokens as before, on either route; that is a Rule of Two exposure, and a one-line stderr warning is printed. |
|
|
231
231
|
| `LOKI_AI_MARKING` | unset (off) | `1` (exactly) adds machine-readable trailers to the Loki commit (`AI-Generated: true`, `AI-Provider`, `AI-Model`, `Loki-Receipt`, after `Loki-Run`) and one `AI-Generated: true (...)` marker line under the verdict in the PR body. Values are single-line and bounded. Off, the commit and PR body are byte-identical to before. |
|
|
232
232
|
|
package/docs/exit-codes.md
CHANGED
|
@@ -67,8 +67,7 @@ Helm wires this up for you: `worker.exitCodes.terminalFailure` (default 20)
|
|
|
67
67
|
feeds the Job's `podFailurePolicy`, so a deterministic failure fails the Job
|
|
68
68
|
immediately instead of burning `backoffLimit`. Requires Kubernetes 1.31+.
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
identically; a parity test asserts they agree status for status.
|
|
70
|
+
The bash runner implements this contract.
|
|
72
71
|
|
|
73
72
|
The default engine honors the same opt-in: with `LOKI_DURABLE_STATE=1` a run that
|
|
74
73
|
ends FAILED, PARTIAL, BUDGET_STOP, BLOCKED (spec conflict) or STALLED exits 20
|
|
@@ -441,7 +440,7 @@ The JSON carries `engine`, `adapter`, `provider`, `model`, `input_type`, `input`
|
|
|
441
440
|
|
|
442
441
|
- Argument order never changes the route: flags first or last, `--prd FILE` or a positional file, `--provider X` or `LOKI_PROVIDER=X`, `--engine X` or `LOKI_ENGINE=X` all resolve identically (the flag wins over the env var).
|
|
443
442
|
- Default engine is `engine10` for a PRD file (`.md`, `.json`, `.yaml`), an issue reference (`owner/repo#N` or an issue URL), a multi-word task and a one-word brief.
|
|
444
|
-
- The legacy engine runs only on `--engine legacy` or `LOKI_ENGINE=legacy`, or for a PRD larger than 100000 bytes. A flag engine10 does not support, a provider with no engine10 invoker, and a machine with no working bun each exit 2 with the fix. Inside a repository, `loki start` or `loki quick` with no task exits 64 with the `loki "<goal>"` usage (after offering to resume an interrupted run); outside one, a bare `loki start` shows the offline sample receipt and exits 0.
|
|
443
|
+
- The legacy engine runs only on `--engine legacy` or `LOKI_ENGINE=legacy`, or for a PRD larger than 100000 bytes (engine10 carries the task in single strings, capped at 128 KiB on Linux). Under `LOKI_SDK_MODE=full`, `LOKI_SDK=full` or `LOKI_SDK_LOOP=1` with the claude provider, each of these exits 2 with one line instead: the bash loop has no SDK path. A flag engine10 does not support, a provider with no engine10 invoker, and a machine with no working bun each exit 2 with the fix. Inside a repository, `loki start` or `loki quick` with no task exits 64 with the `loki "<goal>"` usage (after offering to resume an interrupted run); outside one, a bare `loki start` shows the offline sample receipt and exits 0.
|
|
445
444
|
- `--engine engine10` with an unsupported flag is refused (exit 2) instead of rerouted.
|
|
446
445
|
- A missing PRD file path is a usage error (exit 2).
|
|
447
446
|
- Adapter is `<engine>:<provider>`, with the legacy engine written `legacy-bash:<provider>`.
|
|
@@ -480,5 +479,5 @@ The table below is rendered from live `loki route --json` output.
|
|
|
480
479
|
| `LOKI_ENGINE=legacy start p.md` | legacy | legacy-bash:claude | 1 listed | explicit: --engine legacy or LOKI_ENGINE=legacy |
|
|
481
480
|
| `start p.md --engine engine10` | engine10 | engine10:claude | none | explicit: --engine engine10 |
|
|
482
481
|
| `LOKI_ENGINE=engine10 start p.md` | engine10 | engine10:claude | none | explicit: --engine engine10 |
|
|
483
|
-
| `start big.md` | legacy | legacy-bash:claude | 1 listed | PRD is larger than 100000 bytes (engine10
|
|
482
|
+
| `start big.md` | legacy | legacy-bash:claude | 1 listed | PRD is larger than 100000 bytes (engine10 carries the task in single strings, capped at 128 KiB on Linux) |
|
|
484
483
|
<!-- route-table:end -->
|
package/docs/trackers.md
CHANGED
|
@@ -7,6 +7,18 @@ loki jira:PROJ-123
|
|
|
7
7
|
loki linear:ENG-42
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
+
## Backlog
|
|
11
|
+
|
|
12
|
+
`loki backlog` works a whole Jira project or Linear team the way it works GitHub issues: it lists the open items, triages each one (implement, spec or human), runs the implement items as `loki jira:PROJ-N` or `loki linear:TEAM-N` in their own worktrees of the current checkout, drafts a spec for the vague ones and lists the human ones.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
loki backlog jira:PROJ --all --dry-run
|
|
16
|
+
loki backlog linear:ENG --label loki
|
|
17
|
+
loki backlog jira:PROJ --issues 12,14 # PROJ-12 and PROJ-14
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The project key is case-insensitive (`jira:proj` is `jira:PROJ`). An item whose key is not `PROJ-<number>` stops the listing before anything runs. Each run gets only its own tracker's token: a Jira run never sees `LINEAR_API_KEY` or `LOKI_LINEAR_TOKEN`, a Linear run never sees `JIRA_API_TOKEN`, `JIRA_TOKEN` or `LOKI_JIRA_TOKEN`, and a GitHub run or a `--dag` unit sees none of them. Open means a Jira status category other than Done, or a Linear state other than completed or canceled. At most 200 items are listed. A large Jira or Linear item runs as one run: only GitHub issues are split into slices today, and the triage reason says so.
|
|
21
|
+
|
|
10
22
|
## Credentials (environment only)
|
|
11
23
|
|
|
12
24
|
- Jira: `JIRA_EMAIL`, `JIRA_API_TOKEN` and `JIRA_BASE_URL` (for example `https://acme.atlassian.net`). `JIRA_BASE_URL` may be omitted when you pass an `atlassian.net` browse URL.
|
package/docs/v10/GUIDE.md
CHANGED
|
@@ -356,12 +356,12 @@ on:
|
|
|
356
356
|
- run: loki backlog "${GITHUB_REPOSITORY}" --label loki --concurrency 2
|
|
357
357
|
```
|
|
358
358
|
|
|
359
|
-
`loki backlog` also takes `--all`, `--issues 1,2,3` and `--dry-run
|
|
359
|
+
`loki backlog` also takes `--all`, `--issues 1,2,3` and `--dry-run`, and `jira:PROJ` or `linear:TEAM` in place of `owner/repo` to work a Jira project or Linear team the same way (see [Jira and Linear intake](../trackers.md)). The nightly job runs the agent and a write token together, so label only issues you trust.
|
|
360
360
|
|
|
361
361
|
Before anything runs, `loki backlog` triages every issue into one of three classes, each printed with a one-line reason (`--dry-run` prints only this and launches nothing):
|
|
362
362
|
|
|
363
|
-
- `implement`: a concrete target (a file, function, value or expected result)
|
|
364
|
-
- `spec`: vague or
|
|
363
|
+
- `implement`: a concrete target (a file, function, value or expected result), or a large issue. Only these run. Large has one definition, the same one `loki start owner/repo#N` uses: an epic label (`epic`, `umbrella`, `tracking` or `meta`), or at least two of 4 or more solution parts, 4 or more acceptance criteria, and both a backend and a frontend named. A large issue is split into slices that each run on their own (the reason says `runs split into slices`).
|
|
364
|
+
- `spec`: vague or ambiguous (no concrete target named, or an ambiguity score at the threshold). Loki drafts `.loki/specs/<slug>.md` with `loki plan --spec`, runs nothing, and prints `loki start --spec .loki/specs/<slug>.md` to run after you edit or approve it.
|
|
365
365
|
- `human`: the issue touches secrets, production or a destructive operation. Never run headless; listed with the reason. Repos without tests, UI work and infra work still run: Loki writes its own tests and verifies once at the end.
|
|
366
366
|
|
|
367
367
|
The rules are deterministic (issue text, labels, the repo test map and the ambiguity score); no model call decides a class. A run records its class and reason in the run events, the receipt (`triage`) and a `Triage:` line in the PR body. Overrides: the label `loki:implement`, `loki:spec` or `loki:human` forces that class for one issue; `LOKI_TRIAGE=0` turns the router off and runs every issue. Routing happens only in `loki backlog`. A direct `loki "<goal>"` or `loki start owner/repo#N` never stops or refuses because of triage: when the ambiguity gate fires it records the class and reason in the run events and the receipt, then runs exactly as before.
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"LOKI_E10_PREFIX",
|
|
120
120
|
"LOKI_E10_PROJECT_MODEL",
|
|
121
121
|
"LOKI_E10_PROVIDER",
|
|
122
|
+
"LOKI_E10_QUICK_VERIFY",
|
|
122
123
|
"LOKI_E10_READINESS_FOLD",
|
|
123
124
|
"LOKI_E10_REPOMAP_MAX_FILES",
|
|
124
125
|
"LOKI_E10_REPO_DIR",
|
|
@@ -138,6 +139,7 @@
|
|
|
138
139
|
"LOKI_E10_STAGE",
|
|
139
140
|
"LOKI_E10_STALL_KILL_S",
|
|
140
141
|
"LOKI_E10_STALL_S",
|
|
142
|
+
"LOKI_E10_SUITE_CMDS",
|
|
141
143
|
"LOKI_E10_TASK_TEXT",
|
|
142
144
|
"LOKI_E10_TIER",
|
|
143
145
|
"LOKI_E10_TRIM",
|