loki-mode 11.40.0 → 11.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/lib/efficiency_cost.py +24 -0
- package/autonomy/run.sh +21 -9
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +22 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/loki-ts/data/model-pricing.json +1 -0
- package/loki-ts/dist/loki.js +1097 -1097
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +218 -198
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-p-RKJjMN.js → AdminPage-CNTe8IVe.js} +1 -1
- package/web-app/dist/assets/{Avatar-BjoGcPik.js → Avatar-Oq57sqg7.js} +1 -1
- package/web-app/dist/assets/{Badge-B1mLd-79.js → Badge-BvBY8P-y.js} +1 -1
- package/web-app/dist/assets/{Button-BjhRKQbb.js → Button-DSSiH2mT.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-CkSNSL32.js → CockpitPage-yV3PAqni.js} +1 -1
- package/web-app/dist/assets/{ComparePage-B0Aw7I9x.js → ComparePage-CUjIe9kH.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-BcU3oAZ3.js → ErrorBoundary-BkYiI8Mu.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-24LwFgFb.js → EvidenceReceiptPanel-B5A_mXte.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-CGv0HKPi.js → GitHubIssuesPanel-CdSyKuSm.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BsdNy2C5.js → GitHubPRsPanel-DoFVLY3f.js} +1 -1
- package/web-app/dist/assets/{HomePage-DvVbWUZA.js → HomePage-n2dgK5Rf.js} +2 -2
- package/web-app/dist/assets/{LoginPage-BNrAxlRi.js → LoginPage-DJf5ppa-.js} +1 -1
- package/web-app/dist/assets/{MagicPage-D2QZjEAZ.js → MagicPage-C6oi6n5F.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-BOYkm2zk.js → MetricsPage-YKC6H6Hw.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BD1VPbHa.js → NotFoundPage-D6BNXQ-G.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-BdpZdNHa.js → ProjectPage-B-RwFQHZ.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-CLuLEdxd.js → ProjectsPage-CMtwnrAG.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-DRJULFEa.js → SettingsPage-CgNwLhM3.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-C99iNlrf.js → ShowcasePage-CV5c9XWv.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-D3MbpQIy.js → SystemSettingsPage-DHbtHp0C.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CiGXZLru.js → TeamsPage-rxUHIlyD.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-ggdmWggo.js → TemplatesPage-CVdb9Qsj.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-Bv6B7E5y.js → TerminalOutput-C2DAZrJj.js} +1 -1
- package/web-app/dist/assets/{activity-DjGsvCmy.js → activity-DeLfoFEJ.js} +1 -1
- package/web-app/dist/assets/{bell-CGnEzRGV.js → bell-BaxCSff-.js} +1 -1
- package/web-app/dist/assets/{bot-CgGaaPS2.js → bot-C6g64uwh.js} +1 -1
- package/web-app/dist/assets/{check-BcnYM4Ag.js → check-CMqsq_g-.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DEzx71XG.js → chevron-left-B8peFCxO.js} +1 -1
- package/web-app/dist/assets/{circle-alert-CxHpfqnB.js → circle-alert-DKRYZ5BY.js} +1 -1
- package/web-app/dist/assets/{clock-CTMbchNi.js → clock-DsaglF4d.js} +1 -1
- package/web-app/dist/assets/{cloud-COPPnmqG.js → cloud-DaM67nCL.js} +1 -1
- package/web-app/dist/assets/{code-xml-C7wRH4hG.js → code-xml-X2JDu7al.js} +1 -1
- package/web-app/dist/assets/{database-Ck1WjxAG.js → database-DJPDNG4X.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-CHpFeeAJ.js → dollar-sign-DNp3Vo1-.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-Bvz4JZkM.js → file-code-corner-B7ZQvYMh.js} +1 -1
- package/web-app/dist/assets/{file-plus-DgOe1XY8.js → file-plus-D2jPBtwH.js} +1 -1
- package/web-app/dist/assets/{globe-Bm3qr09s.js → globe-a2Gz-HSB.js} +1 -1
- package/web-app/dist/assets/{hammer-BlUi98hw.js → hammer-DN2g4Uam.js} +1 -1
- package/web-app/dist/assets/{index-4BrDzHz3.js → index-BHto0s0M.js} +3 -3
- package/web-app/dist/assets/{layers-Cu_pNTwy.js → layers-DMuVpl3G.js} +1 -1
- package/web-app/dist/assets/{loader-circle-ClaYSJIg.js → loader-circle-C5neFR9D.js} +1 -1
- package/web-app/dist/assets/{lock-DzFMEjL0.js → lock-xna1m06d.js} +1 -1
- package/web-app/dist/assets/{package-LfzNPC_L.js → package-exu1H2r0.js} +1 -1
- package/web-app/dist/assets/{plus-DLntn3jw.js → plus-DztHgdhn.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-DdUJIS6x.js → refresh-cw-B4J0iaBR.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-D878TXBs.js → rotate-ccw-CTJiHtrD.js} +1 -1
- package/web-app/dist/assets/{scroll-text-BfS7Hxli.js → scroll-text-CazL9DFq.js} +1 -1
- package/web-app/dist/assets/{server-Dz4fXHHH.js → server-BJsl_c5h.js} +1 -1
- package/web-app/dist/assets/{shield-alert-2oLnQ56Z.js → shield-alert-LtiNsIbt.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DV9yRc0e.js → thumbs-up-DI18NmBa.js} +1 -1
- package/web-app/dist/assets/{trash-2-ATUWTDSk.js → trash-2-CIJXcrLn.js} +1 -1
- package/web-app/dist/assets/{trending-down-Cgn1GMMT.js → trending-down-CT0j-eRX.js} +1 -1
- package/web-app/dist/assets/{trending-up-CSF6Y_u6.js → trending-up-vP7_4ir4.js} +1 -1
- package/web-app/dist/assets/{upload-jOidrbCO.js → upload-CDRPSXFK.js} +1 -1
- package/web-app/dist/assets/{usePolling-Iulf494p.js → usePolling-B0gNIaHu.js} +1 -1
- package/web-app/dist/assets/{user-Cez6NU6B.js → user-DspAj71O.js} +1 -1
- package/web-app/dist/index.html +1 -1
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: loki-mode
|
|
|
3
3
|
description: Runs an autonomous software factory that knows what it is supposed to deliver and proves it did, with a signed receipt. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Loki Mode v11.
|
|
6
|
+
# Loki Mode v11.42.0
|
|
7
7
|
|
|
8
8
|
**Current entry points (Loki 10 engine):** `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run the Loki 10 engine and end with a signed receipt (`loki verify`). `loki backlog owner/repo --all` runs many issues in parallel. Guide: `docs/v10/GUIDE.md`. The skill instructions below, and `loki start`, describe the previous bash loop. PRD-file starts (`loki start ./prd.md`) and the opencode provider still run on it until FC38-SWEEP ports them; the legacy-engine command and the LOKI_ENGINE switch remain removed. Prefer `loki owner/repo#N` for issues.
|
|
9
9
|
|
|
@@ -476,4 +476,4 @@ Implemented, planned and deprecated items, with the version each landed in: `ski
|
|
|
476
476
|
|
|
477
477
|
---
|
|
478
478
|
|
|
479
|
-
**v11.
|
|
479
|
+
**v11.42.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.42.0
|
|
@@ -32,6 +32,7 @@ __all__ = [
|
|
|
32
32
|
"read_child_ledger",
|
|
33
33
|
"load_prices",
|
|
34
34
|
"price_from_tokens",
|
|
35
|
+
"inference_geo_multiplier",
|
|
35
36
|
"DEFAULT_PRICES_PATH",
|
|
36
37
|
]
|
|
37
38
|
|
|
@@ -48,6 +49,29 @@ DEFAULT_PRICES_PATH = os.path.join(
|
|
|
48
49
|
# small helpers (self-contained copies; proof-generator.py keeps its own)
|
|
49
50
|
# ---------------------------------------------------------------------------
|
|
50
51
|
|
|
52
|
+
# Price multiplier for LOKI_INFERENCE_GEO, read from the same file the TS gate
|
|
53
|
+
# reads (inference_geo_multipliers in loki-ts/data/model-pricing.json). Unset,
|
|
54
|
+
# global and unknown values are 1.0; an unreadable file falls back to 1.1 for
|
|
55
|
+
# "us" so a budget never silently under-counts.
|
|
56
|
+
MODEL_PRICING_PATH = os.path.join(_REPO_ROOT, "loki-ts", "data", "model-pricing.json")
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def inference_geo_multiplier(env=None, pricing_path=None):
|
|
60
|
+
geo = ((env if env is not None else os.environ).get("LOKI_INFERENCE_GEO") or "").strip().lower()
|
|
61
|
+
if not geo:
|
|
62
|
+
return 1.0
|
|
63
|
+
table = None
|
|
64
|
+
try:
|
|
65
|
+
with open(pricing_path or MODEL_PRICING_PATH, "r") as f:
|
|
66
|
+
table = json.load(f).get("inference_geo_multipliers")
|
|
67
|
+
except Exception:
|
|
68
|
+
table = None
|
|
69
|
+
if not isinstance(table, dict):
|
|
70
|
+
table = {"us": 1.1}
|
|
71
|
+
m = table.get(geo)
|
|
72
|
+
return float(m) if isinstance(m, (int, float)) and m > 0 else 1.0
|
|
73
|
+
|
|
74
|
+
|
|
51
75
|
def _read_json(path, default=None):
|
|
52
76
|
try:
|
|
53
77
|
with open(path, "r") as f:
|
package/autonomy/run.sh
CHANGED
|
@@ -18235,16 +18235,14 @@ metadata. This saves tokens without treating dependency changes as unreviewed.""
|
|
|
18235
18235
|
|
|
18236
18236
|
_persona_line = (persona.strip() + "\n\n") if persona.strip() else ""
|
|
18237
18237
|
|
|
18238
|
-
|
|
18239
|
-
|
|
18240
|
-
|
|
18241
|
-
|
|
18242
|
-
Files changed:
|
|
18238
|
+
# #270: the shared Files and Review context block, evidence and calibration come FIRST and the per-reviewer
|
|
18239
|
+
# role last, so parallel reviewers of one gate share a byte-identical cacheable prefix. Mirrors
|
|
18240
|
+
# buildReviewerPrompt in loki-ts/src/runner/quality_gates.ts.
|
|
18241
|
+
prompt = f"""Files changed:
|
|
18243
18242
|
{files}
|
|
18244
18243
|
|
|
18245
18244
|
Review context:
|
|
18246
18245
|
{diff}
|
|
18247
|
-
{requirements_section}
|
|
18248
18246
|
|
|
18249
18247
|
{review_context_note}
|
|
18250
18248
|
|
|
@@ -18254,6 +18252,11 @@ Build: {json.dumps(build, sort_keys=True, ensure_ascii=True)}
|
|
|
18254
18252
|
|
|
18255
18253
|
{severity_calibration}
|
|
18256
18254
|
|
|
18255
|
+
{_persona_line}You are {name}. Your SOLE focus is: {focus}.
|
|
18256
|
+
|
|
18257
|
+
Review ONLY for: {checks}.
|
|
18258
|
+
{requirements_section}
|
|
18259
|
+
|
|
18257
18260
|
{output_format}"""
|
|
18258
18261
|
|
|
18259
18262
|
prompt_bytes = prompt.encode("utf-8")
|
|
@@ -20502,8 +20505,16 @@ check_budget_limit() {
|
|
|
20502
20505
|
# Calculate cost from per-iteration efficiency files (same source as /api/cost)
|
|
20503
20506
|
if [ -d "$efficiency_dir" ]; then
|
|
20504
20507
|
current_cost=$(python3 -c "
|
|
20505
|
-
import json, glob
|
|
20508
|
+
import json, glob, os, sys
|
|
20506
20509
|
total = 0.0
|
|
20510
|
+
# LOKI_INFERENCE_GEO multiplier on token-priced records, from the same JSON the
|
|
20511
|
+
# TS gate reads (autonomy/lib/efficiency_cost.py); the fallback keeps us at 1.1.
|
|
20512
|
+
try:
|
|
20513
|
+
sys.path.insert(0, '${SCRIPT_DIR}/lib')
|
|
20514
|
+
from efficiency_cost import inference_geo_multiplier
|
|
20515
|
+
geo = inference_geo_multiplier()
|
|
20516
|
+
except Exception:
|
|
20517
|
+
geo = 1.1 if os.environ.get('LOKI_INFERENCE_GEO', '').strip().lower() == 'us' else 1.0
|
|
20507
20518
|
pricing = {
|
|
20508
20519
|
'fable': {'input': 10.00, 'output': 50.00, 'cache_read': 0.25, 'cache_write': 12.5, 'cache_write_1h': 20},
|
|
20509
20520
|
'claude-fable-5': {'input': 10.00, 'output': 50.00, 'cache_read': 0.25, 'cache_write': 12.5, 'cache_write_1h': 20},
|
|
@@ -20544,8 +20555,9 @@ for f in glob.glob('${efficiency_dir}/*.json'):
|
|
|
20544
20555
|
# same run reports two different spends.
|
|
20545
20556
|
cr = d.get('cache_read_tokens', 0) or 0
|
|
20546
20557
|
cw = d.get('cache_creation_tokens', 0) or 0
|
|
20547
|
-
|
|
20548
|
-
|
|
20558
|
+
rec = (inp / 1_000_000) * p['input'] + (out / 1_000_000) * p['output']
|
|
20559
|
+
rec += (cr / 1_000_000) * p.get('cache_read', p['input'] * 0.1) + (cw / 1_000_000) * p.get('cache_write', p['input'] * 1.25)
|
|
20560
|
+
total += rec * geo
|
|
20549
20561
|
except: pass
|
|
20550
20562
|
print(round(total, 4))
|
|
20551
20563
|
" 2>/dev/null || echo "0")
|
package/dashboard/__init__.py
CHANGED
package/dashboard/server.py
CHANGED
|
@@ -7830,6 +7830,25 @@ def _record_is_measured(rec: Any) -> bool:
|
|
|
7830
7830
|
return False
|
|
7831
7831
|
|
|
7832
7832
|
|
|
7833
|
+
def _inference_geo_multiplier() -> float:
|
|
7834
|
+
"""LOKI_INFERENCE_GEO price multiplier. Mirrors inference_geo_multiplier() in
|
|
7835
|
+
autonomy/lib/efficiency_cost.py (same JSON key, us falls back to 1.1); kept as
|
|
7836
|
+
a local copy for the same reason as _MEASURED_FIELDS."""
|
|
7837
|
+
geo = (os.environ.get("LOKI_INFERENCE_GEO") or "").strip().lower()
|
|
7838
|
+
if not geo:
|
|
7839
|
+
return 1.0
|
|
7840
|
+
table = None
|
|
7841
|
+
try:
|
|
7842
|
+
path = _Path(__file__).resolve().parent.parent / "loki-ts" / "data" / "model-pricing.json"
|
|
7843
|
+
table = json.loads(path.read_text()).get("inference_geo_multipliers")
|
|
7844
|
+
except Exception:
|
|
7845
|
+
table = None
|
|
7846
|
+
if not isinstance(table, dict):
|
|
7847
|
+
table = {"us": 1.1}
|
|
7848
|
+
m = table.get(geo)
|
|
7849
|
+
return float(m) if isinstance(m, (int, float)) and m > 0 else 1.0
|
|
7850
|
+
|
|
7851
|
+
|
|
7833
7852
|
def _calculate_model_cost(
|
|
7834
7853
|
model: str,
|
|
7835
7854
|
input_tokens: int,
|
|
@@ -7856,7 +7875,9 @@ def _calculate_model_cost(
|
|
|
7856
7875
|
output_cost = (output_tokens / 1_000_000) * pricing.get("output", 15.00)
|
|
7857
7876
|
cache_read_cost = (cache_read_tokens / 1_000_000) * pricing.get("cache_read", inp_rate * 0.1)
|
|
7858
7877
|
cache_write_cost = (cache_creation_tokens / 1_000_000) * pricing.get("cache_write", inp_rate * 1.25)
|
|
7859
|
-
return round(
|
|
7878
|
+
return round(
|
|
7879
|
+
(input_cost + output_cost + cache_read_cost + cache_write_cost) * _inference_geo_multiplier(), 6
|
|
7880
|
+
)
|
|
7860
7881
|
|
|
7861
7882
|
|
|
7862
7883
|
@app.get("/api/cost", dependencies=[Depends(auth.require_scope("read"))])
|
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.42.0. Do not edit by hand.
|
|
4
4
|
Hidden and legacy-only commands are omitted; see `docs/v10/CLI-MODERN.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.42.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
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"_comment": "Rolling pricing table consumed by loki-ts/src/runner/budget.ts. Update this file when Anthropic / OpenAI / others publish new prices; no code change required. Pricing is USD per 1 million tokens. Aliases (opus/sonnet/haiku) point to the latest model of that family per providers/model_catalog.json.",
|
|
4
4
|
"_updated": "2026-10-08",
|
|
5
5
|
"default_max_cost_usd": 100,
|
|
6
|
+
"inference_geo_multipliers": {"us": 1.1},
|
|
6
7
|
"_source": "https://platform.claude.com/docs/en/about-claude/pricing (docs.anthropic.com/en/docs/about-claude/pricing 301-redirects there), read 2026-10-08. Per MTok. fable=Claude Fable 5.1 $10/$50, cache read $0.25 (0.025x), 5m write $12.50, 1h write $20. opus=Claude Opus 5.5 $4/$20, cache read $0.20 (0.05x), 5m write $5, 1h write $8. sonnet=Claude Sonnet 5.5 $2/$10, cache read $0.10 (0.05x), 5m write $2.50, 1h write $4. haiku alias row prices as its catalog target claude-haiku-5-5 (providers/model_catalog.json cli_aliases), so it equals that row including over_100k; Haiku 4.5 ($1/$5) is no longer an alias target. claude-haiku-5-5 (exact id, same as the haiku alias): $0.10/$0.50, read $0.01, 5m $0.125, 1h $0.20 up to 100,000 prompt tokens; over_100k $0.50/$2.50, read $0.05, 5m $0.625, 1h $1. Fields: cache_write is the 5m write rate (legacy readers); cache_write_5m and cache_write_1h are the explicit tiers. Multipliers: 5m write 1.25x, 1h write 2x, read 0.1x (0.05x on Opus 5.5 and Sonnet 5.5, 0.025x on Fable 5.1). OpenAI rows (gpt-5.3-codex, gpt-5.6-sol/terra/luna): https://developers.openai.com/api/docs/pricing, read 2026-10-08, Standard tier, short context (up to 272K); cached input is the cache_read field; OpenAI bills no cache write, cache_write is a 1.25x placeholder.",
|
|
7
8
|
"pricing": {
|
|
8
9
|
"fable": {
|