dsh-pentester 2.0.0 → 2.2.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/lib/build-id.json +1 -1
- package/lib/client.js +14 -21
- package/lib/client.js.map +2 -2
- package/lib/index.js +11 -7
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4076,7 +4076,7 @@ async function resolveBinding(deps, sessionId) {
|
|
|
4076
4076
|
*
|
|
4077
4077
|
* Format: version+shortSha (e.g. "1.1.0+391bfd6")
|
|
4078
4078
|
*/
|
|
4079
|
-
const BUILD_ID = "2.
|
|
4079
|
+
const BUILD_ID = "2.2.0+478786d";
|
|
4080
4080
|
//#endregion
|
|
4081
4081
|
//#region src/ui-view/invocations.ts
|
|
4082
4082
|
/**
|
|
@@ -4766,6 +4766,7 @@ async function apply(ctx, config) {
|
|
|
4766
4766
|
}),
|
|
4767
4767
|
registerContainerExecTool: (tools) => registerContainerExecTool(tools, docker)
|
|
4768
4768
|
});
|
|
4769
|
+
ctx.typert.register(PENTESTER_HOST_MANIFEST);
|
|
4769
4770
|
new PentesterDockerTypertService(ctx, {
|
|
4770
4771
|
getSettings: () => ensureSettings(),
|
|
4771
4772
|
getConfigHost: () => config.dockerHost ?? "",
|
|
@@ -4785,17 +4786,20 @@ async function apply(ctx, config) {
|
|
|
4785
4786
|
});
|
|
4786
4787
|
new PentesterViewTypertService(ctx, {
|
|
4787
4788
|
getLiveSessionCwd(sessionId) {
|
|
4788
|
-
|
|
4789
|
-
|
|
4789
|
+
try {
|
|
4790
|
+
const cwd = ((ctx.get?.("sessions"))?.get?.(sessionId))?.header?.cwd;
|
|
4791
|
+
if (typeof cwd === "string" && cwd.length > 0 && cwd.startsWith("/")) return cwd;
|
|
4792
|
+
} catch {}
|
|
4790
4793
|
},
|
|
4791
4794
|
getWorkspaceForSession(sessionId) {
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
+
try {
|
|
4796
|
+
const registry = ctx.get?.("workspaceRegistry");
|
|
4797
|
+
if (registry?.list === void 0) return void 0;
|
|
4798
|
+
for (const workspace of registry.list()) if (workspace.sessionIds.includes(sessionId)) return workspace.path;
|
|
4799
|
+
} catch {}
|
|
4795
4800
|
},
|
|
4796
4801
|
verbose: config.verbose
|
|
4797
4802
|
});
|
|
4798
|
-
ctx.typert.register(PENTESTER_HOST_MANIFEST);
|
|
4799
4803
|
const typertLocal = ctx.typert.local;
|
|
4800
4804
|
const dockerEndpoint = typertLocal.get("pentesterDocker/command");
|
|
4801
4805
|
const viewEndpoint = typertLocal.get("pentesterView/command");
|