very-happy-cli 0.2.130 → 0.2.131

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 (45) hide show
  1. package/dist/{AcpBackend-Co3atHW2.mjs → AcpBackend-DSRZM4lo.mjs} +2 -2
  2. package/dist/{AcpBackend-5slez7vM.cjs → AcpBackend-Dv_EKDIQ.cjs} +2 -2
  3. package/dist/{AcpSessionManager-B0sD6Zi7.mjs → AcpSessionManager-DtXOAeQ0.mjs} +1 -1
  4. package/dist/{AcpSessionManager-CxvVg8ec.cjs → AcpSessionManager-r8SLweP4.cjs} +1 -1
  5. package/dist/{agentGuidance-TjPzDO7d.cjs → agentGuidance-B4bH8Nuz.cjs} +1 -1
  6. package/dist/{agentGuidance-7pJxf_3b.mjs → agentGuidance-CeuhVA2K.mjs} +1 -1
  7. package/dist/codex/happyMcpStdioBridge.cjs +2 -2
  8. package/dist/codex/happyMcpStdioBridge.mjs +2 -2
  9. package/dist/{config-BWu8j7bO.mjs → config-Ur8QEJ0U.mjs} +4 -4
  10. package/dist/{config-B4Md4FvK.cjs → config-onxMcdX3.cjs} +4 -4
  11. package/dist/{index-DksoP9b2.cjs → index-B1hbB5R7.cjs} +14 -7
  12. package/dist/{index-C7TA3haC.cjs → index-B5Vv72dN.cjs} +70 -24
  13. package/dist/{index-BUhcXX8R.mjs → index-BPYVCjjs.mjs} +66 -20
  14. package/dist/{index-C13U8MkT.mjs → index-BXB-84P_.mjs} +4 -4
  15. package/dist/{index-Ds0aHXiU.cjs → index-BjctcFpG.cjs} +4 -4
  16. package/dist/{index-CdOVizh_.mjs → index-CsfUI8Bw.mjs} +15 -8
  17. package/dist/index.cjs +4 -4
  18. package/dist/index.mjs +4 -4
  19. package/dist/{installTerminalHooks-kUC6I6Rn.mjs → installTerminalHooks-DLwx6m7I.mjs} +4 -4
  20. package/dist/{installTerminalHooks-cNXov61F.cjs → installTerminalHooks-IaEGKZDR.cjs} +4 -4
  21. package/dist/lib.cjs +2 -2
  22. package/dist/lib.d.cts +32 -22
  23. package/dist/lib.d.mts +32 -22
  24. package/dist/lib.mjs +2 -2
  25. package/dist/{limits-CIcZA0Bn.mjs → limits-BusZ5sPV.mjs} +7 -7
  26. package/dist/{limits-BhK6ovLz.cjs → limits-C9bJJEyR.cjs} +7 -7
  27. package/dist/{mcp-D5uyhbfB.mjs → mcp-CZJM3obK.mjs} +4 -4
  28. package/dist/{mcp-CNX1qErQ.cjs → mcp-D4_4kl0R.cjs} +4 -4
  29. package/dist/{runGemini-DvV6X_GE.cjs → runGemini-CRoqO5Mf.cjs} +6 -6
  30. package/dist/{runGemini-BQd3qlVY.mjs → runGemini-DGHhBbmk.mjs} +6 -6
  31. package/dist/{runOpenClaw-jxvPz3bo.cjs → runOpenClaw-BzY__v8T.cjs} +5 -5
  32. package/dist/{runOpenClaw-BgtE2jKF.mjs → runOpenClaw-Ca9ygi8M.mjs} +5 -5
  33. package/dist/{send-BdhUFGTm.mjs → send-B1lln_bW.mjs} +4 -4
  34. package/dist/{send-Di8Q32Ds.cjs → send-CkfdImmJ.cjs} +4 -4
  35. package/dist/{sessions-Bo2THj4y.mjs → sessions-Cyzh822v.mjs} +4 -4
  36. package/dist/{sessions-eaAew6IP.cjs → sessions-D4cvTe7G.cjs} +4 -4
  37. package/dist/{spawn-CJxg1JUO.mjs → spawn-CdOt7Cv_.mjs} +4 -4
  38. package/dist/{spawn-6GfCYB5i.cjs → spawn-ID9-RfTN.cjs} +4 -4
  39. package/dist/{teams-CHGj90rR.mjs → teams-Bf2D8dwL.mjs} +4 -4
  40. package/dist/{teams-WdwFtptw.cjs → teams-CZ9xg-Rv.cjs} +4 -4
  41. package/dist/{todo-C8hDSNBP.mjs → todo-9iv7_n7i.mjs} +3 -3
  42. package/dist/{todo-C-wktj2K.cjs → todo-DK3L93BC.cjs} +3 -3
  43. package/dist/{types-QB33ckXt.cjs → types-B20MYc5R.cjs} +9 -2
  44. package/dist/{types-B-ySoSY9.mjs → types-lFZhC_6M.mjs} +8 -2
  45. 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-CIcZA0Bn.mjs';
