very-happy-cli 0.2.98 → 0.2.100

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 (33) hide show
  1. package/dist/{AcpBackend-BXiGiFC7.mjs → AcpBackend-CGnE_dbe.mjs} +1 -1
  2. package/dist/{AcpBackend-DhR8ml8L.cjs → AcpBackend-oDDlCB78.cjs} +1 -1
  3. package/dist/{AcpSessionManager-Ckc0NFmf.cjs → AcpSessionManager-BTXK7Wn2.cjs} +1 -1
  4. package/dist/{AcpSessionManager-CDnrxAfQ.mjs → AcpSessionManager-XGnQqnaJ.mjs} +1 -1
  5. package/dist/{config-GJQc_kpD.cjs → config-CYGeJRgN.cjs} +2 -2
  6. package/dist/{config-B3pA9YsN.mjs → config-bUqA35dk.mjs} +2 -2
  7. package/dist/{index-CO1gNtuP.cjs → index-BFQ_XDUX.cjs} +245 -18
  8. package/dist/index-BXhSRb9N.cjs +57 -0
  9. package/dist/{index-CuUVSZnK.mjs → index-CPUJfdIJ.mjs} +241 -15
  10. package/dist/index-DlpWmQ1I.mjs +51 -0
  11. package/dist/{index-Bh5Rcy0s.mjs → index-j_bZV63O.mjs} +5 -5
  12. package/dist/{index-BBm2b34F.cjs → index-olwBiKj6.cjs} +4 -4
  13. package/dist/index.cjs +2 -2
  14. package/dist/index.mjs +2 -2
  15. package/dist/{installTerminalHooks-Ru0dn_zF.mjs → installTerminalHooks-DmC0SrNo.mjs} +2 -2
  16. package/dist/{installTerminalHooks-Cp9JVxQ-.cjs → installTerminalHooks-ZNRl9Qcl.cjs} +2 -2
  17. package/dist/lib.cjs +1 -1
  18. package/dist/lib.d.cts +1 -0
  19. package/dist/lib.d.mts +1 -0
  20. package/dist/lib.mjs +1 -1
  21. package/dist/{mcp-B5HMF24K.cjs → mcp-7xQMC2Az.cjs} +2 -2
  22. package/dist/{mcp-CQoVN0u2.mjs → mcp-CryukOBj.mjs} +2 -2
  23. package/dist/{runGemini-BBzPVzuc.cjs → runGemini-12hI-_Ng.cjs} +4 -4
  24. package/dist/{runGemini-CwZXQsgu.mjs → runGemini-BbTfrych.mjs} +4 -4
  25. package/dist/{runOpenClaw-B4nC6XGL.cjs → runOpenClaw-CYrNNJ7P.cjs} +3 -3
  26. package/dist/{runOpenClaw-C-jz4rWr.mjs → runOpenClaw-Cr8boJJ9.mjs} +3 -3
  27. package/dist/{send-DN-nVBEI.mjs → send-DMuE8f-q.mjs} +2 -2
  28. package/dist/{send-CWgaINHC.cjs → send-DQjba9jZ.cjs} +2 -2
  29. package/dist/{spawn-CqcfbOnk.mjs → spawn-F6qqH4Vw.mjs} +2 -2
  30. package/dist/{spawn-C0NSP84Y.cjs → spawn-d7F98wtf.cjs} +2 -2
  31. package/dist/{types-BP-4phS_.cjs → types-DTVA1Hp-.cjs} +24 -13
  32. package/dist/{types-Cl4vWuDY.mjs → types-Dt0OQ0gL.mjs} +23 -12
  33. package/package.json +7 -7
@@ -1,7 +1,7 @@
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, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-Cl4vWuDY.mjs';
4
+ import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-Dt0OQ0gL.mjs';
5
5
 
