very-happy-cli 0.2.140 → 0.2.142

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 (57) hide show
  1. package/dist/{AcpBackend-DsSYq8T-.mjs → AcpBackend-D2LqY2to.mjs} +2 -2
  2. package/dist/{AcpBackend-C0Lq4uoA.cjs → AcpBackend-DJsqfgjD.cjs} +2 -2
  3. package/dist/{AcpSessionManager-DIqByTH7.cjs → AcpSessionManager-CTfDxziP.cjs} +1 -1
  4. package/dist/{AcpSessionManager-BAErE9s0.mjs → AcpSessionManager-CdeM5KD9.mjs} +1 -1
  5. package/dist/{agentGuidance-Dl3apItH.cjs → agentGuidance-Bi8iBjy3.cjs} +1 -1
  6. package/dist/{agentGuidance-xk3v4_7E.mjs → agentGuidance-Cz8QVcX3.mjs} +1 -1
  7. package/dist/codex/happyMcpStdioBridge.cjs +2 -2
  8. package/dist/codex/happyMcpStdioBridge.mjs +2 -2
  9. package/dist/{config-D0-jnCOC.cjs → config-BIbYBmTd.cjs} +5 -4
  10. package/dist/{config-BVoHul9V.mjs → config-ZsBeq10u.mjs} +5 -4
  11. package/dist/{index-DJvzGXVN.cjs → index-BPTPrjhL.cjs} +12 -40
  12. package/dist/{index-BuQn9kUK.cjs → index-Bom8mTuS.cjs} +5 -4
  13. package/dist/{index-BPnAbcz_.mjs → index-CNARLBax.mjs} +5 -4
  14. package/dist/{index-__h-pCTK.cjs → index-CSQZhQ0C.cjs} +198 -129
  15. package/dist/{index-BNydKYvS.mjs → index-CY0zmhIp.mjs} +11 -39
  16. package/dist/{index-D0IP7gXG.mjs → index-CYFendNf.mjs} +179 -111
  17. package/dist/index.cjs +7 -6
  18. package/dist/index.mjs +7 -6
  19. package/dist/installPiTools-BKnXjrVu.cjs +82 -0
  20. package/dist/installPiTools-C-Lxv4Bt.mjs +77 -0
  21. package/dist/{installTerminalHooks-D2ice1a-.mjs → installTerminalHooks-BPJu2WVz.mjs} +8 -7
  22. package/dist/{installTerminalHooks-D3jfvbyY.cjs → installTerminalHooks-DA7SyFYW.cjs} +9 -8
  23. package/dist/lib.cjs +3 -2
  24. package/dist/lib.d.cts +6 -1
  25. package/dist/lib.d.mts +6 -1
  26. package/dist/lib.mjs +3 -2
  27. package/dist/{limits-Dbip6eVO.cjs → limits-B3hngubn.cjs} +29 -10
  28. package/dist/{limits-nhD0Wran.mjs → limits-CHsz3Ba-.mjs} +29 -11
  29. package/dist/{mcp-V26C05fN.mjs → mcp-BkWBRWFe.mjs} +28 -14
  30. package/dist/{mcp-DeapmTWN.cjs → mcp-ySrfNOYl.cjs} +29 -15
  31. package/dist/piExtension.d.mts +17 -0
  32. package/dist/piExtension.mjs +84 -0
  33. package/dist/piRuntime-DBLUyXFr.mjs +37 -0
  34. package/dist/piRuntime-uX0WHVr4.cjs +39 -0
  35. package/dist/piTerminal-Bc3jSCnY.mjs +129 -0
  36. package/dist/piTerminal-DNr3hkzY.cjs +132 -0
  37. package/dist/projectPath-CSpqWdxp.mjs +10 -0
  38. package/dist/projectPath-ChLhdOyt.cjs +13 -0
  39. package/dist/{runGemini-D34eCFpz.cjs → runGemini-eJ08cXk7.cjs} +9 -8
  40. package/dist/{runGemini-sa5kAgPe.mjs → runGemini-rgFHTnG7.mjs} +8 -7
  41. package/dist/{runOpenClaw-B8F8D--R.cjs → runOpenClaw-D0LVzxqM.cjs} +6 -5
  42. package/dist/{runOpenClaw-Bdsq8KBa.mjs → runOpenClaw-GjLWwjas.mjs} +6 -5
  43. package/dist/{send-DP_S3wn0.cjs → send-Bg2oqt7f.cjs} +5 -4
  44. package/dist/{send-KICC_ACz.mjs → send-DV8liaRN.mjs} +5 -4
  45. package/dist/{sessions-CGBBgVZn.cjs → sessions-DPimBZ8H.cjs} +7 -6
  46. package/dist/{sessions-C6EvnC4B.mjs → sessions-JiL4aJkC.mjs} +7 -6
  47. package/dist/{spawn-BhUK0Vt2.cjs → spawn-COOcUwkG.cjs} +5 -4
  48. package/dist/{spawn-C1OqXJNb.mjs → spawn-CnMk3LFG.mjs} +5 -4
  49. package/dist/{teams-C29nEHFD.cjs → teams-DSQgHBLE.cjs} +5 -4
  50. package/dist/{teams-Dm5HGpNz.mjs → teams-uHZcdX9j.mjs} +5 -4
  51. package/dist/terminalToolContext-CFeGeaNm.mjs +7 -0
  52. package/dist/terminalToolContext-DoV9Gs7K.cjs +9 -0
  53. package/dist/{todo-CeJX0z_2.cjs → todo-DeauuUd6.cjs} +4 -3
  54. package/dist/{todo-C-vovA0N.mjs → todo-oHWNpEx_.mjs} +4 -3
  55. package/dist/{types-thyvQB2a.mjs → types-Dnoxgb7G.mjs} +30 -13
  56. package/dist/{types-DCVS050m.cjs → types-Xd_LJRJN.cjs} +31 -15
  57. package/package.json +11 -7
