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
1 change: 0 additions & 1 deletion src/common/config/schemas/agentPluginInstalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,4 @@ export const AgentPluginInstallEntrySchema = z.object({
});

export type AgentPluginGitSource = z.infer<typeof AgentPluginGitSourceSchema>;
export type AgentPluginInstallSource = z.infer<typeof AgentPluginInstallSourceSchema>;
export type AgentPluginInstallEntry = z.infer<typeof AgentPluginInstallEntrySchema>;
7 changes: 1 addition & 6 deletions src/common/config/schemas/appConfigOnDisk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { HEARTBEAT_MAX_INTERVAL_MS, HEARTBEAT_MIN_INTERVAL_MS } from "@/constant
import { DEFAULT_GOAL_DEFAULTS } from "@/constants/goals";

export { RuntimeEnablementOverridesSchema } from "../../schemas/runtimeEnablement";
export type { RuntimeEnablementOverrides } from "../../schemas/runtimeEnablement";
export { UserPreferencesSchema } from "./userPreferences";
export type { UserPreferences } from "./userPreferences";
export { TaskSettingsSchema } from "./taskSettings";
Expand All @@ -26,11 +25,7 @@ export {
AgentPluginInstallEntrySchema,
AgentPluginInstallSourceSchema,
} from "./agentPluginInstalls";
export type {
AgentPluginGitSource,
AgentPluginInstallEntry,
AgentPluginInstallSource,
} from "./agentPluginInstalls";
export type { AgentPluginGitSource, AgentPluginInstallEntry } from "./agentPluginInstalls";

/**
* Sparse delegated-run (sub-agent) override profile nested under an agent's
Expand Down
2 changes: 0 additions & 2 deletions src/common/config/schemas/providerModelEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ export const ProviderModelEntrySchema = z.union([
})
.strict(),
]);

export type ProviderModelEntry = z.infer<typeof ProviderModelEntrySchema>;
2 changes: 0 additions & 2 deletions src/common/config/schemas/providersConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ProviderModelEntrySchema } from "./providerModelEntry";
export const CacheTtlSchema = z.enum(["5m", "1h"]);
/** Anthropic request speed; "fast" opts into Fast mode (see anthropicFastMode.ts). */
export const AnthropicSpeedSchema = z.enum(["standard", "fast"]);
export type AnthropicSpeed = z.infer<typeof AnthropicSpeedSchema>;
// "ultrafast" is OpenAI's model-gated premium tier (DevDay 2026-09-29); requests for
// models without it drop the tier (see openaiModelSupportsServiceTier).
export const ServiceTierSchema = z.enum(["auto", "default", "flex", "priority", "ultrafast"]);
Expand All @@ -21,7 +20,6 @@ export const FastModePreviousServiceTierSchema = z.enum([
"ultrafast",
"unset",
]);
export type FastModePreviousServiceTier = z.infer<typeof FastModePreviousServiceTierSchema>;
export const XAIServiceTierSchema = z.enum(["default", "priority"]);
export type XAIServiceTier = z.infer<typeof XAIServiceTierSchema>;
export const XAIFastModePreviousServiceTierSchema = z.enum(["default", "unset"]);
Expand Down
1 change: 0 additions & 1 deletion src/common/config/schemas/userPreferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const ThemePreferenceSchema = z.enum([
"flexoki-light",
"flexoki-dark",
]);
export type ThemePreferenceConfig = z.infer<typeof ThemePreferenceSchema>;

export const LaunchBehaviorSchema = z.enum(["dashboard", "new-chat", "last-workspace"]);

Expand Down
7 changes: 0 additions & 7 deletions src/common/constants/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,13 +766,6 @@ export const MAX_PERSISTED_KEY_CHARS = 8192;
*/
export type PersistedKeyKind = "ui" | "cache" | "workspace-scoped" | "draft";

/**
* `workspaceId` keys append a scope id to a fixed prefix. The scope id is usually a workspace id,
* but creation drafts reuse the same keys with getDraftScopeId()/getPendingScopeId() scope ids and
* some keys also accept project/global scope ids.
*/
export type PersistedKeyScope = "global" | "workspaceId";

