loki-mode 9.23.1 → 9.25.2
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 +27 -2
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/loki +57 -19
- package/autonomy/quickstart.sh +4 -1
- package/autonomy/run.sh +102 -3
- package/dashboard/__init__.py +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/loki-ts/dist/loki.js +505 -505
- package/loki-ts/package.json +1 -1
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
package/README.md
CHANGED
|
@@ -15,8 +15,6 @@ _The free, source-available autonomous coding agent by [Autonomi](https://www.au
|
|
|
15
15
|
|
|
16
16
|
[Website](https://www.autonomi.dev/) | [Documentation](wiki/Home.md) | [Installation](docs/INSTALLATION.md) | [Changelog](CHANGELOG.md)
|
|
17
17
|
|
|
18
|
-
**Current release: v9.16.0**
|
|
19
|
-
|
|
20
18
|
</div>
|
|
21
19
|
|
|
22
20
|
---
|
|
@@ -41,6 +39,21 @@ Upgrade with `loki self-update`. Long form: [Installation Guide](docs/INSTALLATI
|
|
|
41
39
|
|
|
42
40
|
</details>
|
|
43
41
|
|
|
42
|
+
<details>
|
|
43
|
+
<summary>Claude Code plugin (adds /loki-grill, /loki-spec-status, /loki-verify)</summary>
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
claude plugin marketplace add asklokesh/loki-mode
|
|
47
|
+
claude plugin install loki-mode@loki-mode
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Adds three slash commands and the Loki MCP server (memory, task queue, code
|
|
51
|
+
search, build management) to Claude Code. It calls the CLI rather than bundling
|
|
52
|
+
it, so install `loki-mode` above first. Verify with `claude plugin list`:
|
|
53
|
+
a healthy install reports `Status: enabled`.
|
|
54
|
+
|
|
55
|
+
</details>
|
|
56
|
+
|
|
44
57
|
## Use it
|
|
45
58
|
|
|
46
59
|
```bash
|
|
@@ -466,6 +479,10 @@ OpenRouter serves **only** the OpenAI-shaped `/v1/chat/completions`; it has no
|
|
|
466
479
|
Anthropic `/v1/messages` endpoint. Pointing `ANTHROPIC_BASE_URL` at it does not
|
|
467
480
|
work, which earlier versions of this README incorrectly suggested.
|
|
468
481
|
|
|
482
|
+
[OrcaRouter](https://www.orcarouter.ai) is an OpenAI-compatible gateway that
|
|
483
|
+
also serves the Anthropic Messages API, so unlike OpenRouter the same key works
|
|
484
|
+
through Route 2 below as well as Route 1 here.
|
|
485
|
+
|
|
469
486
|
*Route 2 -- Anthropic-protocol gateways.* `ANTHROPIC_BASE_URL` routes Claude
|
|
470
487
|
Code itself, so the endpoint must speak the Anthropic Messages API. LiteLLM,
|
|
471
488
|
Bedrock proxies, and self-hosted gateways can:
|
|
@@ -481,6 +498,14 @@ export ANTHROPIC_BASE_URL=https://your-gateway.internal/v1
|
|
|
481
498
|
export ANTHROPIC_API_KEY=...
|
|
482
499
|
export LOKI_MODEL_OVERRIDE=<whatever your gateway calls the model>
|
|
483
500
|
loki start prd.md
|
|
501
|
+
|
|
502
|
+
# OrcaRouter (one key for both routes; model ids are namespaced by provider).
|
|
503
|
+
# The bare host is deliberate here: the Anthropic SDK appends /v1/messages
|
|
504
|
+
# itself, so adding /v1 would double it.
|
|
505
|
+
export ANTHROPIC_BASE_URL=https://api.orcarouter.ai
|
|
506
|
+
export ANTHROPIC_API_KEY=sk-orca-...
|
|
507
|
+
export LOKI_MODEL_OVERRIDE=<namespaced id, e.g. anthropic/claude-sonnet-5>
|
|
508
|
+
loki start prd.md
|
|
484
509
|
```
|
|
485
510
|
|
|
486
511
|
**Set both variables.** `LOKI_MODEL_OVERRIDE` is what makes the alt-provider
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: loki-mode
|
|
|
3
3
|
description: Autonomous spec-driven build system with a built-in trust layer. It does not call work done until it is verified (RARV-C closure loop, 8 quality gates, completion council, verified-completion evidence gate). Triggers on "Loki Mode". Takes a spec (PRD, GitHub issue, OpenAPI doc, etc.) to deployed product with minimal human intervention. Provider-agnostic. Requires --dangerously-skip-permissions flag.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Loki Mode v9.
|
|
6
|
+
# Loki Mode v9.25.2
|
|
7
7
|
|
|
8
8
|
**You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
|
|
9
9
|
|
|
@@ -470,4 +470,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
|
|
|
470
470
|
|
|
471
471
|
---
|
|
472
472
|
|
|
473
|
-
**v9.
|
|
473
|
+
**v9.25.2 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
9.
|
|
1
|
+
9.25.2
|
package/autonomy/loki
CHANGED
|
@@ -7657,9 +7657,17 @@ cmd_web() {
|
|
|
7657
7657
|
cmd_web_redirect_to_dashboard "$@"
|
|
7658
7658
|
;;
|
|
7659
7659
|
stop)
|
|
7660
|
+
# `loki web start` redirects to the dashboard (above), so stopping
|
|
7661
|
+
# Purple Lab here left the user unable to stop what they had just
|
|
7662
|
+
# started: start hit 57374, stop hit 57375. Stop BOTH -- the
|
|
7663
|
+
# dashboard because that is what start launched, and Purple Lab
|
|
7664
|
+
# because a long-lived pre-deprecation process may still be up.
|
|
7665
|
+
cmd_dashboard_stop
|
|
7660
7666
|
cmd_web_stop
|
|
7661
7667
|
;;
|
|
7662
7668
|
status)
|
|
7669
|
+
# Same reasoning as stop: report on what start actually launched.
|
|
7670
|
+
cmd_dashboard_status
|
|
7663
7671
|
cmd_web_status
|
|
7664
7672
|
;;
|
|
7665
7673
|
logs)
|
|
@@ -7704,6 +7712,7 @@ cmd_web_redirect_to_dashboard() {
|
|
|
7704
7712
|
# --port is shared and passes straight through.
|
|
7705
7713
|
local orig_args=("$@")
|
|
7706
7714
|
local dash_args=()
|
|
7715
|
+
local _web_dropped_prd=""
|
|
7707
7716
|
while [[ $# -gt 0 ]]; do
|
|
7708
7717
|
case "$1" in
|
|
7709
7718
|
--no-open)
|
|
@@ -7711,10 +7720,17 @@ cmd_web_redirect_to_dashboard() {
|
|
|
7711
7720
|
shift
|
|
7712
7721
|
;;
|
|
7713
7722
|
--prd)
|
|
7714
|
-
# Purple-Lab-only prefill;
|
|
7723
|
+
# Purple-Lab-only prefill; the dashboard cannot accept it.
|
|
7724
|
+
# Dropping it is correct, doing so SILENTLY is not: the user
|
|
7725
|
+
# named a spec file and nothing would tell them it was ignored,
|
|
7726
|
+
# so they would sit in front of an empty dashboard believing
|
|
7727
|
+
# their PRD had been loaded. Say so, and name the command that
|
|
7728
|
+
# actually takes a PRD.
|
|
7729
|
+
_web_dropped_prd="${2:-}"
|
|
7715
7730
|
shift 2 2>/dev/null || shift
|
|
7716
7731
|
;;
|
|
7717
7732
|
--prd=*)
|
|
7733
|
+
_web_dropped_prd="${1#--prd=}"
|
|
7718
7734
|
shift
|
|
7719
7735
|
;;
|
|
7720
7736
|
*)
|
|
@@ -7728,6 +7744,11 @@ cmd_web_redirect_to_dashboard() {
|
|
|
7728
7744
|
if ! _deprecated_alias_should_suppress ${orig_args[@]+"${orig_args[@]}"}; then
|
|
7729
7745
|
echo "Launching the dashboard (http://localhost:${DASHBOARD_DEFAULT_PORT}) instead of the deprecated Purple Lab." >&2
|
|
7730
7746
|
fi
|
|
7747
|
+
if [ -n "$_web_dropped_prd" ]; then
|
|
7748
|
+
echo "Note: --prd '${_web_dropped_prd}' was NOT loaded. The dashboard does not take a PRD;" >&2
|
|
7749
|
+
echo " it watches runs that are already going. To build from that spec:" >&2
|
|
7750
|
+
echo " loki start '${_web_dropped_prd}'" >&2
|
|
7751
|
+
fi
|
|
7731
7752
|
cmd_dashboard_start ${dash_args[@]+"${dash_args[@]}"}
|
|
7732
7753
|
}
|
|
7733
7754
|
|
|
@@ -31217,7 +31238,15 @@ _docs_invoke_provider() {
|
|
|
31217
31238
|
# structurally identical captured `claude -p` resolution subcall).
|
|
31218
31239
|
# env-prefix form because of the optional $t_prefix timeout wrapper.
|
|
31219
31240
|
# No-op when caveman is absent.
|
|
31220
|
-
|
|
31241
|
+
# Model pin (v9.25.0). This site makes EIGHT sequential provider
|
|
31242
|
+
# calls per doc-gen run, and without --model every one of them runs
|
|
31243
|
+
# on whatever the account default is -- Opus for many users, at 5x
|
|
31244
|
+
# Sonnet's input price and 5x its output price. Documentation is
|
|
31245
|
+
# summarization over a context this code already assembled; it is
|
|
31246
|
+
# not the workload that needs the top tier. Pinned to the same
|
|
31247
|
+
# default the review subcall uses (run.sh:13762), and overridable
|
|
31248
|
+
# for anyone who wants a different trade.
|
|
31249
|
+
result=$($t_prefix env CAVEMAN_DEFAULT_MODE=off claude -p --model "${LOKI_DOCS_MODEL:-claude-sonnet-5}" "$prompt" 2>/dev/null) || exit_code=$?
|
|
31221
31250
|
;;
|
|
31222
31251
|
codex)
|
|
31223
31252
|
result=$($t_prefix codex exec --sandbox workspace-write "$prompt" 2>/dev/null) || exit_code=$?
|
|
@@ -31347,47 +31376,56 @@ _docs_generate() {
|
|
|
31347
31376
|
echo -e " ${CYAN}Generating${NC} $doc_file ..."
|
|
31348
31377
|
|
|
31349
31378
|
if [ "$provider_available" = true ]; then
|
|
31350
|
-
# Build a focused prompt for each doc type
|
|
31379
|
+
# Build a focused prompt for each doc type.
|
|
31380
|
+
#
|
|
31381
|
+
# CONTEXT FIRST, AND THE ORDER IS LOAD-BEARING. All eight doc types
|
|
31382
|
+
# share the same $context (measured at 4,269 tokens on this repo).
|
|
31383
|
+
# With the per-type instruction first, the eight prompts share no
|
|
31384
|
+
# common prefix, so every call re-sends the whole context at full
|
|
31385
|
+
# input price: ~29,883 redundant input tokens per doc-gen run.
|
|
31386
|
+
# Leading with the identical context makes it one cache write plus
|
|
31387
|
+
# seven cache reads at 0.1x. Do not "tidy" the instruction back to
|
|
31388
|
+
# the top -- that silently restores the redundant billing.
|
|
31351
31389
|
case "$doc_type" in
|
|
31352
31390
|
README)
|
|
31353
|
-
prompt="
|
|
31391
|
+
prompt="$context
|
|
31354
31392
|
|
|
31355
|
-
|
|
31393
|
+
Based on the project context above, generate a comprehensive README.md file. Include: project title, description, features, installation instructions, usage examples, and contribution guidelines. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31356
31394
|
;;
|
|
31357
31395
|
ARCHITECTURE)
|
|
31358
|
-
prompt="
|
|
31396
|
+
prompt="$context
|
|
31359
31397
|
|
|
31360
|
-
|
|
31398
|
+
Based on the project context above, generate an ARCHITECTURE.md file. Include: system overview, high-level design, component diagram (as text), data flow, directory structure explanation, key design decisions, and technology choices. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31361
31399
|
;;
|
|
31362
31400
|
API)
|
|
31363
|
-
prompt="
|
|
31401
|
+
prompt="$context
|
|
31364
31402
|
|
|
31365
|
-
|
|
31403
|
+
Based on the project context above, generate an API.md file. Document all public APIs: REST endpoints, exported functions, classes, and their signatures. Include parameter types, return types, and brief descriptions. If no API is detected, document the main public interfaces. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31366
31404
|
;;
|
|
31367
31405
|
SETUP)
|
|
31368
|
-
prompt="
|
|
31406
|
+
prompt="$context
|
|
31369
31407
|
|
|
31370
|
-
|
|
31408
|
+
Based on the project context above, generate a SETUP.md file. Include: prerequisites, installation steps, environment variables, database setup, running locally, running in Docker (if applicable), and common troubleshooting. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31371
31409
|
;;
|
|
31372
31410
|
COMPONENTS)
|
|
31373
|
-
prompt="
|
|
31411
|
+
prompt="$context
|
|
31374
31412
|
|
|
31375
|
-
|
|
31413
|
+
Based on the project context above, generate a COMPONENTS.md file. Document each major component/module/directory: its purpose, key files, public interface, and dependencies on other components. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31376
31414
|
;;
|
|
31377
31415
|
TESTING)
|
|
31378
|
-
prompt="
|
|
31416
|
+
prompt="$context
|
|
31379
31417
|
|
|
31380
|
-
|
|
31418
|
+
Based on the project context above, generate a TESTING.md file. Include: test strategy, test types (unit, integration, e2e), how to run tests, test configuration, coverage goals, and CI integration. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31381
31419
|
;;
|
|
31382
31420
|
DECISIONS)
|
|
31383
|
-
prompt="
|
|
31421
|
+
prompt="$context
|
|
31384
31422
|
|
|
31385
|
-
|
|
31423
|
+
Based on the project context above, generate a DECISIONS.md file with Architectural Decision Records (ADRs). Infer key decisions from the technology stack, directory structure, and configuration. Each ADR should have: title, status, context, decision, and consequences. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31386
31424
|
;;
|
|
31387
31425
|
CLAUDE)
|
|
31388
|
-
prompt="
|
|
31426
|
+
prompt="$context
|
|
31389
31427
|
|
|
31390
|
-
|
|
31428
|
+
Based on the project context above, generate a CLAUDE.md file for AI agent context. Include: project overview, key commands (build, test, run, lint), project structure with brief descriptions of each directory, coding conventions, important files, and any gotchas. This file helps AI coding assistants understand the project quickly. Use markdown formatting. Do NOT use emojis. Output ONLY the markdown content, no explanations."
|
|
31391
31429
|
;;
|
|
31392
31430
|
esac
|
|
31393
31431
|
|
package/autonomy/quickstart.sh
CHANGED
|
@@ -1346,7 +1346,10 @@ cmd_quickstart() {
|
|
|
1346
1346
|
printf '\n'
|
|
1347
1347
|
printf 'Starting your build. Progress streams here in the terminal.\n'
|
|
1348
1348
|
printf ' PRD saved to: %s\n' "$target"
|
|
1349
|
-
|
|
1349
|
+
# `loki dashboard` with no subcommand prints help and exits -- it does not
|
|
1350
|
+
# start. Naming the bare command here sent every first-run user to a help
|
|
1351
|
+
# screen at the exact moment they wanted to watch their build.
|
|
1352
|
+
printf " Tip: run 'loki dashboard start' in another terminal to watch in a browser.\n"
|
|
1350
1353
|
printf '\n'
|
|
1351
1354
|
|
|
1352
1355
|
# ----- Compose with cmd_start -------------------------------------------
|
package/autonomy/run.sh
CHANGED
|
@@ -4245,6 +4245,27 @@ build_completion_summary() {
|
|
|
4245
4245
|
stopped) outcome_label="Stopped"; notify_title="Run stopped" ;;
|
|
4246
4246
|
failed) outcome_label="Failed"; notify_title="Run failed" ;;
|
|
4247
4247
|
intervention) outcome_label="Needs input"; notify_title="Input needed" ;;
|
|
4248
|
+
# Every outcome below reached this case and fell through to the `*` arm,
|
|
4249
|
+
# so the user's headline label was the raw enum string --
|
|
4250
|
+
# "council_force_approved", "max_duration" -- at the exact moment they
|
|
4251
|
+
# were deciding whether to trust the build. The guidance block further
|
|
4252
|
+
# down already handles several of these properly; only the label was
|
|
4253
|
+
# missing.
|
|
4254
|
+
force_stopped) outcome_label="Stopped without approval"
|
|
4255
|
+
notify_title="Run stopped (not approved)" ;;
|
|
4256
|
+
budget_exceeded) outcome_label="Stopped at spend cap"
|
|
4257
|
+
notify_title="Run stopped (budget cap)" ;;
|
|
4258
|
+
max_duration) outcome_label="Time limit reached"
|
|
4259
|
+
notify_title="Run stopped (time limit)" ;;
|
|
4260
|
+
max_retries_exceeded) outcome_label="Retries exhausted"
|
|
4261
|
+
notify_title="Run stopped (retries exhausted)" ;;
|
|
4262
|
+
inconclusive_spec_contradiction) outcome_label="Spec contradiction"
|
|
4263
|
+
notify_title="Run stopped (spec contradiction)" ;;
|
|
4264
|
+
# Force-approval is NOT the same as council approval, and labelling both
|
|
4265
|
+
# "Completed" hid the difference on a product whose whole claim is a
|
|
4266
|
+
# checkable receipt. Name it.
|
|
4267
|
+
council_force_approved) outcome_label="Completed (force-approved)"
|
|
4268
|
+
notify_title="Run complete (force-approved)" ;;
|
|
4248
4269
|
*) outcome_label="$outcome"; notify_title="Run finished" ;;
|
|
4249
4270
|
esac
|
|
4250
4271
|
|
|
@@ -12547,8 +12568,31 @@ auto_generate_docs_if_needed() {
|
|
|
12547
12568
|
-not -path '*/node_modules/*' -not -path '*/.loki/*' \
|
|
12548
12569
|
-not -path '*/.git/*' -not -path '*/dist/*' 2>/dev/null | head -40 | wc -l | tr -d ' ')
|
|
12549
12570
|
_doc_src="${_doc_src:-0}"
|
|
12550
|
-
# <=3 source files cannot need an architecture suite.
|
|
12551
|
-
#
|
|
12571
|
+
# <=3 source files cannot need an architecture suite. This used to cap
|
|
12572
|
+
# the timeout at 90s and still run; measurement showed that on a small
|
|
12573
|
+
# project the run reaches the cap and is KILLED (exit 124 below), so the
|
|
12574
|
+
# 90s bought nothing -- the gate then scored on whatever files already
|
|
12575
|
+
# existed, exactly as it does when generation is skipped. On the one
|
|
12576
|
+
# profiled build doc_generation was 90s of a 960s wall clock, 9%,
|
|
12577
|
+
# producing no document (benchmarks/results/gate-profile.json).
|
|
12578
|
+
#
|
|
12579
|
+
# So skip outright rather than pay for a timeout. This is not a quality
|
|
12580
|
+
# trade: the outcome for the gate is identical, and the 90s is returned
|
|
12581
|
+
# to the user. LOKI_DOCS_TIMEOUT is still honored -- the whole block is
|
|
12582
|
+
# inside `if [ -z "${LOKI_DOCS_TIMEOUT:-}" ]`, so anyone who explicitly
|
|
12583
|
+
# asks for doc generation on a tiny project still gets it.
|
|
12584
|
+
# Gate the skip on the SIMPLE tier, not on the file count alone.
|
|
12585
|
+
# A standard/complex project can legitimately have few source files and
|
|
12586
|
+
# still need its full doc suite -- tests/test-doc-scope-generator.sh
|
|
12587
|
+
# exists precisely to assert that "quality at any complexity is
|
|
12588
|
+
# preserved", and a count-only skip broke it. The simple tier already
|
|
12589
|
+
# returns early further up for the same reason, so this only shortens a
|
|
12590
|
+
# doomed run for projects that were never getting the full suite.
|
|
12591
|
+
if [ "$_doc_src" -le 3 ] && [ "${DETECTED_COMPLEXITY:-}" = "simple" ]; then
|
|
12592
|
+
log_info "Auto-documentation: ${_doc_src} source file(s) on the simple tier -- skipping generation (it times out before producing a document; set LOKI_DOCS_TIMEOUT to force it)"
|
|
12593
|
+
return 0
|
|
12594
|
+
fi
|
|
12595
|
+
# Everything else keeps the previous behavior: cap the timeout, still run.
|
|
12552
12596
|
if [ "$_doc_src" -le 3 ] && [ "$_doc_to" -gt 90 ]; then
|
|
12553
12597
|
log_info "Auto-documentation: ${_doc_src} source file(s) -- capping generation at 90s (was ${_doc_to}s)"
|
|
12554
12598
|
_doc_to=90
|
|
@@ -16802,7 +16846,32 @@ start_dashboard() {
|
|
|
16802
16846
|
return 1
|
|
16803
16847
|
fi
|
|
16804
16848
|
|
|
16805
|
-
|
|
16849
|
+
# Wait for the dashboard to come up, but only as long as it actually takes.
|
|
16850
|
+
# This was a flat `sleep 2` on the critical path of every build, before the
|
|
16851
|
+
# first iteration, spent entirely on a process that is typically serving in
|
|
16852
|
+
# a fraction of that. Poll the endpoint the reuse path above already trusts
|
|
16853
|
+
# (/api/status), so this returns the moment the server really serves rather
|
|
16854
|
+
# than on a fixed guess.
|
|
16855
|
+
#
|
|
16856
|
+
# The floor is deliberate and NOT an optimization target. A process that
|
|
16857
|
+
# starts and then dies at t=1.5s would pass an early `kill -0` where the old
|
|
16858
|
+
# flat sleep would have caught it, so polling alone would trade a real
|
|
16859
|
+
# liveness check for a second of wall clock. We keep polling until the
|
|
16860
|
+
# endpoint answers AND require the process to still be alive at the end,
|
|
16861
|
+
# which is strictly stronger than the old single check at t=2s.
|
|
16862
|
+
_dash_ready=0
|
|
16863
|
+
for _ in $(seq 1 40); do
|
|
16864
|
+
kill -0 "$DASHBOARD_PID" 2>/dev/null || break
|
|
16865
|
+
if curl -fsS -m 1 "http://127.0.0.1:${DASHBOARD_PORT}/api/status" >/dev/null 2>&1; then
|
|
16866
|
+
_dash_ready=1
|
|
16867
|
+
break
|
|
16868
|
+
fi
|
|
16869
|
+
sleep 0.05
|
|
16870
|
+
done
|
|
16871
|
+
# A server that never answered still gets the original grace period: some
|
|
16872
|
+
# environments have no curl, and the endpoint is not the only thing that
|
|
16873
|
+
# makes a dashboard useful. Falling back keeps behavior identical there.
|
|
16874
|
+
[ "$_dash_ready" = "1" ] || sleep 2
|
|
16806
16875
|
|
|
16807
16876
|
if kill -0 "$DASHBOARD_PID" 2>/dev/null; then
|
|
16808
16877
|
DASHBOARD_LAST_ALIVE=$(date +%s)
|
|
@@ -26073,6 +26142,18 @@ main() {
|
|
|
26073
26142
|
exit 1
|
|
26074
26143
|
fi
|
|
26075
26144
|
|
|
26145
|
+
# BOOT WINDOW (v9.24.0). Everything from here to setup_agent_branch is
|
|
26146
|
+
# pre-loop setup: prerequisites, provider detection, complexity detection,
|
|
26147
|
+
# dashboard start, branch setup. None of it was timed, and none of the nine
|
|
26148
|
+
# existing emit_stage_complete sites lies outside the iteration body -- so
|
|
26149
|
+
# on the one profiled build, stage_total_s summed to 723s against a 960s
|
|
26150
|
+
# wall clock and 237s (25%) was attributed by GUESS, not measurement
|
|
26151
|
+
# (benchmarks/results/gate-profile.json). The guess named "rsync of the
|
|
26152
|
+
# engine copy", which measurement later falsified: the only rsync in the
|
|
26153
|
+
# repo is in the benchmark harness, costs 1.09s, and runs before the timer
|
|
26154
|
+
# starts. Bracket the window instead of arguing about it.
|
|
26155
|
+
_boot_t0=$(date +%s 2>/dev/null)
|
|
26156
|
+
|
|
26076
26157
|
# Check prerequisites (unless skipped)
|
|
26077
26158
|
if [ "$SKIP_PREREQS" != "true" ]; then
|
|
26078
26159
|
if ! check_prerequisites; then
|
|
@@ -26288,6 +26369,11 @@ main() {
|
|
|
26288
26369
|
# Setup agent branch protection (isolates agent changes to a feature branch)
|
|
26289
26370
|
setup_agent_branch
|
|
26290
26371
|
|
|
26372
|
+
# Close the boot window. Purely additive: emit_stage_complete appends one
|
|
26373
|
+
# event line and swallows every error, so it cannot alter a gate verdict or
|
|
26374
|
+
# control flow (see its contract at run.sh:2523-2531).
|
|
26375
|
+
emit_stage_complete "boot" "pass" "$_boot_t0"
|
|
26376
|
+
|
|
26291
26377
|
# Log session start for audit
|
|
26292
26378
|
audit_log "SESSION_START" "prd=$PRD_PATH,dashboard=$ENABLE_DASHBOARD,staged_autonomy=$STAGED_AUTONOMY,parallel=$PARALLEL_MODE"
|
|
26293
26379
|
audit_agent_action "session_start" "Session started" "prd=$PRD_PATH,provider=${PROVIDER_NAME:-claude}"
|
|
@@ -26384,6 +26470,11 @@ main() {
|
|
|
26384
26470
|
# a stuck "Planning" state.
|
|
26385
26471
|
_advance_current_phase "BUILDING"
|
|
26386
26472
|
run_autonomous "$PRD_PATH" || result=$?
|
|
26473
|
+
# TEARDOWN WINDOW (v9.24.0): the other half of the unmeasured 237s.
|
|
26474
|
+
# Everything after the loop -- pre-edit snapshot, commit, handoff and
|
|
26475
|
+
# learnings writers, proof generation, metrics aggregation -- runs here
|
|
26476
|
+
# and was never timed. Opened immediately so nothing below is missed.
|
|
26477
|
+
_teardown_t0=$(date +%s 2>/dev/null)
|
|
26387
26478
|
# PRE-EDIT SNAPSHOT: freeze the agent's raw diff HERE, the first
|
|
26388
26479
|
# instruction after the loop returns, because everything below this line
|
|
26389
26480
|
# can change the tree -- commit_session_changes commits the work (after
|
|
@@ -26578,6 +26669,14 @@ except Exception:
|
|
|
26578
26669
|
generate_proof_of_run "$result" || true
|
|
26579
26670
|
fi
|
|
26580
26671
|
|
|
26672
|
+
# Close the teardown window here rather than after cleanup: everything below
|
|
26673
|
+
# is process reaping and file removal, while everything above is the work a
|
|
26674
|
+
# user waits on (commit, PR, summary, proof). Emitting before cleanup also
|
|
26675
|
+
# guarantees the event is written even if a later reap kills this shell.
|
|
26676
|
+
if [ -n "${_teardown_t0:-}" ]; then
|
|
26677
|
+
emit_stage_complete "teardown" "pass" "$_teardown_t0"
|
|
26678
|
+
fi
|
|
26679
|
+
|
|
26581
26680
|
# Cleanup
|
|
26582
26681
|
if type app_runner_cleanup &>/dev/null; then
|
|
26583
26682
|
app_runner_cleanup
|
package/dashboard/__init__.py
CHANGED
package/docs/INSTALLATION.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The flagship product of [Autonomi](https://www.autonomi.dev/). Loki Mode is a spec-driven autonomous builder with a built-in trust layer that takes any spec to a deployed product and verifies completion with evidence (quality gates plus a completion council), not just a "done" claim. Complete installation instructions for all platforms and use cases.
|
|
4
4
|
|
|
5
|
-
**Version:** v9.
|
|
5
|
+
**Version:** v9.25.2
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|