@@ -5,10 +5,10 @@ var node_child_process = require('node:child_process');
5
5
  var os = require('node:os');
6
6
  var node_fs = require('node:fs');
7
7
  var path = require('node:path');
8
- var api = require('./types-DCVS050m.cjs');
9
- var AcpSessionManager = require('./AcpSessionManager-DIqByTH7.cjs');
10
- var persistence = require('./limits-Dbip6eVO.cjs');
11
- var index = require('./index-__h-pCTK.cjs');
8
+ var api = require('./types-Xd_LJRJN.cjs');
9
+ var AcpSessionManager = require('./AcpSessionManager-CTfDxziP.cjs');
10
+ var persistence = require('./limits-B3hngubn.cjs');
11
+ var index = require('./index-CSQZhQ0C.cjs');
12
12
  var WebSocket = require('ws');
13
13
  var ed = require('@noble/ed25519');
14
14
  var sha2_js = require('@noble/hashes/sha2.js');
@@ -23,6 +23,7 @@ require('fs/promises');
23
23
  require('crypto');
24
24
  require('path');
25
25
  require('cross-spawn');
26
+ require('./projectPath-ChLhdOyt.cjs');
26
27
  require('url');
27
28
  require('os');
28
29
  require('node:fs/promises');
@@ -34,7 +35,7 @@ require('@anthropic-ai/sandbox-runtime');
34
35
  require('expo-server-sdk');
35
36
  require('chalk');
36
37
  require('node:util');
37
- require('./agentGuidance-Dl3apItH.cjs');
38
+ require('./agentGuidance-Bi8iBjy3.cjs');
38
39
  require('ink');
39
40
  require('react');
40
41
  require('@anthropic-ai/claude-agent-sdk');
@@ -3,10 +3,10 @@ import { execFileSync } from 'node:child_process';
3
3
  import os from 'node:os';
4
4
  import { existsSync, readFileSync } from 'node:fs';
5
5
  import { join } from 'node:path';
6
- import { h as errorLogMetadata, j as contentLogMetadata, k as connectionState, A as ApiClient, n as notifyDaemonSessionStarted } from './types-thyvQB2a.mjs';
7
- import { A as AcpSessionManager } from './AcpSessionManager-BAErE9s0.mjs';
8
- import { f as ensurePrivateDirectorySync, h as hardenPrivateFileSync, w as writePrivateFileSync, g as readSettings, i as encodeBase64, l as logger, c as configuration } from './limits-nhD0Wran.mjs';
9
- import { j as initialMachineMetadata, k as createSessionMetadata, m as setupOfflineReconnection, n as MessageQueue2, o as registerKillSessionHandler } from './index-D0IP7gXG.mjs';
6
+ import { k as errorLogMetadata, l as contentLogMetadata, h as connectionState, A as ApiClient, n as notifyDaemonSessionStarted } from './types-Dnoxgb7G.mjs';
7
+ import { A as AcpSessionManager } from './AcpSessionManager-CdeM5KD9.mjs';
8
+ import { h as ensurePrivateDirectorySync, i as hardenPrivateFileSync, w as writePrivateFileSync, f as readSettings, g as encodeBase64, l as logger, c as configuration } from './limits-CHsz3Ba-.mjs';
9
+ import { k as initialMachineMetadata, m as createSessionMetadata, n as setupOfflineReconnection, p as MessageQueue2, y as registerKillSessionHandler } from './index-CYFendNf.mjs';
10
10
  import WebSocket from 'ws';
11
11
  import * as ed from '@noble/ed25519';
12
12
  import { sha512 } from '@noble/hashes/sha2.js';
@@ -21,6 +21,7 @@ import 'fs/promises';
21
21
  import 'crypto';
22
22
  import 'path';
23
23
  import 'cross-spawn';
24
+ import './projectPath-CSpqWdxp.mjs';
24
25
  import 'url';
25
26
  import 'os';
26
27
  import 'node:fs/promises';
@@ -32,7 +33,7 @@ import '@anthropic-ai/sandbox-runtime';
32
33
  import 'expo-server-sdk';
33
34
  import 'chalk';
34
35
  import 'node:util';
35
- import './agentGuidance-xk3v4_7E.mjs';
36
+ import './agentGuidance-Cz8QVcX3.mjs';
36
37
  import 'ink';
37
38
  import 'react';
38
39
  import '@anthropic-ai/claude-agent-sdk';
@@ -3,15 +3,15 @@
3
3
  var chalk = require('chalk');
4
4
  var node_fs = require('node:fs');
5
5
  var path = require('node:path');
6
- var persistence = require('./limits-Dbip6eVO.cjs');
7
- var index = require('./index-__h-pCTK.cjs');
6
+ var persistence = require('./limits-B3hngubn.cjs');
7
+ var index = require('./index-CSQZhQ0C.cjs');
8
8
  require('node:fs/promises');
9
9
  require('node:os');
10
10
  require('zod');
11
11
  require('node:crypto');
12
12
  require('tweetnacl');
13
13
  require('node:util');
14
- require('./types-DCVS050m.cjs');
14
+ require('./types-Xd_LJRJN.cjs');
15
15
  require('axios');
16
16
  require('node:events');
17
17
  require('socket.io-client');
@@ -22,6 +22,7 @@ require('fs/promises');
22
22
  require('crypto');
23
23
  require('path');
24
24
  require('cross-spawn');
25
+ require('./projectPath-ChLhdOyt.cjs');
25
26
  require('url');
26
27
  require('os');
27
28
  require('node:child_process');
@@ -30,7 +31,7 @@ require('fs');
30
31
  require('node:readline');
