openfox 2.0.2 → 2.0.3

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 (29) hide show
  1. package/dist/{chat-handler-LJMW4OK3.js → chat-handler-HXCAXFEV.js} +6 -6
  2. package/dist/{chunk-MWHH6UZB.js → chunk-3YK3INGL.js} +3 -3
  3. package/dist/{chunk-7ZMMDZU7.js → chunk-A52FXWJX.js} +8 -4
  4. package/dist/{chunk-32GQUDLN.js → chunk-FCFCBOWR.js} +5 -7
  5. package/dist/{chunk-LEDG5WAN.js → chunk-MSUES6A3.js} +3 -3
  6. package/dist/{chunk-RI6GAMNP.js → chunk-NZCKCJH5.js} +1 -1
  7. package/dist/{chunk-XEK3KII6.js → chunk-OP22QEB3.js} +1 -28
  8. package/dist/{chunk-CK6LGE7G.js → chunk-PK7CBACL.js} +2 -2
  9. package/dist/{chunk-FFEAEPJB.js → chunk-Z4SWOUWC.js} +8 -3
  10. package/dist/{chunk-72GTKFVG.js → chunk-ZHK4XSLM.js} +59 -147
  11. package/dist/cli/dev.js +1 -1
  12. package/dist/cli/index.js +1 -1
  13. package/dist/{compactor-TDNRM3A7.js → compactor-5VQNEYQX.js} +2 -2
  14. package/dist/{events-ZKWAKWI7.js → events-4T6IO56V.js} +2 -4
  15. package/dist/{orchestrator-LX6FKB6L.js → orchestrator-KQROHCQ7.js} +5 -5
  16. package/dist/package.json +1 -1
  17. package/dist/{processor-NMYSEBC7.js → processor-YXAPERVZ.js} +4 -4
  18. package/dist/{protocol-D59sCy9L.d.ts → protocol-49SJtN_P.d.ts} +2 -0
  19. package/dist/{provider-DTNQYCMV.js → provider-QPECLUZ7.js} +3 -3
  20. package/dist/{provider-manager-LMHAHLIF.js → provider-manager-YA2WALTF.js} +3 -3
  21. package/dist/{serve-DMWEPTU5.js → serve-WHN52MAF.js} +8 -8
  22. package/dist/server/index.d.ts +4 -9
  23. package/dist/server/index.js +7 -7
  24. package/dist/shared/index.d.ts +2 -2
  25. package/dist/{tools-BOE5T3KC.js → tools-ESHH53EB.js} +4 -4
  26. package/dist/web/assets/{index-C7IF2YAa.js → index-Di3909TT.js} +68 -68
  27. package/dist/web/index.html +1 -1
  28. package/dist/web/sw.js +1 -1
  29. package/package.json +1 -1
@@ -5,18 +5,18 @@ import {
5
5
  generateSessionName,
6
6
  getSessionMessageCount,
7
7
  needsNameGenerationCheck
8
- } from "./chunk-CK6LGE7G.js";
8
+ } from "./chunk-PK7CBACL.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-LEDG5WAN.js";
12
- import "./chunk-32GQUDLN.js";
11
+ } from "./chunk-MSUES6A3.js";
12
+ import "./chunk-FCFCBOWR.js";
13
13
  import "./chunk-DL6ZILAF.js";
14
14
  import "./chunk-PBGOZMVY.js";
15
15
  import "./chunk-VRGRAQDG.js";
16
16
  import "./chunk-XAMAYRDA.js";
17
17
  import {
18
18
  getEventStore
19
- } from "./chunk-XEK3KII6.js";
19
+ } from "./chunk-OP22QEB3.js";
20
20
  import "./chunk-ITWVFGFV.js";
