loki-mode 11.17.13 → 11.17.16

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 (80) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/autonomy/loki +110 -4
  4. package/autonomy/mcp-launch.sh +157 -0
  5. package/dashboard/__init__.py +1 -1
  6. package/docs/CLI-REFERENCE.md +2 -1
  7. package/docs/INSTALLATION.md +1 -1
  8. package/docs/dev/release-checklist.md +5 -5
  9. package/docs/v10/BOARD.md +67 -45
  10. package/docs/v10/CLI-MODERN.md +1 -1
  11. package/docs/v10/DECISIONS.md +13 -1
  12. package/docs/v10/DEPS.md +2 -6
  13. package/docs/v10/FAILURE-CLASSES.md +21 -0
  14. package/docs/v10/OPERATING-MODEL.md +2 -3
  15. package/docs/v10/PROGRESS.md +3 -0
  16. package/loki-ts/dist/loki.js +1155 -1046
  17. package/mcp/__init__.py +1 -1
  18. package/package.json +2 -2
  19. package/packages/control-plane/dist/ask-tools-server.js +16 -2
  20. package/packages/control-plane/dist/server.js +2185 -1986
  21. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  22. package/skills/factory-operations.md +6 -7
  23. package/skills/release-cadence.md +12 -16
  24. package/web-app/dist/assets/{AdminPage-CwtSZac4.js → AdminPage-Nf1Q3SV5.js} +1 -1
  25. package/web-app/dist/assets/{Avatar-BfguNHDC.js → Avatar-CnVyVV_m.js} +1 -1
  26. package/web-app/dist/assets/{Badge-DQGEOIqb.js → Badge-CaBCk2uD.js} +1 -1
  27. package/web-app/dist/assets/{Button-CRb-wJga.js → Button-BRrCQWBX.js} +1 -1
  28. package/web-app/dist/assets/{CockpitPage-DnA9wewN.js → CockpitPage-Br6uoiqi.js} +1 -1
  29. package/web-app/dist/assets/{ComparePage-DX6F_G0l.js → ComparePage-Bre0q8cO.js} +1 -1
  30. package/web-app/dist/assets/{ErrorBoundary-VVIdgfkb.js → ErrorBoundary-D2NcPhuR.js} +1 -1
  31. package/web-app/dist/assets/{EvidenceReceiptPanel-FxknNXxU.js → EvidenceReceiptPanel-C3epF3H4.js} +1 -1
  32. package/web-app/dist/assets/{GitHubIssuesPanel-DqiraoJP.js → GitHubIssuesPanel-C6riGNjm.js} +1 -1
  33. package/web-app/dist/assets/{GitHubPRsPanel-BYkTsRfQ.js → GitHubPRsPanel-DnDaPqIB.js} +1 -1
  34. package/web-app/dist/assets/{HomePage-BjpWZdl4.js → HomePage-DgEwjQUp.js} +2 -2
  35. package/web-app/dist/assets/{LoginPage-DdBnFY4Y.js → LoginPage-duKQQvm4.js} +1 -1
  36. package/web-app/dist/assets/{MagicPage-ihQmO1wm.js → MagicPage-Cmxo4A4h.js} +1 -1
  37. package/web-app/dist/assets/{MetricsPage-Dq5YARm1.js → MetricsPage-D5-qIvza.js} +1 -1
  38. package/web-app/dist/assets/{NotFoundPage-CLzwsmxk.js → NotFoundPage-D9MW-hOZ.js} +1 -1
  39. package/web-app/dist/assets/{ProjectPage-Dm8X4ntm.js → ProjectPage-D7inWAiO.js} +3 -3
  40. package/web-app/dist/assets/{ProjectsPage-DI3PhBwa.js → ProjectsPage-BQE1wHOt.js} +1 -1
  41. package/web-app/dist/assets/{SettingsPage-D3bL3Ll-.js → SettingsPage-4WruO-H2.js} +1 -1
  42. package/web-app/dist/assets/{ShowcasePage-ypNyQAKe.js → ShowcasePage-wINi-tQI.js} +1 -1
  43. package/web-app/dist/assets/{SystemSettingsPage-a9KPi49-.js → SystemSettingsPage-C7-NwbQe.js} +1 -1
  44. package/web-app/dist/assets/{TeamsPage-B2KmQjeS.js → TeamsPage-nI1kMyd6.js} +1 -1
  45. package/web-app/dist/assets/{TemplatesPage-BnK5NB62.js → TemplatesPage-cYG4rEHV.js} +1 -1
  46. package/web-app/dist/assets/{TerminalOutput-CYbPu51X.js → TerminalOutput-5N1DSuEO.js} +1 -1
  47. package/web-app/dist/assets/{activity-DBIfCcER.js → activity-FBZfN02x.js} +1 -1
  48. package/web-app/dist/assets/{bell-B9HN4QkY.js → bell-BIabKNrl.js} +1 -1
  49. package/web-app/dist/assets/{bot-DamtEiBN.js → bot-Cxvkdr2Q.js} +1 -1
  50. package/web-app/dist/assets/{check-DXifl-uv.js → check-BK9OE0AO.js} +1 -1
  51. package/web-app/dist/assets/{chevron-left-BrlJBb8m.js → chevron-left-JU1GR1jb.js} +1 -1
  52. package/web-app/dist/assets/{circle-alert-CVKCTAb9.js → circle-alert-BCXT4GEL.js} +1 -1
  53. package/web-app/dist/assets/{clock-HQ6E5gSp.js → clock-D7dTHgoA.js} +1 -1
  54. package/web-app/dist/assets/{cloud-B15Ysqug.js → cloud-C7JE0VyG.js} +1 -1
  55. package/web-app/dist/assets/{code-xml-hqFIp0_h.js → code-xml-CPk8coOb.js} +1 -1
  56. package/web-app/dist/assets/{database-CcSm0M_K.js → database-CUbozRg2.js} +1 -1
  57. package/web-app/dist/assets/{dollar-sign-acxpddMc.js → dollar-sign-CqapDZIS.js} +1 -1
  58. package/web-app/dist/assets/{file-code-corner-B5IIv12W.js → file-code-corner-Cjyd0vE9.js} +1 -1
  59. package/web-app/dist/assets/{file-plus-CkbMFWJb.js → file-plus-CK0O76xH.js} +1 -1
  60. package/web-app/dist/assets/{globe-CWmZ3xTF.js → globe-Btlp8WbD.js} +1 -1
  61. package/web-app/dist/assets/{hammer-BSaCsCAo.js → hammer-Dhx3vv-6.js} +1 -1
  62. package/web-app/dist/assets/{index-BCf0fCNu.js → index-Dc_xDhlb.js} +3 -3
  63. package/web-app/dist/assets/{layers-CL82nJ3b.js → layers-BN-rnVzd.js} +1 -1
  64. package/web-app/dist/assets/{loader-circle-DBhm8R7M.js → loader-circle-B5drrE7g.js} +1 -1
  65. package/web-app/dist/assets/{lock-wWcqImfq.js → lock-TV6tjnhb.js} +1 -1
  66. package/web-app/dist/assets/{package-BaZa22IO.js → package-CSbH8fIY.js} +1 -1
  67. package/web-app/dist/assets/{plus-TFOQPEeK.js → plus-DfKZYO-a.js} +1 -1
  68. package/web-app/dist/assets/{refresh-cw-BOKfYIta.js → refresh-cw-DVhK4NFt.js} +1 -1
  69. package/web-app/dist/assets/{rotate-ccw-DrH5oGwW.js → rotate-ccw-DsP-00k8.js} +1 -1
  70. package/web-app/dist/assets/{scroll-text-aY8_wIJd.js → scroll-text-BE1U-3Xd.js} +1 -1
  71. package/web-app/dist/assets/{server-C6FQ01rB.js → server-mht7K1pl.js} +1 -1
  72. package/web-app/dist/assets/{shield-alert-DurYyWUo.js → shield-alert-CeIANeNA.js} +1 -1
  73. package/web-app/dist/assets/{thumbs-up-wUuSs67Q.js → thumbs-up-viM2SkMc.js} +1 -1
  74. package/web-app/dist/assets/{trash-2-DAob0LKZ.js → trash-2-BGg8UrMr.js} +1 -1
  75. package/web-app/dist/assets/{trending-down-yKL9mp2O.js → trending-down-B4GYlBAd.js} +1 -1
  76. package/web-app/dist/assets/{trending-up-BD55eCE3.js → trending-up-D4xbMall.js} +1 -1
  77. package/web-app/dist/assets/{upload-0IJxnT31.js → upload-CQtefdPg.js} +1 -1
  78. package/web-app/dist/assets/{usePolling-DuBiboP5.js → usePolling-wgMepn3O.js} +1 -1
  79. package/web-app/dist/assets/{user-BDw_rGaY.js → user-ee6764Ui.js} +1 -1
  80. package/web-app/dist/index.html +1 -1
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ 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 v11.17.13
6
+ # Loki Mode v11.17.16
7
7
 
