mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 06:17:23 +01:00
Found by using loki.orangecat.ch as a new, non-technical account:
- "Yes, create it" under Loki's own suggestion was sent to the only
project as a build task. A bare yes is now a reply: it runs the one
ready-to-send line the previous answer ended with, or stays in chat.
- A newcomer's private zone (approvals, commitments, people) was locked
behind the founder's env PIN, which every PIN-less account inherited —
a dead end for them, and the founder's PIN opened all of them. The env
PIN now gates the owner account only.
- Loki did not know the date: "dentist on Monday" came back as "the date
for Monday is not in your data". Every turn now carries the time in
the person's own zone, and drafts lead with what was drafted.
- "What did I ask you today?" got "no record of any request". Recent
threads are now a source Loki reads when asked about them.
- A refused dispatch left its run WAITING forever (six phantom runs);
it is now closed as undelivered, quietly, since the reply says so.
- The fleet fact said "OFFLINE — nothing can run" to an account that
can never use the cloud builder, so Loki told it to restart a runner.
It now says which is true and the way forward; the prompt asks for
plain words and no "restart Loki's services" advice.
- A system-prompt example leaked the owner's project into strangers'
answers ("sink: bring runner online…").
- Citations were eight 44px "Source" buttons inline; now one per
paragraph, at its end.
- Thread titles were cut by reasoning tokens ("Bring") and repeated the
project shown right beside them.
Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B
Co-authored-by: Claude <noreply@anthropic.com>
73 lines
2.0 KiB
TypeScript
73 lines
2.0 KiB
TypeScript
/**
|
|
* Loki knows what day it is, where the person is. Case from the live site
|
|
* (2026-10-15): "dentist on Monday at 9am" → "the date for Monday is not in
|
|
* your data".
|
|
*/
|
|
import { effectiveTimeZone, nowLine } from "@/lib/agent/now-line";
|
|
|
|
let passed = 0;
|
|
function check(label: string, cond: boolean): void {
|
|
if (!cond) throw new Error(`✗ ${label}`);
|
|
passed++;
|
|
console.log(` ✓ ${label}`);
|
|
}
|
|
const now = new Date("2026-10-15T22:30:00Z");
|
|
|
|
const zurich = nowLine(now, "Europe/Zurich");
|
|
check(
|
|
"names the weekday and date in the person's zone",
|
|
zurich.includes("Friday, 16 October 2026"),
|
|
);
|
|
check("…and the local time", zurich.includes("00:30"));
|
|
check("…and the zone", zurich.includes("(Europe/Zurich)"));
|
|
check("tells Loki to work dates out itself", /never ask the operator for a date/.test(zurich));
|
|
check(
|
|
"an unusable zone falls back, never throws",
|
|
nowLine(now, "Mars/Olympus").includes("Europe/Zurich"),
|
|
);
|
|
|
|
check("no preferences → the default zone", effectiveTimeZone(null, now) === "Europe/Zurich");
|
|
check(
|
|
"home zone",
|
|
effectiveTimeZone({ homeTimezone: "America/New_York" }, now) === "America/New_York",
|
|
);
|
|
check(
|
|
"travelling, until a later day → the travel zone",
|
|
effectiveTimeZone(
|
|
{
|
|
homeTimezone: "Europe/Zurich",
|
|
currentTimezone: "Asia/Tokyo",
|
|
currentCityUntil: "2026-10-20",
|
|
},
|
|
now,
|
|
) === "Asia/Tokyo",
|
|
);
|
|
check(
|
|
"the trip's last day still counts",
|
|
effectiveTimeZone(
|
|
{
|
|
homeTimezone: "Europe/Zurich",
|
|
currentTimezone: "Asia/Tokyo",
|
|
currentCityUntil: "2026-10-15",
|
|
},
|
|
now,
|
|
) === "Asia/Tokyo",
|
|
);
|
|
check(
|
|
"after the trip → home again",
|
|
effectiveTimeZone(
|
|
{
|
|
homeTimezone: "Europe/Zurich",
|
|
currentTimezone: "Asia/Tokyo",
|
|
currentCityUntil: "2026-10-01",
|
|
},
|
|
now,
|
|
) === "Europe/Zurich",
|
|
);
|
|
check(
|
|
"a bad stored zone is ignored",
|
|
effectiveTimeZone({ homeTimezone: "nowhere" }, now) === "Europe/Zurich",
|
|
);
|
|
|
|
console.log(`\nnow-line: ${passed} passed`);
|