loki-mode 7.55.0 → 7.56.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 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.55.0
6
+ # Loki Mode v7.56.0
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -406,4 +406,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
406
406
 
407
407
  ---
408
408
 
409
- **v7.55.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
409
+ **v7.56.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 7.55.0
1
+ 7.56.0
package/autonomy/loki CHANGED
@@ -726,8 +726,8 @@ show_help() {
726
726
  echo " help Show this help ('loki help aliases' for old names)"
727
727
  echo ""
728
728
  echo "More commands (grill, spec, cleanup, init, watch, demo, web, api,"
729
- echo "logs, github, import, council, proof, audit, agent, template, magic,"
730
- echo "docs, wiki, ci, test, bench, secrets, telemetry, crash, worktree,"
729
+ echo "logs, github, import, council, proof, audit, compliance, agent, template,"
730
+ echo "magic, docs, wiki, ci, test, bench, secrets, telemetry, crash, worktree,"
731
731
  echo "failover, monitor, remote, ...) are dispatchable and documented via"
732
732
  echo "'loki <command> --help'."
733
733
  echo ""
@@ -14530,6 +14530,9 @@ main() {
14530
14530
  audit)
14531
14531
  cmd_audit "$@"
14532
14532
  ;;
14533
+ compliance)
14534
+ cmd_compliance "$@"
14535
+ ;;
14533
14536
  review)
14534
14537
  cmd_review "$@"
14535
14538
  ;;
@@ -15853,6 +15856,211 @@ STATE_QUERY_PY
15853
15856
  }
15854
15857
 
15855
15858
  # Agent action audit log and quality scanning
