From 060a8cef00dee1728be2fa7cd96ad0332ad15353 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sun, 22 Feb 2026 11:13:45 -0800 Subject: [PATCH] fmt --- apps/server/src/codexTextGenerator.ts | 12 +++++++----- apps/server/src/git.ts | 12 ++++++------ apps/server/src/orchestration/Layer.ts | 4 ++-- .../src/persistence/Layers/OrchestrationEvents.ts | 4 +--- apps/server/src/persistence/Layers/Projects.ts | 4 +--- apps/server/src/terminalManager.ts | 5 ++++- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/apps/server/src/codexTextGenerator.ts b/apps/server/src/codexTextGenerator.ts index 51166b380fa091715a1bd0913510869f5187855c..ebc92ac9a855d9aeaa69bd5ebdb3fa845f3c11d1 100644 --- a/apps/server/src/codexTextGenerator.ts +++ b/apps/server/src/codexTextGenerator.ts @@ -12,11 +12,13 @@ import type { } from "./coreServices"; import { type ProcessRunOptions, type ProcessRunResult, runProcess } from "./processRunner"; -type ProcessRunner = ( - command: string, - args: readonly string[], - options?: ProcessRunOptions, -) => Promise; +interface ProcessRunner { + ( + command: string, + args: readonly string[], + options?: ProcessRunOptions, + ): Promise; +} const CODEX_MODEL = "gpt-5.3-codex"; const CODEX_REASONING_EFFORT = "low"; diff --git a/apps/server/src/git.ts b/apps/server/src/git.ts index a9a7aa062e55782292eab57bba45e65973403ed2..bf84176a059338f67e54a14783d30fc9664a0668 100644 --- a/apps/server/src/git.ts +++ b/apps/server/src/git.ts @@ -29,7 +29,7 @@ export interface TerminalCommandInput { maxOutputBytes?: number; } -export type TerminalCommandResult = ProcessRunResult; + export interface GitStatusDetails extends Omit { upstreamRef: string | null; @@ -159,7 +159,7 @@ function normalizeGitSpawnError(cwd: string, error: unknown): Error { return new Error(`Failed to run git command: ${error.message}`); } -function normalizeGitExecutionError(args: readonly string[], result: TerminalCommandResult): Error { +function normalizeGitExecutionError(args: readonly string[], result: ProcessRunResult): Error { const stderr = result.stderr.trim(); if (stderr.toLowerCase().includes("not a git repository")) { return new Error("Current folder is not a git repository."); @@ -176,8 +176,8 @@ async function runGitOrThrow( cwd: string, args: readonly string[], options: RunGitOptions = {}, -): Promise { - let result: TerminalCommandResult; +): Promise { + let result: ProcessRunResult; try { result = await runGit(args, cwd, options.timeoutMs); } catch (error) { @@ -197,7 +197,7 @@ async function executeGit( cwd: string, args: readonly string[], options: ExecuteGitOptions = {}, -): Promise { +): Promise { const result = await runGitOrThrow(cwd, args, { timeoutMs: options.timeoutMs, allowNonZeroExit: true, @@ -680,7 +680,7 @@ const defaultGitCoreService = new GitCoreService(); export async function runTerminalCommand( input: TerminalCommandInput, -): Promise { +): Promise { const maxOutputBytes = input.maxOutputBytes ?? DEFAULT_MAX_OUTPUT_BYTES; const shellPath = process.platform === "win32" diff --git a/apps/server/src/orchestration/Layer.ts b/apps/server/src/orchestration/Layer.ts index bd36e701c24b3d519c30a877af946c3befd8d340..1edacd925c0f36d46d6fbe02f0395f3ff7b437fb 100644 --- a/apps/server/src/orchestration/Layer.ts +++ b/apps/server/src/orchestration/Layer.ts @@ -17,10 +17,10 @@ import { import { createEmptyReadModel, reduceEvent } from "./reducer.ts"; import { OrchestrationEngineService, type OrchestrationEngineShape } from "./Service.ts"; -type CommandEnvelope = { +interface CommandEnvelope { command: OrchestrationCommand; result: Deferred.Deferred<{ sequence: number }, OrchestrationDispatchError>; -}; +} function mapCommandToEvent(command: OrchestrationCommand): Omit { const eventId = crypto.randomUUID(); diff --git a/apps/server/src/persistence/Layers/OrchestrationEvents.ts b/apps/server/src/persistence/Layers/OrchestrationEvents.ts index bbbc26c84237f430fd99d6bf9c4e2cc727105fb1..bd9f0bd7c39af2a39ef070fae8a35aed8fa081fc 100644 --- a/apps/server/src/persistence/Layers/OrchestrationEvents.ts +++ b/apps/server/src/persistence/Layers/OrchestrationEvents.ts @@ -30,8 +30,6 @@ const EventRowSchema = Schema.Struct({ payloadJson: Schema.String, }); -type EventRow = Schema.Schema.Type; - const AppendEventRequestSchema = Schema.Struct({ eventId: Schema.String, type: Schema.String, @@ -48,7 +46,7 @@ const ReadFromSequenceRequestSchema = Schema.Struct({ }); function eventRowToOrchestrationEvent( - row: EventRow, + row: Schema.Schema.Type, operation: string, ): Effect.Effect { return Effect.try({ diff --git a/apps/server/src/persistence/Layers/Projects.ts b/apps/server/src/persistence/Layers/Projects.ts index e38ef34587655a5ff80c57c43264b1b8410f4eb3..fd6426ecb26e2d7537d9d883c38b06faf670f283 100644 --- a/apps/server/src/persistence/Layers/Projects.ts +++ b/apps/server/src/persistence/Layers/Projects.ts @@ -44,8 +44,6 @@ const ProjectRowSchema = Schema.Struct({ updatedAt: Schema.String, }); -type ProjectRow = Schema.Schema.Type; - const FindByIdRequestSchema = Schema.Struct({ id: Schema.String, }); @@ -137,7 +135,7 @@ function decodeScriptsJson( } function rowToProjectRecord( - row: ProjectRow, + row: Schema.Schema.Type, operation: string, ): Effect.Effect { return decodeScriptsJson(row.scriptsJson, `${operation}:scripts`).pipe( diff --git a/apps/server/src/terminalManager.ts b/apps/server/src/terminalManager.ts index dcdf78615df5df4a862a4eb0f1d4a76ea2fe2ac4..05217e90a4b8629a839f8d57da2935774ecc2570 100644 --- a/apps/server/src/terminalManager.ts +++ b/apps/server/src/terminalManager.ts @@ -69,7 +69,10 @@ interface ShellCandidate { args?: string[]; } -type TerminalStartInput = TerminalOpenInput & { cols: number; rows: number }; +interface TerminalStartInput extends TerminalOpenInput { + cols: number; + rows: number +}; function defaultShellResolver(): string { if (process.platform === "win32") { -- 2.54.0