mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 04:36:59 +01:00
* 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>
77 lines
2.4 KiB
TypeScript
77 lines
2.4 KiB
TypeScript
/**
|
|
* The operator's own threads as records. Case from the live site (2026-10-15):
|
|
* "what did I ask you today?" was answered "no record of any request".
|
|
*/
|
|
import { recentThreadFacts } from "@/lib/agent/sources-threads";
|
|
|
|
let passed = 0;
|
|
function check(label: string, cond: boolean): void {
|
|
if (!cond) throw new Error(`✗ ${label}`);
|
|
passed++;
|
|
console.log(` ✓ ${label}`);
|
|
}
|
|
const now = Date.parse("2026-10-15T12:00:00Z");
|
|
const at = (h: number) => new Date(now - h * 3_600_000);
|
|
const row = (over: Partial<Parameters<typeof recentThreadFacts>[0][number]>) => ({
|
|
id: "t",
|
|
title: "Dentist on Monday",
|
|
projectKeys: [] as string[],
|
|
updatedAt: at(1),
|
|
lastReadAt: null,
|
|
preview: "Put an event in my calendar: dentist on Monday at 9am",
|
|
lastRole: "user",
|
|
lastKind: "chat",
|
|
lastAt: at(1),
|
|
lastOk: null,
|
|
lastOutcome: null,
|
|
lastNeedsProject: null,
|
|
...over,
|
|
});
|
|
|
|
const facts = recentThreadFacts(
|
|
[
|
|
row({ id: "a" }),
|
|
row({
|
|
id: "b",
|
|
title: "Track podcast and design work",
|
|
projectKeys: ["prodtest-bakery"],
|
|
preview: "Could not dispatch to prodtest-bakery",
|
|
lastRole: "assistant",
|
|
lastKind: "dispatch",
|
|
lastOk: false,
|
|
lastAt: at(2),
|
|
}),
|
|
row({ id: "old", title: "Last month", lastAt: at(24 * 30), updatedAt: at(24 * 30) }),
|
|
],
|
|
10,
|
|
now,
|
|
);
|
|
const text = JSON.stringify(facts);
|
|
check("one fact per thread from the last week", facts.length === 2);
|
|
check("a thread older than a week is left out", !text.includes("Last month"));
|
|
check(
|
|
"the operator's own words are attributed to them",
|
|
text.includes("the operator: Put an event"),
|
|
);
|
|
check("a failed dispatch says it could not start", text.includes("Could not start"));
|
|
check("a thread with no project says none", text.includes('"projects":"none"'));
|
|
check("the project is named when there is one", text.includes("prodtest-bakery"));
|
|
check("a thread waiting on Loki says so", text.includes("Waiting on Loki"));
|
|
check("the limit holds", recentThreadFacts([row({}), row({}), row({})], 2, now).length === 2);
|
|
|
|
// Live, 2026-10-17: the driver handed lastAt back as a string, .getTime()
|
|
// threw, and the whole source returned nothing.
|
|
const asString = recentThreadFacts(
|
|
[
|
|
row({
|
|
title: "String timestamps",
|
|
lastAt: new Date(now - 60_000).toISOString() as unknown as Date,
|
|
}),
|
|
],
|
|
5,
|
|
now,
|
|
);
|
|
check("a timestamp that arrives as a string still counts", asString.length === 1);
|
|
|
|
console.log(`\nthread-facts: ${passed} passed`);
|