loki-mode 10.6.6 → 10.6.7
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/.github/actions/issue-to-pr/action.yml +25 -11
- package/.github/workflows/loki-issue-to-pr.yml +21 -10
- package/README.md +103 -53
- package/SKILL.md +11 -8
- package/VERSION +1 -1
- package/autonomy/loki +43 -5
- package/autonomy/run.sh +26 -1
- package/bin/loki +8 -0
- package/dashboard/__init__.py +1 -1
- package/docs/AUDIT-CHAIN-THREAT-MODEL.md +1 -1
- package/docs/DEMOS.md +11 -26
- package/docs/EVALUATING.md +2 -3
- package/docs/INSTALLATION.md +2 -2
- package/docs/TOOLS.md +1 -1
- package/docs/air-gapped.md +1 -1
- package/docs/dashboard-guide.md +2 -0
- package/docs/dev/project-structure.md +1 -1
- package/docs/dev/release-checklist.md +1 -2
- package/docs/enterprise/architecture.md +1 -1
- package/docs/siem-integration.md +2 -2
- package/docs/v10/D61-SPEED.md +78 -0
- package/docs/v10/DECISIONS.md +9 -0
- package/docs/v10/GUIDE.md +63 -1
- package/docs/v10/HANDOFF-NEXT-WEEK.md +34 -0
- package/loki-ts/dist/loki.js +541 -554
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-CH-bmw4l.js → AdminPage-DyjnUcaP.js} +1 -1
- package/web-app/dist/assets/{Avatar-Bos-ky_x.js → Avatar-CY0sQNao.js} +1 -1
- package/web-app/dist/assets/{Badge-DNJyHg9Y.js → Badge-BmwTRu72.js} +1 -1
- package/web-app/dist/assets/{Button-KqD3Tt-I.js → Button-BRf5aTlb.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-l6oTsRaL.js → CockpitPage-RR94HuxS.js} +1 -1
- package/web-app/dist/assets/{ComparePage-DN6uxXko.js → ComparePage-CFWAuPRO.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-CKQhnvU9.js → ErrorBoundary-4cDADrG-.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-CzSIqLmy.js → EvidenceReceiptPanel-ChPFx2eM.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-YJUcDezn.js → GitHubIssuesPanel-B0TAjyeW.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-Bv7xFvJN.js → GitHubPRsPanel-BbszEwW9.js} +1 -1
- package/web-app/dist/assets/{HomePage-CJsxBbii.js → HomePage-DrBgzs1d.js} +2 -2
- package/web-app/dist/assets/{LoginPage-D1V2Ag0s.js → LoginPage-Bu7b2DGz.js} +1 -1
- package/web-app/dist/assets/{MagicPage-BBVNMEr5.js → MagicPage-BFEYp631.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-CtHM-IlA.js → MetricsPage-eIe2naVR.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BBEEJLj5.js → NotFoundPage-BVWYkNt9.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-BVRJoEaQ.js → ProjectPage-zmxyu732.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-DqaA9rUa.js → ProjectsPage-Dq5NdCak.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-B_RQV_vF.js → SettingsPage-CCrJOMe0.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-DqN-mrZ8.js → ShowcasePage-n-Ipzp01.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-D-CvuL-K.js → SystemSettingsPage-CP_rjYXK.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CzkkDcPj.js → TeamsPage-B_P9DepW.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-Bbchk7YQ.js → TemplatesPage-h-3A6PQT.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-B32BAX--.js → TerminalOutput-pD0nJ1BU.js} +1 -1
- package/web-app/dist/assets/{activity-C9vnEmhG.js → activity-ChFwzT-d.js} +1 -1
- package/web-app/dist/assets/{bell-XsIhkyjq.js → bell-BX-eK8Gu.js} +1 -1
- package/web-app/dist/assets/{bot-CvQhqBws.js → bot-fj5PkPtR.js} +1 -1
- package/web-app/dist/assets/{check-HmG8WcD-.js → check-BGAbHlvD.js} +1 -1
- package/web-app/dist/assets/{chevron-left-C1KNgnbD.js → chevron-left-BzFUxHgb.js} +1 -1
- package/web-app/dist/assets/{circle-alert-DSmCvZju.js → circle-alert-BQrg5DWl.js} +1 -1
- package/web-app/dist/assets/{clock-CPhE3RXd.js → clock-CTu9lkVo.js} +1 -1
- package/web-app/dist/assets/{cloud-29lwqocB.js → cloud-DrIENRiE.js} +1 -1
- package/web-app/dist/assets/{code-xml-4jZUzbPt.js → code-xml-PaoVpfur.js} +1 -1
- package/web-app/dist/assets/{database-H0Ct2r-8.js → database-DMmkAotn.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-DsXkO0yT.js → dollar-sign-B2LQdBoX.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-BM8w_nvX.js → file-code-corner-Dfv1XXeR.js} +1 -1
- package/web-app/dist/assets/{file-plus-BWkYTJ4D.js → file-plus-D2Wzf2wd.js} +1 -1
- package/web-app/dist/assets/{globe-FOFDl_8Z.js → globe-DxotVWt8.js} +1 -1
- package/web-app/dist/assets/{hammer-orm5gvky.js → hammer-Brfy5ZrJ.js} +1 -1
- package/web-app/dist/assets/{index-B6juCuPX.js → index-BfhHMwi8.js} +3 -3
- package/web-app/dist/assets/{layers-DUQPkPAl.js → layers-DfxSWDvp.js} +1 -1
- package/web-app/dist/assets/{loader-circle-Deq6bDar.js → loader-circle-CxIrzNwx.js} +1 -1
- package/web-app/dist/assets/{lock-CSzWTPRC.js → lock-m6nzhtpU.js} +1 -1
- package/web-app/dist/assets/{package-CmACgZuF.js → package-ri9oE9Jc.js} +1 -1
- package/web-app/dist/assets/{plus-BjPW5v3A.js → plus-DWeTAMVV.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-DhI1sHaj.js → refresh-cw-BGMSpaMh.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Byi2ouWB.js → rotate-ccw-DD1xBD_b.js} +1 -1
- package/web-app/dist/assets/{scroll-text-gq7bJ81H.js → scroll-text-BCCR_AN9.js} +1 -1
- package/web-app/dist/assets/{server-YbY5s1-X.js → server-CmMWPIjS.js} +1 -1
- package/web-app/dist/assets/{shield-alert-DhKjtwZt.js → shield-alert-BZZmBVEJ.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-D2X5JR-5.js → thumbs-up-OaxbNRXu.js} +1 -1
- package/web-app/dist/assets/{trash-2-BHAmMxTq.js → trash-2-DmcSzTfr.js} +1 -1
- package/web-app/dist/assets/{trending-down-C41kQa-Q.js → trending-down-BmfXLykz.js} +1 -1
- package/web-app/dist/assets/{trending-up-M-OK_9DC.js → trending-up-Djec3jIq.js} +1 -1
- package/web-app/dist/assets/{upload-CarpPiGw.js → upload-BN8dXIlF.js} +1 -1
- package/web-app/dist/assets/{usePolling-rJ7rM7R0.js → usePolling-Cu4yi04I.js} +1 -1
- package/web-app/dist/assets/{user-cBhWpZen.js → user-IBI-k10o.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/docs/walkthrough/README.md +0 -44
|
@@ -15,7 +15,7 @@ branding:
|
|
|
15
15
|
# ran the agent; this one does not.
|
|
16
16
|
#
|
|
17
17
|
# Token co-location within THIS job: the fetch step below holds GH_TOKEN and
|
|
18
|
-
# runs no agent; the agent step runs `loki
|
|
18
|
+
# runs no agent; the agent step runs Loki 10 (`loki "<task>" --no-pr`) on the pre-fetched PRD text
|
|
19
19
|
# and is given no token (GH_TOKEN/GITHUB_TOKEN/GH_ENTERPRISE_TOKEN/
|
|
20
20
|
# GITHUB_ENTERPRISE_TOKEN all explicitly blanked, overriding anything the
|
|
21
21
|
# caller's `uses:` step set at a level this composite's steps would otherwise
|
|
@@ -191,7 +191,8 @@ runs:
|
|
|
191
191
|
env:
|
|
192
192
|
LOKI_PROVIDER: ${{ inputs.provider }}
|
|
193
193
|
LOKI_BUDGET_LIMIT: ${{ inputs.budget_limit }}
|
|
194
|
-
LOKI_MAX_ITERATIONS: ${{ inputs.max_iterations }}
|
|
194
|
+
LOKI_MAX_ITERATIONS: ${{ inputs.max_iterations }} # not read by engine10
|
|
195
|
+
LOKI_E10_CAP_S: '2400'
|
|
195
196
|
# The agent step never pushes or opens a PR (Rule of Two).
|
|
196
197
|
LOKI_DELEGATE_PR: '0'
|
|
197
198
|
ISSUE_REF: ${{ steps.ref.outputs.ref }}
|
|
@@ -213,29 +214,42 @@ runs:
|
|
|
213
214
|
|
|
214
215
|
START_SHA="$(git rev-parse HEAD)"
|
|
215
216
|
RC=0
|
|
216
|
-
|
|
217
|
+
# Loki 10 engine, routed explicitly: the task is prefixed so it is always
|
|
218
|
+
# multi-word and never starts with "-" (bin/loki sends a one-word or
|
|
219
|
+
# flag-first argument to the legacy CLI or a subcommand, and a body like
|
|
220
|
+
# "status" would otherwise run that subcommand). The task goes first and
|
|
221
|
+
# --no-pr after it, because a flag-first call also stays on legacy.
|
|
222
|
+
# --no-pr: engine10 ignores LOKI_DELEGATE_PR; this step holds no token.
|
|
223
|
+
# The run commits on loki/<runId> in this checkout, so HEAD has the change.
|
|
224
|
+
TASK="Resolve ${ISSUE_REF}. Task spec follows. $(cat "$PRD_FILE")"
|
|
225
|
+
loki "$TASK" --no-pr || RC=$?
|
|
217
226
|
|
|
218
227
|
OUT="$RUNNER_TEMP/loki-out"
|
|
219
228
|
mkdir -p "$OUT"
|
|
220
229
|
git diff --binary "$START_SHA" HEAD -- . ':(exclude).loki' > "$OUT/loki.patch"
|
|
230
|
+
# PR body: the Loki 10 receipt this run sealed under .loki/runs/e10-*/.
|
|
231
|
+
# Rendered from the run's own receipt.md; the digest comes from receipt.json.
|
|
232
|
+
RUN_DIR="$(ls -d .loki/runs/e10-* 2>/dev/null | sort | tail -n 1)"
|
|
221
233
|
{
|
|
222
234
|
echo "Resolves ${ISSUE_REF}."
|
|
223
235
|
echo ""
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
236
|
+
if [ -n "$RUN_DIR" ] && [ -f "$RUN_DIR/receipt.md" ]; then
|
|
237
|
+
head -c 20000 "$RUN_DIR/receipt.md"
|
|
238
|
+
cp "$RUN_DIR/receipt.json" "$OUT/receipt.json" 2>/dev/null || true
|
|
239
|
+
SHA="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1])).get("receipt_sha256",""))' "$RUN_DIR/receipt.json" 2>/dev/null || true)"
|
|
240
|
+
echo ""
|
|
241
|
+
echo "Receipt digest (sha256): ${SHA:-unavailable}"
|
|
242
|
+
echo "Check it: download the loki-patch artifact of this run and run \`loki verify receipt.json\`."
|
|
229
243
|
else
|
|
230
|
-
echo "Evidence Receipt: unavailable for this run."
|
|
244
|
+
echo "Evidence Receipt: unavailable for this run (no receipt under .loki/runs/)."
|
|
231
245
|
fi
|
|
232
246
|
} > "$OUT/pr-body.md"
|
|
233
247
|
echo "patch=$OUT/loki.patch" >> "$GITHUB_OUTPUT"
|
|
234
248
|
echo "pr_body=$OUT/pr-body.md" >> "$GITHUB_OUTPUT"
|
|
235
249
|
|
|
236
250
|
echo "::warning::This action does not open the pull request (Rule of Two). Upload outputs.patch and open the PR from a job that holds the write token and runs no agent; see .github/workflows/loki-issue-to-pr.yml in asklokesh/loki-mode."
|
|
237
|
-
if [ -
|
|
238
|
-
echo "
|
|
251
|
+
if [ -n "$RUN_DIR" ]; then
|
|
252
|
+
echo "Loki 10 receipt under $RUN_DIR/"
|
|
239
253
|
fi
|
|
240
254
|
|
|
241
255
|
exit "$RC"
|
|
@@ -82,8 +82,10 @@ jobs:
|
|
|
82
82
|
# to fetch the issue and withholds it from the agent session.
|
|
83
83
|
GH_TOKEN: ${{ github.token }}
|
|
84
84
|
ISSUE: ${{ github.event.issue.number || inputs.issue }}
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
# engine10 reads no cost or iteration cap; its only cap is wall time.
|
|
86
|
+
LOKI_E10_CAP_S: '2400'
|
|
87
|
+
LOKI_BUDGET_LIMIT: '10.00' # not read by engine10; kept for the legacy path
|
|
88
|
+
LOKI_MAX_ITERATIONS: '20' # not read by engine10; kept for the legacy path
|
|
87
89
|
# Never push or open a PR from here; the publish job does that.
|
|
88
90
|
LOKI_DELEGATE_PR: '0'
|
|
89
91
|
run: |
|
|
@@ -97,7 +99,12 @@ jobs:
|
|
|
97
99
|
git config user.email "${GITHUB_ACTOR:-loki-mode}@users.noreply.github.com"
|
|
98
100
|
|
|
99
101
|
RC=0
|
|
100
|
-
|
|
102
|
+
# Loki 10 issue entry. --no-pr is required: engine10 ignores
|
|
103
|
+
# LOKI_DELEGATE_PR, and this job's read-only token cannot push, open a
|
|
104
|
+
# PR or comment (supervisor.ts main: noPr drops opts.pr and opts.comment).
|
|
105
|
+
# The run commits on branch loki/<runId> checked out in this very
|
|
106
|
+
# checkout (stages/intake.ts ensureBranch), so HEAD carries the change.
|
|
107
|
+
loki "${GITHUB_REPOSITORY}#${ISSUE}" --no-pr || RC=$?
|
|
101
108
|
|
|
102
109
|
OUT="$RUNNER_TEMP/loki-out"
|
|
103
110
|
mkdir -p "$OUT"
|
|
@@ -105,17 +112,21 @@ jobs:
|
|
|
105
112
|
# this run started from. .loki/ is run state, never part of the change.
|
|
106
113
|
git diff --binary "$GITHUB_SHA" HEAD -- . ':(exclude).loki' > "$OUT/loki.patch"
|
|
107
114
|
|
|
108
|
-
# PR body: the
|
|
115
|
+
# PR body: the Loki 10 receipt this run sealed under .loki/runs/e10-*/.
|
|
116
|
+
# Rendered from the run's own receipt.md; the digest comes from receipt.json.
|
|
117
|
+
RUN_DIR="$(ls -d .loki/runs/e10-* 2>/dev/null | sort | tail -n 1)"
|
|
109
118
|
{
|
|
110
119
|
echo "Resolves #${ISSUE}."
|
|
111
120
|
echo ""
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
121
|
+
if [ -n "$RUN_DIR" ] && [ -f "$RUN_DIR/receipt.md" ]; then
|
|
122
|
+
head -c 20000 "$RUN_DIR/receipt.md"
|
|
123
|
+
cp "$RUN_DIR/receipt.json" "$OUT/receipt.json" 2>/dev/null || true
|
|
124
|
+
SHA="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1])).get("receipt_sha256",""))' "$RUN_DIR/receipt.json" 2>/dev/null || true)"
|
|
125
|
+
echo ""
|
|
126
|
+
echo "Receipt digest (sha256): ${SHA:-unavailable}"
|
|
127
|
+
echo "Check it: download the loki-patch artifact of this run and run \`loki verify receipt.json\`."
|
|
117
128
|
else
|
|
118
|
-
echo "Evidence Receipt: unavailable for this run."
|
|
129
|
+
echo "Evidence Receipt: unavailable for this run (no receipt under .loki/runs/)."
|
|
119
130
|
fi
|
|
120
131
|
} > "$OUT/pr-body.md"
|
|
121
132
|
|
package/README.md
CHANGED
|
@@ -42,12 +42,14 @@ loki doctor # checks your setup, names any blocker
|
|
|
42
42
|
|
|
43
43
|
Upgrade with `loki self-update`. Long form: [Installation Guide](docs/INSTALLATION.md). `npm install -g loki-mode` installs the `latest` dist-tag; see [Release channels](#release-channels-next-and-latest) for `next`.
|
|
44
44
|
|
|
45
|
-
**Loki needs a model to drive.** An `ANTHROPIC_API_KEY` alone is enough (the Claude Agent SDK ships inside Loki; on the
|
|
45
|
+
**Loki needs a model to drive.** An `ANTHROPIC_API_KEY` alone is enough (the Claude Agent SDK ships inside Loki; on the legacy engine this path needs Bun and `LOKI_SDK_MODE=full`, see Setup details below), or point it at Claude Code, Cline, Codex, Aider or opencode. `loki doctor` tells you exactly what is missing.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
export ANTHROPIC_API_KEY=sk-...
|
|
49
49
|
loki doctor
|
|
50
|
-
loki quick "fix the login bug" # one small task on the Loki 10 engine
|
|
50
|
+
loki quick "fix the login bug" # one small task on the Loki 10 engine, no PR
|
|
51
|
+
loki "fix the login redirect loop" --no-pr # any task, Loki 10 engine
|
|
52
|
+
loki owner/repo#123 # one GitHub, GitLab or Jira issue to a pull request, Loki 10 engine
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
<details>
|
|
@@ -71,7 +73,7 @@ loki-seal is a Claude Code Stop hook that runs your repo's real test suite when
|
|
|
71
73
|
|
|
72
74
|
## Loki 10 engine
|
|
73
75
|
|
|
74
|
-
Loki
|
|
76
|
+
Loki 10 is the default engine for `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. <!-- loki10-default -->
|
|
75
77
|
|
|
76
78
|
Guide, provider table and summary format: [docs/v10/GUIDE.md](docs/v10/GUIDE.md).
|
|
77
79
|
|
|
@@ -83,9 +85,9 @@ loki "fix the login redirect loop" --no-pr
|
|
|
83
85
|
loki owner/repo#123
|
|
84
86
|
```
|
|
85
87
|
|
|
86
|
-
The v10 engine accepts a quoted multi-word task, a GitHub, GitLab or Jira issue reference, `status`, `verify`, `dashboard`, and other subcommands. Flags (`loki-ts/src/engine10/cli.ts` USAGE): `--no-pr` builds and verifies without opening a pull request, `--deep` requests the deep verify pass and a longer implement budget, `--provider <name>` picks the coding provider (`--json` and `--verbose` are also parsed by the supervisor, see [Quiet output](#quiet-output)). The engine needs Bun; without it the command exits 1 with a message and installation instructions.
|
|
88
|
+
The v10 engine accepts a quoted multi-word task, a GitHub, GitLab or Jira issue reference, `status`, `verify`, `dashboard`, and other subcommands. Flags (`loki-ts/src/engine10/cli.ts` USAGE): `--no-pr` builds and verifies without opening a pull request, `--deep` requests the deep verify pass and a longer implement budget, `--provider <name>` picks the coding provider, `--max-cost <usd>` sets the per-run cost cap (default $20.00, or `budgets.per_run` in `loki.yaml`; the flag wins; the start line prints it as `cap $20.00 (default)`; reaching it ends the run BUDGET_STOP, exit 3) (`--json` and `--verbose` are also parsed by the supervisor, see [Quiet output](#quiet-output)). The engine needs Bun; without it the command exits 1 with a message and installation instructions.
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
**Legacy engine (being removed).** The previous engine still ships in 10.6.6 and is reachable with `LOKI_ENGINE=legacy` or `loki legacy <args>`. `loki start owner/repo#N`, `loki start <issue URL>` and `loki start "<multi-word task>"` run on Loki 10, the same as `loki owner/repo#N` and `loki "<task>"`; `loki start ./prd.md`, a flag-first call and a one-word start stay on the legacy engine. For many issues use `loki backlog owner/repo --all|--label X|--issues N,N` (many issues, N in parallel, each on a `loki/backlog-N` worktree branch) instead. Legacy removal is planned and resumes on 2026-10-07; see [docs/v10/LEGACY-REMOVAL.md](docs/v10/LEGACY-REMOVAL.md). Sections below marked "legacy" describe features that run only on that engine.
|
|
89
91
|
|
|
90
92
|
### The state machine
|
|
91
93
|
|
|
@@ -115,14 +117,58 @@ flowchart TD
|
|
|
115
117
|
| implement | A provider session makes the change, under a time budget (480s default, 1800s with `--deep`). |
|
|
116
118
|
| verify and fix | Runs the checks. Failures feed up to 2 fix rounds (`MAX_FIX_ROUNDS`). The same failures three verifies running end the run as STALLED. |
|
|
117
119
|
| commit and seal | Commits the diff, then writes `.loki/runs/<run-id>/receipt.json` and `receipt.md`, signed by default. |
|
|
118
|
-
| pr | Opened by the supervisor, not the worker (the worker never holds a GitHub token). A non-VERIFIED run opens a draft PR. |
|
|
120
|
+
| pr | Opened by the supervisor, not the worker (the worker never holds a GitHub token). A non-VERIFIED run opens a draft PR. The body is written for a 60-second review: what the issue asked, what changed, how it was tested, NOT PROVEN, then the receipt digest and `loki verify`. Data the run did not record prints "not recorded". |
|
|
119
121
|
| deep verify | Detached, started after the PR opens (so not with `--no-pr`): full suite, app-boot probe, council, secret scan. A check that is refused or unavailable is reported as NOT PROVEN, never as red. `--deep` is a separate flag that raises the implement and run budgets. |
|
|
120
122
|
|
|
123
|
+
PR body sample (`loki-ts/src/e10ext/reviewer_body.ts`):
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
## What the issue asked
|
|
127
|
+
- handles empty input
|
|
128
|
+
- rejects bad tokens
|
|
129
|
+
|
|
130
|
+
## What changed and why
|
|
131
|
+
- Why: Fix the parser
|
|
132
|
+
- src/parser.ts
|
|
133
|
+
- tests/parser.test.ts
|
|
134
|
+
|
|
135
|
+
## How it was tested
|
|
136
|
+
- Verdict: VERIFIED
|
|
137
|
+
- Checks: 2 passed, 0 failed, 0 not run, 0 flaky (4 individual tests counted)
|
|
138
|
+
- Command: `bun test tests/parser.test.ts` -> pass
|
|
139
|
+
- Target tests (written before the fix): parser.test.ts
|
|
140
|
+
- Before the fix: 2 failing, 0 passing on base; after: pass
|
|
141
|
+
|
|
142
|
+
## NOT PROVEN
|
|
143
|
+
- none
|
|
144
|
+
|
|
145
|
+
## Receipt
|
|
146
|
+
- Digest: sha256:ab12... (signed)
|
|
147
|
+
- Verify: `loki verify run-1`
|
|
148
|
+
```
|
|
149
|
+
|
|
121
150
|
The run cap is 900s (2700s with `--deep`, `DEFAULT_CAP_S` and `DEEP_CAP_S` in `types.ts`); commit, seal and pr still run after the cap fires. A run whose cap fired and which did not verify exits BUDGET_STOP.
|
|
122
151
|
|
|
123
152
|
A finished run prints a short summary (see [Quiet output](#quiet-output), which also shows an example) whose `NOT PROVEN` line is never empty by omission: deep checks deferred to the deep-verify pass are always listed there.
|
|
124
153
|
|
|
125
|
-
`loki status [run-id]
|
|
154
|
+
`loki status [run-id]` and `loki verify [run-id]` are built on the v10 path (bare `loki verify` follows the newest run, v10 or legacy). `loki dashboard` and `loki status` reach the v10 commands with `LOKI_ENGINE=v10`. Slack notifications are not part of the v10 engine surface yet.
|
|
155
|
+
|
|
156
|
+
## Triggers without a cloud
|
|
157
|
+
|
|
158
|
+
Both run on your own GitHub Actions minutes; there is no hosted service.
|
|
159
|
+
|
|
160
|
+
- Issue to PR: copy `.github/workflows/loki-issue-to-pr.yml` into your repository. Label an issue `loki`, or comment `/loki` as an owner, member or collaborator, and it runs `loki owner/repo#N` (the Loki 10 engine) and opens a pull request with an evidence receipt. The agent job holds a read-only token; a separate publish job opens the PR. Set `ANTHROPIC_API_KEY` in repository secrets.
|
|
161
|
+
- Nightly backlog: copy `examples/loki-nightly-backlog.yml` into `.github/workflows/`. Its `schedule:` trigger runs `loki backlog owner/repo --label loki`, one Loki 10 run per labeled open issue:
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
on:
|
|
165
|
+
schedule:
|
|
166
|
+
- cron: '17 3 * * *' # nightly, 03:17 UTC
|
|
167
|
+
# ...
|
|
168
|
+
- run: loki backlog "${GITHUB_REPOSITORY}" --label loki --concurrency 2
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`loki backlog` also takes `--all`, `--issues 1,2,3` and `--dry-run`. The nightly job runs the agent and a write token together, so label only issues you trust.
|
|
126
172
|
|
|
127
173
|
## Outcomes and exit codes
|
|
128
174
|
|
|
@@ -134,7 +180,7 @@ A v10 run ends in exactly one outcome. The mapping is `EXIT` in `loki-ts/src/eng
|
|
|
134
180
|
| 0 | ALREADY_SATISFIED | The work was already done; evidence is recorded. |
|
|
135
181
|
| 1 | FAILED | A check failed, the stage failed, or the event log was modified outside the engine. |
|
|
136
182
|
| 2 | (usage) | No task given, not inside a git repository, or a preflight refusal. Nothing ran. |
|
|
137
|
-
| 3 | BUDGET_STOP | The cost or time cap fired before the work finished. |
|
|
183
|
+
| 3 | BUDGET_STOP | The cost cap (`--max-cost`, `budgets.per_run`, default $20.00) or the time cap fired before the work finished. |
|
|
138
184
|
| 4 | BLOCKED | Spec conflict: the contract cannot be satisfied as written. The summary names the conflict (`spec conflict: <reason>`); the run never guesses and calls it done. |
|
|
139
185
|
| 5 | STALLED | The same failures three verifies in a row. |
|
|
140
186
|
|
|
@@ -189,17 +235,6 @@ The first-run gate runs the README's default entry point for a new user on a thr
|
|
|
189
235
|
|
|
190
236
|
Policy (D49): every green release is promoted to `latest` after the automated first-run gate. The promote workflow runs automatically after Post-Release Smoke succeeds; a failed smoke or gate leaves the version on `next`. `workflow_dispatch` remains for manual runs of an exact version.
|
|
191
237
|
|
|
192
|
-
```mermaid
|
|
193
|
-
flowchart LR
|
|
194
|
-
S[Slice: one engineer, own tests] --> M[Merge when green]
|
|
195
|
-
M --> T[Train: batch pushed once]
|
|
196
|
-
T --> CI[Full CI on the exact SHA]
|
|
197
|
-
CI --> N[npm next]
|
|
198
|
-
N --> G[Automated first-run gate on the installed version]
|
|
199
|
-
G -- pass --> L[npm latest, Docker latest, Homebrew]
|
|
200
|
-
G -- fail --> X[Stays on next, fix-forward slice]
|
|
201
|
-
```
|
|
202
|
-
|
|
203
238
|
## loki doctor
|
|
204
239
|
|
|
205
240
|
```bash
|
|
@@ -214,6 +249,18 @@ Exit 0 when every required check passes; optional warnings (an absent provider C
|
|
|
214
249
|
|
|
215
250
|
Migration: `loki modernize heal <repo> --assess` was a legacy command for read-only analysis. The v10 path `loki modernize <repo> --to <target>` is not yet finished: only `--dry-run` works (inventory, dependency graph, unit clustering, cost, time and risk estimate). A real run stops after the estimate and prints `modernize: oracle capture and execution are not built yet; use --dry-run`. Targets `python3` and `java21` exist; the Java dependency graph is not wired in yet. Design: [docs/v10/MODERNIZE.md](docs/v10/MODERNIZE.md), user summary: [docs/v10/GUIDE-MODERNIZE.md](docs/v10/GUIDE-MODERNIZE.md).
|
|
216
251
|
|
|
252
|
+
## Control Plane v0 (preview)
|
|
253
|
+
|
|
254
|
+
A local control plane and UI for many runs, off by default. Enable it with `LOKI_CONTROL=1`:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
LOKI_CONTROL=1 loki control serve # 127.0.0.1, default port 47821 (--port N, --db PATH)
|
|
258
|
+
LOKI_CONTROL=1 loki control backfill . # ship ./.loki/runs to the control plane
|
|
259
|
+
LOKI_CONTROL=1 loki control status # reachable? how many runs held?
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
The URL comes from `LOKI_CONTROL_URL`, else `http://127.0.0.1:${LOKI_CONTROL_PORT:-47821}`. Set `LOKI_CONTROL_URL` on a run to ship it live. See [docs/v10/CONTROL-PLANE.md](docs/v10/CONTROL-PLANE.md).
|
|
263
|
+
|
|
217
264
|
## Providers
|
|
218
265
|
|
|
219
266
|
Loki's autonomy and quality loop are the product; the coding CLI is swappable. With `LOKI_PROVIDER` unset, Loki auto-detects the first installed provider in this order (`providers/loader.sh`): claude, cline, codex, aider, opencode. An explicit choice always wins and is never silently substituted. Gemini CLI is deprecated: `LOKI_PROVIDER=gemini` exits with a migration message.
|
|
@@ -284,13 +331,13 @@ completion claim is backed by deterministic evidence and is independently
|
|
|
284
331
|
re-checkable; it does not claim the generated code is bug-free.
|
|
285
332
|
|
|
286
333
|
<details>
|
|
287
|
-
<summary><b>Setup details: providers, other models, what loki doctor checks</b></summary>
|
|
334
|
+
<summary><b>Setup details: providers, other models, what loki doctor checks (PRD-file examples use the legacy `loki start`)</b></summary>
|
|
288
335
|
|
|
289
|
-
Other spec sources
|
|
336
|
+
The `loki start <file>` examples below run on the legacy engine (being removed). A `loki start` call with an issue ref, an issue URL or a quoted multi-word task runs on Loki 10; the provider and model variables apply to both engines. Other spec sources on the legacy engine:
|
|
290
337
|
|
|
291
338
|
```bash
|
|
292
339
|
loki init my-app --template simple-todo-app # scaffold a starter PRD
|
|
293
|
-
loki start owner/repo#123 # a GitHub issue
|
|
340
|
+
loki start owner/repo#123 # a GitHub issue (Loki 10; same as: loki owner/repo#123)
|
|
294
341
|
loki start ./openapi.yaml # an OpenAPI/YAML spec
|
|
295
342
|
loki demo --offline # replay a sample receipt, no key, no spend
|
|
296
343
|
```
|
|
@@ -381,7 +428,7 @@ Required:
|
|
|
381
428
|
|
|
382
429
|
- An agent provider CLI: [Claude Code](https://docs.claude.com/en/docs/claude-code) (`claude`, Tier 1, recommended and E2E-verified - the provider Loki Mode is built for). Cline, Codex, Aider, and opencode are supported as experimental providers (wiring in place; not yet E2E-verified by us). Loki cannot run a build without one of these installed and authenticated.
|
|
383
430
|
- Python 3.8+ (`python3`) for the dashboard, memory system, and orchestration helpers.
|
|
384
|
-
- Node.js
|
|
431
|
+
- Node.js 20+ (`node`) for the npm install path and the bundled runtime.
|
|
385
432
|
- `jq` for the JSON that the shell flows and the quality gates parse.
|
|
386
433
|
- Git 2.x (`git`) for checkpoints and worktrees.
|
|
387
434
|
- `curl` for installation and network calls.
|
|
@@ -414,9 +461,9 @@ See the [Installation Guide](docs/INSTALLATION.md) for the long form.
|
|
|
414
461
|
---
|
|
415
462
|
|
|
416
463
|
<details>
|
|
417
|
-
<summary><strong>Runtime architecture: dual Bash/Bun runtime
|
|
464
|
+
<summary><strong>Runtime architecture: dual Bash/Bun runtime</strong></summary>
|
|
418
465
|
|
|
419
|
-
Loki
|
|
466
|
+
The Loki 10 engine runs on the Bun runtime. The legacy engine is Bash (`autonomy/loki`) and is being removed.
|
|
420
467
|
|
|
421
468
|
- Commands that require Bun: `version`, `--version`, `-v`, `status`, `stats`, `doctor`, `provider`, `memory`, `rollback`, `kpis`, `trust`, `wiki`, `crash`, `internal`, and `report kpis`.
|
|
422
469
|
- If `bun` is not on `PATH`, commands exit 1 with installation instructions.
|
|
@@ -427,9 +474,9 @@ See [UPGRADING.md](UPGRADING.md) and [ADR-001: Runtime Migration](docs/architect
|
|
|
427
474
|
</details>
|
|
428
475
|
|
|
429
476
|
<details>
|
|
430
|
-
<summary><strong>Supported spec formats</strong></summary>
|
|
477
|
+
<summary><strong>Supported spec formats (legacy engine, being removed)</strong></summary>
|
|
431
478
|
|
|
432
|
-
A "spec" is whatever you hand `loki start`. Loki auto-detects the format and normalises it before the RARV loop. A Markdown PRD is one form of spec; the table below lists every input the CLI accepts.
|
|
479
|
+
Loki 10 takes a quoted task or an issue reference (GitHub, GitLab or Jira), also through `loki start`. The table below describes the legacy `loki start`, which accepts files too; rows for an issue ref or an issue URL run on Loki 10. A "spec" is whatever you hand `loki start`. Loki auto-detects the format and normalises it before the RARV loop. A Markdown PRD is one form of spec; the table below lists every input the CLI accepts.
|
|
433
480
|
|
|
434
481
|
| Format | Example | Notes |
|
|
435
482
|
|--------|---------|-------|
|
|
@@ -460,31 +507,34 @@ For how Loki compares with other tools, see [docs/COMPARISON.md](docs/COMPARISON
|
|
|
460
507
|
<details>
|
|
461
508
|
<summary><strong>All commands</strong></summary>
|
|
462
509
|
|
|
510
|
+
Loki 10 engine:
|
|
511
|
+
|
|
463
512
|
| Command | Description |
|
|
464
513
|
|---------|-------------|
|
|
465
|
-
| `loki
|
|
466
|
-
| `loki
|
|
467
|
-
| `loki
|
|
468
|
-
| `loki
|
|
469
|
-
| `loki
|
|
470
|
-
| `loki
|
|
471
|
-
| `loki
|
|
472
|
-
| `loki
|
|
473
|
-
| `loki
|
|
474
|
-
| `loki
|
|
475
|
-
| `loki web` | Launch Purple Lab web UI [DEPRECATED in v7.44.0 -- use `loki start` which auto-opens the dashboard at http://localhost:57374] |
|
|
476
|
-
| `loki doctor` | Check environment and dependencies |
|
|
477
|
-
| `loki plan [PRD]` | Pre-execution analysis: complexity, cost, iterations |
|
|
478
|
-
| `loki review [--staged\|--diff]` | AI-powered code review with severity filtering |
|
|
479
|
-
| `loki test [--file\|--dir\|--changed]` | AI test generation |
|
|
480
|
-
| `loki analyze onboard [path]` | Project analysis and CLAUDE.md generation (was: `loki onboard`) |
|
|
481
|
-
| `loki import` | Import GitHub issues as tasks |
|
|
482
|
-
| `loki ci` | CI/CD quality gate integration |
|
|
483
|
-
| `loki failover` | Cross-provider auto-failover management |
|
|
484
|
-
| `loki memory <cmd>` | Memory system: index, timeline, search, consolidate |
|
|
485
|
-
| `loki enterprise` | Enterprise feature management |
|
|
514
|
+
| `loki "<task>" [--no-pr] [--deep] [--provider NAME] [--max-cost USD]` | Build a task, verify it, seal a signed receipt, open a PR |
|
|
515
|
+
| `loki owner/repo#N` | Same, from a GitHub, GitLab or Jira issue |
|
|
516
|
+
| `loki quick "<task>"` | Small task, lean path, no PR |
|
|
517
|
+
| `loki backlog owner/repo --all\|--label X\|--issues N,N` | Run every matching open issue, N in parallel (`--concurrency N`, `--dry-run`) |
|
|
518
|
+
| `loki status [--json]` | Current status |
|
|
519
|
+
| `loki verify [run-id]` | Re-check a sealed receipt (exit codes above) |
|
|
520
|
+
| `loki doctor [--json] [--airgap]` | Check environment and providers |
|
|
521
|
+
| `LOKI_CONTROL=1 loki control serve\|backfill\|status` | Control Plane v0 preview |
|
|
522
|
+
| `loki modernize <repo> --to <target> --dry-run` | Estimate only |
|
|
523
|
+
| `loki plan [PRD]` | Dry-run analysis: complexity, cost, execution plan |
|
|
486
524
|
| `loki version` | Show version |
|
|
487
525
|
|
|
526
|
+
Legacy engine, being removed (these run on the previous engine; `loki --help` still lists them):
|
|
527
|
+
|
|
528
|
+
| Command | Description |
|
|
529
|
+
|---------|-------------|
|
|
530
|
+
| `loki start [PRD\|ISSUE-REF\|"TASK"]` | An issue ref, an issue URL or a quoted multi-word task runs on Loki 10 (same as `loki owner/repo#N`); a PRD file, a flag-first call or a one-word start runs the legacy build |
|
|
531
|
+
| `loki stop`, `pause`, `resume` | Control a legacy run |
|
|
532
|
+
| `loki steer "<note>"` | Nudge a legacy run (needs `LOKI_PROMPT_INJECTION=1`) |
|
|
533
|
+
| `loki why`, `loki next` | Explain or continue a legacy run |
|
|
534
|
+
| `loki dashboard` | Operations UI server (`start\|stop\|status\|url\|open`) |
|
|
535
|
+
| `loki review`, `loki test`, `loki analyze`, `loki memory`, `loki failover`, `loki enterprise`, `loki import`, `loki ci` | Review, test generation, codebase analysis, memory, failover, enterprise, issue import, CI gate |
|
|
536
|
+
| `loki modernize heal <path>` | Legacy system healing |
|
|
537
|
+
|
|
488
538
|
</details>
|
|
489
539
|
|
|
490
540
|
Run `loki --help` for all options. Full reference: [CLI Reference](wiki/CLI-Reference.md) | Config: [config.example.yaml](autonomy/config.example.yaml)
|
|
@@ -495,7 +545,7 @@ Pass a config file to `loki start` with `--config <path>` (aliases `--env-file`,
|
|
|
495
545
|
---
|
|
496
546
|
|
|
497
547
|
<details>
|
|
498
|
-
<summary><strong>Configuration env vars (
|
|
548
|
+
<summary><strong>Configuration env vars (legacy engine knobs, opt-out)</strong></summary>
|
|
499
549
|
|
|
500
550
|
Loki Mode's accuracy and autonomy behaviors are default-on. Each is an opt-out escape hatch, not a setting you have to discover. The most relevant knobs from the v7.41.x accuracy/autonomy hardening:
|
|
501
551
|
|
|
@@ -516,7 +566,7 @@ This is a subset. See the [wiki](wiki/Home.md) for the full env-var reference an
|
|
|
516
566
|
</details>
|
|
517
567
|
|
|
518
568
|
<details>
|
|
519
|
-
<summary><strong>BMAD Method Integration</strong></summary>
|
|
569
|
+
<summary><strong>BMAD Method Integration (legacy engine, being removed)</strong></summary>
|
|
520
570
|
|
|
521
571
|
Loki Mode integrates with the [BMAD Method](https://github.com/bmad-code-org/BMAD-METHOD), a structured AI-driven agile methodology. If your project uses BMAD for requirements elicitation, Loki Mode can consume those artifacts directly:
|
|
522
572
|
|
|
@@ -533,7 +583,7 @@ See [BMAD Integration Validation](docs/architecture/bmad-integration-validation.
|
|
|
533
583
|
<details>
|
|
534
584
|
<summary><strong>Enterprise Features</strong></summary>
|
|
535
585
|
|
|
536
|
-
Enterprise features are included
|
|
586
|
+
Enterprise features are free, included, and need no license key. They are activated with env vars. (Legacy engine surface, being removed with it.)
|
|
537
587
|
|
|
538
588
|
```bash
|
|
539
589
|
export LOKI_ENTERPRISE_AUTH=true # token auth (dashboard/auth.py)
|
|
@@ -561,7 +611,7 @@ loki enterprise status
|
|
|
561
611
|
| **Testing** | 8 automated quality gates | Test quality depends on AI assertions |
|
|
562
612
|
| **Providers** | Claude, Cline, Codex, Aider and opencode | Non-Claude providers are experimental and mostly sequential |
|
|
563
613
|
| **Dashboard** | Real-time single-machine monitoring | No multi-node clustering |
|
|
564
|
-
| **Loki 10** | The v10 run, `status`, `verify`, `
|
|
614
|
+
| **Loki 10** | The v10 run (`loki "<task>"`, `loki owner/repo#N`, `loki quick`), `status`, `verify`, `backlog` | `loki start <issue ref|issue URL|"task">` runs Loki 10, `loki start <file>` stays legacy; `loki modernize <repo> --to` runs `--dry-run` only; Slack is not wired in; Control Plane v0 is a preview |
|
|
565
615
|
|
|
566
616
|
> **What "autonomous" means:** the system runs RARV cycles without prompting. It does NOT access your cloud accounts, payment systems or external services unless you provide credentials. Human oversight is expected for deployment, API keys and critical decisions.
|
|
567
617
|
|
|
@@ -603,7 +653,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
603
653
|
|
|
604
654
|
## License
|
|
605
655
|
|
|
606
|
-
[Business Source License 1.1](LICENSE) -- Free for personal, internal, academic, and non-commercial use. Converts to Apache 2.0 on March 19, 2030. Contact founder@autonomi.dev for
|
|
656
|
+
[Business Source License 1.1](LICENSE) -- Free for personal, internal, academic, and non-commercial use. Converts to Apache 2.0 on March 19, 2030. Contact founder@autonomi.dev for other licensing arrangements.
|
|
607
657
|
|
|
608
658
|
---
|
|
609
659
|
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,9 @@ name: loki-mode
|
|
|
3
3
|
description: An autonomous software factory that knows what it is supposed to deliver, and proves it did. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Loki Mode v10.6.
|
|
6
|
+
# Loki Mode v10.6.7
|
|
7
|
+
|
|
8
|
+
**Current entry points (Loki 10 engine):** `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run the Loki 10 engine and end with a signed receipt (`loki verify`). `loki backlog owner/repo --all` runs many issues in parallel. Guide: `docs/v10/GUIDE.md`. The skill instructions below, and `loki start`, describe the legacy engine, which still ships and is being removed (`loki start owner/repo#N` still routes to it; prefer `loki owner/repo#N`).
|
|
7
9
|
|
|
8
10
|
**You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
|
|
9
11
|
|
|
@@ -11,7 +13,7 @@ description: An autonomous software factory that knows what it is supposed to de
|
|
|
11
13
|
|
|
12
14
|
**Evidence Receipt (verify it yourself).** Every run writes a receipt to `.loki/proofs/<run_id>/` (opt out with `LOKI_PROOF=0`) that separates deterministic FACTS (git diff with base/head SHAs and a `diff_sha256`, the test command + exit code, the build command + exit code, each gate verdict) from AI ASSESSMENTS (the council verdict, labeled judgment not proof). The headline is computed only from the facts: VERIFIED (tests ran a real command and exited 0, diff non-empty, nothing skipped), VERIFIED WITH GAPS (each gap listed by name), or NOT VERIFIED (a check ran and failed). Inspect and re-check with `loki proof list|show <id>|verify <id>` (aliased `loki receipt`); `loki proof verify` re-hashes the receipt (tamper) and re-derives the diff from the recorded base SHA against the live repo (drift), exiting 0 clean / 1 tamper-or-drift / 2 could not check (64 usage, 66 unknown id; see `docs/exit-codes.md`). This is honesty-of-done, not a claim that the code is bug-free.
|
|
13
15
|
|
|
14
|
-
**Provider-agnostic (stable since v5.0.0):** runs on Claude/Codex/Cline/Aider with abstract model tiers and degraded mode for non-Claude providers; no vendor lock-in. Gemini deprecated v7.5.18. See `skills/providers.md`. **
|
|
16
|
+
**Provider-agnostic (stable since v5.0.0):** runs on Claude/Codex/Cline/Aider with abstract model tiers and degraded mode for non-Claude providers; no vendor lock-in. Gemini deprecated v7.5.18. See `skills/providers.md`. **Legacy track (v8.0.0):** the Anthropic Agent SDK route (see below), spec-mode expansion for OpenAPI/GraphQL/Postman contracts, the runtime-boot and secret-leak evidence axes, and `loki steer` / `loki why` for mid-run control. Earlier tracks: LSP grounding as a first-class agent tool (v7.7.x) and Phase 1 RARV-C closure (real provider judges, gate-failure flock, synthetic PRD e2e, status `--json`).
|
|
15
17
|
|
|
16
18
|
**Runtime migration:** Bash-to-Bun migration. Read-only commands (`version`, `status`, `stats`, `doctor`, `provider show/list`, `memory list/index`) flow through Bun runtime via `bin/loki` since v7.3.0. Every other command remains on the Bash runtime (`autonomy/loki`). Rollback: `LOKI_LEGACY_BASH=1`. See `UPGRADING.md` and `docs/architecture/ADR-001-runtime-migration.md`.
|
|
17
19
|
|
|
@@ -105,13 +107,13 @@ These rules guide autonomous operation. Test results and code quality always tak
|
|
|
105
107
|
| Integration tests, E2E, deployment | **development** | opus | sonnet | effort=high |
|
|
106
108
|
| Unit tests, linting, docs, simple fixes | **fast** | sonnet | haiku | effort=low |
|
|
107
109
|
|
|
108
|
-
**Parallelization rule (Claude only):** Launch
|
|
110
|
+
**Parallelization rule (Claude only):** Launch independent tasks in parallel.
|
|
109
111
|
|
|
110
112
|
**Degraded mode (Codex/Cline/Aider):** No parallel agents or Task tool. Codex has MCP support. Runs RARV cycle sequentially. See `skills/model-selection.md`.
|
|
111
113
|
|
|
112
114
|
**Git worktree parallelism:** For true parallel feature development, use `--parallel` flag with run.sh. See `skills/parallel-workflows.md`.
|
|
113
115
|
|
|
114
|
-
**Scale patterns (
|
|
116
|
+
**Scale patterns (Claude only):** Use judge agents, recursive sub-planners, optimistic concurrency. See `references/cursor-learnings.md`.
|
|
115
117
|
|
|
116
118
|
---
|
|
117
119
|
|
|
@@ -195,7 +197,7 @@ This protocol governs **skill module** loading -- task-scoped instruction files
|
|
|
195
197
|
|
|
196
198
|
## Invocation
|
|
197
199
|
|
|
198
|
-
**
|
|
200
|
+
**Legacy entry point (v6.84.0, being removed; for Loki 10 use `loki "<task>"` or `loki owner/repo#N`):** `loki start [SPEC|ISSUE-REF]` auto-detects whether the input is a PRD file, an issue URL, an issue number, or another spec format (e.g. OpenAPI). No need to pick between `loki start` and `loki run` -- the single command handles all cases.
|
|
199
201
|
|
|
200
202
|
```bash
|
|
201
203
|
# Standard mode (Claude - full features)
|
|
@@ -459,15 +461,16 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
|
|
|
459
461
|
| Bun runtime (Phase 2+) | TBD | Migrate write-path commands; tracked on `feat/bun-migration` |
|
|
460
462
|
| Managed Agents multiagent path | TBD | `LOKI_EXPERIMENTAL_MANAGED_*` flags -- RESEARCH PREVIEW, not on live API |
|
|
461
463
|
| Benchmarks | TBD | Runner scripts and datasets exist in `benchmarks/`; no published results |
|
|
462
|
-
| `loki run` removal |
|
|
464
|
+
| `loki run` removal | with legacy removal | Currently a deprecated alias for `loki start` |
|
|
463
465
|
|
|
464
466
|
## Deprecated
|
|
465
467
|
|
|
466
468
|
| Item | Deprecated In | Notes |
|
|
467
469
|
|------|---------------|-------|
|
|
468
|
-
| `loki run <issue>` | v6.84.0 | Alias for `loki start`.
|
|
470
|
+
| `loki run <issue>` | v6.84.0 | Alias for `loki start`. Removal is part of the planned legacy removal. |
|
|
471
|
+
| `loki start`, RARV skill loop | v10.6.6 | Legacy engine, planned for removal; use `loki "<task>"` / `loki owner/repo#N`. |
|
|
469
472
|
| VSCode extension (`vscode-extension/`) | v7.2.0 | No longer actively maintained; dashboard web UI is the supported front-end. |
|
|
470
473
|
|
|
471
474
|
---
|
|
472
475
|
|
|
473
|
-
**v10.6.
|
|
476
|
+
**v10.6.7 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
10.6.
|
|
1
|
+
10.6.7
|
package/autonomy/loki
CHANGED
|
@@ -1872,12 +1872,39 @@ for p in range(int(sys.argv[1]), int(sys.argv[1]) + 100):
|
|
|
1872
1872
|
PY
|
|
1873
1873
|
}
|
|
1874
1874
|
|
|
1875
|
+
# Fail-closed reuse check for a dashboard found via the ~/.loki/dashboard
|
|
1876
|
+
# registry or a busy port: reusable only if /health reports THIS package's
|
|
1877
|
+
# version AND realpath, and GET / is 200 text/html. Any missing field, curl
|
|
1878
|
+
# error or mismatch means "not ours". Mirrors _loki_dashboard_reusable in run.sh.
|
|
1879
|
+
_loki_dashboard_port_is_ours() {
|
|
1880
|
+
local port="$1" want want_pkg health probe
|
|
1881
|
+
case "$port" in ''|*[!0-9]*) return 1 ;; esac
|
|
1882
|
+
want="$(tr -d '[:space:]' <"$SKILL_DIR/VERSION" 2>/dev/null)" || return 1
|
|
1883
|
+
[ -n "$want" ] || return 1
|
|
1884
|
+
want_pkg="$(cd "$SKILL_DIR" 2>/dev/null && pwd -P)" || return 1
|
|
1885
|
+
health="$(curl -s --max-time 2 "http://127.0.0.1:${port}/health" 2>/dev/null)" || return 1
|
|
1886
|
+
case "$health" in
|
|
1887
|
+
*"\"version\":\"${want}\""* | *"\"version\": \"${want}\""*) ;;
|
|
1888
|
+
*) return 1 ;;
|
|
1889
|
+
esac
|
|
1890
|
+
case "$health" in
|
|
1891
|
+
*"\"package\":\"${want_pkg}\""* | *"\"package\": \"${want_pkg}\""*) ;;
|
|
1892
|
+
*) return 1 ;;
|
|
1893
|
+
esac
|
|
1894
|
+
probe="$(curl -s -o /dev/null -w '%{http_code} %{content_type}' --max-time 2 "http://127.0.0.1:${port}/" 2>/dev/null)" || return 1
|
|
1895
|
+
case "$probe" in "200 text/html"*) return 0 ;; esac
|
|
1896
|
+
return 1
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1875
1899
|
cmd_ui() {
|
|
1876
1900
|
local port="" pid=""
|
|
1877
1901
|
if [ -f "$DASHBOARD_PID_FILE" ]; then
|
|
1878
1902
|
pid=$(cat "$DASHBOARD_PID_FILE" 2>/dev/null)
|
|
1879
1903
|
if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then
|
|
1880
1904
|
port=$(cat "${DASHBOARD_PID_DIR}/port" 2>/dev/null)
|
|
1905
|
+
# A registry entry whose live server is not this package's dashboard
|
|
1906
|
+
# (stale, foreign worktree, other version) is never reused.
|
|
1907
|
+
_loki_dashboard_port_is_ours "$port" || port=""
|
|
1881
1908
|
fi
|
|
1882
1909
|
fi
|
|
1883
1910
|
if [ -z "$port" ]; then
|
|
@@ -3759,9 +3786,18 @@ cmd_start() {
|
|
|
3759
3786
|
# + cockpit, honoring the card's "open dashboard" promise. The
|
|
3760
3787
|
# cockpit hint is printed by _loki_start_handoff for the Both path.
|
|
3761
3788
|
args+=("--bg")
|
|
3762
|
-
|
|
3763
|
-
#
|
|
3764
|
-
|
|
3789
|
+
# Open the URL the runner PUBLISHES for the port it actually bound
|
|
3790
|
+
# or reused (it walks past refused ports); never guess the default
|
|
3791
|
+
# 57374, which may be a foreign or stale dashboard. stdout must
|
|
3792
|
+
# stay unredirected: loki_open_url checks the TTY.
|
|
3793
|
+
local _dfile="${PWD}/.loki/dashboard/url"
|
|
3794
|
+
rm -f "$_dfile" 2>/dev/null
|
|
3795
|
+
(
|
|
3796
|
+
for _ in $(seq 1 120); do
|
|
3797
|
+
if [ -s "$_dfile" ]; then loki_open_url "$(head -1 "$_dfile")" 2>/dev/null; exit 0; fi
|
|
3798
|
+
sleep 0.5
|
|
3799
|
+
done
|
|
3800
|
+
) &
|
|
3765
3801
|
;;
|
|
3766
3802
|
launch-bg-watch)
|
|
3767
3803
|
# Watch (cockpit only) detaches without opening the browser.
|
|
@@ -7482,13 +7518,15 @@ cmd_dashboard_start() {
|
|
|
7482
7518
|
if [ -f "$DASHBOARD_PID_FILE" ]; then
|
|
7483
7519
|
local existing_pid
|
|
7484
7520
|
existing_pid=$(cat "$DASHBOARD_PID_FILE" 2>/dev/null)
|
|
7485
|
-
if [ -n "$existing_pid" ] && kill -0 "$existing_pid" 2>/dev/null
|
|
7521
|
+
if [ -n "$existing_pid" ] && kill -0 "$existing_pid" 2>/dev/null \
|
|
7522
|
+
&& _loki_dashboard_port_is_ours "$(cat "${DASHBOARD_PID_DIR}/port" 2>/dev/null)"; then
|
|
7486
7523
|
echo -e "${YELLOW}Dashboard server already running (PID: $existing_pid)${NC}"
|
|
7487
7524
|
echo ""
|
|
7488
7525
|
cmd_dashboard_status
|
|
7489
7526
|
exit 0
|
|
7490
7527
|
fi
|
|
7491
|
-
# Stale PID file,
|
|
7528
|
+
# Stale PID file, or a live server that is not this package's dashboard
|
|
7529
|
+
# (never killed here, just not reused): remove the registry entry.
|
|
7492
7530
|
rm -f "$DASHBOARD_PID_FILE"
|
|
7493
7531
|
fi
|
|
7494
7532
|
|