5
- import { d as contentLogMetadata, e as errorLogMetadata, h as delay } from './types-B-ySoSY9.mjs';
4
+ import { l as logger, p as packageJson } from './limits-BusZ5sPV.mjs';
5
+ import { d as contentLogMetadata, e as errorLogMetadata, h as delay } from './types-lFZhC_6M.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-BhK6ovLz.cjs');
7
- var api = require('./types-QB33ckXt.cjs');
6
+ var persistence = require('./limits-C9bJJEyR.cjs');
7
+ var api = require('./types-B20MYc5R.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) => {
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { s as streamKeyOf, c as createEnvelope } from './types-B-ySoSY9.mjs';
2
+ import { s as streamKeyOf, c as createEnvelope } from './types-lFZhC_6M.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  return turnId ? { turn: turnId, time } : { time };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var api = require('./types-QB33ckXt.cjs');
4
+ var api = require('./types-B20MYc5R.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  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-BhK6ovLz.cjs');
5
+ var persistence = require('./limits-C9bJJEyR.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, g as readSettings, r as readPersistedSessions, d as readCredentialsForConfiguredRelay } from './limits-CIcZA0Bn.mjs';
3
+ import { n as normalizeHttpEndpoint, c as configuration, g as readSettings, r as readPersistedSessions, d as readCredentialsForConfiguredRelay } from './limits-BusZ5sPV.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';
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var agentGuidance = require('../agentGuidance-TjPzDO7d.cjs');
3
+ var agentGuidance = require('../agentGuidance-B4bH8Nuz.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-BhK6ovLz.cjs');
9
+ var persistence = require('../limits-C9bJJEyR.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-7pJxf_3b.mjs';
1
+ import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, r as registerTeamsTools } from '../agentGuidance-CeuhVA2K.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-CIcZA0Bn.mjs';
7
+ import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-BusZ5sPV.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-CIcZA0Bn.mjs';
6
- import { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-BUhcXX8R.mjs';
5
+ import { l as logger } from './limits-BusZ5sPV.mjs';
6
+ import { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-BPYVCjjs.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-B-ySoSY9.mjs';
16
+ import './types-lFZhC_6M.mjs';
17
17
  import 'axios';
18
18
  import 'node:events';
19
19
  import 'socket.io-client';
@@ -28,7 +28,7 @@ import 'node-pty';
28
28
  import 'node:readline';
29
29
  import '@anthropic-ai/sandbox-runtime';
30
30
  import 'expo-server-sdk';
31
- import './agentGuidance-7pJxf_3b.mjs';
31
+ import './agentGuidance-CeuhVA2K.mjs';
32
32
  import 'ink';
33
33
  import 'react';
34
34
  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-BhK6ovLz.cjs');
8
- var index = require('./index-C7TA3haC.cjs');
7
+ var persistence = require('./limits-C9bJJEyR.cjs');
8
+ var index = require('./index-B5Vv72dN.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-QB33ckXt.cjs');
18
+ require('./types-B20MYc5R.cjs');
19
19
  require('axios');
20
20
  require('node:events');
21
21
  require('socket.io-client');
@@ -30,7 +30,7 @@ require('node-pty');
30
30
  require('node:readline');
31
31
  require('@anthropic-ai/sandbox-runtime');
32
32
  require('expo-server-sdk');
33
- require('./agentGuidance-TjPzDO7d.cjs');
33
+ require('./agentGuidance-B4bH8Nuz.cjs');
34
34
  require('ink');
35
35
  require('react');
36
36
  require('@anthropic-ai/claude-agent-sdk');
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var AcpBackend = require('./AcpBackend-5slez7vM.cjs');
4
- var persistence = require('./limits-BhK6ovLz.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-CxvVg8ec.cjs');
6
- var api = require('./types-QB33ckXt.cjs');
7
- var index = require('./index-C7TA3haC.cjs');
3
+ var AcpBackend = require('./AcpBackend-Dv_EKDIQ.cjs');
4
+ var persistence = require('./limits-C9bJJEyR.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-r8SLweP4.cjs');
6
+ var api = require('./types-B20MYc5R.cjs');
7
+ var index = require('./index-B5Vv72dN.cjs');
8
8
  var promises = require('node:fs/promises');
9
9
  var node_crypto = require('node:crypto');
10
10
  var path = require('node:path');
@@ -33,7 +33,7 @@ require('fs');
33
33
  require('node:readline');
34
34
  require('@anthropic-ai/sandbox-runtime');
35
35
  require('expo-server-sdk');
36
- require('./agentGuidance-TjPzDO7d.cjs');
36
+ require('./agentGuidance-B4bH8Nuz.cjs');
37
37
  require('ink');
38
38
  require('react');
39
39
  require('@anthropic-ai/claude-agent-sdk');
@@ -707,7 +707,13 @@ async function runAcp(opts) {
707
707
  return true;
708
708
  };
709
709
  const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
710
- const happyServer = await index.startHappyServer(session, { assistant: isAssistantVariant });
710
+ const happyServer = await index.startHappyServer(session, {
711
+ assistant: isAssistantVariant,
712
+ ...opts.agentName === "pi" ? { onContextUsage: (contextUsage) => {
713
+ session.updateAgentState((state2) => ({ ...state2, contextUsage }));
714
+ } } : {}
715
+ });
716
+ if (opts.agentName === "pi") session.updateAgentState((state2) => ({ ...state2, contextUsage: null }));
711
717
  const mcpServers = {
712
718
  happy: {
713
719
  command: path.join(api.projectPath(), "bin", "very-happy-mcp.mjs"),
@@ -723,6 +729,7 @@ async function runAcp(opts) {
723
729
  env: {
724
730
  ...teamsPiEnv,
725
731
  HAPPY_MCP_URL: happyServer.url,
732
+ ...happyServer.contextUsageUrl ? { HAPPY_CONTEXT_USAGE_URL: happyServer.contextUsageUrl } : {},
726
733
  HAPPY_SESSION_ID: session.sessionId,
727
734
  HAPPY_PERMISSION_MODE: initialPermissionMode
728
735
  },
@@ -3,13 +3,13 @@
3
3
  var chalk = require('chalk');
4
4
  var os = require('node:os');
5
5
  var node_crypto = require('node:crypto');
6
- var api = require('./types-QB33ckXt.cjs');
7
- var persistence = require('./limits-BhK6ovLz.cjs');
6
+ var api = require('./types-B20MYc5R.cjs');
7
+ var persistence = require('./limits-C9bJJEyR.cjs');
8
8
  var spawn = require('cross-spawn');
9
9
  var path = require('node:path');
10
10
  var node_readline = require('node:readline');
11
11
  var node_fs = require('node:fs');
12
- var agentGuidance = require('./agentGuidance-TjPzDO7d.cjs');
12
+ var agentGuidance = require('./agentGuidance-B4bH8Nuz.cjs');
13
13
  var promises = require('node:fs/promises');
14
14
  var fs = require('fs/promises');
15
15
  var ink = require('ink');
@@ -7714,7 +7714,7 @@ function parseJsonObject(text) {
7714
7714
  return null;
7715
7715
  }
7716
7716
  }
7717
- 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-C7TA3haC.cjs', document.baseURI).href))).resolve(s)) {
7717
+ 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-B5Vv72dN.cjs', document.baseURI).href))).resolve(s)) {
7718
7718
  const platformArch = `${platform}-${arch}`;
7719
7719
  const candidates = [
7720
7720
  `@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
@@ -8895,6 +8895,24 @@ export default async function(pi) {
8895
8895
  const {readFile} = await import('node:fs/promises');
8896
8896
  const {join} = await import('node:path');
8897
8897
  const {homedir} = await import('node:os');
8898
+ const contextEndpoint = process.env.HAPPY_CONTEXT_USAGE_URL;
8899
+ if (contextEndpoint) {
8900
+ const target = new URL(contextEndpoint);
8901
+ if (target.origin !== url.origin || !target.pathname.startsWith('/runtime-context/')) throw new Error('Very Happy context must be local');
8902
+ let reporting = Promise.resolve();
8903
+ for (const name of ['session_start', 'session_switch', 'session_compact', 'model_select', 'turn_end', 'agent_end']) {
8904
+ pi.on(name, async (_event, ctx) => {
8905
+ const usage = ctx.getContextUsage?.();
8906
+ const contextWindow = usage?.contextWindow ?? ctx.model?.contextWindow;
8907
+ if (!(contextWindow > 0)) return;
8908
+ const snapshot = {source:'pi', tokens:usage?.tokens ?? null, contextWindow};
8909
+ reporting = reporting.catch(() => {}).then(async () => {
8910
+ try { await fetch(contextEndpoint, {method:'POST', redirect:'error', headers:{'content-type':'application/json'}, body:JSON.stringify(snapshot), signal:AbortSignal.timeout(2000)}); } catch {}
8911
+ });
8912
+ await reporting;
8913
+ });
8914
+ }
8915
+ }
8898
8916
  pi.on('tool_call', async (event, ctx) => {
8899
8917
  let mode = process.env.HAPPY_PERMISSION_MODE || 'default';
8900
8918
  const sid = process.env.HAPPY_SESSION_ID;
@@ -9618,6 +9636,10 @@ function createTeamWorker(deps) {
9618
9636
  await deps.stopAndWait(op.sessionId);
9619
9637
  await archiveSession(op.sessionId);
9620
9638
  }
9639
+ if (team.archivedAt !== void 0) {
9640
+ await complete(op, receipt);
9641
+ return;
9642
+ }
9621
9643
  const origins = team.operations.filter((candidate) => candidate.type === "spawn" && candidate.botId === op.botId && candidate.generation === op.generation && candidate.sessionId === op.sessionId);
9622
9644
  if (origins.length !== 1) throw new Error("Original worktree ownership is unknown; manual reconciliation required");
9623
9645
  const resource = readReceipt(home, origins[0].id);
@@ -9702,7 +9724,7 @@ Use the teams tools to inspect current task state before acting. This message is
9702
9724
  const status = axios.isAxiosError(error) ? error.response?.status : void 0;
9703
9725
  if (status !== 404) deps.log("Teams schedule advancement unavailable; regular reconciliation continues");
9704
9726
  }
9705
- const { data } = await http.get("/v1/teams/operations", { params: { machineId: deps.machineId, schedulesVersion: 1, teamLaunchVersion: 1 } });
9727
+ const { data } = await http.get("/v1/teams/operations", { params: { machineId: deps.machineId, schedulesVersion: 1, teamLaunchVersion: 1, teamArchiveVersion: 1 } });
9706
9728
  knownSessionIds = new Set((data.teams ?? []).flatMap((team) => team.bots.flatMap((bot) => bot.sessionId ? [bot.sessionId] : [])));
9707
9729
  for (const op of data.operations) {
9708
9730
  if (closed) break;
@@ -11784,7 +11806,30 @@ async function startHappyServer(client, options) {
11784
11806
  }
11785
11807
  }
11786
11808
  };
11809
+ const contextPath = "/runtime-context/" + node_crypto.randomUUID();
11787
11810
  const server = node_http.createServer(async (req, res) => {
11811
+ if (req.url?.startsWith("/runtime-context/")) {
11812
+ if (!options?.onContextUsage || req.url !== contextPath || req.method !== "POST" || req.headers.origin) {
11813
+ res.writeHead(403).end();
11814
+ return;
11815
+ }
11816
+ try {
11817
+ let body = "";
11818
+ for await (const chunk of req) {
11819
+ body += chunk.toString();
11820
+ if (Buffer.byteLength(body) > 2048) {
11821
+ res.writeHead(413).end();
11822
+ return;
11823
+ }
11824
+ }
11825
+ const usage = api.ContextUsageSchema.parse({ ...JSON.parse(body), updatedAt: Date.now() });
11826
+ options.onContextUsage(usage);
11827
+ res.writeHead(204).end();
11828
+ } catch {
11829
+ if (!res.headersSent) res.writeHead(400).end();
11830
+ }
11831
+ return;
11832
+ }
11788
11833
  const mcp = createMcpServer(handlers, options, client.sessionId);
11789
11834
  try {
11790
11835
  const transport = new streamableHttp_js.StreamableHTTPServerTransport({
@@ -11818,6 +11863,7 @@ async function startHappyServer(client, options) {
11818
11863
  persistence.logger.debug(`[happyMCP] server:ready sessionId=${client.sessionId} url=${baseUrl.toString()}`);
11819
11864
  return {
11820
11865
  url: baseUrl.toString(),
11866
+ contextUsageUrl: options?.onContextUsage ? new URL(contextPath, baseUrl).toString() : void 0,
11821
11867
  toolNames: [
11822
11868
  "change_title",
11823
11869
  persistence.CLIPBOARD_TOOL_NAME,
@@ -12085,7 +12131,7 @@ function registerSideQuestionHandler(rpc, deps) {
12085
12131
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
12086
12132
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
12087
12133
  const run = deps.run ?? (async (input) => {
12088
- const { query } = await Promise.resolve().then(function () { return require('./index-Ds0aHXiU.cjs'); });
12134
+ const { query } = await Promise.resolve().then(function () { return require('./index-BjctcFpG.cjs'); });
12089
12135
  return runSideQuestion(query, input);
12090
12136
  });
12091
12137
  const slots = /* @__PURE__ */ new Map();
@@ -12187,7 +12233,7 @@ const MAX_TITLE_CHARS = 60;
12187
12233
  const GENERATION_TIMEOUT_MS = 3e4;
12188
12234
  function resolveClaudeBinary() {
12189
12235
  try {
12190
- 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-C7TA3haC.cjs', document.baseURI).href)));
12236
+ 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-B5Vv72dN.cjs', document.baseURI).href)));
12191
12237
  const utilsPath = path.resolve(path.join(api.projectPath(), "scripts", "claude_version_utils.cjs"));
12192
12238
  const { getClaudeCliPath } = require$1(utilsPath);
12193
12239
  const path$1 = getClaudeCliPath();
@@ -14405,9 +14451,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
14405
14451
  };
14406
14452
  }
14407
14453
 
14408
- 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-C7TA3haC.cjs', document.baseURI).href)));
14454
+ 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-B5Vv72dN.cjs', document.baseURI).href)));
14409
14455
  const __dirname$1 = path.dirname(__filename$1);
14410
- const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-C7TA3haC.cjs', document.baseURI).href)));
14456
+ const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-B5Vv72dN.cjs', document.baseURI).href)));
14411
14457
  const PRISMA_QUERY_ENGINE_FILES = {
14412
14458
  "arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
14413
14459
  "x64-darwin": "libquery_engine-darwin.dylib.node",
@@ -17102,7 +17148,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17102
17148
  process.exit(0);
17103
17149
  } else if (subcommand === "install-terminal-hooks") {
17104
17150
  try {
17105
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-cNXov61F.cjs'); });
17151
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-IaEGKZDR.cjs'); });
17106
17152
  const command = parseTerminalHooksArgs(args.slice(1));
17107
17153
  if (command.action === "help") {
17108
17154
  console.log(TERMINAL_HOOKS_HELP);
@@ -17119,7 +17165,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17119
17165
  }
17120
17166
  } else if (subcommand === "spawn") {
17121
17167
  try {
17122
- const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-6GfCYB5i.cjs'); });
17168
+ const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-ID9-RfTN.cjs'); });
17123
17169
  await handleSpawnCommand(args.slice(1));
17124
17170
  } catch (error) {
17125
17171
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17131,7 +17177,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17131
17177
  return;
17132
17178
  } else if (subcommand === "sessions") {
17133
17179
  try {
17134
- const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-eaAew6IP.cjs'); });
17180
+ const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-D4cvTe7G.cjs'); });
17135
17181
  await handleSessionsCommand(args.slice(1));
17136
17182
  } catch (error) {
17137
17183
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17143,7 +17189,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17143
17189
  return;
17144
17190
  } else if (subcommand === "send") {
17145
17191
  try {
17146
- const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-Di8Q32Ds.cjs'); });
17192
+ const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-CkfdImmJ.cjs'); });
17147
17193
  await handleSendCommand(args.slice(1));
17148
17194
  } catch (error) {
17149
17195
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17249,9 +17295,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17249
17295
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
17250
17296
  const projectId = args[3];
17251
17297
  try {
17252
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-B4Md4FvK.cjs'); });
17253
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./limits-BhK6ovLz.cjs'); }).then(function (n) { return n.persistence; });
17254
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-QB33ckXt.cjs'); }).then(function (n) { return n.api; });
17298
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-onxMcdX3.cjs'); });
17299
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./limits-C9bJJEyR.cjs'); }).then(function (n) { return n.persistence; });
17300
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-B20MYc5R.cjs'); }).then(function (n) { return n.api; });
17255
17301
  let userEmail = void 0;
17256
17302
  try {
17257
17303
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -17282,7 +17328,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17282
17328
  }
17283
17329
  if (geminiSubcommand === "project" && args[2] === "get") {
17284
17330
  try {
17285
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-B4Md4FvK.cjs'); });
17331
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-onxMcdX3.cjs'); });
17286
17332
  const config = readGeminiLocalConfig();
17287
17333
  if (config.googleCloudProject) {
17288
17334
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -17322,7 +17368,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17322
17368
  process.exit(0);
17323
17369
  }
17324
17370
  try {
17325
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DvV6X_GE.cjs'); });
17371
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-CRoqO5Mf.cjs'); });
17326
17372
  let startedBy = void 0;
17327
17373
  for (let i = 1; i < args.length; i++) {
17328
17374
  if (args[i] === "--started-by") {
@@ -17352,7 +17398,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17352
17398
  }
17353
17399
  };
17354
17400
  try {
17355
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-DksoP9b2.cjs'); });
17401
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-B1hbB5R7.cjs'); });
17356
17402
  const parsed = parsePiRunnerArgs(args.slice(1));
17357
17403
  const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
17358
17404
  const { credentials } = await authAndSetupMachineIfNeeded();
@@ -17380,7 +17426,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17380
17426
  return;
17381
17427
  } else if (subcommand === "acp") {
17382
17428
  try {
17383
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-DksoP9b2.cjs'); });
17429
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-B1hbB5R7.cjs'); });
17384
17430
  let startedBy = void 0;
17385
17431
  let verbose = false;
17386
17432
  const acpArgs = [];
@@ -17420,7 +17466,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17420
17466
  return;
17421
17467
  } else if (subcommand === "openclaw") {
17422
17468
  try {
17423
- const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-jxvPz3bo.cjs'); });
17469
+ const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-BzY__v8T.cjs'); });
17424
17470
  let startedBy = void 0;
17425
17471
  let verbose = false;
17426
17472
  let gatewayUrl;
@@ -17471,7 +17517,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17471
17517
  return;
17472
17518
  } else if (subcommand === "todo") {
17473
17519
  try {
17474
- const { handleTodoCommand } = await Promise.resolve().then(function () { return require('./todo-C-wktj2K.cjs'); });
17520
+ const { handleTodoCommand } = await Promise.resolve().then(function () { return require('./todo-DK3L93BC.cjs'); });
17475
17521
  await handleTodoCommand(args.slice(1));
17476
17522
  } catch (error) {
17477
17523
  console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
@@ -17480,7 +17526,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17480
17526
  return;
17481
17527
  } else if (subcommand === "teams") {
17482
17528
  try {
17483
- const { handleTeamsCommand } = await Promise.resolve().then(function () { return require('./teams-WdwFtptw.cjs'); });
17529
+ const { handleTeamsCommand } = await Promise.resolve().then(function () { return require('./teams-CZ9xg-Rv.cjs'); });
17484
17530
  await handleTeamsCommand(args.slice(1));
17485
17531
  } catch (error) {
17486
17532
  console.error(error instanceof Error ? error.message : "Teams command failed");
@@ -17489,7 +17535,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17489
17535
  return;
17490
17536
  } else if (subcommand === "mcp" && args.length === 1) {
17491
17537
  try {
17492
- const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-CNX1qErQ.cjs'); });
17538
+ const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-D4_4kl0R.cjs'); });
17493
17539
  await handleMcpCommand();
17494
17540
  } catch (error) {
17495
17541
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}