/**
* Which scope ids a workspace key is written under, for the budget model: "workspace" keys are
* counted for every workspace and creation draft, "draft" keys only for creation drafts.
Expand Down
2 changes: 0 additions & 2 deletions src/common/orpc/schemas/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export const RawQueryColumnSchema = z.object({
name: z.string(),
type: z.string(),
});
export type RawQueryColumn = z.infer<typeof RawQueryColumnSchema>;

export const RawQueryResultSchema = z.object({
columns: z.array(RawQueryColumnSchema),
Expand All @@ -132,7 +131,6 @@ export const RawQueryResultSchema = z.object({
rowCountExact: z.boolean(),
durationMs: z.number(),
});
export type RawQueryResult = z.infer<typeof RawQueryResultSchema>;
/** ETL input validation — each row extracted from chat.jsonl is validated before insert */
export const EventRowSchema = z.object({
workspace_id: z.string(),
Expand Down
4 changes: 2 additions & 2 deletions src/common/orpc/schemas/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "./api";
import { OnChatEventSchema } from "./stream";
import { MCP_ICON_LIMITS } from "../../constants/mcpIcon";
import type { AWSCredentialStatus, ProviderConfigInfo, ProvidersConfigMap } from "../types";
import type { ProviderConfigInfo, ProvidersConfigMap } from "../types";

/**
* Schema conformance tests for provider types.
Expand All @@ -24,7 +24,7 @@ import type { AWSCredentialStatus, ProviderConfigInfo, ProvidersConfigMap } from
*/
describe("ProviderConfigInfoSchema conformance", () => {
it("preserves all AWSCredentialStatus fields", () => {
const full: AWSCredentialStatus = {
const full: ProviderConfigInfo["aws"] = {
region: "us-east-1",
profile: "my-sso-profile",
bearerTokenSet: true,
Expand Down
1 change: 0 additions & 1 deletion src/common/orpc/schemas/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export type ArtifactCapabilities = z.infer<typeof ArtifactCapabilitiesSchema>;
* indexes as corrupt and move their history aside.
*/
export const ArtifactVersionSourceSchema = z.enum(["publish", "turn-end", "attach_file"]);
export type ArtifactVersionSource = z.infer<typeof ArtifactVersionSourceSchema>;

/** Shelf pin requested by the agent's `artifact` tool; M5 copies pinned versions to the shelf. */
export const ArtifactPinSchema = z.enum(["project", "global"]);
Expand Down
2 changes: 0 additions & 2 deletions src/common/orpc/schemas/skillsCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ export const SkillsCliCommandSchema = z.object({
/** The exact command to copy. Every argument is shell-safe without quoting. */
command: z.string(),
});

export type SkillsCliCommand = z.infer<typeof SkillsCliCommandSchema>;
1 change: 0 additions & 1 deletion src/common/orpc/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export type SendMessageOptions = z.infer<typeof schemas.SendMessageOptionsSchema
export type HistoryEditPrecondition = z.infer<typeof schemas.HistoryEditPreconditionSchema>;

// Provider types (single source of truth - derived from schemas)
export type AWSCredentialStatus = z.infer<typeof schemas.AWSCredentialStatusSchema>;
export type ProviderModelEntry = z.infer<typeof schemas.ProviderModelEntrySchema>;
export type ProviderModelDiscoveryResult = z.infer<
typeof schemas.ProviderModelDiscoveryResultSchema
Expand Down
2 changes: 0 additions & 2 deletions src/common/schemas/runtimeEnablement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ import { z } from "zod";
// runtime IDs survive upgrade→downgrade cycles without blocking unrelated edits.
// The runtime normalizer in config.ts filters to known IDs at load time.
export const RuntimeEnablementOverridesSchema = z.record(z.string(), z.literal(false));

export type RuntimeEnablementOverrides = z.infer<typeof RuntimeEnablementOverridesSchema>;
2 changes: 0 additions & 2 deletions src/common/types/evaluation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const EvaluationInputSchema = z.union([
z.array(EvaluationJsonValueSchema),
z.record(z.string(), EvaluationJsonValueSchema),
]);
export type EvaluationInput = z.infer<typeof EvaluationInputSchema>;

export const EvaluationStateSchema = EvaluationInputSchema;
export type EvaluationState = z.infer<typeof EvaluationStateSchema>;
Expand Down Expand Up @@ -116,7 +115,6 @@ export const EvaluationProviderOptionsSchema = z.record(
z.string(),
z.record(z.string(), EvaluationJsonValueSchema)
);
export type EvaluationProviderOptions = z.infer<typeof EvaluationProviderOptionsSchema>;

/**
* The sandbox-facing `evaluate(state, spec)` options (consumed by the workflow
Expand Down
25 changes: 0 additions & 25 deletions src/common/types/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ export interface HunkReadState {
timestamp: number;
}

/**
* Workspace review state (persisted to localStorage)
*/
export interface ReviewState {
/** Workspace ID this review belongs to */
workspaceId: string;
/** Read state keyed by hunk ID */
readState: Record<string, HunkReadState>;
/** Timestamp of last update */
lastUpdated: number;
}

/**
* Sort order options for review panel hunks
*/
Expand Down Expand Up @@ -229,19 +217,6 @@ export interface Review {
statusChangedAt?: number;
}

/**
* Persisted state for reviews (per workspace)
* Contains reviews in all states: pending, attached, and checked
*/
export interface ReviewsState {
/** Workspace ID */
workspaceId: string;
/** All reviews keyed by ID */
reviews: Record<string, Review>;
/** Last update timestamp */
lastUpdated: number;
}

/**
* Helpers for parsing ReviewNoteData.lineRange.
*/
Expand Down
8 changes: 0 additions & 8 deletions src/common/types/sessionTape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ export const SessionTapeTrailerSchema = z.object({
}),
});

export const SessionTapeLineSchema = z.union([
SessionTapeHeaderSchema,
SessionTapeEventLineSchema,
SessionTapeTrailerSchema,
]);

export type SessionTapeHeader = z.infer<typeof SessionTapeHeaderSchema>;
export type SessionTapeEventLine = z.infer<typeof SessionTapeEventLineSchema>;
export type SessionTapeEndReason = z.infer<typeof SessionTapeEndReasonSchema>;
export type SessionTapeTrailer = z.infer<typeof SessionTapeTrailerSchema>;
export type SessionTapeLine = z.infer<typeof SessionTapeLineSchema>;
7 changes: 0 additions & 7 deletions src/common/types/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import type { PrefixSwapInvalidatedEventSchema } from "@/common/orpc/schemas/str
import type { z } from "zod";
import type { MuxReasoningPart, MuxTextPart, MuxToolPart } from "./message";
import type {
AutoRetryAbandonedEventSchema,
AutoRetryScheduledEventSchema,
AutoRetryStartingEventSchema,
ErrorEventSchema,
ReasoningDeltaEventSchema,
ReasoningEndEventSchema,
Expand Down Expand Up @@ -78,10 +75,6 @@ export type ReasoningEndEvent = z.infer<typeof ReasoningEndEventSchema>;
*/
export type UsageDeltaEvent = z.infer<typeof UsageDeltaEventSchema>;

export type AutoRetryScheduledEvent = z.infer<typeof AutoRetryScheduledEventSchema>;
export type AutoRetryStartingEvent = z.infer<typeof AutoRetryStartingEventSchema>;
export type AutoRetryAbandonedEvent = z.infer<typeof AutoRetryAbandonedEventSchema>;

/**
* Progress event for pre-stream startup work.
* Used for both runtime readiness and generic startup breadcrumbs in the barrier UI.
Expand Down
1 change: 0 additions & 1 deletion src/common/types/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ export type TimelineEventToolArgs = z.infer<typeof TOOL_DEFINITIONS.timeline_eve
export type TimelineEventToolResult = z.infer<typeof TimelineEventToolResultSchema>;

// Status-update tool types (status page agent mode)
export type StatusUpdateToolArgs = z.infer<typeof TOOL_DEFINITIONS.status_update.schema>;
export type StatusUpdateToolResult =
| { success: true; queued: true; note?: string }
| { success: false; error: string };
Expand Down
3 changes: 0 additions & 3 deletions src/common/utils/planReview/planReviewRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ export const PlanReviewRecordSchema = z.discriminatedUnion("kind", [

export type PlanReviewRecord = z.infer<typeof PlanReviewRecordSchema>;
export type PlanReviewRecordKind = PlanReviewRecord["kind"];
export type PlanReviewSnapshotRecord = z.infer<typeof PlanReviewSnapshotRecordSchema>;
export type PlanReviewFeedbackRecord = z.infer<typeof PlanReviewFeedbackRecordSchema>;
export type PlanReviewFeedbackComment = z.infer<typeof PlanReviewFeedbackCommentSchema>;
export type PlanReviewFeedbackReply = z.infer<typeof PlanReviewFeedbackReplySchema>;

/**
* Snapshot content is line-ending-normalized before hashing so anchors map 1:1 across platforms.
Expand Down
1 change: 0 additions & 1 deletion src/common/utils/planReview/planReviewState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export const PlanReviewStateSchema = z.object({

export type PlanReviewSnapshot = z.infer<typeof PlanReviewSnapshotSchema>;
export type PlanReviewThread = z.infer<typeof PlanReviewThreadSchema>;
export type PlanReviewThreadReply = z.infer<typeof PlanReviewThreadReplySchema>;
export type PlanReviewFeedback = z.infer<typeof PlanReviewFeedbackSchema>;
export type PlanReviewState = z.infer<typeof PlanReviewStateSchema>;

Expand Down
7 changes: 1 addition & 6 deletions src/common/utils/tools/toolDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ import {
INSTANCE_DISCOVERY_MAX_LIMIT,
} from "@/constants/agentMessaging";
import {
AskUserQuestionOptionSchema,
AskUserQuestionQuestionSchema,
AskUserQuestionToolArgsSchema,
} from "./askUserQuestionSchemas";
Expand All @@ -112,11 +111,7 @@ import {
// ask_user_question (interactive questions for top-level agents)
// -----------------------------------------------------------------------------

export {
AskUserQuestionOptionSchema,
AskUserQuestionQuestionSchema,
AskUserQuestionToolArgsSchema,
};
export { AskUserQuestionQuestionSchema, AskUserQuestionToolArgsSchema };

const AskUserQuestionUiOnlySchema = z.object({
questions: z.array(AskUserQuestionQuestionSchema),
Expand Down
1 change: 0 additions & 1 deletion src/node/services/agentPlugins/codexHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const MAPPED_CODEX_HOOK_EVENTS = {
UserPromptSubmit: "message.send",
Stop: "turn.stop",
} as const;
export type MappedCodexHookEvent = keyof typeof MAPPED_CODEX_HOOK_EVENTS;

/** Other Codex events: parsed and listed, never run. */
const IGNORED_CODEX_HOOK_EVENTS = new Set([
Expand Down
3 changes: 0 additions & 3 deletions src/node/services/claudeDesignService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
CLAUDE_DESIGN_MAX_CREDENTIAL_BYTES,
CLAUDE_DESIGN_MAX_ERROR_BYTES,
CLAUDE_DESIGN_SCOPES,
CLAUDE_DESIGN_SERVER_NAME,
CLAUDE_DESIGN_URL,
CLAUDE_DESIGN_READ_TIMEOUT_MS,
CLAUDE_DESIGN_TEST_TIMEOUT_MS,
Expand Down Expand Up @@ -437,5 +436,3 @@ async function needsConsent(response: Response): Promise<boolean> {
reader.cancel().catch(() => undefined);
}
}

export { CLAUDE_DESIGN_SERVER_NAME };
2 changes: 1 addition & 1 deletion src/node/services/coderOauthService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Err, Ok } from "@/common/types/result";
import type { FileLeaseManager, ProvidersConfig, ProvidersConfigStore } from "@/node/config";
import type { ProviderService } from "@/node/services/providerService";
import type { WindowService } from "@/node/services/windowService";
import type { ProviderModelEntry } from "@/common/config/schemas/providerModelEntry";
import type { ProviderModelEntry } from "@/common/orpc/types";
import type { CoderOauthAuth } from "@/node/utils/coderOauthAuth";
import { CODER_GATEWAY_DEFAULT_PROVIDER_NAMES } from "@/common/constants/coderOAuth";
import { CoderOauthService } from "./coderOauthService";
Expand Down
4 changes: 2 additions & 2 deletions src/node/services/planReviewService.prepareFeedback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
parsePlanReviewEnvelope,
} from "@/common/utils/planReview/planReviewEnvelope";
import type {
PlanReviewFeedbackComment,
PlanReviewFeedbackRecord,
PlanReviewRecord,
} from "@/common/utils/planReview/planReviewRecord";
import {
Expand Down Expand Up @@ -38,7 +38,7 @@ describe("preparePlanReviewFeedback reply thread context", () => {
await historyHandle.cleanup();
});

async function seed(comments: PlanReviewFeedbackComment[]): Promise<void> {
async function seed(comments: PlanReviewFeedbackRecord["comments"]): Promise<void> {
const records: PlanReviewRecord[] = [
{
v: 1,
Expand Down
Loading