21
21
  import {
22
22
  createChatMessageMessage,
@@ -28,7 +28,7 @@ import "./chunk-RFNEDBVO.js";
28
28
  import "./chunk-FBGWG4N6.js";
29
29
  import "./chunk-BVHFMAVN.js";
30
30
  import "./chunk-CQGTEGKL.js";
31
- import "./chunk-FFEAEPJB.js";
31
+ import "./chunk-Z4SWOUWC.js";
32
32
  import {
33
33
  logger
34
34
  } from "./chunk-K44MW7JJ.js";
@@ -161,4 +161,4 @@ export {
161
161
  startChatSession,
162
162
  stopSessionExecution
163
163
  };
164
- //# sourceMappingURL=chat-handler-LJMW4OK3.js.map
164
+ //# sourceMappingURL=chat-handler-HXCAXFEV.js.map
@@ -151,7 +151,7 @@ async function runCli(options) {
151
151
  break;
152
152
  }
153
153
  case "provider": {
154
- const { runProviderCommand } = await import("./provider-DTNQYCMV.js");
154
+ const { runProviderCommand } = await import("./provider-QPECLUZ7.js");
155
155
  const [, subcommand] = positionals;
156
156
  await runProviderCommand(mode, subcommand);
157
157
  break;
@@ -193,7 +193,7 @@ async function runCli(options) {
193
193
  if (!configExists) {
194
194
  await runNetworkSetup(mode);
195
195
  }
196
- const { runServe } = await import("./serve-DMWEPTU5.js");
196
+ const { runServe } = await import("./serve-WHN52MAF.js");
197
197
  const serveOptions = { mode };
198
198
  if (values.port) serveOptions.port = parseInt(values.port);
199
199
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -205,4 +205,4 @@ async function runCli(options) {
205
205
  export {
206
206
  runCli
207
207
  };
208
- //# sourceMappingURL=chunk-MWHH6UZB.js.map
208
+ //# sourceMappingURL=chunk-3YK3INGL.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getModelProfile,
6
6
  getThinking,
7
7
  mapFinishReason
8
- } from "./chunk-FFEAEPJB.js";
8
+ } from "./chunk-Z4SWOUWC.js";
9
9
  import {
10
10
  logger
11
11
  } from "./chunk-K44MW7JJ.js";
@@ -826,7 +826,9 @@ function createProviderManager(config) {
826
826
  ...settings.thinkingLevel !== void 0 ? { thinkingLevel: settings.thinkingLevel } : existingModel?.thinkingLevel !== void 0 ? { thinkingLevel: existingModel.thinkingLevel } : {},
827
827
  ...settings.nonThinkingEnabled !== void 0 ? { nonThinkingEnabled: settings.nonThinkingEnabled } : existingModel?.nonThinkingEnabled !== void 0 ? { nonThinkingEnabled: existingModel.nonThinkingEnabled } : {},
828
828
  ...settings.thinkingExtraKwargs !== void 0 ? { thinkingExtraKwargs: settings.thinkingExtraKwargs } : existingModel?.thinkingExtraKwargs !== void 0 ? { thinkingExtraKwargs: existingModel.thinkingExtraKwargs } : {},
829
- ...settings.nonThinkingExtraKwargs !== void 0 ? { nonThinkingExtraKwargs: settings.nonThinkingExtraKwargs } : existingModel?.nonThinkingExtraKwargs !== void 0 ? { nonThinkingExtraKwargs: existingModel.nonThinkingExtraKwargs } : {}
829
+ ...settings.nonThinkingExtraKwargs !== void 0 ? { nonThinkingExtraKwargs: settings.nonThinkingExtraKwargs } : existingModel?.nonThinkingExtraKwargs !== void 0 ? { nonThinkingExtraKwargs: existingModel.nonThinkingExtraKwargs } : {},
830
+ ...settings.thinkingQueryParams !== void 0 ? { thinkingQueryParams: settings.thinkingQueryParams } : existingModel?.thinkingQueryParams !== void 0 ? { thinkingQueryParams: existingModel.thinkingQueryParams } : {},
831
+ ...settings.nonThinkingQueryParams !== void 0 ? { nonThinkingQueryParams: settings.nonThinkingQueryParams } : existingModel?.nonThinkingQueryParams !== void 0 ? { nonThinkingQueryParams: existingModel.nonThinkingQueryParams } : {}
830
832
  });
831
833
  if (existingModel) {
832
834
  providers = providers.map(
@@ -849,7 +851,9 @@ function createProviderManager(config) {
849
851
  ...model.topK !== void 0 && { topK: model.topK },
850
852
  ...model.maxTokens !== void 0 && { maxTokens: model.maxTokens },
851
853
  ...model.supportsVision !== void 0 && { supportsVision: model.supportsVision },
852
- ...kwargs ? { chatTemplateKwargs: JSON.parse(kwargs) } : {}
854
+ ...kwargs ? { chatTemplateKwargs: JSON.parse(kwargs) } : {},
855
+ ...mode === "thinking" && model.thinkingQueryParams ? { queryParams: JSON.parse(model.thinkingQueryParams) } : {},
856
+ ...mode === "non-thinking" && model.nonThinkingQueryParams ? { queryParams: JSON.parse(model.nonThinkingQueryParams) } : {}
853
857
  };
854
858
  },
855
859
  async refreshProviderModels(providerId) {
@@ -913,4 +917,4 @@ export {
913
917
  parseDefaultModelSelection,
914
918
  createProviderManager
915
919
  };
916
- //# sourceMappingURL=chunk-7ZMMDZU7.js.map
920
+ //# sourceMappingURL=chunk-A52FXWJX.js.map
@@ -22,7 +22,7 @@ import {
22
22
  getCurrentWindowMessageOptions,
23
23
  getEventStore,
24
24
  getRuntimeConfig
25
- } from "./chunk-XEK3KII6.js";
25
+ } from "./chunk-OP22QEB3.js";
26
26
  import {
27
27
  buildContextMessagesFromEventHistory,
28
28
  foldContextState,
@@ -57,7 +57,7 @@ import {
57
57
  getModelProfile,
58
58
  modelSupportsVision,
59
59
  streamWithSegments
60
- } from "./chunk-FFEAEPJB.js";
60
+ } from "./chunk-Z4SWOUWC.js";
61
61
  import {
62
62
  logger
63
63
  } from "./chunk-K44MW7JJ.js";
@@ -2929,7 +2929,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
2929
2929
  sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
2930
2930
  if (!compacting) {
2931
2931
  const contextState = sessionManager.getContextState(sessionId);
2932
- const { shouldCompact } = await import("./compactor-TDNRM3A7.js");
2932
+ const { shouldCompact } = await import("./compactor-5VQNEYQX.js");
2933
2933
  if (shouldCompact(contextState.currentTokens, contextState.maxTokens, runtimeConfig.context.compactionThreshold)) {
2934
2934
  const compactPromptMsgId = crypto.randomUUID();
2935
2935
  append(
@@ -3733,7 +3733,7 @@ var callSubAgentTool = {
3733
3733
  };
3734
3734
  }
3735
3735
  try {
3736
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-BOE5T3KC.js");
3736
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ESHH53EB.js");
3737
3737
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3738
3738
  const turnMetrics = new TurnMetrics();
3739
3739
  const result = await executeSubAgent({
@@ -4770,8 +4770,6 @@ export {
4770
4770
  runTopLevelAgentLoop,
4771
4771
  createAssemblyResult,
4772
4772
  assembleAgentRequest,
4773
- loadVisionModelFromGlobalConfig,
4774
- processContextImages,
4775
4773
  getConversationMessages,
4776
4774
  processEventsForConversation,
4777
4775
  executeSubAgent,
@@ -4785,4 +4783,4 @@ export {
4785
4783
  getToolRegistryForAgent,
4786
4784
  createToolRegistry
4787
4785
  };
4788
- //# sourceMappingURL=chunk-32GQUDLN.js.map
4786
+ //# sourceMappingURL=chunk-FCFCBOWR.js.map
@@ -17,13 +17,13 @@ import {
17
17
  loadAllAgentsDefault,
18
18
  processEventsForConversation,
19
19
  runTopLevelAgentLoop
20
- } from "./chunk-32GQUDLN.js";
20
+ } from "./chunk-FCFCBOWR.js";
21
21
  import {
22
22
  getCurrentContextWindowId,
23
23
  getCurrentWindowMessageOptions,
24
24
  getEventStore,
25
25
  getRuntimeConfig
26
- } from "./chunk-XEK3KII6.js";
26
+ } from "./chunk-OP22QEB3.js";
27
27
  import {
28
28
  buildSnapshotFromSessionState
29
29
  } from "./chunk-ITWVFGFV.js";
@@ -311,4 +311,4 @@ export {
311
311
  runAgentTurn,
312
312
  injectWorkflowKickoffIfNeeded
313
313
  };
314
- //# sourceMappingURL=chunk-LEDG5WAN.js.map
314
+ //# sourceMappingURL=chunk-MSUES6A3.js.map
@@ -10,4 +10,4 @@ export {
10
10
  shouldCompact,
11
11
  getCompactionTarget
12
12
  };
13
- //# sourceMappingURL=chunk-RI6GAMNP.js.map
13
+ //# sourceMappingURL=chunk-NZCKCJH5.js.map
@@ -1287,32 +1287,6 @@ function truncateSessionMessages(sessionId, messageIndex) {
1287
1287
  const removed = messages.length - lastKept;
1288
1288
  updateSessionMessageCount(sessionId, -removed);
1289
1289
  }
1290
- function compactContext(sessionId, summary, beforeTokens) {
1291
- const state = getSessionState(sessionId);
1292
- if (!state) {
1293
- throw new Error("Session not found");
1294
- }
1295
- const closedWindowId = state.currentContextWindowId;
1296
- const newWindowId = crypto.randomUUID();
1297
- const summaryMessageId = crypto.randomUUID();
1298
- const eventStore = getEventStore();
1299
- eventStore.append(sessionId, {
1300
- type: "message.start",
1301
- data: {
1302
- messageId: summaryMessageId,
1303
- role: "assistant",
1304
- content: summary,
1305
- contextWindowId: closedWindowId,
1306
- isCompactionSummary: true
1307
- }
1308
- });
1309
- eventStore.append(sessionId, {
1310
- type: "message.done",
1311
- data: { messageId: summaryMessageId }
1312
- });
1313
- emitContextCompacted(sessionId, closedWindowId, newWindowId, beforeTokens, 0, summary);
1314
- return { newWindowId, summaryMessageId };
1315
- }
1316
1290
  function getRecentUserPromptsForSession(sessionId, limit = 10) {
1317
1291
  try {
1318
1292
  const eventStore = getEventStore();
@@ -1421,7 +1395,6 @@ export {
1421
1395
  emitPatternRetry,
1422
1396
  emitTurnSnapshot,
1423
1397
  truncateSessionMessages,
1424
- compactContext,
1425
1398
  getRecentUserPromptsForSession
1426
1399
  };
1427
- //# sourceMappingURL=chunk-XEK3KII6.js.map
1400
+ //# sourceMappingURL=chunk-OP22QEB3.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getEventStore,
3
3
  updateSessionMetadata
4
- } from "./chunk-XEK3KII6.js";
4
+ } from "./chunk-OP22QEB3.js";
5
5
  import {
6
6
  buildMessagesFromStoredEvents,
7
7
  foldPendingConfirmations
@@ -147,4 +147,4 @@ export {
147
147
  needsNameGenerationCheck,
148
148
  applyGeneratedSessionName
149
149
  };
150
- //# sourceMappingURL=chunk-CK6LGE7G.js.map
150
+ //# sourceMappingURL=chunk-PK7CBACL.js.map
@@ -211,7 +211,7 @@ function getBackendDisplayName(backend) {
211
211
  case "opencode-go":
212
212
  return "OpenCode Go";
213
213
  case "unknown":
214
- return "Unknown";
214
+ return "Other";
215
215
  }
216
216
  }
217
217
 
@@ -346,7 +346,9 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
346
346
  params["top_k"] = topK;
347
347
  }
348
348
  const resolvedEffort = reasoningEffort ?? request.reasoningEffort;
349
- if (resolvedEffort) {
349
+ const queryParams = request.modelSettings?.queryParams;
350
+ const hasQueryParams = queryParams && Object.keys(queryParams).length > 0;
351
+ if (resolvedEffort && !hasQueryParams) {
350
352
  ;
351
353
  params["reasoning_effort"] = resolvedEffort;
352
354
  const chatTemplateKwargs = request.modelSettings?.chatTemplateKwargs;
@@ -360,6 +362,9 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
360
362
  };
361
363
  }
362
364
  }
365
+ if (hasQueryParams) {
366
+ Object.assign(params, queryParams);
367
+ }
363
368
  const modelParams = buildModelParams({ temperature, topP, topK, maxTokens });
364
369
  return { params, modelParams };
365
370
  }
@@ -497,4 +502,4 @@ export {
497
502
  mapFinishReason,
498
503
  streamWithSegments
499
504
  };
500
- //# sourceMappingURL=chunk-FFEAEPJB.js.map
505
+ //# sourceMappingURL=chunk-Z4SWOUWC.js.map