@zonease/happy 0.6.38 → 0.6.39

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 (109) hide show
  1. package/dist/{types-BWpRU1VN.mjs → api-CIZKyfSn.mjs} +136 -1725
  2. package/dist/{types-DvTsFaqR.cjs → api-CwOCQeLH.cjs} +317 -1961
  3. package/dist/auth-0VnlXT9f.mjs +181 -0
  4. package/dist/auth-BE8dD20T.mjs +270 -0
  5. package/dist/auth-BIleVCw0.cjs +274 -0
  6. package/dist/auth-Cas9DR3b.cjs +183 -0
  7. package/dist/browser-Cc08m7of.cjs +22 -0
  8. package/dist/browser-Dll5hxOV.mjs +20 -0
  9. package/dist/claudeLocal-CPT3zcIU.mjs +344 -0
  10. package/dist/claudeLocal-WkgLbl1a.cjs +352 -0
  11. package/dist/codex/happyMcpStdioBridge.cjs +4 -1
  12. package/dist/codex/happyMcpStdioBridge.mjs +4 -1
  13. package/dist/common-BdNgghUJ.mjs +75 -0
  14. package/dist/common-CZvSRU4p.cjs +83 -0
  15. package/dist/{config-0Xnc8ARM.cjs → config-Draa-5XC.cjs} +21 -34
  16. package/dist/{config-_GW4YBCP.mjs → config-rTT4qTU5.mjs} +7 -20
  17. package/dist/connect-BfC1tYP_.mjs +679 -0
  18. package/dist/connect-CJZ73syK.cjs +681 -0
  19. package/dist/{constants-B4x1K7by.cjs → constants-E_UWYTo3.cjs} +2 -2
  20. package/dist/{constants-BO9OAFOT.mjs → constants-pmXZGibX.mjs} +1 -1
  21. package/dist/controlClient-CM_QcJnB.mjs +159 -0
  22. package/dist/controlClient-DZMIsKsT.cjs +168 -0
  23. package/dist/deviceExec-CU1R9CRb.cjs +84 -0
  24. package/dist/deviceExec-D93AOVV4.mjs +81 -0
  25. package/dist/diagnose-B3D1a_v0.cjs +60 -0
  26. package/dist/diagnose-CuRKXxt1.mjs +58 -0
  27. package/dist/doctor-C08m5Z9f.cjs +78 -0
  28. package/dist/doctor-Cya9YSA0.cjs +214 -0
  29. package/dist/doctor-DZYB6IVc.mjs +211 -0
  30. package/dist/doctor-ON7pN5G5.mjs +74 -0
  31. package/dist/downloadImage-DfSFLb-h.mjs +887 -0
  32. package/dist/downloadImage-MQMrUUxS.cjs +897 -0
  33. package/dist/enroll-BxlbVftP.cjs +115 -0
  34. package/dist/enroll-C52x8oly.mjs +113 -0
  35. package/dist/evidence-Ccd9iYcj.mjs +127 -0
  36. package/dist/evidence-CjWBG5rX.cjs +129 -0
  37. package/dist/formatImageMessage-B4lSxlk2.mjs +43 -0
  38. package/dist/formatImageMessage-DbyG8c2j.cjs +46 -0
  39. package/dist/github-DKcyF1zp.mjs +57 -0
  40. package/dist/github-h9GhJJ_C.cjs +59 -0
  41. package/dist/index-CDTNgfUf.cjs +578 -0
  42. package/dist/index-CPKdvi7J.mjs +554 -0
  43. package/dist/index.cjs +812 -40
  44. package/dist/index.mjs +813 -40
  45. package/dist/install-BokHRgFW.cjs +98 -0
  46. package/dist/install-C_cp8b2-.cjs +96 -0
  47. package/dist/install-DAeCn8ae.mjs +94 -0
  48. package/dist/install-oRAjVLjP.mjs +95 -0
  49. package/dist/lib.cjs +18 -12
  50. package/dist/lib.mjs +13 -7
  51. package/dist/{loadableToolOutput-va3RLplh.mjs → loadableToolOutput-Cuygmd4K.mjs} +4 -2
  52. package/dist/{loadableToolOutput-5vdQB98M.cjs → loadableToolOutput-DDCJjywt.cjs} +63 -61
  53. package/dist/mcpToolSchemas-CjeTfrAs.mjs +62 -0
  54. package/dist/mcpToolSchemas-DK42yoZ_.cjs +64 -0
  55. package/dist/persistence-BFjvtUad.mjs +944 -0
  56. package/dist/persistence-JLUn_Nou.cjs +996 -0
  57. package/dist/projectPath-BTBIMB57.mjs +10 -0
  58. package/dist/projectPath-ChLhdOyt.cjs +13 -0
  59. package/dist/prompt-BTWDZZO0.cjs +25 -0
  60. package/dist/prompt-BsAZsPbo.mjs +22 -0
  61. package/dist/release-BMEzNONE.mjs +168 -0
  62. package/dist/release-EhOJeAZe.cjs +171 -0
  63. package/dist/run-BDn2aE3Q.cjs +2152 -0
  64. package/dist/run-DBZqN6Kn.mjs +2128 -0
  65. package/dist/runClaude-DNHvERX0.mjs +3763 -0
  66. package/dist/runClaude-uaKxPZPm.cjs +3766 -0
  67. package/dist/{runCodex-skq0j05d.cjs → runCodex-82UrZLme.cjs} +169 -153
  68. package/dist/{runCodex-DiKzBf9q.mjs → runCodex-C-RTM0wA.mjs} +36 -20
  69. package/dist/{runGemini-BeqrVq8R.mjs → runGemini-Bm6-4Xm2.mjs} +34 -17
  70. package/dist/{runGemini-CVp-CEIh.cjs → runGemini-CXMr4Jwb.cjs} +212 -195
  71. package/dist/{runOneShot-BQNkNW61.cjs → runOneShot-1B6RMYT7.cjs} +31 -55
  72. package/dist/{runOneShot-ltCpHbBB.mjs → runOneShot-ioARRHrx.mjs} +14 -38
  73. package/dist/{serve-BECdtivY.cjs → serve-BtdAhkIE.cjs} +35 -58
  74. package/dist/{serve-BNdoEDVx.mjs → serve-CwibwU6N.mjs} +12 -35
  75. package/dist/session-2sU4Bu1R.mjs +108 -0
  76. package/dist/session-D--F87zL.cjs +110 -0
  77. package/dist/sessionKeyCache-4Tp8pJ3N.cjs +36 -0
  78. package/dist/sessionKeyCache-D2BwO91C.mjs +33 -0
  79. package/dist/sessionList-BCSw3qYt.mjs +51 -0
  80. package/dist/sessionList-ICJsjNtJ.cjs +54 -0
  81. package/dist/sessionSummary-Bkz52BPh.cjs +393 -0
  82. package/dist/sessionSummary-lHGBWQSb.mjs +387 -0
  83. package/dist/spawnHappyCLI-CoORX0YW.mjs +66 -0
  84. package/dist/spawnHappyCLI-D_V-AAoP.cjs +70 -0
  85. package/dist/ssh-BTOlhhxi.cjs +333 -0
  86. package/dist/ssh-DL_AkRAD.mjs +328 -0
  87. package/dist/systemdScope-BeOtAkhk.mjs +25 -0
  88. package/dist/systemdScope-DW3-UoKB.cjs +29 -0
  89. package/dist/task-CQzrHRZe.mjs +165 -0
  90. package/dist/task-CSpaC9HX.cjs +167 -0
  91. package/dist/time-Bj2HRkKH.cjs +33 -0
  92. package/dist/time-DgsBLJA_.mjs +29 -0
  93. package/dist/trimIdent-4gvk9Wk6.cjs +22 -0
  94. package/dist/trimIdent-BAjmv_TG.mjs +20 -0
  95. package/dist/types-BoJh4Qfv.mjs +57 -0
  96. package/dist/types-DWeB7aqh.cjs +59 -0
  97. package/dist/uninstall-BiKyRAb1.cjs +77 -0
  98. package/dist/uninstall-nFMFGUVM.mjs +75 -0
  99. package/dist/update-BcqRHXf2.mjs +109 -0
  100. package/dist/update-Dw8pgsAT.cjs +111 -0
  101. package/dist/workflowCommon-B0d01Y_a.mjs +56 -0
  102. package/dist/workflowCommon-Bl568-rt.cjs +62 -0
  103. package/dist/workflowReports-BEWuQesA.cjs +113 -0
  104. package/dist/workflowReports-Dd8-4-8f.mjs +108 -0
  105. package/package.json +1 -1
  106. package/dist/index-BbCDDvoB.cjs +0 -11376
  107. package/dist/index-vvZXdswy.mjs +0 -11336
  108. package/dist/mcpToolSchemas-CdPXJQmb.mjs +0 -175
  109. package/dist/mcpToolSchemas-f-kttjFw.cjs +0 -186
