@zonease/happy 0.6.47 → 0.6.49
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.
- package/dist/{api-L9jLLtI1.mjs → api-DgjBoynq.mjs} +2 -2
- package/dist/{api-mv48hjhj.cjs → api-OthK5iIu.cjs} +3 -3
- package/dist/{auth-InL7fBsz.mjs → auth-B1jRZqn6.mjs} +4 -4
- package/dist/{auth-BoWfky2q.mjs → auth-BCH_VzFY.mjs} +2 -2
- package/dist/{auth-DfQYhTlg.cjs → auth-BpoPI35K.cjs} +2 -2
- package/dist/{auth-0qbD9TEm.cjs → auth-jlHlPGoI.cjs} +4 -4
- package/dist/{browser-CF-r2ami.cjs → browser-BPhM1lYb.cjs} +1 -1
- package/dist/{browser-D9jMe1me.mjs → browser-oD4Fhplt.mjs} +1 -1
- package/dist/{claudeLocal-CFEXiYts.mjs → claudeLocal-BgGmploP.mjs} +1 -1
- package/dist/{claudeLocal-DOfhf6VK.cjs → claudeLocal-D1aqQU3U.cjs} +1 -1
- package/dist/codex/happyMcpStdioBridge.cjs +17 -1
- package/dist/codex/happyMcpStdioBridge.mjs +17 -1
- package/dist/{config-BBm54d_L.mjs → config-DxrAXlTx.mjs} +1 -1
- package/dist/{config-ByyclMMi.cjs → config-L19Onew4.cjs} +1 -1
- package/dist/{connect-B5JhnDTy.mjs → connect-BhvDYGh7.mjs} +4 -4
- package/dist/{connect-CIOfZYj-.cjs → connect-CcSN3IFE.cjs} +4 -4
- package/dist/{controlClient-P5wJhu1R.mjs → controlClient-BXUvvi9h.mjs} +1 -1
- package/dist/{controlClient-DMEMVw4Y.cjs → controlClient-DEk3NLK2.cjs} +1 -1
- package/dist/{cursorApprovalHook-C9mdmRIx.cjs → cursorApprovalHook-Bg8pIGZk.cjs} +2 -2
- package/dist/{cursorApprovalHook-DplHRbGK.mjs → cursorApprovalHook-YOYQPiFb.mjs} +2 -2
- package/dist/{cursorApprovalServer-C9y5dYDE.mjs → cursorApprovalServer-CU4HY7HJ.mjs} +1 -1
- package/dist/{cursorApprovalServer-BoI6qBTg.cjs → cursorApprovalServer-PWI0z_6u.cjs} +1 -1
- package/dist/{deviceKeys-tcvwm4KA.mjs → deviceKeys-BghZEVQM.mjs} +2 -2
- package/dist/{deviceKeys-CzqNNlG1.cjs → deviceKeys-CdzEV43E.cjs} +2 -2
- package/dist/{doctor-CXYhUN9A.mjs → doctor-36V4kFd8.mjs} +2 -2
- package/dist/{doctor-CBbj6YEl.cjs → doctor-BqwlWV1d.cjs} +2 -2
- package/dist/{downloadImage-CRkycWIl.cjs → downloadImage-CRORmK1A.cjs} +1 -1
- package/dist/{downloadImage-CpnQ3aS1.mjs → downloadImage-qav0UxBl.mjs} +1 -1
- package/dist/{enroll-CyikRwm7.cjs → enroll-Cb0zEeTI.cjs} +3 -3
- package/dist/{enroll-CYNDVSIH.mjs → enroll-DXtOuJIO.mjs} +3 -3
- package/dist/{evidence-DAu9vtgh.mjs → evidence-P6qtF1Rg.mjs} +1 -1
- package/dist/{evidence-CuGxhBQm.cjs → evidence-RbJyaUHb.cjs} +1 -1
- package/dist/{formatImageMessage-ZJZza9-9.mjs → formatImageMessage-Biyy3pJR.mjs} +1 -1
- package/dist/{formatImageMessage-CqonqpiB.cjs → formatImageMessage-D-tA2oNc.cjs} +1 -1
- package/dist/index.cjs +46 -46
- package/dist/index.mjs +46 -46
- package/dist/{install-_GiK-K1X.cjs → install-B8z_dWSt.cjs} +1 -1
- package/dist/{install-5H5Lh58Z.mjs → install-BcqdmvrF.mjs} +2 -2
- package/dist/{install-X4JLGAi3.cjs → install-C3C0NZfP.cjs} +2 -2
- package/dist/{install-Cma2vLWa.mjs → install-CdGqsOnL.mjs} +1 -1
- package/dist/lib.cjs +3 -3
- package/dist/lib.d.cts +24 -24
- package/dist/lib.d.mts +24 -24
- package/dist/lib.mjs +3 -3
- package/dist/{loadableToolOutput-sf6E72GE.cjs → loadableToolOutput-Bv22WdF2.cjs} +2 -2
- package/dist/{loadableToolOutput-4qF6EX0y.mjs → loadableToolOutput-DvlJj7PM.mjs} +2 -2
- package/dist/{persistence-B_w4o5z-.cjs → persistence-BJVrfFPM.cjs} +1 -1
- package/dist/{persistence-D2aRTiT1.mjs → persistence-CO8Q0Eh6.mjs} +1 -1
- package/dist/{push-BiBqn-pk.mjs → push-CCHjRbpg.mjs} +6 -6
- package/dist/{push-Df6QabEp.cjs → push-Dd-L84fo.cjs} +6 -6
- package/dist/{registerKillSessionHandler-DUrOhiGo.cjs → registerKillSessionHandler-Bdw4uNLH.cjs} +104 -5
- package/dist/{registerKillSessionHandler-AcpB6OSk.mjs → registerKillSessionHandler-OVE8Wm5b.mjs} +104 -5
- package/dist/{run-DclH1MRm.cjs → run-B5dg8uPo.cjs} +8 -8
- package/dist/{run-D6oXm1Jk.mjs → run-C-nwXCvH.mjs} +8 -8
- package/dist/{runClaude--M8lVtqr.mjs → runClaude-CIv33AyB.mjs} +15 -15
- package/dist/{runClaude-BfLi7f2N.cjs → runClaude-rkxGCTc2.cjs} +16 -16
- package/dist/{runCodex-DdcEe5bM.cjs → runCodex-4DUH4CWf.cjs} +17 -17
- package/dist/{runCodex-DatWk57y.mjs → runCodex-BCn2QxAJ.mjs} +17 -17
- package/dist/{runCursor-DxcT7Qtj.mjs → runCursor-PuI6WtK0.mjs} +15 -15
- package/dist/{runCursor-CszdTKDp.cjs → runCursor-tnmFljyu.cjs} +15 -15
- package/dist/{runGemini-41p6X_zo.mjs → runGemini-Bxfxy6t6.mjs} +28 -19
- package/dist/{runGemini-sAOJNh2V.cjs → runGemini-bhDI2ujI.cjs} +28 -19
- package/dist/{runOneShot-NBUWEobi.mjs → runOneShot-Cz0qgY3b.mjs} +2 -2
- package/dist/{runOneShot-m6HO3H5c.cjs → runOneShot-DZPmurJy.cjs} +2 -2
- package/dist/{serve-CUNdZ2ps.cjs → serve-BCRnyQ4F.cjs} +6 -6
- package/dist/{serve-B84oK7m-.mjs → serve-CoS-cmqV.mjs} +6 -6
- package/dist/{session-De8UTFFI.cjs → session-CaKRQ1bu.cjs} +5 -5
- package/dist/{session-9-fr4sTn.mjs → session-DzpncZby.mjs} +5 -5
- package/dist/{sessionKeyCache-DYuPkw5Z.cjs → sessionKeyCache-BOxbaLH3.cjs} +1 -1
- package/dist/{sessionKeyCache-CEJH5cHj.mjs → sessionKeyCache-D9_P4Mhm.mjs} +1 -1
- package/dist/{sessionList-KhgmL10v.cjs → sessionList-CZ1V-BWl.cjs} +2 -2
- package/dist/{sessionList-Dd4fyhNe.mjs → sessionList-M3ku4NEP.mjs} +2 -2
- package/dist/{sessionSummary-CYsvjLpK.mjs → sessionSummary-C_9HquPy.mjs} +3 -3
- package/dist/{sessionSummary-u-kSmPto.cjs → sessionSummary-PRYuMFfS.cjs} +3 -3
- package/dist/{setupOfflineReconnection-2m0GAIU5.mjs → setupOfflineReconnection-B1YuEpwl.mjs} +3 -3
- package/dist/{setupOfflineReconnection-BkAr6jAB.cjs → setupOfflineReconnection-BHuXHSbt.cjs} +3 -3
- package/dist/{spawnHappyCLI-T9EQFmAR.cjs → spawnHappyCLI-C6Peiy6h.cjs} +1 -1
- package/dist/{spawnHappyCLI-CG_S7LH1.mjs → spawnHappyCLI-C7Fu7xsF.mjs} +1 -1
- package/dist/{ssh-C4nI67Vq.cjs → ssh-C0ypGPrZ.cjs} +5 -5
- package/dist/{ssh-BTVqCokU.mjs → ssh-D7J3y8Sm.mjs} +5 -5
- package/dist/{task-DzqzVDDn.mjs → task-BN2-cCP5.mjs} +6 -6
- package/dist/{task-AWrQbs-h.cjs → task-DU_iFaZC.cjs} +6 -6
- package/dist/{uninstall-BRDV8214.cjs → uninstall-BnlnB4_5.cjs} +2 -2
- package/dist/{uninstall-394a0fgf.mjs → uninstall-Ct0m04sQ.mjs} +2 -2
- package/dist/{update-CZIaB80S.cjs → update-CyNRfAss.cjs} +3 -3
- package/dist/{update-DLqQQtYc.mjs → update-GmSUgswj.mjs} +3 -3
- package/package.json +1 -1
package/dist/lib.d.cts
CHANGED
|
@@ -312,62 +312,62 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
312
312
|
c: z.ZodString;
|
|
313
313
|
t: z.ZodLiteral<"encrypted">;
|
|
314
314
|
}, "strip", z.ZodTypeAny, {
|
|
315
|
-
c: string;
|
|
316
315
|
t: "encrypted";
|
|
317
|
-
}, {
|
|
318
316
|
c: string;
|
|
317
|
+
}, {
|
|
319
318
|
t: "encrypted";
|
|
319
|
+
c: string;
|
|
320
320
|
}>;
|
|
321
321
|
createdAt: z.ZodNumber;
|
|
322
322
|
updatedAt: z.ZodNumber;
|
|
323
323
|
}, "strip", z.ZodTypeAny, {
|
|
324
|
-
id: string;
|
|
325
|
-
seq: number;
|
|
326
324
|
content: {
|
|
327
|
-
c: string;
|
|
328
325
|
t: "encrypted";
|
|
326
|
+
c: string;
|
|
329
327
|
};
|
|
328
|
+
id: string;
|
|
329
|
+
seq: number;
|
|
330
330
|
createdAt: number;
|
|
331
331
|
updatedAt: number;
|
|
332
332
|
localId?: string | null | undefined;
|
|
333
333
|
}, {
|
|
334
|
-
id: string;
|
|
335
|
-
seq: number;
|
|
336
334
|
content: {
|
|
337
|
-
c: string;
|
|
338
335
|
t: "encrypted";
|
|
336
|
+
c: string;
|
|
339
337
|
};
|
|
338
|
+
id: string;
|
|
339
|
+
seq: number;
|
|
340
340
|
createdAt: number;
|
|
341
341
|
updatedAt: number;
|
|
342
342
|
localId?: string | null | undefined;
|
|
343
343
|
}>;
|
|
344
344
|
}, "strip", z.ZodTypeAny, {
|
|
345
|
-
t: "new-message";
|
|
346
345
|
message: {
|
|
347
|
-
id: string;
|
|
348
|
-
seq: number;
|
|
349
346
|
content: {
|
|
350
|
-
c: string;
|
|
351
347
|
t: "encrypted";
|
|
348
|
+
c: string;
|
|
352
349
|
};
|
|
350
|
+
id: string;
|
|
351
|
+
seq: number;
|
|
353
352
|
createdAt: number;
|
|
354
353
|
updatedAt: number;
|
|
355
354
|
localId?: string | null | undefined;
|
|
356
355
|
};
|
|
356
|
+
t: "new-message";
|
|
357
357
|
sid: string;
|
|
358
358
|
}, {
|
|
359
|
-
t: "new-message";
|
|
360
359
|
message: {
|
|
361
|
-
id: string;
|
|
362
|
-
seq: number;
|
|
363
360
|
content: {
|
|
364
|
-
c: string;
|
|
365
361
|
t: "encrypted";
|
|
362
|
+
c: string;
|
|
366
363
|
};
|
|
364
|
+
id: string;
|
|
365
|
+
seq: number;
|
|
367
366
|
createdAt: number;
|
|
368
367
|
updatedAt: number;
|
|
369
368
|
localId?: string | null | undefined;
|
|
370
369
|
};
|
|
370
|
+
t: "new-message";
|
|
371
371
|
sid: string;
|
|
372
372
|
}>, z.ZodObject<{
|
|
373
373
|
t: z.ZodLiteral<"update-session">;
|
|
@@ -472,18 +472,18 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
472
472
|
seq: number;
|
|
473
473
|
createdAt: number;
|
|
474
474
|
body: {
|
|
475
|
-
t: "new-message";
|
|
476
475
|
message: {
|
|
477
|
-
id: string;
|
|
478
|
-
seq: number;
|
|
479
476
|
content: {
|
|
480
|
-
c: string;
|
|
481
477
|
t: "encrypted";
|
|
478
|
+
c: string;
|
|
482
479
|
};
|
|
480
|
+
id: string;
|
|
481
|
+
seq: number;
|
|
483
482
|
createdAt: number;
|
|
484
483
|
updatedAt: number;
|
|
485
484
|
localId?: string | null | undefined;
|
|
486
485
|
};
|
|
486
|
+
t: "new-message";
|
|
487
487
|
sid: string;
|
|
488
488
|
} | {
|
|
489
489
|
t: "update-session";
|
|
@@ -515,18 +515,18 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
515
515
|
seq: number;
|
|
516
516
|
createdAt: number;
|
|
517
517
|
body: {
|
|
518
|
-
t: "new-message";
|
|
519
518
|
message: {
|
|
520
|
-
id: string;
|
|
521
|
-
seq: number;
|
|
522
519
|
content: {
|
|
523
|
-
c: string;
|
|
524
520
|
t: "encrypted";
|
|
521
|
+
c: string;
|
|
525
522
|
};
|
|
523
|
+
id: string;
|
|
524
|
+
seq: number;
|
|
526
525
|
createdAt: number;
|
|
527
526
|
updatedAt: number;
|
|
528
527
|
localId?: string | null | undefined;
|
|
529
528
|
};
|
|
529
|
+
t: "new-message";
|
|
530
530
|
sid: string;
|
|
531
531
|
} | {
|
|
532
532
|
t: "update-session";
|
package/dist/lib.d.mts
CHANGED
|
@@ -312,62 +312,62 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
312
312
|
c: z.ZodString;
|
|
313
313
|
t: z.ZodLiteral<"encrypted">;
|
|
314
314
|
}, "strip", z.ZodTypeAny, {
|
|
315
|
-
c: string;
|
|
316
315
|
t: "encrypted";
|
|
317
|
-
}, {
|
|
318
316
|
c: string;
|
|
317
|
+
}, {
|
|
319
318
|
t: "encrypted";
|
|
319
|
+
c: string;
|
|
320
320
|
}>;
|
|
321
321
|
createdAt: z.ZodNumber;
|
|
322
322
|
updatedAt: z.ZodNumber;
|
|
323
323
|
}, "strip", z.ZodTypeAny, {
|
|
324
|
-
id: string;
|
|
325
|
-
seq: number;
|
|
326
324
|
content: {
|
|
327
|
-
c: string;
|
|
328
325
|
t: "encrypted";
|
|
326
|
+
c: string;
|
|
329
327
|
};
|
|
328
|
+
id: string;
|
|
329
|
+
seq: number;
|
|
330
330
|
createdAt: number;
|
|
331
331
|
updatedAt: number;
|
|
332
332
|
localId?: string | null | undefined;
|
|
333
333
|
}, {
|
|
334
|
-
id: string;
|
|
335
|
-
seq: number;
|
|
336
334
|
content: {
|
|
337
|
-
c: string;
|
|
338
335
|
t: "encrypted";
|
|
336
|
+
c: string;
|
|
339
337
|
};
|
|
338
|
+
id: string;
|
|
339
|
+
seq: number;
|
|
340
340
|
createdAt: number;
|
|
341
341
|
updatedAt: number;
|
|
342
342
|
localId?: string | null | undefined;
|
|
343
343
|
}>;
|
|
344
344
|
}, "strip", z.ZodTypeAny, {
|
|
345
|
-
t: "new-message";
|
|
346
345
|
message: {
|
|
347
|
-
id: string;
|
|
348
|
-
seq: number;
|
|
349
346
|
content: {
|
|
350
|
-
c: string;
|
|
351
347
|
t: "encrypted";
|
|
348
|
+
c: string;
|
|
352
349
|
};
|
|
350
|
+
id: string;
|
|
351
|
+
seq: number;
|
|
353
352
|
createdAt: number;
|
|
354
353
|
updatedAt: number;
|
|
355
354
|
localId?: string | null | undefined;
|
|
356
355
|
};
|
|
356
|
+
t: "new-message";
|
|
357
357
|
sid: string;
|
|
358
358
|
}, {
|
|
359
|
-
t: "new-message";
|
|
360
359
|
message: {
|
|
361
|
-
id: string;
|
|
362
|
-
seq: number;
|
|
363
360
|
content: {
|
|
364
|
-
c: string;
|
|
365
361
|
t: "encrypted";
|
|
362
|
+
c: string;
|
|
366
363
|
};
|
|
364
|
+
id: string;
|
|
365
|
+
seq: number;
|
|
367
366
|
createdAt: number;
|
|
368
367
|
updatedAt: number;
|
|
369
368
|
localId?: string | null | undefined;
|
|
370
369
|
};
|
|
370
|
+
t: "new-message";
|
|
371
371
|
sid: string;
|
|
372
372
|
}>, z.ZodObject<{
|
|
373
373
|
t: z.ZodLiteral<"update-session">;
|
|
@@ -472,18 +472,18 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
472
472
|
seq: number;
|
|
473
473
|
createdAt: number;
|
|
474
474
|
body: {
|
|
475
|
-
t: "new-message";
|
|
476
475
|
message: {
|
|
477
|
-
id: string;
|
|
478
|
-
seq: number;
|
|
479
476
|
content: {
|
|
480
|
-
c: string;
|
|
481
477
|
t: "encrypted";
|
|
478
|
+
c: string;
|
|
482
479
|
};
|
|
480
|
+
id: string;
|
|
481
|
+
seq: number;
|
|
483
482
|
createdAt: number;
|
|
484
483
|
updatedAt: number;
|
|
485
484
|
localId?: string | null | undefined;
|
|
486
485
|
};
|
|
486
|
+
t: "new-message";
|
|
487
487
|
sid: string;
|
|
488
488
|
} | {
|
|
489
489
|
t: "update-session";
|
|
@@ -515,18 +515,18 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
|
|
|
515
515
|
seq: number;
|
|
516
516
|
createdAt: number;
|
|
517
517
|
body: {
|
|
518
|
-
t: "new-message";
|
|
519
518
|
message: {
|
|
520
|
-
id: string;
|
|
521
|
-
seq: number;
|
|
522
519
|
content: {
|
|
523
|
-
c: string;
|
|
524
520
|
t: "encrypted";
|
|
521
|
+
c: string;
|
|
525
522
|
};
|
|
523
|
+
id: string;
|
|
524
|
+
seq: number;
|
|
526
525
|
createdAt: number;
|
|
527
526
|
updatedAt: number;
|
|
528
527
|
localId?: string | null | undefined;
|
|
529
528
|
};
|
|
529
|
+
t: "new-message";
|
|
530
530
|
sid: string;
|
|
531
531
|
} | {
|
|
532
532
|
t: "update-session";
|
package/dist/lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient } from './api-
|
|
2
|
-
export { c as configuration, l as logger } from './persistence-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient } from './api-DgjBoynq.mjs';
|
|
2
|
+
export { c as configuration, l as logger } from './persistence-CO8Q0Eh6.mjs';
|
|
3
3
|
export { R as RawJSONLinesSchema } from './types-BoJh4Qfv.mjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import 'node:events';
|
|
@@ -28,6 +28,6 @@ import 'tweetnacl';
|
|
|
28
28
|
import '@stablelib/base64';
|
|
29
29
|
import 'node:readline';
|
|
30
30
|
import 'expo-server-sdk';
|
|
31
|
-
import './sessionKeyCache-
|
|
31
|
+
import './sessionKeyCache-D9_P4Mhm.mjs';
|
|
32
32
|
import 'chalk';
|
|
33
33
|
import 'fs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var logger = require('./persistence-
|
|
5
|
-
var api = require('./api-
|
|
4
|
+
var logger = require('./persistence-BJVrfFPM.cjs');
|
|
5
|
+
var api = require('./api-OthK5iIu.cjs');
|
|
6
6
|
|
|
7
7
|
class BaseReasoningProcessor {
|
|
8
8
|
accumulator = "";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger } from './persistence-
|
|
3
|
-
import { s as saveToolOutputRecord } from './api-
|
|
2
|
+
import { l as logger } from './persistence-CO8Q0Eh6.mjs';
|
|
3
|
+
import { s as saveToolOutputRecord } from './api-DgjBoynq.mjs';
|
|
4
4
|
|
|
5
5
|
class BaseReasoningProcessor {
|
|
6
6
|
accumulator = "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stat, readFile } from 'node:fs/promises';
|
|
2
2
|
import { io } from 'socket.io-client';
|
|
3
|
-
import { c as configuration, e as encodeBase64, f as encrypt, g as decrypt, h as decodeBase64 } from './persistence-
|
|
4
|
-
import { resolveDeviceForCommand } from './ssh-
|
|
3
|
+
import { c as configuration, e as encodeBase64, f as encrypt, g as decrypt, h as decodeBase64 } from './persistence-CO8Q0Eh6.mjs';
|
|
4
|
+
import { resolveDeviceForCommand } from './ssh-D7J3y8Sm.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'node:path';
|
|
@@ -10,16 +10,16 @@ import 'node:crypto';
|
|
|
10
10
|
import 'tweetnacl';
|
|
11
11
|
import 'chalk';
|
|
12
12
|
import 'fs';
|
|
13
|
-
import './deviceKeys-
|
|
13
|
+
import './deviceKeys-BghZEVQM.mjs';
|
|
14
14
|
import 'axios';
|
|
15
|
-
import './auth-
|
|
15
|
+
import './auth-BCH_VzFY.mjs';
|
|
16
16
|
import 'qrcode-terminal';
|
|
17
17
|
import './time-DgsBLJA_.mjs';
|
|
18
|
-
import './browser-
|
|
18
|
+
import './browser-oD4Fhplt.mjs';
|
|
19
19
|
import 'open';
|
|
20
20
|
import 'react';
|
|
21
21
|
import 'ink';
|
|
22
|
-
import './controlClient-
|
|
22
|
+
import './controlClient-BXUvvi9h.mjs';
|
|
23
23
|
import './projectPath-BTBIMB57.mjs';
|
|
24
24
|
import 'path';
|
|
25
25
|
import 'url';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var promises = require('node:fs/promises');
|
|
4
4
|
var socket_ioClient = require('socket.io-client');
|
|
5
|
-
var logger = require('./persistence-
|
|
6
|
-
var ssh = require('./ssh-
|
|
5
|
+
var logger = require('./persistence-BJVrfFPM.cjs');
|
|
6
|
+
var ssh = require('./ssh-C0ypGPrZ.cjs');
|
|
7
7
|
require('node:fs');
|
|
8
8
|
require('node:os');
|
|
9
9
|
require('node:path');
|
|
@@ -12,16 +12,16 @@ require('node:crypto');
|
|
|
12
12
|
require('tweetnacl');
|
|
13
13
|
require('chalk');
|
|
14
14
|
require('fs');
|
|
15
|
-
require('./deviceKeys-
|
|
15
|
+
require('./deviceKeys-CdzEV43E.cjs');
|
|
16
16
|
require('axios');
|
|
17
|
-
require('./auth-
|
|
17
|
+
require('./auth-BpoPI35K.cjs');
|
|
18
18
|
require('qrcode-terminal');
|
|
19
19
|
require('./time-Bj2HRkKH.cjs');
|
|
20
|
-
require('./browser-
|
|
20
|
+
require('./browser-BPhM1lYb.cjs');
|
|
21
21
|
require('open');
|
|
22
22
|
require('react');
|
|
23
23
|
require('ink');
|
|
24
|
-
require('./controlClient-
|
|
24
|
+
require('./controlClient-DEk3NLK2.cjs');
|
|
25
25
|
require('./projectPath-ChLhdOyt.cjs');
|
|
26
26
|
require('path');
|
|
27
27
|
require('url');
|
package/dist/{registerKillSessionHandler-DUrOhiGo.cjs → registerKillSessionHandler-Bdw4uNLH.cjs}
RENAMED
|
@@ -7,8 +7,8 @@ var node_http = require('node:http');
|
|
|
7
7
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
8
8
|
var types_js = require('@modelcontextprotocol/sdk/types.js');
|
|
9
9
|
var z = require('zod');
|
|
10
|
-
var logger = require('./persistence-
|
|
11
|
-
var deviceKeys = require('./deviceKeys-
|
|
10
|
+
var logger = require('./persistence-BJVrfFPM.cjs');
|
|
11
|
+
var deviceKeys = require('./deviceKeys-CdzEV43E.cjs');
|
|
12
12
|
var axios = require('axios');
|
|
13
13
|
var promises = require('node:fs/promises');
|
|
14
14
|
var node_crypto = require('node:crypto');
|
|
@@ -18,7 +18,7 @@ require('./index-BeKrqPYR.cjs');
|
|
|
18
18
|
var node_child_process = require('node:child_process');
|
|
19
19
|
require('node:events');
|
|
20
20
|
require('socket.io-client');
|
|
21
|
-
require('./api-
|
|
21
|
+
require('./api-OthK5iIu.cjs');
|
|
22
22
|
require('tweetnacl');
|
|
23
23
|
require('ws');
|
|
24
24
|
require('crypto');
|
|
@@ -40,6 +40,28 @@ const IMAGE_MIME_TYPES = {
|
|
|
40
40
|
function authHeaders(credentials) {
|
|
41
41
|
return { headers: { Authorization: `Bearer ${credentials.token}` }, timeout: 15e3 };
|
|
42
42
|
}
|
|
43
|
+
async function listBugs(credentials, input = {}) {
|
|
44
|
+
const response = await axios.get(
|
|
45
|
+
`${logger.configuration.serverUrl}/v1/bugs`,
|
|
46
|
+
{
|
|
47
|
+
params: {
|
|
48
|
+
...input.status ? { status: input.status } : {},
|
|
49
|
+
...input.query ? { query: input.query } : {},
|
|
50
|
+
limit: input.limit ?? 50
|
|
51
|
+
},
|
|
52
|
+
...authHeaders(credentials)
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
return response.data;
|
|
56
|
+
}
|
|
57
|
+
async function getBug(credentials, reference) {
|
|
58
|
+
const bugId = await resolveBugId(credentials, reference);
|
|
59
|
+
const response = await axios.get(
|
|
60
|
+
`${logger.configuration.serverUrl}/v1/bugs/${bugId}`,
|
|
61
|
+
authHeaders(credentials)
|
|
62
|
+
);
|
|
63
|
+
return response.data.bug;
|
|
64
|
+
}
|
|
43
65
|
async function resolveBugId(credentials, reference) {
|
|
44
66
|
const trimmed = reference.trim();
|
|
45
67
|
const displayNumber = trimmed.replace(/^#/, "").match(/^(?:bug-)?(\d+)$/i)?.[1];
|
|
@@ -148,6 +170,36 @@ function toToolError(message, details) {
|
|
|
148
170
|
isError: true
|
|
149
171
|
};
|
|
150
172
|
}
|
|
173
|
+
const asDate = (ms) => new Date(ms).toISOString().slice(0, 10);
|
|
174
|
+
function formatBugDetail(bug) {
|
|
175
|
+
const sections = [
|
|
176
|
+
`${bug.displayId} [${bug.status}] ${bug.visibility}`,
|
|
177
|
+
`${bug.title}`,
|
|
178
|
+
`filed by ${bug.createdByNickname ?? "unknown"}${bug.lastActivityAt ? `, last activity ${asDate(bug.lastActivityAt)}` : ""}`,
|
|
179
|
+
`
|
|
180
|
+
--- description ---
|
|
181
|
+
${bug.description}`
|
|
182
|
+
];
|
|
183
|
+
if (bug.attachments.length) {
|
|
184
|
+
sections.push(`
|
|
185
|
+
--- attachments (${bug.attachments.length}) ---
|
|
186
|
+
${bug.attachments.map((a) => `${a.mimeType} ${a.width ?? "?"}x${a.height ?? "?"} ${a.url}`).join("\n")}`);
|
|
187
|
+
}
|
|
188
|
+
if (bug.comments.length) {
|
|
189
|
+
sections.push(`
|
|
190
|
+
--- comments (${bug.comments.length}) ---
|
|
191
|
+
${bug.comments.map((c) => [
|
|
192
|
+
`[${asDate(c.createdAt)}] ${c.authorNickname ?? "unknown"}: ${c.body}`,
|
|
193
|
+
...c.attachments.map((a) => ` + ${a.mimeType} ${a.url}`)
|
|
194
|
+
].join("\n")).join("\n")}`);
|
|
195
|
+
}
|
|
196
|
+
if (bug.statusHistory.length) {
|
|
197
|
+
sections.push(`
|
|
198
|
+
--- history (${bug.statusHistory.length}) ---
|
|
199
|
+
${bug.statusHistory.map((h) => `${asDate(h.createdAt)} ${h.fromStatus ? `${h.fromStatus} \u2192 ${h.toStatus}` : h.action} by ${h.actorNickname ?? "unknown"}${h.note ? ` (${h.note})` : ""}`).join("\n")}`);
|
|
200
|
+
}
|
|
201
|
+
return sections.join("\n");
|
|
202
|
+
}
|
|
151
203
|
function createMcpServer(client, options) {
|
|
152
204
|
const mcp = new mcp_js.McpServer({
|
|
153
205
|
name: "Happy MCP",
|
|
@@ -298,12 +350,59 @@ ${result.stderr}`);
|
|
|
298
350
|
return toToolError(`Failed to submit bug: ${error instanceof Error ? error.message : String(error)}`);
|
|
299
351
|
}
|
|
300
352
|
});
|
|
353
|
+
mcp.registerTool("list_bugs", {
|
|
354
|
+
description: "List bugs on the user's Happy bug board. Use to answer what is open, to find a bug the user is describing, or to get its number before editing or deleting it.",
|
|
355
|
+
title: "List Bugs",
|
|
356
|
+
inputSchema: {
|
|
357
|
+
status: z.z.enum(["pending", "in_progress", "verify", "closed"]).optional().describe("Only bugs in this state"),
|
|
358
|
+
query: z.z.string().describe("Free text matched against number, title, description, author and status").optional(),
|
|
359
|
+
limit: z.z.number().int().min(1).max(200).optional().describe("How many to return, 50 by default")
|
|
360
|
+
}
|
|
361
|
+
}, async (args) => {
|
|
362
|
+
const credentials = await logger.readCredentials();
|
|
363
|
+
if (!credentials) {
|
|
364
|
+
return toToolError("No Happy credentials on this machine.");
|
|
365
|
+
}
|
|
366
|
+
try {
|
|
367
|
+
const { bugs, pendingCount } = await listBugs(credentials, args);
|
|
368
|
+
const lines = bugs.map((bug) => {
|
|
369
|
+
const counts = [
|
|
370
|
+
bug.attachmentCount ? `${bug.attachmentCount} images` : "",
|
|
371
|
+
bug.commentCount ? `${bug.commentCount} comments` : ""
|
|
372
|
+
].filter(Boolean).join(", ");
|
|
373
|
+
const activity = bug.lastActivityAt ? new Date(bug.lastActivityAt).toISOString().slice(0, 10) : "";
|
|
374
|
+
return `${bug.displayId} [${bug.status}] ${bug.title}${bug.createdByNickname ? ` \u2014 ${bug.createdByNickname}` : ""}${counts ? ` (${counts})` : ""}${activity ? ` ${activity}` : ""}`;
|
|
375
|
+
});
|
|
376
|
+
const header = `${bugs.length} bugs shown, ${pendingCount} pending on the board`;
|
|
377
|
+
return { content: [{ type: "text", text: lines.length ? `${header}
|
|
378
|
+
${lines.join("\n")}` : header }] };
|
|
379
|
+
} catch (error) {
|
|
380
|
+
return toToolError(`Failed to list bugs: ${error instanceof Error ? error.message : String(error)}`);
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
mcp.registerTool("get_bug", {
|
|
384
|
+
description: "Read one bug in full from the user's Happy bug board: its description, screenshots, every comment and how it moved between states. Use when the user asks about a specific bug, or before editing one so the rewrite keeps what is still true.",
|
|
385
|
+
title: "Get Bug",
|
|
386
|
+
inputSchema: {
|
|
387
|
+
bug: z.z.string().describe('Which bug, as the user refers to it: "BUG-236", "#236" or "236". An internal bug id also works.')
|
|
388
|
+
}
|
|
389
|
+
}, async (args) => {
|
|
390
|
+
const credentials = await logger.readCredentials();
|
|
391
|
+
if (!credentials) {
|
|
392
|
+
return toToolError("No Happy credentials on this machine.");
|
|
393
|
+
}
|
|
394
|
+
try {
|
|
395
|
+
return { content: [{ type: "text", text: formatBugDetail(await getBug(credentials, args.bug)) }] };
|
|
396
|
+
} catch (error) {
|
|
397
|
+
return toToolError(`Failed to read bug: ${error instanceof Error ? error.message : String(error)}`);
|
|
398
|
+
}
|
|
399
|
+
});
|
|
301
400
|
mcp.registerTool("edit_bug", {
|
|
302
401
|
description: "Change a bug already on the user's Happy bug board: rewrite its description, add screenshots to it, or both. Use when the user wants to correct, expand or illustrate an existing bug.",
|
|
303
402
|
title: "Edit Bug",
|
|
304
403
|
inputSchema: {
|
|
305
404
|
bug: z.z.string().describe('Which bug, as the user refers to it: "BUG-236", "#236" or "236". An internal bug id also works.'),
|
|
306
|
-
description: z.z.string().optional().describe("The full replacement description. It replaces the old one outright, so carry over anything still true. Omit to leave the description alone."),
|
|
405
|
+
description: z.z.string().optional().describe("The full replacement description. It replaces the old one outright, so carry over anything still true \u2014 including any [[bug-image:N]] markers, which is where the Nth screenshot appears inline. Drop a marker and that image moves to the end. Omit this field to leave the description alone."),
|
|
307
406
|
images: z.z.array(z.z.string()).optional().describe("Absolute paths to screenshots on this machine, added to any already on the bug. JPEG and PNG only, 10 per bug in total, 20MB each.")
|
|
308
407
|
}
|
|
309
408
|
}, async (args) => {
|
|
@@ -343,7 +442,7 @@ ${result.stderr}`);
|
|
|
343
442
|
async function startHappyServer(client) {
|
|
344
443
|
const transports = /* @__PURE__ */ new Map();
|
|
345
444
|
const enableOrchestratorTools = prompt.shouldEnableOrchestratorTools();
|
|
346
|
-
const toolNames = ["change_title", "preview_html", "device_list", "device_exec", "submit_bug", "edit_bug", "delete_bug"];
|
|
445
|
+
const toolNames = ["change_title", "preview_html", "device_list", "device_exec", "list_bugs", "get_bug", "submit_bug", "edit_bug", "delete_bug"];
|
|
347
446
|
const originalConsoleError = console.error;
|
|
348
447
|
console.error = (...args) => {
|
|
349
448
|
logger.logger.debug("[happyMCP] console.error:", ...args);
|