120 Commits
Author SHA1 Message Date
CatoandClaude 6d4d0a7eba feat(allowance): monthly CHF allowance, own-key vault, UsageMeter (1.32.0) (#120)
Co-authored-by: Claude <noreply@anthropic.com>
2026-12-03 01:53:43 +01:00
bitbaum-fleet 28e9708a69 release v1.31.0 v1.31.0 2026-11-15 18:51:45 +00:00
CatoandClaude 8dcb62b0e6 feat(input): fit prompt text instead of refusing it; actionable validation messages (#119)
A pasted chat in OrangeCat's article brief returned "Invalid request": the
route capped the topic at 300 characters and answered with a bare phrase.

- fitPromptText: keeps a brief whole up to PROMPT_TEXT_MAX_CHARS (12k),
  otherwise keeps start and end around a "characters left out" marker.
- explainInputIssues: turns zod-shaped issues into sentences that name the
  field, its length, the limit and the fix; never a bare "Invalid request".


Claude-Session: https://claude.ai/code/session_019MDtmsN9mz8QfGDCrNhY9p

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 12:49:27 +01:00
CatoandClaude 43b629d307 feat(prices): what the paid calls cost, from the vendors' own pages (1.30.0) (#118)
PRICE_LIST names each paid model's USD per 1M tokens and the page it was read
from (2026-11-15). summariseUsage tallies gain costUSD for the server's paid
answered calls and unpriced for those it cannot price, never counted as zero.


Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

Co-authored-by: Claude <noreply@anthropic.com>
v1.30.0
2026-11-15 10:53:47 +01:00
dependabot[bot] 9bf4faafee chore(deps-dev): bump typescript-eslint (#117)
Bumps the minor-and-patch group with 1 update: [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `typescript-eslint` from 8.72.1 to 8.72.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.72.2/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.72.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-14 12:47:03 +01:00
CatoandClaude 85984ad223 feat(usage-log): a call says what it was for (1.29.0) (#116)
WalkOptions.feature / CompleteOptions.feature is written beside the app; the
summary groups each app's calls by it. Solon spent Groq's whole free day
before 09:10 UTC on 14 Nov with nobody using any app, and the log could say
which app but not what for. CompleteOptions.app is now typed as well.


Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

Co-authored-by: Claude <noreply@anthropic.com>
v1.29.0
2026-11-14 10:24:43 +01:00
Catoandbitbaum-fleet b467434bbb chore: add the fleet package template files this repo is missing (release-notify-tagged.yml) (#115)
Files from bitbaum/fleet `templates/package` that this repository does not have yet:

- `.github/workflows/release-notify-tagged.yml`

Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.

Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.

Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
2026-11-14 10:17:54 +01:00
CatoandClaude 542103a15b feat(usage-log): write to the box's log with no per-app setup (#114)
1.27.0 wrote only where AI_USAGE_DIR was exported; apps whose launch script
predates it wrote nothing. usageDir() falls back to /opt/fleet/ai-usage when
it exists; AI_USAGE_DIR=off writes nowhere. Release 1.28.0.


Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

Co-authored-by: Claude <noreply@anthropic.com>
v1.28.0
2026-11-13 23:37:31 +01:00
CatoandClaude 30003a6999 feat(usage-log): one line per model call for every app on a box; a reader and a summary (1.27.0) (#113)
About $567 went to Google on 10-11 Nov 2026 and nobody could say which app
spent it, on what, or when: each app counted its own calls in its own
process, or not at all.

The chain walk now reports every link it touches (app, vendor, model;
served, failed with status and kind, or refused with the spend rule; tokens
and time when known; never content). With AI_USAGE_DIR set the event is
appended to <dir>/<UTC day>.jsonl through process.getBuiltinModule, so the
package root stays importable in a browser bundle. readUsageDay and
summariseUsage give the per-vendor and per-app picture.

test/usage-log.test.js: the three outcomes from a real walk, the file sink,
null for could-not-look, torn lines, a throwing sink, the summary.


Claude-Session: https://claude.ai/code/session_019MDtmtUQb9BM11ycpApwGq

Co-authored-by: Claude <noreply@anthropic.com>
v1.27.0
2026-11-13 10:05:53 +01:00
Cato 3901ff0342 feat(spend): Google out of the free chain; paid AI off unless a feature opts in, and capped (1.26.0) (#112)
freeChain() put Google's Gemini API second, on a fleet-wide GEMINI_API_KEY
described as a free per-project tier. The project had billing; every app on
the box fell through to it whenever Groq's pool was spent, about $567 on
10-11 Nov 2026. Google is not in the chain any more; it bills.

- freeChain(): Groq, then OpenRouter :free. visionProviders() loses the
  Google seat; the free vision left is OpenRouter's :free Gemma id.
- spend: a provider is paid when marked so or when it is Google's Gemini
  API, xAI, Anthropic or OpenAI (by host or key name, also prefixed). A
  reader's own key is never paid by us.
- AI_PAID_DISABLED is on when unset; AI_PAID_OK / {PREFIX}_AI_PAID_OK opts an
  app in. usableChain() drops paid providers unless allowed.
- Daily caps (UTC): fleet 90 calls / 120,000 in / 60,000 out; per-app rows
  (about 60% of the fleet named), aliases, unknown apps 1 / 800 / 400, no-AI
  apps 0; xAI 0 until opted in, then 2 / 2,000 / 1,000; a 5,000-call free
  loop guard. Env overrides per prefix. A reached cap throws SpendLimitError
  ("limit reached") and never walks onto another paid vendor.
- images: every paid transport, the gemini one included, is gated the same
  way; ownKey for a person's own key.
- README, docs/providers.md and CHANGELOG say plainly that Google bills.

Tests: test/spend.test.js (kill switch on/off/missing, no xAI or Google
link without opt-in, caps and headroom, aliases, unknown app, env
overrides, cap hit without walking to another paid vendor, fleet cap,
token cap, BYOK past spent caps, free loop guard); chain, images and vision
tests updated. 425 pass.
v1.26.0
2026-11-12 22:27:29 +01:00
CatoandClaude 5c9102e286 feat(web): keyless fallback backends for when every configured one is down (1.25.0) (#111)
* feat(web): keyless fallback backends for when every configured one is down

A self-hosted SearXNG is refused by upstream engines from time to time;
without a paid key the chain then has nothing left, and every app on the
box says it could not look (seen on Substrata, 2026-11-11 to -12).

- gdeltProvider: GDELT DOC 2.0 news search, keyless. Paced to one request
  every five seconds per process (GDELT's own ask); a call that cannot wait
  its turn fails as rate_limited without being sent. Its plain-text refusals
  are typed failures, never empty results.
- wikipediaProvider: one Wikipedia edition's search, keyless, no invented
  date (the API's timestamp is the last edit).
- keylessProviders() and withKeylessFallback(env): one call to opt in.
  defaultProviders is unchanged.
- A provider may declare coverage: "partial"; a partial index answering
  empty never turns a search into "nothing".

Version 1.25.0.

Claude-Session: https://claude.ai/code/session_019MDtmuvTGrpo3VChP3skH8

* fix(web): keyless providers, from review

- GDELT query: OR and the parentheses grouping it are kept; a short
  acronym ("AI", "EU") is joined to its neighbour as a phrase instead of
  dropped; lower-case function words go; CJK words are quoted; unbalanced
  quotes are removed.
- GDELT: a non-object body or row is bad_response, not "unreachable"; a
  non-finite or negative interval falls back to 5 s instead of corrupting
  the shared pacing; a call left with under a second is not sent.
- Wikipedia: a site naming an edition searches that edition; edition codes
  such as "simple" and "zh-yue" are honoured and an unknown hint falls back
  to the configured edition; a MediaWiki error in a 200 body is a failure,
  never an empty search.

Claude-Session: https://claude.ai/code/session_019MDtmuvTGrpo3VChP3skH8

---------

Co-authored-by: Claude <noreply@anthropic.com>
v1.25.0
2026-11-12 08:00:02 +01:00
dependabot[bot] 9a65a34c10 chore(deps): bump the minor-and-patch group with 4 updates (#110)
Bumps the minor-and-patch group with 4 updates: [linkedom](https://github.com/WebReflection/linkedom), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint](https://github.com/eslint/eslint) and [globals](https://github.com/sindresorhus/globals).


Updates `linkedom` from 0.18.14 to 0.18.15
- [Commits](https://github.com/WebReflection/linkedom/compare/v0.18.14...v0.18.15)

Updates `@types/node` from 26.6.5 to 26.6.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 10.13.0 to 10.14.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.13.0...v10.14.0)

Updates `globals` from 17.13.0 to 17.14.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.13.0...v17.14.0)

---
updated-dependencies:
- dependency-name: linkedom
  dependency-version: 0.18.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: "@types/node"
  dependency-version: 26.6.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: eslint
  dependency-version: 10.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: globals
  dependency-version: 17.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-07 16:07:51 +01:00
Catoandbitbaum-fleet a5b317e3c3 docs(agents): the org rules block, generated from bitbaum/fleet (#109)
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
2026-11-06 09:47:32 +01:00
bitbaum-fleet 8dfe7f343a release v1.24.0 v1.24.0 2026-11-02 19:22:53 +00:00
Cato aec87370fd feat(images): one image-generation transport (images, openrouter-chat, gemini) (#108) 2026-11-02 20:19:07 +01:00
bitbaum-fleet 6589926cfe release v1.23.0 v1.23.0 2026-11-02 10:31:16 +00:00
Cato da9c6627a7 fix: classify narrated tool-call prefixes before streaming answers (#107) 2026-11-02 11:27:47 +01:00
CatoandClaude 80da12607b feat(mcp): an MCP client, the way a product's bots reach a connector (1.22.0) (#106)
The fleet's products already serve MCP (OrangeCat's and Loki's /api/mcp),
and the next thing every one of them wants is to call one: a bot on
OrangeCat asking Loki as the person, a product reaching a vendor's server
with the person's token. Each would write the same forty lines of JSON-RPC
over Streamable HTTP, and each would get one of the two response shapes
wrong (a server may answer a POST with JSON or with an SSE stream, per
request). So the client lives here, once.

@bitbaum/ai-kit/mcp: McpClient (initialize once with the session id carried,
tools/list, tools/call, both response shapes read the same way, a tool
error as data and a JSON-RPC error as McpError), toolDefinitionsFrom (the
server's tools in the shape complete() takes). No OAuth flow, no stdio, no
resources or prompts until a caller needs them. Tests against a fake server
in both answer shapes, plus the failed-handshake path.


Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

Co-authored-by: Claude <noreply@anthropic.com>
v1.22.0
2026-11-01 06:43:01 +01:00
dependabot[bot] bff0fa4ddb chore(deps-dev): bump typescript-eslint (#105)
Bumps the minor-and-patch group with 1 update: [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `typescript-eslint` from 8.72.0 to 8.72.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.72.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.72.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-31 12:47:16 +01:00
CatoandClaude a2593c2cea chore(deps): clear dev-toolchain audit findings inside existing ranges (#104)
pnpm audit critical/high (all deps):
  .: 0/2 -> 0/0


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 22:26:02 +01:00
Catoandbitbaum-fleet 9ba6575abe docs(agents): the org rules block, generated from bitbaum/fleet (#103)
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
2026-10-30 10:37:33 +01:00
bitbaum-fleet b1ea5ad12d release v1.21.5 v1.21.5 2026-10-28 23:44:18 +00:00
Cato 94f146fcdf fix(release): respect ignored build output using Fleet template (#102)
* fix(ai): retain finish reason for empty completions

* fix(release): apply canonical handling for ignored build output
2026-10-29 00:42:30 +01:00
Cato cbbb80aff2 fix(ai): retain finish reason for empty completions (#101) 2026-10-29 00:40:45 +01:00
Cato 89bae751ea fix(ai): accept native assistant tool-call history (#100) 2026-10-29 00:36:26 +01:00
Cato aa141a6d99 chore(deps): dependabot leaves TypeScript 7 alone until typescript-eslint supports it (#99) 2026-10-28 03:33:19 +01:00
Catoandbitbaum-fleet 35056c21f7 docs(agents): the org rules block, generated from bitbaum/fleet (#98)
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
2026-10-28 02:56:27 +01:00
Cato 2ee1bda406 docs: record verified release history and its evidence limits (#97) 2026-10-28 00:19:55 +01:00
Catoandbitbaum-fleet 34c070b1bb chore: add the fleet package template files this repo is missing (release-notify.yml) (#96)
Files from bitbaum/fleet `templates/package` that this repository does not have yet:

- `.github/workflows/release-notify.yml`

Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.

Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.

Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
2026-10-26 21:45:09 +01:00
Catoandbitbaum-fleet 42f474865e chore: add the fleet package template files this repo is missing (AGENTS.md, CLAUDE.md) (#95)
Files from bitbaum/fleet `templates/package` that this repository does not have yet:

- `AGENTS.md`
- `CLAUDE.md`

Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.

Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.

Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
2026-10-26 12:06:07 +01:00
Catoandbitbaum-fleet f80949a7cc chore: add the fleet package template files this repo is missing (git-release.yml, release.yml) (#94)
Files from bitbaum/fleet `templates/package` that this repository does not have yet:

- `.github/workflows/git-release.yml`
- `.github/workflows/release.yml`

Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.

Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.

Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
v1.21.4
2026-10-25 09:31:22 +01:00
Cato 224cb56bf2 fix(sse): assemble multiline events and handle CR framing (v1.21.4) (#93) 2026-10-25 09:18:15 +01:00
dependabot[bot] a3e27e8a13 chore(deps-dev): bump the minor-and-patch group with 2 updates (#92)
Bumps the minor-and-patch group with 2 updates: [eslint](https://github.com/eslint/eslint) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `eslint` from 10.12.0 to 10.13.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.12.0...v10.13.0)

Updates `typescript-eslint` from 8.71.2 to 8.72.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.72.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: typescript-eslint
  dependency-version: 8.72.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-24 16:53:50 +02:00
Cato 1a48792ec0 Prioritize article content before the model character limit (#91) 2026-10-24 07:30:36 +02:00
Cato 3e69a8c1ad Preserve article citation links in model-visible text (#90) 2026-10-24 07:12:41 +02:00
Cato 65e3ce962c Fix public IPv4 range classification and mapped-address guards (#89) 2026-10-24 07:08:01 +02:00
Catoandcatomean c786c7749f ci: cut scheduled CI minutes (CI audit) (#88)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 20:26:57 +02:00
dependabot[bot] 621489fd22 chore(deps-dev): bump the minor-and-patch group with 3 updates (#87)
Bumps the minor-and-patch group with 3 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [prettier](https://github.com/prettier/prettier) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@types/node` from 26.6.4 to 26.6.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `prettier` from 3.9.9 to 3.9.10
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.9...3.9.10)

Updates `typescript-eslint` from 8.71.1 to 8.71.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.71.2/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.6.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: prettier
  dependency-version: 3.9.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: typescript-eslint
  dependency-version: 8.71.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-17 15:11:10 +02:00
CatoandClaude e482ed3c65 ci(publish): a merged version bump publishes itself (#86)
auto-merge.yml has always re-armed publish.yml after a merge
(rearm_workflows: "ci.yml publish.yml"), but publish.yml only listened for
tag pushes, so every one of those dispatches was dropped and a merged
version sat unpublished until someone with tag rights pushed a tag. 1.21.0
sat merged for three days that way.

- publish.yml accepts workflow_dispatch, and refuses one from anything but
  main.
- The tag-matches-version check runs only for a tag push; a dispatch has
  no tag to match.
- Permissions are unchanged (contents: read, id-token: write). A dispatched
  release is traced to its commit by npm provenance.
- The existing registry check makes every other merge a green no-op.

README: releasing is merging — raise the version in the PR.


Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 05:25:13 -07:00
CatoandClaude Opus 5.5 f7c2d89fb8 feat(usage): what the budget numbers mean, defined once (1.21.0) (#85)
* feat(usage): what the budget numbers mean, defined once (1.21.0)

Loki's Settings → AI and OrangeCat's /settings/usage each grew the half a
meter leaves out — does today's pace last, the week, when it refills, what
the assistant still reads, levers with their consequence — separately, in
October 2026, with the same rules and slightly different sentences. The
product-neutral half moves here so the next app starts with it:

- paceForecast / paceLine: lasts the day, or runs out at "12:00 UTC"; silent
  before there is a rate (PACE_MIN_USED, PACE_MIN_DAY_FRACTION, or minUsed).
- weekSummary: total, active days, days the cap was reached; null for an
  empty or unreadable week, never "0".
- refillsIn: "in 4 hours", "in under a minute", "now", or null — never a
  guessed time.
- admissionsLeft: answers a remainder buys, counted the way a gate admits
  (one at the estimate, then per measured answer), not a bare division.
- historyWindowLine: what the assistant still reads of a conversation.
- countOf, clockAt, nextUtcMidnight; UsageAction / UsageExplanation types;
  UTC_RESET_EXPLANATION.

Numbers go through the caller's formatter so a page never groups digits two
ways. Plan names, prices and which levers are open stay in each app.
Additive: minor release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu

* fix(usage): the reset sentence claims only what the counter does

UTC_RESET_EXPLANATION gave a reason — "that is when the model providers'
free allowances refill" — which is false of Groq, whose limits refill on a
rolling clock. OrangeCat's usage page had shipped the same reason and took
it back in bitbaum/orangecat#1318; a shared sentence that is wrong is wrong
in every app at once, so it now states only that the count is kept per UTC
day. weekSummary and the README also say the other #1318 lesson: seven rows
ending today are "last 7 days", not "this week".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu

* refactor(usage): utcResetExplanation(unit) instead of a fixed sentence

OrangeCat counts messages and Loki a share; "Unused allowance does not roll
over" was right for neither. The reset is now utcResetExplanation("messages")
→ "Unused messages don't roll over.", defaulting to "allowance". Still claims
only what the counter does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu

* test(usage): countOf's formatter test no longer depends on ICU data

CI (Node 24) groups de-CH with ' and this sandbox (Node 22) with ’, so the
test asserted a runtime's locale data rather than that countOf uses the
formatter it is given. It now passes a formatter with no locale behind it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 06:34:09 -07:00
dependabot[bot] 5d6e68f251 chore(deps-dev): bump the minor-and-patch group with 4 updates (#84)
Bumps the minor-and-patch group with 4 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint](https://github.com/eslint/eslint), [globals](https://github.com/sindresorhus/globals) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@types/node` from 26.6.3 to 26.6.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 10.11.0 to 10.12.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.11.0...v10.12.0)

Updates `globals` from 17.12.0 to 17.13.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.12.0...v17.13.0)

Updates `typescript-eslint` from 8.71.0 to 8.71.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.71.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.6.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: eslint
  dependency-version: 10.12.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: globals
  dependency-version: 17.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: typescript-eslint
  dependency-version: 8.71.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-10 04:16:05 -07:00
dependabot[bot] bd49d82250 chore(deps): bump the minor-and-patch group across 1 directory with 5 updates (#83)
Bumps the minor-and-patch group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [ai-forms](https://github.com/bitbaum/ai-forms) | `0.1.2` | `0.1.3` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.6.1` | `26.6.3` |
| [eslint](https://github.com/eslint/eslint) | `10.10.0` | `10.11.0` |
| [prettier](https://github.com/prettier/prettier) | `3.9.7` | `3.9.9` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.70.0` | `8.71.0` |



Updates `ai-forms` from 0.1.2 to 0.1.3
- [Commits](https://github.com/bitbaum/ai-forms/compare/v0.1.2...v0.1.3)

Updates `@types/node` from 26.6.1 to 26.6.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 10.10.0 to 10.11.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.10.0...v10.11.0)

Updates `prettier` from 3.9.7 to 3.9.9
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.7...3.9.9)

Updates `typescript-eslint` from 8.70.0 to 8.71.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.71.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: ai-forms
  dependency-version: 0.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: "@types/node"
  dependency-version: 26.6.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: eslint
  dependency-version: 10.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: prettier
  dependency-version: 3.9.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: typescript-eslint
  dependency-version: 8.71.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-08 10:29:48 -07:00
CatoandClaude Opus 5.5 9510350083 fix(reasoning): light reasoning for gemini-flash-latest only (1.20.1) (#82)
Probed 2026-10-02: on gemini-flash-latest the default spends ~500 hidden
reasoning tokens out of max_tokens (Substrata answers cut mid-word at ~550
visible tokens of 2400) and 4.1 s vs 2.5 s per answer turn. reasoning_effort
low removes them. Not sent to flash-lite (low turns its thinking ON) or
gemma (refused).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.20.1
2026-10-02 10:05:05 -07:00
CatoandClaude Opus 5.5 ae0a311bc8 feat(speech): speechChain, speechConfigured and looksLikeSilence, defined once (1.20.0) (#81)
Heidi defined its Groq Whisper chain and its silence denylist in its own
lib; Loki has copies; Substrata had none, so its microphone had no server
leg. ai-kit owns the chains: this is the dictation one, beside freeChain,
with the guard against Whisper's silence artefacts ('Untertitelung des
ZDF', 'Amen.') typing words nobody said.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.20.0
2026-10-02 04:55:54 -07:00
CatoandClaude Opus 5.5 6c8ae77f0e fix(stream): parallel tool calls without an index stay separate calls (1.19.1) (#80)
Gemini's OpenAI-compatible stream sends parallel tool calls with no
'index' and their own ids. Keyed on index alone they were glued into one
call whose arguments ({"query":"Russia"}{"kind":"country"}) parsed to
nothing, so every call ran with empty arguments — seen live in
Substrata's Ask. A new id on a slot that already holds a named call now
starts a new call, and glued argument objects are split back as a last
line of defence. Two tests, both failing on the old assembly.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.19.1
2026-10-02 02:58:50 -07:00
CatoandClaude Opus 5.5 a4aab78b65 fix(transcribe): a language Whisper has no code for never fails the take (1.19.0) (#79)
heidi's Swiss German pages passed their locale, gsw, as the language hint.
Groq answered 400 'unsupported language: gsw' on every link, and the
microphone said dictation did not work in this browser. Romansh (rm) failed
the same way. whisperLanguage() maps a tag or locale to a hint Whisper
accepts: gsw -> de, de-CH -> de, unknown -> none (auto-detect).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.19.0
2026-10-01 07:50:23 -07:00
CatoandClaude Opus 5.5 102ab386e7 fix(byok): a reader's own key never touches the deployment's bookkeeping (1.18.0) (#77)
byokChain links share their provider id with the deployment's link to the same
vendor (groq is groq), and every shared ledger in this package keys on it. So:

- Provider.byok marks an own-key link (set by byokChain).
- dayCapacityTokens never counts it, even with a *_DAILY_TOKENS override.
- createLinkCooldown never cools a link because of it — one reader's
  exhausted personal quota used to cool groq/<model> for everybody.
- tryChain / walkChain / completeStream record no health for it: one reader's
  bad key says nothing about whether the site's AI works.
- Quota readings about it carry byok: true, so an app's store can skip them.
- dailyTokens is 0, not Infinity: a caller summing it by hand adds nothing.
- New exports: isOwnKeyLink(link), healthFor(chain, health).

No live app was exposed (checked loki, substrata, heidi, orangecat, evig,
petvity: none fed an own-key chain into capacity); this closes the trap for
the next one. Each guard mutation-checked.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.18.0
2026-09-26 03:31:03 -07:00
CatoandClaude Opus 5.5 13c8e8c0cb feat(byok): "does this key work, and what can it use?" — probeByokKey (1.17.0) (#76)
The moment a reader pastes a key, a settings screen needs two answers: does
it work, and which models can it reach — so it can preselect the best one
instead of showing a text box and failing in the chat later. OrangeCat
answered the first and threw the second away; Loki had neither.

probeByokKey checks a key the way each vendor checks keys, verified against
the live endpoints on 2026-09-25:
- OpenRouter's /models is a public catalogue that answers 200 to a FAKE key,
  so its key is checked at /key.
- Anthropic's model list wants x-api-key plus a version header.
- Google and xAI reject a bad key with 400, not 401 — any non-2xx fails,
  in the vendor's own words, with the key masked if the vendor echoes it.
- An unreachable vendor is "couldn't check", never "your key is wrong".

The suggestion names no model (the newest ids that day were
claude-opus-5.5, gpt-6-luna-pro, grok-4.7 — none of which this package had
seen). It is the newest model in the strongest tier the key can use: tier
from the name, age from the vendor's dates or, where there are none
(Google), from the version in the name, with a vendor's -latest alias as
newest; speed variants never on top; a router's frontier-lab namespaces
first. Run live against real Groq, Gemini and OpenRouter keys it suggests
gpt-oss-120b, gemini-pro-latest and anthropic/claude-opus-5.5.

readCatalog is the one GET behind fetchCatalog, keeping the status and the
vendor's message that fetchCatalog deliberately collapses; ModelRecord gains
`created`. Additive: no existing export changes behaviour.


Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.17.0
2026-09-25 07:32:17 -07:00
CatoandClaude Opus 5.5 66e20a5f7e feat(transcribe): word timings, opt-in (1.16.0) (#75)
`transcribe({ words: true })` asks for `verbose_json` with word granularity
and returns normalised `words: [{ word, start, end }]`.

Why: Heidi measures HOW somebody spoke — speech rate, pauses between words,
length of run — and the text alone says which words, never when. The call
belongs here, not in Heidi: ai-kit owns every vendor request, and a second
hand-rolled Whisper call is the drift transcribe() was written to end.

The contract is absent-is-not-empty. `words` is omitted when timings were not
asked for or the vendor ignored the granularity ("not measured"), and is `[]`
only for a recording that was measured and contained nothing. A caller reading
absence as zero words would report a fluent speaker as silent. Missing timings
never fail the link — walking the chain would re-upload the audio to every
vendor for a nice-to-have. Impossible timings (end before start, NaN, empty
word) are dropped, not trusted.

Opt-in because dictation, the common caller, needs only the text and the
verbose body is several times larger. Proven by mutation: removing the
granularity request fails the request-shape test.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.16.0
2026-09-24 23:51:55 -07:00
CatoandClaude Opus 5.5 e939f31fc0 fix(stream): never cut the chain's last link by firstTokenMs (#74)
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
v1.15.0
2026-09-24 18:01:26 -07:00