31
32
  require('@anthropic-ai/sandbox-runtime');
32
33
  require('expo-server-sdk');
33
- require('./agentGuidance-Dl3apItH.cjs');
34
+ require('./agentGuidance-Bi8iBjy3.cjs');
34
35
  require('ink');
35
36
  require('react');
36
37
  require('@anthropic-ai/claude-agent-sdk');
@@ -1,15 +1,15 @@
1
1
  import chalk from 'chalk';
2
2
  import { readFileSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
- import { r as readPersistedSessions, c as configuration } from './limits-nhD0Wran.mjs';
5
- import { b as sendUserMessage, s as sessionWebUrl } from './index-D0IP7gXG.mjs';
4
+ import { r as readPersistedSessions, c as configuration } from './limits-CHsz3Ba-.mjs';
5
+ import { b as sendUserMessage, s as sessionWebUrl } from './index-CYFendNf.mjs';
6
6
  import 'node:fs/promises';
7
7
  import 'node:os';
8
8
  import 'zod';
9
9
  import 'node:crypto';
10
10
  import 'tweetnacl';
11
11
  import 'node:util';
12
- import './types-thyvQB2a.mjs';
12
+ import './types-Dnoxgb7G.mjs';
13
13
  import 'axios';
14
14
  import 'node:events';
15
15
  import 'socket.io-client';
@@ -20,6 +20,7 @@ import 'fs/promises';
20
20
  import 'crypto';
21
21
  import 'path';
22
22
  import 'cross-spawn';
23
+ import './projectPath-CSpqWdxp.mjs';
23
24
  import 'url';
24
25
  import 'os';
25
26
  import 'node:child_process';
@@ -28,7 +29,7 @@ import 'fs';
28
29
  import 'node:readline';
29
30
  import '@anthropic-ai/sandbox-runtime';
30
31
  import 'expo-server-sdk';
31
- import './agentGuidance-xk3v4_7E.mjs';
32
+ import './agentGuidance-Cz8QVcX3.mjs';
32
33
  import 'ink';
33
34
  import 'react';
34
35
  import '@anthropic-ai/claude-agent-sdk';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
- var index = require('./index-__h-pCTK.cjs');
5
- var api = require('./types-DCVS050m.cjs');
4
+ var index = require('./index-CSQZhQ0C.cjs');
5
+ var api = require('./types-Xd_LJRJN.cjs');
6
6
  require('node:os');
7
7
  require('node:crypto');
8
- require('./limits-Dbip6eVO.cjs');
8
+ require('./limits-B3hngubn.cjs');
9
9
  require('node:fs/promises');
10
10
  require('node:fs');
11
11
  require('node:path');
@@ -14,7 +14,10 @@ require('tweetnacl');
14
14
  require('node:util');
15
15
  require('cross-spawn');
16
16
  require('node:readline');
17
- require('./agentGuidance-Dl3apItH.cjs');
17
+ require('./projectPath-ChLhdOyt.cjs');
18
+ require('path');
19
+ require('url');
20
+ require('./agentGuidance-Bi8iBjy3.cjs');
18
21
  require('fs/promises');
19
22
  require('ink');
20
23
  require('react');
@@ -27,7 +30,6 @@ require('child_process');
27
30
  require('@paralleldrive/cuid2');
28
31
  require('node:child_process');
29
32
  require('fs');
30
- require('path');
31
33
  require('@anthropic-ai/sandbox-runtime');
32
34
  require('expo-server-sdk');
33
35
  require('crypto');
@@ -45,7 +47,6 @@ require('util');
45
47
  require('inquirer');
46
48
  require('node:url');
47
49
  require('node:readline/promises');
48
- require('url');
49
50
  require('node-pty');
50
51
 
51
52
  const ACTIONS = ["list", "read", "stop", "archive", "approve", "deny"];
@@ -1,9 +1,9 @@
1
1
  import chalk from 'chalk';
2
- import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, c as listSessions, r as readSessionTranscript, d as stopSession, e as resolvePermissionRequest, f as archiveSession } from './index-D0IP7gXG.mjs';
3
- import { i as isValidSessionId } from './types-thyvQB2a.mjs';
2
+ import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, c as listSessions, r as readSessionTranscript, d as stopSession, e as resolvePermissionRequest, f as archiveSession } from './index-CYFendNf.mjs';
3
+ import { i as isValidSessionId } from './types-Dnoxgb7G.mjs';
4
4
  import 'node:os';
5
5
  import 'node:crypto';
6
- import './limits-nhD0Wran.mjs';
6
+ import './limits-CHsz3Ba-.mjs';
7
7
  import 'node:fs/promises';
8
8
  import 'node:fs';
9
9
  import 'node:path';
@@ -12,7 +12,10 @@ import 'tweetnacl';
12
12
  import 'node:util';
13
13
  import 'cross-spawn';
14
14
  import 'node:readline';
15
- import './agentGuidance-xk3v4_7E.mjs';
15
+ import './projectPath-CSpqWdxp.mjs';
16
+ import 'path';
17
+ import 'url';
18
+ import './agentGuidance-Cz8QVcX3.mjs';
16
19
  import 'fs/promises';
17
20
  import 'ink';
18
21
  import 'react';
@@ -25,7 +28,6 @@ import 'child_process';
25
28
  import '@paralleldrive/cuid2';
26
29
  import 'node:child_process';
27
30
  import 'fs';
28
- import 'path';
29
31
  import '@anthropic-ai/sandbox-runtime';
30
32
  import 'expo-server-sdk';
31
33
  import 'crypto';
@@ -43,7 +45,6 @@ import 'util';
43
45
  import 'inquirer';
44
46
  import 'node:url';
45
47
  import 'node:readline/promises';
46
- import 'url';
47
48
  import 'node-pty';
48
49
 