15859
+ # Resolve the repo root (where src/audit lives) from the loki script dir.
15860
+ # _LOKI_SCRIPT_DIR is autonomy/; the JS audit modules live at ../src/audit.
15861
+ _loki_audit_repo_root() {
15862
+ ( cd "$_LOKI_SCRIPT_DIR/.." && pwd )
15863
+ }
15864
+
15865
+ # Link the run manifest (.loki/loki-run.json) into the agent audit chain for
15866
+ # the TARGET project (not the loki repo). Honest no-op when the manifest is
15867
+ # absent. Exit 0 on link or honest no-op; exit 1 only on a real error.
15868
+ cmd_audit_link_manifest() {
15869
+ local target_dir="${1:-$PWD}"
15870
+ if ! command -v node &>/dev/null; then
15871
+ echo -e "${RED}Error: node is required for 'loki audit link-manifest'${NC}"
15872
+ echo "Install Node.js, then re-run."
15873
+ return 1
15874
+ fi
15875
+ local repo_root
15876
+ repo_root="$(_loki_audit_repo_root)"
15877
+ local abs_target
15878
+ abs_target="$( cd "$target_dir" 2>/dev/null && pwd )" || {
15879
+ echo -e "${RED}Error: project dir not found: $target_dir${NC}"
15880
+ return 1
15881
+ }
15882
+
15883
+ echo -e "${BOLD}Linking run manifest into the audit chain...${NC}"
15884
+ echo " Project: $abs_target"
15885
+
15886
+ LOKI_AUDIT_MOD="$repo_root/src/audit" LOKI_AUDIT_TARGET="$abs_target" \
15887
+ node -e '
15888
+ const audit = require(process.env.LOKI_AUDIT_MOD);
15889
+ const res = audit.linkManifest({ projectDir: process.env.LOKI_AUDIT_TARGET });
15890
+ if (res.linked) {
15891
+ console.log(" linked: yes");
15892
+ console.log(" manifest: " + res.manifestPath);
15893
+ console.log(" sha256: " + res.manifestSha256);
15894
+ if (res.manifestSchema) console.log(" schema: " + res.manifestSchema);
15895
+ if (res.anchor && typeof res.anchor.seq !== "undefined") console.log(" anchor seq: " + res.anchor.seq);
15896
+ } else {
15897
+ console.log(" linked: no (" + (res.reason || "no-op") + ")");
15898
+ console.log(" manifest: " + res.manifestPath);
15899
+ }
15900
+ ' || {
15901
+ echo -e "${RED}Error: manifest link failed${NC}"
15902
+ return 1
15903
+ }
15904
+ return 0
15905
+ }
15906
+
15907
+ # Verify the run-manifest link for the TARGET project. Honest empty case
15908
+ # (no anchor recorded yet) exits 0; a real tamper/integrity failure exits 1.
15909
+ cmd_audit_verify_manifest() {
15910
+ local target_dir="${1:-$PWD}"
15911
+ if ! command -v node &>/dev/null; then
15912
+ echo -e "${RED}Error: node is required for 'loki audit verify-manifest'${NC}"
15913
+ echo "Install Node.js, then re-run."
15914
+ return 1
15915
+ fi
15916
+ local repo_root
15917
+ repo_root="$(_loki_audit_repo_root)"
15918
+ local abs_target
15919
+ abs_target="$( cd "$target_dir" 2>/dev/null && pwd )" || {
15920
+ echo -e "${RED}Error: project dir not found: $target_dir${NC}"
15921
+ return 1
15922
+ }
15923
+
15924
+ echo -e "${BOLD}Verifying run-manifest link...${NC}"
15925
+ echo " Project: $abs_target"
15926
+
15927
+ LOKI_AUDIT_MOD="$repo_root/src/audit" LOKI_AUDIT_TARGET="$abs_target" \
15928
+ node -e '
15929
+ const audit = require(process.env.LOKI_AUDIT_MOD);
15930
+ const res = audit.verifyManifestLink({ projectDir: process.env.LOKI_AUDIT_TARGET });
15931
+ const chainValid = res.chain && res.chain.valid;
15932
+ console.log(" chain integrity: " + (chainValid ? "valid" : "INVALID"));
15933
+ if (!res.present) {
15934
+ console.log(" manifest link: none recorded yet (no-op)");
15935
+ // Honest empty case: success only if the chain itself is valid.
15936
+ process.exit(chainValid ? 0 : 1);
15937
+ }
15938
+ const m = res.manifest || {};
15939
+ console.log(" manifest: " + (m.manifestPath || "?"));
15940
+ console.log(" pinned sha256: " + (m.pinnedSha256 || "?"));
15941
+ console.log(" current sha256: " + (m.currentSha256 || "(absent)"));
15942
+ if (res.valid) {
15943
+ console.log(" verdict: VALID (manifest matches anchored hash)");
15944
+ process.exit(0);
15945
+ } else {
15946
+ console.log(" verdict: TAMPERED / INVALID");
15947
+ if (m.error) console.log(" reason: " + m.error);
15948
+ process.exit(1);
15949
+ }
15950
+ '
15951
+ return $?
15952
+ }
15953
+
15954
+ # loki compliance - periodic compliance snapshot (SOC2 / ISO27001 / GDPR).
15955
+ # The scheduler is default-disabled (LOKI_COMPLIANCE_SNAPSHOT_INTERVAL_HOURS
15956
+ # unset or 0). `loki compliance snapshot` runs the self-rate-limiting check;
15957
+ # `--force` generates a snapshot now regardless of interval/elapsed gate.
15958
+ cmd_compliance() {
15959
+ local subcommand="${1:-help}"
15960
+
15961
+ case "$subcommand" in
15962
+ snapshot)
15963
+ shift
15964
+ local force="" target_dir="$PWD"
15965
+ while [[ $# -gt 0 ]]; do
15966
+ case "$1" in
15967
+ --force|-f) force="1"; shift ;;
15968
+ --help|-h)
15969
+ echo -e "${BOLD}loki compliance snapshot${NC} - Generate/check a compliance snapshot"
15970
+ echo ""
15971
+ echo "Usage: loki compliance snapshot [PROJECT_DIR] [--force]"
15972
+ echo ""
15973
+ echo "Without --force, respects the default-disabled interval"
15974
+ echo "(LOKI_COMPLIANCE_SNAPSHOT_INTERVAL_HOURS). Reports honestly:"
15975
+ echo " disabled interval unset/0 (default)"
15976
+ echo " not-elapsed interval not yet elapsed since last snapshot"
15977
+ echo " generated a new snapshot was written"
15978
+ echo ""
15979
+ echo "With --force, a snapshot is generated now regardless."
15980
+ echo "Snapshots are written to .loki/audit/compliance-snapshots/ in the project dir."
15981
+ return 0
15982
+ ;;
15983
+ -*) echo -e "${RED}Unknown option: $1${NC}"; return 1 ;;
15984
+ *) target_dir="$1"; shift ;;
15985
+ esac
15986
+ done
15987
+
15988
+ if ! command -v node &>/dev/null; then
15989
+ echo -e "${RED}Error: node is required for 'loki compliance snapshot'${NC}"
15990
+ echo "Install Node.js, then re-run."
15991
+ return 1
15992
+ fi
15993
+ local repo_root
15994
+ repo_root="$(_loki_audit_repo_root)"
15995
+ local abs_target
15996
+ abs_target="$( cd "$target_dir" 2>/dev/null && pwd )" || {
15997
+ echo -e "${RED}Error: project dir not found: $target_dir${NC}"
15998
+ return 1
15999
+ }
16000
+
16001
+ echo -e "${BOLD}Compliance snapshot${NC}"
16002
+ echo " Project: $abs_target"
16003
+
16004
+ LOKI_SCHED_MOD="$repo_root/src/audit/compliance-scheduler.js" \
16005
+ LOKI_SCHED_TARGET="$abs_target" LOKI_SCHED_FORCE="$force" \
16006
+ node -e '
16007
+ const sched = require(process.env.LOKI_SCHED_MOD);
16008
+ const target = process.env.LOKI_SCHED_TARGET;
16009
+ const force = process.env.LOKI_SCHED_FORCE === "1";
16010
+ if (force) {
16011
+ const now = Date.now();
16012
+ const snapshot = sched.buildSnapshot({ projectDir: target, nowMs: now });
16013
+ const file = sched.persistSnapshot({ projectDir: target, snapshot: snapshot, nowMs: now });
16014
+ console.log(" result: generated (forced)");
16015
+ console.log(" path: " + file);
16016
+ console.log(" audit entries: " + snapshot.totalAuditEntries);
16017
+ process.exit(0);
16018
+ }
16019
+ const res = sched.maybeGenerateSnapshot({ projectDir: target });
16020
+ if (res.generated) {
16021
+ console.log(" result: generated");
16022
+ console.log(" path: " + res.path);
16023
+ console.log(" interval (hours): " + res.intervalHours);
16024
+ } else if (res.reason === "disabled") {
16025
+ console.log(" result: disabled (scheduler off; default)");
16026
+ console.log(" enable: set LOKI_COMPLIANCE_SNAPSHOT_INTERVAL_HOURS=<N>, or use --force to generate now");
16027
+ } else if (res.reason === "not-elapsed") {
16028
+ console.log(" result: not-elapsed (interval not yet reached)");
16029
+ console.log(" interval (hours): " + res.intervalHours);
16030
+ if (res.nextEligibleAtMs) console.log(" next eligible: " + new Date(res.nextEligibleAtMs).toISOString());
16031
+ console.log(" override: use --force to generate now");
16032
+ } else {
16033
+ console.log(" result: " + (res.reason || "no-op"));
16034
+ }
16035
+ process.exit(0);
16036
+ ' || {
16037
+ echo -e "${RED}Error: compliance snapshot failed${NC}"
16038
+ return 1
16039
+ }
16040
+ return 0
16041
+ ;;
16042
+ --help|-h|help)
16043
+ echo -e "${BOLD}loki compliance${NC} - Periodic compliance snapshots"
16044
+ echo ""
16045
+ echo "Usage: loki compliance <subcommand> [options]"
16046
+ echo ""
16047
+ echo "Subcommands:"
16048
+ echo " snapshot [DIR] [--force] Generate/check a compliance snapshot"
16049
+ echo " help Show this help"
16050
+ echo ""
16051
+ echo "The compliance scheduler is default-disabled. A snapshot bundles the"
16052
+ echo "SOC2, ISO27001 and GDPR reports plus the audit chain-integrity verdict"
16053
+ echo "into .loki/audit/compliance-snapshots/. Enable periodic generation by setting"
16054
+ echo "LOKI_COMPLIANCE_SNAPSHOT_INTERVAL_HOURS, or run with --force on demand."
16055
+ ;;
16056
+ *)
16057
+ echo -e "${RED}Unknown compliance subcommand: $subcommand${NC}"
16058
+ echo "Run 'loki compliance help' for usage."
16059
+ exit 1
16060
+ ;;
16061
+ esac
16062
+ }
16063
+
15856
16064
  cmd_audit() {
15857
16065
  local subcommand="${1:-help}"
15858
16066
  local audit_file="$LOKI_DIR/logs/agent-audit.jsonl"
@@ -16148,23 +16356,51 @@ print()
16148
16356
  fi
16149
16357
  ;;
16150
16358
 
16359
+ link-manifest)
16360
+ # Fold the run manifest (.loki/loki-run.json bill-of-materials) into
16361
+ # the agent audit chain so it becomes tamper-evident and verifiable
16362
+ # against the evidence chain. Explicit, on-demand command: cmd_start
16363
+ # execs run.sh and replaces the loki process, so there is no
16364
+ # post-completion return point in this CLI wrapper to auto-invoke
16365
+ # from. Honest no-op (exit 0) when the manifest is absent.
16366
+ shift
16367
+ local target_dir="${1:-$PWD}"
16368
+ cmd_audit_link_manifest "$target_dir"
16369
+ ;;
16370
+ verify-manifest)
16371
+ # Verify the run-manifest link: agent chain integrity AND the on-disk
16372
+ # manifest still matching the hash pinned by the most recent
16373
+ # manifest-link anchor. Honest empty case (exit 0) when no anchor was
16374
+ # recorded yet; nonzero only on a real tamper/integrity failure.
16375
+ shift
16376
+ local target_dir="${1:-$PWD}"
16377
+ cmd_audit_verify_manifest "$target_dir"
16378
+ ;;
16151
16379
  --help|-h|help)
