@zonease/happy 0.6.41 → 0.6.43

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 (87) hide show
  1. package/dist/{api-XeHlmApX.cjs → api-B-PlVQY6.cjs} +50 -4
  2. package/dist/{api-K2-jr9ar.mjs → api-BUCtd3cB.mjs} +51 -5
  3. package/dist/{auth-BQvEuSs5.cjs → auth-BqGkUXvq.cjs} +2 -2
  4. package/dist/{auth-CjLkoM3m.mjs → auth-DQH6q_q-.mjs} +4 -4
  5. package/dist/{auth-BbvPcnkY.cjs → auth-OL3nNcDX.cjs} +4 -4
  6. package/dist/{auth-DS8fzlin.mjs → auth-qM2eojWx.mjs} +2 -2
  7. package/dist/{browser-C05SP_Tt.cjs → browser-CY7VNU0C.cjs} +1 -1
  8. package/dist/{browser-C05Ak6RL.mjs → browser-D5RN_Axa.mjs} +1 -1
  9. package/dist/{claudeLocal-DJNRlHIC.mjs → claudeLocal-BXK_vQXS.mjs} +1 -1
  10. package/dist/{claudeLocal-CpDhLCcZ.cjs → claudeLocal-HAXk0deK.cjs} +1 -1
  11. package/dist/{config-DWWtjKQx.mjs → config-2wMjzcHl.mjs} +1 -1
  12. package/dist/{config-B0mns9fF.cjs → config-CaKxWGVe.cjs} +1 -1
  13. package/dist/{connect-DXQC1CJe.mjs → connect-BAunPyp_.mjs} +5 -5
  14. package/dist/{connect-BxCScVNX.cjs → connect-Dt1vY1BC.cjs} +5 -5
  15. package/dist/{controlClient-DgjVRN8D.mjs → controlClient-BzzTNSfl.mjs} +1 -1
  16. package/dist/{controlClient-DgELDZgM.cjs → controlClient-yTkpwcOq.cjs} +1 -1
  17. package/dist/cursorApprovalHook-B2chnVni.cjs +115 -0
  18. package/dist/cursorApprovalHook-BDLPzI5l.mjs +113 -0
  19. package/dist/cursorApprovalServer-Ba1yOUCA.mjs +263 -0
  20. package/dist/cursorApprovalServer-xwxVGL3u.cjs +268 -0
  21. package/dist/{deviceKeys-CejCdWpw.mjs → deviceKeys-CQyFFPtt.mjs} +2 -2
  22. package/dist/{deviceKeys-BpIAWz13.cjs → deviceKeys-CdW-HPnz.cjs} +2 -2
  23. package/dist/{doctor-DznasgP3.cjs → doctor-D4xWXiE7.cjs} +2 -2
  24. package/dist/{doctor-B-LCMVN9.mjs → doctor-DDT2TXHH.mjs} +2 -2
  25. package/dist/downloadImage-3A6zY5AX.cjs +492 -0
  26. package/dist/downloadImage-BqNp0l7y.mjs +485 -0
  27. package/dist/{enroll-HjUqyGnD.mjs → enroll-BlZ0giJI.mjs} +3 -3
  28. package/dist/{enroll-BvfpRUGJ.cjs → enroll-DeYs89Ic.cjs} +3 -3
  29. package/dist/{evidence-CVgTjBrq.cjs → evidence-Bn1JXtdz.cjs} +1 -1
  30. package/dist/{evidence-BEQd1dCh.mjs → evidence-PUnN9yPK.mjs} +1 -1
  31. package/dist/{formatImageMessage-DVs57t3x.mjs → formatImageMessage-BRHeLf0-.mjs} +1 -1
  32. package/dist/{formatImageMessage-CmJTP_hU.cjs → formatImageMessage-bVFGFDJl.cjs} +1 -1
  33. package/dist/{index-CDTNgfUf.cjs → index-BeKrqPYR.cjs} +25 -1
  34. package/dist/{index-CPKdvi7J.mjs → index-DTV7drqs.mjs} +25 -1
  35. package/dist/index.cjs +95 -41
  36. package/dist/index.mjs +95 -41
  37. package/dist/{install-UTz_vYvB.mjs → install-BLPNuSeM.mjs} +2 -2
  38. package/dist/{install-B3mMGISS.mjs → install-BOIcR_Wr.mjs} +1 -1
  39. package/dist/{install-Ck22tYHP.cjs → install-Jrs6YUu8.cjs} +1 -1
  40. package/dist/{install-2Yl_L582.cjs → install-Q-YMwwwg.cjs} +2 -2
  41. package/dist/lib.cjs +4 -4
  42. package/dist/lib.d.cts +4 -2
  43. package/dist/lib.d.mts +4 -2
  44. package/dist/lib.mjs +4 -4
  45. package/dist/{loadableToolOutput-BZYlaqHn.cjs → loadableToolOutput-B3qpMqXT.cjs} +2 -458
  46. package/dist/{loadableToolOutput-4EvraaNY.mjs → loadableToolOutput-DzReWITb.mjs} +3 -456
  47. package/dist/{persistence-DrfN7TzY.cjs → persistence-D7zNFI-d.cjs} +7 -4
  48. package/dist/{persistence-CIUFyOwz.mjs → persistence-DbLMvLvk.mjs} +7 -4
  49. package/dist/{push-CCOXCcM_.cjs → push-RT6Y0Hr3.cjs} +6 -6
  50. package/dist/{push-USXj_pv0.mjs → push-z5wQ4Ki_.mjs} +6 -6
  51. package/dist/{downloadImage-ia5SzlCV.mjs → registerKillSessionHandler-DmfnJ0zq.mjs} +7 -487
  52. package/dist/{downloadImage-B_ygLAXY.cjs → registerKillSessionHandler-MoLdSQxM.cjs} +6 -492
  53. package/dist/{run-Dy6KX6m-.mjs → run-BFnSUK1o.mjs} +14 -9
  54. package/dist/{run-D3CopmEb.cjs → run-C5StYRIB.cjs} +14 -9
  55. package/dist/{runClaude-aHzvx6Ha.cjs → runClaude-ChRp6f5G.cjs} +27 -26
  56. package/dist/{runClaude-CWux2RDq.mjs → runClaude-CjENBdrX.mjs} +22 -21
  57. package/dist/{runCodex-D0ZxSj3O.mjs → runCodex-BzQWlRoj.mjs} +27 -25
  58. package/dist/{runCodex-G-Aq531U.cjs → runCodex-DcQGyotH.cjs} +32 -30
  59. package/dist/runCursor-B73z6MCN.mjs +752 -0
  60. package/dist/runCursor-BlPAxaTy.cjs +754 -0
  61. package/dist/{runGemini-DZC2i6vA.mjs → runGemini-BPv4UzuF.mjs} +18 -16
  62. package/dist/{runGemini-DxGgDAIM.cjs → runGemini-JFqaIC3u.cjs} +23 -21
  63. package/dist/{runOneShot-BgT-JNMA.cjs → runOneShot-2iV11e9L.cjs} +3 -3
  64. package/dist/{runOneShot-cxlk7VKA.mjs → runOneShot-DTukim2A.mjs} +3 -3
  65. package/dist/{serve-Dr3wPrtK.cjs → serve-BDwuAIK4.cjs} +7 -7
  66. package/dist/{serve-CKyvJNs0.mjs → serve-BnlYj5ek.mjs} +7 -7
  67. package/dist/{session-dYzbOo_W.cjs → session-Cp9LEESM.cjs} +5 -5
  68. package/dist/{session-vf2ZjFto.mjs → session-gfeFU8CA.mjs} +5 -5
  69. package/dist/{sessionKeyCache-dDquDzn0.cjs → sessionKeyCache-3Pme04yL.cjs} +1 -1
  70. package/dist/{sessionKeyCache-D2u3JUys.mjs → sessionKeyCache-DtBS_Sb3.mjs} +1 -1
  71. package/dist/{sessionList-C1k2PNg_.mjs → sessionList-B1w4BUdv.mjs} +2 -2
  72. package/dist/{sessionList-DmmtC7uR.cjs → sessionList-BR_5UDZJ.cjs} +2 -2
  73. package/dist/{sessionSummary-DGLoVOxd.cjs → sessionSummary-DLweYgHO.cjs} +3 -3
  74. package/dist/{sessionSummary-5a1QtFVS.mjs → sessionSummary-E-a2bg8W.mjs} +3 -3
  75. package/dist/setupOfflineReconnection-DHwthFtd.mjs +459 -0
  76. package/dist/setupOfflineReconnection-Dkp00dC9.cjs +463 -0
  77. package/dist/{spawnHappyCLI-CarRI4GM.cjs → spawnHappyCLI-C2uY9WV-.cjs} +1 -1
  78. package/dist/{spawnHappyCLI-D3EkTFIn.mjs → spawnHappyCLI-Dt7fbmbk.mjs} +1 -1
  79. package/dist/{ssh-B0hvEYIl.mjs → ssh-C-nEZiGP.mjs} +5 -5
  80. package/dist/{ssh-CBgVwKsB.cjs → ssh-CsnS89Lr.cjs} +5 -5
  81. package/dist/{task-CRo6W-3_.mjs → task-B-8_QGGX.mjs} +6 -6
  82. package/dist/{task-CMunPKCV.cjs → task-lrLb4FCL.cjs} +6 -6
  83. package/dist/{uninstall-BALE2up0.mjs → uninstall-CirMt_WC.mjs} +2 -2
  84. package/dist/{uninstall-BJ3eEGM4.cjs → uninstall-DMjUlEXT.cjs} +2 -2
  85. package/dist/{update-BfjtLrhO.mjs → update-CfXbYshs.mjs} +3 -3
  86. package/dist/{update-Bb3iijy8.cjs → update-mx2p28IP.cjs} +3 -3
  87. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
