Merge remote-tracking branch 'origin/v0.10.0rc' into stefandevo/main

This commit is contained in:
Kacper
2026-01-11 17:34:19 +01:00
156 changed files with 8389 additions and 5916 deletions

View File

@@ -0,0 +1,87 @@
/**
* Codex App-Server JSON-RPC Types
*
* Type definitions for communicating with Codex CLI's app-server via JSON-RPC protocol.
* These types match the response structures from the `codex app-server` command.
*/
/**
* Response from model/list JSON-RPC method
* Returns list of available Codex models for the authenticated user
*/
export interface AppServerModelResponse {
data: AppServerModel[];
nextCursor: string | null;
}
export interface AppServerModel {
id: string;
model: string;
displayName: string;
description: string;
supportedReasoningEfforts: AppServerReasoningEffort[];
defaultReasoningEffort: string;
isDefault: boolean;
}
export interface AppServerReasoningEffort {
reasoningEffort: string;
description: string;
}
/**
* Response from account/read JSON-RPC method
* Returns current authentication state and account information
*/
export interface AppServerAccountResponse {
account: AppServerAccount | null;
requiresOpenaiAuth: boolean;
}
export interface AppServerAccount {
type: 'apiKey' | 'chatgpt';
email?: string;
planType?: string;
}
/**
* Response from account/rateLimits/read JSON-RPC method
* Returns rate limit information for the current user
*/
export interface AppServerRateLimitsResponse {
rateLimits: AppServerRateLimits;
}
export interface AppServerRateLimits {
primary: AppServerRateLimitWindow | null;
secondary: AppServerRateLimitWindow | null;
planType?: string;
}
export interface AppServerRateLimitWindow {
usedPercent: number;
windowDurationMins: number;
resetsAt: number;
}
/**
* Generic JSON-RPC request structure
*/
export interface JsonRpcRequest {
method: string;
id: number;
params?: unknown;
}
/**
* Generic JSON-RPC response structure
*/
export interface JsonRpcResponse<T = unknown> {
id: number;
result?: T;
error?: {
code: number;
message: string;
data?: unknown;
};
}

View File

