loki-mode 7.103.0 → 7.104.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/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/loki +29 -15
- package/autonomy/run.sh +65 -9
- package/autonomy/verify.sh +185 -0
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +137 -24
- package/dashboard/static/index.html +57 -5
- package/docs/INSTALLATION.md +1 -1
- package/docs/SONNET5-DEFAULT-PLAN.md +157 -0
- package/loki-ts/data/model-pricing.json +3 -3
- package/loki-ts/dist/loki.js +105 -104
- package/mcp/__init__.py +1 -1
- package/package.json +2 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/providers/claude.sh +15 -9
- package/providers/model_catalog.json +20 -19
- package/vendor/autonomi-verify/LICENSE +39 -0
- package/vendor/autonomi-verify/README.md +58 -0
- package/vendor/autonomi-verify/embed.js +8 -0
package/mcp/__init__.py
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loki-mode",
|
|
3
3
|
"mcpName": "io.github.asklokesh/loki-mode",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.104.1",
|
|
5
5
|
"description": "Loki Mode by Autonomi. Autonomous spec-to-product system: takes a PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief to a deployed app via the RARV-C closure loop with 8 quality gates. Provider-agnostic (Claude Code, OpenAI Codex, Cline, Aider).",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"agent",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
".claude-plugin/marketplace.json",
|
|
72
72
|
"autonomy/",
|
|
73
73
|
"providers/",
|
|
74
|
+
"vendor/autonomi-verify/",
|
|
74
75
|
"agents/",
|
|
75
76
|
"skills/",
|
|
76
77
|
"references/",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
3
|
"name": "loki-mode",
|
|
4
4
|
"displayName": "Loki Mode",
|
|
5
|
-
"version": "7.
|
|
5
|
+
"version": "7.104.1",
|
|
6
6
|
"description": "Autonomous spec-to-product build system with a built-in trust layer (RARV-C closure loop, 8 quality gates, completion council). Ships Loki's spec-hardening, drift-detection, and deterministic PR verification commands plus the Loki MCP server.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Autonomi",
|
package/providers/claude.sh
CHANGED
|
@@ -52,8 +52,13 @@ PROVIDER_MAX_PARALLEL=10
|
|
|
52
52
|
# sonnet -> latest Sonnet (e.g. claude-sonnet-4-6)
|
|
53
53
|
# haiku -> latest Haiku (e.g. claude-haiku-4-5)
|
|
54
54
|
# Override per tier with LOKI_CLAUDE_MODEL_PLANNING, _DEVELOPMENT, _FAST.
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
# v7.104.0: Sonnet 5 is the default execution model (was opus for planning+dev).
|
|
56
|
+
# Cheaper + faster near-frontier builder; the trust gate is unchanged by default
|
|
57
|
+
# and a strong Opus judge is opt-in via LOKI_ADVISOR_MODEL (see _dispatch_reviewer).
|
|
58
|
+
# To restore Opus execution: LOKI_CLAUDE_MODEL_DEVELOPMENT=opus (and _PLANNING=opus),
|
|
59
|
+
# or the dashboard "set all to opus". Planning-on-Opus is a one-line revert here.
|
|
60
|
+
CLAUDE_DEFAULT_PLANNING="sonnet"
|
|
61
|
+
CLAUDE_DEFAULT_DEVELOPMENT="sonnet"
|
|
57
62
|
CLAUDE_DEFAULT_FAST="sonnet"
|
|
58
63
|
|
|
59
64
|
if [ "${LOKI_ALLOW_HAIKU:-false}" = "true" ]; then
|
|
@@ -379,13 +384,14 @@ loki_apply_max_tier_clamp() {
|
|
|
379
384
|
# Resolves a capability tier to a concrete model name at runtime.
|
|
380
385
|
# Respects LOKI_MAX_TIER to cap cost via loki_apply_max_tier_clamp. NOTE the
|
|
381
386
|
# ceiling clamps DOWN to the provider's configured tier model, not to the alias
|
|
382
|
-
# named by the cap
|
|
383
|
-
#
|
|
384
|
-
# PROVIDER_MODEL_DEVELOPMENT, which is
|
|
385
|
-
# ceiling
|
|
386
|
-
#
|
|
387
|
-
#
|
|
388
|
-
#
|
|
387
|
+
# named by the cap. As of v7.104.0 the stock config is
|
|
388
|
+
# CLAUDE_DEFAULT_DEVELOPMENT=sonnet, so LOKI_MAX_TIER=sonnet resolves
|
|
389
|
+
# planning/fable DOWN to PROVIDER_MODEL_DEVELOPMENT, which is now sonnet - the
|
|
390
|
+
# ceiling genuinely pins sonnet with the stock config (previously it clamped to
|
|
391
|
+
# opus because dev defaulted to opus). To cap harder, LOKI_MAX_TIER=haiku pins
|
|
392
|
+
# everything to PROVIDER_MODEL_FAST. This is intentional and is mirrored
|
|
393
|
+
# byte-for-byte by the dashboard/estimator ports (parity-locked in
|
|
394
|
+
# tests/test-model-override.sh).
|
|
389
395
|
# Capability aliases: "best" -> planning tier, "fast" -> fast tier, "balanced" -> development tier
|
|
390
396
|
resolve_model_for_tier() {
|
|
391
397
|
local tier="$1"
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_comment": "Canonical model catalog. Update this single file when a provider ships a new model. Providers/web-app/docs read from here.",
|
|
3
3
|
"schema_version": 1,
|
|
4
|
-
"updated": "2026-
|
|
4
|
+
"updated": "2026-06-30",
|
|
5
5
|
"providers": {
|
|
6
6
|
"claude": {
|
|
7
|
-
"latest_planning": "claude-opus-4-
|
|
8
|
-
"latest_development": "claude-
|
|
9
|
-
"latest_fast": "claude-sonnet-
|
|
7
|
+
"latest_planning": "claude-opus-4-8",
|
|
8
|
+
"latest_development": "claude-sonnet-5",
|
|
9
|
+
"latest_fast": "claude-sonnet-5",
|
|
10
10
|
"cli_aliases": {
|
|
11
11
|
"fable": "claude-fable-5",
|
|
12
|
-
"opus": "claude-opus-4-
|
|
13
|
-
"sonnet": "claude-sonnet-
|
|
12
|
+
"opus": "claude-opus-4-8",
|
|
13
|
+
"sonnet": "claude-sonnet-5",
|
|
14
14
|
"haiku": "claude-haiku-4-5"
|
|
15
15
|
},
|
|
16
16
|
"models": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"notes": "Top-tier advisory model. Pricing 2x Opus ($10/$50 per MTok). Doc-supported for architecture/root-cause; opt-in only (cost). Refuses cyber content, so NOT used for security review."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
"id": "claude-opus-4-
|
|
26
|
+
"id": "claude-opus-4-8",
|
|
27
27
|
"alias": "opus",
|
|
28
28
|
"tier": "planning",
|
|
29
29
|
"context_window": 1000000,
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
"notes": "Adaptive thinking, xhigh effort for agentic coding"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"id": "claude-sonnet-
|
|
34
|
+
"id": "claude-sonnet-5",
|
|
35
35
|
"alias": "sonnet",
|
|
36
36
|
"tier": "development",
|
|
37
37
|
"context_window": 1000000,
|
|
38
|
-
"max_output": 64000
|
|
38
|
+
"max_output": 64000,
|
|
39
|
+
"notes": "Default execution model as of v7.104.0. Intro price $2/$10 per MTok through 2026-08-31; list price $3/$15 per MTok."
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
42
|
"id": "claude-haiku-4-5",
|
|
@@ -58,22 +59,22 @@
|
|
|
58
59
|
"notes": "Codex uses a single model with effort level (xhigh/high/low) for tier differentiation"
|
|
59
60
|
},
|
|
60
61
|
"cline": {
|
|
61
|
-
"latest_planning": "claude-opus-4-
|
|
62
|
-
"latest_development": "claude-
|
|
63
|
-
"latest_fast": "claude-sonnet-
|
|
62
|
+
"latest_planning": "claude-opus-4-8",
|
|
63
|
+
"latest_development": "claude-sonnet-5",
|
|
64
|
+
"latest_fast": "claude-sonnet-5",
|
|
64
65
|
"models": [
|
|
65
|
-
{ "id": "claude-opus-4-
|
|
66
|
-
{ "id": "claude-sonnet-
|
|
66
|
+
{ "id": "claude-opus-4-8", "tier": "planning" },
|
|
67
|
+
{ "id": "claude-sonnet-5", "tier": "development" },
|
|
67
68
|
{ "id": "gpt-4.1", "tier": "development" }
|
|
68
69
|
]
|
|
69
70
|
},
|
|
70
71
|
"aider": {
|
|
71
|
-
"latest_planning": "claude-opus-4-
|
|
72
|
-
"latest_development": "claude-
|
|
73
|
-
"latest_fast": "claude-sonnet-
|
|
72
|
+
"latest_planning": "claude-opus-4-8",
|
|
73
|
+
"latest_development": "claude-sonnet-5",
|
|
74
|
+
"latest_fast": "claude-sonnet-5",
|
|
74
75
|
"models": [
|
|
75
|
-
{ "id": "claude-opus-4-
|
|
76
|
-
{ "id": "claude-sonnet-
|
|
76
|
+
{ "id": "claude-opus-4-8", "tier": "planning" },
|
|
77
|
+
{ "id": "claude-sonnet-5", "tier": "development" },
|
|
77
78
|
{ "id": "gpt-4.1", "tier": "development" },
|
|
78
79
|
{ "id": "ollama_chat/deepseek-coder", "tier": "fast" }
|
|
79
80
|
]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
AUTONOMI VERIFY - COMMERCIAL LICENSE NOTICE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Autonomi. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This directory contains a pre-built, dependency-free bundle ("the Bundle") of
|
|
6
|
+
the Autonomi Verify engine. The Bundle is proprietary commercial software of
|
|
7
|
+
Autonomi and is provided to you ONLY as an embedded component of Loki Mode.
|
|
8
|
+
|
|
9
|
+
This Commercial License Notice is SEPARATE FROM and DISTINCT FROM the Business
|
|
10
|
+
Source License 1.1 (BUSL-1.1) that governs the rest of the Loki Mode
|
|
11
|
+
repository. The BUSL-1.1 terms do NOT apply to the Bundle. The Bundle is not
|
|
12
|
+
open source.
|
|
13
|
+
|
|
14
|
+
PERMITTED USE
|
|
15
|
+
You may execute the Bundle solely as invoked by Loki Mode for the purpose of
|
|
16
|
+
verifying your own changes (the `loki verify --hosted` path). No other use is
|
|
17
|
+
granted.
|
|
18
|
+
|
|
19
|
+
RESTRICTIONS
|
|
20
|
+
Except as expressly permitted above, you may NOT:
|
|
21
|
+
- copy, redistribute, sublicense, sell, or host the Bundle as a service;
|
|
22
|
+
- reverse engineer, decompile, or disassemble the Bundle, or attempt to
|
|
23
|
+
derive its source code, except to the limited extent applicable law
|
|
24
|
+
expressly permits despite this restriction;
|
|
25
|
+
- remove or alter this notice.
|
|
26
|
+
|
|
27
|
+
NO SOURCE GRANT
|
|
28
|
+
The source code of the Autonomi Verify engine is NOT included in this
|
|
29
|
+
repository and is NOT licensed to you. Only the built Bundle is distributed
|
|
30
|
+
here.
|
|
31
|
+
|
|
32
|
+
NO WARRANTY
|
|
33
|
+
THE BUNDLE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
36
|
+
AUTONOMI BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM,
|
|
37
|
+
OUT OF, OR IN CONNECTION WITH THE BUNDLE OR ITS USE.
|
|
38
|
+
|
|
39
|
+
For licensing inquiries beyond the permitted use above, contact Autonomi.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Autonomi Verify (embedded bundle)
|
|
2
|
+
|
|
3
|
+
This directory contains a single pre-built, dependency-free JavaScript bundle of
|
|
4
|
+
the Autonomi Verify deterministic verification engine.
|
|
5
|
+
|
|
6
|
+
- `embed.js` - the bundled engine (runtime: `bun`). Built from the PRIVATE
|
|
7
|
+
Autonomi Verify source repository; only the built artifact is committed here.
|
|
8
|
+
The TypeScript source is NOT included and is NOT part of this repository.
|
|
9
|
+
- `LICENSE` - the COMMERCIAL license notice covering `embed.js`. This is
|
|
10
|
+
distinct from the Business Source License 1.1 that governs the rest of
|
|
11
|
+
Loki Mode. `embed.js` is proprietary and is not open source.
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
`embed.js` observes a local git working directory read-only and runs the
|
|
16
|
+
Autonomi Verify evidence gate, printing the verdict fields as one JSON object on
|
|
17
|
+
stdout. It performs NO network access and NEVER executes the project's tests
|
|
18
|
+
(that is reserved for the hosted/sandboxed Phase 2 surface).
|
|
19
|
+
|
|
20
|
+
Invocation contract:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
bun vendor/autonomi-verify/embed.js --dir <path> [--base <ref>] [--head <ref>]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Output (stdout, on a produced verdict, exit 0):
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"engine": "autonomi-verify",
|
|
31
|
+
"engine_version": "<version>",
|
|
32
|
+
"verified": true,
|
|
33
|
+
"inconclusive": false,
|
|
34
|
+
"inconclusive_reason": null,
|
|
35
|
+
"evidence": {
|
|
36
|
+
"diff_nonempty": true,
|
|
37
|
+
"diff_files_changed": 1,
|
|
38
|
+
"diff_base_sha": "<sha>",
|
|
39
|
+
"tests_ran": false,
|
|
40
|
+
"tests_passed": true,
|
|
41
|
+
"test_runner": "none"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
On a genuine observation failure (git missing, path absent) it exits nonzero and
|
|
47
|
+
prints nothing parseable on stdout. The caller (`loki verify --hosted`) treats a
|
|
48
|
+
nonzero exit, a missing bundle, or a missing `bun` as "engine unusable" and
|
|
49
|
+
falls open to the deterministic bash verdict. It never turns an unusable engine
|
|
50
|
+
into a silent pass.
|
|
51
|
+
|
|
52
|
+
## How it is used by `loki verify`
|
|
53
|
+
|
|
54
|
+
`loki verify` (no flags) does NOT touch this bundle and is byte-identical to its
|
|
55
|
+
prior behavior. Only the opt-in `loki verify --hosted` path probes for `bun` and
|
|
56
|
+
this bundle and, when both are present, folds the engine's verdict fields into
|
|
57
|
+
`evidence.json` under a `hosted` key. The bash deterministic verdict remains
|
|
58
|
+
authoritative for the exit code.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// @bun
|
|
3
|
+
function D(j){let z=new Set;for(let A of[j.committed,j.unstaged,j.staged,j.untracked])for(let J of A){if(J==="")continue;if(/^\.loki\//.test(J))continue;z.add(J)}return z.size}function Z(j){let z=!1,A=0,J=!1,K="";if(!j.diff.is_git_repo)J=!0,K="no_git_repo";else if(!j.diff.base_sha)J=!0,K="no_run_start_sha";else if(A=D(j.diff.sources),A===0)z=!0;let X=!1,H="none",$=!0,C=!1,Y="";if(j.tests!==null){let L=j.tests.runner??"none",G=j.tests.pass??!0;if(H=L,L==="none")$=!0,C=!0,Y="no_test_runner";else if(G===!1)$=!1,X=!0;else $=!0}else H="none",$=!0,C=!0,Y="no_test_results";let U=z||X,W=null;if(U)if(z&&X)W="empty_diff_and_tests_red";else if(z)W="empty_diff";else W="tests_red";return{verdict:U?"block":"pass",gate_return_code:U?1:0,block_reason:W,diff:{ok:!z,base_sha:j.diff.base_sha??"",files_changed:A,inconclusive:J,inconclusive_reason:K},tests:{ok:!X,runner:H,pass:$,inconclusive:C,inconclusive_reason:Y}}}function q(j){return{diff_nonempty:j.diff.files_changed>0,diff_files_changed:j.diff.files_changed,diff_base_sha:j.diff.base_sha,tests_ran:j.tests.runner!=="none"&&!j.tests.inconclusive,tests_passed:j.tests.pass,test_runner:j.tests.runner}}function B(j){switch(j){case"no_git_repo":return"no_git_repo";case"no_run_start_sha":case"no_base_sha":return"no_base_sha";case"":return null;default:return null}}import{spawnSync as S}from"node:child_process";import{existsSync as N,statSync as V}from"node:fs";var k="unsigned:phase2-signing-pending";async function T(j,z){if(!z)throw Error("verifyCompletion: sandbox observation is Phase 2; supply a VerifyContext with pre-observed evidence to run the engine");let A=Z(z.observed),J=q(A),K=A.diff.inconclusive,X=B(A.diff.inconclusive_reason),H=A.verdict==="pass"&&!K;if(K&&j.options?.fail_on_inconclusive)H=!1;return{...{verification_id:z.verification_id??crypto.randomUUID(),verified:H,evidence:J,council_verdict:{ran:!1,verdict:null,reviewers:[]},cost_honesty_check:{ran:!1,quoted_model:null,dispatched_model:null,honest:null},inconclusive:K,inconclusive_reason:X,created_at:z.created_at??new Date().toISOString()},signature:k}}class Q extends Error{constructor(j){super(j);this.name="VerifyInputError"}}function x(j){return typeof j.dir==="string"}function M(j,z){let A=S("git",j,{cwd:z,encoding:"utf8"});if(A.error){let J=A.error;if(J.code==="ENOENT")throw new Q("cannot observe evidence: the `git` executable was not found on PATH");throw new Q(`cannot observe evidence: git ${j.join(" ")} failed: ${J.message}`)}return{status:A.status??1,stdout:(A.stdout||"").trim(),stderr:(A.stderr||"").trim()}}function P(j){if(!j)return[];return j.split("\x00").filter((z)=>z.length>0)}function h(j){let z=j.dir;if(!N(z))throw new Q(`cannot observe evidence: path does not exist: ${z}`);if(!V(z).isDirectory())throw new Q(`cannot observe evidence: not a directory: ${z}`);let A={committed:[],unstaged:[],staged:[],untracked:[]},J=M(["rev-parse","--is-inside-work-tree"],z);if(J.status!==0||J.stdout!=="true")return{is_git_repo:!1,base_sha:null,sources:A};if(!j.base)return{is_git_repo:!0,base_sha:null,sources:A};let K=M(["rev-parse","--verify","--quiet",j.base],z);if(K.status!==0||!K.stdout)return{is_git_repo:!0,base_sha:null,sources:A};let X=K.stdout,H=j.head??"HEAD",$=M(["diff","--name-only","-z",`${X}..${H}`],z);if($.status!==0)throw new Q(`cannot observe evidence: git diff ${X}..${H} failed: ${$.stderr}`);let C=P($.stdout),Y=M(["diff","--name-only","-z","--cached"],z),U=Y.status===0?P(Y.stdout):[],W=M(["diff","--name-only","-z"],z),L=W.status===0?P(W.stdout):[],G=M(["ls-files","--others","--exclude-standard","-z"],z),_=G.status===0?P(G.stdout):[];return{is_git_repo:!0,base_sha:X,sources:{committed:C,staged:U,unstaged:L,untracked:_}}}async function O(j){let z,A;if(x(j))z={diff:h(j),tests:j.tests??null},A=j.repo??"local";else{if(!j.observed)throw new Q("verify: provide either `observed` (pre-observed evidence) or `dir` (a local git working directory to observe)");z=j.observed,A=j.repo??"preobserved"}let J={repo:A,base_sha:z.diff.base_sha??"",options:j.options};return T(J,{observed:z,verification_id:j.verification_id,created_at:j.created_at})}function m(j){let z={};for(let A=0;A<j.length;A++){let J=j[A];if(J==="--dir")z.dir=j[++A];else if(J==="--base")z.base=j[++A];else if(J==="--head")z.head=j[++A];else if(J==="--version"||J==="-v")process.stdout.write(w+`
|
|
4
|
+
`),process.exit(0);else throw Error(`unknown argument: ${J}`)}if(!z.dir)throw Error("--dir is required");return z}var w="1.0.0";async function y(){let j;try{j=m(process.argv.slice(2))}catch(z){return process.stderr.write(`[embed] ${z.message}
|
|
5
|
+
`),2}try{let z=await O({dir:j.dir,base:j.base,head:j.head}),A={engine:"autonomi-verify",engine_version:w,verified:z.verified,inconclusive:z.inconclusive,inconclusive_reason:z.inconclusive_reason,evidence:{diff_nonempty:z.evidence.diff_nonempty,diff_files_changed:z.evidence.diff_files_changed,diff_base_sha:z.evidence.diff_base_sha,tests_ran:z.evidence.tests_ran,tests_passed:z.evidence.tests_passed,test_runner:z.evidence.test_runner}};return process.stdout.write(JSON.stringify(A)+`
|
|
6
|
+
`),0}catch(z){let A=z instanceof Q?"input":"error";return process.stderr.write(`[embed][${A}] ${z.message}
|
|
7
|
+
`),1}}y().then((j)=>process.exit(j),(j)=>{process.stderr.write(`[embed][fatal] ${j.message}
|
|
8
|
+
`),process.exit(1)});
|