Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
name: Lint (Biome)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Run Biome lint
run: npm run lint

validate:
name: Validate on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
Expand Down
17 changes: 17 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
"vcs": { "enabled": false },
"formatter": { "enabled": false },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noImplicitAnyLet": "off",
"noAssignInExpressions": "off",
"noDuplicateProperties": "off",
"noDuplicateCustomProperties": "off"
}
}
}
}
176 changes: 176 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"bench:truthfulness": "node benchmarks/truthfulness.mjs",
"bench:compare": "node benchmarks/comparison.mjs",
"pack:check": "npm pack --dry-run",
"lint": "biome lint plugins/ scripts/ benchmarks/ tests/ tools/",
"lint:fix": "biome lint --write plugins/ scripts/ benchmarks/ tests/ tools/",
"audit": "npm audit --audit-level=moderate",
"publish:check": "node scripts/check-npm-publish-ready.mjs",
"validate": "npm test && node scripts/validate-opencode-config.mjs && npm run publish:check -- --skip-registry && npm run pack:check",
Expand Down Expand Up @@ -94,6 +96,7 @@
"@opencode-ai/sdk": "1.17.6"
},
"devDependencies": {
"@biomejs/biome": "2.5.0",
"@opencode-ai/plugin": "1.17.6",
"fast-check": "^4.8.0",
"yaml": "^2.6.1"
Expand Down
1 change: 0 additions & 1 deletion plugins/goal-guard/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ function structure(tokens) {
} else {
redirects.push({ op: t.value, target: "" });
}
continue;
}
}
flushPipeline();
Expand Down
2 changes: 1 addition & 1 deletion tests/plugin.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ test("goal_status returns structured status", async () => {
const tools = createGoalTools({ store: guard.store, config: guard.config, persist: guard.persist });
await guard.hooks["chat.params"]({ sessionID: "stx", agent: "goal" }, {});
const res = await tools.goal_status.execute({}, { sessionID: "stx" });
let report = JSON.parse(res.output);
const report = JSON.parse(res.output);
assert.equal(report.active, true);
assert.ok(Array.isArray(report.requiredGates));
assert.equal(report.reviewerMemory.open.length, 0);
Expand Down
2 changes: 1 addition & 1 deletion tests/review-runner.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ test("the cycle: FAIL → fix(edit) → re-review PASS counts 2 review cycles",
const store = createStore();
const sid = "g3";
const state = goalState(store, sid);
let r1 = await runReviewCycle(mockReviewClient((a) => (a === "goal-final-auditor" ? "FAIL" : "PASS"), sid), store, state, DEFAULT_CONFIG, fastOpts(sid));
const r1 = await runReviewCycle(mockReviewClient((a) => (a === "goal-final-auditor" ? "FAIL" : "PASS"), sid), store, state, DEFAULT_CONFIG, fastOpts(sid));
assert.equal(r1.completionAllowed, false);
assert.equal(state.reviewCycles, 1);
markEdit(store, state, "fix after review");
Expand Down
2 changes: 1 addition & 1 deletion tools/lab/server/server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function buildGraph(store, runId) {

export function createApiServer(store, orchestrator) {
async function serveStatic(req, res, pathname) {
let rel = pathname === "/" ? "/index.html" : pathname;
const rel = pathname === "/" ? "/index.html" : pathname;
const full = normalize(join(WEB_ROOT, rel));
if (!full.startsWith(WEB_ROOT)) {
res.writeHead(403);
Expand Down
4 changes: 3 additions & 1 deletion tools/lab/web/js/diagrams.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ export function orchestrationGraph(graph) {
el.insertBefore(s("path", { class: "edge", d: `M ${x1} ${y1} C ${mx} ${y1}, ${mx} ${y2}, ${x2} ${y2}`, "stroke-width": Math.min(3, 0.6 + e.count * 0.4) }), el.firstChild);
}
// column captions
["GOAL", "SUBAGENTS", "TOOLS"].forEach((t, i) => el.append(s("text", { class: "lbl", x: colX[i], y: 12, "font-size": 9 }, t)));
["GOAL", "SUBAGENTS", "TOOLS"].forEach((t, i) => {
el.append(s("text", { class: "lbl", x: colX[i], y: 12, "font-size": 9 }, t));
});
return el;
}

Expand Down
2 changes: 1 addition & 1 deletion tools/lab/web/js/views/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function AgentView(navigate, runId) {
list.append(h("div.eh-head", {}, h("span", { text: "#" }), h("span", { style: { textAlign: "right" }, text: "offset" }), h("span", { text: "time" }), h("span", { text: "type" }), h("span", { text: "detail" })));
const shown = events.filter(matchFilter);
if (!shown.length) list.append(empty("no events match this filter"));
let atBottom = false;
const atBottom = false;
for (const e of shown) {
const off = t0 ? "+" + ((e.ts - t0) / 1000).toFixed(1) + "s" : "";
const isOpen = openRows.has(e.seq);
Expand Down
Loading