Commit Graph
3 Commits
Author SHA1 Message Date
CatoandClaude 2c63cca69f fix(loki): judge a scoped chat by the person's words, not the project wrapper (#1264)
Live after #1261: "What year was the Eiffel Tower built?" was answered but
flagged as unbacked, and the GmbH question still came back "Not in your
data." Every chat on a one-project account is scoped, so the loop received
"[Scoped to project: …] <project details> [User message] <question>" — and
the wrapper's own word "project" made every question one about the
person's projects. The general-question classifier, its hint, its retry and
the retrieval planner now read the person's own words (lib/loki/chat-scope.ts);
sources still get the full prompt so the scoped project ranks first.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 18:37:04 +02:00
CatoandClaude 4d5769bc1f fix(loki): a refused general question is asked again; a day's recap reads the whole day (#1261)
Live after #1260: Gemini Flash still answered "What year was the Eiffel Tower
built?" with "Not in your data." — the contract's earlier rules (cite every
claim; refuse what has no record) outranked rule 11 at the end of it.

- The question carries a one-line hint beside it when it is general.
- A bare refusal to a general question is asked once more with no records
  and no contract (one retry helper now shared with the plan retry).
- The repair pass's contract includes rules 7-11, so it can no longer turn a
  general answer back into the refusal.
- "What did I ask you today?" read only five threads: "today" is a recency
  cue and capped every source at five. Threads are exempt, like projects.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 18:12:26 +02:00
CatoandClaude Opus 5.5 e47011e270 Security: the server's files belong to its owner; Loki answers general questions and recaps chats (#1260)
* fix(loki): answer general questions, plain words for who can build, one reminder at a time

- General questions get general answers. "What year was the Eiffel Tower
  built?" answered "Not in your data." live: the closed-world check flagged
  every name and year, and the repair pass deleted them. When the question
  names no surface of the person's records, only the sentences about their
  records are checked (cited, or naming a person/project/goal they have).
  Contract rule 11 says the same to the model.
- A bold "<project>: …" line that only the person can carry out (install the
  desktop app, sign in, add a key, approve, pay) is no longer offered to a
  "yes", and is rewritten as a plain sentence.
- The fleet facts and brief say "can new work start right now" in plain words
  (Loki's own computers / the desktop app) instead of runner/builder, and the
  two no longer disagree. Field names stop leaking ("the query returned none").
- One account reminder at a time: the OrangeCat link line first, then the
  verify-email line, each one row on a phone.
- Onboarding: no CLI/tenant wording; the folder field is asked only of someone
  whose code is already on this computer.

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

* fix(security): the server's files and telemetry are the operator's, not every account's

- /api/people/sync/openclaw read the OpenClaw contact book from the server's
  home directory — the site operator's WhatsApp/Telegram contacts — and
  wrote it into the CALLER's book. Any signed-in account with its private
  zone open (a new one has no PIN) could copy it. Now operator-only, and the
  People page no longer explains OpenClaw and Hermes to people who have
  neither.
- /system showed every account the box's RAM, disk, uptime, Hetzner capacity
  and "Recent telemetry" from debug_logs, which has no user column: every
  account's errors, sign-in failures and cron counts. Those cards and
  /api/system, /api/system/hetzner are now the operator's; a tenant keeps
  their own alarms, jobs and records.
- Suggestions: OrangeCat gift wishlists ("My Birthday Wishlist") are no
  longer offered as things to build, and each starter says what it is
  instead of one sentence repeated four times.

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

* fix(loki): name threads from the server; phone-sized targets and clamps

- A thread is named the moment its first answer is saved, server-side. The
  browser was the only caller, 3s after the answer, so a person who locked
  their phone or closed the tab left the thread named by its opening line.
  The browser's ask now also takes a title the server already set.
- /suggestions: the "Quiet today" links were 18px tall; now 44px targets.
- /packages: descriptions declared two lines and rendered four (a `block`
  utility beat line-clamp).
- /loki start screen: an untitled thread shows two lines of the question
  instead of one cut mid-word.

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

* fix(security): free-text folder paths and server files are the machine owner's

An audit of every route that touches the server's own filesystem or
processes, for an ordinary signed-in account on the hosted server:

- DELETE /api/projects/[id]?deleteLocal=1 removed any folder under the dev
  root that the account's free-text dirPath named — the operator's checkout,
  another tenant's preview. Now only an account allowed on the fleet machine.
- GET /api/projects/[id] returned the operator's OpenClaw cron jobs matched by
  a substring of the project name. Operator only.
- POST /api/control/agent rewrote the server's global agent preferences and
  Claude settings. Now the machine owner's: own desktop app, or the operator.
- GET /api/sessions read any project's handoff by name. Now only a project the
  account owns, where the server's files can be its own.
- merge-prompts fell back to the operator's OpenClaw agent with user text
  through a shell. Machine owner only, argv not shell, input bounded.
- /api/control ran git and a /proc scan on account-chosen folders. Machine
  owner only.
- Previews (public <slug>.orangecat.ch sites with the fleet's deploy key) are
  fleet infrastructure; preview owner lookup no longer lets a copied dirPath
  decide whose access code opens a preview.
- The feedback page picture no longer opens private-network addresses on the
  server (checked on every request the page makes).
- New cron jobs are addressed to the operator's Telegram only for the operator.

Also: "what did I ask you today?" never worked live — the thread source threw
on a timestamp the driver returned as a string, and returned nothing.

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

* fix(models): the model table no longer pushes a tablet page sideways

At 768px the table needed ~910px and overflowed the page by 164px
(responsive audit against production, 2026-10-17). Rows stay cards up to the
laptop breakpoint, and the table scrolls inside its own box as a backstop.

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-17 17:51:39 +02:00