chore: project setup and tooling cleanup (#26)

* add project setup

* add tools to eslint

* remove contributing.md

* update claude md

* chore: simplify CI to single Node.js version (22)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* use node 20

* adjust formatting

* fix linting

* format

* fix layout

* fix: align CI node version to .nvmrc (22), remove redundant gotcha

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: arkon <arkon.85@hotmail.com>
This commit is contained in:
Noah Waldner
2026-02-27 13:16:23 +01:00
committed by GitHub
co-authored by Claude Sonnet 4.6 arkon
parent 2b2829ebde
commit 480584de63
61 changed files with 4306 additions and 4013 deletions
+15 -7
View File
@@ -196,7 +196,9 @@ export class TaskQueue extends EventEmitter {
private validateDependencies(taskId: string, dependencies: string[]): void {
for (const depId of dependencies) {
if (this.wouldCreateCycle(taskId, depId)) {
throw new Error(`Circular dependency detected: adding dependency ${depId} to task ${taskId} would create a cycle`);
throw new Error(
`Circular dependency detected: adding dependency ${depId} to task ${taskId} would create a cycle`
);
}
}
}
@@ -208,14 +210,21 @@ export class TaskQueue extends EventEmitter {
/** Gets the currently running task for a session, if any. */
getRunningTaskForSession(sessionId: string): Task | null {
return this.getAllTasks().find(
(t) => t.isRunning() && t.assignedSessionId === sessionId
) || null;
return this.getAllTasks().find((t) => t.isRunning() && t.assignedSessionId === sessionId) || null;
}
/** Gets counts of tasks by status (single-pass). */
getCount(): { total: number; pending: number; running: number; completed: number; failed: number } {
let pending = 0, running = 0, completed = 0, failed = 0;
getCount(): {
total: number;
pending: number;
running: number;
completed: number;
failed: number;
} {
let pending = 0,
running = 0,
completed = 0,
failed = 0;
for (const task of this.tasks.values()) {
if (task.isPending()) pending++;
else if (task.isRunning()) running++;
@@ -258,7 +267,6 @@ export class TaskQueue extends EventEmitter {
this.tasks.clear();
return count;
}
}
// Singleton instance