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
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ updates:
# so a breaking upgrade (e.g. ESLint 10) can't sink a whole group.
groups:
next-react:
patterns: ['next', 'eslint-config-next', 'react', 'react-dom', '@types/react', '@types/react-dom']
patterns: ['next', 'react', 'react-dom', '@types/react', '@types/react-dom']
update-types: [minor, patch]
types:
patterns: ['@types/*']
update-types: [minor, patch]
lint:
patterns: ['eslint', '@eslint/*', 'globals']
patterns: ['eslint', '@eslint/*', 'eslint-plugin-*', 'typescript-eslint', 'globals']
update-types: [minor, patch]
minor-and-patch:
update-types: [minor, patch]
Expand Down
2 changes: 1 addition & 1 deletion DISTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AgentOS uses Next.js **standalone output** (`output: 'standalone'` in next.confi

### Prerequisites

- **Node.js 22.5 or later** (required for `node:sqlite` support)
- **Node.js 22.13 or later** (22.5+ is required for `node:sqlite`; the dev toolchain, ESLint 10, needs 22.13+)
- npm or yarn

### Build
Expand Down
3,747 changes: 472 additions & 3,275 deletions source/package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"engines": {
"node": ">=22.5"
"node": ">=22.13"
},
"scripts": {
"dev": "next dev -H 127.0.0.1",
Expand Down Expand Up @@ -35,18 +35,19 @@
"three-spritetext": "^1.10.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.7",
"@eslint/js": "^10.0.1",
"@tailwindcss/postcss": "^4",
"@types/node": "^22",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/three": "^0.186.0",
"eslint": "^9.39.4",
"eslint-config-next": "^16.3.8",
"eslint": "^10.12.0",
Comment thread
nilhemdot marked this conversation as resolved.
"eslint-plugin-react-hooks": "^7.1.1",
"globals": "^17.12.0",
"tailwindcss": "^4",
"tsx": "^4.23.15",
"typescript": "^5",
"typescript-eslint": "^8.71.0",
"vitest": "^5.0.3"
}
}
4 changes: 2 additions & 2 deletions source/src/app/api/glm-code/workspace/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface FileRec { rel: string; bytes: number }