8
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 previous bash loop. PRD-file starts (`loki start ./prd.md`) and the opencode provider still run on it until FC38-SWEEP ports them; the legacy-engine command and the LOKI_ENGINE switch remain removed. Prefer `loki owner/repo#N` for issues.
9
9
 
@@ -483,4 +483,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
483
483
 
484
484
  ---
485
485
 
486
- **v11.17.13 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
486
+ **v11.17.16 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.17.13
1
+ 11.17.16
package/autonomy/loki CHANGED
@@ -10388,16 +10388,30 @@ _deploy_try_execute() {
10388
10388
  rc=4
10389
10389
  fi
10390
10390
  else
10391
- canary_out="$( cd "$dir" && eval "$exec_cmd" )" || rc=$?
10392
- printf '%s\n' "$canary_out"
10393
- if [ "$rc" -eq 0 ]; then
10391
+ # Stream provider output live while keeping a copy to parse the URL from.
10392
+ # The copy lives in a private mktemp -d dir removed on exit and on INT/TERM/HUP.
10393
+ local dep_dir dep_tmp dep_errexit=0
10394
+ dep_dir="$(mktemp -d "${TMPDIR:-/tmp}/loki-deploy-out.XXXXXXXX")" || dep_dir=""
10395
+ dep_tmp=/dev/null
10396
+ if [ -n "$dep_dir" ]; then
10397
+ dep_tmp="${dep_dir}/out"
10398
+ # shellcheck disable=SC2064
10399
+ trap "rm -rf -- '${dep_dir}'; trap - INT TERM HUP; exit 130" INT TERM HUP
10400
+ fi
10401
+ case $- in *e*) dep_errexit=1 ;; esac
10402
+ set +e
10403
+ ( cd "$dir" && eval "$exec_cmd" ) 2>&1 | tee "$dep_tmp"
10404
+ rc=${PIPESTATUS[0]}
10405
+ [ "$dep_errexit" -eq 1 ] && set -e
10406
+ if [ "$rc" -eq 0 ] && [ "$dep_tmp" != /dev/null ]; then
10394
10407
  # Same last-https-URL parse as the canary path; never invented.
