very-happy-cli 0.2.143 → 0.2.145

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 (49) hide show
  1. package/dist/{AcpBackend-LEgn9vol.mjs → AcpBackend-BITeBnbV.mjs} +2 -2
  2. package/dist/{AcpBackend-B8oehrfU.cjs → AcpBackend-FPv5uXFa.cjs} +30 -30
  3. package/dist/{AcpSessionManager-BomdfyhZ.cjs → AcpSessionManager-vqLzM219.cjs} +9 -9
  4. package/dist/{AcpSessionManager-Yfbs5bi2.mjs → AcpSessionManager-w2srpWQJ.mjs} +1 -1
  5. package/dist/{agentGuidance-CJSl54ua.cjs → agentGuidance-Bd6GEiYp.cjs} +1 -1
  6. package/dist/{agentGuidance-BU4hxm8M.mjs → agentGuidance-HFHrz3C1.mjs} +1 -1
  7. package/dist/agentHome-CGl7FF7a.cjs +113 -0
  8. package/dist/agentHome-DBqr8rpv.mjs +107 -0
  9. package/dist/codex/happyMcpStdioBridge.cjs +2 -2
  10. package/dist/codex/happyMcpStdioBridge.mjs +2 -2
  11. package/dist/{config-euZ_K5Lo.mjs → config-B9zAvnGT.mjs} +4 -4
  12. package/dist/{config-CfqWoHmO.cjs → config-CPfFuHP6.cjs} +4 -4
  13. package/dist/{index-ZOMC8Gzn.mjs → index-BzLZu_aF.mjs} +8 -8
  14. package/dist/{index-PM_SsRpw.mjs → index-CxK0l_t0.mjs} +4 -4
  15. package/dist/{index-BREtikhm.cjs → index-D4Smqppj.cjs} +4 -4
  16. package/dist/{index-C510dSUn.cjs → index-DhwtFJEe.cjs} +309 -212
  17. package/dist/{index-Bj68y6ee.cjs → index-avfJgX4p.cjs} +31 -31
  18. package/dist/{index-DoiG88oX.mjs → index-eBrE-0R1.mjs} +136 -39
  19. package/dist/index.cjs +4 -4
  20. package/dist/index.mjs +4 -4
  21. package/dist/{installTerminalHooks-BGVQqbgq.mjs → installTerminalHooks-Dq1MFFDQ.mjs} +4 -4
  22. package/dist/{installTerminalHooks-C_jraM1j.cjs → installTerminalHooks-DspFGxBI.cjs} +4 -4
  23. package/dist/lib.cjs +5 -5
  24. package/dist/lib.mjs +2 -2
  25. package/dist/{limits-uABU-yq3.mjs → limits-CzWD9hWU.mjs} +8 -8
  26. package/dist/{limits-B3oVgqBJ.cjs → limits-DGZB-OVl.cjs} +7 -7
  27. package/dist/{mcp-G-3lL_KH.cjs → mcp-BioGrTC_.cjs} +9 -9
  28. package/dist/{mcp-CfbTQXyh.mjs → mcp-L1Yq25LB.mjs} +4 -4
  29. package/dist/{piRuntime-CWE-1W-y.cjs → piRuntime-DodWS0UI.cjs} +2 -2
  30. package/dist/{piRuntime-BE6iYQwU.mjs → piRuntime-UdVG4eJ7.mjs} +2 -2
  31. package/dist/{piTerminal-Dyc_9pGP.cjs → piTerminal-6P00O_w8.cjs} +6 -6
  32. package/dist/{piTerminal-rqKn1_Zy.mjs → piTerminal-BIRroC_N.mjs} +6 -6
  33. package/dist/{runGemini-BMlXIaTL.mjs → runGemini-B-It6K8t.mjs} +6 -6
  34. package/dist/{runGemini-C6qMFzcn.cjs → runGemini-ChCHjnIh.cjs} +24 -24
  35. package/dist/{runOpenClaw-C2_aCP7v.cjs → runOpenClaw-Cc4_zmHz.cjs} +26 -26
  36. package/dist/{runOpenClaw-CoO5Vp3S.mjs → runOpenClaw-DET6LY2v.mjs} +5 -5
  37. package/dist/{send-CBrJylJc.mjs → send-CPayvXBm.mjs} +4 -4
  38. package/dist/{send-DGVwmB-p.cjs → send-LBjLfAos.cjs} +4 -4
  39. package/dist/{sessions-DbLubh2N.mjs → sessions-CJUEp43_.mjs} +4 -4
  40. package/dist/{sessions-DyQXMN-8.cjs → sessions-WBowxNO-.cjs} +5 -5
  41. package/dist/{spawn-DIyFOn3W.cjs → spawn-BqgZc7YE.cjs} +6 -6
  42. package/dist/{spawn-wkkxEGdF.mjs → spawn-Dcetf5Jt.mjs} +4 -4
  43. package/dist/{teams-BTyVFK3P.mjs → teams-CW_Zb2Q1.mjs} +4 -4
  44. package/dist/{teams-QOkGFjkJ.cjs → teams-eIUxGmqg.cjs} +4 -4
  45. package/dist/{todo-DoLkqdBe.mjs → todo-CV5fwHg_.mjs} +3 -3
  46. package/dist/{todo-Du6pjwx_.cjs → todo-DeouLiGa.cjs} +5 -5
  47. package/dist/{types-BG4gFjLL.mjs → types-BbvxVQF3.mjs} +321 -11
  48. package/dist/{types-6__wqmmP.cjs → types-Bqo68u61.cjs} +328 -9
  49. package/package.json +7 -7
