Commit Graph
323 Commits
Author SHA1 Message Date
Catoandcatomean d17fdfad88 Sealed builds that actually start: NNP off for the unit, runsc without NoCgroups, slirp4netns, per-user image, crun (#1372)
* sealed-builds test: NoNewPrivileges toggle for diagnosis

* sealed test: qualified image name, image visibility diagnostics

* sealed test: store diagnostics

* sealed: load the agent image into the runner user's own store

* sealed test: diagnostic without runsc

* sealed: runtime matrix diagnostic

* Sealed builds that start: NNP off for the unit, runsc without NoCgroups, crun, per-user image

* Sealed builds: slirp4netns for rootless networking

* prettier

* test: sealed network is slirp4netns

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 18:23:50 +02:00
Catoandcatomean 0bf127e967 Sealed builds: opencode in the agent image; read/test/on/off workflow per runner unit (#1371)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 17:41:46 +02:00
CatoandClaude Fable 5.1 93ab3816a8 feat(loki): the start screen owns the phone too — floating chats · Loki · menu, nothing clipped (#1360)
* feat(loki): the start screen owns the phone too — floating chats · Loki · menu, nothing clipped

What the owner saw on /loki from his phone (2026-10-21) was the START
screen, which the thread redesign had left with the app shell: the app top
bar, the bottom tabs, the starters and the composer around an inner scroller
that clipped the spiral and the Build next row and drew Android's grey
scrollbars. "It says the thread fills the display edge to edge, but it
doesn't really."

Now the whole of /loki takes the phone (useImmersiveChat on the start screen
as well). The start screen is laid out like a thread: a floating one-line
header — chats (the history drawer, as the ChatGPT and Claude apps keep it)
· Loki · a menu that carries Home and every other page now that the tabs are
gone — and the composer floating at the bottom with the starters above it,
where the thumb is. The greeting, the recent chats and Build next scroll
under both with the measured insets as padding, so nothing is cut off
between two bars. Build next and the starter row scroll sideways with no
scrollbar and a fade at the edge, never a chip cut in half.

The desktop keeps its sidebar, top bar and in-flow composer. The TopbarPortal
that lent two buttons to the phone top bar is gone with the bar.

scripts/test/mobile-flow-browser.ts now pins it: no bottom tabs, no top bar,
the page's own header on screen, Home one tap from its menu.

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

* fix(loki): the starter row says it scrolls (ui-scroll-fade-right)

CI's scroll-strips-have-an-affordance ratchet: a strip that hides its
scrollbar must carry the fade, and the starter row above the composer
had the one without the other. Room after the last chip so it clears it.

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-21 05:51:24 +02:00
CatoandClaude 7e9a55d800 feat(studio): a booked partner holds a seat on one project and is paid through a service in their own name (#1349)
Track 3 of docs/master-plan-2026-10.md, the Loki half (the OrangeCat half is
its PR #1366: the `service.write` scope and services that go live at once).

- The seat (lib/studio/seat.ts, seat-change.ts): assigning an approved partner
  to a website brief resolves their Loki account (users.orangecat_actor_id =
  the identity they connected), makes them an EDITOR on the brief's linked
  project and switches their private builder on, so they build under their
  own tenant on their own engine. The seat follows the assignment and the
  project link (assign_partner, link_project, revoke_access) and goes when
  either does. Never an org membership. studio_requests.builder_user_id.
- The fee (lib/studio/fee.ts, fee-listing.ts, integrations/orangecat-fee-
  service.ts): with a delivery a partner may state a fee once; after the
  delivery is saved Loki lists it as a service in the partner's OWN name on
  OrangeCat with the partner's own token, live at once and off their profile,
  and the brief shows the link to pay it. The sign-in asks for service.write.
  studio_requests.fee_amount/currency/service_id/url (migration 0125).
- Paid is OrangeCat's word: /api/orangecat/events marks the brief paid from
  the settled-payment signal for a service (markStudioFeePaid, idempotent on
  the payment), records the event, and tells the studio, the customer and
  the partner. fee_paid_at is written nowhere else.
- The staff screen says where the seat stands and what the fee is; the
  portal view carries `fee` for the partner's and the customer's screens.
- Records: changelog {#builder-seat} {#builder-fee}; roadmap "Builders on
  other people's sites" seat and fee ticked; private-builders.md "Booked
  builders"; builders-and-booking.md status. scripts/test/builder-booking.ts.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 13:28:33 +02:00
CatoandClaude 01d0c4fc65 feat(cloud): sealed builds — rootless podman and gVisor as readings, switched on per tenant by the operator (#1348)
Track 4.2 of docs/master-plan-2026-10.md, built; switched on by a reading.

- SandboxExecutor gains a podman mode (buildPodmanRunArgs): rootless as the
  tenant (--userns=keep-id), the tenant's home bound at the same path so
  sign-ins, trust and transcripts stay where the runner looks, the project's
  real path as workdir, network on, capabilities dropped,
  --cgroups=disabled so the deploy's drain still counts the processes, and
  gVisor's runsc as the OCI runtime when the box has it.
- scripts/hetzner/agent-image/Containerfile: the image (shell, git, gh,
  node, Claude Code, Codex). install-sealed-builds.sh, run by every deploy:
  rootless podman, runsc best-effort, the image built into a shared
  read-only store, and a reading in /etc/loki/sealed-builds.
- Nothing switches on by itself: new-tenant.sh writes the unit drop-in
  (LOKI_EXECUTOR=sandbox, LOKI_SANDBOX_RUNTIME=podman, runsc when read) only
  when the reading says ready AND /etc/loki/sealed-builds.on exists. The
  roadmap milestone stays unticked until a tenant builds in a container.
- Tests: sandbox-executor pins the sealed shape; private-builders pins the
  two-reading switch and that no tenant ever joins the docker group.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 13:20:21 +02:00
CatoandClaude Fable 5.1 944ed15747 feat(cloud): private builders — an allowlisted agent environment, a runner without the database, one sealed unit per account (#1346)
* feat(runner): agents get an allowlisted environment; the cloud builder asks Loki what to clone

Track 1, PRs 2 and 3 of docs/architecture/private-builders.md, together.

- src/lib/agent-execution/agent-env.ts: with LOKI_AGENT_ENV=allowlist (set
  by the box units) an agent PTY is born with a shell's environment, the
  engine keys the unit holds and what its own spec passes — never
  DATABASE_URL, never the org GITHUB_TOKEN. Off the box nothing changes.
- GET /api/control/workspace-source?tab=: a runner asks with its own token
  and gets its own account's repository and a token that account may write
  with (github-org-token.ts). box-workspace.ts reads no database any more;
  the runner passes the run's token to the one agent that needs it
  (GITHUB_TOKEN/GH_TOKEN in the spec env).
- mint-box-runner-token.ts --user <id>: a token per tenant.
- Records: changelog {#agent-env} {#runner-no-db}; roadmap milestone ticked.

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

* feat(cloud): a private builder per account — the flag, the sealed unit, reconciled on the box

Track 1, PRs 4 and 5 of docs/architecture/private-builders.md.

- users.private_builder (migration 0122) is the one switch, set from
  System → Plans (/api/system/private-builder). It grants cloud BUILDING
  only: isCloudBuilderAllowed (founder or flag) for routing, Sessions and
  the kickoff path; isFleetInfrastructureAllowed is the founder alone and
  gates the org GitHub token, studio CD, own domains and the server's own
  PTYs. LOKI_CLOUD_BUILDER_USER_IDS is retired.
- scripts/hetzner/loki-box-runner@.service: one unit per tenant as
  lk-<short>, ProtectSystem=strict, ProtectHome=tmpfs with its own home
  bound, the app and the runner env invisible, MemoryMax/CPUQuota/TasksMax,
  its own dev root, the agent env allowlist, no database password.
- scripts/hetzner/new-tenant.sh: user, clean shell, dev root, a runner
  token minted for THAT user, the agent contract, claude in its own home,
  an env file for its engine keys, the unit. reconcile-tenants.sh runs
  every minute from loki-tenants.timer (install-tenant-reconcile.sh, run by
  the deploy) and brings units into step with the flag. The deploy ships
  the scripts and template and drains and restarts every unit, each in its
  own transient unit.
- A tenant's project path is written under its own root
  (tenantDevRoot), which counts as box-rooted for routing.
- Records: changelog {#new-tenant} {#private-builder-flag}; roadmap.

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

* chore(runner): Fleet Runner 0.8.50 — the allowlisted environment and the API-backed clone

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 12:05:27 +02:00
CatoandClaude 83316f063a feat(feedback): whoever asks pays — a seat's request is a suggestion, the allowance is retired, routing tells the truth (#1344)
Track 0 of docs/master-plan-2026-10.md: stop the leak and the routing lies,
app only, nothing on the box changes.

Stop the leak
- A request on a shared project from a Builder, a client or a viewer is
  filed as a suggestion in the owner's tenant (source `client` or the new
  `member`), announced like a visitor's note, and waits for the owner's
  tap. Only the owner's own word starts a build on the owner's builder
  (ask-in-loki.ts, implement.ts, pass-holder.ts). Until now a Builder's
  ask built at once on the owner's subscription and a client's built on
  a monthly allowance; both spent one person's engine on another's word.
- The per-site allowance is retired: config/client-allowance.ts, the
  members PATCH, the People-panel picker, the dossier count, the invite
  copy. The `monthly_changes` columns stay in the schema unread (a DROP
  aborts the deploy; dropped by hand later). `on_allowance` is kept and
  read as `previewFirst`: a change built for the person who asked still
  opens as a draft and goes live on their "Make it live".
- The owner pass is the owner's alone; everyone with a seat carries a
  member pass. The 40-builds-a-day cap is keyed by the owner, not the
  project: a guard on one engine, never a price.

Routing honesty
- inject-core requests only what was chosen (a lock, a named builder, a
  stored preference) and lets the decision apply the floor, so a fresh
  account with Fleet Runner connected runs there instead of a 403
  (execution-access.ts requestedDispatchChannel).
- Kickoff writes a path under the cloud builder's root only for accounts
  the cloud serves; for anyone else the path stays empty so the project
  is not locked to a builder they do not have.
- "Hosted runner" is offered, accepted and dispatched only for the one
  account it serves (lib/hosted-runner/serves.ts).

Records: CHANGELOG entry {#seat-suggests}, ROADMAP milestone ticked,
CLAUDE.md and feedback-widget.md say what a seat's ask is now. Tests:
client-seat rewritten, execution-access extended, the pinned shapes in
client-seat-browser, seat-on-site-and-tracking, feedback-trust,
project-capabilities and owner-note-builds updated.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 11:43:36 +02:00
CatoandClaude Fable 5.1 2d7de4bd72 docs: master plan, October 2026 — from one builder to many (#1343)
* docs: master plan, October 2026 — from one builder to many

The plan that sequences private builders, the first franc, builders
through Bitbaum and sealed builds, under one rule: whoever asks for a
change pays for it, with their own engine, in their own builder.

- docs/master-plan-2026-10.md: ground truth, the rule and its
  corollaries, why this order, five phases each with proof and cost,
  what it looks like at 100,000 users, what is deliberately not done,
  risks, the decisions the owner is asked to make, ninety-day metrics,
  and an appendix mapping every July item to what became of it
- docs/sustainability-gates.md: Gate 1 split — hosted execution on a
  person's own engine is allowed once their private builder exists;
  on Loki's key it stays gated on metering and a CHF cap
- docs/master-plan-2026-07.md: status note points at the new plan

Hosting cost stays at CHF 0 above today's until a System reading says
otherwise. Nothing in the plan is live; Phase 0 starts on the owner's
yes.

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

* docs(plan): one build in merge order, not five phases over weeks

At the owner's direction the plan is one build landed as a chain of PRs
in dependency order, each exercised on the live box before the next
stacks on it. What is genuinely not mine to speed up is named: KVM for
microVMs (gVisor containers need none), the company for money in Loki's
name, the people who sign in, a second box. Decisions 1, 2 and 4 recorded
as taken; 5 and 6 applied as standing numbers until changed.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 11:17:54 +02:00
CatoandClaude 8efd523f46 docs(architecture): private builders — the plan for one sealed builder per account (#1342)
A read-through of what runs today (2026-10-19) found one builder, one
identity: every cloud build runs as the owner, on the owner's Claude sign-in,
with the production database password in its environment; a Builder on a
shared project spends the owner's subscription; a new account cannot build
at all and is told to install Fleet Runner, which fails the same way.

The plan: whoever asks for a change pays for it, with their own engine, in
their own builder. One Linux user per account on the box we have, a token
per tenant, no database password in any runner, an allowlisted environment
for every agent, and a request with no engine becomes a suggestion to the
owner. Seven reversible PRs, CHF 0 in hosting. The roadmap carries the same
milestones. Nothing on the box changes until the owner approves.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 10:57:18 +02:00
CatoandClaude Opus 5.5 9031430125 feat(feedback): a client's seat on the site itself; visitors follow notes without an account (#1337)
* feat(feedback): a client's seat on the site itself; visitors follow notes without an account

Step 3 — the seat reaches the site:
- A member pass (#loki-member=) names the person, not the owner. Their
  project page's Open link and the widget's sign-in door give it to anyone
  on the project who does not build it. The widget stays the ordinary panel
  and sends it with each note; ingest files it through the same path as
  asking in Loki, so a client's note on the site builds on their allowance
  and goes live on their word. Membership is read when used.
- The owner's own link is no longer what a client is sent: the preview's
  share card offers Invite them as Client.
- An approved /change request seats its requester as the site's client
  (5 changes a month), and their request page says where to ask.

Step 4 — the way back without an account:
- The tracking link opens on the note's status (the My feedback card), for
  six months; an account is optional, below it.
- A visitor who leaves an email gets the link by mail (three a day per
  address), and again in the shipped mail.

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

* chore(widget): keep the conversation within its length limit

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

* chore(widget): hand the passes on through one helper

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

* test(feedback): the shared reporter card and the six-month link

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 00:00:21 +02:00
CatoandClaude Opus 5.5 50d632f21a feat(projects): a client's seat — builds on a monthly allowance, live on their word (#1336)
* feat(projects): a client's seat — builds on a monthly allowance, live on their word

The client is the person a site is for. Their asks used to wait for the
owner; the only other seat was Builder, which builds without limit and ships
without anyone looking. Now:

- The owner picks a client's changes a month on the People panel (Ask me /
  5 / 20 / 50), on the invite and per client later.
- Within it, the client's ask builds at once on the owner's builder. The
  agent opens a DRAFT pull request; it merges only after the client taps
  Make it live (their project page and My feedback), which lifts the draft
  and merges once green. Auto-ship OFF still means the owner merges.
- Past it, or with Ask me, the owner decides, and the night never builds it
  unasked. A build that did not start is not counted.
- The client is told what happened in plain words, with changes left.

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

* fix(projects): a client's change stays a draft until their yes; the inbox names it as theirs

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

* chore(db): format the migration snapshot

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

* fix(db): drizzle comparisons for the allowance count

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 23:35:44 +02:00
CatoandClaude Opus 5.5 c485486984 fix(feedback): a stranger's words reach a builder only by a person's tap (#1335)
* fix(feedback): a stranger's words reach a builder only by a person's tap

- Who filed a note is the server's call: Loki's reviewer and synthesizer
  carry a signed pass; a note without one is a visitor's, whatever it claims.
- An overnight allowance builds only notes someone vouched for; a plan with
  a stranger's note waits for a tap.
- Opening a tracking link never starts a build.
- Telegram carries the operator's own projects only.

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

* docs(telegram): whose news reaches the operator's chat

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 23:16:13 +02:00
CatoandClaude f2b6fc7e66 feat: Sessions, an even session sheet, a terminal that scrolls, no ragged choice rows (#1331)
What the owner saw on a phone, and what changed:

- "Terminal" over a "Claude | Terminal" pill: the page is now Sessions, and
  the pill is Chat | Terminal for every agent. The agent is named once, under
  the session's name; an agent with no chat view gets no switch.
- The black terminal would not scroll: vertical swipes now belong to the
  terminal (touch-action: pan-x), and a swipe past the oldest kept line says
  so and offers Chat, where the whole conversation is.
- The model sheet: Model and Effort are <Segmented> rows — equal cells, one
  line, the chosen one's meaning under it. "Next mode" (whose result showed
  only "with your next message") is a list of modes; a tap presses Shift+Tab
  until Claude Code's own footer names the one chosen, read live from the
  session's screen (use-live-mode, lib/claude-mode-footer).
- More: no duplicate "Feedback on this page" row (the edge tab is on every
  page); sections regrouped so none is a heading over one row — Build
  (Home, Projects, Sessions, Prompts), Loki (chat, Voice, Today,
  Suggestions), To review, The fleet. "No-screen" is Voice.
- Every pick-one row that wrapped into "4 + 1 orphan" on a phone is now
  <Segmented> (even row or grid), a one-line scrolling filter row, or one
  row per choice; scripts/test/choice-rows.ts fails on the old shape.
- A page whose header is only its (phone-hidden) title no longer leaves a
  blank band above its content — Home opened on one.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 18:28:45 +02:00
CatoandClaude 9e953a8c1f fix(sites): a site retired offline stays offline; one name per site (#1330)
center-com.orangecat.ch (the older Center SOM build) was taken offline with
retire-site.yml and its repository archived; the preview at
centersom.orangecat.ch is Center SOM. Its apps.conf row is now archived, and
an archived row is skipped by a full sync (lib.sh app_names), the push-deploy
installer and the watchdog — otherwise the next sync-sites run would have put
it back online, and the watchdog would have paged it as down.

The previews doc gains the rule the owner asked for: address, project and
repository are one word.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 18:09:16 +02:00
CatoandClaude Opus 5.5 b495bedb95 feat(change): a new account's build goes to a person instead of a 403 (#1329)
* feat(change): a new account's build goes to a person instead of a 403

On /change, "Make it real" from any account but the operator's met
"Previews are built on Loki's own computers, which this account does not
have" and stopped. The cloud builder only claims the operator's commands,
and that boundary stays; what changes is that the request no longer dies.

- It is filed (build_requests, migration 0119) with the before/after the
  visitor just saw, once per brief however often it is sent, and the
  operator is told by push, Telegram and an alert.
- /approvals shows it (operator only): Approve builds it as the operator's
  client work; Decline sends their note. Exactly one decision wins, and an
  approval whose build cannot start goes back to waiting with the reason.
- The visitor follows it on /change/requests/<id> and gets an email.
- The preview opens with a code of its own (entities.metadata.previewCode,
  read by getProjectPreviewCode wherever a preview is opened or signed for),
  never the operator's code, which opens every preview they have.

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

* docs(telegram): register the build-request notification

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 17:21:51 +02:00
CatoandClaude 556133788b feat: Home, four tabs, and a terminal that lists your sessions (#1327)
Walked as the owner (2026-10-19): what you expect, what happened.

- "I want something built." Control is now Home, and opens on the box:
  what to build, with a project chip (the one you were last in, one tap to
  change), sent to that project's agent via /api/inject. The empty
  "Nothing is being built right now" card and its "Start something" (which
  left for /loki) are gone. Done rows lead with what was done, not the
  request quoted back.
- "Where is everything?" The phone's bottom bar is Home · Projects · Loki ·
  More. Sections are grouped by thing — Build, Loki, To review, Your day,
  The fleet, Private — not by abstract question. "Control" is "Home" in
  every sentence that names it.
- "Where is my session?" With nothing open, the terminal lists your
  projects, each with Resume, which opens it and continues its last Claude
  conversation (/api/agent/launch {resume:true} → claude --resume of the
  folder's newest log; runner 0.8.48). No more form with two dropdowns.
- Autopilot's toggle is a quiet control, not the page's filled primary.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 16:00:02 +02:00
CatoandClaude 39474428d7 docs: clear docs-truth drift and retired names (#1322)
- Fix stale paths/links in docs (model-vendors billingUrl, agent adapter
  placeholder, bridge host setup, entitlements not yet created, tokens module).
- hetzner-migration: current hosts (evig, aoz) and a pointer to
  scripts/hetzner/apps.conf as the live app list.
- Archive two point-in-time records (fleet-runner-pty-ownership,
  terminal-parity) into docs/archive with a README; fix inbound refs.
- Thoughts essays: repo aoz-housing is now aoz-begleitung.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:05:48 +02:00
CatoandClaude cde8d5f688 feat(terminal): phone session reads like a chat app — name in the header, one "+" (#1320)
The phone terminal had five bands of chrome around the session: the app bar,
a scrolling row of session tabs with "+" beside it, a full-width view switch,
the box with a paperclip AND a slash button, and the bottom tabs.

- Header: back to Control · the session's name with "Claude · 2 sessions ·
  cloud builder" under it · ⋮, and the Claude | Terminal pill centred below.
  The name opens the session sheet (every session, New session, where it
  runs, agent); ⋮ opens TerminalMoreSheet (What's going on?, full screen,
  text size, live keystrokes). No row of tabs to run off the edge.
- An open session hides the app bar and bottom tabs below md
  (useImmersiveChat), so the session gets the screen and back is the way out.
- The box is + · model · mic · send. "+" opens one sheet: photo or
  screenshot (presses chatkit's hidden paperclip, so paste and
  Camera/Photos/Files stay chatkit's), Keys on a phone, the agent's
  commands, Loki's records and the prompt library.
- Conversation view: next steps are reply rows under the answer, sent by
  the box's own path (sendRequest). Terminal view: What's going on? and at
  most two steps in one sideways row.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 13:12:58 +02:00
CatoandClaude 1e148dd225 docs: correct drift in Loki agent docs, infra notes and stale links (#1317)
- CLAUDE.md: loki/ components are Thread, LokiComposer (Composer.tsx) and
  ThreadRail (Transcript/ConversationList no longer exist); test:home runs
  eleven suites, not eight; /duet redirects straight to /control; the
  machine dogfood is scripts/machine-dogfood.mjs, not a package script.
- AGENTS.md: home/ is a library embedded by the box runner, Fleet Runner
  and hosted runner, not a process on the user's machine.
- SECURITY.md: execution runs on the cloud builder or Fleet Runner; the
  audit workflow runs pnpm audit.
- hetzner-migration / feedback-widget: evig and AOZ are served at
  evig.orangecat.ch and aoz.orangecat.ch; the old hosts only redirect.
- HANDOFF / oc-rail scope: bitbaum is unregistered (fleet registers/org.json),
  no "bitbaum AG", never "solo founder".
- deploy.yml comment: the auto-merge sweep lives in bitbaum/fleet.
- debt-reduction-roadmap: unlink deleted scripts.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 12:10:25 +02:00
CatoandClaude 48dbead196 feat(previews): built to a design standard, looked at before done; chat screenshots reach the builder as images (#1309)
Center SOM's preview passed every rule in the build brief and its owner still
called it cramped and not beautiful: the text ran to the screen's edge and the
headline was a five-line search-engine title. The brief said what a preview
must get RIGHT and nothing about what makes it GOOD, and nothing ever looked
at the result.

- The brief now carries a design standard (page gutter and a readable measure,
  type sizes and line height, short headlines, one spacing scale, one primary
  button, real photos cropped to consistent shapes) and a last step: screenshot
  every page at 390 and 1440 px with the box's headless Chromium, judge it as
  the owner would, fix and look again.
- A screenshot sent in the Loki chat about a project now reaches its builder
  as the image itself (staged like the session box's: the runner writes the
  file, the prompt names its path). Before, the builder got only a vision
  model's paraphrase, and "the text is cramped" did not survive it. The
  description still serves the chat itself (choosing the project, the reply).
  injectPrompt and the queue carry `attachments`; a prompt with images is
  always queued for a runner (a live PTY would get unresolved placeholders),
  and the hosted builder, which has no runner to write files, is told plainly
  that the screenshot could not be delivered.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 17:48:22 +02:00
CatoandClaude adfbdcfe07 fix(session): the builder updates, the sheet changes things, one box, a preview is the site (#1305)
The owner used Loki from a phone (2026-10-18) and could not tell whether
anything worked. Four separate faults, each passing every check:

The cloud builder ran code days behind the app. Its restart waits for
every agent to be idle, and autopilot refilled the queue the instant one
finished: ten consecutive deploys (23:38 → 09:12) found "2 agent(s)
working — deferring restart". Hence "Model: not known yet" of an answer
the screen was showing. Now, while the cloud runner's heartbeat version is
behind the deploy's, the commands route hands it no work-starting
commands (dispatch, launch_agent, auto_continue, browser_task) — a
person's own words into a session still go through — so the idle moment
comes, the restart lands, the queue resumes on the new code. Server-side
on purpose: a runner-side rule would have waited for the very restart it
was meant to allow. Control's builder line says "a newer version waits
for its agents to finish" meanwhile.

An agent renamed a preview site, committed, and reported "the work lives
only on this machine — tell Loki where this preview's remote should
live". The box contract says push or fail loudly; a preview folder is
served from disk and has no remote by design, so the change had been live
since the save and the owner read a failure and a chore. Every dispatch
to a preview folder now carries "Where this goes" (lib/previews/
delivery-note), and the contract has the same section.

The session sheet's Change and Set typed /model and /effort into the
terminal and closed; Claude Code drew its picker behind the conversation
and nothing on screen moved. Each row now lists its choices; a tap sends
the command with the choice named (/model sonnet, /effort high), the
sheet stays open and says what is changing, and settles when the log
names it. The sheet is built like the Settings sheet.

The session box had a 26px library button beside 44px round ones, a 36px
chip and a 34px Keys pill, the microphone second from the left in one
view and beside Send in the other, and "claude" on the tab beside
"Message Claude…". One row, one size, one order in both views; the
agent's name everywhere (terminal-strip-tabs badgeNames).

Widget: the owner's change list reads what needs them first (the line
counted nine, the list showed none); "9 needs you" → "9 need you"; a
failed call is named ("my call to Loki to save your note failed… Your
words are still here — press it again") instead of "one of my calls to
Loki failed — nothing for you to do".

Tests: runner-update-hold, preview-delivery-note, owner-changes-order,
session-sheet-browser (new); builder-presence, widget-changes,
widget-self-report, inject-context-boundaries extended.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 13:37:05 +02:00
CatoandClaude 2ff657ecf8 feat(projects): a Builder asks for a change from Loki, not only from the site (#1304)
Walking the loop as a new Builder on a shared project (live, 2026-10-18):
the project's orange "Ask Loki" opened the chat in the member's own
account, which has no builder for the project, and it answered "edit the
site's HTML/CSS ... requires the Loki desktop app". Today said "Add a
project" and Control said "Connect a builder ... install the desktop app".

- The project page has the box to ask in (#ask, THE composer, voice on).
  POST /api/projects/[id]/ask files the same row the widget would: built
  at once on the owner's builder for a Builder (owner told), waiting for
  the owner for anyone else. The reply says which, with a link to follow.
- The header sends members to that box ("Ask for a change"), and a tab
  can own in-page anchors so #ask opens Overview from any section.
- Today and Control show the projects shared with you instead of the
  first-run "Add a project" and the desktop-app pitch.
- The chat's facts name each shared project and where it is changed.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 13:28:33 +02:00
CatoandClaude Opus 5.5 44def109a9 feat(widget): a spoken walk read as a list, whole sentences, talk from the launcher, per-page builds (#1302)
* feat(widget): one Talk bar, status header, read-back, per-page builds

- One Talk to Loki bar above a one-line message box; the box shows its
  tools only once used. The second Talk button in the thread is gone.
- The owner's header is the status (Watching / 2 to look at), Pause, close:
  no second logo, no page line. Opening on a phone no longer raises the
  keyboard.
- A spoken note is read back as a list per part of the page, with Read it
  back (speech) and Edit.
- Build all starts saved notes as one build per page (dispatchFeedbackBatch,
  shared with the project batch route).
- Regex literals use \u escapes; a test fails on non-ASCII in the bundle.

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

* feat(widget): a walk read as a list, whole sentences, talk from the launcher

- Loki's read of a spoken note is a list: one change or question per line,
  with where it applies, editable, ✕ to drop. The part on screen is
  background; a line names a part only when it was pointed at.
- Save files each change as its own note, with only the moments it came
  from, on the page it was said on. Questions stay on the card for Ask.
- Whisper's segments are joined into whole sentences before they are placed
  under a heading, so a sentence is never cut across two parts.
- The owner can start talking from a microphone beside the launcher without
  opening the panel (widget/quick-talk.ts).

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 10:34:38 +02:00
CatoandClaude 09e04ab4ed feat(widget): Loki reads a spoken note before it is saved (#1299)
The owner walked Petvity for 43 seconds on 2026-10-18 — the home page,
Features, the dashboard, Settings — saying the design was inconsistent
and asking Loki to look at it all and say what it thought, then asked
whether Loki had heard them at all. It had, and it had watched: every
page and part was noted. But the card was every word verbatim under each
part of the page, including "No, no, I'm just making a coffee", said
twice to someone in the room; it led with Save and Fix it now for what
was a question; it sat under three "Loki noticed" cards, one of them
repeating the same finding; and replaying the walk showed every sentence
filed one page early.

Loki reads it first (widget/walk-read.ts, POST /api/widget/understand,
guarded like /api/widget/advise):
- The card says what it heard: "Loki heard you · 0:43 across 4 pages".
- The box leads with the ask, editable; what was not meant for Loki is
  named as "Left out"; the words as spoken stay under "Word for word"
  with "Use my exact words instead". Whatever is saved, the words as
  spoken still travel with it in each moment's `said`.
- A question leads with Ask Loki, answered about every page of the walk
  (the walk is sent as the review session); a change leads with Save
  (owner, then Fix it now) or Save feedback (visitor).
- Nothing waits on the read: while it comes and when it fails, the card
  is the words as spoken with the buttons as before; words edited before
  it arrives are never replaced.
- The card is brought into view from its top when it appears and when
  the read redraws it, without throwing the phone keyboard up again.

Walk alignment: a page change is noted the moment the address changes
(a site's own links change it without an event; polled every 250 ms
while recording, popstate too). It used to wait for scrolling to settle,
so the first words on each new page landed under the page before.

A site-wide finding (the page's language) is said on the first page of a
visit, not on every page (onceSiteWide in watch-trail.ts).

Tests: widget-walk-read (rules, prompt, wiring), widget-walk-read-browser
(the owner's walk replayed at 390 and 320: question, change, and words
edited before the read), widget-browse-voice-browser updated for the new
header and the read-fails path.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 08:28:26 +02:00
CatoandClaude fd5164981b feat(previews): private tiles get real pictures; a preview can move to its right name (#1298)
Private tiles on bitbaum.orangecat.ch/private/ now render through the same
tile as the public work grid (bitbaum PR #136). This adds the picture they
show: GET /api/fleet/private/shot/<slug>, owner only, a 1280x800 picture of
the project's site (a preview through Loki's own route with the owner's
cookie, its widget left out), kept for twelve hours. A site behind its own
access-code page is not photographed, so its tile is text, not a code page.
takePagePicture takes a viewport; wider than a phone is a desktop browser.
The owner check is one helper (studioOwnerCheck) shared by the list and its
pictures.

A preview can now move: POST /api/previews/<slug>/move { to, name } attaches
the new address, renames the folder, moves the project row and its name in
one transaction (the folder moves back if that fails), points the widget at
the new address and detaches the old one. Center SOM was born center-com-3
from a domain spelled in look-alike Latin letters; this is how it becomes
tsentr-som. previews.yml gains `move` and `ask` (send the builder a change).

A website preview's one line names the site by host ("center-com.ru"), not
by its URL.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 08:21:56 +02:00
CatoandClaude d079f972ab feat(widget): one widget everywhere, the state in every shape, record now and build later (#1295)
The owner (2026-10-18): the widget looked different on different pages
and sites, it should always be clear when Loki is watching, and they want
to record comments while it watches and implement them afterwards.

One widget, everywhere
- Loki's own site draws the same panel every customer site gets, not the
  chatkit view (data-fc-chat="kit" stays an opt-in).
- No Loki page hides the launcher any more: the project workspace, the
  agent conversation, inspection, the project loading state and an open
  /loki conversation were "hidden" — no launcher, or the watch top bar
  instead. They show the edge tab. feedback-widget-reach fails on any
  page that hides it, in either the literal or the expression form;
  only an open dialog and the sign-in wall may.

The state in every shape
- The owner's edge tab carries the same live dot and ring as the corner
  pill, at full weight.
- The owner's pill sits in a bottom corner or becomes the tab; it no
  longer climbs to the middle or top of the screen (Heidi at 390px).

Record now, build later
- After a voice note the owner's card leads with Save (then Fix it now,
  Ask). Saved notes lead the status line ("Watching · 3 notes saved"),
  and "Build all 3 saved notes" starts each as its own build, oldest
  first: POST /api/widget/owner/build, rule in lib/feedback/saved-notes.ts.
- The owner check for the widget's owner routes is one helper,
  lib/widget/owner-request.ts, used by owner/changes and owner/build.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 06:08:34 +02:00
CatoandClaude Opus 5.5 925ab930be feat(ai-budget): newcomer reserve in the free pool + fix(billing): payments stay off until switched on (#1294)
* feat(ai-budget): keep a fifth of each day's free pool for people on their first week

Pacing keeps the day from being spent before lunch, but not by evening:
there is no clawback, so whoever signs up at 21:00 can meet a pool the
vendors have already refused — a first answer that never comes, which is
the moment a person decides Loki is broken.

lib/ai-budget/newcomer-reserve.ts: returning accounts together stop at 80%
of the day's capacity; an account under seven days old may draw on the
rest, still under its own fair share. getDayUsage now also returns the
day's total (same query as the active count). The gate reads the
account's age only once the total reaches the held part, and fails open
if it cannot; a paid plan with allowance left is not held back. The
refusal says what the held part is for, when the day starts over, and the
ways past it; the budget screen reads the same rule, so it never shows
"12 left" to someone the gate will refuse.

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

* fix(billing): payments stay off until switched on, whatever pay URLs are set

Live after #1293: every paid plan's button on /pricing read "Pay in
Bitcoin" and went to an OrangeCat product page that answers 404. The
three ORANGECAT_PAY_URL_* were set on the box before the passes existed;
while the tiers had no price that was invisible, and setting the prices
turned the dead links on — skipping the reservation flow they were meant
to fall back to, and showing "Buy" in Settings → Billing too.

orangeCatPayUrl now also requires LOKI_PAYMENTS_OPEN=1. Opening payments
is a decision (the company registered, the passes live), so it is a
switch, not an inference from a URL. Until then every paid plan's button
reserves, as designed.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 01:35:23 +02:00
CatoandClaude Opus 5.5 95ec4a8375 feat(plans): CHF 15 / 40 / 90 with a monthly AI allowance, reservable until payments open (#1293)
* feat(plans): CHF 15 / 40 / 90 with a monthly AI allowance, reservable until payments open

The founder set the prices on 2026-10-17. Payments stay off until Loki's
company is registered, so everything up to the moment of paying works and
nothing is charged:

- config/plans.ts: Personal 15, Pro 40, Team 90 a month; each states its
  monthly allowance. The billing note says payments are not open and that a
  plan can be reserved with nothing charged.
- lib/plan.ts: PLAN_LIMITS.aiAnswersMonthly (1,000 / 3,000 / 8,000 at
  8,000 tokens an answer — about $0.002 each on a paid open model, a
  fraction of the price).
- lib/ai-budget/plan-allowance.ts + gate: past the daily free share, a paid
  plan's month still admits the turn. Read only after the share refused, so
  a free turn never pays for it; a failed read leaves the refusal standing;
  a lapsed or past-due plan has none.
- /pricing: four priced cards. A paid plan's button opens /pricing/<plan>,
  which reserves it (plan_reservations, one row per person, grants
  nothing) — and reads "Pay in Bitcoin" the day its OrangeCat pass exists.
- The out-of-answers refusal and the budget screen offer the plans beside
  the person's own key; Settings shows a plan's allowance left this month.
- Settings → Billing links each plan's reserve page; System → Revenue shows
  who is waiting on which plan, and counts only plans a settled pass pays
  for (a hand grant is "granted", not revenue).
- docs/architecture/models-and-money.md follows the decision.

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

* test(ai-budget-gate): answer the plan read without a database

The gate now asks a paid plan's allowance after the share refuses. The
existing gate tests did not inject it, so where CI has a real Postgres the
default read opened a pool that kept the process alive and the runner
timed the file out. Every call now passes `planAllowance`, as the file
already does for the ledger and the capacity.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 01:08:13 +02:00
CatoandClaude f80a315212 feat(control): the top of Control is the work being done for you, each job a tap from watching it (#1275)
The owner, on his phone (2026-10-17): "I see Building, I tap it, and I
expect to see how it's building — the chat or the terminal. Here there is
just so much… scary to non-technical users." The hero said "Building · 1
agent working" and could not be tapped; under it sat a builder sync line,
three counters, a Workspaces list and a "Recent activity" log of the raw
prompts sent to agents, safety fences included.

- ControlNow: one card per job being built — what it is, what the agent
  is doing right now, how long — and the whole card opens the live
  session as a conversation (/terminal?project=…&view=chat&run=…). A job
  waiting for your answer leads with the question and says "Answer it".
- ControlDone: the last day's results, what came of each (merged and
  deployed, partly done, stopped) and where to look: the site, the change,
  the conversation. Replaces "Recent activity".
- ControlFoot: builder state, New project and Settings in one quiet line.
  The hero now speaks only for alarms or when someone is needed;
  Workspaces is desktop-only.
- Titles (lib/task-title): a run named from its prompt the way a person
  would — a feedback fix is the report, an owner's decision is THE ASK, a
  site brief is its first line with the link as a domain. Never the prompt.
- Live step without a viewer (lib/run-step): the runner's progress beat
  reads the tail of the agent's own session log and sends "Editing
  Header.tsx"; the server keeps it on the run (payload.lastStep) and
  /api/control returns it with the run's id, outcome, title and last beat.
  Fleet Runner 0.8.44.
- The project the page auto-selects no longer becomes "your project" in
  the Profile · Chat · Control · Terminal strip; only one you open does.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 21:21:56 +02:00
CatoandClaude 5e7f1c1924 feat(projects): a Builder changes the site without the owner, and the invite says so (#1280)
The owner's words, 2026-10-17: Manu is a doctor; joining should take no
explaining, and when he is a Builder his feedback should go to Loki, not
to George. The machinery existed — a pass on the site's feedback button
makes a note build at once — but Loki handed the pass only to the owner,
recorded nobody as the reporter, told the owner nothing, and the invite
page named a role without explaining it.

- The invite page is the manual: what the project is (its description and
  site), how you change it in three lines, what happens to what you ask
  for, one button. The owner opening their own link reads the same page
  with "This is what the person you send it to will read".
- After joining, the project leads with the same three lines (MemberGuide)
  and an "Open <site>" button. For a Builder that link carries the pass.
- Who gets a pass is one rule, mayHoldPass (owner and every Builder); the
  project page issues it by that rule. A viewer's or a client's note, like
  a stranger's, waits for the owner.
- Ingest records the pass holder as the reporter, so the owner's inbox
  reads "Manu Rigner asked for this on your site" with "Manu Rigner ·
  Builder", and Manu's own list knows his notes. The owner is told by push
  and Telegram when a Builder's note starts (notifyBuilderAsked) — told,
  not asked.
- The site's sign-in door reads "I own or build this site", and ROLE_LABELS
  says in plain words what each role means for what you ask for.

Walked at 320, 390 and 1440 on a local stack with a stand-in Petvity site
carrying the widget: George makes a Builder link; Manu reads it signed
out, joins, lands on the guide, opens the site from Loki, asks for a change
in the widget — the row is his, source owner, and the build is attempted
at once; George's inbox names him. Eve joins as a Viewer, her note from
the site is a visitor's and waits for George. No overflow, no page errors.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 20:48:50 +02:00
CatoandClaude 8749efd100 feat(widget): say the state on screen, one button to open, a calmer panel (#1279)
The owner on their phone (2026-10-17): it should be clear on screen when
Loki is watching and when it is recording, opening it should be easy, and
the panel was too crowded and intimidating to use.

Watching
- The owner's launcher is ONE button that says its state in a word at
  every width: "● Watching" with a live dot and a ring, or "Paused". A
  tap opens Loki. Its second half, "Point", was the labelled, bigger part
  on a phone, so the obvious tap pointed instead of opening; pointing is
  "Point to area" in the composer.

Recording
- A red edge round the whole screen while Loki listens (it takes no
  taps; grey while it writes it down), a red-bordered dock that says
  "Recording 0:12", and a one-line hint instead of four.

The panel
- One status line instead of two rows: "Watching · 2 to look at · 4 live
  › Pause"; opening it shows what Loki noted and where each change is.
- One microphone: the header's "Voice note" and the composer's "Record"
  did nearly the same thing. "Talk" in the composer is talk-while-
  scrolling, which also covers plain dictation; in chatkit it takes the
  tool row in place of chatkit's own mic.
- "Fix it" and "Ask" instead of "Request a fix" and "Chat with Loki".
- "Continue in Loki" appears once something has been said.
- The visitor's phone launcher is 44px, the minimum tap target.

Docs (widget/README.md, docs/architecture/feedback-widget.md,
docs/development/contextual-voice-feedback.md) and the browser tests
follow the new controls; new pure helpers watchHeadline and
changesHeadline are unit-tested.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 20:44:42 +02:00
CatoandClaude Opus 5.5 dc1e7ef1a7 feat(terminal): every tab says what its session is doing, and news from the others (#1278)
* feat(terminal): every tab says what its session is doing, and news from the others

Several sessions at once only works if you can tell, without opening each,
which one is busy, which one is waiting on you and which one is done.

- Each tab, on the phone's row and the desktop strip, carries a status dot:
  a breathing accent while it works, amber when it needs you, green when it
  finished, grey when it is just open; the words go to screen readers and
  tooltips. Read from the same /api/control/stream Control uses, with the
  presenter's precedence (a running turn outranks a stale "blocked" handoff),
  so the terminal and Control never disagree (lib/terminal-session-status.ts).
- When a session you are not looking at finishes or starts waiting on you,
  one line says so with Open (TerminalSessionNotice). One at a time, gone
  after ten seconds, on opening that session, or with ×.

Tests: terminal-session-status (rules, precedence, what counts as news);
terminal-tabs-browser now checks the dots and the notice at 320/390px.

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

* chore(design): dead ui-* rule baseline 34 → 33

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 20:40:41 +02:00
CatoandClaude Opus 5.5 ab85172dda feat(terminal): sessions as tabs on the phone, and a second session per project (#1270)
* feat(terminal): sessions as tabs on the phone, and a second session per project

Asked for from a phone: several terminal sessions open at once, the way a
terminal has tabs, without clutter. Loki already ran several sessions and the
desktop strip showed them, but below md the strip and its "+" were hidden, so
a phone could neither see the other sessions at a glance nor start one while
another was running.

- Phone header: with more than one session the name becomes a sideways-
  scrolling row of them. The current one keeps its dot and chevron (and still
  opens the settings sheet); the others switch in one tap. One session looks
  as before, plus a "+".
- "+" opens TerminalNewSessionSheet, the same start form as the desktop "+".
- A project that already has a session now says so and offers "Start another
  session" or "Go to its session". Launching the same project used to target
  the same tab, which replaces the running agent. The second session is a lane
  tab (<project>~<id8>, run-tab.ts), named "project 2".
- The runner gives a hand-started lane its own git worktree, as parallel
  dispatch already does, and refuses rather than share one checkout
  (desktop/src/main/lane-workspace.ts). The lane limit moved to run-tab.ts so
  dispatch and the "+" share it.
- Close a session from the phone's session list (tap twice).
- /api/agent/launch refuses a tab carrying "~" that is not a lane Loki minted.

Tests: terminal-session-lanes (lane rules, refusal, numbering) and
terminal-tabs-browser (320/390px: no sideways scroll, 44px targets, switch,
sheet, second session beside a busy one).

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

* chore(desktop): Fleet Runner 0.8.43 — a hand-started second session gets its own worktree

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 20:22:12 +02:00
CatoandClaude Fable 5.1 38a5b5654d feat(previews): before and after, photographed — the tour of what Loki changed on a live site (#1271)
* feat(previews): before and after, photographed — the tour of what Loki changed on a live site

A preview made from a live site (/change "Improve this site") used to end in
improvements.html, a page the build agent styled freehand that Loki could
neither check nor illustrate, and the owner still compared two sites from
memory. Now the build leaves improvements.json (one entry per change naming
the live page and the new file, plus the engineer's account under the
pull-request walkthrough's keys), and Loki shows it:

- `/p/<slug>/_loki/before-after`, behind the preview's own code: each change
  as the live page and the new page photographed on a phone, side by side,
  with the build's words, what was not brought over, the questions for the
  owner, and the account. Pictures are taken by lib/feedback/page-picture on
  first ask and kept in the folder's `.loki/pictures/`; "before" pictures are
  taken the moment the preview starts, while they still are the before; an
  "after" is Loki opening its own preview with the access cookie
  (`x-loki-picture: 1` keeps the widget out of the shot), keyed by content.
- Watch it work links the tour and shows the Walkthrough from the folder.
- The brief says a preview is a first impression, not a migration: the
  homepage and the pages a visitor uses, at the live site's own paths.

The consultation's tour now reads the pages a buyer reads: navigation before
footer, the biggest section (a shop's catalogue) first, one page per section
before the second, accounts and small print left out. center-com.ru's tour had
been the login page, the privacy policy and the bank details.

From the review of this flow: the consultation cache is keyed by the
normalized address (every "Build" click had re-read the whole site inside the
request); a create saves the access code and attaches a host only after every
check has passed; name and folder agree (a leftover folder no longer serves
<name> at <name>-2); the gate no longer names the client; the chat's
read_website reuses the crawl; one in-flight helper; the shared escaper; the
preview route memoizes its project lookup for a page load; stale comments.

Dogfood without a browser: the Previews workflow gets `website` (the exact
/change path, as the operator, on the deployed app) and `check` (open a
preview as its owner and report the site, the tour and its pictures — the
cookie is minted on the box and never printed).

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

* fix(watch): the preview walkthrough reads from a lib the shared-access test can bind

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 19:30:21 +02:00
CatoandClaude d9af1c7594 chore(hosting): Vita is served at vita.orangecat.ch (#1242)
The row's first host is now vita.orangecat.ch; vitareba.orangecat.ch stays
served so sent email links, calendar subscriptions and cron callers keep
working. The app redirects its pages to the new host (bitbaum/vitareba).
Apply with Sync sites (apps: vitareba) after merge.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 15:34:04 +02:00
CatoandClaude Fable 5.1 bbcf43fed3 feat(runs): one delivery track everywhere — the chat card draws the same track as Watch (#1240)
* feat(runs): one delivery track everywhere — the chat card draws the same track as Watch

The chat card under a dispatch had its own list (run-milestones: picked up →
pushed → PR → checks) and Watch had the delivery track, built from
different facts, so moving between the two screens meant reading two
stories about one change.

- lib/run-track-load: the one loader every run surface calls — events,
  the runner's snapshot, what was asked, the branch or pull request on
  GitHub while the run lives, the commits and checks behind it
  (lib/repo-progress, was run-milestones-fetch), and after the run the
  fix ledger through merge, deploy and Loki's look. Owner-only for anything
  that reaches GitHub or the budget; never from a timer.
- The Watch route and both live-status routes the chat card polls carry
  `track`; RunMilestones and the follow line are gone.
- lib/run-track: commits ride the working stage as facts ("Pushed: …", in
  the builder's words); a red check is the merged stage in the needs-you
  state, a green one "Checks passed — merging", before the ledger catches
  up; the pull request's number and title come from the repository too.
- components/projects/RunTrack: `collapsible` — a settled track in a chat
  thread folds to its one sentence and opens on a tap.
- components/projects/RunLook: the page before and after, side by side,
  under the track in chat and on Watch (the before picture #1238 keeps).

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

* refactor(run-follow): drop followRun — every surface reads the ledger through loadRunTrack now

The dead-exports ratchet caught it: nothing referenced the follow-only
wrapper once the live-status routes moved to lib/run-track-load.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 14:57:11 +02:00
CatoandClaude Fable 5.1 87e4fec420 feat(widget): walk and talk — what was seen per moment, taps by their label, takes that chain, pictures Loki takes afterwards (#1239)
* feat(widget): walk and talk — what was seen per moment, taps by their label, takes that chain, pictures Loki takes afterwards

The owner (2026-10-17): "I can scroll through the site and click different
things while recording an audio … and as I comment, automatically the
screenshots or whatever else needs to be taken, so the changes will be made
in the most effective way possible."

A page cannot film itself on a phone without a permission prompt, so the
widget still takes no pictures. What it now takes, honestly, at the start,
when scrolling settles, on every tap on the site and on Mark: the part of
the page in view, the text at the reading line, how far the page is
scrolled, and the control that was tapped — by its own label (aria-label,
alt, title, text; a field by its label or placeholder), never by what was
typed into it. Whisper's timings put each sentence under the part that was
in view when it was said, as before; beside the note now travels the
structured list of moments (widget/moments-contract.ts: said → seen,
clamped on both sides, scripts/test/widget-server-caps-mirror.ts holds
them together).

- A walk is no longer one take: at the upload cap the recorder hands
  straight into the next take (the microphone stays granted), the clock
  keeps counting from the start of the walk, and Done joins the takes on
  one clock (joinTakes). Up to ten takes, about eighteen minutes.
- Ingest validates and stores the moments (site_feedback.moments,
  migration 0108); the fix prompt renders them as a fenced WALK, one line
  per moment, so the agent knows what "this button" was.
- The owner's row lists the walk (components/feedback/MomentsWalk) and a
  tap on "See what they saw" has Loki open that very view on the server —
  the page, scrolled to the tapped control or to the same scroll — and
  take the picture (/api/feedback/[id]/moment/[n] over page-picture.ts,
  which now takes a scroll position). The decision card says "4 parts of
  the page · tapped 2 things" so the owner knows a walk is behind it.

Checked in real Chromium: a click on the host's own button while
recording becomes a moment with that button's label and selector, Mark
marks the part in view, the scroll is kept, the password field's value
never travels; the owner and visitor flows at 320 and 390px pass as
before.

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

* chore(drizzle): regenerate the moments migration as 0109 on top of #1238

#1238 landed its own 0108 (site_feedback.read) first, so the moments
column moves to 0109 and its snapshot is generated from main's.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 14:39:14 +02:00
CatoandClaude Fable 5.1 63107c6dbe feat(watch): time on every stage, a tap for the facts, one card for the whole run, the walkthrough (#1237)
* feat(watch): time on every stage, a tap for the facts, one card for the whole run, the walkthrough

The delivery track (#1236) said WHERE the change was. The owner, watching
the next run the same afternoon: "it would also be cool if there's some
time taking … how long each step takes or has taken by the moment I'm
looking at it. Maybe clicking on it and seeing what's going on would be
nice too" — and "smooth movement between different screens; if it's
working on something I should be able to see how it's working on it".

- Every stage carries `at` and `facts`. The page shows "took 1m 20s" on
  each stage behind, a one-second clock on the one happening now, and the
  time of day otherwise (lib/run-track: stageTimings, formatStageSeconds —
  pure, tested). A tap opens the row: which builder claimed it and when,
  when the request was delivered, when the agent started and last printed,
  the pull request by number, the merge, the deploy run, what Loki saw on
  the live page. The working row shows the agent's screen as Watch last
  peeked it, so "is it working?" has the screen as its answer.
- A pull request that exists while the agent is still in its session now
  reads "Claude Code is finishing up" (now), not "made the change" (done)
  with nothing happening — a live track always has a stage marked now.
- One card for the run's whole life (ProjectWatchLive, keyed by run):
  waiting → working → on its way → live/stopped. The old split into a live
  card and an outcome card unmounted one and mounted the other, so the
  page jumped at the moment the person was watching most closely. Marks
  and labels transition instead of snapping.
- The Walkthrough: the pull request's own account (lib/feedback/fix-note —
  problem, change, where, who it helps, why, alternatives, for us,
  downsides, costs, proof, left for later) plays on the card once the run
  is done. Every project dispatch now asks the agent for it (dispatchClosing
  carries fixNoteInstruction), not only visitor fixes.
- The fix ledger records when the deploy run last moved (deploy.at), so
  "live" has a time; GitHub's updated_at is read for it.

Checked in a real browser with the bundled components: the clock ticks,
rows open, no horizontal overflow at 390px, light and dark.

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

* test(watch): the browser fixture mounts the one-card Watch with its new props, and checks the track's clock and tap

terminal-clean-browser mounted ProjectWatchLive with the props the split
card had (working/startedAt), so the unified card's kicker looked up an
undefined phase and the page threw. The fixture now passes phase/track/
follow/walkthrough, and a second mount carries a track whose builder
stage is happening now: the row wears a running clock and a tap opens
the facts behind it, at 320 and 390px with no sideways scroll.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 05:10:26 -07:00
CatoandClaude 11083b4973 feat(watch): the delivery track — where the change is, from the ask to live (#1236)
The owner sent a one-line change to petvity from a phone, watched "Claude
Code is working · started just now" under a narrated headline that
paraphrased the request, and did not believe it: "I'm not sure if it's
being done or not, and I don't really have faith in it." Six minutes in,
GitHub already held the branch and the pull request; eleven minutes in it
was merged, deployed and live. Watch said none of that — it narrated, and
when the run closed it stopped at the agent's summary, on a change that was
still a pull request. The facts existed (run events, the fix ledger, the
repo) and were never put on one line a person could read top to bottom.

Now every run draws the same six stages, each done / now / next / needs you
/ failed on evidence only — an event, a URL on GitHub, a deploy run, never
the clock — with one sentence for the whole:

  You asked → A builder picked it up → Claude Code made the change →
  Pull request opened (link) → Checks passed and merged → Live on <site>
  (link, and what Loki saw when it opened the page)

- lib/run-track (pure, scripts/test/run-track.ts): the stages and the
  sentence, from run events + the fix ledger + repo evidence.
- lib/run-evidence-live: while a run is live (or closed well with a blind
  ledger), ask GitHub for the branch or pull request inside the run's
  window — at most once a minute per run, only for a page someone has
  open — and record it as payload.evidence, the key the reaper writes, so
  the ledger can follow a pull request the handoff never named instead of
  reporting "nothing reached GitHub" beside a merged one.
- github-evidence: skip bot pull requests and pushes. Dependabot opens on
  its own clock; "Pull request opened: bump 24 packages" about a font-size
  change is worse than nothing.
- /api/projects/[id]/watch carries `track`, `following`, `follow` and
  `liveUrl`; followRunLedger returns the ledger beside the follow line, and
  RunFollow carries its state. The payload type now declares `fix`.
- Watch: the track sits under the narrated headline while it works, and an
  outcome card (sentence, track, "Open the live page", Loki's picture)
  replaces "Finished" after. The page polls every 10 s after the run
  closes until the track settles, and not after.
- ui-track-* in globals.css; docs/foundation/RUN-STATUS-SSOT.md gains the
  track's stage/evidence table.

Checked at 390px light and dark and 1024px: no horizontal overflow.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 03:35:54 -07:00
CatoandClaude Opus 5.5 95383b92db Improve a live site as a private preview; consultation reads the whole site and talks (#1234)
* feat(change): improve a live site as a private preview, with a site tour and a consultation that talks

"Improve this site" created a GitHub repository per click and a kickoff that
told the agent to "treat the repository as possibly empty" — for a site that
already exists. Two clicks made two repos (center-com, center-com-2), and the
owner had nothing to show their client but a run log.

- /change builds a PREVIEW (lib/previews/from-website): folder + local git,
  <name>.orangecat.ch behind the access code, widget on it. No repository until
  the client says yes; servers without previews fall back to the repo path.
  Repeat submits resume the same preview. An access code is created when the
  operator has none.
- The brief starts from the live site and asks for improvements.html, a tour
  of what changed (live page vs new page), so the client SEES the improvement.
  "Watch it work" shows the link, code, tour and a copy-ready client message.
- The consultation reads the homepage AND the pages it links to
  (site-consult/crawl, bounded, same SSRF-guarded fetch), with site-wide checks:
  broken links, duplicate titles, thin pages.
- It is a conversation now: what Loki read, its advice on what to fix first,
  what already works, then two one-tap questions whose answers become brief
  lines from config.
- Loki chat's read_website reads up to five linked pages and returns the
  consultation as advice.

Fixes from the owner's screenshots:
- Owner launcher on phones drops the "Loki · watching" label and fades while
  scrolling — it was covering "It worked" and card buttons.
- Tapped labels no longer glue count badges on ("Feedback to triage11").
- The widget no longer files Loki's own app polls (/api/feedback/summary) or
  navigation-cut requests as its failures ("never answered after 0.3s").
- Live-check evidence speaks as Loki, not "The provided page text…".
- Watch: "Waiting to start · started just now / Queued" → "Next in line ·
  asked just now / Waiting for a builder to pick it up."
- Session box: an agent's "request access to the widget storage and dump
  submissions" suggestion is replaced by the Attach-feedback action.

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

* fix(feedback): keep evidence wording pure so the inbox client bundle builds

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

* test(widget): read the owner launcher's words, not its pixels

On phones the owner label is now hidden so it stops covering the page; the
accessible name still says Loki is watching.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-16 17:29:03 +00:00
CatoandClaude 73df3dbece feat(widget): speak while scrolling, ask or send after, editors sign in (#1230)
What the owner hit on evig.orangecat.ch, fixed as one flow:

- A long voice note looked cut off. It was not lost: the receipt quoted 300
  characters and was the only copy shown. The receipt now quotes the start
  (at a word) and folds the whole note under "Show all you sent".
- Speaking while scrolling: one dock (Listening · Mark · Done · ✕). Loki
  notes the part of the page in view at the start, when scrolling settles
  and on Mark; Whisper's sentence timings put each sentence under the part
  that was in view. No video, no screenshots, and the dock says so. The
  clock warns in the last 15 seconds before the 1:50 cap.
- After speaking: "What you said", editable, never sent by itself. Ask Loki,
  or send it (visitor), or Build it / Save note (owner).
- The aim button is "Point", labelled, everywhere. This page / Whole site /
  Point / Loki each say what they mean, and the placeholder follows.
- Sign in: the header button explains what happens; "Create one free" keeps
  the way back to the site; sign-in follows the API redirect for real.
  The project's editors now get the owner's panel (one rule,
  lib/feedback/pass-holder.ts, for every widget route).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-16 01:05:23 -07:00
Cato 25ae3de0e5 Make the Loki site widget one clear conversation (#1229)
* Improve widget conversation and mobile feedback flow

* Update widget layout assertion for simplified header
2026-10-16 07:50:05 +00:00
CatoandClaude Opus 5.5 9d5d0c4694 feat(widget): Loki's own look, in Loki's light or dark mode, with one scroll (#1227)
* feat(widget): Loki's own look, in Loki's light or dark mode, with one scroll

The site widget took its colours from the fleet's shared tokens, whose
accent is OrangeCat's warm orange, and was dark only: on a client's light
site the owner saw an orange-ringed black panel and asked why Loki's widget
looked like OrangeCat.

- Themes are generated from Loki's own globals.css, light and dark. The
  accent is the ink; the warm colour is only the focus ring and a picked
  element's outline on the host page.
- Every widget stylesheet reads var(--lk-*), defined for both modes on the
  shadow host; widget/theme-mode.ts picks one. The owner gets the mode they
  chose in Loki (user_preferences.theme, saved by ThemeSync via
  PUT /api/me/theme, returned with their changes and remembered per site);
  everyone else gets their device's setting, followed live.
- The panel is one column with one scroll area (the thread) between a fixed
  header and composer. The whole card used to scroll too, which hid the
  composer below a laptop's fold and nested scrolls on phones.
- The desktop card no longer greys out the site it invites you to use; the
  phone sheet opens at two thirds of the screen with a lighter scrim.
- About is a segmented control that fits a 320px phone on one line.
- The walkthrough card follows the same mode; its ring uses the highlight
  so it reads on light and dark sites.

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

* fix(widget): the launcher is findable — Loki's mark at full strength

On the owner's phone, signed out of the owner pass, AOZ showed a grey
pencil at 38% opacity and 85% size, and the owner said the widget was gone.
Without the launcher there is no way to the sign-in that brings owner mode
back. The resting launcher is now Loki's spiral at full strength with a
hairline and a soft lift off the page, on phones and desktop; it still
fades while the page scrolls.

Also: the user_theme migration is renumbered 0107 after main's 0106.

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

* fix(widget): keep the shared chat's thread bounded however chatkit nests it

CI's widget-kit-browser (needs @bitbaum/chatkit, so it only runs there)
failed one check: the chat thread no longer had a max-height once the panel
became a flex column. The flex layout bounds it only when the wrap is a
direct child, so the cap is back as a backstop, and the test now pins the
outcome — the thread scrolls and ends inside a card that fits the screen —
instead of the mechanism.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 10:40:11 -07:00
CatoandClaude 1cdd92a8ad fix(widget): Loki on the site answers what was asked (#1222)
On a client's site the owner said a description field had no microphone
and asked, twice, whether the site used the fleet's packages. Loki gave
the same advice about one textarea twice, in German to an English
question, and its Review called the minutes spent talking to it "the
page never responded for 194 s" with an invented endpoint.

- The advisor now sees how the site is built: the packages its code
  uses, the kickoff's plan, and the owner's build conventions
  (src/config/build-conventions.ts, also carried by every dispatch).
- Naming a package is no longer treated as "explaining how to edit";
  a point about every form is answered as a rule across the site; no
  repeated answers; replies follow the language of the latest message.
- What the owner says to Loki is a `talk` step in Watch's trail, so a
  Review reads that time as conversation; Review may not name an
  endpoint the evidence does not show.
- Loki's unasked page read skips test data and replaces the previous
  read instead of stacking one per page.
- First build convention: fields where people describe something get a
  microphone from @bitbaum/chatkit; short fields never do.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 09:13:00 -07:00
Cato f617c3ca48 Speak while browsing and explicitly turn review notes into fixes (#1218)
* Capture contextual voice notes while browsing a site

* Preserve unfinished page reads across reloads
2026-10-15 06:29:46 -07:00
CatoandClaude 8288d3e39e feat(terminal): one box for the agent, with the microphone; a prompt library you can search (#1219)
The phone terminal made a person choose Type (keystrokes, no microphone),
Prompt (a task with a microphone) or Keys before saying anything, the next-step
chips reshuffled while you read them, and the prompt picker could not find the
prompts you had saved yourself.

One box for the agent (SessionComposer), in the terminal view and the
conversation view, on a phone and a computer:
- Microphone, screenshots and the prompt library ("/" or the book button) in it.
- It picks the path itself: one of the agent's own commands is typed as keys,
  a screenshot goes through chat-send, a live session is typed into (paste +
  Enter, as in the terminal), and with nothing running the words go as a task
  that starts the agent or waits for the builder.
- "What's going on?" is the first chip above it; the header and the big button
  that asked the same question are gone.
- Keys is a button in its tool row and opens only the keys — no second text box.
- Pressing the terminal puts the cursor in the box (or, with live keystrokes on,
  hands the screen the keyboard).
- The Type / Prompt / Voice switch, the voice-only button and the exact-keys
  composer are removed; Loki's side panel only asks, and a summary's step lands
  in the box.

Next steps hold still: one set per settled screen or reply, waiting for the
fast model (then the rules), never reshuffled by a late answer, frozen while
you type, shown whole instead of clamped, two on a phone.

Prompt library:
- The picker lists your saved prompts first, then Loki's, with chips for Yours
  and each group; the keyboard hint is hidden on touch screens.
- Search also finds a prompt by the words inside it, after name, tag and
  description matches so a typo'd name still comes first.
- On /prompts the search box sits on top and searches your own prompts too.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 06:25:50 -07:00
CatoandClaude Sonnet 5.5 6142cb16f2 feat(ops): tell the operator when the gateway behind WhatsApp and Telegram dies (#1214)
* feat(ops): tell the operator when the gateway behind WhatsApp and Telegram dies

WhatsApp and the Telegram chat are both carried by the OpenClaw gateway
on bitbaum; Loki has no inbound channel of its own. It died on
2026-10-08 (the box rebooted, the openclaw user's systemd manager stayed
dead) and nothing said so for a week: the host health sweep had stopped
watching it the same day, believing it retired. Forwarding a message to
WhatsApp for the calendar just stopped working.

A check-gateway cron (every 10 min) probes the gateway. Any HTTP answer
is up; a refused connection or a timeout is down. Down raises one
gateway_down alert per outage (deduped) and one Telegram message — sent
through the Bot API directly, so it works while the gateway is the thing
that is down — naming the fix (run the "OpenClaw gateway up" workflow).
When it answers again the alert falls and one recovery message says so,
so the next outage is not swallowed by a flag that never fell.

Pure logic (lib/gateway-health.ts) is pinned by scripts/test/
gateway-health.ts, including that the probe uses a referenced timer (the
first version of the test "passed" by never finishing, because
AbortSignal.timeout's timer is unreferenced). The alert type is
registered with its producer, the timer is installed by
install-hetzner-crons.sh, the Telegram sender has its registry row, and
the cron calls no model (no-free-background-ai walks it).

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

* docs(changelog): gateway-down alert

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 05:33:28 -07:00
CatoandClaude d88cab3923 feat(notifications): turn this phone's push on, prove it, turn it off (#1212)
Production held ZERO subscribed push devices (the messaging doctor,
2026-10-15): the server could send a push, the VAPID keys and the service
worker were in place, and no screen anywhere offered a phone the choice —
usePushSubscription was imported by nothing. A new report on a site
reached no device, and said so only in a log line.

- Settings → Notifications gets an "On this phone" card: Turn on, Send a
  test, Turn off, with a plain sentence for every state (not asked,
  working, on, blocked by the browser, unsupported — with the iPhone
  Add-to-Home-Screen fix — error with retry, server has no key).
  Pure view logic (lib/push-card.ts) is pinned by scripts/test/push-card.ts;
  copy is SSOT in config/comms.ts.
- GET /api/push/public-key hands out the server's own VAPID_PUBLIC_KEY, so
  a phone no longer subscribes against a key inlined at build time that a
  build can lose or leave stale; POST /api/push/test sends one test push
  and names the failed precondition instead of a bare zero.
- The page-render harness is now a shared core (render-harness.mjs) with a
  thin script per page; the push card has one, and rendering it is how a
  filled button 8px shorter than its neighbour, and under 44px, was caught
  and fixed.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 05:21:22 -07:00
Cato 75a5831b43 Add guided project reviews with shared browser evidence and pause controls (#1211) 2026-10-15 05:15:00 -07:00
CatoandClaude Sonnet 5.5 ec5cbeff7b feat(ops): a read-only messaging doctor, run from GitHub (#1206)
* feat(ops): a read-only messaging doctor, run from GitHub

A Petvity report left from another phone could not be found, and no
Telegram, Web Push or WhatsApp message arrived for it. Everything that
answers "ingest, notifier, bot or gateway?" lives on the box, which an
agent session cannot reach — so the question was being guessed at.

scripts/hetzner/doctor-messaging.sh, run by .github/workflows/box-doctor.yml
over the same SSH setup as openclaw-media.yml, looks at: whether the
feedback rows exist, the widget token's status and last boot, what the
notifier logged, the channel configuration (yes/NO only), the Telegram
Bot API live (getMe, webhook state, optionally one test message to the
operator's own chat), the OpenClaw gateway (process, port, error-shaped
log lines, session and WhatsApp auth file times, the CLI's channel
status) and the last actions Loki queued from chat.

It changes nothing. The repo is public, so it prints counts, times and
statuses only: no feedback text, no action titles, no secrets, and every
line passes through a filter that masks long digit runs and token-shaped
strings.

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

* docs(telegram): register the box doctor's one test message

CI's Telegram-registry gate (scripts/ci/check-telegram-registry.sh) found
that scripts/hetzner/doctor-messaging.sh can reach the operator's phone
and was not listed. Add its row: one test message, on demand only, when
the Box doctor workflow is dispatched with send_test true.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 04:48:49 -07:00