openfox 1.6.53 → 1.6.55

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.
@@ -2,14 +2,14 @@ import {
2
2
  maybeAutoCompactContext,
3
3
  performManualContextCompaction,
4
4
  resolveCompactionStatsIdentity
5
- } from "./chunk-DAUVWS5W.js";
5
+ } from "./chunk-FQ6ZWZK3.js";
6
6
  import "./chunk-NBU6KIOD.js";
7
7
  import "./chunk-574HZVLE.js";
8
8
  import "./chunk-7JPKRM6M.js";
9
9
  import "./chunk-WNZIUQ2L.js";
10
10
  import "./chunk-UQGY56XJ.js";
11
11
  import "./chunk-LIMBYVO4.js";
12
- import "./chunk-5STJLSGO.js";
12
+ import "./chunk-KFBIHS3S.js";
13
13
  import "./chunk-22CTURMH.js";
14
14
  import "./chunk-GQZGIMJO.js";
15
15
  import "./chunk-BLNFJ22S.js";
@@ -23,4 +23,4 @@ export {
23
23
  performManualContextCompaction,
24
24
  resolveCompactionStatsIdentity
25
25
  };
26
- //# sourceMappingURL=auto-compaction-NVHM75BN.js.map
26
+ //# sourceMappingURL=auto-compaction-A46XMA7L.js.map
@@ -5,11 +5,11 @@ import {
5
5
  generateSessionName,
6
6
  getSessionMessageCount,
7
7
  needsNameGenerationCheck
8
- } from "./chunk-XRPGQKBM.js";
8
+ } from "./chunk-GIPCUPTT.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-4MSEK56X.js";
12
- import "./chunk-DAUVWS5W.js";
11
+ } from "./chunk-USACI2IB.js";
12
+ import "./chunk-FQ6ZWZK3.js";
13
13
  import "./chunk-NBU6KIOD.js";
14
14
  import "./chunk-574HZVLE.js";
15
15
  import "./chunk-7JPKRM6M.js";
@@ -22,7 +22,7 @@ import {
22
22
  createChatMessageMessage,
23
23
  createPhaseChangedMessage,
24
24
  createSessionRunningMessage
25
- } from "./chunk-5STJLSGO.js";
25
+ } from "./chunk-KFBIHS3S.js";
26
26
  import "./chunk-22CTURMH.js";
27
27
  import "./chunk-GQZGIMJO.js";
28
28
  import "./chunk-BLNFJ22S.js";