@@ -1,8 +1,8 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
3
3
  import { randomUUID } from 'node:crypto';
4
- import { l as logger, p as packageJson } from './limits-uABU-yq3.mjs';
5
- import { l as contentLogMetadata, k as errorLogMetadata, m as delay } from './types-BG4gFjLL.mjs';
4
+ import { l as logger, p as packageJson } from './limits-CzWD9hWU.mjs';
5
+ import { t as contentLogMetadata, q as errorLogMetadata, u as delay } from './types-BbvxVQF3.mjs';
6
6
 
7
7
  function acpImageBlocks(attachments, supportsImages) {
8
8
  return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
@@ -3,8 +3,8 @@
3
3
  var node_child_process = require('node:child_process');
4
4
  var sdk = require('@agentclientprotocol/sdk');
5
5
  var node_crypto = require('node:crypto');
6
- var persistence = require('./limits-B3oVgqBJ.cjs');
7
- var api = require('./types-6__wqmmP.cjs');
6
+ var persistence = require('./limits-DGZB-OVl.cjs');
7
+ var index = require('./types-Bqo68u61.cjs');
8
8
 
9
9
  function acpImageBlocks(attachments, supportsImages) {
10
10
  return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
@@ -246,7 +246,7 @@ function handleAgentMessageChunk(update, ctx) {
246
246
  payload: { text, streaming: true }
247
247
  });
248
248
  } else {
249
- persistence.logger.debug("[AcpBackend] Received message chunk:", api.contentLogMetadata(text));
249
+ persistence.logger.debug("[AcpBackend] Received message chunk:", index.contentLogMetadata(text));
250
250
  ctx.emit({
251
251
  type: "model-output",
252
252
  textDelta: text
@@ -275,7 +275,7 @@ function handleAgentThoughtChunk(update, ctx) {
275
275
  }
276
276
  if (ctx.activeToolCalls.size > 0) {
277
277
  persistence.logger.debug("[AcpBackend] Thinking chunk received during active tool calls:", {
278
- ...api.contentLogMetadata(text),
278
+ ...index.contentLogMetadata(text),
279
279
  activeToolCallCount: ctx.activeToolCalls.size
280
280
  });
281
281
  }
@@ -377,7 +377,7 @@ function failToolCall(toolCallId, status, toolKind, content, ctx) {
377
377
  persistence.logger.debug(`[AcpBackend] \u{1F50D} \u26A0\uFE0F Investigation tool failed at ~3 minutes - likely Gemini CLI timeout, not our timeout`);
378
378
  }
379
379
  }
380
- persistence.logger.debug("[AcpBackend] Investigation tool failed with content metadata:", api.contentLogMetadata(content));
380
+ persistence.logger.debug("[AcpBackend] Investigation tool failed with content metadata:", index.contentLogMetadata(content));
381
381
  persistence.logger.debug(`[AcpBackend] \u{1F50D} Investigation tool timeout status BEFORE cleanup: ${hadTimeout ? "timeout was set" : "no timeout was set"}`);
382
382
  persistence.logger.debug(`[AcpBackend] \u{1F50D} Investigation tool startTime status BEFORE cleanup: ${startTime ? `set at ${new Date(startTime).toISOString()}` : "not set"}`);
383
383
  }
@@ -396,7 +396,7 @@ function failToolCall(toolCallId, status, toolKind, content, ctx) {
396
396
  persistence.logger.debug(`[AcpBackend] Tool call ${status.toUpperCase()}: ${toolCallId} - Duration: ${durationStr}. Active tool calls: ${ctx.activeToolCalls.size}`);
397
397
  const errorDetail = extractErrorDetail(content);
398
398
  if (errorDetail) {
399
- persistence.logger.debug("[AcpBackend] Tool call error detail received:", api.contentLogMetadata(errorDetail));
399
+ persistence.logger.debug("[AcpBackend] Tool call error detail received:", index.contentLogMetadata(errorDetail));
400
400
  } else {
401
401
  persistence.logger.debug(`[AcpBackend] \u274C Tool call ${status} but no error details in content`);
402
402
  }
@@ -416,7 +416,7 @@ function handleToolCallUpdate(update, ctx) {
416
416
  const status = update.status;
417
417
  const toolCallId = update.toolCallId;
418
418
  if (!toolCallId) {
419
- persistence.logger.debug("[AcpBackend] Tool call update without toolCallId:", api.contentLogMetadata(update));
419
+ persistence.logger.debug("[AcpBackend] Tool call update without toolCallId:", index.contentLogMetadata(update));
420
420
  return { handled: false };
421
421
  }
422
422
  const toolKind = update.kind || "unknown";
@@ -540,7 +540,7 @@ function nodeToWebStreams(stdin, stdout) {
540
540
  return new Promise((resolve, reject) => {
541
541
  const ok = stdin.write(chunk, (err) => {
542
542
  if (err) {
543
- persistence.logger.debug("[AcpBackend] Error writing to stdin:", api.errorLogMetadata(err));
543
+ persistence.logger.debug("[AcpBackend] Error writing to stdin:", index.errorLogMetadata(err));
544
544
  reject(err);
545
545
  }
546
546
  });
@@ -569,7 +569,7 @@ function nodeToWebStreams(stdin, stdout) {
569
569
  controller.close();
570
570
  });
571
571
  stdout.on("error", (err) => {
572
- persistence.logger.debug("[AcpBackend] Stdout error:", api.errorLogMetadata(err));
572
+ persistence.logger.debug("[AcpBackend] Stdout error:", index.errorLogMetadata(err));
573
573
  controller.error(err);
574
574
  });
575
575
  },
@@ -592,9 +592,9 @@ async function withRetry(operation, options) {
592
592
  options.baseDelayMs * Math.pow(2, attempt - 1),
593
593
  options.maxDelayMs
594
594
  );
595
- persistence.logger.debug(`[AcpBackend] ${options.operationName} failed (attempt ${attempt}/${options.maxAttempts}). Retrying in ${delayMs}ms...`, api.errorLogMetadata(lastError));
595
+ persistence.logger.debug(`[AcpBackend] ${options.operationName} failed (attempt ${attempt}/${options.maxAttempts}). Retrying in ${delayMs}ms...`, index.errorLogMetadata(lastError));
596
596
  options.onRetry?.(attempt, lastError);
597
- await api.delay(delayMs);
597
+ await index.delay(delayMs);
598
598
  } else {
599
599
  break;
600
600
  }
@@ -648,7 +648,7 @@ class AcpBackend {
648
648
  try {
649
649
  listener(msg);
650
650
  } catch (error) {
651
- persistence.logger.warn("[AcpBackend] Error in message handler:", api.errorLogMetadata(error));
651
+ persistence.logger.warn("[AcpBackend] Error in message handler:", index.errorLogMetadata(error));
652
652
  }
653
653
  }
654
654
  }
@@ -710,7 +710,7 @@ class AcpBackend {
710
710
  };
711
711
  persistence.logger.debug("[AcpBackend] Agent stderr received:", {
712
712
  investigationActive: hasActiveInvestigation,
713
- ...api.contentLogMetadata(text)
713
+ ...index.contentLogMetadata(text)
714
714
  });
715
715
  if (this.transport.handleStderr) {
716
716
  const result = this.transport.handleStderr(text, context);
@@ -721,7 +721,7 @@ class AcpBackend {
721
721
  });
722
722
  this.process.on("error", (err) => {
723
723
  signalStartupFailure(err);
724
- persistence.logger.debug("[AcpBackend] Process error:", api.errorLogMetadata(err));
724
+ persistence.logger.debug("[AcpBackend] Process error:", index.errorLogMetadata(err));
725
725
  startupStatusErrorEmitted = true;
726
726
  this.emit({ type: "status", status: "error", detail: err.message });
727
727
  });
@@ -782,7 +782,7 @@ class AcpBackend {
782
782
  }
783
783
  }
784
784
  } catch (error) {
785
- persistence.logger.debug("[AcpBackend] Error filtering stdout stream:", api.errorLogMetadata(error));
785
+ persistence.logger.debug("[AcpBackend] Error filtering stdout stream:", index.errorLogMetadata(error));
786
786
  controller.error(error);
787
787
  } finally {
788
788
  reader.releaseLock();
@@ -816,7 +816,7 @@ class AcpBackend {
816
816
  hasToolCall: !!toolCall,
817
817
  toolCallId,
818
818
  optionCount: options.length,
819
- input: api.contentLogMetadata(input)
819
+ input: index.contentLogMetadata(input)
820
820
  });
