loki-mode 11.128.2 → 11.130.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 (94) hide show
  1. package/README.md +1 -0
  2. package/SKILL.md +3 -3
  3. package/VERSION +1 -1
  4. package/autonomy/lib/help-core.sh +30 -42
  5. package/autonomy/lib/workspace.py +292 -19
  6. package/autonomy/lib/workspace_comment.py +40 -11
  7. package/autonomy/loki +129 -159
  8. package/autonomy/route.sh +3 -2
  9. package/autonomy/trigger-server.py +373 -32
  10. package/bin/loki +139 -18
  11. package/completions/_loki +11 -142
  12. package/completions/loki.bash +4 -2
  13. package/dashboard/__init__.py +1 -1
  14. package/docs/CLI-CORE-VERBS.md +61 -37
  15. package/docs/CLI-INVENTORY.md +152 -153
  16. package/docs/CLI-REFERENCE.md +20 -166
  17. package/docs/DEPLOYMENT.md +38 -3
  18. package/docs/INSTALLATION.md +7 -1
  19. package/docs/KNOWN-ISSUES.md +1 -1
  20. package/docs/PROOF-PASSPORT.md +21 -0
  21. package/docs/TESTING.md +1 -1
  22. package/docs/WORKSPACES.md +27 -0
  23. package/docs/cost-controls.md +74 -12
  24. package/docs/dev/architecture-reference.md +2 -2
  25. package/docs/environment-variables.md +7 -0
  26. package/docs/exit-codes.md +7 -0
  27. package/docs/merge-queue.md +44 -3
  28. package/docs/sentry-intake.md +1 -1
  29. package/docs/slack.md +1 -1
  30. package/docs/v10/GUIDE.md +33 -4
  31. package/loki-ts/dist/loki.js +1695 -1649
  32. package/mcp/__init__.py +1 -1
  33. package/memory/knowledge_graph.py +442 -56
  34. package/package.json +3 -3
  35. package/packages/control-plane/dist/server.js +2166 -1633
  36. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  37. package/schemas/loki-yaml.schema.json +1 -0
  38. package/web-app/dist/assets/{AdminPage-B-9a_urH.js → AdminPage-CNxvd-uy.js} +1 -1
  39. package/web-app/dist/assets/{Avatar-DWFQPBje.js → Avatar-DdLoiZKv.js} +1 -1
  40. package/web-app/dist/assets/{Badge-CuLYjGKc.js → Badge-DrdPaBOH.js} +1 -1
  41. package/web-app/dist/assets/{Button-Cws5TOeA.js → Button-BQ0UyQAk.js} +1 -1
  42. package/web-app/dist/assets/{CockpitPage-CCT1U0rq.js → CockpitPage-BLFBjBZW.js} +1 -1
  43. package/web-app/dist/assets/{ComparePage-ChcsGaeo.js → ComparePage-NHaUjY-d.js} +1 -1
  44. package/web-app/dist/assets/{ErrorBoundary-C5Mz6Y_d.js → ErrorBoundary-ClaDCylr.js} +1 -1
  45. package/web-app/dist/assets/{EvidenceReceiptPanel-jXRFyeG-.js → EvidenceReceiptPanel-BBW0IhXb.js} +1 -1
  46. package/web-app/dist/assets/{GitHubIssuesPanel-C_YjFJSB.js → GitHubIssuesPanel-B_dAtNuN.js} +1 -1
  47. package/web-app/dist/assets/{GitHubPRsPanel-B3bRY_lb.js → GitHubPRsPanel-Tv3JF9E0.js} +1 -1
  48. package/web-app/dist/assets/{HomePage-JLwBDYu8.js → HomePage-8fLInImK.js} +2 -2
  49. package/web-app/dist/assets/{LoginPage-BcDvWJr1.js → LoginPage-BGL-xm0l.js} +1 -1
  50. package/web-app/dist/assets/{MagicPage-Bj3qzygY.js → MagicPage-D7nHpNuT.js} +1 -1
  51. package/web-app/dist/assets/{MetricsPage-9k0NVtge.js → MetricsPage-BZh8ZOug.js} +1 -1
  52. package/web-app/dist/assets/{NotFoundPage-D81Z_SCM.js → NotFoundPage-DJ5YwC3-.js} +1 -1
  53. package/web-app/dist/assets/{ProjectPage-D9CkJI0B.js → ProjectPage-DYaGNgFt.js} +3 -3
  54. package/web-app/dist/assets/{ProjectsPage-vxSmYYzh.js → ProjectsPage-9GbGTW3g.js} +1 -1
  55. package/web-app/dist/assets/{SettingsPage-Cd2AS1Sg.js → SettingsPage-DdRI8LZ5.js} +1 -1
  56. package/web-app/dist/assets/{ShowcasePage-DOZCRLg5.js → ShowcasePage-ClEeMHAu.js} +1 -1
  57. package/web-app/dist/assets/{SystemSettingsPage-wl2UO5DF.js → SystemSettingsPage-rqj2byaP.js} +1 -1
  58. package/web-app/dist/assets/{TeamsPage-CA9FPLPm.js → TeamsPage-OaJ999dm.js} +1 -1
  59. package/web-app/dist/assets/{TemplatesPage-DLRTBM8i.js → TemplatesPage-CrqXt5pd.js} +1 -1
  60. package/web-app/dist/assets/{TerminalOutput-RqmPEs4o.js → TerminalOutput-DzOk3P-J.js} +1 -1
  61. package/web-app/dist/assets/{activity-CoyjHBZ4.js → activity-C3XPvqFU.js} +1 -1
  62. package/web-app/dist/assets/{bell-Dn2BCsQu.js → bell-BADR28Ic.js} +1 -1
  63. package/web-app/dist/assets/{bot-CNqPuD8h.js → bot-BOfl_osT.js} +1 -1
  64. package/web-app/dist/assets/{check-BWAwFpe2.js → check-DyeRhpqt.js} +1 -1
  65. package/web-app/dist/assets/{chevron-left-BgTjvxLB.js → chevron-left-DytHCita.js} +1 -1
  66. package/web-app/dist/assets/{circle-alert-CIYxFeDp.js → circle-alert-ej7tR0w9.js} +1 -1
  67. package/web-app/dist/assets/{clock-Dj6DRvL7.js → clock-CMmgiaJ3.js} +1 -1
  68. package/web-app/dist/assets/{cloud-DZBvW6-f.js → cloud-BmoOA5GK.js} +1 -1
  69. package/web-app/dist/assets/{code-xml-B0sAmzAO.js → code-xml-DjcElMOx.js} +1 -1
  70. package/web-app/dist/assets/{database-BkO44OAR.js → database-BxK55gai.js} +1 -1
  71. package/web-app/dist/assets/{dollar-sign-ChTZgVxB.js → dollar-sign-MxE9EOHB.js} +1 -1
  72. package/web-app/dist/assets/{file-code-corner-CQSIiG1T.js → file-code-corner-BYQ975Vf.js} +1 -1
  73. package/web-app/dist/assets/{file-plus-BAV2KC_M.js → file-plus-C0_fKf6I.js} +1 -1
  74. package/web-app/dist/assets/{globe-TUNeqVA9.js → globe-C7iJxA9K.js} +1 -1
  75. package/web-app/dist/assets/{hammer-CMD4wrup.js → hammer-CuVGrR3Z.js} +1 -1
  76. package/web-app/dist/assets/{index-B5lRV-ZJ.js → index-DvGbCL2t.js} +3 -3
  77. package/web-app/dist/assets/{layers-BxXkAn6j.js → layers-BWmxXnEV.js} +1 -1
  78. package/web-app/dist/assets/{loader-circle-CE46Yvcr.js → loader-circle-BrsqCmNy.js} +1 -1
  79. package/web-app/dist/assets/{lock-3uBPp5eV.js → lock-Dl3UsTMr.js} +1 -1
  80. package/web-app/dist/assets/{package-DjPZ3DLs.js → package-CCiRYdmb.js} +1 -1
  81. package/web-app/dist/assets/{plus-D8v6ZCYM.js → plus-d5BugnNw.js} +1 -1
  82. package/web-app/dist/assets/{refresh-cw-BSPJHBul.js → refresh-cw-DIkE6C0k.js} +1 -1
  83. package/web-app/dist/assets/{rotate-ccw-D0u6PH4j.js → rotate-ccw-DDhYD9MA.js} +1 -1
  84. package/web-app/dist/assets/{scroll-text-Dcwu9apa.js → scroll-text-jAoSqO2O.js} +1 -1
  85. package/web-app/dist/assets/{server-pd5YWyJw.js → server-D16MyCdB.js} +1 -1
  86. package/web-app/dist/assets/{shield-alert-C3TqM2Xm.js → shield-alert-C8W_Qcb5.js} +1 -1
  87. package/web-app/dist/assets/{thumbs-up-U1Wkm_Rg.js → thumbs-up-DdTbl2Vo.js} +1 -1
  88. package/web-app/dist/assets/{trash-2-BspH7NSu.js → trash-2-R-2Gvy6B.js} +1 -1
  89. package/web-app/dist/assets/{trending-down-DNg_ybr3.js → trending-down-Dk08-nlD.js} +1 -1
  90. package/web-app/dist/assets/{trending-up-CYzIu-lq.js → trending-up-DX8yONXb.js} +1 -1
  91. package/web-app/dist/assets/{upload-ChhyDeon.js → upload-6oDG_uiK.js} +1 -1
  92. package/web-app/dist/assets/{usePolling-ClMveR0q.js → usePolling-Co4817xB.js} +1 -1
  93. package/web-app/dist/assets/{user-BlFXAv0-.js → user-CjbWWW1W.js} +1 -1
  94. package/web-app/dist/index.html +1 -1
