mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-06 07:58:00 +01:00
* feat(cat): enforce BTC spend caps — per-action cap + daily budget max_btc_per_action existed since baseline but was never read; every Cat payment ignored it. Now enforced in CatPermissionService.checkSpendCaps (stricter of specific-action and category caps wins), checked early in executeAction and re-checked as a backstop in performAction so the confirm-later path can't bypass a cap that changed after proposal. - New max_btc_per_day column: daily BTC budget derived from cat_action_log.amount_btc (executing+completed rows; no new state) - API: maxSatsPerAction renamed maxBtcPerAction — old name validated .int() but stored raw into the BTC column (a '100 sats' cap would have stored 100 BTC); caps now omitted=keep, null=clear so grant toggles no longer wipe limits - Spending caps editor on the payments category row (semantic tokens, fiat equivalent via useDisplayCurrency) - 12 new tests: pure cap-combination, service checks, executor wiring Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(api): machine-payable v1 payments — the agent buy loop Closes the discover → quote → pay → verify loop under the /api/v1 contract. Discovery (entity list/get, /v1/search) already accepted integration keys; payment creation and settlement polling did not. - POST /api/v1/payments: dual-auth (ock_ keys with payments.write scope, or session), per-key rate bucket, wraps initiatePayment. Key callers are gated on the entity being anonymously visible so service-role writes can't reach non-public listings - GET /api/v1/payments/{id}: settlement status (payments.read) — 'paid' is verified against the receiving wallet, not claimed - OpenAPI: payments paths registered, including the previously unregistered anonymous /payments/public flow; scopes + endpoints added to the public-api SSOT (discovery + key-minting UI pick them up) - docs/api/AGENTS.md: the whole loop with curl examples; v1 README table - knownPaymentErrors extracted (shared by internal + v1 routes) - 8 tests: auth/scope/visibility gates + spec-generation pin Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(cat): surface spend-cap denial reasons on /api/cat/actions Live E2E of the caps found the route flattening every denial to 'Action not permitted', hiding which cap tripped and what to change. Denial reasons are derived from the user's own settings — safe and meant to be shown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(create): wallet selector on research, wishlist, and circle create forms Three entity types were registry-supportable (canReceiveSupport) but their create configs had no wallet selector — supportable on paper, unpayable in practice. research + wishlist were known (PR #504 follow-up); circle was found by the new guard test, which asserts every canReceiveSupport entity config exposes the WalletSelectorField group (never again this class). Zero migrations: the selector's _wallet_id links via /api/entity-wallets on the client after create, same as products/services. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(ops): nightly Cat outcome gate on the box (04:45 UTC) eval-cat-outcomes.mjs --gate as a systemd timer beside the judgment eval — trips when assistant activity exists but zero actions were logged (the dead-audit-pipeline tripwire). OnFailure wires into the box's notify-failure@ Telegram alert. Units are repo-SSOT and shipped by deploy-selfhost.sh; already installed and verified on bitbaum (first run: proposed 1 → published 0 → funded 0, exit 0). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
12 lines
299 B
SYSTEMD
12 lines
299 B
SYSTEMD
# SSOT: repo scripts/systemd/ — installed by deploy-selfhost.sh.
|
|
# Runs after the 04:30 judgment eval so the two nightly gates don't overlap.
|
|
[Unit]
|
|
Description=OrangeCat nightly Cat outcome gate (04:45 UTC)
|
|
|
|
[Timer]
|
|
OnCalendar=*-*-* 04:45:00 UTC
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|