From 9d18444220ab074cabce9a1f1b9290af8cec72ba Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Wed, 15 Jul 2026 19:20:13 +0530 Subject: [PATCH] chore: Format files --- .github/workflows/deploy-docs.yml | 10 +- apps/gui/src/app/actions.ts | 60 +- apps/gui/src/app/builder/page.tsx | 4 +- apps/gui/src/app/play/page.tsx | 12 +- apps/gui/src/components/config/ConfigView.tsx | 3 +- .../config/ProviderInstancesConfig.tsx | 4 +- apps/gui/src/components/play/PlayView.tsx | 465 +- apps/gui/src/components/play/PromptModal.tsx | 12 +- apps/gui/src/components/play/ScenarioCard.tsx | 18 +- apps/gui/src/components/ui/accordion.tsx | 30 +- apps/gui/src/components/ui/badge.tsx | 18 +- apps/gui/src/components/ui/button.tsx | 35 +- apps/gui/src/components/ui/card.tsx | 33 +- apps/gui/src/components/ui/checkbox.tsx | 16 +- apps/gui/src/components/ui/dialog.tsx | 51 +- apps/gui/src/components/ui/empty.tsx | 33 +- apps/gui/src/components/ui/input.tsx | 10 +- apps/gui/src/components/ui/item.tsx | 56 +- apps/gui/src/components/ui/label.tsx | 14 +- .../gui/src/components/ui/navigation-menu.tsx | 48 +- apps/gui/src/components/ui/select.tsx | 47 +- apps/gui/src/components/ui/separator.tsx | 20 +- apps/gui/src/components/ui/sheet.tsx | 59 +- apps/gui/src/components/ui/sidebar.tsx | 248 +- apps/gui/src/components/ui/skeleton.tsx | 6 +- apps/gui/src/components/ui/spinner.tsx | 8 +- apps/gui/src/components/ui/table.tsx | 32 +- apps/gui/src/components/ui/tabs.tsx | 28 +- apps/gui/src/components/ui/textarea.tsx | 10 +- apps/gui/src/components/ui/tooltip.tsx | 22 +- apps/gui/src/hooks/use-mobile.tsx | 24 +- apps/gui/tsconfig.json | 14 +- eslint.config.mjs | 7 +- .../actor/tests/actor-prompt-builder.test.ts | 14 +- packages/architect/src/architect.ts | 11 +- packages/architect/src/index.ts | 1 - packages/architect/src/llm-validator.ts | 3 +- packages/architect/tests/architect.test.ts | 43 +- packages/core/src/clock.ts | 2 +- packages/core/src/index.ts | 1 - packages/core/src/world.ts | 98 +- packages/core/tests/clock.test.ts | 98 +- packages/intent/tests/intent.test.ts | 6 +- packages/intent/tsconfig.json | 5 +- packages/llm/src/llm.ts | 3 +- packages/llm/src/provider-manager.ts | 386 +- packages/llm/src/providers/google-genai.ts | 38 +- packages/llm/src/providers/mock.ts | 16 +- packages/llm/src/providers/openrouter.ts | 28 +- packages/llm/tests/mock.test.ts | 2 +- packages/llm/tests/openrouter.test.ts | 4 +- packages/llm/tests/provider-manager.test.ts | 21 +- packages/memory/src/buffer.ts | 10 +- packages/memory/src/handoff.ts | 54 +- packages/memory/src/ledger.ts | 62 +- packages/memory/tests/handoff.test.ts | 39 +- packages/memory/tests/ledger.test.ts | 34 +- packages/memory/tests/memory.test.ts | 15 +- packages/scenario/tests/scenario.test.ts | 28 +- packages/scenario/tests/talking-room.test.ts | 46 +- pnpm-lock.yaml | 11801 ++++++++++------ pnpm-workspace.yaml | 2 +- tests/evals/google-genai.eval.ts | 5 +- tests/evals/intent-decoder.eval.ts | 24 +- tests/integration/actor-monologue.test.ts | 48 +- tests/integration/game-loop.test.ts | 67 +- web/docs/astro.config.mjs | 8 +- .../src/content/docs/architecture/actor.md | 30 +- .../src/content/docs/architecture/handoff.md | 36 +- .../src/content/docs/architecture/intents.md | 1 + .../docs/architecture/llm-providers.md | 24 +- .../content/docs/architecture/memory-tier2.md | 27 +- .../src/content/docs/architecture/memory.md | 22 +- .../src/content/docs/architecture/spatial.md | 1 + web/docs/src/content/docs/guides/testing.md | 1 + web/docs/wrangler.jsonc | 8 +- web/landing/src/counter.ts | 12 +- web/landing/src/main.ts | 16 +- 78 files changed, 9416 insertions(+), 5242 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 5862155..47370b2 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -5,9 +5,9 @@ on: branches: - master paths: - - 'web/docs/**' - - 'pnpm-lock.yaml' - - '.github/workflows/deploy-docs.yml' + - "web/docs/**" + - "pnpm-lock.yaml" + - ".github/workflows/deploy-docs.yml" workflow_dispatch: jobs: @@ -28,7 +28,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - cache: 'pnpm' + cache: "pnpm" - name: Install Dependencies run: pnpm install --frozen-lockfile @@ -41,4 +41,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - workingDirectory: 'web/docs' + workingDirectory: "web/docs" diff --git a/apps/gui/src/app/actions.ts b/apps/gui/src/app/actions.ts index 4503301..eefc5c1 100644 --- a/apps/gui/src/app/actions.ts +++ b/apps/gui/src/app/actions.ts @@ -4,7 +4,12 @@ import path from "path"; import fs from "fs"; import { simulationManager } from "@/lib/simulation"; import type { SimSnapshot } from "@/lib/simulation"; -import { ProviderManager, ModelProviderInstance, AVAILABLE_PROVIDERS, ModelProviderMeta } from "@omnia/llm"; +import { + ProviderManager, + ModelProviderInstance, + AVAILABLE_PROVIDERS, + ModelProviderMeta, +} from "@omnia/llm"; function resolveScenarioPath(relative: string): string { const cwd = process.cwd(); @@ -25,8 +30,7 @@ function resolveScenarioPath(relative: string): string { } type ActionResult = - | { ok: true; snapshot: SimSnapshot } - | { ok: false; error: string }; + { ok: true; snapshot: SimSnapshot } | { ok: false; error: string }; export async function startSimulation(input: { scenario?: string; @@ -168,8 +172,7 @@ export async function getConfigStatus(): Promise<{ } export async function listSavedSimulations(): Promise< - | { ok: true; sessions: SimSnapshot[] } - | { ok: false; error: string } + { ok: true; sessions: SimSnapshot[] } | { ok: false; error: string } > { try { const sessions = simulationManager.listSavedSessions(); @@ -197,7 +200,9 @@ export async function resumeSimulation(simId: string): Promise { } } -export async function getScenarioEntities(scenarioPath: string): Promise< +export async function getScenarioEntities( + scenarioPath: string, +): Promise< | { ok: true; entities: { id: string; name: string }[] } | { ok: false; error: string } > { @@ -207,10 +212,12 @@ export async function getScenarioEntities(scenarioPath: string): Promise< return { ok: false, error: `Scenario file not found: ${scenarioPath}` }; } const content = JSON.parse(fs.readFileSync(resolved, "utf-8")); - const entities = (content.entities || []).map((e: { id: string; name?: string }) => ({ - id: e.id, - name: e.name || e.id, - })); + const entities = (content.entities || []).map( + (e: { id: string; name?: string }) => ({ + id: e.id, + name: e.name || e.id, + }), + ); return { ok: true, entities }; } catch (err) { return { @@ -220,9 +227,9 @@ export async function getScenarioEntities(scenarioPath: string): Promise< } } -export async function deleteSimulation(simId: string): Promise< - { ok: true } | { ok: false; error: string } -> { +export async function deleteSimulation( + simId: string, +): Promise<{ ok: true } | { ok: false; error: string }> { try { simulationManager.deleteSession(simId); return { ok: true }; @@ -234,7 +241,9 @@ export async function deleteSimulation(simId: string): Promise< } } -export async function listProviderInstances(): Promise { +export async function listProviderInstances(): Promise< + ModelProviderInstance[] +> { return ProviderManager.list(); } @@ -246,7 +255,14 @@ export async function createProviderInstance( type: "generative" | "embedding" = "generative", maxContext?: number, ): Promise { - return ProviderManager.create(name, providerName, apiKey, modelName, type, maxContext); + return ProviderManager.create( + name, + providerName, + apiKey, + modelName, + type, + maxContext, + ); } export async function deleteProviderInstance(id: string): Promise { @@ -266,7 +282,15 @@ export async function updateProviderInstance( type: "generative" | "embedding" = "generative", maxContext?: number, ): Promise { - ProviderManager.update(id, name, providerName, apiKey, modelName, type, maxContext); + ProviderManager.update( + id, + name, + providerName, + apiKey, + modelName, + type, + maxContext, + ); } export async function getProviderMappings(): Promise> { @@ -284,6 +308,8 @@ export async function getAvailableProviders(): Promise { return AVAILABLE_PROVIDERS; } -export async function regenerateEmbeddings(newProviderInstanceId?: string): Promise { +export async function regenerateEmbeddings( + newProviderInstanceId?: string, +): Promise { await simulationManager.regenerateAllEmbeddings(newProviderInstanceId); } diff --git a/apps/gui/src/app/builder/page.tsx b/apps/gui/src/app/builder/page.tsx index b8b973c..0d397b7 100644 --- a/apps/gui/src/app/builder/page.tsx +++ b/apps/gui/src/app/builder/page.tsx @@ -4,7 +4,9 @@ export default function BuilderPage() { return (
-

Scenario Builder

+

+ Scenario Builder +

Scenario builder interface coming soon... diff --git a/apps/gui/src/app/play/page.tsx b/apps/gui/src/app/play/page.tsx index b7d5487..b4b327c 100644 --- a/apps/gui/src/app/play/page.tsx +++ b/apps/gui/src/app/play/page.tsx @@ -5,11 +5,13 @@ import { Suspense } from "react"; export default function PlayPage() { return ( - -

Loading...
-
- }> + +
Loading...
+
+ } + > ); diff --git a/apps/gui/src/components/config/ConfigView.tsx b/apps/gui/src/components/config/ConfigView.tsx index f4ec9ee..fc060ff 100644 --- a/apps/gui/src/components/config/ConfigView.tsx +++ b/apps/gui/src/components/config/ConfigView.tsx @@ -224,7 +224,8 @@ export function ConfigView() { {instances .filter( - (inst) => (inst.type || "generative") === task.type, + (inst) => + (inst.type || "generative") === task.type, ) .map((inst) => ( diff --git a/apps/gui/src/components/config/ProviderInstancesConfig.tsx b/apps/gui/src/components/config/ProviderInstancesConfig.tsx index f57c209..4b9da0e 100644 --- a/apps/gui/src/components/config/ProviderInstancesConfig.tsx +++ b/apps/gui/src/components/config/ProviderInstancesConfig.tsx @@ -282,7 +282,9 @@ export function ProviderInstancesConfig({ {inst.providerName}
{inst.isActive && Active} - {inst.type === "generative" ? "gen" : "embed"} + + {inst.type === "generative" ? "gen" : "embed"} +
diff --git a/apps/gui/src/components/play/PlayView.tsx b/apps/gui/src/components/play/PlayView.tsx index dccd739..a8d8a92 100644 --- a/apps/gui/src/components/play/PlayView.tsx +++ b/apps/gui/src/components/play/PlayView.tsx @@ -422,242 +422,247 @@ export function PlayView() {

- {/* Simulation Global Controls */} -
- {snapshot.status !== "done" && snapshot.status !== "error" && ( - <> - {snapshot.status === "running" && - (loading ? ( - - ) : ( - - ))} - - - )} -
- -
- - Status:{" "} - - {getUnifiedStatus()} - - - - Turn:{" "} - {snapshot.turn} - -
- {statusMessage() && ( -

- {loading && "⏳ "} - {statusMessage()} -

- )} - - - {/* Scrollable Center Viewport */} -
- {activeTab === "interact" ? ( -
- {(() => { - const playerEntity = snapshot.entities.find((e) => e.isPlayer); - return snapshot.log.map((entry, i) => ( - - )); - })()} - {loading && ( -
- - {statusText || "Processing..."} -
- )} -
-
- ) : ( -
- {/* Simulation Info */} -
-

- Simulation Info -

-
-
- - Session ID - - - {snapshot.id} - -
-
- - Max Turns - - - {snapshot.maxTurns} - -
-
- - Turn Count - - - {snapshot.turn} - -
-
- - Entities Registered - - - {snapshot.entities.length} - -
-
-
- - {/* Entities Involved */} -
-

- Entities Involved -

-
- {snapshot.entities.map((ent) => ( -
-
- - {ent.name} - - - ID: {ent.id} - -
-
- {ent.isPlayer ? ( - - PLAYER - - ) : ( - - NPC - - )} -
-
- ))} -
-
-
- )} -
- - {/* Sticky Chat / Interaction Input Footer */} - {activeTab === "interact" && ( -