@@ -5,7 +5,10 @@ var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
5
5
  var index_js = require('@modelcontextprotocol/sdk/client/index.js');
6
6
  var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
7
7
  var z = require('zod');
8
- require('../mcpToolSchemas-f-kttjFw.cjs');
8
+ require('../prompt-BTWDZZO0.cjs');
9
+ require('../mcpToolSchemas-DK42yoZ_.cjs');
10
+ require('../trimIdent-4gvk9Wk6.cjs');
11
+ require('../common-CZvSRU4p.cjs');
9
12
 
10
13
  function parseArgs(argv) {
11
14
  let url = null;
@@ -3,7 +3,10 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
3
3
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
4
4
  import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
5
5
  import { z } from 'zod';
6
- import '../mcpToolSchemas-CdPXJQmb.mjs';
6
+ import '../prompt-BsAZsPbo.mjs';
7
+ import '../mcpToolSchemas-CjeTfrAs.mjs';
8
+ import '../trimIdent-BAjmv_TG.mjs';
9
+ import '../common-BdNgghUJ.mjs';
7
10
 
8
11
  function parseArgs(argv) {
9
12
  let url = null;
@@ -0,0 +1,75 @@
1
+ const ORCHESTRATOR_PROVIDERS = ["claude", "codex", "gemini"];
2
+ const ORCHESTRATOR_ENV_KEYS = {
3
+ oneshot: "HAPPY_ORCH_ONESHOT",
4
+ executionId: "HAPPY_ORCH_EXECUTION_ID",
5
+ runId: "HAPPY_ORCH_RUN_ID",
6
+ taskId: "HAPPY_ORCH_TASK_ID",
7
+ executionType: "HAPPY_ORCH_EXECUTION_TYPE",
8
+ childSessionId: "HAPPY_ORCH_CHILD_SESSION_ID",
9
+ modelMode: "HAPPY_ORCH_MODEL_MODE",
10
+ promptB64: "HAPPY_ORCH_PROMPT_B64",
11
+ timeoutMs: "HAPPY_ORCH_TIMEOUT_MS",
12
+ workingDirectory: "HAPPY_ORCH_WORKING_DIRECTORY"
13
+ };
14
+ function isOrchestratorProvider(value) {
15
+ return typeof value === "string" && ORCHESTRATOR_PROVIDERS.includes(value);
16
+ }
17
+ function mapFinishStatus(reason) {
18
+ if (reason.watchdogTriggered) {
19
+ return "timeout";
20
+ }
21
+ if (reason.cancelRequested) {
22
+ return "cancelled";
23
+ }
24
+ if (reason.exitCode === 0) {
25
+ return "completed";
26
+ }
27
+ return "failed";
28
+ }
29
+ function encodePromptToBase64(prompt) {
30
+ return Buffer.from(prompt, "utf8").toString("base64");
31
+ }
32
+ function decodePromptFromBase64(promptB64) {
33
+ return Buffer.from(promptB64, "base64").toString("utf8");
34
+ }
35
+ function buildOrchestratorEnv(payload) {
36
+ const env = {
37
+ [ORCHESTRATOR_ENV_KEYS.oneshot]: "1",
38
+ [ORCHESTRATOR_ENV_KEYS.executionId]: payload.executionId,
39
+ [ORCHESTRATOR_ENV_KEYS.runId]: payload.runId,
40
+ [ORCHESTRATOR_ENV_KEYS.taskId]: payload.taskId,
41
+ [ORCHESTRATOR_ENV_KEYS.executionType]: payload.executionType,
42
+ [ORCHESTRATOR_ENV_KEYS.promptB64]: encodePromptToBase64(payload.prompt),
43
+ [ORCHESTRATOR_ENV_KEYS.timeoutMs]: String(payload.timeoutMs)
44
+ };
45
+ if (payload.childSessionId) {
46
+ env[ORCHESTRATOR_ENV_KEYS.childSessionId] = payload.childSessionId;
47
+ }
48
+ if (payload.workingDirectory) {
49
+ env[ORCHESTRATOR_ENV_KEYS.workingDirectory] = payload.workingDirectory;
50
+ }
51
+ if (payload.model) {
52
+ env[ORCHESTRATOR_ENV_KEYS.modelMode] = payload.model;
53
+ }
54
+ return env;
55
+ }
56
+ function appendOutputChunk(current, chunk, maxChars) {
57
+ const combined = `${current}${chunk}`;
58
+ if (combined.length <= maxChars) {
59
+ return combined;
60
+ }
61
+ return combined.slice(combined.length - maxChars);
62
+ }
63
+ function buildOutputSummary(stdout, stderr, maxChars = 400) {
64
+ const source = stdout.trim() ? stdout : stderr;
65
+ if (!source.trim()) {
66
+ return null;
67
+ }
68
+ const lastLine = source.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0).at(-1) ?? source.trim();
69
+ if (lastLine.length <= maxChars) {
70
+ return lastLine;
71
+ }
72
+ return `${lastLine.slice(0, maxChars - 3)}...`;
73
+ }
74
+
75
+ export { ORCHESTRATOR_ENV_KEYS as O, buildOrchestratorEnv as a, buildOutputSummary as b, appendOutputChunk as c, decodePromptFromBase64 as d, isOrchestratorProvider as i, mapFinishStatus as m };
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ const ORCHESTRATOR_PROVIDERS = ["claude", "codex", "gemini"];
4
+ const ORCHESTRATOR_ENV_KEYS = {
5
+ oneshot: "HAPPY_ORCH_ONESHOT",
6
+ executionId: "HAPPY_ORCH_EXECUTION_ID",
7
+ runId: "HAPPY_ORCH_RUN_ID",
8
+ taskId: "HAPPY_ORCH_TASK_ID",
9
+ executionType: "HAPPY_ORCH_EXECUTION_TYPE",
10
+ childSessionId: "HAPPY_ORCH_CHILD_SESSION_ID",
11
+ modelMode: "HAPPY_ORCH_MODEL_MODE",
12
+ promptB64: "HAPPY_ORCH_PROMPT_B64",
13
+ timeoutMs: "HAPPY_ORCH_TIMEOUT_MS",
14
+ workingDirectory: "HAPPY_ORCH_WORKING_DIRECTORY"
15
+ };
16
+ function isOrchestratorProvider(value) {
17
+ return typeof value === "string" && ORCHESTRATOR_PROVIDERS.includes(value);
18
+ }
19
+ function mapFinishStatus(reason) {
20
+ if (reason.watchdogTriggered) {
21
+ return "timeout";
22
+ }
23
+ if (reason.cancelRequested) {
24
+ return "cancelled";
25
+ }
26
+ if (reason.exitCode === 0) {
27
+ return "completed";
28
+ }
29
+ return "failed";
30
+ }
31
+ function encodePromptToBase64(prompt) {
32
+ return Buffer.from(prompt, "utf8").toString("base64");
33
+ }
34
+ function decodePromptFromBase64(promptB64) {
35
+ return Buffer.from(promptB64, "base64").toString("utf8");
36
+ }
37
+ function buildOrchestratorEnv(payload) {
38
+ const env = {
39
+ [ORCHESTRATOR_ENV_KEYS.oneshot]: "1",
40
+ [ORCHESTRATOR_ENV_KEYS.executionId]: payload.executionId,
41
+ [ORCHESTRATOR_ENV_KEYS.runId]: payload.runId,
42
+ [ORCHESTRATOR_ENV_KEYS.taskId]: payload.taskId,
43
+ [ORCHESTRATOR_ENV_KEYS.executionType]: payload.executionType,
44
+ [ORCHESTRATOR_ENV_KEYS.promptB64]: encodePromptToBase64(payload.prompt),
45
+ [ORCHESTRATOR_ENV_KEYS.timeoutMs]: String(payload.timeoutMs)
46
+ };
47
+ if (payload.childSessionId) {
48
+ env[ORCHESTRATOR_ENV_KEYS.childSessionId] = payload.childSessionId;
49
+ }
50
+ if (payload.workingDirectory) {
51
+ env[ORCHESTRATOR_ENV_KEYS.workingDirectory] = payload.workingDirectory;
52
+ }
53
+ if (payload.model) {
54
+ env[ORCHESTRATOR_ENV_KEYS.modelMode] = payload.model;
55
+ }
56
+ return env;
57
+ }
58
+ function appendOutputChunk(current, chunk, maxChars) {
59
+ const combined = `${current}${chunk}`;
60
+ if (combined.length <= maxChars) {
61
+ return combined;
62
+ }
63
+ return combined.slice(combined.length - maxChars);
64
+ }
65
+ function buildOutputSummary(stdout, stderr, maxChars = 400) {
66
+ const source = stdout.trim() ? stdout : stderr;
67
+ if (!source.trim()) {
68
+ return null;
69
+ }
70
+ const lastLine = source.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0).at(-1) ?? source.trim();
71
+ if (lastLine.length <= maxChars) {
72
+ return lastLine;
73
+ }
74
+ return `${lastLine.slice(0, maxChars - 3)}...`;
75
+ }
76
+
77
+ exports.ORCHESTRATOR_ENV_KEYS = ORCHESTRATOR_ENV_KEYS;
78
+ exports.appendOutputChunk = appendOutputChunk;
79
+ exports.buildOrchestratorEnv = buildOrchestratorEnv;
80
+ exports.buildOutputSummary = buildOutputSummary;
81
+ exports.decodePromptFromBase64 = decodePromptFromBase64;
82
+ exports.isOrchestratorProvider = isOrchestratorProvider;
83
+ exports.mapFinishStatus = mapFinishStatus;
@@ -4,32 +4,19 @@ var fs = require('fs');
4
4
  var path = require('path');
