@jshookmcp/jshook 0.2.8 → 0.2.9
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 +36 -5
- package/README.zh.md +36 -5
- package/dist/{AntiCheatDetector-S8VRj-dD.mjs → AntiCheatDetector-BNk-EoBt.mjs} +3 -3
- package/dist/{CodeInjector-4Z3ngPoX.mjs → CodeInjector-Cq8q01kp.mjs} +5 -5
- package/dist/ConsoleMonitor-CPVQW1Y-.mjs +2201 -0
- package/dist/{DarwinAPI-B8hg_yhz.mjs → DarwinAPI-BNPxu0RH.mjs} +1 -1
- package/dist/DetailedDataManager-BQQcxh64.mjs +217 -0
- package/dist/EventBus-DgPmwpeu.mjs +141 -0
- package/dist/EvidenceGraphBridge-SFesNera.mjs +153 -0
- package/dist/{ExtensionManager-D5-bO9D8.mjs → ExtensionManager-CWYgw0YW.mjs} +13 -6
- package/dist/{FingerprintManager-BVxFJL2-.mjs → FingerprintManager-gzWtkKuf.mjs} +1 -1
- package/dist/{HardwareBreakpoint-DK1yjWkV.mjs → HardwareBreakpoint-B9gZCdFP.mjs} +3 -3
- package/dist/{HeapAnalyzer-CEbo10xU.mjs → HeapAnalyzer-BLDH0dCv.mjs} +4 -4
- package/dist/HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs +639 -0
- package/dist/InstrumentationSession-CvPC7Jwy.mjs +244 -0
- package/dist/{MemoryController-DdtnBdD4.mjs → MemoryController-CbVdCIJF.mjs} +3 -3
- package/dist/{MemoryScanSession-RMixN3bX.mjs → MemoryScanSession-BsDZbLYm.mjs} +81 -78
- package/dist/{MemoryScanner-QjK4ld0B.mjs → MemoryScanner-Bcpml6II.mjs} +44 -18
- package/dist/{NativeMemoryManager.impl-CB6gJ0NM.mjs → NativeMemoryManager.impl-dZtA1ZGn.mjs} +14 -53
- package/dist/{NativeMemoryManager.utils-BML4q1ry.mjs → NativeMemoryManager.utils-B-FjA2mJ.mjs} +1 -1
- package/dist/{PEAnalyzer-CK0xe0Fs.mjs → PEAnalyzer-D1lzJ_VG.mjs} +2 -2
- package/dist/PageController-Bqm2kZ_X.mjs +417 -0
- package/dist/{PointerChainEngine-Cd73qu5b.mjs → PointerChainEngine-BOhyVsjx.mjs} +4 -4
- package/dist/PrerequisiteError-Dl33Svkz.mjs +20 -0
- package/dist/ResponseBuilder-D3iFYx2N.mjs +143 -0
- package/dist/ReverseEvidenceGraph-Dlsk94LC.mjs +269 -0
- package/dist/ScriptManager-aHHq0X7U.mjs +3000 -0
- package/dist/{Speedhack-CeF0XmEz.mjs → Speedhack-CqdIFlQl.mjs} +2 -2
- package/dist/{StructureAnalyzer-D4GkMduU.mjs → StructureAnalyzer-DhFaPvRO.mjs} +3 -3
- package/dist/ToolCatalog-C0JGZoOm.mjs +582 -0
- package/dist/ToolError-jh9whhMd.mjs +15 -0
- package/dist/ToolProbe-oC7aPrkv.mjs +45 -0
- package/dist/ToolRegistry-BjaF4oNz.mjs +131 -0
- package/dist/ToolRouter.policy-BWV67ZK-.mjs +304 -0
- package/dist/TraceRecorder-DgxyVbdQ.mjs +519 -0
- package/dist/{Win32API-Bc0QnQsN.mjs → Win32API-CePkipZY.mjs} +1 -1
- package/dist/{Win32Debug-DUHt9XUn.mjs → Win32Debug-BvKs-gxc.mjs} +2 -2
- package/dist/WorkflowEngine-CuvkZtWu.mjs +598 -0
- package/dist/analysis-CL9uACt9.mjs +463 -0
- package/dist/antidebug-CqDTB_uk.mjs +1081 -0
- package/dist/artifactRetention-CFEprwPw.mjs +591 -0
- package/dist/artifacts-Bk2-_uPq.mjs +59 -0
- package/dist/betterSqlite3-0pqusHHH.mjs +74 -0
- package/dist/binary-instrument-CXfpx6fT.mjs +979 -0
- package/dist/bind-helpers-xFfRF-qm.mjs +22 -0
- package/dist/boringssl-inspector-BH2D3VKc.mjs +180 -0
- package/dist/browser-BpOr5PEx.mjs +4082 -0
- package/dist/concurrency-Bt0yv1kJ.mjs +41 -0
- package/dist/{constants-CCvsN80K.mjs → constants-B0OANIBL.mjs} +88 -46
- package/dist/coordination-qUbyF8KU.mjs +259 -0
- package/dist/debugger-gnKxRSN0.mjs +1271 -0
- package/dist/definitions-6M-eejaT.mjs +53 -0
- package/dist/definitions-B18eyf0B.mjs +18 -0
- package/dist/definitions-B3QdlrHv.mjs +34 -0
- package/dist/definitions-B4rAvHNZ.mjs +63 -0
- package/dist/definitions-BB_4jnmy.mjs +37 -0
- package/dist/definitions-BMfYXoNC.mjs +43 -0
- package/dist/definitions-Beid2EB3.mjs +27 -0
- package/dist/definitions-C1UvM5Iy.mjs +126 -0
- package/dist/definitions-CXEI7QC72.mjs +216 -0
- package/dist/definitions-C_4r7Fo-2.mjs +14 -0
- package/dist/definitions-CkFDALoa.mjs +26 -0
- package/dist/definitions-Cke7zEb8.mjs +94 -0
- package/dist/definitions-ClJLzsJQ.mjs +25 -0
- package/dist/definitions-Cq-zroAU.mjs +28 -0
- package/dist/definitions-Cy3Sl6gV.mjs +34 -0
- package/dist/definitions-D3VsGcvz.mjs +47 -0
- package/dist/definitions-DVGfrn7y.mjs +96 -0
- package/dist/definitions-LKpC3-nL.mjs +9 -0
- package/dist/definitions-bAhHQJq9.mjs +359 -0
- package/dist/encoding-Bvz5jLRv.mjs +1065 -0
- package/dist/evidence-graph-bridge-C_fv9PuC.mjs +135 -0
- package/dist/{factory-CibqTNC8.mjs → factory-DxlGh9Xf.mjs} +37 -52
- package/dist/graphql-DYWzJ29s.mjs +1026 -0
- package/dist/handlers-9sAbfIg-.mjs +2552 -0
- package/dist/handlers-Bl8zkwz1.mjs +2716 -0
- package/dist/handlers-C67ktuRN.mjs +710 -0
- package/dist/handlers-C87g8oCe.mjs +276 -0
- package/dist/handlers-CTsDAO6p.mjs +681 -0
- package/dist/handlers-Cgyg6c0U.mjs +645 -0
- package/dist/handlers-D6j6yka7.mjs +2124 -0
- package/dist/handlers-DdFzXLvF.mjs +446 -0
- package/dist/handlers-DeLOCd5m.mjs +799 -0
- package/dist/handlers-DlCJN4Td.mjs +757 -0
- package/dist/handlers-DxGIq15_2.mjs +917 -0
- package/dist/handlers-U6L4xhuF.mjs +585 -0
- package/dist/handlers-tB9Mp9ZK.mjs +84 -0
- package/dist/handlers-tiy7EIBp.mjs +572 -0
- package/dist/handlers.impl-DS0d9fUw.mjs +761 -0
- package/dist/hooks-CzCWByww.mjs +898 -0
- package/dist/index.mjs +377 -155
- package/dist/{logger-BmWzC2lM.mjs → logger-Dh_xb7_2.mjs} +14 -6
- package/dist/maintenance-P7ePRXQC.mjs +830 -0
- package/dist/manifest-2ToTpjv8.mjs +106 -0
- package/dist/manifest-3g71z6Bg.mjs +79 -0
- package/dist/manifest-82baTv4U.mjs +45 -0
- package/dist/manifest-B3QVVeBS.mjs +82 -0
- package/dist/manifest-BB2J8IMJ.mjs +149 -0
- package/dist/manifest-BKbgbSiY.mjs +60 -0
- package/dist/manifest-Bcf-TJzH.mjs +848 -0
- package/dist/manifest-BmtZzQiQ2.mjs +45 -0
- package/dist/manifest-Bnd7kqEY.mjs +55 -0
- package/dist/manifest-BqQX6OQC2.mjs +65 -0
- package/dist/manifest-BqrQ4Tpj.mjs +81 -0
- package/dist/manifest-Br4RPFt5.mjs +370 -0
- package/dist/manifest-C5qDjysN.mjs +107 -0
- package/dist/manifest-C9RT5nk32.mjs +34 -0
- package/dist/manifest-CAhOuvSl.mjs +204 -0
- package/dist/manifest-CBYWCUBJ.mjs +51 -0
- package/dist/manifest-CFADCRa1.mjs +37 -0
- package/dist/manifest-CQVhavRF.mjs +114 -0
- package/dist/manifest-CT7zZBV1.mjs +48 -0
- package/dist/manifest-CV12bcrF.mjs +121 -0
- package/dist/manifest-CXsRWjjI.mjs +224 -0
- package/dist/manifest-CZLUCfG02.mjs +95 -0
- package/dist/manifest-D6phHKFd.mjs +131 -0
- package/dist/manifest-DCyjf4n2.mjs +294 -0
- package/dist/manifest-DHsnKgP6.mjs +60 -0
- package/dist/manifest-Df_dliIe.mjs +55 -0
- package/dist/manifest-Dh8WBmEW.mjs +129 -0
- package/dist/manifest-DhKRAT8_.mjs +92 -0
- package/dist/manifest-DlpTj4ic2.mjs +193 -0
- package/dist/manifest-DrbmZcFl2.mjs +253 -0
- package/dist/manifest-DuwHjUa5.mjs +70 -0
- package/dist/manifest-DzwvxPJX.mjs +38 -0
- package/dist/manifest-NXctwWQq.mjs +68 -0
- package/dist/manifest-Sc_0JQ13.mjs +418 -0
- package/dist/manifest-gZ4s_UtG.mjs +96 -0
- package/dist/manifest-qSleDqdO.mjs +1023 -0
- package/dist/modules-C184v-S9.mjs +11365 -0
- package/dist/mojo-ipc-B_H61Afw.mjs +525 -0
- package/dist/network-671Cw6hV.mjs +3346 -0
- package/dist/{artifacts-BbdOMET5.mjs → outputPaths-B1uGmrWZ.mjs} +219 -212
- package/dist/parse-args-BlRjqlkL.mjs +39 -0
- package/dist/platform-WmNn8Sxb.mjs +2070 -0
- package/dist/process-QcbIy5Zq.mjs +1401 -0
- package/dist/proxy-DqNs0bAd.mjs +170 -0
- package/dist/registry-D-6e18lB.mjs +34 -0
- package/dist/response-BQVP-xUn.mjs +28 -0
- package/dist/server/plugin-api.mjs +2 -2
- package/dist/shared-state-board-DV-dpHFJ.mjs +586 -0
- package/dist/sourcemap-Dq8ez8vS.mjs +650 -0
- package/dist/ssrf-policy-ZaUfvhq7.mjs +166 -0
- package/dist/streaming-BUQ0VJsg.mjs +725 -0
- package/dist/tool-builder-DCbIC5Eo.mjs +186 -0
- package/dist/transform-CiYJfNX0.mjs +1007 -0
- package/dist/types-Bx92KJfT.mjs +4 -0
- package/dist/wasm-DQTnHDs4.mjs +531 -0
- package/dist/workflow-f3xJOcjx.mjs +725 -0
- package/package.json +16 -16
- package/dist/ExtensionManager-CPTJhHFg.mjs +0 -2
- package/dist/ToolCatalog-Bq4V2sbJ.mjs +0 -67201
- package/dist/{CacheAdapters-CzFNpD9a.mjs → CacheAdapters-CDe5WPSV.mjs} +0 -0
- package/dist/{StealthVerifier-BzBCFiwx.mjs → StealthVerifier-Bo4T3bz8.mjs} +0 -0
- package/dist/{VersionDetector-CNXcvD46.mjs → VersionDetector-CwVLVdDM.mjs} +0 -0
- package/dist/{formatAddress-ChCSIRWT.mjs → formatAddress-DVkj9kpI.mjs} +0 -0
- package/dist/{types-BBjOqye-.mjs → types-CPhOReNX.mjs} +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { n as toolLookup } from "./registry-D-6e18lB.mjs";
|
|
2
|
+
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
+
import { i as tokenBudgetTools, n as cacheTools, r as extensionTools, t as artifactTools } from "./definitions-ClJLzsJQ.mjs";
|
|
4
|
+
//#region src/server/domains/maintenance/manifest.ts
|
|
5
|
+
const DOMAIN = "maintenance";
|
|
6
|
+
const DEP_KEY = "coreMaintenanceHandlers";
|
|
7
|
+
const EXT_DEP_KEY = "extensionManagementHandlers";
|
|
8
|
+
const t = toolLookup([
|
|
9
|
+
...tokenBudgetTools,
|
|
10
|
+
...cacheTools,
|
|
11
|
+
...artifactTools,
|
|
12
|
+
...extensionTools
|
|
13
|
+
]);
|
|
14
|
+
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
15
|
+
const be = (invoke) => bindByDepKey(EXT_DEP_KEY, invoke);
|
|
16
|
+
async function ensure(ctx) {
|
|
17
|
+
const { CoreMaintenanceHandlers, ExtensionManagementHandlers } = await import("./maintenance-P7ePRXQC.mjs");
|
|
18
|
+
if (!ctx.coreMaintenanceHandlers || !ctx.extensionManagementHandlers) {
|
|
19
|
+
if (!ctx.coreMaintenanceHandlers) ctx.coreMaintenanceHandlers = new CoreMaintenanceHandlers({
|
|
20
|
+
tokenBudget: ctx.tokenBudget,
|
|
21
|
+
unifiedCache: ctx.unifiedCache
|
|
22
|
+
});
|
|
23
|
+
if (!ctx.extensionManagementHandlers) ctx.extensionManagementHandlers = new ExtensionManagementHandlers(ctx);
|
|
24
|
+
}
|
|
25
|
+
return ctx.coreMaintenanceHandlers;
|
|
26
|
+
}
|
|
27
|
+
const manifest = {
|
|
28
|
+
kind: "domain-manifest",
|
|
29
|
+
version: 1,
|
|
30
|
+
domain: DOMAIN,
|
|
31
|
+
depKey: DEP_KEY,
|
|
32
|
+
secondaryDepKeys: ["extensionManagementHandlers"],
|
|
33
|
+
profiles: ["workflow", "full"],
|
|
34
|
+
ensure,
|
|
35
|
+
registrations: [
|
|
36
|
+
{
|
|
37
|
+
tool: t("get_token_budget_stats"),
|
|
38
|
+
domain: DOMAIN,
|
|
39
|
+
bind: b((h) => h.handleGetTokenBudgetStats()),
|
|
40
|
+
profiles: ["workflow", "full"]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
tool: t("manual_token_cleanup"),
|
|
44
|
+
domain: DOMAIN,
|
|
45
|
+
bind: b((h) => h.handleManualTokenCleanup())
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
tool: t("reset_token_budget"),
|
|
49
|
+
domain: DOMAIN,
|
|
50
|
+
bind: b((h) => h.handleResetTokenBudget())
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
tool: t("get_cache_stats"),
|
|
54
|
+
domain: DOMAIN,
|
|
55
|
+
bind: b((h) => h.handleGetCacheStats()),
|
|
56
|
+
profiles: ["workflow", "full"]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
tool: t("smart_cache_cleanup"),
|
|
60
|
+
domain: DOMAIN,
|
|
61
|
+
bind: b((h, a) => h.handleSmartCacheCleanup(a.targetSize))
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
tool: t("clear_all_caches"),
|
|
65
|
+
domain: DOMAIN,
|
|
66
|
+
bind: b((h) => h.handleClearAllCaches())
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
tool: t("cleanup_artifacts"),
|
|
70
|
+
domain: DOMAIN,
|
|
71
|
+
bind: b((h, a) => h.handleCleanupArtifacts({
|
|
72
|
+
retentionDays: a.retentionDays,
|
|
73
|
+
maxTotalBytes: a.maxTotalBytes,
|
|
74
|
+
dryRun: a.dryRun
|
|
75
|
+
}))
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
tool: t("doctor_environment"),
|
|
79
|
+
domain: DOMAIN,
|
|
80
|
+
bind: b((h, a) => h.handleEnvironmentDoctor({ includeBridgeHealth: a.includeBridgeHealth }))
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
tool: t("list_extensions"),
|
|
84
|
+
domain: DOMAIN,
|
|
85
|
+
bind: be((h) => h.handleListExtensions()),
|
|
86
|
+
profiles: ["workflow", "full"]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
tool: t("reload_extensions"),
|
|
90
|
+
domain: DOMAIN,
|
|
91
|
+
bind: be((h) => h.handleReloadExtensions())
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
tool: t("browse_extension_registry"),
|
|
95
|
+
domain: DOMAIN,
|
|
96
|
+
bind: be((h, a) => h.handleBrowseExtensionRegistry(a.kind ?? "all")),
|
|
97
|
+
profiles: ["workflow", "full"]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
tool: t("install_extension"),
|
|
101
|
+
domain: DOMAIN,
|
|
102
|
+
bind: be((h, a) => h.handleInstallExtension(a.slug, a.targetDir))
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { manifest as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
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 tool } from "./tool-builder-DCbIC5Eo.mjs";
|
|
4
|
+
//#region src/server/domains/sandbox/definitions.ts
|
|
5
|
+
const sandboxTools = [tool("execute_sandbox_script", (t) => t.desc("Execute JavaScript in a WASM-isolated QuickJS sandbox with optional tool brid...").string("code", "JavaScript source code to execute inside the sandbox").string("sessionId", "Session ID for scratchpad persistence across executions").number("timeoutMs", "Execution timeout in ms", { default: 1e3 }).boolean("autoCorrect", "Retry failed scripts up to 2 times with error context", { default: false }).required("code"))];
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/server/domains/sandbox/manifest.ts
|
|
8
|
+
const DOMAIN = "sandbox";
|
|
9
|
+
const DEP_KEY = "sandboxHandlers";
|
|
10
|
+
const t = toolLookup(sandboxTools);
|
|
11
|
+
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
12
|
+
async function ensure(ctx) {
|
|
13
|
+
const { SandboxToolHandlers } = await import("./handlers-DxGIq15_2.mjs");
|
|
14
|
+
const existing = ctx.getDomainInstance(DEP_KEY);
|
|
15
|
+
if (existing) return existing;
|
|
16
|
+
const handlers = new SandboxToolHandlers(ctx);
|
|
17
|
+
ctx.setDomainInstance(DEP_KEY, handlers);
|
|
18
|
+
return handlers;
|
|
19
|
+
}
|
|
20
|
+
const manifest = {
|
|
21
|
+
kind: "domain-manifest",
|
|
22
|
+
version: 1,
|
|
23
|
+
domain: DOMAIN,
|
|
24
|
+
depKey: DEP_KEY,
|
|
25
|
+
profiles: ["full"],
|
|
26
|
+
ensure,
|
|
27
|
+
registrations: [{
|
|
28
|
+
tool: t("execute_sandbox_script"),
|
|
29
|
+
domain: DOMAIN,
|
|
30
|
+
bind: b((h, a) => h.handleExecuteSandboxScript(a))
|
|
31
|
+
}]
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { manifest as default };
|
|
@@ -0,0 +1,204 @@
|
|
|
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 tool } from "./tool-builder-DCbIC5Eo.mjs";
|
|
4
|
+
//#region src/server/domains/binary-instrument/definitions.ts
|
|
5
|
+
const binaryInstrumentTools = [
|
|
6
|
+
tool("frida_attach", (t) => t.desc("Attach Frida to a local process, PID, or binary path and create a binary inst...").string("target", "Process name, PID, or binary path to attach to").required("target")),
|
|
7
|
+
tool("frida_enumerate_modules", (t) => t.desc("Enumerate modules for an attached Frida session.").string("sessionId", "Session id returned by frida_attach").required("sessionId").query()),
|
|
8
|
+
tool("ghidra_analyze", (t) => t.desc("Run binary metadata analysis with Ghidra headless when available, with struct...").number("timeout", "Optional timeout in milliseconds for headless analysis").required("binaryPath")),
|
|
9
|
+
tool("generate_hooks", (t) => t.desc("Generate a Frida interceptor script for a list of symbols.").array("symbols", { type: "string" }, "Symbol names to hook").object("options", {
|
|
10
|
+
includeArgs: {
|
|
11
|
+
type: "boolean",
|
|
12
|
+
description: "Emit argument logging on function entry"
|
|
13
|
+
},
|
|
14
|
+
includeRetAddr: {
|
|
15
|
+
type: "boolean",
|
|
16
|
+
description: "Emit return-address logging on function entry"
|
|
17
|
+
}
|
|
18
|
+
}, "Optional Frida hook generation flags").required("symbols")),
|
|
19
|
+
tool("unidbg_emulate", (t) => t.desc("Attempt to emulate a native function with unidbg, or return structured mock o...").string("functionName", "Function name to emulate").array("args", { type: "string" }, "Optional string arguments forwarded to emulation").required("binaryPath", "functionName")),
|
|
20
|
+
tool("frida_run_script", (t) => t.desc("Execute a Frida JavaScript snippet inside an attached Frida session.").string("sessionId", "Session id returned by frida_attach").string("script", "Frida JavaScript to execute").required("sessionId", "script")),
|
|
21
|
+
tool("frida_detach", (t) => t.desc("Detach from a Frida session and clean up resources.").string("sessionId", "Session id returned by frida_attach").required("sessionId")),
|
|
22
|
+
tool("frida_list_sessions", (t) => t.desc("List all active Frida sessions.").query()),
|
|
23
|
+
tool("frida_generate_script", (t) => t.desc("Generate a Frida interceptor script from templates (trace, intercept, replace, log).").string("target", "Target binary or module name").string("template", "Hook template type: trace, intercept, replace, log").string("functionName", "Function name to generate hook for").required("target", "template")),
|
|
24
|
+
tool("get_available_plugins", (t) => t.desc("List all available binary analysis plugins (frida, ghidra, ida, jadx).").query()),
|
|
25
|
+
tool("ghidra_decompile", (t) => t.desc("Decompile a specific function using Ghidra headless analysis.").string("binaryPath", "Path to the binary file").string("functionName", "Function name to decompile").required("binaryPath", "functionName")),
|
|
26
|
+
tool("ida_decompile", (t) => t.desc("Decompile a function using IDA Pro via plugin bridge.").string("binaryPath", "Path to the binary file").string("functionName", "Function name to decompile").required("binaryPath", "functionName")),
|
|
27
|
+
tool("jadx_decompile", (t) => t.desc("Decompile an APK class or method using JADX via plugin bridge.").string("apkPath", "Path to the APK file").string("className", "Fully qualified class name").string("methodName", "Method name to decompile").required("apkPath", "className")),
|
|
28
|
+
tool("unidbg_launch", (t) => t.desc("Launch an ARM/ARM64 .so library in the Unidbg emulator. First call ~3-5s warmup.").string("soPath", "Path to the .so library file").string("arch", "Architecture: arm or arm64").required("soPath")),
|
|
29
|
+
tool("unidbg_call", (t) => t.desc("Call a JNI function in a running Unidbg emulator session.").string("sessionId", "Session id from unidbg_launch").string("functionName", "JNI function name to call").required("sessionId", "functionName")),
|
|
30
|
+
tool("unidbg_trace", (t) => t.desc("Get an execution trace from an Unidbg session (full/basic/instruction modes).").string("sessionId", "Session id from unidbg_launch").required("sessionId")),
|
|
31
|
+
tool("export_hook_script", (t) => t.desc("Export generated hook templates as a complete, runnable Frida script.").string("hookTemplates", "JSON array of hook template objects")),
|
|
32
|
+
tool("frida_enumerate_functions", (t) => t.desc("Enumerate exported functions for a specific module in a Frida session.").string("sessionId", "Session id returned by frida_attach").string("moduleName", "Module name to enumerate exports from").required("sessionId", "moduleName").query()),
|
|
33
|
+
tool("frida_find_symbols", (t) => t.desc("Search for symbols matching a pattern in a Frida session using ApiResolver.").string("sessionId", "Session id returned by frida_attach").string("pattern", "Symbol search pattern (e.g. \"exports:*libssl*SSL*\")").required("sessionId", "pattern").query())
|
|
34
|
+
];
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/server/domains/binary-instrument/manifest.ts
|
|
37
|
+
const DOMAIN = "binary-instrument";
|
|
38
|
+
const DEP_KEY = "binaryInstrumentHandlers";
|
|
39
|
+
const toolByName = toolLookup(binaryInstrumentTools);
|
|
40
|
+
const bind = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
41
|
+
async function ensure(ctx) {
|
|
42
|
+
const { BinaryInstrumentHandlers } = await import("./handlers-Cgyg6c0U.mjs");
|
|
43
|
+
const { GhidraAnalyzer, HookGenerator } = await import("./binary-instrument-CXfpx6fT.mjs").then((n) => n.t);
|
|
44
|
+
let handlers = ctx.getDomainInstance(DEP_KEY);
|
|
45
|
+
if (!handlers) {
|
|
46
|
+
handlers = new BinaryInstrumentHandlers(ctx, new GhidraAnalyzer(), new HookGenerator());
|
|
47
|
+
ctx.setDomainInstance(DEP_KEY, handlers);
|
|
48
|
+
}
|
|
49
|
+
return handlers;
|
|
50
|
+
}
|
|
51
|
+
const manifest = {
|
|
52
|
+
kind: "domain-manifest",
|
|
53
|
+
version: 1,
|
|
54
|
+
domain: DOMAIN,
|
|
55
|
+
depKey: DEP_KEY,
|
|
56
|
+
profiles: ["full"],
|
|
57
|
+
ensure,
|
|
58
|
+
registrations: [
|
|
59
|
+
{
|
|
60
|
+
tool: toolByName("frida_attach"),
|
|
61
|
+
domain: DOMAIN,
|
|
62
|
+
bind: bind((handlers, args) => handlers.handleFridaAttach(args))
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
tool: toolByName("frida_enumerate_modules"),
|
|
66
|
+
domain: DOMAIN,
|
|
67
|
+
bind: bind((handlers, args) => handlers.handleFridaEnumerateModules(args))
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
tool: toolByName("ghidra_analyze"),
|
|
71
|
+
domain: DOMAIN,
|
|
72
|
+
bind: bind((handlers, args) => handlers.handleGhidraAnalyze(args))
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
tool: toolByName("generate_hooks"),
|
|
76
|
+
domain: DOMAIN,
|
|
77
|
+
bind: bind((handlers, args) => handlers.handleGenerateHooks(args))
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
tool: toolByName("unidbg_emulate"),
|
|
81
|
+
domain: DOMAIN,
|
|
82
|
+
bind: bind((handlers, args) => handlers.handleUnidbgEmulate(args))
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
tool: toolByName("frida_run_script"),
|
|
86
|
+
domain: DOMAIN,
|
|
87
|
+
bind: bind((handlers, args) => handlers.handleFridaRunScript(args))
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
tool: toolByName("frida_detach"),
|
|
91
|
+
domain: DOMAIN,
|
|
92
|
+
bind: bind((handlers, args) => handlers.handleFridaDetach(args))
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
tool: toolByName("frida_list_sessions"),
|
|
96
|
+
domain: DOMAIN,
|
|
97
|
+
bind: bind((handlers, args) => handlers.handleFridaListSessions(args))
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
tool: toolByName("frida_generate_script"),
|
|
101
|
+
domain: DOMAIN,
|
|
102
|
+
bind: bind((handlers, args) => handlers.handleFridaGenerateScript(args))
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
tool: toolByName("get_available_plugins"),
|
|
106
|
+
domain: DOMAIN,
|
|
107
|
+
bind: bind((handlers, args) => handlers.handleGetAvailablePlugins(args))
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
tool: toolByName("ghidra_decompile"),
|
|
111
|
+
domain: DOMAIN,
|
|
112
|
+
bind: bind((handlers, args) => handlers.handleGhidraDecompile(args))
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
tool: toolByName("ida_decompile"),
|
|
116
|
+
domain: DOMAIN,
|
|
117
|
+
bind: bind((handlers, args) => handlers.handleIdaDecompile(args))
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
tool: toolByName("jadx_decompile"),
|
|
121
|
+
domain: DOMAIN,
|
|
122
|
+
bind: bind((handlers, args) => handlers.handleJadxDecompile(args))
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
tool: toolByName("unidbg_launch"),
|
|
126
|
+
domain: DOMAIN,
|
|
127
|
+
bind: bind((handlers, args) => handlers.handleUnidbgLaunch(args))
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
tool: toolByName("unidbg_call"),
|
|
131
|
+
domain: DOMAIN,
|
|
132
|
+
bind: bind((handlers, args) => handlers.handleUnidbgCall(args))
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
tool: toolByName("unidbg_trace"),
|
|
136
|
+
domain: DOMAIN,
|
|
137
|
+
bind: bind((handlers, args) => handlers.handleUnidbgTrace(args))
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
tool: toolByName("export_hook_script"),
|
|
141
|
+
domain: DOMAIN,
|
|
142
|
+
bind: bind((handlers, args) => handlers.handleExportHookScript(args))
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
tool: toolByName("frida_enumerate_functions"),
|
|
146
|
+
domain: DOMAIN,
|
|
147
|
+
bind: bind((handlers, args) => handlers.handleFridaEnumerateFunctions(args))
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
tool: toolByName("frida_find_symbols"),
|
|
151
|
+
domain: DOMAIN,
|
|
152
|
+
bind: bind((handlers, args) => handlers.handleFridaFindSymbols(args))
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
workflowRule: {
|
|
156
|
+
patterns: [/\b(frida|ghidra|ida|unidbg|jadx|binary|disassemb|decompil|dump\s?so)\b/i, /(binary|native|so|dll|elf|apk).*(analyze|hook|instrument|decompile)/i],
|
|
157
|
+
priority: 88,
|
|
158
|
+
tools: [
|
|
159
|
+
"frida_attach",
|
|
160
|
+
"ghidra_analyze",
|
|
161
|
+
"generate_hooks",
|
|
162
|
+
"unidbg_launch"
|
|
163
|
+
],
|
|
164
|
+
hint: "Binary analysis pipeline: attach Frida → decompile (Ghidra/IDA/JADX) → generate hook scripts → emulate with Unidbg."
|
|
165
|
+
},
|
|
166
|
+
prerequisites: {
|
|
167
|
+
frida_attach: [{
|
|
168
|
+
condition: "plugin_frida_bridge must be installed and frida-server reachable",
|
|
169
|
+
fix: "Install @jshookmcpextension/plugin-frida-bridge; launch frida-server on the target"
|
|
170
|
+
}],
|
|
171
|
+
frida_run_script: [{
|
|
172
|
+
condition: "A Frida session must be active",
|
|
173
|
+
fix: "Call frida_attach before running a script"
|
|
174
|
+
}],
|
|
175
|
+
ghidra_analyze: [{
|
|
176
|
+
condition: "plugin_ghidra_bridge must be installed with Ghidra headless available",
|
|
177
|
+
fix: "Install @jshookmcpextension/plugin-ghidra-bridge and configure Ghidra path"
|
|
178
|
+
}],
|
|
179
|
+
ida_decompile: [{
|
|
180
|
+
condition: "plugin_ida_bridge must be installed",
|
|
181
|
+
fix: "Install @jshookmcpextension/plugin-ida-bridge and provide IDA Pro license"
|
|
182
|
+
}],
|
|
183
|
+
jadx_decompile: [{
|
|
184
|
+
condition: "plugin_jadx_bridge must be installed",
|
|
185
|
+
fix: "Install @jshookmcpextension/plugin-jadx-bridge"
|
|
186
|
+
}],
|
|
187
|
+
unidbg_launch: [{
|
|
188
|
+
condition: "Java 17+ and unidbg JAR must be reachable",
|
|
189
|
+
fix: "Install JDK 17+ and download unidbg from its official release"
|
|
190
|
+
}],
|
|
191
|
+
generate_hooks: [{
|
|
192
|
+
condition: "Ghidra analysis output required",
|
|
193
|
+
fix: "Run ghidra_analyze first and pass the output to generate_hooks"
|
|
194
|
+
}]
|
|
195
|
+
},
|
|
196
|
+
toolDependencies: [{
|
|
197
|
+
from: "process",
|
|
198
|
+
to: "binary-instrument",
|
|
199
|
+
relation: "uses",
|
|
200
|
+
weight: .6
|
|
201
|
+
}]
|
|
202
|
+
};
|
|
203
|
+
//#endregion
|
|
204
|
+
export { manifest as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { n as toolLookup, t as ensureBrowserCore } from "./registry-D-6e18lB.mjs";
|
|
2
|
+
import { t as bindByDepKey } from "./bind-helpers-xFfRF-qm.mjs";
|
|
3
|
+
import { t as streamingTools } from "./definitions-BB_4jnmy.mjs";
|
|
4
|
+
//#region src/server/domains/streaming/manifest.ts
|
|
5
|
+
const DOMAIN = "streaming";
|
|
6
|
+
const DEP_KEY = "streamingHandlers";
|
|
7
|
+
const t = toolLookup(streamingTools);
|
|
8
|
+
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
+
async function ensure(ctx) {
|
|
10
|
+
const { StreamingToolHandlers } = await import("./streaming-BUQ0VJsg.mjs");
|
|
11
|
+
await ensureBrowserCore(ctx);
|
|
12
|
+
if (!ctx.streamingHandlers) ctx.streamingHandlers = new StreamingToolHandlers(ctx.collector);
|
|
13
|
+
return ctx.streamingHandlers;
|
|
14
|
+
}
|
|
15
|
+
const manifest = {
|
|
16
|
+
kind: "domain-manifest",
|
|
17
|
+
version: 1,
|
|
18
|
+
domain: DOMAIN,
|
|
19
|
+
depKey: DEP_KEY,
|
|
20
|
+
profiles: ["workflow", "full"],
|
|
21
|
+
ensure,
|
|
22
|
+
registrations: [
|
|
23
|
+
{
|
|
24
|
+
tool: t("ws_monitor"),
|
|
25
|
+
domain: DOMAIN,
|
|
26
|
+
bind: b((h, a) => h.handleWsMonitorDispatch(a))
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
tool: t("ws_get_frames"),
|
|
30
|
+
domain: DOMAIN,
|
|
31
|
+
bind: b((h, a) => h.handleWsGetFrames(a))
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
tool: t("ws_get_connections"),
|
|
35
|
+
domain: DOMAIN,
|
|
36
|
+
bind: b((h, a) => h.handleWsGetConnections(a))
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
tool: t("sse_monitor_enable"),
|
|
40
|
+
domain: DOMAIN,
|
|
41
|
+
bind: b((h, a) => h.handleSseMonitorEnable(a))
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
tool: t("sse_get_events"),
|
|
45
|
+
domain: DOMAIN,
|
|
46
|
+
bind: b((h, a) => h.handleSseGetEvents(a))
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { manifest as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
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 antidebugTools } from "./definitions-B18eyf0B.mjs";
|
|
4
|
+
//#region src/server/domains/antidebug/manifest.ts
|
|
5
|
+
const DOMAIN = "antidebug";
|
|
6
|
+
const DEP_KEY = "antidebugHandlers";
|
|
7
|
+
const t = toolLookup(antidebugTools);
|
|
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 { AntiDebugToolHandlers } = await import("./antidebug-CqDTB_uk.mjs");
|
|
12
|
+
if (!ctx.collector) {
|
|
13
|
+
ctx.collector = new CodeCollector(ctx.config.puppeteer);
|
|
14
|
+
ctx.registerCaches();
|
|
15
|
+
}
|
|
16
|
+
if (!ctx.antidebugHandlers) ctx.antidebugHandlers = new AntiDebugToolHandlers(ctx.collector);
|
|
17
|
+
return ctx.antidebugHandlers;
|
|
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
|
+
tool: t("antidebug_bypass"),
|
|
28
|
+
domain: DOMAIN,
|
|
29
|
+
bind: b((h, a) => h.handleAntidebugBypass(a))
|
|
30
|
+
}, {
|
|
31
|
+
tool: t("antidebug_detect_protections"),
|
|
32
|
+
domain: DOMAIN,
|
|
33
|
+
bind: b((h, a) => h.handleAntiDebugDetectProtections(a))
|
|
34
|
+
}]
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { manifest as default };
|
|
@@ -0,0 +1,114 @@
|
|
|
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 processToolDefinitions } from "./definitions-B4rAvHNZ.mjs";
|
|
4
|
+
//#region src/server/domains/process/manifest.ts
|
|
5
|
+
const DOMAIN = "process";
|
|
6
|
+
const DEP_KEY = "processHandlers";
|
|
7
|
+
const t = toolLookup(processToolDefinitions);
|
|
8
|
+
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
9
|
+
const EFFECTIVE_PLATFORM = process.env.JSHOOK_REGISTRY_PLATFORM === "win32" || process.env.JSHOOK_REGISTRY_PLATFORM === "linux" || process.env.JSHOOK_REGISTRY_PLATFORM === "darwin" ? process.env.JSHOOK_REGISTRY_PLATFORM : process.platform;
|
|
10
|
+
async function ensure(ctx) {
|
|
11
|
+
const { ProcessToolHandlers } = await import("./process-QcbIy5Zq.mjs");
|
|
12
|
+
if (!ctx.processHandlers) ctx.processHandlers = new ProcessToolHandlers();
|
|
13
|
+
return ctx.processHandlers;
|
|
14
|
+
}
|
|
15
|
+
const IS_WIN32 = EFFECTIVE_PLATFORM === "win32";
|
|
16
|
+
const WIN32_ONLY_TOOLS = new Set(["check_debug_port"]);
|
|
17
|
+
const allRegistrations = [
|
|
18
|
+
{
|
|
19
|
+
tool: t("electron_attach"),
|
|
20
|
+
domain: DOMAIN,
|
|
21
|
+
bind: b((h, a) => h.handleElectronAttach(a))
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
tool: t("process_windows"),
|
|
25
|
+
domain: DOMAIN,
|
|
26
|
+
bind: b((h, a) => h.handleProcessWindows(a))
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
tool: t("process_check_debug_port"),
|
|
30
|
+
domain: DOMAIN,
|
|
31
|
+
bind: b((h, a) => h.handleProcessCheckDebugPort(a))
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
tool: t("process_launch_debug"),
|
|
35
|
+
domain: DOMAIN,
|
|
36
|
+
bind: b((h, a) => h.handleProcessLaunchDebug(a))
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
tool: t("memory_read"),
|
|
40
|
+
domain: DOMAIN,
|
|
41
|
+
bind: b((h, a) => h.handleMemoryRead(a))
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
tool: t("memory_write"),
|
|
45
|
+
domain: DOMAIN,
|
|
46
|
+
bind: b((h, a) => h.handleMemoryWrite(a))
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
tool: t("memory_scan"),
|
|
50
|
+
domain: DOMAIN,
|
|
51
|
+
bind: b((h, a) => h.handleMemoryScan(a))
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
tool: t("memory_check_protection"),
|
|
55
|
+
domain: DOMAIN,
|
|
56
|
+
bind: b((h, a) => h.handleMemoryCheckProtection(a))
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
tool: t("memory_scan_filtered"),
|
|
60
|
+
domain: DOMAIN,
|
|
61
|
+
bind: b((h, a) => h.handleMemoryScanFiltered(a))
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
tool: t("memory_batch_write"),
|
|
65
|
+
domain: DOMAIN,
|
|
66
|
+
bind: b((h, a) => h.handleMemoryBatchWrite(a))
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
tool: t("memory_dump_region"),
|
|
70
|
+
domain: DOMAIN,
|
|
71
|
+
bind: b((h, a) => h.handleMemoryDumpRegion(a))
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
tool: t("memory_list_regions"),
|
|
75
|
+
domain: DOMAIN,
|
|
76
|
+
bind: b((h, a) => h.handleMemoryListRegions(a))
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
tool: t("memory_audit_export"),
|
|
80
|
+
domain: DOMAIN,
|
|
81
|
+
bind: b((h, a) => h.handleMemoryAuditExport(a))
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
tool: t("inject_dll"),
|
|
85
|
+
domain: DOMAIN,
|
|
86
|
+
bind: b((h, a) => h.handleInjectDll(a))
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
tool: t("inject_shellcode"),
|
|
90
|
+
domain: DOMAIN,
|
|
91
|
+
bind: b((h, a) => h.handleInjectShellcode(a))
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
tool: t("check_debug_port"),
|
|
95
|
+
domain: DOMAIN,
|
|
96
|
+
bind: b((h, a) => h.handleCheckDebugPort(a))
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
tool: t("enumerate_modules"),
|
|
100
|
+
domain: DOMAIN,
|
|
101
|
+
bind: b((h, a) => h.handleEnumerateModules(a))
|
|
102
|
+
}
|
|
103
|
+
];
|
|
104
|
+
const manifest = {
|
|
105
|
+
kind: "domain-manifest",
|
|
106
|
+
version: 1,
|
|
107
|
+
domain: DOMAIN,
|
|
108
|
+
depKey: DEP_KEY,
|
|
109
|
+
profiles: ["full"],
|
|
110
|
+
ensure,
|
|
111
|
+
registrations: IS_WIN32 ? allRegistrations : allRegistrations.filter((r) => !WIN32_ONLY_TOOLS.has(r.tool.name))
|
|
112
|
+
};
|
|
113
|
+
//#endregion
|
|
114
|
+
export { manifest as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
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 sharedStateBoardTools } from "./definitions-B3QdlrHv.mjs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
//#region src/server/domains/shared-state-board/manifest.ts
|
|
6
|
+
const DOMAIN = "shared-state-board";
|
|
7
|
+
const DEP_KEY = "sharedStateBoardHandlers";
|
|
8
|
+
const t = toolLookup(sharedStateBoardTools);
|
|
9
|
+
const b = (invoke) => bindByDepKey(DEP_KEY, invoke);
|
|
10
|
+
async function ensure(ctx) {
|
|
11
|
+
const { SharedStateBoardHandlers } = await import("./shared-state-board-DV-dpHFJ.mjs");
|
|
12
|
+
if (!ctx.sharedStateBoardHandlers) ctx.sharedStateBoardHandlers = new SharedStateBoardHandlers();
|
|
13
|
+
const scheduler = ctx.getDomainInstance("snapshotScheduler");
|
|
14
|
+
const stateDir = ctx.getDomainInstance("snapshotStateDir");
|
|
15
|
+
ctx.sharedStateBoardHandlers.setPersistNotifier(scheduler ? () => scheduler.notifyDirty() : void 0);
|
|
16
|
+
if (scheduler && stateDir && !ctx.getDomainInstance("sharedStateBoardSnapshotRegistered")) {
|
|
17
|
+
scheduler.register(resolve(stateDir, "state-board", "current.json"), ctx.sharedStateBoardHandlers.getStore());
|
|
18
|
+
ctx.setDomainInstance("sharedStateBoardSnapshotRegistered", true);
|
|
19
|
+
}
|
|
20
|
+
return ctx.sharedStateBoardHandlers;
|
|
21
|
+
}
|
|
22
|
+
const manifest = {
|
|
23
|
+
kind: "domain-manifest",
|
|
24
|
+
version: 1,
|
|
25
|
+
domain: DOMAIN,
|
|
26
|
+
depKey: DEP_KEY,
|
|
27
|
+
profiles: ["workflow", "full"],
|
|
28
|
+
ensure,
|
|
29
|
+
registrations: [
|
|
30
|
+
{
|
|
31
|
+
tool: t("state_board"),
|
|
32
|
+
domain: DOMAIN,
|
|
33
|
+
bind: b((h, a) => h.handleDispatch(a))
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
tool: t("state_board_watch"),
|
|
37
|
+
domain: DOMAIN,
|
|
38
|
+
bind: b((h, a) => h.handleWatchDispatch(a))
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
tool: t("state_board_io"),
|
|
42
|
+
domain: DOMAIN,
|
|
43
|
+
bind: b((h, a) => h.handleIODispatch(a))
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { manifest as default };
|