10395
- deployed_url="$(grep -Eo 'https?://[^[:space:]]+' <<<"$canary_out" | tail -n 1)" || deployed_url=""
10408
+ deployed_url="$(grep -Eo 'https?://[^[:space:]]+' "$dep_tmp" | tail -n 1)" || deployed_url=""
10396
10409
  if [ -n "$deployed_url" ]; then
10397
10410
  echo "Live at: ${deployed_url}"
10398
10411
  if [ -z "$health_url" ]; then health_url="$deployed_url"; health_src="captured"; fi
10399
10412
  fi
10400
10413
  fi
10414
+ if [ -n "$dep_dir" ]; then rm -rf -- "$dep_dir"; trap - INT TERM HUP; fi
10401
10415
  fi
10402
10416
 
10403
10417
  # Health probe only after a deploy that exited 0. Without a URL, or after a
@@ -11073,6 +11087,97 @@ except: print(0)
11073
11087
  fi
11074
11088
  ;;
11075
11089
 
11090
+ publish)
11091
+ # Receipt-stamped export: push the verified tree to GitHub and set a
11092
+ # loki/receipt commit status whose state comes ONLY from the receipt
11093
+ # verdict. Never stages files; private unless --public is passed.
11094
+ local _pub_vis="--private" _pub_name="" _pub_dir="." _pub_usage=0
11095
+ while [ $# -gt 0 ]; do
11096
+ case "$1" in
11097
+ --public) _pub_vis="--public"; shift ;;
11098
+ --private) _pub_vis="--private"; shift ;;
11099
+ --dir)
11100
+ case "${2:-}" in ""|-*) _pub_usage=1; break ;; esac
11101
+ _pub_dir="$2"; shift 2 ;;
11102
+ -*) _pub_usage=1; break ;;
11103
+ *)
11104
+ [ -z "$_pub_name" ] || { _pub_usage=1; break; }
11105
+ _pub_name="$1"; shift ;;
11106
+ esac
11107
+ done
11108
+ if [ "$_pub_usage" -ne 0 ]; then
11109
+ echo "Usage: loki github publish [name] [--public] [--dir <path>]" >&2
11110
+ exit 2
11111
+ fi
11112
+ local _pub_refuse
11113
+ _pub_refuse="$(_deploy_tree_clean "$_pub_dir")"
11114
+ if [ -n "$_pub_refuse" ]; then
11115
+ echo -e "${RED}Refused: ${_pub_refuse}${NC}" >&2
11116
+ exit 1
11117
+ fi
11118
+ if ! command -v gh &>/dev/null; then
11119
+ echo -e "${RED}Error: gh CLI not found. Install with: brew install gh${NC}" >&2
11120
+ exit 1
11121
+ fi
11122
+ if ! gh auth status &>/dev/null; then
11123
+ echo -e "${RED}Error: gh CLI not authenticated. Run: gh auth login${NC}" >&2
11124
+ exit 1
11125
+ fi
11126
+ local _pub_sha _pub_pj _pub_verdict="NONE" _pub_anchor="" _pub_state="none"
11127
+ _pub_sha="$(git -C "$_pub_dir" rev-parse HEAD 2>/dev/null)" || _pub_sha=""
11128
+ if [ -z "$_pub_sha" ]; then
11129
+ echo -e "${RED}Refused: no HEAD commit to publish${NC}" >&2
11130
+ exit 1
11131
+ fi
11132
+ _pub_pj="$(_deploy_latest_receipt "$_pub_dir")"
11133
+ if [ -n "$_pub_pj" ]; then
11134
+ _pub_verdict="$(_deploy_receipt_verdict "$_pub_pj")"
11135
+ _pub_anchor="$(_deploy_anchor_ok "$_pub_pj" "$_pub_dir")"
11136
+ if [ "$_pub_verdict" = "VERIFIED" ] && [ -z "$_pub_anchor" ]; then
11137
+ _pub_state="success"
11138
+ else
11139
+ _pub_state="failure"
11140
+ fi
11141
+ fi
11142
+
11143
+ local _pub_url="" _pub_out=""
11144
+ if git -C "$_pub_dir" remote get-url origin &>/dev/null; then
11145
+ if [ -n "$_pub_anchor" ] || [ -z "$_pub_pj" ]; then
11146
+ echo -e "${RED}Refused: HEAD is not confirmed as the receipt anchor (${_pub_anchor:-no Evidence Receipt found}). Nothing was pushed.${NC}" >&2
11147
+ exit 1
11148
+ fi
11149
+ git -C "$_pub_dir" push origin HEAD || exit 1
11150
+ else
11151
+ [ -n "$_pub_name" ] || _pub_name="$(basename "$(cd "$_pub_dir" && pwd)")"
11152
+ _pub_out="$(cd "$_pub_dir" && gh repo create "$_pub_name" "$_pub_vis" --source . --push 2>&1)" || {
11153
+ echo "$_pub_out" >&2
11154
+ echo -e "${RED}gh repo create failed; nothing published.${NC}" >&2
11155
+ exit 1
11156
+ }
11157
+ _pub_url="$(printf '%s\n' "$_pub_out" | grep -Eo 'https://github\.com/[^[:space:]]+' | head -1)"
11158
+ fi
11159
+ [ -n "$_pub_url" ] || _pub_url="$(git -C "$_pub_dir" remote get-url origin 2>/dev/null || true)"
11160
+
11161
+ local _pub_slug
11162
+ _pub_slug="$(printf '%s' "$_pub_url" | sed -E 's|^.*github\.com[:/]||; s|\.git$||')"
11163
+ if [ "$_pub_state" = "none" ]; then
11164
+ echo -e "${YELLOW}No Evidence Receipt found: no loki/receipt status set.${NC}"
11165
+ elif [ -z "$_pub_slug" ] || [ "$_pub_slug" = "$_pub_url" ]; then
11166
+ echo -e "${YELLOW}Could not resolve owner/repo: no loki/receipt status set.${NC}"
11167
+ else
11168
+ gh api "repos/${_pub_slug}/statuses/${_pub_sha}" \
11169
+ -f "state=${_pub_state}" -f "context=loki/receipt" \
11170
+ -f "description=Evidence Receipt verdict: ${_pub_verdict}" >/dev/null \
11171
+ || echo -e "${YELLOW}Warning: could not set the loki/receipt status.${NC}" >&2
11172
+ echo "loki/receipt status: ${_pub_state} (receipt ${_pub_verdict})"
11173
+ fi
11174
+ if [ -n "$_pub_url" ]; then
11175
+ echo "Repository: ${_pub_url}"
11176
+ else
11177
+ echo "Repository URL could not be determined."
11178
+ fi
11179
+ ;;
11180
+
11076
11181
  help|*)
