Commit Graph
301 Commits
Author SHA1 Message Date
Cato a8023c4f9e Resolve the live free catalogue before building Cat fallback chains (#1557) 2026-11-04 15:35:41 +01:00
Cato ce4c1e64d2 Honor temporary chat and memory consent for economic learning (#1556) 2026-11-04 15:24:54 +01:00
Cato 702d5593de fix(cat): preserve failed turns and expose safe diagnostics (#1543) 2026-11-04 14:52:20 +01:00
Catoandcatomean 830fdf2d5a docs: site audit matrix + 2026-11-04 handoff (#1550)
* docs: living site audit (works/broken matrix)

* docs: handoff for 2026-11-04 site-fix sweep

* docs: handoff status after #1544/#1545/#1547 verified live

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-11-04 13:16:17 +01:00
Cato c3ffe478ea fix(cat): make permissions atomic and recovery reflect availability (#1542) 2026-11-03 11:21:13 +01:00
Cato 8172121e7d Enable Cat to manage project investor rooms (#1538) 2026-11-03 08:54:30 +01:00
CatoandClaude Fable 5.1 39bf29f158 test(bots): the rehearsal retries a gateway error once (#1516)
* 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

* fix(companions): a proposal is a worked example, and a bare block still becomes a card

Live on 2026-11-01 a fresh bot's first "Ask Loki" came back as "Here's the
query I'll send to Loki:" over a json fence holding {"question": "..."}:
the free-tier model copied the template's inner half and left out the
action, so the person saw code and no card.

- The hands section ends with a complete block for a real offered action,
  required fields filled with their own names, instead of a template with
  <id> and {...}; it says the block is the proposal itself and to write no
  other code block.
- extractProposal reads a propose, json or untagged fence at the end; a
  block with fields but no "action" names the one offered action that owns
  every field and has its required ones present; a propose fence that said
  nothing usable comes off so it is never shown as code.
- Tests for the example, the lenient read, the inference and its refusals.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(bots): a failed "Do it?" card is finished, a second card starts clean, no empty bubble

Seen live on 2026-11-01 (fresh thread, two asks of Loki):
- a card whose action ran and failed kept Confirm/Reject under the reason;
  the reason is now the outcome line, as a success would be
- the second card in the thread showed the first card's failure line inside
  it: the card is keyed by its action
- a model that wrote only the block left an empty bubble above the card:
  the card's description stands in for the words, and ask_loki is described
  as the question ("Ask Loki: ...") rather than "Execute Ask Loki"

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* test(bots): the five demos as one live rehearsal, run by a person

tests/e2e/bots-rehearsal.live.spec.ts walks the live site as a brand-new
person (a pseudonymous account minted at the start, no fixture secret): one
door, the shelf and a real letter, a group with two specialists in their
lanes, an event proposed and created from a "Do it?" card, Loki asked twice
with an honest outcome and a clean second card, a routine set and stopped,
and the API edges. Every assertion names the value it protects.

The Live rehearsal workflow runs it on workflow_dispatch only and keeps the
screenshots; it has no schedule, because a free-tier key is spent only when
a person asks (fleet rule 2026-09-25). docs/testing/live-rehearsal.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(bots): what a bot did stays in the thread

A "Do it?" card's outcome lived only in the slot above the composer: it left
the screen when a second card arrived and was gone on reload (seen live
2026-11-01). The confirm route now records the outcome as a line of the bot
conversation the card came from (services/companions/outcomes.ts): the
handler's own sentence with its page, or the reason it failed. The chat
re-reads the thread after the tap, so the line shows where it was asked
for, and the bot's next turn knows what happened.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* test(bots): the rehearsal retries a gateway error once

Seen 2026-11-01 at 16:50Z: the first post-deploy rehearsal passed six of
seven and failed the routine step on one PUT that answered 502, because
another merge (#1515) was rolling out at that second; the same call
answered 400 a minute later. An API call in the rehearsal now retries once
after five seconds on 502/503/504 and logs that it did; two in a row stay a
failure. Documented in docs/testing/live-rehearsal.md.

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>
2026-11-01 18:13:29 +01:00
CatoandClaude Fable 5.1 dc62ac87df feat(bots): what a bot did stays in the thread; the five demos as one live rehearsal (#1514)
* 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

* fix(companions): a proposal is a worked example, and a bare block still becomes a card

Live on 2026-11-01 a fresh bot's first "Ask Loki" came back as "Here's the
query I'll send to Loki:" over a json fence holding {"question": "..."}:
the free-tier model copied the template's inner half and left out the
action, so the person saw code and no card.

- The hands section ends with a complete block for a real offered action,
  required fields filled with their own names, instead of a template with
  <id> and {...}; it says the block is the proposal itself and to write no
  other code block.
- extractProposal reads a propose, json or untagged fence at the end; a
  block with fields but no "action" names the one offered action that owns
  every field and has its required ones present; a propose fence that said
  nothing usable comes off so it is never shown as code.
- Tests for the example, the lenient read, the inference and its refusals.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(bots): a failed "Do it?" card is finished, a second card starts clean, no empty bubble

Seen live on 2026-11-01 (fresh thread, two asks of Loki):
- a card whose action ran and failed kept Confirm/Reject under the reason;
  the reason is now the outcome line, as a success would be
- the second card in the thread showed the first card's failure line inside
  it: the card is keyed by its action
- a model that wrote only the block left an empty bubble above the card:
  the card's description stands in for the words, and ask_loki is described
  as the question ("Ask Loki: ...") rather than "Execute Ask Loki"

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* test(bots): the five demos as one live rehearsal, run by a person

tests/e2e/bots-rehearsal.live.spec.ts walks the live site as a brand-new
person (a pseudonymous account minted at the start, no fixture secret): one
door, the shelf and a real letter, a group with two specialists in their
lanes, an event proposed and created from a "Do it?" card, Loki asked twice
with an honest outcome and a clean second card, a routine set and stopped,
and the API edges. Every assertion names the value it protects.

The Live rehearsal workflow runs it on workflow_dispatch only and keeps the
screenshots; it has no schedule, because a free-tier key is spent only when
a person asks (fleet rule 2026-09-25). docs/testing/live-rehearsal.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(bots): what a bot did stays in the thread

A "Do it?" card's outcome lived only in the slot above the composer: it left
the screen when a second card arrived and was gone on reload (seen live
2026-11-01). The confirm route now records the outcome as a line of the bot
conversation the card came from (services/companions/outcomes.ts): the
handler's own sentence with its page, or the reason it failed. The chat
re-reads the thread after the tap, so the line shows where it was asked
for, and the bot's next turn knows what happened.

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>
2026-11-01 17:27:00 +01:00
CatoandClaude Fable 5.1 30ed087aef feat(bots): a bot writes first on the person's own key, and can ask Loki as them (#1503)
* 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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 07:40:33 +01:00
CatoandClaude a331ba9aa4 feat(bots): hands — a bot proposes, the person taps (#1500)
A companion answers on any model, with or without tool calling, so it does
not call tools: it proposes. The owner's own companion is told what
OrangeCat can do for them (hands.ts: an event, a project, a product, a
service, a wishlist, a hand-off to Loki; nothing that moves money, nothing
high-risk) and ends an answer with one fenced block naming the action and
its parameters. The server takes the block off the words, validates the
parameters against the registry, asks the Cat's permission service and
writes the Cat's own consent row (hands-server.ts); the chat shows the
Cat's "Do it?" card (DoItCard), and the tap runs the Cat's executor. A bot
can set nothing in motion that the Cat could not, a standing grant given
here holds for the Cat too, and nothing exists until the tap, so a bot
never says a thing is done. Only the owner, only in the bot's own chat,
never in a group.

The boundary test that keeps companion code out of the Cat's mind now
names what stays forbidden (the executor, the loop, the tools, the
handlers) and lets the consent plumbing through, for the same reason the
credits ledger was never on its list. The ADR records D9 (hands) and the
decision on D6 and D7 (connectors through the ai-kit MCP client, routines
on a chosen budget, in that order).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 05:46:39 +01:00
CatoandClaude cb543d2579 feat(bots): one list with the Cat first, a shelf of ready bots, lanes in groups (#1496)
Companions are now Bots, and the Cat is the first row of the list: the one
bot here that acts on OrangeCat, the same panel as its own page, so wanting
something done never means knowing a second page.

New bot opens on a shelf of five that come with a job (Letter Reader, Pitch
Coach, Day Planner, Writing Partner, Study Buddy): one tap makes one, with
the job under its name and a first line that says what to send it, written
at creation rather than asked of a model when the chat opens. Found live
2026-10-31: the greeting lost the race to the person's first message, and
the bot asked what it was for after being told. A blank bot greets at
creation the same way, and takes a job stated in the first message instead
of asking again.

In a group chat each bot keeps to its job: the router names every member
whose job a part of the question is, the room rule says to hand another's
part over with an @ rather than answer in its place, and the floor passes
to a member whose part is still open. Found live: a question with a medical
and a legal half, sent to nobody by name, was answered whole by Causius.

Every bot's definition now carries one honesty rule: never invent a number,
a name, a date or a source; write [X] and say what to fill in. Found live: a
pitch rewrite opened with a statistic from nowhere.

The ADR records what a Grok Bot bot actually is (a teammate with a cloud
computer), so the shape is not mistaken for the substance.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 19:40:50 +01:00
CatoandClaude Fable 5.1 df23a30286 feat(companions): the job you give a companion becomes its definition (#1490)
* feat(companions): one home where companions talk, together and with the fleet

/companions/talk is the messaging-app home for every companion: one list of
bots and group chats, newest first, with face, "Name · job", last line and
when; "+" offers New companion (name, shape, colour — the job is defined in
chat) and New group chat (two to six members, @-mentions, bot-to-bot
handoff, six bot turns a round, every line says who said it). The fleet's
own bots (Diplodoctor, Causius) sit in the same list and the same rooms over
one /api/ask contract, their identity from the fleet map; a 1:1 chat with
them stays in the browser. Members can be added and removed from the
details sheet. Companions is in the sidebar's More section.

Three owner-only tables (companion_rooms, _members, _messages) under RLS;
room services for mentions, planning, prompts, the fleet contract and
rounds; faces as a static SVG route. ADR-0013 records the decisions and
what is deferred (connectors = MCP + skills, routines, voice). The Grok Bot
screenshots that shaped this live in docs/research/grok-bot/ with an index.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): the fleet's agents wear their own marks, one-line intro, no header overlap

Diplodoctor and Causius are products with their own identity; this page is
only the room where they can be reached and combined. Each now shows the
mark its own site serves (/icon.svg) in the list, the header, the details
sheet and group chats, instead of a face made up here. A fleet chat opens on
one line and a way into the product, not the whole description. chatkit
renders the empty slot outside its padded scroller, so the first screen
takes the screen's published insets and no longer sits under the header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(companions): attach photos, PDFs and files in every companions chat

The paperclip was off in the companions home because none of its three
backends took a file. It is on now, and it is the Cat's: chatkit's
composer with the Cat's limits and PDF reader, the Cat's tagged message
blocks for text, the Cat's photo store and image parts for pictures.
Nothing about attaching is written a second time.

- A companion, one to one: the file is read, the photo is seen; the user
  line keeps the tags so a reload shows the chips.
- A group chat: the photo is stored once with the person's line and read
  back by each member's turn, which runs in its own request.
- A fleet bot: an attached document goes to the product as `context` (the
  field Diplodoctor's contract has, Causius gets in #91); a line is cut to
  the contract's caps; a photo is turned away at the box with the reason.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): fleet marks through OrangeCat, one-word job lines

Both products answer /icon.svg with cross-origin-resource-policy:
same-origin, so a browser on orangecat.ch showed a broken picture where
Diplodoctor\x27s and Causius\x27s marks should be (measured 2026-10-30). The
mark is now served by /api/ai-assistants/fleet/[slug]/mark, which fetches
the product\x27s SVG, checks it is one, and falls back to the face the name
picks when it is not. The job line under a fleet bot\x27s name is the one
word the map\x27s own phrasing gives ("The health layer of the fleet" →
"health"), so "Diplodoctor · health" fits a row and a speaker label.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): a fleet bot in a group chat is told who else is there

A companion\x27s room rules (the others\x27 names and jobs, speak as yourself
only, @ a companion once when you need it) sat under its own definition
in the system prompt, but a fleet bot\x27s prompt lives on its site, so it
got only the transcript. On the live site Causius wrote Diplodoctor\x27s
answer inside its own line (2026-10-30). The same room section now goes
with every fleet request as the contract\x27s `scene` (roomScene, cut to
the contract\x27s 1,000 characters), which Diplodoctor and Causius put
after their rules.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(companions): a group chat is a conversation, not a staging

Tested on the live site with two fleet bots on one cross-domain problem
and two made companions (a builder and a skeptic) on a launch plan: each
member answered once and well, but nobody answered anyone, a bot asked to
discuss wrote both voices inside its own line, and a companion given a job
in its own thread asked for it again in the room. Three rules, all within
the round's six lines:

- A companion's memories of the person (its job) come into the room with
  it, as they do one to one; a born companion never asks its question
  again once it knows its job.
- A line that stages another member's voice is cut where that voice
  begins and that member answers for itself (cutImpersonation). One line
  addressed to a member is a question and stays.
- When a line addresses nobody and turns remain, one small router call
  (pickNext) says whether the exchange is over or who speaks next: the
  person asked for a discussion that is unfinished, a question is open,
  or a disagreement stands.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): a name that opens a sentence addresses that member too

Re-tested on the live site after the conversation rules deployed: the
builder and the skeptic now trade lines and revise, but in the fleet
pair only Diplodoctor spoke to a message that named both ("Diplodoctor:
… Causius: …"), and "Diplodoctor, your turn" from Causius passed the
floor to nobody. A member name that opens a sentence, followed by a
colon or a comma, now counts as addressing, for the person and for the
bots, in order of appearance with the @ mentions. A bot that labels its
own line with its name ("Skeptic: …") loses the label; the thread says
who spoke.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(companions): the job you give a companion becomes its definition

Dogfooding on the live site: two companions were given jobs in their own
threads, then seated in a group chat to design improvements for Loki
assistant. Both asked "What should I help you with most?" again. The job
lived only as an extracted memory, which did not always exist and never
reached the room. The owner first answer to a born companion question now
rewrites the companion itself (system_prompt and the description under
its name), so it holds in every conversation, group chat and clone, and
the question is never asked again. A member that answers with nothing is
a failed line with Retry, never an empty bubble.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* chore(deps): joi 18.3.1, the patched release for GHSA-4528-x5fx-h6hg

The security job on the companions pull request went red on a new high
advisory in joi (quadratic-time split in string().email({ multiple:
true })), reached only through @hookform/resolvers. The existing override
is raised to the patched release; pnpm audit --prod passes at the gate's
level again.

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>
2026-10-31 04:37:51 +01:00
CatoandClaude Fable 5.1 91c0e858ae feat(companions): a group chat is a conversation, not a staging (#1488)
* feat(companions): one home where companions talk, together and with the fleet

/companions/talk is the messaging-app home for every companion: one list of
bots and group chats, newest first, with face, "Name · job", last line and
when; "+" offers New companion (name, shape, colour — the job is defined in
chat) and New group chat (two to six members, @-mentions, bot-to-bot
handoff, six bot turns a round, every line says who said it). The fleet's
own bots (Diplodoctor, Causius) sit in the same list and the same rooms over
one /api/ask contract, their identity from the fleet map; a 1:1 chat with
them stays in the browser. Members can be added and removed from the
details sheet. Companions is in the sidebar's More section.

Three owner-only tables (companion_rooms, _members, _messages) under RLS;
room services for mentions, planning, prompts, the fleet contract and
rounds; faces as a static SVG route. ADR-0013 records the decisions and
what is deferred (connectors = MCP + skills, routines, voice). The Grok Bot
screenshots that shaped this live in docs/research/grok-bot/ with an index.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): the fleet's agents wear their own marks, one-line intro, no header overlap

Diplodoctor and Causius are products with their own identity; this page is
only the room where they can be reached and combined. Each now shows the
mark its own site serves (/icon.svg) in the list, the header, the details
sheet and group chats, instead of a face made up here. A fleet chat opens on
one line and a way into the product, not the whole description. chatkit
renders the empty slot outside its padded scroller, so the first screen
takes the screen's published insets and no longer sits under the header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(companions): attach photos, PDFs and files in every companions chat

The paperclip was off in the companions home because none of its three
backends took a file. It is on now, and it is the Cat's: chatkit's
composer with the Cat's limits and PDF reader, the Cat's tagged message
blocks for text, the Cat's photo store and image parts for pictures.
Nothing about attaching is written a second time.

- A companion, one to one: the file is read, the photo is seen; the user
  line keeps the tags so a reload shows the chips.
- A group chat: the photo is stored once with the person's line and read
  back by each member's turn, which runs in its own request.
- A fleet bot: an attached document goes to the product as `context` (the
  field Diplodoctor's contract has, Causius gets in #91); a line is cut to
  the contract's caps; a photo is turned away at the box with the reason.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): fleet marks through OrangeCat, one-word job lines

Both products answer /icon.svg with cross-origin-resource-policy:
same-origin, so a browser on orangecat.ch showed a broken picture where
Diplodoctor\x27s and Causius\x27s marks should be (measured 2026-10-30). The
mark is now served by /api/ai-assistants/fleet/[slug]/mark, which fetches
the product\x27s SVG, checks it is one, and falls back to the face the name
picks when it is not. The job line under a fleet bot\x27s name is the one
word the map\x27s own phrasing gives ("The health layer of the fleet" →
"health"), so "Diplodoctor · health" fits a row and a speaker label.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): a fleet bot in a group chat is told who else is there

A companion\x27s room rules (the others\x27 names and jobs, speak as yourself
only, @ a companion once when you need it) sat under its own definition
in the system prompt, but a fleet bot\x27s prompt lives on its site, so it
got only the transcript. On the live site Causius wrote Diplodoctor\x27s
answer inside its own line (2026-10-30). The same room section now goes
with every fleet request as the contract\x27s `scene` (roomScene, cut to
the contract\x27s 1,000 characters), which Diplodoctor and Causius put
after their rules.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(companions): a group chat is a conversation, not a staging

Tested on the live site with two fleet bots on one cross-domain problem
and two made companions (a builder and a skeptic) on a launch plan: each
member answered once and well, but nobody answered anyone, a bot asked to
discuss wrote both voices inside its own line, and a companion given a job
in its own thread asked for it again in the room. Three rules, all within
the round's six lines:

- A companion's memories of the person (its job) come into the room with
  it, as they do one to one; a born companion never asks its question
  again once it knows its job.
- A line that stages another member's voice is cut where that voice
  begins and that member answers for itself (cutImpersonation). One line
  addressed to a member is a question and stays.
- When a line addresses nobody and turns remain, one small router call
  (pickNext) says whether the exchange is over or who speaks next: the
  person asked for a discussion that is unfinished, a question is open,
  or a disagreement stands.

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>
2026-10-30 22:14:37 +01:00
CatoandClaude Fable 5.1 ad116886bb fix(companions): a fleet bot in a group chat is told who else is there (#1482)
* feat(companions): one home where companions talk, together and with the fleet

/companions/talk is the messaging-app home for every companion: one list of
bots and group chats, newest first, with face, "Name · job", last line and
when; "+" offers New companion (name, shape, colour — the job is defined in
chat) and New group chat (two to six members, @-mentions, bot-to-bot
handoff, six bot turns a round, every line says who said it). The fleet's
own bots (Diplodoctor, Causius) sit in the same list and the same rooms over
one /api/ask contract, their identity from the fleet map; a 1:1 chat with
them stays in the browser. Members can be added and removed from the
details sheet. Companions is in the sidebar's More section.

Three owner-only tables (companion_rooms, _members, _messages) under RLS;
room services for mentions, planning, prompts, the fleet contract and
rounds; faces as a static SVG route. ADR-0013 records the decisions and
what is deferred (connectors = MCP + skills, routines, voice). The Grok Bot
screenshots that shaped this live in docs/research/grok-bot/ with an index.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): the fleet's agents wear their own marks, one-line intro, no header overlap

Diplodoctor and Causius are products with their own identity; this page is
only the room where they can be reached and combined. Each now shows the
mark its own site serves (/icon.svg) in the list, the header, the details
sheet and group chats, instead of a face made up here. A fleet chat opens on
one line and a way into the product, not the whole description. chatkit
renders the empty slot outside its padded scroller, so the first screen
takes the screen's published insets and no longer sits under the header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(companions): attach photos, PDFs and files in every companions chat

The paperclip was off in the companions home because none of its three
backends took a file. It is on now, and it is the Cat's: chatkit's
composer with the Cat's limits and PDF reader, the Cat's tagged message
blocks for text, the Cat's photo store and image parts for pictures.
Nothing about attaching is written a second time.

- A companion, one to one: the file is read, the photo is seen; the user
  line keeps the tags so a reload shows the chips.
- A group chat: the photo is stored once with the person's line and read
  back by each member's turn, which runs in its own request.
- A fleet bot: an attached document goes to the product as `context` (the
  field Diplodoctor's contract has, Causius gets in #91); a line is cut to
  the contract's caps; a photo is turned away at the box with the reason.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): fleet marks through OrangeCat, one-word job lines

Both products answer /icon.svg with cross-origin-resource-policy:
same-origin, so a browser on orangecat.ch showed a broken picture where
Diplodoctor\x27s and Causius\x27s marks should be (measured 2026-10-30). The
mark is now served by /api/ai-assistants/fleet/[slug]/mark, which fetches
the product\x27s SVG, checks it is one, and falls back to the face the name
picks when it is not. The job line under a fleet bot\x27s name is the one
word the map\x27s own phrasing gives ("The health layer of the fleet" →
"health"), so "Diplodoctor · health" fits a row and a speaker label.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): a fleet bot in a group chat is told who else is there

A companion\x27s room rules (the others\x27 names and jobs, speak as yourself
only, @ a companion once when you need it) sat under its own definition
in the system prompt, but a fleet bot\x27s prompt lives on its site, so it
got only the transcript. On the live site Causius wrote Diplodoctor\x27s
answer inside its own line (2026-10-30). The same room section now goes
with every fleet request as the contract\x27s `scene` (roomScene, cut to
the contract\x27s 1,000 characters), which Diplodoctor and Causius put
after their rules.

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>
2026-10-30 12:39:51 +01:00
CatoandClaude Fable 5.1 71a7281027 feat(companions): attachments in every chat; fleet marks served here; one-word job lines (#1480)
* feat(companions): one home where companions talk, together and with the fleet

/companions/talk is the messaging-app home for every companion: one list of
bots and group chats, newest first, with face, "Name · job", last line and
when; "+" offers New companion (name, shape, colour — the job is defined in
chat) and New group chat (two to six members, @-mentions, bot-to-bot
handoff, six bot turns a round, every line says who said it). The fleet's
own bots (Diplodoctor, Causius) sit in the same list and the same rooms over
one /api/ask contract, their identity from the fleet map; a 1:1 chat with
them stays in the browser. Members can be added and removed from the
details sheet. Companions is in the sidebar's More section.

Three owner-only tables (companion_rooms, _members, _messages) under RLS;
room services for mentions, planning, prompts, the fleet contract and
rounds; faces as a static SVG route. ADR-0013 records the decisions and
what is deferred (connectors = MCP + skills, routines, voice). The Grok Bot
screenshots that shaped this live in docs/research/grok-bot/ with an index.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): the fleet's agents wear their own marks, one-line intro, no header overlap

Diplodoctor and Causius are products with their own identity; this page is
only the room where they can be reached and combined. Each now shows the
mark its own site serves (/icon.svg) in the list, the header, the details
sheet and group chats, instead of a face made up here. A fleet chat opens on
one line and a way into the product, not the whole description. chatkit
renders the empty slot outside its padded scroller, so the first screen
takes the screen's published insets and no longer sits under the header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(companions): attach photos, PDFs and files in every companions chat

The paperclip was off in the companions home because none of its three
backends took a file. It is on now, and it is the Cat's: chatkit's
composer with the Cat's limits and PDF reader, the Cat's tagged message
blocks for text, the Cat's photo store and image parts for pictures.
Nothing about attaching is written a second time.

- A companion, one to one: the file is read, the photo is seen; the user
  line keeps the tags so a reload shows the chips.
- A group chat: the photo is stored once with the person's line and read
  back by each member's turn, which runs in its own request.
- A fleet bot: an attached document goes to the product as `context` (the
  field Diplodoctor's contract has, Causius gets in #91); a line is cut to
  the contract's caps; a photo is turned away at the box with the reason.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* fix(companions): fleet marks through OrangeCat, one-word job lines

Both products answer /icon.svg with cross-origin-resource-policy:
same-origin, so a browser on orangecat.ch showed a broken picture where
Diplodoctor\x27s and Causius\x27s marks should be (measured 2026-10-30). The
mark is now served by /api/ai-assistants/fleet/[slug]/mark, which fetches
the product\x27s SVG, checks it is one, and falls back to the face the name
picks when it is not. The job line under a fleet bot\x27s name is the one
word the map\x27s own phrasing gives ("The health layer of the fleet" →
"health"), so "Diplodoctor · health" fits a row and a speaker label.

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>
2026-10-30 11:45:45 +01:00
CatoandClaude e4719fdc80 feat(brand): the cat rotorelief, and Loki's disc, replace the coils (#1476)
The Cat's mark is now a cat's head whose face is one of Duchamp's
rotoreliefs (Anémic Cinéma, 1926): off-centre rings that, turned, read
as a tunnel breathing in and out. Only the rings turn (new motion
'turn', about the face's centre); the head stays still. On its icon tile
the Cat wears Bitcoin orange (new iconInk); elsewhere it is currentColor.

Loki's mark mirrors bitbaum/loki's new rotorelief disc.

The installed OrangeCat icon showed as a blank black tile on an Android
home screen. The manifest was the only one in the fleet listing its SVG
icon first; generate:brand now lists the PNGs first and the SVG last.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 09:52:18 +01:00
CatoandClaude a06b0b0808 feat(companions): one home where companions talk, together and with the fleet (#1474)
/companions/talk is the messaging-app home for every companion: one list of
bots and group chats, newest first, with face, "Name · job", last line and
when; "+" offers New companion (name, shape, colour — the job is defined in
chat) and New group chat (two to six members, @-mentions, bot-to-bot
handoff, six bot turns a round, every line says who said it). The fleet's
own bots (Diplodoctor, Causius) sit in the same list and the same rooms over
one /api/ask contract, their identity from the fleet map; a 1:1 chat with
them stays in the browser. Members can be added and removed from the
details sheet. Companions is in the sidebar's More section.

Three owner-only tables (companion_rooms, _members, _messages) under RLS;
room services for mentions, planning, prompts, the fleet contract and
rounds; faces as a static SVG route. ADR-0013 records the decisions and
what is deferred (connectors = MCP + skills, routines, voice). The Grok Bot
screenshots that shaped this live in docs/research/grok-bot/ with an index.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 09:16:12 +01:00
CatoandClaude fa09bc6a4f docs(agents): fold CLAUDE.md and .claude/CLAUDE.md into AGENTS.md (#1472)
Both CLAUDE.md files now only point at AGENTS.md, the fleet's one
agent-file shape (bitbaum/fleet scripts/ci/agent-rules.mjs). What was
still true moves into AGENTS.md: the principles and the entity test, the
shipping hand-offs (re-arm, post-main), the self-hosted Supabase read and
migration path, the design tiers and the one-orange rule, and the money
surface as the reference for one shape per kind. Every named path,
script, workflow key and component was checked against the tree.

Dropped as stale or copied:
- `.claude/CLAUDE.md` still listed the warm accent as `#ff5c00`; the root
  file and globals.css say it is gone (accent = Bitcoin orange).
- a machine-specific project path, the duplicated stack table and the
  `.claude/rules` restatements (those files remain).

Docs and comments that sent readers to CLAUDE.md for "Shipping" or the
principles now point at the AGENTS.md sections.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 10:57:51 +01:00
Cato 20d75f1b9a feat(auth): one password rule from @bitbaum/accountkit (non-empty, up to 128) (#1461)
* feat(auth): one password rule from accountkit (non-empty, up to 128); remove complexity rules, common-password list and strength meter

* fix(auth): reset-password form and settings use the one rule; drop stale 8-char docs example

* docs(utils): password example follows the one rule
2026-10-28 04:03:10 +01:00
CatoandClaude Sonnet 5.5 398463e70a feat(cat): the Cat chat is chatkit's ChatApp (#1447)
* feat(cat): the Cat chat is chatkit's ChatApp

The Cat chat now renders @bitbaum/chatkit 0.18's ChatApp: its header, chat
list (drawer on a phone, rail from 64rem) with search and Today/Yesterday/
Earlier, rename and delete, New chat, Temporary chat, reopening the open chat
after a reload, Camera · Photos · Files with thumbnails, the queue, Stop and
Retry. The Cat keeps only its transport and its words.

- useCatTransport: the Cat's stream (and the local-model loop) as ChatApp's
  transport; tool calls stream as steps; a temporary chat runs in an unlisted
  ephemeral row deleted when it is left.
- catConversationStore: chatkit's ConversationStore over API_ROUTES.CAT;
  the chat route still writes every turn (append is a no-op), nothing is
  kept on the device but the open chat's id.
- API: PATCH /api/cat/conversations/[id] renames; GET is a 404 for a chat
  that is not the person's (it returned the default thread); POST takes a title.
- CatAnswerFooter under each answer: tool chips, destinations, actions,
  action results, drafts, provenance, fallback, upgrade nudge, failure fixes.
- Deleted: ConversationRail, useConversations (incl. its temporary chat),
  useChatHistory, useChatMessages, ChatHeader, MessageBubble,
  MessageAttachments, ErrorDisplay; TalkRoom draws chatkit's ChatMessage.

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

* fix(cat): 44px targets in the chat's composer and header

The model picker, Loki and tool chips sat under 44px beside ChatApp's own
controls; the model's name hides on a phone so the composer's tools stay
one row.

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

* feat(cat): PDF reading through ChatApp — chatkit 0.21's attach.readFile

Moving the Cat onto ChatApp dropped the PDF reading main's #1449 added to the
old composer (chatkit's attach refused every PDF). chatkit 0.21.0 adds
attach.readFile; the Cat's reader (readCatFile) calls the same attachPdf as
before: same size limit, same sentences, same pictures-per-message (5, shared
with staged photos), same text-or-sheets result. The live PDF spec now reads
chatkit's staged strip.

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

* ci(cat): browser-smoke.yml — the real-browser check the rollout gate asks of a chat consumer

The fleet's shared-package gate holds a chatkit consumer PR until
browser-smoke.yml has passed on its commit; OrangeCat had no such workflow on
main (only on the unmerged PayKit branch), so every chatkit PR here waited
forever. This one builds the standalone app, signs in as the E2E account and
opens the Cat at 390 and 1280 (composer, Send, Files input, no sideways
scroll), then runs the live PDF-attach spec against it. No model call.

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

* test(cat): the smoke spec says what the page showed when the composer is missing

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 23:51:36 +01:00
Cato 658883af58 fix(integrations): restore identity choices and recoverable controls (#1421)
* fix(integrations): restore identities and recoverable permission controls

* fix(integrations): use patched URI validation
2026-10-24 02:12:24 +02:00
Cato 7618207d2b fix(ui): return confirmation focus to its actual opener (#1420) 2026-10-23 18:53:17 +02:00
Cato e9ebf1800c fix(ui): keep mobile sheet scrolling separate from dismissal (#1419) 2026-10-23 18:36:50 +02:00
Cato 2dec38a8de fix(timeline): preserve account-scoped drafts when closing composer (#1417) 2026-10-23 18:29:40 +02:00
Cato 58550f1ec3 fix(pwa): remove unsupported install metadata and stale copy (#1414) 2026-10-23 18:01:10 +02:00
CatoandClaude Fable 5.1 7be4d2dd1e feat(chat): the answer feedback loop — thumbs, transcript export, nightly review (#1398)
* feat(chat): the answer feedback loop — thumbs, transcript export, nightly review

Under every Cat answer, chatkit 0.14's thumb up and thumb down (one shape in
every fleet product): a thumb down asks why in one tap and takes a few words,
and the app posts it to POST /api/chat/feedback, stored in the new
chat_feedback table beside the conversation (RLS: insert by the owner, no
read through the API keys). A thumb on an answer still on screen resolves to
the conversation's newest stored answer, since the thread never learns the
row id of a live turn.

GET /api/chat/review-export serves the day's conversations to the fleet's
nightly reviewer (Loki) as chatkit's ChatTranscript[]: bearer
CHAT_REVIEW_TOKEN compared in constant time (401 wrong, 503 unset), never a
temporary chat, newest first, at most 50, 30 turns each, 4000 chars a turn,
the tool steps Cat took, a failed flag on a turn that died, and the thumbs —
with no name, email, user or actor id. The scope sentence is derived from
Cat's own system prompt and tool list, never typed twice.

- @bitbaum/chatkit ^0.14.0
- .env.example names CHAT_REVIEW_TOKEN; docs/reference/api/chat.md has the loop
- the export's bare {product, scope, transcripts} is a fleet wire format, so
  the envelope lint rule carves it out like LNURL
- unit tests for the token check, the export shape and the feedback schema

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

* chore(deps): next 16.4.2 — the audit's critical and high advisories

The dependency audit failed on this PR's head with two Next.js advisories
(>=16.0.0 <=16.4.0: unauthenticated RCE, App Router DoS), published after
main last went green. Not this PR's change; the fix is upstream, so it
rides here. `pnpm audit --audit-level=high --prod` is clean again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 14:19:26 +02:00
Cato 4d002d3dd8 fix(cat): make editor directions actionable without unsolicited upgrades (#1413) 2026-10-23 13:00:30 +02:00
Cato 023673bb56 fix(bookings): recover failed loads and scope view filters (#1412) 2026-10-23 12:42:52 +02:00
Cato 8b0e92c29a fix(tasks): apply filters and recover failed list requests (#1410) 2026-10-23 12:26:32 +02:00
Cato 945e790532 fix(dashboard): reuse the shared Cat intent composer (#1409) 2026-10-23 12:09:18 +02:00
Cato 8ef96f64b8 fix(cat): ground application navigation in verified capabilities (#1407) 2026-10-23 12:01:38 +02:00
Cato e7307befe9 fix(settings): name controls and serialize preference saves (#1405) 2026-10-23 11:49:48 +02:00
Cato 30ee22a14b fix(articles): preserve and scope the device draft library (#1404) 2026-10-23 11:37:31 +02:00
Cato ee8a955e4f fix(cat): open writing suggestions and keep passive memory useful (#1401) 2026-10-22 21:21:21 +02:00
Cato 4ad63c1187 Enforce authenticated author identity in the legacy post writer (#1396) 2026-10-22 20:30:32 +02:00
Cato 02d3f86c54 Preserve unsaved article text during draft switching and clearing (#1397) 2026-10-22 20:16:32 +02:00
Cato 7e8cb63e63 Clarify profile setup and repair mobile navigation and create dialogs (#1399) 2026-10-22 20:08:52 +02:00
Cato a875b88606 Repair private article ownership and focused writing routes (#1395) 2026-10-22 19:00:45 +02:00
Cato 372e4ebba8 Repair messaging interactions, mobile submit taps and session hydration (#1389)
* Refactor dashboard and activity layout and correct derived state

* Repair messaging interactions, session hydration and shared form controls

* Preserve mobile submit taps and isolate release login sessions
2026-10-22 18:48:12 +02:00
Cato 2be2861eaa Protect article drafts on navigation and focus the writing surface (#1388) 2026-10-22 11:04:09 +02:00
Cato 481e7ba780 Refactor dashboard and activity layout and correct derived state (#1386) 2026-10-22 10:34:51 +02:00
Cato 9e17bed51e Unify Cat branding, refresh install icons, and restore mobile writing choices (#1384)
* Restore article discovery and refactor the header create menu

* Unify Cat branding and refresh installed icons; restore mobile creation choices

* Use the canonical Cat mark across remaining app and public surfaces

* Load the current app shell on launch and keep cached navigation for offline use
2026-10-22 03:30:58 +02:00
Cato f4877dd41b Start with a feeling: music, writing and artwork in the Studio (#1378)
* Create from a feeling in the Studio, with playable original sketches

* Explain public image storage at the Studio generation action
2026-10-21 20:31:53 +02:00
CatoandClaude 110f74b269 feat(money): one orange, an invoice a phone can act on, Zcash for Monero (#1376)
- The accent is Bitcoin orange. `--public-accent` resolves to
  `--bitcoin-orange` (#f7931a); the #ff5c00 warm accent is gone from this
  repo (owner: "I prefer Bitcoin orange"). Orange now means exactly two
  things — Bitcoin, and the one action that brings someone in — written
  down in CLAUDE.md → "One orange".
- An invoice on a phone leads with Open in wallet and Copy invoice; the
  code sits behind "Show the code to scan" on phones (a phone cannot scan
  its own screen) and stays first from `sm` up. One line names the method
  and the deadline; the bare "Lightning" label and the second status line
  are gone.
- Zcash replaces Monero as the second self-custody rail. UPI links carry
  the payee name most UPI apps require.
- The scanner's "camera declined" card says where to allow it and has
  Try again beside Paste instead. No recipient lookup under the username
  minimum, so "Nobody goes by @m" never appears after one keystroke.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 08:26:25 +02:00
CatoandClaude 54dc1c6a20 feat(money): a way to be paid states its identity cost, can be shared on request, and comes from everywhere (#1375)
The first version printed a Twint row's phone number on the public pay page
for anyone with the link (owner: "do I really need to make my phone number
public?"). Pseudonymous by default means no.

- The registry is rebuilt on the three axes every rail actually differs on
  — identity (what the payer learns), custody (who holds it), reach (where
  and in what unit) — and docs/architecture/MONEY_RAILS.md says why once.
  `payerLearns(reveals)` builds the one sentence; the add sheet shows it
  above Save, and every row repeats it, the Bitcoin row included ("only
  @cato"), so the difference is a visible property.
- `visibility` column: `public` or `on_request`. An on-request row's
  handle is stripped on the server (toPublicPaymentMethod); the page shows
  the rail by name and an Ask button that opens a message to the owner
  (ROUTES.MESSAGES_TO, now also the profile's Message button). Phone-shaped
  rails default to on request.
- Rails from everywhere: Pix, UPI, M-Pesa, Alipay, WeChat Pay, PayNow,
  Swish, MobilePay, Bizum, Wero, Tikkie, Zelle, Interac e-Transfer, Monero.
  Validation is by handle kind (phone, username, IBAN, UPI id, Pix key,
  address, …), so a new rail is one registry entry. The sheet groups by
  region, worldwide first.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 07:28:41 +02:00
CatoandClaude 45fd5e076a docs: archive 2025 plans that read as current (#1351)
Forty-five 2025 plans, assessments, design scenarios, status reports and
superseded business docs move to docs/archive/ (same relative path). Each
described a plan or a snapshot as if it were the running system: strict:false,
a five-table schema, an "organization" entity, price_sats, a Gemini /api/chat
widget, a /auth/forgot-password page, Google Places, building group labels and
contract voting flows that never landed.

Fixed in place: NAVIGATION_UX_DESIGN.md (referenced by .claude/rules) gains a
status note naming what shipped and where; GENERIC_API_HANDLERS.md lists the
handler options the code actually takes; datetime_standards.md points at
scripts/dev/; CONTRIBUTING.md describes the auto-merge shipping flow. Inbound
links repointed (SECURITY.md at the root, SUPABASE_SCHEMA_GUIDE.md for schema).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:25:12 +02:00
CatoandClaude Opus 5.5 24c3d140ae docs: archive point-in-time records, fix live docs against the tree (#1349)
* docs: archive point-in-time records, drop broken guide symlinks

Status reports, progress trackers, audits, session summaries, completed
migration plans and the 2025 roadmap move to docs/archive/ (same relative
path), with a README saying they describe the day they were written.
.ai-guides/ held only symlinks into a docs/guides/ai/ that no longer
exists, tests/unit/docs/ held a stray copy of an old getting-started page,
and docs/operations/PORT_MANAGEMENT_README.md duplicated port-management.md;
all three are deleted.

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

* docs: correct drifted paths, links and versions in current docs

Fix in place the reference docs agents use: point paths at where the code
lives now (src/stores/auth.ts, src/lib/supabase/*, scripts/dev/*,
docs/reference/api/CONVENTIONS.md, the squashed baseline migration),
rewrite the development, features, operations and API index pages to list
documents that exist, say plainly where something is gone (/api/metrics,
the CSP report route, .envrc in the repo, Loki's `migrate` script), and
correct the Next.js major. docs-truth findings: 468 -> 2 (both "Next 30/90
Days" headings in the legal overview, a checker false positive).

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:09:06 +02:00
CatoandClaude Opus 5.5 b774f06de7 docs: correct drift in agent instructions, README and ops docs (#1348)
* docs: correct drift in agent instructions, README and ops docs

- Auto-merge sweep lives in bitbaum/fleet, not bitbaum/dotfiles; cd.yml is
  dispatch-only (handed off by ci.yml post-main), not a workflow_run listener
- Design-system docs match globals.css / tailwind.config.ts: warm accent
  #ff5c00, bg-bitcoinOrange (no bitcoin-orange utility), tiffany/orange are
  legacy; display typography is shipped
- .claude rules: real paths (src/lib/validation/, entityCrudHandler.ts,
  standardResponse.ts, withZod/withRateLimit/withRequestId, services/actors),
  real Button/Alert APIs, real rate limits, search via @bitbaum/searchkit,
  real payment modules, PostgREST instead of the POSTGRES_URL tunnel,
  lint-staged pre-commit, eslint.config.mjs
- README/AGENTS/REVIEW: Next 16 / TS 6 / Tailwind 4, pnpm, messaging is not
  E2E-encrypted yet, beta not Live, CD deploys, migrations apply on deploy
- docs/: deploy process, CI/CD, migrations guide, moved docs/ paths, stale
  CLI-entity and edge-function docs flagged

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

* style(docs): prettier on the docs touched by the drift fix

lint-staged would have run this; the commit was made without hooks.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 12:07:09 +02:00
CatoandClaude Sonnet 5.5 12bd7fe64e feat(oauth): a person chooses what each app is shown — name, username, picture (#1319)
* feat(oauth): a person chooses what each app is shown — name, username, picture

Until now every connected app received the same name, handle and picture.
That made "use Solon or Loki without an OrangeCat face" impossible, though
the identity (sub) is all an app needs to recognise someone.

- oauth_user_grants.withheld_claims: the profile claims one person keeps back
  from one app. Empty by default, so nothing changes until someone opts out.
- profileClaims takes the client and leaves a withheld claim ABSENT (not null)
  from the id token and from userinfo. sub and the email scope are untouched.
- Consent screen: three ticked boxes ("Show <app>: Name, Username, Picture"),
  one tap to untick. A hidden marker means an old or replayed form keeps the
  stored choice instead of hiding everything.
- Connected apps: the same three boxes per app, optimistic, with PATCH
  /api/connected-apps/[clientId]; unknown claim names are a 400.
- Developer page and ADR-0009 say the three claims can be missing.

Tests: the new claims cases fail against the old provider and pass now.

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

* docs(oauth): a change to what an app is shown applies at its next sign-in

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

* refactor(oauth): profile claims get their own module

oauthProvider.ts grew past the 500-line service limit with the withheld-claims
logic (check:sizes). The OIDC profile-claims builder moves, unchanged, to
oidcProfileClaims.ts so the file-size exception list does not grow. The name
avoids the unrelated "profile claims" feature (claiming unclaimed profiles).

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 06:45:08 -07:00
CatoandClaude Opus 5.5 f39bb1beff design: every mark is one file, replaced with one command (#1315)
* design: every mark is one file, replaced with one command

  pnpm run brand:import <slug> <file.svg>

converts any SVG (Figma, Illustrator, Inkscape, an icon set) into
src/config/marks/<slug>.ts, rebuilds the registry, and for this app's own
slug regenerates every static icon. Nothing else changes: the header,
hero, auth page, share cards, studio tiles, pillars and project banners
all render from the registry through one generic <Mark>, and know nothing
about which drawing they show.

- src/config/marks/: one data file per mark (viewBox + stroked/filled
  shapes + motion), a generated index (MARKS, markFor), and generators/
  for the marks drawn by code (OrangeCat's cat coil, Loki's coil). Solon's
  scales were imported through the new command from lucide's SVG.
- <Mark>, <ProjectMark slug> (mark from the registry, else the initial),
  BrandMarkIcon and the share-card mark all render any MarkDefinition.
  PillarMark and sibling-marks.ts are gone.
- Giving any studio project a face is the same command with its fleet
  slug; its tile and banner pick it up.
- The importer keeps geometry and how each shape is painted, drops colours
  and a full-size background, and refuses transforms, clip paths, masks,
  <use>, <text> and <image> with a message saying what to do, rather than
  producing a mark that is quietly wrong.
- The brand test is written against any mark: registry matches the folder,
  every mark is drawable, static icons equal exactly what the generator
  writes. Replacing the drawing never means rewriting the test.
- Brand scripts run with plain node: a dependency-free resolve hook maps @/
  and extensionless imports so they load the app's TypeScript directly.

Verified by swapping in a throwaway SVG end to end (icons regenerated,
background dropped, holes kept, gate green) and restoring the coil.

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

* fix(home): the badge fits a phone, the headline breaks at its tone, Loki's banner opens Loki

Found reviewing the live site after #1314 deployed:
- the three-part hero badge ran off a 390px screen; on phones it now
  carries the lead phrase alone
- the two-tone headline wrapped mid-phrase on desktop, so the dim tone
  started partway through a line; the tail now takes its own line from sm
- StudioProjectBanner reused the tile's link for its door, which for a
  project funded here is the page itself — Loki's banner had no way to
  open Loki. FleetTile now carries liveUrl, tested.

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

* fix(brand): the importer strips to a fixed point and refuses non-path data

CodeQL (3 high, incomplete multi-character sanitization): one pass of the
comment/<style> stripping over '<!<!--x-->-- … -->' leaves a fresh '<!--'
behind, and what it hid was then read as markup. The path is narrow — a
crafted SVG given to brand:import — but a mark's path data is written
verbatim into public files (favicon.svg), so it is closed twice:

- stripping repeats until nothing changes;
- every shape's path data must be pure path syntax (commands, numbers,
  separators), or the import is refused with a message. A quote or angle
  bracket can never reach a file, whatever the input looked like.

Tested both: a hidden shape behind a nested comment is not imported (a
single-pass strip imports it), and markup smuggled through a single-quoted
d is refused.

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

* fix(brand): read SVG comments and ignored blocks in one forward scan

CodeQL still flagged the comment/<style> stripping after a3e2b25: it does
not credit a repeat-until-stable loop, and rightly so in spirit — regex
removal is the wrong tool. withoutIgnoredMarkup() now walks the input once,
skipping comments, CDATA, processing instructions, doctypes and the
never-drawn blocks (defs, title, desc, metadata, style) by position. It
never re-reads what it emitted, so no removal can leave a new opener behind.
The CSS CDATA unwrap is split/join, not a regex replace.

Safety still rests on PATH_DATA: nothing but path syntax reaches a file.
Tests: contents of comments and never-drawn blocks are not imported; tangled
comments yield only path data; the scanner's skips are pinned. Re-importing
Solon's scales gives a byte-identical mark file.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 16:42:46 -07:00