49
50
  const ACTIONS = ["list", "read", "stop", "archive", "approve", "deny"];
@@ -3,9 +3,9 @@
3
3
  var chalk = require('chalk');
4
4
  var node_fs = require('node:fs');
5
5
  var path = require('node:path');
6
- var api = require('./types-DCVS050m.cjs');
7
- var index = require('./index-__h-pCTK.cjs');
8
- var persistence = require('./limits-Dbip6eVO.cjs');
6
+ var api = require('./types-Xd_LJRJN.cjs');
7
+ var index = require('./index-CSQZhQ0C.cjs');
8
+ var persistence = require('./limits-B3hngubn.cjs');
9
9
  require('axios');
10
10
  require('node:events');
11
11
  require('socket.io-client');
@@ -18,6 +18,7 @@ require('fs/promises');
18
18
  require('crypto');
19
19
  require('path');
20
20
  require('cross-spawn');
21
+ require('./projectPath-ChLhdOyt.cjs');
21
22
  require('url');
22
23
  require('os');
23
24
  require('node:fs/promises');
@@ -29,7 +30,7 @@ require('tweetnacl');
29
30
  require('node:readline');
30
31
  require('@anthropic-ai/sandbox-runtime');
31
32
  require('expo-server-sdk');
32
- require('./agentGuidance-Dl3apItH.cjs');
33
+ require('./agentGuidance-Bi8iBjy3.cjs');
33
34
  require('ink');
34
35
  require('react');
35
36
  require('@anthropic-ai/claude-agent-sdk');
@@ -1,9 +1,9 @@
1
1
  import chalk from 'chalk';
2
2
  import { readFileSync, statSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
- import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession } from './types-thyvQB2a.mjs';
5
- import { s as sessionWebUrl, i as isValidSpawnOrigin, a as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS, w as waitForSessionKey, b as sendUserMessage } from './index-D0IP7gXG.mjs';
6
- import { l as logger } from './limits-nhD0Wran.mjs';
4
+ import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession } from './types-Dnoxgb7G.mjs';
5
+ import { s as sessionWebUrl, i as isValidSpawnOrigin, a as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS, w as waitForSessionKey, b as sendUserMessage } from './index-CYFendNf.mjs';
6
+ import { l as logger } from './limits-CHsz3Ba-.mjs';
7
7
  import 'axios';
8
8
  import 'node:events';
9
9
  import 'socket.io-client';
@@ -16,6 +16,7 @@ import 'fs/promises';
16
16
  import 'crypto';
17
17
  import 'path';
18
18
  import 'cross-spawn';
19
+ import './projectPath-CSpqWdxp.mjs';
19
20
  import 'url';
20
21
  import 'os';
21
22
  import 'node:fs/promises';
@@ -27,7 +28,7 @@ import 'tweetnacl';
27
28
  import 'node:readline';
28
29
  import '@anthropic-ai/sandbox-runtime';
29
30
  import 'expo-server-sdk';
30
- import './agentGuidance-xk3v4_7E.mjs';
31
+ import './agentGuidance-Cz8QVcX3.mjs';
31
32
  import 'ink';
32
33
  import 'react';
33
34
  import '@anthropic-ai/claude-agent-sdk';
@@ -4,15 +4,15 @@ var os = require('node:os');
4
4
  var promises = require('node:fs/promises');
5
5
  var z = require('zod');
6
6
  var node_crypto = require('node:crypto');
7
- var agentGuidance = require('./agentGuidance-Dl3apItH.cjs');
8
- var persistence = require('./limits-Dbip6eVO.cjs');
7
+ var agentGuidance = require('./agentGuidance-Bi8iBjy3.cjs');
8
+ var persistence = require('./limits-B3hngubn.cjs');
9
9
  var path = require('node:path');
10
- var index = require('./index-__h-pCTK.cjs');
10
+ var index = require('./index-CSQZhQ0C.cjs');
11
11
  require('node:fs');
12
12
  require('tweetnacl');
13
13
  require('chalk');
14
14
  require('node:util');
15
- require('./types-DCVS050m.cjs');
15
+ require('./types-Xd_LJRJN.cjs');
16
16
  require('axios');
17
17
  require('node:events');
18
18
  require('socket.io-client');
@@ -23,6 +23,7 @@ require('fs/promises');
23
23
  require('crypto');
24
24
  require('path');
25
25
  require('cross-spawn');
26
+ require('./projectPath-ChLhdOyt.cjs');
26
27
  require('url');
27
28
  require('os');
28
29
  require('node:child_process');
@@ -2,15 +2,15 @@ import { homedir } from 'node:os';
2
2
  import { unlink, rmdir, mkdir, lstat, readFile, writeFile, rename } from 'node:fs/promises';
3
3
  import { z } from 'zod';
4
4
  import { createHash, randomUUID } from 'node:crypto';
5
- import { d as teamRequest, e as createTeamsClient } from './agentGuidance-xk3v4_7E.mjs';
6
- import { d as readCredentialsForConfiguredRelay } from './limits-nhD0Wran.mjs';
5
+ import { d as teamRequest, e as createTeamsClient } from './agentGuidance-Cz8QVcX3.mjs';
6
+ import { d as readCredentialsForConfiguredRelay } from './limits-CHsz3Ba-.mjs';
7
7
  import { join, resolve, dirname } from 'node:path';
8
- import { T as TEAM_SKILL } from './index-D0IP7gXG.mjs';
8
+ import { J as TEAM_SKILL } from './index-CYFendNf.mjs';
9
9
  import 'node:fs';
10
10
  import 'tweetnacl';
11
11
  import 'chalk';
12
12
  import 'node:util';
13
- import './types-thyvQB2a.mjs';
13
+ import './types-Dnoxgb7G.mjs';
14
14
  import 'axios';
