very-happy-cli 0.2.128 → 0.2.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{AcpBackend-D7987ody.mjs → AcpBackend-MAU4POiE.mjs} +16 -4
  2. package/dist/{AcpBackend-BYU6J2n0.cjs → AcpBackend-kU2VqiYx.cjs} +16 -4
  3. package/dist/{AcpSessionManager-artXJgqb.cjs → AcpSessionManager-BWasT5jq.cjs} +1 -1
  4. package/dist/{AcpSessionManager-BwrjVZyn.mjs → AcpSessionManager-uSGDDRqF.mjs} +1 -1
  5. package/dist/{agentGuidance-B1xYgHx6.cjs → agentGuidance-B1PsijGg.cjs} +1 -1
  6. package/dist/{agentGuidance-BPGPaNlo.mjs → agentGuidance-DlZ5s0Om.mjs} +1 -1
  7. package/dist/codex/happyMcpStdioBridge.cjs +2 -2
  8. package/dist/codex/happyMcpStdioBridge.mjs +2 -2
  9. package/dist/{config-Dmkzs3o4.cjs → config-DswZvA8V.cjs} +4 -4
  10. package/dist/{config-DSBE0Az0.mjs → config-_DKtp9qs.mjs} +4 -4
  11. package/dist/{index-35FahgEU.mjs → index-1QwKRLYG.mjs} +4 -4
  12. package/dist/{index-D_YVlpsW.cjs → index-BdZ7Dlg0.cjs} +184 -86
  13. package/dist/{index-m0Dnccc_.mjs → index-FMMrmSa2.mjs} +115 -32
  14. package/dist/{index-vyTJsT_R.cjs → index-dqKLs4dZ.cjs} +114 -31
  15. package/dist/{index-CJmXLSQc.cjs → index-lwOIU7K9.cjs} +4 -4
  16. package/dist/{index-CfM6ewd8.mjs → index-tr2Fqhby.mjs} +177 -83
  17. package/dist/index.cjs +4 -4
  18. package/dist/index.mjs +4 -4
  19. package/dist/{installTerminalHooks-ClrFe2fA.mjs → installTerminalHooks-B3a0ugvz.mjs} +4 -4
  20. package/dist/{installTerminalHooks-C1zwiJJ2.cjs → installTerminalHooks-CV2LAKXO.cjs} +4 -4
  21. package/dist/lib.cjs +2 -2
  22. package/dist/lib.d.cts +5 -0
  23. package/dist/lib.d.mts +5 -0
  24. package/dist/lib.mjs +2 -2
  25. package/dist/{limits-CrwtFbi8.cjs → limits-B5wJ5Slz.cjs} +7 -7
  26. package/dist/{limits-BNTLh2lw.mjs → limits-C41sn_OJ.mjs} +7 -7
  27. package/dist/{mcp-Bc_mmJt8.cjs → mcp-B7lwVQT8.cjs} +4 -4
  28. package/dist/{mcp-BsohER5A.mjs → mcp-BHNVwrwS.mjs} +4 -4
  29. package/dist/{runGemini-B9S85Vms.mjs → runGemini-FNZrH8yX.mjs} +6 -6
  30. package/dist/{runGemini-B2GesRWm.cjs → runGemini-gbflWQ3_.cjs} +6 -6
  31. package/dist/{runOpenClaw-Byhq-B1y.mjs → runOpenClaw-3EF_Rqv_.mjs} +5 -5
  32. package/dist/{runOpenClaw-DCK-R8qe.cjs → runOpenClaw-CmhYI7OB.cjs} +5 -5
  33. package/dist/{send-DQS1zNWp.mjs → send-DV7IeBAv.mjs} +4 -4
  34. package/dist/{send-CPdT1nOg.cjs → send-DqedYZtc.cjs} +4 -4
  35. package/dist/{sessions-DC0IKaD9.cjs → sessions-Bz243hZ9.cjs} +4 -4
  36. package/dist/{sessions-DIOdWnPe.mjs → sessions-ieB0bLb5.mjs} +4 -4
  37. package/dist/{spawn-DrnCW2QK.cjs → spawn-BXwwueEs.cjs} +4 -4
  38. package/dist/{spawn-DV4pIAHZ.mjs → spawn-CcqzmjhT.mjs} +4 -4
  39. package/dist/{teams-CwXEJs9I.cjs → teams-BtI6h4Dw.cjs} +4 -4
  40. package/dist/{teams-DlTHOiCk.mjs → teams-Bx79Wr9-.mjs} +4 -4
  41. package/dist/{todo-DrME15xq.cjs → todo-B-Kj9lXl.cjs} +3 -3
  42. package/dist/{todo-BwXURAbQ.mjs → todo-CGRuBaiH.mjs} +3 -3
  43. package/dist/{types-DfatCoQL.cjs → types-Ba9u0uZL.cjs} +19 -5
  44. package/dist/{types-CFs8FmiY.mjs → types-BvYEAHds.mjs} +19 -5
  45. package/package.json +7 -7
@@ -1,13 +1,13 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
2
  import os, { homedir, userInfo, tmpdir } from 'node:os';
3
3
  import { randomUUID, randomBytes, createHash as createHash$1, timingSafeEqual } from 'node:crypto';