821
821
  this.emit({
822
822
  type: "permission-request",
@@ -879,7 +879,7 @@ class AcpBackend {
879
879
  }
880
880
  return { outcome: { outcome: "selected", optionId } };
881
881
  } catch (error) {
882
- persistence.logger.debug("[AcpBackend] Error in permission handler:", api.errorLogMetadata(error));
882
+ persistence.logger.debug("[AcpBackend] Error in permission handler:", index.errorLogMetadata(error));
883
883
  return { outcome: { outcome: "selected", optionId: "cancel" } };
884
884
  }
885
885
  }
@@ -1013,13 +1013,13 @@ class AcpBackend {
1013
1013
  this.emitIdleStatus();
1014
1014
  if (initialPrompt) {
1015
1015
  this.sendPrompt(sessionId, initialPrompt).catch((error) => {
1016
- persistence.logger.debug("[AcpBackend] Error sending initial prompt:", api.errorLogMetadata(error));
1016
+ persistence.logger.debug("[AcpBackend] Error sending initial prompt:", index.errorLogMetadata(error));
1017
1017
  this.emit({ type: "status", status: "error", detail: String(error) });
1018
1018
  });
1019
1019
  }
1020
1020
  return { sessionId };
1021
1021
  } catch (error) {
1022
- persistence.logger.debug("[AcpBackend] Error starting session:", api.errorLogMetadata(error));
1022
+ persistence.logger.debug("[AcpBackend] Error starting session:", index.errorLogMetadata(error));
1023
1023
  if (!startupStatusErrorEmitted) {
1024
1024
  this.emit({
1025
1025
  type: "status",
@@ -1091,12 +1091,12 @@ class AcpBackend {
1091
1091
  const notification = params;
1092
1092
  const update = notification.update;
1093
1093
  if (!update) {
1094
- persistence.logger.debug("[AcpBackend] Received session update without update field:", api.contentLogMetadata(params));
1094
+ persistence.logger.debug("[AcpBackend] Received session update without update field:", index.contentLogMetadata(params));
1095
1095
  return;
1096
1096
  }
1097
1097
  const sessionUpdateType = update.sessionUpdate;
1098
1098
  const updateType = sessionUpdateType;
1099
- const updateMetadata = api.contentLogMetadata(update);
1099
+ const updateMetadata = index.contentLogMetadata(update);
1100
1100
  persistence.logger.debug(`[AcpBackend] Received session update type: ${sessionUpdateType ?? "unknown"}`, updateMetadata);
1101
1101
  if (this.options.verbose) {
1102
1102
  logAcpBackendMuted(
@@ -1170,7 +1170,7 @@ class AcpBackend {
1170
1170
  "current_mode_update"
1171
1171
  ];
1172
1172
  if (updateType && !handledTypes.includes(updateType) && !update.messageChunk && !update.plan && !update.thinking) {
1173
- persistence.logger.debug(`[AcpBackend] Unhandled session update type: ${updateType}`, api.contentLogMetadata(update));
1173
+ persistence.logger.debug(`[AcpBackend] Unhandled session update type: ${updateType}`, index.contentLogMetadata(update));
1174
1174
  }
1175
1175
  }
1176
1176
  // Promise resolver for waitForIdle - set when waiting for response to complete
@@ -1198,7 +1198,7 @@ class AcpBackend {
1198
1198
  try {
1199
1199
  persistence.logger.debug("[AcpBackend] Sending prompt:", {
1200
1200
  sessionId,
1201
- ...api.contentLogMetadata(prompt)
1201
+ ...index.contentLogMetadata(prompt)
1202
1202
  });
1203
1203
  const contentBlock = {
1204
1204
  type: "text",
@@ -1218,7 +1218,7 @@ class AcpBackend {
1218
1218
  }
1219
1219
  persistence.logger.debug("[AcpBackend] Prompt request sent to ACP connection");
1220
1220
  } catch (error) {
1221
- persistence.logger.debug("[AcpBackend] Error sending prompt:", api.errorLogMetadata(error));
1221
+ persistence.logger.debug("[AcpBackend] Error sending prompt:", index.errorLogMetadata(error));
1222
1222
  this.waitingForResponse = false;
1223
1223
  let errorDetail;
1224
1224
  if (error instanceof Error) {
@@ -1269,8 +1269,8 @@ class AcpBackend {
1269
1269
  } catch (error) {
1270
1270
  persistence.logger.debug("[AcpBackend] Failed to set session config option:", {
1271
1271
  configId,
1272
- value: api.contentLogMetadata(value),
1273
- error: api.errorLogMetadata(error)
1272
+ value: index.contentLogMetadata(value),
1273
+ error: index.errorLogMetadata(error)
1274
1274
  });
1275
1275
  return false;
1276
1276
  }
@@ -1295,7 +1295,7 @@ class AcpBackend {
1295
1295
  });
1296
1296
  return true;
1297
1297
  } catch (error) {
1298
- persistence.logger.debug("[AcpBackend] Failed to set session mode:", { modeId, error: api.errorLogMetadata(error) });
1298
+ persistence.logger.debug("[AcpBackend] Failed to set session mode:", { modeId, error: index.errorLogMetadata(error) });
1299
1299
  return false;
1300
1300
  }
1301
1301
  }
@@ -1317,7 +1317,7 @@ class AcpBackend {
1317
1317
  });
1318
1318
  return true;
1319
1319
  } catch (error) {
1320
- persistence.logger.debug("[AcpBackend] Failed to set session model:", { modelId, error: api.errorLogMetadata(error) });
1320
+ persistence.logger.debug("[AcpBackend] Failed to set session model:", { modelId, error: index.errorLogMetadata(error) });
1321
1321
  return false;
1322
1322
  }
1323
1323
  }
@@ -1361,7 +1361,7 @@ class AcpBackend {
1361
1361
  await this.connection.cancel({ sessionId: this.acpSessionId });
1362
1362
  this.emit({ type: "status", status: "idle", detail: "Cancelled by user" });
1363
1363
  } catch (error) {
1364
- persistence.logger.debug("[AcpBackend] Error cancelling:", api.errorLogMetadata(error));
1364
+ persistence.logger.debug("[AcpBackend] Error cancelling:", index.errorLogMetadata(error));
1365
1365
  }
1366
1366
  }
1367
1367
  /**
@@ -1395,7 +1395,7 @@ class AcpBackend {
1395
1395
  // 2s timeout for graceful shutdown
1396
1396
  ]);
1397
1397
  } catch (error) {
1398
- persistence.logger.debug("[AcpBackend] Error during graceful shutdown:", api.errorLogMetadata(error));
1398
+ persistence.logger.debug("[AcpBackend] Error during graceful shutdown:", index.errorLogMetadata(error));
1399
1399
  }
1400
1400
  }
1401
1401
  if (this.process) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var api = require('./types-6__wqmmP.cjs');
4
+ var index = require('./types-Bqo68u61.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  return turnId ? { turn: turnId, time } : { time };
@@ -108,12 +108,12 @@ class AcpSessionManager {
108
108
  }
109
109
  const options = {
110
110
  ...turnOptions(this.currentTurnId, this.nextTime()),
111
- ...key ? { streamKey: api.streamKeyOf(key.mid, key.idx) } : {}
111
+ ...key ? { streamKey: index.streamKeyOf(key.mid, key.idx) } : {}
112
112
  };
113
113
  if (type === "thinking") {
114
- return [api.createEnvelope("agent", { t: "text", text, thinking: true }, options)];
114
+ return [index.createEnvelope("agent", { t: "text", text, thinking: true }, options)];
115
115
  }
116
- return [api.createEnvelope("agent", { t: "text", text }, options)];
116
+ return [index.createEnvelope("agent", { t: "text", text }, options)];
117
117
  }
118
118
  startTurn() {
119
119
  if (this.currentTurnId) {
@@ -125,7 +125,7 @@ class AcpSessionManager {
125
125
  this.blockCursor = 0;
126
126
  return [
127
127
  ...flushed,
128
- api.createEnvelope("agent", { t: "turn-start" }, { turn: this.currentTurnId, time: this.nextTime() })
128
+ index.createEnvelope("agent", { t: "turn-start" }, { turn: this.currentTurnId, time: this.nextTime() })
129
129
  ];
130
130
  }
131
131
  endTurn(status) {
@@ -138,7 +138,7 @@ class AcpSessionManager {
138
138
  this.acpCallToSessionCall.clear();
139
139
  return [
140
140
  ...flushed,
141
- api.createEnvelope("agent", { t: "turn-end", status }, { turn: turnId, time: this.nextTime() })
141
+ index.createEnvelope("agent", { t: "turn-end", status }, { turn: turnId, time: this.nextTime() })
142
142
  ];
143
143
  }
144
144
  mapMessage(msg) {
@@ -156,7 +156,7 @@ class AcpSessionManager {
156
156
  }
157
157
  return [
158
158
  ...this.flush(),
159
- api.createEnvelope("agent", { t: "text", text: trimmed, thinking: true }, turnOptions(this.currentTurnId, this.nextTime()))
159
+ index.createEnvelope("agent", { t: "text", text: trimmed, thinking: true }, turnOptions(this.currentTurnId, this.nextTime()))
160
160
  ];
161
161
  }
162
162
  if (msg.type === "status") {
@@ -174,7 +174,7 @@ class AcpSessionManager {
174
174
  const call = this.ensureSessionCallId(msg.callId);
175
175
  return [
176
176
  ...flushed,
177
- api.createEnvelope("agent", {
177
+ index.createEnvelope("agent", {
178
178
  t: "tool-call-start",
179
179
  call,
180
180
  name: msg.toolName,
@@ -190,7 +190,7 @@ class AcpSessionManager {
190
190
  const result = toolCallEndResult(msg.result);
191
191
  return [
192
192
  ...flushed,
193
- api.createEnvelope("agent", { t: "tool-call-end", call, ...result ? { result } : {} }, turnOptions(this.currentTurnId, this.nextTime()))
193
+ index.createEnvelope("agent", { t: "tool-call-end", call, ...result ? { result } : {} }, turnOptions(this.currentTurnId, this.nextTime()))
194
194
  ];
195
195
  }
196
196
  return [];
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { b as streamKeyOf, d as createEnvelope } from './types-BG4gFjLL.mjs';
2
+ import { f as streamKeyOf, g as createEnvelope } from './types-BbvxVQF3.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  return turnId ? { turn: turnId, time } : { time };
@@ -2,7 +2,7 @@
2
2
 
3
3
  var z = require('zod');
4
4
  var node_crypto = require('node:crypto');
5
- var persistence = require('./limits-B3oVgqBJ.cjs');
5
+ var persistence = require('./limits-DGZB-OVl.cjs');
6
6
  var promises = require('node:fs/promises');
7
7
  var node_fs = require('node:fs');
8
8
  var path = require('node:path');
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { randomUUID } from 'node:crypto';
3
- import { n as normalizeHttpEndpoint, c as configuration, f as readSettings, r as readPersistedSessions, d as readCredentialsForConfiguredRelay } from './limits-uABU-yq3.mjs';
3
+ import { n as normalizeHttpEndpoint, c as configuration, r as readSettings, d as readPersistedSessions, e as readCredentialsForConfiguredRelay } from './limits-CzWD9hWU.mjs';
4
4
  import { open, mkdir, rename, unlink } from 'node:fs/promises';
5
5
  import { constants } from 'node:fs';
6
6
  import { isAbsolute, join, dirname } from 'node:path';
@@ -0,0 +1,113 @@
1
+ 'use strict';
2
+
3
+ var chalk = require('chalk');
4
+ var os = require('node:os');
5
+ var persistence = require('./limits-DGZB-OVl.cjs');
6
+ require('node:fs');
7
+ var index = require('./types-Bqo68u61.cjs');
8
+ require('node:fs/promises');
9
+ require('node:path');
10
+ require('zod');
11
+ require('node:crypto');
12
+ require('tweetnacl');
13
+ require('node:util');
14
+ require('axios');
15
+ require('node:events');
16
+ require('socket.io-client');
17
+ require('@paralleldrive/cuid2');
18
+ require('child_process');
19
+ require('util');
20
+ require('fs/promises');
21
+ require('crypto');
22
+ require('path');
23
+ require('cross-spawn');
24
+ require('./projectPath-ChLhdOyt.cjs');
25
+ require('url');
26
+ require('os');
27
+ require('node:child_process');
28
+ require('node-pty');
29
+ require('fs');
30
+ require('node:readline');
31
+ require('@anthropic-ai/sandbox-runtime');
32
+ require('expo-server-sdk');
33
+
34
+ const AGENT_HOME_HELP = `very-happy agent-home \u2014 where Claude Code / Codex keep their conversations
35
+
36
+ Usage:
37
+ very-happy agent-home Show the resolved directories and their source
38
+ very-happy agent-home set claude <dir> Pin the Claude config dir for this machine
39
+ very-happy agent-home set codex <dir> Pin the Codex home for this machine
40
+ very-happy agent-home clear [claude|codex]
41
+ Drop the pin(s); the login shell is used again
42
+
43
+ The daemon asks your login shell for CLAUDE_CONFIG_DIR / CODEX_HOME before
44
+ every spawn, so exporting them in your shell rc is normally enough \u2014 a resume
45
+ from the web then finds the same transcript as \`claude --resume\` in a
46
+ terminal. Pin a directory only when that answer is wrong for this machine.
47
+ The pin lives in $HAPPY_HOME_DIR/settings.json and takes effect on the next
48
+ spawn (no daemon restart needed).`;
49
+ function parseKind(value) {
50
+ return value === "claude" || value === "codex" ? value : null;
51
+ }
52
+ function parseAgentHomeArgs(args) {
53
+ if (args.includes("-h") || args.includes("--help")) return { action: "help" };
54
+ if (args.length === 0) return { action: "show" };
55
+ const [verb, kindArg, dir] = args;
56
+ if (verb === "set") {
57
+ const kind = parseKind(kindArg);
58
+ if (!kind || !dir?.trim() || args.length > 3) throw new Error("Usage: very-happy agent-home set <claude|codex> <dir>");
59
+ return { action: "set", kind, dir: dir.trim() };
60
+ }
61
+ if (verb === "clear") {
62
+ if (args.length === 1) return { action: "clear", kind: "both" };
63
+ const kind = parseKind(kindArg);
64
+ if (!kind || args.length > 2) throw new Error("Usage: very-happy agent-home clear [claude|codex]");
65
+ return { action: "clear", kind };
66
+ }
67
+ throw new Error(`Unknown agent-home command: ${verb}. See very-happy agent-home --help`);
68
+ }
69
+ async function resolveAgentHomesForCli() {
70
+ const settings = await persistence.readSettings();
71
+ const loginShellEnv = await index.probeLoginShellEnv(index.AGENT_HOME_ENV_NAMES);
72
+ return index.resolveAgentHomes({
73
+ settings: { claudeConfigDir: settings.claudeConfigDir, codexHome: settings.codexHome },
74
+ daemonEnv: process.env,
75
+ loginShellEnv,
76
+ homeDir: os.homedir()
77
+ });
78
+ }
79
+ function formatAgentHomes(homes) {
80
+ return [
81
+ `Claude config dir: ${index.describeAgentHome(homes.claudeConfigDir)}`,
82
+ `Codex home: ${index.describeAgentHome(homes.codexHome)}`
83
+ ].join("\n");
84
+ }
85
+ async function runAgentHomeCommand(command) {
86
+ if (command.action === "help") {
87
+ console.log(AGENT_HOME_HELP);
88
+ return;
89
+ }
90
+ if (command.action === "set") {
91
+ const dir = index.expandHomePath(command.dir, os.homedir());
92
+ await persistence.updateSettings((current) => command.kind === "claude" ? { ...current, claudeConfigDir: dir } : { ...current, codexHome: dir });
93
+ console.log(chalk.green(`\u2713 ${command.kind === "claude" ? "Claude config dir" : "Codex home"} pinned to ${dir}`));
94
+ } else if (command.action === "clear") {
95
+ await persistence.updateSettings((current) => {
96
+ const next = { ...current };
97
+ if (command.kind !== "codex") delete next.claudeConfigDir;
98
+ if (command.kind !== "claude") delete next.codexHome;
99
+ return next;
100
+ });
101
+ console.log(chalk.green("\u2713 Pin cleared; the login shell answer is used again"));
102
+ }
103
+ console.log(formatAgentHomes(await resolveAgentHomesForCli()));
104
+ if (command.action !== "show") {
105
+ console.log(chalk.gray(" Takes effect on the next spawn/resume; running sessions keep their directory."));
106
+ }
107
+ }
108
+
109
+ exports.AGENT_HOME_HELP = AGENT_HOME_HELP;
110
+ exports.formatAgentHomes = formatAgentHomes;
111
+ exports.parseAgentHomeArgs = parseAgentHomeArgs;
112
+ exports.resolveAgentHomesForCli = resolveAgentHomesForCli;
113
+ exports.runAgentHomeCommand = runAgentHomeCommand;
@@ -0,0 +1,107 @@
1
+ import chalk from 'chalk';
2
+ import { homedir } from 'node:os';
3
+ import { r as readSettings, u as updateSettings } from './limits-CzWD9hWU.mjs';
4
+ import 'node:fs';
5
+ import { d as describeAgentHome, p as probeLoginShellEnv, r as resolveAgentHomes, e as expandHomePath, b as AGENT_HOME_ENV_NAMES } from './types-BbvxVQF3.mjs';
6
+ import 'node:fs/promises';
7
+ import 'node:path';
8
+ import 'zod';
9
+ import 'node:crypto';
10
+ import 'tweetnacl';
11
+ import 'node:util';
12
+ import 'axios';
13
+ import 'node:events';
14
+ import 'socket.io-client';
15
+ import '@paralleldrive/cuid2';
16
+ import 'child_process';
17
+ import 'util';
18
+ import 'fs/promises';
19
+ import 'crypto';
20
+ import 'path';
21
+ import 'cross-spawn';
22
+ import './projectPath-CSpqWdxp.mjs';
23
+ import 'url';
24
+ import 'os';
25
+ import 'node:child_process';
26
+ import 'node-pty';
27
+ import 'fs';
28
+ import 'node:readline';
29
+ import '@anthropic-ai/sandbox-runtime';
30
+ import 'expo-server-sdk';
31
+
32
+ const AGENT_HOME_HELP = `very-happy agent-home \u2014 where Claude Code / Codex keep their conversations
33
+
34
+ Usage:
35
+ very-happy agent-home Show the resolved directories and their source
36
+ very-happy agent-home set claude <dir> Pin the Claude config dir for this machine
37
+ very-happy agent-home set codex <dir> Pin the Codex home for this machine
38
+ very-happy agent-home clear [claude|codex]
39
+ Drop the pin(s); the login shell is used again
40
+
41
+ The daemon asks your login shell for CLAUDE_CONFIG_DIR / CODEX_HOME before
42
+ every spawn, so exporting them in your shell rc is normally enough \u2014 a resume
43
+ from the web then finds the same transcript as \`claude --resume\` in a
44
+ terminal. Pin a directory only when that answer is wrong for this machine.
45
+ The pin lives in $HAPPY_HOME_DIR/settings.json and takes effect on the next
46
+ spawn (no daemon restart needed).`;
47
+ function parseKind(value) {
48
+ return value === "claude" || value === "codex" ? value : null;
49
+ }
50
+ function parseAgentHomeArgs(args) {
51
+ if (args.includes("-h") || args.includes("--help")) return { action: "help" };
52
+ if (args.length === 0) return { action: "show" };
53
+ const [verb, kindArg, dir] = args;
54
+ if (verb === "set") {
55
+ const kind = parseKind(kindArg);
56
+ if (!kind || !dir?.trim() || args.length > 3) throw new Error("Usage: very-happy agent-home set <claude|codex> <dir>");
57
+ return { action: "set", kind, dir: dir.trim() };
58
+ }
59
+ if (verb === "clear") {
60
+ if (args.length === 1) return { action: "clear", kind: "both" };
61
+ const kind = parseKind(kindArg);
62
+ if (!kind || args.length > 2) throw new Error("Usage: very-happy agent-home clear [claude|codex]");
63
+ return { action: "clear", kind };
64
+ }
65
+ throw new Error(`Unknown agent-home command: ${verb}. See very-happy agent-home --help`);
66
+ }
67
+ async function resolveAgentHomesForCli() {
68
+ const settings = await readSettings();
69
+ const loginShellEnv = await probeLoginShellEnv(AGENT_HOME_ENV_NAMES);
70
+ return resolveAgentHomes({
71
+ settings: { claudeConfigDir: settings.claudeConfigDir, codexHome: settings.codexHome },
72
+ daemonEnv: process.env,
73
+ loginShellEnv,
74
+ homeDir: homedir()
75
+ });
76
+ }
77
+ function formatAgentHomes(homes) {
78
+ return [
79
+ `Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}`,
80
+ `Codex home: ${describeAgentHome(homes.codexHome)}`
81
+ ].join("\n");
82
+ }
83
+ async function runAgentHomeCommand(command) {
84
+ if (command.action === "help") {
85
+ console.log(AGENT_HOME_HELP);
86
+ return;
87
+ }
88
+ if (command.action === "set") {
89
+ const dir = expandHomePath(command.dir, homedir());
90
+ await updateSettings((current) => command.kind === "claude" ? { ...current, claudeConfigDir: dir } : { ...current, codexHome: dir });
91
+ console.log(chalk.green(`\u2713 ${command.kind === "claude" ? "Claude config dir" : "Codex home"} pinned to ${dir}`));
92
+ } else if (command.action === "clear") {
93
+ await updateSettings((current) => {
94
+ const next = { ...current };
95
+ if (command.kind !== "codex") delete next.claudeConfigDir;
96
+ if (command.kind !== "claude") delete next.codexHome;
97
+ return next;
98
+ });
99
+ console.log(chalk.green("\u2713 Pin cleared; the login shell answer is used again"));
100
+ }
101
+ console.log(formatAgentHomes(await resolveAgentHomesForCli()));
102
+ if (command.action !== "show") {
103
+ console.log(chalk.gray(" Takes effect on the next spawn/resume; running sessions keep their directory."));
104
+ }
105
+ }
106
+
107
+ export { AGENT_HOME_HELP, formatAgentHomes, parseAgentHomeArgs, resolveAgentHomesForCli, runAgentHomeCommand };
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var agentGuidance = require('../agentGuidance-CJSl54ua.cjs');
3
+ var agentGuidance = require('../agentGuidance-Bd6GEiYp.cjs');
4
4
  var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
5
5
  var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
6
6
  var index_js = require('@modelcontextprotocol/sdk/client/index.js');
7
7
  var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
8
8
  var z = require('zod');
9
- var persistence = require('../limits-B3oVgqBJ.cjs');
9
+ var persistence = require('../limits-DGZB-OVl.cjs');
10
10
  require('node:crypto');
11
11
  require('node:fs/promises');
12
12
  require('node:fs');
@@ -1,10 +1,10 @@
1
- import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, r as registerTeamsTools } from '../agentGuidance-BU4hxm8M.mjs';
1
+ import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, r as registerTeamsTools } from '../agentGuidance-HFHrz3C1.mjs';
2
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
5
5
  import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
6
6
  import { z } from 'zod';
7
- import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-uABU-yq3.mjs';
7
+ import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-CzWD9hWU.mjs';
8
8
  import 'node:crypto';
9
9
  import 'node:fs/promises';
10
10
  import 'node:fs';
@@ -2,8 +2,8 @@ import { existsSync, readFileSync, mkdirSync, 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 './limits-uABU-yq3.mjs';
6
- import { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-DoiG88oX.mjs';
5
+ import { l as logger } from './limits-CzWD9hWU.mjs';
6
+ import { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-eBrE-0R1.mjs';
7
7
  import 'node:fs/promises';
8
8
  import 'node:fs';
9
9
  import 'node:os';
@@ -13,7 +13,7 @@ import 'node:crypto';
13
13
  import 'tweetnacl';
14
14
  import 'chalk';
15
15
  import 'node:util';
16
- import './types-BG4gFjLL.mjs';
16
+ import './types-BbvxVQF3.mjs';
17
17
  import 'axios';
18
18
  import 'node:events';
19
19
  import 'socket.io-client';
@@ -29,7 +29,7 @@ import 'node-pty';
29
29
  import 'node:readline';
30
30
  import '@anthropic-ai/sandbox-runtime';
31
31
  import 'expo-server-sdk';
32
- import './agentGuidance-BU4hxm8M.mjs';
32
+ import './agentGuidance-HFHrz3C1.mjs';
33
33
  import 'ink';
34
34
  import 'react';
35
35
  import '@anthropic-ai/claude-agent-sdk';
@@ -4,8 +4,8 @@ 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('./limits-B3oVgqBJ.cjs');
8
- var index = require('./index-C510dSUn.cjs');
7
+ var persistence = require('./limits-DGZB-OVl.cjs');
8
+ var index = require('./index-DhwtFJEe.cjs');
9
9
  require('node:fs/promises');
10
10
  require('node:fs');
11
11
  require('node:os');
@@ -15,7 +15,7 @@ require('node:crypto');
15
15
  require('tweetnacl');
16
16
  require('chalk');
17
17
  require('node:util');
18
- require('./types-6__wqmmP.cjs');
18
+ require('./types-Bqo68u61.cjs');
19
19
  require('axios');
20
20
  require('node:events');
21
21
  require('socket.io-client');
@@ -31,7 +31,7 @@ require('node-pty');
31
31
  require('node:readline');
32
32
  require('@anthropic-ai/sandbox-runtime');
33
33
  require('expo-server-sdk');
34
- require('./agentGuidance-CJSl54ua.cjs');
34
+ require('./agentGuidance-Bd6GEiYp.cjs');
35
35
  require('ink');
36
36
  require('react');
37
37
  require('@anthropic-ai/claude-agent-sdk');