15
15
  import 'node:events';
16
16
  import 'socket.io-client';
@@ -21,6 +21,7 @@ import 'fs/promises';
21
21
  import 'crypto';
22
22
  import 'path';
23
23
  import 'cross-spawn';
24
+ import './projectPath-CSpqWdxp.mjs';
24
25
  import 'url';
25
26
  import 'os';
26
27
  import 'node:child_process';
@@ -0,0 +1,7 @@
1
+ function resolveMcpTerminalId(env) {
2
+ if (env.HAPPY_MCP_URL) return null;
3
+ const id = env.VH_TERMINAL_ID;
4
+ return id && /^[a-zA-Z0-9_-]{1,64}$/.test(id) ? id : null;
5
+ }
6
+
7
+ export { resolveMcpTerminalId as r };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ function resolveMcpTerminalId(env) {
4
+ if (env.HAPPY_MCP_URL) return null;
5
+ const id = env.VH_TERMINAL_ID;
6
+ return id && /^[a-zA-Z0-9_-]{1,64}$/.test(id) ? id : null;
7
+ }
8
+
9
+ exports.resolveMcpTerminalId = resolveMcpTerminalId;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./limits-Dbip6eVO.cjs');
4
- var api = require('./types-DCVS050m.cjs');
5
- var agentGuidance = require('./agentGuidance-Dl3apItH.cjs');
3
+ var persistence = require('./limits-B3hngubn.cjs');
4
+ var api = require('./types-Xd_LJRJN.cjs');
5
+ var agentGuidance = require('./agentGuidance-Bi8iBjy3.cjs');
6
6
  require('node:fs/promises');
7
7
  require('node:fs');
8
8
  require('node:os');
@@ -22,6 +22,7 @@ require('fs/promises');
22
22
  require('crypto');
23
23
  require('path');
24
24
  require('cross-spawn');
25
+ require('./projectPath-ChLhdOyt.cjs');
25
26
  require('url');
26
27
  require('os');
27
28
  require('node:child_process');
@@ -1,6 +1,6 @@
1
- import { d as readCredentialsForConfiguredRelay, c as configuration } from './limits-nhD0Wran.mjs';
2
- import { e as createBuiltinTodoClient, B as BUILTIN_TODO_SKILL } from './types-thyvQB2a.mjs';
3
- import { c as readTeamScope, t as teamScopePath } from './agentGuidance-xk3v4_7E.mjs';
1
+ import { d as readCredentialsForConfiguredRelay, c as configuration } from './limits-CHsz3Ba-.mjs';
2
+ import { e as createBuiltinTodoClient, B as BUILTIN_TODO_SKILL } from './types-Dnoxgb7G.mjs';
3
+ import { c as readTeamScope, t as teamScopePath } from './agentGuidance-Cz8QVcX3.mjs';
4
4
  import 'node:fs/promises';
5
5
  import 'node:fs';
6
6
  import 'node:os';
@@ -20,6 +20,7 @@ import 'fs/promises';
20
20
  import 'crypto';
21
21
  import 'path';
22
22
  import 'cross-spawn';
23
+ import './projectPath-CSpqWdxp.mjs';
23
24
  import 'url';
24
25
  import 'os';
25
26
  import 'node:child_process';
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { l as logger, i as encodeBase64, j as encrypt, k as decrypt, m as decodeBase64, c as configuration, o as readDaemonState, q as clearDaemonState, s as decryptBlob, t as prepareClipboardText, g as readSettings, r as readPersistedSessions, u as credentialRelayProblem, p as packageJson, v as readTrackedClaudeSessionIds, x as readTrackedCodexThreadIds, y as libsodiumEncryptForPublicKey, z as libsodiumPublicKeyFromSecretKey, A as getRandomBytes, B as redactLogValue } from './limits-nhD0Wran.mjs';
2
+ import { l as logger, g as encodeBase64, j as encrypt, k as decrypt, m as decodeBase64, c as configuration, o as readDaemonState, q as clearDaemonState, s as decryptBlob, t as prepareClipboardText, u as prepareClipboardHistoryText, f as readSettings, r as readPersistedSessions, v as credentialRelayProblem, p as packageJson, x as readTrackedClaudeSessionIds, y as readTrackedCodexThreadIds, z as libsodiumEncryptForPublicKey, A as libsodiumPublicKeyFromSecretKey, B as getRandomBytes, D as redactLogValue } from './limits-CHsz3Ba-.mjs';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import { io } from 'socket.io-client';
5
5
  import * as z from 'zod';
@@ -10,9 +10,9 @@ import { spawn as spawn$1, exec, execSync } from 'child_process';
10
10
  import { promisify } from 'util';
11
11
  import { mkdir, writeFile, appendFile, stat, rename, unlink, readdir, readFile } from 'fs/promises';
12
12
  import { randomUUID, createHash } from 'crypto';
13
- import { dirname, resolve, join, sep } from 'path';
13
+ import { resolve, join, sep } from 'path';
14
14
  import { spawn } from 'cross-spawn';
15
- import { fileURLToPath } from 'url';
15
+ import { p as projectPath } from './projectPath-CSpqWdxp.mjs';
16
16
  import os, { platform } from 'os';
17
17
  import { stat as stat$1, readdir as readdir$1, lstat, open, copyFile, unlink as unlink$1, readFile as readFile$1, rename as rename$1, writeFile as writeFile$1 } from 'node:fs/promises';
18
18
  import { join as join$1, isAbsolute, resolve as resolve$1 } from 'node:path';
@@ -1356,12 +1356,6 @@ class RpcHandlerManager {
1356
1356
  }
1357
1357
  }
1358
1358
 
