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 CHANGED
@@ -1 +1 @@
1
- {"buildId":"2.0.0+c5466b6","version":"2.0.0","sha":"c5466b6"}
1
+ {"buildId":"2.2.0+478786d","version":"2.2.0","sha":"478786d"}
package/lib/client.js CHANGED
@@ -36,7 +36,6 @@ __export(plugin_exports, {
36
36
  getPentesterEndpointState: () => getPentesterEndpointState2,
37
37
  getRemoteMountError: () => getRemoteMountError,
38
38
  inject: () => inject,
39
- isBuildOk: () => isBuildOk,
40
39
  isRemoteMounted: () => isRemoteMounted,
41
40
  setPentesterEndpointState: () => setPentesterEndpointState
42
41
  });
@@ -14772,7 +14771,7 @@ function resetPentesterEndpointState() {
14772
14771
  pentesterEndpointState = "unknown";
14773
14772
  }
14774
14773
  }
14775
- function pentesterViewCommand(face, input2, timeoutMs = 1e4) {
14774
+ function pentesterViewCommand(face, input2, timeoutMs = 3e4) {
14776
14775
  if (face === void 0 || typeof face.command !== "function") {
14777
14776
  return Promise.resolve({ ok: false, error: "rpc_unavailable", code: "rpc_unavailable" });
14778
14777
  }
@@ -18245,18 +18244,17 @@ function PentesterView(props) {
18245
18244
  if (isPerf) console.log(`${RPC_PREFIX} circuit-open endpoint=missing reason=${reason}`);
18246
18245
  return;
18247
18246
  }
18248
- if (!isBuildOk()) {
18249
- const mismatch = getBuildMismatch();
18250
- if (mismatch !== null && reason === "startup") {
18251
- setDataState({
18252
- kind: "error",
18253
- error: `Pentester Host/Client build mismatch
18247
+ const mismatch = getBuildMismatch();
18248
+ if (mismatch !== null) {
18249
+ pollingPausedRef.current = true;
18250
+ setDataState({
18251
+ kind: "error",
18252
+ error: `Pentester Host/Client build mismatch
18254
18253
  Host: ${mismatch.host}
18255
18254
  Client: ${mismatch.client}`,
18256
- code: "build_mismatch"
18257
- });
18258
- setRequestState("idle");
18259
- }
18255
+ code: "build_mismatch"
18256
+ });
18257
+ setRequestState("idle");
18260
18258
  return;
18261
18259
  }
18262
18260
  if (pendingRef.current !== null) {
@@ -18282,7 +18280,7 @@ Client: ${mismatch.client}`,
18282
18280
  }
18283
18281
  }
18284
18282
  try {
18285
- const result = await pentesterCommand({ kind: "snapshot", sessionId }, 1e4);
18283
+ const result = await pentesterCommand({ kind: "snapshot", sessionId }, 3e4);
18286
18284
  if (pendingRef.current?.id !== id) {
18287
18285
  if (isPerf) console.log(`${RPC_PREFIX} id=${id} stale (current=${pendingRef.current?.id})`);
18288
18286
  return;
@@ -18721,7 +18719,7 @@ var en = {
18721
18719
  };
18722
18720
 
18723
18721
  // src/build-id.ts
18724
- var BUILD_ID = "2.0.0+c5466b6";
18722
+ var BUILD_ID = "2.2.0+478786d";
18725
18723
 
18726
18724
  // src/ui/client/plugin.tsx
18727
18725
  var SESSION_SWITCH_PERF = "[SESSION_SWITCH_PERF]";
@@ -18735,11 +18733,7 @@ function getPentesterEndpointState2() {
18735
18733
  function setPentesterEndpointState(state) {
18736
18734
  pentesterEndpointState2 = state;
18737
18735
  }
18738
- var buildOk = false;
18739
18736
  var buildMismatch = null;
18740
- function isBuildOk() {
18741
- return buildOk;
18742
- }
18743
18737
  function getBuildMismatch() {
18744
18738
  return buildMismatch;
18745
18739
  }
@@ -18787,17 +18781,16 @@ function apply(ctx) {
18787
18781
  const inner = result.value.value;
18788
18782
  if (inner?.ready === true && typeof inner.buildId === "string") {
18789
18783
  if (inner.buildId === BUILD_ID) {
18790
- buildOk = true;
18791
18784
  buildMismatch = null;
18792
18785
  console.log(`[dsh-pentester] health check passed host=${inner.buildId} client=${BUILD_ID}`);
18793
18786
  } else {
18794
- buildOk = false;
18795
18787
  buildMismatch = { host: inner.buildId, client: BUILD_ID };
18796
18788
  console.error(`[dsh-pentester] BUILD MISMATCH host=${inner.buildId} client=${BUILD_ID}`);
18797
18789
  }
18798
18790
  }
18799
18791
  }
18800
- } catch {
18792
+ } catch (error51) {
18793
+ console.warn("[dsh-pentester] build health check unavailable", error51);
18801
18794
  }
18802
18795
  })();
18803
18796
  }).catch((error51) => {