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
3 changes: 2 additions & 1 deletion packages/codium/sources/plugins/anthropic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import type {
const STORAGE_KEY = 'codium.plugin.anthropic.apiKey'

const MODELS: ModelDescriptor[] = [
{ id: 'claude-opus-4-7', label: 'Opus 4.7', group: 'Anthropic', description: 'Latest Opus generation.' },
{ id: 'claude-opus-4-8', label: 'Opus 4.8', group: 'Anthropic', description: 'Latest Opus generation.' },
{ id: 'claude-opus-4-7', label: 'Opus 4.7', group: 'Anthropic', description: 'Previous Opus generation.' },
{ id: 'claude-opus-4-6', label: 'Opus 4.6', group: 'Anthropic', description: 'Deepest reasoning, slowest.' },
{ id: 'claude-sonnet-4-6', label: 'Sonnet 4.6', group: 'Anthropic', description: 'Balanced reasoning + speed.' },
]
Expand Down
2 changes: 1 addition & 1 deletion packages/happy-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"twrnc": "^4.9.1",
"uuid": "^11.1.0",
"vitest": "^3.2.4",
"zod": "3.25.76",
"zod": "^4.0.0",
"zustand": "^5.0.6"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/happy-app/sources/components/modelModeOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function getGeminiPermissionModes(translate: Translate): PermissionMode[]
export function getClaudeModelModes(): ModelMode[] {
return [
{ key: 'default', name: 'default model', description: null },
{ key: 'opus', name: 'opus 4.7', description: null },
{ key: 'opus', name: 'opus 4.8', description: null },
{ key: 'sonnet', name: 'sonnet 4.6', description: null },
{ key: 'haiku', name: 'haiku 4.5', description: null },
];
Expand Down Expand Up @@ -206,6 +206,7 @@ export function getClaudeEffortLevels(): EffortLevel[] {
{ key: 'low', name: 'low' },
{ key: 'medium', name: 'medium' },
{ key: 'high', name: 'high' },
{ key: 'xhigh', name: 'xhigh' },
{ key: 'max', name: 'max' },
];
}
Expand Down
6 changes: 3 additions & 3 deletions packages/happy-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"dependencies": {
"@agentclientprotocol/sdk": "^0.14.1",
"@anthropic-ai/claude-agent-sdk": "^0.2.96",
"@anthropic-ai/claude-agent-sdk": "^0.3.167",
"@anthropic-ai/sandbox-runtime": "^0.0.37",
"@modelcontextprotocol/sdk": "1.25.3",
"@noble/ed25519": "^3.0.0",
Expand All @@ -92,7 +92,7 @@
"cross-spawn": "^7.0.6",
"expo-server-sdk": "^3.15.0",
"fastify": "^5.6.2",
"fastify-type-provider-zod": "4.0.2",
"fastify-type-provider-zod": "^6.1.0",
"http-proxy": "^1.18.1",
"http-proxy-middleware": "^3.0.5",
"ink": "^6.5.1",
Expand All @@ -106,7 +106,7 @@
"tmp": "^0.2.5",
"tweetnacl": "^1.0.3",
"ws": "^8.19.0",
"zod": "3.25.76"
"zod": "^4.0.0"
},
"devDependencies": {
"@eslint/compat": "^1",
Expand Down
2 changes: 1 addition & 1 deletion packages/happy-cli/src/claude/loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { SandboxConfig } from "@/persistence"
export type { PermissionMode } from "@/api/types"
import type { PermissionMode } from "@/api/types"

export type ClaudeEffort = 'low' | 'medium' | 'high' | 'max';
export type ClaudeEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max';

export interface EnhancedMode {
permissionMode: PermissionMode;
Expand Down
8 changes: 4 additions & 4 deletions packages/happy-cli/src/claude/runClaude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface StartOptions {

const DEFAULT_CLAUDE_PERMISSION_MODE: PermissionMode = 'yolo';
const DEFAULT_CLAUDE_MODEL = 'opus';
const DEFAULT_CLAUDE_EFFORT: 'low' | 'medium' | 'high' | 'max' = 'medium';
const DEFAULT_CLAUDE_EFFORT: 'low' | 'medium' | 'high' | 'xhigh' | 'max' = 'medium';

export async function runClaude(credentials: Credentials, options: StartOptions = {}): Promise<void> {
logger.debug(`[CLAUDE] ===== CLAUDE MODE STARTING =====`);
Expand Down Expand Up @@ -418,7 +418,7 @@ export async function runClaude(credentials: Credentials, options: StartOptions
let currentAppendSystemPrompt: string | undefined = undefined; // Track current append system prompt
let currentAllowedTools: string[] | undefined = undefined; // Track current allowed tools
let currentDisallowedTools: string[] | undefined = undefined; // Track current disallowed tools
let currentEffort: 'low' | 'medium' | 'high' | 'max' | undefined = DEFAULT_CLAUDE_EFFORT; // Track current Claude effort (thinking depth)
let currentEffort: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | undefined = DEFAULT_CLAUDE_EFFORT; // Track current Claude effort (thinking depth)
let currentRunMode: 'local' | 'remote' = options.startingMode ?? 'local';

const resetCurrentModeDefaults = () => {
Expand Down Expand Up @@ -550,15 +550,15 @@ export async function runClaude(credentials: Credentials, options: StartOptions
// Validate against the SDK's accepted set so a stale/garbage value
// from the wire doesn't poison the session.
let messageEffort = currentEffort;
const VALID_EFFORTS: ReadonlySet<string> = new Set(['low', 'medium', 'high', 'max']);
const VALID_EFFORTS: ReadonlySet<string> = new Set(['low', 'medium', 'high', 'xhigh', 'max']);
if (message.meta?.hasOwnProperty('effort')) {
const incoming = (message.meta as Record<string, unknown>).effort;
if (incoming === null || incoming === undefined) {
messageEffort = undefined;
currentEffort = undefined;
logger.debug(`[loop] Effort reset to default`);
} else if (typeof incoming === 'string' && VALID_EFFORTS.has(incoming)) {
messageEffort = incoming as 'low' | 'medium' | 'high' | 'max';
messageEffort = incoming as 'low' | 'medium' | 'high' | 'xhigh' | 'max';
currentEffort = messageEffort;
logger.debug(`[loop] Effort updated from user message: ${messageEffort}`);
} else {
Expand Down
6 changes: 4 additions & 2 deletions packages/happy-cli/src/claude/sdk/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ export interface QueryOptions {
/**
* Effort level passed straight through to the Claude Agent SDK option
* of the same name — controls how much thinking/reasoning Claude
* applies on each turn ('low' | 'medium' | 'high' | 'max').
* applies on each turn ('low' | 'medium' | 'high' | 'xhigh' | 'max').
* 'xhigh' is supported on the newest Opus generation (e.g. Opus 4.8);
* the SDK silently downgrades it to 'high' on models without it.
*/
effort?: 'low' | 'medium' | 'high' | 'max'
effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max'
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/happy-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"dotenv": "^16.4.5",
"elevenlabs": "^1.54.0",
"fastify": "^5.2.0",
"fastify-type-provider-zod": "^4.0.2",
"fastify-type-provider-zod": "^6.1.0",
"ioredis": "^5.6.1",
"jsonwebtoken": "^9.0.2",
"minio": "^8.0.5",
Expand All @@ -102,7 +102,7 @@
"tmp": "^0.2.3",
"tweetnacl": "^1.0.3",
"uuid": "^9.0.1",
"zod": "3.25.76",
"zod": "^4.0.0",
"zod-to-json-schema": "^3.24.3"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/happy-wire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@paralleldrive/cuid2": "^2.2.2",
"zod": "3.25.76"
"zod": "^4.0.0"
},
"devDependencies": {
"@types/node": ">=20",
Expand Down
Loading