openfox 1.6.14 → 1.6.16

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 (39) hide show
  1. package/dist/{auto-compaction-C4PMBB24.js → auto-compaction-2RKC6DC2.js} +5 -5
  2. package/dist/{chat-handler-US3QOOE4.js → chat-handler-IY2XVOO6.js} +26 -56
  3. package/dist/{chunk-7HLRI6JM.js → chunk-2KP34IDL.js} +161 -204
  4. package/dist/{chunk-N25QUEPO.js → chunk-4OI4VPZ6.js} +434 -812
  5. package/dist/{chunk-XFXOSPYH.js → chunk-55N6FAAZ.js} +1 -1
  6. package/dist/{chunk-5GE3QJSZ.js → chunk-6L3X7T4K.js} +82 -160
  7. package/dist/{chunk-QDEKU5RL.js → chunk-F54ZJN4X.js} +38 -2
  8. package/dist/{chunk-UL4JYQKK.js → chunk-IN5EP4ZB.js} +2 -2
  9. package/dist/{chunk-OOIRCXAY.js → chunk-KOUMYBYM.js} +53 -112
  10. package/dist/{chunk-3JU6H6A4.js → chunk-NN65D5SI.js} +426 -448
  11. package/dist/{chunk-3XZ23PXM.js → chunk-OVLFEBRR.js} +76 -92
  12. package/dist/chunk-SN7OBEVL.js +44 -0
  13. package/dist/{chunk-PCOG5FQD.js → chunk-T5PBG2PE.js} +6 -6
  14. package/dist/{chunk-H22VHHQ4.js → chunk-U54QVKL2.js} +4 -4
  15. package/dist/{chunk-J2DHVXRX.js → chunk-ZDNXCVW4.js} +2 -2
  16. package/dist/cli/dev.js +1 -1
  17. package/dist/cli/index.js +1 -1
  18. package/dist/{config-DEM6ASQM.js → config-67AX6CNS.js} +5 -5
  19. package/dist/{events-VDAC7E7K.js → events-2ETDOE5B.js} +3 -3
  20. package/dist/{folding-NDFQCISZ.js → folding-M7FMUBOL.js} +6 -4
  21. package/dist/{orchestrator-KZI7B5IS.js → orchestrator-U5VCLBYQ.js} +6 -6
  22. package/dist/package.json +13 -3
  23. package/dist/{processor-KBSF2HFD.js → processor-VUEJM73B.js} +24 -49
  24. package/dist/{provider-K3PHZO27.js → provider-DKGBQHUS.js} +7 -7
  25. package/dist/{serve-DERN4AB6.js → serve-GOLQMQFA.js} +12 -12
  26. package/dist/server/index.d.ts +2 -0
  27. package/dist/server/index.js +10 -10
  28. package/dist/{tools-PLVK22CF.js → tools-55YICCVH.js} +5 -5
  29. package/dist/{vision-fallback-NOC3YYIB.js → vision-fallback-ADYRFFD4.js} +2 -2
  30. package/dist/web/assets/index-CZBXRYpK.js +150 -0
  31. package/dist/web/assets/{index-MCWDS5UQ.css → index-D4V7Gtvt.css} +1 -1
  32. package/dist/web/index.html +2 -2
  33. package/dist/web/sw.js +1 -1
  34. package/package.json +13 -3
  35. package/dist/web/assets/index-Ccy2Csbl.js +0 -150
  36. /package/dist/{command-defaults → server/commands/defaults}/commit-push.command.md +0 -0
  37. /package/dist/{command-defaults → server/commands/defaults}/init.command.md +0 -0
  38. /package/dist/{command-defaults → server/commands/defaults}/test-ui.command.md +0 -0
  39. /package/dist/{skill-defaults → server/skills/defaults}/browser.skill.md +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  describeImageFromDataUrl,
3
3
  ensureVisionFallbackConfigLoaded
4
- } from "./chunk-UL4JYQKK.js";
4
+ } from "./chunk-IN5EP4ZB.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-PNBH3RAX.js";
@@ -493,6 +493,37 @@ function getModelProfile(modelName) {
493
493
  }
494
494
 
495
495
  // src/server/llm/client-pure.ts