4
- import { j as getProjectPath, h as BUILTIN_TODO_DISCOVERY, p as projectPath, k as initializeSandbox, w as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, f as delay, l as AsyncLock, S as STREAM_DELTA_MAX_CHARS, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, m as commandOnPath, n as deriveLocalCliUpdateSummary, o as isClaudeSessionId, q as getLocalHappyAgentCredentialPath, r as readLocalHappyAgentCredentials, t as parseExactVersion, u as compareExactVersions, v as extractCompleteLines, x as decideBackfill, y as parseTerminalHookPayload, z as tmuxArgs, C as scrubTmuxClientEnv, D as decideMirrorBinding, E as MIRROR_BACKFILL_LINES_DEFAULT, F as mirrorLineKey, G as mirrorLocalId, H as detectCLIAvailability, J as detectResumeSupport, K as summarizeSpawnSessionForLog, L as shellescape, A as ApiClient, N as fetchCliUpdateState, O as resolveCliUpdateCheckInterval, P as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, i as isValidSessionId, Q as listVhTerminals, T as isValidTerminalId, U as readVhTerminal, V as sendToVhTerminal, W as TITLE_PROMPT_PREFIX, X as BOARD_ANALYZER_PROMPT_PREFIX, g as connectionState, Y as startOfflineReconnection, c as createEnvelope, Z as CodexAppServerClient } from './types-CFs8FmiY.mjs';
5
- import { z as readDaemonState, l as logger, c as configuration, A as clearDaemonState, B as ensurePrivateDirectory, D as hardenPrivateFile, p as packageJson, g as readSettings, E as readCredentials, s as credentialRelayProblem, i as encodeBase64, F as readSettingsOutcome, G as updateSettings, H as encodeBase64Url, m as decodeBase64, I as writeCredentialsLegacy, J as writeCredentialsDataKey, d as readCredentialsForConfiguredRelay, j as encrypt, r as readPersistedSessions, w as writePrivateFileSync, K as decryptWithDataKey, L as decryptLegacy, M as persistSession, k as decrypt, f as ensurePrivateDirectorySync, N as acquireDaemonLock, O as deletePersistedSessions, P as writeDaemonState, Q as writeSettings, R as releaseDaemonLock, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, e as CLIPBOARD_MAX_BYTES, S as clearCredentials, T as clearMachineId, U as SandboxConfigSchema, V as getLatestDaemonLog } from './limits-BNTLh2lw.mjs';
4
+ import { j as getProjectPath, g as BUILTIN_TODO_DISCOVERY, p as projectPath, k as initializeSandbox, w as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, h as delay, l as AsyncLock, S as STREAM_DELTA_MAX_CHARS, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, m as commandOnPath, n as deriveLocalCliUpdateSummary, o as isClaudeSessionId, q as getLocalHappyAgentCredentialPath, r as readLocalHappyAgentCredentials, t as parseExactVersion, u as compareExactVersions, v as extractCompleteLines, x as decideBackfill, y as parseTerminalHookPayload, z as tmuxArgs, C as scrubTmuxClientEnv, D as decideMirrorBinding, E as MIRROR_BACKFILL_LINES_DEFAULT, F as mirrorLineKey, G as mirrorLocalId, H as detectCLIAvailability, J as detectResumeSupport, K as summarizeSpawnSessionForLog, L as shellescape, A as ApiClient, N as fetchCliUpdateState, O as resolveCliUpdateCheckInterval, P as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, i as isValidSessionId, Q as listVhTerminals, T as isValidTerminalId, U as readVhTerminal, V as sendToVhTerminal, W as TITLE_PROMPT_PREFIX, X as BOARD_ANALYZER_PROMPT_PREFIX, f as connectionState, Y as startOfflineReconnection, c as createEnvelope, Z as CodexAppServerClient } from './types-BvYEAHds.mjs';
5
+ import { z as readDaemonState, l as logger, c as configuration, A as clearDaemonState, B as ensurePrivateDirectory, D as hardenPrivateFile, p as packageJson, g as readSettings, E as readCredentials, s as credentialRelayProblem, i as encodeBase64, F as readSettingsOutcome, G as updateSettings, H as encodeBase64Url, m as decodeBase64, I as writeCredentialsLegacy, J as writeCredentialsDataKey, d as readCredentialsForConfiguredRelay, j as encrypt, r as readPersistedSessions, w as writePrivateFileSync, K as decryptWithDataKey, L as decryptLegacy, M as persistSession, k as decrypt, f as ensurePrivateDirectorySync, N as acquireDaemonLock, O as deletePersistedSessions, P as writeDaemonState, Q as writeSettings, R as releaseDaemonLock, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, e as CLIPBOARD_MAX_BYTES, S as clearCredentials, T as clearMachineId, U as SandboxConfigSchema, V as getLatestDaemonLog } from './limits-C41sn_OJ.mjs';
6
6
  import spawn$1, { spawn } from 'cross-spawn';
7
7
  import path, { join, resolve, basename, isAbsolute, dirname, sep, delimiter, normalize } from 'node:path';
8
8
  import { createInterface } from 'node:readline';
9
9
  import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, unlinkSync, renameSync, writeFileSync, accessSync, constants, openSync, fsyncSync, closeSync, rmSync as rmSync$1, chmodSync as chmodSync$1 } from 'node:fs';
