loki-mode 10.6.0 → 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.
Files changed (107) hide show
  1. package/.github/actions/issue-to-pr/action.yml +25 -11
  2. package/.github/workflows/loki-issue-to-pr.yml +21 -10
  3. package/README.md +113 -356
  4. package/SKILL.md +11 -8
  5. package/VERSION +1 -1
  6. package/autonomy/loki +77 -6
  7. package/autonomy/run.sh +26 -1
  8. package/autonomy/telemetry.sh +1 -1
  9. package/bin/loki +9 -1
  10. package/completions/_loki +1 -0
  11. package/completions/loki.bash +2 -2
  12. package/dashboard/__init__.py +1 -1
  13. package/docs/AUDIT-CHAIN-THREAT-MODEL.md +1 -1
  14. package/docs/DEMOS.md +11 -26
  15. package/docs/EVALUATING.md +2 -3
  16. package/docs/INSTALLATION.md +6 -5
  17. package/docs/TOOLS.md +1 -1
  18. package/docs/air-gapped.md +1 -1
  19. package/docs/dashboard-guide.md +2 -0
  20. package/docs/dev/project-structure.md +1 -1
  21. package/docs/dev/release-checklist.md +1 -2
  22. package/docs/enterprise/architecture.md +1 -1
  23. package/docs/siem-integration.md +2 -2
  24. package/docs/v10/CONTROL-PLANE.md +1 -1
  25. package/docs/v10/D61-SPEED.md +78 -0
  26. package/docs/v10/DECISIONS.md +12 -0
  27. package/docs/v10/DEPS.md +16 -0
  28. package/docs/v10/GUIDE.md +63 -1
  29. package/docs/v10/HANDOFF-NEXT-WEEK.md +34 -0
  30. package/loki-ts/dist/loki.js +571 -563
  31. package/mcp/__init__.py +1 -1
  32. package/package.json +7 -2
  33. package/packages/control-plane/dist/server.js +5919 -0
  34. package/packages/control-plane/drizzle/0000_new_maelstrom.sql +49 -0
  35. package/packages/control-plane/drizzle/meta/0000_snapshot.json +343 -0
  36. package/packages/control-plane/drizzle/meta/_journal.json +13 -0
  37. package/packages/control-plane/package.json +20 -0
  38. package/packages/control-plane/src/db/migrate.ts +20 -0
  39. package/packages/control-plane/src/db/schema.ts +54 -0
  40. package/packages/control-plane/src/server/app.ts +63 -0
  41. package/packages/control-plane/src/server/ingest.ts +52 -0
  42. package/packages/control-plane/src/server/runs.ts +116 -0
  43. package/packages/control-plane/src/server/serve.ts +15 -0
  44. package/packages/control-plane/src/shipper/backfill.ts +40 -0
  45. package/packages/control-plane/src/shipper/ship.ts +95 -0
  46. package/packages/control-plane/ui/dist/assets/index-B6EiyukW.js +114 -0
  47. package/packages/control-plane/ui/dist/assets/index-BH3LtKcG.css +1 -0
  48. package/packages/control-plane/ui/dist/index.html +13 -0
  49. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  50. package/web-app/dist/assets/{AdminPage-B8LTaWIa.js → AdminPage-DyjnUcaP.js} +1 -1
  51. package/web-app/dist/assets/{Avatar-BbxCTNns.js → Avatar-CY0sQNao.js} +1 -1
  52. package/web-app/dist/assets/{Badge-DIjrBQFC.js → Badge-BmwTRu72.js} +1 -1
  53. package/web-app/dist/assets/{Button-LgRYqCHv.js → Button-BRf5aTlb.js} +1 -1
  54. package/web-app/dist/assets/{CockpitPage-BgEdvdXX.js → CockpitPage-RR94HuxS.js} +1 -1
  55. package/web-app/dist/assets/{ComparePage-BPttVkSu.js → ComparePage-CFWAuPRO.js} +1 -1
  56. package/web-app/dist/assets/{ErrorBoundary-DCPrb7ec.js → ErrorBoundary-4cDADrG-.js} +1 -1
  57. package/web-app/dist/assets/{EvidenceReceiptPanel-BLqfCaoK.js → EvidenceReceiptPanel-ChPFx2eM.js} +1 -1
  58. package/web-app/dist/assets/{GitHubIssuesPanel-Ch61Yw6v.js → GitHubIssuesPanel-B0TAjyeW.js} +1 -1
  59. package/web-app/dist/assets/{GitHubPRsPanel-Cju9OEP1.js → GitHubPRsPanel-BbszEwW9.js} +1 -1
  60. package/web-app/dist/assets/{HomePage-BSt5tg3Z.js → HomePage-DrBgzs1d.js} +2 -2
  61. package/web-app/dist/assets/{LoginPage-Cj9xl0pH.js → LoginPage-Bu7b2DGz.js} +1 -1
  62. package/web-app/dist/assets/{MagicPage-CyfrX553.js → MagicPage-BFEYp631.js} +1 -1
  63. package/web-app/dist/assets/{MetricsPage-Ck6jFgAN.js → MetricsPage-eIe2naVR.js} +1 -1
  64. package/web-app/dist/assets/{NotFoundPage-CA_HlCgz.js → NotFoundPage-BVWYkNt9.js} +1 -1
  65. package/web-app/dist/assets/{ProjectPage-BkpztOmm.js → ProjectPage-zmxyu732.js} +3 -3
  66. package/web-app/dist/assets/{ProjectsPage-urTkLe8m.js → ProjectsPage-Dq5NdCak.js} +1 -1
  67. package/web-app/dist/assets/{SettingsPage-COvHhevh.js → SettingsPage-CCrJOMe0.js} +1 -1
  68. package/web-app/dist/assets/{ShowcasePage-BNIiqhqk.js → ShowcasePage-n-Ipzp01.js} +1 -1
  69. package/web-app/dist/assets/{SystemSettingsPage-CBPa5u-v.js → SystemSettingsPage-CP_rjYXK.js} +1 -1
  70. package/web-app/dist/assets/{TeamsPage-DuuHXfkP.js → TeamsPage-B_P9DepW.js} +1 -1
  71. package/web-app/dist/assets/{TemplatesPage-C8tRhU8-.js → TemplatesPage-h-3A6PQT.js} +1 -1
  72. package/web-app/dist/assets/{TerminalOutput-BOL99fiQ.js → TerminalOutput-pD0nJ1BU.js} +1 -1
  73. package/web-app/dist/assets/{activity-92O1sR3_.js → activity-ChFwzT-d.js} +1 -1
  74. package/web-app/dist/assets/{bell-CeWSKe4w.js → bell-BX-eK8Gu.js} +1 -1
  75. package/web-app/dist/assets/{bot-n8nzxbS2.js → bot-fj5PkPtR.js} +1 -1
  76. package/web-app/dist/assets/{check-C-8ho0t2.js → check-BGAbHlvD.js} +1 -1
  77. package/web-app/dist/assets/{chevron-left-D4UQrt8-.js → chevron-left-BzFUxHgb.js} +1 -1
  78. package/web-app/dist/assets/{circle-alert-BnxgnWHv.js → circle-alert-BQrg5DWl.js} +1 -1
  79. package/web-app/dist/assets/{clock-DgbJFbcN.js → clock-CTu9lkVo.js} +1 -1
  80. package/web-app/dist/assets/{cloud-BSEYN8y8.js → cloud-DrIENRiE.js} +1 -1
  81. package/web-app/dist/assets/{code-xml-CFYOlC1u.js → code-xml-PaoVpfur.js} +1 -1
  82. package/web-app/dist/assets/{database-DNJ4cz62.js → database-DMmkAotn.js} +1 -1
  83. package/web-app/dist/assets/{dollar-sign-DZ1zEfep.js → dollar-sign-B2LQdBoX.js} +1 -1
  84. package/web-app/dist/assets/{file-code-corner-D9vIN2Ru.js → file-code-corner-Dfv1XXeR.js} +1 -1
  85. package/web-app/dist/assets/{file-plus-B4TugJYw.js → file-plus-D2Wzf2wd.js} +1 -1
  86. package/web-app/dist/assets/{globe-BPNU50l7.js → globe-DxotVWt8.js} +1 -1
  87. package/web-app/dist/assets/{hammer-CwVF_APh.js → hammer-Brfy5ZrJ.js} +1 -1
  88. package/web-app/dist/assets/{index-DnAhEaY4.js → index-BfhHMwi8.js} +3 -3
  89. package/web-app/dist/assets/{layers-DNBXP7Gs.js → layers-DfxSWDvp.js} +1 -1
  90. package/web-app/dist/assets/{loader-circle-bh-SWjhS.js → loader-circle-CxIrzNwx.js} +1 -1
  91. package/web-app/dist/assets/{lock-CpbXWrBs.js → lock-m6nzhtpU.js} +1 -1
  92. package/web-app/dist/assets/{package-3NG8Vkod.js → package-ri9oE9Jc.js} +1 -1
  93. package/web-app/dist/assets/{plus-C1DPukhG.js → plus-DWeTAMVV.js} +1 -1
  94. package/web-app/dist/assets/{refresh-cw-Cgl65iQ2.js → refresh-cw-BGMSpaMh.js} +1 -1
  95. package/web-app/dist/assets/{rotate-ccw-BS5sMMYV.js → rotate-ccw-DD1xBD_b.js} +1 -1
  96. package/web-app/dist/assets/{scroll-text-BpvzZAZR.js → scroll-text-BCCR_AN9.js} +1 -1
  97. package/web-app/dist/assets/{server-DSLFedy_.js → server-CmMWPIjS.js} +1 -1
  98. package/web-app/dist/assets/{shield-alert-BlG8AkvF.js → shield-alert-BZZmBVEJ.js} +1 -1
  99. package/web-app/dist/assets/{thumbs-up-BJcYgjRU.js → thumbs-up-OaxbNRXu.js} +1 -1
  100. package/web-app/dist/assets/{trash-2-CScLwgFk.js → trash-2-DmcSzTfr.js} +1 -1
  101. package/web-app/dist/assets/{trending-down-BPRGGG_g.js → trending-down-BmfXLykz.js} +1 -1
  102. package/web-app/dist/assets/{trending-up-BpLBFaZo.js → trending-up-Djec3jIq.js} +1 -1
  103. package/web-app/dist/assets/{upload-LgGE0PEa.js → upload-BN8dXIlF.js} +1 -1
  104. package/web-app/dist/assets/{usePolling-0W4sMm7u.js → usePolling-Cu4yi04I.js} +1 -1
  105. package/web-app/dist/assets/{user-D4KBUK1Z.js → user-IBI-k10o.js} +1 -1
  106. package/web-app/dist/index.html +1 -1
  107. 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 start` on the pre-fetched PRD file
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
- loki start "$PRD_FILE" || RC=$?
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
- ID="$(cat .loki/state/last-proof-id.txt 2>/dev/null || true)"
225
- LIB="$(npm root -g)/loki-mode/autonomy/lib/proof-pr.sh"
226
- if [ -n "$ID" ] && [ -f ".loki/proofs/$ID/proof.json" ] && [ -f "$LIB" ]; then
227
- # shellcheck source=/dev/null
228
- . "$LIB" && render_evidence_receipt_md ".loki/proofs/$ID/proof.json" "" ""
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 [ -d .loki/proofs ]; then
238
- echo "Evidence receipts under .loki/proofs/"
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
- LOKI_BUDGET_LIMIT: '10.00'
86
- LOKI_MAX_ITERATIONS: '20'
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
- loki start "${GITHUB_REPOSITORY}#${ISSUE}" || RC=$?
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 evidence receipt this run wrote, when there is one.
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
- ID="$(cat .loki/state/last-proof-id.txt 2>/dev/null || true)"
113
- LIB="$(npm root -g)/loki-mode/autonomy/lib/proof-pr.sh"
114
- if [ -n "$ID" ] && [ -f ".loki/proofs/$ID/proof.json" ] && [ -f "$LIB" ]; then
115
- # shellcheck source=/dev/null
116
- . "$LIB" && render_evidence_receipt_md ".loki/proofs/$ID/proof.json" "" ""
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