16152
16380
  echo -e "${BOLD}loki audit${NC} - Agent audit log and quality scanning"
16153
16381
  echo ""
16154
16382
  echo "Usage: loki audit <subcommand> [options]"
16155
16383
  echo ""
16156
16384
  echo "Subcommands:"
16157
- echo " log [N] Show last N audit log entries (default: 50)"
16158
- echo " count Count actions by type"
16159
- echo " scan Run quality scan against dashboard API"
16160
- echo " lint Run static analysis on project files"
16161
- echo " test Run test coverage check"
16162
- echo " help Show this help"
16385
+ echo " log [N] Show last N audit log entries (default: 50)"
16386
+ echo " count Count actions by type"
16387
+ echo " scan Run quality scan against dashboard API"
16388
+ echo " lint Run static analysis on project files"
16389
+ echo " test Run test coverage check"
16390
+ echo " link-manifest [P] Link the run manifest into the audit chain (tamper-evidence)"
16391
+ echo " verify-manifest [P] Verify the run-manifest link against the evidence chain"
16392
+ echo " help Show this help"
16163
16393
  echo ""
16164
16394
  echo "Quality Scan Options (loki audit scan):"
16165
16395
  echo " --preset NAME Compliance preset (default|healthcare|fintech|government)"
16166
16396
  echo " --export Save report to .loki/quality/report-{date}.json"
