loki-mode 11.4.2 → 11.6.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.
Files changed (129) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/autonomy/lib/chat.sh +6 -3
  4. package/autonomy/lib/engine10-push.sh +19 -1
  5. package/autonomy/lib/help-core.sh +1 -1
  6. package/autonomy/lib/proof-generator.py +23 -5
  7. package/autonomy/lib/proof-verify.py +607 -5
  8. package/autonomy/lib/run-summary.sh +17 -1
  9. package/autonomy/lib/setup-requirements.json +35 -0
  10. package/autonomy/loki +244 -237
  11. package/autonomy/notification-checker.py +1 -1
  12. package/autonomy/provider-offer.sh +95 -47
  13. package/autonomy/route.sh +38 -6
  14. package/autonomy/run.sh +42 -14
  15. package/autonomy/setup-wizard.sh +19 -10
  16. package/autonomy/verify.sh +40 -1
  17. package/completions/_loki +3 -1
  18. package/completions/loki.bash +9 -3
  19. package/dashboard/__init__.py +3 -10
  20. package/dashboard/control.py +5 -435
  21. package/docs/ARCHITECTURE.md +1 -2
  22. package/docs/CLI-CORE-VERBS.md +2 -6
  23. package/docs/CLI-REFERENCE.md +3 -1
  24. package/docs/COMPONENTS.md +0 -2
  25. package/docs/EVALUATING.md +27 -0
  26. package/docs/HARNESS-INTELLIGENCE-PLAN.md +20 -0
  27. package/docs/INSTALLATION.md +1 -1
  28. package/docs/KNOWN-ISSUES.md +10 -1
  29. package/docs/PROOF-PASSPORT.md +114 -0
  30. package/docs/alternative-installations.md +103 -0
  31. package/docs/authentication.md +19 -1
  32. package/docs/cost-controls.md +139 -0
  33. package/docs/dev/release-checklist.md +9 -8
  34. package/docs/enterprise/security.md +3 -234
  35. package/docs/environment-variables.md +36 -0
  36. package/docs/exit-codes.md +102 -2
  37. package/docs/spec-first-intent.md +29 -0
  38. package/docs/v10/ARCHITECT-CUTS.md +304 -0
  39. package/docs/v10/CLI-MODERN.md +2 -2
  40. package/docs/v10/DECISIONS.md +5 -5
  41. package/docs/v10/ENGINE.md +735 -267
  42. package/docs/v10/GUARDS.md +16 -14
  43. package/docs/v10/GUIDE.md +5 -7
  44. package/docs/v10/PROGRESS.md +12 -1
  45. package/docs/v11/MARKET-SLICES.md +1 -5
  46. package/integrations/openclaw/README.md +20 -0
  47. package/integrations/vibe-kanban.md +12 -50
  48. package/loki-ts/data/model-pricing.json +1 -0
  49. package/loki-ts/dist/loki.js +1156 -1103
  50. package/mcp/__init__.py +1 -1
  51. package/mcp/_sdk_loader.py +1 -1
  52. package/package.json +2 -2
  53. package/packages/control-plane/dist/server.js +2063 -1032
  54. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  55. package/plugins/loki-mode/README.md +41 -1
  56. package/plugins/loki-mode/commands/handoff.md +12 -0
  57. package/plugins/loki-mode/commands/loki-verify.md +9 -2
  58. package/plugins/loki-mode/commands/start.md +20 -0
  59. package/plugins/loki-mode/hooks/hooks.json +11 -0
  60. package/plugins/loki-mode/scripts/loki-stop-verify.sh +84 -0
  61. package/references/quality-control.md +1 -116
  62. package/skills/00-index.md +2 -2
  63. package/skills/artifacts.md +0 -22
  64. package/skills/production.md +2 -38
  65. package/web-app/dist/assets/{AdminPage-CYJ2BWRC.js → AdminPage-DhXdJNQk.js} +1 -1
  66. package/web-app/dist/assets/{Avatar-DdK4wynI.js → Avatar-ixVj76fM.js} +1 -1
  67. package/web-app/dist/assets/{Badge-CrX3MI7J.js → Badge-BGMSp22s.js} +1 -1
  68. package/web-app/dist/assets/{Button-709-wwGM.js → Button-pYJc32tG.js} +1 -1
  69. package/web-app/dist/assets/{CockpitPage-BapdTInO.js → CockpitPage-C1JBBouA.js} +1 -1
  70. package/web-app/dist/assets/{ComparePage-DT99pGvA.js → ComparePage-qD0NV4RK.js} +1 -1
  71. package/web-app/dist/assets/{ErrorBoundary-B0uJSys8.js → ErrorBoundary-C-yxO58j.js} +1 -1
  72. package/web-app/dist/assets/{EvidenceReceiptPanel-BtMFgElP.js → EvidenceReceiptPanel-ByPzuE1S.js} +1 -1
  73. package/web-app/dist/assets/{GitHubIssuesPanel-DjJuU941.js → GitHubIssuesPanel-BNv_2BEJ.js} +1 -1
  74. package/web-app/dist/assets/{GitHubPRsPanel-HXfEX1BC.js → GitHubPRsPanel-CuLZQ9CS.js} +1 -1
  75. package/web-app/dist/assets/{HomePage-Cqyves-S.js → HomePage-CS_FW8Je.js} +2 -2
  76. package/web-app/dist/assets/{LoginPage-jUbtC7_Y.js → LoginPage-DwiNf1Wm.js} +1 -1
  77. package/web-app/dist/assets/{MagicPage-DHRsqjgR.js → MagicPage-CmQybLPZ.js} +1 -1
  78. package/web-app/dist/assets/{MetricsPage-B-pED05R.js → MetricsPage-D9ERdpv8.js} +1 -1
  79. package/web-app/dist/assets/{NotFoundPage-CsbUs21R.js → NotFoundPage-D9ccgdbF.js} +1 -1
  80. package/web-app/dist/assets/{ProjectPage-BtlLEQwB.js → ProjectPage-B9Jslmgv.js} +3 -3
  81. package/web-app/dist/assets/{ProjectsPage-DaRbRjSp.js → ProjectsPage-DnU99Go2.js} +1 -1
  82. package/web-app/dist/assets/{SettingsPage-DALrtP3F.js → SettingsPage-DcTyx6wo.js} +1 -1
  83. package/web-app/dist/assets/{ShowcasePage-CoPHSNP0.js → ShowcasePage-jEY9ghSr.js} +1 -1
  84. package/web-app/dist/assets/{SystemSettingsPage-kOuSN50O.js → SystemSettingsPage-CSGltW-8.js} +1 -1
  85. package/web-app/dist/assets/{TeamsPage-DGWK0LMp.js → TeamsPage-gUuJXb9l.js} +1 -1
  86. package/web-app/dist/assets/{TemplatesPage-C-_10CwA.js → TemplatesPage-37Zhe--v.js} +1 -1
  87. package/web-app/dist/assets/{TerminalOutput-Cz_vPbXL.js → TerminalOutput-B09hRwaR.js} +1 -1
  88. package/web-app/dist/assets/{activity-icIsXJVa.js → activity-q_4MY9J0.js} +1 -1
  89. package/web-app/dist/assets/{bell-DbPR2_4r.js → bell-X8OC_PFP.js} +1 -1
  90. package/web-app/dist/assets/{bot-DvjP3Yh5.js → bot-C-N1PUOD.js} +1 -1
  91. package/web-app/dist/assets/{check-D1OBxHeU.js → check-B2c76Jmp.js} +1 -1
  92. package/web-app/dist/assets/{chevron-left-D09jDZ29.js → chevron-left-BF76YLNw.js} +1 -1
  93. package/web-app/dist/assets/{circle-alert-DyZMLOcC.js → circle-alert-AeFKBD8h.js} +1 -1
  94. package/web-app/dist/assets/{clock-CdpdJTId.js → clock-CiXRf-FH.js} +1 -1
  95. package/web-app/dist/assets/{cloud-CoLTlmoj.js → cloud-DKQ8SRJ5.js} +1 -1
  96. package/web-app/dist/assets/{code-xml-DrkE2ZZY.js → code-xml-DEb6jXWP.js} +1 -1
  97. package/web-app/dist/assets/{database-CMQQuM2R.js → database-6W7e-E9c.js} +1 -1
  98. package/web-app/dist/assets/{dollar-sign-CuioDaOG.js → dollar-sign-Ds2GOuyW.js} +1 -1
  99. package/web-app/dist/assets/{file-code-corner-Cx9j9K1S.js → file-code-corner-CZU0jg52.js} +1 -1
  100. package/web-app/dist/assets/{file-plus-CYD2zaaI.js → file-plus-DTVYnXCN.js} +1 -1
  101. package/web-app/dist/assets/{globe-6w-hnQkL.js → globe-0mUzKYDe.js} +1 -1
  102. package/web-app/dist/assets/{hammer-BpqtautL.js → hammer-BMHZg3YX.js} +1 -1
  103. package/web-app/dist/assets/{index-Dzs-9EgJ.js → index-BvOTvjax.js} +3 -3
  104. package/web-app/dist/assets/{layers-D5hd7jb7.js → layers-Df7TdcWB.js} +1 -1
  105. package/web-app/dist/assets/{loader-circle-C6Y9x_7H.js → loader-circle-kPsVfrSY.js} +1 -1
  106. package/web-app/dist/assets/{lock-D51L7rYh.js → lock-CXYcbEc5.js} +1 -1
  107. package/web-app/dist/assets/{package-BJF8hkP8.js → package-Cqhua1ID.js} +1 -1
  108. package/web-app/dist/assets/{plus-D5kUQ79n.js → plus-lseXhsn-.js} +1 -1
  109. package/web-app/dist/assets/{refresh-cw-BKdlCa7F.js → refresh-cw-OZriI6gD.js} +1 -1
  110. package/web-app/dist/assets/{rotate-ccw-_bd_YI1e.js → rotate-ccw-CKCfjPg8.js} +1 -1
  111. package/web-app/dist/assets/{scroll-text-DbkegIxF.js → scroll-text-DoVyyfKb.js} +1 -1
  112. package/web-app/dist/assets/{server-DAwqFIsq.js → server-DGy7TflW.js} +1 -1
  113. package/web-app/dist/assets/{shield-alert-BuR1tPHu.js → shield-alert-BCzRcMXi.js} +1 -1
  114. package/web-app/dist/assets/{thumbs-up-BF6p3mRd.js → thumbs-up-C_znJd5g.js} +1 -1
  115. package/web-app/dist/assets/{trash-2-BVpnkqqz.js → trash-2-BosCbeeA.js} +1 -1
  116. package/web-app/dist/assets/{trending-down-DpsDvRwW.js → trending-down-CkR5zDkV.js} +1 -1
  117. package/web-app/dist/assets/{trending-up-mFogTjt3.js → trending-up-DpUIfOH4.js} +1 -1
  118. package/web-app/dist/assets/{upload-4T8zpBsi.js → upload-CH9aKc8L.js} +1 -1
  119. package/web-app/dist/assets/{usePolling-DPXQv8WO.js → usePolling-pzxrHJeg.js} +1 -1
  120. package/web-app/dist/assets/{user-BYGIFaTm.js → user-B7OHa-VQ.js} +1 -1
  121. package/web-app/dist/index.html +1 -1
  122. package/dashboard/run.py +0 -63
  123. package/docs/openclaw-integration.md +0 -52
  124. package/docs/v10/HANDOFF-NEXT-WEEK.md +0 -40
  125. package/docs/v10/MORNING-BRIEF-1003.md +0 -25
  126. package/docs/v10/MORNING-BRIEF.md +0 -52
  127. package/docs/v10/TODO.md +0 -35
  128. package/mcp/resources.py +0 -351
  129. package/mcp/tools.py +0 -200
