mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 05:17:01 +01:00
"Builder" meant three things on Loki's screens: the machine that runs
agent work ("Cloud builder", "Waiting for a builder"), the role on a
project, and the approved builder a customer books through Bitbaum. The
person keeps the word; the machine becomes a runner, the word the code
and the desktop app already use (box-runner, Fleet Runner, "Hosted
runner"). Not "engine": on screen that is already the model and
subscription a change is built with.
- every user-facing string where "builder" meant the machine, with
EXECUTOR_COPY as the source, plus docs, quickstart, pricing and voice
- unchanged: the Builder role, "a builder or owner can start work",
people who build ("App builders", "for one builder running Loki"),
the site widget's "Send to builder" (the site's maker), stored
transcript parsing, and internal codes and paths (needs-builder,
cloud-builder-private, /api/builder/presence)
- tests that pin the wording follow it
Claude-Session: https://claude.ai/code/session_019MDtmw5m9WhdN77N2YeqDm
Co-authored-by: Claude <noreply@anthropic.com>
52 lines
1.9 KiB
TypeScript
52 lines
1.9 KiB
TypeScript
/**
|
|
* Each Control card offers the agents installed on the builder that runs that
|
|
* project (components/control/control-panel-card-props → onProjectBuilder).
|
|
*
|
|
* The panel-wide list read the computer's report first, so a cloud project
|
|
* was offered Codex because the laptop had it, and the dispatch then started a
|
|
* session for a program the cloud builder does not have.
|
|
*
|
|
* Run: npx tsx scripts/test/project-builder-agents.ts
|
|
*/
|
|
import assert from "node:assert/strict";
|
|
import { onProjectBuilder } from "@/components/control/control-panel-card-props";
|
|
|
|
const panel = [
|
|
{ id: "claude", label: "Claude", available: true },
|
|
{ id: "codex", label: "Codex", available: true },
|
|
{ id: "grok", label: "Grok", available: false },
|
|
];
|
|
|
|
const cloud = onProjectBuilder(panel, {
|
|
builderChannel: "cloud",
|
|
builderAgents: ["claude", "grok"],
|
|
});
|
|
assert.equal(cloud.find((a) => a.id === "claude")?.available, true);
|
|
assert.equal(
|
|
cloud.find((a) => a.id === "codex")?.available,
|
|
false,
|
|
"laptop-only Codex is not offered to a cloud project",
|
|
);
|
|
assert.match(
|
|
cloud.find((a) => a.id === "codex")?.availabilityReason ?? "",
|
|
/not installed on the cloud runner/,
|
|
);
|
|
assert.equal(cloud.find((a) => a.id === "codex")?.unavailableNote, "not on the cloud runner");
|
|
assert.equal(
|
|
cloud.find((a) => a.id === "grok")?.available,
|
|
true,
|
|
"installed on the runner that runs it, whatever the laptop says",
|
|
);
|
|
|
|
const local = onProjectBuilder(panel, { builderChannel: "local", builderAgents: ["codex"] });
|
|
assert.match(local.find((a) => a.id === "claude")?.availabilityReason ?? "", /your computer/);
|
|
|
|
assert.deepEqual(
|
|
onProjectBuilder(panel, { builderChannel: "cloud", builderAgents: null }),
|
|
panel,
|
|
"a runner that never reported leaves the rows as they were (unknown, not none)",
|
|
);
|
|
assert.deepEqual(onProjectBuilder(panel, {}), panel, "an older API response changes nothing");
|
|
|
|
console.log("✓ project-builder-agents: 9 checks passed");
|