async function walk(dir: string, base: string, out: FileRec[], depth = 0): Promise<void> {
if (depth > 4) return;
let items: string[] = [];
let items: string[];
try { items = await readdir(dir); } catch { return; }
for (const it of items) {
if (it.startsWith(".") || SKIP.has(it)) continue;
Expand All @@ -27,7 +27,7 @@ async function walk(dir: string, base: string, out: FileRec[], depth = 0): Promi

export async function GET() {
if (!existsSync(ROOT)) return NextResponse.json({ builds: [] });
let dirs: string[] = [];
let dirs: string[];
try { dirs = await readdir(ROOT); } catch { return NextResponse.json({ builds: [] }); }

const builds = [];
Expand Down
2 changes: 1 addition & 1 deletion source/src/app/api/hermes/kanban/action/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function boardArgs(board?: string): string[] {
export async function POST(req: Request) {
const b: ActionBody = await req.json();
const board = boardArgs(b.board);
let args: string[] = [];
let args: string[];
let timeoutMs = 20_000;

switch (b.action) {
Expand Down
2 changes: 1 addition & 1 deletion source/src/app/api/hermes/phone/status/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const dynamic = "force-dynamic";
export async function GET() {
const env = readHermesEnv();
const [api, tunnel] = await Promise.all([apiServerUp(), tunnelStatus()]);
let eleven: Awaited<ReturnType<typeof elevenStatus>> | { configured: false; error: string } = { configured: false, numbers: [], hermesAgentId: null };
let eleven: Awaited<ReturnType<typeof elevenStatus>> | { configured: false; error: string };
try { eleven = await elevenStatus(); } catch (e) { eleven = { configured: false, error: String(e) } as never; }
return NextResponse.json({
apiServer: { up: api, port: 8642, keySet: !!env.API_SERVER_KEY },
Expand Down
2 changes: 1 addition & 1 deletion source/src/app/api/openclaw/chat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function POST(req: Request) {

// Try to parse JSON payload from stdout (may include leading non-JSON log lines)
let text = "";
let json: unknown = null;
let json: unknown;
const firstBrace = out.stdout.indexOf("{");
if (firstBrace !== -1) {
try {
Expand Down
2 changes: 1 addition & 1 deletion source/src/app/api/room/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function POST(req: Request) {
for (const agent of repliers) {
if (req.signal.aborted) break;
send({ t: "typing", id: agent.id, name: agent.name, color: agent.color });
let raw = "";
let raw: string;
try { raw = await roomReply(agent, transcript, ctx.text, req.signal); }
catch (e) { if (req.signal.aborted) break; raw = `(${agent.name} couldn't reply — ${String(e).slice(0, 80)})`; }
if (!raw) raw = "…";
Expand Down
2 changes: 1 addition & 1 deletion source/src/app/api/video/preview/[...path]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function GET(req: Request, ctx: { params: Promise<{ path: string[]
}

const [mode, ...rest] = segments;
let abs: string | null = null;
let abs: string | null;
if (mode === "project") {
const [slug, ...relParts] = rest;
if (!slug) return new Response("missing slug", { status: 400 });
Expand Down
2 changes: 1 addition & 1 deletion source/src/components/AgentKanban.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
else setErr(j.error || "the planner returned nothing");
} catch (e) { setErr(`planner unreachable: ${String(e).slice(0, 120)}`); }
setActive(null); setPlanning(false);
}, [goal, planning, running]);

Check warning on line 77 in source/src/components/AgentKanban.tsx

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

React Hook useCallback has a missing dependency: 'seoMode'. Either include it or remove the dependency array

Check warning on line 77 in source/src/components/AgentKanban.tsx

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

React Hook useCallback has a missing dependency: 'seoMode'. Either include it or remove the dependency array

Check warning on line 77 in source/src/components/AgentKanban.tsx

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

React Hook useCallback has a missing dependency: 'seoMode'. Either include it or remove the dependency array

const run = useCallback(async () => {
if (running || planning) return;
Expand All @@ -83,7 +83,7 @@
setErr(null); setRunning(true);
for (const card of queue) {
setActive("builder"); setCard(card.id, { stage: "building", note: undefined });
let res: { ok?: boolean; bytes?: number; verdict?: string; note?: string; model?: string; liveUrl?: string; slug?: string } = {};
let res: { ok?: boolean; bytes?: number; verdict?: string; note?: string; model?: string; liveUrl?: string; slug?: string };
try {
const body = seoMode
? { id: card.id, title: card.title, brief: card.brief, goal, engine: "hermes", mode: "seo", siteId: SEO_SITE.id }
Expand All @@ -99,7 +99,7 @@
}
setActive(null); setRunning(false);
loadWorkspace(); // new builds are now saved in the workspace
}, [cards, running, planning, goal, loadWorkspace]);

Check warning on line 102 in source/src/components/AgentKanban.tsx

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

React Hook useCallback has a missing dependency: 'seoMode'. Either include it or remove the dependency array

Check warning on line 102 in source/src/components/AgentKanban.tsx

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

React Hook useCallback has a missing dependency: 'seoMode'. Either include it or remove the dependency array

Check warning on line 102 in source/src/components/AgentKanban.tsx

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

React Hook useCallback has a missing dependency: 'seoMode'. Either include it or remove the dependency array

// Publish the freshly-written articles live to the funnel site (real netlify deploy).
const deploy = useCallback(async () => {
Expand Down
2 changes: 1 addition & 1 deletion source/src/components/GoalLogStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function parseLog(log: string): Ev[] {
}

// Try JSON
let j: unknown = null;
let j: unknown;
try { j = JSON.parse(trimmed); }
catch {
out.push({ i, kind: "raw", text: trimmed });
Expand Down
2 changes: 1 addition & 1 deletion source/src/components/MiniMaxVoiceAgent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
function setStageS(s: Stage) { stageRef.current = s; setStage(s); }

useEffect(() => { scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight, behavior: "smooth" }); }, [turns, stage]);
useEffect(() => () => { endCall(); }, []); // cleanup on unmount

Check warning on line 47 in source/src/components/MiniMaxVoiceAgent.tsx

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

React Hook useEffect has a missing dependency: 'endCall'. Either include it or remove the dependency array

Check warning on line 47 in source/src/components/MiniMaxVoiceAgent.tsx

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

React Hook useEffect has a missing dependency: 'endCall'. Either include it or remove the dependency array

Check warning on line 47 in source/src/components/MiniMaxVoiceAgent.tsx

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

React Hook useEffect has a missing dependency: 'endCall'. Either include it or remove the dependency array
// 🔒 Privacy: end the call (release the mic) the moment this tab goes to the
// background — never keep recording while you've switched away. Restart is deliberate.
useEffect(() => {
Expand Down Expand Up @@ -156,7 +156,7 @@
chunksRef.current = [];
if (blob.size < 1400) { if (activeRef.current) beginListen(); else setStageS("idle"); return; }
setStageS("transcribing");
let text = "";
let text: string;
try {
const fd = new FormData();
const ext = type.includes("mp4") ? "mp4" : type.includes("ogg") ? "ogg" : "webm";
Expand Down
2 changes: 1 addition & 1 deletion source/src/components/MusicStudio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function MusicStudio() {
if (!d || busy) return;
setBusy(true); setNotice(""); setPreviews([]); setPhase("Sending to Suno…"); setElapsed(0);

let taskId = "";
let taskId: string;
try {
const r = await (await fetch("/api/music/generate", {
method: "POST", headers: { "Content-Type": "application/json" },
Expand Down
4 changes: 2 additions & 2 deletions source/src/lib/evalCorpus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ export function loadCorpus(dir: string): EvalCase[] {
cases.push(evalCase);
} catch (e: unknown) {
const msg = e instanceof Error ? e.message : String(e);
throw new Error(`Failed to load case ${file}: ${msg}`);
throw new Error(`Failed to load case ${file}: ${msg}`, { cause: e });
}
}

return cases;
} catch (e: unknown) {
throw new Error(`loadCorpus(${dir}): ${e instanceof Error ? e.message : String(e)}`);
throw new Error(`loadCorpus(${dir}): ${e instanceof Error ? e.message : String(e)}`, { cause: e });
}
}
3 changes: 2 additions & 1 deletion source/src/lib/evalRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function runCaseFixture(evalCase: EvalCase): EvalRunMetrics {
fixtureContent = JSON.parse(content);
} catch (e: unknown) {
throw new Error(
`Case ${evalCase.id}: failed to load fixture ${evalCase.fixture}: ${e instanceof Error ? e.message : String(e)}`
`Case ${evalCase.id}: failed to load fixture ${evalCase.fixture}: ${e instanceof Error ? e.message : String(e)}`,
{ cause: e }
);
}

Expand Down
2 changes: 1 addition & 1 deletion source/src/lib/hermesGoals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export async function recoverOrphans(): Promise<{ recovered: number; existing: n
if (!existsSync(HERMES_SCRATCH_ROOT)) return { recovered: 0, existing: 0 };
const s = await readState();
const tracked = new Set(s.goals.map((g) => g.id));
let dirs: string[] = [];
let dirs: string[];
try { dirs = await readdir(HERMES_SCRATCH_ROOT); } catch { return { recovered: 0, existing: 0 }; }
let recovered = 0;
for (const name of dirs) {
Expand Down
2 changes: 1 addition & 1 deletion source/src/lib/hermesPhone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async function elFetch(pathStr: string, init?: RequestInit): Promise<unknown> {
signal: AbortSignal.timeout(20000),
});
const text = await r.text();
let data: unknown = null;
let data: unknown;
try { data = text ? JSON.parse(text) : null; } catch { data = text; }
if (!r.ok) throw new Error(`ElevenLabs ${r.status}: ${typeof data === "string" ? data.slice(0, 200) : JSON.stringify(data).slice(0, 200)}`);
return data;
Expand Down
2 changes: 1 addition & 1 deletion source/src/lib/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function uniqueSlug(base: string): Promise<string> {

export async function listItems(): Promise<PipelineItem[]> {
await ensureDirs();
let names: string[] = [];
let names: string[];
try { names = await readdir(ITEMS_DIR); } catch { return []; }
const out: PipelineItem[] = [];
for (const n of names) {
Expand Down
4 changes: 2 additions & 2 deletions source/src/lib/studioHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export async function saveSearch(rec: Omit<SearchRecord, "id">): Promise<SearchR

export async function listSearches(maxItems = 80): Promise<SearchRecord[]> {
if (!existsSync(SEARCHES_DIR)) return [];
let entries: string[] = [];
let entries: string[];
try { entries = await readdir(SEARCHES_DIR); } catch { return []; }
const records: SearchRecord[] = [];
for (const name of entries) {
Expand Down Expand Up @@ -142,7 +142,7 @@ export async function saveTalk(rec: TalkRecord): Promise<void> {

export async function listTalks(maxItems = 60): Promise<TalkRecord[]> {
if (!existsSync(TALKS_DIR)) return [];
let entries: string[] = [];
let entries: string[];
try { entries = await readdir(TALKS_DIR); } catch { return []; }
const records: TalkRecord[] = [];
for (const name of entries) {
Expand Down
2 changes: 1 addition & 1 deletion source/src/lib/vaultGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function buildVaultGraph(): Promise<VaultGraph> {

await Promise.all(files.map(async (abs) => {
const rel = path.relative(VAULT_ROOT, abs);
let content = "";
let content: string;
try { content = await readFile(abs, "utf8"); } catch { return; }
const matches = content.matchAll(WIKILINK_RE);
for (const m of matches) {
Expand Down
Loading