5
5
  var os = require('os');
6
6
  var child_process = require('child_process');
7
- var persistence = require('./types-DvTsFaqR.cjs');
8
- var constants = require('./constants-B4x1K7by.cjs');
9
- require('axios');
10
- require('chalk');
7
+ var logger = require('./persistence-JLUn_Nou.cjs');
8
+ var constants = require('./constants-E_UWYTo3.cjs');
9
+ require('node:fs/promises');
11
10
  require('node:fs');
12
11
  require('node:os');
13
12
  require('node:path');
14
- require('node:events');
15
- require('socket.io-client');
16
13
  require('zod');
17
- require('@paralleldrive/cuid2');
18
14
  require('node:crypto');
19
15
  require('tweetnacl');
20
- require('node:child_process');
21
- require('node:fs/promises');
22
- require('node:util');
23
- require('util');
24
- require('fs/promises');
25
- require('url');
26
- require('node:module');
27
- require('ws');
28
- require('crypto');
29
- require('@stablelib/base64');
30
- require('node:readline');
31
- require('expo-server-sdk');
32
- require('./mcpToolSchemas-f-kttjFw.cjs');
16
+ require('chalk');
17
+ require('./prompt-BTWDZZO0.cjs');
18
+ require('./trimIdent-4gvk9Wk6.cjs');
19
+ require('./common-CZvSRU4p.cjs');
33
20
 
