The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(types): align types with generated wire definitions
Steven Enamakel798ff0ca9df8
diff --git a/app/src/services/artifactDownloadService.ts b/app/src/services/artifactDownloadService.tsindex 2437f55f14..8f3adab9ff 100644--- a/app/src/services/artifactDownloadService.ts+++ b/app/src/services/artifactDownloadService.ts@@ -70,7 +70,7 @@ interface DeleteArtifactOutcome {error?: string;}-type ListedArtifactKind = 'presentation' | 'document' | 'image' | 'video' | 'other';+type ListedArtifactKind = import('../types/threadWire.generated').ArtifactKind;interface ListedThreadArtifact {artifactId: string;diff --git a/app/src/services/chatService.ts b/app/src/services/chatService.tsindex e8439073cb..d3cadceae1 100644--- a/app/src/services/chatService.ts+++ b/app/src/services/chatService.ts@@ -50,6 +50,7 @@ import {ExternalTransferPendingEvent,externalTransferProvider,ProactiveMessageEvent,+ QueueMode,QueueItemEvent,QueueItemPayload,WireEvent,@@ -85,6 +86,7 @@ export type {ChatThreadGoalUpdatedEvent,ChatThreadGoalClearedEvent,ChatRunModeChangedEvent,+ QueueMode,ArtifactKind,ArtifactReadyEvent,ArtifactFailedEvent,@@ -893,9 +895,6 @@ export function subscribeChatEvents(listeners: ChatEventListeners): () => void {};}-// UI-only send options; the RPC `queue_mode` remains a server-owned string.-type QueueMode = 'interrupt' | 'steer' | 'followup' | 'collect' | 'parallel';-interface ChatSendParams {threadId: string;message: string;diff --git a/app/src/store/chatRuntimeSlice.ts b/app/src/store/chatRuntimeSlice.tsindex a98b31b829..a076f75a65 100644--- a/app/src/store/chatRuntimeSlice.ts+++ b/app/src/store/chatRuntimeSlice.ts@@ -4,6 +4,7 @@ import debug from 'debug';import { mapDisplayItems } from '../features/conversations/derived/mapDisplayItems';import { threadApi } from '../services/api/threadApi';import type { CostSource } from '../services/chatService';+import type { ArtifactKind } from '../types/threadWire.generated';import type { DerivedTranscriptPage } from '../types/derivedTranscript';import type {AgentRun,@@ -869,7 +870,7 @@ export type ArtifactStatus = 'in_progress' | 'ready' | 'failed';export interface ArtifactSnapshot {artifactId: string;/** Kind slug from the Rust `ArtifactKind` enum. */- kind: 'presentation' | 'document' | 'image' | 'video' | 'other';+ kind: ArtifactKind;/** Human-readable title; also the on-disk filename stem. */title: string;status: ArtifactStatus;diff --git a/app/src/store/runModeSlice.ts b/app/src/store/runModeSlice.tsindex c7010f6e93..3cdd4b5bbe 100644--- a/app/src/store/runModeSlice.ts+++ b/app/src/store/runModeSlice.ts@@ -5,8 +5,9 @@* core's default before the first RPC/event lands).*/import { createSlice, type PayloadAction } from '@reduxjs/toolkit';+import type { RunMode } from '../types/threadWire.generated';-export type RunMode = 'plan' | 'build';+export type { RunMode };export interface RunModeState {byThread: Record<string, RunMode>;diff --git a/app/src/store/threadGoalSlice.ts b/app/src/store/threadGoalSlice.tsindex 6bce4a3fc4..a242121249 100644--- a/app/src/store/threadGoalSlice.ts+++ b/app/src/store/threadGoalSlice.ts@@ -5,18 +5,12 @@* the old tool-result-scraping `selectThreadGoal` in `harnessState.ts`.*/import { createSlice, type PayloadAction } from '@reduxjs/toolkit';+import type { ThreadGoal as ThreadGoalWire } from '../types/threadWire.generated';-export type ThreadGoalStatus = 'active' | 'paused' | 'budget_limited' | 'complete';+export type ThreadGoalStatus = ThreadGoalWire['status'];/** Wire shape of `ThreadGoal` on `thread_goal_updated` / `threads_goal_get`. */-export interface ThreadGoalView {- goal_id: string;- objective: string;- status: ThreadGoalStatus;- token_budget?: number;- tokens_used: number;- time_used_seconds: number;-}+export type ThreadGoalView = ThreadGoalWire;export interface ThreadGoalState {byThread: Record<string, ThreadGoalView | null>;