loki-mode 7.87.0 → 7.89.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/crash.sh +57 -30
- package/autonomy/lib/own-render.py +617 -0
- package/autonomy/lib/proof-generator.py +27 -1
- package/autonomy/lib/wiki-generator.py +192 -4
- package/autonomy/loki +183 -36
- package/autonomy/run.sh +419 -34
- package/autonomy/spec-interrogation.sh +51 -5
- package/autonomy/telemetry.sh +89 -12
- package/bin/loki +89 -8
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +213 -0
- package/dashboard/static/assets/mermaid.min.js +2030 -0
- package/dashboard/static/index.html +314 -182
- package/dashboard/telemetry.py +62 -15
- package/docs/INSTALLATION.md +2 -2
- package/docs/PRIVACY.md +65 -38
- package/loki-ts/dist/loki.js +249 -243
- 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.89.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.89.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.89.0
|
package/autonomy/crash.sh
CHANGED
|
@@ -39,10 +39,46 @@ _LOKI_CRASH_CAPTURE_PY="${_LOKI_CRASH_DIR}/lib/crash_capture.py"
|
|
|
39
39
|
# its precedence MUST be mirrored by _is_enabled in dashboard/telemetry.py and
|
|
40
40
|
# _loki_telemetry_enabled in autonomy/telemetry.sh.
|
|
41
41
|
#
|
|
42
|
-
# Precedence
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
42
|
+
# Precedence (MUST mirror _loki_telemetry_enabled in autonomy/telemetry.sh and
|
|
43
|
+
# _is_enabled in dashboard/telemetry.py):
|
|
44
|
+
# 1. Any opt-out flag present -> OFF (hard kill, always wins)
|
|
45
|
+
# 2. Else explicit opt-in present -> ON (force-on, even in CI/enterprise)
|
|
46
|
+
# 3. Else enterprise/CI/air-gapped -> OFF (auto-off, safe out of the box)
|
|
47
|
+
# 4. Else (individual default) -> ON (anonymous diagnostics, disclosed once)
|
|
48
|
+
|
|
49
|
+
# _loki_collection_auto_off: enterprise / CI / air-gapped / non-interactive
|
|
50
|
+
# detection. Defined here too (not only telemetry.sh) because autonomy/loki sources
|
|
51
|
+
# crash.sh but not telemetry.sh. Guarded so a single definition wins if both load.
|
|
52
|
+
# This list MUST stay in sync with _loki_telemetry_auto_off (telemetry.sh) and
|
|
53
|
+
# dashboard/telemetry.py.
|
|
54
|
+
if ! declare -f _loki_collection_auto_off >/dev/null 2>&1; then
|
|
55
|
+
_loki_collection_auto_off() {
|
|
56
|
+
[ "${CI:-}" = "true" ] && return 0
|
|
57
|
+
[ -n "${GITHUB_ACTIONS:-}" ] && return 0
|
|
58
|
+
[ -n "${GITLAB_CI:-}" ] && return 0
|
|
59
|
+
[ -n "${BUILDKITE:-}" ] && return 0
|
|
60
|
+
[ -n "${JENKINS_URL:-}" ] && return 0
|
|
61
|
+
[ -n "${TEAMCITY_VERSION:-}" ] && return 0
|
|
62
|
+
[ "${CONTINUOUS_INTEGRATION:-}" = "true" ] && return 0
|
|
63
|
+
[ "${LOKI_ENTERPRISE:-}" = "true" ] && return 0
|
|
64
|
+
[ "${LOKI_AIRGAP:-}" = "true" ] && return 0
|
|
65
|
+
# Non-interactive detection (council cH_r1 AC2). MUST match
|
|
66
|
+
# _loki_telemetry_auto_off (telemetry.sh) and _auto_off (dashboard/telemetry.py):
|
|
67
|
+
# trust the explicit LOKI_TTY_INTERACTIVE signal resolved once at the entry
|
|
68
|
+
# point; fall back to a live `-t` probe only when the signal is unset (isolated
|
|
69
|
+
# unit test that bypassed the entry point). A fresh `-t` probe in an
|
|
70
|
+
# FD-detached subshell would wrongly auto-off a real interactive user.
|
|
71
|
+
if [ -n "${LOKI_TTY_INTERACTIVE:-}" ]; then
|
|
72
|
+
[ "${LOKI_TTY_INTERACTIVE}" = "1" ] && return 1
|
|
73
|
+
return 0
|
|
74
|
+
fi
|
|
75
|
+
if [ ! -t 1 ] && [ ! -t 0 ]; then
|
|
76
|
+
return 0
|
|
77
|
+
fi
|
|
78
|
+
return 1
|
|
79
|
+
}
|
|
80
|
+
fi
|
|
81
|
+
|
|
46
82
|
loki_collection_enabled() {
|
|
47
83
|
local telem_lower
|
|
48
84
|
telem_lower="$(printf '%s' "${LOKI_TELEMETRY:-}" | tr '[:upper:]' '[:lower:]')"
|
|
@@ -59,7 +95,7 @@ loki_collection_enabled() {
|
|
|
59
95
|
return 1
|
|
60
96
|
fi
|
|
61
97
|
|
|
62
|
-
# --- 2.
|
|
98
|
+
# --- 2. Explicit opt-in forces ON (overrides the enterprise/CI auto-off) ---
|
|
63
99
|
# Env: LOKI_TELEMETRY=on (case-insensitive, exact word "on").
|
|
64
100
|
[ "$telem_lower" = "on" ] && return 0
|
|
65
101
|
# Persistent opt-in in ~/.loki/config (written by: loki telemetry on).
|
|
@@ -67,8 +103,11 @@ loki_collection_enabled() {
|
|
|
67
103
|
return 0
|
|
68
104
|
fi
|
|
69
105
|
|
|
70
|
-
# --- 3.
|
|
71
|
-
return 1
|
|
106
|
+
# --- 3. Enterprise / CI / air-gapped: auto-off (safe out of the box) ---
|
|
107
|
+
_loki_collection_auto_off && return 1
|
|
108
|
+
|
|
109
|
+
# --- 4. Individual interactive default: ON (anonymous diagnostics) ---
|
|
110
|
+
return 0
|
|
72
111
|
}
|
|
73
112
|
|
|
74
113
|
# _loki_crash_python: resolve a python3 interpreter, or return 1 if absent.
|
|
@@ -156,35 +195,23 @@ loki_crash_friction() {
|
|
|
156
195
|
return 0
|
|
157
196
|
}
|
|
158
197
|
|
|
159
|
-
# loki_show_disclosure_once:
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
#
|
|
198
|
+
# loki_show_disclosure_once: intentionally a SILENT no-op.
|
|
199
|
+
#
|
|
200
|
+
# The verbose multi-line disclosure block was removed (it cluttered logs + the
|
|
201
|
+
# run experience, and its "off by default" copy no longer matches the on-by-
|
|
202
|
+
# default-for-individuals model). Disclosure now lives in two non-noisy places,
|
|
203
|
+
# so on-by-default collection is still NEVER covert:
|
|
204
|
+
# 1. a single line on the one-time welcome screen (cmd_welcome_terminal), shown
|
|
205
|
+
# only when diagnostics are actually on, and
|
|
206
|
+
# 2. docs/PRIVACY.md (canonical), plus `loki telemetry` status/off.
|
|
207
|
+
# Kept as a callable no-op so existing callers (run.sh) do not break, and still
|
|
208
|
+
# records the DISCLOSURE_SHOWN sentinel for back-compat with any reader of it.
|
|
163
209
|
loki_show_disclosure_once() {
|
|
164
210
|
local config="${HOME}/.loki/config"
|
|
165
|
-
|
|
166
|
-
# Already shown? Never re-show.
|
|
167
211
|
if [ -f "$config" ] && grep -q "^DISCLOSURE_SHOWN=true" "$config" 2>/dev/null; then
|
|
168
212
|
return 0
|
|
169
213
|
fi
|
|
170
|
-
|
|
171
|
-
# Disclosure copy (opt-in framing; no emojis, no em dashes).
|
|
172
|
-
{
|
|
173
|
-
echo ""
|
|
174
|
-
echo "Loki Mode anonymous diagnostics are OFF by default. Nothing is collected"
|
|
175
|
-
echo "or sent unless you opt in, so a default install sends us no telemetry"
|
|
176
|
-
echo "or diagnostics. Air-gapped and enterprise deployments are safe out of"
|
|
177
|
-
echo "the box."
|
|
178
|
-
echo "If you opt in, we send anonymous diagnostics only (os, arch, version,"
|
|
179
|
-
echo "error type, sanitized stack signatures). Never your code, prompts, paths,"
|
|
180
|
-
echo "keys, or repo names."
|
|
181
|
-
echo "See docs/PRIVACY.md. Opt in anytime with: loki telemetry on"
|
|
182
|
-
echo ""
|
|
183
|
-
} >&2
|
|
184
|
-
|
|
185
|
-
# Persist the sentinel (best-effort; never fail the caller).
|
|
186
214
|
mkdir -p "${HOME}/.loki" 2>/dev/null || return 0
|
|
187
215
|
echo "DISCLOSURE_SHOWN=true" >> "$config" 2>/dev/null || true
|
|
188
|
-
|
|
189
216
|
return 0
|
|
190
217
|
}
|