happy-coder 0.11.1-0 → 0.11.2-0

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.
package/README.md CHANGED
@@ -39,6 +39,14 @@ This will:
39
39
  - `--claude-env KEY=VALUE` - Set environment variable for Claude Code
40
40
  - `--claude-arg ARG` - Pass additional argument to Claude CLI
41
41
 
42
+ ## Environment Variables
43
+
44
+ - `HAPPY_SERVER_URL` - Custom server URL (default: https://api.cluster-fluster.com)
45
+ - `HAPPY_WEBAPP_URL` - Custom web app URL (default: https://app.happy.engineering)
46
+ - `HAPPY_HOME_DIR` - Custom home directory for Happy data (default: ~/.happy)
47
+ - `HAPPY_DISABLE_CAFFEINATE` - Disable macOS sleep prevention (set to `true`, `1`, or `yes`)
48
+ - `HAPPY_EXPERIMENTAL` - Enable experimental features (set to `true`, `1`, or `yes`)
49
+
42
50
  ## Requirements
43
51
 
44
52
  - Node.js >= 20.0.0
@@ -1,7 +1,7 @@
1
1
  import chalk from 'chalk';
2
2
  import os$1, { homedir } from 'node:os';
3
3
  import { randomUUID, randomBytes } from 'node:crypto';
4
- import { l as logger, p as projectPath, d as backoff, e as delay, R as RawJSONLinesSchema, f as AsyncLock, g as readDaemonState, h as clearDaemonState, b as packageJson, c as configuration, r as readSettings, i as readCredentials, j as encodeBase64, u as updateSettings, k as encodeBase64Url, m as decodeBase64, w as writeCredentialsLegacy, n as writeCredentialsDataKey, o as acquireDaemonLock, q as writeDaemonState, A as ApiClient, s as releaseDaemonLock, t as clearCredentials, v as clearMachineId, x as getLatestDaemonLog } from './types-0Hm6NOkj.mjs';
4
+ import { l as logger, p as projectPath, d as backoff, e as delay, R as RawJSONLinesSchema, f as AsyncLock, c as configuration, g as readDaemonState, h as clearDaemonState, b as packageJson, r as readSettings, i as readCredentials, j as encodeBase64, u as updateSettings, k as encodeBase64Url, m as decodeBase64, w as writeCredentialsLegacy, n as writeCredentialsDataKey, o as acquireDaemonLock, q as writeDaemonState, A as ApiClient, s as releaseDaemonLock, t as clearCredentials, v as clearMachineId, x as getLatestDaemonLog } from './types-CVOFMcT8.mjs';
5
5
  import { spawn, execSync, execFileSync } from 'node:child_process';
6
6
  import { resolve, join } from 'node:path';
7
7
  import { createInterface } from 'node:readline';
@@ -2672,15 +2672,24 @@ async function claudeRemoteLauncher(session) {
2672
2672
  }
2673
2673
  try {
2674
2674
  let pending = null;
2675
+ let previousSessionId = null;
2675
2676
  while (!exitReason) {
2676
2677
  logger.debug("[remote]: launch");
2677
2678
  messageBuffer.addMessage("\u2550".repeat(40), "status");
2678
- messageBuffer.addMessage("Starting new Claude session...", "status");
2679
+ const isNewSession = session.sessionId !== previousSessionId;
2680
+ if (isNewSession) {
2681
+ messageBuffer.addMessage("Starting new Claude session...", "status");
2682
+ permissionHandler.reset();
2683
+ sdkToLogConverter.resetParentChain();
2684
+ logger.debug(`[remote]: New session detected (previous: ${previousSessionId}, current: ${session.sessionId})`);
2685
+ } else {
2686
+ messageBuffer.addMessage("Continuing Claude session...", "status");
2687
+ logger.debug(`[remote]: Continuing existing session: ${session.sessionId}`);
2688
+ }
2689
+ previousSessionId = session.sessionId;
2679
2690
  const controller = new AbortController();
2680
2691
  abortController = controller;
2681
2692
  abortFuture = new Future();
2682
- permissionHandler.reset();
2683
- sdkToLogConverter.resetParentChain();
2684
2693
  let modeHash = null;
2685
2694
  let mode = null;
2686
2695
  try {
@@ -3178,6 +3187,10 @@ function hashObject(obj, options, encoding = "hex") {
3178
3187
 
3179
3188
  let caffeinateProcess = null;
3180
3189
  function startCaffeinate() {
3190
+ if (configuration.disableCaffeinate) {
3191
+ logger.debug("[caffeinate] Caffeinate disabled via HAPPY_DISABLE_CAFFEINATE environment variable");
3192
+ return false;
3193
+ }
3181
3194
  if (process.platform !== "darwin") {
3182
3195
  logger.debug("[caffeinate] Not on macOS, skipping caffeinate");
3183
3196
  return false;
@@ -3187,7 +3200,7 @@ function startCaffeinate() {
3187
3200
  return true;
3188
3201
  }
3189
3202
  try {
3190
- caffeinateProcess = spawn$1("caffeinate", ["-dim"], {
3203
+ caffeinateProcess = spawn$1("caffeinate", ["-im"], {
3191
3204
  stdio: "ignore",
3192
3205
  detached: false
3193
3206
  });
@@ -3779,7 +3792,7 @@ async function doAuth() {
3779
3792
  const authMethod = await selectAuthenticationMethod();
3780
3793
  if (!authMethod) {
3781
3794
  console.log("\nAuthentication cancelled.\n");
3782
- return null;
3795
+ process.exit(0);
3783
3796
  }
3784
3797
  const secret = new Uint8Array(randomBytes(32));
3785
3798
  const keypair = tweetnacl.box.keyPair.fromSecretKey(secret);
@@ -5781,7 +5794,7 @@ async function handleConnectVendor(vendor, displayName) {
5781
5794
  return;
5782
5795
  } else if (subcommand === "codex") {
5783
5796
  try {
5784
- const { runCodex } = await import('./runCodex-B3H8yB3Q.mjs');
5797
+ const { runCodex } = await import('./runCodex-BJlyTS8v.mjs');
5785
5798
  let startedBy = void 0;
5786
5799
  for (let i = 1; i < args.length; i++) {
5787
5800
  if (args[i] === "--started-by") {
@@ -3,7 +3,7 @@
3
3
  var chalk = require('chalk');
4
4
  var os = require('node:os');
5
5
  var node_crypto = require('node:crypto');
6
- var types = require('./types-D-P1Kg34.cjs');
6
+ var types = require('./types-D6ZewYb6.cjs');
7
7
  var node_child_process = require('node:child_process');
8
8
  var node_path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -981,7 +981,7 @@ class AbortError extends Error {
981
981
  }
982
982
  }
983
983
 
984
- const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BN1H_2wt.cjs', document.baseURI).href)));
984
+ const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CFWfkM2k.cjs', document.baseURI).href)));
985
985
  const __dirname$1 = node_path.join(__filename$1, "..");
986
986
  function getDefaultClaudeCodePath() {
987
987
  return node_path.join(__dirname$1, "..", "..", "..", "node_modules", "@anthropic-ai", "claude-code", "cli.js");
@@ -2694,15 +2694,24 @@ async function claudeRemoteLauncher(session) {
2694
2694
  }
2695
2695
  try {
2696
2696
  let pending = null;
2697
+ let previousSessionId = null;
2697
2698
  while (!exitReason) {
2698
2699
  types.logger.debug("[remote]: launch");
2699
2700
  messageBuffer.addMessage("\u2550".repeat(40), "status");
2700
- messageBuffer.addMessage("Starting new Claude session...", "status");
2701
+ const isNewSession = session.sessionId !== previousSessionId;
2702
+ if (isNewSession) {
2703
+ messageBuffer.addMessage("Starting new Claude session...", "status");
2704
+ permissionHandler.reset();
2705
+ sdkToLogConverter.resetParentChain();
2706
+ types.logger.debug(`[remote]: New session detected (previous: ${previousSessionId}, current: ${session.sessionId})`);
2707
+ } else {
2708
+ messageBuffer.addMessage("Continuing Claude session...", "status");
2709
+ types.logger.debug(`[remote]: Continuing existing session: ${session.sessionId}`);
2710
+ }
2711
+ previousSessionId = session.sessionId;
2701
2712
  const controller = new AbortController();
2702
2713
  abortController = controller;
2703
2714
  abortFuture = new Future();
2704
- permissionHandler.reset();
2705
- sdkToLogConverter.resetParentChain();
2706
2715
  let modeHash = null;
2707
2716
  let mode = null;
2708
2717
  try {
@@ -3200,6 +3209,10 @@ function hashObject(obj, options, encoding = "hex") {
3200
3209
 
3201
3210
  let caffeinateProcess = null;
3202
3211
  function startCaffeinate() {
3212
+ if (types.configuration.disableCaffeinate) {
3213
+ types.logger.debug("[caffeinate] Caffeinate disabled via HAPPY_DISABLE_CAFFEINATE environment variable");
3214
+ return false;
3215
+ }
3203
3216
  if (process.platform !== "darwin") {
3204
3217
  types.logger.debug("[caffeinate] Not on macOS, skipping caffeinate");
3205
3218
  return false;
@@ -3209,7 +3222,7 @@ function startCaffeinate() {
3209
3222
  return true;
3210
3223
  }
3211
3224
  try {
3212
- caffeinateProcess = child_process.spawn("caffeinate", ["-dim"], {
3225
+ caffeinateProcess = child_process.spawn("caffeinate", ["-im"], {
3213
3226
  stdio: "ignore",
3214
3227
  detached: false
3215
3228
  });
@@ -3801,7 +3814,7 @@ async function doAuth() {
3801
3814
  const authMethod = await selectAuthenticationMethod();
3802
3815
  if (!authMethod) {
3803
3816
  console.log("\nAuthentication cancelled.\n");
3804
- return null;
3817
+ process.exit(0);
3805
3818
  }
3806
3819
  const secret = new Uint8Array(node_crypto.randomBytes(32));
3807
3820
  const keypair = tweetnacl.box.keyPair.fromSecretKey(secret);
@@ -5803,7 +5816,7 @@ async function handleConnectVendor(vendor, displayName) {
5803
5816
  return;
5804
5817
  } else if (subcommand === "codex") {
5805
5818
  try {
5806
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-BBqp_JVS.cjs'); });
5819
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-Dxi7L-oi.cjs'); });
5807
5820
  let startedBy = void 0;
5808
5821
  for (let i = 1; i < args.length; i++) {
5809
5822
  if (args[i] === "--started-by") {
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./index-BN1H_2wt.cjs');
5
- require('./types-D-P1Kg34.cjs');
4
+ require('./index-CFWfkM2k.cjs');
5
+ require('./types-D6ZewYb6.cjs');
6
6
  require('zod');
7
7
  require('node:child_process');
8
8
  require('node:os');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'chalk';
2
- import './index-DutM9a5s.mjs';
3
- import './types-0Hm6NOkj.mjs';
2
+ import './index-B6KoidwE.mjs';
3
+ import './types-CVOFMcT8.mjs';
4
4
  import 'zod';
5
5
  import 'node:child_process';
6
6
  import 'node:os';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var types = require('./types-D-P1Kg34.cjs');
3
+ var types = require('./types-D6ZewYb6.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('fs');
package/dist/lib.d.cts CHANGED
@@ -807,6 +807,7 @@ declare class Configuration {
807
807
  readonly daemonLockFile: string;
808
808
  readonly currentCliVersion: string;
809
809
  readonly isExperimentalEnabled: boolean;
810
+ readonly disableCaffeinate: boolean;
810
811
  constructor();
811
812
  }
812
813
  declare const configuration: Configuration;
package/dist/lib.d.mts CHANGED
@@ -807,6 +807,7 @@ declare class Configuration {
807
807
  readonly daemonLockFile: string;
808
808
  readonly currentCliVersion: string;
809
809
  readonly isExperimentalEnabled: boolean;
810
+ readonly disableCaffeinate: boolean;
810
811
  constructor();
811
812
  }
812
813
  declare const configuration: Configuration;
package/dist/lib.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-0Hm6NOkj.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-CVOFMcT8.mjs';
2
2
  import 'axios';
3
3
  import 'chalk';
4
4
  import 'fs';
@@ -1,12 +1,13 @@
1
1
  import { useStdout, useInput, Box, Text, render } from 'ink';
2
2
  import React, { useState, useRef, useEffect, useCallback } from 'react';
3
- import { l as logger, A as ApiClient, r as readSettings, p as projectPath, c as configuration, b as packageJson } from './types-0Hm6NOkj.mjs';
3
+ import { l as logger, A as ApiClient, r as readSettings, p as projectPath, c as configuration, b as packageJson } from './types-CVOFMcT8.mjs';
4
4
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
5
5
  import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
6
6
  import { z } from 'zod';
7
7
  import { ElicitRequestSchema } from '@modelcontextprotocol/sdk/types.js';
8
+ import { execSync } from 'child_process';
8
9
  import { randomUUID } from 'node:crypto';
9
- import { i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, r as registerKillSessionHandler, a as MessageBuffer, s as startHappyServer, t as trimIdent, b as stopCaffeinate } from './index-DutM9a5s.mjs';
10
+ import { i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, r as registerKillSessionHandler, a as MessageBuffer, s as startHappyServer, t as trimIdent, b as stopCaffeinate } from './index-B6KoidwE.mjs';
10
11
  import os from 'node:os';
11
12
  import { resolve, join } from 'node:path';
12
13
  import fs from 'node:fs';
@@ -17,7 +18,6 @@ import 'node:fs/promises';
17
18
  import 'tweetnacl';
18
19
  import 'node:events';
19
20
  import 'socket.io-client';
20
- import 'child_process';
21
21
  import 'util';
22
22
  import 'fs/promises';
23
23
  import 'crypto';
@@ -41,6 +41,27 @@ import '@modelcontextprotocol/sdk/server/streamableHttp.js';
41
41
  import 'http';
42
42
 
43
43
  const DEFAULT_TIMEOUT = 14 * 24 * 60 * 60 * 1e3;
44
+ function getCodexMcpCommand() {
45
+ try {
46
+ const version = execSync("codex --version", { encoding: "utf8" }).trim();
47
+ const match = version.match(/codex-cli\s+(\d+\.\d+\.\d+(?:-alpha\.\d+)?)/);
48
+ if (!match) return "mcp-server";
49
+ const versionStr = match[1];
50
+ const [major, minor, patch] = versionStr.split(/[-.]/).map(Number);
51
+ if (major > 0 || minor > 43) return "mcp-server";
52
+ if (minor === 43 && patch === 0) {
53
+ if (versionStr.includes("-alpha.")) {
54
+ const alphaNum = parseInt(versionStr.split("-alpha.")[1]);
55
+ return alphaNum >= 5 ? "mcp-server" : "mcp";
56
+ }
57
+ return "mcp-server";
58
+ }
59
+ return "mcp";
60
+ } catch (error) {
61
+ logger.debug("[CodexMCP] Error detecting codex version, defaulting to mcp-server:", error);
62
+ return "mcp-server";
63
+ }
64
+ }
44
65
  class CodexMcpClient {
45
66
  client;
46
67
  transport = null;
@@ -76,10 +97,16 @@ class CodexMcpClient {
76
97
  }
77
98
  async connect() {
78
99
  if (this.connected) return;
79
- logger.debug("[CodexMCP] Connecting to Codex MCP server...");
100
+ const mcpCommand = getCodexMcpCommand();
101
+ logger.debug(`[CodexMCP] Connecting to Codex MCP server using command: codex ${mcpCommand}`);
80
102
  this.transport = new StdioClientTransport({
81
103
  command: "codex",
82
- args: ["mcp"]
104
+ args: [mcpCommand],
105
+ env: Object.keys(process.env).reduce((acc, key) => {
106
+ const value = process.env[key];
107
+ if (typeof value === "string") acc[key] = value;
108
+ return acc;
109
+ }, {})
83
110
  });
84
111
  this.registerPermissionHandlers();
85
112
  await this.client.connect(this.transport);
@@ -2,13 +2,14 @@
2
2
 
3
3
  var ink = require('ink');
4
4
  var React = require('react');
5
- var types = require('./types-D-P1Kg34.cjs');
5
+ var types = require('./types-D6ZewYb6.cjs');
6
6
  var index_js = require('@modelcontextprotocol/sdk/client/index.js');
7
7
  var stdio_js = require('@modelcontextprotocol/sdk/client/stdio.js');
8
8
  var z = require('zod');
9
9
  var types_js = require('@modelcontextprotocol/sdk/types.js');
10
+ var child_process = require('child_process');
10
11
  var node_crypto = require('node:crypto');
11
- var index = require('./index-BN1H_2wt.cjs');
12
+ var index = require('./index-CFWfkM2k.cjs');
12
13
  var os = require('node:os');
13
14
  var node_path = require('node:path');
14
15
  var fs = require('node:fs');
@@ -19,7 +20,6 @@ require('node:fs/promises');
19
20
  require('tweetnacl');
20
21
  require('node:events');
21
22
  require('socket.io-client');
22
- require('child_process');
23
23
  require('util');
24
24
  require('fs/promises');
25
25
  require('crypto');
@@ -43,6 +43,27 @@ require('@modelcontextprotocol/sdk/server/streamableHttp.js');
43
43
  require('http');
44
44
 
45
45
  const DEFAULT_TIMEOUT = 14 * 24 * 60 * 60 * 1e3;
46
+ function getCodexMcpCommand() {
47
+ try {
48
+ const version = child_process.execSync("codex --version", { encoding: "utf8" }).trim();
49
+ const match = version.match(/codex-cli\s+(\d+\.\d+\.\d+(?:-alpha\.\d+)?)/);
50
+ if (!match) return "mcp-server";
51
+ const versionStr = match[1];
52
+ const [major, minor, patch] = versionStr.split(/[-.]/).map(Number);
53
+ if (major > 0 || minor > 43) return "mcp-server";
54
+ if (minor === 43 && patch === 0) {
55
+ if (versionStr.includes("-alpha.")) {
56
+ const alphaNum = parseInt(versionStr.split("-alpha.")[1]);
57
+ return alphaNum >= 5 ? "mcp-server" : "mcp";
58
+ }
59
+ return "mcp-server";
60
+ }
61
+ return "mcp";
62
+ } catch (error) {
63
+ types.logger.debug("[CodexMCP] Error detecting codex version, defaulting to mcp-server:", error);
64
+ return "mcp-server";
65
+ }
66
+ }
46
67
  class CodexMcpClient {
47
68
  client;
48
69
  transport = null;
@@ -78,10 +99,16 @@ class CodexMcpClient {
78
99
  }
79
100
  async connect() {
80
101
  if (this.connected) return;
81
- types.logger.debug("[CodexMCP] Connecting to Codex MCP server...");
102
+ const mcpCommand = getCodexMcpCommand();
103
+ types.logger.debug(`[CodexMCP] Connecting to Codex MCP server using command: codex ${mcpCommand}`);
82
104
  this.transport = new stdio_js.StdioClientTransport({
83
105
  command: "codex",
84
- args: ["mcp"]
106
+ args: [mcpCommand],
107
+ env: Object.keys(process.env).reduce((acc, key) => {
108
+ const value = process.env[key];
109
+ if (typeof value === "string") acc[key] = value;
110
+ return acc;
111
+ }, {})
85
112
  });
86
113
  this.registerPermissionHandlers();
87
114
  await this.client.connect(this.transport);
@@ -21,7 +21,7 @@ import { platform } from 'os';
21
21
  import { Expo } from 'expo-server-sdk';
22
22
 
23
23
  var name = "happy-coder";
24
- var version = "0.11.1-0";
24
+ var version = "0.11.2-0";
25
25
  var description = "Mobile and Web client for Claude Code and Codex";
26
26
  var author = "Kirill Dubovitskiy";
27
27
  var license = "MIT";
@@ -89,7 +89,7 @@ var scripts = {
89
89
  postinstall: "node scripts/unpack-tools.cjs"
90
90
  };
91
91
  var dependencies = {
92
- "@anthropic-ai/claude-code": "2.0.1",
92
+ "@anthropic-ai/claude-code": "^2.0.13",
93
93
  "@anthropic-ai/sdk": "0.65.0",
94
94
  "@modelcontextprotocol/sdk": "^1.15.1",
95
95
  "@stablelib/base64": "^2.0.1",
@@ -180,6 +180,7 @@ class Configuration {
180
180
  daemonLockFile;
181
181
  currentCliVersion;
182
182
  isExperimentalEnabled;
183
+ disableCaffeinate;
183
184
  constructor() {
184
185
  this.serverUrl = process.env.HAPPY_SERVER_URL || "https://api.cluster-fluster.com";
185
186
  this.webappUrl = process.env.HAPPY_WEBAPP_URL || "https://app.happy.engineering";
@@ -197,6 +198,7 @@ class Configuration {
197
198
  this.daemonStateFile = join(this.happyHomeDir, "daemon.state.json");
198
199
  this.daemonLockFile = join(this.happyHomeDir, "daemon.state.json.lock");
199
200
  this.isExperimentalEnabled = ["true", "1", "yes"].includes(process.env.HAPPY_EXPERIMENTAL?.toLowerCase() || "");
201
+ this.disableCaffeinate = ["true", "1", "yes"].includes(process.env.HAPPY_DISABLE_CAFFEINATE?.toLowerCase() || "");
200
202
  this.currentCliVersion = packageJson.version;
201
203
  if (!existsSync(this.happyHomeDir)) {
202
204
  mkdirSync(this.happyHomeDir, { recursive: true });
@@ -42,7 +42,7 @@ function _interopNamespaceDefault(e) {
42
42
  var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
43
43
 
44
44
  var name = "happy-coder";
45
- var version = "0.11.1-0";
45
+ var version = "0.11.2-0";
46
46
  var description = "Mobile and Web client for Claude Code and Codex";
47
47
  var author = "Kirill Dubovitskiy";
48
48
  var license = "MIT";
@@ -110,7 +110,7 @@ var scripts = {
110
110
  postinstall: "node scripts/unpack-tools.cjs"
111
111
  };
112
112
  var dependencies = {
113
- "@anthropic-ai/claude-code": "2.0.1",
113
+ "@anthropic-ai/claude-code": "^2.0.13",
114
114
  "@anthropic-ai/sdk": "0.65.0",
115
115
  "@modelcontextprotocol/sdk": "^1.15.1",
116
116
  "@stablelib/base64": "^2.0.1",
@@ -201,6 +201,7 @@ class Configuration {
201
201
  daemonLockFile;
202
202
  currentCliVersion;
203
203
  isExperimentalEnabled;
204
+ disableCaffeinate;
204
205
  constructor() {
205
206
  this.serverUrl = process.env.HAPPY_SERVER_URL || "https://api.cluster-fluster.com";
206
207
  this.webappUrl = process.env.HAPPY_WEBAPP_URL || "https://app.happy.engineering";
@@ -218,6 +219,7 @@ class Configuration {
218
219
  this.daemonStateFile = node_path.join(this.happyHomeDir, "daemon.state.json");
219
220
  this.daemonLockFile = node_path.join(this.happyHomeDir, "daemon.state.json.lock");
220
221
  this.isExperimentalEnabled = ["true", "1", "yes"].includes(process.env.HAPPY_EXPERIMENTAL?.toLowerCase() || "");
222
+ this.disableCaffeinate = ["true", "1", "yes"].includes(process.env.HAPPY_DISABLE_CAFFEINATE?.toLowerCase() || "");
221
223
  this.currentCliVersion = packageJson.version;
222
224
  if (!fs.existsSync(this.happyHomeDir)) {
223
225
  fs.mkdirSync(this.happyHomeDir, { recursive: true });
@@ -1017,7 +1019,7 @@ class RpcHandlerManager {
1017
1019
  }
1018
1020
  }
1019
1021
 
1020
- const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-D-P1Kg34.cjs', document.baseURI).href))));
1022
+ const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-D6ZewYb6.cjs', document.baseURI).href))));
1021
1023
  function projectPath() {
1022
1024
  const path$1 = path.resolve(__dirname$1, "..");
1023
1025
  return path$1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "happy-coder",
3
- "version": "0.11.1-0",
3
+ "version": "0.11.2-0",
4
4
  "description": "Mobile and Web client for Claude Code and Codex",
5
5
  "author": "Kirill Dubovitskiy",
6
6
  "license": "MIT",
@@ -68,7 +68,7 @@
68
68
  "postinstall": "node scripts/unpack-tools.cjs"
69
69
  },
70
70
  "dependencies": {
71
- "@anthropic-ai/claude-code": "2.0.1",
71
+ "@anthropic-ai/claude-code": "^2.0.13",
72
72
  "@anthropic-ai/sdk": "0.65.0",
73
73
  "@modelcontextprotocol/sdk": "^1.15.1",
74
74
  "@stablelib/base64": "^2.0.1",