@@ -60,7 +60,7 @@ async function startChatSession(sessionId, content, deps, options) {
60
60
  sessionManager.setRunning(sessionId, true);
61
61
  broadcastForSession(sessionId, createSessionRunningMessage(true));
62
62
  try {
63
- const { maybeAutoCompactContext } = await import("./auto-compaction-NVHM75BN.js");
63
+ const { maybeAutoCompactContext } = await import("./auto-compaction-A46XMA7L.js");
64
64
  await maybeAutoCompactContext({
65
65
  sessionManager,
66
66
  sessionId,
@@ -169,4 +169,4 @@ export {
169
169
  startChatSession,
170
170
  stopSessionExecution
171
171
  };
172
- //# sourceMappingURL=chat-handler-DERM2S6L.js.map
172
+ //# sourceMappingURL=chat-handler-6PF6KWKZ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createVerifierNudgeConfig,
3
3
  runBuilderTurn,
4
4
  runChatTurn
5
- } from "./chunk-4MSEK56X.js";
5
+ } from "./chunk-USACI2IB.js";
6
6
  import {
7
7
  TurnMetrics,
8
8
  agentExists,
@@ -38,7 +38,7 @@ import {
38
38
  setSkillEnabled,
39
39
  skillExists,
40
40
  spawnShellProcess
41
- } from "./chunk-DAUVWS5W.js";
41
+ } from "./chunk-FQ6ZWZK3.js";
42
42
  import {
43
43
  getPathSeparator,
44
44
  getPlatformShell,
@@ -106,7 +106,7 @@ import {
106
106
  parseClientMessage,
107
107
  serializeServerMessage,
108
108
  storedEventToServerMessage
109
- } from "./chunk-5STJLSGO.js";
109
+ } from "./chunk-KFBIHS3S.js";
110
110
  import {
111
111
  EventEmitter,
112
112
  cancelQuestionsForSession,
@@ -5001,12 +5001,12 @@ function createDevServerRoutes() {
5001
5001
  router.post("/config", async (req, res) => {
5002
5002
  const workdir = req.query["workdir"];
5003
5003
  if (!workdir) return res.status(400).json({ error: "workdir required" });
5004
- const { command, url, hotReload } = req.body;
5004
+ const { command, url, hotReload, disableInspect } = req.body;
5005
5005
  if (!command || !url) {
5006
5006
  return res.status(400).json({ error: "command and url are required" });
5007
5007
  }
5008
5008
  try {
5009
- const config = { command, url, hotReload: hotReload ?? false };
5009
+ const config = { command, url, hotReload: hotReload ?? false, disableInspect: disableInspect ?? false };
5010
5010
  await devServerManager.saveConfig(workdir, config);
5011
5011
  res.json({ config });
5012
5012
  } catch (err) {
@@ -5058,7 +5058,7 @@ function createTerminalRoutes() {
5058
5058
  }
5059
5059
 
5060
5060
  // src/constants.ts
5061
- var VERSION = "1.6.53";
5061
+ var VERSION = "1.6.55";
5062
5062
 
5063
5063
  // src/server/index.ts
5064
5064
  var __dirname2 = dirname5(fileURLToPath4(import.meta.url));
@@ -5071,6 +5071,7 @@ async function createServerHandle(config) {
5071
5071
  const configDir = getGlobalConfigDir(config.mode ?? "production");
5072
5072
  const providerManager = createProviderManager(config);
5073
5073
  const sessionManager = new SessionManager(providerManager);
5074
+ devServerManager.setSessionManager(sessionManager);
5074
5075
  const useMock = process.env["OPENFOX_MOCK_LLM"] === "true";
5075
5076
  const getMockClient = useMock ? createMockLLMClient : null;
5076
5077
  const getLLMClient = () => getMockClient ? getMockClient() : providerManager.getLLMClient();
@@ -5360,14 +5361,14 @@ async function createServerHandle(config) {
5360
5361
  if (!callId || approved === void 0) {
5361
5362
  return res.status(400).json({ error: "callId and approved are required" });
5362
5363
  }
5363
- const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-SJN7IGVF.js");
5364
+ const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-KYVZUR7N.js");
5364
5365
  const result = providePathConfirmation2(callId, approved, alwaysAllow);
5365
5366
  if (!result.found) {
5366
5367
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
5367
5368
  }
5368
5369
  const { getEventStore: getEventStore2 } = await import("./events-UCHHTT6X.js");
5369
5370
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-NEZWWL7K.js");
5370
- const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-WHHYESPI.js");
5371
+ const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-5AWNGFLH.js");
5371
5372
  const eventStore = getEventStore2();
5372
5373
  const events = eventStore.getEvents(sessionId);
5373
5374
  const messages = buildMessagesFromStoredEvents2(events);
@@ -5385,7 +5386,7 @@ async function createServerHandle(config) {
5385
5386
  if (!callId || !answer) {
5386
5387
  return res.status(400).json({ error: "callId and answer are required" });
5387
5388
  }
5388
- const { provideAnswer: provideAnswer2 } = await import("./tools-SJN7IGVF.js");
5389
+ const { provideAnswer: provideAnswer2 } = await import("./tools-KYVZUR7N.js");
5389
5390
  const found = provideAnswer2(callId, answer);
5390
5391
  if (!found) {
5391
5392
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -5421,8 +5422,8 @@ async function createServerHandle(config) {
5421
5422
  if (!session) {
5422
5423
  return res.status(404).json({ error: "Session not found" });
5423
5424
  }
5424
- const { stopSessionExecution } = await import("./chat-handler-DERM2S6L.js");
5425
- const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-SJN7IGVF.js");
5425
+ const { stopSessionExecution } = await import("./chat-handler-6PF6KWKZ.js");
5426
+ const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-KYVZUR7N.js");
5426
5427
  stopSessionExecution(sessionId, sessionManager);
5427
5428
  abortSession(sessionId);
5428
5429
  cancelQuestionsForSession2(sessionId, "Session stopped by user");
@@ -5881,7 +5882,7 @@ async function createServerHandle(config) {
5881
5882
  providerManager
5882
5883
  );
5883
5884
  const wss = wssExports.wss;
5884
- const { QueueProcessor } = await import("./processor-AS6JXF4U.js");
5885
+ const { QueueProcessor } = await import("./processor-RR7AR2S5.js");
5885
5886
  const queueProcessor = new QueueProcessor({
5886
5887
  sessionManager,
5887
5888
  providerManager,
@@ -5954,4 +5955,4 @@ export {
5954
5955
  createServerHandle,
5955
5956
  createServer
5956
5957
  };
5957
- //# sourceMappingURL=chunk-JLMCJLTK.js.map
5958
+ //# sourceMappingURL=chunk-B6FQAD6K.js.map
@@ -33,7 +33,7 @@ import {
33
33
  createChatToolOutputMessage,
34
34
  createChatVisionFallbackMessage,
35
35
  createQueueStateMessage
36
- } from "./chunk-5STJLSGO.js";
36
+ } from "./chunk-KFBIHS3S.js";
37
37
  import {
38
38
  AskUserInterrupt,
39
39
  askUserTool
@@ -1258,6 +1258,9 @@ function extractAbsolutePathsFromCommand(command) {
1258
1258
  const paths = [];
1259
1259
  const home = homedir();
1260
1260
  let sanitized = command.replace(/https?:\/\/[^\s'"]+/g, " __URL__ ").replace(/ftp:\/\/[^\s'"]+/g, " __URL__ ");
1261
+ sanitized = sanitized.replace(/s\/[^\/]*\/[^\/]*\/[gip]*/g, " __SED__ ");
1262
+ sanitized = sanitized.replace(/s\|[^|]*\|[^|]*\|[gip]*/g, " __SED__ ");
1263
+ sanitized = sanitized.replace(/s:[^:]*:[^:]*:[gip]*/g, " __SED__ ");
1261
1264
  const fileUrlMatches = command.matchAll(/file:\/\/([^\s'"]+)/g);
1262
1265
  for (const match2 of fileUrlMatches) {
1263
1266
  const filePath = match2[1];
@@ -3377,7 +3380,7 @@ var callSubAgentTool = {
3377
3380
  };
3378
3381
  }
3379
3382
  try {
3380
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-SJN7IGVF.js");
3383
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-KYVZUR7N.js");
3381
3384
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3382
3385
  const turnMetrics = new TurnMetrics();
3383
3386
  const result = await executeSubAgent({
@@ -3634,6 +3637,154 @@ var webFetchTool = createTool(
3634
3637
  import { spawn as spawn4 } from "child_process";
3635
3638
  import { readFile as readFile7, writeFile as writeFile5, mkdir as mkdir4 } from "fs/promises";
3636
3639
  import { resolve as resolve5, join as join6 } from "path";
3640
+
3641
+ // src/server/dev-server/inspect-proxy.ts
3642
+ import httpProxy from "http-proxy";
3643
+ import { createServer as createHttpServer } from "http";
3644
+ var proxyCache = /* @__PURE__ */ new Map();
3645
+ function getProxy(target) {
3646
+ if (!proxyCache.has(target)) {
3647
+ const proxy = httpProxy.createProxyServer({
3648
+ changeOrigin: true,
3649
+ selfHandleResponse: true
3650
+ });
3651
+ proxy.on("error", (err, _req, res) => {
3652
+ if (res && !res.writableEnded) {
3653
+ res.writeHead(502, { "content-type": "text/plain" });
3654
+ res.end("Proxy error: " + err.message);
3655
+ }
3656
+ });
3657
+ proxyCache.set(target, proxy);
3658
+ }
3659
+ return proxyCache.get(target);
3660
+ }
3661
+ var proxyPool = /* @__PURE__ */ new Map();
3662
+ var nextOffset = 0;
3663
+ function getAvailablePort() {
3664
+ const base = Number(process.env["OPENFOX_BASE_PROXY_PORT"] ?? 1e4);
3665
+ const used = /* @__PURE__ */ new Set();
3666
+ for (const instance of proxyPool.values()) {
3667
+ const addr = instance.server.address();
3668
+ if (addr && typeof addr === "object") used.add(addr.port);
3669
+ }
3670
+ for (let port = base + 1; port < base + 200; port++) {
3671
+ if (!used.has(port)) return port;
3672
+ }
3673
+ return base + (nextOffset++ % 200 + 1);
3674
+ }
3675
+ function startInspectProxy(target, sessionManager) {
3676
+ const port = getAvailablePort();
3677
+ const proxy = getProxy(target);
3678
+ const server = createHttpServer();
3679
+ server.on("request", (req, res) => {
3680
+ if (req.url === "/__openfox_feedback" && req.method === "POST") {
3681
+ let body = "";
3682
+ req.on("data", (chunk) => {
3683
+ body += chunk;
3684
+ });
3685
+ req.on("end", () => {
3686
+ try {
3687
+ const { sessionId, element, annotation, pageUrl } = JSON.parse(body);
3688
+ if (!sessionId) {
3689
+ res.writeHead(400, { "content-type": "application/json" });
3690
+ res.end(JSON.stringify({ error: "sessionId required" }));
3691
+ return;
3692
+ }
3693
+ const elementDesc = element ? `${element.tag}${element.id ? "#" + element.id : ""}` : "unknown";
3694
+ const htmlSnippet = element?.outerHTML ? `
3695
+ Html: ${element.outerHTML.slice(0, 300)}` : "";
3696
+ const content = `# User feedback from page inspection on dev_server
3697
+
3698
+ ## Context
3699
+
3700
+ Page: ${pageUrl || ""}
3701
+ Element: ${elementDesc}
3702
+ xPath: ${element?.xpath || ""}${htmlSnippet}
3703
+
3704
+ ## Feedback
3705
+
3706
+ ${annotation || "(none)"}`;
3707
+ sessionManager.queueMessage(sessionId, "asap", content, [], "ui_feedback");
3708
+ res.writeHead(200, { "content-type": "application/json" });
3709
+ res.end(JSON.stringify({ success: true }));
3710
+ } catch (err) {
3711
+ res.writeHead(400, { "content-type": "application/json" });
3712
+ res.end(JSON.stringify({ error: err instanceof Error ? err.message : "Invalid request" }));
3713
+ }
3714
+ });
3715
+ return;
3716
+ }
3717
+ if (req.url === "/__inspect__.js") {
3718
+ import("fs/promises").then(async ({ readFile: readFile8 }) => {
3719
+ const dir = import.meta.dirname ?? __dirname;
3720
+ const devPath = `${dir}/../public/__inspect__.js`;
3721
+ const prodPath = `${dir}/server/public/__inspect__.js`;
3722
+ try {
3723
+ const content = await readFile8(devPath, "utf-8");
3724
+ res.writeHead(200, { "Content-Type": "application/javascript" });
3725
+ res.end(content);
3726
+ } catch {
3727
+ try {
3728
+ const content = await readFile8(prodPath, "utf-8");
3729
+ res.writeHead(200, { "Content-Type": "application/javascript" });
3730
+ res.end(content);
3731
+ } catch {
3732
+ res.writeHead(404);
3733
+ res.end("Not found");
3734
+ }
3735
+ }
3736
+ });
3737
+ return;
3738
+ }
3739
+ ;
3740
+ proxy.web(req, res, { target }, (err) => {
3741
+ if (err && !res.headersSent) {
3742
+ res.writeHead(502, { "content-type": "text/plain" });
3743
+ res.end("Proxy error: " + err.message);
3744
+ }
3745
+ });
3746
+ proxy.on("proxyRes", (proxyRes) => {
3747
+ const contentType = proxyRes.headers?.["content-type"] ?? "";
3748
+ const isHtml = contentType.includes("text/html") || contentType.includes("application/xhtml+xml");
3749
+ if (!isHtml) {
3750
+ if (res.headersSent) return;
3751
+ res.writeHead(proxyRes.statusCode ?? 200, proxyRes.headers);
3752
+ proxyRes.pipe(res);
3753
+ return;
3754
+ }
3755
+ const chunks = [];
3756
+ proxyRes.on("data", (chunk) => chunks.push(chunk));
3757
+ proxyRes.on("end", () => {
3758
+ try {
3759
+ const html = Buffer.concat(chunks).toString("utf8");
3760
+ const snippet = `<script src="/__inspect__.js"></script>`;
3761
+ const injected = html.replace("</head>", snippet + "</head>");
3762
+ res.writeHead(proxyRes.statusCode ?? 200, {
3763
+ ...proxyRes.headers,
3764
+ "content-type": "text/html; charset=utf-8"
3765
+ });
3766
+ res.end(injected);
3767
+ } catch {
3768
+ res.writeHead(500, { "content-type": "text/plain" });
3769
+ res.end("Failed to process response");
3770
+ }
3771
+ });
3772
+ });
3773
+ });
3774
+ server.listen(port, "0.0.0.0", () => {
3775
+ logger.debug("Inspect proxy listening", { port, target });
3776
+ });
3777
+ proxyPool.set(target, { server, target });
3778
+ const cleanup = () => {
3779
+ server.close();
3780
+ proxyCache.delete(target);
3781
+ proxyPool.delete(target);
3782
+ logger.debug("Inspect proxy stopped", { port, target });
3783
+ };
3784
+ return { port, cleanup };
3785
+ }
3786
+
3787
+ // src/server/dev-server/manager.ts
3637
3788
  var MAX_LOG_LINES = 2e3;
3638
3789
  var MAX_LOG_BYTES = 1e5;
3639
3790
  var CONFIG_PATH = ".openfox/dev.json";
@@ -3656,13 +3807,19 @@ function createInstance() {
3656
3807
  logs: [],
3657
3808
  totalLogBytes: 0,
3658
3809
  errorMessage: void 0,
3659
- exited: true
3810
+ exited: true,
3811
+ inspectProxyPort: null,
3812
+ proxyCleanup: null
3660
3813
  };
3661
3814
  }
3662
3815
  var DevServerManager = class {
3663
3816
  instances = /* @__PURE__ */ new Map();
3664
3817
  outputListeners = /* @__PURE__ */ new Set();
3665
3818
  stateListeners = /* @__PURE__ */ new Set();
3819
+ _sessionManager = null;
3820
+ setSessionManager(sm) {
3821
+ this._sessionManager = sm;
3822
+ }
3666
3823
  resolveWorkdir(workdir) {
3667
3824
  return resolve5(workdir);
3668
3825
  }
@@ -3696,7 +3853,8 @@ var DevServerManager = class {
3696
3853
  return {
3697
3854
  command: parsed.command,
3698
3855
  url: parsed.url,
3699
- hotReload: parsed.hotReload ?? false
3856
+ hotReload: parsed.hotReload ?? false,
3857
+ disableInspect: parsed.disableInspect ?? false
3700
3858
  };
3701
3859
  } catch {
3702
3860
  return null;
@@ -3723,6 +3881,16 @@ var DevServerManager = class {
3723
3881
  instance.totalLogBytes = 0;
3724
3882
  instance.errorMessage = void 0;
3725
3883
  instance.exited = false;
3884
+ if (!config.disableInspect && config.url && this._sessionManager) {
3885
+ try {
3886
+ const { port, cleanup } = startInspectProxy(config.url, this._sessionManager);
3887
+ instance.inspectProxyPort = port;
3888
+ instance.proxyCleanup = cleanup;
3889
+ logger.debug("Inspect proxy started", { workdir, port, target: config.url });
3890
+ } catch (err) {
3891
+ logger.warn("Failed to start inspect proxy", { workdir, error: err });
3892
+ }
3893
+ }
3726
3894
  const resolved = this.resolveWorkdir(workdir);
3727
3895
  const shell = getPlatformShell();
3728
3896
  const proc = spawn4(shell.command, [...shell.args, config.command], {
@@ -3796,6 +3964,11 @@ ${recentLogs}`.trim();
3796
3964
  this.emitStateChange(workdir, "off", void 0);
3797
3965
  logger.info("Dev server stopped", { workdir });
3798
3966
  }
3967
+ if (instance.proxyCleanup) {
3968
+ instance.proxyCleanup();
3969
+ instance.proxyCleanup = null;
3970
+ instance.inspectProxyPort = null;
3971
+ }
3799
3972
  return this.getStatus(workdir);
3800
3973
  }
3801
3974
  async restart(workdir) {
@@ -3809,7 +3982,8 @@ ${recentLogs}`.trim();
3809
3982
  url: instance.config?.url ?? null,
3810
3983
  hotReload: instance.config?.hotReload ?? false,
3811
3984
  config: instance.config,
3812
- errorMessage: instance.errorMessage
3985
+ errorMessage: instance.errorMessage,
3986
+ inspectProxyPort: instance.inspectProxyPort
3813
3987
  };
3814
3988
  }
3815
3989
  getLogs(workdir) {
@@ -4084,12 +4258,12 @@ These processes run independently of agent turns and persist across session comp
4084
4258
  }
4085
4259
  const since = args.since ?? 0;
4086
4260
  const maxLines = Math.min(args.maxLines ?? 500, 2e3);
4087
- const { lines, totalLines, nextOffset, hasMore } = getProcessLogs(args.processId, since, maxLines);
4261
+ const { lines, totalLines, nextOffset: nextOffset2, hasMore } = getProcessLogs(args.processId, since, maxLines);
4088
4262
  return helpers.success(JSON.stringify({
4089
4263
  processId: args.processId,
4090
4264
  lines,
4091
4265
  totalLines,
4092
- nextOffset,
4266
+ nextOffset: nextOffset2,
4093
4267
  hasMore,
4094
4268
  truncated: hasMore
4095
4269
  }, null, 2));
@@ -4368,7 +4542,8 @@ async function performContextCompaction(options) {
4368
4542
  toolChoice: "none",
4369
4543
  disableThinking: true,
4370
4544
  ...instructions ? { customInstructions: instructions } : {},
4371
- ...skills.length > 0 ? { skills } : {}
4545
+ ...skills.length > 0 ? { skills } : {},
4546
+ modelName: options.llmClient.getModel()
4372
4547
  });
4373
4548
  const compactionReminder = `<system-reminder>
4374
4549
  ${COMPACTION_PROMPT}
@@ -4504,4 +4679,4 @@ export {
4504
4679
  getToolRegistryForAgent,
4505
4680
  createToolRegistry
4506
4681
  };
4507
- //# sourceMappingURL=chunk-DAUVWS5W.js.map
4682
+ //# sourceMappingURL=chunk-FQ6ZWZK3.js.map
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  createContextStateMessage,
11
11
  createSessionStateMessage
12
- } from "./chunk-5STJLSGO.js";
12
+ } from "./chunk-KFBIHS3S.js";
13
13
  import {
14
14
  logger
15
15
  } from "./chunk-PNBH3RAX.js";
@@ -143,4 +143,4 @@ export {
143
143
  needsNameGenerationCheck,
144
144
  applyGeneratedSessionName
145
145
  };
146
- //# sourceMappingURL=chunk-XRPGQKBM.js.map
146
+ //# sourceMappingURL=chunk-GIPCUPTT.js.map
@@ -141,6 +141,9 @@ function isPathConfirmPayload(payload) {
141
141
  function isAskAnswerPayload(payload) {
142
142
  return typeof payload === "object" && payload !== null && "callId" in payload && "answer" in payload;
143
143
  }
144
+ function isUIFeedbackPayload(payload) {
145
+ return typeof payload === "object" && payload !== null && "sessionId" in payload && typeof payload.sessionId === "string" && "element" in payload && typeof payload === "object" && "annotation" in payload && typeof payload.annotation === "string" && "pageUrl" in payload && typeof payload.pageUrl === "string";
146
+ }
144
147
  function createQueueStateMessage(messages) {
145
148
  return createServerMessage("queue.state", { messages });
146
149
  }
@@ -306,7 +309,8 @@ export {
306
309
  isSessionLoadPayload,
307
310
  isPathConfirmPayload,
308
311
  isAskAnswerPayload,
312
+ isUIFeedbackPayload,
309
313
  createQueueStateMessage,
310
314
  storedEventToServerMessage
311
315
  };
312
- //# sourceMappingURL=chunk-5STJLSGO.js.map
316
+ //# sourceMappingURL=chunk-KFBIHS3S.js.map
@@ -13,7 +13,7 @@ import {
13
13
  getToolRegistryForAgent,
14
14
  loadAllAgentsDefault,
15
15
  runTopLevelAgentLoop
16
- } from "./chunk-DAUVWS5W.js";
16
+ } from "./chunk-FQ6ZWZK3.js";
17
17
  import {
18
18
  getCurrentContextWindowId,
19
19
  getEventStore
@@ -293,4 +293,4 @@ export {
293
293
  runBuilderTurn,
294
294
  runVerifierTurn
295
295
  };
296
- //# sourceMappingURL=chunk-4MSEK56X.js.map
296
+ //# sourceMappingURL=chunk-USACI2IB.js.map
@@ -179,7 +179,7 @@ async function runCli(options) {
179
179
  if (!configExists) {
180
180
  await runNetworkSetup(mode);
181
181
  }
182
- const { runServe } = await import("./serve-W3EZMXAC.js");
182
+ const { runServe } = await import("./serve-KE4JZBUO.js");
183
183
  await runServe({
184
184
  mode,
185
185
  port: values.port ? parseInt(values.port) : void 0,
@@ -192,4 +192,4 @@ async function runCli(options) {
192
192
  export {
193
193
  runCli
194
194
  };
195
- //# sourceMappingURL=chunk-AFIVZZJN.js.map
195
+ //# sourceMappingURL=chunk-UXETEQJA.js.map
package/dist/cli/dev.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-AFIVZZJN.js";
4
+ } from "../chunk-UXETEQJA.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-AFIVZZJN.js";
4
+ } from "../chunk-UXETEQJA.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
@@ -3,7 +3,7 @@ import {
3
3
  runBuilderTurn,
4
4
  runChatTurn,
5
5
  runVerifierTurn
6
- } from "./chunk-4MSEK56X.js";
6
+ } from "./chunk-USACI2IB.js";
7
7
  import {
8
8
  TurnMetrics,
9
9
  createChatDoneEvent,
@@ -11,14 +11,14 @@ import {
11
11
  createMessageStartEvent,
12
12
  createToolCallEvent,
13
13
  createToolResultEvent
14
- } from "./chunk-DAUVWS5W.js";
14
+ } from "./chunk-FQ6ZWZK3.js";
15
15
  import "./chunk-NBU6KIOD.js";
16
16
  import "./chunk-574HZVLE.js";
17
17
  import "./chunk-7JPKRM6M.js";
18
18
  import "./chunk-WNZIUQ2L.js";
19
19
  import "./chunk-UQGY56XJ.js";
20
20
  import "./chunk-LIMBYVO4.js";
21
- import "./chunk-5STJLSGO.js";
21
+ import "./chunk-KFBIHS3S.js";
22
22
  import "./chunk-22CTURMH.js";
23
23
  import "./chunk-GQZGIMJO.js";
24
24
  import "./chunk-BLNFJ22S.js";
@@ -39,4 +39,4 @@ export {
39
39
  runChatTurn,
40
40
  runVerifierTurn
41
41
  };
42
- //# sourceMappingURL=orchestrator-FX6SZX4J.js.map
42
+ //# sourceMappingURL=orchestrator-FM5SMFJG.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.53",
3
+ "version": "1.6.55",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,7 +27,7 @@
27
27
  "dev": "OPENFOX_DEV=true tsx watch src/cli/dev.ts --no-browser",
28
28
  "dev:web": "vite --config web/vite.config.ts",
29
29
  "build": "FORCE_COLOR=1 npm run build:server && FORCE_COLOR=1 npm run build:web",
30
- "build:server": "FORCE_COLOR=1 tsup && mkdir -p dist/command-defaults dist/skill-defaults dist/agent-defaults dist/workflow-defaults && cp src/server/commands/defaults/*.md dist/command-defaults/ && cp src/server/skills/defaults/*.md dist/skill-defaults/ && cp src/server/agents/defaults/*.md dist/agent-defaults/ && cp src/server/workflows/defaults/*.json dist/workflow-defaults/ && cp src/cli/update.sh dist/cli/ && chmod +x dist/cli/update.sh && cp package.json dist/",
30
+ "build:server": "FORCE_COLOR=1 tsup && mkdir -p dist/command-defaults dist/skill-defaults dist/agent-defaults dist/workflow-defaults && cp src/server/commands/defaults/*.md dist/command-defaults/ && cp src/server/skills/defaults/*.md dist/skill-defaults/ && cp src/server/agents/defaults/*.md dist/agent-defaults/ && cp src/server/workflows/defaults/*.json dist/workflow-defaults/ && cp src/cli/update.sh dist/cli/ && chmod +x dist/cli/update.sh && cp package.json dist/ && cp -r src/server/public dist/server/",
31
31
  "build:web": "cd web && FORCE_COLOR=1 vite build --outDir ../dist/web",
32
32
  "start": "node dist/cli/index.js",
33
33
  "start:dev": "node dist/cli/dev.js",
@@ -59,6 +59,8 @@
59
59
  "dependencies": {
60
60
  "@clack/prompts": "^1.1.0",
61
61
  "@fontsource/jetbrains-mono": "^5.2.8",
62
+ "@xterm/addon-fit": "^0.11.0",
63
+ "@xterm/xterm": "^6.0.0",
62
64
  "bash-language-server": "^5.4.2",
63
65
  "better-sqlite3": "^12.8.0",
64
66
  "cors": "^2.8.5",
@@ -66,6 +68,7 @@
66
68
  "fast-glob": "^3.3.3",
67
69
  "gray-matter": "^4.0.3",
68
70
  "html2canvas": "^1.4.1",
71
+ "http-proxy": "^1.18.1",
69
72
  "ignore": "^7.0.5",
70
73
  "node-pty": "^1.2.0-beta.12",
71
74
  "open": "^11.0.0",
@@ -96,6 +99,7 @@
96
99
  "@testing-library/react": "^16.3.2",
97
100
  "@testing-library/user-event": "^14.6.1",
98
101
  "@types/better-sqlite3": "^7.6.13",
102
+ "@types/http-proxy": "^1.17.17",
99
103
  "@types/node": "^22.19.15",
100
104
  "@types/react": "^19.0.8",
101
105
  "@types/react-dom": "^19.0.3",
@@ -5,7 +5,7 @@ import {
5
5
  generateSessionName,
6
6
  getSessionMessageCount,
7
7
  needsNameGenerationCheck
8
- } from "./chunk-XRPGQKBM.js";
8
+ } from "./chunk-GIPCUPTT.js";
9
9
  import {
10
10
  getEventStore
11
11
  } from "./chunk-UQGY56XJ.js";
@@ -13,7 +13,7 @@ import "./chunk-LIMBYVO4.js";
13
13
  import {
14
14
  createChatMessageMessage,
15
15
  createSessionRunningMessage
16
- } from "./chunk-5STJLSGO.js";
16
+ } from "./chunk-KFBIHS3S.js";
17
17
  import "./chunk-BLNFJ22S.js";
18
18
  import "./chunk-CTAIXOZJ.js";
19
19
  import "./chunk-TVQOONDR.js";
@@ -173,7 +173,7 @@ var QueueProcessor = class {
173
173
  backend: provider?.backend ?? llmClient.getBackend(),
174
174
  model: llmClient.getModel()
175
175
  };
176
- const { runChatTurn } = await import("./orchestrator-FX6SZX4J.js");
176
+ const { runChatTurn } = await import("./orchestrator-FM5SMFJG.js");
177
177
  const runChatTurnParams = buildRunChatTurnParams({
178
178
  sessionManager,
179
179
  sessionId,
@@ -206,4 +206,4 @@ var QueueProcessor = class {
206
206
  export {
207
207
  QueueProcessor
208
208
  };
209
- //# sourceMappingURL=processor-AS6JXF4U.js.map
209
+ //# sourceMappingURL=processor-RR7AR2S5.js.map
@@ -31,10 +31,11 @@ import {
31
31
  isAskAnswerPayload,
32
32
  isPathConfirmPayload,
33
33
  isSessionLoadPayload,
34
+ isUIFeedbackPayload,
34
35
  parseClientMessage,
35
36
  serializeServerMessage,
36
37
  storedEventToServerMessage
37
- } from "./chunk-5STJLSGO.js";
38
+ } from "./chunk-KFBIHS3S.js";
38
39
  import "./chunk-CTAIXOZJ.js";
39
40
  export {
40
41
  createChatAskUserMessage,
@@ -69,8 +70,9 @@ export {
69
70
  isAskAnswerPayload,
70
71
  isPathConfirmPayload,
71
72
  isSessionLoadPayload,
73
+ isUIFeedbackPayload,
72
74
  parseClientMessage,
73
75
  serializeServerMessage,
74
76
  storedEventToServerMessage
75
77
  };
76
- //# sourceMappingURL=protocol-WHHYESPI.js.map
78
+ //# sourceMappingURL=protocol-5AWNGFLH.js.map