loki-mode 7.121.7 → 7.122.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/verify.sh +61 -0
- package/dashboard/__init__.py +1 -1
- package/docs/INSTALLATION.md +2 -2
- package/loki-ts/dist/loki.js +2 -2
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
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 v7.
|
|
6
|
+
# Loki Mode v7.122.0
|
|
7
7
|
|
|
8
8
|
**You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
|
|
9
9
|
|
|
@@ -408,4 +408,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
|
|
|
408
408
|
|
|
409
409
|
---
|
|
410
410
|
|
|
411
|
-
**v7.
|
|
411
|
+
**v7.122.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.122.0
|
package/autonomy/verify.sh
CHANGED
|
@@ -96,6 +96,44 @@ _verify_add_gate() {
|
|
|
96
96
|
"$1" "$2" "${3:-}" "${4:-}" "${5:-true}" >>"$_VERIFY_GATES_FILE"
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
# --explain render: a one-screen, skeptic-legible trust proof over the SAME gate
|
|
100
|
+
# rows the verdict is computed from (no new machinery -- a pure render). Prints
|
|
101
|
+
# each gate, status, the runner/scanner that produced the evidence, whether it is
|
|
102
|
+
# reproducible, plus the freshness (verify-run timestamp) and the diff it graded.
|
|
103
|
+
# Reads $_VERIFY_GATES_FILE (gate\tstatus\trunner\tsummary\treproducible). Called
|
|
104
|
+
# only under --explain; never affects the verdict or exit code.
|
|
105
|
+
_verify_render_explain() {
|
|
106
|
+
local started_at="$1" completed_at="$2" verdict="$3"
|
|
107
|
+
printf '\n'
|
|
108
|
+
printf '=== Why you can trust this (loki verify --explain) ===\n'
|
|
109
|
+
printf 'Diff graded: %s (%s files, +%s/-%s) vs %s\n' \
|
|
110
|
+
"${VERIFY_MERGE_BASE:0:12}..${VERIFY_HEAD_SHA:0:12}" \
|
|
111
|
+
"${VERIFY_DIFF_FILES:-0}" "${VERIFY_DIFF_INS:-0}" "${VERIFY_DIFF_DEL:-0}" \
|
|
112
|
+
"${VERIFY_BASE_REF:-?}"
|
|
113
|
+
printf 'Evidence freshness: run %s -> %s (this run; gates re-executed now)\n' \
|
|
114
|
+
"$started_at" "$completed_at"
|
|
115
|
+
printf '\n'
|
|
116
|
+
printf ' %-18s %-12s %-14s %-6s %s\n' "GATE" "STATUS" "RUNNER" "REPRO" "EVIDENCE"
|
|
117
|
+
printf ' %-18s %-12s %-14s %-6s %s\n' "----" "------" "------" "-----" "--------"
|
|
118
|
+
if [ -s "$_VERIFY_GATES_FILE" ]; then
|
|
119
|
+
# TSV: gate\tstatus\trunner\tsummary\treproducible. Rendered with awk
|
|
120
|
+
# FS="\t" (NOT bash `read`, whose default IFS collapses consecutive tabs
|
|
121
|
+
# and mis-shifts a row with an empty runner field). awk preserves empty
|
|
122
|
+
# fields by position, so the columns always align.
|
|
123
|
+
awk -F'\t' '{
|
|
124
|
+
g=$1; st=$2; runner=($3==""?"-":$3); su=$4; repro=($5==""?"-":$5);
|
|
125
|
+
if (length(su) > 60) su = substr(su, 1, 57) "...";
|
|
126
|
+
printf " %-18s %-12s %-14s %-6s %s\n", g, st, runner, repro, su;
|
|
127
|
+
}' "$_VERIFY_GATES_FILE"
|
|
128
|
+
else
|
|
129
|
+
printf ' (no gates recorded)\n'
|
|
130
|
+
fi
|
|
131
|
+
printf '\n'
|
|
132
|
+
printf 'Verdict is computed ONLY from these gate rows above -- pass = independent\n'
|
|
133
|
+
printf 'evidence (a real runner/scanner exit), never a self-assessment.\n'
|
|
134
|
+
printf '\n'
|
|
135
|
+
}
|
|
136
|
+
|
|
99
137
|
# ---------------------------------------------------------------------------
|
|
100
138
|
# Entanglement 1: PR-aware diff base.
|
|
101
139
|
#
|
|
@@ -1865,6 +1903,11 @@ OPTIONS:
|
|
|
1865
1903
|
Default: critical,high (one notch looser than the
|
|
1866
1904
|
Loki build loop, which also blocks on medium).
|
|
1867
1905
|
--no-llm Accepted for forward-compat; LLM is already off in MVP.
|
|
1906
|
+
--explain Print a one-screen, skeptic-legible trust proof: every
|
|
1907
|
+
gate that ran, its status, the runner/scanner that
|
|
1908
|
+
produced the evidence, whether it is reproducible, plus
|
|
1909
|
+
freshness and the diff graded. Additive render before the
|
|
1910
|
+
VERDICT banner; never changes the verdict or exit code.
|
|
1868
1911
|
--hosted Opt-in. When the embedded Autonomi Verify engine is
|
|
1869
1912
|
usable (bun present + bundle present), fold its verdict
|
|
1870
1913
|
fields into evidence.json under a "hosted" key. Additive
|
|
@@ -2320,6 +2363,8 @@ verify_main() {
|
|
|
2320
2363
|
# Opt-in hosted-engine enrichment (--hosted). Default 0 = exactly today.
|
|
2321
2364
|
VERIFY_HOSTED=0
|
|
2322
2365
|
VERIFY_HOSTED_SUMMARY=""
|
|
2366
|
+
# Opt-in one-screen trust-proof render (--explain). Default 0 = exactly today.
|
|
2367
|
+
VERIFY_EXPLAIN=0
|
|
2323
2368
|
|
|
2324
2369
|
# Fail-closed defaults. These globals are read at the end of this function
|
|
2325
2370
|
# (the VERDICT banner and the function return code). verify_compute_verdict()
|
|
@@ -2344,6 +2389,15 @@ verify_main() {
|
|
|
2344
2389
|
block_on="$(printf '%s' "${2:-}" | tr '[:upper:]' '[:lower:]')"; shift 2 ;;
|
|
2345
2390
|
--no-llm)
|
|
2346
2391
|
shift ;;
|
|
2392
|
+
--explain)
|
|
2393
|
+
# Render a one-screen, skeptic-legible trust proof: every gate
|
|
2394
|
+
# that ran, its status, the runner/scanner that produced the
|
|
2395
|
+
# evidence, whether it is reproducible, and the freshness (the
|
|
2396
|
+
# verify run's own timestamp). Additive: it only ADDS output
|
|
2397
|
+
# before the existing VERDICT banner; the verdict + exit code are
|
|
2398
|
+
# unchanged. This is the "why you can trust this" surface -- Loki
|
|
2399
|
+
# runs more verification than competitors but proved it worse.
|
|
2400
|
+
VERIFY_EXPLAIN=1; shift ;;
|
|
2347
2401
|
--hosted)
|
|
2348
2402
|
# Opt-in: when the embedded Autonomi Verify engine is usable
|
|
2349
2403
|
# (bun present + bundle present), enrich evidence.json with the
|
|
@@ -2467,6 +2521,13 @@ verify_main() {
|
|
|
2467
2521
|
verify_hosted_enrich "$out_dir" "$base_ref" || true
|
|
2468
2522
|
fi
|
|
2469
2523
|
|
|
2524
|
+
# --explain: render the one-screen trust proof BEFORE the verdict banner.
|
|
2525
|
+
# Pure render over the gate rows the verdict was just computed from; never
|
|
2526
|
+
# changes VERIFY_VERDICT/VERIFY_EXIT. Default path (VERIFY_EXPLAIN=0) skips it.
|
|
2527
|
+
if [ "${VERIFY_EXPLAIN:-0}" = "1" ]; then
|
|
2528
|
+
_verify_render_explain "$started_at" "$completed_at" "$VERIFY_VERDICT"
|
|
2529
|
+
fi
|
|
2530
|
+
|
|
2470
2531
|
printf 'VERDICT: %s\n' "$VERIFY_VERDICT"
|
|
2471
2532
|
printf 'Evidence: %s/evidence.json\n' "$out_dir"
|
|
2472
2533
|
printf 'Report: %s/report.md\n' "$out_dir"
|
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:** v7.
|
|
5
|
+
**Version:** v7.122.0
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -396,7 +396,7 @@ provider works inside the container. Provide auth with your Anthropic API key:
|
|
|
396
396
|
# Run Loki Mode in Docker (Claude provider, API-key auth)
|
|
397
397
|
docker run --rm -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
|
|
398
398
|
-v $(pwd):/workspace -w /workspace \
|
|
399
|
-
asklokesh/loki-mode:7.
|
|
399
|
+
asklokesh/loki-mode:7.122.0 start ./my-spec.md
|
|
400
400
|
```
|
|
401
401
|
|
|
402
402
|
##### docker compose + .env (no host install)
|
package/loki-ts/dist/loki.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var q8=Object.defineProperty;var J8=($)=>$;function V8($,Q){this[$]=J8.bind(null,Q)}var b=($,Q)=>{for(var Z in Q)q8($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:V8.bind(Q,Z)})};var P=($,Q)=>()=>($&&(Q=$($=0)),Q);var J$=import.meta.require;var m1={};b(m1,{lokiDir:()=>j,homeLokiDir:()=>T$,findRepoRootForVersion:()=>$1,REPO_ROOT:()=>h});import{resolve as t,dirname as e$}from"path";import{fileURLToPath as W8}from"url";import{existsSync as N$}from"fs";import{homedir as H8}from"os";function G8(){let $=v1;for(let Q=0;Q<6;Q++){if(N$(t($,"VERSION"))&&N$(t($,"autonomy/run.sh")))return $;let Z=e$($);if(Z===$)break;$=Z}return t(v1,"..","..","..")}function $1($){let Q=$;for(let Z=0;Z<6;Z++){if(N$(t(Q,"VERSION"))&&N$(t(Q,"autonomy/run.sh")))return Q;let z=e$(Q);if(z===Q)break;Q=z}return t($,"..","..","..")}function j(){return process.env.LOKI_DIR??t(process.cwd(),".loki")}function T$(){return t(H8(),".loki")}var v1,h;var C=P(()=>{v1=e$(W8(import.meta.url));h=G8()});import{readFileSync as U8}from"fs";import{resolve as Y8,dirname as B8}from"path";import{fileURLToPath as M8}from"url";function S$(){if(Q$!==null)return Q$;let $="7.
|
|
2
|
+
var q8=Object.defineProperty;var J8=($)=>$;function V8($,Q){this[$]=J8.bind(null,Q)}var b=($,Q)=>{for(var Z in Q)q8($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:V8.bind(Q,Z)})};var P=($,Q)=>()=>($&&(Q=$($=0)),Q);var J$=import.meta.require;var m1={};b(m1,{lokiDir:()=>j,homeLokiDir:()=>T$,findRepoRootForVersion:()=>$1,REPO_ROOT:()=>h});import{resolve as t,dirname as e$}from"path";import{fileURLToPath as W8}from"url";import{existsSync as N$}from"fs";import{homedir as H8}from"os";function G8(){let $=v1;for(let Q=0;Q<6;Q++){if(N$(t($,"VERSION"))&&N$(t($,"autonomy/run.sh")))return $;let Z=e$($);if(Z===$)break;$=Z}return t(v1,"..","..","..")}function $1($){let Q=$;for(let Z=0;Z<6;Z++){if(N$(t(Q,"VERSION"))&&N$(t(Q,"autonomy/run.sh")))return Q;let z=e$(Q);if(z===Q)break;Q=z}return t($,"..","..","..")}function j(){return process.env.LOKI_DIR??t(process.cwd(),".loki")}function T$(){return t(H8(),".loki")}var v1,h;var C=P(()=>{v1=e$(W8(import.meta.url));h=G8()});import{readFileSync as U8}from"fs";import{resolve as Y8,dirname as B8}from"path";import{fileURLToPath as M8}from"url";function S$(){if(Q$!==null)return Q$;let $="7.122.0";if(typeof $==="string"&&$.length>0)return Q$=$,Q$;try{let Q=B8(M8(import.meta.url)),Z=$1(Q);Q$=U8(Y8(Z,"VERSION"),"utf-8").trim()}catch{Q$="unknown"}return Q$}var Q$=null;var Q1=P(()=>{C()});var p1={};b(p1,{runOrThrow:()=>S8,run:()=>R,readStreamCapped:()=>c1,commandVersion:()=>C8,commandExists:()=>u,ShellError:()=>Z1,MAX_STDOUT_BYTES:()=>u1});async function c1($,Q=u1){let Z=$.getReader(),z=new TextDecoder,X="",q=0;try{while(q<Q){let{done:K,value:W}=await Z.read();if(K)break;if(!W)continue;if(q+=W.byteLength,q>Q){let V=W.byteLength-(q-Q);X+=z.decode(W.subarray(0,V),{stream:!0});break}X+=z.decode(W,{stream:!0})}X+=z.decode()}finally{try{await Z.cancel()}catch{}Z.releaseLock()}return X}async function R($,Q={}){let Z=Bun.spawn({cmd:[...$],stdout:"pipe",stderr:"pipe",env:Q.env?{...process.env,...Q.env}:process.env,cwd:Q.cwd}),z,X;if(Q.timeoutMs&&Q.timeoutMs>0)z=setTimeout(()=>{try{Z.kill("SIGTERM")}catch{}X=setTimeout(()=>{try{Z.kill("SIGKILL")}catch{}},2000)},Q.timeoutMs);try{let[q,K,W]=await Promise.all([c1(Z.stdout),new Response(Z.stderr).text(),Z.exited]);return{stdout:q,stderr:K,exitCode:W}}finally{if(z)clearTimeout(z);if(X)clearTimeout(X)}}async function S8($,Q={}){let Z=await R($,Q);if(Z.exitCode!==0)throw new Z1(`command failed (${Z.exitCode}): ${$.join(" ")}`,Z.exitCode,Z.stdout,Z.stderr);return Z}async function u($){let Q=D8($),Z=await R(["sh","-c",`command -v ${Q}`],{timeoutMs:5000});if(Z.exitCode===0)return Z.stdout.trim()||null;return null}function D8($){if(!/^[A-Za-z0-9._/-]+$/.test($))throw Error(`refused to shell-escape suspect token: ${$}`);return $}async function C8($,Q="--version"){if(!await u($))return null;let z=await R([$,Q],{timeoutMs:5000});if(z.exitCode!==0)return null;return((z.stdout||z.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var u1=16777216,Z1;var o=P(()=>{Z1=class Z1 extends Error{message;exitCode;stdout;stderr;constructor($,Q,Z,z){super($);this.message=$;this.exitCode=Q;this.stdout=Z;this.stderr=z;this.name="ShellError"}}});function r($){return b8?"":$}var b8,M,S,_,tZ,L,k,y,J;var p=P(()=>{b8=(process.env.NO_COLOR??"").length>0;M=r("\x1B[0;31m"),S=r("\x1B[0;32m"),_=r("\x1B[1;33m"),tZ=r("\x1B[0;34m"),L=r("\x1B[0;36m"),k=r("\x1B[1m"),y=r("\x1B[2m"),J=r("\x1B[0m")});import{existsSync as l8}from"fs";async function Z$(){if(A$!==void 0)return A$;let $="/opt/homebrew/bin/python3.12";if(l8($))return A$=$,$;let Q=await u("python3.12");if(Q)return A$=Q,Q;let Z=await u("python3");return A$=Z,Z}async function z$($,Q={}){let Z=await Z$();if(!Z)return{stdout:"",stderr:"python3 not found",exitCode:127};return R([Z,"-c",$],Q)}var A$;var V$=P(()=>{o()});var V0={};b(V0,{runStatus:()=>U3});import{existsSync as v,readFileSync as H$,readdirSync as $0,statSync as Q0}from"fs";import{resolve as D,basename as z3}from"path";import{homedir as X3}from"os";function Z0($){let Q=Math.trunc($);if(Q>=1e6)return`${(Math.trunc(Q/1e6*10)/10).toFixed(1)}M`;if(Q>=1000)return`${(Math.trunc(Q/1000*10)/10).toFixed(1)}K`;return String(Q)}function z0($,Q,Z){if(Q===0)return null;let z=Math.trunc($*100/Q),X=Math.trunc($*C$/Q);if(X>C$)X=C$;let q=C$-X,K=S;if(z>=80)K=M;else if(z>=50)K=_;let W="=".repeat(Math.max(0,X))+" ".repeat(Math.max(0,q)),V=Z0($),H=Z0(Q);return` ${k}${Z}${J} ${K}[${W}]${J} ${z}% (${V} / ${H})`}async function q3(){if(await u("jq"))return!0;return process.stdout.write(`${M}Error: jq is required but not installed.${J}
|
|
3
3
|
`),process.stdout.write(`Install with:
|
|
4
4
|
`),process.stdout.write(` brew install jq (macOS)
|
|
5
5
|
`),process.stdout.write(` apt install jq (Debian/Ubuntu)
|
|
@@ -814,4 +814,4 @@ Set LOKI_LEGACY_BASH=1 to force the bash CLI for every command.
|
|
|
814
814
|
`),2}default:return process.stderr.write(`Unknown command: ${Q}
|
|
815
815
|
`),process.stderr.write(K8),2}}e1();process.on("SIGINT",()=>process.exit(130));process.on("SIGTERM",()=>process.exit(143));var SZ=await NZ(Bun.argv.slice(2));process.exit(SZ);
|
|
816
816
|
|
|
817
|
-
//# debugId=
|
|
817
|
+
//# debugId=337174C2DC70061564756E2164756E21
|
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.122.0",
|
|
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",
|
|
@@ -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.122.0",
|
|
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",
|