11077
11182
  echo -e "${BOLD}loki github${NC} - GitHub integration management"
11078
11183
  echo ""
@@ -11081,6 +11186,7 @@ except: print(0)
11081
11186
  echo " sync Sync completed task status back to GitHub issues"
11082
11187
  echo " export Export local tasks as new GitHub issues"
11083
11188
  echo " pr [name] Create pull request from completed work"
11189
+ echo " publish [name] [--public] Push to GitHub and set a loki/receipt commit status"
11084
11190
  echo ""
11085
11191
  echo "Environment Variables:"
11086
11192
  echo " LOKI_GITHUB_IMPORT=true Import open issues as tasks on start"
@@ -150,6 +150,7 @@ _ml_help() {
150
150
  Loki Mode -- launch the MCP (Model Context Protocol) server
151
151
 
152
152
  Usage: loki mcp [--transport stdio|http] [--port N] [--help]
153
+ loki mcp install --client claude|cursor|vscode|windsurf [--project|--global] [--print]
153
154
 
154
155
  Starts the Loki Mode MCP server so MCP-aware clients (Claude Code, IDEs)
155
156
  can call Loki's tools (memory, task queue, code search, build management).
@@ -200,8 +201,164 @@ install command to stderr and exits 2.
200
201
  EOF
201
202
  }