- var logger = require('./persistence-DrfN7TzY.cjs');
4
+ var logger = require('./persistence-D7zNFI-d.cjs');
5
5
  var z = require('zod');
6
6
  var node_child_process = require('node:child_process');
7
7
  require('node:fs/promises');
@@ -13,8 +13,8 @@ require('tweetnacl');
13
13
  require('fs');
14
14
 
15
15
  async function spawnAndWaitForDaemon() {
16
- const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-CarRI4GM.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
17
- const { checkIfDaemonRunningAndCleanupStaleState } = await Promise.resolve().then(function () { return require('./controlClient-DgELDZgM.cjs'); });
16
+ const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-C2uY9WV-.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
17
+ const { checkIfDaemonRunningAndCleanupStaleState } = await Promise.resolve().then(function () { return require('./controlClient-yTkpwcOq.cjs'); });
18
18
  const child = spawnHappyCLI(["daemon", "start-sync"], {
19
19
  detached: true,
20
20
  stdio: "ignore"
@@ -37,7 +37,7 @@ async function spawnAndWaitForDaemon() {
37
37
  if (!args.includes("--version")) ;
38
38
  if (subcommand === "orchestrator-oneshot") {
39
39
  try {
40
- const { runOrchestratorOneShot } = await Promise.resolve().then(function () { return require('./runOneShot-BgT-JNMA.cjs'); });
40
+ const { runOrchestratorOneShot } = await Promise.resolve().then(function () { return require('./runOneShot-2iV11e9L.cjs'); });
41
41
  const exitCode = await runOrchestratorOneShot(args.slice(1));
42
42
  process.exit(exitCode);
43
43
  } catch (error) {
@@ -50,7 +50,7 @@ async function spawnAndWaitForDaemon() {
50
50
  return;
51
51
  } else if (subcommand === "doctor") {
52
52
  const { killRunawayHappyProcesses } = await Promise.resolve().then(function () { return require('./doctor-C08m5Z9f.cjs'); });
53
- const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-DznasgP3.cjs'); });
53
+ const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-D4xWXiE7.cjs'); });
54
54
  if (args[1] === "clean") {
55
55
  const result = await killRunawayHappyProcesses();
56
56
  console.log(`Cleaned up ${result.killed} runaway processes`);
@@ -63,7 +63,7 @@ async function spawnAndWaitForDaemon() {
63
63
  return;
64
64
  } else if (subcommand === "auth") {
65
65
  try {
66
- const { handleAuthCommand } = await Promise.resolve().then(function () { return require('./auth-BbvPcnkY.cjs'); });
66
+ const { handleAuthCommand } = await Promise.resolve().then(function () { return require('./auth-OL3nNcDX.cjs'); });
67
67
  await handleAuthCommand(args.slice(1));
68
68
  } catch (error) {
69
69
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -75,7 +75,7 @@ async function spawnAndWaitForDaemon() {
75
75
  return;
76
76
  } else if (subcommand === "connect") {
77
77
  try {
78
- const { handleConnectCommand } = await Promise.resolve().then(function () { return require('./connect-BxCScVNX.cjs'); });
78
+ const { handleConnectCommand } = await Promise.resolve().then(function () { return require('./connect-Dt1vY1BC.cjs'); });
79
79
  await handleConnectCommand(args.slice(1));
80
80
  } catch (error) {
81
81
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -86,11 +86,11 @@ async function spawnAndWaitForDaemon() {
86
86
  }
87
87
  return;
88
88
  } else if (subcommand === "codex") {
89
- const { authAndSetupMachineIfNeeded } = await Promise.resolve().then(function () { return require('./auth-BQvEuSs5.cjs'); });
90
- const { isDaemonRunningCurrentlyInstalledHappyVersion } = await Promise.resolve().then(function () { return require('./controlClient-DgELDZgM.cjs'); });
91
- const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-CarRI4GM.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
89
+ const { authAndSetupMachineIfNeeded } = await Promise.resolve().then(function () { return require('./auth-BqGkUXvq.cjs'); });
90
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await Promise.resolve().then(function () { return require('./controlClient-yTkpwcOq.cjs'); });
91
+ const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-C2uY9WV-.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
92
92
  try {
93
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-G-Aq531U.cjs'); });
93
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-DcQGyotH.cjs'); });
94
94
  let startedBy = void 0;
95
95
  for (let i = 1; i < args.length; i++) {
96
96
  if (args[i] === "--started-by") {
@@ -120,10 +120,64 @@ async function spawnAndWaitForDaemon() {
120
120
  process.exit(1);
121
121
  }
122
122
  return;
123
+ } else if (subcommand === "cursor-approval-hook") {
124
+ const { runCursorApprovalHook } = await Promise.resolve().then(function () { return require('./cursorApprovalHook-B2chnVni.cjs'); });
125
+ await runCursorApprovalHook();
126
+ return;
127
+ } else if (subcommand === "cursor") {
128
+ const { authAndSetupMachineIfNeeded } = await Promise.resolve().then(function () { return require('./auth-BqGkUXvq.cjs'); });
129
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await Promise.resolve().then(function () { return require('./controlClient-yTkpwcOq.cjs'); });
130
+ const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-C2uY9WV-.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
131
+ try {
132
+ const { runCursor } = await Promise.resolve().then(function () { return require('./runCursor-BlPAxaTy.cjs'); });
133
+ let startedBy = void 0;
134
+ let model = null;
135
+ let resumeChatId = null;
136
+ const promptParts = [];
137
+ for (let i = 1; i < args.length; i++) {
138
+ if (args[i] === "--started-by") {
139
+ startedBy = args[++i];
140
+ } else if (args[i] === "--resume") {
141
+ resumeChatId = args[++i] ?? null;
142
+ } else if (args[i] === "--model") {
143
+ model = args[++i] ?? null;
144
+ } else if (args[i] === "--happy-starting-mode") {
145
+ i++;
146
+ } else {
147
+ promptParts.push(args[i]);
148
+ }
149
+ }
150
+ const { credentials } = await authAndSetupMachineIfNeeded();
151
+ logger.logger.debug("Ensuring Happy background service is running & matches our version...");
152
+ if (!await isDaemonRunningCurrentlyInstalledHappyVersion()) {
153
+ logger.logger.debug("Starting Happy background service...");
154
+ const daemonProcess = spawnHappyCLI(["daemon", "start-sync"], {
155
+ detached: true,
156
+ stdio: "ignore",
157
+ env: process.env
158
+ });
159
+ daemonProcess.unref();
160
+ await new Promise((resolve) => setTimeout(resolve, 200));
161
+ }
162
+ await runCursor({
163
+ credentials,
164
+ startedBy,
165
+ model,
166
+ resumeChatId,
167
+ initialPrompt: promptParts.length > 0 ? promptParts.join(" ") : void 0
168
+ });
169
+ } catch (error) {
170
+ console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
171
+ if (logger.isDebug()) {
172
+ console.error(error);
173
+ }
174
+ process.exit(1);
175
+ }
176
+ return;
123
177
  } else if (subcommand === "gemini") {
124
- const { authAndSetupMachineIfNeeded } = await Promise.resolve().then(function () { return require('./auth-BQvEuSs5.cjs'); });
125
- const { isDaemonRunningCurrentlyInstalledHappyVersion } = await Promise.resolve().then(function () { return require('./controlClient-DgELDZgM.cjs'); });
126
- const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-CarRI4GM.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
178
+ const { authAndSetupMachineIfNeeded } = await Promise.resolve().then(function () { return require('./auth-BqGkUXvq.cjs'); });
179
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await Promise.resolve().then(function () { return require('./controlClient-yTkpwcOq.cjs'); });
180
+ const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-C2uY9WV-.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
127
181
  const geminiSubcommand = args[1];
128
182
  if (geminiSubcommand === "model" && args[2] === "set" && args[3]) {
129
183
  const modelName = args[3];
@@ -197,9 +251,9 @@ async function spawnAndWaitForDaemon() {
197
251
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
198
252
  const projectId = args[3];
199
253
  try {
200
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-B0mns9fF.cjs'); });
201
- const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-DrfN7TzY.cjs'); }).then(function (n) { return n.persistence; });
202
- const { ApiClient } = await Promise.resolve().then(function () { return require('./api-XeHlmApX.cjs'); }).then(function (n) { return n.api; });
254
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-CaKxWGVe.cjs'); });
255
+ const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-D7zNFI-d.cjs'); }).then(function (n) { return n.persistence; });
256
+ const { ApiClient } = await Promise.resolve().then(function () { return require('./api-B-PlVQY6.cjs'); }).then(function (n) { return n.api; });
203
257
  let userEmail = void 0;
204
258
  try {
205
259
  const credentials = await readCredentials2();
@@ -230,7 +284,7 @@ async function spawnAndWaitForDaemon() {
230
284
  }
231
285
  if (geminiSubcommand === "project" && args[2] === "get") {
232
286
  try {
233
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-B0mns9fF.cjs'); });
287
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-CaKxWGVe.cjs'); });
234
288
  const config = readGeminiLocalConfig();
235
289
  if (config.googleCloudProject) {
236
290
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -270,7 +324,7 @@ async function spawnAndWaitForDaemon() {
270
324
  process.exit(0);
271
325
  }
272
326
  try {
273
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DxGgDAIM.cjs'); });
327
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-JFqaIC3u.cjs'); });
274
328
  let startedBy = void 0;
275
329
  for (let i = 1; i < args.length; i++) {
276
330
  if (args[i] === "--started-by") {
@@ -302,7 +356,7 @@ async function spawnAndWaitForDaemon() {
302
356
  return;
303
357
  } else if (subcommand === "update") {
304
358
  try {
305
- const { handleUpdateCommand } = await Promise.resolve().then(function () { return require('./update-Bb3iijy8.cjs'); });
359
+ const { handleUpdateCommand } = await Promise.resolve().then(function () { return require('./update-mx2p28IP.cjs'); });
306
360
  await handleUpdateCommand();
307
361
  } catch (error) {
308
362
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -315,7 +369,7 @@ async function spawnAndWaitForDaemon() {
315
369
  } else if (subcommand === "logout") {
316
370
  console.log(chalk.yellow('Note: "happy logout" is deprecated. Use "happy auth logout" instead.\n'));
317
371
  try {
318
- const { handleAuthCommand } = await Promise.resolve().then(function () { return require('./auth-BbvPcnkY.cjs'); });
372
+ const { handleAuthCommand } = await Promise.resolve().then(function () { return require('./auth-OL3nNcDX.cjs'); });
319
373
  await handleAuthCommand(["logout"]);
320
374
  } catch (error) {
321
375
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -338,7 +392,7 @@ async function spawnAndWaitForDaemon() {
338
392
  return;
339
393
  } else if (subcommand === "session") {
340
394
  try {
341
- const { handleSessionCommand } = await Promise.resolve().then(function () { return require('./session-dYzbOo_W.cjs'); });
395
+ const { handleSessionCommand } = await Promise.resolve().then(function () { return require('./session-Cp9LEESM.cjs'); });
342
396
  await handleSessionCommand(args.slice(1));
343
397
  } catch (error) {
344
398
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -350,7 +404,7 @@ async function spawnAndWaitForDaemon() {
350
404
  return;
351
405
  } else if (subcommand === "task") {
352
406
  try {
353
- const { handleTaskCommand } = await Promise.resolve().then(function () { return require('./task-CMunPKCV.cjs'); });
407
+ const { handleTaskCommand } = await Promise.resolve().then(function () { return require('./task-lrLb4FCL.cjs'); });
354
408
  await handleTaskCommand(args.slice(1));
355
409
  } catch (error) {
356
410
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -398,7 +452,7 @@ async function spawnAndWaitForDaemon() {
398
452
  return;
399
453
  } else if (subcommand === "evidence") {
400
454
  try {
401
- const { handleEvidenceCommand } = await Promise.resolve().then(function () { return require('./evidence-CVgTjBrq.cjs'); });
455
+ const { handleEvidenceCommand } = await Promise.resolve().then(function () { return require('./evidence-Bn1JXtdz.cjs'); });
402
456
  await handleEvidenceCommand(args.slice(1));
403
457
  } catch (error) {
404
458
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -415,7 +469,7 @@ async function spawnAndWaitForDaemon() {
415
469
  process.exit(1);
416
470
  }
417
471
  try {
418
- const { runMcpServe } = await Promise.resolve().then(function () { return require('./serve-Dr3wPrtK.cjs'); });
472
+ const { runMcpServe } = await Promise.resolve().then(function () { return require('./serve-BDwuAIK4.cjs'); });
419
473
  await runMcpServe();
420
474
  } catch (error) {
421
475
  process.stderr.write(`[happy-mcp] fatal: ${error instanceof Error ? error.message : "unknown error"}
@@ -429,7 +483,7 @@ async function spawnAndWaitForDaemon() {
429
483
  console.error(chalk.red("Error:"), 'Not authenticated. Run "happy auth" first.');
430
484
  process.exit(1);
431
485
  }
432
- const { parseSshArgs, runOnDevice, sshDevice, sshPickAndConnect } = await Promise.resolve().then(function () { return require('./ssh-CBgVwKsB.cjs'); });
486
+ const { parseSshArgs, runOnDevice, sshDevice, sshPickAndConnect } = await Promise.resolve().then(function () { return require('./ssh-CsnS89Lr.cjs'); });
433
487
  const { target, command, timeoutMs, stream } = parseSshArgs(args.slice(1));
434
488
  try {
435
489
  if (command) {
@@ -450,7 +504,7 @@ async function spawnAndWaitForDaemon() {
450
504
  } else if (subcommand === "device") {
451
505
  const deviceSubcommand = args[1];
452
506
  if (deviceSubcommand === "push") {
453
- const { pushToDevice } = await Promise.resolve().then(function () { return require('./push-CCOXCcM_.cjs'); });
507
+ const { pushToDevice } = await Promise.resolve().then(function () { return require('./push-RT6Y0Hr3.cjs'); });
454
508
  const credentials = await logger.readCredentials();
455
509
  if (!credentials) {
456
510
  console.error(chalk.red("Error:"), 'Not authenticated. Run "happy auth" first.');
@@ -464,8 +518,8 @@ async function spawnAndWaitForDaemon() {
464
518
  process.exit(await pushToDevice(credentials, target, localPath, remotePath));
465
519
  }
466
520
  if (deviceSubcommand === "enroll") {
467
- const { enrollDevice } = await Promise.resolve().then(function () { return require('./enroll-BvfpRUGJ.cjs'); });
468
- const { install } = await Promise.resolve().then(function () { return require('./install-2Yl_L582.cjs'); });
521
+ const { enrollDevice } = await Promise.resolve().then(function () { return require('./enroll-DeYs89Ic.cjs'); });
522
+ const { install } = await Promise.resolve().then(function () { return require('./install-Q-YMwwwg.cjs'); });
469
523
  const token = args[2];
470
524
  if (!token) {
471
525
  console.error(chalk.red("Error:"), "Missing enrollment token. Usage: happy device enroll <token>");
@@ -495,12 +549,12 @@ ${chalk.bold("Usage:")}
495
549
  `);
496
550
  process.exit(0);
497
551
  } else if (subcommand === "daemon") {
498
- const { startDaemon } = await Promise.resolve().then(function () { return require('./run-D3CopmEb.cjs'); }).then(function (n) { return n.run; });
499
- const { install } = await Promise.resolve().then(function () { return require('./install-2Yl_L582.cjs'); });
500
- const { uninstall } = await Promise.resolve().then(function () { return require('./uninstall-BJ3eEGM4.cjs'); });
501
- const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-DznasgP3.cjs'); });
502
- const { getLatestDaemonLog } = await Promise.resolve().then(function () { return require('./persistence-DrfN7TzY.cjs'); }).then(function (n) { return n.logger$1; });
503
- const { listDaemonSessions, stopDaemonSession, stopDaemon } = await Promise.resolve().then(function () { return require('./controlClient-DgELDZgM.cjs'); });
552
+ const { startDaemon } = await Promise.resolve().then(function () { return require('./run-C5StYRIB.cjs'); }).then(function (n) { return n.run; });
553
+ const { install } = await Promise.resolve().then(function () { return require('./install-Q-YMwwwg.cjs'); });
554
+ const { uninstall } = await Promise.resolve().then(function () { return require('./uninstall-DMjUlEXT.cjs'); });
555
+ const { runDoctorCommand } = await Promise.resolve().then(function () { return require('./doctor-D4xWXiE7.cjs'); });
556
+ const { getLatestDaemonLog } = await Promise.resolve().then(function () { return require('./persistence-D7zNFI-d.cjs'); }).then(function (n) { return n.logger$1; });
557
+ const { listDaemonSessions, stopDaemonSession, stopDaemon } = await Promise.resolve().then(function () { return require('./controlClient-yTkpwcOq.cjs'); });
504
558
  const daemonSubcommand = args[1];
505
559
  if (daemonSubcommand === "list") {
506
560
  try {
@@ -705,7 +759,7 @@ ${chalk.gray("\u2500".repeat(60))}
705
759
  ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
706
760
  `);
707
761
  try {
708
- const { claudeCliPath } = await Promise.resolve().then(function () { return require('./claudeLocal-CpDhLCcZ.cjs'); }).then(function (n) { return n.claudeLocal$1; });
762
+ const { claudeCliPath } = await Promise.resolve().then(function () { return require('./claudeLocal-HAXk0deK.cjs'); }).then(function (n) { return n.claudeLocal$1; });
709
763
  const claudeHelp = node_child_process.execFileSync(claudeCliPath, ["--help"], { encoding: "utf8" });
710
764
  console.log(claudeHelp);
711
765
  } catch (e) {
@@ -735,10 +789,10 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
735
789
  }
736
790
  process.exit(0);
737
791
  }
738
- const { authAndSetupMachineIfNeeded } = await Promise.resolve().then(function () { return require('./auth-BQvEuSs5.cjs'); });
739
- const { isDaemonRunningCurrentlyInstalledHappyVersion } = await Promise.resolve().then(function () { return require('./controlClient-DgELDZgM.cjs'); });
740
- const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-CarRI4GM.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
741
- const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-aHzvx6Ha.cjs'); });
792
+ const { authAndSetupMachineIfNeeded } = await Promise.resolve().then(function () { return require('./auth-BqGkUXvq.cjs'); });
793
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await Promise.resolve().then(function () { return require('./controlClient-yTkpwcOq.cjs'); });
794
+ const { spawnHappyCLI } = await Promise.resolve().then(function () { return require('./spawnHappyCLI-C2uY9WV-.cjs'); }).then(function (n) { return n.spawnHappyCLI$1; });
795
+ const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-ChRp6f5G.cjs'); });
742
796
  const {
743
797
  credentials
744
798
  } = await authAndSetupMachineIfNeeded();
@@ -812,7 +866,7 @@ ${chalk.bold("Examples:")}
812
866
  }
813
867
  console.log(chalk.blue("\u{1F4F1} Sending push notification..."));
814
868
  try {
815
- const { ApiClient } = await Promise.resolve().then(function () { return require('./api-XeHlmApX.cjs'); }).then(function (n) { return n.api; });
869
+ const { ApiClient } = await Promise.resolve().then(function () { return require('./api-B-PlVQY6.cjs'); }).then(function (n) { return n.api; });
816
870
  const api = await ApiClient.create(credentials);
817
871
  const notificationTitle = title || "Happy AI";
818
872
  api.push().sendToAllDevices(
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
- import { l as logger, i as isDebug, r as readCredentials, a as readSettings, p as packageJson } from './persistence-CIUFyOwz.mjs';
2
+ import { l as logger, i as isDebug, r as readCredentials, a as readSettings, p as packageJson } from './persistence-DbLMvLvk.mjs';
3
3
  import { z } from 'zod';
4
4
  import { execFileSync } from 'node:child_process';
5
5
  import 'node:fs/promises';
@@ -11,8 +11,8 @@ import 'tweetnacl';
11
11
  import 'fs';
12
12
 
13
13
  async function spawnAndWaitForDaemon() {
14
- const { spawnHappyCLI } = await import('./spawnHappyCLI-D3EkTFIn.mjs').then(function (n) { return n.a; });
15
- const { checkIfDaemonRunningAndCleanupStaleState } = await import('./controlClient-DgjVRN8D.mjs');
14
+ const { spawnHappyCLI } = await import('./spawnHappyCLI-Dt7fbmbk.mjs').then(function (n) { return n.a; });
15
+ const { checkIfDaemonRunningAndCleanupStaleState } = await import('./controlClient-BzzTNSfl.mjs');
16
16
  const child = spawnHappyCLI(["daemon", "start-sync"], {
17
17
  detached: true,
18
18
  stdio: "ignore"
@@ -35,7 +35,7 @@ async function spawnAndWaitForDaemon() {
35
35
  if (!args.includes("--version")) ;
36
36
  if (subcommand === "orchestrator-oneshot") {
37
37
  try {
38
- const { runOrchestratorOneShot } = await import('./runOneShot-cxlk7VKA.mjs');
38
+ const { runOrchestratorOneShot } = await import('./runOneShot-DTukim2A.mjs');
39
39
  const exitCode = await runOrchestratorOneShot(args.slice(1));
40
40
  process.exit(exitCode);
41
41
  } catch (error) {
@@ -48,7 +48,7 @@ async function spawnAndWaitForDaemon() {
48
48
  return;
49
49
  } else if (subcommand === "doctor") {
50
50
  const { killRunawayHappyProcesses } = await import('./doctor-ON7pN5G5.mjs');
51
- const { runDoctorCommand } = await import('./doctor-B-LCMVN9.mjs');
51
+ const { runDoctorCommand } = await import('./doctor-DDT2TXHH.mjs');
52
52
  if (args[1] === "clean") {
53
53
  const result = await killRunawayHappyProcesses();
54
54
  console.log(`Cleaned up ${result.killed} runaway processes`);
@@ -61,7 +61,7 @@ async function spawnAndWaitForDaemon() {
61
61
  return;
62
62
  } else if (subcommand === "auth") {
63
63
  try {
64
- const { handleAuthCommand } = await import('./auth-CjLkoM3m.mjs');
64
+ const { handleAuthCommand } = await import('./auth-DQH6q_q-.mjs');
65
65
  await handleAuthCommand(args.slice(1));
66
66
  } catch (error) {
67
67
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -73,7 +73,7 @@ async function spawnAndWaitForDaemon() {
73
73
  return;
74
74
  } else if (subcommand === "connect") {
75
75
  try {
76
- const { handleConnectCommand } = await import('./connect-DXQC1CJe.mjs');
76
+ const { handleConnectCommand } = await import('./connect-BAunPyp_.mjs');
77
77
  await handleConnectCommand(args.slice(1));
78
78
  } catch (error) {
79
79
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -84,11 +84,11 @@ async function spawnAndWaitForDaemon() {
84
84
  }
85
85
  return;
86
86
  } else if (subcommand === "codex") {
87
- const { authAndSetupMachineIfNeeded } = await import('./auth-DS8fzlin.mjs');
88
- const { isDaemonRunningCurrentlyInstalledHappyVersion } = await import('./controlClient-DgjVRN8D.mjs');
89
- const { spawnHappyCLI } = await import('./spawnHappyCLI-D3EkTFIn.mjs').then(function (n) { return n.a; });
87
+ const { authAndSetupMachineIfNeeded } = await import('./auth-qM2eojWx.mjs');
88
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await import('./controlClient-BzzTNSfl.mjs');
89
+ const { spawnHappyCLI } = await import('./spawnHappyCLI-Dt7fbmbk.mjs').then(function (n) { return n.a; });
90
90
  try {
91
- const { runCodex } = await import('./runCodex-D0ZxSj3O.mjs');
91
+ const { runCodex } = await import('./runCodex-BzQWlRoj.mjs');
92
92
  let startedBy = void 0;
93
93
  for (let i = 1; i < args.length; i++) {
94
94
  if (args[i] === "--started-by") {
@@ -118,10 +118,64 @@ async function spawnAndWaitForDaemon() {
118
118
  process.exit(1);
119
119
  }
120
120
  return;
121
+ } else if (subcommand === "cursor-approval-hook") {
122
+ const { runCursorApprovalHook } = await import('./cursorApprovalHook-BDLPzI5l.mjs');
123
+ await runCursorApprovalHook();
124
+ return;
125
+ } else if (subcommand === "cursor") {
126
+ const { authAndSetupMachineIfNeeded } = await import('./auth-qM2eojWx.mjs');
127
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await import('./controlClient-BzzTNSfl.mjs');
128
+ const { spawnHappyCLI } = await import('./spawnHappyCLI-Dt7fbmbk.mjs').then(function (n) { return n.a; });
129
+ try {
130
+ const { runCursor } = await import('./runCursor-B73z6MCN.mjs');
131
+ let startedBy = void 0;
132
+ let model = null;
133
+ let resumeChatId = null;
134
+ const promptParts = [];
135
+ for (let i = 1; i < args.length; i++) {
136
+ if (args[i] === "--started-by") {
137
+ startedBy = args[++i];
138
+ } else if (args[i] === "--resume") {
139
+ resumeChatId = args[++i] ?? null;
140
+ } else if (args[i] === "--model") {
141
+ model = args[++i] ?? null;
142
+ } else if (args[i] === "--happy-starting-mode") {
143
+ i++;
144
+ } else {
145
+ promptParts.push(args[i]);
146
+ }
147
+ }
148
+ const { credentials } = await authAndSetupMachineIfNeeded();
149
+ logger.debug("Ensuring Happy background service is running & matches our version...");
150
+ if (!await isDaemonRunningCurrentlyInstalledHappyVersion()) {
151
+ logger.debug("Starting Happy background service...");
152
+ const daemonProcess = spawnHappyCLI(["daemon", "start-sync"], {
153
+ detached: true,
154
+ stdio: "ignore",
155
+ env: process.env
156
+ });
157
+ daemonProcess.unref();
158
+ await new Promise((resolve) => setTimeout(resolve, 200));
159
+ }
160
+ await runCursor({
161
+ credentials,
162
+ startedBy,
163
+ model,
164
+ resumeChatId,
165
+ initialPrompt: promptParts.length > 0 ? promptParts.join(" ") : void 0
166
+ });
167
+ } catch (error) {
168
+ console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
169
+ if (isDebug()) {
170
+ console.error(error);
171
+ }
172
+ process.exit(1);
173
+ }
174
+ return;
121
175
  } else if (subcommand === "gemini") {
122
- const { authAndSetupMachineIfNeeded } = await import('./auth-DS8fzlin.mjs');
123
- const { isDaemonRunningCurrentlyInstalledHappyVersion } = await import('./controlClient-DgjVRN8D.mjs');
124
- const { spawnHappyCLI } = await import('./spawnHappyCLI-D3EkTFIn.mjs').then(function (n) { return n.a; });
176
+ const { authAndSetupMachineIfNeeded } = await import('./auth-qM2eojWx.mjs');
177
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await import('./controlClient-BzzTNSfl.mjs');
178
+ const { spawnHappyCLI } = await import('./spawnHappyCLI-Dt7fbmbk.mjs').then(function (n) { return n.a; });
125
179
  const geminiSubcommand = args[1];
126
180
  if (geminiSubcommand === "model" && args[2] === "set" && args[3]) {
127
181
  const modelName = args[3];
@@ -195,9 +249,9 @@ async function spawnAndWaitForDaemon() {
195
249
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
196
250
  const projectId = args[3];
197
251
  try {
198
- const { saveGoogleCloudProjectToConfig } = await import('./config-DWWtjKQx.mjs');
199
- const { readCredentials: readCredentials2 } = await import('./persistence-CIUFyOwz.mjs').then(function (n) { return n.F; });
200
- const { ApiClient } = await import('./api-K2-jr9ar.mjs').then(function (n) { return n.m; });
252
+ const { saveGoogleCloudProjectToConfig } = await import('./config-2wMjzcHl.mjs');
253
+ const { readCredentials: readCredentials2 } = await import('./persistence-DbLMvLvk.mjs').then(function (n) { return n.F; });
254
+ const { ApiClient } = await import('./api-BUCtd3cB.mjs').then(function (n) { return n.m; });
201
255
  let userEmail = void 0;
202
256
  try {
203
257
  const credentials = await readCredentials2();
@@ -228,7 +282,7 @@ async function spawnAndWaitForDaemon() {
228
282
  }
229
283
  if (geminiSubcommand === "project" && args[2] === "get") {
230
284
  try {
231
- const { readGeminiLocalConfig } = await import('./config-DWWtjKQx.mjs');
285
+ const { readGeminiLocalConfig } = await import('./config-2wMjzcHl.mjs');
232
286
  const config = readGeminiLocalConfig();
233
287
  if (config.googleCloudProject) {
234
288
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -268,7 +322,7 @@ async function spawnAndWaitForDaemon() {
268
322
  process.exit(0);
269
323
  }
270
324
  try {
271
- const { runGemini } = await import('./runGemini-DZC2i6vA.mjs');
325
+ const { runGemini } = await import('./runGemini-BPv4UzuF.mjs');
272
326
  let startedBy = void 0;
273
327
  for (let i = 1; i < args.length; i++) {
274
328
  if (args[i] === "--started-by") {
@@ -300,7 +354,7 @@ async function spawnAndWaitForDaemon() {
300
354
  return;
301
355
  } else if (subcommand === "update") {
302
356
  try {
303
- const { handleUpdateCommand } = await import('./update-BfjtLrhO.mjs');
357
+ const { handleUpdateCommand } = await import('./update-CfXbYshs.mjs');
304
358
  await handleUpdateCommand();
305
359
  } catch (error) {
306
360
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -313,7 +367,7 @@ async function spawnAndWaitForDaemon() {
313
367
  } else if (subcommand === "logout") {
314
368
  console.log(chalk.yellow('Note: "happy logout" is deprecated. Use "happy auth logout" instead.\n'));
315
369
  try {
316
- const { handleAuthCommand } = await import('./auth-CjLkoM3m.mjs');
370
+ const { handleAuthCommand } = await import('./auth-DQH6q_q-.mjs');
317
371
  await handleAuthCommand(["logout"]);
318
372
  } catch (error) {
319
373
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -336,7 +390,7 @@ async function spawnAndWaitForDaemon() {
336
390
  return;
337
391
  } else if (subcommand === "session") {
338
392
  try {
339
- const { handleSessionCommand } = await import('./session-vf2ZjFto.mjs');
393
+ const { handleSessionCommand } = await import('./session-gfeFU8CA.mjs');
340
394
  await handleSessionCommand(args.slice(1));
341
395
  } catch (error) {
342
396
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -348,7 +402,7 @@ async function spawnAndWaitForDaemon() {
348
402
  return;
349
403
  } else if (subcommand === "task") {
350
404
  try {
351
- const { handleTaskCommand } = await import('./task-CRo6W-3_.mjs');
405
+ const { handleTaskCommand } = await import('./task-B-8_QGGX.mjs');
352
406
  await handleTaskCommand(args.slice(1));
353
407
  } catch (error) {
354
408
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -396,7 +450,7 @@ async function spawnAndWaitForDaemon() {
396
450
  return;
397
451
  } else if (subcommand === "evidence") {
398
452
  try {
399
- const { handleEvidenceCommand } = await import('./evidence-BEQd1dCh.mjs');
453
+ const { handleEvidenceCommand } = await import('./evidence-PUnN9yPK.mjs');
400
454
  await handleEvidenceCommand(args.slice(1));
401
455
  } catch (error) {
402
456
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -413,7 +467,7 @@ async function spawnAndWaitForDaemon() {
413
467
  process.exit(1);
414
468
  }
415
469
  try {
416
- const { runMcpServe } = await import('./serve-CKyvJNs0.mjs');
470
+ const { runMcpServe } = await import('./serve-BnlYj5ek.mjs');
417
471
  await runMcpServe();
418
472
  } catch (error) {
419
473
  process.stderr.write(`[happy-mcp] fatal: ${error instanceof Error ? error.message : "unknown error"}
@@ -427,7 +481,7 @@ async function spawnAndWaitForDaemon() {
427
481
  console.error(chalk.red("Error:"), 'Not authenticated. Run "happy auth" first.');
428
482
  process.exit(1);
429
483
  }
430
- const { parseSshArgs, runOnDevice, sshDevice, sshPickAndConnect } = await import('./ssh-B0hvEYIl.mjs');
484
+ const { parseSshArgs, runOnDevice, sshDevice, sshPickAndConnect } = await import('./ssh-C-nEZiGP.mjs');
431
485
  const { target, command, timeoutMs, stream } = parseSshArgs(args.slice(1));
432
486
  try {
433
487
  if (command) {
@@ -448,7 +502,7 @@ async function spawnAndWaitForDaemon() {
448
502
  } else if (subcommand === "device") {
449
503
  const deviceSubcommand = args[1];
450
504
  if (deviceSubcommand === "push") {
451
- const { pushToDevice } = await import('./push-USXj_pv0.mjs');
505
+ const { pushToDevice } = await import('./push-z5wQ4Ki_.mjs');
452
506
  const credentials = await readCredentials();
453
507
  if (!credentials) {
454
508
  console.error(chalk.red("Error:"), 'Not authenticated. Run "happy auth" first.');
@@ -462,8 +516,8 @@ async function spawnAndWaitForDaemon() {
462
516
  process.exit(await pushToDevice(credentials, target, localPath, remotePath));
463
517
  }
464
518
  if (deviceSubcommand === "enroll") {
465
- const { enrollDevice } = await import('./enroll-HjUqyGnD.mjs');
466
- const { install } = await import('./install-UTz_vYvB.mjs');
519
+ const { enrollDevice } = await import('./enroll-BlZ0giJI.mjs');
520
+ const { install } = await import('./install-BLPNuSeM.mjs');
467
521
  const token = args[2];
468
522
  if (!token) {
469
523
  console.error(chalk.red("Error:"), "Missing enrollment token. Usage: happy device enroll <token>");
@@ -493,12 +547,12 @@ ${chalk.bold("Usage:")}
493
547
  `);
494
548
  process.exit(0);
495
549
  } else if (subcommand === "daemon") {
496
- const { startDaemon } = await import('./run-Dy6KX6m-.mjs').then(function (n) { return n.r; });
497
- const { install } = await import('./install-UTz_vYvB.mjs');
498
- const { uninstall } = await import('./uninstall-BALE2up0.mjs');
499
- const { runDoctorCommand } = await import('./doctor-B-LCMVN9.mjs');
500
- const { getLatestDaemonLog } = await import('./persistence-CIUFyOwz.mjs').then(function (n) { return n.E; });
501
- const { listDaemonSessions, stopDaemonSession, stopDaemon } = await import('./controlClient-DgjVRN8D.mjs');
550
+ const { startDaemon } = await import('./run-BFnSUK1o.mjs').then(function (n) { return n.r; });
551
+ const { install } = await import('./install-BLPNuSeM.mjs');
552
+ const { uninstall } = await import('./uninstall-CirMt_WC.mjs');
553
+ const { runDoctorCommand } = await import('./doctor-DDT2TXHH.mjs');
554
+ const { getLatestDaemonLog } = await import('./persistence-DbLMvLvk.mjs').then(function (n) { return n.E; });
555
+ const { listDaemonSessions, stopDaemonSession, stopDaemon } = await import('./controlClient-BzzTNSfl.mjs');
502
556
  const daemonSubcommand = args[1];
503
557
  if (daemonSubcommand === "list") {
504
558
  try {
@@ -703,7 +757,7 @@ ${chalk.gray("\u2500".repeat(60))}
703
757
  ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
704
758
  `);
705
759
  try {
706
- const { claudeCliPath } = await import('./claudeLocal-DJNRlHIC.mjs').then(function (n) { return n.d; });
760
+ const { claudeCliPath } = await import('./claudeLocal-BXK_vQXS.mjs').then(function (n) { return n.d; });
707
761
  const claudeHelp = execFileSync(claudeCliPath, ["--help"], { encoding: "utf8" });
708
762
  console.log(claudeHelp);
709
763
  } catch (e) {
@@ -733,10 +787,10 @@ ${chalk.bold.cyan("Claude Code Options (from `claude --help`):")}
733
787
  }
734
788
  process.exit(0);
735
789
  }
736
- const { authAndSetupMachineIfNeeded } = await import('./auth-DS8fzlin.mjs');
737
- const { isDaemonRunningCurrentlyInstalledHappyVersion } = await import('./controlClient-DgjVRN8D.mjs');
738
- const { spawnHappyCLI } = await import('./spawnHappyCLI-D3EkTFIn.mjs').then(function (n) { return n.a; });
739
- const { runClaude } = await import('./runClaude-CWux2RDq.mjs');
790
+ const { authAndSetupMachineIfNeeded } = await import('./auth-qM2eojWx.mjs');
791
+ const { isDaemonRunningCurrentlyInstalledHappyVersion } = await import('./controlClient-BzzTNSfl.mjs');
792
+ const { spawnHappyCLI } = await import('./spawnHappyCLI-Dt7fbmbk.mjs').then(function (n) { return n.a; });
793
+ const { runClaude } = await import('./runClaude-CjENBdrX.mjs');
740
794
  const {
741
795
  credentials
742
796
  } = await authAndSetupMachineIfNeeded();
@@ -810,7 +864,7 @@ ${chalk.bold("Examples:")}
810
864
  }
811
865
  console.log(chalk.blue("\u{1F4F1} Sending push notification..."));
812
866
  try {
813
- const { ApiClient } = await import('./api-K2-jr9ar.mjs').then(function (n) { return n.m; });
867
+ const { ApiClient } = await import('./api-BUCtd3cB.mjs').then(function (n) { return n.m; });
814
868
  const api = await ApiClient.create(credentials);
815
869
  const notificationTitle = title || "Happy AI";
816
870
  api.push().sendToAllDevices(
@@ -1,5 +1,5 @@
1
- import { l as logger, r as readCredentials } from './persistence-CIUFyOwz.mjs';
2
- import { i as install$2 } from './install-B3mMGISS.mjs';
1
+ import { l as logger, r as readCredentials } from './persistence-DbLMvLvk.mjs';
2
+ import { i as install$2 } from './install-BOIcR_Wr.mjs';
3
3
  import { existsSync, mkdirSync, writeFileSync } from 'fs';
4
4
  import { execSync } from 'child_process';
5
5
  import path from 'path';
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, writeFileSync } from 'fs';
2
2
  import { execSync } from 'child_process';
3
3
  import os from 'os';
4
4
  import { join } from 'path';
5
- import { l as logger } from './persistence-CIUFyOwz.mjs';
5
+ import { l as logger } from './persistence-DbLMvLvk.mjs';
6
6
  import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
7
7
  import { p as projectPath } from './projectPath-BTBIMB57.mjs';
8
8
 
@@ -4,7 +4,7 @@ var fs = require('fs');
4
4
  var child_process = require('child_process');
5
5
  var os = require('os');
6
6
  var path = require('path');
7
- var logger = require('./persistence-DrfN7TzY.cjs');
7
+ var logger = require('./persistence-D7zNFI-d.cjs');
8
8
  var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
9
9
  var projectPath = require('./projectPath-ChLhdOyt.cjs');
10
10
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./persistence-DrfN7TzY.cjs');
4
- var install$2 = require('./install-Ck22tYHP.cjs');
3
+ var logger = require('./persistence-D7zNFI-d.cjs');
4
+ var install$2 = require('./install-Jrs6YUu8.cjs');
5
5
  var fs = require('fs');
6
6
  var child_process = require('child_process');
7
7
  var path = require('path');