@aipanel/dsh-plugin 1.2.13 → 1.2.15

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -586,10 +586,15 @@ function thinkingOf(type) {
586
586
  }
587
587
  function setupEventRelay(ctx, config) {
588
588
  const vitePort = config.vitePort ?? 0;
589
+ const viteHost = config.viteHost;
589
590
  const token = config.eventsToken;
590
591
  if (!token || vitePort <= 0) return;
592
+ if (!viteHost) {
593
+ log3.error(`host event relay requires a concrete viteHost; relay disabled`, { viteHost });
594
+ return;
595
+ }
591
596
  const eventsPath = config.eventsPath ?? HOST_EVENTS_API_PATH;
592
- const eventsUrl = `http://127.0.0.1:${vitePort}${eventsPath}`;
597
+ const eventsUrl = `http://${viteHost}:${vitePort}${eventsPath}`;
593
598
  const states = /* @__PURE__ */ new Map();
594
599
  const lastSent = /* @__PURE__ */ new Map();
595
600
  const lastTitles = /* @__PURE__ */ new Map();
@@ -896,6 +901,7 @@ function apply(ctx, config = {}) {
896
901
  const enableDiagnostics = config.enableDiagnostics ?? false;
897
902
  const autoDiagnose = config.autoDiagnose ?? process.env[OPENCODE_ENV.ENABLE_LINT] === "1";
898
903
  const vitePort = config.vitePort ?? 0;
904
+ const viteHost = config.viteHost;
899
905
  const contextApiPath = config.contextApiPath ?? CONTEXT_API_PATH;
900
906
  const tools = ctx.tools;
901
907
  if (enableDiagnostics) {
@@ -1011,7 +1017,7 @@ ${diagText}` }]
1011
1017
  );
1012
1018
  }
1013
1019
  if (vitePort > 0) {
1014
- const contextBase = `http://127.0.0.1:${vitePort}${contextApiPath}`;
1020
+ const contextBase = `http://${viteHost}:${vitePort}${contextApiPath}`;
1015
1021
  ctx.on(
1016
1022
  "agent/pre-step",
1017
1023
  async ({ signal }, next) => {
@@ -1066,6 +1072,7 @@ ${contextText}`
1066
1072
  }
1067
1073
  setupEventRelay(ctx, {
1068
1074
  vitePort,
1075
+ viteHost,
1069
1076
  eventsPath: config.eventsPath,
1070
1077
  eventsToken: config.eventsToken
1071
1078
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipanel/dsh-plugin",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "type": "module",
5
5
  "description": "AIPanel for DeepSeek Harness (dsh):注入审查工具 run_diagnostics、编辑后自动诊断。",
6
6
  "main": "./dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "@deepseek-ai/dsh-user-questions": "^0.1.3-alpha.2",
26
26
  "@deepseek-ai/dsh-util-values": "^0.1.3-alpha.2",
27
27
  "esbuild": "^0.25.0",
28
- "@aipanel/core": "1.2.13"
28
+ "@aipanel/core": "1.2.15"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --format=esm --target=node18 --external:@deepseek-ai/* --external:node:* --external:vue-tsc",