Name: Explicata, and EX_ for the environment variables
Infinispand becomes Explicata (Latin, "things unfolded") wherever the name shows: the page title, README, package, prompts, seed title, Wikipedia User-Agent and startup line. Every IE_* variable becomes EX_*. The browser's IndexedDB name and the ie: storage keys stay, so settings and replicas already stored are found; the migration fixtures keep the old seed title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q6Kn9JiRmGKzPQMh7o
This commit is contained in:
1 parent
e6d71e84de
commit
60d26908d6
51 files changed
+256
-252
No files matched your search
@@ -64,7 +64,7 @@ describe("actions", () => {
|
||||
|
||||
it("the selection menu puts Copy first, then what the words carry, then the lenses, linking and Related", () => {
|
||||
const { act, calls } = recorder();
|
||||
const plain = selectionEntries(sel({ related: [{ title: "Expansion by depth", where: "Infinispand" }, { title: "Nodes" }] }), act);
|
||||
const plain = selectionEntries(sel({ related: [{ title: "Expansion by depth", where: "Explicata" }, { title: "Nodes" }] }), act);
|
||||
expect(labels(plain)).toEqual([
|
||||
"# “a probability for each possible next piece”",
|
||||
"Copy",
|
||||
|
||||
@@ -164,7 +164,7 @@ describe("convergence", () => {
|
||||
}
|
||||
}
|
||||
}),
|
||||
{ numRuns: Number(process.env.IE_RUNS ?? 200) },
|
||||
{ numRuns: Number(process.env.EX_RUNS ?? 200) },
|
||||
);
|
||||
}, 300_000);
|
||||
});
|
||||
@@ -86,7 +86,7 @@ function serve(data: string, library: string, port = PORT): { child: ChildProces
|
||||
const out: string[] = [];
|
||||
const child = spawn(process.execPath, ["--import", "tsx", "server/index.ts"], {
|
||||
cwd: ROOT,
|
||||
env: { ...process.env, IE_PROD: "1", IE_LLM: "mock", IE_MOCK_DELAY: "0", IE_WIKI: "mock", IE_EMBED: "fake", IE_DATA: data, IE_LIBRARY: library, PORT: String(port), IE_USER: "tester" },
|
||||
env: { ...process.env, EX_PROD: "1", EX_LLM: "mock", EX_MOCK_DELAY: "0", EX_WIKI: "mock", EX_EMBED: "fake", EX_DATA: data, EX_LIBRARY: library, PORT: String(port), EX_USER: "tester" },
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
});
|
||||
servers.push(child);
|
||||
@@ -140,7 +140,7 @@ describe("the server with several libraries", () => {
|
||||
expect(a.title).toBe("Library");
|
||||
const treeA = await get(`/api/l/${a.id}/tree`);
|
||||
const topsA = treeA.nodes[treeA.root].children.map((c: string) => treeA.nodes[c].title);
|
||||
expect(topsA).toEqual(["Infinispand", "Tides"]);
|
||||
expect(topsA).toEqual(["Explicata", "Tides"]);
|
||||
// The unprefixed routes are the first library's.
|
||||
expect((await get("/api/tree")).library).toBe(a.id);
|
||||
expect((await get("/api/state")).library).toBe(a.id);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Link discovery (server/links): the extractor, the tiering rule, density and first mention,
|
||||
* self and ancestor exclusion, declined phrases, marks, degraded text-only mode, the incremental
|
||||
* node index, background jobs, and accept/reject. Offline: the mock Wikipedia and the hashed-words
|
||||
* embedder (IE_EMBED=fake).
|
||||
* embedder (EX_EMBED=fake).
|
||||
*/
|
||||
import { createServer, type Server } from "node:http";
|
||||
import type { AddressInfo } from "node:net";
|
||||
|
||||
@@ -173,6 +173,7 @@ describe.each(["pre", "main", "mixed"])("migrating data written by %s", (name) =
|
||||
const rootNote = root.children.map((c) => b.nodes[c]).find((n) => n.kind === "note")!;
|
||||
expect(rootNote.anchors.map((x) => x.text)).toEqual(["Root words"]);
|
||||
expect(rootNote.body).toBe("A note on the library root itself.");
|
||||
// The fixtures were written when the project was called Infinispand.
|
||||
expect(b.nodes[root.children[0]].title).toBe("Infinispand");
|
||||
expect(b.nodes[root.children[1]].title).toBe("Migration notes");
|
||||
// Locks: set on a model's node, taken off a person's.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Web research for the editor agent, with no network: the mock's fake search and fetch, the URL
|
||||
* rule in the tool executor, pause_turn, caps, IE_WEB, the subscription route's option object, and
|
||||
* rule in the tool executor, pause_turn, caps, EX_WEB, the subscription route's option object, and
|
||||
* the API-key route's request and stream against a local stand-in for the API.
|
||||
*/
|
||||
import { createServer, type IncomingMessage, type Server } from "node:http";
|
||||
@@ -223,22 +223,22 @@ describe("caps", () => {
|
||||
});
|
||||
|
||||
it("the server's caps replace the browser's, and are the API tools' max_uses", () => {
|
||||
const cfg = webConfig({ IE_WEB_SEARCHES: "3", IE_WEB_FETCHES: "2" }, true);
|
||||
const cfg = webConfig({ EX_WEB_SEARCHES: "3", EX_WEB_FETCHES: "2" }, true);
|
||||
expect(cfg).toEqual({ on: true, searches: 3, fetches: 2 });
|
||||
const req = applyWebPolicy({ system: "", context: "", messages: [], research: { searches: 99, fetches: 99, used: { searches: 1, fetches: 0 } } }, cfg);
|
||||
expect(req.research).toMatchObject({ searches: 3, fetches: 2, used: { searches: 1, fetches: 0 } });
|
||||
const tools = apiWebTools("claude-opus-5-5", req.research!);
|
||||
expect(tools.map((t) => [t.type, (t as { max_uses?: number }).max_uses])).toEqual([["web_search_20260209", 3], ["web_fetch_20260209", 2]]);
|
||||
expect(webConfig({}, true)).toEqual({ on: true, searches: 5, fetches: 5 });
|
||||
expect(webConfig({ IE_WEB_SEARCHES: "lots" }, true).searches).toBe(5);
|
||||
expect(webConfig({ EX_WEB_SEARCHES: "lots" }, true).searches).toBe(5);
|
||||
});
|
||||
});
|
||||
|
||||
describe("IE_WEB", () => {
|
||||
describe("EX_WEB", () => {
|
||||
it("off: research is taken out of every turn, whatever the browser asked", async () => {
|
||||
const cfg = webConfig({ IE_WEB: "off" }, true);
|
||||
const cfg = webConfig({ EX_WEB: "off" }, true);
|
||||
expect(cfg.on).toBe(false);
|
||||
expect(webConfig({ IE_WEB: "maybe" }, true).on).toBe(false);
|
||||
expect(webConfig({ EX_WEB: "maybe" }, true).on).toBe(false);
|
||||
expect(webConfig({}, false).on).toBe(false);
|
||||
// The mock behind the server's policy, as the server runs it.
|
||||
const base = mockLLM();
|
||||
|
||||
+2
-2
@@ -236,7 +236,7 @@ describe("queue", () => {
|
||||
await w.lookup(["Page 1"]);
|
||||
await w.lookup(["Page 2"]);
|
||||
expect(slept).toEqual([1000]);
|
||||
expect(calls[0].headers["user-agent"]).toBe("Infinispand/0.1 (personal knowledge tool)");
|
||||
expect(calls[0].headers["user-agent"]).toBe("Explicata/0.1 (personal knowledge tool)");
|
||||
});
|
||||
|
||||
it("drops a queued request whose caller aborted, without sending it", async () => {
|
||||
@@ -258,7 +258,7 @@ describe("user agent and contact", () => {
|
||||
expect(validContact("https://example.org/me")).toBe("https://example.org/me");
|
||||
expect(validContact("Jane Doe")).toBeNull();
|
||||
expect(validContact("a@b.c; rm")).toBeNull();
|
||||
expect(userAgent("me@example.org")).toBe("Infinispand/0.1 (me@example.org)");
|
||||
expect(userAgent("me@example.org")).toBe("Explicata/0.1 (me@example.org)");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ describe("/api/wiki over the mock provider", () => {
|
||||
for (const path of ["/api/wiki/summary?title=Octopus", "/api/wiki/lookup", "/api/wiki/anything"]) {
|
||||
expect(await get(off.base, path)).toEqual({
|
||||
status: 503,
|
||||
body: { ok: false, reason: "off", message: "Wikipedia is turned off on this server (IE_WIKI=off)." },
|
||||
body: { ok: false, reason: "off", message: "Wikipedia is turned off on this server (EX_WIKI=off)." },
|
||||
});
|
||||
}
|
||||
expect((await fetch(`${off.base}/api/state`)).status).toBe(418);
|
||||
|
||||
Reference in new issue
Block a user