10
- import { f as trimIdent, A as AGENT_GUIDANCE, t as teamScopePath, T as TeamConnectionPreflightError, e as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, g as TEAM_TOOL_NAMES, r as registerTeamsTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, h as REPORT_PROGRESS_TOOL_TITLE, i as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-BPGPaNlo.mjs';
10
+ import { f as trimIdent, A as AGENT_GUIDANCE, t as teamScopePath, T as TeamConnectionPreflightError, e as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, g as TEAM_TOOL_NAMES, r as registerTeamsTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, h as REPORT_PROGRESS_TOOL_TITLE, i as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-DlZ5s0Om.mjs';
11
11
  import { readFile, writeFile, rename, unlink, mkdir, symlink, rm, readlink, lstat, stat, open as open$1, appendFile } from 'node:fs/promises';
12
12
  import fs, { watch, access } from 'fs/promises';
13
13
  import { useStdout, useInput, Box, Text, render } from 'ink';
@@ -2046,6 +2046,20 @@ async function claudeRemote(opts) {
2046
2046
  prompt: messages,
2047
2047
  options: sdkOptions
2048
2048
  });
2049
+ let models;
2050
+ if (typeof response.supportedModels === "function") {
2051
+ try {
2052
+ models = (await response.supportedModels()).map((model) => ({
2053
+ code: model.value,
2054
+ value: model.displayName,
2055
+ description: model.description,
2056
+ resolvedModel: model.resolvedModel,
2057
+ ...model.supportsEffort === false ? { reasoningEfforts: [] } : model.supportedEffortLevels ? { reasoningEfforts: model.supportedEffortLevels } : {}
2058
+ }));
2059
+ } catch (error) {
2060
+ logger.debug("[claudeRemote] Model capability discovery unavailable");
2061
+ }
2062
+ }
2049
2063
  if (opts.onQueryReady) {
2050
2064
  opts.onQueryReady({
2051
2065
  setPermissionMode: (mode2) => response.setPermissionMode(mode2),
@@ -2097,6 +2111,7 @@ async function claudeRemote(opts) {
2097
2111
  const systemInit = message;
2098
2112
  if (opts.onSDKMetadata) {
2099
2113
  opts.onSDKMetadata({
2114
+ models,
2100
2115
  tools: systemInit.tools,
2101
2116
  slashCommands: systemInit.slash_commands,
2102
2117
  mcpServers: systemInit.mcp_servers?.map((s) => ({ name: s.name, status: s.status })),
@@ -3670,6 +3685,7 @@ function stripAttachmentManifest(text) {
3670
3685
  function applyClaudeSdkMetadata(current, update) {
3671
3686
  return {
3672
3687
  ...current,
3688
+ ...update.models ? { models: update.models } : {},
3673
3689
  tools: update.tools,
3674
3690
  slashCommands: update.slashCommands,
3675
3691
  mcpServers: update.mcpServers,
@@ -5271,6 +5287,11 @@ ${typeLabels[type] || type}:`));
5271
5287
  console.log(chalk.green("\n\u2705 Doctor diagnosis complete!\n"));
5272
5288
  }
5273
5289
 
5290
+ function sanitizeSpawnModel(value) {
5291
+ if (typeof value !== "string") return null;
5292
+ return /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}(\[1m\])?$/i.test(value) ? value : null;
5293
+ }
5294
+
5274
5295
  const SPAWN_AGENTS = ["claude", "codex", "gemini", "openclaw", "pi"];
5275
5296
  function isSpawnAgent(value) {
5276
5297
  return typeof value === "string" && SPAWN_AGENTS.includes(value);
@@ -7033,6 +7054,12 @@ function parsePiRunnerArgs(args) {
7033
7054
  parsed.verbose = true;
7034
7055
  continue;
7035
7056
  }
7057
+ if (arg === "--model") {
7058
+ const model = sanitizeSpawnModel(args[++i]);
7059
+ if (!model) throw new Error("Invalid --model identifier");
7060
+ parsed.model = model;
7061
+ continue;
7062
+ }
7036
7063
  if (arg === "--permission-mode") {
7037
7064
  const mode = normalizeAcpPermissionMode(args[++i]);
7038
7065
  if (mode) parsed.permissionMode = mode;
@@ -9923,6 +9950,7 @@ async function startDaemon() {
9923
9950
  const currentCliAvailability = () => apiMachineRef?.getCLIAvailability() ?? startupCliAvailability;
9924
9951
  const spawnSessionImpl = async (options) => {
9925
9952
  logger.debugLargeJson("[DAEMON RUN] Spawning session", summarizeSpawnSessionForLog(options));
9953
+ const spawnModel = options.agent === "pi" ? sanitizeSpawnModel(options.model) : null;
9926
9954
  const spawnPermissionMode = sanitizeSpawnPermissionMode(options.permissionMode);
9927
9955
  if (options.permissionMode !== void 0 && spawnPermissionMode === null) {
9928
9956
  logger.warn("[DAEMON RUN] Ignoring invalid permissionMode in spawn request");
@@ -10147,7 +10175,8 @@ async function startDaemon() {
10147
10175
  const resumeId = agent === "claude" ? options.resumeClaudeSessionId : agent === "codex" ? options.resumeCodexThreadId : void 0;
10148
10176
  const resumeFragment = resumeId ? ` --resume ${shellescape(resumeId)}` : "";
10149
10177
  const permissionModeFragment = spawnPermissionMode ? ` --permission-mode ${shellescape(spawnPermissionMode)}` : "";
10150
- const fullCommand = `node --no-warnings --no-deprecation ${cliPath} ${agent} --happy-starting-mode remote --started-by daemon${resumeFragment}${permissionModeFragment}`;
10178
+ const modelFragment = spawnModel ? ` --model ${shellescape(spawnModel)}` : "";
10179
+ const fullCommand = `node --no-warnings --no-deprecation ${cliPath} ${agent} --happy-starting-mode remote --started-by daemon${resumeFragment}${permissionModeFragment}${modelFragment}`;
10151
10180
  const windowName = `happy-${Date.now()}-${agent}`;
10152
10181
  const tmuxEnv = {};
10153
10182
  for (const [key, value] of Object.entries(process.env)) {
@@ -10240,6 +10269,7 @@ async function startDaemon() {
10240
10269
  if (options.resumeCodexThreadId && agentCommand === "codex") {
10241
10270
  args.push("--resume", options.resumeCodexThreadId);
10242
10271
  }
10272
+ if (spawnModel) args.push("--model", spawnModel);
10243
10273
  if (spawnPermissionMode) {
10244
10274
  args.push("--permission-mode", spawnPermissionMode);
10245
10275
  }
@@ -12023,7 +12053,7 @@ function registerSideQuestionHandler(rpc, deps) {
12023
12053
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
12024
12054
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
12025
12055
  const run = deps.run ?? (async (input) => {
12026
- const { query } = await import('./index-35FahgEU.mjs');
12056
+ const { query } = await import('./index-1QwKRLYG.mjs');
12027
12057
  return runSideQuestion(query, input);
12028
12058
  });
12029
12059
  const slots = /* @__PURE__ */ new Map();
@@ -14767,6 +14797,23 @@ async function ensureDaemonRunning() {
14767
14797
  logger.debug(`Happy background service did not become ready within ${DAEMON_READY_TIMEOUT_MS}ms; continuing anyway`);
14768
14798
  }
14769
14799
 
14800
+ function registerAgentAttachmentDownloads(session) {
14801
+ session.onFileEvent((fileEvent) => {
14802
+ const attachment = fileEvent.content.data.ev;
14803
+ const download = (async () => {
14804
+ try {
14805
+ const data = await session.downloadAndDecryptAttachment(attachment.ref);
14806
+ if (!data) throw new Error("Attachment decryption failed");
14807
+ return { data, mimeType: attachment.mimeType ?? "image/jpeg", name: attachment.name };
14808
+ } catch {
14809
+ session.sendSessionEvent({ type: "message", message: `Could not download attachment: ${attachment.name}. Please attach it again.` });
14810
+ return null;
14811
+ }
14812
+ })();
14813
+ session.trackAttachmentDownload(download);
14814
+ });
14815
+ }
14816
+
14770
14817
  class BasePermissionHandler {
14771
14818
  pendingRequests = /* @__PURE__ */ new Map();
14772
14819
  session;
@@ -15406,6 +15453,11 @@ function createOfflineSessionStub(sessionTag) {
15406
15453
  },
15407
15454
  onUserMessage: () => {
15408
15455
  },
15456
+ onFileEvent: () => {
15457
+ },
15458
+ trackAttachmentDownload: () => {
15459
+ },
15460
+ drainAttachmentsForUserMessage: async () => [],
15409
15461
  rpcHandlerManager: {
15410
15462
  registerHandler: () => {
15411
15463
  }
@@ -15456,8 +15508,8 @@ function resolveCodexExecutionPolicy(permissionMode, sandboxManagedByHappy) {
15456
15508
  return "never";
15457
15509
  // Never ask, read-only enforced by sandbox
15458
15510
  case "safe-yolo":
15459
- return "on-failure";
15460
- // Auto-run, ask only on failure
15511
+ return "on-request";
15512
+ // Workspace auto-run; request approval for escalation (0.153 removed on-failure)
15461
15513
  case "yolo":
15462
15514
  return "never";
15463
15515
  // Full YOLO: never interrupt for approvals
@@ -16053,10 +16105,10 @@ function isCodexClearText(text) {
16053
16105
  }
16054
16106
  function enqueueCodexUserText(opts) {
16055
16107
  if (isCodexClearText(opts.text)) {
16056
- opts.queue.pushIsolateAndClear(opts.text, opts.mode, void 0, opts.sourceId);
16108
+ opts.queue.pushIsolateAndClear(opts.text, opts.mode, opts.attachments, opts.sourceId);
16057
16109
  return "clear";
16058
16110
  }
16059
- opts.queue.push(opts.text, opts.mode, void 0, opts.sourceId);
16111
+ opts.queue.push(opts.text, opts.mode, opts.attachments, opts.sourceId);
16060
16112
  return "queued";
16061
16113
  }
16062
16114
 
@@ -16180,6 +16232,7 @@ async function runCodex(opts) {
16180
16232
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
16181
16233
  ...forkedFromMessageId ? { forkedFromMessageId } : {}
16182
16234
  });
16235
+ metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
16183
16236
  const reconnectSessionId = process.env.HAPPY_RECONNECT_SESSION_ID;
16184
16237
  const reconnectKeyBase64 = process.env.HAPPY_RECONNECT_ENCRYPTION_KEY;
16185
16238
  const reconnectVariant = process.env.HAPPY_RECONNECT_ENCRYPTION_VARIANT;
@@ -16287,76 +16340,88 @@ async function runCodex(opts) {
16287
16340
  "safe-yolo",
16288
16341
  "yolo"
16289
16342
  ];
16343
+ let discoveredModels = [];
16290
16344
  const VALID_REMOTE_EFFORTS = [
16291
16345
  "none",
16292
16346
  "minimal",
16293
16347
  "low",
16294
16348
  "medium",
16295
16349
  "high",
16296
- "xhigh"
16350
+ "xhigh",
16351
+ "max"
16297
16352
  ];
16353
+ registerAgentAttachmentDownloads(session);
16354
+ let userMessageDelivery = Promise.resolve();
16298
16355
  session.onUserMessage((message) => {
16299
- let messagePermissionMode = currentPermissionMode;
16300
- if (message.meta?.permissionMode) {
16301
- const incoming = message.meta.permissionMode;
16302
- if (VALID_REMOTE_PERMISSION_MODES.includes(incoming)) {
16303
- messagePermissionMode = incoming;
16304
- currentPermissionMode = messagePermissionMode;
16305
- logger.debug("[Codex] Valid permission mode override applied");
16356
+ const downloads = session.drainAttachmentsForUserMessage();
16357
+ userMessageDelivery = userMessageDelivery.then(async () => {
16358
+ const attachments = await downloads;
16359
+ let messagePermissionMode = currentPermissionMode;
16360
+ if (message.meta?.permissionMode) {
16361
+ const incoming = message.meta.permissionMode;
16362
+ if (VALID_REMOTE_PERMISSION_MODES.includes(incoming)) {
16363
+ messagePermissionMode = incoming;
16364
+ currentPermissionMode = messagePermissionMode;
16365
+ logger.debug("[Codex] Valid permission mode override applied");
16366
+ } else {
16367
+ logger.debug("[Codex] Ignoring invalid permission mode override", logValueMetadata(message.meta.permissionMode));
16368
+ }
16306
16369
  } else {
16307
- logger.debug("[Codex] Ignoring invalid permission mode override", logValueMetadata(message.meta.permissionMode));
16370
+ logger.debug("[Codex] User message received without a permission mode override");
16308
16371
  }
16309
- } else {
16310
- logger.debug("[Codex] User message received without a permission mode override");
16311
- }
16312
- let messageModel = currentModel;
16313
- if (message.meta?.hasOwnProperty("model")) {
16314
- messageModel = message.meta.model || void 0;
16315
- currentModel = messageModel;
16316
- logger.debug("[Codex] Model override updated", logValueMetadata(message.meta.model));
16317
- } else {
16318
- logger.debug("[Codex] User message received without a model override");
16319
- }
16320
- let messageEffort = currentEffort;
16321
- if (message.meta?.hasOwnProperty("effort")) {
16322
- const incoming = message.meta.effort;
16323
- if (incoming === null || incoming === void 0) {
16324
- messageEffort = void 0;
16325
- currentEffort = void 0;
16326
- logger.debug(`[Codex] Effort reset to default`);
16327
- } else if (typeof incoming === "string" && VALID_REMOTE_EFFORTS.includes(incoming)) {
16328
- messageEffort = incoming;
16329
- currentEffort = messageEffort;
16330
- logger.debug("[Codex] Valid effort override applied");
16372
+ let messageModel = currentModel;
16373
+ if (message.meta?.hasOwnProperty("model")) {
16374
+ messageModel = message.meta.model || void 0;
16375
+ currentModel = messageModel;
16376
+ logger.debug("[Codex] Model override updated", logValueMetadata(message.meta.model));
16377
+ } else {
16378
+ logger.debug("[Codex] User message received without a model override");
16379
+ }
16380
+ let messageEffort = currentEffort;
16381
+ if (message.meta?.hasOwnProperty("effort")) {
16382
+ const incoming = message.meta.effort;
16383
+ if (incoming === null || incoming === void 0) {
16384
+ messageEffort = void 0;
16385
+ currentEffort = void 0;
16386
+ logger.debug(`[Codex] Effort reset to default`);
16387
+ } else if (typeof incoming === "string") {
16388
+ messageEffort = incoming;
16389
+ currentEffort = messageEffort;
16390
+ logger.debug("[Codex] Valid effort override applied");
16391
+ } else {
16392
+ logger.debug("[Codex] Ignoring invalid effort override", logValueMetadata(incoming));
16393
+ }
16331
16394
  } else {
16332
- logger.debug("[Codex] Ignoring invalid effort override", logValueMetadata(incoming));
16395
+ logger.debug("[Codex] User message received without an effort override");
16333
16396
  }
16334
- } else {
16335
- logger.debug("[Codex] User message received without an effort override");
16336
- }
16337
- let messageAppendSystemPrompt = currentAppendSystemPrompt;
16338
- if (message.meta?.hasOwnProperty("appendSystemPrompt")) {
16339
- messageAppendSystemPrompt = message.meta.appendSystemPrompt || void 0;
16340
- currentAppendSystemPrompt = messageAppendSystemPrompt;
16341
- logger.debug("[Codex] Append system prompt override updated", logValueMetadata(message.meta.appendSystemPrompt));
16342
- } else {
16343
- logger.debug("[Codex] User message received without an append system prompt override");
16344
- }
16345
- const enhancedMode = {
16346
- permissionMode: messagePermissionMode || "default",
16347
- model: messageModel,
16348
- appendSystemPrompt: messageAppendSystemPrompt,
16349
- effort: messageEffort
16350
- };
16351
- const enqueueResult = enqueueCodexUserText({
16352
- text: message.content.text,
16353
- mode: enhancedMode,
16354
- queue: messageQueue,
16355
- sourceId: message.localKey
16397
+ let messageAppendSystemPrompt = currentAppendSystemPrompt;
16398
+ if (message.meta?.hasOwnProperty("appendSystemPrompt")) {
16399
+ messageAppendSystemPrompt = message.meta.appendSystemPrompt || void 0;
16400
+ currentAppendSystemPrompt = messageAppendSystemPrompt;
16401
+ logger.debug("[Codex] Append system prompt override updated", logValueMetadata(message.meta.appendSystemPrompt));
16402
+ } else {
16403
+ logger.debug("[Codex] User message received without an append system prompt override");
16404
+ }
16405
+ const enhancedMode = {
16406
+ permissionMode: messagePermissionMode || "default",
16407
+ model: messageModel,
16408
+ appendSystemPrompt: messageAppendSystemPrompt,
16409
+ effort: messageEffort
16410
+ };
16411
+ const enqueueResult = enqueueCodexUserText({
16412
+ text: message.content.text,
16413
+ mode: enhancedMode,
16414
+ queue: messageQueue,
16415
+ attachments,
16416
+ sourceId: message.localKey
16417
+ });
16418
+ if (enqueueResult === "clear") {
16419
+ logger.debug("[Codex] /clear command pushed to isolated queue");
16420
+ }
16421
+ }).catch((error) => {
16422
+ logger.warn("[Codex] Failed to prepare user attachments", safeCodexErrorMetadata(error));
16423
+ session.sendSessionEvent({ type: "message", message: "Could not prepare this message. Please send it again." });
16356
16424
  });
16357
- if (enqueueResult === "clear") {
16358
- logger.debug("[Codex] /clear command pushed to isolated queue");
16359
- }
16360
16425
  });
16361
16426
  let thinking = false;
16362
16427
  let currentTurnId = null;
@@ -16632,6 +16697,24 @@ async function runCodex(opts) {
16632
16697
  logger.debug("[codex]: client.connect begin");
16633
16698
  await client.connect();
16634
16699
  logger.debug("[codex]: client.connect done");
16700
+ try {
16701
+ discoveredModels = await client.listModels();
16702
+ if (discoveredModels.length > 0) {
16703
+ session.updateMetadata((metadata2) => ({
16704
+ ...metadata2,
16705
+ models: discoveredModels.map((model) => ({
16706
+ code: model.model,
16707
+ value: model.displayName,
16708
+ description: model.description,
16709
+ reasoningEfforts: model.supportedReasoningEfforts.map((option) => option.reasoningEffort),
16710
+ defaultReasoningEffort: model.defaultReasoningEffort
16711
+ })),
16712
+ defaultModelCode: discoveredModels.find((model) => model.isDefault)?.model
16713
+ }));
16714
+ }
16715
+ } catch (error) {
16716
+ logger.debug("[Codex] Model discovery unavailable; using compatibility fallback", safeCodexErrorMetadata(error));
16717
+ }
16635
16718
  if (opts.resumeThreadId) {
16636
16719
  await resumeExistingThread({
16637
16720
  client,
@@ -16720,6 +16803,11 @@ async function runCodex(opts) {
16720
16803
  message.mode.permissionMode,
16721
16804
  sandboxManagedByHappy
16722
16805
  );
16806
+ const selectedModel = discoveredModels.find((model) => message.mode.model ? model.model === message.mode.model : model.isDefault);
16807
+ const supportedEfforts = selectedModel?.supportedReasoningEfforts.map((option) => option.reasoningEffort) ?? VALID_REMOTE_EFFORTS;
16808
+ if (message.mode.effort && !supportedEfforts.includes(message.mode.effort)) {
16809
+ throw new Error(`Reasoning effort "${message.mode.effort}" is not supported by ${message.mode.model ?? "the default model"}. Choose a supported level.`);
16810
+ }
16723
16811
  if (!client.hasActiveThread()) {
16724
16812
  const startedThread = await client.startThread({
16725
16813
  model: message.mode.model,
@@ -16742,7 +16830,12 @@ async function runCodex(opts) {
16742
16830
  includeAppendSystemPrompt,
16743
16831
  includeTitleInstruction: first
16744
16832
  });
16745
- const result = await client.sendTurnAndWait(turnPrompt, {
16833
+ const staged = message.attachments?.length ? await stageClaudeAttachments(message.attachments, {
16834
+ happyHomeDir: configuration.happyHomeDir,
16835
+ sessionId: session.sessionId
16836
+ }) : [];
16837
+ const result = await client.sendTurnAndWait(appendStagedAttachmentsToPrompt(turnPrompt, staged), {
16838
+ images: staged.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => file.path),
16746
16839
  model: message.mode.model,
16747
16840
  approvalPolicy: executionPolicy.approvalPolicy,
16748
16841
  sandbox: executionPolicy.sandbox,
@@ -16977,7 +17070,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
16977
17070
  process.exit(0);
16978
17071
  } else if (subcommand === "install-terminal-hooks") {
16979
17072
  try {
16980
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-ClrFe2fA.mjs');
17073
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-B3a0ugvz.mjs');
16981
17074
  const command = parseTerminalHooksArgs(args.slice(1));
16982
17075
  if (command.action === "help") {
16983
17076
  console.log(TERMINAL_HOOKS_HELP);
@@ -16994,7 +17087,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
16994
17087
  }
16995
17088
  } else if (subcommand === "spawn") {
16996
17089
  try {
16997
- const { handleSpawnCommand } = await import('./spawn-DV4pIAHZ.mjs');
17090
+ const { handleSpawnCommand } = await import('./spawn-CcqzmjhT.mjs');
16998
17091
  await handleSpawnCommand(args.slice(1));
16999
17092
  } catch (error) {
17000
17093
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17006,7 +17099,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17006
17099
  return;
17007
17100
  } else if (subcommand === "sessions") {
17008
17101
  try {
17009
- const { handleSessionsCommand } = await import('./sessions-DIOdWnPe.mjs');
17102
+ const { handleSessionsCommand } = await import('./sessions-ieB0bLb5.mjs');
17010
17103
  await handleSessionsCommand(args.slice(1));
17011
17104
  } catch (error) {
17012
17105
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17018,7 +17111,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17018
17111
  return;
17019
17112
  } else if (subcommand === "send") {
17020
17113
  try {
17021
- const { handleSendCommand } = await import('./send-DQS1zNWp.mjs');
17114
+ const { handleSendCommand } = await import('./send-DV7IeBAv.mjs');
17022
17115
  await handleSendCommand(args.slice(1));
17023
17116
  } catch (error) {
17024
17117
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17124,9 +17217,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17124
17217
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
17125
17218
  const projectId = args[3];
17126
17219
  try {
17127
- const { saveGoogleCloudProjectToConfig } = await import('./config-DSBE0Az0.mjs');
17128
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-BNTLh2lw.mjs').then(function (n) { return n.W; });
17129
- const { ApiClient: ApiClient2 } = await import('./types-CFs8FmiY.mjs').then(function (n) { return n._; });
17220
+ const { saveGoogleCloudProjectToConfig } = await import('./config-_DKtp9qs.mjs');
17221
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-C41sn_OJ.mjs').then(function (n) { return n.W; });
17222
+ const { ApiClient: ApiClient2 } = await import('./types-BvYEAHds.mjs').then(function (n) { return n._; });
17130
17223
  let userEmail = void 0;
17131
17224
  try {
17132
17225
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -17157,7 +17250,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17157
17250
  }
17158
17251
  if (geminiSubcommand === "project" && args[2] === "get") {
17159
17252
  try {
17160
- const { readGeminiLocalConfig } = await import('./config-DSBE0Az0.mjs');
17253
+ const { readGeminiLocalConfig } = await import('./config-_DKtp9qs.mjs');
17161
17254
  const config = readGeminiLocalConfig();
17162
17255
  if (config.googleCloudProject) {
17163
17256
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -17197,7 +17290,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17197
17290
  process.exit(0);
17198
17291
  }
17199
17292
  try {
17200
- const { runGemini } = await import('./runGemini-B9S85Vms.mjs');
17293
+ const { runGemini } = await import('./runGemini-FNZrH8yX.mjs');
17201
17294
  let startedBy = void 0;
17202
17295
  for (let i = 1; i < args.length; i++) {
17203
17296
  if (args[i] === "--started-by") {
@@ -17227,7 +17320,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17227
17320
  }
17228
17321
  };
17229
17322
  try {
17230
- const { runAcp, resolveAcpAgentConfig } = await import('./index-m0Dnccc_.mjs');
17323
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-FMMrmSa2.mjs');
17231
17324
  const parsed = parsePiRunnerArgs(args.slice(1));
17232
17325
  const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
17233
17326
  const { credentials } = await authAndSetupMachineIfNeeded();
@@ -17237,6 +17330,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17237
17330
  startedBy: parsed.startedBy,
17238
17331
  verbose: parsed.verbose,
17239
17332
  permissionMode: parsed.permissionMode,
17333
+ model: parsed.model,
17240
17334
  agentName: resolved.agentName,
17241
17335
  command: resolved.command,
17242
17336
  args: resolved.args,
@@ -17254,7 +17348,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17254
17348
  return;
17255
17349
  } else if (subcommand === "acp") {
17256
17350
  try {
17257
- const { runAcp, resolveAcpAgentConfig } = await import('./index-m0Dnccc_.mjs');
17351
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-FMMrmSa2.mjs');
17258
17352
  let startedBy = void 0;
17259
17353
  let verbose = false;
17260
17354
  const acpArgs = [];
@@ -17294,7 +17388,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17294
17388
  return;
17295
17389
  } else if (subcommand === "openclaw") {
17296
17390
  try {
17297
- const { runOpenClaw } = await import('./runOpenClaw-Byhq-B1y.mjs');
17391
+ const { runOpenClaw } = await import('./runOpenClaw-3EF_Rqv_.mjs');
17298
17392
  let startedBy = void 0;
17299
17393
  let verbose = false;
17300
17394
  let gatewayUrl;
@@ -17345,7 +17439,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17345
17439
  return;
17346
17440
  } else if (subcommand === "todo") {
17347
17441
  try {
17348
- const { handleTodoCommand } = await import('./todo-BwXURAbQ.mjs');
17442
+ const { handleTodoCommand } = await import('./todo-CGRuBaiH.mjs');
17349
17443
  await handleTodoCommand(args.slice(1));
17350
17444
  } catch (error) {
17351
17445
  console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
@@ -17354,7 +17448,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17354
17448
  return;
17355
17449
  } else if (subcommand === "teams") {
17356
17450
  try {
17357
- const { handleTeamsCommand } = await import('./teams-DlTHOiCk.mjs');
17451
+ const { handleTeamsCommand } = await import('./teams-Bx79Wr9-.mjs');
17358
17452
  await handleTeamsCommand(args.slice(1));
17359
17453
  } catch (error) {
17360
17454
  console.error(error instanceof Error ? error.message : "Teams command failed");
@@ -17363,7 +17457,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17363
17457
  return;
17364
17458
  } else if (subcommand === "mcp" && args.length === 1) {
17365
17459
  try {
17366
- const { handleMcpCommand } = await import('./mcp-BsohER5A.mjs');
17460
+ const { handleMcpCommand } = await import('./mcp-BHNVwrwS.mjs');
17367
17461
  await handleMcpCommand();
17368
17462
  } catch (error) {
17369
17463
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -17725,4 +17819,4 @@ ${chalk.bold("Examples:")}
17725
17819
  }
17726
17820
  }
17727
17821
 
17728
- export { ALLOWED_SPAWN_PERMISSION_MODES as A, hashObject as B, startHappyServer as C, DEFAULT_RECENT_LIMIT as D, TitleGenerator as E, BasePermissionHandler as F, GEMINI_MODEL_ENV as G, writeSessionModeFile as H, normalizeAcpPermissionMode as I, removeSessionModeFile as J, GEMINI_API_KEY_ENV as K, GOOGLE_API_KEY_ENV as L, MAX_READ_LIMIT as M, BaseReasoningProcessor as N, MessageBuffer as O, PI_TEAMS_EXTENSION as P, CHANGE_TITLE_INSTRUCTION as Q, SPAWN_AGENTS as S, TEAM_SKILL as T, sessionWebUrl as a, sanitizeSpawnPermissionMode as b, checkIfDaemonRunningAndCleanupStaleState as c, sendUserMessage as d, listSessions as e, stopSession as f, resolvePermissionRequest as g, archiveSession as h, isValidSpawnOrigin as i, DEFAULT_GEMINI_MODEL as j, setTerminalTitleViaDaemon as k, listAccountSessions as l, registerAssistantSessionTools as m, initialMachineMetadata as n, createSessionMetadata as o, pushClipboardViaDaemon as p, query as q, readSessionTranscript as r, spawnDaemonSession as s, tmuxSupportsSessionEnv as t, setupOfflineReconnection as u, notifyDaemonSessionStarted as v, waitForSessionKey as w, MessageQueue2 as x, registerKillSessionHandler as y, StreamRelay as z };
17822
+ export { ALLOWED_SPAWN_PERMISSION_MODES as A, hashObject as B, startHappyServer as C, DEFAULT_RECENT_LIMIT as D, registerAgentAttachmentDownloads as E, TitleGenerator as F, GEMINI_MODEL_ENV as G, CLAUDE_ATTACHMENT_KINDS as H, stageClaudeAttachments as I, appendStagedAttachmentsToPrompt as J, BasePermissionHandler as K, writeSessionModeFile as L, MAX_READ_LIMIT as M, normalizeAcpPermissionMode as N, removeSessionModeFile as O, PI_TEAMS_EXTENSION as P, GEMINI_API_KEY_ENV as Q, GOOGLE_API_KEY_ENV as R, SPAWN_AGENTS as S, TEAM_SKILL as T, BaseReasoningProcessor as U, MessageBuffer as V, CHANGE_TITLE_INSTRUCTION as W, sessionWebUrl as a, sanitizeSpawnPermissionMode as b, checkIfDaemonRunningAndCleanupStaleState as c, sendUserMessage as d, listSessions as e, stopSession as f, resolvePermissionRequest as g, archiveSession as h, isValidSpawnOrigin as i, DEFAULT_GEMINI_MODEL as j, setTerminalTitleViaDaemon as k, listAccountSessions as l, registerAssistantSessionTools as m, initialMachineMetadata as n, createSessionMetadata as o, pushClipboardViaDaemon as p, query as q, readSessionTranscript as r, spawnDaemonSession as s, tmuxSupportsSessionEnv as t, setupOfflineReconnection as u, notifyDaemonSessionStarted as v, waitForSessionKey as w, MessageQueue2 as x, registerKillSessionHandler as y, StreamRelay as z };
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./index-D_YVlpsW.cjs');
5
- require('./limits-CrwtFbi8.cjs');
4
+ require('./index-BdZ7Dlg0.cjs');
5
+ require('./limits-B5wJ5Slz.cjs');
6
6
  require('zod');
7
- require('./types-DfatCoQL.cjs');
7
+ require('./types-Ba9u0uZL.cjs');
8
8
  require('node:child_process');
9
9
  require('node:os');
10
10
  require('node:crypto');
@@ -12,7 +12,7 @@ require('cross-spawn');
12
12
  require('node:path');
13
13
  require('node:readline');
14
14
  require('node:fs');
15
- require('./agentGuidance-B1xYgHx6.cjs');
15
+ require('./agentGuidance-B1PsijGg.cjs');
16
16
  require('node:fs/promises');
17
17
  require('fs/promises');
18
18
  require('ink');
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import 'chalk';
2
- import './index-CfM6ewd8.mjs';
3
- import './limits-BNTLh2lw.mjs';
2
+ import './index-tr2Fqhby.mjs';
3
+ import './limits-C41sn_OJ.mjs';
4
4
  import 'zod';
5
- import './types-CFs8FmiY.mjs';
5
+ import './types-BvYEAHds.mjs';
6
6
  import 'node:child_process';
7
7
  import 'node:os';
8
8
  import 'node:crypto';
@@ -10,7 +10,7 @@ import 'cross-spawn';
10
10
  import 'node:path';
11
11
  import 'node:readline';
12
12
  import 'node:fs';
13
- import './agentGuidance-BPGPaNlo.mjs';
13
+ import './agentGuidance-DlZ5s0Om.mjs';
14
14
  import 'node:fs/promises';
15
15
  import 'fs/promises';
16
16
  import 'ink';
@@ -3,10 +3,10 @@ import { join, resolve } from 'node:path';
3
3
  import { homedir } from 'node:os';
4
4
  import { spawnSync } from 'node:child_process';
5
5
  import chalk from 'chalk';
6
- import { p as projectPath } from './types-CFs8FmiY.mjs';
7
- import { t as tmuxSupportsSessionEnv } from './index-CfM6ewd8.mjs';
6
+ import { p as projectPath } from './types-BvYEAHds.mjs';
7
+ import { t as tmuxSupportsSessionEnv } from './index-tr2Fqhby.mjs';
8
8
  import 'axios';
9
- import './limits-BNTLh2lw.mjs';
9
+ import './limits-C41sn_OJ.mjs';
10
10
  import 'node:fs/promises';
11
11
  import 'zod';
12
12
  import 'node:crypto';
@@ -28,7 +28,7 @@ import 'fs';
28
28
  import 'node:readline';
29
29
  import '@anthropic-ai/sandbox-runtime';
30
30
  import 'expo-server-sdk';
31
- import './agentGuidance-BPGPaNlo.mjs';
31
+ import './agentGuidance-DlZ5s0Om.mjs';
32
32
  import 'ink';
33
33
  import 'react';
34
34
  import '@anthropic-ai/claude-agent-sdk';
@@ -5,10 +5,10 @@ var path = require('node:path');
5
5
  var os = require('node:os');
6
6
  var node_child_process = require('node:child_process');
7
7
  var chalk = require('chalk');
8
- var api = require('./types-DfatCoQL.cjs');
9
- var index = require('./index-D_YVlpsW.cjs');
8
+ var api = require('./types-Ba9u0uZL.cjs');
9
+ var index = require('./index-BdZ7Dlg0.cjs');
10
10
  require('axios');
11
- require('./limits-CrwtFbi8.cjs');
11
+ require('./limits-B5wJ5Slz.cjs');
12
12
  require('node:fs/promises');
13
13
  require('zod');
14
14
  require('node:crypto');
@@ -30,7 +30,7 @@ require('fs');
30
30
  require('node:readline');
31
31
  require('@anthropic-ai/sandbox-runtime');
32
32
  require('expo-server-sdk');
33
- require('./agentGuidance-B1xYgHx6.cjs');
33
+ require('./agentGuidance-B1PsijGg.cjs');
34
34
  require('ink');
35
35
  require('react');
36
36
  require('@anthropic-ai/claude-agent-sdk');
package/dist/lib.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var api = require('./types-DfatCoQL.cjs');
4
- var persistence = require('./limits-CrwtFbi8.cjs');
3
+ var api = require('./types-Ba9u0uZL.cjs');
4
+ var persistence = require('./limits-B5wJ5Slz.cjs');
5
5
  require('axios');
6
6
  require('node:events');
7
7
  require('socket.io-client');
package/dist/lib.d.cts CHANGED
@@ -561,6 +561,9 @@ type Metadata = {
561
561
  code: string;
562
562
  value: string;
563
563
  description?: string | null;
564
+ resolvedModel?: string;
565
+ reasoningEfforts?: string[];
566
+ defaultReasoningEffort?: string;
564
567
  }>;
565
568
  currentModelCode?: string;
566
569
  /** Resolved SDK model when no per-message model override was supplied. */
@@ -1087,6 +1090,8 @@ declare const SPAWN_AGENTS: readonly ["claude", "codex", "gemini", "openclaw", "
1087
1090
  type SpawnAgent = (typeof SPAWN_AGENTS)[number];
1088
1091
 
1089
1092
  interface SpawnSessionOptions {
1093
+ /** Optional initial model; absent preserves the runner default. */
1094
+ model?: string;
1090
1095
  machineId?: string;
1091
1096
  directory: string;
1092
1097
  sessionId?: string;