@jshookmcp/jshook 0.2.9 → 0.3.0
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/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/{AntiCheatDetector-BNk-EoBt.mjs → AntiCheatDetector-CqGDXmfc.mjs} +159 -53
- package/dist/{CodeInjector-Cq8q01kp.mjs → CodeInjector-BdjRfNx7.mjs} +5 -5
- package/dist/{ConsoleMonitor-CPVQW1Y-.mjs → ConsoleMonitor-DykL3IAw.mjs} +85 -17
- package/dist/{DetailedDataManager-BQQcxh64.mjs → DetailedDataManager-HT49OrvF.mjs} +1 -1
- package/dist/{ExtensionManager-CWYgw0YW.mjs → ExtensionManager-BDMsY2Dz.mjs} +15 -8
- package/dist/{HardwareBreakpoint-B9gZCdFP.mjs → HardwareBreakpoint-Cc2AFq1Y.mjs} +3 -3
- package/dist/{HeapAnalyzer-BLDH0dCv.mjs → HeapAnalyzer-DruMgsgj.mjs} +20 -20
- package/dist/{HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs → HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs} +1 -74
- package/dist/{InstrumentationSession-CvPC7Jwy.mjs → InstrumentationSession-DLH0vd-z.mjs} +2 -2
- package/dist/{MemoryController-CbVdCIJF.mjs → MemoryController-CMtviNW_.mjs} +3 -3
- package/dist/{MemoryScanSession-BsDZbLYm.mjs → MemoryScanSession-ITgb_NMi.mjs} +2 -2
- package/dist/{MemoryScanner-Bcpml6II.mjs → MemoryScanner-CiL7Z3ey.mjs} +12 -9
- package/dist/{NativeMemoryManager.impl-dZtA1ZGn.mjs → NativeMemoryManager.impl-D9Lkovvn.mjs} +13 -10
- package/dist/{NativeMemoryManager.utils-B-FjA2mJ.mjs → NativeMemoryManager.utils-BBlAixF5.mjs} +1 -1
- package/dist/{PEAnalyzer-D1lzJ_VG.mjs → PEAnalyzer-DMQ44gen.mjs} +15 -15
- package/dist/{PageController-Bqm2kZ_X.mjs → PageController-BPJNqqBN.mjs} +18 -4
- package/dist/{PointerChainEngine-BOhyVsjx.mjs → PointerChainEngine-K7wN8Z-w.mjs} +10 -7
- package/dist/ProcessRegistry-zGg12QbE.mjs +74 -0
- package/dist/{ResponseBuilder-D3iFYx2N.mjs → ResponseBuilder-CJXWmWNw.mjs} +10 -10
- package/dist/{ScriptManager-aHHq0X7U.mjs → ScriptManager-ZuWD-0Jg.mjs} +195 -192
- package/dist/{Speedhack-CqdIFlQl.mjs → Speedhack-D-z0umeT.mjs} +2 -2
- package/dist/{StructureAnalyzer-DhFaPvRO.mjs → StructureAnalyzer-Cav5AVSL.mjs} +9 -6
- package/dist/{ToolCatalog-C0JGZoOm.mjs → ToolCatalog-5OJdMiF0.mjs} +81 -81
- package/dist/{ToolProbe-oC7aPrkv.mjs → ToolProbe-DbCFGyrg.mjs} +1 -1
- package/dist/{ToolRegistry-BjaF4oNz.mjs → ToolRegistry-B9krbTtI.mjs} +51 -2
- package/dist/{ToolRouter.policy-BWV67ZK-.mjs → ToolRouter.policy-BGDAGyeH.mjs} +60 -20
- package/dist/TraceRecorder-B41Z5XBj.mjs +1286 -0
- package/dist/{Win32API-CePkipZY.mjs → Win32API-C2kjj0ze.mjs} +18 -12
- package/dist/{Win32Debug-BvKs-gxc.mjs → Win32Debug-CKrGOTpo.mjs} +2 -2
- package/dist/{WorkflowEngine-CuvkZtWu.mjs → WorkflowEngine-DJ6M4opp.mjs} +226 -255
- package/dist/analysis-BHeJW2Nb.mjs +1234 -0
- package/dist/{antidebug-CqDTB_uk.mjs → antidebug-BRKeyt27.mjs} +3 -3
- package/dist/{artifactRetention-CFEprwPw.mjs → artifactRetention-CPXkUJXp.mjs} +13 -6
- package/dist/{artifacts-Bk2-_uPq.mjs → artifacts-DkfosXH3.mjs} +1 -1
- package/dist/authorization-schema-DRqyJMSk.mjs +31 -0
- package/dist/{binary-instrument-CXfpx6fT.mjs → binary-instrument--V3MAhJ4.mjs} +19 -27
- package/dist/bind-helpers-ClV34xdn.mjs +42 -0
- package/dist/{boringssl-inspector-BH2D3VKc.mjs → boringssl-inspector-Bo_LOLaS.mjs} +1 -1
- package/dist/{browser-BpOr5PEx.mjs → browser-Dx3_S2cG.mjs} +324 -37
- package/dist/capabilities-CcHlvWgK.mjs +33 -0
- package/dist/{constants-B0OANIBL.mjs → constants-CDZLOoVv.mjs} +18 -3
- package/dist/{coordination-qUbyF8KU.mjs → coordination-DgItD9DL.mjs} +2 -2
- package/dist/{debugger-gnKxRSN0.mjs → debugger-RS3RSAqs.mjs} +30 -13
- package/dist/definitions-BEoYofW5.mjs +47 -0
- package/dist/{definitions-bAhHQJq9.mjs → definitions-BRaefg3u.mjs} +11 -5
- package/dist/{definitions-DVGfrn7y.mjs → definitions-BbkvZkiv.mjs} +2 -2
- package/dist/definitions-BtWSHJ3o.mjs +17 -0
- package/dist/{definitions-BMfYXoNC.mjs → definitions-C1gCHO0i.mjs} +1 -1
- package/dist/{definitions-C1UvM5Iy.mjs → definitions-CDOg_b-l.mjs} +14 -2
- package/dist/definitions-CVPD9hzZ.mjs +54 -0
- package/dist/{definitions-Cke7zEb8.mjs → definitions-Cea8Lgl7.mjs} +1 -1
- package/dist/definitions-DAgIyjxM.mjs +10 -0
- package/dist/{definitions-B4rAvHNZ.mjs → definitions-DJA27nsL.mjs} +12 -9
- package/dist/{definitions-ClJLzsJQ.mjs → definitions-DKPFU3LW.mjs} +1 -1
- package/dist/{definitions-D3VsGcvz.mjs → definitions-DPRpZQ96.mjs} +7 -7
- package/dist/{definitions-B18eyf0B.mjs → definitions-DUE5gmdn.mjs} +1 -1
- package/dist/definitions-DYVjOtxa.mjs +26 -0
- package/dist/{definitions-BB_4jnmy.mjs → definitions-DcYLVLCo.mjs} +1 -1
- package/dist/{definitions-Beid2EB3.mjs → definitions-Pp5LI2H4.mjs} +1 -1
- package/dist/definitions-j9KdHVNR.mjs +14 -0
- package/dist/definitions-uzkjBwa7.mjs +258 -0
- package/dist/{definitions-Cq-zroAU.mjs → definitions-va-AnLuQ.mjs} +4 -4
- package/dist/{encoding-Bvz5jLRv.mjs → encoding-DJeqHmpd.mjs} +18 -4
- package/dist/{evidence-graph-bridge-C_fv9PuC.mjs → evidence-graph-bridge-DcYizFk2.mjs} +1 -0
- package/dist/{factory-DxlGh9Xf.mjs → factory-C90tBff6.mjs} +6 -6
- package/dist/flat-target-session-Dgax2Cy3.mjs +29 -0
- package/dist/{graphql-DYWzJ29s.mjs → graphql-CoHrhweh.mjs} +205 -34
- package/dist/{handlers-C67ktuRN.mjs → handlers-4jmR0nMs.mjs} +220 -32
- package/dist/{handlers-DlCJN4Td.mjs → handlers-BAHPxcch.mjs} +122 -90
- package/dist/{handlers-9sAbfIg-.mjs → handlers-BOs9b907.mjs} +849 -801
- package/dist/{handlers-DxGIq15_2.mjs → handlers-BWXEy6ef.mjs} +16 -16
- package/dist/{handlers-tB9Mp9ZK.mjs → handlers-Bndn6QvE.mjs} +31 -4
- package/dist/{handlers-CTsDAO6p.mjs → handlers-BqC4bD4s.mjs} +1 -1
- package/dist/{handlers-C87g8oCe.mjs → handlers-BtYq60bM2.mjs} +1 -1
- package/dist/{handlers-DeLOCd5m.mjs → handlers-BzgcB4iv.mjs} +17 -17
- package/dist/{handlers-Cgyg6c0U.mjs → handlers-CRyRWj2b.mjs} +237 -23
- package/dist/{handlers-U6L4xhuF.mjs → handlers-CVv2H1uq.mjs} +24 -17
- package/dist/{handlers-tiy7EIBp.mjs → handlers-Dl5a7JS4.mjs} +3 -3
- package/dist/{handlers-D6j6yka7.mjs → handlers-Dx2d7jt7.mjs} +1893 -1480
- package/dist/{handlers-Bl8zkwz1.mjs → handlers-Dz9PYsCa.mjs} +95 -6
- package/dist/handlers-HujRKC3b.mjs +661 -0
- package/dist/{handlers.impl-DS0d9fUw.mjs → handlers.impl-XWXkQfyi.mjs} +70 -24
- package/dist/{hooks-CzCWByww.mjs → hooks-B1B8NRHL.mjs} +3 -3
- package/dist/index.mjs +154 -144
- package/dist/{maintenance-P7ePRXQC.mjs → maintenance-PRMkLVRW.mjs} +35 -30
- package/dist/manifest-67Bok-Si.mjs +58 -0
- package/dist/{manifest-B3QVVeBS.mjs → manifest-6lNTMZAB2.mjs} +33 -28
- package/dist/manifest-B2duEHiH.mjs +90 -0
- package/dist/manifest-B6EY9Vm8.mjs +57 -0
- package/dist/{manifest-gZ4s_UtG.mjs → manifest-B6nKSbyY.mjs} +32 -33
- package/dist/{manifest-2ToTpjv8.mjs → manifest-BL8AQNPF.mjs} +31 -31
- package/dist/{manifest-DzwvxPJX.mjs → manifest-BSZvJJmV.mjs} +23 -14
- package/dist/{manifest-Sc_0JQ13.mjs → manifest-BU7qzUyX.mjs} +23 -23
- package/dist/{manifest-CT7zZBV1.mjs → manifest-Bl62e8WK.mjs} +24 -23
- package/dist/manifest-Bo5cXjdt.mjs +82 -0
- package/dist/manifest-BpS4gtUK.mjs +1347 -0
- package/dist/manifest-Bv65_e2W.mjs +101 -0
- package/dist/manifest-BytNIF4Z.mjs +117 -0
- package/dist/{manifest-BqrQ4Tpj.mjs → manifest-C-xtsjS3.mjs} +23 -23
- package/dist/{manifest-NXctwWQq.mjs → manifest-CDYl7OhA.mjs} +36 -38
- package/dist/manifest-CRZ3xmkD.mjs +61 -0
- package/dist/manifest-CoW6u4Tp.mjs +132 -0
- package/dist/manifest-Cq5zN_8A.mjs +50 -0
- package/dist/{manifest-CAhOuvSl.mjs → manifest-D7YZM_2e.mjs} +75 -85
- package/dist/{manifest-DCyjf4n2.mjs → manifest-DE_VrAeQ.mjs} +27 -7
- package/dist/manifest-DGsXSCpT.mjs +39 -0
- package/dist/{manifest-BB2J8IMJ.mjs → manifest-DJ2vfEuW.mjs} +48 -41
- package/dist/{manifest-3g71z6Bg.mjs → manifest-DPXDYhEu.mjs} +26 -25
- package/dist/manifest-Dd4fQb0a.mjs +322 -0
- package/dist/{manifest-CXsRWjjI.mjs → manifest-Deq6opGg.mjs} +95 -96
- package/dist/{manifest-C9RT5nk32.mjs → manifest-DfJTafJK.mjs} +14 -11
- package/dist/manifest-DgOdgN_j.mjs +50 -0
- package/dist/{manifest-BmtZzQiQ2.mjs → manifest-DlbMW4v4.mjs} +17 -15
- package/dist/{manifest-DrbmZcFl2.mjs → manifest-DmVfbH0w.mjs} +212 -91
- package/dist/manifest-Dog6Ddjr.mjs +109 -0
- package/dist/manifest-DvgU5FWb.mjs +58 -0
- package/dist/manifest-HsfDBs7j.mjs +50 -0
- package/dist/manifest-I8oQHvCG.mjs +186 -0
- package/dist/manifest-NvH_a-av.mjs +786 -0
- package/dist/{manifest-Dh8WBmEW.mjs → manifest-cEJU1v0Z.mjs} +24 -24
- package/dist/manifest-wOl5XLB12.mjs +112 -0
- package/dist/{modules-C184v-S9.mjs → modules-tZozf0LQ.mjs} +130 -860
- package/dist/{mojo-ipc-B_H61Afw.mjs → mojo-ipc-DXNEXEqb.mjs} +141 -26
- package/dist/{network-671Cw6hV.mjs → network-CPVvwvFg.mjs} +1329 -823
- package/dist/{outputPaths-B1uGmrWZ.mjs → outputPaths-um7lCRY3.mjs} +4 -8
- package/dist/{platform-WmNn8Sxb.mjs → platform-CYeFoTWp.mjs} +101 -10
- package/dist/{process-QcbIy5Zq.mjs → process-BTbgcVc6.mjs} +251 -346
- package/dist/{proxy-DqNs0bAd.mjs → proxy-r8YN6nP1.mjs} +30 -8
- package/dist/{registry-D-6e18lB.mjs → registry-Bl8ZQW61.mjs} +3 -3
- package/dist/{response-BQVP-xUn.mjs → response-CWhh2aLo.mjs} +7 -1
- package/dist/{shared-state-board-DV-dpHFJ.mjs → shared-state-board-BoZnSoj-.mjs} +2 -2
- package/dist/{sourcemap-Dq8ez8vS.mjs → sourcemap-BIDHUVXy.mjs} +350 -66
- package/dist/{streaming-BUQ0VJsg.mjs → streaming-Dal6utPp.mjs} +13 -13
- package/dist/{tool-builder-DCbIC5Eo.mjs → tool-builder-BHJp32mV.mjs} +1 -1
- package/dist/{transform-CiYJfNX0.mjs → transform-DRVgGG90.mjs} +18 -14
- package/dist/wasm-BYx5UOeG.mjs +1044 -0
- package/dist/webcrack-Be0_FccV.mjs +747 -0
- package/dist/{workflow-f3xJOcjx.mjs → workflow-BpuKEtvn.mjs} +8 -8
- package/package.json +76 -43
- package/dist/TraceRecorder-DgxyVbdQ.mjs +0 -519
- package/dist/analysis-CL9uACt9.mjs +0 -463
- package/dist/bind-helpers-xFfRF-qm.mjs +0 -22
- package/dist/definitions-6M-eejaT.mjs +0 -53
- package/dist/definitions-B3QdlrHv.mjs +0 -34
- package/dist/definitions-CXEI7QC72.mjs +0 -216
- package/dist/definitions-C_4r7Fo-2.mjs +0 -14
- package/dist/definitions-CkFDALoa.mjs +0 -26
- package/dist/definitions-Cy3Sl6gV.mjs +0 -34
- package/dist/definitions-LKpC3-nL.mjs +0 -9
- package/dist/handlers-DdFzXLvF.mjs +0 -446
- package/dist/manifest-82baTv4U.mjs +0 -45
- package/dist/manifest-BKbgbSiY.mjs +0 -60
- package/dist/manifest-Bcf-TJzH.mjs +0 -848
- package/dist/manifest-Bnd7kqEY.mjs +0 -55
- package/dist/manifest-BqQX6OQC2.mjs +0 -65
- package/dist/manifest-Br4RPFt5.mjs +0 -370
- package/dist/manifest-C5qDjysN.mjs +0 -107
- package/dist/manifest-CBYWCUBJ.mjs +0 -51
- package/dist/manifest-CFADCRa1.mjs +0 -37
- package/dist/manifest-CQVhavRF.mjs +0 -114
- package/dist/manifest-CV12bcrF.mjs +0 -121
- package/dist/manifest-CZLUCfG02.mjs +0 -95
- package/dist/manifest-D6phHKFd.mjs +0 -131
- package/dist/manifest-DHsnKgP6.mjs +0 -60
- package/dist/manifest-Df_dliIe.mjs +0 -55
- package/dist/manifest-DhKRAT8_.mjs +0 -92
- package/dist/manifest-DlpTj4ic2.mjs +0 -193
- package/dist/manifest-DuwHjUa5.mjs +0 -70
- package/dist/manifest-qSleDqdO.mjs +0 -1023
- package/dist/wasm-DQTnHDs4.mjs +0 -531
- /package/dist/{CacheAdapters-CDe5WPSV.mjs → CacheAdapters-jJFy20G-.mjs} +0 -0
- /package/dist/{DarwinAPI-BNPxu0RH.mjs → DarwinAPI-ETyy0xyo.mjs} +0 -0
- /package/dist/{EventBus-DgPmwpeu.mjs → EventBus-DFKvADm3.mjs} +0 -0
- /package/dist/{EvidenceGraphBridge-SFesNera.mjs → EvidenceGraphBridge-318Oi0Lf.mjs} +0 -0
- /package/dist/{FingerprintManager-gzWtkKuf.mjs → FingerprintManager-BN4UQWnX.mjs} +0 -0
- /package/dist/{PrerequisiteError-Dl33Svkz.mjs → PrerequisiteError-TuyZIs6n.mjs} +0 -0
- /package/dist/{ReverseEvidenceGraph-Dlsk94LC.mjs → ReverseEvidenceGraph-C02-gXOh.mjs} +0 -0
- /package/dist/{StealthVerifier-Bo4T3bz8.mjs → StealthVerifier-BWmPgQsv.mjs} +0 -0
- /package/dist/{VersionDetector-CwVLVdDM.mjs → VersionDetector-K3V4vGsw.mjs} +0 -0
- /package/dist/{betterSqlite3-0pqusHHH.mjs → betterSqlite3-DLSBZodi.mjs} +0 -0
- /package/dist/{concurrency-Bt0yv1kJ.mjs → concurrency-Drev_Vz9.mjs} +0 -0
- /package/dist/{formatAddress-DVkj9kpI.mjs → formatAddress-nnMvEohD.mjs} +0 -0
- /package/dist/{parse-args-BlRjqlkL.mjs → parse-args-B4cY5Vx5.mjs} +0 -0
- /package/dist/{ssrf-policy-ZaUfvhq7.mjs → ssrf-policy-Dsqd-DTX.mjs} +0 -0
- /package/dist/{types-CPhOReNX.mjs → types-DDBWs9UP.mjs} +0 -0
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
import { i as resolveArtifactPath } from "./artifacts-Bk2-_uPq.mjs";
|
|
2
|
-
import { t as TraceDB } from "./TraceRecorder-DgxyVbdQ.mjs";
|
|
3
|
-
import { n as argEnum } from "./parse-args-BlRjqlkL.mjs";
|
|
4
|
-
import { writeFile } from "node:fs/promises";
|
|
5
|
-
//#region src/server/domains/trace/TraceSummarizer.ts
|
|
6
|
-
/**
|
|
7
|
-
* Summarize trace events at the specified detail level.
|
|
8
|
-
*/
|
|
9
|
-
function summarizeEvents(events, detail = "balanced") {
|
|
10
|
-
if (events.length === 0) return {
|
|
11
|
-
detail,
|
|
12
|
-
totalEvents: 0,
|
|
13
|
-
timeRange: {
|
|
14
|
-
start: 0,
|
|
15
|
-
end: 0,
|
|
16
|
-
durationMs: 0
|
|
17
|
-
},
|
|
18
|
-
categories: [],
|
|
19
|
-
keyMoments: detail !== "compact" ? [] : void 0
|
|
20
|
-
};
|
|
21
|
-
const timestamps = events.map((e) => e.timestamp);
|
|
22
|
-
const start = Math.min(...timestamps);
|
|
23
|
-
const end = Math.max(...timestamps);
|
|
24
|
-
const catMap = /* @__PURE__ */ new Map();
|
|
25
|
-
for (const event of events) {
|
|
26
|
-
let cat = catMap.get(event.category);
|
|
27
|
-
if (!cat) {
|
|
28
|
-
cat = {
|
|
29
|
-
count: 0,
|
|
30
|
-
first: event.timestamp,
|
|
31
|
-
last: event.timestamp,
|
|
32
|
-
types: /* @__PURE__ */ new Map()
|
|
33
|
-
};
|
|
34
|
-
catMap.set(event.category, cat);
|
|
35
|
-
}
|
|
36
|
-
cat.count++;
|
|
37
|
-
cat.first = Math.min(cat.first, event.timestamp);
|
|
38
|
-
cat.last = Math.max(cat.last, event.timestamp);
|
|
39
|
-
cat.types.set(event.eventType, (cat.types.get(event.eventType) ?? 0) + 1);
|
|
40
|
-
}
|
|
41
|
-
const categories = [...catMap.entries()].toSorted((a, b) => b[1].count - a[1].count).map(([category, info]) => ({
|
|
42
|
-
category,
|
|
43
|
-
count: info.count,
|
|
44
|
-
firstTimestamp: info.first,
|
|
45
|
-
lastTimestamp: info.last,
|
|
46
|
-
topEventTypes: [...info.types.entries()].toSorted((a, b) => b[1] - a[1]).slice(0, 5).map(([type, count]) => ({
|
|
47
|
-
type,
|
|
48
|
-
count
|
|
49
|
-
}))
|
|
50
|
-
}));
|
|
51
|
-
const summary = {
|
|
52
|
-
detail,
|
|
53
|
-
totalEvents: events.length,
|
|
54
|
-
timeRange: {
|
|
55
|
-
start,
|
|
56
|
-
end,
|
|
57
|
-
durationMs: end - start
|
|
58
|
-
},
|
|
59
|
-
categories
|
|
60
|
-
};
|
|
61
|
-
if (detail === "balanced" || detail === "full") summary.keyMoments = extractKeyMoments(events);
|
|
62
|
-
return summary;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Extract key moments from a trace event stream.
|
|
66
|
-
*
|
|
67
|
-
* Identifies:
|
|
68
|
-
* - Debugger pauses (breakpoint hits)
|
|
69
|
-
* - Network request completions
|
|
70
|
-
* - Runtime exceptions
|
|
71
|
-
* - Page navigations
|
|
72
|
-
*/
|
|
73
|
-
function extractKeyMoments(events) {
|
|
74
|
-
const moments = [];
|
|
75
|
-
for (const event of events) if (event.eventType === "Debugger.paused") moments.push({
|
|
76
|
-
timestamp: event.timestamp,
|
|
77
|
-
type: "breakpoint",
|
|
78
|
-
description: `Debugger paused${event.scriptId ? ` at script ${event.scriptId}` : ""}${event.lineNumber ? `:${event.lineNumber}` : ""}`,
|
|
79
|
-
data: event.data
|
|
80
|
-
});
|
|
81
|
-
else if (event.eventType === "Network.loadingFinished") moments.push({
|
|
82
|
-
timestamp: event.timestamp,
|
|
83
|
-
type: "network_complete",
|
|
84
|
-
description: "Network request completed",
|
|
85
|
-
data: event.data
|
|
86
|
-
});
|
|
87
|
-
else if (event.eventType === "Runtime.exceptionThrown") moments.push({
|
|
88
|
-
timestamp: event.timestamp,
|
|
89
|
-
type: "exception",
|
|
90
|
-
description: "Runtime exception thrown",
|
|
91
|
-
data: event.data
|
|
92
|
-
});
|
|
93
|
-
else if (event.eventType === "Page.frameNavigated" || event.eventType === "Page.navigatedWithinDocument") moments.push({
|
|
94
|
-
timestamp: event.timestamp,
|
|
95
|
-
type: "navigation",
|
|
96
|
-
description: "Page navigation",
|
|
97
|
-
data: event.data
|
|
98
|
-
});
|
|
99
|
-
return moments;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Summarize memory deltas, detecting anomalies.
|
|
103
|
-
*
|
|
104
|
-
* An anomaly is defined as an address that receives significantly more
|
|
105
|
-
* writes than the average (> 3× the mean write count).
|
|
106
|
-
*/
|
|
107
|
-
function summarizeMemoryDeltas(deltas) {
|
|
108
|
-
if (deltas.length === 0) return {
|
|
109
|
-
totalDeltas: 0,
|
|
110
|
-
uniqueAddresses: 0,
|
|
111
|
-
anomalies: [],
|
|
112
|
-
topAddresses: []
|
|
113
|
-
};
|
|
114
|
-
const writeMap = /* @__PURE__ */ new Map();
|
|
115
|
-
for (const delta of deltas) writeMap.set(delta.address, (writeMap.get(delta.address) ?? 0) + 1);
|
|
116
|
-
const uniqueAddresses = writeMap.size;
|
|
117
|
-
const totalWrites = deltas.length;
|
|
118
|
-
const meanWrites = totalWrites / uniqueAddresses;
|
|
119
|
-
const sorted = [...writeMap.entries()].toSorted((a, b) => b[1] - a[1]);
|
|
120
|
-
const topAddresses = sorted.slice(0, 10).map(([address, writeCount]) => ({
|
|
121
|
-
address,
|
|
122
|
-
writeCount
|
|
123
|
-
}));
|
|
124
|
-
const anomalyThreshold = meanWrites * 3;
|
|
125
|
-
return {
|
|
126
|
-
totalDeltas: totalWrites,
|
|
127
|
-
uniqueAddresses,
|
|
128
|
-
anomalies: sorted.filter(([, count]) => count > anomalyThreshold).map(([address, writeCount]) => ({
|
|
129
|
-
address,
|
|
130
|
-
writeCount,
|
|
131
|
-
description: `${writeCount} writes (${(writeCount / meanWrites).toFixed(1)}× average)`
|
|
132
|
-
})),
|
|
133
|
-
topAddresses
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/server/domains/trace/handlers.ts
|
|
138
|
-
/**
|
|
139
|
-
* Trace domain tool handlers.
|
|
140
|
-
*
|
|
141
|
-
* Implements start/stop recording, SQL query, timestamp seek,
|
|
142
|
-
* heap snapshot diffing, and Chrome Trace Event export.
|
|
143
|
-
*/
|
|
144
|
-
var TraceToolHandlers = class {
|
|
145
|
-
constructor(recorder, ctx) {
|
|
146
|
-
this.recorder = recorder;
|
|
147
|
-
this.ctx = ctx;
|
|
148
|
-
}
|
|
149
|
-
async handleTraceRecording(args) {
|
|
150
|
-
return argEnum(args, "action", new Set(["start", "stop"])) === "stop" ? this.handleStopTraceRecording() : this.handleStartTraceRecording(args);
|
|
151
|
-
}
|
|
152
|
-
async handleStartTraceRecording(args) {
|
|
153
|
-
const cdpDomains = args["cdpDomains"];
|
|
154
|
-
const recordMemoryDeltas = args["recordMemoryDeltas"];
|
|
155
|
-
const eventBus = this.ctx.eventBus;
|
|
156
|
-
if (!eventBus) throw new Error("EventBus not available on server context");
|
|
157
|
-
let cdpSession = null;
|
|
158
|
-
try {
|
|
159
|
-
if (this.ctx.collector) {
|
|
160
|
-
const pageAny = await this.ctx.collector.getActivePage();
|
|
161
|
-
if (typeof pageAny.createCDPSession === "function") cdpSession = await pageAny.createCDPSession();
|
|
162
|
-
}
|
|
163
|
-
} catch {}
|
|
164
|
-
const session = await this.recorder.start(eventBus, cdpSession, {
|
|
165
|
-
cdpDomains,
|
|
166
|
-
recordMemoryDeltas: recordMemoryDeltas ?? true
|
|
167
|
-
});
|
|
168
|
-
return {
|
|
169
|
-
status: "recording",
|
|
170
|
-
sessionId: session.sessionId,
|
|
171
|
-
dbPath: session.dbPath,
|
|
172
|
-
message: `Recording started. CDP session: ${cdpSession ? "active" : "not available"}`
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
async handleStopTraceRecording() {
|
|
176
|
-
const session = this.recorder.stop();
|
|
177
|
-
const duration = session.stoppedAt ? session.stoppedAt - session.startedAt : 0;
|
|
178
|
-
return {
|
|
179
|
-
status: "stopped",
|
|
180
|
-
sessionId: session.sessionId,
|
|
181
|
-
dbPath: session.dbPath,
|
|
182
|
-
eventCount: session.eventCount,
|
|
183
|
-
memoryDeltaCount: session.memoryDeltaCount,
|
|
184
|
-
heapSnapshotCount: session.heapSnapshotCount,
|
|
185
|
-
durationMs: duration,
|
|
186
|
-
message: `Recording stopped. ${session.eventCount} events, ${session.memoryDeltaCount} memory deltas, ${session.heapSnapshotCount} heap snapshots recorded.`
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
async handleQueryTraceSql(args) {
|
|
190
|
-
const sql = args["sql"];
|
|
191
|
-
const dbPath = args["dbPath"];
|
|
192
|
-
if (!sql) throw new Error("sql parameter is required");
|
|
193
|
-
let result;
|
|
194
|
-
let tempDb = null;
|
|
195
|
-
try {
|
|
196
|
-
if (dbPath) {
|
|
197
|
-
tempDb = new TraceDB({ dbPath });
|
|
198
|
-
result = tempDb.query(sql);
|
|
199
|
-
} else {
|
|
200
|
-
const activeDb = this.recorder.getDB();
|
|
201
|
-
if (!activeDb) throw new Error("GRACEFUL: No active recording and no dbPath specified. Start a recording or provide a dbPath.");
|
|
202
|
-
activeDb.flush();
|
|
203
|
-
result = activeDb.query(sql);
|
|
204
|
-
}
|
|
205
|
-
return {
|
|
206
|
-
columns: result.columns,
|
|
207
|
-
rows: result.rows,
|
|
208
|
-
rowCount: result.rowCount
|
|
209
|
-
};
|
|
210
|
-
} finally {
|
|
211
|
-
if (tempDb) tempDb.close();
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
async handleSeekToTimestamp(args) {
|
|
215
|
-
const timestamp = args["timestamp"];
|
|
216
|
-
const dbPath = args["dbPath"];
|
|
217
|
-
const windowMs = args["windowMs"] ?? 100;
|
|
218
|
-
if (!timestamp) throw new Error("timestamp parameter is required");
|
|
219
|
-
let tempDb = null;
|
|
220
|
-
try {
|
|
221
|
-
const db = this.getDbForReading(dbPath);
|
|
222
|
-
if (dbPath) tempDb = db;
|
|
223
|
-
const events = db.getEventsByTimeRange(timestamp - windowMs, timestamp + windowMs);
|
|
224
|
-
const debuggerEventsResult = db.query(`SELECT * FROM events WHERE category = 'debugger' AND timestamp <= ${timestamp} ORDER BY timestamp DESC LIMIT 5`);
|
|
225
|
-
const memoryStateResult = db.query(`SELECT m1.* FROM memory_deltas m1
|
|
226
|
-
INNER JOIN (SELECT address, MAX(timestamp) as max_ts FROM memory_deltas WHERE timestamp <= ${timestamp} GROUP BY address) m2
|
|
227
|
-
ON m1.address = m2.address AND m1.timestamp = m2.max_ts
|
|
228
|
-
ORDER BY m1.address`);
|
|
229
|
-
const networkResult = db.query(`SELECT * FROM events WHERE category = 'network' AND event_type = 'Network.loadingFinished' AND timestamp <= ${timestamp} ORDER BY timestamp DESC LIMIT 20`);
|
|
230
|
-
const snapshotResult = db.query(`SELECT id, timestamp, summary FROM heap_snapshots WHERE timestamp <= ${timestamp} ORDER BY timestamp DESC LIMIT 1`);
|
|
231
|
-
return {
|
|
232
|
-
seekTimestamp: timestamp,
|
|
233
|
-
windowMs,
|
|
234
|
-
events: events.map((e) => ({
|
|
235
|
-
timestamp: e.timestamp,
|
|
236
|
-
category: e.category,
|
|
237
|
-
eventType: e.eventType,
|
|
238
|
-
data: this.safeParseJSON(e.data),
|
|
239
|
-
scriptId: e.scriptId,
|
|
240
|
-
lineNumber: e.lineNumber
|
|
241
|
-
})),
|
|
242
|
-
debuggerState: { recentEvents: debuggerEventsResult.rows.map((row) => this.rowToObject(debuggerEventsResult.columns, row)) },
|
|
243
|
-
memoryState: { addressValues: memoryStateResult.rows.map((row) => this.rowToObject(memoryStateResult.columns, row)) },
|
|
244
|
-
networkState: { completedRequests: networkResult.rows.map((row) => this.rowToObject(networkResult.columns, row)) },
|
|
245
|
-
nearestHeapSnapshot: snapshotResult.rows.length > 0 ? this.rowToObject(snapshotResult.columns, snapshotResult.rows[0]) : null
|
|
246
|
-
};
|
|
247
|
-
} finally {
|
|
248
|
-
if (tempDb) tempDb.close();
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
async handleDiffHeapSnapshots(args) {
|
|
252
|
-
const snapshotId1 = args["snapshotId1"];
|
|
253
|
-
const snapshotId2 = args["snapshotId2"];
|
|
254
|
-
const dbPath = args["dbPath"];
|
|
255
|
-
if (!snapshotId1 || !snapshotId2) throw new Error("snapshotId1 and snapshotId2 are required");
|
|
256
|
-
let tempDb = null;
|
|
257
|
-
try {
|
|
258
|
-
const db = this.getDbForReading(dbPath);
|
|
259
|
-
if (dbPath) tempDb = db;
|
|
260
|
-
const snap1Result = db.query(`SELECT id, timestamp, summary FROM heap_snapshots WHERE id = ${snapshotId1}`);
|
|
261
|
-
const snap2Result = db.query(`SELECT id, timestamp, summary FROM heap_snapshots WHERE id = ${snapshotId2}`);
|
|
262
|
-
if (snap1Result.rowCount === 0) throw new Error(`Snapshot with id ${snapshotId1} not found`);
|
|
263
|
-
if (snap2Result.rowCount === 0) throw new Error(`Snapshot with id ${snapshotId2} not found`);
|
|
264
|
-
const snap1Row = this.rowToObject(snap1Result.columns, snap1Result.rows[0]);
|
|
265
|
-
const snap2Row = this.rowToObject(snap2Result.columns, snap2Result.rows[0]);
|
|
266
|
-
const summary1 = this.safeParseJSON(snap1Row["summary"]);
|
|
267
|
-
const summary2 = this.safeParseJSON(snap2Row["summary"]);
|
|
268
|
-
const counts1 = summary1["objectCounts"] ?? {};
|
|
269
|
-
const counts2 = summary2["objectCounts"] ?? {};
|
|
270
|
-
const allKeys = new Set([...Object.keys(counts1), ...Object.keys(counts2)]);
|
|
271
|
-
const added = [];
|
|
272
|
-
const removed = [];
|
|
273
|
-
const changed = [];
|
|
274
|
-
for (const key of allKeys) {
|
|
275
|
-
const c1 = counts1[key] ?? 0;
|
|
276
|
-
const c2 = counts2[key] ?? 0;
|
|
277
|
-
if (c1 === 0 && c2 > 0) added.push({
|
|
278
|
-
name: key,
|
|
279
|
-
count: c2
|
|
280
|
-
});
|
|
281
|
-
else if (c1 > 0 && c2 === 0) removed.push({
|
|
282
|
-
name: key,
|
|
283
|
-
count: c1
|
|
284
|
-
});
|
|
285
|
-
else if (c1 !== c2) changed.push({
|
|
286
|
-
name: key,
|
|
287
|
-
countBefore: c1,
|
|
288
|
-
countAfter: c2,
|
|
289
|
-
delta: c2 - c1
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
changed.sort((a, b) => Math.abs(b.delta) - Math.abs(a.delta));
|
|
293
|
-
const totalSize1 = summary1["totalSize"] ?? 0;
|
|
294
|
-
const totalSize2 = summary2["totalSize"] ?? 0;
|
|
295
|
-
return {
|
|
296
|
-
snapshot1: {
|
|
297
|
-
id: snap1Row["id"],
|
|
298
|
-
timestamp: snap1Row["timestamp"],
|
|
299
|
-
totalSize: totalSize1,
|
|
300
|
-
nodeCount: summary1["nodeCount"] ?? 0
|
|
301
|
-
},
|
|
302
|
-
snapshot2: {
|
|
303
|
-
id: snap2Row["id"],
|
|
304
|
-
timestamp: snap2Row["timestamp"],
|
|
305
|
-
totalSize: totalSize2,
|
|
306
|
-
nodeCount: summary2["nodeCount"] ?? 0
|
|
307
|
-
},
|
|
308
|
-
diff: {
|
|
309
|
-
added: added.slice(0, 50),
|
|
310
|
-
removed: removed.slice(0, 50),
|
|
311
|
-
changed: changed.slice(0, 100),
|
|
312
|
-
totalSizeDelta: totalSize2 - totalSize1,
|
|
313
|
-
addedCount: added.length,
|
|
314
|
-
removedCount: removed.length,
|
|
315
|
-
changedCount: changed.length
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
} finally {
|
|
319
|
-
if (tempDb) tempDb.close();
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
async handleExportTrace(args) {
|
|
323
|
-
const dbPath = args["dbPath"];
|
|
324
|
-
const outputPath = args["outputPath"];
|
|
325
|
-
let tempDb = null;
|
|
326
|
-
try {
|
|
327
|
-
const db = this.getDbForReading(dbPath);
|
|
328
|
-
if (dbPath) tempDb = db;
|
|
329
|
-
const allEvents = db.query("SELECT timestamp, category, event_type, data, script_id, line_number FROM events ORDER BY timestamp ASC");
|
|
330
|
-
const PAIRED_BEGIN = new Set(["Debugger.paused"]);
|
|
331
|
-
const PAIRED_END = new Set(["Debugger.resumed"]);
|
|
332
|
-
const traceEvents = allEvents.rows.map((row) => {
|
|
333
|
-
const ts = row[0] * 1e3;
|
|
334
|
-
const cat = row[1];
|
|
335
|
-
const name = row[2];
|
|
336
|
-
const dataStr = row[3];
|
|
337
|
-
let ph = "i";
|
|
338
|
-
if (PAIRED_BEGIN.has(name)) ph = "B";
|
|
339
|
-
else if (PAIRED_END.has(name)) ph = "E";
|
|
340
|
-
return {
|
|
341
|
-
name,
|
|
342
|
-
cat,
|
|
343
|
-
ph,
|
|
344
|
-
ts,
|
|
345
|
-
pid: 1,
|
|
346
|
-
tid: 1,
|
|
347
|
-
args: this.safeParseJSON(dataStr),
|
|
348
|
-
...ph === "i" ? { s: "g" } : {}
|
|
349
|
-
};
|
|
350
|
-
});
|
|
351
|
-
let finalOutputPath;
|
|
352
|
-
if (outputPath) finalOutputPath = outputPath;
|
|
353
|
-
else {
|
|
354
|
-
const { absolutePath } = await resolveArtifactPath({
|
|
355
|
-
category: "traces",
|
|
356
|
-
toolName: "trace_export",
|
|
357
|
-
ext: "json"
|
|
358
|
-
});
|
|
359
|
-
finalOutputPath = absolutePath;
|
|
360
|
-
}
|
|
361
|
-
const output = JSON.stringify(traceEvents, null, 2);
|
|
362
|
-
await writeFile(finalOutputPath, output, "utf-8");
|
|
363
|
-
return {
|
|
364
|
-
exportedPath: finalOutputPath,
|
|
365
|
-
eventCount: traceEvents.length,
|
|
366
|
-
format: "Chrome Trace Event JSON",
|
|
367
|
-
message: `Exported ${traceEvents.length} events to ${finalOutputPath}. Open in chrome://tracing or ui.perfetto.dev`
|
|
368
|
-
};
|
|
369
|
-
} finally {
|
|
370
|
-
if (tempDb) tempDb.close();
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Get a TraceDB instance for reading — either from an explicit path
|
|
375
|
-
* or from the active recorder.
|
|
376
|
-
*/
|
|
377
|
-
getDbForReading(dbPath) {
|
|
378
|
-
if (dbPath) return new TraceDB({ dbPath });
|
|
379
|
-
const activeDb = this.recorder.getDB();
|
|
380
|
-
if (!activeDb) throw new Error("GRACEFUL: No active recording and no dbPath specified. Start a recording or provide a dbPath.");
|
|
381
|
-
activeDb.flush();
|
|
382
|
-
return activeDb;
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Convert a row array + column names to an object.
|
|
386
|
-
*/
|
|
387
|
-
rowToObject(columns, row) {
|
|
388
|
-
const obj = {};
|
|
389
|
-
for (let i = 0; i < columns.length; i++) obj[columns[i]] = row[i];
|
|
390
|
-
return obj;
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Safely parse JSON, returning the raw string on parse failure.
|
|
394
|
-
*/
|
|
395
|
-
safeParseJSON(str) {
|
|
396
|
-
try {
|
|
397
|
-
return JSON.parse(str);
|
|
398
|
-
} catch {
|
|
399
|
-
return str;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
async handleSummarizeTrace(args) {
|
|
403
|
-
const detail = args["detail"] ?? "balanced";
|
|
404
|
-
const dbPath = args["dbPath"];
|
|
405
|
-
let db;
|
|
406
|
-
let shouldClose = false;
|
|
407
|
-
if (dbPath) {
|
|
408
|
-
db = new TraceDB({ dbPath });
|
|
409
|
-
shouldClose = true;
|
|
410
|
-
} else if (this.recorder.getState() === "recording") {
|
|
411
|
-
const activeDb = this.recorder.getDB();
|
|
412
|
-
if (!activeDb) throw new Error("Active recording has no database");
|
|
413
|
-
db = activeDb;
|
|
414
|
-
} else throw new Error("GRACEFUL: No trace database specified and no active recording");
|
|
415
|
-
try {
|
|
416
|
-
const events = db.query("SELECT timestamp, category, event_type, data, script_id, line_number FROM events ORDER BY timestamp").rows.map((row) => ({
|
|
417
|
-
timestamp: row[0],
|
|
418
|
-
category: row[1],
|
|
419
|
-
eventType: row[2],
|
|
420
|
-
data: typeof row[3] === "string" ? this.safeParseJSON(row[3]) : row[3],
|
|
421
|
-
scriptId: row[4],
|
|
422
|
-
lineNumber: row[5]
|
|
423
|
-
}));
|
|
424
|
-
const deltas = db.query("SELECT timestamp, address, old_value, new_value, size, value_type FROM memory_deltas ORDER BY timestamp").rows.map((row) => ({
|
|
425
|
-
timestamp: row[0],
|
|
426
|
-
address: row[1],
|
|
427
|
-
oldValue: row[2],
|
|
428
|
-
newValue: row[3],
|
|
429
|
-
size: row[4],
|
|
430
|
-
valueType: row[5]
|
|
431
|
-
}));
|
|
432
|
-
return {
|
|
433
|
-
events: summarizeEvents(events, detail),
|
|
434
|
-
memory: summarizeMemoryDeltas(deltas),
|
|
435
|
-
metadata: {
|
|
436
|
-
dbPath: dbPath ?? "active recording",
|
|
437
|
-
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
438
|
-
}
|
|
439
|
-
};
|
|
440
|
-
} finally {
|
|
441
|
-
if (shouldClose) db.close();
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
//#endregion
|
|
446
|
-
export { TraceToolHandlers };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as sourcemapTools } from "./definitions-LKpC3-nL.mjs";
|
|
4
|
-
//#region src/server/domains/sourcemap/manifest.ts
|
|
5
|
-
const DOMAIN = "sourcemap";
|
|
6
|
-
const DEP_KEY = "sourcemapHandlers";
|
|
7
|
-
const t = toolLookup(sourcemapTools);
|
|
8
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
-
async function ensure(ctx) {
|
|
10
|
-
const { CodeCollector } = await import("./modules-C184v-S9.mjs").then((n) => n.t);
|
|
11
|
-
const { SourcemapToolHandlers } = await import("./sourcemap-Dq8ez8vS.mjs");
|
|
12
|
-
if (!ctx.collector) {
|
|
13
|
-
ctx.collector = new CodeCollector(ctx.config.puppeteer);
|
|
14
|
-
ctx.registerCaches();
|
|
15
|
-
}
|
|
16
|
-
if (!ctx.sourcemapHandlers) ctx.sourcemapHandlers = new SourcemapToolHandlers(ctx.collector);
|
|
17
|
-
return ctx.sourcemapHandlers;
|
|
18
|
-
}
|
|
19
|
-
const manifest = {
|
|
20
|
-
kind: "domain-manifest",
|
|
21
|
-
version: 1,
|
|
22
|
-
domain: DOMAIN,
|
|
23
|
-
depKey: DEP_KEY,
|
|
24
|
-
profiles: ["full"],
|
|
25
|
-
ensure,
|
|
26
|
-
registrations: [
|
|
27
|
-
{
|
|
28
|
-
tool: t("sourcemap_discover"),
|
|
29
|
-
domain: DOMAIN,
|
|
30
|
-
bind: b((h, a) => h.handleSourcemapDiscover(a))
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
tool: t("sourcemap_fetch_and_parse"),
|
|
34
|
-
domain: DOMAIN,
|
|
35
|
-
bind: b((h, a) => h.handleSourcemapFetchAndParse(a))
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
tool: t("sourcemap_reconstruct_tree"),
|
|
39
|
-
domain: DOMAIN,
|
|
40
|
-
bind: b((h, a) => h.handleSourcemapReconstructTree(a))
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
};
|
|
44
|
-
//#endregion
|
|
45
|
-
export { manifest as default };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
-
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
-
import { t as coordinationTools } from "./definitions-CkFDALoa.mjs";
|
|
4
|
-
//#region src/server/domains/coordination/manifest.ts
|
|
5
|
-
const DOMAIN = "coordination";
|
|
6
|
-
const DEP_KEY = "coordinationHandlers";
|
|
7
|
-
const t = toolLookup(coordinationTools);
|
|
8
|
-
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
-
async function ensure(ctx) {
|
|
10
|
-
const { CoordinationHandlers } = await import("./coordination-qUbyF8KU.mjs");
|
|
11
|
-
if (!ctx.coordinationHandlers) ctx.coordinationHandlers = new CoordinationHandlers(ctx);
|
|
12
|
-
return ctx.coordinationHandlers;
|
|
13
|
-
}
|
|
14
|
-
const manifest = {
|
|
15
|
-
kind: "domain-manifest",
|
|
16
|
-
version: 1,
|
|
17
|
-
domain: DOMAIN,
|
|
18
|
-
depKey: DEP_KEY,
|
|
19
|
-
profiles: ["full"],
|
|
20
|
-
ensure,
|
|
21
|
-
registrations: [
|
|
22
|
-
{
|
|
23
|
-
tool: t("create_task_handoff"),
|
|
24
|
-
domain: DOMAIN,
|
|
25
|
-
bind: b((h, a) => h.handleCreateTaskHandoff(a))
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
tool: t("complete_task_handoff"),
|
|
29
|
-
domain: DOMAIN,
|
|
30
|
-
bind: b((h, a) => h.handleCompleteTaskHandoff(a))
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
tool: t("get_task_context"),
|
|
34
|
-
domain: DOMAIN,
|
|
35
|
-
bind: b((h, a) => h.handleGetTaskContext(a))
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
tool: t("append_session_insight"),
|
|
39
|
-
domain: DOMAIN,
|
|
40
|
-
bind: b((h, a) => h.handleAppendSessionInsight(a))
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
tool: t("save_page_snapshot"),
|
|
44
|
-
domain: DOMAIN,
|
|
45
|
-
bind: b((h, a) => h.handleSavePageSnapshot(a))
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
tool: t("restore_page_snapshot"),
|
|
49
|
-
domain: DOMAIN,
|
|
50
|
-
bind: b((h, a) => h.handleRestorePageSnapshot(a))
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
tool: t("list_page_snapshots"),
|
|
54
|
-
domain: DOMAIN,
|
|
55
|
-
bind: b((h) => h.handleListPageSnapshots())
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
};
|
|
59
|
-
//#endregion
|
|
60
|
-
export { manifest as default };
|