202
203
 
204
+ # --- loki mcp install (TEN-ADOPTION-05) ------------------------------------
205
+ # Registers the loki-mode stdio server (`npx -y loki-mode mcp`) in an MCP
206
+ # client's config. The JSON merge keeps every other server and key, is a no-op
207
+ # (byte-identical, no .bak) when loki-mode is already registered with the same
208
+ # entry, writes <file>.bak before changing an existing file, and refuses to
209
+ # touch invalid JSON.
210
+
211
+ _ml_install_help() {
212
+ cat <<'EOF'
213
+ Usage: loki mcp install --client claude|cursor|vscode|windsurf [--project|--global] [--print]
214
+
215
+ Adds the loki-mode MCP server (npx -y loki-mode mcp) to a client's config.
216
+
217
+ claude runs `claude mcp add loki-mode -- npx -y loki-mode mcp` when the
218
+ claude CLI is on PATH, otherwise prints that command.
219
+ cursor .cursor/mcp.json (--project, default) or ~/.cursor/mcp.json (--global)
220
+ vscode .vscode/mcp.json (project only), under the "servers" key
221
+ windsurf ~/.codeium/windsurf/mcp_config.json (global only)
222
+
223
+ Options:
224
+ --project Write to the current project (claude: --scope project).
225
+ --global Write to the user config (claude: --scope user).
226
+ --print Print what would be written to stdout; write nothing.
227
+
228
+ Existing files are merged (other servers and keys are kept), backed up to
229
+ <file>.bak before a change, and left untouched if they are not valid JSON.
230
+ EOF
231
+ }
232
+
233
+ # _ml_json_merge <file> <topkey> <type|-> : merge the loki-mode entry into file.
234
+ # Exit codes: 0 ok (changed or already current), 3 invalid or unusable JSON.
235
+ _ml_json_merge() {
236
+ python3 - "$1" "$2" "$3" <<'PY'
237
+ import json, os, shutil, sys
238
+ path, top, typ = sys.argv[1], sys.argv[2], sys.argv[3]
239
+ entry = {"command": "npx", "args": ["-y", "loki-mode", "mcp"]}
240
+ if typ != "-":
241
+ entry = dict([("type", typ)] + list(entry.items()))
242
+ exists = os.path.exists(path)
243
+ data = {}
244
+ if exists:
245
+ try:
246
+ with open(path) as fh:
247
+ raw = fh.read()
248
+ data = json.loads(raw) if raw.strip() else {}
249
+ except (ValueError, OSError) as exc:
250
+ sys.stderr.write("Refusing to modify %s: not valid JSON (%s)\n" % (path, exc))
251
+ sys.exit(3)
252
+ if not isinstance(data, dict) or not isinstance(data.get(top, {}), dict):
253
+ sys.stderr.write("Refusing to modify %s: unexpected structure (need an object with an object '%s')\n" % (path, top))
254
+ sys.exit(3)
255
+ servers = data.setdefault(top, {})
256
+ if servers.get("loki-mode") == entry:
257
+ print("loki-mode already registered in %s" % path)
258
+ sys.exit(0)
259
+ servers["loki-mode"] = entry
260
+ if exists:
261
+ shutil.copy2(path, path + ".bak")
262
+ else:
263
+ os.makedirs(os.path.dirname(path) or ".", exist_ok=True)
264
+ with open(path, "w") as fh:
265
+ json.dump(data, fh, indent=2)
266
+ fh.write("\n")
267
+ print("Registered loki-mode in %s" % path)
268
+ PY
269
+ }
270
+
271
+ _ml_install_main() {
272
+ local client="" scope="" do_print=0
273
+ while [ $# -gt 0 ]; do
274
+ case "$1" in
275
+ --client) client="${2:-}"; shift 2 2>/dev/null || shift ;;
276
+ --client=*) client="${1#--client=}"; shift ;;
277
+ --project) scope="project"; shift ;;
278
+ --global) scope="global"; shift ;;
279
+ --print) do_print=1; shift ;;
280
+ --help|-h|help) _ml_install_help; return 0 ;;
281
+ *)
282
+ printf 'Unknown option for loki mcp install: %s\n' "$1" >&2
283
+ _ml_install_help >&2
284
+ return 2
285
+ ;;
286
+ esac
287
+ done
288
+ case "$client" in
289
+ claude|cursor|vscode|windsurf) ;;
290
+ *)
291
+ printf 'loki mcp install: --client must be one of claude, cursor, vscode, windsurf (got: %s)\n' "${client:-none}" >&2
292
+ return 2
293
+ ;;
294
+ esac
295
+
296
+ if [ "$client" = "claude" ]; then
297
+ local -a cmd=(claude mcp add)
298
+ case "$scope" in
299
+ project) cmd+=(--scope project) ;;
300
+ global) cmd+=(--scope user) ;;
301
+ esac
302
+ cmd+=(loki-mode -- npx -y loki-mode mcp)
303
+ if [ "$do_print" -eq 1 ] || ! command -v claude >/dev/null 2>&1; then
304
+ [ "$do_print" -eq 1 ] || printf 'claude CLI not found on PATH; run this command yourself:\n' >&2
305
+ printf '%s\n' "${cmd[*]}"
306
+ return 0
307
+ fi
308
+ "${cmd[@]}"
309
+ return $?
310
+ fi
311
+
312
+ local file top typ="-"
313
+ case "$client" in
314
+ cursor)
315
+ top="mcpServers"
316
+ if [ "$scope" = "global" ]; then file="$HOME/.cursor/mcp.json"; else file="$PWD/.cursor/mcp.json"; fi
317
+ ;;
318
+ vscode)
319
+ top="servers"; typ="stdio"
320
+ if [ "$scope" = "global" ]; then
321
+ printf 'loki mcp install: vscode supports --project only (workspace .vscode/mcp.json)\n' >&2
322
+ return 2
323
+ fi
324
+ file="$PWD/.vscode/mcp.json"
325
+ ;;
326
+ windsurf)
327
+ top="mcpServers"
328
+ if [ "$scope" = "project" ]; then
329
+ printf 'loki mcp install: windsurf supports --global only (~/.codeium/windsurf/mcp_config.json)\n' >&2
330
+ return 2
331
+ fi
332
+ file="$HOME/.codeium/windsurf/mcp_config.json"
333
+ ;;
334
+ esac
335
+
336
+ if ! command -v python3 >/dev/null 2>&1; then
337
+ printf 'loki mcp install needs python3 on PATH for the JSON merge.\n' >&2
338
+ return 2
339
+ fi
340
+ if [ "$do_print" -eq 1 ]; then
341
+ printf 'Would write to %s\n' "$file" >&2
342
+ python3 - "$top" "$typ" <<'PY'
343
+ import json, sys
344
+ top, typ = sys.argv[1], sys.argv[2]
345
+ entry = {"command": "npx", "args": ["-y", "loki-mode", "mcp"]}
346
+ if typ != "-":
347
+ entry = dict([("type", typ)] + list(entry.items()))
348
+ print(json.dumps({top: {"loki-mode": entry}}, indent=2))
349
+ PY
350
+ return 0
351
+ fi
352
+ _ml_json_merge "$file" "$top" "$typ"
353
+ }
354
+
203
355
  # mcp_launch_main: dispatcher invoked by cmd_mcp() (autonomy/loki) or directly.
