very-happy-cli 0.2.127 → 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-B9_vB_mY.mjs → AcpBackend-MAU4POiE.mjs} +16 -4
  2. package/dist/{AcpBackend-Cbykm5Pg.cjs → AcpBackend-kU2VqiYx.cjs} +16 -4
  3. package/dist/{AcpSessionManager-DGCsNKRd.cjs → AcpSessionManager-BWasT5jq.cjs} +1 -1
  4. package/dist/{AcpSessionManager-HsxKXreC.mjs → AcpSessionManager-uSGDDRqF.mjs} +1 -1
  5. package/dist/{agentGuidance-B-CazXmT.cjs → agentGuidance-B1PsijGg.cjs} +1 -1
  6. package/dist/{agentGuidance-CTyzeLCQ.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-Dwt-15hE.cjs → config-DswZvA8V.cjs} +4 -4
  10. package/dist/{config-DotNknpP.mjs → config-_DKtp9qs.mjs} +4 -4
  11. package/dist/{index-CWPgxeLD.mjs → index-1QwKRLYG.mjs} +4 -4
  12. package/dist/{index-DgjzHewW.cjs → index-BdZ7Dlg0.cjs} +185 -86
  13. package/dist/{index-C2kblG8-.mjs → index-FMMrmSa2.mjs} +115 -32
  14. package/dist/{index-DyvVjr8Y.cjs → index-dqKLs4dZ.cjs} +114 -31
  15. package/dist/{index-DhCEmP3d.cjs → index-lwOIU7K9.cjs} +4 -4
  16. package/dist/{index-B1qzJIMw.mjs → index-tr2Fqhby.mjs} +178 -83
  17. package/dist/index.cjs +4 -4
  18. package/dist/index.mjs +4 -4
  19. package/dist/{installTerminalHooks-cpuDExTT.mjs → installTerminalHooks-B3a0ugvz.mjs} +4 -4
  20. package/dist/{installTerminalHooks-DfBvxRdw.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-BDG3QjIB.cjs → limits-B5wJ5Slz.cjs} +7 -7
  26. package/dist/{limits-D2XM3dvN.mjs → limits-C41sn_OJ.mjs} +7 -7
  27. package/dist/{mcp-BZ3iYnBc.cjs → mcp-B7lwVQT8.cjs} +4 -4
  28. package/dist/{mcp-CpUrsnoC.mjs → mcp-BHNVwrwS.mjs} +4 -4
  29. package/dist/{runGemini-BY7uA-Uk.mjs → runGemini-FNZrH8yX.mjs} +6 -6
  30. package/dist/{runGemini-BE_nghsj.cjs → runGemini-gbflWQ3_.cjs} +6 -6
  31. package/dist/{runOpenClaw-Be_U4DHZ.mjs → runOpenClaw-3EF_Rqv_.mjs} +5 -5
  32. package/dist/{runOpenClaw-Cqun9jar.cjs → runOpenClaw-CmhYI7OB.cjs} +5 -5
  33. package/dist/{send-D2xX42zg.mjs → send-DV7IeBAv.mjs} +4 -4
  34. package/dist/{send-DbqRxLQW.cjs → send-DqedYZtc.cjs} +4 -4
  35. package/dist/{sessions-CtrMbMBJ.cjs → sessions-Bz243hZ9.cjs} +4 -4
  36. package/dist/{sessions-D06cLJ7f.mjs → sessions-ieB0bLb5.mjs} +4 -4
  37. package/dist/{spawn-Cu_kM761.cjs → spawn-BXwwueEs.cjs} +4 -4
  38. package/dist/{spawn-DMx1JKXo.mjs → spawn-CcqzmjhT.mjs} +4 -4
  39. package/dist/{teams-C2MfKWFe.cjs → teams-BtI6h4Dw.cjs} +4 -4
  40. package/dist/{teams-D7ubdfTY.mjs → teams-Bx79Wr9-.mjs} +4 -4
  41. package/dist/{todo-yvodzg_y.cjs → todo-B-Kj9lXl.cjs} +3 -3
  42. package/dist/{todo-hKSIY23F.mjs → todo-CGRuBaiH.mjs} +3 -3
  43. package/dist/{types-BuxqyzYf.cjs → types-Ba9u0uZL.cjs} +19 -5
  44. package/dist/{types-Df_vXvzD.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-Df_vXvzD.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-D2XM3dvN.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-CTyzeLCQ.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,
@@ -4742,6 +4758,7 @@ function createSessionMetadata(opts) {
4742
4758
  version: packageJson.version,
4743
4759
  os: os.platform(),
4744
4760
  machineId: opts.machineId,
4761
+ ...opts.teamOperationId ? { teamOperationId: opts.teamOperationId } : {},
4745
4762
  homeDir: os.homedir(),
4746
4763
  happyHomeDir: configuration.happyHomeDir,
4747
4764
  happyLibDir: projectPath(),
@@ -5270,6 +5287,11 @@ ${typeLabels[type] || type}:`));
5270
5287
  console.log(chalk.green("\n\u2705 Doctor diagnosis complete!\n"));
5271
5288
  }
5272
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
+
5273
5295
  const SPAWN_AGENTS = ["claude", "codex", "gemini", "openclaw", "pi"];
5274
5296
  function isSpawnAgent(value) {
5275
5297
  return typeof value === "string" && SPAWN_AGENTS.includes(value);
@@ -7032,6 +7054,12 @@ function parsePiRunnerArgs(args) {
7032
7054
  parsed.verbose = true;
7033
7055
  continue;
7034
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
+ }
7035
7063
  if (arg === "--permission-mode") {
7036
7064
  const mode = normalizeAcpPermissionMode(args[++i]);
7037
7065
  if (mode) parsed.permissionMode = mode;
@@ -9922,6 +9950,7 @@ async function startDaemon() {
9922
9950
  const currentCliAvailability = () => apiMachineRef?.getCLIAvailability() ?? startupCliAvailability;
9923
9951
  const spawnSessionImpl = async (options) => {
9924
9952
  logger.debugLargeJson("[DAEMON RUN] Spawning session", summarizeSpawnSessionForLog(options));
9953
+ const spawnModel = options.agent === "pi" ? sanitizeSpawnModel(options.model) : null;
9925
9954
  const spawnPermissionMode = sanitizeSpawnPermissionMode(options.permissionMode);
9926
9955
  if (options.permissionMode !== void 0 && spawnPermissionMode === null) {
9927
9956
  logger.warn("[DAEMON RUN] Ignoring invalid permissionMode in spawn request");
@@ -10146,7 +10175,8 @@ async function startDaemon() {
10146
10175
  const resumeId = agent === "claude" ? options.resumeClaudeSessionId : agent === "codex" ? options.resumeCodexThreadId : void 0;
10147
10176
  const resumeFragment = resumeId ? ` --resume ${shellescape(resumeId)}` : "";
10148
10177
  const permissionModeFragment = spawnPermissionMode ? ` --permission-mode ${shellescape(spawnPermissionMode)}` : "";
10149
- 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}`;
10150
10180
  const windowName = `happy-${Date.now()}-${agent}`;
10151
10181
  const tmuxEnv = {};
10152
10182
  for (const [key, value] of Object.entries(process.env)) {
@@ -10239,6 +10269,7 @@ async function startDaemon() {
10239
10269
  if (options.resumeCodexThreadId && agentCommand === "codex") {
10240
10270
  args.push("--resume", options.resumeCodexThreadId);
10241
10271
  }
10272
+ if (spawnModel) args.push("--model", spawnModel);
10242
10273
  if (spawnPermissionMode) {
10243
10274
  args.push("--permission-mode", spawnPermissionMode);
10244
10275
  }
@@ -12022,7 +12053,7 @@ function registerSideQuestionHandler(rpc, deps) {
12022
12053
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
12023
12054
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
12024
12055
  const run = deps.run ?? (async (input) => {
12025
- const { query } = await import('./index-CWPgxeLD.mjs');
12056
+ const { query } = await import('./index-1QwKRLYG.mjs');
12026
12057
  return runSideQuestion(query, input);
12027
12058
  });
12028
12059
  const slots = /* @__PURE__ */ new Map();
@@ -14766,6 +14797,23 @@ async function ensureDaemonRunning() {
14766
14797
  logger.debug(`Happy background service did not become ready within ${DAEMON_READY_TIMEOUT_MS}ms; continuing anyway`);
14767
14798
  }
14768
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
+
14769
14817
  class BasePermissionHandler {
14770
14818
  pendingRequests = /* @__PURE__ */ new Map();
14771
14819
  session;
@@ -15405,6 +15453,11 @@ function createOfflineSessionStub(sessionTag) {
15405
15453
  },
15406
15454
  onUserMessage: () => {
15407
15455
  },
15456
+ onFileEvent: () => {
15457
+ },
15458
+ trackAttachmentDownload: () => {
15459
+ },
15460
+ drainAttachmentsForUserMessage: async () => [],
15408
15461
  rpcHandlerManager: {
15409
15462
  registerHandler: () => {
15410
15463
  }
@@ -15455,8 +15508,8 @@ function resolveCodexExecutionPolicy(permissionMode, sandboxManagedByHappy) {
15455
15508
  return "never";
15456
15509
  // Never ask, read-only enforced by sandbox
15457
15510
  case "safe-yolo":
15458
- return "on-failure";
15459
- // Auto-run, ask only on failure
15511
+ return "on-request";
15512
+ // Workspace auto-run; request approval for escalation (0.153 removed on-failure)
15460
15513
  case "yolo":
15461
15514
  return "never";
15462
15515
  // Full YOLO: never interrupt for approvals
@@ -16052,10 +16105,10 @@ function isCodexClearText(text) {
16052
16105
  }
16053
16106
  function enqueueCodexUserText(opts) {
16054
16107
  if (isCodexClearText(opts.text)) {
16055
- opts.queue.pushIsolateAndClear(opts.text, opts.mode, void 0, opts.sourceId);
16108
+ opts.queue.pushIsolateAndClear(opts.text, opts.mode, opts.attachments, opts.sourceId);
16056
16109
  return "clear";
16057
16110
  }
16058
- opts.queue.push(opts.text, opts.mode, void 0, opts.sourceId);
16111
+ opts.queue.push(opts.text, opts.mode, opts.attachments, opts.sourceId);
16059
16112
  return "queued";
16060
16113
  }
16061
16114
 
@@ -16179,6 +16232,7 @@ async function runCodex(opts) {
16179
16232
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
16180
16233
  ...forkedFromMessageId ? { forkedFromMessageId } : {}
16181
16234
  });
16235
+ metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
16182
16236
  const reconnectSessionId = process.env.HAPPY_RECONNECT_SESSION_ID;
16183
16237
  const reconnectKeyBase64 = process.env.HAPPY_RECONNECT_ENCRYPTION_KEY;
16184
16238
  const reconnectVariant = process.env.HAPPY_RECONNECT_ENCRYPTION_VARIANT;
@@ -16286,76 +16340,88 @@ async function runCodex(opts) {
16286
16340
  "safe-yolo",
16287
16341
  "yolo"
16288
16342
  ];
16343
+ let discoveredModels = [];
16289
16344
  const VALID_REMOTE_EFFORTS = [
16290
16345
  "none",
16291
16346
  "minimal",
16292
16347
  "low",
16293
16348
  "medium",
16294
16349
  "high",
16295
- "xhigh"
16350
+ "xhigh",
16351
+ "max"
16296
16352
  ];
16353
+ registerAgentAttachmentDownloads(session);
16354
+ let userMessageDelivery = Promise.resolve();
16297
16355
  session.onUserMessage((message) => {
16298
- let messagePermissionMode = currentPermissionMode;
16299
- if (message.meta?.permissionMode) {
16300
- const incoming = message.meta.permissionMode;
16301
- if (VALID_REMOTE_PERMISSION_MODES.includes(incoming)) {
16302
- messagePermissionMode = incoming;
16303
- currentPermissionMode = messagePermissionMode;
16304
- 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
+ }
16305
16369
  } else {
16306
- logger.debug("[Codex] Ignoring invalid permission mode override", logValueMetadata(message.meta.permissionMode));
16370
+ logger.debug("[Codex] User message received without a permission mode override");
16307
16371
  }
16308
- } else {
16309
- logger.debug("[Codex] User message received without a permission mode override");
16310
- }
16311
- let messageModel = currentModel;
16312
- if (message.meta?.hasOwnProperty("model")) {
16313
- messageModel = message.meta.model || void 0;
16314
- currentModel = messageModel;
16315
- logger.debug("[Codex] Model override updated", logValueMetadata(message.meta.model));
16316
- } else {
16317
- logger.debug("[Codex] User message received without a model override");
16318
- }
16319
- let messageEffort = currentEffort;
16320
- if (message.meta?.hasOwnProperty("effort")) {
16321
- const incoming = message.meta.effort;
16322
- if (incoming === null || incoming === void 0) {
16323
- messageEffort = void 0;
16324
- currentEffort = void 0;
16325
- logger.debug(`[Codex] Effort reset to default`);
16326
- } else if (typeof incoming === "string" && VALID_REMOTE_EFFORTS.includes(incoming)) {
16327
- messageEffort = incoming;
16328
- currentEffort = messageEffort;
16329
- 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
+ }
16330
16394
  } else {
16331
- logger.debug("[Codex] Ignoring invalid effort override", logValueMetadata(incoming));
16395
+ logger.debug("[Codex] User message received without an effort override");
16332
16396
  }
16333
- } else {
16334
- logger.debug("[Codex] User message received without an effort override");
16335
- }
16336
- let messageAppendSystemPrompt = currentAppendSystemPrompt;
16337
- if (message.meta?.hasOwnProperty("appendSystemPrompt")) {
16338
- messageAppendSystemPrompt = message.meta.appendSystemPrompt || void 0;
16339
- currentAppendSystemPrompt = messageAppendSystemPrompt;
16340
- logger.debug("[Codex] Append system prompt override updated", logValueMetadata(message.meta.appendSystemPrompt));
16341
- } else {
16342
- logger.debug("[Codex] User message received without an append system prompt override");
16343
- }
16344
- const enhancedMode = {
16345
- permissionMode: messagePermissionMode || "default",
16346
- model: messageModel,
16347
- appendSystemPrompt: messageAppendSystemPrompt,
16348
- effort: messageEffort
16349
- };
16350
- const enqueueResult = enqueueCodexUserText({
16351
- text: message.content.text,
16352
- mode: enhancedMode,
16353
- queue: messageQueue,
16354
- 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." });
16355
16424
  });
16356
- if (enqueueResult === "clear") {
16357
- logger.debug("[Codex] /clear command pushed to isolated queue");
16358
- }
16359
16425
  });
16360
16426
  let thinking = false;
16361
16427
  let currentTurnId = null;
@@ -16631,6 +16697,24 @@ async function runCodex(opts) {
16631
16697
  logger.debug("[codex]: client.connect begin");
16632
16698
  await client.connect();
16633
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
+ }
16634
16718
  if (opts.resumeThreadId) {
16635
16719
  await resumeExistingThread({
16636
16720
  client,
@@ -16719,6 +16803,11 @@ async function runCodex(opts) {
16719
16803
  message.mode.permissionMode,
16720
16804
  sandboxManagedByHappy
16721
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
+ }
16722
16811
  if (!client.hasActiveThread()) {
16723
16812
  const startedThread = await client.startThread({
16724
16813
  model: message.mode.model,
@@ -16741,7 +16830,12 @@ async function runCodex(opts) {
16741
16830
  includeAppendSystemPrompt,
16742
16831
  includeTitleInstruction: first
16743
16832
  });
16744
- 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),
16745
16839
  model: message.mode.model,
16746
16840
  approvalPolicy: executionPolicy.approvalPolicy,
16747
16841
  sandbox: executionPolicy.sandbox,
@@ -16976,7 +17070,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
16976
17070
  process.exit(0);
16977
17071
  } else if (subcommand === "install-terminal-hooks") {
16978
17072
  try {
16979
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-cpuDExTT.mjs');
17073
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-B3a0ugvz.mjs');
16980
17074
  const command = parseTerminalHooksArgs(args.slice(1));
16981
17075
  if (command.action === "help") {
16982
17076
  console.log(TERMINAL_HOOKS_HELP);
@@ -16993,7 +17087,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
16993
17087
  }
16994
17088
  } else if (subcommand === "spawn") {
16995
17089
  try {
16996
- const { handleSpawnCommand } = await import('./spawn-DMx1JKXo.mjs');
17090
+ const { handleSpawnCommand } = await import('./spawn-CcqzmjhT.mjs');
16997
17091
  await handleSpawnCommand(args.slice(1));
16998
17092
  } catch (error) {
16999
17093
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17005,7 +17099,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17005
17099
  return;
17006
17100
  } else if (subcommand === "sessions") {
17007
17101
  try {
17008
- const { handleSessionsCommand } = await import('./sessions-D06cLJ7f.mjs');
17102
+ const { handleSessionsCommand } = await import('./sessions-ieB0bLb5.mjs');
17009
17103
  await handleSessionsCommand(args.slice(1));
17010
17104
  } catch (error) {
17011
17105
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17017,7 +17111,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17017
17111
  return;
17018
17112
  } else if (subcommand === "send") {
17019
17113
  try {
17020
- const { handleSendCommand } = await import('./send-D2xX42zg.mjs');
17114
+ const { handleSendCommand } = await import('./send-DV7IeBAv.mjs');
17021
17115
  await handleSendCommand(args.slice(1));
17022
17116
  } catch (error) {
17023
17117
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17123,9 +17217,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17123
17217
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
17124
17218
  const projectId = args[3];
17125
17219
  try {
17126
- const { saveGoogleCloudProjectToConfig } = await import('./config-DotNknpP.mjs');
17127
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-D2XM3dvN.mjs').then(function (n) { return n.W; });
17128
- const { ApiClient: ApiClient2 } = await import('./types-Df_vXvzD.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._; });
17129
17223
  let userEmail = void 0;
17130
17224
  try {
17131
17225
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -17156,7 +17250,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17156
17250
  }
17157
17251
  if (geminiSubcommand === "project" && args[2] === "get") {
17158
17252
  try {
17159
- const { readGeminiLocalConfig } = await import('./config-DotNknpP.mjs');
17253
+ const { readGeminiLocalConfig } = await import('./config-_DKtp9qs.mjs');
17160
17254
  const config = readGeminiLocalConfig();
17161
17255
  if (config.googleCloudProject) {
17162
17256
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -17196,7 +17290,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17196
17290
  process.exit(0);
17197
17291
  }
17198
17292
  try {
17199
- const { runGemini } = await import('./runGemini-BY7uA-Uk.mjs');
17293
+ const { runGemini } = await import('./runGemini-FNZrH8yX.mjs');
17200
17294
  let startedBy = void 0;
17201
17295
  for (let i = 1; i < args.length; i++) {
17202
17296
  if (args[i] === "--started-by") {
@@ -17226,7 +17320,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17226
17320
  }
17227
17321
  };
17228
17322
  try {
17229
- const { runAcp, resolveAcpAgentConfig } = await import('./index-C2kblG8-.mjs');
17323
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-FMMrmSa2.mjs');
17230
17324
  const parsed = parsePiRunnerArgs(args.slice(1));
17231
17325
  const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
17232
17326
  const { credentials } = await authAndSetupMachineIfNeeded();
@@ -17236,6 +17330,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17236
17330
  startedBy: parsed.startedBy,
17237
17331
  verbose: parsed.verbose,
17238
17332
  permissionMode: parsed.permissionMode,
17333
+ model: parsed.model,
17239
17334
  agentName: resolved.agentName,
17240
17335
  command: resolved.command,
17241
17336
  args: resolved.args,
@@ -17253,7 +17348,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17253
17348
  return;
17254
17349
  } else if (subcommand === "acp") {
17255
17350
  try {
17256
- const { runAcp, resolveAcpAgentConfig } = await import('./index-C2kblG8-.mjs');
17351
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-FMMrmSa2.mjs');
17257
17352
  let startedBy = void 0;
17258
17353
  let verbose = false;
17259
17354
  const acpArgs = [];
@@ -17293,7 +17388,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17293
17388
  return;
17294
17389
  } else if (subcommand === "openclaw") {
17295
17390
  try {
17296
- const { runOpenClaw } = await import('./runOpenClaw-Be_U4DHZ.mjs');
17391
+ const { runOpenClaw } = await import('./runOpenClaw-3EF_Rqv_.mjs');
17297
17392
  let startedBy = void 0;
17298
17393
  let verbose = false;
17299
17394
  let gatewayUrl;
@@ -17344,7 +17439,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17344
17439
  return;
17345
17440
  } else if (subcommand === "todo") {
17346
17441
  try {
17347
- const { handleTodoCommand } = await import('./todo-hKSIY23F.mjs');
17442
+ const { handleTodoCommand } = await import('./todo-CGRuBaiH.mjs');
17348
17443
  await handleTodoCommand(args.slice(1));
17349
17444
  } catch (error) {
17350
17445
  console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
@@ -17353,7 +17448,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17353
17448
  return;
17354
17449
  } else if (subcommand === "teams") {
17355
17450
  try {
17356
- const { handleTeamsCommand } = await import('./teams-D7ubdfTY.mjs');
17451
+ const { handleTeamsCommand } = await import('./teams-Bx79Wr9-.mjs');
17357
17452
  await handleTeamsCommand(args.slice(1));
17358
17453
  } catch (error) {
17359
17454
  console.error(error instanceof Error ? error.message : "Teams command failed");
@@ -17362,7 +17457,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17362
17457
  return;
17363
17458
  } else if (subcommand === "mcp" && args.length === 1) {
17364
17459
  try {
17365
- const { handleMcpCommand } = await import('./mcp-CpUrsnoC.mjs');
17460
+ const { handleMcpCommand } = await import('./mcp-BHNVwrwS.mjs');
17366
17461
  await handleMcpCommand();
17367
17462
  } catch (error) {
17368
17463
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -17724,4 +17819,4 @@ ${chalk.bold("Examples:")}
17724
17819
  }
17725
17820
  }
17726
17821
 
17727
- 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-DgjzHewW.cjs');
5
- require('./limits-BDG3QjIB.cjs');
4
+ require('./index-BdZ7Dlg0.cjs');
5
+ require('./limits-B5wJ5Slz.cjs');
6
6
  require('zod');
7
- require('./types-BuxqyzYf.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-B-CazXmT.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-B1qzJIMw.mjs';
3
- import './limits-D2XM3dvN.mjs';
2
+ import './index-tr2Fqhby.mjs';
3
+ import './limits-C41sn_OJ.mjs';
4
4
  import 'zod';
5
- import './types-Df_vXvzD.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-CTyzeLCQ.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-Df_vXvzD.mjs';
7
- import { t as tmuxSupportsSessionEnv } from './index-B1qzJIMw.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-D2XM3dvN.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-CTyzeLCQ.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-BuxqyzYf.cjs');
9
- var index = require('./index-DgjzHewW.cjs');
8
+ var api = require('./types-Ba9u0uZL.cjs');
9
+ var index = require('./index-BdZ7Dlg0.cjs');
10
10
  require('axios');
11
- require('./limits-BDG3QjIB.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-B-CazXmT.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-BuxqyzYf.cjs');
4
- var persistence = require('./limits-BDG3QjIB.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;