@@ -5,7 +5,7 @@
/**
* Available enhancement modes for transforming task descriptions
*/
export type EnhancementMode = 'improve' | 'technical' | 'simplify' | 'acceptance';
export type EnhancementMode = 'improve' | 'technical' | 'simplify' | 'acceptance' | 'ux-reviewer';
/**
* Example input/output pair for few-shot learning

View File

@@ -12,7 +12,7 @@ export interface DescriptionHistoryEntry {
description: string;
timestamp: string; // ISO date string
source: 'initial' | 'enhance' | 'edit'; // What triggered this version
enhancementMode?: 'improve' | 'technical' | 'simplify' | 'acceptance'; // Only for 'enhance' source
enhancementMode?: 'improve' | 'technical' | 'simplify' | 'acceptance' | 'ux-reviewer'; // Only for 'enhance' source
}
export interface FeatureImagePath {

View File

@@ -30,6 +30,20 @@ export type {
} from './codex.js';
export * from './codex-models.js';
// Codex App-Server JSON-RPC types
export type {
AppServerModelResponse,
AppServerModel,
AppServerReasoningEffort,
AppServerAccountResponse,
AppServerAccount,
AppServerRateLimitsResponse,
AppServerRateLimits,
AppServerRateLimitWindow,
JsonRpcRequest,
JsonRpcResponse,
} from './codex-app-server.js';
// Feature types
export type {
Feature,
@@ -95,7 +109,6 @@ export { DEFAULT_PROMPT_CUSTOMIZATION } from './prompts.js';
// Settings types and constants
export type {
ThemeMode,
KanbanCardDetailLevel,
PlanningMode,
ThinkingLevel,
ModelProvider,
@@ -103,7 +116,6 @@ export type {
PhaseModelConfig,
PhaseModelKey,
KeyboardShortcuts,
AIProfile,
MCPToolInfo,
MCPServerConfig,
ProjectRef,
@@ -125,8 +137,6 @@ export {
CREDENTIALS_VERSION,
PROJECT_SETTINGS_VERSION,
THINKING_TOKEN_BUDGET,
profileHasThinking,
getProfileModelString,
getThinkingTokenBudget,
} from './settings.js';

View File

@@ -89,6 +89,9 @@ export interface EnhancementPrompts {
/** System prompt for "acceptance" mode (add acceptance criteria) */
acceptanceSystemPrompt?: CustomPrompt;
/** System prompt for "ux-reviewer" mode (UX and design perspective) */
uxReviewerSystemPrompt?: CustomPrompt;
}
/**
@@ -150,4 +153,5 @@ export interface ResolvedEnhancementPrompts {
technicalSystemPrompt: string;
simplifySystemPrompt: string;
acceptanceSystemPrompt: string;
uxReviewerSystemPrompt: string;
}

View File

@@ -65,9 +65,6 @@ export type ThemeMode =
| 'nordlight'
| 'blossom';
/** KanbanCardDetailLevel - Controls how much information is displayed on kanban cards */
export type KanbanCardDetailLevel = 'minimal' | 'standard' | 'detailed';
/** PlanningMode - Planning levels for feature generation workflows */
export type PlanningMode = 'skip' | 'lite' | 'spec' | 'full';
@@ -201,8 +198,6 @@ export interface KeyboardShortcuts {
context: string;
/** Open settings */
settings: string;
/** Open AI profiles */
profiles: string;
/** Open terminal */
terminal: string;
/** Toggle sidebar visibility */
@@ -223,8 +218,6 @@ export interface KeyboardShortcuts {
cyclePrevProject: string;
/** Cycle to next project */
cycleNextProject: string;
/** Add new AI profile */
addProfile: string;
/** Split terminal right */
splitTerminalRight: string;
/** Split terminal down */
@@ -233,96 +226,6 @@ export interface KeyboardShortcuts {
closeTerminal: string;
}
/**
* AIProfile - Configuration for an AI model with specific parameters
*
* Profiles can be built-in defaults or user-created. They define which model to use,
* thinking level, and other parameters for feature generation tasks.
*/
export interface AIProfile {
/** Unique identifier for the profile */
id: string;
/** Display name for the profile */
name: string;
/** User-friendly description */
description: string;
/** Provider selection: 'claude', 'cursor', or 'codex' */
provider: ModelProvider;
/** Whether this is a built-in default profile */
isBuiltIn: boolean;
/** Optional icon identifier or emoji */
icon?: string;
// Claude-specific settings
/** Which Claude model to use (opus, sonnet, haiku) - only for Claude provider */
model?: ModelAlias;
/** Extended thinking level for reasoning-based tasks - only for Claude provider */
thinkingLevel?: ThinkingLevel;
// Cursor-specific settings
/** Which Cursor model to use - only for Cursor provider
* Note: For Cursor, thinking is embedded in the model ID (e.g., 'claude-sonnet-4-thinking')
*/
cursorModel?: CursorModelId;
// Codex-specific settings
/** Which Codex/GPT model to use - only for Codex provider */
codexModel?: CodexModelId;
// OpenCode-specific settings
/** Which OpenCode model to use - only for OpenCode provider */
opencodeModel?: OpencodeModelId;
}
/**
* Helper to determine if a profile uses thinking mode
*/
export function profileHasThinking(profile: AIProfile): boolean {
if (profile.provider === 'claude') {
return profile.thinkingLevel !== undefined && profile.thinkingLevel !== 'none';
}
if (profile.provider === 'cursor') {
const model = profile.cursorModel || 'auto';
// Check using model map for hasThinking flag, or check for 'thinking' in name
const modelConfig = CURSOR_MODEL_MAP[model];
return modelConfig?.hasThinking ?? false;
}
if (profile.provider === 'codex') {
// Codex models handle thinking internally (o-series models)
const model = profile.codexModel || 'codex-gpt-5.2';
return model.startsWith('o');
}
if (profile.provider === 'opencode') {
// OpenCode models don't expose thinking configuration
return false;
}
return false;
}
/**
* Get effective model string for execution
*/
export function getProfileModelString(profile: AIProfile): string {
if (profile.provider === 'cursor') {
return `cursor:${profile.cursorModel || 'auto'}`;
}
if (profile.provider === 'codex') {
return `codex:${profile.codexModel || 'codex-gpt-5.2'}`;
}
if (profile.provider === 'opencode') {
return `opencode:${profile.opencodeModel || DEFAULT_OPENCODE_MODEL}`;
}
// Claude
return profile.model || 'sonnet';
}
/**
* MCPToolInfo - Information about a tool provided by an MCP server
*
@@ -388,6 +291,8 @@ export interface ProjectRef {
lastOpened?: string;
/** Project-specific theme override (or undefined to use global) */
theme?: string;
/** Whether project is pinned to favorites on dashboard */
isFavorite?: boolean;
}
/**
@@ -426,7 +331,7 @@ export interface ChatSessionRef {
* GlobalSettings - User preferences and state stored globally in {DATA_DIR}/settings.json
*
* This is the main settings file that persists user preferences across sessions.
* Includes theme, UI state, feature defaults, keyboard shortcuts, AI profiles, and projects.
* Includes theme, UI state, feature defaults, keyboard shortcuts, and projects.
* Format: JSON with version field for migration support.
*/
export interface GlobalSettings {
@@ -454,8 +359,6 @@ export interface GlobalSettings {
sidebarOpen: boolean;
/** Whether chat history panel is open */
chatHistoryOpen: boolean;
/** How much detail to show on kanban cards */
kanbanCardDetailLevel: KanbanCardDetailLevel;
// Feature Generation Defaults
/** Max features to generate concurrently */
@@ -468,14 +371,10 @@ export interface GlobalSettings {
skipVerificationInAutoMode: boolean;
/** Default: use git worktrees for feature branches */
useWorktrees: boolean;
/** Default: only show AI profiles (hide other settings) */
showProfilesOnly: boolean;
/** Default: planning approach (skip/lite/spec/full) */
defaultPlanningMode: PlanningMode;
/** Default: require manual approval before generating */
defaultRequirePlanApproval: boolean;
/** ID of currently selected AI profile (null = use built-in) */
defaultAIProfileId: string | null;
// Audio Preferences
/** Mute completion notification sound */
@@ -507,10 +406,6 @@ export interface GlobalSettings {
/** User's keyboard shortcut bindings */
keyboardShortcuts: KeyboardShortcuts;
// AI Profiles
/** User-created AI profiles */
aiProfiles: AIProfile[];
// Project Management
/** List of active projects */
projects: ProjectRef[];
@@ -701,6 +596,10 @@ export interface ProjectSettings {
/** Project-specific board background settings */
boardBackground?: BoardBackgroundSettings;
// UI Visibility
/** Whether the worktree panel row is visible (default: true) */
worktreePanelVisible?: boolean;
// Session Tracking
/** Last chat session selected in this project */
lastSelectedSessionId?: string;
@@ -758,7 +657,6 @@ export const DEFAULT_KEYBOARD_SHORTCUTS: KeyboardShortcuts = {
spec: 'D',
context: 'C',
settings: 'S',
profiles: 'M',
terminal: 'T',
toggleSidebar: '`',
addFeature: 'N',
@@ -769,7 +667,6 @@ export const DEFAULT_KEYBOARD_SHORTCUTS: KeyboardShortcuts = {
projectPicker: 'P',
cyclePrevProject: 'Q',
cycleNextProject: 'E',
addProfile: 'N',
splitTerminalRight: 'Alt+D',
splitTerminalDown: 'Alt+S',
closeTerminal: 'Alt+W',
@@ -784,16 +681,13 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
theme: 'dark',
sidebarOpen: true,
chatHistoryOpen: false,
kanbanCardDetailLevel: 'standard',
maxConcurrency: 3,
defaultSkipTests: true,
enableDependencyBlocking: true,
skipVerificationInAutoMode: false,
useWorktrees: true,
showProfilesOnly: false,
defaultPlanningMode: 'skip',
defaultRequirePlanApproval: false,
defaultAIProfileId: null,
muteDoneSound: false,
phaseModels: DEFAULT_PHASE_MODELS,
enhancementModel: 'sonnet',
@@ -803,7 +697,6 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
enabledOpencodeModels: getAllOpencodeModelIds(),
opencodeDefaultModel: DEFAULT_OPENCODE_MODEL,
keyboardShortcuts: DEFAULT_KEYBOARD_SHORTCUTS,
aiProfiles: [],
projects: [],
trashedProjects: [],
currentProjectId: null,