loki-mode 9.22.4 → 9.22.5
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 +7 -0
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/quickstart.sh +92 -0
- package/dashboard/__init__.py +1 -1
- 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/README.md
CHANGED
|
@@ -70,9 +70,16 @@ Choose an exact shipped starter when the top-ranked match is not the one you
|
|
|
70
70
|
want:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
+
loki quickstart --list-templates
|
|
74
|
+
loki quickstart --list-templates --json # schema-v1 automation output
|
|
73
75
|
loki quickstart "an internal reporting workspace" --template dashboard --yes
|
|
74
76
|
```
|
|
75
77
|
|
|
78
|
+
Template discovery works without a terminal or provider and lists every shipped
|
|
79
|
+
starter's stable name and purpose in catalog order. It returns before estimation,
|
|
80
|
+
consent, PRD writes, or build execution. Positional input and execution/preview
|
|
81
|
+
flags are intentionally incompatible; `--json` is the only optional modifier.
|
|
82
|
+
|
|
76
83
|
`--template` accepts an exact template name for idea inputs and works the same
|
|
77
84
|
way with interactive use or `--dry-run` (including JSON preview). Unknown
|
|
78
85
|
templates, duplicate flags, and combinations with a PRD path refuse before
|
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.22.
|
|
6
|
+
# Loki Mode v9.22.5
|
|
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.22.
|
|
473
|
+
**v9.22.5 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
9.22.
|
|
1
|
+
9.22.5
|
package/autonomy/quickstart.sh
CHANGED
|
@@ -283,6 +283,72 @@ _qs_template_summary() {
|
|
|
283
283
|
esac
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
# _qs_shipped_template_names: print every shipped template basename in stable
|
|
287
|
+
# catalog order. The filesystem is the source of truth: adding or removing a
|
|
288
|
+
# templates/*.md payload changes discovery automatically, while README.md is
|
|
289
|
+
# deliberately excluded because it is gallery documentation, not a PRD.
|
|
290
|
+
_qs_shipped_template_names() {
|
|
291
|
+
local tdir; tdir="$(_qs_templates_dir)"
|
|
292
|
+
local f name
|
|
293
|
+
for f in "$tdir"/*.md; do
|
|
294
|
+
[ -f "$f" ] || continue
|
|
295
|
+
name=$(basename "$f" .md)
|
|
296
|
+
[ "$name" = "README" ] && continue
|
|
297
|
+
printf '%s\n' "$name"
|
|
298
|
+
done | LC_ALL=C sort
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
# _qs_list_templates [json]: provider-free discovery for terminals and local
|
|
302
|
+
# automation. Human and machine output are derived from the same shipped-name
|
|
303
|
+
# stream and the same stable purpose table used by the interactive picker.
|
|
304
|
+
_qs_list_templates() {
|
|
305
|
+
local json_output="${1:-false}"
|
|
306
|
+
local catalog="" count=0 name purpose
|
|
307
|
+
while IFS= read -r name; do
|
|
308
|
+
[ -n "$name" ] || continue
|
|
309
|
+
purpose="$(_qs_template_summary "$name")"
|
|
310
|
+
catalog="${catalog}${name}\t${purpose}\n"
|
|
311
|
+
count=$((count + 1))
|
|
312
|
+
done < <(_qs_shipped_template_names)
|
|
313
|
+
|
|
314
|
+
if [ "$count" -eq 0 ]; then
|
|
315
|
+
printf 'No shipped quickstart templates were found.\n' >&2
|
|
316
|
+
return 2
|
|
317
|
+
fi
|
|
318
|
+
|
|
319
|
+
if [ "$json_output" = true ]; then
|
|
320
|
+
printf '%b' "$catalog" | python3 -c '
|
|
321
|
+
import json
|
|
322
|
+
import sys
|
|
323
|
+
|
|
324
|
+
templates = []
|
|
325
|
+
for raw in sys.stdin:
|
|
326
|
+
name, purpose = raw.rstrip("\n").split("\t", 1)
|
|
327
|
+
templates.append({"name": name, "purpose": purpose})
|
|
328
|
+
json.dump(
|
|
329
|
+
{
|
|
330
|
+
"schema_version": 1,
|
|
331
|
+
"command": "loki quickstart",
|
|
332
|
+
"mode": "list-templates",
|
|
333
|
+
"templates": templates,
|
|
334
|
+
},
|
|
335
|
+
sys.stdout,
|
|
336
|
+
separators=(",", ":"),
|
|
337
|
+
sort_keys=True,
|
|
338
|
+
)
|
|
339
|
+
sys.stdout.write("\n")
|
|
340
|
+
' || return 2
|
|
341
|
+
return 0
|
|
342
|
+
fi
|
|
343
|
+
|
|
344
|
+
printf '%sShipped quickstart templates (%d)%s\n' "$_QS_BOLD" "$count" "$_QS_NC"
|
|
345
|
+
printf '%b' "$catalog" | while IFS=$'\t' read -r name purpose; do
|
|
346
|
+
[ -n "$name" ] || continue
|
|
347
|
+
printf ' %-20s %s\n' "$name" "$purpose"
|
|
348
|
+
done
|
|
349
|
+
return 0
|
|
350
|
+
}
|
|
351
|
+
|
|
286
352
|
# _qs_template_exists <name>: accept only an exact shipped template basename.
|
|
287
353
|
# Keeping validation here (rather than accepting an arbitrary path) prevents
|
|
288
354
|
# --template from becoming a second PRD/file-read surface. The intentionally
|
|
@@ -433,6 +499,7 @@ _qs_help() {
|
|
|
433
499
|
printf ' --dry-run Preview the selected template and plan; write/start nothing\n'
|
|
434
500
|
printf ' --json With --dry-run, emit one machine-readable JSON object\n'
|
|
435
501
|
printf ' --template N Use the exact shipped template N for an IDEA\n'
|
|
502
|
+
printf ' --list-templates List every shipped template and its purpose\n'
|
|
436
503
|
printf ' --help, -h Show this help and exit\n'
|
|
437
504
|
printf '\n'
|
|
438
505
|
printf 'Non-interactive use:\n'
|
|
@@ -441,6 +508,7 @@ _qs_help() {
|
|
|
441
508
|
printf ' Missing either one exits 2 and writes nothing. The top-ranked\n'
|
|
442
509
|
printf ' template is chosen automatically and the plan is still shown.\n'
|
|
443
510
|
printf ' Add --template NAME to choose a shipped template instead.\n'
|
|
511
|
+
printf ' Run with --list-templates (and optional --json) to discover names.\n'
|
|
444
512
|
printf '\n'
|
|
445
513
|
printf 'Zero-spend preview:\n'
|
|
446
514
|
printf ' loki quickstart "a todo app" --dry-run\n'
|
|
@@ -480,6 +548,8 @@ cmd_quickstart() {
|
|
|
480
548
|
local json_output=false
|
|
481
549
|
local template_override=""
|
|
482
550
|
local template_flag_seen=false
|
|
551
|
+
local list_templates=false
|
|
552
|
+
local list_templates_flag_seen=false
|
|
483
553
|
if _qs_assume_yes; then assume_yes=true; fi
|
|
484
554
|
|
|
485
555
|
# yes_flag tracks EXPLICIT --yes/-y on THIS command's argv, and nothing else.
|
|
@@ -525,6 +595,15 @@ cmd_quickstart() {
|
|
|
525
595
|
template_override="$2"
|
|
526
596
|
shift 2
|
|
527
597
|
;;
|
|
598
|
+
--list-templates)
|
|
599
|
+
if [ "$list_templates_flag_seen" = true ]; then
|
|
600
|
+
printf '%s--list-templates may be specified only once.%s\n' "$_QS_RED" "$_QS_NC" >&2
|
|
601
|
+
exit 2
|
|
602
|
+
fi
|
|
603
|
+
list_templates=true
|
|
604
|
+
list_templates_flag_seen=true
|
|
605
|
+
shift
|
|
606
|
+
;;
|
|
528
607
|
--*)
|
|
529
608
|
printf '%sUnknown option: %s%s\n' "$_QS_RED" "$1" "$_QS_NC" >&2
|
|
530
609
|
printf "Run 'loki quickstart --help' for usage.\n" >&2
|
|
@@ -543,6 +622,19 @@ cmd_quickstart() {
|
|
|
543
622
|
esac
|
|
544
623
|
done
|
|
545
624
|
|
|
625
|
+
# Discovery is a standalone read-only command shape. Refuse input and every
|
|
626
|
+
# execution/preview selector rather than guessing intent; --json is its only
|
|
627
|
+
# compatible modifier. This return precedes terminal, provider, estimator,
|
|
628
|
+
# consent, PRD, and build boundaries.
|
|
629
|
+
if [ "$list_templates" = true ]; then
|
|
630
|
+
if [ -n "$positional" ] || [ "$yes_flag" = true ] || [ "$dry_run" = true ] || [ "$template_flag_seen" = true ]; then
|
|
631
|
+
printf '%s--list-templates accepts only the optional --json flag.%s\n' "$_QS_RED" "$_QS_NC" >&2
|
|
632
|
+
exit 2
|
|
633
|
+
fi
|
|
634
|
+
_qs_list_templates "$json_output"
|
|
635
|
+
return $?
|
|
636
|
+
fi
|
|
637
|
+
|
|
546
638
|
# A preview is an explicit no-execution request. Reject simultaneous build
|
|
547
639
|
# consent instead of guessing which instruction wins. This check precedes
|
|
548
640
|
# provider discovery, estimation, and every write.
|
package/dashboard/__init__.py
CHANGED
package/loki-ts/dist/loki.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var p_=Object.create;var{getPrototypeOf:d_,defineProperty:eK,getOwnPropertyNames:c_}=Object;var l_=Object.prototype.hasOwnProperty;function i_(Z){return this[Z]}var a_,s_,n_=(Z,X,Q)=>{var Y=Z!=null&&typeof Z==="object";if(Y){var J=X?a_??=new WeakMap:s_??=new WeakMap,z=J.get(Z);if(z)return z}Q=Z!=null?p_(d_(Z)):{};let K=X||!Z||!Z.__esModule?eK(Q,"default",{value:Z,enumerable:!0}):Q;for(let $ of c_(Z))if(!l_.call(K,$))eK(K,$,{get:i_.bind(Z,$),enumerable:!0});if(Y)J.set(Z,K);return K};var HQ=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var o_=(Z)=>Z;function r_(Z,X){this[Z]=o_.bind(null,X)}var l0=(Z,X)=>{for(var Q in X)eK(Z,Q,{get:X[Q],enumerable:!0,configurable:!0,set:r_.bind(X,Q)})};var p=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var t0=import.meta.require;var xO={};l0(xO,{lokiDir:()=>j0,homeLokiDir:()=>R4,findRepoRootForVersion:()=>X$,REPO_ROOT:()=>i0});import{resolve as n7,dirname as Z$}from"path";import{fileURLToPath as t_}from"url";import{existsSync as UQ}from"fs";import{homedir as e_}from"os";function Zf(){let Z=kO;for(let X=0;X<6;X++){if(UQ(n7(Z,"VERSION"))&&UQ(n7(Z,"autonomy/run.sh")))return Z;let Q=Z$(Z);if(Q===Z)break;Z=Q}return n7(kO,"..","..","..")}function X$(Z){let X=Z;for(let Q=0;Q<6;Q++){if(UQ(n7(X,"VERSION"))&&UQ(n7(X,"autonomy/run.sh")))return X;let Y=Z$(X);if(Y===X)break;X=Y}return n7(Z,"..","..","..")}function j0(){return process.env.LOKI_DIR??n7(process.cwd(),".loki")}function R4(){return n7(e_(),".loki")}var kO,i0;var H8=p(()=>{kO=Z$(t_(import.meta.url));i0=Zf()});import{readFileSync as Xf}from"fs";import{resolve as Qf,dirname as Yf}from"path";import{fileURLToPath as Jf}from"url";function h3(){if(h5!==null)return h5;let Z="9.22.
|
|
2
|
+
var p_=Object.create;var{getPrototypeOf:d_,defineProperty:eK,getOwnPropertyNames:c_}=Object;var l_=Object.prototype.hasOwnProperty;function i_(Z){return this[Z]}var a_,s_,n_=(Z,X,Q)=>{var Y=Z!=null&&typeof Z==="object";if(Y){var J=X?a_??=new WeakMap:s_??=new WeakMap,z=J.get(Z);if(z)return z}Q=Z!=null?p_(d_(Z)):{};let K=X||!Z||!Z.__esModule?eK(Q,"default",{value:Z,enumerable:!0}):Q;for(let $ of c_(Z))if(!l_.call(K,$))eK(K,$,{get:i_.bind(Z,$),enumerable:!0});if(Y)J.set(Z,K);return K};var HQ=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var o_=(Z)=>Z;function r_(Z,X){this[Z]=o_.bind(null,X)}var l0=(Z,X)=>{for(var Q in X)eK(Z,Q,{get:X[Q],enumerable:!0,configurable:!0,set:r_.bind(X,Q)})};var p=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var t0=import.meta.require;var xO={};l0(xO,{lokiDir:()=>j0,homeLokiDir:()=>R4,findRepoRootForVersion:()=>X$,REPO_ROOT:()=>i0});import{resolve as n7,dirname as Z$}from"path";import{fileURLToPath as t_}from"url";import{existsSync as UQ}from"fs";import{homedir as e_}from"os";function Zf(){let Z=kO;for(let X=0;X<6;X++){if(UQ(n7(Z,"VERSION"))&&UQ(n7(Z,"autonomy/run.sh")))return Z;let Q=Z$(Z);if(Q===Z)break;Z=Q}return n7(kO,"..","..","..")}function X$(Z){let X=Z;for(let Q=0;Q<6;Q++){if(UQ(n7(X,"VERSION"))&&UQ(n7(X,"autonomy/run.sh")))return X;let Y=Z$(X);if(Y===X)break;X=Y}return n7(Z,"..","..","..")}function j0(){return process.env.LOKI_DIR??n7(process.cwd(),".loki")}function R4(){return n7(e_(),".loki")}var kO,i0;var H8=p(()=>{kO=Z$(t_(import.meta.url));i0=Zf()});import{readFileSync as Xf}from"fs";import{resolve as Qf,dirname as Yf}from"path";import{fileURLToPath as Jf}from"url";function h3(){if(h5!==null)return h5;let Z="9.22.5";if(typeof Z==="string"&&Z.length>0)return h5=Z,h5;try{let X=Yf(Jf(import.meta.url)),Q=X$(X);h5=Xf(Qf(Q,"VERSION"),"utf-8").trim()}catch{h5="unknown"}return h5}var h5=null;var BQ=p(()=>{H8()});var _O={};l0(_O,{runOrThrow:()=>Tf,run:()=>E0,readStreamCapped:()=>NQ,commandVersion:()=>Cf,commandExists:()=>X9,ShellError:()=>Q$,MAX_STDOUT_BYTES:()=>bO});async function NQ(Z,X=bO){let Q=Z.getReader(),Y=new TextDecoder,J="",z=0;try{while(z<X){let{done:K,value:$}=await Q.read();if(K)break;if(!$)continue;if(z+=$.byteLength,z>X){let V=$.byteLength-(z-X);J+=Y.decode($.subarray(0,V),{stream:!0});break}J+=Y.decode($,{stream:!0})}J+=Y.decode()}finally{try{await Q.cancel()}catch{}Q.releaseLock()}return J}async function E0(Z,X={}){let Q=Bun.spawn({cmd:[...Z],stdout:"pipe",stderr:"pipe",env:X.env?{...process.env,...X.env}:process.env,cwd:X.cwd}),Y,J;if(X.timeoutMs&&X.timeoutMs>0)Y=setTimeout(()=>{try{Q.kill("SIGTERM")}catch{}J=setTimeout(()=>{try{Q.kill("SIGKILL")}catch{}},2000)},X.timeoutMs);try{let[z,K,$]=await Promise.all([NQ(Q.stdout),new Response(Q.stderr).text(),Q.exited]);return{stdout:z,stderr:K,exitCode:$}}finally{if(Y)clearTimeout(Y);if(J)clearTimeout(J)}}async function Tf(Z,X={}){let Q=await E0(Z,X);if(Q.exitCode!==0)throw new Q$(`command failed (${Q.exitCode}): ${Z.join(" ")}`,Q.exitCode,Q.stdout,Q.stderr);return Q}async function X9(Z){let X=wf(Z),Q=await E0(["sh","-c",`command -v ${X}`],{timeoutMs:5000});if(Q.exitCode===0)return Q.stdout.trim()||null;return null}function wf(Z){if(!/^[A-Za-z0-9._/-]+$/.test(Z))throw Error(`refused to shell-escape suspect token: ${Z}`);return Z}async function Cf(Z,X="--version"){if(!await X9(Z))return null;let Y=await E0([Z,X],{timeoutMs:5000});if(Y.exitCode!==0)return null;return((Y.stdout||Y.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var bO=16777216,Q$;var x9=p(()=>{Q$=class Q$ extends Error{message;exitCode;stdout;stderr;constructor(Z,X,Q,Y){super(Z);this.message=Z;this.exitCode=X;this.stdout=Q;this.stderr=Y;this.name="ShellError"}}});function o7(Z){return Ff?"":Z}var Ff,A0,F8,_0,$W0,a0,V8,Q9,h;var S6=p(()=>{Ff=(process.env.NO_COLOR??"").length>0;A0=o7("\x1B[0;31m"),F8=o7("\x1B[0;32m"),_0=o7("\x1B[1;33m"),$W0=o7("\x1B[0;34m"),a0=o7("\x1B[0;36m"),V8=o7("\x1B[1m"),Q9=o7("\x1B[2m"),h=o7("\x1B[0m")});import{existsSync as ff}from"fs";async function E7(){if(x4!==void 0)return x4;let Z="/opt/homebrew/bin/python3.12";if(ff(Z))return x4=Z,Z;let X=await X9("python3.12");if(X)return x4=X,X;let Q=await X9("python3");return x4=Q,Q}async function Y7(Z,X={}){let Q=await E7();if(!Q)return{stdout:"",stderr:"python3 not found",exitCode:127};return E0([Q,"-c",Z],X)}var x4;var r7=p(()=>{x9()});var XA={};l0(XA,{runStatus:()=>Vh});import{existsSync as Y9,readFileSync as g3,readdirSync as aO,statSync as sO}from"fs";import{resolve as h8,basename as ef}from"path";import{homedir as Zh}from"os";function nO(Z){let X=Math.trunc(Z);if(X>=1e6)return`${(Math.trunc(X/1e6*10)/10).toFixed(1)}M`;if(X>=1000)return`${(Math.trunc(X/1000*10)/10).toFixed(1)}K`;return String(X)}function oO(Z,X,Q){if(X===0)return null;let Y=Math.trunc(Z*100/X),J=Math.trunc(Z*AQ/X);if(J>AQ)J=AQ;let z=AQ-J,K=F8;if(Y>=80)K=A0;else if(Y>=50)K=_0;let $="=".repeat(Math.max(0,J))+" ".repeat(Math.max(0,z)),V=nO(Z),W=nO(X);return` ${V8}${Q}${h} ${K}[${$}]${h} ${Y}% (${V} / ${W})`}async function Qh(){if(await X9("jq"))return!0;return process.stdout.write(`${A0}Error: jq is required but not installed.${h}
|
|
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)
|
|
@@ -1236,4 +1236,4 @@ Set LOKI_LEGACY_BASH=1 to force the bash CLI for every command.
|
|
|
1236
1236
|
`),2}case"start":{let{runStart:Y}=await Promise.resolve().then(() => (g_(),v_));return Y(Q)}default:return process.stderr.write(`Unknown command: ${X}
|
|
1237
1237
|
`),process.stderr.write(m_),2}}lO();process.on("SIGINT",()=>process.exit(130));process.on("SIGTERM",()=>process.exit(143));var dV0=await pV0(Bun.argv.slice(2));process.exit(dV0);
|
|
1238
1238
|
|
|
1239
|
-
//# debugId=
|
|
1239
|
+
//# debugId=2BABAC8DCF0D367564756E2164756E21
|
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": "9.22.
|
|
4
|
+
"version": "9.22.5",
|
|
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": "9.22.
|
|
5
|
+
"version": "9.22.5",
|
|
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",
|