34
21
  function readGeminiLocalConfig() {
35
22
  let token = null;
@@ -52,14 +39,14 @@ function readGeminiLocalConfig() {
52
39
  const foundToken = config.access_token || config.token || config.apiKey || config.GEMINI_API_KEY;
53
40
  if (foundToken && typeof foundToken === "string") {
54
41
  token = foundToken;
55
- persistence.logger.debug(`[Gemini] Found token in ${configPath}`);
42
+ logger.logger.debug(`[Gemini] Found token in ${configPath}`);
56
43
  }
57
44
  }
58
45
  if (!model) {
59
46
  const foundModel = config.model || config.GEMINI_MODEL;
60
47
  if (foundModel && typeof foundModel === "string") {
61
48
  model = foundModel;
62
- persistence.logger.debug(`[Gemini] Found model in ${configPath}: ${model}`);
49
+ logger.logger.debug(`[Gemini] Found model in ${configPath}: ${model}`);
63
50
  }
64
51
  }
65
52
  if (!googleCloudProject) {
@@ -69,11 +56,11 @@ function readGeminiLocalConfig() {
69
56
  if (config.googleCloudProjectEmail && typeof config.googleCloudProjectEmail === "string") {
70
57
  googleCloudProjectEmail = config.googleCloudProjectEmail;
71
58
  }
72
- persistence.logger.debug(`[Gemini] Found Google Cloud Project in ${configPath}: ${googleCloudProject}${googleCloudProjectEmail ? ` (for ${googleCloudProjectEmail})` : ""}`);
59
+ logger.logger.debug(`[Gemini] Found Google Cloud Project in ${configPath}: ${googleCloudProject}${googleCloudProjectEmail ? ` (for ${googleCloudProjectEmail})` : ""}`);
73
60
  }
74
61
  }
75
62
  } catch (error) {
76
- persistence.logger.debug(`[Gemini] Failed to read config from ${configPath}:`, error);
63
+ logger.logger.debug(`[Gemini] Failed to read config from ${configPath}:`, error);
77
64
  }