6
6
  const DEFAULT_TIMEOUTS = {
7
7
  /** Default initialization timeout: 60 seconds */
@@ -3,7 +3,7 @@
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('./types-BP-4phS_.cjs');
6
+ var persistence = require('./types-DTVA1Hp-.cjs');
7
7
 
8
8
  const DEFAULT_TIMEOUTS = {
9
9
  /** Default initialization timeout: 60 seconds */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var persistence = require('./types-BP-4phS_.cjs');
4
+ var persistence = require('./types-DTVA1Hp-.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  return turnId ? { turn: turnId, time } : { time };
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { b as createEnvelope } from './types-Cl4vWuDY.mjs';
2
+ import { b as createEnvelope } from './types-Dt0OQ0gL.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  return turnId ? { turn: turnId, time } : { time };
@@ -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('./types-BP-4phS_.cjs');
8
- var index = require('./index-CO1gNtuP.cjs');
7
+ var persistence = require('./types-DTVA1Hp-.cjs');
8
+ var index = require('./index-BFQ_XDUX.cjs');
9
9
  require('axios');
10
10
  require('chalk');
11
11
  require('node:util');
@@ -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 './types-Cl4vWuDY.mjs';
6
- import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-CuUVSZnK.mjs';
5
+ import { l as logger } from './types-Dt0OQ0gL.mjs';
6
+ import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-CPUJfdIJ.mjs';
7
7
  import 'axios';
8
8
  import 'chalk';
9
9
  import 'node:util';
@@ -3,7 +3,7 @@
3
3
  var chalk = require('chalk');
4
4
  var os = require('node:os');
5
5
  var node_crypto = require('node:crypto');
6
- var persistence = require('./types-BP-4phS_.cjs');
6
+ var persistence = require('./types-DTVA1Hp-.cjs');
7
7
  var spawn = require('cross-spawn');
8
8
  var path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -1601,6 +1601,10 @@ function query(params) {
1601
1601
  strictMcpConfig: opts?.strictMcpConfig,
1602
1602
  sessionId: void 0,
1603
1603
  effort: opts?.effort,
1604
+ forkSession: opts?.forkSession,
1605
+ tools: opts?.tools,
1606
+ persistSession: opts?.persistSession,
1607
+ includePartialMessages: opts?.includePartialMessages,
1604
1608
  onElicitation: opts?.onElicitation,
1605
1609
  onUserDialog: opts?.onUserDialog,
1606
1610
  supportedDialogKinds: opts?.onUserDialog ? opts.supportedDialogKinds : void 0
@@ -1618,7 +1622,10 @@ function query(params) {
1618
1622
  for (const [key, value] of Object.entries(process.env)) {
1619
1623
  if (typeof value === "string") env[key] = value;
1620
1624
  }
1621
- env.CLAUDE_CODE_ENTRYPOINT = resolveHappyEntrypoint(process.env.CLAUDE_CODE_ENTRYPOINT);
1625
+ for (const [key, value] of Object.entries(opts?.env ?? {})) {
1626
+ if (typeof value === "string") env[key] = value;
1627
+ }
1628
+ env.CLAUDE_CODE_ENTRYPOINT = resolveHappyEntrypoint(env.CLAUDE_CODE_ENTRYPOINT);
1622
1629
  pinSmallFastModel(env);
1623
1630
  if (opts?.mcpServers && Object.keys(opts.mcpServers).length > 0) {
1624
1631
  ensureLocalProxyBypass(env);
@@ -6771,7 +6778,7 @@ function parseJsonObject(text) {
6771
6778
  return null;
6772
6779
  }
6773
6780
  }
6774
- function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CO1gNtuP.cjs', document.baseURI).href))).resolve(s)) {
6781
+ function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BFQ_XDUX.cjs', document.baseURI).href))).resolve(s)) {
6775
6782
  const platformArch = `${platform}-${arch}`;
6776
6783
  const candidates = [
6777
6784
  `@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
@@ -9934,12 +9941,221 @@ function registerKillSessionHandler(rpcHandlerManager, killThisHappy, archiveEve
9934
9941
  });
9935
9942
  }
9936
9943
 
9944
+ const SIDE_QUESTION_SYSTEM_PROMPT = [
9945
+ "This is a SIDE QUESTION from the user, asked next to the main conversation above.",
9946
+ "Answer it directly in a single response, using the conversation context and your own knowledge.",
9947
+ "Side questions cannot use tools: do not attempt to read files, run commands, or call tools \u2014 if",
9948
+ "the answer would require that, say what you would check and why.",
9949
+ "Do NOT continue, resume, or reference progress on the main task; the main conversation is",
9950
+ "unaffected by this exchange."
9951
+ ].join(" ");
9952
+ const MAX_HISTORY_CHARS = 2e3;
9953
+ function clip(text, max) {
9954
+ return text.length > max ? `${text.slice(0, max)}\u2026` : text;
9955
+ }
9956
+ function buildSideQuestionPrompt(question, history = []) {
9957
+ const trimmed = question.trim();
9958
+ const prior = history.filter((h) => h.question.trim() && h.answer.trim()).slice(-12);
9959
+ if (prior.length === 0) return trimmed;
9960
+ const lines = prior.map((h) => `Q: ${clip(h.question.trim(), MAX_HISTORY_CHARS)}
9961
+ A: ${clip(h.answer.trim(), MAX_HISTORY_CHARS)}`);
9962
+ return `<earlier-side-questions>
9963
+ ${lines.join("\n\n")}
9964
+ </earlier-side-questions>
9965
+
9966
+ ${trimmed}`;
9967
+ }
9968
+ function sideQuestionQueryOptions(input) {
9969
+ return {
9970
+ cwd: input.cwd,
9971
+ ...input.resumeSessionId ? { resume: input.resumeSessionId, forkSession: true } : {},
9972
+ persistSession: false,
9973
+ tools: [],
9974
+ mcpServers: {},
9975
+ strictMcpConfig: true,
9976
+ maxTurns: 1,
9977
+ includePartialMessages: true,
9978
+ permissionMode: "default",
9979
+ model: input.model,
9980
+ env: input.env,
9981
+ settingsPath: input.settingsPath,
9982
+ appendSystemPrompt: SIDE_QUESTION_SYSTEM_PROMPT,
9983
+ canCallTool: async () => ({ behavior: "deny", message: "Side questions cannot use tools" }),
9984
+ abort: input.signal
9985
+ };
9986
+ }
9987
+ function textFromAssistant(message) {
9988
+ if (message.type !== "assistant") return "";
9989
+ const content = message.message?.content;
9990
+ if (!Array.isArray(content)) return "";
9991
+ return content.map((block) => block && typeof block === "object" && block.type === "text" ? String(block.text ?? "") : "").join("");
9992
+ }
9993
+ async function runSideQuestion(query, input) {
9994
+ const options = sideQuestionQueryOptions(input);
9995
+ const stream = query({ prompt: buildSideQuestionPrompt(input.question, input.history), options });
9996
+ let streamed = "";
9997
+ let final = "";
9998
+ let resultSeen = false;
9999
+ for await (const message of stream) {
10000
+ if (message.type === "stream_event") {
10001
+ const event = message.event;
10002
+ if (event?.type === "content_block_delta" && event.delta?.type === "text_delta" && event.delta.text) {
10003
+ streamed += event.delta.text;
10004
+ input.onText?.(streamed);
10005
+ }
10006
+ continue;
10007
+ }
10008
+ if (message.type === "assistant") {
10009
+ const text = textFromAssistant(message);
10010
+ if (text) {
10011
+ final = final ? `${final}
10012
+
10013
+ ${text}` : text;
10014
+ input.onText?.(final);
10015
+ }
10016
+ continue;
10017
+ }
10018
+ if (message.type === "result") {
10019
+ resultSeen = true;
10020
+ const result = message;
10021
+ if (result.subtype !== "success") {
10022
+ const detail = Array.isArray(result.errors) && result.errors.length > 0 ? String(result.errors[0]) : typeof result.result === "string" && result.result ? result.result : result.subtype ?? "unknown";
10023
+ throw new Error(`Side question failed: ${detail}`);
10024
+ }
10025
+ if (!final && typeof result.result === "string") final = result.result;
10026
+ }
10027
+ }
10028
+ if (input.signal?.aborted) throw new Error("Side question cancelled");
10029
+ if (!resultSeen && !final && !streamed) throw new Error("Side question ended without a result");
10030
+ return { answer: final || streamed, hadContext: Boolean(input.resumeSessionId) };
10031
+ }
10032
+
10033
+ const SIDE_QUESTION_RETAIN_MS = 5 * 6e4;
10034
+ const SIDE_QUESTION_MAX_CHARS = 8e3;
10035
+ const SIDE_QUESTION_MAX_RUN_MS = 10 * 6e4;
10036
+ function writeSideQuestionSettingsFile(homeDir) {
10037
+ const dir = path.join(homeDir, "tmp", "hooks");
10038
+ node_fs.mkdirSync(dir, { recursive: true });
10039
+ const file = path.join(dir, `side-question-${process.pid}.json`);
10040
+ node_fs.writeFileSync(file, JSON.stringify({ disableAllHooks: true }));
10041
+ return file;
10042
+ }
10043
+ function parseHistory(raw) {
10044
+ if (!Array.isArray(raw)) return [];
10045
+ return raw.flatMap((item) => {
10046
+ if (!item || typeof item !== "object") return [];
10047
+ const { question, answer } = item;
10048
+ return typeof question === "string" && typeof answer === "string" ? [{ question, answer }] : [];
10049
+ });
10050
+ }
10051
+ function registerSideQuestionHandler(rpc, deps) {
10052
+ const now = deps.now ?? (() => Date.now());
10053
+ const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
10054
+ const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
10055
+ const run = deps.run ?? (async (input) => {
10056
+ const { query } = await Promise.resolve().then(function () { return require('./index-BXhSRb9N.cjs'); });
10057
+ return runSideQuestion(query, input);
10058
+ });
10059
+ const slots = /* @__PURE__ */ new Map();
10060
+ let active = null;
10061
+ const prune = () => {
10062
+ const t = now();
10063
+ for (const [id, slot] of slots) {
10064
+ if (slot.status !== "running" && slot.finishedAt !== void 0 && t - slot.finishedAt > retainMs) slots.delete(id);
10065
+ }
10066
+ };
10067
+ const finish = (slot, status, error) => {
10068
+ if (slot.status !== "running") return;
10069
+ slot.status = status;
10070
+ slot.error = error;
10071
+ slot.finishedAt = now();
10072
+ if (active === slot) active = null;
10073
+ };
10074
+ rpc.registerHandler("btw-ask", async (request) => {
10075
+ const question = typeof request?.question === "string" ? request.question.trim() : "";
10076
+ if (!question) throw new Error("Side question is empty");
10077
+ if (question.length > SIDE_QUESTION_MAX_CHARS) throw new Error("Side question is too long");
10078
+ prune();
10079
+ if (active) throw new Error("A side question is already running");
10080
+ const resumeSessionId = deps.getClaudeSessionId() ?? null;
10081
+ const slot = {
10082
+ requestId: node_crypto.randomUUID(),
10083
+ status: "running",
10084
+ text: "",
10085
+ startedAt: now(),
10086
+ abort: new AbortController()
10087
+ };
10088
+ slots.set(slot.requestId, slot);
10089
+ active = slot;
10090
+ persistence.logger.debug(`[btw] side question ${slot.requestId} start (context=${resumeSessionId ? "fork" : "none"})`);
10091
+ const deadline = setTimeout(() => {
10092
+ if (slot.status !== "running") return;
10093
+ slot.abort.abort("timeout");
10094
+ finish(slot, "error", "Side question timed out");
10095
+ persistence.logger.debug(`[btw] side question ${slot.requestId} timed out after ${maxRunMs}ms`);
10096
+ }, maxRunMs);
10097
+ deadline.unref?.();
10098
+ void run({
10099
+ question,
10100
+ history: parseHistory(request.history),
10101
+ resumeSessionId,
10102
+ cwd: deps.cwd,
10103
+ model: deps.getModel(),
10104
+ env: deps.getEnv?.(),
10105
+ settingsPath: deps.settingsPath,
10106
+ signal: slot.abort.signal,
10107
+ onText: (text) => {
10108
+ if (slot.status === "running") slot.text = text;
10109
+ }
10110
+ }).then((result) => {
10111
+ slot.text = result.answer;
10112
+ finish(slot, "done");
10113
+ persistence.logger.debug(`[btw] side question ${slot.requestId} done (${result.answer.length} chars)`);
10114
+ }).catch((error) => {
10115
+ const message = error instanceof Error ? error.message : String(error);
10116
+ if (slot.abort.signal.aborted) {
10117
+ finish(slot, "cancelled");
10118
+ } else {
10119
+ finish(slot, "error", message);
10120
+ persistence.logger.debug(`[btw] side question ${slot.requestId} failed: ${message}`);
10121
+ }
10122
+ }).finally(() => clearTimeout(deadline));
10123
+ return { requestId: slot.requestId, hadContext: Boolean(resumeSessionId) };
10124
+ });
10125
+ rpc.registerHandler("btw-poll", async (request) => {
10126
+ prune();
10127
+ const id = typeof request?.requestId === "string" ? request.requestId : "";
10128
+ const slot = slots.get(id);
10129
+ if (!slot) throw new Error("Unknown side question");
10130
+ return {
10131
+ requestId: slot.requestId,
10132
+ status: slot.status,
10133
+ text: slot.text,
10134
+ error: slot.error,
10135
+ startedAt: slot.startedAt,
10136
+ finishedAt: slot.finishedAt
10137
+ };
10138
+ });
10139
+ rpc.registerHandler("btw-cancel", async (request) => {
10140
+ const id = typeof request?.requestId === "string" ? request.requestId : "";
10141
+ const slot = slots.get(id);
10142
+ if (!slot || slot.status !== "running") return { cancelled: false };
10143
+ slot.abort.abort("cancelled by user");
10144
+ finish(slot, "cancelled");
10145
+ return { cancelled: true };
10146
+ });
10147
+ return {
10148
+ /** Test/introspection hook. */
10149
+ _slots: slots
10150
+ };
10151
+ }
10152
+
9937
10153
  const MAX_PROMPT_SAMPLE_CHARS = 500;
9938
10154
  const MAX_TITLE_CHARS = 60;
9939
10155
  const GENERATION_TIMEOUT_MS = 3e4;
9940
10156
  function resolveClaudeBinary() {
9941
10157
  try {
9942
- const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CO1gNtuP.cjs', document.baseURI).href)));
10158
+ const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BFQ_XDUX.cjs', document.baseURI).href)));
9943
10159
  const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
9944
10160
  const { getClaudeCliPath } = require$1(utilsPath);
9945
10161
  const path$1 = getClaudeCliPath();
@@ -10396,7 +10612,7 @@ async function runClaude(credentials, options = {}) {
10396
10612
  // a brand-new session cannot pick a PDF until after sending once.
10397
10613
  attachmentKinds: [...CLAUDE_ATTACHMENT_KINDS],
10398
10614
  queueCancellation: true,
10399
- capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2"],
10615
+ capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1"],
10400
10616
  // Effective mode this process enforces. Kept current by
10401
10617
  // publishPermissionMode below; the web renders it instead of guessing.
10402
10618
  permissionMode: mapToClaudeMode(initialPermissionMode ?? "default"),
@@ -10682,6 +10898,16 @@ async function runClaude(credentials, options = {}) {
10682
10898
  let currentAllowedTools = void 0;
10683
10899
  let currentDisallowedTools = withAssistantDenylist(void 0, isAssistantVariant);
10684
10900
  let currentEffort = DEFAULT_CLAUDE_EFFORT;
10901
+ registerSideQuestionHandler(session.rpcHandlerManager, {
10902
+ getClaudeSessionId: () => {
10903
+ const id = currentSession?.sessionId ?? null;
10904
+ return id && claudeCheckSession(id, workingDirectory) ? id : null;
10905
+ },
10906
+ getModel: () => currentModel,
10907
+ cwd: workingDirectory,
10908
+ getEnv: () => options.claudeEnvVars,
10909
+ settingsPath: writeSideQuestionSettingsFile(persistence.configuration.happyHomeDir)
10910
+ });
10685
10911
  const resetCurrentModeDefaults = () => {
10686
10912
  currentModel = options.model ?? DEFAULT_CLAUDE_MODEL;
10687
10913
  currentFallbackModel = void 0;
@@ -12134,9 +12360,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
12134
12360
  };
12135
12361
  }
12136
12362
 
12137
- const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CO1gNtuP.cjs', document.baseURI).href)));
12363
+ const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BFQ_XDUX.cjs', document.baseURI).href)));
12138
12364
  const __dirname$1 = path.dirname(__filename$1);
12139
- const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CO1gNtuP.cjs', document.baseURI).href)));
12365
+ const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BFQ_XDUX.cjs', document.baseURI).href)));
12140
12366
  const PRISMA_QUERY_ENGINE_FILES = {
12141
12367
  "arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
12142
12368
  "x64-darwin": "libquery_engine-darwin.dylib.node",
@@ -14760,7 +14986,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14760
14986
  process.exit(0);
14761
14987
  } else if (subcommand === "install-terminal-hooks") {
14762
14988
  try {
14763
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-Cp9JVxQ-.cjs'); });
14989
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-ZNRl9Qcl.cjs'); });
14764
14990
  const command = parseTerminalHooksArgs(args.slice(1));
14765
14991
  if (command.action === "help") {
14766
14992
  console.log(TERMINAL_HOOKS_HELP);
@@ -14777,7 +15003,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14777
15003
  }
14778
15004
  } else if (subcommand === "spawn") {
14779
15005
  try {
14780
- const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-C0NSP84Y.cjs'); });
15006
+ const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-d7F98wtf.cjs'); });
14781
15007
  await handleSpawnCommand(args.slice(1));
14782
15008
  } catch (error) {
14783
15009
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -14789,7 +15015,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14789
15015
  return;
14790
15016
  } else if (subcommand === "send") {
14791
15017
  try {
14792
- const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-CWgaINHC.cjs'); });
15018
+ const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-DQjba9jZ.cjs'); });
14793
15019
  await handleSendCommand(args.slice(1));
14794
15020
  } catch (error) {
14795
15021
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -14895,9 +15121,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14895
15121
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
14896
15122
  const projectId = args[3];
14897
15123
  try {
14898
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-GJQc_kpD.cjs'); });
14899
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-BP-4phS_.cjs'); }).then(function (n) { return n.persistence; });
14900
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-BP-4phS_.cjs'); }).then(function (n) { return n.api; });
15124
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-CYGeJRgN.cjs'); });
15125
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-DTVA1Hp-.cjs'); }).then(function (n) { return n.persistence; });
15126
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-DTVA1Hp-.cjs'); }).then(function (n) { return n.api; });
14901
15127
  let userEmail = void 0;
14902
15128
  try {
14903
15129
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -14928,7 +15154,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14928
15154
  }
14929
15155
  if (geminiSubcommand === "project" && args[2] === "get") {
14930
15156
  try {
14931
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-GJQc_kpD.cjs'); });
15157
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-CYGeJRgN.cjs'); });
14932
15158
  const config = readGeminiLocalConfig();
14933
15159
  if (config.googleCloudProject) {
14934
15160
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -14968,7 +15194,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14968
15194
  process.exit(0);
14969
15195
  }
14970
15196
  try {
14971
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-BBzPVzuc.cjs'); });
15197
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-12hI-_Ng.cjs'); });
14972
15198
  let startedBy = void 0;
14973
15199
  for (let i = 1; i < args.length; i++) {
14974
15200
  if (args[i] === "--started-by") {
@@ -14990,7 +15216,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14990
15216
  return;
14991
15217
  } else if (subcommand === "acp") {
14992
15218
  try {
14993
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-BBm2b34F.cjs'); });
15219
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-olwBiKj6.cjs'); });
14994
15220
  let startedBy = void 0;
14995
15221
  let verbose = false;
14996
15222
  const acpArgs = [];
@@ -15030,7 +15256,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15030
15256
  return;
15031
15257
  } else if (subcommand === "openclaw") {
15032
15258
  try {
15033
- const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-B4nC6XGL.cjs'); });
15259
+ const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-CYrNNJ7P.cjs'); });
15034
15260
  let startedBy = void 0;
15035
15261
  let verbose = false;
15036
15262
  let gatewayUrl;
@@ -15081,7 +15307,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15081
15307
  return;
15082
15308
  } else if (subcommand === "mcp" && args.length === 1) {
15083
15309
  try {
15084
- const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-B5HMF24K.cjs'); });
15310
+ const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-7xQMC2Az.cjs'); });
15085
15311
  await handleMcpCommand();
15086
15312
  } catch (error) {
15087
15313
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -15452,6 +15678,7 @@ exports.hashObject = hashObject;
15452
15678
  exports.initialMachineMetadata = initialMachineMetadata;
15453
15679
  exports.notifyDaemonSessionStarted = notifyDaemonSessionStarted;
15454
15680
  exports.pushClipboardViaDaemon = pushClipboardViaDaemon;
15681
+ exports.query = query;
15455
15682
  exports.registerKillSessionHandler = registerKillSessionHandler;
15456
15683
  exports.sendUserMessage = sendUserMessage;
15457
15684
  exports.sessionWebUrl = sessionWebUrl;
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BFQ_XDUX.cjs');
4
+ var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
5
+ require('chalk');
6
+ require('node:os');
7
+ require('node:crypto');
8
+ require('./types-DTVA1Hp-.cjs');
9
+ require('axios');
10
+ require('node:util');
11
+ require('node:fs');
12
+ require('node:path');
13
+ require('node:fs/promises');
14
+ require('node:events');
15
+ require('socket.io-client');
16
+ require('zod');
17
+ require('@paralleldrive/cuid2');
18
+ require('tweetnacl');
19
+ require('./limits-KdWKmwtH.cjs');
20
+ require('child_process');
21
+ require('util');
22
+ require('fs/promises');
23
+ require('crypto');
24
+ require('path');
25
+ require('cross-spawn');
26
+ require('url');
27
+ require('os');
28
+ require('node:child_process');
29
+ require('node-pty');
30
+ require('fs');
31
+ require('node:readline');
32
+ require('@anthropic-ai/sandbox-runtime');
33
+ require('expo-server-sdk');
34
+ require('./agentGuidance-BifkGXdE.cjs');
35
+ require('ink');
36
+ require('react');
37
+ require('ps-list');
38
+ require('tmp');
39
+ require('open');
40
+ require('fastify');
41
+ require('fastify-type-provider-zod');
42
+ require('node:module');
43
+ require('@modelcontextprotocol/sdk/server/mcp.js');
44
+ require('node:http');
45
+ require('@modelcontextprotocol/sdk/server/streamableHttp.js');
46
+ require('http');
47
+ require('inquirer');
48
+ require('node:url');
49
+ require('node:readline/promises');
50
+
51
+
52
+
53
+ exports.query = index.query;
54
+ Object.defineProperty(exports, "AbortError", {
55
+ enumerable: true,
56
+ get: function () { return claudeAgentSdk.AbortError; }
57
+ });