Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 45 to 318

Compare

+20 −6 in 5 places
Lines 1–7 at 318 (were 1–7 at 45)
11// What the project looks like now: status, the paths in a folder, and the labels. They read through
22// SnapshotHost; today the host is the project in memory.
33
4−import type { AtomId, View } from "../../src/engine/index.ts";
4+import type { AtomId, ReadView } from "../../src/engine/index.ts";
55import { ProjectError } from "./project-error.ts";
66import { countRefusals, type projectFileIn } from "./project-helpers.ts";
77import type {
Lines 39–66 at 318 (were 39–52 at 45)
3939 setOf(space: Space): ReadonlySet<AtomId>;
4040 spaceNamed(name: string | null): Space;
4141 checkVersion(space: Space, version: number): void;
42− viewAt(space: Space, version: number): View;
43− agentView(agent: AgentState): View;
42+ viewAt(space: Space, version: number): ReadView;
43+ /** A version's file list from kept version shapes, when every version up to it has one (pathindex.ts). */
44+ keptPaths?(space: Space, version: number): string[] | undefined;
45+ agentView(agent: AgentState): ReadView;
4446 version(): number;
4547 /** Shared's project file (224), or undefined before init or without one. */
4648 projectFile(): ReturnType<typeof projectFileIn>;
4749}
4850
4951/**
52+ * An agent with nothing of its own sees exactly its base version, so its paths are that version's kept file list
53+ * (pathindex.ts), when there is one: no layout of every known file (abso - Performance, abso 711).
54+ */
55+function viewPaths(host: SnapshotHost, agent: AgentState): string[] {
56+ const kept =
57+ agent.mine.length === 0
58+ ? host.keptPaths?.(host.spaceNamed(agent.space === SHARED ? null : agent.space), agent.base)
59+ : undefined;
60+ return kept ?? host.agentView(agent).paths();
61+}
63+/**
5064 * The paths in an agent's view now (#37): what its folder should hold.
5165 * Reading it changes nothing. Binary files are included.
5266 */
Lines 74–80 at 318 (were 60–66 at 45)
6074 return {
6175 version: agent.base,
6276 draft: agent.space === SHARED ? null : agent.space,
63− files: host.agentView(agent).paths(),
77+ files: viewPaths(host, agent),
6478 };
6579}
6680
Lines 88–94 at 318 (were 74–80 at 45)
7488 const space = host.spaceNamed(draft);
7589 const v = version ?? last(space);
7690 host.checkVersion(space, v);
77− return { version: v, draft, files: host.viewAt(space, v).paths() };
91+ return { version: v, draft, files: host.keptPaths?.(space, v) ?? host.viewAt(space, v).paths() };
7892}
7993
8094/**
Lines 106–112 at 318 (were 92–98 at 45)
92106 agent: agent.name,
93107 version: agent.base,
94108 draft: agent.space === SHARED ? null : agent.space,
95− files: host.agentView(agent).paths(),
109+ files: viewPaths(host, agent),
96110 };
97111}
98112
MCP
compare on this site's /mcp
CLI
abso diff 45 318 worker/project/project-status.ts --json
JSON
/christopher/abso-core/compare/45..318?file=worker%2Fproject%2Fproject-status.ts&format=json