loki-mode 11.39.2 → 11.41.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.
- package/SKILL.md +5 -5
- package/VERSION +1 -1
- package/autonomy/lib/efficiency_cost.py +24 -0
- package/autonomy/route.sh +81 -21
- package/autonomy/run.sh +12 -3
- package/autonomy/trigger-server.py +62 -25
- package/bin/loki +1 -0
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +22 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/DEPLOYMENT.md +5 -3
- package/docs/INSTALLATION.md +1 -1
- package/docs/KNOWN-ISSUES.md +1 -1
- package/docs/exit-codes.md +0 -3
- package/docs/merge-queue.md +1 -1
- package/docs/sentry-intake.md +6 -6
- package/loki-ts/data/model-pricing.json +1 -0
- package/loki-ts/dist/loki.js +1101 -1101
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/ask-tools-server.js +15 -0
- package/packages/control-plane/dist/server.js +242 -226
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-sgGQRfrl.js → AdminPage-P3gsF22s.js} +1 -1
- package/web-app/dist/assets/{Avatar-B2svYMEF.js → Avatar-DfZ0kvq2.js} +1 -1
- package/web-app/dist/assets/{Badge-CNe3sQge.js → Badge-C5fbiaZR.js} +1 -1
- package/web-app/dist/assets/{Button-DNJqkQN4.js → Button-B5jGt7jZ.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-J30dOs9I.js → CockpitPage-BnpuQn_T.js} +1 -1
- package/web-app/dist/assets/{ComparePage-Bx4MYrKs.js → ComparePage-BwX4TQ41.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-peEQQHtL.js → ErrorBoundary-yB3DLU8x.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-CA1L7LRZ.js → EvidenceReceiptPanel-ZAI2-wq_.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-CNdTJ0j1.js → GitHubIssuesPanel-DnKJAP_p.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-CC4KL-FR.js → GitHubPRsPanel-DB9k5ZWn.js} +1 -1
- package/web-app/dist/assets/{HomePage-t6Idf5Sj.js → HomePage-BXqw0kte.js} +2 -2
- package/web-app/dist/assets/{LoginPage-CQ_XVRxV.js → LoginPage-YTq__thD.js} +1 -1
- package/web-app/dist/assets/{MagicPage-eEfHRM3-.js → MagicPage-cK4Voorh.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-CbHLD11s.js → MetricsPage-9GZEVtBC.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BdX_TqJ3.js → NotFoundPage-BFltgr29.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-gJ0-4_3Z.js → ProjectPage-Dl1uGLpM.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-BBPwXrRQ.js → ProjectsPage-B5C9Qp2r.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-D5ebwLI2.js → SettingsPage-rZeN9P-3.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-ClUDqkTu.js → ShowcasePage-CIpRNIwb.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-CWC5lImn.js → SystemSettingsPage-DA21AT1n.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-D9WxpiIq.js → TeamsPage-Bfff6dlv.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-L7wg9zWx.js → TemplatesPage-COk_7uh-.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-RYOEwdOh.js → TerminalOutput-DcZ7Y8RN.js} +1 -1
- package/web-app/dist/assets/{activity-Cn5uiZp_.js → activity-DwBipFux.js} +1 -1
- package/web-app/dist/assets/{bell-DaQOp6Iz.js → bell-BNJ0XegR.js} +1 -1
- package/web-app/dist/assets/{bot-zPjnDgkd.js → bot-BytqEOpz.js} +1 -1
- package/web-app/dist/assets/{check-C-TgWgrY.js → check-DbTwoddF.js} +1 -1
- package/web-app/dist/assets/{chevron-left-BVrdwnGW.js → chevron-left-CSsct9Tt.js} +1 -1
- package/web-app/dist/assets/{circle-alert-BPE5_3Zf.js → circle-alert-CS1P2iTs.js} +1 -1
- package/web-app/dist/assets/{clock-CyauZDh4.js → clock-DCJ39VhK.js} +1 -1
- package/web-app/dist/assets/{cloud-Cjvpg5zE.js → cloud-_7nRyHTV.js} +1 -1
- package/web-app/dist/assets/{code-xml-DMBFBfXi.js → code-xml-DAftmEi4.js} +1 -1
- package/web-app/dist/assets/{database-UZm9Krwy.js → database-BoHhojPP.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-BLW3cA0c.js → dollar-sign-CuaEpf1r.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-keKipJ82.js → file-code-corner-D3C0H2eT.js} +1 -1
- package/web-app/dist/assets/{file-plus-DOuuT2rg.js → file-plus-DRmrq8_N.js} +1 -1
- package/web-app/dist/assets/{globe-Blc_IgBm.js → globe-Du5vCS0i.js} +1 -1
- package/web-app/dist/assets/{hammer-RAF8Y8zB.js → hammer-DkfxwcLQ.js} +1 -1
- package/web-app/dist/assets/{index-DVir_e8y.js → index-ZmKBwWdn.js} +3 -3
- package/web-app/dist/assets/{layers-BPAW51o2.js → layers-CbdK-349.js} +1 -1
- package/web-app/dist/assets/{loader-circle-QDP024YT.js → loader-circle-D5ms6nnc.js} +1 -1
- package/web-app/dist/assets/{lock-DS2mqpHL.js → lock-BxC0fjGK.js} +1 -1
- package/web-app/dist/assets/{package-DHbdsteV.js → package-DUSYFBey.js} +1 -1
- package/web-app/dist/assets/{plus-Cgrtf3pX.js → plus-IXJ_Iw5l.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-DRdlWZ0J.js → refresh-cw-BsYeQhUs.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Bsqp_AY2.js → rotate-ccw-ijMjH7vU.js} +1 -1
- package/web-app/dist/assets/{scroll-text-Dx_s7jyz.js → scroll-text-CIy0owUs.js} +1 -1
- package/web-app/dist/assets/{server-CtvpCh7a.js → server-BIctaKaw.js} +1 -1
- package/web-app/dist/assets/{shield-alert-ukCb5WjD.js → shield-alert-BOn8ZRj9.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-D7cuCB5Q.js → thumbs-up-BSq8ePaY.js} +1 -1
- package/web-app/dist/assets/{trash-2-DIn74n9D.js → trash-2-CzF3qiiR.js} +1 -1
- package/web-app/dist/assets/{trending-down-R4-Husx0.js → trending-down-CQJ9PWzb.js} +1 -1
- package/web-app/dist/assets/{trending-up-CadBf4fF.js → trending-up-DfTOaGYJ.js} +1 -1
- package/web-app/dist/assets/{upload-CaU6G8CF.js → upload-B7LrdY0s.js} +1 -1
- package/web-app/dist/assets/{usePolling-BqEWhbKR.js → usePolling-CvyeIA-Q.js} +1 -1
- package/web-app/dist/assets/{user-D6Z9ASax.js → user-Dwe-VKy5.js} +1 -1
- package/web-app/dist/index.html +1 -1
package/docs/sentry-intake.md
CHANGED
|
@@ -18,7 +18,7 @@ The token is sent only to the Sentry host through a curl config on stdin, never
|
|
|
18
18
|
|
|
19
19
|
1. Set the client secret: `LOKI_SENTRY_WEBHOOK_SECRET` (or `SENTRY_CLIENT_SECRET`). It must differ from the GitHub webhook secret and the API token. With no secret the route answers 503 and nothing is enqueued.
|
|
20
20
|
2. Start the server: `python3 autonomy/trigger-server.py --port 8080` and point the Sentry alert webhook at `/sentry`.
|
|
21
|
-
3. A valid alert is normalized with `normalize_sentry_json` and enqueues `loki start "<brief>" --pr
|
|
21
|
+
3. A valid alert is normalized with `normalize_sentry_json` and enqueues `loki start "<brief>" --pr`. A bad signature gets 401.
|
|
22
22
|
|
|
23
23
|
The brief also carries the event's release and environment, the newest `.loki/deploys` record (`last deploy <sha7> <finished_at> health=<status>`) and, when the culprit file resolves inside the project, its last `git log -1` author. All of it is sanitized to one line and capped; it adds no authority.
|
|
24
24
|
|
|
@@ -35,30 +35,30 @@ Slack (`POST /slack`):
|
|
|
35
35
|
|
|
36
36
|
1. Set `SLACK_SIGNING_SECRET`. Point a `/loki` slash command (and Events URL verification) at `/slack`.
|
|
37
37
|
2. The signature is `v0=` + hex HMAC-SHA256 over `v0:<X-Slack-Request-Timestamp>:<raw body>`, window 300s, the same contract as `loki-ts/src/contrib/slack_inbound.ts`. Bad, stale or missing signature: 401, nothing queued.
|
|
38
|
-
3. The command text is the spec (one line, not starting with `-`) and runs as `loki start <text
|
|
38
|
+
3. The command text is the spec (one line, not starting with `-`) and runs as `loki start <text>`. Slack gets an ephemeral reply carrying the job id.
|
|
39
39
|
4. On completion the summary is posted to the request's `response_url`, only if it starts with `https://hooks.slack.com/`. Any other host is never contacted.
|
|
40
40
|
|
|
41
41
|
Linear (`POST /linear`):
|
|
42
42
|
|
|
43
43
|
1. Set `LINEAR_WEBHOOK_SECRET`. Point a Linear issue webhook at `/linear`.
|
|
44
44
|
2. `Linear-Signature` is the hex HMAC-SHA256 of the raw body, and the signed `webhookTimestamp` must be within 300s. Otherwise 401.
|
|
45
|
-
3. A created issue enqueues `loki start linear:<identifier
|
|
45
|
+
3. A created issue enqueues `loki start linear:<identifier>` and answers 202 with the job id. Other events are skipped.
|
|
46
46
|
4. If `LINEAR_API_KEY` is set, a comment with the result is posted on the issue through `https://api.linear.app/graphql`. Without it nothing is posted.
|
|
47
47
|
|
|
48
48
|
Jira (`POST /jira`):
|
|
49
49
|
|
|
50
50
|
1. Set `JIRA_WEBHOOK_SECRET` (the secret on a Jira Cloud webhook) and point the webhook at `/jira`. Set `JIRA_ASSIGNEES` (comma-separated accountId, email or display name) and/or `JIRA_LABELS`. With neither set, every event is skipped.
|
|
51
51
|
2. `X-Hub-Signature` is `sha256=` + hex HMAC-SHA256 of the raw body. Bad or missing signature: 401. Jira signs no timestamp and the `X-Atlassian-Webhook-Identifier` header is not covered by the HMAC, so replay is bounded two ways: a repeated delivery id, or a repeated signed body (sha256 of the raw body, so changing or dropping the header does not help), answers `duplicate` and queues nothing. A replay of a body Jira never sent twice still needs the secret to forge.
|
|
52
|
-
3. `jira:issue_created`, or `jira:issue_updated` whose changelog touches assignee or labels, runs only when the issue is assigned to a configured user or has a configured label. The key, summary and description are folded into a one-line brief (1500 bytes max; an Atlassian Document Format description is flattened to its text) and run as `loki start --brief "<brief>" --pr
|
|
52
|
+
3. `jira:issue_created`, or `jira:issue_updated` whose changelog touches assignee or labels, runs only when the issue is assigned to a configured user or has a configured label. The key, summary and description are folded into a one-line brief (1500 bytes max; an Atlassian Document Format description is flattened to its text) and run as `loki start --brief "<brief>" --pr`. Answers 202 with the job id.
|
|
53
53
|
|
|
54
54
|
Teams (`POST /teams`):
|
|
55
55
|
|
|
56
56
|
1. Set `TEAMS_SECURITY_TOKEN` (the base64 token Teams shows when you create the outgoing webhook) and point the webhook at `/teams`.
|
|
57
57
|
2. `Authorization: HMAC <base64>` is the base64 HMAC-SHA256 of the raw body keyed by the base64-decoded token. Bad signature: 401. The activity `timestamp` must be within 300s; a stale or missing one is refused with 401.
|
|
58
|
-
3. The message text (with `<at>` mentions and tags removed) is the brief and runs as `loki start --brief "<brief>" --pr
|
|
58
|
+
3. The message text (with `<at>` mentions and tags removed) is the brief and runs as `loki start --brief "<brief>" --pr`. Teams gets a synchronous reply whose text starts with "Queued" and ends with the job id. A repeated activity id is not queued twice.
|
|
59
59
|
|
|
60
60
|
Jira completion comments: set `JIRA_BASE_URL` (https only), `JIRA_EMAIL` and `JIRA_API_TOKEN`; the result is then posted as a comment on the issue that triggered the run. Without all three nothing is posted, and `JIRA_API_TOKEN` never reaches the `loki start` child environment.
|
|
61
61
|
|
|
62
|
-
Jira and Teams runs are receipt-gated PR runs only: the server always passes `--pr` and never a deploy argument, so shipping stays a separate gated step. `--brief` forces brief mode, so text that ends in `.md` or contains an issue URL is never reclassified, and `loki start --brief ... --pr
|
|
62
|
+
Jira and Teams runs are receipt-gated PR runs only: the server always passes `--pr` and never a deploy argument, so shipping stays a separate gated step. `--brief` forces brief mode, so text that ends in `.md` or contains an issue URL is never reclassified, and `loki start --brief ... --pr` runs on the Loki 10 engine, which opens a PR carrying the Evidence Receipt (the same machinery as `loki start <issue>`). Sentry alerts use the same form. The server never passes `--detach` and never sets `LOKI_ENGINE`, so every webhook start gets the Wall and VERIFIED. Neither secret reaches the `loki start` child environment, and both must differ from every other credential. A missing secret answers 503 naming the variable.
|
|
63
63
|
|
|
64
64
|
Reply targets are stored server side keyed by job id, captured only after verification. Notifier errors are logged and never fail the job. Poll status with `GET /jobs/<id>`.
|
|
@@ -3,6 +3,7 @@
|
|
|
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
5
|
"default_max_cost_usd": 100,
|
|
6
|
+
"inference_geo_multipliers": {"us": 1.1},
|
|
6
7
|
"_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.",
|
|
7
8
|
"pricing": {
|
|
8
9
|
"fable": {
|