78
65
  }
79
66
  }
@@ -86,10 +73,10 @@ function readGeminiLocalConfig() {
86
73
  }).trim();
87
74
  if (gcloudToken && gcloudToken.length > 0) {
88
75
  token = gcloudToken;
89
- persistence.logger.debug("[Gemini] Found token via gcloud Application Default Credentials");
76
+ logger.logger.debug("[Gemini] Found token via gcloud Application Default Credentials");
90
77
  }
91
78
  } catch (error) {
92
- persistence.logger.debug("[Gemini] gcloud Application Default Credentials not available");
79
+ logger.logger.debug("[Gemini] gcloud Application Default Credentials not available");
93
80
  }
94
81
  }
95
82
  if (!googleCloudProject) {
@@ -97,7 +84,7 @@ function readGeminiLocalConfig() {
97
84
  if (envProject) {
98
85
  googleCloudProject = envProject;
99
86
  googleCloudProjectEmail = null;
100
- persistence.logger.debug(`[Gemini] Found Google Cloud Project from env: ${googleCloudProject}`);
87
+ logger.logger.debug(`[Gemini] Found Google Cloud Project from env: ${googleCloudProject}`);
101
88
  }
102
89
  }
103
90
  return { token, model, googleCloudProject, googleCloudProjectEmail };
@@ -111,9 +98,9 @@ function determineGeminiModel(explicitModel, localConfig) {
111
98
  }
112
99
  } else {
113
100
  const envModel = process.env[constants.GEMINI_MODEL_ENV];
114
- persistence.logger.debug(`[Gemini] Model selection: env[GEMINI_MODEL_ENV]=${envModel}, localConfig.model=${localConfig.model}, DEFAULT=${constants.DEFAULT_GEMINI_MODEL}`);
101
+ logger.logger.debug(`[Gemini] Model selection: env[GEMINI_MODEL_ENV]=${envModel}, localConfig.model=${localConfig.model}, DEFAULT=${constants.DEFAULT_GEMINI_MODEL}`);
115
102
  const model = envModel || localConfig.model || constants.DEFAULT_GEMINI_MODEL;
116
- persistence.logger.debug(`[Gemini] Selected model: ${model}`);
103
+ logger.logger.debug(`[Gemini] Selected model: ${model}`);
117
104
  return model;
118
105
  }