@@ -164,16 +164,18 @@ previously mismarked two merged guards (S-16, S-74) as PENDING.
164
164
  cleanup pass: an explicit exclusion list of live and approved-unmerged
165
165
  worktrees, plus `.git` file birth time (`stat -f %B`) in place of mtime as
166
166
  the recency signal (PROGRESS.md, turn 180). That was a one-time operational
167
- fix. The standing guard is `scripts/prune-worktrees.sh` (S-154, commit
168
- `e57262cf`): it decides removal only from structural state (branch merged
167
+ fix. The standing guard is `scripts/v10-worktree-reap.sh --strict` (S-154,
168
+ commit `e57262cf`, as `prune-worktrees.sh`; folded into the reaper in
169
+ v11.6.0): it decides removal only from structural state (branch merged
169
170
  into main by ancestry or `git cherry`, worktree not locked, working tree
170
171
  clean, path under `.claude/worktrees/`) and never from a file-age signal.
171
172
  A live agent marks its worktree with `git worktree lock`, which the script
172
173
  always skips.
173
- - **The test that proves it fires:** `tests/test-prune-worktrees.sh`
174
- (S-154). Its GUARDS 5 assertion greps the script for `stat`, `mtime`,
175
- `-mmin` and `-newer` and fails on any hit ("script uses a file-age signal
176
- (GUARDS 5)"); the same suite proves locked and dirty worktrees survive.
174
+ - **The test that proves it fires:** `tests/test-worktree-reap.sh`
175
+ (S-154). Its GUARDS 5 assertion greps the `strict_gate` function for `stat`,
176
+ `mtime`, `-mmin` and `-newer` and fails on any hit ("strict gate uses no
177
+ file-age signal (GUARDS 5)"); the same suite proves locked and dirty
178
+ worktrees survive.
177
179
 
178
180
  ## 6. Over-budget trivial agents, no violation surfaced it (S-75, AGENT_OVER_BUDGET, `c16d875f`)
179
181
 
@@ -772,22 +774,22 @@ previously mismarked two merged guards (S-16, S-74) as PENDING.
772
774
  `${LOKI_EVAL_ARCHIVE:-$HOME/loki-ci-logs/eval}/<run-name>/results.jsonl`
773
775
  (outside the repo) and the committed `eval/loki10/archive/<run-name>.results.jsonl`,
774
776
  per row inside the same lock that writes the worktree-local copy, so a
775
- killed run keeps what it already archived. `scripts/prune-worktrees.sh`
777
+ killed run keeps what it already archived. `scripts/v10-worktree-reap.sh --strict`
776
778
  refuses to remove a worktree that has a `results.jsonl` whose `run_id`s
777
779
  are not all present in an archived copy, and separately refuses to remove
778
780
  one with a live process inside it (`lsof -d cwd -Fn`) or a branch commit
779
781
  less than 30 minutes old (`git log -1 --format=%ct`) -- any check that
780
782
  cannot run (lsof missing/broken, unparseable JSON) REFUSES rather than
781
783
  guessing. No file-age signal (`stat`, `find -newermt`, etc.) is used
782
- anywhere in it.
783
- - **The test that proves it fires:** `tests/test-prune-worktrees.sh` keeps a
784
+ anywhere in the strict gate.
785
+ - **The test that proves it fires:** `tests/test-worktree-reap.sh` (strict
786
+ section) keeps a
784
787
  worktree with a live process inside it, keeps one whose results are not
785
788
  yet archived, removes one whose results ARE archived (positive control),
786
789
  and refuses everything when `lsof` is stubbed to fail. Deleting any one of
787
- the three new checks from `scripts/prune-worktrees.sh` (live-process,
788
- 30-minute, or archived-results) turns the corresponding case red: 24
789
- passed / 2 failed each time, vs. 26 passed / 0 failed with the check in
790
- place. `tests/test-eval-archive.sh` plants a token
790
+ the three new checks from `strict_gate` in `scripts/v10-worktree-reap.sh`
791
+ (live-process, 30-minute, or archived-results) turns the corresponding
792
+ case red. `tests/test-eval-archive.sh` plants a token
791
793
  (`sk-ant-plantedTOKEN9999`, a GitHub-token-shaped string, and a
792
794
  `KEY=VALUE`-shaped one) in a synthetic row and asserts none of it survives
793
795
  `redact_row`, that the log paths are gone, that real fields (`task`,
@@ -796,7 +798,7 @@ previously mismarked two merged guards (S-16, S-74) as PENDING.
796
798
  would otherwise pass the secret check too). Replacing `redact_row` with a
797
799
  no-op (`return dict(row)`) reproduces the incident directly: the planted
798
800
  secret and the log paths both survive.
799
- Run: `bash tests/test-prune-worktrees.sh && bash tests/test-eval-archive.sh`.
801
+ Run: `bash tests/test-worktree-reap.sh && bash tests/test-eval-archive.sh`.
800
802
 
801
803
  ## 21. A failed `cd` let an agent detach the shared main checkout (E-161)
802
804
 
package/docs/v10/GUIDE.md CHANGED
@@ -241,13 +241,11 @@ system packages and never runs sudo. Prerequisites are in
241
241
 
242
242
  ## Exit codes
243
243
 
244
- One contract, enforced from 11.4.0 (details in [exit-codes.md](../exit-codes.md)).
245
- `loki verify` exits 0 VERIFIED, 1 CONCERNS, 2 BLOCKED or not a git directory,
246
- 3 verifier error or empty diff, 64 usage error. Usage errors from `loki quick`
247
- and `loki start` are also 64. CI gates should use `loki verify || fail`, not
248
- `[ $rc -eq 1 ]`, and treat any code of 2 or higher as worse than CONCERNS. This
249
- is a breaking change for scripts that tested rc==1 on an empty diff or a
250
- non-git directory.
244
+ One contract, enforced from 11.4.0: [exit-codes.md](../exit-codes.md) lists the
245
+ per-command codes, including `loki verify`. CI gates should use
246
+ `loki verify || fail`, not `[ $rc -eq 1 ]`, and treat any code of 2 or higher as
247
+ worse than CONCERNS. This is a breaking change for scripts that tested rc==1 on
248
+ an empty diff or a non-git directory.
251
249
 
252
250
  ## The summary
253
251
 
@@ -1885,7 +1885,7 @@ The swarm is stopped: .loki/V10-STOP exists, the loop has no wake-ups, and the c
1885
1885
  - Rerun (b) started 2026-10-01T09:32Z: the 4 Loki-specific tasks x 3 reps, arms v10 and raw-claude, model claude-sonnet-5, at main 575ddebcf; out ~/loki-ci-logs/d50-rerun-*. No lift number is cited until it finishes. Then fix the top cause first and record a per-model stage profile with a lift row.
1886
1886
 
1887
1887
  ## 2026-10-01T10:14Z LOKI MORNING TEST
1888
- - See docs/v10/MORNING-BRIEF.md, section "LOKI MORNING TEST" (latest 10.5.27, both gate legs passed).
1888
+ - LOKI MORNING TEST: latest 10.5.27, both gate legs passed (the separate morning brief doc was removed).
1889
1889
 
1890
1890
  ## 2026-10-01T10:25Z D50 rerun complete (3 reps x 4 tasks x 2 arms, claude-sonnet-5, main 575ddebcf)
1891
1891
  - click-2877: v10 3/3, raw 3/3 (baseline false ALREADY_SATISFIED did not recur: noise). humanize-333: v10 1/3, raw 1/3 (parity, hard task).
@@ -2326,3 +2326,14 @@ The swarm is stopped: .loki/V10-STOP exists, the loop has no wake-ups, and the c
2326
2326
  - guards-always pushed to main at 1d20b928e (push rc=0): 19/19 --guards-only rows rc=0 (~/loki-ci-logs/ga-guards-2141b.log), sigpipe CEILING 1789 -> 1742.
2327
2327
  - ENV-INTAKE bb2d57569: opus r1 BLOCK (F1 supply_guard registry token exfil, F2 seal commit hooks get worker env, F3 LOKI_* secrets incl. PR bot token and receipt signing key reach repo tests, F4 stray ' + R + ' arg in run.sh lint calls). CTO: F3 counts against 11.3.6 and earlier; signing key must never be in any child env. Fix slice ENV-INTAKE-R1FIX building; r2 pending; B9 n=9 two-bug +5.2% (rerun on fixed head). GHSA-p656 held.
2328
2328
  - Disk P0 cleared earlier (83G free). AUTO-REAP cf94b8bd4 in TL review; WF-2MIN-3 (CTO GO: one tarball, merge release+publish-npm, npm-visible non-blocking) building; CANARY-SHAPE building.
2329
+
2330
+ ## Release CI results, 10.6.x (folded from the removed 2026-10-03 handoff doc)
2331
+ - 10.6.0 (9f9569c35): Tests, Bun Parity, Coverage, Security Audit green. Published.
2332
+ - 10.6.1 (9bc3cfcc7): Tests red, shard 7 test-engine10-docs.sh (D57 docs pass removed the README loki10-default marker). Not published.
2333
+ - 10.6.2 (5c1e3324d): Tests red from W1-ROUTE (moat P5 and P9 probes, loki run --help flags, UI bare loki). Not published.
2334
+ - 10.6.3 (f289f8bf2): Tests red, shard 7 test-ui-bare-loki (LEAK3 URL output); LEAK3 reverted (05410c554). Not published.
2335
+ - 10.6.4 (3a4df211c): all Tests jobs failed on an npm 404 for a not-yet-propagated package. Not published; carried into 10.6.5.
2336
+ - 10.6.5 (0472f306a): moat P9 injection-cannot-reach-token regressed by the minimal loki start route. Not published.
2337
+ - 10.6.6 (456058bae): scope control, Control Plane v0, train-cycle fix, docs. All green. Published.
2338
+ - 10.6.7 (bfce1db12): D60 sprint, all gates, Release, Post-Release Smoke and Promote success. latest and next at 10.6.7.
2339
+ - Open at handoff: real-repo gate not wired into promote.yml and needs operator provider auth; no end-to-end exit 3 run of the cost cap; root action.yml still uses loki start --simple; about 43 worktrees under .claude/worktrees (cap 15); never push backup/train-67..70 or backup/main-pre-rebuild.
@@ -160,11 +160,7 @@ Ground truth: seal.ts:138 already commits with trailer `Loki-Run: <runId>`; rece
160
160
  Ground truth (GOV-MEASURE exists, do not rebuild): `scripts/usage-governor.py` has `parse_usage_text` (parses `claude -p /usage --output-format json` into session_pct, week_pct, session_resets, week_resets, regexes at lines 396-397), `_run_usage_command` (bounded, process-group kill), `measured_usage` (15 min cache), `fit_tokens_per_percent`, and `--json` output. Caveats found in the code: (1) `last_wednesday_reset`/`next_wednesday_reset` hardcode the founder's weekly reset day, so they cannot be reused for a user; the user's reset must come from `session_resets`/`week_resets` text. (2) The reset fields are raw strings, not timestamps. (3) Only Claude has `/usage`; codex and others have no reading, so forecast must degrade to "unmeasured" (never a made-up number). Consumer today: `loki-ts/src/commands/queue.ts` `defaultGovernor` (shells out to the script, holds the queue on hold_above_70_session). Hard caps today: `--max-cost` (engine10/cli.ts:36, default $100 with API key, none on subscription) and the wall-clock cap (util/run_cap.ts). The F2 rough-prior cost estimate was merged (needs reading before PRED-1; locate with git log --grep F2-ROUGH-PRIOR). The user's own usage is read only on the user's machine via their own claude CLI; nothing is sent anywhere.
161
161
 
162
162
  ### QF-1 Reset-time parser and window model (LOW, 15 min)
163
- - Goal: pure function `parseResetText(s, now, tz)` returning an epoch for strings like the /usage output (formats to be captured from tests/fixtures of real `/usage` text already used by the governor tests), or null; plus a `UsageWindow` type {kind, used_pct, resets_at|null}.
164
- - File set: loki-ts/src/util/usage_window.ts (new), loki-ts/test/usage_window.test.ts (new). Python script untouched.
165
- - Tests first: every distinct reset string in the existing governor test fixtures (grep tests for "resets") parses to the right epoch across a DST boundary; unparseable returns null, never now+5h; no hardcoded weekday.
166
- - Wall: no spawn, no network; reads no files.
167
- - Commands: cd loki-ts && bun test usage_window; tsc. Flag: none (library). Tier LOW.
163
+ - Status: dropped, governor owns parsing (scripts/usage-governor.py parse_usage_text and parse_reset_text). No separate TypeScript parser is built.
168
164
 
169
165
  ### QF-2 Forecast before run and `issues run` (MEDIUM, 30 min; after QF-1)
170
166
  - Goal: before `loki start` and `loki queue run` (the existing issue loop), print `forecast: ~X% of session window, ~Y% of week (basis: N past runs of this shape | rough prior | unmeasured)`. Reuse `defaultGovernor`'s script call, extended to return session_pct/week_pct/resets via `--json` (already in output). Basis uses engine10/cost.ts history when present, else the labelled rough prior, else prints "unmeasured" without a number.
@@ -2,6 +2,26 @@
2
2
 
3
3
  Run Loki Mode autonomous SDLC sessions from any OpenClaw channel (Slack, Discord, Teams, web).
4
4
 
5
+ ## Status
6
+
7
+ This integration is a skill package plus a bridge skeleton. It is not a Loki CLI feature.
8
+
9
+ An earlier doc described an OpenClaw coordination protocol that was never implemented and has been removed. None of these exist in the source (`autonomy/` and `loki-ts/src/` contain no OpenClaw command or flag):
10
+
11
+ - an OpenClaw subcommand in the `loki` CLI dispatch
12
+ - `/api/openclaw/*` REST endpoints in the dashboard
13
+ - `LOKI_OPENCLAW_*` environment variables
14
+ - a `.loki/config.yaml` `openclaw:` block
15
+ - `loki_openclaw_*` Prometheus metrics
16
+
17
+ What does exist: the skill package in this directory (the agent calls the ordinary `loki start` and `loki status --json`) and the bridge skeleton in `bridge/` (see Phase 2 below). The bridge has no WebSocket client yet and prints mapped events to stdout. Run it directly, not through `loki`.
18
+
19
+ For real multi-agent coordination today, use implemented surfaces:
20
+
21
+ - The MCP server (`loki mcp`) exposes Loki's tools to any MCP client.
22
+ - `.loki/events.jsonl` is the durable event stream the bridge reads; anything that can tail a JSONL file can consume it.
23
+ - `loki status --json` is the supported programmatic status surface.
24
+
5
25
  ## Installation
6
26
 
7
27
  1. Install Loki Mode CLI:
@@ -128,60 +128,23 @@ All synced tasks use `[Loki]` prefix in title for safe identification. On each s
128
128
 
129
129
  This ensures clean sync without duplicates.
130
130
 
131
- ## Export Script
131
+ ## Export Command
132
132
 
133
- Add this to export Loki Mode tasks to Vibe Kanban:
133
+ The sync script is also exposed through the CLI. Run it from the project directory:
134
134
 
135
135
  ```bash
136
- #!/bin/bash
137
- # scripts/export-to-vibe-kanban.sh
138
-
139
- LOKI_DIR=".loki"
140
- EXPORT_DIR="${VIBE_KANBAN_DIR:-~/.vibe-kanban/loki-tasks}"
141
-
142
- mkdir -p "$EXPORT_DIR"
143
-
144
- # Export pending tasks
145
- if [ -f "$LOKI_DIR/queue/pending.json" ]; then
146
- python3 << EOF
147
- import json
148
- import os
149
-
150
- with open("$LOKI_DIR/queue/pending.json") as f:
151
- tasks = json.load(f)
152
-
153
- export_dir = os.path.expanduser("$EXPORT_DIR")
154
-
155
- for task in tasks:
156
- vibe_task = {
157
- "id": f"loki-{task['id']}",
158
- "title": task.get('payload', {}).get('description', task['type']),
159
- "description": json.dumps(task.get('payload', {}), indent=2),
160
- "status": "todo",
161
- "agent": "claude-code",
162
- "tags": [task['type'], f"priority-{task.get('priority', 5)}"],
163
- "metadata": {
164
- "lokiTaskId": task['id'],
165
- "lokiType": task['type'],
166
- "createdAt": task.get('createdAt', '')
167
- }
168
- }
169
-
170
- with open(f"{export_dir}/{task['id']}.json", 'w') as out:
171
- json.dump(vibe_task, out, indent=2)
172
-
173
- print(f"Exported {len(tasks)} tasks to {export_dir}")
174
- EOF
175
- fi
136
+ loki export vibe-kanban
176
137
  ```
177
138
 
139
+ It runs `scripts/sync-to-vibe-kanban.sh`. Set `VIBE_KANBAN_DB=/path/to/db.sqlite` to target a non-default database.
140
+
178
141
  ## Real-Time Sync (Advanced)
179
142
 
180
143
  For real-time sync, run the watcher alongside Loki Mode:
181
144
 
182
145
  ```bash
183
146
  #!/bin/bash
184
- # scripts/vibe-sync-watcher.sh
147
+ # scripts/vibe-sync-watcher.sh (simplified)
185
148
 
186
149
  LOKI_DIR=".loki"
187
150
 
@@ -194,7 +157,7 @@ while true; do
194
157
  inotifywait -e modify,create "$LOKI_DIR/queue/" 2>/dev/null
195
158
  fi
196
159
 
197
- ./scripts/export-to-vibe-kanban.sh
160
+ ./scripts/sync-to-vibe-kanban.sh
198
161
  sleep 2
199
162
  done
200
163
  ```
@@ -225,7 +188,7 @@ If running Loki Mode on multiple projects, see all in one Vibe Kanban instance.
225
188
 
226
189
  ## Troubleshooting
227
190
 
228
- ### Issue: "Exported 0 tasks total"
191
+ ### Issue: "Synced 0 tasks to Vibe Kanban"
229
192
 
230
193
  **Cause:** No tasks in `.loki/queue/` yet.
231
194
 
@@ -254,18 +217,17 @@ If running Loki Mode on multiple projects, see all in one Vibe Kanban instance.
254
217
 
255
218
  **Checklist:**
256
219
  1. Is Vibe Kanban running? Check http://127.0.0.1:53380
257
- 2. Did you run the export script? `./scripts/export-to-vibe-kanban.sh`
258
- 3. Check export directory has files: `ls ~/.vibe-kanban/loki-tasks/`
220
+ 2. Did you run the sync? `loki export vibe-kanban`
221
+ 3. Check the database has rows: `sqlite3 "<db path>" "SELECT title FROM tasks WHERE title LIKE '[Loki]%';"`
259
222
  4. Refresh the Vibe Kanban browser window
260
- 5. Check Vibe Kanban is configured to watch that directory
261
223
 
262
224
  ### Issue: "No real-time updates"
263
225
 
264
- **Explanation:** The export script runs on-demand, not automatically.
226
+ **Explanation:** The sync runs on-demand, not automatically.
265
227
 
266
228
  **Solutions:**
267
229
  1. Run `./scripts/vibe-sync-watcher.sh` for automatic sync
268
- 2. Or manually run export script periodically: `watch -n 10 ./scripts/export-to-vibe-kanban.sh`
230
+ 2. Or run the sync periodically: `watch -n 10 loki export vibe-kanban`
269
231
  3. Or refresh manually when you want to check progress
270
232
 
271
233
  ## Expected Workflow
@@ -2,6 +2,7 @@
2
2
  "$schema_version": 1,
3
3
  "_comment": "Rolling pricing table consumed by loki-ts/src/runner/budget.ts. Update this file when Anthropic / OpenAI / others publish new prices; no code change required. Pricing is USD per 1 million tokens. Aliases (opus/sonnet/haiku) point to the latest model of that family per providers/model_catalog.json.",
4
4
  "_updated": "2026-10-08",
5
+ "default_max_cost_usd": 100,
5
6
  "_source": "https://platform.claude.com/docs/en/about-claude/pricing (docs.anthropic.com/en/docs/about-claude/pricing 301-redirects there), read 2026-10-08. Per MTok. fable=Claude Fable 5.1 $10/$50, cache read $0.25 (0.025x), 5m write $12.50, 1h write $20. opus=Claude Opus 5.5 $4/$20, cache read $0.20 (0.05x), 5m write $5, 1h write $8. sonnet=Claude Sonnet 5.5 $2/$10, cache read $0.10 (0.05x), 5m write $2.50, 1h write $4. haiku alias row prices as its catalog target claude-haiku-5-5 (providers/model_catalog.json cli_aliases), so it equals that row including over_100k; Haiku 4.5 ($1/$5) is no longer an alias target. claude-haiku-5-5 (exact id, same as the haiku alias): $0.10/$0.50, read $0.01, 5m $0.125, 1h $0.20 up to 100,000 prompt tokens; over_100k $0.50/$2.50, read $0.05, 5m $0.625, 1h $1. Fields: cache_write is the 5m write rate (legacy readers); cache_write_5m and cache_write_1h are the explicit tiers. Multipliers: 5m write 1.25x, 1h write 2x, read 0.1x (0.05x on Opus 5.5 and Sonnet 5.5, 0.025x on Fable 5.1). OpenAI rows (gpt-5.3-codex, gpt-5.6-sol/terra/luna): https://developers.openai.com/api/docs/pricing, read 2026-10-08, Standard tier, short context (up to 272K); cached input is the cache_read field; OpenAI bills no cache write, cache_write is a 1.25x placeholder.",
6
7
  "pricing": {
7
8
  "fable": {