496
+ function buildAttachmentContent(msgContent, attachments, modelSupportsVision) {
497
+ const content = [];
498
+ if (msgContent?.trim()) {
499
+ content.push({ type: "text", text: msgContent });
500
+ }
501
+ for (const attachment of attachments) {
502
+ content.push(convertAttachmentSync(attachment, modelSupportsVision));
503
+ }
504
+ return content;
505
+ }
506
+ async function convertMessagesWithOptions(messages, profile, visionFallbackEnabled, signal, onVisionFallbackStart, onVisionFallbackDone) {
507
+ const modelSupportsVision = profile.supportsVision ?? false;
508
+ const options = {
509
+ modelSupportsVision,
510
+ visionFallbackEnabled,
511
+ signal,
512
+ onVisionFallbackStart,
513
+ onVisionFallbackDone
514
+ };
515
+ return needsVisionFallback(messages, modelSupportsVision, visionFallbackEnabled) ? await convertMessagesWithFallback(messages, options) : convertMessages(messages, { modelSupportsVision, visionFallbackEnabled: false });
516
+ }
517
+ function convertToolCalls(toolCalls) {
518
+ return toolCalls.map((toolCall) => ({
519
+ id: toolCall.id,
520
+ type: "function",
521
+ function: {
522
+ name: toolCall.name,
523
+ arguments: JSON.stringify(toolCall.arguments)
524
+ }
525
+ }));
526
+ }
496
527
  function convertAttachmentSync(attachment, modelSupportsVision) {
497
528
  if (modelSupportsVision) {
498
529
  return {
@@ -505,6 +536,13 @@ function convertAttachmentSync(attachment, modelSupportsVision) {
505
536
  text: `[Image: ${attachment.filename || "image"}] (vision not supported, cannot describe)`
506
537
  };
507
538
  }
539
+ function createAttachmentForConversion(data, filename, id) {
540
+ return {
541
+ data,
542
+ ...filename !== void 0 && { filename },
543
+ ...id !== void 0 && { id }
544
+ };
545
+ }
508
546
  async function convertAttachmentWithFallback(attachment, options) {
509
547
  logger.debug("[VisionFallback] convertAttachmentWithFallback called", { filename: attachment.filename, id: attachment.id, hasCallbacks: !!options.onVisionFallbackStart });
510
548
  if (options.modelSupportsVision) {
@@ -534,6 +572,20 @@ async function convertAttachmentWithFallback(attachment, options) {
534
572
  text: `[Image: ${attachment.filename || "image"}] ${description}`
535
573
  };
536
574
  }
575
+ async function buildAttachmentContentWithFallback(msgContent, attachments, options) {
576
+ const content = [];
577
+ if (msgContent?.trim()) {
578
+ content.push({ type: "text", text: msgContent });
579
+ }
580
+ for (const attachment of attachments) {
581
+ const convertedContent = await convertAttachmentWithFallback(
582
+ createAttachmentForConversion(attachment.data, attachment.filename, attachment.id),
583
+ options
584
+ );
585
+ content.push(convertedContent);
586
+ }
587
+ return content;
588
+ }
537
589
  function convertMessages(messages, options) {
538
590
  const filtered = messages.filter((msg) => {
539
591
  return !(msg.role === "assistant" && !msg.content?.trim() && (!msg.toolCalls || msg.toolCalls.length === 0));
@@ -541,13 +593,7 @@ function convertMessages(messages, options) {
541
593
  return filtered.map((msg) => {
542
594
  if (msg.role === "tool") {
543
595
  if (msg.attachments && msg.attachments.length > 0) {
544
- const content = [];
545
- if (msg.content?.trim()) {
546
- content.push({ type: "text", text: msg.content });
547
- }
548
- for (const attachment of msg.attachments) {
549
- content.push(convertAttachmentSync(attachment, options.modelSupportsVision));
550
- }
596
+ const content = buildAttachmentContent(msg.content, msg.attachments, options.modelSupportsVision);
551
597
  return {
552
598
  role: "tool",
553
599
  content,
@@ -564,24 +610,11 @@ function convertMessages(messages, options) {
564
610
  return {
565
611
  role: "assistant",
566
612
  content: msg.content || null,
567
- tool_calls: msg.toolCalls.map((toolCall) => ({
568
- id: toolCall.id,
569
- type: "function",
570
- function: {
571
- name: toolCall.name,
572
- arguments: JSON.stringify(toolCall.arguments)
573
- }
574
- }))
613
+ tool_calls: convertToolCalls(msg.toolCalls)
575
614
  };
576
615
  }
577
616
  if (msg.role === "user" && msg.attachments && msg.attachments.length > 0) {
578
- const content = [];
579
- if (msg.content?.trim()) {
580
- content.push({ type: "text", text: msg.content });
581
- }
582
- for (const attachment of msg.attachments) {
583
- content.push(convertAttachmentSync(attachment, options.modelSupportsVision));
584
- }
617
+ const content = buildAttachmentContent(msg.content, msg.attachments, options.modelSupportsVision);
585
618
  return {
586
619
  role: "user",
587
620
  content
@@ -602,17 +635,7 @@ async function convertMessagesWithFallback(messages, options) {
602
635
  for (const msg of filtered) {
603
636
  if (msg.role === "tool") {
604
637
  if (msg.attachments && msg.attachments.length > 0) {
605
- const content = [];
606
- if (msg.content?.trim()) {
607
- content.push({ type: "text", text: msg.content });
608
- }
609
- for (const attachment of msg.attachments) {
610
- const convertedContent = await convertAttachmentWithFallback(
611
- { data: attachment.data, filename: attachment.filename, id: attachment.id },
612
- options
613
- );
614
- content.push(convertedContent);
615
- }
638
+ const content = await buildAttachmentContentWithFallback(msg.content, msg.attachments, options);
616
639
  converted.push({
617
640
  role: "tool",
618
641
  content,
@@ -631,29 +654,12 @@ async function convertMessagesWithFallback(messages, options) {
631
654
  converted.push({
632
655
  role: "assistant",
633
656
  content: msg.content || null,
634
- tool_calls: msg.toolCalls.map((toolCall) => ({
635
- id: toolCall.id,
636
- type: "function",
637
- function: {
638
- name: toolCall.name,
639
- arguments: JSON.stringify(toolCall.arguments)
640
- }
641
- }))
657
+ tool_calls: convertToolCalls(msg.toolCalls)
642
658
  });
643
659
  continue;
644
660
  }
645
661
  if (msg.role === "user" && msg.attachments && msg.attachments.length > 0) {
646
- const content = [];
647
- if (msg.content?.trim()) {
648
- content.push({ type: "text", text: msg.content });
649
- }
650
- for (const attachment of msg.attachments) {
651
- const convertedContent = await convertAttachmentWithFallback(
652
- { data: attachment.data, filename: attachment.filename, id: attachment.id },
653
- options
654
- );
655
- content.push(convertedContent);
656
- }
662
+ const content = await buildAttachmentContentWithFallback(msg.content, msg.attachments, options);
657
663
  converted.push({
658
664
  role: "user",
659
665
  content
@@ -690,18 +696,15 @@ function needsVisionFallback(messages, modelSupportsVision, visionFallbackEnable
690
696
  });
691
697
  return result;
692
698
  }
693
- async function buildNonStreamingCreateParams(input) {
694
- const { model, request, profile, capabilities, disableThinking, visionFallbackEnabled = false, onVisionFallbackStart, onVisionFallbackDone } = input;
695
- const messages = request.messages;
696
- const modelSupportsVision = profile.supportsVision ?? false;
697
- const options = {
698
- modelSupportsVision,
699
+ async function buildChatCompletionCreateParams(model, request, profile, capabilities, disableThinking, visionFallbackEnabled, isStreaming, onVisionFallbackStart, onVisionFallbackDone) {
700
+ const convertedMessages = await convertMessagesWithOptions(
701
+ request.messages,
702
+ profile,
699
703
  visionFallbackEnabled,
700
- signal: request.signal,
704
+ request.signal,
701
705
  onVisionFallbackStart,
702
706
  onVisionFallbackDone
703
- };
704
- const convertedMessages = needsVisionFallback(messages, modelSupportsVision, visionFallbackEnabled) ? await convertMessagesWithFallback(messages, options) : convertMessages(messages, { modelSupportsVision, visionFallbackEnabled: false });
707
+ );
705
708
  const params = {
706
709
  model,
707
710
  messages: convertedMessages,
@@ -710,45 +713,26 @@ async function buildNonStreamingCreateParams(input) {
710
713
  temperature: request.temperature ?? profile.temperature,
711
714
  max_tokens: request.maxTokens ?? profile.defaultMaxTokens,
712
715
  top_p: profile.topP,
713
- stream: false
716
+ stream: isStreaming,
717
+ ...isStreaming ? { stream_options: { include_usage: true } } : {}
714
718
  };
715
719
  if (capabilities.supportsTopK && profile.topK !== void 0) {
716
720
  ;
717
721
  params["top_k"] = profile.topK;
718
722
  }
719
- if (capabilities.supportsChatTemplateKwargs && profile.supportsReasoning && disableThinking) {
723
+ const shouldDisableThinking = isStreaming ? disableThinking || request.disableThinking : disableThinking;
724
+ if (capabilities.supportsChatTemplateKwargs && profile.supportsReasoning && shouldDisableThinking) {
720
725
  ;
721
726
  params["chat_template_kwargs"] = { enable_thinking: false };
722
727
  }
723
728
  return params;
724
729
  }
725
- async function buildStreamingCreateParams(input) {
730
+ async function buildCreateParamsFromInput(input, isStreaming) {
726
731
  const { model, request, profile, capabilities, disableThinking, visionFallbackEnabled = false, onVisionFallbackStart, onVisionFallbackDone } = input;
727
- const messages = request.messages;
728
- const modelSupportsVision = profile.supportsVision ?? false;
729
- const options = { modelSupportsVision, visionFallbackEnabled, signal: request.signal, onVisionFallbackStart, onVisionFallbackDone };
730
- const convertedMessages = needsVisionFallback(messages, modelSupportsVision, visionFallbackEnabled) ? await convertMessagesWithFallback(messages, options) : convertMessages(messages, { modelSupportsVision, visionFallbackEnabled: false });
731
- const params = {
732
- model,
733
- messages: convertedMessages,
734
- ...request.tools ? { tools: convertTools(request.tools) } : {},
735
- ...request.toolChoice ? { tool_choice: request.toolChoice } : {},
736
- temperature: request.temperature ?? profile.temperature,
737
- max_tokens: request.maxTokens ?? profile.defaultMaxTokens,
738
- top_p: profile.topP,
739
- stream: true,
740
- stream_options: { include_usage: true }
741
- };
742
- if (capabilities.supportsTopK && profile.topK !== void 0) {
743
- ;
744
- params["top_k"] = profile.topK;
745
- }
746
- if (capabilities.supportsChatTemplateKwargs && profile.supportsReasoning && (disableThinking || request.disableThinking)) {
747
- ;
748
- params["chat_template_kwargs"] = { enable_thinking: false };
749
- }
750
- return params;
732
+ return buildChatCompletionCreateParams(model, request, profile, capabilities, !!disableThinking, visionFallbackEnabled, isStreaming, onVisionFallbackStart, onVisionFallbackDone);
751
733
  }
734
+ var buildNonStreamingCreateParams = (input) => buildCreateParamsFromInput(input, false);
735
+ var buildStreamingCreateParams = (input) => buildCreateParamsFromInput(input, true);
752
736
  function mapFinishReason(reason) {
753
737
  switch (reason) {
754
738
  case "stop":
@@ -828,7 +812,7 @@ function createLLMClient(config, initialBackend = "unknown") {
828
812
  try {
829
813
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
830
814
  await ensureVisionFallbackConfigLoaded();
831
- const { isVisionFallbackEnabled } = await import("./vision-fallback-NOC3YYIB.js");
815
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-ADYRFFD4.js");
832
816
  const paramsOptions = {
833
817
  model,
834
818
  request,
@@ -906,7 +890,7 @@ function createLLMClient(config, initialBackend = "unknown") {
906
890
  });
907
891
  try {
908
892
  await ensureVisionFallbackConfigLoaded();
909
- const { isVisionFallbackEnabled } = await import("./vision-fallback-NOC3YYIB.js");
893
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-ADYRFFD4.js");
910
894
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
911
895
  const createParams = await buildStreamingCreateParams({
912
896
  model,
@@ -1122,4 +1106,4 @@ export {
1122
1106
  setLlmStatus,
1123
1107
  clearModelCache
1124
1108
  };
1125
- //# sourceMappingURL=chunk-3XZ23PXM.js.map
1109
+ //# sourceMappingURL=chunk-OVLFEBRR.js.map
@@ -0,0 +1,44 @@
1
+ import {
2
+ getEventStore
3
+ } from "./chunk-6L3X7T4K.js";
4
+ import {
5
+ createContextStateMessage
6
+ } from "./chunk-NJWPSSRW.js";
7
+
8
+ // src/server/utils/session-utils.ts
9
+ function getSessionMessageCount(sessionId) {
10
+ const eventStore = getEventStore();
11
+ const events = eventStore.getEvents(sessionId);
12
+ let count = 0;
13
+ for (const event of events) {
14
+ if (event.type === "message.start") {
15
+ const data = event.data;
16
+ if (data.role === "user") {
17
+ count++;
18
+ }
19
+ }
20
+ }
21
+ return count;
22
+ }
23
+ function finalizeTurnCompletion(sessionId, sessionManager, broadcastForSession) {
24
+ sessionManager.setRunning(sessionId, false);
25
+ const contextState = sessionManager.getContextState(sessionId);
26
+ broadcastForSession(sessionId, createContextStateMessage(contextState));
27
+ }
28
+ function buildRunChatTurnParams(params) {
29
+ return {
30
+ sessionManager: params.sessionManager,
31
+ sessionId: params.sessionId,
32
+ llmClient: params.llmClient,
33
+ signal: params.signal,
34
+ onMessage: params.onMessage,
35
+ ...params.statsIdentity ? { statsIdentity: params.statsIdentity } : {}
36
+ };
37
+ }
38
+
39
+ export {
40
+ getSessionMessageCount,
41
+ finalizeTurnCompletion,
42
+ buildRunChatTurnParams
43
+ };
44
+ //# sourceMappingURL=chunk-SN7OBEVL.js.map
@@ -27,7 +27,7 @@ Options:
27
27
  }
28
28
  async function runNetworkSetup(mode) {
29
29
  const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-JF2HDJ6P.js");
30
- const { saveGlobalConfig } = await import("./config-DEM6ASQM.js");
30
+ const { saveGlobalConfig } = await import("./config-67AX6CNS.js");
31
31
  const { getAuthKeyPath } = await import("./paths-ZRI56O63.js");
32
32
  const existingAuth = await loadAuthConfig(mode);
33
33
  if (existingAuth) {
@@ -88,7 +88,7 @@ async function runNetworkSetup(mode) {
88
88
  console.log("\u2713 Configuration saved!\n");
89
89
  }
90
90
  async function runConfig(mode) {
91
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-DEM6ASQM.js");
91
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-67AX6CNS.js");
92
92
  const { getGlobalConfigPath } = await import("./paths-ZRI56O63.js");
93
93
  const config = await loadGlobalConfig(mode);
94
94
  const configPath = getGlobalConfigPath(mode);
@@ -143,18 +143,18 @@ async function runCli(options) {
143
143
  break;
144
144
  }
145
145
  case "provider": {
146
- const { runProviderCommand } = await import("./provider-K3PHZO27.js");
146
+ const { runProviderCommand } = await import("./provider-DKGBQHUS.js");
147
147
  const [, subcommand] = positionals;
148
148
  await runProviderCommand(mode, subcommand);
149
149
  break;
150
150
  }
151
151
  default: {
152
- const { configFileExists } = await import("./config-DEM6ASQM.js");
152
+ const { configFileExists } = await import("./config-67AX6CNS.js");
153
153
  const configExists = await configFileExists(mode);
154
154
  if (!configExists) {
155
155
  await runNetworkSetup(mode);
156
156
  }
157
- const { runServe } = await import("./serve-DERN4AB6.js");
157
+ const { runServe } = await import("./serve-GOLQMQFA.js");
158
158
  await runServe({
159
159
  mode,
160
160
  port: values.port ? parseInt(values.port) : void 0,
@@ -167,4 +167,4 @@ async function runCli(options) {
167
167
  export {
168
168
  runCli
169
169
  };
170
- //# sourceMappingURL=chunk-PCOG5FQD.js.map
170
+ //# sourceMappingURL=chunk-T5PBG2PE.js.map
@@ -13,14 +13,14 @@ import {
13
13
  getToolRegistryForAgent,
14
14
  loadAllAgentsDefault,
15
15
  runTopLevelAgentLoop
16
- } from "./chunk-N25QUEPO.js";
16
+ } from "./chunk-4OI4VPZ6.js";
17
17
  import {
18
18
  getCurrentContextWindowId,
19
19
  getEventStore
20
- } from "./chunk-5GE3QJSZ.js";
20
+ } from "./chunk-6L3X7T4K.js";
21
21
  import {
22
22
  buildSnapshotFromSessionState
23
- } from "./chunk-7HLRI6JM.js";
23
+ } from "./chunk-2KP34IDL.js";
24
24
  import {
25
25
  logger
26
26
  } from "./chunk-PNBH3RAX.js";
@@ -293,4 +293,4 @@ export {
293
293
  runBuilderTurn,
294
294
  runVerifierTurn
295
295
  };
296
- //# sourceMappingURL=chunk-H22VHHQ4.js.map
296
+ //# sourceMappingURL=chunk-U54QVKL2.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  detectBackend,
3
3
  detectModel
4
- } from "./chunk-3XZ23PXM.js";
4
+ } from "./chunk-OVLFEBRR.js";
5
5
  import {
6
6
  getGlobalConfigPath
7
7
  } from "./chunk-R4HADRYO.js";
@@ -380,4 +380,4 @@ export {
380
380
  activateProvider,
381
381
  mergeConfigs
382
382
  };
383
- //# sourceMappingURL=chunk-J2DHVXRX.js.map
383
+ //# sourceMappingURL=chunk-ZDNXCVW4.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-PCOG5FQD.js";
4
+ } from "../chunk-T5PBG2PE.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-PCOG5FQD.js";
4
+ } from "../chunk-T5PBG2PE.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
@@ -13,11 +13,11 @@ import {
13
13
  saveGlobalConfig,
14
14
  setDefaultModelSelection,
15
15
  trySmartDefaults
16
- } from "./chunk-J2DHVXRX.js";
17
- import "./chunk-3XZ23PXM.js";
18
- import "./chunk-XFXOSPYH.js";
16
+ } from "./chunk-ZDNXCVW4.js";
17
+ import "./chunk-OVLFEBRR.js";
18
+ import "./chunk-55N6FAAZ.js";
19
19
  import "./chunk-R4HADRYO.js";
20
- import "./chunk-UL4JYQKK.js";
20
+ import "./chunk-IN5EP4ZB.js";
21
21
  import "./chunk-PNBH3RAX.js";
22
22
  export {
23
23
  activateProvider,
@@ -35,4 +35,4 @@ export {
35
35
  setDefaultModelSelection,
36
36
  trySmartDefaults
37
37
  };
38
- //# sourceMappingURL=config-DEM6ASQM.js.map
38
+ //# sourceMappingURL=config-67AX6CNS.js.map
@@ -36,7 +36,7 @@ import {
36
36
  isFileInCache,
37
37
  isStoredEvent,
38
38
  isTurnEvent
39
- } from "./chunk-5GE3QJSZ.js";
39
+ } from "./chunk-6L3X7T4K.js";
40
40
  import {
41
41
  buildContextMessagesFromEventHistory,
42
42
  buildContextMessagesFromMessages,
@@ -53,7 +53,7 @@ import {
53
53
  foldTodos,
54
54
  foldTurnEventsToSnapshotMessages,
55
55
  getMessagesForWindow
56
- } from "./chunk-7HLRI6JM.js";
56
+ } from "./chunk-2KP34IDL.js";
57
57
  import "./chunk-3EHGGBWE.js";
58
58
  import "./chunk-TVQOONDR.js";
59
59
  import "./chunk-PNBH3RAX.js";
@@ -111,4 +111,4 @@ export {
111
111
  isStoredEvent,
112
112
  isTurnEvent
113
113
  };
114
- //# sourceMappingURL=events-VDAC7E7K.js.map
114
+ //# sourceMappingURL=events-2ETDOE5B.js.map
@@ -14,8 +14,9 @@ import {
14
14
  foldSessionState,
15
15
  foldTodos,
16
16
  foldTurnEventsToSnapshotMessages,
17
- getMessagesForWindow
18
- } from "./chunk-7HLRI6JM.js";
17
+ getMessagesForWindow,
18
+ spreadOptionalMessageFields
19
+ } from "./chunk-2KP34IDL.js";
19
20
  export {
20
21
  buildContextMessagesFromEventHistory,
21
22
  buildContextMessagesFromMessages,
@@ -32,6 +33,7 @@ export {
32
33
  foldSessionState,
33
34
  foldTodos,
34
35
  foldTurnEventsToSnapshotMessages,
35
- getMessagesForWindow
36
+ getMessagesForWindow,
37
+ spreadOptionalMessageFields
36
38
  };
37
- //# sourceMappingURL=folding-NDFQCISZ.js.map
39
+ //# sourceMappingURL=folding-M7FMUBOL.js.map
@@ -3,7 +3,7 @@ import {
3
3
  runBuilderTurn,
4
4
  runChatTurn,
5
5
  runVerifierTurn
6
- } from "./chunk-H22VHHQ4.js";
6
+ } from "./chunk-U54QVKL2.js";
7
7
  import {
8
8
  TurnMetrics,
9
9
  createChatDoneEvent,
@@ -11,12 +11,12 @@ import {
11
11
  createMessageStartEvent,
12
12
  createToolCallEvent,
13
13
  createToolResultEvent
14
- } from "./chunk-N25QUEPO.js";
14
+ } from "./chunk-4OI4VPZ6.js";
15
15
  import "./chunk-NBU6KIOD.js";
16
16
  import "./chunk-574HZVLE.js";
17
- import "./chunk-XFXOSPYH.js";
18
- import "./chunk-5GE3QJSZ.js";
19
- import "./chunk-7HLRI6JM.js";
17
+ import "./chunk-55N6FAAZ.js";
18
+ import "./chunk-6L3X7T4K.js";
19
+ import "./chunk-2KP34IDL.js";
20
20
  import "./chunk-NJWPSSRW.js";
21
21
  import "./chunk-22CTURMH.js";
22
22
  import "./chunk-7IOZFJBW.js";
@@ -38,4 +38,4 @@ export {
38
38
  runChatTurn,
39
39
  runVerifierTurn
40
40
  };
41
- //# sourceMappingURL=orchestrator-KZI7B5IS.js.map
41
+ //# sourceMappingURL=orchestrator-U5VCLBYQ.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.14",
3
+ "version": "1.6.16",
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/skill-defaults dist/command-defaults dist/agent-defaults dist/workflow-defaults && cp src/server/skills/defaults/*.md dist/skill-defaults/ && cp src/server/commands/defaults/*.md dist/command-defaults/ && cp src/server/agents/defaults/*.md dist/agent-defaults/ && cp src/server/workflows/defaults/*.json dist/workflow-defaults/ && cp package.json dist/",
30
+ "build:server": "FORCE_COLOR=1 tsup && mkdir -p dist/server/commands/defaults dist/server/skills/defaults && cp src/server/skills/defaults/*.md dist/server/skills/defaults/ && cp src/server/commands/defaults/*.md dist/server/commands/defaults/ && cp src/server/agents/defaults/*.md dist/agent-defaults/ && cp src/server/workflows/defaults/*.json dist/workflow-defaults/ && cp package.json dist/",
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",
@@ -47,6 +47,10 @@
47
47
  "lint:fix": "eslint src/ --fix",
48
48
  "format": "prettier --check 'src/**/*.ts'",
49
49
  "format:fix": "prettier --write 'src/**/*.ts'",
50
+ "duplicate:server": "jscpd src/server/ --ignore '**/*.test.ts'",
51
+ "duplicate:web": "jscpd web/src/ --config .jscpd-web.json",
52
+ "duplicate": "npm run duplicate:server && npm run duplicate:web",
53
+ "check": "npm run typecheck && npm run duplicate",
50
54
  "clean": "rm -rf dist",
51
55
  "prepublishOnly": "npm run build",
52
56
  "prepare": "husky"
@@ -104,6 +108,7 @@
104
108
  "dotenv": "^17.3.1",
105
109
  "eslint": "^10.1.0",
106
110
  "husky": "^9.1.7",
111
+ "jscpd": "^4.0.9",
107
112
  "lint-staged": "^16.4.0",
108
113
  "postcss": "^8.5.1",
109
114
  "prettier": "^3.8.1",
@@ -118,7 +123,12 @@
118
123
  },
119
124
  "lint-staged": {
120
125
  "src/**/*.ts": [
121
- "eslint --no-warn-ignored"
126
+ "eslint --no-warn-ignored",
127
+ "tsc --noEmit",
128
+ "jscpd src/server/ --ignore '**/*.test.ts' --threshold 0"
129
+ ],
130
+ "web/src/**/*.{ts,tsx}": [
131
+ "jscpd web/src/ --config .jscpd-web.json --threshold 0"
122
132
  ]
123
133
  },
124
134
  "engines": {