loki-mode 11.2.2 → 11.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -650
- package/SKILL.md +4 -4
- package/VERSION +1 -1
- package/autonomy/completion-council.sh +2 -2
- package/autonomy/context-tracker.py +4 -4
- package/autonomy/council-v2.sh +1 -1
- package/autonomy/grill.sh +1 -1
- package/autonomy/lib/done-recognition.sh +1 -1
- package/autonomy/lib/prd-enrich.sh +1 -1
- package/autonomy/lib/skill-link-heal.sh +78 -1
- package/autonomy/lib/voter-agents.sh +1 -1
- package/autonomy/loki +99 -75
- package/autonomy/run.sh +30 -18
- package/autonomy/sandbox.sh +1 -1
- package/autonomy/tui.sh +6 -5
- package/autonomy/verify.sh +1 -1
- package/bin/loki +166 -59
- package/completions/_loki +2 -0
- package/completions/loki.bash +2 -2
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +25 -31
- package/docs/ARCHITECTURE.md +337 -0
- package/docs/BRANDING.md +124 -0
- package/docs/CLI-REFERENCE.md +7 -1
- package/docs/COMPONENTS.md +447 -0
- package/docs/DEPLOYMENT.md +9 -9
- package/docs/DOCKER.md +469 -0
- package/docs/INSTALLATION.md +67 -1045
- package/docs/KNOWN-ISSUES.md +11 -35
- package/docs/TESTING.md +161 -0
- package/docs/air-gapped.md +1 -2
- package/docs/alternative-installations.md +14 -24
- package/docs/architecture/DECISIONS.md +333 -0
- package/docs/audit-logging.md +7 -7
- package/docs/authentication.md +3 -3
- package/docs/authorization.md +1 -1
- package/docs/certification/04-production-deployment/lab.md +6 -6
- package/docs/certification/04-production-deployment/lesson.md +4 -4
- package/docs/certification/README.md +1 -1
- package/docs/control-plane-container.md +2 -2
- package/docs/dev/real-run.md +34 -0
- package/docs/dev/release-checklist.md +2 -2
- package/docs/exit-codes.md +3 -3
- package/docs/git-workflow.md +3 -3
- package/docs/metrics.md +37 -55
- package/docs/network-security.md +1 -1
- package/docs/siem-integration.md +5 -5
- package/docs/v10/CLI-MODERN.md +4 -3
- package/docs/v10/DECISIONS.md +44 -0
- package/docs/v10/DEPS.md +22 -22
- package/docs/v10/ENGINE.md +1 -1
- package/docs/v10/FAILURE-CLASSES.md +129 -1
- package/docs/v10/FOUNDER-QUEUE.md +1 -0
- package/docs/v10/GUARDS.md +13 -0
- package/docs/v10/LEGACY-REMOVAL.md +4 -6
- package/docs/v10/METRICS.md +2 -2
- package/docs/v10/MODERNIZE.md +1 -1
- package/docs/v10/OPERATING-MODEL.md +2 -1
- package/docs/v10/PROGRESS.md +29 -0
- package/docs/v11/COST-HALF.md +352 -0
- package/docs/v11/MARKET-SLICES.md +315 -0
- package/docs/v11/REGISTRIES.md +730 -0
- package/loki-ts/data/model-pricing.json +52 -24
- package/loki-ts/dist/loki.js +1036 -957
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/packages/control-plane/dist/server.js +2467 -736
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/src/protocols/mcp-client.js +6 -2
- package/src/protocols/mcp-server.js +13 -3
- package/tools/audit-docs.py +1 -1
- package/web-app/dist/assets/{AdminPage-C-iMLNxe.js → AdminPage-CMkHNJbF.js} +1 -1
- package/web-app/dist/assets/{Avatar-C7VUvwsO.js → Avatar-BJyjV7Zi.js} +1 -1
- package/web-app/dist/assets/{Badge-tGvQEhnw.js → Badge-D572l0uq.js} +1 -1
- package/web-app/dist/assets/{Button-_iHlH_yL.js → Button-T4BnOZgl.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-J_nNjbcR.js → CockpitPage-Cj_GFsNn.js} +1 -1
- package/web-app/dist/assets/{ComparePage-B05ui6Xt.js → ComparePage-A8m4ZXak.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-Bxex6DLn.js → ErrorBoundary-hugCg5yg.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-BsgWfdD1.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-DZBhZ8_X.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BaxlAl6R.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
- package/web-app/dist/assets/{HomePage-mVJvzqbF.js → HomePage-A1MIkG2P.js} +2 -2
- package/web-app/dist/assets/{LoginPage-B0zd4A_G.js → LoginPage-8KQMRhtR.js} +1 -1
- package/web-app/dist/assets/{MagicPage-DXLQ-y_R.js → MagicPage-C05QW2Lx.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-CLS34Xvr.js → MetricsPage-Oukv5hme.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BXG8PbNV.js → NotFoundPage-DKIwsawz.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-D3kFFC0F.js → ProjectPage-DwFRPLCG.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-2bFn-gnC.js → ProjectsPage-CgY4YYDX.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-CBM0ziWE.js → SettingsPage-BpfcSjUA.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-BTaXhjI3.js → ShowcasePage-BqBakC4K.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-BrC2hyAr.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-oqxdbVbY.js → TeamsPage-D55S1jKz.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CEbUIY21.js → TemplatesPage-D3SydvxN.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-aIoWLbJA.js → TerminalOutput-hNg8G1-e.js} +1 -1
- package/web-app/dist/assets/{activity-CPyi45gt.js → activity-D2C0VagO.js} +1 -1
- package/web-app/dist/assets/{bell-BhaNBaJp.js → bell-CMvYi36w.js} +1 -1
- package/web-app/dist/assets/{bot-Da8REaEP.js → bot-BvtQ6lmo.js} +1 -1
- package/web-app/dist/assets/{check-DPj99ArM.js → check-B13xkXed.js} +1 -1
- package/web-app/dist/assets/{chevron-left-CkxonN0X.js → chevron-left-emu6r49E.js} +1 -1
- package/web-app/dist/assets/{circle-alert-C0JkB1y5.js → circle-alert-CExlwjuy.js} +1 -1
- package/web-app/dist/assets/{clock-COzFIiWi.js → clock-D7Uas3oL.js} +1 -1
- package/web-app/dist/assets/{cloud-bjkac4kn.js → cloud-CkB4S86C.js} +1 -1
- package/web-app/dist/assets/{code-xml-hlKlvXUJ.js → code-xml-SL9IIWIn.js} +1 -1
- package/web-app/dist/assets/{database-D555S5Km.js → database-BQFkd7t1.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-CVcApzcD.js → dollar-sign-qHmnNYsU.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-UORaMIcO.js → file-code-corner-C2YUDP0K.js} +1 -1
- package/web-app/dist/assets/{file-plus-ALJtDoI2.js → file-plus-C_ooIkDe.js} +1 -1
- package/web-app/dist/assets/{globe-CPlrM_IC.js → globe-CQ-GL485.js} +1 -1
- package/web-app/dist/assets/{hammer-qaGZHpja.js → hammer-U05L_D7V.js} +1 -1
- package/web-app/dist/assets/{index-BcXljIAO.js → index-CooHd7I-.js} +3 -3
- package/web-app/dist/assets/{layers-BV8R9VUK.js → layers-Buo17rjW.js} +1 -1
- package/web-app/dist/assets/{loader-circle-6TlDS9Tu.js → loader-circle-15vK3oV1.js} +1 -1
- package/web-app/dist/assets/{lock-B9t6oWI0.js → lock-BeXLebuJ.js} +1 -1
- package/web-app/dist/assets/{package-2gEUAtZJ.js → package-MVh_6-6R.js} +1 -1
- package/web-app/dist/assets/{plus-DXocxPjU.js → plus-Dh_nd9vS.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-D3dWHBd6.js → refresh-cw-C9cBJEAT.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-CvuWqaSB.js → rotate-ccw-D3PAtzST.js} +1 -1
- package/web-app/dist/assets/{scroll-text-ktmD_xJY.js → scroll-text-DZCoXQjo.js} +1 -1
- package/web-app/dist/assets/{server-E7pZtj5A.js → server-OCOLI5J_.js} +1 -1
- package/web-app/dist/assets/{shield-alert-968j9z0V.js → shield-alert-oVhmf1_h.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-Tz_8rpU_.js → thumbs-up-B-kbX4vN.js} +1 -1
- package/web-app/dist/assets/{trash-2-Drh9IIj8.js → trash-2-EL6moveW.js} +1 -1
- package/web-app/dist/assets/{trending-down-DCQXtVSL.js → trending-down-Cl3kjpsx.js} +1 -1
- package/web-app/dist/assets/{trending-up-BIiwQbWV.js → trending-up-DST7I6M2.js} +1 -1
- package/web-app/dist/assets/{upload-sCbPkfmy.js → upload-CUOT780G.js} +1 -1
- package/web-app/dist/assets/{usePolling-BMIg6ZVT.js → usePolling-Djmt90eb.js} +1 -1
- package/web-app/dist/assets/{user-kGzXC3V2.js → user-BRBohA6J.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
- package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
- package/docs/COCKPIT-SPEC.md +0 -72
- package/docs/COCKPIT-UX-MANDATE.md +0 -53
- package/docs/COMPETITIVE-ANALYSIS.md +0 -303
- package/docs/COMPETITIVE-NEXT-10.md +0 -316
- package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
- package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
- package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
- package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
- package/docs/DEMOS.md +0 -63
- package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
- package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
- package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
- package/docs/GATE-FAILURE-TRIAGE.md +0 -254
- package/docs/HANDOFF-2026-08-03.md +0 -439
- package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
- package/docs/LOOP-HARNESS-AUDIT.md +0 -684
- package/docs/MERGE-DEDUP-MAP.md +0 -420
- package/docs/MERGE-ROUTE-MAP.md +0 -139
- package/docs/MODEL-REGISTRY-PLAN.md +0 -155
- package/docs/OUTCOME-FRONTIER.md +0 -536
- package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
- package/docs/PLANS-INDEX.md +0 -32
- package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
- package/docs/PROMPT-ABLATION-RESULT.md +0 -97
- package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
- package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
- package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
- package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
- package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
- package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
- package/docs/RARV-C-100X-PLAN.md +0 -286
- package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
- package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
- package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
- package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
- package/docs/STALE-STATE-AUDIT.md +0 -174
- package/docs/SYNERGY-TASKS.md +0 -143
- package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
- package/docs/TOP-100-BACKLOG.md +0 -159
- package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
- package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
- package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
- package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
- package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
- package/docs/WELCOME-OPENER-PLAN.md +0 -106
- package/docs/adoption-baseline-2026-07-31.md +0 -84
- package/docs/architecture/bmad-integration-epic.md +0 -271
- package/docs/architecture/bmad-integration-review.md +0 -86
- package/docs/architecture/bmad-integration-validation.md +0 -249
- package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
- package/docs/auto-claude-comparison.md +0 -250
- package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
- package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
- package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
- package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
- package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
- package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
- package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
- package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
- package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
- package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
- package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
- package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
- package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
- package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
- package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
- package/docs/bug-fixes/agent-19-code-review.md +0 -316
- package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
- package/docs/competitive/bolt-new-analysis.md +0 -579
- package/docs/competitive/emergence-others-analysis.md +0 -605
- package/docs/competitive/replit-lovable-analysis.md +0 -622
- package/docs/dashboard-guide.md +0 -487
- package/docs/enterprise/migration.md +0 -265
- package/docs/history/one-run-audit.md +0 -304
- package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
- package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
- package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
- package/docs/prd-purple-lab-ide.md +0 -152
- package/docs/prd-purple-lab-platform-v2.md +0 -223
- package/docs/prd-purple-lab-platform.md +0 -319
- package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
- package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
- package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
- package/docs/show-hn-post.md +0 -46
- package/docs/test-scenarios/enterprise-scenarios.md +0 -732
- package/docs/thick2thin.md +0 -173
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.
|
|
6
|
+
# Loki Mode v11.3.1
|
|
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 legacy engine, which still ships and is being removed (`loki start owner/repo#N` still routes to it; prefer `loki owner/repo#N`).
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ description: An autonomous software factory that knows what it is supposed to de
|
|
|
15
15
|
|
|
16
16
|
**Provider-agnostic (stable since v5.0.0):** runs on Claude/Codex/Cline/Aider with abstract model tiers and degraded mode for non-Claude providers; no vendor lock-in. Gemini deprecated v7.5.18. See `skills/providers.md`. **Legacy track (v8.0.0):** the Anthropic Agent SDK route (see below), spec-mode expansion for OpenAPI/GraphQL/Postman contracts, the runtime-boot and secret-leak evidence axes, and `loki steer` / `loki why` for mid-run control. Earlier tracks: LSP grounding as a first-class agent tool (v7.7.x) and Phase 1 RARV-C closure (real provider judges, gate-failure flock, synthetic PRD e2e, status `--json`).
|
|
17
17
|
|
|
18
|
-
**Runtime migration:** Bash-to-Bun migration. `bin/loki` is the router: the commands in its Bun-route `case` (read-only ones such as `version`, `status`, `stats`, `doctor`, `provider`, `memory`, plus stateful ones such as `rollback`, `trust`, `proof`/`receipt`, `control`, `answer`) run through `loki-ts/src/cli.ts` on Bun; the rest, and some flag forms (for example `doctor --airgap`, `trust detail`), run on Bash (`autonomy/loki`). `start` is Bash by default and goes to Bun only for the SDK loop (`LOKI_SDK_LOOP=1`) or Loki 10 engine inputs (issue refs, multi-word tasks). Read `bin/loki` and `cli.ts` for the exact set rather than trusting a list here. Rollback: `LOKI_LEGACY_BASH=1`. See `
|
|
18
|
+
**Runtime migration:** Bash-to-Bun migration. `bin/loki` is the router: the commands in its Bun-route `case` (read-only ones such as `version`, `status`, `stats`, `doctor`, `provider`, `memory`, plus stateful ones such as `rollback`, `trust`, `proof`/`receipt`, `control`, `answer`) run through `loki-ts/src/cli.ts` on Bun; the rest, and some flag forms (for example `doctor --airgap`, `trust detail`), run on Bash (`autonomy/loki`). `start` is Bash by default and goes to Bun only for the SDK loop (`LOKI_SDK_LOOP=1`) or Loki 10 engine inputs (issue refs, multi-word tasks). Read `bin/loki` and `cli.ts` for the exact set rather than trusting a list here. Rollback: `LOKI_LEGACY_BASH=1`. See `docs/architecture/ADR-001-runtime-migration.md`.
|
|
19
19
|
|
|
20
20
|
**Anthropic Agent SDK route (v8.0.0, opt-in, default-off):** a claude-binary-free path where the RARV loop runs on `@anthropic-ai/claude-agent-sdk` `query()` and judges run on the raw `@anthropic-ai/sdk`. One operator switch `LOKI_SDK_MODE` (`off` default / `judges` / `full`), mirrored byte-for-byte in bash (`autonomy/lib/sdk-mode.sh`) and TypeScript (`loki-ts/src/runner/sdk_mode.ts`). Unset = byte-identical to the claude-CLI route. See `references/sdk-mode.md`.
|
|
21
21
|
|
|
@@ -200,7 +200,7 @@ This protocol governs **skill module** loading -- task-scoped instruction files
|
|
|
200
200
|
<!-- generated:commands -->
|
|
201
201
|
Commands (generated from `loki-ts/src/cli/registry.ts`; full reference in `docs/CLI-REFERENCE.md`):
|
|
202
202
|
|
|
203
|
-
`version`, `status`, `doctor`, `provider`, `memory`, `rollback`, `proof`, `wiki`, `control`, `kpis`, `report`, `trust`, `crash`, `contract`, `start`, `slack`, `answer`, `engine10`, `help`, `quick`, `quickstart`, `init`, `template`, `verify`, `keys`, `review`, `dashboard`, `config`, `mcp`, `acp`, `stop`, `pause`, `resume`, `why`, `next`, `logs`, `ship`, `deploy`, `import`, `github`, `issue`, `ci`, `modernize`, `share`, `assets`, `export`, `notify`, `tour`, `welcome`, `onboard`, `setup-skill`, `self-update`, `remote`, `cockpit`, `code`, `context`, `secrets`, `api`, `sandbox`, `docker`, `web`, `preview`, `telemetry`, `syslog`, `explain`, `docs`, `test`, `bench`, `voice`, `own`, `secure`, `compliance`, `enterprise`, `projects`, `audit`, `cost`, `metrics`, `sentrux`, `magic`
|
|
203
|
+
`version`, `status`, `doctor`, `provider`, `memory`, `rollback`, `proof`, `wiki`, `control`, `kpis`, `report`, `trust`, `crash`, `contract`, `start`, `slack`, `queue`, `answer`, `engine10`, `help`, `quick`, `quickstart`, `init`, `template`, `verify`, `keys`, `review`, `dashboard`, `config`, `mcp`, `acp`, `stop`, `pause`, `resume`, `why`, `next`, `logs`, `ship`, `deploy`, `import`, `github`, `issue`, `ci`, `modernize`, `share`, `assets`, `export`, `notify`, `tour`, `welcome`, `onboard`, `setup-skill`, `self-update`, `remote`, `cockpit`, `code`, `context`, `secrets`, `api`, `sandbox`, `docker`, `web`, `preview`, `telemetry`, `syslog`, `explain`, `docs`, `test`, `bench`, `voice`, `own`, `secure`, `compliance`, `enterprise`, `projects`, `audit`, `cost`, `metrics`, `sentrux`, `magic`
|
|
204
204
|
<!-- /generated -->
|
|
205
205
|
|
|
206
206
|
---
|
|
@@ -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.
|
|
486
|
+
**v11.3.1 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.3.1
|
|
@@ -3233,7 +3233,7 @@ ISSUES: CRITICAL:description (optional, one per line per issue)"
|
|
|
3233
3233
|
else _cv_wrap=""; fi
|
|
3234
3234
|
_cv_out="$($_cv_wrap "$_cv_loki" internal sdk-text \
|
|
3235
3235
|
--prompt-file "$_cv_pf" \
|
|
3236
|
-
--model "${LOKI_SDK_COUNCIL_MODEL:-
|
|
3236
|
+
--model "${LOKI_SDK_COUNCIL_MODEL:-haiku}" --effort medium \
|
|
3237
3237
|
--timeout-ms "$(( _cv_to_s * 1000 ))" 2>/dev/null)" || _cv_rc=$?
|
|
3238
3238
|
rm -f "$_cv_pf" 2>/dev/null || true
|
|
3239
3239
|
if [ "$_cv_rc" -eq 0 ] && [ -n "$_cv_out" ]; then
|
|
@@ -3458,7 +3458,7 @@ REASON: your reasoning"
|
|
|
3458
3458
|
else _dv_wrap=""; fi
|
|
3459
3459
|
_dv_out="$($_dv_wrap "$_dv_loki" internal sdk-text \
|
|
3460
3460
|
--prompt-file "$_dv_pf" \
|
|
3461
|
-
--model "${LOKI_SDK_COUNCIL_MODEL:-
|
|
3461
|
+
--model "${LOKI_SDK_COUNCIL_MODEL:-haiku}" --effort medium \
|
|
3462
3462
|
--timeout-ms "$(( _dv_to_s * 1000 ))" 2>/dev/null)" || _dv_rc=$?
|
|
3463
3463
|
rm -f "$_dv_pf" 2>/dev/null || true
|
|
3464
3464
|
if [ "$_dv_rc" -eq 0 ] && [ -n "$_dv_out" ]; then
|
|
@@ -38,10 +38,10 @@ from pathlib import Path
|
|
|
38
38
|
# of this provider-keyed fallback.
|
|
39
39
|
PRICING_BY_PROVIDER = {
|
|
40
40
|
"claude": {
|
|
41
|
-
"input":
|
|
42
|
-
"output":
|
|
43
|
-
"cache_read": 0.
|
|
44
|
-
"cache_creation":
|
|
41
|
+
"input": 2.0,
|
|
42
|
+
"output": 10.0,
|
|
43
|
+
"cache_read": 0.10,
|
|
44
|
+
"cache_creation": 2.5,
|
|
45
45
|
},
|
|
46
46
|
"codex": {
|
|
47
47
|
"input": 2.0,
|
package/autonomy/council-v2.sh
CHANGED
|
@@ -386,7 +386,7 @@ Respond ONLY with a valid JSON object. No markdown fencing."
|
|
|
386
386
|
else _c2_wrap=""; fi
|
|
387
387
|
_c2_sdk_out="$($_c2_wrap "$_c2_sdk_loki" internal sdk-judge \
|
|
388
388
|
--prompt-file "$_c2_sdk_pf" --schema-file "$_c2_sdk_schema" \
|
|
389
|
-
--model "${LOKI_SDK_JUDGE_MODEL:-
|
|
389
|
+
--model "${LOKI_SDK_JUDGE_MODEL:-haiku}" --effort low \
|
|
390
390
|
--timeout-ms "$(( _c2_to_s * 1000 ))" 2>/dev/null)" || _c2_sdk_rc=$?
|
|
391
391
|
rm -f "$_c2_sdk_pf" 2>/dev/null || true
|
|
392
392
|
if [ "$_c2_sdk_rc" -eq 0 ] && [ -n "$_c2_sdk_out" ]; then
|
package/autonomy/grill.sh
CHANGED
|
@@ -218,7 +218,7 @@ grill_invoke_provider() {
|
|
|
218
218
|
else _gs_wrap=""; fi
|
|
219
219
|
_gs_out="$($_gs_wrap "$_gs_loki" internal sdk-text \
|
|
220
220
|
--prompt-file "$_gs_pf" \
|
|
221
|
-
--model "${LOKI_SDK_GRILL_MODEL:-
|
|
221
|
+
--model "${LOKI_SDK_GRILL_MODEL:-sonnet}" --effort high \
|
|
222
222
|
--timeout-ms "$(( _gs_to_s * 1000 ))" 2>/dev/null)" || _gs_rc=$?
|
|
223
223
|
rm -f "$_gs_pf" 2>/dev/null || true
|
|
224
224
|
if [ "$_gs_rc" -eq 0 ] && [ -n "$_gs_out" ]; then
|
|
@@ -121,7 +121,7 @@ _loki_done_recog_invoke() {
|
|
|
121
121
|
else _sdk_wrap=""; fi
|
|
122
122
|
_sdk_out="$($_sdk_wrap "$_sdk_loki" internal sdk-judge \
|
|
123
123
|
--prompt-file "$_sdk_prompt_f" --schema-file "$_sdk_schema" \
|
|
124
|
-
--model "${LOKI_SDK_JUDGE_MODEL:-
|
|
124
|
+
--model "${LOKI_SDK_JUDGE_MODEL:-haiku}" --effort low \
|
|
125
125
|
--timeout-ms "$(( ${LOKI_DONE_RECOG_TIMEOUT:-180} * 1000 ))" 2>/dev/null)" || _sdk_rc=$?
|
|
126
126
|
rm -f "$_sdk_prompt_f" 2>/dev/null || true
|
|
127
127
|
if [ "$_sdk_rc" -eq 0 ] && [ -n "$_sdk_out" ]; then
|
|
@@ -65,7 +65,7 @@ _loki_prd_enrich_invoke() {
|
|
|
65
65
|
else _pe_wrap=""; fi
|
|
66
66
|
_pe_out="$($_pe_wrap "$_pe_loki" internal sdk-text \
|
|
67
67
|
--prompt-file "$_pe_pf" \
|
|
68
|
-
--model "${LOKI_SDK_PRD_ENRICH_MODEL:-
|
|
68
|
+
--model "${LOKI_SDK_PRD_ENRICH_MODEL:-sonnet}" --effort medium \
|
|
69
69
|
--timeout-ms "$(( _pe_to_s * 1000 ))" 2>/dev/null)" || _pe_rc=$?
|
|
70
70
|
rm -f "$_pe_pf" 2>/dev/null || true
|
|
71
71
|
if [ "$_pe_rc" -eq 0 ] && [ -n "$_pe_out" ]; then
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
# - its target is missing, or resolves to a different install than the running one
|
|
14
14
|
# - the running root is itself an install path with a SKILL.md, so a dev checkout
|
|
15
15
|
# or worktree never hijacks the user's global link
|
|
16
|
+
# - the running install is durable (npm global root, bun global dir, Homebrew
|
|
17
|
+
# prefix); an npx cache, temp dir or arbitrary prefix is refused with one
|
|
18
|
+
# stderr line and the link is left untouched
|
|
16
19
|
|
|
17
20
|
_loki_skill_is_install_path() {
|
|
18
21
|
case "${1%/}" in
|
|
@@ -21,9 +24,75 @@ _loki_skill_is_install_path() {
|
|
|
21
24
|
return 1
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
# Durable-install rule (FC-30 amendment). A repoint writes a user-owned path, so
|
|
28
|
+
# the running install must outlive this process: a one-off `npx loki-mode` run or
|
|
29
|
+
# a scratch prefix would turn the link into a new dangling link. Durable means
|
|
30
|
+
# the running root sits under the npm global root (`npm root -g`), the bun global
|
|
31
|
+
# dir, or a Homebrew prefix. Prints a reason and returns 1 when it is not.
|
|
32
|
+
_loki_skill_dir_p() { (cd "$1" 2>/dev/null && pwd -P); }
|
|
33
|
+
|
|
34
|
+
# `npm root -g` bounded to 3s so a hung npm can never hang bin/loki. Output goes
|
|
35
|
+
# to a file (not a pipe) so an orphaned grandchild cannot hold the caller open.
|
|
36
|
+
# Returns 124 on timeout (callers fail closed), otherwise npm's own status.
|
|
37
|
+
_loki_skill_npm_root() {
|
|
38
|
+
local out pid i=0 rc
|
|
39
|
+
out="$(mktemp "${TMPDIR:-/tmp}/loki-npmroot.XXXXXX")" || return 1
|
|
40
|
+
npm root -g >"$out" 2>/dev/null </dev/null &
|
|
41
|
+
pid=$!
|
|
42
|
+
while kill -0 "$pid" 2>/dev/null; do
|
|
43
|
+
if [ "$i" -ge 30 ]; then
|
|
44
|
+
kill "$pid" 2>/dev/null
|
|
45
|
+
rm -f "$out"
|
|
46
|
+
return 124
|
|
47
|
+
fi
|
|
48
|
+
sleep 0.1
|
|
49
|
+
i=$((i + 1))
|
|
50
|
+
done
|
|
51
|
+
wait "$pid"; rc=$?
|
|
52
|
+
[ "$rc" -eq 0 ] && head -n 1 "$out"
|
|
53
|
+
rm -f "$out"
|
|
54
|
+
return "$rc"
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
_loki_skill_root_durable() {
|
|
58
|
+
local root_p="$1" cand cands="" npmroot prefix rc
|
|
59
|
+
case "$root_p" in
|
|
60
|
+
*/_npx/*) printf 'running from an npx cache (%s)' "$root_p"; return 1 ;;
|
|
61
|
+
esac
|
|
62
|
+
npmroot="$(_loki_skill_npm_root)"; rc=$?
|
|
63
|
+
if [ "$rc" -eq 124 ]; then
|
|
64
|
+
printf 'npm root -g timed out (running install %s not verified durable)' "$root_p"
|
|
65
|
+
return 1
|
|
66
|
+
fi
|
|
67
|
+
[ "$rc" -eq 0 ] || npmroot=""
|
|
68
|
+
[ -n "$npmroot" ] && cands="$cands
|
|
69
|
+
$npmroot"
|
|
70
|
+
[ -n "${NPM_CONFIG_PREFIX:-}" ] && cands="$cands
|
|
71
|
+
${NPM_CONFIG_PREFIX}/lib/node_modules"
|
|
72
|
+
cands="$cands
|
|
73
|
+
${BUN_INSTALL:-${HOME:-}/.bun}/install/global/node_modules"
|
|
74
|
+
for prefix in "${HOMEBREW_PREFIX:-}" /opt/homebrew /usr/local /home/linuxbrew/.linuxbrew; do
|
|
75
|
+
[ -n "$prefix" ] || continue
|
|
76
|
+
cands="$cands
|
|
77
|
+
$prefix/Cellar/loki-mode
|
|
78
|
+
$prefix/opt/loki-mode
|
|
79
|
+
$prefix/lib/node_modules"
|
|
80
|
+
done
|
|
81
|
+
while IFS= read -r cand; do
|
|
82
|
+
[ -n "$cand" ] || continue
|
|
83
|
+
cand="$(_loki_skill_dir_p "$cand")" || continue
|
|
84
|
+
[ "$root_p" = "$cand" ] && return 0
|
|
85
|
+
case "$root_p" in "$cand"/*) return 0 ;; esac
|
|
86
|
+
done <<EOT
|
|
87
|
+
$cands
|
|
88
|
+
EOT
|
|
89
|
+
printf 'running install %s is not a durable global install (npm global, bun global or Homebrew)' "$root_p"
|
|
90
|
+
return 1
|
|
91
|
+
}
|
|
92
|
+
|
|
24
93
|
loki_skill_link_heal() {
|
|
25
94
|
[ "${LOKI_NO_SKILL_LINK_HEAL:-}" = "1" ] && return 0
|
|
26
|
-
local root="${1:-}" home="${HOME:-}" root_p rel link tgt live_p tmp
|
|
95
|
+
local root="${1:-}" home="${HOME:-}" root_p rel link tgt live_p tmp durable="" why
|
|
27
96
|
[ -n "$root" ] && [ -n "$home" ] || return 0
|
|
28
97
|
[ -f "$root/SKILL.md" ] || return 0
|
|
29
98
|
root_p="$(cd "$root" 2>/dev/null && pwd -P)" || return 0
|
|
@@ -39,6 +108,14 @@ loki_skill_link_heal() {
|
|
|
39
108
|
live_p="$(cd "$link" 2>/dev/null && pwd -P)" || live_p=""
|
|
40
109
|
[ "$live_p" = "$root_p" ] && continue
|
|
41
110
|
fi
|
|
111
|
+
if [ -z "$durable" ]; then
|
|
112
|
+
if why="$(_loki_skill_root_durable "$root_p")"; then
|
|
113
|
+
durable=yes
|
|
114
|
+
else
|
|
115
|
+
printf 'loki: not repointing skill links: %s\n' "$why" >&2
|
|
116
|
+
return 0
|
|
117
|
+
fi
|
|
118
|
+
fi
|
|
42
119
|
tmp="${link}.heal.$$"
|
|
43
120
|
rm -f "$tmp" 2>/dev/null
|
|
44
121
|
ln -s "$root_p" "$tmp" 2>/dev/null || continue
|
|
@@ -327,7 +327,7 @@ loki_council_dispatch_agents() {
|
|
|
327
327
|
else _va_wrap=""; fi
|
|
328
328
|
_va_out="$($_va_wrap "$_va_loki" internal sdk-judge \
|
|
329
329
|
--prompt-file "$_va_pf" --schema-file "$_va_schema_f" \
|
|
330
|
-
--model "${LOKI_SDK_COUNCIL_MODEL:-
|
|
330
|
+
--model "${LOKI_SDK_COUNCIL_MODEL:-sonnet}" --effort high \
|
|
331
331
|
--timeout-ms "$(( _va_to_s * 1000 ))" 2>"$COUNCIL_STATE_DIR/votes/dispatch-stderr-${iteration}.log")" || _va_rc=$?
|
|
332
332
|
rm -f "$_va_pf" 2>/dev/null || true
|
|
333
333
|
if [ "$_va_rc" -eq 0 ] && [ -n "$_va_out" ]; then
|