119
106
  }
@@ -129,15 +116,15 @@ function saveGeminiModelToConfig(model) {
129
116
  try {
130
117
  config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
131
118
  } catch (error) {
132
- persistence.logger.debug(`[Gemini] Failed to read existing config, creating new one`);
119
+ logger.logger.debug(`[Gemini] Failed to read existing config, creating new one`);
133
120
  config = {};
134
121
  }
135
122
  }
136
123
  config.model = model;
137
124
  fs.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
138
- persistence.logger.debug(`[Gemini] Saved model "${model}" to ${configPath}`);
125
+ logger.logger.debug(`[Gemini] Saved model "${model}" to ${configPath}`);
139
126
  } catch (error) {
140
- persistence.logger.debug(`[Gemini] Failed to save model to config:`, error);
127
+ logger.logger.debug(`[Gemini] Failed to save model to config:`, error);
141
128
  }
142
129
  }
143
130
  function saveGoogleCloudProjectToConfig(projectId, email) {
@@ -160,9 +147,9 @@ function saveGoogleCloudProjectToConfig(projectId, email) {
160
147
  config.googleCloudProjectEmail = email;
161
148
  }
162
149
  fs.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
163
- persistence.logger.debug(`[Gemini] Saved Google Cloud Project "${projectId}"${email ? ` for ${email}` : ""} to ${configPath}`);
150
+ logger.logger.debug(`[Gemini] Saved Google Cloud Project "${projectId}"${email ? ` for ${email}` : ""} to ${configPath}`);
164
151
  } catch (error) {
165
- persistence.logger.debug(`[Gemini] Failed to save Google Cloud Project to config:`, error);
152
+ logger.logger.debug(`[Gemini] Failed to save Google Cloud Project to config:`, error);
166
153
  throw error;
167
154
  }
