@zonease/happy 0.6.56 → 0.6.57
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-9wvM_aF-.mjs → api-CKGCwsUf.mjs} +38 -3
- package/dist/{api-BGc484qf.cjs → api-jNSgtz8Y.cjs} +42 -3
- package/dist/{auth-B6vskzfm.cjs → auth-BUQLBefw.cjs} +2 -2
- package/dist/{auth-BnEa31tI.mjs → auth-CFcrX0sP.mjs} +2 -2
- package/dist/{auth-CPfJalJM.cjs → auth-CsU0d6gM.cjs} +4 -4
- package/dist/{auth-DqAM-lIh.mjs → auth-ZUnqSqKY.mjs} +4 -4
- package/dist/{browser-CnxzD1lA.cjs → browser-BA-Yc9JO.cjs} +1 -1
- package/dist/{browser-CkQP96Zi.mjs → browser-eziH4OAA.mjs} +1 -1
- package/dist/{claudeLocal-B5uxtoit.mjs → claudeLocal-CBalcsEQ.mjs} +1 -1
- package/dist/{claudeLocal-CV4fT0Gg.cjs → claudeLocal-FQ_thOHX.cjs} +1 -1
- package/dist/{config-C__p7EWC.cjs → config-CECX_zGu.cjs} +1 -1
- package/dist/{config-C9hdBdfj.mjs → config-DaQJWbRZ.mjs} +1 -1
- package/dist/{connect-DQjpjfYn.cjs → connect-Bs0ChOpi.cjs} +4 -4
- package/dist/{connect-BeORCRXq.mjs → connect-DDKq78R-.mjs} +4 -4
- package/dist/{controlClient-DWBW6jRF.cjs → controlClient-B70-61t0.cjs} +1 -1
- package/dist/{controlClient-VY0CGL8k.mjs → controlClient-jullf1ow.mjs} +1 -1
- package/dist/{cursorApprovalHook-BuDSRM-6.cjs → cursorApprovalHook-Czq1DjVU.cjs} +2 -2
- package/dist/{cursorApprovalHook-D_8btpsY.mjs → cursorApprovalHook-O8j9S8An.mjs} +2 -2
- package/dist/{cursorApprovalServer-j9RphnEG.cjs → cursorApprovalServer-Cqsy8ohH.cjs} +1 -1
- package/dist/{cursorApprovalServer-BOUd2-Fg.mjs → cursorApprovalServer-nbHwu4ru.mjs} +1 -1
- package/dist/{deviceKeys-c_sN01Mm.cjs → deviceKeys-YeZD2zQo.cjs} +2 -2
- package/dist/{deviceKeys-DvfaTff3.mjs → deviceKeys-su95gdc-.mjs} +2 -2
- package/dist/{doctor-DQtQbfG-.mjs → doctor-Brqp2e3O.mjs} +2 -2
- package/dist/{doctor-CD46A-_Y.cjs → doctor-DbfxSKDV.cjs} +2 -2
- package/dist/{downloadImage-DGdHCFi3.cjs → downloadImage-CyrKKnfC.cjs} +1 -1
- package/dist/{downloadImage-B6A4x8Jw.mjs → downloadImage-K-xFB9jG.mjs} +1 -1
- package/dist/{enroll-D9CEuRI_.cjs → enroll-CMH2pLy0.cjs} +3 -3
- package/dist/{enroll-CyHWNKNt.mjs → enroll-Ck7f6V22.mjs} +3 -3
- package/dist/{evidence-BuYebdrN.mjs → evidence-CMz-atyb.mjs} +1 -1
- package/dist/{evidence-CCrpzsTA.cjs → evidence-yOULEvRk.cjs} +1 -1
- package/dist/{formatImageMessage-DttKW75w.cjs → formatImageMessage-DSsQTvO3.cjs} +1 -1
- package/dist/{formatImageMessage-5qaaT_Wq.mjs → formatImageMessage-tdlJeRPD.mjs} +1 -1
- package/dist/index.cjs +46 -46
- package/dist/index.mjs +46 -46
- package/dist/{install-1Y6dAcMp.mjs → install-BL0173KN.mjs} +1 -1
- package/dist/{install-B0hT_tLv.cjs → install-BNR9inWv.cjs} +2 -2
- package/dist/{install-eIXFuZbC.mjs → install-CpTmSd4l.mjs} +2 -2
- package/dist/{install-C4cwObCN.cjs → install-DKZjMcR2.cjs} +1 -1
- package/dist/lib.cjs +3 -3
- package/dist/lib.d.cts +10 -0
- package/dist/lib.d.mts +10 -0
- package/dist/lib.mjs +3 -3
- package/dist/{loadableToolOutput-BKDTnyoF.mjs → loadableToolOutput-BRRL6yS-.mjs} +2 -2
- package/dist/{loadableToolOutput-Cb-18__b.cjs → loadableToolOutput-BxFrugLw.cjs} +2 -2
- package/dist/{persistence-IdEuIeMz.mjs → persistence-BirvtFep.mjs} +2 -2
- package/dist/{persistence-CNXsXPLm.cjs → persistence-DoY9jKDN.cjs} +1 -1
- package/dist/{push-tXs96IyG.mjs → push-B325YQUT.mjs} +6 -6
- package/dist/{push-XL6Sb0Vw.cjs → push-teAS18QK.cjs} +6 -6
- package/dist/{registerKillSessionHandler-D9tmPdw5.cjs → registerKillSessionHandler-CEvWEzOm.cjs} +3 -3
- package/dist/{registerKillSessionHandler-vF5c8YZF.mjs → registerKillSessionHandler-CTSkaRVu.mjs} +3 -3
- package/dist/{run-BKfeeheJ.cjs → run-D38D-G8z.cjs} +167 -8
- package/dist/{run-BvpCwXkt.mjs → run-DNfj0j_h.mjs} +167 -8
- package/dist/{runClaude-BiVqZQOm.mjs → runClaude-C54Y-vby.mjs} +19 -18
- package/dist/{runClaude-DDsG7eMR.cjs → runClaude-ChIbxtFs.cjs} +20 -19
- package/dist/{runCodex-C-8SvnpP.mjs → runCodex-Bt6DgaY6.mjs} +18 -17
- package/dist/{runCodex-Bh519-dW.cjs → runCodex-DKL7LL-d.cjs} +18 -17
- package/dist/{runCursor-CYbvOqUa.cjs → runCursor-CzBFzit8.cjs} +18 -17
- package/dist/{runCursor-3AFNF0y2.mjs → runCursor-_ZZmpyjD.mjs} +18 -17
- package/dist/{runGemini-ExHXGZBY.cjs → runGemini-B2IY0bg7.cjs} +20 -19
- package/dist/{runGemini-Dh2JRfOJ.mjs → runGemini-COkJ59pz.mjs} +20 -19
- package/dist/{runOneShot-CVcw-K0_.mjs → runOneShot-Bt5mWMh4.mjs} +2 -2
- package/dist/{runOneShot-CEVKtkx_.cjs → runOneShot-DApUG4Jw.cjs} +2 -2
- package/dist/{serve-C4dOQ0jP.mjs → serve-CzQSwmyU.mjs} +7 -6
- package/dist/{serve-D0IhhySV.cjs → serve-rMs5fvxH.cjs} +7 -6
- package/dist/{session-DK9eudJT.cjs → session-C9z-9F__.cjs} +6 -5
- package/dist/{session-CwMxRPXS.mjs → session-CJu83tzU.mjs} +6 -5
- package/dist/sessionDecrypt-DlajL7Fn.cjs +66 -0
- package/dist/sessionDecrypt-R6Ee4mFr.mjs +64 -0
- package/dist/{sessionKeyCache-JjjYAxdf.cjs → sessionKeyCache-CRINEKrH.cjs} +1 -1
- package/dist/{sessionKeyCache-DDzTs7E5.mjs → sessionKeyCache-Ci9NA8Nn.mjs} +1 -1
- package/dist/{sessionList-IYAtPIev.mjs → sessionList-Bh8eF10P.mjs} +2 -2
- package/dist/{sessionList-DZmmAP3q.cjs → sessionList-DXPTa2ix.cjs} +3 -3
- package/dist/{sessionSummary-CQQyTHRC.mjs → sessionSummary-CcdMMHfv.mjs} +3 -63
- package/dist/{sessionSummary-CsIfkyZA.cjs → sessionSummary-Cs-_4S3j.cjs} +3 -64
- package/dist/{setupOfflineReconnection-DwtIEUeJ.cjs → setupOfflineReconnection-BmbFrBPc.cjs} +3 -3
- package/dist/{setupOfflineReconnection-C1yzDMt6.mjs → setupOfflineReconnection-DV3FASIY.mjs} +3 -3
- package/dist/{spawnHappyCLI-DlTg87jS.mjs → spawnHappyCLI-CSkTkB4n.mjs} +1 -1
- package/dist/{spawnHappyCLI-BbMkZhMk.cjs → spawnHappyCLI-CilqRN5U.cjs} +1 -1
- package/dist/{ssh-DSVjanff.mjs → ssh-CgYdGAzd.mjs} +5 -5
- package/dist/{ssh-D31o750w.cjs → ssh-CrxTSwPb.cjs} +5 -5
- package/dist/{task-D9ZjWCcw.mjs → task-BJro3dR3.mjs} +7 -6
- package/dist/{task--Apxd9oF.cjs → task-GLv6BSQA.cjs} +7 -6
- package/dist/{uninstall-Bo2uaLRP.mjs → uninstall-CKmjUaMr.mjs} +2 -2
- package/dist/{uninstall-CZJcoC06.cjs → uninstall-CyoWDMHw.cjs} +2 -2
- package/dist/{update-D-bTjP2k.cjs → update-AqCJSfVL.cjs} +3 -3
- package/dist/{update-BiV4YqG3.mjs → update-BxE93-s7.mjs} +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
4
|
+
var auth = require('./auth-BUQLBefw.cjs');
|
|
5
|
+
var sessionKeyCache = require('./sessionKeyCache-CRINEKrH.cjs');
|
|
6
|
+
|
|
7
|
+
function resolveSessionKey(credentials, dataEncryptionKey, sessionId) {
|
|
8
|
+
if (credentials.encryption.type === "legacy") {
|
|
9
|
+
return { key: credentials.encryption.secret, variant: "legacy" };
|
|
10
|
+
}
|
|
11
|
+
if (sessionId) {
|
|
12
|
+
const cached = sessionKeyCache.readCachedSessionKey(sessionId, credentials.encryption.machineKey);
|
|
13
|
+
if (cached) {
|
|
14
|
+
return { key: cached, variant: "dataKey" };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (!dataEncryptionKey) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const blob = logger.decodeBase64(dataEncryptionKey);
|
|
21
|
+
if (blob.length < 1 || blob[0] !== 0) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const opened = auth.decryptWithEphemeralKey(blob.slice(1), credentials.encryption.machineKey);
|
|
25
|
+
if (!opened) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return { key: opened, variant: "dataKey" };
|
|
29
|
+
}
|
|
30
|
+
function decryptSessionRow(credentials, row) {
|
|
31
|
+
const resolved = resolveSessionKey(credentials, row.dataEncryptionKey, row.id);
|
|
32
|
+
if (!resolved) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
let metadata = null;
|
|
36
|
+
if (row.metadata) {
|
|
37
|
+
try {
|
|
38
|
+
metadata = resolved.variant === "legacy" ? logger.decryptLegacy(logger.decodeBase64(row.metadata), resolved.key) : logger.decryptWithDataKey(logger.decodeBase64(row.metadata), resolved.key);
|
|
39
|
+
} catch {
|
|
40
|
+
metadata = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
let agentState = null;
|
|
44
|
+
if (row.agentState) {
|
|
45
|
+
try {
|
|
46
|
+
agentState = resolved.variant === "legacy" ? logger.decryptLegacy(logger.decodeBase64(row.agentState), resolved.key) : logger.decryptWithDataKey(logger.decodeBase64(row.agentState), resolved.key);
|
|
47
|
+
} catch {
|
|
48
|
+
agentState = null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
id: row.id,
|
|
53
|
+
seq: row.seq,
|
|
54
|
+
createdAt: row.createdAt,
|
|
55
|
+
updatedAt: row.updatedAt,
|
|
56
|
+
activeAt: row.activeAt,
|
|
57
|
+
active: row.active,
|
|
58
|
+
metadata,
|
|
59
|
+
agentState,
|
|
60
|
+
isShared: row.isShared,
|
|
61
|
+
encryptionKey: resolved.key,
|
|
62
|
+
encryptionVariant: resolved.variant
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.decryptSessionRow = decryptSessionRow;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { o as decryptLegacy, h as decodeBase64, k as decryptWithDataKey } from './persistence-BirvtFep.mjs';
|
|
2
|
+
import { decryptWithEphemeralKey } from './auth-CFcrX0sP.mjs';
|
|
3
|
+
import { r as readCachedSessionKey } from './sessionKeyCache-Ci9NA8Nn.mjs';
|
|
4
|
+
|
|
5
|
+
function resolveSessionKey(credentials, dataEncryptionKey, sessionId) {
|
|
6
|
+
if (credentials.encryption.type === "legacy") {
|
|
7
|
+
return { key: credentials.encryption.secret, variant: "legacy" };
|
|
8
|
+
}
|
|
9
|
+
if (sessionId) {
|
|
10
|
+
const cached = readCachedSessionKey(sessionId, credentials.encryption.machineKey);
|
|
11
|
+
if (cached) {
|
|
12
|
+
return { key: cached, variant: "dataKey" };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (!dataEncryptionKey) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const blob = decodeBase64(dataEncryptionKey);
|
|
19
|
+
if (blob.length < 1 || blob[0] !== 0) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const opened = decryptWithEphemeralKey(blob.slice(1), credentials.encryption.machineKey);
|
|
23
|
+
if (!opened) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return { key: opened, variant: "dataKey" };
|
|
27
|
+
}
|
|
28
|
+
function decryptSessionRow(credentials, row) {
|
|
29
|
+
const resolved = resolveSessionKey(credentials, row.dataEncryptionKey, row.id);
|
|
30
|
+
if (!resolved) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
let metadata = null;
|
|
34
|
+
if (row.metadata) {
|
|
35
|
+
try {
|
|
36
|
+
metadata = resolved.variant === "legacy" ? decryptLegacy(decodeBase64(row.metadata), resolved.key) : decryptWithDataKey(decodeBase64(row.metadata), resolved.key);
|
|
37
|
+
} catch {
|
|
38
|
+
metadata = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
let agentState = null;
|
|
42
|
+
if (row.agentState) {
|
|
43
|
+
try {
|
|
44
|
+
agentState = resolved.variant === "legacy" ? decryptLegacy(decodeBase64(row.agentState), resolved.key) : decryptWithDataKey(decodeBase64(row.agentState), resolved.key);
|
|
45
|
+
} catch {
|
|
46
|
+
agentState = null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
id: row.id,
|
|
51
|
+
seq: row.seq,
|
|
52
|
+
createdAt: row.createdAt,
|
|
53
|
+
updatedAt: row.updatedAt,
|
|
54
|
+
activeAt: row.activeAt,
|
|
55
|
+
active: row.active,
|
|
56
|
+
metadata,
|
|
57
|
+
agentState,
|
|
58
|
+
isShared: row.isShared,
|
|
59
|
+
encryptionKey: resolved.key,
|
|
60
|
+
encryptionVariant: resolved.variant
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { decryptSessionRow as d };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var fs = require('node:fs');
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var logger = require('./persistence-
|
|
6
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
7
7
|
|
|
8
8
|
function keyPath(sessionId) {
|
|
9
9
|
return path.join(logger.configuration.sessionKeysDir, `${sessionId}.key`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { writeFile } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { c as configuration, j as encryptWithDataKey, e as encodeBase64, k as decryptWithDataKey, h as decodeBase64 } from './persistence-
|
|
4
|
+
import { c as configuration, j as encryptWithDataKey, e as encodeBase64, k as decryptWithDataKey, h as decodeBase64 } from './persistence-BirvtFep.mjs';
|
|
5
5
|
|
|
6
6
|
function keyPath(sessionId) {
|
|
7
7
|
return join(configuration.sessionKeysDir, `${sessionId}.key`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { c as configuration } from './persistence-
|
|
4
|
-
import { d as decryptSessionRow } from './
|
|
3
|
+
import { c as configuration } from './persistence-BirvtFep.mjs';
|
|
4
|
+
import { d as decryptSessionRow } from './sessionDecrypt-R6Ee4mFr.mjs';
|
|
5
5
|
|
|
6
6
|
const sessionListInputSchema = {
|
|
7
7
|
status: z.enum(["active", "archived", "all"]).optional().describe("Filter by session state. Default: all."),
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
4
|
var z = require('zod');
|
|
5
|
-
var logger = require('./persistence-
|
|
6
|
-
var
|
|
5
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
6
|
+
var sessionDecrypt = require('./sessionDecrypt-DlajL7Fn.cjs');
|
|
7
7
|
|
|
8
8
|
const sessionListInputSchema = {
|
|
9
9
|
status: z.z.enum(["active", "archived", "all"]).optional().describe("Filter by session state. Default: all."),
|
|
@@ -22,7 +22,7 @@ async function runSessionList(credentials, input) {
|
|
|
22
22
|
timeout: 1e4
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
const filtered = response.data.sessions.map((row) =>
|
|
25
|
+
const filtered = response.data.sessions.map((row) => sessionDecrypt.decryptSessionRow(credentials, row)).filter((row) => row !== null).filter((row) => {
|
|
26
26
|
if (input.status === "active") return row.active;
|
|
27
27
|
if (input.status === "archived") return !row.active;
|
|
28
28
|
return true;
|
|
@@ -1,67 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as readCachedSessionKey } from './sessionKeyCache-DDzTs7E5.mjs';
|
|
6
|
-
|
|
7
|
-
function resolveSessionKey(credentials, dataEncryptionKey, sessionId) {
|
|
8
|
-
if (credentials.encryption.type === "legacy") {
|
|
9
|
-
return { key: credentials.encryption.secret, variant: "legacy" };
|
|
10
|
-
}
|
|
11
|
-
if (sessionId) {
|
|
12
|
-
const cached = readCachedSessionKey(sessionId, credentials.encryption.machineKey);
|
|
13
|
-
if (cached) {
|
|
14
|
-
return { key: cached, variant: "dataKey" };
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
if (!dataEncryptionKey) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
const blob = decodeBase64(dataEncryptionKey);
|
|
21
|
-
if (blob.length < 1 || blob[0] !== 0) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
const opened = decryptWithEphemeralKey(blob.slice(1), credentials.encryption.machineKey);
|
|
25
|
-
if (!opened) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return { key: opened, variant: "dataKey" };
|
|
29
|
-
}
|
|
30
|
-
function decryptSessionRow(credentials, row) {
|
|
31
|
-
const resolved = resolveSessionKey(credentials, row.dataEncryptionKey, row.id);
|
|
32
|
-
if (!resolved) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
let metadata = null;
|
|
36
|
-
if (row.metadata) {
|
|
37
|
-
try {
|
|
38
|
-
metadata = resolved.variant === "legacy" ? decryptLegacy(decodeBase64(row.metadata), resolved.key) : decryptWithDataKey(decodeBase64(row.metadata), resolved.key);
|
|
39
|
-
} catch {
|
|
40
|
-
metadata = null;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
let agentState = null;
|
|
44
|
-
if (row.agentState) {
|
|
45
|
-
try {
|
|
46
|
-
agentState = resolved.variant === "legacy" ? decryptLegacy(decodeBase64(row.agentState), resolved.key) : decryptWithDataKey(decodeBase64(row.agentState), resolved.key);
|
|
47
|
-
} catch {
|
|
48
|
-
agentState = null;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
id: row.id,
|
|
53
|
-
seq: row.seq,
|
|
54
|
-
createdAt: row.createdAt,
|
|
55
|
-
updatedAt: row.updatedAt,
|
|
56
|
-
activeAt: row.activeAt,
|
|
57
|
-
active: row.active,
|
|
58
|
-
metadata,
|
|
59
|
-
agentState,
|
|
60
|
-
isShared: row.isShared,
|
|
61
|
-
encryptionKey: resolved.key,
|
|
62
|
-
encryptionVariant: resolved.variant
|
|
63
|
-
};
|
|
64
|
-
}
|
|
3
|
+
import { c as configuration, h as decodeBase64, o as decryptLegacy, k as decryptWithDataKey } from './persistence-BirvtFep.mjs';
|
|
4
|
+
import { d as decryptSessionRow } from './sessionDecrypt-R6Ee4mFr.mjs';
|
|
65
5
|
|
|
66
6
|
async function fetchSessionById(credentials, sessionId) {
|
|
67
7
|
const response = await axios.get(
|
|
@@ -384,4 +324,4 @@ async function runSessionSummary(credentials, input) {
|
|
|
384
324
|
};
|
|
385
325
|
}
|
|
386
326
|
|
|
387
|
-
export { decryptMessage as
|
|
327
|
+
export { decryptMessage as d, fetchSessionById as f, runSessionSummary as r, sessionSummaryInputSchema as s };
|
|
@@ -2,68 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
4
|
var z = require('zod');
|
|
5
|
-
var logger = require('./persistence-
|
|
6
|
-
var
|
|
7
|
-
var sessionKeyCache = require('./sessionKeyCache-JjjYAxdf.cjs');
|
|
8
|
-
|
|
9
|
-
function resolveSessionKey(credentials, dataEncryptionKey, sessionId) {
|
|
10
|
-
if (credentials.encryption.type === "legacy") {
|
|
11
|
-
return { key: credentials.encryption.secret, variant: "legacy" };
|
|
12
|
-
}
|
|
13
|
-
if (sessionId) {
|
|
14
|
-
const cached = sessionKeyCache.readCachedSessionKey(sessionId, credentials.encryption.machineKey);
|
|
15
|
-
if (cached) {
|
|
16
|
-
return { key: cached, variant: "dataKey" };
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (!dataEncryptionKey) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
const blob = logger.decodeBase64(dataEncryptionKey);
|
|
23
|
-
if (blob.length < 1 || blob[0] !== 0) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const opened = auth.decryptWithEphemeralKey(blob.slice(1), credentials.encryption.machineKey);
|
|
27
|
-
if (!opened) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
return { key: opened, variant: "dataKey" };
|
|
31
|
-
}
|
|
32
|
-
function decryptSessionRow(credentials, row) {
|
|
33
|
-
const resolved = resolveSessionKey(credentials, row.dataEncryptionKey, row.id);
|
|
34
|
-
if (!resolved) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
let metadata = null;
|
|
38
|
-
if (row.metadata) {
|
|
39
|
-
try {
|
|
40
|
-
metadata = resolved.variant === "legacy" ? logger.decryptLegacy(logger.decodeBase64(row.metadata), resolved.key) : logger.decryptWithDataKey(logger.decodeBase64(row.metadata), resolved.key);
|
|
41
|
-
} catch {
|
|
42
|
-
metadata = null;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
let agentState = null;
|
|
46
|
-
if (row.agentState) {
|
|
47
|
-
try {
|
|
48
|
-
agentState = resolved.variant === "legacy" ? logger.decryptLegacy(logger.decodeBase64(row.agentState), resolved.key) : logger.decryptWithDataKey(logger.decodeBase64(row.agentState), resolved.key);
|
|
49
|
-
} catch {
|
|
50
|
-
agentState = null;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
id: row.id,
|
|
55
|
-
seq: row.seq,
|
|
56
|
-
createdAt: row.createdAt,
|
|
57
|
-
updatedAt: row.updatedAt,
|
|
58
|
-
activeAt: row.activeAt,
|
|
59
|
-
active: row.active,
|
|
60
|
-
metadata,
|
|
61
|
-
agentState,
|
|
62
|
-
isShared: row.isShared,
|
|
63
|
-
encryptionKey: resolved.key,
|
|
64
|
-
encryptionVariant: resolved.variant
|
|
65
|
-
};
|
|
66
|
-
}
|
|
5
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
6
|
+
var sessionDecrypt = require('./sessionDecrypt-DlajL7Fn.cjs');
|
|
67
7
|
|
|
68
8
|
async function fetchSessionById(credentials, sessionId) {
|
|
69
9
|
const response = await axios.get(
|
|
@@ -75,7 +15,7 @@ async function fetchSessionById(credentials, sessionId) {
|
|
|
75
15
|
);
|
|
76
16
|
const row = response.data.sessions.find((s) => s.id === sessionId);
|
|
77
17
|
if (!row) return null;
|
|
78
|
-
return decryptSessionRow(credentials, row);
|
|
18
|
+
return sessionDecrypt.decryptSessionRow(credentials, row);
|
|
79
19
|
}
|
|
80
20
|
|
|
81
21
|
function extractEncryptedBase64(content) {
|
|
@@ -387,7 +327,6 @@ async function runSessionSummary(credentials, input) {
|
|
|
387
327
|
}
|
|
388
328
|
|
|
389
329
|
exports.decryptMessage = decryptMessage;
|
|
390
|
-
exports.decryptSessionRow = decryptSessionRow;
|
|
391
330
|
exports.fetchSessionById = fetchSessionById;
|
|
392
331
|
exports.runSessionSummary = runSessionSummary;
|
|
393
332
|
exports.sessionSummaryInputSchema = sessionSummaryInputSchema;
|
package/dist/{setupOfflineReconnection-DwtIEUeJ.cjs → setupOfflineReconnection-BmbFrBPc.cjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./persistence-
|
|
3
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
4
4
|
var fs = require('node:fs');
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
8
|
-
var api = require('./api-
|
|
9
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
8
|
+
var api = require('./api-jNSgtz8Y.cjs');
|
|
9
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-CEvWEzOm.cjs');
|
|
10
10
|
|
|
11
11
|
class BasePermissionHandler {
|
|
12
12
|
pendingRequests = /* @__PURE__ */ new Map();
|
package/dist/{setupOfflineReconnection-C1yzDMt6.mjs → setupOfflineReconnection-DV3FASIY.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { l as logger, c as configuration, p as packageJson } from './persistence-
|
|
1
|
+
import { l as logger, c as configuration, p as packageJson } from './persistence-BirvtFep.mjs';
|
|
2
2
|
import { readFileSync, existsSync, readdirSync } from 'node:fs';
|
|
3
3
|
import os, { homedir } from 'node:os';
|
|
4
4
|
import { join, basename, dirname } from 'node:path';
|
|
5
5
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
6
|
-
import { r as resolveToolsDir, b as startOfflineReconnection } from './api-
|
|
7
|
-
import { d as detectGitWorktree } from './registerKillSessionHandler-
|
|
6
|
+
import { r as resolveToolsDir, b as startOfflineReconnection } from './api-CKGCwsUf.mjs';
|
|
7
|
+
import { d as detectGitWorktree } from './registerKillSessionHandler-CTSkaRVu.mjs';
|
|
8
8
|
|
|
9
9
|
class BasePermissionHandler {
|
|
10
10
|
pendingRequests = /* @__PURE__ */ new Map();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'child_process';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
4
|
-
import { l as logger } from './persistence-
|
|
4
|
+
import { l as logger } from './persistence-BirvtFep.mjs';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
|
|
7
7
|
let cachedRuntime = null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var child_process = require('child_process');
|
|
4
4
|
var path = require('node:path');
|
|
5
5
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
6
|
-
var logger = require('./persistence-
|
|
6
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
7
7
|
var fs = require('node:fs');
|
|
8
8
|
|
|
9
9
|
let cachedRuntime = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { io } from 'socket.io-client';
|
|
2
|
-
import { c as configuration, g as decrypt, h as decodeBase64, e as encodeBase64, f as encrypt } from './persistence-
|
|
3
|
-
import { e as ensureDeviceKey, l as listDevices, r as readCachedDeviceNames, a as readCachedDeviceKey, p as pruneDeviceAliases, d as deviceExec } from './deviceKeys-
|
|
4
|
-
import { execOnDeviceViaDaemon } from './controlClient-
|
|
2
|
+
import { c as configuration, g as decrypt, h as decodeBase64, e as encodeBase64, f as encrypt } from './persistence-BirvtFep.mjs';
|
|
3
|
+
import { e as ensureDeviceKey, l as listDevices, r as readCachedDeviceNames, a as readCachedDeviceKey, p as pruneDeviceAliases, d as deviceExec } from './deviceKeys-su95gdc-.mjs';
|
|
4
|
+
import { execOnDeviceViaDaemon } from './controlClient-jullf1ow.mjs';
|
|
5
5
|
import 'node:fs/promises';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:os';
|
|
@@ -12,10 +12,10 @@ import 'tweetnacl';
|
|
|
12
12
|
import 'chalk';
|
|
13
13
|
import 'fs';
|
|
14
14
|
import 'axios';
|
|
15
|
-
import './auth-
|
|
15
|
+
import './auth-CFcrX0sP.mjs';
|
|
16
16
|
import 'qrcode-terminal';
|
|
17
17
|
import './time-DgsBLJA_.mjs';
|
|
18
|
-
import './browser-
|
|
18
|
+
import './browser-eziH4OAA.mjs';
|
|
19
19
|
import 'open';
|
|
20
20
|
import 'react';
|
|
21
21
|
import 'ink';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var socket_ioClient = require('socket.io-client');
|
|
4
|
-
var logger = require('./persistence-
|
|
5
|
-
var deviceKeys = require('./deviceKeys-
|
|
6
|
-
var controlClient = require('./controlClient-
|
|
4
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
5
|
+
var deviceKeys = require('./deviceKeys-YeZD2zQo.cjs');
|
|
6
|
+
var controlClient = require('./controlClient-B70-61t0.cjs');
|
|
7
7
|
require('node:fs/promises');
|
|
8
8
|
require('node:fs');
|
|
9
9
|
require('node:os');
|
|
@@ -14,10 +14,10 @@ require('tweetnacl');
|
|
|
14
14
|
require('chalk');
|
|
15
15
|
require('fs');
|
|
16
16
|
require('axios');
|
|
17
|
-
require('./auth-
|
|
17
|
+
require('./auth-BUQLBefw.cjs');
|
|
18
18
|
require('qrcode-terminal');
|
|
19
19
|
require('./time-Bj2HRkKH.cjs');
|
|
20
|
-
require('./browser-
|
|
20
|
+
require('./browser-BA-Yc9JO.cjs');
|
|
21
21
|
require('open');
|
|
22
22
|
require('react');
|
|
23
23
|
require('ink');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
|
-
import { r as readCredentials } from './persistence-
|
|
4
|
-
import { r as runSessionList } from './sessionList-
|
|
5
|
-
import { r as runSessionSummary } from './sessionSummary-
|
|
3
|
+
import { r as readCredentials } from './persistence-BirvtFep.mjs';
|
|
4
|
+
import { r as runSessionList } from './sessionList-Bh8eF10P.mjs';
|
|
5
|
+
import { r as runSessionSummary } from './sessionSummary-CcdMMHfv.mjs';
|
|
6
6
|
import { p as parseWorkflowArgs, s as stringFlag, b as booleanFlag, n as numberFlag, a as printOrWriteOutput } from './workflowCommon-B0d01Y_a.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:fs';
|
|
@@ -12,14 +12,15 @@ import 'node:crypto';
|
|
|
12
12
|
import 'tweetnacl';
|
|
13
13
|
import 'fs';
|
|
14
14
|
import 'axios';
|
|
15
|
-
import './
|
|
15
|
+
import './sessionDecrypt-R6Ee4mFr.mjs';
|
|
16
|
+
import './auth-CFcrX0sP.mjs';
|
|
16
17
|
import 'qrcode-terminal';
|
|
17
18
|
import './time-DgsBLJA_.mjs';
|
|
18
|
-
import './browser-
|
|
19
|
+
import './browser-eziH4OAA.mjs';
|
|
19
20
|
import 'open';
|
|
20
21
|
import 'react';
|
|
21
22
|
import 'ink';
|
|
22
|
-
import './sessionKeyCache-
|
|
23
|
+
import './sessionKeyCache-Ci9NA8Nn.mjs';
|
|
23
24
|
|
|
24
25
|
function printTaskHelp() {
|
|
25
26
|
console.log(`
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var path = require('node:path');
|
|
5
|
-
var logger = require('./persistence-
|
|
6
|
-
var sessionList = require('./sessionList-
|
|
7
|
-
var sessionSummary = require('./sessionSummary-
|
|
5
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
6
|
+
var sessionList = require('./sessionList-DXPTa2ix.cjs');
|
|
7
|
+
var sessionSummary = require('./sessionSummary-Cs-_4S3j.cjs');
|
|
8
8
|
var workflowCommon = require('./workflowCommon-Bl568-rt.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
10
|
require('node:fs');
|
|
@@ -14,14 +14,15 @@ require('node:crypto');
|
|
|
14
14
|
require('tweetnacl');
|
|
15
15
|
require('fs');
|
|
16
16
|
require('axios');
|
|
17
|
-
require('./
|
|
17
|
+
require('./sessionDecrypt-DlajL7Fn.cjs');
|
|
18
|
+
require('./auth-BUQLBefw.cjs');
|
|
18
19
|
require('qrcode-terminal');
|
|
19
20
|
require('./time-Bj2HRkKH.cjs');
|
|
20
|
-
require('./browser-
|
|
21
|
+
require('./browser-BA-Yc9JO.cjs');
|
|
21
22
|
require('open');
|
|
22
23
|
require('react');
|
|
23
24
|
require('ink');
|
|
24
|
-
require('./sessionKeyCache-
|
|
25
|
+
require('./sessionKeyCache-CRINEKrH.cjs');
|
|
25
26
|
|
|
26
27
|
function printTaskHelp() {
|
|
27
28
|
console.log(`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { l as logger } from './persistence-
|
|
1
|
+
import { l as logger } from './persistence-BirvtFep.mjs';
|
|
2
2
|
import { existsSync, unlinkSync } from 'fs';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import { s as systemdScopeFor, i as isRootUser, S as SERVICE_NAME } from './systemdScope-BeOtAkhk.mjs';
|
|
7
|
-
import { stopDaemon } from './controlClient-
|
|
7
|
+
import { stopDaemon } from './controlClient-jullf1ow.mjs';
|
|
8
8
|
import 'node:fs/promises';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:os';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./persistence-
|
|
3
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
4
4
|
var fs = require('fs');
|
|
5
5
|
var child_process = require('child_process');
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var os = require('os');
|
|
8
8
|
var systemdScope = require('./systemdScope-DW3-UoKB.cjs');
|
|
9
|
-
var controlClient = require('./controlClient-
|
|
9
|
+
var controlClient = require('./controlClient-B70-61t0.cjs');
|
|
10
10
|
require('node:fs/promises');
|
|
11
11
|
require('node:fs');
|
|
12
12
|
require('node:os');
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_child_process = require('node:child_process');
|
|
5
5
|
var fs = require('node:fs');
|
|
6
|
-
var logger = require('./persistence-
|
|
7
|
-
var controlClient = require('./controlClient-
|
|
8
|
-
var spawnHappyCLI = require('./spawnHappyCLI-
|
|
6
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
7
|
+
var controlClient = require('./controlClient-B70-61t0.cjs');
|
|
8
|
+
var spawnHappyCLI = require('./spawnHappyCLI-CilqRN5U.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:path');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { execFileSync, execSync } from 'node:child_process';
|
|
3
3
|
import { realpathSync } from 'node:fs';
|
|
4
|
-
import { p as packageJson } from './persistence-
|
|
5
|
-
import { checkIfDaemonRunningAndCleanupStaleState, stopDaemon } from './controlClient-
|
|
6
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
4
|
+
import { p as packageJson } from './persistence-BirvtFep.mjs';
|
|
5
|
+
import { checkIfDaemonRunningAndCleanupStaleState, stopDaemon } from './controlClient-jullf1ow.mjs';
|
|
6
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-CSkTkB4n.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'node:path';
|