16167
16397
  echo ""
16398
+ echo "Manifest tamper-evidence (loki audit link-manifest / verify-manifest):"
16399
+ echo " Hashes .loki/loki-run.json (the build bill-of-materials) into the"
16400
+ echo " agent audit chain. link-manifest no-ops honestly if the manifest is"
16401
+ echo " absent; verify-manifest reports honestly if no anchor exists yet."
16402
+ echo " Optional [P] is the project dir (default: current directory)."
16403
+ echo ""
16168
16404
  echo "The agent audit log records actions taken during Loki sessions,"
16169
16405
  echo "including CLI invocations, git commits, and session lifecycle events."
16170
16406
  echo "Log file: $audit_file"
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "7.55.0"
10
+ __version__ = "7.56.0"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -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.55.0
5
+ **Version:** v7.56.0
6
6
 
7
7
  ---
8
8
 
@@ -395,7 +395,7 @@ provider works inside the container. Provide auth with your Anthropic API key:
395
395
  # Run Loki Mode in Docker (Claude provider, API-key auth)
396
396
  docker run --rm -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
397
397
  -v $(pwd):/workspace -w /workspace \
398
- asklokesh/loki-mode:7.55.0 start ./my-spec.md
398
+ asklokesh/loki-mode:7.56.0 start ./my-spec.md
399
399
  ```
400
400
 
401
401
  ##### docker compose + .env (no host install)
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var r6=Object.defineProperty;var t6=($)=>$;function i6($,Q){this[$]=t6.bind(null,Q)}var h=($,Q)=>{for(var Z in Q)r6($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:i6.bind(Q,Z)})};var L=($,Q)=>()=>($&&(Q=$($=0)),Q);var K$=import.meta.require;var D1={};h(D1,{lokiDir:()=>P,homeLokiDir:()=>n$,findRepoRootForVersion:()=>o$,REPO_ROOT:()=>g});import{resolve as n,dirname as d$}from"path";import{fileURLToPath as e6}from"url";import{existsSync as P$}from"fs";import{homedir as $Q}from"os";function QQ(){let $=S1;for(let Q=0;Q<6;Q++){if(P$(n($,"VERSION"))&&P$(n($,"autonomy/run.sh")))return $;let Z=d$($);if(Z===$)break;$=Z}return n(S1,"..","..","..")}function o$($){let Q=$;for(let Z=0;Z<6;Z++){if(P$(n(Q,"VERSION"))&&P$(n(Q,"autonomy/run.sh")))return Q;let z=d$(Q);if(z===Q)break;Q=z}return n($,"..","..","..")}function P(){return process.env.LOKI_DIR??n(process.cwd(),".loki")}function n$(){return n($Q(),".loki")}var S1,g;var b=L(()=>{S1=d$(e6(import.meta.url));g=QQ()});import{readFileSync as ZQ}from"fs";import{resolve as zQ,dirname as XQ}from"path";import{fileURLToPath as KQ}from"url";function j$(){if($$!==null)return $$;let $="7.55.0";if(typeof $==="string"&&$.length>0)return $$=$,$$;try{let Q=XQ(KQ(import.meta.url)),Z=o$(Q);$$=ZQ(zQ(Z,"VERSION"),"utf-8").trim()}catch{$$="unknown"}return $$}var $$=null;var a$=L(()=>{b()});var b1={};h(b1,{runOrThrow:()=>qQ,run:()=>k,commandVersion:()=>WQ,commandExists:()=>f,ShellError:()=>s$});async function k($,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([new Response(Z.stdout).text(),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 qQ($,Q={}){let Z=await k($,Q);if(Z.exitCode!==0)throw new s$(`command failed (${Z.exitCode}): ${$.join(" ")}`,Z.exitCode,Z.stdout,Z.stderr);return Z}async function f($){let Q=VQ($),Z=await k(["sh","-c",`command -v ${Q}`],{timeoutMs:5000});if(Z.exitCode===0)return Z.stdout.trim()||null;return null}function VQ($){if(!/^[A-Za-z0-9._/-]+$/.test($))throw Error(`refused to shell-escape suspect token: ${$}`);return $}async function WQ($,Q="--version"){if(!await f($))return null;let z=await k([$,Q],{timeoutMs:5000});if(z.exitCode!==0)return null;return((z.stdout||z.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var s$;var d=L(()=>{s$=class s$ 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 a($){return JQ?"":$}var JQ,T,S,_,wZ,I,R,y,V;var c=L(()=>{JQ=(process.env.NO_COLOR??"").length>0;T=a("\x1B[0;31m"),S=a("\x1B[0;32m"),_=a("\x1B[1;33m"),wZ=a("\x1B[0;34m"),I=a("\x1B[0;36m"),R=a("\x1B[1m"),y=a("\x1B[2m"),V=a("\x1B[0m")});import{existsSync as wQ}from"fs";async function Q$(){if(G$!==void 0)return G$;let $="/opt/homebrew/bin/python3.12";if(wQ($))return G$=$,$;let Q=await f("python3.12");if(Q)return G$=Q,Q;let Z=await f("python3");return G$=Z,Z}async function Z$($,Q={}){let Z=await Q$();if(!Z)return{stdout:"",stderr:"python3 not found",exitCode:127};return k([Z,"-c",$],Q)}var G$;var q$=L(()=>{d()});var e1={};h(e1,{runStatus:()=>uQ});import{existsSync as v,readFileSync as W$,readdirSync as d1,statSync as o1}from"fs";import{resolve as C,basename as DQ}from"path";import{homedir as CQ}from"os";function n1($){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 a1($,Q,Z){if(Q===0)return null;let z=Math.trunc($*100/Q),X=Math.trunc($*k$/Q);if(X>k$)X=k$;let q=k$-X,K=S;if(z>=80)K=T;else if(z>=50)K=_;let W="=".repeat(Math.max(0,X))+" ".repeat(Math.max(0,q)),J=n1($),U=n1(Q);return` ${R}${Z}${V} ${K}[${W}]${V} ${z}% (${J} / ${U})`}async function hQ(){if(await f("jq"))return!0;return process.stdout.write(`${T}Error: jq is required but not installed.${V}
2
+ var r6=Object.defineProperty;var t6=($)=>$;function i6($,Q){this[$]=t6.bind(null,Q)}var h=($,Q)=>{for(var Z in Q)r6($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:i6.bind(Q,Z)})};var L=($,Q)=>()=>($&&(Q=$($=0)),Q);var K$=import.meta.require;var D1={};h(D1,{lokiDir:()=>P,homeLokiDir:()=>n$,findRepoRootForVersion:()=>o$,REPO_ROOT:()=>g});import{resolve as n,dirname as d$}from"path";import{fileURLToPath as e6}from"url";import{existsSync as P$}from"fs";import{homedir as $Q}from"os";function QQ(){let $=S1;for(let Q=0;Q<6;Q++){if(P$(n($,"VERSION"))&&P$(n($,"autonomy/run.sh")))return $;let Z=d$($);if(Z===$)break;$=Z}return n(S1,"..","..","..")}function o$($){let Q=$;for(let Z=0;Z<6;Z++){if(P$(n(Q,"VERSION"))&&P$(n(Q,"autonomy/run.sh")))return Q;let z=d$(Q);if(z===Q)break;Q=z}return n($,"..","..","..")}function P(){return process.env.LOKI_DIR??n(process.cwd(),".loki")}function n$(){return n($Q(),".loki")}var S1,g;var b=L(()=>{S1=d$(e6(import.meta.url));g=QQ()});import{readFileSync as ZQ}from"fs";import{resolve as zQ,dirname as XQ}from"path";import{fileURLToPath as KQ}from"url";function j$(){if($$!==null)return $$;let $="7.56.0";if(typeof $==="string"&&$.length>0)return $$=$,$$;try{let Q=XQ(KQ(import.meta.url)),Z=o$(Q);$$=ZQ(zQ(Z,"VERSION"),"utf-8").trim()}catch{$$="unknown"}return $$}var $$=null;var a$=L(()=>{b()});var b1={};h(b1,{runOrThrow:()=>qQ,run:()=>k,commandVersion:()=>WQ,commandExists:()=>f,ShellError:()=>s$});async function k($,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([new Response(Z.stdout).text(),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 qQ($,Q={}){let Z=await k($,Q);if(Z.exitCode!==0)throw new s$(`command failed (${Z.exitCode}): ${$.join(" ")}`,Z.exitCode,Z.stdout,Z.stderr);return Z}async function f($){let Q=VQ($),Z=await k(["sh","-c",`command -v ${Q}`],{timeoutMs:5000});if(Z.exitCode===0)return Z.stdout.trim()||null;return null}function VQ($){if(!/^[A-Za-z0-9._/-]+$/.test($))throw Error(`refused to shell-escape suspect token: ${$}`);return $}async function WQ($,Q="--version"){if(!await f($))return null;let z=await k([$,Q],{timeoutMs:5000});if(z.exitCode!==0)return null;return((z.stdout||z.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var s$;var d=L(()=>{s$=class s$ 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 a($){return JQ?"":$}var JQ,T,S,_,wZ,I,R,y,V;var c=L(()=>{JQ=(process.env.NO_COLOR??"").length>0;T=a("\x1B[0;31m"),S=a("\x1B[0;32m"),_=a("\x1B[1;33m"),wZ=a("\x1B[0;34m"),I=a("\x1B[0;36m"),R=a("\x1B[1m"),y=a("\x1B[2m"),V=a("\x1B[0m")});import{existsSync as wQ}from"fs";async function Q$(){if(G$!==void 0)return G$;let $="/opt/homebrew/bin/python3.12";if(wQ($))return G$=$,$;let Q=await f("python3.12");if(Q)return G$=Q,Q;let Z=await f("python3");return G$=Z,Z}async function Z$($,Q={}){let Z=await Q$();if(!Z)return{stdout:"",stderr:"python3 not found",exitCode:127};return k([Z,"-c",$],Q)}var G$;var q$=L(()=>{d()});var e1={};h(e1,{runStatus:()=>uQ});import{existsSync as v,readFileSync as W$,readdirSync as d1,statSync as o1}from"fs";import{resolve as C,basename as DQ}from"path";import{homedir as CQ}from"os";function n1($){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 a1($,Q,Z){if(Q===0)return null;let z=Math.trunc($*100/Q),X=Math.trunc($*k$/Q);if(X>k$)X=k$;let q=k$-X,K=S;if(z>=80)K=T;else if(z>=50)K=_;let W="=".repeat(Math.max(0,X))+" ".repeat(Math.max(0,q)),J=n1($),U=n1(Q);return` ${R}${Z}${V} ${K}[${W}]${V} ${z}% (${J} / ${U})`}async function hQ(){if(await f("jq"))return!0;return process.stdout.write(`${T}Error: jq is required but not installed.${V}
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)
@@ -790,4 +790,4 @@ Set LOKI_LEGACY_BASH=1 to force the bash CLI for every command.
790
790
  `),2}default:return process.stderr.write(`Unknown command: ${Q}
791
791
  `),process.stderr.write(s6),2}}l1();process.on("SIGINT",()=>process.exit(130));process.on("SIGTERM",()=>process.exit(143));var KZ=await XZ(Bun.argv.slice(2));process.exit(KZ);
792
792
 
793
- //# debugId=75540993435DE5C864756E2164756E21
793
+ //# debugId=3D16FCC1B4694B0E64756E2164756E21
package/mcp/__init__.py CHANGED
@@ -57,4 +57,4 @@ try:
57
57
  except ImportError:
58
58
  __all__ = ['mcp']
59
59
 
60
- __version__ = '7.55.0'
60
+ __version__ = '7.56.0'
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.55.0",
4
+ "version": "7.56.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.55.0",
5
+ "version": "7.56.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",