168
155
  }
@@ -2,32 +2,19 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
2
2
  import { join } from 'path';
3
3
  import { homedir } from 'os';
4
4
  import { execSync } from 'child_process';
5
- import { l as logger } from './types-BWpRU1VN.mjs';
6
- import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './constants-BO9OAFOT.mjs';
7
- import 'axios';
8
- import 'chalk';
5
+ import { l as logger } from './persistence-BFjvtUad.mjs';
6
+ import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './constants-pmXZGibX.mjs';
7
+ import 'node:fs/promises';
9
8
  import 'node:fs';
10
9
  import 'node:os';
11
10
  import 'node:path';
12
- import 'node:events';
13
- import 'socket.io-client';
14
11
  import 'zod';
15
- import '@paralleldrive/cuid2';
16
12
  import 'node:crypto';
17
13
  import 'tweetnacl';
18
- import 'node:child_process';
19
- import 'node:fs/promises';
20
- import 'node:util';
21
- import 'util';
22
- import 'fs/promises';
23
- import 'url';
24
- import 'node:module';
25
- import 'ws';
26
- import 'crypto';
27
- import '@stablelib/base64';
28
- import 'node:readline';
29
- import 'expo-server-sdk';
30
- import './mcpToolSchemas-CdPXJQmb.mjs';
14
+ import 'chalk';
15
+ import './prompt-BsAZsPbo.mjs';
16
+ import './trimIdent-BAjmv_TG.mjs';
17
+ import './common-BdNgghUJ.mjs';
31
18
 
32
19
  function readGeminiLocalConfig() {
33
20
  let token = null;