mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-06 01:27:43 +01:00
* feat(bots): a bot writes first, on the person's own key A person can tell one of their bots to write first, every day at a time they pick, with a prompt they wrote. The run happens on the person's own OpenRouter key only; without a key the routine is kept, shown as waiting, and skipped with the reason, so no platform key is ever spent by a timer (fleet standing rule 2026-09-25). - companion_routines table (one per person per bot, owner-only RLS), routines-store (time validation, next run in the person's zone) and the runner behind a cron route + 15-minute systemd timer, registered as a person-asked timer in the no-background-ai gate with a marker check. - GET/PUT/DELETE /api/ai-assistants/[id]/routine for the owner. - RoutineRow in a bot's own chat: "Writes first, every day", time and prompt inline, a line to Settings when a key is missing. - Hands: the proposal line names what will be set up, never only "Sure"; a created event's outcome carries its link. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et * feat(bots): a bot can ask Loki, as the person — the first connector ask_loki: a Cat action (communication, low risk, confirmed) in the hands launch set. The bot relays a question over the signed OrangeCat → Loki rail to Loki's POST /api/orangecat/ask, which runs a read-only turn as the Loki user linked to the actor; Loki's own sentence is the outcome the person reads, and a refusal (no linked account, a spent budget) is relayed as written. A relayed question can never dispatch, approve or spend: that stays with send_task_to_loki, and the two verbs name each other so a question is never dispatched as a task. ADR-0013: D6 first connector and D7 recorded as shipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et * fix(bots): the routine's day-in-zone comes from the timezone helper check:app-locale (new on main) refuses a literal locale handed to Intl; the routine's next-run computation now takes the day in the person's zone from instantToWallTime, the one rendering the app already trusts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et * fix(bots): the chip knows the verb of ask_loki The tool-label table of leading verbs gains ask → Asking / Asked, so the chip for a bot's question to Loki never falls back to the generic label. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et * fix(cat): a failed "Do it?" card shows the server's sentence, not [object Object] The confirm and reject hook handed the API's error envelope (an object) to new Error(), so every failed action read "[object Object]". Seen live the first time a bot asked Loki for an account not linked to Loki: Loki's sentence naming the one step was on the action row and lost on the card. The hook, the memory import and the interests list now read the message through apiErrorMessage, the reader written for exactly this. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et * fix(companions): a bot keeps offering its hands on a repeat ask Live on 2026-11-01 the second "Ask Loki" in one thread came back as "I can ask Loki for you." with no fence and no "Do it?" card. The proposal fence is taken off a reply before it is stored, so the model saw its own earlier offers as plain sentences and copied them. - The queued proposal is kept in the assistant message's metadata. - The history given to the model writes the fence back onto those turns (withProposal), so a proposal in the history looks like one. - proposeFromReply returns the proposal as queued; hands tests cover the round trip and metadata reading. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et --------- Co-authored-by: Claude <noreply@anthropic.com>