package/autonomy/loki CHANGED
@@ -1840,98 +1840,84 @@ show_help_all() {
1840
1840
  if [ ! -t 1 ]; then
1841
1841
  BOLD=''; NC=''
1842
1842
  fi
1843
+ # shellcheck source=/dev/null
1844
+ source "$_LOKI_SCRIPT_DIR/lib/help-core.sh"
1843
1845
  echo -e "${BOLD}Loki Mode v$version${NC}"
1844
1846
  echo ""
1845
- echo "Usage: loki <command> [options]"
1846
- echo ""
1847
- echo "New here? Try these in order:"
1848
- echo " loki setup One-step wizard: tools, provider login, model route, spend cap (--yes for defaults)"
1849
- echo " loki welcome Friendly first-run opener (what Loki is, next steps)"
1850
- echo " loki doctor Check your setup is ready (a few seconds)"
1851
- echo " loki quickstart Guided first build from your idea (no PRD needed)"
1852
- echo " loki start ./prd.md Build from a spec (PRD file, GitHub/GitLab/Jira/Azure issue, or no arg)"
1853
- echo " quickstart = guided first build; quick = one small task (Loki 10 engine, no PR)."
1854
- echo " loki \"<task>\", loki owner/repo#N and loki quick run on the Loki 10 engine by default."
1855
- echo " Docs: https://github.com/asklokesh/loki-mode | Report a problem: loki crash"
1856
- echo ""
1857
- # CLI consolidation (Phase A): the front page presents ~17 canonical
1858
- # workflow-oriented entries grouped by section. Deprecated alias names
1859
- # (stats, metrics, cost, trust-metrics, serve, open, otel, cp, wt, rc, ...)
1860
- # do NOT appear here; they live in the collapsed footer below and in
1861
- # `loki help aliases`. The full long-tail surface is still dispatchable and
1862
- # documented per-command via `loki <command> --help`.
1863
- #
1864
- # v7.39.0: trimmed three lower-traffic canonical entries off the front page
1865
- # to hold the lean target after `ultracode` (v7.38.0) joined Verify/trust:
1866
- # grill (pre-build spec interrogation, advanced), spec (living-spec drift,
1867
- # advanced), and cleanup (orphaned-process recovery, rare). They remain
1868
- # fully canonical (NOT aliases), dispatchable, and listed in the "More
1869
- # commands" footer below + documented via `loki <command> --help`.
1870
- echo "Commands:"
1871
- echo ""
1872
- echo "Build:"
1873
- echo " start [SPEC] Start a build (PRD file, GitHub/GitLab/Jira/Azure issue, or no arg)"
1874
- echo " plan <PRD-file> Dry-run analysis: complexity, cost, execution plan"
1875
- echo " backlog <owner/repo> --all|--label X|--issues N,N Run every matching open issue, N in parallel"
1876
- echo " workspace list | infer <name> | run <name> <ref> Multi-repo runs from loki.yaml workspaces (LOKI_WORKSPACES=0 disables)"
1877
- echo " start --workspace <name> \"<brief>\" Run a workspace; start --deploy [--health-url U] deploys after a VERIFIED run"
1878
- echo " quickstart [idea] Guided first build: setup, idea, template, plan, go"
1879
- echo " try <repo-url> Try Loki on a public repo in a temp clone (--dry-run previews); only the receipt is kept"
1880
- echo ""
1881
- echo "Session:"
1882
- echo " status [--json|--badge|--probe] Show current status (--json machine-readable, --badge deploy badge, --probe re-check deploy health)"
1883
- echo " next Run the right next step for you (resume / ship / why)"
1884
- echo " stop Stop execution immediately"
1885
- echo " pause Pause after current session"
1886
- echo " resume Resume a paused or interrupted run (after Ctrl-C or a crash)"
1887
- echo " cancel Cancel the active Loki 10 run at its next stage boundary"
1888
- echo " steer \"<note>\" Nudge a running build (Loki 10 engine; legacy loop needs LOKI_PROMPT_INJECTION=true)"
1847
+ # The 11 core commands, then the hidden ones, then the renamed ones. The two
1848
+ # lists below are the HIDE and FOLD classes of loki-ts/src/cli/registry.ts;
1849
+ # tests/min/cli-entrypoints.sh fails when they drift from it.
1850
+ help_core_commands
1889
1851
  echo ""
1890
- echo "Verify / trust:"
1891
- echo " verify [base] [--fast] Deterministic PR verification (CI-gate exit codes; --fast: no model, no network)"
1892
- echo " verify-pr <pr> Verify a PR against its linked issue; 'verify-pr respond <pr>' fixes review comments"
1893
- echo " keys export Print the public receipt-signing key (JWK) for third-party verify --pubkey"
1894
- echo " review [opts] Standalone code review with quality gates"
1895
- echo " ultracode \"task\" Run a task as a native Claude Code Dynamic Workflow (opt-in, Claude-only)"
1896
- echo " trust [cmd] Visible trust trajectory; 'trust detail' for metrics"
1897
- echo " undo <run> [--plan|--dry-run] Plan or apply (LOKI_UNDO=1) an undo of a run; verifies the receipt"
1898
- echo " undo --list List recent runs with verdict, files changed and age"
1852
+ echo "Integration and maintenance (hidden from the front page; they keep working):"
1853
+ echo " stats memory backup restore kpis report crash contract slack engine10 review mcp acp github"
1854
+ echo " ci modernize self-update secrets sandbox docker web syslog test bench compliance enterprise"
1855
+ echo " audit metrics magic workspace agents trigger merge heal"
1899
1856
  echo ""
1900
- echo "Observe:"
1901
- echo " dashboard [cmd] Operations UI server (start|stop|status|url|open)"
1902
- echo " mcp Launch the MCP server (Model Context Protocol, stdio)"
1903
- echo " acp Run Loki as an ACP agent over stdio (VS Code, JetBrains, Zed)"
1904
- echo ""
1905
- echo "Report:"
1906
- echo " report [cmd] Reporting: session|metrics|cost|export|share|dogfood|release-notes"
1907
- echo ""
1908
- echo "Knowledge:"
1909
- echo " analyze [cmd] Codebase intelligence: explain|onboard|code|context"
1910
- echo " memory [cmd] Cross-project learnings (list|show|search|stats|compound)"
1911
- echo ""
1912
- echo "Modernize:"
1913
- echo " modernize [cmd] Legacy modernization: heal|migrate"
1914
- echo ""
1915
- echo "Config:"
1916
- echo " config [cmd] Manage configuration (show|init|edit|path|set|get)"
1917
- echo " doctor [--json] [--quiet] Check system prerequisites and skill symlinks"
1918
- echo ""
1919
- echo " version [--json] Show version (--json for machine-readable)"
1920
- echo " help Show this help ('loki help aliases' for old names)"
1921
- echo ""
1922
- echo "More commands (the most useful; many more are dispatchable):"
1923
- echo " Advanced: ship, deploy, init, web"
1924
- echo " Cloud + CI: github, import, ci"
1925
- echo " Debugging: logs, crash, cleanup"
1926
- echo "...run 'loki help <name>' for any command."
1927
- echo ""
1928
- echo "Aliases (deprecated): older command names still work; they print a"
1929
- echo "one-line pointer to stderr and never alter --json output. See the full"
1930
- echo "list with 'loki help aliases'."
1857
+ echo "Renamed (the old name keeps working unchanged; some targets arrive in later releases,"
1858
+ echo "and until each one lands the old name is the way to do it):"
1859
+ echo " provider -> loki config set provider NAME"
1860
+ echo " rollback -> loki undo <run>"
1861
+ echo " wiki -> loki chat"
1862
+ echo " runs -> loki status"
1863
+ echo " intent -> loki status <run>"
1864
+ echo " trust -> loki status --json"
1865
+ echo " queue -> loki start owner/repo#1 owner/repo#2"
1866
+ echo " issues -> loki start owner/repo --label L --limit N --parallel K"
1867
+ echo " verify-pr -> loki verify <PR url>"
1868
+ echo " answer -> loki start --answer \"<text>\""
1869
+ echo " edit -> loki \"<change>\" --no-pr"
1870
+ echo " diff -> loki status <run>"
1871
+ echo " models -> loki config list"
1872
+ echo " setup -> loki doctor --fix"
1873
+ echo " quick -> loki \"<task>\" --no-pr"
1874
+ echo " quickstart -> loki \"<idea>\" in an empty folder"
1875
+ echo " keys -> loki receipt key"
1876
+ echo " dashboard -> loki control serve"
1877
+ echo " pause -> loki stop --graceful"
1878
+ echo " resume -> loki start"
1879
+ echo " cancel -> loki stop --graceful"
1880
+ echo " why -> loki status"
1881
+ echo " next -> loki status"
1882
+ echo " logs -> loki status"
1883
+ echo " share -> loki receipt share"
1884
+ echo " export -> loki verify <run> --sarif"
1885
+ echo " notify -> loki status"
1886
+ echo " tour -> loki start outside a repo"
1887
+ echo " wow -> loki start outside a repo"
1888
+ echo " factory -> loki start -v"
1889
+ echo " welcome -> loki doctor"
1890
+ echo " onboard -> loki chat"
1891
+ echo " setup-skill -> loki doctor --fix"
1892
+ echo " cockpit -> loki control serve"
1893
+ echo " api -> loki control serve"
1894
+ echo " preview -> loki deploy"
1895
+ echo " telemetry -> loki config set telemetry off"
1896
+ echo " explain -> loki chat"
1897
+ echo " docs -> loki help"
1898
+ echo " own -> loki chat"
1899
+ echo " projects -> loki control serve"
1900
+ echo " cost -> loki start --dry-run"
1901
+ echo " sentrux -> loki start"
1902
+ echo " estimate -> loki start <PRD> --dry-run"
1903
+ echo " plan -> loki start <PRD> --dry-run"
1904
+ echo " grill -> loki start <PRD> --dry-run"
1905
+ echo " spec -> loki start <PRD> --dry-run"
1906
+ echo " backlog -> loki start owner/repo --label L --parallel K"
1907
+ echo " state -> loki start \"<goal>\""
1908
+ echo " agent -> loki start \"<goal>\""
1909
+ echo " failover -> loki start \"<goal>\""
1910
+ echo " migrate -> loki \"modernize <what> to <target>\""
1911
+ echo " steer -> loki chat --attach"
1912
+ echo " checkpoint -> loki undo"
1913
+ echo " analyze -> loki start \"<goal>\""
1914
+ echo " demo -> loki start outside a repo"
1915
+ echo " run -> loki start"
1916
+ echo " serve -> loki control serve"
1931
1917
  echo ""
1932
1918
  echo "Options for 'start':"
1933
1919
  echo " --provider NAME AI provider: claude (default) or opencode"
1934
- echo " (model route: set LOKI_MODEL_ROUTE, e.g. ollama/qwen3-coder; there is no --model flag)"
1920
+ echo " --model ID Model tier or id (small, opus, ollama/qwen3-coder, openrouter/<id>); a route can also be set with LOKI_MODEL_ROUTE"
1935
1921
  echo " --simple Force simple complexity tier (3 phases)"
1936
1922
  echo " --complex Force complex complexity tier (8 phases)"
1937
1923
  echo " --no-dashboard Disable web dashboard"
@@ -1955,29 +1941,12 @@ show_help_all() {
1955
1941
  echo ""
1956
1942
  echo "Examples:"
1957
1943
  echo ""
1958
- echo " # Starting a session"
1959
- echo " loki start ./prd.md # Start with PRD file"
1960
- echo " loki start owner/repo#123 # GitHub issue (auto-fetches)"
1961
- echo " loki start PROJ-456 # Jira issue"
1962
- echo " loki quick \"add dark mode\" # Single-task mode (Loki 10 engine)"
1963
- echo " loki tour # See a real sample result (no provider, no key, no spend)"
1964
- echo " loki tour --live # Same as loki wow: a tiny real task when a provider is ready"
1965
- echo " loki wow # Live mini-task, or the offline sample when no key is available"
1966
- echo " loki factory \"<task>\" # loki start, and print the autonomy policy"
1967
- echo " loki demo # Build a sample todo app end to end"
1968
- echo " loki init -t saas-starter # Scaffold from template"
1969
- echo " loki template install <src> # Install a community PRD template"
1970
- echo ""
1971
- echo " # Session ops + observability"
1972
- echo " loki status [--json] # Current status"
1973
- echo " loki report session --efficiency # Token + cost stats"
1974
- echo " loki report kpis [--json] # Accuracy + efficiency KPI snapshot"
1975
- echo " loki report kpis --since 7d # Window KPI totals (Nd or YYYY-MM-DD)"
1976
- echo " loki doctor [--json] # System prereq + skill symlinks"
1977
- echo " loki logs # Tail recent log output"
1978
- echo " loki report export json|markdown|csv|timeline # Export session"
1979
- echo " loki assets export team.tgz # Export shareable team assets (redacted)"
1980
- echo " loki cleanup # Kill orphaned processes"
1944
+ echo " loki start ./prd.md # Build from a PRD file"
1945
+ echo " loki start owner/repo#123 # Build from a GitHub issue"
1946
+ echo " loki start ./prd.md --dry-run # Quote complexity and cost, change nothing"
1947
+ echo " loki status --json # What is running, as JSON"
1948
+ echo " loki verify --json # Machine-readable verification for CI"
1949
+ echo " loki doctor --fix # Check setup and repair what it can"
1981
1950
  echo ""
1982
1951
  echo " # Providers + model routing"
1983
1952
  echo " loki provider list # Show available providers, including opencode"
@@ -1996,50 +1965,6 @@ show_help_all() {
1996
1965
  echo " # only the OpenAI-shaped /v1/chat/completions. Use the opencode"
1997
1966
  echo " # route above for OpenRouter."
1998
1967
  echo ""
1999
- echo " # Cross-project context (Phase F)"
2000
- echo " # Drop .loki/app.json with {schema_version:1,app_id:myapp,members:[ui,api]}"
2001
- echo " # at the parent of related repos for shared CLAUDE.md + memory."
2002
- echo ""
2003
- echo " # Memory + learnings"
2004
- echo " loki memory list # All learnings"
2005
- echo " loki memory search <query> # Search across learnings"
2006
- echo " loki memory consolidate # Run episodic-to-semantic pipeline"
2007
- echo " loki memory learn --recent N # Learn from the newest N merged PRs"
2008
- echo ""
2009
- echo " # Config + dashboard"
2010
- echo " loki config set maxTier sonnet # Cap model cost"
2011
- echo " loki dashboard start # Open the Control Plane UI"
2012
- echo " loki watch # Auto-rerun on PRD changes"
2013
- echo " loki cockpit # Live multi-repo cockpit (terminal image)"
2014
- echo " loki remote # Remote session (phone/browser)"
2015
- echo ""
2016
- # COMPLETE COMMAND INDEX. The curated sections above stay curated -- they
2017
- # are the onboarding path and stuffing 112 commands into them would make
2018
- # the first screen useless. But a command that appears NOWHERE in help does
2019
- # not exist to a user: measured, 43 of 112 were unreachable from here,
2020
- # including `loki proof` -- the Evidence Receipt, which is the whole trust
2021
- # argument. Discoverability is an adoption lever, not tidiness.
2022
- #
2023
- # tests/test-help-discoverability.sh fails the build when a real command is
2024
- # missing from this list, so a new command cannot ship invisible.
2025
- echo ""
2026
- echo "All commands:"
2027
- echo " agents chat diff edit models route"
2028
- echo " acp agent analyze api assets audit backlog backup bench cancel checkpoint (cp) ci cleanup"
2029
- echo " cluster cockpit code compliance completions compound config context (ctx)"
2030
- echo " cost council crash dashboard demo deploy docker docs doctor dogfood"
2031
- echo " enterprise estimate explain export factory failover github grill heal help"
2032
- echo " import init intent"
2033
- echo " issue keys kpis logs magic mcp memory metrics migrate modernize monitor"
2034
- echo " next notify onboard open optimize otel outcomes own (handoff) pause plan preview"
2035
- echo " projects proof (receipt) provider quick quickstart rc remote report reset"
2036
- echo " merge restore resume review rollback run runs sandbox secrets secure self-update sentrux"
2037
- echo " serve setup setup-skill share ship spec start state stats status steer stop"
2038
- echo " syslog telemetry template test tour trigger trust trust-metrics try"
2039
- echo " ultracode undo update verify version voice watch watchdog web welcome why"
2040
- echo " wiki workspace worktree (wt) wow"
2041
- echo " control"
2042
- echo ""
2043
1968
  echo "Any command: loki <command> --help"
2044
1969
  echo ""
2045
1970
  echo "Phase A-J features are default-on. See CHANGELOG."
@@ -21406,6 +21331,14 @@ print(json.loads(p.read_text()).get('port', 7373) if p.exists() else 7373)
21406
21331
  else
21407
21332
  echo "Schedules configured: 0"
21408
21333
  fi
21334
+ python3 "$trigger_server_script" --health
21335
+ ;;
21336
+ resume)
21337
+ if [[ -z "${1:-}" ]]; then
21338
+ echo "Usage: loki trigger resume <source>" >&2
21339
+ return 1
21340
+ fi
21341
+ python3 "$trigger_server_script" --resume "$1"
21409
21342
  ;;
21410
21343
  list)
21411
21344
  python3 "$trigger_schedule_script" list
@@ -21550,6 +21483,7 @@ for line in sys.stdin:
21550
21483
  echo " Start the webhook receiver server (default port: 7373)"
21551
21484
  echo " stop Stop the webhook receiver server"
21552
21485
  echo " status Show server and schedule status"
21486
+ echo " resume <source> Resume a source that auto-paused (also clears its failure count)"
21553
21487
  echo " list List configured schedules"
21554
21488
  echo " add schedule <name> <cron_expr> <action> [args...]"
21555
21489
  echo " Add a cron-based schedule trigger"
@@ -21561,9 +21495,14 @@ for line in sys.stdin:
21561
21495
  echo " help Show this help"
21562
21496
  echo ""
21563
21497
  echo "Webhook events handled:"
21564
- echo " issues (opened) -> loki run <issue_number> --pr --detach"
21565
- echo " pull_request (sync) -> loki run <pr_number> --detach"
21566
- echo " workflow_run (failure) -> loki run --detach"
21498
+ echo " issues opened -> loki start o/r#N --pr"
21499
+ echo " pull_request synchronize -> loki start o/r#N"
21500
+ echo " workflow_run failure on default branch -> loki start --brief <CI brief> --pr"
21501
+ echo " pull_request_review changes_requested -> loki verify-pr respond o/r#N"
21502
+ echo " /sentry, /slack, /linear, /jira, /teams -> PR-only or job runs"
21503
+ echo ""
21504
+ echo "Auto-pause: LOKI_TRIGGER_PAUSE_AFTER=N consecutive failed runs pause a source"
21505
+ echo "(default 3, 0 disables). 'loki trigger status' shows each source's health."
21567
21506
  echo ""
21568
21507
  echo "Schedule cron format: minute hour day-of-month month day-of-week"
21569
21508
  echo " Examples:"
@@ -24261,6 +24200,10 @@ cmd_ultracode() {
24261
24200
 
24262
24201
  # Standalone code review - diff-based quality gates (v6.20.0)
24263
24202
  cmd_review() {
24203
+ if [ "${1:-}" = "queue" ]; then
24204
+ echo "loki review queue needs the Bun runtime; unset LOKI_LEGACY_BASH" >&2
24205
+ return 2
24206
+ fi
24264
24207
  local review_staged=false
24265
24208
  local review_pr=""
24266
24209
  local review_since=""
@@ -26954,6 +26897,8 @@ except Exception as e:
26954
26897
  echo " loki memory crossproject --for 'build api'"
26955
26898
  echo " loki memory graph --export graph.json"
26956
26899
  echo " loki memory graph rebuild"
26900
+ echo " loki memory graph ingest [<path>...]"
26901
+ echo " loki memory graph ask \"who owns billing\" [--repo <dir>]"
26957
26902
  echo " loki memory enable-hook"
26958
26903
  echo " loki memory disable-hook"
26959
26904
  echo ""
@@ -27113,6 +27058,14 @@ except Exception as e:
27113
27058
  # semantic/*.json across discovered projects and persists them
27114
27059
  # to the org knowledge graph -- the population path that makes
27115
27060
  # crossproject + load_memory_context augmentation non-inert.
27061
+ # FR06: `ingest [<path>...]` reads services, CODEOWNERS and decision docs from repos into the
27062
+ # org graph (~/.loki/knowledge/graph.json); `ask "<question>"` prints the cited facts.
27063
+ if [ "${1:-}" = "ingest" ] || [ "${1:-}" = "ask" ]; then
27064
+ local _kg_args=("$@")
27065
+ if [ "${_kg_args[0]}" = "ingest" ] && [ "${#_kg_args[@]}" -eq 1 ]; then _kg_args+=("."); fi
27066
+ PYTHONPATH="${SKILL_DIR:-$(pwd)}" python3 "${SKILL_DIR:-$(pwd)}/memory/knowledge_graph.py" "${_kg_args[@]}"
27067
+ return $?
27068
+ fi
27116
27069
  if [ "${1:-}" = "rebuild" ]; then
27117
27070
  shift
27118
27071
  PYTHONPATH="${SKILL_DIR:-$(pwd)}" python3 -c "
@@ -27153,7 +27106,7 @@ except Exception as e:
27153
27106
  while [ $# -gt 0 ]; do
27154
27107
  case "$1" in
27155
27108
  --export) _graph_export="${2:-}"; if [ $# -ge 2 ]; then shift 2; else shift; fi ;;
27156
- -h|--help) echo "Usage: loki memory graph [--export <path>] | loki memory graph rebuild"; return 0 ;;
27109
+ -h|--help) echo "Usage: loki memory graph [--export <path>] | loki memory graph rebuild | loki memory graph ingest [<path>...] | loki memory graph ask \"<question>\" [--repo <dir>]"; return 0 ;;
27157
27110
  *) shift ;;
27158
27111
  esac
27159
27112
  done
@@ -28062,8 +28015,9 @@ EOF_RENAMES
28062
28015
  # Shared merge gate. One PR (number or branch) merges only when it is not a
28063
28016
  # draft, `gh pr checks` exits 0 after polling pending (rc=8), and, with
28064
28017
  # --require-verified, every clean proof recorded for the PR's head commit
28065
- # (facts.git.head_sha == headRefOid, dirty-tree proofs ignored) says VERIFIED; a stale or missing proof
28066
- # refuses ("gate: head"). The merge passes --match-head-commit so a push after
28018
+ # (facts.git.head_sha == headRefOid, dirty-tree proofs ignored) says VERIFIED, or, for a Loki 10 run
28019
+ # with no legacy proof, a .loki/runs receipt whose head_sha is the PR head passes `loki verify <run>`;
28020
+ # a stale or missing proof refuses ("gate: head"). The merge passes --match-head-commit so a push after
28067
28021
  # the gate cannot land unjudged. On refusal it prints the exact blocking gate
28068
28022
  # ("gate: draft|head|verdict|trust|checks") and leaves the PR open.
28069
28023
  # Usage: _merge_pr_gated <pr> [--require-verified] [--delete-branch]
@@ -28121,6 +28075,22 @@ _merge_pr_gated() {
28121
28075
  [ -n "$hl" ] || hl="UNREADABLE"
28122
28076
  if [ -z "$headline" ]; then headline="$hl"; elif [ "$headline" != "$hl" ]; then disagree=true; fi
28123
28077
  done
28078
+ # Loki 10 (`loki start`) records no .loki/proofs: with no legacy proof for this head,
28079
+ # judge the sealed run receipts in .loki/runs. A receipt counts only when its head_sha
28080
+ # is the PR head and `loki verify <run>` agrees (rc 0 VERIFIED; rc 4 is a run outcome
28081
+ # that is not VERIFIED; anything else is not verified). Legacy proof acceptance above is unchanged.
28082
+ if [ -z "$headline" ] && ! $disagree; then
28083
+ local rf="" rid="" vrc=0 rhl=""
28084
+ for rf in .loki/runs/*/receipt.json; do
28085
+ [ -f "$rf" ] || continue
28086
+ [ "$(jq -r '.head_sha // empty' "$rf" 2>/dev/null)" = "$head" ] || continue
28087
+ [ "$(jq -r '.schema // empty' "$rf" 2>/dev/null)" = "loki.v10.receipt/1" ] || continue
28088
+ rid="$(basename "$(dirname "$rf")")"
28089
+ vrc=0; "$_LOKI_SCRIPT_DIR/../bin/loki" verify "$rid" >/dev/null 2>&1 || vrc=$?
28090
+ if [ "$vrc" = "0" ]; then rhl="VERIFIED"; else rhl="NOT VERIFIED (loki verify rc $vrc)"; fi
28091
+ if [ -z "$headline" ]; then headline="$rhl"; elif [ "$headline" != "$rhl" ]; then disagree=true; fi
28092
+ done
28093
+ fi
28124
28094
  if $disagree; then
28125
28095
  echo "$pr: not merged, gate: verdict (proofs for PR head ${head:0:12} disagree); PR left open" >&2
28126
28096
  _pr_record_merge "$pr" "blocked:verdict" "verdict"
@@ -28254,7 +28224,7 @@ cmd_merge() {
28254
28224
  echo " watch <pr> Wait for checks; on red run up to LOKI_PR_REPAIR_MAX (2) bounded"
28255
28225
  echo " repair sessions on the PR branch, push, re-check, merge when green."
28256
28226
  echo " pr <pr|branch> Merge one PR through the same gate (not draft, checks green;"
28257
- echo " --require-verified also needs a VERIFIED run verdict)."
28227
+ echo " --require-verified also needs a VERIFIED run: a legacy proof, or a Loki 10 receipt in .loki/runs, for the PR head)."
28258
28228
  echo " add <pr>... Queue pull requests"
28259
28229
  echo " list Show the queue"
28260
28230
  echo " run [--dry-run] Merge one at a time, only when checks are green;"
package/autonomy/route.sh CHANGED
@@ -19,7 +19,7 @@ _ROUTE_OPTVAL_FLAGS=" --mirofish "
19
19
  # engine rather than configure it: the route still resolves (R_FRONT=1) but the dispatcher leaves the call to the front end.
20
20
  _ROUTE_FRONT_FLAGS=" --workspace --deploy --health-url --health-match --auto-rollback --destination --canary --domain "
21
21
  # Flags engine10 honors as-is.
22
- _ROUTE_E10_FLAGS=" --no-pr --deep --json --verbose --quiet --resume --provider --max-cost --spec --attempts --seal-existing "
22
+ _ROUTE_E10_FLAGS=" --no-pr --deep --json --verbose --quiet --resume --provider --max-cost --spec --attempts --seal-existing --detach -d "
23
23
  # The largest PRD engine10 takes: it carries the task in env vars and CLI arguments (with a context pack added under
24
24
  # --session-model), and Linux caps one string at 128 KiB. A bigger PRD runs on the legacy engine, or is refused under
25
25
  # SDK mode with claude (the legacy engine has no SDK path).
@@ -35,7 +35,6 @@ _route_refusal_hint() {
35
35
  case "$1" in
36
36
  --ship) echo "engine10 opens the PR itself and does not auto-merge; merge it with 'loki merge-queue', or pass --engine legacy to keep --ship" ;;
37
37
  --worktree|-w) echo "engine10 runs each attempt in its own isolated worktree already; drop the flag, or pass --engine legacy for a git-worktree run" ;;
38
- --detach|-d) echo "run it in the background yourself ('nohup loki start ... &') or queue it with 'loki queue run', or pass --engine legacy for --detach" ;;
39
38
  --parallel) echo "use 'loki queue run --parallel K' or 'loki issues run --parallel K' for parallel runs, or pass --engine legacy for --parallel" ;;
40
39
  --issue) echo "give the issue as the task instead: loki start owner/repo#N (or the issue URL)" ;;
41
40
  *) echo "drop it, or pass --engine legacy to run the legacy loop with it" ;;
@@ -503,6 +502,8 @@ loki_route_dispatch() {
503
502
  loki_route_resolve bare "$@"; verb=bare ;;
504
503
  esac
505
504
  fi
505
+ # FR01: a pasted PR URL is a goal too; `loki <PR URL>` is `loki start <PR URL>` (verify-pr: sandboxed, no model call)
506
+ if [ "$R_DECIDED" != "1" ] && [ -n "$(_route_pr_url "$first")" ]; then loki_route_resolve start "$@"; verb=bare; fi
506
507
  ;;
507
508
  esac
508
509
  if [ "$R_DECIDED" != "1" ]; then _route_task_first "$verb" "$@"; return 0; fi