- MCP
- blame on this site's /mcp
- CLI
- abso blame client/test/times.test.ts --json
- JSON
- /christopher/abso-core/blame/client/test/times.test.ts?format=json
53 linesFirst import 58% · pinch 38% · rename 4%Last change rename in version 100,
53 lines from 4 changes in 3 versions.
init0Start the project1// Times as abso shows them (abso issue 124): short, and the same everywhere.
3import assert from "node:assert/strict";
4import { test } from "node:test";
5import { newsWithTime, seenText, shortWhen } from "../src/times.ts";
7const now = Date.parse("2026-10-08T08:45:00Z");
9test("today's times are the hour and minute; earlier ones carry the date, and another year's the year", () => {
10 assert.equal(shortWhen(Date.parse("2026-10-08T08:34:59Z"), now), "08:34 UTC");
11 assert.equal(shortWhen(Date.parse("2026-10-07T21:10:00Z"), now), "Oct 7 21:10 UTC");
12 assert.equal(shortWhen(Date.parse("2025-12-31T23:59:00Z"), now), "Dec 31 2025 23:59 UTC");
13});
15test("seen says when, or new", () => {
16 assert.equal(seenText(null, now), "new");
17 assert.equal(seenText(Date.parse("2026-10-08T08:40:00Z"), now), "seen 08:40 UTC");
18});
20test("news carries its time after the who", () => {
21 const at = Date.parse("2026-10-08T08:34:00Z");
22 assert.equal(
23 newsWithTime("Announcement from ann (as claimed): Split api.ts", at, now),
pinch33Client: a tell reads as who told you and how sure that is, with what was said on the lines below: "ann (as claimed) told you:", "Robin (a person) told you:", "ann (checked) told you:" for an agent with a key of its own. A person's words are unquoted and their id is left out (news.log keeps the sentence whole). Tells are never cut in an agent's context, and later lines are indented everywhere news is printed (news, the News: block, the edit hook). What the server stores is unchanged. Client tests 273/273, tsc and biome clean.Compare24 "ann (as claimed) told you, 08:34 UTC:\nSplit api.ts",
26 assert.equal(
27 newsWithTime('Announcement from C (a person, signed in on the website, id cf-1): "hi"', at, now),
pinch33Client: a tell reads as who told you and how sure that is, with what was said on the lines below: "ann (as claimed) told you:", "Robin (a person) told you:", "ann (checked) told you:" for an agent with a key of its own. A person's words are unquoted and their id is left out (news.log keeps the sentence whole). Tells are never cut in an agent's context, and later lines are indented everywhere news is printed (news, the News: block, the edit hook). What the server stores is unchanged. Client tests 273/273, tsc and biome clean.Compare28 "C (a person) told you, 08:34 UTC:\nhi",
30 assert.equal(
pinch33Client: a tell reads as who told you and how sure that is, with what was said on the lines below: "ann (as claimed) told you:", "Robin (a person) told you:", "ann (checked) told you:" for an agent with a key of its own. A person's words are unquoted and their id is left out (news.log keeps the sentence whole). Tells are never cut in an agent's context, and later lines are indented everywhere news is printed (news, the News: block, the edit hook). What the server stores is unchanged. Client tests 273/273, tsc and biome clean.Compare31 newsWithTime("Announcement from ann (as claimed): Split api.ts", null, now),
32 "ann (as claimed) told you:\nSplit api.ts",
33 );
34 assert.equal(
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare35 newsWithTime('w1 pushed "x" (version 3), which changes a.txt line 2', at, now),
36 'w1 pushed "x" (version 3), which changes a.txt line 2 (08:34 UTC)',
38 assert.equal(newsWithTime("from before times", null, now), "from before times");
pinch33Client: a tell reads as who told you and how sure that is, with what was said on the lines below: "ann (as claimed) told you:", "Robin (a person) told you:", "ann (checked) told you:" for an agent with a key of its own. A person's words are unquoted and their id is left out (news.log keeps the sentence whole). Tells are never cut in an agent's context, and later lines are indented everywhere news is printed (news, the News: block, the edit hook). What the server stores is unchanged. Client tests 273/273, tsc and biome clean.Compare39});
41test("a tell is shown as who told you and how sure that is, with what was said below", () => {
42 const shown = (text: string) => newsWithTime(text, null, now);
43 assert.equal(shown("Announcement from ann (key k_0123abcd): Go"), "ann (checked) told you:\nGo");
44 assert.equal(shown("Announcement from ann (key k_0123abcd, box b7): Go"), "ann (checked, box b7) told you:\nGo");
45 assert.equal(shown("Announcement from ann (shared token): Go"), "ann (as claimed) told you:\nGo");
46 // A person's words are unquoted, line breaks and all; their id is left out.
47 const person = shown(
48 `Announcement from Robin Ash (a person, signed in on the website, id cf-9): ${JSON.stringify('Two\nlines "here"')}`,
49 );
50 assert.equal(person, 'Robin Ash (a person) told you:\nTwo\nlines "here"');
51 // Anything else that starts the same way is other news, shown as it is.
52 assert.equal(shown("Announcement from ann (made up): Go"), "Announcement from ann (made up): Go");