204
356
  mcp_launch_main() {
357
+ if [ "${1:-}" = "install" ]; then
358
+ shift
359
+ _ml_install_main "$@"
360
+ return $?
361
+ fi
205
362
  # Split argv into launcher-owned flags (consumed here) and server argv
206
363
  # (forwarded verbatim to the file-exec launch `python "$root/mcp/server.py"`).
207
364
  # The server's argparse only
@@ -7,6 +7,6 @@ Modules:
7
7
  control: Session control helpers (status, atomic writes, origin check)
8
8
  """
9
9
 
10
- __version__ = "11.17.13"
10
+ __version__ = "11.17.16"
11
11
 
12
12
  __all__ = ["__version__"]
@@ -1,6 +1,6 @@
1
1
  # CLI reference
2
2
 
3
- Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.17.13. Do not edit by hand.
3
+ Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.17.16. Do not edit by hand.
4
4
  Hidden and legacy-only commands are omitted; see `docs/v10/CLI-MODERN.md` for the full inventory.
5
5
 
6
6
  | Command | Description |
@@ -110,6 +110,7 @@ Hidden and legacy-only commands are omitted; see `docs/v10/CLI-MODERN.md` for th
110
110
  | `loki config set` | Set a value |
111
111
  | `loki config get` | Get a value |
112
112
  | `loki mcp` | Launch the MCP server (stdio) |
113
+ | `loki mcp install` | Register loki-mode in an MCP client config |
113
114
  | `loki acp` | Run Loki as an ACP agent |
114
115
  | `loki stop` | Stop execution immediately |
115
116
  | `loki pause` | Pause after the current session |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Loki Mode, by [Autonomi](https://www.autonomi.dev/), turns a spec or an issue into a verified pull request with a receipt you can check. This page covers installing it, a first run, and the options around it.
4
4
 
5
- **Version:** v11.17.13
5
+ **Version:** v11.17.16
6
6
 
7
7
  **Engine note:** `loki start` is the primary command. `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick` all run the Loki 10 engine, whatever the flag order or input form (PRD file, issue ref, task or one-word brief). The previous loop runs only on `--engine legacy`, `LOKI_ENGINE=legacy`, or for one call when a flag Loki 10 cannot honor is present. See the [user guide](v10/GUIDE.md) and the [5-minute quickstart](QUICKSTART.md).
8
8
 
@@ -121,10 +121,10 @@ If any check fails, do not release; fix the root cause first.
121
121
 
122
122
  Stage files by name (never `git add -A` or `git add .`), commit with the
123
123
  repo-local `asklokesh` identity, no co-author. The merge-gate merges approved
124
- slices to main and main publishes to npm `next` (D96); for a manual push
125
- (`git push origin main`), wait for Tests and Security Audit to go green on that
126
- exact SHA before bumping VERSION and releasing. GitHub Actions then creates the tag, the GitHub Release, publishes
127
- npm, builds/pushes Docker, and updates the Homebrew tap. Do not manually
124
+ slices to main and a VERSION push publishes to npm under `latest` and `next` at once (D96, D102); the
125
+ `publish-npm` job needs only `pack-npm` and never waits on Tests, Security Audit, nightly or the backstop.
126
+ For a manual push (`git push origin main`), run `bash scripts/local-ci.sh` first. GitHub Actions publishes
127
+ npm, then creates the tag and GitHub Release, builds/pushes Docker (including `:latest`), and updates the Homebrew tap. Do not manually
128
128
  create tags.
129
129
 
130
130
  Before pushing the release commit, run `bash scripts/release.sh --check-clean` (E-151): it exits 1 naming any tracked file (for example a stamped `loki-ts/dist/loki.js.map`) the commit left modified; `--bump-only` prints the "stage these files:" list.
@@ -143,7 +143,7 @@ gh release view vX.Y.Z
143
143
  ### Train cycle: previous release must be on npm
144
144
  `scripts/train-cycle.sh` (phase C) refuses to cut release N+1 until the previous `release: vX` version is visible on npm (`npm_has_version`). While it is missing, the cycle logs `PREV_NOT_ON_NPM X` and returns 0 (waiting is not a failure). An unreachable registry fails closed and adds `reason=NPM_UNREACHABLE`. After `LOKI_TC_NPM_WAIT_MIN` minutes (default 45) since the previous release commit the log becomes `PREV_NOT_ON_NPM_STALE ... refusing release, needs a human`; the release stays refused either way.
145
145
 
146
- Operator action: wait for the Release workflow publish to land and for the D49 auto-promote to run. Never manually promote or move the `latest` dist-tag, and never unpublish. If the STALE line appears, investigate the failed or stuck publish run rather than bypassing the check.
146
+ Operator action: wait for the Release workflow publish-npm job to land (seconds after the push). `latest` and `next` are set together by that job (D102); do not move them by hand, and never unpublish (npm deprecate is allowed). If the STALE line appears, investigate the failed or stuck publish run rather than bypassing the check.
147
147
 
148
148
  ### Distribution Channel Checklist
149
149