1359
- const __dirname$1 = dirname(fileURLToPath(import.meta.url));
1360
- function projectPath() {
1361
- const path = resolve(__dirname$1, "..");
1362
- return path;
1363
- }
1364
-
1365
1359
  function run$1(args, options) {
1366
1360
  const RUNNER_PATH = resolve(join(projectPath(), "scripts", "ripgrep_launcher.cjs"));
1367
1361
  return new Promise((resolve2, reject) => {
@@ -3052,13 +3046,18 @@ async function notifyDaemonTurnEvent(sessionId, event) {
3052
3046
  async function stopDaemonHttp() {
3053
3047
  await daemonPost("/stop");
3054
3048
  }
3055
- async function pushClipboardViaDaemon(text) {
3056
- const result = await daemonPost("/clipboard", { text });
3049
+ async function pushClipboardViaDaemon(text, terminalId) {
3050
+ const result = await daemonPost("/clipboard", { text, ...terminalId ? { terminalId } : {} });
3057
3051
  if (result?.error && result.delivered === void 0) {
3058
3052
  return { delivered: false, error: result.error };
3059
3053
  }
3060
3054
  return result;
3061
3055
  }
3056
+ async function pushFilePreviewViaDaemon(terminalId, path, mode = "file") {
3057
+ const result = await daemonPost("/file-preview", { terminalId, path, mode });
3058
+ if (result?.error) return { delivered: false, error: result.error };
3059
+ return { delivered: result?.delivered === true, ...result?.delivered === true ? {} : { error: "preview was not delivered" } };
3060
+ }
3062
3061
  async function setTerminalTitleViaDaemon(terminalId, title, ifAbsent = false) {
3063
3062
  const result = await daemonPost("/terminal-title", { terminalId, title, ifAbsent });
3064
3063
  if (result?.error) {
@@ -3998,12 +3997,15 @@ class ApiSessionClient extends EventEmitter {
3998
3997
  */
3999
3998
  pushClipboard(text) {
4000
3999
  const prepared = prepareClipboardText(text);
4000
+ const history = prepareClipboardHistoryText(text);
4001
4001
  if (!this.socket.connected) {
4002
4002
  return { delivered: false, truncated: prepared.truncated, totalBytes: prepared.totalBytes };
4003
4003
  }
4004
4004
  this.socket.emit("clipboard-push", {
4005
4005
  payload: encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, prepared.text)),
4006
4006
  enc: true,
4007
+ historyPayload: encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, history.text)),
4008
+ historyTruncated: history.truncated,
4007
4009
  truncated: prepared.truncated,
4008
4010
  totalBytes: prepared.totalBytes
4009
4011
  });
@@ -14818,19 +14820,34 @@ class ApiMachineClient {
14818
14820
  * (terminal-path claude → `very-happy mcp` → daemon /clipboard → here).
14819
14821
  * Encrypted with the per-machine key; the server relays without reading.
14820
14822
  */
14821
- pushClipboard(text) {
14823
+ pushClipboard(text, terminalId) {
14822
14824
  const prepared = prepareClipboardText(text);
14825
+ const history = prepareClipboardHistoryText(text);
14823
14826
  if (!this.socket?.connected) {
14824
14827
  return { delivered: false, truncated: prepared.truncated, totalBytes: prepared.totalBytes, error: "daemon is not connected to the server" };
14825
14828
  }
14826
14829
  this.socket.emit("clipboard-push", {
14830
+ ...terminalId ? { terminalId } : {},
14827
14831
  payload: encodeBase64(encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, prepared.text)),
14828
14832
  enc: true,
14833
+ historyPayload: encodeBase64(encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, history.text)),
14834
+ historyTruncated: history.truncated,
14829
14835
  truncated: prepared.truncated,
14830
14836
  totalBytes: prepared.totalBytes
14831
14837
  });
14832
14838
  return { delivered: true, truncated: prepared.truncated, totalBytes: prepared.totalBytes };
14833
14839
  }
14840
+ /** Queue a terminal preview with the machine key. Delivery does not prove a browser opened it. */
14841
+ pushFilePreview(terminalId, path, mode = "file") {
14842
+ if (!this.socket?.connected) return { delivered: false, error: "daemon is not connected to the server" };
14843
+ this.socket.emit("file-preview-push", {
14844
+ terminalId,
14845
+ payload: encodeBase64(encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, path)),
14846
+ enc: true,
14847
+ mode
14848
+ });
14849
+ return { delivered: true };
14850
+ }
14834
14851
  /** Encrypt one base64 terminal payload with the per-machine key (same scheme
14835
14852
  * as the live output stream) → base64 ciphertext. Used for both live output
14836
14853
  * and the open-terminal snapshot/replay payloads. */
@@ -16916,4 +16933,4 @@ const RawJSONLinesSchema = z$1.discriminatedUnion("type", [
16916
16933
  }).passthrough()
16917
16934
  ]);
16918
16935
 
16919
- export { shellescape as $, ApiClient as A, BUILTIN_TODO_SKILL as B, getLocalHappyAgentCredentialPath as C, readLocalHappyAgentCredentials as D, parseExactVersion as E, compareExactVersions as F, extractCompleteLines as G, decideBackfill as H, InvalidateSync as I, parseTerminalHookPayload as J, tmuxArgs as K, scrubTmuxClientEnv as L, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, decideMirrorBinding as N, MIRROR_BACKFILL_LINES_DEFAULT as O, mirrorLineKey as P, mirrorLocalId as Q, RawJSONLinesSchema as R, STREAM_DELTA_MAX_CHARS as S, listDaemonSessions as T, stopDaemonSession as U, detectCLIAvailability as V, detectResumeSupport as W, isDaemonRunningCurrentlyInstalledHappyVersion as X, stopDaemon as Y, TurnActivityTracker as Z, summarizeSpawnSessionForLog as _, ApiSessionClient as a, fetchCliUpdateState as a0, resolveCliUpdateCheckInterval as a1, DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS as a2, cleanupDaemonState as a3, listVhTerminals as a4, isValidTerminalId as a5, readVhTerminal as a6, sendToVhTerminal as a7, ContextUsageSchema as a8, TITLE_PROMPT_PREFIX as a9, BOARD_ANALYZER_PROMPT_PREFIX as aa, startOfflineReconnection as ab, CodexAppServerClient as ac, api as ad, streamKeyOf as b, checkIfDaemonRunningAndCleanupStaleState as c, createEnvelope as d, createBuiltinTodoClient as e, pushClipboardViaDaemon as f, setTerminalTitleViaDaemon as g, errorLogMetadata as h, isValidSessionId as i, contentLogMetadata as j, connectionState as k, BUILTIN_TODO_DISCOVERY as l, delay as m, notifyDaemonSessionStarted as n, notifyDaemonSessionEvent as o, projectPath as p, getProjectPath as q, initializeSandbox as r, spawnDaemonSession as s, AsyncLock as t, notifyDaemonClaudeAuthFailed as u, commandOnPath as v, wrapCommand as w, deriveLocalCliUpdateSummary as x, AGENT_VERSION_SOURCES as y, isClaudeSessionId as z };
16936
+ export { shellescape as $, ApiClient as A, BUILTIN_TODO_SKILL as B, getLocalHappyAgentCredentialPath as C, readLocalHappyAgentCredentials as D, parseExactVersion as E, compareExactVersions as F, extractCompleteLines as G, decideBackfill as H, InvalidateSync as I, parseTerminalHookPayload as J, tmuxArgs as K, scrubTmuxClientEnv as L, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, decideMirrorBinding as N, MIRROR_BACKFILL_LINES_DEFAULT as O, mirrorLineKey as P, mirrorLocalId as Q, RawJSONLinesSchema as R, STREAM_DELTA_MAX_CHARS as S, listDaemonSessions as T, stopDaemonSession as U, detectCLIAvailability as V, detectResumeSupport as W, isDaemonRunningCurrentlyInstalledHappyVersion as X, stopDaemon as Y, TurnActivityTracker as Z, summarizeSpawnSessionForLog as _, ApiSessionClient as a, fetchCliUpdateState as a0, resolveCliUpdateCheckInterval as a1, DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS as a2, cleanupDaemonState as a3, listVhTerminals as a4, isValidTerminalId as a5, readVhTerminal as a6, sendToVhTerminal as a7, ContextUsageSchema as a8, TITLE_PROMPT_PREFIX as a9, BOARD_ANALYZER_PROMPT_PREFIX as aa, startOfflineReconnection as ab, CodexAppServerClient as ac, api as ad, streamKeyOf as b, checkIfDaemonRunningAndCleanupStaleState as c, createEnvelope as d, createBuiltinTodoClient as e, pushFilePreviewViaDaemon as f, setTerminalTitleViaDaemon as g, connectionState as h, isValidSessionId as i, BUILTIN_TODO_DISCOVERY as j, errorLogMetadata as k, contentLogMetadata as l, delay as m, notifyDaemonSessionStarted as n, notifyDaemonSessionEvent as o, pushClipboardViaDaemon as p, getProjectPath as q, initializeSandbox as r, spawnDaemonSession as s, AsyncLock as t, notifyDaemonClaudeAuthFailed as u, commandOnPath as v, wrapCommand as w, deriveLocalCliUpdateSummary as x, AGENT_VERSION_SOURCES as y, isClaudeSessionId as z };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var axios = require('axios');
4
- var persistence = require('./limits-Dbip6eVO.cjs');
4
+ var persistence = require('./limits-B3hngubn.cjs');
5
5
  var node_events = require('node:events');
6
6
  var socket_ioClient = require('socket.io-client');
7
7
  var z = require('zod');
@@ -13,7 +13,7 @@ var fs = require('fs/promises');
13
13
  var crypto$1 = require('crypto');
14
14
  var path = require('path');
15
15
  var spawn = require('cross-spawn');
16
- var url = require('url');
16
+ var projectPath = require('./projectPath-ChLhdOyt.cjs');
17
17
  var os = require('os');
18
18
  var promises = require('node:fs/promises');
19
19
  var path$1 = require('node:path');
@@ -28,7 +28,6 @@ var sandboxRuntime = require('@anthropic-ai/sandbox-runtime');
28
28
  var expoServerSdk = require('expo-server-sdk');
29
29
  var chalk = require('chalk');
30
30
 
31
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
32
31
  function _interopNamespaceDefault(e) {
33
32
  var n = Object.create(null);
34
33
  if (e) {
@@ -1378,14 +1377,8 @@ class RpcHandlerManager {
1378
1377
  }
1379
1378
  }
1380
1379
 
1381
- const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-DCVS050m.cjs', document.baseURI).href))));
1382
- function projectPath() {
1383
- const path$1 = path.resolve(__dirname$1, "..");
1384
- return path$1;
1385
- }
1386
-
1387
1380
  function run$1(args, options) {
1388
- const RUNNER_PATH = path.resolve(path.join(projectPath(), "scripts", "ripgrep_launcher.cjs"));
1381
+ const RUNNER_PATH = path.resolve(path.join(projectPath.projectPath(), "scripts", "ripgrep_launcher.cjs"));
1389
1382
  return new Promise((resolve2, reject) => {
1390
1383
  const child = spawn.spawn("node", [RUNNER_PATH, JSON.stringify(args)], {
1391
1384
  stdio: ["pipe", "pipe", "pipe"],
@@ -1416,7 +1409,7 @@ function run$1(args, options) {
1416
1409
  function getBinaryPath() {
1417
1410
  const platformName = os.platform();
1418
1411
  const binaryName = platformName === "win32" ? "difft.exe" : "difft";
1419
- return path.resolve(path.join(projectPath(), "tools", "unpacked", binaryName));
1412
+ return path.resolve(path.join(projectPath.projectPath(), "tools", "unpacked", binaryName));
1420
1413
  }
1421
1414
  function run(args, options) {
1422
1415
  const binaryPath = getBinaryPath();
@@ -3074,13 +3067,18 @@ async function notifyDaemonTurnEvent(sessionId, event) {
3074
3067
  async function stopDaemonHttp() {
3075
3068
  await daemonPost("/stop");
3076
3069
  }
3077
- async function pushClipboardViaDaemon(text) {
3078
- const result = await daemonPost("/clipboard", { text });
3070
+ async function pushClipboardViaDaemon(text, terminalId) {
3071
+ const result = await daemonPost("/clipboard", { text, ...terminalId ? { terminalId } : {} });
3079
3072
  if (result?.error && result.delivered === void 0) {
3080
3073
  return { delivered: false, error: result.error };
3081
3074
  }
3082
3075
  return result;
3083
3076
  }
3077
+ async function pushFilePreviewViaDaemon(terminalId, path, mode = "file") {
3078
+ const result = await daemonPost("/file-preview", { terminalId, path, mode });
3079
+ if (result?.error) return { delivered: false, error: result.error };
3080
+ return { delivered: result?.delivered === true, ...result?.delivered === true ? {} : { error: "preview was not delivered" } };
3081
+ }
3084
3082
  async function setTerminalTitleViaDaemon(terminalId, title, ifAbsent = false) {
3085
3083
  const result = await daemonPost("/terminal-title", { terminalId, title, ifAbsent });
3086
3084
  if (result?.error) {
@@ -4020,12 +4018,15 @@ class ApiSessionClient extends node_events.EventEmitter {
4020
4018
  */
4021
4019
  pushClipboard(text) {
4022
4020
  const prepared = persistence.prepareClipboardText(text);
4021
+ const history = persistence.prepareClipboardHistoryText(text);
4023
4022
  if (!this.socket.connected) {
4024
4023
  return { delivered: false, truncated: prepared.truncated, totalBytes: prepared.totalBytes };
4025
4024
  }
4026
4025
  this.socket.emit("clipboard-push", {
4027
4026
  payload: persistence.encodeBase64(persistence.encrypt(this.encryptionKey, this.encryptionVariant, prepared.text)),
4028
4027
  enc: true,
4028
+ historyPayload: persistence.encodeBase64(persistence.encrypt(this.encryptionKey, this.encryptionVariant, history.text)),
4029
+ historyTruncated: history.truncated,
4029
4030
  truncated: prepared.truncated,
4030
4031
  totalBytes: prepared.totalBytes
4031
4032
  });
@@ -14840,19 +14841,34 @@ class ApiMachineClient {
14840
14841
  * (terminal-path claude → `very-happy mcp` → daemon /clipboard → here).
14841
14842
  * Encrypted with the per-machine key; the server relays without reading.
14842
14843
  */
14843
- pushClipboard(text) {
14844
+ pushClipboard(text, terminalId) {
14844
14845
  const prepared = persistence.prepareClipboardText(text);
14846
+ const history = persistence.prepareClipboardHistoryText(text);
14845
14847
  if (!this.socket?.connected) {
14846
14848
  return { delivered: false, truncated: prepared.truncated, totalBytes: prepared.totalBytes, error: "daemon is not connected to the server" };
14847
14849
  }
14848
14850
  this.socket.emit("clipboard-push", {
14851
+ ...terminalId ? { terminalId } : {},
14849
14852
  payload: persistence.encodeBase64(persistence.encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, prepared.text)),
14850
14853
  enc: true,
14854
+ historyPayload: persistence.encodeBase64(persistence.encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, history.text)),
14855
+ historyTruncated: history.truncated,
14851
14856
  truncated: prepared.truncated,
14852
14857
  totalBytes: prepared.totalBytes
14853
14858
  });
14854
14859
  return { delivered: true, truncated: prepared.truncated, totalBytes: prepared.totalBytes };
14855
14860
  }
14861
+ /** Queue a terminal preview with the machine key. Delivery does not prove a browser opened it. */
14862
+ pushFilePreview(terminalId, path, mode = "file") {
14863
+ if (!this.socket?.connected) return { delivered: false, error: "daemon is not connected to the server" };
14864
+ this.socket.emit("file-preview-push", {
14865
+ terminalId,
14866
+ payload: persistence.encodeBase64(persistence.encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, path)),
14867
+ enc: true,
14868
+ mode
14869
+ });
14870
+ return { delivered: true };
14871
+ }
14856
14872
  /** Encrypt one base64 terminal payload with the per-machine key (same scheme
14857
14873
  * as the live output stream) → base64 ciphertext. Used for both live output
14858
14874
  * and the open-terminal snapshot/replay payloads. */
@@ -16989,8 +17005,8 @@ exports.notifyDaemonSessionEvent = notifyDaemonSessionEvent;
16989
17005
  exports.notifyDaemonSessionStarted = notifyDaemonSessionStarted;
16990
17006
  exports.parseExactVersion = parseExactVersion;
16991
17007
  exports.parseTerminalHookPayload = parseTerminalHookPayload;
16992
- exports.projectPath = projectPath;
16993
17008
  exports.pushClipboardViaDaemon = pushClipboardViaDaemon;
17009
+ exports.pushFilePreviewViaDaemon = pushFilePreviewViaDaemon;
16994
17010
  exports.readLocalHappyAgentCredentials = readLocalHappyAgentCredentials;
16995
17011
  exports.readVhTerminal = readVhTerminal;
16996
17012
  exports.resolveCliUpdateCheckInterval = resolveCliUpdateCheckInterval;